diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79a4a43a..a7cdcf89 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,43 +32,141 @@ jobs: uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 with: repository: sdevil7th/MoDiff - ref: a0d29db8484f8f06f9d42f6782634cd66e1ac996 + ref: 78fd3b7384b43a7a78465bc4ba625019e50e65e3 path: MoDiff persist-credentials: false + - name: Verify the pinned backend supports native setup + working-directory: MoDiff + run: | + if [ ! -f uv.lock ]; then + echo "::error::The pinned backend predates native uv setup. Commit the paired backend changes, then update this workflow's immutable backend ref as documented in CONTRIBUTING.md." + exit 1 + fi - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 with: node-version-file: MoDiff-client/.nvmrc cache: npm cache-dependency-path: MoDiff-client/package-lock.json - - run: npm ci + - run: npm ci --include=dev - run: npm audit --audit-level=high + - name: Test browser shard selection + run: node --test scripts/select-browser-shard.test.mjs - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 with: python-version: '3.12' - uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 - with: - version: '0.11.26' - - name: Install the reviewed CPU backend and test dependencies + - name: Install the native CPU backend and test dependencies working-directory: MoDiff run: | - python -m modiff.install --accelerator cpu --backend-only --non-interactive --json + uv sync --extra cpu --locked uv pip install --python .venv/bin/python -r requirements/test.txt uv pip check --python .venv/bin/python .venv/bin/python -m modiff.preflight --json --fail-on-error + .venv/bin/python scripts/smoke_base_runtime.py - run: npx playwright install --with-deps chromium - run: npm run check - - run: npm run check:ui + + browser-shards: + name: Client browser shard ${{ matrix.shard }} + strategy: + fail-fast: false + matrix: + shard: [1, 2, 3] + runs-on: ubuntu-latest + timeout-minutes: 120 + defaults: + run: + working-directory: MoDiff-client + env: + CI: true + MODIFF_PYTHON: ${{ github.workspace }}/MoDiff/.venv/bin/python + MODIFF_BACKEND_PYTHON: ${{ github.workspace }}/MoDiff/.venv/bin/python + PYTHONDONTWRITEBYTECODE: '1' + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + with: + path: MoDiff-client + - name: Check out the matching backend contract + uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + with: + repository: sdevil7th/MoDiff + # Match the immutable backend revision in the Client quality job. + ref: 78fd3b7384b43a7a78465bc4ba625019e50e65e3 + path: MoDiff + persist-credentials: false + - name: Verify the pinned backend supports native setup + working-directory: MoDiff + run: | + if [ ! -f uv.lock ]; then + echo "::error::The pinned backend predates native uv setup. Commit the paired backend changes, then update both workflow backend refs as documented in CONTRIBUTING.md." + exit 1 + fi + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version-file: MoDiff-client/.nvmrc + cache: npm + cache-dependency-path: MoDiff-client/package-lock.json + - run: npm ci --include=dev + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + with: + python-version: '3.12' + - uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 + - name: Install the native CPU backend and test dependencies + working-directory: MoDiff + run: | + uv sync --extra cpu --locked + uv pip install --python .venv/bin/python -r requirements/test.txt + uv pip check --python .venv/bin/python + .venv/bin/python -m modiff.preflight --json --fail-on-error + .venv/bin/python scripts/smoke_base_runtime.py + - run: npx playwright install --with-deps chromium + # The mocked suite includes production-bundle fixtures. Build this job's + # own source instead of depending on the quality job's filesystem. + - name: Build the production client + id: browser_build + run: npm run build + - name: Run shared controls + if: matrix.shard == 1 + env: + PLAYWRIGHT_HTML_OUTPUT_DIR: playwright-report/shared-controls + run: npm run e2e:shared-controls -- --output=test-results/shared-controls + - name: Verify and run assigned Studio tests + if: ${{ !cancelled() && steps.browser_build.outcome == 'success' }} + env: + SHARD: ${{ matrix.shard }} + SHARD_COUNT: ${{ strategy.job-total }} + PLAYWRIGHT_HTML_OUTPUT_DIR: playwright-report/studio + run: | + npm run --silent e2e:studio:mocked -- --list --reporter=list > "$RUNNER_TEMP/studio-all" + node scripts/select-browser-shard.mjs "$RUNNER_TEMP/studio-all" "$SHARD" "$SHARD_COUNT" > "$RUNNER_TEMP/studio-shard" + npm run --silent e2e:studio:mocked -- --test-list "$RUNNER_TEMP/studio-shard" --list --reporter=list > "$RUNNER_TEMP/studio-resolved" + node scripts/select-browser-shard.mjs "$RUNNER_TEMP/studio-all" "$SHARD" "$SHARD_COUNT" "$RUNNER_TEMP/studio-resolved" + npm run e2e:studio:mocked -- --test-list "$RUNNER_TEMP/studio-shard" --output=test-results/studio - name: Upload failed browser evidence - if: failure() + if: failure() || cancelled() uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: - name: playwright-failure-${{ github.run_id }} + name: playwright-failure-${{ github.run_id }}-${{ github.run_attempt }}-shard-${{ matrix.shard }} path: | MoDiff-client/playwright-report/ MoDiff-client/test-results/ if-no-files-found: ignore retention-days: 7 + browser: + name: Client browser quality + needs: browser-shards + if: ${{ always() }} + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Require every browser shard to pass + env: + SHARD_RESULT: ${{ needs.browser-shards.result }} + run: | + echo "Browser shards finished with $SHARD_RESULT." + test "$SHARD_RESULT" = success + platform-smoke: name: Platform smoke (${{ matrix.os }}) runs-on: ${{ matrix.os }} @@ -83,7 +181,7 @@ jobs: with: node-version-file: .nvmrc cache: npm - - run: npm ci + - run: npm ci --include=dev - run: npm run lock:integrity - run: npm run licenses:check - name: Parse PowerShell launchers diff --git a/.prettierignore b/.prettierignore index c3529ba0..60d05f91 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,6 +1,7 @@ artifacts/ config/template-assets.v1.json .pytest_cache/ +.playwright-cli/ dist/ node_modules/ output/ diff --git a/AGENTS.md b/AGENTS.md index 8bfb1b94..42835717 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,9 +15,9 @@ These rules apply to Codex, Copilot-style agents, and any AI tool editing this r - Keep frontend nodes and task surfaces generic. Render the backend's declared dynamic inputs, parameters, outputs, readiness, and install requirements instead of selecting Python classes or maintaining model-specific parameter branches in the client. -- Transformers is an optional backend runtime, not a default client/application dependency. Browsing or opening a - template, loading registry data, and requesting an Auto plan must never install it. Show an explicit install and - consent action for a reviewed optional-runtime profile, then require backend verification before enabling Run. +- Transformers and PEFT are required backend dependencies installed during ordinary setup. Recognize a verified + base runtime without a separate install/activate flow. Browsing templates, discovery, and Auto planning must + never install packages. Additional optional runtimes still require explicit installation and verification. - New UI work is Tailwind/headless-first. Do not reintroduce MUI, Emotion, notistack, styled-components, CSS modules, or another UI framework. - Use `src/theme` for MoDiff colors, Hugging Face-inspired tokens, typography, radii, shadows, z-index values, category colors, style sanitizers, and React Flow helpers. - Use `src/ui` primitives before writing repeated panel, status, field, image, toast, dialog, menu, tab, or toolbar styling. @@ -25,6 +25,29 @@ These rules apply to Codex, Copilot-style agents, and any AI tool editing this r - Keep `src/App.css` limited to global browser rules, React Flow internals, and behavior hooks such as `modiff-field`, `nodrag`, and `nowheel`. - Backend-provided `style` objects must go through the MoDiff style sanitizer and stay limited to safe layout properties. +## Generic Workflow Stages + +- Review the rendered card at its minimum and normal widths with long real values. Check text inside controls, icon focus and names, label contrast, socket roles and help text. Record what was inspected visually and which interactions were tested. + +- Use content-aware initial sizes for new ordinary and custom nodes. Preserve explicit manual sizes and saved layouts. Check the editable body after the header and port tray are measured, including after model metadata arrives. +- Put an enabling switch before the fields it controls. Hide settings that the active operation ignores and preserve their values and connected inputs. Keep the primary model selector labelled and distinguish edit-in-place from conversion to independent nodes. +- Base filtered model choices and category showcases on actual available recipes and their approved media. Search long single- and multi-select lists, and resolve wire suggestions against the selected model's real socket contract. + +- Keep search metadata with the backend visual stage catalog. Add modes, action names, familiar aliases and typed roles to an existing stage first. Verify name and action searches, click and wire insertion, model switching and saved graph export before adding another public stage. + +- Reuse a task- or modality-generic node for the same user-visible job across models and workflows. Put model-specific execution and schema differences in the declared backend adapter. +- When several modes from one advanced stage appear side by side, title each card for its job and preserve user-authored titles. Inspect file import, canvas drop, the Examples library and saved workflows separately. A generated layout may be fitted after measurement while authored positions and sizes must survive reopening. +- Use an ordinary node for a stage with one executable action. Expose the inputs, effective controls and outputs the user needs. Fold internal preparation or decoding into a stage only when it shares one owner and its intermediate result has no independent consumer. +- Reserve new Blocks for meaningful typed boundaries, such as storyboard shots, reusable compositions, loops or genuine nested control flow. Preserve existing saved Block interfaces and registered definition hashes. +- Keep revised captions and help for existing registered stages in the visual presentation layer. The compiler hashes some stock field metadata. Reproduce the paired catalog with `npm run catalog:block-v2:check` before shipping wording changes. +- For node layout changes, inspect the packaged card at its normal and minimum widths in a fresh workflow and a saved example. Open Help, use the affected controls, and retain before-and-after views. State which actions received a visual review and which were checked automatically. +- Keep compiler-only actions out of manual node discovery. Give public fields and sockets role-specific labels and show only controls consumed by the current operation. Test inactive saved values and existing connections when changing presentation. +- Label ports by role, including Source, Mask, Control, and First or Last Frame. Show one editor per effective setting and retain the saved fallback when a typed connection supplies the value. Choose a shared default only after it works in both the fresh workflow and the corresponding saved workflow. +- Resolve model variants that share a repository through the exact connected model and task declaration. Keep the canvas, restored workflow and saved output metadata consistent. +- Test the canvas and the ordered executable graph separately. Compare controls, typed bindings, model switching, and save/reopen. A presentation-only change preserves the executable graph and reuses the original run evidence. +- When unifying stages across model families or input types, test a real wire change and an older saved workflow in the packaged UI. Restore fixed model capabilities from the installed registry. Preserve the saved file fallback and each family’s settings across switches. +- Review the default blank-canvas picker separately from the execution registry. Start with generic stages and media processors. Keep specialist tools reachable by search, compatible wire or explicit implementation browsing. Compare the fresh template with its shipped Example and reopened execution graph. Check independent branches before folding preparation into a stage. + ## Component Rules - Feature components should describe behavior and layout, not recreate visual primitives. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1b4f860b..8b141780 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,9 +23,9 @@ Good first contributions include reproducible bug fixes, accessibility improveme 1. Fork the public repository, then clone your fork. 2. Add the canonical repository as an `upstream` remote so you can keep the branch current. 3. Create a short-lived branch from the latest `upstream/main`. -4. Use the development installer for integrated work, or `npm ci` for UI-only - work against an already-running compatible backend, and reproduce the issue - before changing code. +4. Set up the compatible backend with native uv commands and this client with + `npm ci --include=dev`, then reproduce the issue before changing code. UI-only work can use + an already-running compatible backend. 5. Make the smallest coherent change, including tests and docs. 6. Run the required checks and review the complete diff. 7. Rebase or merge the current `upstream/main` according to the repository's accepted workflow; resolve conflicts without discarding unrelated work. @@ -39,45 +39,72 @@ cd MoDiff-client git remote add upstream https://github.com//MoDiff-client.git git fetch upstream git switch -c fix/concise-description upstream/main -npm ci +npm ci --include=dev ``` Use clear commit messages that describe the outcome. Maintainers may squash a pull request when merging, so keep the branch reviewable rather than manufacturing a particular final history. ## Development Environment +For the interim Windows candidate, use the current `fix-ui-ux-issues` branch in +both repositories. Follow the [quick start](README.md#developer-setup-with-uv-and-npm) +for setup commands. The candidate's changes have yet to reach `main`. + Required client versions: - Node.js `24.12.0` (`.nvmrc`) - npm `11.6.2` (`packageManager` and `engines` in `package.json`) -For setup without repository launchers, use the backend's -[uv developer commands](https://github.com/sdevil7th/MoDiff/blob/feat/generic-diffusers-workbench/docs/developer-setup.md) -and run `npm ci`, then `npm run dev`, in this client checkout. See the -[Windows guide](docs/windows-support.md#developer-setup-with-uv-and-npm) for the -two-terminal flow. The same uv commands work on Linux. +Use native uv and npm commands with the sibling backend and client checkouts. +In the backend terminal, run: -For integrated development with sibling repositories, install the reviewed -backend profile, backend test requirements, and exact client lockfile through -the development installer: +```text +uv sync --locked --extra cpu +uv run --locked --extra cpu python -m modiff.preflight --json --check-port 8088 --fail-on-error +uv run --locked --extra cpu python main.py +``` -```powershell -.\install-dev.ps1 -BackendPath ..\MoDiff -Accelerator auto +For NVIDIA, use `--extra cuda` in each command; for Intel, use `--extra xpu`. +On Apple Silicon, omit the extra. Keep the same extra on sync and run. Use a +separate checkout to try another accelerator; native sync reconciles `.venv`. +AMD vendor-wheel environments use the backend's specialist +[accelerator setup](https://github.com/sdevil7th/MoDiff/blob/fix-ui-ux-issues/docs/accelerator-installation.md). + +In the client terminal, run: + +```text +npm ci --include=dev +npm run dev ``` +Open the URL printed by Vite and leave the backend running. Transformers and +PEFT are installed during backend setup; normal image and LoRA workflows need +no separate package activation. These commands work on Linux and Windows +PowerShell. The backend's +[developer guide](https://github.com/sdevil7th/MoDiff/blob/fix-ui-ux-issues/docs/developer-setup.md) +and the [Windows guide](docs/windows-support.md#developer-setup-with-uv-and-npm) +cover explicit `uv pip` setup, upgrades, repair, and platform details. + +For UI-only work against an already-running backend, the same `npm ci --include=dev` and +`npm run dev` commands are sufficient. To use another backend port: + ```bash -chmod +x install-dev.sh run-dev.sh stop-dev.sh -./install-dev.sh --accelerator auto +VITE_BACKEND_PROXY_TARGET=http://127.0.0.1:8088 npm run dev -- --host 127.0.0.1 --port 5173 ``` -For UI-only work against an already-installed backend, install only the client -dependencies exactly from the lockfile: +The repository launchers are optional convenience tools for integrated setup +or specialist reviewed profiles: + +```powershell +.\install-dev.ps1 -BackendPath ..\MoDiff -Accelerator auto +``` ```bash -npm ci +chmod +x install-dev.sh run-dev.sh stop-dev.sh +./install-dev.sh --accelerator auto ``` -Run the client against a compatible sibling backend: +Start the optional integrated launcher after setup: ```powershell .\run-dev.ps1 @@ -88,12 +115,6 @@ chmod +x run-dev.sh stop-dev.sh ./run-dev.sh ``` -For UI-only work, run Vite against an already-running backend: - -```bash -VITE_BACKEND_PROXY_TARGET=http://127.0.0.1:8088 npm run dev -- --host 127.0.0.1 --port 5173 -``` - The [README](README.md) and [troubleshooting guide](docs/troubleshooting.md) cover backend paths, ports, preflight, and platform details. ## Project Map @@ -129,7 +150,7 @@ Read [the architecture guide](docs/modiff-client-architecture.md) before changin The compatible backend may integrate model libraries officially maintained and published by Hugging Face. The browser does not run those libraries or a hosted inference provider. It consumes task-generic execution specifications from the backend and must not select Python classes or duplicate model-specific parameter logic. Hub hosting alone does not establish that a package or repository implementation is an official Hugging Face library. -Transformers-backed execution is optional and consented. Template browsing/opening, registry discovery, and Auto planning may display a missing-runtime requirement but must not initiate installation. The user must explicitly request installation of a reviewed backend optional-runtime profile; Run remains blocked until the backend reports a compatible verified installation. +Transformers and PEFT are required backend dependencies installed during ordinary setup. A verified base runtime must be runnable without a separate install or activation step. Template browsing, registry discovery, and Auto planning must not install packages. Additional optional runtimes still require an explicit backend installation action and verification before Run. For a large component, extract domain behavior into hooks/modules before adding another responsibility. `StudioPanel`, `Workflow`, flow mutations, websocket handling, graph export, and Studio contracts already use that pattern. @@ -269,6 +290,13 @@ When adding or changing a template: 5. Add/update template and quality tests. 6. Update Gallery coverage and evidence only when the publication contract is met. +For a template registered from an approved saved run, preserve the recorded +conditioning and locked settings. Test its evidence bindings against the +retained graph, original output and exact approved files. The authored prompt +lint still applies to new recipes. Keep display metadata separate from the +execution settings when refreshing a retained catalog entry, and verify the +current Gallery association after changing its catalog revision. + When adding a model or mode, follow the checklist in [Auto mode design](docs/auto-mode-design.md). Do not mark a profile Auto-ready from schema or mocked UI evidence alone. Public Gallery changes must keep manifest paths, media types, reviews, and redacted provenance consistent. Run: @@ -280,6 +308,347 @@ npm run gallery:coverage Do not publish a local artifact, private input, personal path, access token, or source revision through a Gallery bundle. +The standalone, model-backed canonical execution recorder is separate from public +templates. It validates original native execution records for the reviewed +DDIM, DDPM, Consistency, and PixArt Sigma PAG routes. Use the exact workflow +ID from the retained descriptor: + +```bash +MODIFF_CANONICAL_WORKFLOW_EVIDENCE=/absolute/path/evidence.json node scripts/template-qualification.mjs --workflow ModelPipeline:text_to_image +``` + +The descriptor uses `schemaVersion: 1`, format +`modiff.canonical-workflow-evidence.v1`, and the exact `workflowId`. Its +`creatorPackage`, `outputPackage`, `runDetail`, `nodes`, `backendSourceBefore`, +`backendSourceAfter`, and `modelObservations` entries reference original observed +files using `{path, bytes, sha256}`. Paths must be relative, canonical, contained, +and free of symlinks. Source observations contain their actual `identity`; model +observations retain the ordinary model-list response. `outputs` contains ordered +`{backendPath, mediaType, file}` entries for the unchanged durable media. Retain +the original browser downloads and raw task body; do not reconstruct their +fields from a catalog or replace defaults, paths, prompts, or model pins. + +For these hinted accounting routes, also retain `graphCompleted` as a +`{path, bytes, sha256}` reference to the **original** `graph_completed` WebSocket +JSON frame (at most 16 MiB). Public run-detail GET responses deliberately omit +`runtimeHints`; do not add invented hints to them. The shared factory and reader +join the submitted hints, frame, raw task, output and consumed receipt by +task/session/client-run/input-hash/workflow/canvas epoch, attempt zero, complete +runtime/source identity and measurement. The frame has no attempt index or +completion timestamp; those remain bound to the original raw task. + +The `modiff.canonical-workflow-evidence.v1` format supports input-free execution +only (`inputs: []`). Every +submitted literal must have matching native consumed-input evidence; omissions, +overrides, unsupported scalar connections, unresolved model components, retries, +and fallback attempts remain held. Input-backed workflows need a durable, +execution-bound input-byte receipt: a post-run file copy or a current cache hash +alone is insufficient. The existing normal exporter must be able to export the +unchanged canonical graph without an inferred execution scope. Deterministic +builtin media workflows remain unsupported by that model-backed path; do not +invent a model for them. The three input-free data utilities have the separate +deterministic path described below. + +The same recorder accepts `modiff.canonical-builtin-data-evidence.v1` only for +`BuiltinDataOperation:data_conversion`, `graph_utility` and `text_select`. +It fills only the empty text source from the versioned authoring brief, exports +through the normal client exporter, and checks the original accepted queue graph, +completed task, all fresh node-completion frames, both delivered/persisted text +previews and exact exported bytes against an independent expected result. Other +controls and the canonical source remain unchanged. Retain original before/after +source observations plus the full source inventory matched to their native +fingerprint and the executing process. Descriptors bind every retained file by +relative path, size and SHA-256 through the ordinary containment validator. +Run `template-qualification.mjs --workflow` with the same environment variable; +it retains these records in the existing canonical registry. The release reader +repeats the complete validation rather than trusting the registry row. + +These records use `real_backend_deterministic_data`, an empty model set and a +null Auto candidate. Exact-result correctness can qualify these private utility +recipes; it grants no public asset approval, complete consumed-field accounting, +browser-interaction, model-resource or hardware claim. Model-backed receipts +retain their existing requirements. + +The same canonical recorder also accepts +`modiff.canonical-builtin-media-evidence.v1` for the 17 declared ordinary media +utilities. It requires a baseline at the unchanged canonical defaults plus an +explicit exercise from `config/builtin-media-qualification.v1.json`. Only root +file bindings and those named exercise controls can differ from the source. +Start the isolated backend with `MODIFF_CAPTURE_BUILTIN_MEDIA=1`; normal user +execution leaves this bounded capture disabled. The native `mediaEvidence` +section binds original file bytes, actual decoded images/audio, video snapshots, +normalized controls and ordered processing/output identities. The client parser +retains it without changing the legacy summary or treating it as model evidence. + +Retain original task/completion packets, accepted graphs, full before/after +source inventories, all root bytes, durable outputs and raw image PNGs. The +descriptor's two `runs` entries (`baseline`, `exercise`) bind each file using +the same contained `{path, bytes, sha256}` references. The recorder repeats the +graph/runtime/source/input/wire joins and independent image, PCM and video checks; +codec tolerances and actual delivery dimensions/rate remain explicit. Its +`real_backend_deterministic_media` record grants no public quality/rights, +full consumed-field accounting, browser-interaction, model-resource or hardware +claim. Existing approved model assets need no rerender. Unsupported capture, +truncated evidence, converted unbound roots, incomplete collections, changed +source/settings, retries and cached attempts remain held. + +The existing whole-compatible masked-image receipt reader accepts either +`group_cpu` or `model_cpu` only when the submitted graph, native consumed values +and actual Auto resolution agree. These produce distinct resource identities; +neither implies hardware fit or qualifies an advertised family recipe. Keep +the original public task and completion frame unchanged. A separately labelled +derived receipt may join their matching task/session/run identities, runtime, +measurements and observed preparation; it must not present added hints as part +of the original public GET response. Input bytes still need execution-bound +native source-hash, geometry and mode observations. + +The optional native `fieldAccounting` extension preserves requested literals, +actual call controls, explicit inactive/superseded controls, and bounded recipe +projections separately from legacy v1 fields and summaries. The client parser +retains its completeness/truncation status without changing v1 normalization. +For a plain text-to-image call, it retains the bounded requested controls and +effective call arguments reported by the backend, including PAG scales and +model-specific aliases for generic controls. This parser support preserves the +receipt for inspection. Canonical admission still requires the separate +reviewed accounting join and original execution evidence. +Parsing a projection hash is not cryptographic verification. The independent +canonical accounting join verifies metadata hashes, connected producer ports, +disabled quantization and the unique executed loader for each reviewed five-node +runtime graph. Preview's CPU setting does not describe model placement. The shared +provenance factory accepts an optional canonical proof from the existing reader: +the trusted current canonical export, actual original task/output and complete +native accounting. It derives the plan itself and binds task, attempt, output, +model and completion identities without adding runtime hints or rewriting proofs. +The DDIM profile accepts the unquantized float32 resident CIFAR-10 graph with +correlation-only hints or its existing Studio Expert producer payload. The +DDPM and Consistency profiles accept the exact newly authored automatic +attention routes with their respective original Windows CUDA and Linux ROCm +captures. The original `modiff.private.ddpm-attention-variant.v1` and +`modiff.private.consistency-attention-variant.v1` descriptors share the exact +current-graph accounting checks. The +reviewed PixArt Sigma PAG profile accepts its pinned model with model CPU offload +on CUDA and correlation-only hints. It verifies the assembled visual owners and +the observed Generate controls, including both PAG scales, the conditioning +alias and the image contract. These profiles reject unknown execution authority, +coercions, Auto and nonempty retry plans or history. DDIM accounts for the full saved observation form and the +actual advisory CUDA reset decision; `fraction: 1` alone does not prove that a +reset succeeded. Hinted and unhinted accounting also check the complete current, +submitted and creator API envelopes: only `sid`, `nodes`, `paths`, the reviewed +`runtimeHints`, and an optional empty `loops` array are admitted. Nonempty or +malformed loops, service execution, deterministic/provenance routes and unknown +top-level authority need separate accounting; the historical canonical identity +alone does not cover them. Submitted and original completion hashes become part of the +derived plan. The recorder retains the original frame unchanged, and the release +projection repeats the same closed validation. Valid legacy unhinted descriptors and +the default factory path remain unchanged. This accounting join is scoped to the +reviewed routes. Mocked protocol checks exercise validator behavior. Native +records establish actual execution of the retained recipe. + +Current exports include the optional `execution_profile_id` loader selector. +The initial whole-pipeline DDIM accounting path accepts its empty value only +when the native loader records it as inactive. A nonempty stage selection or a +claim that the empty field reached the library remains rejected. Older proofs +without this field retain their original schema and scope. Prepared submissions +also preserve their already resolved seed; inspecting current execution scope +must not randomize an unused export and change its saved canvas snapshot. + +Reviewed named compositions that differ from a model/task default belong in +`config/canonical-template-variants.v1.json`. Regenerate one with +`node scripts/workflow-library-generator.mjs --template=reviewed_template_id`; +the default pair and unrelated definitions stay preserved. Template and pair +scope flags are mutually exclusive and unknown flags fail closed. The portable +export uses the existing Block execution compiler before assigning canonical +IDs, including nested Shot stages. This export projection does not rewrite the +ordinary grouped Studio canvas or grant execution/quality qualification. + +Treat an already registered execution-selection descriptor as versioned recipe +metadata, including its note. Presentation-only grouping must preserve that +declaration. The original native LTX text, opening-image and ordered-reference +recipes keep their existing strict locks; whole-pipeline and sequence migrations +still require their own actual native evidence. Distinct multi-shot compositions +need named canonical variants rather than a single-shot model/task default. + +An explicitly reviewed experimental recipe can declare `experimentalRecipe` +with its exact `modelType`, `mode` and `runtimeProfileId` in that same policy. +Generation checks the backend's declared optional runtime and writes the marker +only on the named variant. The release reader accepts only that exact variant, +source template, model, task, runtime marker and experimental graph path. Default +pairs and undeclared experimental records remain outside this association. +The family stays experimental; runtime installation, Auto, hardware and feature +qualification are unchanged. Complete native provenance, current recipe locks +and an approved available Gallery example remain separate release requirements. +The normal template writer fully validates these proofs; the historical +`--allow-blocked-probe` path retains its execution-only scope. + +The native media resource reader also handles the closed text-to-image workflow +chain ModelsLoader → WorkflowTextEncode → WorkflowImageDenoise → +WorkflowDecodeImage → Preview. It joins actual task, graph, model, native fields +and typed state wires; unbound quantization must be observed as null. It rejects +extra owners, input-backed modes, borrowed components and changed native values. +This resource identity does not claim full control accounting or native capture +of an internally fixed sampler or workflow selector. Retained source recovery +and later immutable model/registry observations must be labelled separately from +original pre-run observations; never rewrite the raw task or media. + +The `modiff.private.input-bound-model-smoke.v1` descriptor is supported for the +standalone Spandrel Real-ESRGAN x2 image and Marigold depth-preview workflows. +The reader exports the current +canonical graph through the normal client path and checks the supplied variant +against its sole declared image binding. It verifies the archived source with +the native Load receipt and the terminal Preview with the original output. +The Spandrel check also joins the exact weight file to the executor's +controlled-artifact record. The Marigold check joins the installed model pin +and decoded depth preview. The numeric depth map is outside that receipt's scope. +The resulting record identifies the populated fixture variant and records +`canonicalDefaultsExecuted: false`, since the catalogue graph has an empty file +selector. Other model-backed file-input routes need their own reviewed bindings +and original execution evidence. + +The original `modiff.private.smollm2-prompt-variant.v1` and +`modiff.private.shap-e-prompt-variant.v1` descriptions bind only the one empty +authored prompt in their respective workflows. Native producer evidence and the +original text or video are required. These receipts cover the populated prompt +variants and record the limits of their native control accounting. + +The native image prompt-variant recorder also accepts the reviewed Linux ROCm +Sana Sprint text-to-image and SDXL PAG recipes with model CPU offload. It +verifies their immutable checkpoints and separate control contracts. Sana Sprint +records the sequence length and treats the saved negative prompt as inactive. +SDXL PAG verifies both PAG scales through typed accounting and treats the saved +sequence length as inactive. These receipts bind the saved prompt, seed and +exact output only for the matching source graph and runtime. + +Run evidence always uses the direct exporter for the original archived graph. +Opening an editable workflow tab separately applies the legacy attention +default repair to matching DDPM and Consistency presets. A workflow-local +attention selection takes precedence. The exact older managed specification +receipt remains attached to a restored managed graph while its current +compatible authoring rules are used for form edits. + +The recorder copies original evidence under the backend's ignored +`data/qualification/release/canonical-workflow-evidence/` directory and records +`canonical-workflow-run-receipts.v1.json`. Release-contract generation repeats the +same validation against current canonical source and retained bytes. A verified +receipt is **execution evidence only**: quality, rights, hardware qualification, +and release approval remain false. It does not make standalone workflows release +eligible, promote local review receipts, or change ordinary template recording +and Gallery publication policy. + +The release contract records `missingReleaseEvidence` for each held workflow. +It uses one offline frontend compiler per receipt batch and still validates +every retained graph, model record and output file separately. +The release-candidate report exposes that list as `incompleteWorkflowEvidence` +and reports standalone execution under `coverage.standaloneExecution`. Its +`awaitingReleaseEligibility` count identifies verified standalone workflows that +are still outside the eligible total. Model workflows need a matching +release-eligible source template. A captured bound variant establishes the +execution with that prompt or file and needs a reviewed recipe to bind it for +release. Native-resolution DDIM, DDPM, and Consistency samples are technical +canaries under the project's model review policy. + +The SD1.5 Inpaint path accepts a separate native PNG descriptor with original +source and mask uploads. The reader verifies that the two distinct Load nodes +produced the recorded RGB source and grayscale mask and that those exact pixels +and dimensions reached their respective Inpaint ports. Its receipt binds the +source and mask separately to the saved Expert execution. + +The saved control-image reader verifies the original PNG uploads and decoded +media, each guide, source and mask wire into the applicable sampler ports, the +main and conditioning model revisions, and the observed sampler settings. +An archived node registry can be replayed from the original source and runtime +contract without inference. The receipt records when the saved run lacks +processed guide pixels or effective PAG settings. + +AnimateDiff prompt and source-video receipts bind the base model and motion +adapter revisions. For a saved edit, the original upload and typed video wire +bind the source. The receipt records unavailable sampler observations, such +as the effective PAG controls or normalized source frames. + +The retained Wan VACE puddle recipe also binds the exact Spandrel checkpoint +to its upscale action and verifies delivery at the reviewed output size. This +named recipe uses a pinned secondary artifact alongside the primary model. + +The saved OmniGen wall edit uses the original graph request and acknowledgement, +completion event, and backend-retained output and run record. The receipt +records the missing client API snapshot and unobserved image guidance. This +path requires the exact native records and original image bytes. + +The Wan A14B opening-video replacement records its own exact opening frame, +prompt, model, and video. The older kitchen template keeps its own review +and release status. Saved FLUX Klein and Z-Image panoramas bind the original +source through canvas preparation and the typed image and mask wires. Their +records verify expanded geometry and disclose the missing derived pixels. + +Wan Animate receipts bind the original reference image and each original +video to its specific role. Character replacement also checks the background +and mask as distinct uploads. The saved receipts disclose that the frames +consumed after preprocessing were unavailable. + +Saved JoyImage Plus edits retain reference files in Load order, including +the source image before the material reference. The proof binds each upload +and native decode to the typed Edit connection. The archived two-reference +run carries an older Image Edit label in its form. The executable graph and +observed sampler identify the two-reference task. + +Older AnimateDiff guided runs retain the exact original guide clip and its +path through normalization and edge preparation. A guided edit also binds +its independently uploaded source video. The original recorder identifies +the installed ControlNet checkpoint and the executed task. The processed +frames and applied-weight evidence remain unavailable. + +Retained edits use their exact source encoding. The LongCat example binds +its native WebP upload. The Kandinsky example preserves its FP32 CPU +recipe and measures memory from samples of the original worker during +the task. Mochi's short video retains its explicit Auto attention choice. + +The reviewed Marigold synthetic ramp, SmolLM2 rain-gauge, Spandrel +Real-ESRGAN 2×, Whisper Tiny transcription and LCM dawn edit use declarations in +`src/studio/retainedGalleryTemplates.ts`. They share +the existing task contracts. Keep their original standalone graphs and +receipts. For an exact approved local review, retain `approval.v1.json`, +the original `review-scope.json` inventory, and its reviewed files beneath +`data/qualification/release/retained-template-review` in the backend +checkout. This directory is private and must stay outside version control. +`npm run release:contract:generate` revalidates its files against the original +native receipt, reviewed recipe digest and exact output. The associated catalog lock +belongs to the reviewed recipe. The historical template lock and resource +candidate remain absent. + +For the structured text recipe, the Gallery JSON must match the single full +result in the original native text transport. Verify both encoded hashes +and the decoded Gallery hash. Release eligibility joins the active template +to its original standalone workflow, then verifies the registered proof and +media against the active rights-approved Gallery set. The association supplies +no Auto or hardware approval. + +Publication removes the corresponding original entries from the hidden-candidate +authoring ledger. Retain each exact original row as +`authoring-spec.original.json` beside the approved canonical evidence descriptor. +The historical reader checks both byte identities before using the archived +row. The current authoring and Gallery metadata keep their own identities. + +The optional native `appliedAdapters` receipt records the owning ModelsLoader's +observed ordered adapter names, numeric scales, immutable artifact identities, +opaque descriptor hashes and explicit scheduler override digest. It carries a +fresh application identity after activation/removal; valid owner reuse retains +that identity with a `reused` observation. Missing or unavailable evidence is not +an empty adapter set. The history parser only checks the bounded schema. The +shared provenance factory verifies and locks present observations against the +original task/attempt, output snapshot and executed ancestor owner. +`validateAppliedAdapterProof(provenance, {required: true})` additionally requires +complete evidence matched to the ordered native Lora chain and model pins for +explicit adapter-order acceptance. Its initial strict scope +is pinned Hub adapters with explicit names and no scheduler override. Submitted +LoRA scale controls may be numeric or bounded decimal text accepted by the +backend's finite float conversion, including decimal exponents. Only that scale +comparison uses numeric normalization; original graph/export bytes and hashes +remain unchanged. Empty or padded strings, non-decimal syntax, non-finite or +out-of-range values, and coercible booleans/objects are rejected. Native observed +scales must still be numbers, and mismatched applied scales remain failures. Ordinary +template recording does not acquire this new requirement: historical absent-field +proofs retain their original submitted-graph proof level. This extension grants +no style, quality, hardware, rights or publication approval. + ## Custom extension changes Keep Add custom node, the strict response parser and backend hash-bound imports in sync. Intentional Add/Load/Reload is consent; discovery and graph import are not. Test import failure, changed source, missing dependencies, typed search and registry refresh. Use the normal graph executor. See the backend `docs/custom-nodes.md`. @@ -288,18 +657,61 @@ Keep Add custom node, the strict response parser and backend hash-bound imports Run the complete local CI-equivalent gate before requesting review: +The schema fixtures need the ordinary backend interpreter from the setup above. +Set both interpreter variables explicitly; do not point them at a managed +optional-runtime overlay. The fixtures do not download model weights. + +On Linux/macOS: + ```bash +export MODIFF_BACKEND_PYTHON="$PWD/../MoDiff/.venv/bin/python" +export MODIFF_PYTHON="$MODIFF_BACKEND_PYTHON" +npx playwright install chromium npm run check ``` -This runs formatting, lint, type checking, style audit, unit/contract tests, production build, and bundle budget. +On Windows PowerShell: -The Linux CI quality job checks out this client and an immutable, compatible -`sdevil7th/MoDiff` backend revision as sibling directories. It installs the -backend's reviewed CPU profile and test dependencies before running the same -gate. Update the backend commit in `.github/workflows/ci.yml` when a coordinated -contract change requires it. This setup does not download model weights or -qualify accelerator execution; platform smoke jobs remain client-only. +```powershell +$env:MODIFF_BACKEND_PYTHON = (Resolve-Path ..\MoDiff\.venv\Scripts\python.exe).Path +$env:MODIFF_PYTHON = $env:MODIFF_BACKEND_PYTHON +npx playwright install chromium +npm run check +``` + +This runs formatting, lint, type checking, style audit, unit/contract tests, production build, and bundle budget. +The request/proxy regression tests also launch Chromium. On a fresh Linux host, +install its system dependencies with `npx playwright install-deps chromium` +using an account with administrator access before running the gate. + +The Linux CI quality job and browser workers check out this client and its pinned +`sdevil7th/MoDiff` backend as sibling directories. Each installs the CPU backend +with `uv sync --extra cpu --locked`, installs the test dependencies and runs +preflight and the tiny native image/LoRA smoke. Each browser worker builds the +production client before opening it in Chromium. + +The required **Client browser quality** check collects three independent workers. +Each runs one third of Studio's browser cases, with one Playwright worker, its +usual timeouts and retries, and a 120-minute CI budget. Before execution each +worker verifies its test identities against Playwright's full discovery output. +Round-robin selection spreads cases from the large Studio spec across runners +and preserves the declaration order within each group. The first worker also +runs the complete shared-controls suite. A failure on one worker leaves the +others running. A failed or cancelled worker fails the required check. Download +the failed worker's artifact for its HTML reports, screenshots and traces. +For the complete serial browser suite locally, run `npm run check:ui`. + +These checks use CPU fixtures. Platform smoke jobs exercise the client setup. + +For a coordinated change, commit and review the backend first, then replace the +backend `ref` in both jobs in `.github/workflows/ci.yml` with that actual compatible +40-character commit SHA and run the paired gates. Keep both refs immutable and +equal, and update README's `CI backend contract` declaration with them. Keep the +reviewed application-source table independent from that CI selection. The +selected backend must contain its reviewed native setup contract and +`uv.lock`; the workflow +checks these before setup. Do not substitute a mutable branch or an invented +future SHA for the paired commit. The registered Block catalog audit uses a fixed Linux runtime target and mocked device/package probes to reproduce the reviewed catalog on any host. Backend @@ -408,3 +820,12 @@ AI-assisted contributions are welcome, but the contributor remains responsible f ## Code Of Conduct Participation in this project is governed by [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md). Be constructive, assume good intent, and focus review on the work and its impact. + +## Visual node discovery + +The backend publishes the versioned visual node catalog with the full node registry. Give each new user action a destination in the existing stage catalog and describe its action in language a user can search. Test the published mode against its real schema, both pickers, a typed wire and a saved graph. Preserve author titles, connection roles, model ownership and executable identities. Run the paired catalog tests from the backend and client repositories. + +```text +python -m pytest -q tests/test_visual_node_catalog.py +node --test scripts/visual-node-catalog.test.mjs +``` diff --git a/README.md b/README.md index 151e61ff..55006113 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,10 @@ MoDiff Client is the graph-first web interface for the MoDiff generative-media b The client is built with React 19, TypeScript, Vite, Tailwind CSS, Headless UI, Zustand, Lucide React, and [`@xyflow/react`](https://reactflow.dev/). For Qwen-Image 2.1, use the generic image nodes in Workflows. The backend's -[integration guide](https://github.com/sdevil7th/MoDiff/blob/feat/generic-diffusers-workbench/docs/qwen-image-21.md) +[integration guide](https://github.com/sdevil7th/MoDiff/blob/fix-ui-ux-issues/docs/qwen-image-21.md) explains attention-context reuse, runtime requirements and current qualification limits. -The [image demo guide](https://github.com/sdevil7th/MoDiff/blob/feat/generic-diffusers-workbench/docs/image-demo.md) lists the tested workflows, settings, +The [image demo guide](https://github.com/sdevil7th/MoDiff/blob/fix-ui-ux-issues/docs/image-demo.md) lists the tested workflows, settings, measured reuse behavior and remaining qualification work. > [!IMPORTANT] @@ -18,56 +18,101 @@ measured reuse behavior and remaining qualification work. ## Developer setup with uv and npm -Install Git, [uv `0.11.26`](https://docs.astral.sh/uv/getting-started/installation/), +Install Git, [uv](https://docs.astral.sh/uv/getting-started/installation/), Node.js `24.12.0`, and npm `11.6.2`. uv can provision Python 3.12. Use two terminals for the backend and the editable frontend. -**Terminal 1 — backend:** clone both repositories into the same parent directory, +The interim Windows candidate uses the current `fix-ui-ux-issues` branch in both +repositories. These updates are not released on `main`. If you already +cloned the branch, update both checkouts before using these commands. Record +`git rev-parse HEAD` in each checkout when reporting a setup or runtime issue. + +**Terminal 1 — backend:** clone both repositories into the same parent directory, then start the backend. These commands work in Linux shells and Windows PowerShell. ```text -git clone https://github.com/sdevil7th/MoDiff.git MoDiff -git clone https://github.com/sdevil7th/MoDiff-client.git MoDiff-client +git clone --branch fix-ui-ux-issues https://github.com/sdevil7th/MoDiff.git MoDiff +git clone --branch fix-ui-ux-issues https://github.com/sdevil7th/MoDiff-client.git MoDiff-client cd MoDiff -uv run --no-project --no-sync --python 3.12 -m modiff.dev plan --accelerator cpu --backend-only --json -uv run --no-project --no-sync --python 3.12 -m modiff.dev setup --accelerator cpu --backend-only --non-interactive -uv run --no-project --no-sync --python 3.12 -m modiff.dev check --json --check-port 8088 --fail-on-error -uv run --no-project --no-sync --python 3.12 -m modiff.dev run +uv sync --locked --extra cpu +uv run --locked --extra cpu python -m modiff.preflight --json --check-port 8088 --fail-on-error +uv run --locked --extra cpu python main.py ``` -The CPU profile is for API/UI development. For NVIDIA inference, replace `cpu` -with `nvidia` in both `plan` and `setup`; other accelerators are covered in the -[full setup guide](https://github.com/sdevil7th/MoDiff/blob/feat/generic-diffusers-workbench/docs/developer-setup.md). Setup preserves an existing `.venv` and -does not download model weights. Use the guide for deliberate environment repair; -ordinary `uv sync` is not supported. +The CPU profile is for API/UI development. For NVIDIA inference, use `--extra cuda` +in each command; for Intel, use `--extra xpu`. On Apple Silicon, omit the extra. +The backend installs Transformers, PEFT and the PyAV codec used by LTX image +conditioning. Setup installs Python packages without downloading model weights. +`uv sync --locked` reconciles `.venv` +with the selected profile: use a separate checkout when testing a different +accelerator. See the [full setup guide](https://github.com/sdevil7th/MoDiff/blob/fix-ui-ux-issues/docs/developer-setup.md) for specialized AMD profiles, +explicit `uv pip` commands, repair, and upgrades. -**Terminal 2 — frontend:** from the same parent directory, run: +**Terminal 2 — frontend:** from the same parent directory, run: ```text cd MoDiff-client -npm ci +npm ci --include=dev npm run dev ``` -Keep the backend running at and open the URL printed by +The npm command installs the locked client and build dependencies, including +when the shell sets `NODE_ENV=production`. Keep the backend running at + and open the URL printed by Vite for the editable frontend. Press `Ctrl+C` in each terminal to stop it. -See the [full developer setup guide](https://github.com/sdevil7th/MoDiff/blob/feat/generic-diffusers-workbench/docs/developer-setup.md) for accelerator prerequisites, +See the [full developer setup guide](https://github.com/sdevil7th/MoDiff/blob/fix-ui-ux-issues/docs/developer-setup.md) for accelerator prerequisites, optional runtimes, repair, and bundled-app setup. +In the app, Setup → Workflow setup checklist groups the selected Run scope's +base environment, model artifacts, extra feature packages and system steps. +Transformers and PEFT are included in ordinary installation. A staged optional +install is shown separately from activation and verified worker readiness; +reloading Setup follows the existing job without starting another install. + +When Run is blocked, use **Edit setting**, **Choose supported task/model**, +**Review runtime** or **Review Auto options** to reach the relevant existing +control. Navigation preserves saved choices and starts no installation or run. +An edited or switched workflow requires a fresh readiness check. See +[Run recovery](https://github.com/sdevil7th/MoDiff/blob/fix-ui-ux-issues/docs/troubleshooting.md#run-is-blocked). + +## Historical application source and CI + +The Windows review on 1 November 2026 predates the current setup commands. Its +application source pair is: + +| Repository | Application source before final packaging | +| ------------- | ------------------------------------------ | +| MoDiff | `1239d1cecd12a7318eb263ca17c34d4fc0445d14` | +| MoDiff-client | `c561a01395044fd71c1918e95fb9e9709d8e7601` | + +CI backend contract: `78fd3b7384b43a7a78465bc4ba625019e50e65e3`. + +Both CI jobs use this immutable backend revision. It includes the weight-loading +controls for saved recipes and the model readiness and storage fields used by the +client. Hardware coverage is recorded separately. + +The 3 November Linux video testing deployment used backend +`496f3aed56ce1c6a868549df310c68e765712ce3` and client +`75080b73fb22bc0ef197f17a119cf507b3352695`. The 6 November Linux manual-testing +baseline used backend `57811fc2ee6aff5b9de7a6b67ca10914d1136fcc` and client +`f84e7cdb82025aab85f0fcf71b99478bd21ce3b4`. It includes the bounded input previews +and native boardwalk/car Auto checks. See the backend's +[release closeout](https://github.com/sdevil7th/MoDiff/blob/fix-ui-ux-issues/plans/video-stages-20261101/RELEASE-CLOSEOUT-20261103.md). + ## Install and run MoDiff Clone both repositories into the same parent directory. The backend installer automatically finds this sibling client, installs its locked Node.js toolchain and packages, downloads the verified Gallery assets, and bundles the frontend. -The backend [installation guide](https://github.com/sdevil7th/MoDiff#install-and-run) +The backend [installation guide](https://github.com/sdevil7th/MoDiff/tree/fix-ui-ux-issues#install-and-run) is the canonical source for installer profiles, prerequisites, repair, and platform support. Linux or macOS: ```bash -git clone https://github.com/sdevil7th/MoDiff.git MoDiff -git clone https://github.com/sdevil7th/MoDiff-client.git MoDiff-client +git clone --branch fix-ui-ux-issues https://github.com/sdevil7th/MoDiff.git MoDiff +git clone --branch fix-ui-ux-issues https://github.com/sdevil7th/MoDiff-client.git MoDiff-client cd MoDiff ./install.sh --accelerator auto ./run.sh @@ -76,8 +121,8 @@ cd MoDiff Windows PowerShell: ```powershell -git clone https://github.com/sdevil7th/MoDiff.git MoDiff -git clone https://github.com/sdevil7th/MoDiff-client.git MoDiff-client +git clone --branch fix-ui-ux-issues https://github.com/sdevil7th/MoDiff.git MoDiff +git clone --branch fix-ui-ux-issues https://github.com/sdevil7th/MoDiff-client.git MoDiff-client cd MoDiff .\install.ps1 -Accelerator auto .\run.ps1 @@ -109,9 +154,9 @@ Use `run.sh` or `run.ps1` unless you are editing frontend source code. - Export a workflow package, an output package, or raw graph JSON where available. - Add backend-defined nodes and custom React fields without creating a separate execution system. -In the editor, **Export → Service package** exposes named scalar inputs and +In the editor, **Export → Service package** exposes named scalar inputs and persisted preview outputs for the same lowered API graph. See the backend's -[service guide](https://github.com/sdevil7th/MoDiff/blob/feat/generic-diffusers-workbench/docs/service-prototyping.md) +[service guide](https://github.com/sdevil7th/MoDiff/blob/fix-ui-ux-issues/docs/service-prototyping.md) for the CLI, environment manifest and model-free example. ## Repository Pairing @@ -138,7 +183,7 @@ Client development requires: Integrated development also requires: - A sibling MoDiff backend checkout, or its path passed to the launcher -- The backend's managed Python 3.12 environment, installed through the uv commands +- The backend's Python 3.12 environment, installed through the uv commands in the [quick start](#developer-setup-with-uv-and-npm) or its reviewed `install.ps1` / `install.sh` profile - Sufficient RAM, accelerator memory, and disk space for the model being used - Hugging Face authorization for gated model repositories, when applicable @@ -262,9 +307,19 @@ The stop scripts deliberately leave unrelated listeners alone. Their `StopAnyLis See the [Studio user guide](docs/studio-user-flow.md) for tasks, interface areas, workflow tabs, Gallery behavior, setup, failure recovery, and a manual verification checklist. +The [image template workflow guide](docs/image-template-workflows.md) describes +the current developer nodes, explicit whole-pipeline exceptions, preserved +creator settings and historical Gallery examples. +The [developer authoring guide](docs/developer-first-node-ux.md) covers optional +Model Setup, Prepare Mask and Image Output groups, reversible component bundle +wiring, and the existing inspection/reuse controls. These explicit actions keep +saved graphs and template defaults intact. +The [audio workflow guide](docs/audio-workflows.md) covers audio Model Setup, +MiniMax's real stages, Audio Output and selected adapter ownership. + ## Workspace And Memory -**Memory → Automatic** asks the backend planner for a known local recipe. The planner evaluates the selected model and task, installed artifacts, backend package versions, accelerator resources, system memory, and offload headroom. Auto enables Run only when the selected candidate reports sufficient compatibility evidence. +**Memory → Automatic** asks the backend planner for a known local recipe. The planner evaluates the selected model and task, installed artifacts, backend package versions, accelerator resources, system memory, and offload headroom. Auto enables Run only when the selected candidate reports sufficient compatibility evidence. The backend planner is the compatibility authority. Template cards, Setup, Models, and Run readiness render the same structured assessment and do not @@ -279,7 +334,7 @@ policy; choose Custom explicitly to use your configured settings. The Run menu's **Auto** item separately repeats execution after parameter changes; keep it off when you want a single generation. -**Memory → Custom** exposes artifact, dtype, quantization, offload, device, and lower-level graph controls. Custom memory is useful for development and explicitly experimental paths; it is not a promise that an arbitrary combination will fit the machine or execute successfully. +**Memory → Custom** exposes artifact, dtype, quantization, offload, device, and lower-level graph controls. Custom memory is useful for development and explicitly experimental paths; it is not a promise that an arbitrary combination will fit the machine or execute successfully. Important model-support rules: @@ -348,7 +403,7 @@ browsing them does not install or enable anything. A **Block** is an editable graph composition. Expand it to work on its nodes; **Saved Blocks** are reusable definitions. An upstream Python block can be an ordinary implementation node or a container represented by a graph Block. -Use **Inspect node / Inspect Block → Implementation** to see its source. +Use **Inspect node / Inspect Block → Implementation** to see its source. Use **Configure Block interface** to expose inputs, outputs and editable controls. A nested Block's interface editor also selects its collapsed previews. These edits belong to the workflow instance; **Save block changes** is the explicit action for @@ -364,7 +419,7 @@ For the current task browser, picker behavior and qualification limits, see ## Custom nodes -**Nodes → Add custom node** opens Local, Hugging Face and Git. Intentional Add/Load +**Nodes → Add custom node** opens Local, Hugging Face and Git. Intentional Add/Load validates and enables trusted code in one action; revisions are pinned internally. Drop a structured Python node file on the canvas to import and insert it. Files and packages in backend `custom/` appear automatically without executing; use @@ -375,11 +430,11 @@ declared data nodes and connected supported components; unmanaged custom models require Custom memory. See the backend custom-node guide for contracts and examples. Approved Modular blocks that omit model ports receive a **Models** input when -their Python contract requires components. Connect **Load Models → Pipeline +their Python contract requires components. Connect **Load Models → Pipeline Components** to reuse compatible loaded weights. This does not download missing -block-specific models. See the backend’s [custom-node guide](https://github.com/sdevil7th/MoDiff/blob/feat/generic-diffusers-workbench/docs/custom-nodes.md) +block-specific models. See the backend’s [custom-node guide](https://github.com/sdevil7th/MoDiff/blob/fix-ui-ux-issues/docs/custom-nodes.md) for the VAE reconstruction example and component requirements. -Blocks with official component types also expose **Load Models — [block name]** +Blocks with official component types also expose **Load Models — [block name]** after approval. Select pinned, downloaded sources for its components, use **Custom** memory policy, and connect its Pipeline Components output to the custom block. @@ -467,13 +522,16 @@ in [Template Gallery asset storage](docs/template-gallery-assets.md). Run the same complete static/unit/build gate used by CI: ```bash +npx playwright install chromium npm run check ``` +The request/proxy regression tests in this gate also use Chromium. On a fresh +Linux host, install its system dependencies with `npx playwright install-deps chromium`. + Run the mocked Studio browser suite: ```bash -npx playwright install chromium npm run check:ui ``` @@ -514,7 +572,7 @@ removing `data/`, `config.ini`, or a shared Hugging Face cache wholesale. Start with the preflight report and browser connection state. Common fixes include: -- Verify Node/npm against `package.json`, then rerun `npm ci`. +- Verify Node/npm against `package.json`, then rerun `npm ci --include=dev`. - Verify the backend path and run `python -m modiff.preflight --json --check-port 8088 --fail-on-error` from the backend environment. - If port `8088` is occupied, identify the listener before reusing or stopping it; the Windows launcher treats an occupied backend port as an existing server. - Confirm the client origin can request `/health`, `/nodes`, and `/runtime/status` through the Vite proxy. @@ -567,8 +625,8 @@ inspect its ordinary nodes, required inputs and upstream implementation, then ad it to the canvas. You can also insert nodes individually by click, drag or canvas search and connect their ports. Connect the final result to a Preview, Save or Export node before running. -To change a graph of generic nodes, select its loader and open **Inspect node → -Parameters → Change model / task**. Choose the replacement pipeline/task, then +To change a graph of generic nodes, select its loader and open **Inspect node → +Parameters → Change model / task**. Choose the replacement pipeline/task, then **Preview model / task change**. The same controls are available in the Studio inspector. Review retained settings and connections before applying. The Nodes library also retains its existing **Graph to change** entry point. Compatible prompt and parameter overrides survive; @@ -619,3 +677,7 @@ Node status explains whether inputs changed, results were invalidated, or cached results were reused. Automatic resource management retains independent model owners when their combined memory estimate fits; otherwise it uses the existing release schedule where safe. + +The required-file readiness followup pairs backend `328d06f8` with client product +`ba8f7d52`. Raw node/Block identities and model computation remain unchanged; +the video plan handoff records deployment and local template acceptance. diff --git a/app.config.ts b/app.config.ts index 1e3949dc..2712a257 100644 --- a/app.config.ts +++ b/app.config.ts @@ -1,9 +1,13 @@ // Derived from cubiq/Mellon-client and modified by the MoDiff project. const serverAddress = import.meta.env.VITE_SERVER_ADDRESS || window.location.origin; +// Vite supplies a derived development value too; only the operator's +// override can describe a nonadjacent tunneled supervisor destination. +const supervisorAddressExplicit = + import.meta.env.MODIFF_SUPERVISOR_CONTROL_EXPLICIT ?? Boolean(import.meta.env.VITE_SUPERVISOR_CONTROL_ADDRESS); function backendAddress() { - if (!import.meta.env.DEV) { + if (!import.meta.env.DEV || import.meta.env.VITE_SERVER_ADDRESS) { return serverAddress; } if (import.meta.env.VITE_BACKEND_PROXY_TARGET) { @@ -22,11 +26,13 @@ function backendAddress() { } } +const backendTransportAddress = backendAddress(); + function supervisorAddress() { - if (import.meta.env.VITE_SUPERVISOR_CONTROL_ADDRESS) { + if (supervisorAddressExplicit && import.meta.env.VITE_SUPERVISOR_CONTROL_ADDRESS) { return import.meta.env.VITE_SUPERVISOR_CONTROL_ADDRESS; } - const backend = backendAddress(); + const backend = backendTransportAddress; try { const url = new URL(backend); const backendPort = Number(url.port || (url.protocol === 'https:' ? 443 : 80)); @@ -43,7 +49,9 @@ function supervisorAddress() { const config = { serverAddress, + backendAddress: backendTransportAddress, supervisorAddress: supervisorAddress(), + supervisorAddressExplicit, }; export default config; diff --git a/config/builtin-media-qualification.v1.json b/config/builtin-media-qualification.v1.json new file mode 100644 index 00000000..c670883a --- /dev/null +++ b/config/builtin-media-qualification.v1.json @@ -0,0 +1,23 @@ +{ + "schemaVersion": 1, + "format": "modiff.builtin-media-qualification.v1", + "exercises": { + "image_crop": { "x": 8, "y": 8, "width": 32, "height": 24 }, + "image_upscale": { "resize_width": 96, "resize_height": 72, "resize_resampling": "nearest" }, + "image_channels": { "channel": "red" }, + "image_adjustment": { "brightness": 0.5 }, + "image_filter": { "amount": 2 }, + "image_stitch": { "stitch_columns": 1, "stitch_spacing": 2, "stitch_background": "black" }, + "image_tile": { "rows": 3, "columns": 2 }, + "mask_composite": { "composite_invert_mask": true }, + "audio_trim": { "start_seconds": 0.25, "duration_seconds": 0.5 }, + "audio_join": { "boundary_fade_seconds": 0 }, + "audio_loudness_match": { "max_adjustment_db": 3 }, + "video_frame_extract": { "selection_mode": "indices", "indices": "1,4,8" }, + "frame_interpolation": { "interpolation_fps": 30 }, + "video_trim": { "start_seconds": 0.25, "end_seconds": 1 }, + "video_reverse": {}, + "video_stitch": {}, + "video_tile": { "columns": 1, "gap": 8, "background": "white" } + } +} diff --git a/config/canonical-template-variants.v1.json b/config/canonical-template-variants.v1.json new file mode 100644 index 00000000..bdf92018 --- /dev/null +++ b/config/canonical-template-variants.v1.json @@ -0,0 +1,129 @@ +{ + "schemaVersion": 1, + "format": "modiff.canonical-template-variants.v1", + "templates": [ + { + "id": "qwen_edit_plus_single_image", + "reason": "The single-image recipe omits the adapter selected by the default pair exemplar." + }, + { + "id": "qwen_upscale_finish", + "reason": "The finishing recipe includes its own pinned upscaler and delivery controls." + }, + { + "id": "wan_video_long_showcase", + "reason": "The five-shot recipe includes storyboard, per-shot rendering and assembly." + }, + { + "id": "ltx_video_animated_story", + "reason": "The three-scene recipe requires its own storyboard, native per-shot stages, assembly and final upscaler." + }, + { + "id": "ltx_video_long_showcase", + "reason": "The six-shot recipe retains each opening image, native generation, per-shot upscale and final assembly." + }, + { + "id": "flux3_klein_fp8r512_single_reference_edit", + "reason": "Explicit fixed recipe retains its experimental family and exact optional-provider boundary; full compositions must match their own observed runs.", + "experimentalRecipe": { + "modelType": "Flux3DistilledModularPipeline", + "mode": "edit_image", + "runtimeProfileId": "huggingface-diffusers-flux3-7ecb1e1" + } + }, + { + "id": "flux3_klein_fp8r512_text_to_image", + "reason": "Explicit fixed recipe retains its experimental family and exact optional-provider boundary; full compositions must match their own observed runs.", + "experimentalRecipe": { + "modelType": "Flux3DistilledModularPipeline", + "mode": "text_to_image", + "runtimeProfileId": "huggingface-diffusers-flux3-7ecb1e1" + } + }, + { + "id": "flux3_klein_fp8r512_raw_coordinate_prompt", + "reason": "Explicit fixed recipe retains its experimental family and exact optional-provider boundary; full compositions must match their own observed runs.", + "experimentalRecipe": { + "modelType": "Flux3DistilledModularPipeline", + "mode": "text_to_image", + "runtimeProfileId": "huggingface-diffusers-flux3-7ecb1e1" + } + }, + { + "id": "flux3_klein_fp8r512_multi_reference_edit", + "reason": "Explicit fixed recipe retains its experimental family and exact optional-provider boundary; full compositions must match their own observed runs.", + "experimentalRecipe": { + "modelType": "Flux3DistilledModularPipeline", + "mode": "edit_image", + "runtimeProfileId": "huggingface-diffusers-flux3-7ecb1e1" + } + }, + { + "id": "flux3_klein_fp8r512_lora_style", + "reason": "Explicit fixed recipe retains its experimental family and exact optional-provider boundary; full compositions must match their own observed runs.", + "experimentalRecipe": { + "modelType": "Flux3DistilledModularPipeline", + "mode": "text_to_image", + "runtimeProfileId": "huggingface-diffusers-flux3-7ecb1e1" + } + }, + { + "id": "flux3_klein_base_fp8r512_text_to_image", + "reason": "Explicit fixed recipe retains its experimental family and exact optional-provider boundary; full compositions must match their own observed runs.", + "experimentalRecipe": { + "modelType": "Flux3ModularPipeline", + "mode": "text_to_image", + "runtimeProfileId": "huggingface-diffusers-flux3-7ecb1e1" + } + }, + { + "id": "flux3_klein_base_fp8r512_single_reference_edit", + "reason": "Explicit fixed recipe retains its experimental family and exact optional-provider boundary; full compositions must match their own observed runs.", + "experimentalRecipe": { + "modelType": "Flux3ModularPipeline", + "mode": "edit_image", + "runtimeProfileId": "huggingface-diffusers-flux3-7ecb1e1" + } + }, + { + "id": "flux3_klein_base_fp8r512_raw_coordinate_prompt", + "reason": "Explicit fixed recipe retains its experimental family and exact optional-provider boundary; full compositions must match their own observed runs.", + "experimentalRecipe": { + "modelType": "Flux3ModularPipeline", + "mode": "text_to_image", + "runtimeProfileId": "huggingface-diffusers-flux3-7ecb1e1" + } + }, + { + "id": "flux3_klein_base_fp8r512_multi_reference_edit", + "reason": "Explicit fixed recipe retains its experimental family and exact optional-provider boundary; full compositions must match their own observed runs.", + "experimentalRecipe": { + "modelType": "Flux3ModularPipeline", + "mode": "edit_image", + "runtimeProfileId": "huggingface-diffusers-flux3-7ecb1e1" + } + }, + { + "id": "flux3_klein_base_fp8r512_lora_style", + "reason": "Explicit fixed recipe retains its experimental family and exact optional-provider boundary; full compositions must match their own observed runs.", + "experimentalRecipe": { + "modelType": "Flux3ModularPipeline", + "mode": "text_to_image", + "runtimeProfileId": "huggingface-diffusers-flux3-7ecb1e1" + } + }, + { + "id": "minimax_h3_image_old_town_cat", + "reason": "Explicit fixed recipe retains its experimental family and exact optional-provider boundary; full compositions must match their own observed runs.", + "experimentalRecipe": { + "modelType": "MiniMaxH3ImageModularPipeline", + "mode": "text_to_image", + "runtimeProfileId": "huggingface-diffusers-h3-image-875373a" + } + }, + { + "id": "ace_step_lyric_music_video", + "reason": "The accepted nine-scene /45-second soundtrack film has two native model owners, fitted audio, post-assembly upscale and an explicitly disabled lyric overlay. Its exact Custom memory recipe has its own canonical composition." + } + ] +} diff --git a/config/preview-free-research-workflows.v1.json b/config/preview-free-research-workflows.v1.json new file mode 100644 index 00000000..b1021e01 --- /dev/null +++ b/config/preview-free-research-workflows.v1.json @@ -0,0 +1,37 @@ +{ + "schemaVersion": 1, + "reviews": [ + { + "workflowId": "DreamLiteMobilePipeline:edit_image", + "sourceTemplateId": "task-template:dreamlite-mobile:edit-image:v1", + "canonicalWorkflowHash": "sha256:workflow-graph-v1:6cf362ac7bb4c479b7e56dca9a4b42fea1e670e57543c0cf65428aaa8fc9ae37", + "executedGraphHash": "sha256:canonical-graph-v1:d3a30a1637b45b5447c5ae112d98ef4d14f27e888b1bc6a37aca20c16bde1fd0", + "evidenceSha256": "0c4806ce6be2a0bf02c2aa5d7520dd279450df3c8b860c62be33dffb8dc130d1", + "outputHash": "sha256:bytes:21f5daf54cb23ffcde40b218a031eabec9295871ed574f8791cf7eac4f187933" + }, + { + "workflowId": "DreamLiteMobilePipeline:text_to_image", + "sourceTemplateId": "task-template:dreamlite-mobile:text-to-image:v1", + "canonicalWorkflowHash": "sha256:workflow-graph-v1:dc4c8d8e18b592d23c0ce3329b1d0237e8ae180e6b5f53dda2c80bbe0fc6fde6", + "executedGraphHash": "sha256:canonical-graph-v1:2b672169c805ec5bd825d1af8521b966c0f051f220ec01d14add8669a55e1e57", + "evidenceSha256": "e151ee1315431ae8a27a16d435da3f540ab3fb402999f42561811f454471fef6", + "outputHash": "sha256:decoded-output-collection-v1:1da3ba9fe52c5395e3fee83176f57a19db5720fa0e456df06c19d5f4c5b3e46f" + }, + { + "workflowId": "DreamLitePipeline:edit_image", + "sourceTemplateId": "task-template:dreamlite-base:edit-image:v1", + "canonicalWorkflowHash": "sha256:workflow-graph-v1:34999f99197323dc1da2cf25e05899c4782fb08ea9bfdf77455090d98de769aa", + "executedGraphHash": "sha256:canonical-graph-v1:73f5fda695f45f0ffdc6e6e657d030a58e0d9c83441c7b60fa9ed45cc88d6aaf", + "evidenceSha256": "0a08f4e9afc7ac0a579cf25be7f575d6cd57906b64f8503b593317fa96526c8d", + "outputHash": "sha256:bytes:4a27ba447583747634766c53f7d6f39eb34bc4a089950793821392b8666b7c05" + }, + { + "workflowId": "DreamLitePipeline:text_to_image", + "sourceTemplateId": "task-template:dreamlite-base:text-to-image:v1", + "canonicalWorkflowHash": "sha256:workflow-graph-v1:f4aeea2217b04c962955052c60fe0324388bdf00c74f0facab3d19d5ba510d77", + "executedGraphHash": "sha256:canonical-graph-v1:a6bfeacd6d9fb12d01bd8c27caee9fb992fb94e14c49da4fea9a3d515090724e", + "evidenceSha256": "5c84087fbbd770103610a2f6f3787565ba0ffb9868957b580fb64c6e529de181", + "outputHash": "sha256:bytes:e70c63ed0594eb02b9190bf6f10b1d248522a57f0ba15fc2befbd648e17e2378" + } + ] +} diff --git a/config/private-workflow-qualification.v1.json b/config/private-workflow-qualification.v1.json new file mode 100644 index 00000000..796d531e --- /dev/null +++ b/config/private-workflow-qualification.v1.json @@ -0,0 +1,81 @@ +{ + "schemaVersion": 1, + "reviews": [ + { + "workflowId": "AceStepAudioPipeline:text_to_audio:ace_step_chinese_new_year_lora", + "sourceTemplateId": "ace_step_chinese_new_year_lora", + "canonicalWorkflowHash": "sha256:workflow-graph-v1:de99a9b5808b8b33fe525f91790fd305a2f103794f7a90999fedc5ba090bc066", + "executedGraphHash": "sha256:canonical-graph-v1:ce45c39f7d7609926d49d5d7845cbbb0423bdf053d7defe1035a7323e7344038", + "scope": "research_academic_only", + "preview": "withheld", + "redistributionAuthorized": false, + "modelSet": [ + { + "repoId": "ACE-Step/ACE-Step-v1.5-chinese-new-year-LoRA", + "revision": "cb829a12775740c830a6d49795f16913065dc492" + }, + { + "repoId": "Runware/acestep-v15-turbo-diffusers", + "revision": "be23effe449c5957947f3020fd63bee23c64abe4" + } + ], + "outputSha256": "9a7b0bcceb386399243f4231b33751188355c7612ba6746567dcff159d3a9920", + "evidence": { + "sha256": "e0072240ea5fb7865453d6a88c8844f70f96cf319abca774107daf97fc3e289d", + "bytes": 1031 + } + }, + { + "workflowId": "FluxDevPipeline:text_to_image:flux_lora_ghibli_story", + "sourceTemplateId": "flux_lora_ghibli_story", + "canonicalWorkflowHash": "sha256:workflow-graph-v1:96d9f17a0cbfb5a729ebe93de880d465e813fc4741e854ed636fccc37257a5e5", + "executedGraphHash": "sha256:canonical-graph-v1:fabb185a7af01004fdb72edba477648345aca64db5a4f1a0aa1b0c022f5d9103", + "scope": "personal_noncommercial", + "preview": "withheld", + "redistributionAuthorized": false, + "modelSet": [ + { + "repoId": "alvarobartt/ghibli-characters-flux-lora", + "revision": "ed846114c71efc525e7f5a51e274dc976bb970a8" + }, + { + "repoId": "black-forest-labs/FLUX.1-dev", + "revision": "3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + } + ], + "outputSha256": "b49d874fc7fdb36c8cd15541b7445c7c2143c9242ab04dccc075528ed799b096", + "evidence": { + "sha256": "d40a76790832e459b3d4fa77246bfbc3da47835223783b467c247e72df293d1d", + "bytes": 1017 + } + }, + { + "workflowId": "HunyuanVideoFramepackPipeline:image_to_video", + "sourceTemplateId": "task-template:framepack:image-to-video:v1", + "canonicalWorkflowHash": "sha256:workflow-graph-v1:3d833891cc2788bb7de7a1ba83b44bcc05d17c4f09f63a4914d4ebeeb9a7f307", + "executedGraphHash": "sha256:canonical-graph-v1:fbdf225e544ed8b4c92f5d7185050aa4f6b3a36c08c3ad863346b7f35c351c7e", + "scope": "territory_limited_private_evaluation", + "preview": "withheld", + "redistributionAuthorized": false, + "modelSet": [ + { + "repoId": "lllyasviel/FramePackI2V_HY", + "revision": "86cef4396041b6002c957852daac4c91aaa47c79" + }, + { + "repoId": "hunyuanvideo-community/HunyuanVideo", + "revision": "e8c2aaa66fe3742a32c11a6766aecbf07c56e773" + }, + { + "repoId": "lllyasviel/flux_redux_bfl", + "revision": "45b801affc54ff2af4e5daf1b282e0921901db87" + } + ], + "outputSha256": "f58b6243f20b10c8cf76b71028ef482d44fdf730dee2c846ce7ccde0abf4c6a1", + "evidence": { + "sha256": "242872854f982b7f01b27bbdbd6e50c68c3632292563a792d6279753005b8baf", + "bytes": 1985 + } + } + ] +} diff --git a/config/release-showcase-scope.v1.json b/config/release-showcase-scope.v1.json new file mode 100644 index 00000000..35281723 --- /dev/null +++ b/config/release-showcase-scope.v1.json @@ -0,0 +1,1244 @@ +{ + "schemaVersion": 1, + "format": "modiff.release-showcase-scope.v1", + "name": "Registered showcase preview without AMD-cloud backlog", + "dataset": { + "repository": "sourav-das/modiff-template-gallery", + "revision": "c320700d169958015ff43655c765a4650634025f" + }, + "originalCampaign": { + "total": 89, + "registered": 81, + "open": 8 + }, + "currentGraphQualificationClaimed": false, + "userRuntimeLimitSeconds": null, + "includedTemplates": [ + { + "id": "ace_step_audio_continuation", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_ffc05ace" + }, + { + "id": "ace_step_audio_repaint", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_f6c20413" + }, + { + "id": "ace_step_audio_variation", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_5b2a07bf" + }, + { + "id": "ace_step_lyric_music_video", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_c1323bf1" + }, + { + "id": "ace_step_text_to_audio", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_3005ad61" + }, + { + "id": "character_edit", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_7d39d579" + }, + { + "id": "fast_lora", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_15c4d78a" + }, + { + "id": "flux_control_canny", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_1ce537c9" + }, + { + "id": "flux_depth_control", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_033b7129" + }, + { + "id": "flux_dev_expert_text_to_image", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_218c5369" + }, + { + "id": "flux_fill_inpaint", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_9e4895fd" + }, + { + "id": "flux_fill_outpaint", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_7142fa39" + }, + { + "id": "flux_kontext_edit", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_6460339f" + }, + { + "id": "flux_kontext_multi_reference", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_0d568def" + }, + { + "id": "flux_krea_text_to_image", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_27c2f055" + }, + { + "id": "flux_lora_cinematic_octane_3d", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_afc2b089" + }, + { + "id": "flux_lora_film_noir", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_e78041c6" + }, + { + "id": "flux_lora_oil_painting", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_fdaa5bce" + }, + { + "id": "flux_lora_paper_cutout", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_3348b655" + }, + { + "id": "flux_lora_photoreal_documentary", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_8d82f310" + }, + { + "id": "flux_lora_retro_comic", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_a046674b" + }, + { + "id": "flux_lora_watercolor", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_018427d3" + }, + { + "id": "flux_redux_edit", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_5decd690" + }, + { + "id": "flux_redux_multi_reference", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_3e3ca521" + }, + { + "id": "flux_schnell_text_to_image", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_2aadce3f" + }, + { + "id": "flux2_klein_edit", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_d3d27316" + }, + { + "id": "flux2_klein_multi_reference", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_91f5b874" + }, + { + "id": "flux2_klein_text_to_image", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_4ede4f41" + }, + { + "id": "flux3_klein_base_fp8r512_lora_style", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_b8fe4791" + }, + { + "id": "flux3_klein_base_fp8r512_multi_reference_edit", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_6c612164" + }, + { + "id": "flux3_klein_base_fp8r512_raw_coordinate_prompt", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_e448c87f" + }, + { + "id": "flux3_klein_base_fp8r512_single_reference_edit", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_02dc7e3c" + }, + { + "id": "flux3_klein_base_fp8r512_text_to_image", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_80ddfc95" + }, + { + "id": "flux3_klein_fp8r512_lora_style", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_9edd5f24" + }, + { + "id": "flux3_klein_fp8r512_multi_reference_edit", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_5b102c44" + }, + { + "id": "flux3_klein_fp8r512_raw_coordinate_prompt", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_5e87db80" + }, + { + "id": "flux3_klein_fp8r512_single_reference_edit", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_4e407e4b" + }, + { + "id": "flux3_klein_fp8r512_text_to_image", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_d374824c" + }, + { + "id": "high_quality", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_bba65c55" + }, + { + "id": "low_vram", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_21cc6d5d" + }, + { + "id": "ltx_video_animated_story", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_60fd6802" + }, + { + "id": "ltx_video_image_to_video", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_eb112978" + }, + { + "id": "ltx_video_long_showcase", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_16a81adb" + }, + { + "id": "ltx_video_multi_reference", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_0315b850" + }, + { + "id": "ltx_video_text_to_video", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_cfd0a7df" + }, + { + "id": "ltx_video_video_to_video", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_caa4d69d" + }, + { + "id": "minimax_music3_chamber_pop", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_1c64d9f9" + }, + { + "id": "qwen_character_angles", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_26c0bc0d" + }, + { + "id": "qwen_control_image_layout", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_153f3a61" + }, + { + "id": "qwen_edit_plus_single_image", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_072979da" + }, + { + "id": "qwen_edit_strength_sweep", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_014805f3" + }, + { + "id": "qwen_inpaint_mask_draft", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_4cc1b92e" + }, + { + "id": "qwen_inpaint_object_replace", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_858853a1" + }, + { + "id": "qwen_layered_portrait", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_a90f9afe" + }, + { + "id": "qwen_logo_texture", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_db892e99" + }, + { + "id": "qwen_low_vram_poster_layout", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_90866018" + }, + { + "id": "qwen_low_vram_product_concept", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_717d0012" + }, + { + "id": "qwen_low_vram_text_rendering", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_af5619dd" + }, + { + "id": "qwen_multi_reference_product", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_90a6d763" + }, + { + "id": "qwen_outpaint_aspect_template", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_f809c060" + }, + { + "id": "qwen_outpaint_draft", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_d08a7294" + }, + { + "id": "qwen_packaging_dieline", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_fb88821d" + }, + { + "id": "qwen_poster_logo_text", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_2e74584a" + }, + { + "id": "qwen_product_ad_composite", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_09710b5b" + }, + { + "id": "qwen_product_mockup", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_9d93fc68" + }, + { + "id": "qwen_product_relight", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_3f651424" + }, + { + "id": "qwen_text_rendering", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_e846c970" + }, + { + "id": "qwen_tile_extract", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_a266a20b" + }, + { + "id": "qwen_upscale_finish", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_7843f2e3" + }, + { + "id": "reference_fusion", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_31d162b1" + }, + { + "id": "wan_vace_cinematic_text_to_video", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_8f8c7c78" + }, + { + "id": "wan_vace_grayscale_control", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_88a1775e" + }, + { + "id": "wan_vace_outpaint_reframe", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_3f657366" + }, + { + "id": "wan_vace_video_color_grade", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_27e9870c" + }, + { + "id": "wan_vace_video_to_video", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_304d1db9" + }, + { + "id": "wan_video_long_showcase", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_06da8709" + }, + { + "id": "z_image_cinematic_contact_sheet", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_44b603f1" + }, + { + "id": "z_image_lora_style", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_eed3fd53" + }, + { + "id": "z_image_poster", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_cb6b1e99" + }, + { + "id": "z_image_product_mockup", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_e831e3ef" + }, + { + "id": "z_image_quick_concept", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_de6c4faa" + }, + { + "id": "alpine_lake_in_oils", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_0816c26c" + }, + { + "id": "bookshop_at_blue_hour", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_14707aaf" + }, + { + "id": "flowers_after_rain", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_3ba52cb2" + }, + { + "id": "forest_ferns", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_be9fadb4" + }, + { + "id": "ochre_paper_pavilion", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_f93a2d5c" + }, + { + "id": "quiet_current", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_57a6868c" + }, + { + "id": "persimmon_glaze", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_ef8db2a5" + }, + { + "id": "porcelain_on_slate_linen", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_5536c9a7" + }, + { + "id": "salt_marsh_from_above", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_a23dcce5" + }, + { + "id": "cobalt_jug_and_lemons", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_61d186ae" + }, + { + "id": "copper_hour_dunes", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_3f17401c" + }, + { + "id": "glasshouse_rain", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_a4b61426" + }, + { + "id": "pomegranate_on_blue_linen", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_5dba74f8" + }, + { + "id": "canal_lantern_in_warm_light", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_c72697e6" + }, + { + "id": "the_glasshouse_seed_tray", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_9fd062df" + }, + { + "id": "quiet_kiln_at_daybreak", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_c722e490" + }, + { + "id": "restoring_the_studio_backdrop", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_cab1d671" + }, + { + "id": "janus_reykjavik_travel_note", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_ffabdfb5" + }, + { + "id": "janus_red_triangle_caption", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_a56db7ab" + }, + { + "id": "janus_red_enamel_teapot", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_ac9c0bc5" + }, + { + "id": "lumina_opal_pendant_in_limestone", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_f24a6ace" + }, + { + "id": "shap_e_traffic_cone_turntable", + "evidenceScope": "current_recipe", + "templateLockHash": "tpl_60ef5b65" + } + ], + "excludedTemplates": [ + { + "id": "ace_step_chinese_new_year_lora", + "category": "rights-or-access", + "reason": "Per-file redistribution rights remain unresolved; the existing exact withheld files stay absent.", + "countedAsComplete": false + }, + { + "id": "ace_step_custom_lora", + "category": "supplementary-only", + "reason": "Approved supplementary showcases are separate examples; this template is outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "cosmos3_super_text_to_image", + "category": "supplementary-only", + "reason": "Now published and release-qualified from a reviewed AMD run. Filed outside the original curated preview selection.", + "countedAsComplete": false + }, + { + "id": "flux_lora_ghibli_story", + "category": "rights-or-access", + "reason": "Pinned adapter terms are personal-use-only; no public output or new normal run is authorized by the overnight instruction.", + "countedAsComplete": false + }, + { + "id": "flux2_dev_text_to_image", + "category": "supplementary-only", + "reason": "Now published and release-qualified from a reviewed AMD run. Filed outside the original curated preview selection.", + "countedAsComplete": false + }, + { + "id": "marigold_depth_synthetic_ramp", + "category": "supplementary-only", + "reason": "Published and registered as a supplementary Gallery example outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "minimax_h3_image_old_town_cat", + "category": "supplementary-only", + "reason": "Approved supplementary showcases are separate examples; this template is outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "smollm2_rain_gauge", + "category": "supplementary-only", + "reason": "Published and registered as a supplementary Gallery example outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "spandrel_x2_synthetic_gradient", + "category": "supplementary-only", + "countedAsComplete": false, + "reason": "Published and registered as a supplementary Gallery technical preview outside the original campaign selection." + }, + { + "id": "wan_21_t2v_13b_seed_vault", + "category": "amd-cloud", + "reason": "Full recipe deferred to AMD cloud; local complete-workflow campaign budget is two hours. No MoDiff user runtime restriction.", + "countedAsComplete": false + }, + { + "id": "wan_22_i2v_seed_vault", + "category": "amd-cloud", + "reason": "Full recipe deferred to AMD cloud; local complete-workflow campaign budget is two hours. No MoDiff user runtime restriction.", + "countedAsComplete": false + }, + { + "id": "wan_22_ti2v_5b_seed_vault", + "category": "amd-cloud", + "reason": "Full recipe deferred to AMD cloud; local complete-workflow campaign budget is two hours. No MoDiff user runtime restriction.", + "countedAsComplete": false + }, + { + "id": "wan_vace_animate_product_still", + "category": "planning-contract", + "reason": "Planning-only workflow lacks its separately required implementation or execution qualification.", + "countedAsComplete": false + }, + { + "id": "wan_vace_direct_text_to_video", + "category": "planning-contract", + "reason": "Planning-only workflow lacks its separately required implementation or execution qualification.", + "countedAsComplete": false + }, + { + "id": "wan_vace_masked_object_replace", + "category": "amd-cloud", + "reason": "Full recipe deferred to AMD cloud; local complete-workflow campaign budget is two hours. No MoDiff user runtime restriction.", + "countedAsComplete": false + }, + { + "id": "wan_vace_reference_motion", + "category": "planning-contract", + "reason": "Planning-only workflow lacks its separately required implementation or execution qualification.", + "countedAsComplete": false + }, + { + "id": "lcm_dawn_alpine_lake", + "category": "supplementary-only", + "reason": "Published and registered as a supplementary Gallery example outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "whisper_tiny_blue_cup_transcription", + "category": "supplementary-only", + "reason": "Published and registered as a supplementary Gallery example outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sana_sprint_monochrome_tiger", + "category": "supplementary-only", + "reason": "Published and registered as a supplementary Gallery example outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "wav2vec2_station_announcement", + "category": "supplementary-only", + "reason": "Published and registered as a supplementary Gallery example outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "ddim_cifar10_preview", + "category": "supplementary-only", + "reason": "Published and registered from the approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sdxl_clear_cobalt_backdrop", + "category": "supplementary-only", + "reason": "Published and registered from the approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sdxl_turbo_orange_caps", + "category": "supplementary-only", + "reason": "Published and registered from the approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "whisper_small_an_open_door", + "category": "supplementary-only", + "reason": "Published and registered from the approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "smolvlm_red_triangle", + "category": "supplementary-only", + "reason": "Published and registered from the approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "kandinsky3_ginkgo_on_slate", + "category": "supplementary-only", + "reason": "Published and registered from the approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "chroma_restored_cobalt_backdrop", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "chroma_terracotta_and_blue", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "cogvideox_mossy_mountain_stream", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "cogvideox_red_tram_model_railway", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "hunyuan_dit_coastal_lighthouse", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "hunyuan_dit_green_glass_study", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "hunyuan_pag_burgundy_knight", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "longcat_last_tram_at_dusk", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "lumina2_larch_on_glacial_pond", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "omnigen_tulips_after_rain", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "qwen_control_winter_cabin_blue_hour", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "qwen_layered_sunset_and_peaks", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sd15_canny_guided_green_glass", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sd15_pag_canny_guided_glass", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sd15_pag_cobalt_studio_repair", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sd15_pag_mountain_lake_watercolor", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sdxl_canny_adapter_glass_study", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sdxl_control_inpaint_warm_plaster", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sdxl_controlnet_glass_study_on_slate", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sdxl_pix2pix_pale_amber_glass", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "wan_a14b_cloudbreak_over_the_ridges", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "wan_flf_blue_hour_at_the_tram_shelter", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "zimage_golden_amber_glass", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "joyimage_herbarium_rainy_porthole", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "longcat_florist_end_of_lane", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sana_tidal_pool_on_black_basalt", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "chroma_alpine_block_print", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "flux1_dev_limestone_studio_scratch_repair", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "flux_klein_alpine_lake_panorama", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "flux_klein_open_glacial_lake", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "joy_plus_lavender_on_limestone", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "joyimage_base_cobalt_paper_band", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "kandinsky3_smoked_glass_on_limestone", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "kontext_wide_water_alpine_ridge", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "longcat_clear_glass_at_the_bookshop", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "omnigen_cobalt_against_soft_apricot", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "qwen_2511_pale_amber_on_limestone", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "qwen_2512_cobalt_backdrop_repair", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "qwen_bookshop_gouache", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "qwen_cobalt_on_charcoal_slate", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sdxl_blue_glass_on_linen", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sdxl_pag_cobalt_wall", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "zimage_rocky_glacial_shores", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "zimage_seamless_cobalt_backdrop", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "flux_canny_clean_backdrop", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "flux_depth_marine_bow_repair", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "joy_plus_terracotta_on_limestone", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "omnigen_red_enamel_folded_linen", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "qwen_2511_terracotta_material_transfer", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sd15_control_cobalt_handmade_paper", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sd15_control_cobalt_studio_wall_repair", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sd15_pag_control_wall_repair", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sdxl_control_golden_boathouse", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sdxl_pag_snow_cabin", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "allegro_basalt_shore_at_dawn", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "animatediff_candlelight_behind_amber_glass", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "animatediff_ivory_balloon_blue_mountains", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "animatediff_red_tram_in_watercolor", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "animatediff_red_tram_through_snow", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "mochi_surf_over_dark_pebbles", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sana_i2v_blue_hour_above_rice_terraces", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sana_video_water_terraces_before_sunrise", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "spandrel_tram_shelter_video_2x", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "wan_a14b_wind_across_pond", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "wan_ti2v_subway_musician", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "wan_vace_amber_rings_after_rain", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "wan_animate_glasshouse_keeper", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "animatediff_pag_snowmelt_over_river_stones", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "animatelcm_sunlit_surf", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "chroma_copper_medallion_outpaint", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "flux_dev_forest_green_teapot", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "flux_kontext_bookshop_clear_glass", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "latte_water_folding_over_slate", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "ltx2_enamel_teapot_window_light", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "ltx2_glasshouse_drip", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "ltx2_kiln_at_first_light", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "ltx2_moss_and_basalt", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "ltx2_surf_below_the_breakwater", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "ltx_long_wind_and_tide_at_the_headland", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sdxl_pag_lighthouse_in_graphite", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "sdxl_pag_two_tier_cobalt_glass", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "wan_animate_signal_through_the_rain", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "wan_vace_amber_glass_stabilized", + "category": "supplementary-only", + "reason": "Published and registered from an approved saved run outside the original campaign selection.", + "countedAsComplete": false + }, + { + "id": "audioldm2_wind_through_high_pines", + "category": "supplementary-only", + "reason": "Published from the approved saved AudioLDM2 run, outside the original curated selection.", + "countedAsComplete": false + }, + { + "id": "stable_audio_glass_roof_rain", + "category": "supplementary-only", + "reason": "Published from the approved AMD run, outside the original curated selection.", + "countedAsComplete": false + }, + { + "id": "stable_video_lighthouse_headland", + "category": "supplementary-only", + "reason": "Published from the approved AMD run, outside the original curated selection.", + "countedAsComplete": false + }, + { + "id": "flux_canny_black_ink_cube", + "category": "supplementary-only", + "reason": "Published from the approved AMD run, outside the original curated selection.", + "countedAsComplete": false + }, + { + "id": "flux_depth_marine_teal_bow_edit", + "category": "supplementary-only", + "reason": "Published from the approved AMD run, outside the original curated selection.", + "countedAsComplete": false + }, + { + "id": "pixart_sigma_terracotta_herbs", + "category": "supplementary-only", + "reason": "Published from the approved saved recipe, outside the original curated selection.", + "countedAsComplete": false + }, + { + "id": "pixart_sigma_pag_pink_mascot", + "category": "supplementary-only", + "reason": "Published from the approved saved recipe, outside the original curated selection.", + "countedAsComplete": false + }, + { + "id": "ddpm_cifar32_technical_preview", + "category": "supplementary-only", + "reason": "Published from the approved saved recipe, outside the original curated selection.", + "countedAsComplete": false + }, + { + "id": "consistency_64_technical_preview", + "category": "supplementary-only", + "reason": "Published from the approved saved recipe, outside the original curated selection.", + "countedAsComplete": false + } + ], + "profileHash": "sha256:canonical-json:bcf392c87ddbb33dd46af0a50015a9cd33ba0f01a20ebb0af71c58993f82ba0b" +} diff --git a/config/retained-gallery-approved-batch.v1.json b/config/retained-gallery-approved-batch.v1.json new file mode 100644 index 00000000..3ee4ee47 --- /dev/null +++ b/config/retained-gallery-approved-batch.v1.json @@ -0,0 +1,1703 @@ +{ + "allegro_basalt_shore_at_dawn": { + "associationSha256": "5e5cda590b1d1145aff88977cb259229935570bdc8f7cbf795897b78dbb67497", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:40a4eb8d6275c83725f57c4d3499b8d12c00f8cf6caffc2d07006e74d24ab820", + "templateRevisionHash": "5e7fa20679a68bf73600bf9fcb2bb07fffed7e65d5b01c2cd6276b3d98e8a86d", + "capturedAt": "2026-11-25T01:26:09.329Z", + "outputExtension": "mp4", + "primaryModelRepo": "rhymes-ai/Allegro", + "outputSize": { + "width": 1280, + "height": 720 + } + }, + "alpine_lake_in_oils": { + "associationSha256": "4dfdff4d86ccabd8a28819e0fc479f77f70106866dcb37ab3efc1541fa58b9a3", + "backendSourceFingerprint": "sha256:backend-source-v1:3227569ff822090d00a80a3a88213d76d5ca43092d2918cec2494962457865a5", + "backendContractFingerprint": "sha256:backend-contract-v1:bd364fcd29020d51bb61f5f9bf320cf0bf562e718c645c21ffac8ed5a47b740d", + "templateRevisionHash": "81ebe61010abc66045694e149989c24310c3a181d46fab2b644ac0a0bafffcae", + "capturedAt": "2026-11-23T18:29:34.403Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "animatediff_candlelight_behind_amber_glass": { + "associationSha256": "12d558aee02588ef4df40667de428235453ed0c94dbf4b215d2d5e2de219be1d", + "backendSourceFingerprint": "sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290", + "backendContractFingerprint": "sha256:backend-contract-v1:32e6e74ce3a29d61ae997904d9d4a77259db5c3bd819dbfc15d312482a356f92", + "templateRevisionHash": "fc3355bbe64d94141436cda1cb7c173be5490cfeeeebacd8609ceee18d5e2109", + "capturedAt": "2026-11-25T02:54:46.523Z", + "outputExtension": "mp4", + "primaryModelRepo": "stable-diffusion-v1-5/stable-diffusion-v1-5", + "outputSize": { + "width": 512, + "height": 512 + } + }, + "animatediff_ivory_balloon_blue_mountains": { + "associationSha256": "4e75c68e43272d1fed65a290aca6b577fbb1fb94d6b04506fc516e550ff710e8", + "backendSourceFingerprint": "sha256:backend-source-v1:a107f0838ce3b1be98034123eb3bf3393928a09c5ad7e3c133687d5a7c58be57", + "backendContractFingerprint": "sha256:backend-contract-v1:03dea74157ff4e06596b9bd35e605c820dfee2fa4b4bac1772cbd948108d8ffd", + "templateRevisionHash": "4b4d081ecba0edc45452b914be1e511106c370500951c08bac57264a08abf8c8", + "capturedAt": "2026-11-24T07:09:23.646Z", + "outputExtension": "mp4", + "primaryModelRepo": "stable-diffusion-v1-5/stable-diffusion-v1-5", + "outputSize": { + "width": 512, + "height": 512 + } + }, + "animatediff_pag_snowmelt_over_river_stones": { + "associationSha256": "cc34b8af10217d801406af373334e595657de64946bab54c94c40de6a2f6a2a3", + "backendSourceFingerprint": "sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290", + "backendContractFingerprint": "sha256:backend-contract-v1:32e6e74ce3a29d61ae997904d9d4a77259db5c3bd819dbfc15d312482a356f92", + "templateRevisionHash": "43087167a4f17c0d0306e72d14750b647cb25811d30726ff3ef5cb57eb37ac4e", + "capturedAt": "2026-11-25T01:07:13.647Z", + "outputExtension": "mp4", + "primaryModelRepo": "stable-diffusion-v1-5/stable-diffusion-v1-5", + "outputSize": { + "width": 512, + "height": 512 + } + }, + "animatediff_red_tram_in_watercolor": { + "associationSha256": "2bf3ec1e879a42b0619c5b67b57c237c3f3646b8615eae16b71ea16a4db83f9a", + "backendSourceFingerprint": "sha256:backend-source-v1:2beaa95aae8558e64cf99f056b011d00c0653dc7d03987cd67c8ed7e774c770e", + "backendContractFingerprint": "sha256:backend-contract-v1:e1bf29e107307b73ad8153eff36b54b42bdf5622243915dbdd7c94e069726538", + "templateRevisionHash": "79480aa4c678fa413f77fa4c1c063f243438f1e6bd4573f90fc7f45c01e6af45", + "capturedAt": "2026-11-23T23:28:15.943Z", + "outputExtension": "mp4", + "primaryModelRepo": "stable-diffusion-v1-5/stable-diffusion-v1-5", + "outputSize": { + "width": 512, + "height": 512 + }, + "inputSize": { + "width": 512, + "height": 512 + }, + "beforeExtension": "mp4" + }, + "animatediff_red_tram_through_snow": { + "associationSha256": "641ef31c766deed113729f1e3d0fcd589e44986230fa3fe633a461c44a3bddce", + "backendSourceFingerprint": "sha256:backend-source-v1:b4a707d462a5f13dae1660c1665ed5195f45ed4ffbfcd7d80de879cd881aea86", + "backendContractFingerprint": "sha256:backend-contract-v1:d12f2497d460e249e197c1eb12b40f2cfd70311a95e91a943f37a1ffffbcd157", + "templateRevisionHash": "95bf2ea59940c6b96e479bc726ca727255822c37d0dc4ed19b4d3b37622520e7", + "capturedAt": "2026-11-23T21:59:42.414Z", + "outputExtension": "mp4", + "primaryModelRepo": "stable-diffusion-v1-5/stable-diffusion-v1-5", + "outputSize": { + "width": 512, + "height": 512 + }, + "inputSize": { + "width": 512, + "height": 512 + }, + "beforeExtension": "mp4" + }, + "animatelcm_sunlit_surf": { + "associationSha256": "73356d419e9f4dca4da9661ccd483d6be456a507743ac1f82bb7fc7cb832dd69", + "backendSourceFingerprint": "sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290", + "backendContractFingerprint": "sha256:backend-contract-v1:32e6e74ce3a29d61ae997904d9d4a77259db5c3bd819dbfc15d312482a356f92", + "templateRevisionHash": "8eb9c374cf4d54c48fc6dab608b1cd5a20acde2948f3e56d0bace61f48f946eb", + "capturedAt": "2026-11-25T13:49:21.637Z", + "outputExtension": "mp4", + "primaryModelRepo": "stable-diffusion-v1-5/stable-diffusion-v1-5", + "outputSize": { + "width": 512, + "height": 512 + } + }, + "audioldm2_wind_through_high_pines": { + "associationSha256": "55ce12b28bcb74c188a81a7f5652f58fa5e2e4e5f502477c712a2fc91fda19f9", + "backendSourceFingerprint": "sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290", + "backendContractFingerprint": "sha256:backend-contract-v1:9ddcba2a3da4634780919a6872ed9a6586f7a765f16243cee9763b776d02b356", + "templateRevisionHash": "1e95e96945a61ebe10ce15747c762aacbb9cc86520b8cf826aa9a4b91b7f9edd", + "capturedAt": "2026-11-25T00:34:07.462Z", + "outputExtension": "wav" + }, + "bookshop_at_blue_hour": { + "associationSha256": "e88d530a22af0c530efeea91227f5287740e579eeab88ab18d11d20979bef7cb", + "backendSourceFingerprint": "sha256:backend-source-v1:371fd754663a95b1b06900df9a838042048466464b4bd5cfa7033c1b6eebe0e3", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "160e77d5c28132522b0cbf5f3102b812a4e8be9eff09f321db0c5853905cab5e", + "capturedAt": "2026-11-23T14:48:46.445Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "canal_lantern_in_warm_light": { + "associationSha256": "3666d6af914c5fcae59b30951005de8ceaa06b1bb0a103bce5bfe817827c18a3", + "backendSourceFingerprint": "sha256:backend-source-v1:057b165c6ef6225461649a47077562dffad098a2d37d639a13bf0e73088d79ab", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "0724f395ee3219d2cf878ea1ef914692d9808e83236c4d972322e062dd15b380", + "capturedAt": "2026-11-23T14:19:48.529Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "chroma_alpine_block_print": { + "associationSha256": "644f096cb3ce16b11e8aaff442198bc4b0bfeb5d2b559b172f51ad462ad382e5", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "templateRevisionHash": "fbe83f016a250a5749f63a2b3eaa8e9806fc0d0c4b4f849a91a6f2094425dcb0", + "capturedAt": "2026-11-25T03:58:25.751Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "chroma_copper_medallion_outpaint": { + "associationSha256": "05ab1504cf09d2c355b330a74cc2c403bdecd2eb924dcce73a8daf583254a583", + "backendSourceFingerprint": "sha256:backend-source-v1:ee86f26ee410419fae168f4380029a01d302ec0fd0607308d9b1e40ae2ace7f7", + "backendContractFingerprint": "sha256:backend-contract-v1:06f986600338dc08fb5d1e639bfad55384f5b15ca0c97c2aeb7ed42a8c245594", + "templateRevisionHash": "9fecd969c5c6398a2e8194ac8ab7aac9b905267b88bf96f9062cecc16fee7223", + "capturedAt": "2026-11-25T09:41:42.540Z", + "outputExtension": "webp", + "primaryModelRepo": "lodestones/Chroma1-HD", + "outputSize": { + "width": 1024, + "height": 768 + }, + "inputSize": { + "width": 832, + "height": 768 + }, + "beforeExtension": "png" + }, + "chroma_restored_cobalt_backdrop": { + "associationSha256": "c4f821d7b34dfea02133ac9f9239b52c403d3a03422c82b0b1795a4fe8e92b9d", + "backendSourceFingerprint": "sha256:backend-source-v1:43f2ed10792fc6167b963166287cf7d5a0429afa26029e6455b0418e2123be86", + "backendContractFingerprint": "sha256:backend-contract-v1:e7a7aa3acbdedd686fa7e7a9d4bcc39c1709ba1fec38f047d63ff83558a85c18", + "templateRevisionHash": "d3c99f24317aaf93b0f25f2681bdc56f456d69554e47a522c0c04487602149f2", + "capturedAt": "2026-11-23T22:32:10.177Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "chroma_terracotta_and_blue": { + "associationSha256": "10fc52e4c1d91ff42b95bb15f906811b389358a1339a5f3dda2d5aac027ef623", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "5221fc5d744cbdcf1aa29d1fa9b27cddc0fcbd75983c24061e6218d41621617d", + "capturedAt": "2026-11-24T22:50:29.995Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "cobalt_jug_and_lemons": { + "associationSha256": "fc35297a4538927d230457cee80cdca1a242a0a1ba16597a9059cb261ffa1e8c", + "backendSourceFingerprint": "sha256:backend-source-v1:98ee8d4a895829905e82d8fefeea42b93e55c96252a5456561eada6ffef3c764", + "backendContractFingerprint": "sha256:backend-contract-v1:5429892d782af9dbc60b8c6b2762de25748a8da025a4965bb7d6e641908e47ba", + "templateRevisionHash": "1c4b2351129fdb61f6ea79abfb8c699ff4db82db0c97e1dc92e9eeeb36a34d12", + "capturedAt": "2026-11-21T03:31:28.279Z", + "outputExtension": "webp", + "outputSize": { + "width": 512, + "height": 512 + } + }, + "cogvideox_mossy_mountain_stream": { + "associationSha256": "3f977ded1b8f4969d28fe1eaf21418c75d37b62dcfcc19c3b4c842433f25956e", + "backendSourceFingerprint": "sha256:backend-source-v1:70bc1ff7fe61307be52cfda86b38c6400f2156cbc8240a489b62ff19a93d58dc", + "backendContractFingerprint": "sha256:backend-contract-v1:40a4eb8d6275c83725f57c4d3499b8d12c00f8cf6caffc2d07006e74d24ab820", + "templateRevisionHash": "c77c843d9555524c9f9ce04c53af16c2ee6570d7ff9b72d90fba98fd1fc3d9cc", + "capturedAt": "2026-11-24T04:17:26.141Z", + "outputExtension": "mp4", + "outputSize": { + "width": 720, + "height": 480 + } + }, + "cogvideox_red_tram_model_railway": { + "associationSha256": "aa0c4b4cf84ee5f4b637092acd8a8e60db8360d4076a146d6388c97cb259a673", + "backendSourceFingerprint": "sha256:backend-source-v1:43f2ed10792fc6167b963166287cf7d5a0429afa26029e6455b0418e2123be86", + "backendContractFingerprint": "sha256:backend-contract-v1:33b2d430a6b544125220ee6627441eb2121c00e6cfb3aa7c2d54b08b7b2f1f09", + "templateRevisionHash": "d74131d9a94ae6422f0824a9948e9ee157fb765058f8d45e515fda25a93c25c6", + "capturedAt": "2026-11-24T02:42:22.051Z", + "outputExtension": "mp4", + "outputSize": { + "width": 720, + "height": 480 + }, + "inputSize": { + "width": 720, + "height": 480 + }, + "beforeExtension": "mp4" + }, + "copper_hour_dunes": { + "associationSha256": "b898daa53f760bf19a4984e30bc9432bdb3bafa2212f7985a0bc3c0f745baf43", + "backendSourceFingerprint": "sha256:backend-source-v1:95899090708469a60e137d3b59a1a8c2c02cc673a1af5f82720f6b5f7393c258", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "4a188876a65d35df1c87da93c5fcae162f3bc8b20934a61fe70e4580b5090249", + "capturedAt": "2026-11-21T08:05:20.189Z", + "outputExtension": "webp", + "outputSize": { + "width": 512, + "height": 512 + } + }, + "ddim_cifar10_preview": { + "associationSha256": "549bae13109f9c98a1f010748011a727511311bda9cf27b2cf70e460b74f6205", + "backendSourceFingerprint": "sha256:backend-source-v1:7073247d40471c857faf3c52f186d17923fbdf3c44234232a8c6f8b9db925663", + "backendContractFingerprint": "sha256:backend-contract-v1:53144518f3a56e4644f06618acdc61a3e6c4f8dbacbca96e7d2e9912d699836b", + "templateRevisionHash": "1f41b7d2d7bccb216f46b9ce174a9d4246f0348584e208baeeaa4af92c172c9f", + "capturedAt": "2026-11-14T06:55:56.039Z", + "outputExtension": "webp", + "outputSize": { + "width": 32, + "height": 32 + } + }, + "flowers_after_rain": { + "associationSha256": "d2f4ba4bf64e895aceca11c7fd3b3d6e1b77592a6bbc50b100073430c0899636", + "backendSourceFingerprint": "sha256:backend-source-v1:43f2ed10792fc6167b963166287cf7d5a0429afa26029e6455b0418e2123be86", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "a113786c4f56e30b9f8c024d9e71abd7e84419b59bafe097bee8cd40b7074687", + "capturedAt": "2026-11-23T23:44:54.021Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "flux_canny_clean_backdrop": { + "associationSha256": "9f9e09e1d0032216f1b497f611226193b6a567b03e139d3f86ff019c089d3e0e", + "backendSourceFingerprint": "sha256:backend-source-v1:585997dc1146ec6effb20c260272babc01713ecdea4f78a0872c12ef2568ef83", + "backendContractFingerprint": "sha256:backend-contract-v1:d6613341ff1a983e0a3c6d3c8f0efef39c5c1ec3e109197f6466cfd72a3f6f6e", + "templateRevisionHash": "ddec004faf0dea8ab0683f015a22350f6086d28d6b41ecc57f2c0abf81ca1755", + "primaryModelRepo": "black-forest-labs/FLUX.1-Canny-dev", + "capturedAt": "2026-11-24T14:06:06.057Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "flux_depth_marine_bow_repair": { + "associationSha256": "7dd77337f388b8353d6186bc76e39affbe954d4cef4f563285ec0d1a95c606f5", + "backendSourceFingerprint": "sha256:backend-source-v1:585997dc1146ec6effb20c260272babc01713ecdea4f78a0872c12ef2568ef83", + "backendContractFingerprint": "sha256:backend-contract-v1:d6613341ff1a983e0a3c6d3c8f0efef39c5c1ec3e109197f6466cfd72a3f6f6e", + "templateRevisionHash": "c36171bcdbd3076f271fb33743708207b8aeb0f4bfb68be30f7ee7a0239b0869", + "primaryModelRepo": "black-forest-labs/FLUX.1-Depth-dev", + "capturedAt": "2026-11-24T14:25:47.349Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + }, + "beforeExtension": "webp" + }, + "flux_dev_forest_green_teapot": { + "associationSha256": "a5b5e1d0814ac7cac6e50eeae4da815981c710568d910f11f67a215e2fe946bd", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "templateRevisionHash": "733622609f54510a405766166f8b6a2e00eabffc71dccbe5d780eddf18aa63cd", + "capturedAt": "2026-11-25T12:54:58.483Z", + "outputExtension": "webp", + "primaryModelRepo": "black-forest-labs/FLUX.1-dev", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + }, + "beforeExtension": "webp" + }, + "flux_klein_alpine_lake_panorama": { + "associationSha256": "97c56686a2055c9f46bb68b8907b88a37b10ab32b7482cb8bf40cb0dd783f9f2", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:06f986600338dc08fb5d1e639bfad55384f5b15ca0c97c2aeb7ed42a8c245594", + "templateRevisionHash": "f90f8a8162586ea0e94260bb3b332de2885bb642d0776a0a104b3495a593cc6d", + "capturedAt": "2026-11-23T21:08:09.132Z", + "outputExtension": "webp", + "outputSize": { + "width": 1344, + "height": 768 + }, + "inputSize": { + "width": 832, + "height": 768 + } + }, + "flux_klein_open_glacial_lake": { + "associationSha256": "3154265a969e539f1aea44d337c37e48baf8154ba8f5454f917944a70c9171ce", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:e7a7aa3acbdedd686fa7e7a9d4bcc39c1709ba1fec38f047d63ff83558a85c18", + "templateRevisionHash": "e100c45ec42735d37c8eb9c6d442d29822234c41d050ba311b178e38ee14baa5", + "capturedAt": "2026-11-23T17:09:43.722Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "flux_kontext_bookshop_clear_glass": { + "associationSha256": "e0e23e248b8c5ab1142722b2e255123446a4c6c1ce06fb6db927d5d809cecb66", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:e7a7aa3acbdedd686fa7e7a9d4bcc39c1709ba1fec38f047d63ff83558a85c18", + "templateRevisionHash": "e0b3aa2e3ac0aaf75006ed8110ff7420862ccaef4e03da53db5626f12fc278b6", + "capturedAt": "2026-11-25T14:08:32.311Z", + "outputExtension": "webp", + "primaryModelRepo": "black-forest-labs/FLUX.1-Kontext-dev", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + }, + "beforeExtension": "webp" + }, + "flux1_dev_limestone_studio_scratch_repair": { + "associationSha256": "d868488370d89eb9b8ed1bdcfa18841042c6846d522c945e330abc7345708315", + "backendSourceFingerprint": "sha256:backend-source-v1:43f2ed10792fc6167b963166287cf7d5a0429afa26029e6455b0418e2123be86", + "backendContractFingerprint": "sha256:backend-contract-v1:e7a7aa3acbdedd686fa7e7a9d4bcc39c1709ba1fec38f047d63ff83558a85c18", + "templateRevisionHash": "fe963e2fc85d8c21f11d606e545a9dcf5d63e5b2abad4b30900cdb64e5a25d36", + "capturedAt": "2026-11-24T02:02:57.362Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "forest_ferns": { + "associationSha256": "f758997480cb0406135ec2829cdfbaec4eb75e3837b08133994a7d6369dcde25", + "backendSourceFingerprint": "sha256:backend-source-v1:43f2ed10792fc6167b963166287cf7d5a0429afa26029e6455b0418e2123be86", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "6a6e34ea5e9b0dec925e0ce13a0422fc00c65754f867c44e3105bfdb9d03c305", + "capturedAt": "2026-11-24T02:51:19.434Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "glasshouse_rain": { + "associationSha256": "a212c9c1442e1eebe801da3bc87f96423038874723f9289207b02c5a06166023", + "backendSourceFingerprint": "sha256:backend-source-v1:95899090708469a60e137d3b59a1a8c2c02cc673a1af5f82720f6b5f7393c258", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "4d32a1778d7cad756e05f14f09de559b9b065f3675b2aef6a289c5299cbd2c24", + "capturedAt": "2026-11-21T08:21:05.869Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "hunyuan_dit_coastal_lighthouse": { + "associationSha256": "0a517d585070188fbf5a3ddfb83e18bf1090b6724d5bcad57687925f5e365dc6", + "backendSourceFingerprint": "sha256:backend-source-v1:371fd754663a95b1b06900df9a838042048466464b4bd5cfa7033c1b6eebe0e3", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "59e80838a60338b27351f10a7cc8478dbe1ae81e04d5d7718ee37aa556585788", + "capturedAt": "2026-11-23T15:09:01.447Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "hunyuan_dit_green_glass_study": { + "associationSha256": "a4c37eed14bb2859393511f0c539ea5a4255852cec45141a470abbcfa6bfdaac", + "backendSourceFingerprint": "sha256:backend-source-v1:1aae04a8ad2e66aeb3eaacc065f2e111280bd8a64e7e6cb95cc927fed95d6b39", + "backendContractFingerprint": "sha256:backend-contract-v1:ad16452bc59ad56fa75df0e9f2f3b913f28233c906d4e37c4518fbc978d47953", + "templateRevisionHash": "a132dd6cd433bd0595f962173926edd930ea38cbf44d175d5499234f600d21f2", + "primaryModelRepo": "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled", + "capturedAt": "2026-11-23T17:50:53.075Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "hunyuan_pag_burgundy_knight": { + "associationSha256": "44e66b22cd75a7de53b8f673fc9c91020d54828113d6ccf926080e3ac0ca2309", + "backendSourceFingerprint": "sha256:backend-source-v1:371fd754663a95b1b06900df9a838042048466464b4bd5cfa7033c1b6eebe0e3", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "ff4d1b75e172f8fdb8a45199626ed40a07fe634669e03d1591091a10c176edfe", + "capturedAt": "2026-11-23T15:11:08.624Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "janus_red_enamel_teapot": { + "associationSha256": "9a4b508c50d4b701161e242d688e2bde97bf20ead144ab29e81134a2928a4bbf", + "backendSourceFingerprint": "sha256:backend-source-v1:693cbe0ad6ddc5d1796f10269726b6d92a067c5ed14ea4458614797eb25c9a7c", + "backendContractFingerprint": "sha256:backend-contract-v1:eea189de4cdfe09f5055e14ff414c28400c1abd2f1f6c7d8094855c12adeefde", + "templateRevisionHash": "335f3fbf1907201be05d98148bff1fb7dc68d540750b71f33812769ddfa55879", + "capturedAt": "2026-11-23T15:46:06.879Z", + "outputExtension": "webp", + "outputSize": { + "width": 384, + "height": 384 + } + }, + "janus_red_triangle_caption": { + "associationSha256": "1119235403f7eaccc327a270c34129be0d0164ccab0003f0aa299b8fde73f932", + "backendSourceFingerprint": "sha256:backend-source-v1:fe1a57b8e352eb66a1a26ebbff5865aaafcf5d55326c4bbcbaf2132ec75f54a8", + "backendContractFingerprint": "sha256:backend-contract-v1:d9a9f3b4b638533dd92574871ffd7944f91a74b3004a161c77b2451fd99b1a36", + "templateRevisionHash": "44e68d77baa00812c4b9888835013887d523bfe990c11caec96ac426c8ca87b3", + "capturedAt": "2026-11-23T15:41:11.401Z", + "outputExtension": "json" + }, + "janus_reykjavik_travel_note": { + "associationSha256": "5fd534ee6e424f62376c87fe518cadea0e77d7aa5bd621fcdbe731eebda2c346", + "backendSourceFingerprint": "sha256:backend-source-v1:b82eb33180a6e16431bc47381c6012c002e18b3a41b45635bef663c50f735ec3", + "backendContractFingerprint": "sha256:backend-contract-v1:bc2a2aeb1bb1fa7a545e1a1f139cc5651e1326b320efefc80afcb0e2a476433a", + "templateRevisionHash": "cd73585863835d186d076de2bc4f37c36c11138376bdd2939af45290ff2c37af", + "capturedAt": "2026-11-23T17:39:26.972Z", + "outputExtension": "json" + }, + "joy_plus_lavender_on_limestone": { + "associationSha256": "cec28cfa908558c228bebf3c09b1d52036940235d0c70a34374f3e964548d17b", + "backendSourceFingerprint": "sha256:backend-source-v1:d275bc94517015b221a9a8b5aea7572ec68c491060855c7895526e1ba640796d", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "templateRevisionHash": "448dbfb62c1255097be44eff481ff2c89ff04c31415faa5fe86f22a72a71fe4f", + "capturedAt": "2026-11-24T04:13:54.287Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "joy_plus_terracotta_on_limestone": { + "associationSha256": "c965dba84f8d3714ea44c11469455a5fbcdf11bbae44717a0e5a20b322ed67d9", + "backendSourceFingerprint": "sha256:backend-source-v1:585997dc1146ec6effb20c260272babc01713ecdea4f78a0872c12ef2568ef83", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "templateRevisionHash": "2250434e38d29a0c2d27808d6f713bf75965dc3f5ade4a033a11d194ecd687b9", + "capturedAt": "2026-11-24T05:23:27.411Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "joyimage_base_cobalt_paper_band": { + "associationSha256": "691b71a4b975f96da6ac7b59772ef0e3a057e8818ea9d2dbd3b9b346f70b7629", + "backendSourceFingerprint": "sha256:backend-source-v1:585997dc1146ec6effb20c260272babc01713ecdea4f78a0872c12ef2568ef83", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "templateRevisionHash": "895ec1f44e28507344c4bdabd3a3c07c3fe985d5b0fc0b5373f91ec8ad1f92d0", + "capturedAt": "2026-11-24T12:15:48.363Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "joyimage_herbarium_rainy_porthole": { + "associationSha256": "f0254138cc571fad786388d675b3a686bf1f7cc221aaa157c4ed3e300d7e46b2", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "5e0a8441e6f6998745a1b9c9a8244aa5d8e4e8591be5277396f519f41adf7ad4", + "capturedAt": "2026-11-25T04:23:00.358Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "kandinsky3_ginkgo_on_slate": { + "associationSha256": "d06e06739b07e69ae2f2c65f503b94970643c950a89d4d39a316f5e7e93b3269", + "backendSourceFingerprint": "sha256:backend-source-v1:175112f2430928958bd90dc5ae78b50ce0a54403e42e28cfc68096945d05fbe6", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "5870090e6b4d12c32d72566b6038e9bcc8bf8d063492a28ecbeb65275d77c8e9", + "capturedAt": "2026-11-24T01:18:22.804Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "kandinsky3_smoked_glass_on_limestone": { + "associationSha256": "45c5605c355b6698b1790b51e04f3c7f6639e3a35a440c786d5267ee136af375", + "backendSourceFingerprint": "sha256:backend-source-v1:175112f2430928958bd90dc5ae78b50ce0a54403e42e28cfc68096945d05fbe6", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "templateRevisionHash": "196588c637d27503fb83fdcd1b294e9b3e7cad61436214751f92a1c6aaeb7361", + "capturedAt": "2026-11-24T16:10:32.320Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "kontext_wide_water_alpine_ridge": { + "associationSha256": "d1d65bf6c92fc53e8124e23195b11ec425fa4190dd81aec98879dc30060bceaf", + "backendSourceFingerprint": "sha256:backend-source-v1:272116bf77447dfb20b0899666ae417b68401993dd97ca438db63d91ff79cab6", + "backendContractFingerprint": "sha256:backend-contract-v1:06f986600338dc08fb5d1e639bfad55384f5b15ca0c97c2aeb7ed42a8c245594", + "templateRevisionHash": "8ae90dc2b352689446effd182c4ad144c4e555d5b76fa3adbdb77fa4b767d119", + "capturedAt": "2026-11-24T04:27:52.558Z", + "outputExtension": "webp", + "outputSize": { + "width": 1344, + "height": 768 + }, + "inputSize": { + "width": 832, + "height": 768 + } + }, + "latte_water_folding_over_slate": { + "associationSha256": "d4fa7bbc2f0facdf2f82804c5c9de71abd5ffaa3f2a1aea18ce280830ac16d6d", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:40a4eb8d6275c83725f57c4d3499b8d12c00f8cf6caffc2d07006e74d24ab820", + "templateRevisionHash": "663502fcbb5c79310582bf01e0dab2dfba6abadfa43d044f834b8ab10d5bb145", + "capturedAt": "2026-11-25T09:10:38.298Z", + "outputExtension": "mp4", + "primaryModelRepo": "maxin-cn/Latte-1", + "outputSize": { + "width": 512, + "height": 512 + } + }, + "longcat_clear_glass_at_the_bookshop": { + "associationSha256": "607a39a9c803b7fdeec80b6f6396cb3d74a5b85e129fa194f9aa11372e4140aa", + "backendSourceFingerprint": "sha256:backend-source-v1:43f2ed10792fc6167b963166287cf7d5a0429afa26029e6455b0418e2123be86", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "templateRevisionHash": "057e11900f267163730bdb1009b1be2118ab05c6d94815d4bf4e5af86da75fbe", + "capturedAt": "2026-11-24T01:37:17.476Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + }, + "beforeExtension": "webp" + }, + "longcat_florist_end_of_lane": { + "associationSha256": "bbd822df29e973cd3db526d60c6cc1fa76e5a88fcb6eb78712f0ee1a2851ff26", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "b90a1a05613457abec04653497adf621e361d94bfc399db6cbd94f093a69421f", + "capturedAt": "2026-11-25T04:36:30.280Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "longcat_last_tram_at_dusk": { + "associationSha256": "71e08a2d99e32542e3494718c24ba864ee1c24a5dded029f757272e78bf47b37", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:9ddcba2a3da4634780919a6872ed9a6586f7a765f16243cee9763b776d02b356", + "templateRevisionHash": "9d0f7b50afd87f366ecf6c0d66352d87dd2bdf0b4ae9a50f818619d6254d6b92", + "capturedAt": "2026-11-24T22:39:17.259Z", + "outputExtension": "wav" + }, + "ltx_long_wind_and_tide_at_the_headland": { + "associationSha256": "c43060ec8058eb209719668f1cd942b406882d7e6a90c7577bf46b5ce79e1ddd", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:d68ff3c7d7b2d190e68d6f148834ae971638c23a9d31086a3848874658f37da2", + "templateRevisionHash": "73e9ef351cbe53f541789d49ac53118ad61dbc234b40f1c516bd982f9e621153", + "capturedAt": "2026-11-25T11:16:56.343Z", + "outputExtension": "mp4", + "primaryModelRepo": "Lightricks/LTX-Video-0.9.8-13B-distilled", + "outputSize": { + "width": 768, + "height": 512 + } + }, + "ltx2_enamel_teapot_window_light": { + "associationSha256": "e7b9031dbffc495a1c803a1f05ba565dfa0e3a69a01f893f8641743dfe4641ca", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:6d7fd83982e125093037e64b34a0ff2d70c1cccfb304c1cee11b6dca3e3974fc", + "templateRevisionHash": "8c01a644d54c04e3ebb653cba32cdf1b14a18c7167e52ef95fdc392aad28599a", + "capturedAt": "2026-11-25T06:28:14.109Z", + "outputExtension": "mp4", + "primaryModelRepo": "Lightricks/LTX-2", + "outputSize": { + "width": 768, + "height": 512 + } + }, + "ltx2_glasshouse_drip": { + "associationSha256": "a578d28fab1355aa2cb079ed300959dbe2f8c2ed18b2ad041a8fb42755981b6f", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:6d7fd83982e125093037e64b34a0ff2d70c1cccfb304c1cee11b6dca3e3974fc", + "templateRevisionHash": "8e9c88d288257a9ccf86964d32b68646882ceaf3c65b4cae91af6d89eea4e1cb", + "capturedAt": "2026-11-25T06:23:53.855Z", + "outputExtension": "mp4", + "primaryModelRepo": "Lightricks/LTX-2", + "outputSize": { + "width": 768, + "height": 512 + } + }, + "ltx2_kiln_at_first_light": { + "associationSha256": "66f4f89e32372a381a14b9b8c6f474e44355b93d91c46fe9df6dcdbe4da52154", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:1fb68b35c4981d6b87ef267a551fb572e72163972539ed955bb17cf7cf3a8bb8", + "templateRevisionHash": "172e79d27a5e6add55ba522752c17fddb4fb44998d3ff152056befa619c4f5a7", + "capturedAt": "2026-11-25T07:04:49.368Z", + "outputExtension": "mp4", + "primaryModelRepo": "Lightricks/LTX-2", + "outputSize": { + "width": 768, + "height": 512 + } + }, + "ltx2_moss_and_basalt": { + "associationSha256": "f08aed324bb0047cff321d7d87cfa51cd6a462ec5f64bd2f1f3ed24913d973bc", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:3870812099f899fad7df7ffddf6dd37dd0241e7628d9b40d6fc51acb693b5086", + "templateRevisionHash": "680ec55c2e867aab22c21e907eb3ab183c6639af4cd8ba877e6bcec732a5ce1a", + "capturedAt": "2026-11-25T10:51:51.234Z", + "outputExtension": "mp4", + "primaryModelRepo": "Lightricks/LTX-2", + "outputSize": { + "width": 768, + "height": 512 + }, + "inputSize": { + "width": 720, + "height": 480 + }, + "beforeExtension": "mp4" + }, + "ltx2_surf_below_the_breakwater": { + "associationSha256": "de7b03b100c8bb886bf3b4b9836540a911d1b179335274ce0670b4ca95296f7e", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:1fb68b35c4981d6b87ef267a551fb572e72163972539ed955bb17cf7cf3a8bb8", + "templateRevisionHash": "0a58a9b6f8ac6a0308cf5e137d09d9412579d9ec92133231858ced4d45e4a01e", + "capturedAt": "2026-11-25T07:14:50.574Z", + "outputExtension": "mp4", + "primaryModelRepo": "Lightricks/LTX-2", + "outputSize": { + "width": 768, + "height": 512 + } + }, + "lumina_opal_pendant_in_limestone": { + "associationSha256": "2b785b4b786b96de5ca6c7649147f4f71f24fa56e2f3e2e4f7187b39df84a78a", + "backendSourceFingerprint": "sha256:backend-source-v1:4e964e7de84962b7d4f70d35de6904394561f9a9314ea2bd7e435a03a55af5b6", + "backendContractFingerprint": "sha256:backend-contract-v1:5429892d782af9dbc60b8c6b2762de25748a8da025a4965bb7d6e641908e47ba", + "templateRevisionHash": "4545f92379bc42dd213572033b19a7d37bfd24a3cf8c5eb90fb510c2e2c4c1e7", + "capturedAt": "2026-11-24T16:28:31.695Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "lumina2_larch_on_glacial_pond": { + "associationSha256": "044a0926d4d470bf68094ef94e300daae045c80682fd038cb355d53da8579a61", + "backendSourceFingerprint": "sha256:backend-source-v1:057b165c6ef6225461649a47077562dffad098a2d37d639a13bf0e73088d79ab", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "c1fecc495b278628b9539fb84079b73b70db420165a7e151def065731920853e", + "capturedAt": "2026-11-23T14:40:20.880Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "mochi_surf_over_dark_pebbles": { + "associationSha256": "3c227772597bc28d6eb90f63726ecbe3be317f7cb99e85742dc73ce0fc6918fd", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:40a4eb8d6275c83725f57c4d3499b8d12c00f8cf6caffc2d07006e74d24ab820", + "templateRevisionHash": "c0a8a85ce8101d4ffcf0a8ab34a46b49b41d38e667a896e8b51f5016bb536b62", + "capturedAt": "2026-11-25T02:21:21.989Z", + "outputExtension": "mp4", + "primaryModelRepo": "genmo/mochi-1-preview", + "outputSize": { + "width": 848, + "height": 480 + } + }, + "ochre_paper_pavilion": { + "associationSha256": "70897e1af886e489a67c209bfd3caa382077fa2a09b71e8ae33b3e5f6555a251", + "backendSourceFingerprint": "sha256:backend-source-v1:272116bf77447dfb20b0899666ae417b68401993dd97ca438db63d91ff79cab6", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "b5e4c8446f01030c05a206290d9ed0c1e5035cd3110f0fb6a9e6e3c416ad5177", + "capturedAt": "2026-11-24T05:30:35.733Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "omnigen_cobalt_against_soft_apricot": { + "associationSha256": "e36849be5816106a00e201062187b8dcc4ae11ebe94611bf8137671532a1dc39", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "templateRevisionHash": "932ee2726d371c73f19521cf7e50806fb86a95394047d6207a5cee3007e57f00", + "capturedAt": "2026-11-25T02:43:28.002Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "omnigen_red_enamel_folded_linen": { + "associationSha256": "f707f2507cbcc624334064fa63248f6a8b730e72778ca9faa5736dd52f1f52d5", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "templateRevisionHash": "595a3209f4bfb41d4930f0368e75bab6a19602ad0eae4d44dc535efd0a059652", + "capturedAt": "2026-11-25T05:12:08.254Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 384, + "height": 384 + } + }, + "omnigen_tulips_after_rain": { + "associationSha256": "10f3e3764210089f2a3f43281d45fb24e965f8b035e8dc993d720ceceff9e9a6", + "backendSourceFingerprint": "sha256:backend-source-v1:371fd754663a95b1b06900df9a838042048466464b4bd5cfa7033c1b6eebe0e3", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "e3ceb2dc096775601a6e65b7ab61f5ccc64658d2a69586f3c6a13f2efe1a973c", + "capturedAt": "2026-11-23T15:17:38.630Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "persimmon_glaze": { + "associationSha256": "1cb82a65c9b5c86bd33286a1db09f9159a1bd5def106f5e34d7506e8ef0623c1", + "backendSourceFingerprint": "sha256:backend-source-v1:057b165c6ef6225461649a47077562dffad098a2d37d639a13bf0e73088d79ab", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "ddf39e419212cba10df50f7b27b3fae22d57a0cbfc574164bcad08975fa2545b", + "capturedAt": "2026-11-23T14:38:24.904Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "pomegranate_on_blue_linen": { + "associationSha256": "912ddb48782b903de10ce1f23f400537bb9f8944354d48bf0ea7203bad10e071", + "backendSourceFingerprint": "sha256:backend-source-v1:1f2f7e00ce4a500ba52d5b729f43d4321af6f931125a3f266f307cf80038c12e", + "backendContractFingerprint": "sha256:backend-contract-v1:5429892d782af9dbc60b8c6b2762de25748a8da025a4965bb7d6e641908e47ba", + "templateRevisionHash": "6642ac1831a788b83981383c33b7ce019692d58fd2b23f3bff9d95e3a59ec27b", + "capturedAt": "2026-11-23T14:15:52.979Z", + "outputExtension": "webp", + "outputSize": { + "width": 512, + "height": 512 + } + }, + "porcelain_on_slate_linen": { + "associationSha256": "5f59b268e66ffa4b5a58ea622198b047b418baee667f0fd0d2f18a44ea480617", + "backendSourceFingerprint": "sha256:backend-source-v1:fe1a57b8e352eb66a1a26ebbff5865aaafcf5d55326c4bbcbaf2132ec75f54a8", + "backendContractFingerprint": "sha256:backend-contract-v1:5429892d782af9dbc60b8c6b2762de25748a8da025a4965bb7d6e641908e47ba", + "templateRevisionHash": "fe33d74a4694ab6b3d34f483d56575c0c66a5948d424a62c04538c0dd608253a", + "capturedAt": "2026-11-23T15:33:09.403Z", + "outputExtension": "webp", + "outputSize": { + "width": 512, + "height": 512 + } + }, + "quiet_current": { + "associationSha256": "f1d031268c22b8679f42bdb78c36d977d41aef77222ba8066fb835ae62156820", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "c3c7aada8d0fc7bec8c4067c9c88fbb03d5210ee9f6412d1d5984b21879ab886", + "capturedAt": "2026-11-23T17:21:03.387Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "quiet_kiln_at_daybreak": { + "associationSha256": "8c535a4a82a668b1aa7063e6c9c201fc7824f2c54493d8d7572749f13fbb8473", + "backendSourceFingerprint": "sha256:backend-source-v1:258d554494a8e31795e6c04f21e6ab998a6225773194b12546c45d68b690887e", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "82918f24aaddf420da3c1213ac69779af2bf962cd2af50b33814f1eefdf14a3b", + "capturedAt": "2026-11-24T02:35:25.266Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "qwen_2511_pale_amber_on_limestone": { + "associationSha256": "55ae5018e2e9dd25b8693ecc1063a902b5845b2c4467e4a2f7daf2f977e3c17f", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "templateRevisionHash": "196d20bc8bec725ddcc2674124e4815e019d3b054284f444add226044ed195e5", + "capturedAt": "2026-11-23T18:58:07.960Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "qwen_2511_terracotta_material_transfer": { + "associationSha256": "b55dc0109b93fcc6b1af82016d5e61d0de0c968c9aead54e3699e9b6d3d2e275", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "templateRevisionHash": "46a74671317b1b01f4ee5c7531e4d9fa32b8ba386bc9ba3321632f0168515b13", + "capturedAt": "2026-11-23T20:47:31.989Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "qwen_2512_cobalt_backdrop_repair": { + "associationSha256": "1474a781dc44dff1bf598b974c0071b0b371311c2971b81f3cd7d68eaf327f25", + "backendSourceFingerprint": "sha256:backend-source-v1:43f2ed10792fc6167b963166287cf7d5a0429afa26029e6455b0418e2123be86", + "backendContractFingerprint": "sha256:backend-contract-v1:e7a7aa3acbdedd686fa7e7a9d4bcc39c1709ba1fec38f047d63ff83558a85c18", + "templateRevisionHash": "9448d9e6aed3bf64c4ada3bf63c282f7cbc03c8e6a5ade076450af1d21a9b800", + "capturedAt": "2026-11-23T23:28:40.451Z", + "outputExtension": "webp", + "outputSize": { + "width": 1328, + "height": 1328 + }, + "inputSize": { + "width": 1328, + "height": 1328 + } + }, + "qwen_bookshop_gouache": { + "associationSha256": "0dd72873432e400ed10ad9e3015bd721314058064f9c2d662b483aee40b65228", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "templateRevisionHash": "3163da25258525f8cb2c8a71b64a89e5445424ed1ad0a8b44b7321aafceb8175", + "capturedAt": "2026-11-25T03:40:38.530Z", + "outputExtension": "webp", + "outputSize": { + "width": 1328, + "height": 1328 + }, + "inputSize": { + "width": 1024, + "height": 1024 + }, + "beforeExtension": "webp" + }, + "qwen_cobalt_on_charcoal_slate": { + "associationSha256": "ad751a95aed80d67785d09de3fbbd0aeede1cac631dd5b8934e106a90a145450", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "templateRevisionHash": "335c41c4fab432f8ee590dc902ae7d63de98f46464642e1533a3479d339348df", + "capturedAt": "2026-11-23T21:05:09.116Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "qwen_control_winter_cabin_blue_hour": { + "associationSha256": "49e4dd97a963a91ec488a6e53586bc55bd0bcac93e2591d9d51f759cdcfb6ce6", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:311f615e2b52ae3247c353b495df7708d560006e6909191e1e104b1e24b04587", + "templateRevisionHash": "eb65cb98a365c056f3a2a7bd5d44515bb16f518f7ec00797a496fe90a25ce07d", + "primaryModelRepo": "Qwen/Qwen-Image-2512", + "capturedAt": "2026-11-23T22:16:34.633Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "qwen_layered_sunset_and_peaks": { + "associationSha256": "6f803d49ff9c2e4add5ec1bdd552de9e92b4d887b988c27f298d532c6cf2b2d3", + "backendSourceFingerprint": "sha256:backend-source-v1:ce7ac712b4620d0e8efb35022a558a551e2d4ae6ef20b844744c4d674527b0b3", + "backendContractFingerprint": "sha256:backend-contract-v1:7661a86f3aebb5f170346fc6078e665e006b56b7ff5bc4810db8692adf607dac", + "templateRevisionHash": "4ee3847d935f7b245f5c9d9e156da8fe5d97dcb382ad890c59163e573a6c73c9", + "capturedAt": "2026-11-24T23:35:50.453Z", + "outputExtension": "png", + "outputSize": { + "width": 960, + "height": 710 + } + }, + "restoring_the_studio_backdrop": { + "associationSha256": "17ee149d9d1ca9d8b1f747f62f15e8672a2353555847e043ef60eb766e9befa7", + "backendSourceFingerprint": "sha256:backend-source-v1:1f2f7e00ce4a500ba52d5b729f43d4321af6f931125a3f266f307cf80038c12e", + "backendContractFingerprint": "sha256:backend-contract-v1:61201b43ea68d3fd347fbc374e292b5839be28f908b473bcb69f5ec1f8b87736", + "templateRevisionHash": "26d6762e118bc9217762cc4abeec7817586ee58fb80ef09bc3c98e32a2789472", + "capturedAt": "2026-11-23T14:17:31.827Z", + "outputExtension": "webp", + "outputSize": { + "width": 512, + "height": 512 + }, + "inputSize": { + "width": 512, + "height": 512 + } + }, + "salt_marsh_from_above": { + "associationSha256": "7fc63473243ca1e274daa65c995ad7ba3e06a4fa6da039e863cb2a55622dad76", + "backendSourceFingerprint": "sha256:backend-source-v1:7c2e1b7de13f4da1e785e92f41a91f96b0029f79607915780ddb97aaff6a8d29", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "b09d5bf8c1d2efa3ae62881840125aa474500d658ba7538031dedeaeb79d52d4", + "capturedAt": "2026-11-24T01:53:00.229Z", + "outputExtension": "webp", + "outputSize": { + "width": 1536, + "height": 768 + } + }, + "sana_i2v_blue_hour_above_rice_terraces": { + "associationSha256": "9adb3ab26d3d8f41cf24b8e1b77dc837fcceff46b1b7a63524717cabc0131901", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:d68ff3c7d7b2d190e68d6f148834ae971638c23a9d31086a3848874658f37da2", + "templateRevisionHash": "e6ce9b989e565a3504ccb21781d8522fd3bd3d17715c008ae315b068f7773b1c", + "capturedAt": "2026-11-25T01:58:17.904Z", + "outputExtension": "mp4", + "primaryModelRepo": "Efficient-Large-Model/SANA-Video_2B_480p_diffusers", + "outputSize": { + "width": 832, + "height": 480 + } + }, + "sana_tidal_pool_on_black_basalt": { + "associationSha256": "7d892caa8cb7984f4c5abad893b76175dc4bd16600ae563c2fc4b91119e53b38", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "31c6fda19fe62a7282c50fe665069354989947ef1454ac63a1384637792d09c6", + "capturedAt": "2026-11-24T21:35:49.709Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "sana_video_water_terraces_before_sunrise": { + "associationSha256": "5b12ebe17da6302823c567e4f35e5dfb93aa2f913099f7bf4bda745b28c5d2de", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:40a4eb8d6275c83725f57c4d3499b8d12c00f8cf6caffc2d07006e74d24ab820", + "templateRevisionHash": "e5d7bb4cd5fa1b68f4840fc0746bea2aa963c1d8183be0985a66b0789be9f1d1", + "capturedAt": "2026-11-25T01:39:27.365Z", + "outputExtension": "mp4", + "primaryModelRepo": "Efficient-Large-Model/SANA-Video_2B_480p_diffusers", + "outputSize": { + "width": 832, + "height": 480 + } + }, + "sd15_canny_guided_green_glass": { + "associationSha256": "37b256588e8ffe492a2ac09c77eff98cf0b7adedafb95d434346b94c74a5e728", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:ad16452bc59ad56fa75df0e9f2f3b913f28233c906d4e37c4518fbc978d47953", + "templateRevisionHash": "783d03619e47df52cf8b17262e42d07bdaacf9165314c26bce9dc3fc9478e55d", + "primaryModelRepo": "stable-diffusion-v1-5/stable-diffusion-v1-5", + "capturedAt": "2026-11-23T16:04:58.708Z", + "outputExtension": "webp", + "outputSize": { + "width": 512, + "height": 512 + }, + "inputSize": { + "width": 512, + "height": 512 + } + }, + "sd15_control_cobalt_handmade_paper": { + "associationSha256": "f08c694ec651b0c38518cf435ce5140627d14b39074551df6ab190fd8e576961", + "backendSourceFingerprint": "sha256:backend-source-v1:3227569ff822090d00a80a3a88213d76d5ca43092d2918cec2494962457865a5", + "backendContractFingerprint": "sha256:backend-contract-v1:b5b17d569852e051bdac1d2b3e08b4753392cadd39a1277f893bdf34f19490c5", + "templateRevisionHash": "fee63ff957b7394a6472d76a9f662abd1d86193d12ee6c0ab2cf6c77cf1e2b50", + "primaryModelRepo": "stable-diffusion-v1-5/stable-diffusion-v1-5", + "capturedAt": "2026-11-23T18:36:20.247Z", + "outputExtension": "webp", + "outputSize": { + "width": 512, + "height": 512 + }, + "inputSize": { + "width": 512, + "height": 512 + } + }, + "sd15_control_cobalt_studio_wall_repair": { + "associationSha256": "a25d434141bad5cc3deda9b08cb19a5954e772c32cf5f3a87517cd8142c61e89", + "backendSourceFingerprint": "sha256:backend-source-v1:fe1a57b8e352eb66a1a26ebbff5865aaafcf5d55326c4bbcbaf2132ec75f54a8", + "backendContractFingerprint": "sha256:backend-contract-v1:7271d6dfcd46a677217edf40c568c3f5e9ae300200f76976e0cf18fd9b9f2508", + "templateRevisionHash": "871cffe6c8b434f4d3afa1f65009582862b565313d180b56d5a61eedd5fd1aa8", + "primaryModelRepo": "stable-diffusion-v1-5/stable-diffusion-v1-5", + "capturedAt": "2026-11-23T15:27:55.645Z", + "outputExtension": "webp", + "outputSize": { + "width": 512, + "height": 512 + }, + "inputSize": { + "width": 512, + "height": 512 + } + }, + "sd15_pag_canny_guided_glass": { + "associationSha256": "5f2c1f81107eec8d214f6f9fa7bb517d0298a6fdfd1d31ed0c4c440ed19e359d", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:ad16452bc59ad56fa75df0e9f2f3b913f28233c906d4e37c4518fbc978d47953", + "templateRevisionHash": "23fc8dfe4150096c38d946116a9839a314a7581d52c9397e9d8e1ad42716624c", + "primaryModelRepo": "stable-diffusion-v1-5/stable-diffusion-v1-5", + "capturedAt": "2026-11-23T16:06:50.173Z", + "outputExtension": "webp", + "outputSize": { + "width": 512, + "height": 512 + }, + "inputSize": { + "width": 512, + "height": 512 + } + }, + "sd15_pag_cobalt_studio_repair": { + "associationSha256": "395e41a6da16e9f1a31323b91390e4578428f3d0ea12054b59378709d32a9c52", + "backendSourceFingerprint": "sha256:backend-source-v1:1f2f7e00ce4a500ba52d5b729f43d4321af6f931125a3f266f307cf80038c12e", + "backendContractFingerprint": "sha256:backend-contract-v1:61201b43ea68d3fd347fbc374e292b5839be28f908b473bcb69f5ec1f8b87736", + "templateRevisionHash": "8373d87ab42e130142a163e3c60733f3f2511b7a77ffad1d9129607bcfba2562", + "capturedAt": "2026-11-23T14:32:05.292Z", + "outputExtension": "webp", + "outputSize": { + "width": 512, + "height": 512 + }, + "inputSize": { + "width": 512, + "height": 512 + } + }, + "sd15_pag_control_wall_repair": { + "associationSha256": "c685ec23f4be771c0746d40831f6b768525d7f12f3805282bb8e6d1fe32a3ba3", + "backendSourceFingerprint": "sha256:backend-source-v1:fe1a57b8e352eb66a1a26ebbff5865aaafcf5d55326c4bbcbaf2132ec75f54a8", + "backendContractFingerprint": "sha256:backend-contract-v1:7271d6dfcd46a677217edf40c568c3f5e9ae300200f76976e0cf18fd9b9f2508", + "templateRevisionHash": "155adb3c21e9aacbf62ac042d0e2d3b5ba9987331edd79dcff446b6053438a98", + "primaryModelRepo": "stable-diffusion-v1-5/stable-diffusion-v1-5", + "capturedAt": "2026-11-23T15:28:49.418Z", + "outputExtension": "webp", + "outputSize": { + "width": 512, + "height": 512 + }, + "inputSize": { + "width": 512, + "height": 512 + } + }, + "sd15_pag_mountain_lake_watercolor": { + "associationSha256": "fbe3707bb87008593c1bc4ec367915fa2d558aa9ba9581f94dca839dabe5117b", + "backendSourceFingerprint": "sha256:backend-source-v1:3b073e3f6f5e9489e06116f277ee4a9e878b8f0c6258efc93c60be9a04513cb5", + "backendContractFingerprint": "sha256:backend-contract-v1:bd364fcd29020d51bb61f5f9bf320cf0bf562e718c645c21ffac8ed5a47b740d", + "templateRevisionHash": "6de709bbcfb3ed6e061541584be28f5b7ed05e1170dcdaa69e2deb4fee822154", + "capturedAt": "2026-11-23T20:28:31.760Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "sdxl_blue_glass_on_linen": { + "associationSha256": "53d59ef7f6e74198efb92db50afda44e8b1435e83a8a12bad07719997a77201e", + "backendSourceFingerprint": "sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290", + "backendContractFingerprint": "sha256:backend-contract-v1:bd364fcd29020d51bb61f5f9bf320cf0bf562e718c645c21ffac8ed5a47b740d", + "templateRevisionHash": "c54124fc0e1c94b88c70853b0102ad94e7cbbe4d5761528d8c699f2ecd0d6be2", + "capturedAt": "2026-11-25T04:29:19.529Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "sdxl_canny_adapter_glass_study": { + "associationSha256": "f05c0bb40aaad59d8bafc8f3efe1de4be8e3ebc1cec9b0607dde8902a78c4123", + "backendSourceFingerprint": "sha256:backend-source-v1:371fd754663a95b1b06900df9a838042048466464b4bd5cfa7033c1b6eebe0e3", + "backendContractFingerprint": "sha256:backend-contract-v1:ad16452bc59ad56fa75df0e9f2f3b913f28233c906d4e37c4518fbc978d47953", + "templateRevisionHash": "eef6570d0a2241aa0a9ff68b200c59591fc6497f43885fba151138ae56517968", + "primaryModelRepo": "stabilityai/stable-diffusion-xl-base-1.0", + "capturedAt": "2026-11-23T14:45:54.554Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "sdxl_clear_cobalt_backdrop": { + "associationSha256": "521b7a02cb3320f0c9518529323ccd9f545913a181851da3c425bd5c06dc7588", + "backendSourceFingerprint": "sha256:backend-source-v1:a7a074387d21c2a016af41b7de9d090fd6377b8efe388047bc50201779908464", + "backendContractFingerprint": "sha256:backend-contract-v1:61201b43ea68d3fd347fbc374e292b5839be28f908b473bcb69f5ec1f8b87736", + "templateRevisionHash": "5ac53251bbc44c8b3eb62ab06fba702e275ebc7340348f36fb20a055d36b3573", + "capturedAt": "2026-11-24T12:07:41.410Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "sdxl_control_golden_boathouse": { + "associationSha256": "3eb5289566ee4910568ed91a92fa2aced83d4a2eeef6089225287e1c8a97d672", + "backendSourceFingerprint": "sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290", + "backendContractFingerprint": "sha256:backend-contract-v1:b5b17d569852e051bdac1d2b3e08b4753392cadd39a1277f893bdf34f19490c5", + "templateRevisionHash": "94724166ff9512b26bca310deb3e9d2a16f88116cc157e42694d1a459bfc06cd", + "primaryModelRepo": "stabilityai/stable-diffusion-xl-base-1.0", + "capturedAt": "2026-11-25T04:34:53.900Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "sdxl_control_inpaint_warm_plaster": { + "associationSha256": "a164aa1acb01ff7bb77ec43565bd17ed7c822f8331eeb24516fa58095cd3ecbd", + "backendSourceFingerprint": "sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290", + "backendContractFingerprint": "sha256:backend-contract-v1:7271d6dfcd46a677217edf40c568c3f5e9ae300200f76976e0cf18fd9b9f2508", + "templateRevisionHash": "7d840698c480d52e5a864d50fcdbe6528680a9d0453e5dc501d76ac89c0991ef", + "primaryModelRepo": "stabilityai/stable-diffusion-xl-base-1.0", + "capturedAt": "2026-11-25T00:04:32.014Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "sdxl_controlnet_glass_study_on_slate": { + "associationSha256": "290aae18b88e53f187a4818898017c3e685032471209ea970ee9f9e675f198bb", + "backendSourceFingerprint": "sha256:backend-source-v1:371fd754663a95b1b06900df9a838042048466464b4bd5cfa7033c1b6eebe0e3", + "backendContractFingerprint": "sha256:backend-contract-v1:ad16452bc59ad56fa75df0e9f2f3b913f28233c906d4e37c4518fbc978d47953", + "templateRevisionHash": "3075b68d97eea65616a9a8fe2519154041e24ced2cd916b395c4849d26c31b71", + "primaryModelRepo": "stabilityai/stable-diffusion-xl-base-1.0", + "capturedAt": "2026-11-23T15:20:10.146Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "sdxl_pag_cobalt_wall": { + "associationSha256": "f16545643b3604b92e3e40e2d6de39f1df72ef08e1aa17e41249fde90c6c2c83", + "backendSourceFingerprint": "sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290", + "backendContractFingerprint": "sha256:backend-contract-v1:61201b43ea68d3fd347fbc374e292b5839be28f908b473bcb69f5ec1f8b87736", + "templateRevisionHash": "b95bd1828ace6db13d5ea54c01f8e9449bfcd73552ae371dcb52ce1838ecad8d", + "capturedAt": "2026-11-25T03:24:43.819Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "sdxl_pag_lighthouse_in_graphite": { + "associationSha256": "0ae8965c8710db37b8834e98f911ee3c86561974abea4f8cb7445fcd4011dd13", + "backendSourceFingerprint": "sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290", + "backendContractFingerprint": "sha256:backend-contract-v1:bd364fcd29020d51bb61f5f9bf320cf0bf562e718c645c21ffac8ed5a47b740d", + "templateRevisionHash": "6eb3e04961a9389794619d6ae2342a296287039deb1d08715a785409b279cba3", + "capturedAt": "2026-11-25T11:05:22.328Z", + "outputExtension": "webp", + "primaryModelRepo": "stabilityai/stable-diffusion-xl-base-1.0", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + }, + "beforeExtension": "png" + }, + "sdxl_pag_snow_cabin": { + "associationSha256": "fff0a575997fa3709d36a1f008b335d9f0c716a99dcdaeebd0831b8e1ef7d37f", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:ad16452bc59ad56fa75df0e9f2f3b913f28233c906d4e37c4518fbc978d47953", + "templateRevisionHash": "1c302242a6a0e304537b15c53c8cb94dcffae8955039b0cbf3759331122864e1", + "primaryModelRepo": "stabilityai/stable-diffusion-xl-base-1.0", + "capturedAt": "2026-11-23T20:11:04.963Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "sdxl_pag_two_tier_cobalt_glass": { + "associationSha256": "0de1c75fa0d19923cbf974dc4b7286d5694e152814287225c70f7e15ff5c3e5f", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:2640de4cce56db16229ada283eb8ff2c49cd39d7f015dd1e08ae601b9c9eac8a", + "templateRevisionHash": "09f0d98df7f8807fd95a733b904b52dde05fd41d82f68c31369c3ff7c434120b", + "capturedAt": "2026-11-25T14:39:45.774Z", + "outputExtension": "webp", + "primaryModelRepo": "stabilityai/stable-diffusion-xl-base-1.0", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + }, + "beforeExtension": "png" + }, + "sdxl_pix2pix_pale_amber_glass": { + "associationSha256": "e0d2d7d05a9109a8ae527c819ebaffca93dec272c54efcfb0b05e41a144d7bfb", + "backendSourceFingerprint": "sha256:backend-source-v1:55da4a68212923ee8a67e70754f46193288e210bce08ab4ae8c06834a7a76995", + "backendContractFingerprint": "sha256:backend-contract-v1:bd364fcd29020d51bb61f5f9bf320cf0bf562e718c645c21ffac8ed5a47b740d", + "templateRevisionHash": "897fb59d568ceba3ef8d85cf1141f79002522b111dbc6ffa67ad51a9acf88495", + "capturedAt": "2026-11-23T16:05:26.964Z", + "outputExtension": "webp", + "outputSize": { + "width": 768, + "height": 768 + }, + "inputSize": { + "width": 768, + "height": 768 + } + }, + "sdxl_turbo_orange_caps": { + "associationSha256": "85cf071e354281c57ed922fc7a4a112c34ebe994be2d2f52221f23bf12865b34", + "backendSourceFingerprint": "sha256:backend-source-v1:057b165c6ef6225461649a47077562dffad098a2d37d639a13bf0e73088d79ab", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "a8bae14e8dc50c3969cba99c45be96d5ffbbca1fa12824640f5c3360bcc4427c", + "capturedAt": "2026-11-23T14:40:52.201Z", + "outputExtension": "webp", + "outputSize": { + "width": 512, + "height": 512 + } + }, + "smolvlm_red_triangle": { + "associationSha256": "a686ff98e677c53f203c5c86a7cca856c8e2103ebe80621679de07c58b4c596c", + "backendSourceFingerprint": "sha256:backend-source-v1:12feeb1b7586129e38f183c3c391555c88004534d762ea8676efe9dc334540d9", + "backendContractFingerprint": "sha256:backend-contract-v1:5dcc04106f1021d0ef9128d360e91a97236cc538ea7426b994967a459307a4fc", + "templateRevisionHash": "7c5cc75ca115a437ec6a7ebab59030ef5c5ea14c74735bae5ca78dff427fb0e2", + "capturedAt": "2026-11-23T18:58:19.689Z", + "outputExtension": "json" + }, + "spandrel_tram_shelter_video_2x": { + "associationSha256": "5f057274d8352aa72658f9cd1b3de89f72f11501b132d9f9b608a756b72f6efa", + "backendSourceFingerprint": "sha256:backend-source-v1:8dbad61815340f9a36c0966f227c6aaf8149350329cad36c73928ecb2df4698c", + "backendContractFingerprint": "sha256:backend-contract-v1:7e5cfc2be4665b078b5cda7e27b3c34bd3805652ca16146e86692677ab089da7", + "templateRevisionHash": "7bbb69fe91f85685502578e96bbcdc6c6bfe1bcf44210a0bcb1315e003605ce6", + "capturedAt": "2026-11-24T21:49:57.417Z", + "outputExtension": "mp4", + "primaryModelRepo": "nateraw/real-esrgan", + "outputSize": { + "width": 1024, + "height": 576 + }, + "inputSize": { + "width": 512, + "height": 288 + }, + "beforeExtension": "mp4" + }, + "stable_audio_glass_roof_rain": { + "associationSha256": "42b85d8e9a58a41900016810baa77e17dc62c473d42faa18186aa5f0e1e98822", + "backendSourceFingerprint": "sha256:backend-source-v1:bf8ee3b3df08410b5f041279f84ca3b9e0bbb7248f0e73fbe4c0ecb718727b6c", + "backendContractFingerprint": "sha256:backend-contract-v1:92104623eb3205adaa23cccc593a604da25d7f696e79cd9b947b553b92da39f0", + "templateRevisionHash": "98b2b306a1e1b6198b80157de33d35a146532b246d2bdd4effb1bbc10415014f", + "capturedAt": "2026-11-25T17:07:08.451Z", + "outputExtension": "wav", + "primaryModelRepo": "stabilityai/stable-audio-open-1.0" + }, + "stable_video_lighthouse_headland": { + "associationSha256": "8e3d467da8ae4717532674d6599a10054d19bc566d8faa1910004c85a6902cbf", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:d68ff3c7d7b2d190e68d6f148834ae971638c23a9d31086a3848874658f37da2", + "templateRevisionHash": "0ca724757ea5c4d3ddcb75957d99e5c8c25994915ebcb1610565e329e2542bd4", + "capturedAt": "2026-11-25T17:02:44.883Z", + "outputExtension": "mp4", + "primaryModelRepo": "stabilityai/stable-video-diffusion-img2vid-xt-1-1", + "outputSize": { + "width": 1024, + "height": 576 + } + }, + "the_glasshouse_seed_tray": { + "associationSha256": "e08a25a88a52011adcb645ed75fe1904eec042529005c19e11552d90210f3f03", + "backendSourceFingerprint": "sha256:backend-source-v1:057b165c6ef6225461649a47077562dffad098a2d37d639a13bf0e73088d79ab", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "f30bccf14d658fa6222cec9c7458ec74fec76940dc1dac07ed87e19d93b3738c", + "capturedAt": "2026-11-23T14:16:46.399Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "wan_a14b_cloudbreak_over_the_ridges": { + "associationSha256": "2fdbcaf34bd1e2a3d31edf4196c3cf67c590053f1ba99eb75a2e001bd73d6384", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:40a4eb8d6275c83725f57c4d3499b8d12c00f8cf6caffc2d07006e74d24ab820", + "templateRevisionHash": "2fe28c05a3adcb92031d2e5a369cf6be41990463644f08e5440bb998b32bc1fd", + "capturedAt": "2026-11-24T23:06:15.432Z", + "outputExtension": "mp4", + "outputSize": { + "width": 768, + "height": 512 + } + }, + "wan_a14b_wind_across_pond": { + "associationSha256": "d355616574bee93602a920b565517d7d0170cd8112eebc6cbd573d7e9ea4db37", + "backendSourceFingerprint": "sha256:backend-source-v1:ce7ac712b4620d0e8efb35022a558a551e2d4ae6ef20b844744c4d674527b0b3", + "backendContractFingerprint": "sha256:backend-contract-v1:d68ff3c7d7b2d190e68d6f148834ae971638c23a9d31086a3848874658f37da2", + "templateRevisionHash": "fd7249fa8e87be9636e616bb278c88abbabc8920e4b093fc896f58b8a8d5dadd", + "capturedAt": "2026-11-24T23:54:28.989Z", + "outputExtension": "mp4", + "primaryModelRepo": "Wan-AI/Wan2.2-I2V-A14B-Diffusers", + "outputSize": { + "width": 768, + "height": 512 + } + }, + "wan_animate_glasshouse_keeper": { + "associationSha256": "df20117453015264b552c44bf2beae6ff08803d9e805537b1b20ec0f65c675db", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:6b262add8ba2463e96d9d3a9b0e92cd5a745badc3e8a985bc4ff1ac29483a2bd", + "templateRevisionHash": "c709baafb5f990b9f9ca029bfc04ad15d0006f2c84c85759f6a18d68a0cc565d", + "capturedAt": "2026-11-25T11:54:29.880Z", + "outputExtension": "mp4", + "primaryModelRepo": "Wan-AI/Wan2.2-Animate-14B-Diffusers", + "outputSize": { + "width": 768, + "height": 512 + } + }, + "wan_animate_signal_through_the_rain": { + "associationSha256": "899e08f1fbe9754bd60b27c41ea1ae48f7533366d21f5a2834a2c7d73c0bc33d", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:2d72ad297f1912c832a1a945e929a03af0e9de5efe3359a8759aae18db4bc2b5", + "templateRevisionHash": "3dd570d231c6fb4075f50264809e570747f00ed8f85d367ee494c7d7cd5fe4bf", + "capturedAt": "2026-11-25T09:03:45.693Z", + "outputExtension": "mp4", + "primaryModelRepo": "Wan-AI/Wan2.2-Animate-14B-Diffusers", + "outputSize": { + "width": 768, + "height": 512 + } + }, + "wan_flf_blue_hour_at_the_tram_shelter": { + "associationSha256": "386e6871df161c57a2ea8c632cb3d58873a0a450e8eac14d3fa27a2974aae9ab", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:288f2abd0b142ec1f2081bf6d3dbf71ba988833662040e7e81688c4524cf0516", + "templateRevisionHash": "719322718cef9254b24004759f2eac08a4302ea27c86cbe538782207d29389f6", + "capturedAt": "2026-11-24T21:03:04.380Z", + "outputExtension": "mp4", + "outputSize": { + "width": 768, + "height": 512 + } + }, + "wan_ti2v_subway_musician": { + "associationSha256": "cba050638b1e9245403a8bc6731b84afa6b38c3d734b9f17572d8835319d1501", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:5d062bef6bee536bcebcfc45356a33037785e3101631cffd94461b2f2de4a91b", + "templateRevisionHash": "3d639a689fee74a2857de70668d5d6e7939ee25a62025fb84d4435c2b149b183", + "capturedAt": "2026-11-25T05:16:20.887Z", + "outputExtension": "mp4", + "primaryModelRepo": "Wan-AI/Wan2.2-TI2V-5B-Diffusers", + "outputSize": { + "width": 1280, + "height": 704 + } + }, + "wan_vace_amber_glass_stabilized": { + "associationSha256": "e718c4bcb80657d3a22d2c6b53f568b216ba73cf51e51e6971cd248107290584", + "backendSourceFingerprint": "sha256:backend-source-v1:438519cbac050bb30e69d86506f4510f260d790899896038d9707a5edd488e95", + "backendContractFingerprint": "sha256:backend-contract-v1:5a281b9ce038d5cd332f93df5f1a29c485cf04edd0b8b809b2921217daeb7010", + "templateRevisionHash": "0a03ac711cd90be44c4f79f9d39ce3afa4e0cad264bdfc24294d625ce551181d", + "capturedAt": "2026-11-17T04:47:18.627Z", + "outputExtension": "mp4", + "primaryModelRepo": "Wan-AI/Wan2.1-VACE-1.3B-diffusers", + "outputSize": { + "width": 1664, + "height": 960 + } + }, + "wan_vace_amber_rings_after_rain": { + "associationSha256": "0c54ef3a1f646bad294799d587cb2f1e0dcd9d0bcba7be1aeab4794bf9373b3d", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:bf402b162817edb94494bd54801f5b411be4220f43a3e56c4715b1c9128e023b", + "templateRevisionHash": "520b484950dcf0432791f4a00d6ad8c5de4c785849563aefa07d467f36d679d9", + "capturedAt": "2026-11-25T02:44:38.768Z", + "outputExtension": "mp4", + "primaryModelRepo": "Wan-AI/Wan2.1-VACE-1.3B-diffusers", + "outputSize": { + "width": 1664, + "height": 960 + } + }, + "whisper_small_an_open_door": { + "associationSha256": "a6f56721c12e3ddffb35182f4b457b4af8255563e712753979b2787226a84d95", + "backendSourceFingerprint": "sha256:backend-source-v1:3227569ff822090d00a80a3a88213d76d5ca43092d2918cec2494962457865a5", + "backendContractFingerprint": "sha256:backend-contract-v1:89ce835969abfae21cb4c27992f38f895d98a9cebbce248d62123a5a8aa1fc28", + "templateRevisionHash": "cfc95f86cf49288a5b851e7e042558b50bcd091f1a69cfabdf961cb204fde1ac", + "capturedAt": "2026-11-23T18:16:55.558Z", + "outputExtension": "json" + }, + "zimage_golden_amber_glass": { + "associationSha256": "238b088d3b9aaad1955b07a3291cf8875a928136444b9642114527b3d803bc38", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "templateRevisionHash": "303a0b1b64a2e1234aeca85941a07eea2157707c8436442a5cf00aedd68c6d97", + "capturedAt": "2026-11-23T17:46:24.489Z", + "outputExtension": "webp", + "outputSize": { + "width": 640, + "height": 640 + }, + "inputSize": { + "width": 768, + "height": 768 + } + }, + "zimage_rocky_glacial_shores": { + "associationSha256": "a2a9a5fe3791f89f3f06c40d7ebd79266840566dc1967e90e7244fc7675f89ce", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:06f986600338dc08fb5d1e639bfad55384f5b15ca0c97c2aeb7ed42a8c245594", + "templateRevisionHash": "67bc5216f976bce75a6793c5eb33181b777828c34fb7e0573d31073d2ad42bc9", + "capturedAt": "2026-11-23T20:16:17.605Z", + "outputExtension": "webp", + "outputSize": { + "width": 1344, + "height": 768 + }, + "inputSize": { + "width": 832, + "height": 768 + } + }, + "zimage_seamless_cobalt_backdrop": { + "associationSha256": "d218b50b2de79767fb1980054d7cd2be953e2cc59936c73eebd725b0a69312ea", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:e7a7aa3acbdedd686fa7e7a9d4bcc39c1709ba1fec38f047d63ff83558a85c18", + "templateRevisionHash": "2a72cfcaddfa6e69098ca7feceef620a98bc50441abfa93f509c0a18711de478", + "capturedAt": "2026-11-23T18:07:24.639Z", + "outputExtension": "webp", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + } + }, + "flux_canny_black_ink_cube": { + "associationSha256": "05be845003036dccba5d99186b1484d6d47ec6df28bfcdd35a32102a141b9b1c", + "backendSourceFingerprint": "sha256:backend-source-v1:73c0d5622c9c305eb2c13478fbac4ca9ea09c71689c74d38679fa6af592c8964", + "backendContractFingerprint": "sha256:backend-contract-v1:a726a4911d942b352bd2cf362667a5c67d7868af60789bf1ecd73896ddd05a43", + "templateRevisionHash": "31fd14f25aae5426b9b42550ef75f26b26e4847703460e6076bcefea1d9c8cc6", + "capturedAt": "2026-11-25T18:59:54.565Z", + "outputExtension": "webp", + "primaryModelRepo": "black-forest-labs/FLUX.1-Canny-dev", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + }, + "beforeExtension": "png", + "beforePath": "/template-gallery/inputs/joy_plus_lavender_on_limestone.before.png" + }, + "flux_depth_marine_teal_bow_edit": { + "associationSha256": "59340478a35dfce98e9c6735f2cc2fab40dd2386c1e74dbe1f674ec4cde0a5cd", + "backendSourceFingerprint": "sha256:backend-source-v1:73c0d5622c9c305eb2c13478fbac4ca9ea09c71689c74d38679fa6af592c8964", + "backendContractFingerprint": "sha256:backend-contract-v1:a726a4911d942b352bd2cf362667a5c67d7868af60789bf1ecd73896ddd05a43", + "templateRevisionHash": "4495ab72ea261fbec0dbbe7796bbb1927c5acf5a39dcd6cc28ae13496c76c019", + "capturedAt": "2026-11-25T18:56:57.629Z", + "outputExtension": "webp", + "primaryModelRepo": "black-forest-labs/FLUX.1-Depth-dev", + "outputSize": { + "width": 1024, + "height": 1024 + }, + "inputSize": { + "width": 1024, + "height": 1024 + }, + "beforeExtension": "webp", + "beforePath": "/template-gallery/inputs/flux_depth_marine_bow_repair.before.webp" + }, + "pixart_sigma_terracotta_herbs": { + "associationSha256": "0b6f6526aee4aed5db56e4d685b2bb903e3ff8c0a94b0060edd4620d37f3ab09", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "480e216355d747c12b2bb430d60fb8b3f6e774775d7976d5ffcf2fc108af82ee", + "capturedAt": "2026-11-23T17:15:12.387Z", + "outputExtension": "webp", + "primaryModelRepo": "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "pixart_sigma_pag_pink_mascot": { + "associationSha256": "0e88e6d01b9ffc0074cfac9d245c295304d45996ffd7557d3a5bc96a7c32dba8", + "backendSourceFingerprint": "sha256:backend-source-v1:8dd9a4d61d2c9c484e4167e38e7360d6b64a37d278e49771630e428189f5448b", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "templateRevisionHash": "f1f33d46c694c535230dc9b15fd3c021ad4b4b9a9a70d99a5596c01c3a5f2025", + "capturedAt": "2026-11-19T06:29:39.928Z", + "outputExtension": "webp", + "primaryModelRepo": "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS", + "outputSize": { + "width": 1024, + "height": 1024 + } + }, + "ddpm_cifar32_technical_preview": { + "associationSha256": "1aeeeb5ba1b8bf92cac5150e6d16c4ce742891205863e39fff482cfa14cc3d9a", + "backendSourceFingerprint": "sha256:backend-source-v1:8dd9a4d61d2c9c484e4167e38e7360d6b64a37d278e49771630e428189f5448b", + "backendContractFingerprint": "sha256:backend-contract-v1:d16a0d75259eb0a1deadd48385d2f456ee5d7ed8e4c42ec8c27a53a0f95c079c", + "templateRevisionHash": "ea0657f083a38e463cf3e03212cb1080bf03a810f8feb162a0f80176cf48b34e", + "capturedAt": "2026-11-19T07:41:28.161Z", + "outputExtension": "webp", + "primaryModelRepo": "google/ddpm-cifar10-32", + "outputSize": { + "width": 32, + "height": 32 + } + }, + "consistency_64_technical_preview": { + "associationSha256": "38d3a6c81c2e1c4db1cb5a683ff5480ac75ea09f9a3ddc710018caeba0bce559", + "backendSourceFingerprint": "sha256:backend-source-v1:8dd9a4d61d2c9c484e4167e38e7360d6b64a37d278e49771630e428189f5448b", + "backendContractFingerprint": "sha256:backend-contract-v1:fd79d9695a0390dba3364bad57ac4ea2ccbb5cef673189181f756368701ea1e4", + "templateRevisionHash": "7c73b72123f3a2fc2e3bdef6594d378cfdb16bf862bab5aa0c230cde93e52bfb", + "capturedAt": "2026-11-19T07:34:55.386Z", + "outputExtension": "webp", + "primaryModelRepo": "openai/diffusers-cd_imagenet64_l2", + "outputSize": { + "width": 64, + "height": 64 + } + }, + "shap_e_traffic_cone_turntable": { + "associationSha256": "f55390bea2eb0a0b8a086c200704b345c1754cf6a9754245977677cbe7be6725", + "backendSourceFingerprint": "sha256:backend-source-v1:3486a8950b4b134157b022faf89983af60c5e274d4ec3ed9fedd44b2ee1459ab", + "backendContractFingerprint": "sha256:backend-contract-v1:9378c60e00d05964ea18fe541c5454ee2aedc97ad016658f5dcffe4ac46bd326", + "templateRevisionHash": "fa62bcb8142d0e8e3cf7816cc648ca33ae32dfcfebb83d455c52e14f662a8ff2", + "capturedAt": "2026-11-26T12:31:34.910Z", + "outputExtension": "mp4", + "primaryModelRepo": "openai/shap-e", + "outputSize": { + "width": 256, + "height": 256 + } + } +} diff --git a/config/retained-gallery-authoring-archives.v1.json b/config/retained-gallery-authoring-archives.v1.json new file mode 100644 index 00000000..a2c876d2 --- /dev/null +++ b/config/retained-gallery-authoring-archives.v1.json @@ -0,0 +1,608 @@ +{ + "AllegroPipeline:text_to_video": { + "descriptorSha256": "abbadb877960f2cab04d6555a9a95475ae7db80e22d6120439456c69b098b10f", + "bytes": 4708, + "sha256": "e5a7db6c7945460600eb1f5611952369656e3be62a4f083205f0ce2cd5070aa9" + }, + "AnimateDiffControlNetPipeline:control_to_video": { + "descriptorSha256": "26cefb76bc3b60ebd26d76ccda2ce9aa79a4d2e760023662cf3d1fe868dad7bf", + "bytes": 6389, + "sha256": "2a921703f9444e937b355c4f08116029607143dd2332eb3aedaaa08ff0c5603f" + }, + "AnimateDiffPAGPipeline:text_to_video": { + "descriptorSha256": "60f21d1b1bbbf6d135ced0bd8ab0935a0c62ae95ccefd8d4df6f8bd3a1110343", + "bytes": 5325, + "sha256": "718f899d2659c6a7bbbc967abfd9042413f3853d44c08b06d913e0c6d0284365" + }, + "AnimateDiffPipeline:text_to_video": { + "descriptorSha256": "8493c1cd300b662ead386632610603cee2531eeff86668b454b314c66e175f0b", + "bytes": 5074, + "sha256": "e101fe940b9ffdf5a7f72e57a00739a687c5c9cb4ac5862d5ef5a68a7c409a5c" + }, + "AnimateDiffVideoToVideoControlNetPipeline:control_video_to_video": { + "descriptorSha256": "4f47a4a1a0244ed4b550c9e8ef4f3cfd8c2076d3f87f5ecbb583d6a8c8987b05", + "bytes": 7237, + "sha256": "b720c1515832c4984d8c8eec6a7e83f525ef9383e2d73708bc311a4619aa8456" + }, + "AnimateDiffVideoToVideoPipeline:video_to_video": { + "descriptorSha256": "b88aa5f2d7c8e012280b1d13cb812b1890dbc93ad7d14953504a7ca2bac45917", + "bytes": 5864, + "sha256": "da693cb57abb7c792b81aa90147ced2e2d127d052c20d4424dce4f9697c08293" + }, + "AnimateLCMPipeline:text_to_video": { + "descriptorSha256": "42c865106617e74f0b4f283316e1712eecfb61e8a78b1d02dfaff346ba718e20", + "additionalDescriptorHashes": ["d3810107239e90cc8d4f3605504145a2c30ae0e3d7295888b010e9a485138cbd"], + "bytes": 5060, + "sha256": "3af27719dbc699a711ea79d0f38fd05301c280468e0c3454231e191861ca5d24" + }, + "AudioLDM2Pipeline:text_to_audio": { + "descriptorSha256": "23a27ed8d0cdd7b64c550a961a66853c304e6516533018995fb8e91b8d77dec4", + "bytes": 3926, + "sha256": "2c285934816b2989e03c9b8fa79b2b744c9421e1669714b60cb95da93dcfb6d3" + }, + "AuraFlowPipeline:text_to_image": { + "descriptorSha256": "c4ce21c85cf0412cc1e69ff59009037bbdde9d1692cff19f307d589b84fb5b1f", + "bytes": 4108, + "sha256": "945515d6dee658ed3cf4503b674b33d73149a091f98ecb438a01970c5c08d820" + }, + "ChromaImg2ImgPipeline:edit_image": { + "descriptorSha256": "dd23974fab77ebe91e46ed5734e61a75638f10cc0ace0e54240f6afaf233c72b", + "bytes": 4609, + "sha256": "75b36f5f95e4509d3adcf65651a9b188eda71a5efe87d5a5b620dec77b6e1abe" + }, + "ChromaInpaintPipeline:inpaint": { + "descriptorSha256": "a85451bc142a3f5ef44cc5e8cdb1fcc0f000872241efe5bda751638d36215919", + "bytes": 5060, + "sha256": "466c485a4ad317122c23b4da06c89566d8a4015fd8d6dad379eab318b98219f0" + }, + "ChromaInpaintPipeline:outpaint": { + "descriptorSha256": "aca4038c57ccfc738f45a28e69a99d43eaf195fd4225e973d0046e3dabb4d44c", + "bytes": 5481, + "sha256": "3ac93c353e258e81175785813fa60dda29cdc912568e507a7ffec195f79fcff5" + }, + "ChromaPipeline:text_to_image": { + "descriptorSha256": "bad53850d48ffdaffa0896ec019e295c349577ee86d169e1ea1da8752324a215", + "bytes": 4049, + "sha256": "7fd3187b78e4f1c730522dd5743e91503e17bd62e03bb133b76b4d636213ac3f" + }, + "CogVideoXPipeline:text_to_video": { + "descriptorSha256": "3aab2d19bca49f839f8316f19ea75afbe4b0e401ff5a330c16f35484f43f611a", + "bytes": 4732, + "sha256": "4c24104fd8ecabb12b19fa1b978df2e5308f18fd86eb5e3388e9a39a4e1b36b4" + }, + "CogVideoXVideoToVideoPipeline:video_to_video": { + "descriptorSha256": "c4396b6f2b6b01fcdbcb5d7f370b6284be78d1979e4665a243c1e08193776e08", + "bytes": 5498, + "sha256": "0ea9626727160078f7717560d4e67272e29f5adc544cffcc5e4edde91eff93dc" + }, + "CogView3PlusPipeline:text_to_image": { + "descriptorSha256": "19c1e125e259b8b0e22a5bf5c03ab7c105a8302fc69b7e63c61796d7b7496744", + "bytes": 4135, + "sha256": "8e7775f9f0213646dad474747622c3daab32ad6ffd7d15c9b30b88ade40344a6" + }, + "CogView4Pipeline:text_to_image": { + "descriptorSha256": "7cb177ef1dac774f3cb76c3f58cf246fbdbf7673a78e379ff54e7fba5fa1a85f", + "bytes": 4067, + "sha256": "4a085738b6d9e818596480a5ed7a0bda9f663670d35cf49385be56d74b241ce2" + }, + "DDIMPipeline:unconditional_image": { + "descriptorSha256": "ba8521d8043808cfb8880be8e8f46eadb81e266624aa6fb478c8b0d156bab079", + "bytes": 3418, + "sha256": "d36f4697ffb13bbf8b8c6f72db8f1c7db7f22dafafa358b298916b0f84a27963" + }, + "ErnieImagePipeline:text_to_image": { + "descriptorSha256": "45f9a07cbd540055ad63000eb928be4a1b685c4b622bf46b84c98784e2c61139", + "bytes": 4122, + "sha256": "4072211fe61effe609b205e87cc599542446e73be2a9d108b27b87f52815064c" + }, + "Flux2KleinInpaintPipeline:inpaint": { + "descriptorSha256": "fdc033422ec6517632bed64a97b54322e17e329956edc239716e4fd599f2c4cd", + "bytes": 5104, + "sha256": "cea6084bec425454e3b8bd81165b83d653c56fdd362491bed9f74bec2951d175" + }, + "Flux2KleinInpaintPipeline:outpaint": { + "descriptorSha256": "b24c85edd5c183f82ce9510a6623981ef8d9ea2699ca46bc4d3917180d8294e5", + "bytes": 5530, + "sha256": "836bdca357990b56c7379e9bba751bdc6bb9616e799a11dac5eb1b1b329058c3" + }, + "FluxCannyPipeline:control_inpaint": { + "descriptorSha256": "1960eca0824640f40d86820463d58beabf4421cb9262a3f3abf93eaa2f07aaa7", + "bytes": 5690, + "sha256": "c14e618968f0b6009b27192c5a526cedf459d86a1ffbd7daf170e8cc02d6d65d" + }, + "FluxDepthPipeline:control_inpaint": { + "descriptorSha256": "568eba4ce2c06b085b22ca13a69a6651d27ba404760ea5f6fb621e14ced5df44", + "bytes": 5690, + "sha256": "3842994d2b102543f510af88fa278a455203411137e8b710e2c3c1923ac08f6d" + }, + "FluxDevPipeline:edit_image": { + "descriptorSha256": "c07e1306c0441d732e2cc24b652e2d9223ba77dd5597030b39bba3c6b271ab0c", + "additionalDescriptorHashes": ["0b6c09d15d13873d08ee91693361df555037595da8134dc0ffc23b3d13b95dbd"], + "bytes": 4716, + "sha256": "663044cc78ebcc99bee6508d7bf8a14a17e574d1ae02f3869e84a1d73f9aaf5f" + }, + "FluxDevPipeline:inpaint": { + "descriptorSha256": "f3a931273edeb2e41d23016dfd13d6568222cd92e21a4a52280afa814d59f384", + "bytes": 5171, + "sha256": "f764fcad0f1b501b845864674be35ca0556cd4d1c11f07ca9faefb3dc597afde" + }, + "FluxKontextInpaintPipeline:inpaint": { + "descriptorSha256": "393c69f7733fdfd3632682204dbf421cfff4578d0b86c911f4c15110c566ac90", + "additionalDescriptorHashes": ["1263b5089a7521abd31b7132ebb984295449965d2d09ccb241b796e2094d66f0"], + "bytes": 5115, + "sha256": "06176da1ff55e23460158734e24e043be4ae5230faf99918ea80929da35dbdea" + }, + "FluxKontextInpaintPipeline:outpaint": { + "descriptorSha256": "fabdf2609cbf5d838834845a08c6d12d08401d670edfc34d67a370efbf40414c", + "bytes": 5540, + "sha256": "271717782ff8d2294176173579080bf539a0ea44006c159604ba1dfe3f68bbac" + }, + "GlmImagePipeline:text_to_image": { + "descriptorSha256": "193b411fea187862b1af32edf24623f0cfd75a9f0d856a66b07fe99b1e562833", + "bytes": 4113, + "sha256": "538a6b30027a76e723ada2716c4c07f8dc17af247cfb71304b35bda43510c4aa" + }, + "HuggingFaceAnyToAnyModel:image_to_text": { + "descriptorSha256": "13c313cdf72749eea9789f1cef22fa7e1106d1c46cf6d3a0fb0757c00677c45c", + "bytes": 3662, + "sha256": "6c21dca774c759b82adcef3a7a749146a6e46b5d885694a3c516eb75dbd0429e" + }, + "HuggingFaceAnyToAnyModel:text_generation": { + "descriptorSha256": "5c9d37ae6894cd6aa04a9bfc4a91beaf7e9eb73bef40e2edc144ddce0215b3e7", + "bytes": 3139, + "sha256": "a7da7a73ed531ea097ef2044d88d156a17c0e9104862cf2c3d21cf48248c1416" + }, + "HuggingFaceAnyToAnyModel:text_to_image": { + "descriptorSha256": "5820a7260e3f78175f684b39ee2a28c244bfb7cfaed6318c256c642dce306ecd", + "bytes": 3257, + "sha256": "983434b29fc3b2b54690bef0dcab7e7d765d66eac3a81534bbbf7debb5c9fc79" + }, + "HuggingFaceImageTextToTextModel:image_to_text": { + "descriptorSha256": "daf5d3a9cb638e942a8f3f53df6cc86860e874943bc28fa01175ca2d30e56d5d", + "bytes": 3579, + "sha256": "90b53dde6fd677559cf4ddba7168802c4c834376e91c00f896977fa04aaf10bb" + }, + "HuggingFaceSpeechRecognitionModel:speech_translation": { + "descriptorSha256": "9d7ed920f22989d90bddc05fb1976b69025132a87799d43d361f14d671539d1c", + "bytes": 3869, + "sha256": "9fa0b0086341bdb652c97b70521b5647977e1922b7bc0858c7b803e90ea8c4a7" + }, + "HunyuanDiTControlNetPipeline:control_image": { + "descriptorSha256": "88ca5ccb6b4500e438bd84d42321a2cb61d0f7322e5c3bdaa8343735b8f08648", + "bytes": 5246, + "sha256": "7426bf3a8120bb575184e3b93c8fb0b5d294dfbcef9f8e4d3119c1e9b65b66f6" + }, + "HunyuanDiTPAGPipeline:text_to_image": { + "descriptorSha256": "aa6b64f4a942adbb11c83cbaba89940fd03ed7dbf83175e8e1d17d32291454d3", + "bytes": 4127, + "sha256": "a16cf339667b330edaa3aa5931d9bbd1937971e0d2a1ca3de5f16ad942ed06ea" + }, + "HunyuanDiTPipeline:text_to_image": { + "descriptorSha256": "9e8d30a1d20d721f8aeab6b9172f7f50403b1e8e855d83af17e6430fe97d9650", + "bytes": 4161, + "sha256": "5a9d07fe3092ac35356d661488b4169d98799f55c17a69753572480375557629" + }, + "JoyImageEditPipeline:edit_image": { + "descriptorSha256": "71b096416a43857e71643677e3288af3e75aa96312cbc24673f26ce8824ce46d", + "bytes": 4755, + "sha256": "a340892a5a3c7371b61b875dff2855751de8411913317c5565010d29621e7174" + }, + "JoyImageEditPipeline:text_to_image": { + "descriptorSha256": "655abc48262ac72c9e7cee61c90f7f72430660b5b5102716b97d4ee9730e31fa", + "bytes": 4150, + "sha256": "91f48149a549804d83375b9c26bf0cb8890091e6f8af135b2a225fae3033df75" + }, + "JoyImageEditPlusPipeline:edit_image": { + "descriptorSha256": "ec18a41cfd9d91e09bb4339e69b0669faec4a2ac968aef9d90c1a1d3b674d0e7", + "bytes": 4781, + "sha256": "ae1afab09dd44378b5274a8473c5ccef3e13f9270e7d24f12545da95416235c2" + }, + "JoyImageEditPlusPipeline:multi_image_reference_edit": { + "descriptorSha256": "7a419e8264420f38abdc18d4bf76d8ff9ec7ac21c736bf9c768477249b601d73", + "bytes": 4839, + "sha256": "024ead128a7b32c2d9c4b3e1e2d819f5aac55433c60c960e056d358ac68cf0d3" + }, + "Kandinsky3Pipeline:edit_image": { + "descriptorSha256": "441798bee62a4e76037a9bf34cb5fe4c95d3682f2144c6f2e32810aa50ad3c4b", + "bytes": 4729, + "sha256": "88d20a4d739dc85ac3079a8ed98b093b297c5379d01a9beda77fe2f3b595379f" + }, + "Kandinsky3Pipeline:text_to_image": { + "descriptorSha256": "41b3b13c0f66711ffa3ac065f7a990bee824fc52db69940b8f75e0f7f79bdd38", + "bytes": 4089, + "sha256": "5ed088eae56863584fdb4a4a141dcae6fe10dae649fe735b39b3e4bf688a9ea6" + }, + "LatentConsistencyModelPipeline:text_to_image": { + "descriptorSha256": "b23f6c1d6ea11f928eab1c62422e49a288645e6f46ecf0c4f1b4994e95ad56ea", + "bytes": 4229, + "sha256": "a5cb8dddeaf3f82f84025ceeded8a59c186a33e20f8cff733cbd32624e9e3a59" + }, + "LattePipeline:text_to_video": { + "descriptorSha256": "b3945315f5fa033cb7721f2d5dd7a789c75fd30157aeaf4fc137074fe3cd368a", + "bytes": 4696, + "sha256": "5f28b186585dadf313bfe2c7f98ba320a0c495493d9f83521c0e68ccb263ffa0" + }, + "LongCatAudioDiTPipeline:text_to_audio": { + "descriptorSha256": "8019b9dbf5af0e8ba5c8eeed7132ec5578968ee0607309dd65327d69599a5c5d", + "bytes": 3894, + "sha256": "7512d2ef931525302161e9662c172403df5b608a374214a4a39b5bd71e014562" + }, + "LongCatImageEditPipeline:edit_image": { + "descriptorSha256": "b9f3dd382864d47e950c38650e6ec31d0e51b2453ed302c04955bfb0340785db", + "bytes": 4778, + "sha256": "288531a30b6f8d0e60a6319b69dfa3fd04d14a8bb078eb4475df09386faef9d4" + }, + "LongCatImagePipeline:text_to_image": { + "descriptorSha256": "8020bb532f9bc0fc6222c2083e81579b3c8dac7c9dd934e8d2534db7b3ae5fe1", + "bytes": 4155, + "sha256": "f2f0a9bdde30f96caf2c200be4ecbae6c3a6eef6c657707a923d13ee2dfaf2c8" + }, + "LTX2ConditionPipeline:image_to_video": { + "descriptorSha256": "be5cdbcbab18a06d596223e1372e27b6891e4ea83c1f6534831cd1281227f83c", + "bytes": 5276, + "sha256": "b0ed053979e8c25e64c79ee7ecf61dc49709624d01d839ce057ebcbeeb5fc92a" + }, + "LTX2ConditionPipeline:reference_to_video": { + "descriptorSha256": "ad1b4d998fc460f0e60c7ab6131bd155c69c96b8f891067f3e28d140961a0cd6", + "bytes": 5304, + "sha256": "23f3c235cdf4c40cc89f14dc425c9c8ce4de2fc44ba07063addd10623eb8343a" + }, + "LTX2ConditionPipeline:text_to_video": { + "descriptorSha256": "29bc54454d95ecf8dbcf8e2c63cc2642f3d22c06b396273d82b962df59d0aa8b", + "bytes": 4725, + "sha256": "35e5cda79116571b17d5465318991896c8b568d961f53b15fc13ee9f9cbc2b32" + }, + "LTX2ConditionPipeline:video_to_video": { + "descriptorSha256": "740a535f4c22c2555805e41afd0775e17982cb4352160cd7a645f40e5b078805", + "bytes": 5452, + "sha256": "bd42a53ad7113cdb0685a5092af95b7e22a8dd3fe37d899d30505c5388fb1187" + }, + "LTX2Pipeline:text_to_video": { + "descriptorSha256": "5e938a68e6a39a2bb071767f7b82ce56c442a44e513d33c414d4952c4621b17d", + "bytes": 4704, + "sha256": "a5e8eb4646ad66a06aab17db27872df48e1ebfc36a13287698f390bb228bbf26" + }, + "LTXI2VLongMultiPromptPipeline:image_to_video": { + "descriptorSha256": "931a643453b17f494211e7a1663a7d1ea65444b8c5e92d7eb6f3c0b46412fafa", + "bytes": 5911, + "sha256": "b400e1aff4867503d189098258113dd692f02b003f4240912d5ea50a650f719d" + }, + "Lumina2Pipeline:text_to_image": { + "descriptorSha256": "68ec9070dfda6f4bcf5990d404e3032b9c9d0add8965753e0a162bfdd67c09f7", + "bytes": 4071, + "sha256": "68fae68c75bf2615c9a76150f0c1a5869f021377de096191021f426948a67d4e" + }, + "LuminaPipeline:text_to_image": { + "descriptorSha256": "cbb5826ba9e44f9608ef88d6c52757cbd040c9bcb611f88e5892a2e93c79c8d3", + "bytes": 4167, + "sha256": "5767302415a0ada7fbef1fd186df344ea7204a2be2b22c2035f07e2b2088d564" + }, + "MochiPipeline:text_to_video": { + "descriptorSha256": "852641887c47d6707131d5cb71780bd5a93bdd5cf8ea32e5c728cafaeb12baa7", + "bytes": 4759, + "sha256": "5cd6acaec354fbff376d802de87d5bce7ac74679790e1449922259c3d29ec8c8" + }, + "NucleusMoEImagePipeline:text_to_image": { + "descriptorSha256": "adc6e23f1c2082c72ea9e0697cc87f4e7da5d8cc01540d06f0d6e08acea81a04", + "bytes": 4121, + "sha256": "9dc242dd86b1a286c5822328a3c0a05dd0f077fdefc17990a5cf086de9e53f3d" + }, + "OmniGenPipeline:edit_image": { + "descriptorSha256": "aba148df3940a0700894f8f934e5d800be77f665b85d6796e4afe027debc5a43", + "bytes": 4481, + "sha256": "07ef8b0fd376687249c23fe457eb5536e40c6b277fa50e013898c60bdcb019f3" + }, + "OmniGenPipeline:multi_image_reference_edit": { + "descriptorSha256": "a460aeafd20c87b39c7464442ed13322da7e80a4dd8c4977db7f2d52d6c141a7", + "bytes": 4539, + "sha256": "6fee91234286325b38d12144267a539173ccd54d3c9ac89283fe3279b5d86405" + }, + "OmniGenPipeline:text_to_image": { + "descriptorSha256": "c78e90591a491385de1f96d89b6aed18dee1367eae36bfcb0b27ee3cecaf8deb", + "bytes": 3854, + "sha256": "4278dc11e860850b1c03d37c253c0d65e9be2bf71ba90c25e974fef1f63a9b4a" + }, + "OvisImagePipeline:text_to_image": { + "descriptorSha256": "37580a349097d0a2e201a6daa48f3cc541c62260306e4153c4995e2d0615a72c", + "bytes": 4103, + "sha256": "fad8cc96b399b48f86738f9ad17cd8b2a468a351725997c5d668fb648480db06" + }, + "PRXPipeline:text_to_image": { + "descriptorSha256": "77d2fb24693cf118ec83aea3c2a53a3c8558b13b78f0bae478458e53896dcabd", + "bytes": 4027, + "sha256": "912dc80ea1fbd712358db93e1b4808850bbe6659ea6adcd3f9c9205d5cf2f188" + }, + "QwenImageControlNetPipeline:control_image": { + "descriptorSha256": "e9d03118cfe3e55fb78b42dec749d367bf72d6676aae59e70fd1b3be19ade4c0", + "bytes": 5155, + "sha256": "53558f2a325dab64cfe573ea363e3d0fd8c74a1aeae8b1019dc7112f7aaa8464" + }, + "QwenImageEditPipeline:edit_image": { + "descriptorSha256": "f3bf7c16a7aa0008f3cad3df96ff4293889439815a27d7a01dff1b4796ba171a", + "bytes": 4511, + "sha256": "7165d2e08668e02af04f75a7a988a0c0fd4a78a70d25cb319bcf55cb6e6ea755" + }, + "QwenImageEditPlusPipeline:edit_image": { + "descriptorSha256": "c701a2eb5a7fe48519e48dffd10ed7bb6b3e25c34353b208224d16d6400c6fcb", + "bytes": 4537, + "sha256": "2128837ba8b8c0a8408375059000d6c81bc6f013d3cbd6d726fba7d5ffb41ae3" + }, + "QwenImageEditPlusPipeline:multi_image_reference_edit": { + "descriptorSha256": "6400d5376ef83a864dd01e7afbcbabc7a33494b2f658f05c17891860f3fecded", + "bytes": 4595, + "sha256": "222cf61fe2637f6e387e7059239d0d97f668fd974aa88ed307ef0a09ab5be4da" + }, + "QwenImageLayeredPipeline:layer_decomposition": { + "descriptorSha256": "826d487fed6b6f0ae2679d2eb842ad65208a9b5929b66722ad1d8e1c0242079e", + "bytes": 4857, + "sha256": "49728a179b50f3b708d1baacdaa3863a1e9c6c3ef281e4a4d9efdc0a3fffd44d" + }, + "QwenImageModularPipeline:edit_image": { + "descriptorSha256": "47e7d688d1f45209de2600fe1f87a5c6d683a55e4b5acb113cc26d1087df31d5", + "bytes": 4752, + "sha256": "7b2786f5f3411d136c0611d7bb816c5b9051c8ad7bcb391cc2cd700c107d58bf" + }, + "QwenImageModularPipeline:inpaint": { + "descriptorSha256": "060b1b3de7cb4a05fe61363c8e6ae58cddddad647f8299a85feb6d8759bf5fb8", + "bytes": 5207, + "sha256": "b785c5afe4d18ce772e72843ca8ab7690d9bc14453b13b6a0be3d882482475b7" + }, + "SanaImageToVideoPipeline:image_to_video": { + "descriptorSha256": "2aaa21269bbdb611ed68b550a13409221aa56b7d888f379919dc29e147edd0e0", + "bytes": 5330, + "sha256": "79ea7d4bb500b4c112f7d26ee2789628b1a7572c9342f6a392cd02988a8ab94a" + }, + "SanaPAGPipeline:text_to_image": { + "descriptorSha256": "2e80e952039cfbc7b42f7f1b5689f30fb8b8f83646e0f4c2f6cb8e3a68b8d784", + "bytes": 4223, + "sha256": "fcfb1ff59de112a555b88307312610465acd2e9ce5bfdd6f66c6eecc544745e1" + }, + "SanaPipeline:text_to_image": { + "descriptorSha256": "8b9112a10ce799d31f77d03e5f3d757d2510a7019f6bdc9e88d3de208f2bfa72", + "bytes": 4107, + "sha256": "cde74a47d58aa76951872729bedd01dcdc996dc4fd2130adab403fe8fa670835" + }, + "SanaSprintPipeline:text_to_image": { + "descriptorSha256": "e6693f3cb5cc81bbac653e0f89c15e2871fdbb67ad37c4f3c63514bbf4e0aa43", + "bytes": 4134, + "sha256": "6c40aefc3fd65ed6bf87626873bb0377e7fba8ff4fbdbc5c0d3e4e0e3531968a" + }, + "SanaVideoPipeline:text_to_video": { + "descriptorSha256": "aaea24f57507173bcfce6f0dc24af5af7eb0f0c5da0dbdee1a81b08b17d2fae7", + "bytes": 4822, + "sha256": "bfcb00d1f859d78b6952e5eb8a0b0c064a8697a5381cf289028e61cb4692bcb4" + }, + "SpandrelVideoUpscale:video_upscale": { + "descriptorSha256": "7bfd8efa47be68666198cbec16db4d26b427297f0deeb8299cbcd63b1a1df46c", + "bytes": 3448, + "sha256": "e22a74b87a2de55c55d502fa6c25aa00e1200ddcb7b973c9656d4fbd1c6e129c" + }, + "StableAudioPipeline:text_to_audio": { + "descriptorSha256": "340891873dc3e460a9d58a70896bdd40b032150f595b241169fe90c5c277ffe4", + "bytes": 3970, + "sha256": "069b17420905b8e6ff848d1039a2da730ac273bb47eac6e8a1bd8907ed1622da" + }, + "StableDiffusionPAGPipeline:control_image": { + "descriptorSha256": "9bb9602d6c79fd442b5f197809ed32dd1651524f4f5d730c28e1971c7325fc1d", + "bytes": 5428, + "sha256": "062b9b7343d9a8f8a3ebeb218b7f580295ee991e6ae436114ad3fdbe5305b75f" + }, + "StableDiffusionPAGPipeline:control_inpaint": { + "descriptorSha256": "2a4f209aa2f96d0c76efd48dd8c9656547cbb6609e72d4b90864df1c9ad0f589", + "bytes": 6686, + "sha256": "e4c72cde6ea07b4b6775cdaa7bbb04434554625725be8dc43d42c314c9d9502d" + }, + "StableDiffusionPAGPipeline:edit_image": { + "descriptorSha256": "b4929658c32ef7bad47e50f647abec0e6159c54374a1baea1e05d3f93b66effb", + "bytes": 4590, + "sha256": "4d640d981f4a674d4ca388956a7f89044148f071a8c65e4b280e4ccb0a45f73d" + }, + "StableDiffusionPAGPipeline:inpaint": { + "descriptorSha256": "101e965b702766dd0949054f6189d20ca2895fdd05559626eb270f8e12e65069", + "bytes": 5258, + "sha256": "93cb60c1cc69b6e6632e771f39e01750f60637ba8eeaf3b6c710cde3384ab522" + }, + "StableDiffusionPAGPipeline:text_to_image": { + "descriptorSha256": "ad23b58153c3301fd0125a0a66e9e110a61a16e0c8833563cd3ca51109fe5056", + "bytes": 4433, + "sha256": "419397857a211d1ba3812d32cc47678a00883b5d70114a80079d8415176d09ed" + }, + "StableDiffusionPipeline:control_edit_image": { + "descriptorSha256": "a5828d189ae4e195b01c88ccc1b9d65af720dcf823b64b4509e228a53edabd29", + "bytes": 5924, + "sha256": "ce56546562622c8758fcb1932bb15495587df7ae3394357fac8e51cc698dc6c4" + }, + "StableDiffusionPipeline:control_image": { + "descriptorSha256": "4947a5a7b0a87481e1795185f91486717d6950c0f0f3ae79fc979c46c55ad443", + "bytes": 5181, + "sha256": "955cd49c1120a171b81a6445b75af50e0b180ff2e962053eaf556d28b5942b06" + }, + "StableDiffusionPipeline:control_inpaint": { + "descriptorSha256": "f46add4e31c93701f24c78093985cdbeac9aa043e94ab595d5314591f00b56b1", + "bytes": 6425, + "sha256": "25a36322d131f1f75d802a1ed917437efd9a27f89d95ac9239dcb9791f30b421" + }, + "StableDiffusionPipeline:edit_image": { + "descriptorSha256": "ce72fd7e5d5f263f68f94ae15778a596a3161c38c0f4092531f0c719b78667d8", + "bytes": 4799, + "sha256": "24e9ff077725308d4e2c6b8be3bfa3cb7d01c17c70ad023aee9d69b8299da02e" + }, + "StableDiffusionPipeline:inpaint": { + "descriptorSha256": "74c30496f6c07b0eceae986254a425b0b919b5e5d91fc668839d31a59783a4a6", + "bytes": 5254, + "sha256": "3e87dce95449f7eb25d1f271c7ba8748f05e82cf151a768e058a804c9a8789ee" + }, + "StableDiffusionPipeline:text_to_image": { + "descriptorSha256": "235118ee94df6adef140079116b17158e2922bf861a5f6d7d23f4f3f988d3927", + "bytes": 4194, + "sha256": "642ccf45dd15946ead72c9666b394a9932d92d0dca64f13dfae0284edc55b9c5" + }, + "StableDiffusionXLAdapterPipeline:control_image": { + "descriptorSha256": "5a911626f9d33032fb2dcdc80cede5ffad9506abc0fb0077dc4ba39947b33a36", + "bytes": 5234, + "sha256": "1a82490dad0b9ed6b3867c70d1640e80d30f8bd8958545c0fa014a6d500961d0" + }, + "StableDiffusionXLControlNetPipeline:control_edit_image": { + "descriptorSha256": "b72a583d7d31a2ba0d5f5cb2ff6b1414f36e4b9c4e41d8d861ce2a586ff843d7", + "bytes": 5984, + "sha256": "da10e07ff8bf72e72341c698acde798b4c9b5f270316db0201631243b31cb46f" + }, + "StableDiffusionXLControlNetPipeline:control_image": { + "descriptorSha256": "f57b41443261612d95d3e80df2d638617f62526970313989ca69e0652bb4c390", + "bytes": 5241, + "sha256": "bb299311c58976cfd79bcf10eadc42f676d3dcf696eec4e7f42e46086e7b1720" + }, + "StableDiffusionXLControlNetPipeline:control_inpaint": { + "descriptorSha256": "ccf8f19d4018fd24d47fa5001209e36f9cec3a36a56e539f87759a99a7ac5fab", + "bytes": 6485, + "sha256": "b35a7bc3ceb494992fbad720db28faa4b242a34d109fd4b6c635cf127aca21c3" + }, + "StableDiffusionXLInstructPix2PixPipeline:edit_image": { + "descriptorSha256": "4655ea8f1f9b86921f07658644599ebe08034ffbe93e081eb19fd08faa214b61", + "bytes": 4878, + "sha256": "9ac80428595d712acd5eff6fac00c4958f5901ce54d067857616736e8cee29bd" + }, + "StableDiffusionXLPAGPipeline:control_edit_image": { + "descriptorSha256": "3dfdce82491a893be86fe27d00f8a1b9e5a6e3caddb5d3fa7a688b376106fded", + "additionalDescriptorHashes": ["ca8b4653b881e21712a8a48c7a59d51ae34877fc535ad61616163069261e43a8"], + "bytes": 6184, + "sha256": "531a76345f5cefc31fe98d33ab73f8cef73a6a7f6f76e48309bc26399b4bcb39" + }, + "StableDiffusionXLPAGPipeline:control_image": { + "descriptorSha256": "038d2fc8fa5c8079d7d7abed56804816e29ac8032e5a7cdff2c62036060e9349", + "bytes": 5433, + "sha256": "17caaef1e18c850a32489b11a4eeae8e1b3ae349e7b037423a6e54aa7820a055" + }, + "StableDiffusionXLPAGPipeline:edit_image": { + "descriptorSha256": "8c57f2453fb72d6ae859a5e52f62c6086cce0a0902f7bff28d5687b52ab87a63", + "bytes": 5044, + "sha256": "9db3b94745c7ac84022791a39ad82795eade214bbf8bff0b08845e61f31a27a8" + }, + "StableDiffusionXLPAGPipeline:inpaint": { + "descriptorSha256": "9380533f675c9491fe99d896740d7366ab9471ea617ab743d8af35af722f321c", + "bytes": 5505, + "sha256": "7d993051fdcce55a01b3a78cec68adcf170e8080831f0a058826b172417302e4" + }, + "StableDiffusionXLPAGPipeline:text_to_image": { + "descriptorSha256": "e5bcc2b64bfddcadc334c20f0c125fdcae68760cde1ff60ec10d1a22ce81a997", + "bytes": 4412, + "sha256": "2b526a0dec7fbee4a8553727a4c001e269b524551ad5169ea4928f8b4a76b633" + }, + "StableDiffusionXLPipeline:edit_image": { + "descriptorSha256": "511a0b135e417c10f9a3e9e04b6b35b5aa391ab3b084ec3df25fc66bf6d8d6e3", + "bytes": 4804, + "sha256": "0d63feb236cf755551373fac91985e2b9b75e394ee10998bda88d70a7bea6d62" + }, + "StableDiffusionXLPipeline:inpaint": { + "descriptorSha256": "04773f9c39ab30246fca3f87394f504a61772ccfa97630d4b46d1a9530450ee2", + "bytes": 5259, + "sha256": "1102d4d59e00388022892406c5cca60c33a7f22f21420f6e0e64c8dfba04b0d0" + }, + "StableDiffusionXLPipeline:text_to_image": { + "descriptorSha256": "944ff90f533867016d514d9cdd7a35648e711359c55f2ae06fc3bac8e88b63e8", + "bytes": 4267, + "sha256": "07305066b2f96232db5f26d62e1d9fbf9f3a21d84f97328208a7e066798234a1" + }, + "StableDiffusionXLTurboPipeline:text_to_image": { + "descriptorSha256": "c530e10728c8c3871c1f6d6e58589996b8e926729d7c57e43fa36d020660e3dd", + "bytes": 4169, + "sha256": "b5dfc591a73c4d04d8f540c4617c0f7820a4d8553a31ef9dd030837fb72325b2" + }, + "StableVideoDiffusionPipeline:image_to_video": { + "descriptorSha256": "cb576416b62900e99ebee9d9d302c3691028f424466b91cbe80fe1ca335585b3", + "bytes": 5383, + "sha256": "a6034be89c24cbe5574f3ffb3b2c287e2dea557d16e069150e1854a4c2bd811e" + }, + "Wan22Pipeline:text_to_video": { + "descriptorSha256": "05008ca915711e27396ac9216f34931f91c5444efa2751e9fb4a26c2761a89c2", + "bytes": 4827, + "sha256": "bd8a43e99fcf4ea3fdebbdd52f0e6fc7c7775ec4b6d0f1707de1be3a354bb79a" + }, + "WanAnimatePipeline:character_animate": { + "descriptorSha256": "e40425560eca0a78b964f7eedc9fa5256f93d728be913e8245c0302bd201faf2", + "bytes": 6575, + "sha256": "fa60f39673d826bbf28dc4676f464245386627c1cd115742d5547a7aae413d3c" + }, + "WanAnimatePipeline:character_replace": { + "descriptorSha256": "3201ab9ec6ce7873a6bb2e48e50bf83956edb4169ff0b2dfa2ba4667a85153c2", + "bytes": 7348, + "sha256": "b2c1690cdde91111627becb49ad8e32513b644ce13c3188b1906b122266502eb" + }, + "WanImage2VideoModularPipeline:image_to_video": { + "descriptorSha256": "63d626c3c97cd12016b58a9fba71739eeea0459ad300383d5b4f43aa0775740a", + "bytes": 5726, + "sha256": "37898b78c1e8df5ab9940aa2dbe7e467cd16e582c10e2156eca29ad967b6c8ba" + }, + "WanImageToVideoPipeline:image_to_video": { + "descriptorSha256": "ad4a68c5d4cd18b02cbcf57d5eb84a8e6ca48512c8b2405cf0e658942c260de2", + "bytes": 5369, + "sha256": "62b454db54899d8cd87d1a7248731bc0ec14cd937812aac4f902cf6807a0c729" + }, + "WanTI2VPipeline:text_to_video": { + "descriptorSha256": "150e3aea2961acbed6a5fc0ffd8625a0284d64f66c545169b645fdc44927928f", + "bytes": 5943, + "sha256": "39ead775c6c04345908e8aed758ebf2ec1f1266e1e009d8f5c321208c7975d1d" + }, + "WanVACEPipeline:text_to_video": { + "descriptorSha256": "111a1e8352784824dc9d3cb094113e0547b19cd50416b072cff31356c95a0124", + "bytes": 4991, + "sha256": "c91ec7e55964e72702d69979edf84e8714c8e5acb3adda5a6c6bccfce14db5db" + }, + "WanVACEPipeline:video_inpaint": { + "descriptorSha256": "d5451bccf12b116e53dfb6bb685d4e5cc82d5f949eee3a7feb55bd70921d2f7d", + "bytes": 6144, + "sha256": "6a007c214d778f210e7e097a36c8afd1de585716920c3136a74bef37dfb4ea37" + }, + "ZImageInpaintPipeline:inpaint": { + "descriptorSha256": "00f04c60e1fc37087db0c90144a1b5c27b1e211e88b1ef8ec567c0ff3eb9853c", + "bytes": 5066, + "sha256": "0637d67544f3501de6660270734be105179bb7f478bce1df689419f4c493d40e" + }, + "ZImageInpaintPipeline:outpaint": { + "descriptorSha256": "ba2d0fcc7d6327ad5b24538e4a07c69ef92a5bebd5534f143d5637194a328e1c", + "bytes": 5489, + "sha256": "6db62cbef82c733667d7c91eaabbcda257fc5e141bf8fb5caff3ad96af3c1865" + }, + "ZImageModularPipeline:edit_image": { + "descriptorSha256": "449bc094096e644f4070a681e382650d133c0854ec6770cfbb736f0299e04179", + "bytes": 4729, + "sha256": "e523fa1d31a2bb0c2ccbd2525ac0cce68fe57adc77332446239ddf62683f8a05" + }, + "FluxCannyPipeline:control_edit_image": { + "descriptorSha256": "724ce269610cdd5125ec9134578e90efa01e8a5983e40f24c6430d75c482a33f", + "bytes": 5192, + "sha256": "ca4e16701f620f3df1f5e90fe875186805cdbb18ec37cdc79d6308e77b9f56c3", + "additionalDescriptorHashes": ["415d44064aa7a39efc8210929310318c19ec426af27d9d79355f10152528c65f"] + }, + "FluxDepthPipeline:control_edit_image": { + "descriptorSha256": "0058748cdd192a232fed65515497b9f245d45b3da79f7eeae3edb3ffd040e1d4", + "bytes": 5192, + "sha256": "f4d0c17bb30cd6be44f18dc6edbd80f72f52000702e9093aff3178fe2f7b1efa", + "additionalDescriptorHashes": ["bf9721153bcecfc373e34c532462a705e21dda2fd89fbc1c168fa910d1c558e7"] + }, + "PixArtSigmaPipeline:text_to_image": { + "descriptorSha256": "9076f16b4370211173012a13026466ed57e9b82f92a720e5a337391ec71dbe63", + "bytes": 4120, + "sha256": "025a0e44cd231f3579a4173439d642355212ee7fd4415540039b6c8aae5246e4" + }, + "PixArtSigmaPAGPipeline:text_to_image": { + "descriptorSha256": "54cc8c6e36ad415979c524badb765ea92ef6d2e3de0cbee165f1d77d0fad26c4", + "bytes": 4264, + "sha256": "d2182c0c8c32de1c79574440e4b2bd3c06ed5e65d44e25577e84abe66d1bb151" + }, + "DDPMPipeline:unconditional_image": { + "descriptorSha256": "61f703fb3a33e10d66c0d7b365b2960bcef3adebef89ed32e25da14310758c62", + "bytes": 3420, + "sha256": "617f8c40fd0786d79297a9d2820959c7cf4c52de7e7bb751dbcfaf32b17ddf08" + }, + "ConsistencyModelPipeline:unconditional_image": { + "descriptorSha256": "334fff51739318953bc9c5b7c98530c929b8765592f800d1ec9f4453744e9495", + "bytes": 3531, + "sha256": "6ac7b11519a0b10ab0aed6a6562a888354c2716e130f1039cf6ce37ef91bb16d" + }, + "ShapEPipeline:text_to_3d": { + "descriptorSha256": "c5790dffe67ccbdf93d3d073d3b1018770c296cba10d9b9b99902c56a79b2620", + "bytes": 3547, + "sha256": "34a1878e576eace6526160ed7842f15ef269b51189cd407c6a58353efd69454b" + } +} diff --git a/config/retained-gallery-batch-recipe-locks.v1.json b/config/retained-gallery-batch-recipe-locks.v1.json new file mode 100644 index 00000000..783823d4 --- /dev/null +++ b/config/retained-gallery-batch-recipe-locks.v1.json @@ -0,0 +1,1740 @@ +{ + "alpine_lake_in_oils": { + "workflowId": "StableDiffusionPipeline:edit_image", + "sourceTaskTemplateId": "task-template:sd15-base:edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:e5a47286938233b67cc7bec938b43449fdbf4dd46a028f200cce4471158267e2", + "originalReceiptSha256": "ce72fd7e5d5f263f68f94ae15778a596a3161c38c0f4092531f0c719b78667d8", + "reviewedTemplateSha256": "81ebe61010abc66045694e149989c24310c3a181d46fab2b644ac0a0bafffcae", + "reviewedCatalogLock": { + "templateLockHash": "tpl_8c19d0a7", + "galleryTemplateLockHash": "tpl_0816c26c", + "promptSettingsHash": "ps_9f1fefe2" + }, + "promptSha256": "8aeb1e7983a533609ac97ac6366f042be91fc806047b8e0cfe251abef9accaf1", + "inputSha256": "88290a96bc8d52f11f2d1e3c0c0e04c2027661816e54b57d7d4739d731ca1e75", + "inputLocatorSha256": "b7e9b68e47a60f438c82f778b960f66d58d319de50749d453a9aa0c30c4df45a" + }, + "bookshop_at_blue_hour": { + "workflowId": "ErnieImagePipeline:text_to_image", + "sourceTaskTemplateId": "task-template:ernie-image-turbo:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:f12eab7de9d1be025dee6d2466013865b35a67d145813a1faf68c1e4d0ff034c", + "originalReceiptSha256": "45f9a07cbd540055ad63000eb928be4a1b685c4b622bf46b84c98784e2c61139", + "reviewedTemplateSha256": "160e77d5c28132522b0cbf5f3102b812a4e8be9eff09f321db0c5853905cab5e", + "reviewedCatalogLock": { + "templateLockHash": "tpl_502a4ae7", + "galleryTemplateLockHash": "tpl_14707aaf", + "promptSettingsHash": "ps_cf9a00e5" + }, + "promptSha256": "767ac6934d73853bdb2b07521107727f936eec375361a0eba6dd64dfc5a1b63d" + }, + "flowers_after_rain": { + "workflowId": "OvisImagePipeline:text_to_image", + "sourceTaskTemplateId": "task-template:ovis-image-7b:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:12380dcafddc7153ecd5f02ced0b95c58031228dc7825e3914f22dae90489999", + "originalReceiptSha256": "37580a349097d0a2e201a6daa48f3cc541c62260306e4153c4995e2d0615a72c", + "reviewedTemplateSha256": "a113786c4f56e30b9f8c024d9e71abd7e84419b59bafe097bee8cd40b7074687", + "reviewedCatalogLock": { + "templateLockHash": "tpl_3f0f58ac", + "galleryTemplateLockHash": "tpl_3ba52cb2", + "promptSettingsHash": "ps_1e317563" + }, + "promptSha256": "0250d3ccd73f7db3eabae81abe1590befc673f4bc9e68506c134c84a6a3ff1a8" + }, + "forest_ferns": { + "workflowId": "GlmImagePipeline:text_to_image", + "sourceTaskTemplateId": "task-template:glm-image:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:ff052e8de129d2eef0f849f457336a1dfce83bd0b7443e1dc5802d0608e0781e", + "originalReceiptSha256": "193b411fea187862b1af32edf24623f0cfd75a9f0d856a66b07fe99b1e562833", + "reviewedTemplateSha256": "6a6e34ea5e9b0dec925e0ce13a0422fc00c65754f867c44e3105bfdb9d03c305", + "reviewedCatalogLock": { + "templateLockHash": "tpl_8cbb3432", + "galleryTemplateLockHash": "tpl_be9fadb4", + "promptSettingsHash": "ps_975f83ff" + }, + "promptSha256": "e4e5455d0f55ea6ae1f3061bdb8462de4ddffa2a230462a2010ebd3d443b1f50" + }, + "ochre_paper_pavilion": { + "workflowId": "CogView3PlusPipeline:text_to_image", + "sourceTaskTemplateId": "task-template:cogview3-plus-3b:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:063bf00e554a6d90e9fab896c09f23b976d423fc4c82da89c7471ac21a81eb57", + "originalReceiptSha256": "19c1e125e259b8b0e22a5bf5c03ab7c105a8302fc69b7e63c61796d7b7496744", + "reviewedTemplateSha256": "b5e4c8446f01030c05a206290d9ed0c1e5035cd3110f0fb6a9e6e3c416ad5177", + "reviewedCatalogLock": { + "templateLockHash": "tpl_791ad974", + "galleryTemplateLockHash": "tpl_f93a2d5c", + "promptSettingsHash": "ps_f36e5dd5" + }, + "promptSha256": "2483828af4f90e3e8b07e47b32c754c7970b1f30c4e8cfbd0c4a0e66f6b987f3" + }, + "quiet_current": { + "workflowId": "CogView4Pipeline:text_to_image", + "sourceTaskTemplateId": "task-template:cogview4-6b:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:0870e1b5d6c05b496e120e383bc7c13c4fe1705efc5d918466900b9e906288d8", + "originalReceiptSha256": "7cb177ef1dac774f3cb76c3f58cf246fbdbf7673a78e379ff54e7fba5fa1a85f", + "reviewedTemplateSha256": "c3c7aada8d0fc7bec8c4067c9c88fbb03d5210ee9f6412d1d5984b21879ab886", + "reviewedCatalogLock": { + "templateLockHash": "tpl_13cc85b1", + "galleryTemplateLockHash": "tpl_57a6868c", + "promptSettingsHash": "ps_5d56d1da" + }, + "promptSha256": "18d76f8a51049a51ea77cf436170824bf445ae8fa572893ee930ae11924d49d6" + }, + "persimmon_glaze": { + "workflowId": "SanaPAGPipeline:text_to_image", + "sourceTaskTemplateId": "task-template:sana-600m-pag:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:52c3114e98debe02d6e7a297276e67887d782628952ddb20ae88c499d7c6a356", + "originalReceiptSha256": "2e80e952039cfbc7b42f7f1b5689f30fb8b8f83646e0f4c2f6cb8e3a68b8d784", + "reviewedTemplateSha256": "ddf39e419212cba10df50f7b27b3fae22d57a0cbfc574164bcad08975fa2545b", + "reviewedCatalogLock": { + "templateLockHash": "tpl_fc97bb6a", + "galleryTemplateLockHash": "tpl_ef8db2a5", + "promptSettingsHash": "ps_8a0e2f0d" + }, + "promptSha256": "fb940b41391388f6221f47154824aac67e9c0f828de5581e1afd855ce2ec528d" + }, + "porcelain_on_slate_linen": { + "workflowId": "LatentConsistencyModelPipeline:text_to_image", + "sourceTaskTemplateId": "task-template:lcm-dreamshaper-v7:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:a27f2318675f32fa007ed44f64cc42f78c58f05c896bdba16bcf71cec4383ea5", + "originalReceiptSha256": "b23f6c1d6ea11f928eab1c62422e49a288645e6f46ecf0c4f1b4994e95ad56ea", + "reviewedTemplateSha256": "fe33d74a4694ab6b3d34f483d56575c0c66a5948d424a62c04538c0dd608253a", + "reviewedCatalogLock": { + "templateLockHash": "tpl_64460ff2", + "galleryTemplateLockHash": "tpl_5536c9a7", + "promptSettingsHash": "ps_38a31bbe" + }, + "promptSha256": "1ad3ea7692a0f8ae0bbd025e78774b790e4fee6066ddd349390e80bcff3c0fa9" + }, + "salt_marsh_from_above": { + "workflowId": "AuraFlowPipeline:text_to_image", + "sourceTaskTemplateId": "task-template:auraflow-v0.3:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:956816a0ebe49ffead5c8c8759c3db2becf2d5a46196fba7696e978d0d55b15b", + "originalReceiptSha256": "c4ce21c85cf0412cc1e69ff59009037bbdde9d1692cff19f307d589b84fb5b1f", + "reviewedTemplateSha256": "b09d5bf8c1d2efa3ae62881840125aa474500d658ba7538031dedeaeb79d52d4", + "reviewedCatalogLock": { + "templateLockHash": "tpl_b2dab5aa", + "galleryTemplateLockHash": "tpl_a23dcce5", + "promptSettingsHash": "ps_97c53e0a" + }, + "promptSha256": "1689b205b531ff682a01a0cac00b798a7dc1ec291b1cc72f47cafd7c11c188aa" + }, + "cobalt_jug_and_lemons": { + "workflowId": "StableDiffusionPipeline:text_to_image", + "sourceTaskTemplateId": "task-template:sd15-base:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:27fe077b35b48bbd8edc6589655a5ed7a3788139a0a0ab82b14cf3f0ae839b19", + "originalReceiptSha256": "235118ee94df6adef140079116b17158e2922bf861a5f6d7d23f4f3f988d3927", + "reviewedTemplateSha256": "1c4b2351129fdb61f6ea79abfb8c699ff4db82db0c97e1dc92e9eeeb36a34d12", + "reviewedCatalogLock": { + "templateLockHash": "tpl_514a5205", + "galleryTemplateLockHash": "tpl_61d186ae", + "promptSettingsHash": "ps_82f89ed0" + }, + "promptSha256": "516be575fb3191eafa8dd83a38a09c7e85cb36a6484abb71ea32b7080b21c7b8" + }, + "copper_hour_dunes": { + "workflowId": "PRXPipeline:text_to_image", + "sourceTaskTemplateId": "task-template:prx-512-sft:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:3d2853278333f4c6760e366ae0347794b14b3937ac62422b5f84d6effcd10495", + "originalReceiptSha256": "77d2fb24693cf118ec83aea3c2a53a3c8558b13b78f0bae478458e53896dcabd", + "reviewedTemplateSha256": "4a188876a65d35df1c87da93c5fcae162f3bc8b20934a61fe70e4580b5090249", + "reviewedCatalogLock": { + "templateLockHash": "tpl_b747cf95", + "galleryTemplateLockHash": "tpl_3f17401c", + "promptSettingsHash": "ps_6998df3e" + }, + "promptSha256": "04cb0ceff2138f0fe17267a6c1e68698a7ccb1b2e9075641957b6b7dd59ea8f5" + }, + "glasshouse_rain": { + "workflowId": "StableDiffusionXLPipeline:text_to_image", + "sourceTaskTemplateId": "task-template:sdxl-base:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:8cca9a4269d1339b835a8fba2a380913be348c06c3a628b212a3a17ef2377bb1", + "originalReceiptSha256": "944ff90f533867016d514d9cdd7a35648e711359c55f2ae06fc3bac8e88b63e8", + "reviewedTemplateSha256": "4d32a1778d7cad756e05f14f09de559b9b065f3675b2aef6a289c5299cbd2c24", + "reviewedCatalogLock": { + "templateLockHash": "tpl_b24bef60", + "galleryTemplateLockHash": "tpl_a4b61426", + "promptSettingsHash": "ps_fc327a42" + }, + "promptSha256": "eb5d22de03c2688152fd9f6674b018dcb8770f099e44706affd68deda70e65b2" + }, + "pomegranate_on_blue_linen": { + "workflowId": "StableDiffusionPAGPipeline:text_to_image", + "sourceTaskTemplateId": "task-template:sd15-pag:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:f471ecd5a18b997bf9dc6b61a72cf7e98e0988f9309ef3432ec635838f97c409", + "originalReceiptSha256": "ad23b58153c3301fd0125a0a66e9e110a61a16e0c8833563cd3ca51109fe5056", + "reviewedTemplateSha256": "6642ac1831a788b83981383c33b7ce019692d58fd2b23f3bff9d95e3a59ec27b", + "reviewedCatalogLock": { + "templateLockHash": "tpl_98174f0f", + "galleryTemplateLockHash": "tpl_5dba74f8", + "promptSettingsHash": "ps_2f4c6afa" + }, + "promptSha256": "f0657889fb99878c51b1e31b08806daf0714539faf351abf6efcde2a39024db3" + }, + "canal_lantern_in_warm_light": { + "workflowId": "SanaSprintPipeline:text_to_image", + "sourceTaskTemplateId": "task-template:sana-sprint-600m:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:374726f7f4d26de27f216171d570f84ef9365397555d083767b89eacc2415338", + "originalReceiptSha256": "e6693f3cb5cc81bbac653e0f89c15e2871fdbb67ad37c4f3c63514bbf4e0aa43", + "reviewedTemplateSha256": "0724f395ee3219d2cf878ea1ef914692d9808e83236c4d972322e062dd15b380", + "reviewedCatalogLock": { + "templateLockHash": "tpl_193e94c3", + "galleryTemplateLockHash": "tpl_c72697e6", + "promptSettingsHash": "ps_d411e860" + }, + "promptSha256": "315c32ce4bc4c7352d7eaf6bd8598fdfb67fa3479c4b3a9a14beb33e562a2605" + }, + "the_glasshouse_seed_tray": { + "workflowId": "StableDiffusionXLPAGPipeline:text_to_image", + "sourceTaskTemplateId": "task-template:sdxl-pag:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:084cbe824fed25ab44a940b2319aa37299f80d3fc2e06efb5848d701162902d9", + "originalReceiptSha256": "e5bcc2b64bfddcadc334c20f0c125fdcae68760cde1ff60ec10d1a22ce81a997", + "reviewedTemplateSha256": "f30bccf14d658fa6222cec9c7458ec74fec76940dc1dac07ed87e19d93b3738c", + "reviewedCatalogLock": { + "templateLockHash": "tpl_7e4877bb", + "galleryTemplateLockHash": "tpl_9fd062df", + "promptSettingsHash": "ps_c51df98f" + }, + "promptSha256": "635581fcdcd104401ed65f1733f0cd4c7c700f35455f499f509dad161e799cb3" + }, + "quiet_kiln_at_daybreak": { + "workflowId": "NucleusMoEImagePipeline:text_to_image", + "sourceTaskTemplateId": "task-template:nucleus-image:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:ee3d46849aebf382a67208a5f3c2ee4461deb6bfdab6af3506dfbb5abb6dfec1", + "originalReceiptSha256": "adc6e23f1c2082c72ea9e0697cc87f4e7da5d8cc01540d06f0d6e08acea81a04", + "reviewedTemplateSha256": "82918f24aaddf420da3c1213ac69779af2bf962cd2af50b33814f1eefdf14a3b", + "reviewedCatalogLock": { + "templateLockHash": "tpl_4c4f64e3", + "galleryTemplateLockHash": "tpl_c722e490", + "promptSettingsHash": "ps_b971c379" + }, + "promptSha256": "e1a2c655bd0bf0edee77abe9e13b3e9f1fe06114b20e01047491a379d96b6f6f" + }, + "restoring_the_studio_backdrop": { + "workflowId": "StableDiffusionPipeline:inpaint", + "sourceTaskTemplateId": "task-template:sd15-base:inpaint:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:d46308269e83807cfb33229dc47a0720e765872ff093ae7006857bb9fe382051", + "originalReceiptSha256": "74c30496f6c07b0eceae986254a425b0b919b5e5d91fc668839d31a59783a4a6", + "reviewedTemplateSha256": "26d6762e118bc9217762cc4abeec7817586ee58fb80ef09bc3c98e32a2789472", + "reviewedCatalogLock": { + "templateLockHash": "tpl_46535382", + "galleryTemplateLockHash": "tpl_cab1d671", + "promptSettingsHash": "ps_b010f09b" + }, + "promptSha256": "17cd8e35f8e283ec08936955f6848154024d1a15ca2518e5e91c535e18996924", + "inputSha256": "d143c4922ad498b9bd436d06df424bbff50baf023b93735b53ee401e19e4cbf1", + "inputLocatorSha256": "efcb2b3b9ced784bb620763301bb33ea3b2f6ac2561624a4a60c7a735049cfb1", + "maskSha256": "71817f4823a73712c8e76e7d832ec382c29ec0a0bf5a472e09639448c082da01" + }, + "janus_reykjavik_travel_note": { + "workflowId": "HuggingFaceAnyToAnyModel:text_generation", + "sourceTaskTemplateId": "task-template:janus-pro-1b:text-generation:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:eb58163449468a297887a396fb270e73104cbf0a537b7a4c30a17561087d94eb", + "originalReceiptSha256": "5c9d37ae6894cd6aa04a9bfc4a91beaf7e9eb73bef40e2edc144ddce0215b3e7", + "reviewedTemplateSha256": "cd73585863835d186d076de2bc4f37c36c11138376bdd2939af45290ff2c37af", + "reviewedCatalogLock": { + "templateLockHash": "tpl_f85e0e6f", + "galleryTemplateLockHash": "tpl_ffabdfb5", + "promptSettingsHash": "ps_2eede069" + }, + "promptSha256": "ec9c470f211df567cf09face1047675387ac0bd0191e7962f42eaede605b45b7" + }, + "janus_red_triangle_caption": { + "workflowId": "HuggingFaceAnyToAnyModel:image_to_text", + "sourceTaskTemplateId": "task-template:janus-pro-1b:image-to-text:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:92d1160e0d3e06871c8b32b01497360e199c3a0c5bb1e69d68f81a6c651f795f", + "originalReceiptSha256": "13c313cdf72749eea9789f1cef22fa7e1106d1c46cf6d3a0fb0757c00677c45c", + "reviewedTemplateSha256": "44e68d77baa00812c4b9888835013887d523bfe990c11caec96ac426c8ca87b3", + "reviewedCatalogLock": { + "templateLockHash": "tpl_124461a5", + "galleryTemplateLockHash": "tpl_a56db7ab", + "promptSettingsHash": "ps_28ae7860" + }, + "promptSha256": "cd46be79ad59a1ca92ca16e6910d11f0272c0fdadf1688b1cbf05040e08606d2", + "inputSha256": "42d903217dc0d8addf5bb6b4a91c2fd83f6fec7fbbf165d780308b5efcba8c6f", + "inputLocatorSha256": "ce6e7bdfc88e0f8e6c01d9db3078a2990182e21ac8169460c399a757c1f0c294" + }, + "janus_red_enamel_teapot": { + "workflowId": "HuggingFaceAnyToAnyModel:text_to_image", + "sourceTaskTemplateId": "task-template:janus-pro-1b:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:fc935fef4353febb86244c65ae189e7da6bee8ad266dc6ca0d8f88b7497c4eb1", + "originalReceiptSha256": "5820a7260e3f78175f684b39ee2a28c244bfb7cfaed6318c256c642dce306ecd", + "reviewedTemplateSha256": "335f3fbf1907201be05d98148bff1fb7dc68d540750b71f33812769ddfa55879", + "reviewedCatalogLock": { + "templateLockHash": "tpl_26cd8cd7", + "galleryTemplateLockHash": "tpl_ac9c0bc5", + "promptSettingsHash": "ps_4a949eaa" + }, + "promptSha256": "07b559ce738871099c5f9a2f9a5c61fb9ca71a8bfca500c109449f50a46eb456" + }, + "lumina_opal_pendant_in_limestone": { + "workflowId": "LuminaPipeline:text_to_image", + "sourceTaskTemplateId": "task-template:lumina-next:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:029c04a5a3e933bb710937287da6cab94ef80b85a2b57c93e3002a3b6334d62f", + "originalReceiptSha256": "cbb5826ba9e44f9608ef88d6c52757cbd040c9bcb611f88e5892a2e93c79c8d3", + "reviewedTemplateSha256": "4545f92379bc42dd213572033b19a7d37bfd24a3cf8c5eb90fb510c2e2c4c1e7", + "reviewedCatalogLock": { + "templateLockHash": "tpl_9b863ddd", + "galleryTemplateLockHash": "tpl_f24a6ace", + "promptSettingsHash": "ps_a3742a3f" + }, + "promptSha256": "429f531790d0fb684f2bae38fd64c0519e34a091da09ed608b3f69ac0590bb68" + }, + "ddim_cifar10_preview": { + "workflowId": "DDIMPipeline:unconditional_image", + "sourceTaskTemplateId": "task-template:ddim-cifar10:unconditional-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:ef9521d37a186e6b6539068596033f2b921370e3cf3ca8a031f3feaae8716434", + "originalReceiptSha256": "ba8521d8043808cfb8880be8e8f46eadb81e266624aa6fb478c8b0d156bab079", + "reviewedTemplateSha256": "1f41b7d2d7bccb216f46b9ce174a9d4246f0348584e208baeeaa4af92c172c9f", + "reviewedCatalogLock": { + "templateLockHash": "tpl_13b8b56b", + "galleryTemplateLockHash": "tpl_48bbabb3", + "promptSettingsHash": "ps_b456b1ed" + }, + "promptSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "sdxl_clear_cobalt_backdrop": { + "workflowId": "StableDiffusionXLPipeline:inpaint", + "sourceTaskTemplateId": "task-template:sdxl-base:inpaint:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:46f00547faa02a687a12eafda44d9c94802a76505143f4a95124b6bd44eabfda", + "originalReceiptSha256": "04773f9c39ab30246fca3f87394f504a61772ccfa97630d4b46d1a9530450ee2", + "reviewedTemplateSha256": "5ac53251bbc44c8b3eb62ab06fba702e275ebc7340348f36fb20a055d36b3573", + "reviewedCatalogLock": { + "templateLockHash": "tpl_15f3348b", + "galleryTemplateLockHash": "tpl_72c55f1d", + "promptSettingsHash": "ps_fdf2b4ba" + }, + "promptSha256": "159253308aba23cc8f6955da96e48e550533d368ca286ad70b6caa601d1291e4", + "inputSha256": "e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "inputLocatorSha256": "69ba088466bbd714eba0a70d1dc24984230ca1ac74b00ac0ff1bbcb29675799d", + "maskSha256": "1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d" + }, + "sdxl_turbo_orange_caps": { + "workflowId": "StableDiffusionXLTurboPipeline:text_to_image", + "sourceTaskTemplateId": "task-template:sdxl-turbo:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:40e7ee74d823ffc46f9e096c7cba50ec7f825e36627159674e1e621c33bbe0d3", + "originalReceiptSha256": "c530e10728c8c3871c1f6d6e58589996b8e926729d7c57e43fa36d020660e3dd", + "reviewedTemplateSha256": "a8bae14e8dc50c3969cba99c45be96d5ffbbca1fa12824640f5c3360bcc4427c", + "reviewedCatalogLock": { + "templateLockHash": "tpl_117d90f4", + "galleryTemplateLockHash": "tpl_53f34630", + "promptSettingsHash": "ps_4787eff9" + }, + "promptSha256": "370292f42dec86505ba60a4386671fcf130c10ce047b910063ffbbb0a511e0eb" + }, + "whisper_small_an_open_door": { + "workflowId": "HuggingFaceSpeechRecognitionModel:speech_translation", + "sourceTaskTemplateId": "task-template:whisper-tiny:speech-translation:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:69e261c29aa777da002dada801f01091436e8f116780f1ac7271ce23a3da425c", + "originalReceiptSha256": "9d7ed920f22989d90bddc05fb1976b69025132a87799d43d361f14d671539d1c", + "reviewedTemplateSha256": "cfc95f86cf49288a5b851e7e042558b50bcd091f1a69cfabdf961cb204fde1ac", + "reviewedCatalogLock": { + "templateLockHash": "tpl_d016a22c", + "galleryTemplateLockHash": "tpl_169ef95b", + "promptSettingsHash": "ps_c6fb7372" + }, + "inputSha256": "cbf33b144644e786767fec1d5db416d50533d9846f8347e157ac8c3f54f26f11", + "inputLocatorSha256": "49fcd9605ca47c396030ec76144518411fdbfb9a953cf7ca27717017b010b13b" + }, + "smolvlm_red_triangle": { + "workflowId": "HuggingFaceImageTextToTextModel:image_to_text", + "sourceTaskTemplateId": "task-template:smolvlm-256m-instruct:image-to-text:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:619f187da77a6fda72f90354dcb1768036d2f46b8418f51d674ceac1942c31a6", + "originalReceiptSha256": "daf5d3a9cb638e942a8f3f53df6cc86860e874943bc28fa01175ca2d30e56d5d", + "reviewedTemplateSha256": "7c5cc75ca115a437ec6a7ebab59030ef5c5ea14c74735bae5ca78dff427fb0e2", + "reviewedCatalogLock": { + "templateLockHash": "tpl_7d29caa4", + "galleryTemplateLockHash": "tpl_0912c789", + "promptSettingsHash": "ps_b91c5c35" + }, + "promptSha256": "31d08ea568d869e6cf7c0742d85a54617ba38744b60123dfe25f3c81f9e111aa", + "inputSha256": "42d903217dc0d8addf5bb6b4a91c2fd83f6fec7fbbf165d780308b5efcba8c6f", + "inputLocatorSha256": "ce6e7bdfc88e0f8e6c01d9db3078a2990182e21ac8169460c399a757c1f0c294" + }, + "kandinsky3_ginkgo_on_slate": { + "workflowId": "Kandinsky3Pipeline:text_to_image", + "sourceTaskTemplateId": "task-template:kandinsky3:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:2d805bf9c48d49b9e4c2778136f8c528d8ff82a7f7753ba7a99021cc439b5b3c", + "originalReceiptSha256": "41b3b13c0f66711ffa3ac065f7a990bee824fc52db69940b8f75e0f7f79bdd38", + "reviewedTemplateSha256": "5870090e6b4d12c32d72566b6038e9bcc8bf8d063492a28ecbeb65275d77c8e9", + "reviewedCatalogLock": { + "templateLockHash": "tpl_23ed569e", + "galleryTemplateLockHash": "tpl_44580a03", + "promptSettingsHash": "ps_bf341b46" + }, + "promptSha256": "349928bf9ad6755eb4abb5af47199b1152e32323eb855dca5a9dbcfeb3475730" + }, + "chroma_terracotta_and_blue": { + "workflowId": "ChromaPipeline:text_to_image", + "sourceTaskTemplateId": "task-template:chroma1-hd:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:bf170489052eadc150ad0e4149344312741328c5e4e859fb1473be81c3fe63ea", + "originalReceiptSha256": "bad53850d48ffdaffa0896ec019e295c349577ee86d169e1ea1da8752324a215", + "reviewedTemplateSha256": "5221fc5d744cbdcf1aa29d1fa9b27cddc0fcbd75983c24061e6218d41621617d", + "reviewedCatalogLock": { + "templateLockHash": "tpl_db9b22c3", + "galleryTemplateLockHash": "tpl_9dbc94cc", + "promptSettingsHash": "ps_aaaac429" + }, + "promptSha256": "fc24a34ab87b06b7b32949cbe2c78454bad6f08e19f227023d17def472dfbc6a" + }, + "lumina2_larch_on_glacial_pond": { + "workflowId": "Lumina2Pipeline:text_to_image", + "sourceTaskTemplateId": "task-template:lumina2:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:b58ba817732e34d2c40f61f7bb7dbdebf32c6f2a2bbb21dcdbb237004edc4cc3", + "originalReceiptSha256": "68ec9070dfda6f4bcf5990d404e3032b9c9d0add8965753e0a162bfdd67c09f7", + "reviewedTemplateSha256": "c1fecc495b278628b9539fb84079b73b70db420165a7e151def065731920853e", + "reviewedCatalogLock": { + "templateLockHash": "tpl_a75e5588", + "galleryTemplateLockHash": "tpl_0c2048ce", + "promptSettingsHash": "ps_e264186c" + }, + "promptSha256": "5210322404f5ed727bc5dfa782f3da51ed652c32b33f46000ece286969b103bd" + }, + "hunyuan_dit_coastal_lighthouse": { + "workflowId": "HunyuanDiTPipeline:text_to_image", + "sourceTaskTemplateId": "task-template:hunyuan-dit-v1-2-distilled:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:4d26fca7d33aec5e119da74520c47fd96fa41f9de0b92a3afca76505fb5722aa", + "originalReceiptSha256": "9e8d30a1d20d721f8aeab6b9172f7f50403b1e8e855d83af17e6430fe97d9650", + "reviewedTemplateSha256": "59e80838a60338b27351f10a7cc8478dbe1ae81e04d5d7718ee37aa556585788", + "reviewedCatalogLock": { + "templateLockHash": "tpl_9f125174", + "galleryTemplateLockHash": "tpl_ad3b4f77", + "promptSettingsHash": "ps_f38e8fdc" + }, + "promptSha256": "c54d404876a0c92e240aaa5cdd2e2fd448b934d2050e459047d23b82c2a65e7b" + }, + "omnigen_tulips_after_rain": { + "workflowId": "OmniGenPipeline:text_to_image", + "sourceTaskTemplateId": "task-template:omnigen-v1:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:38376f1ad21e5c153fb96860a4e566847ff916716637ffd2061dfae350577c93", + "originalReceiptSha256": "c78e90591a491385de1f96d89b6aed18dee1367eae36bfcb0b27ee3cecaf8deb", + "reviewedTemplateSha256": "e3ceb2dc096775601a6e65b7ab61f5ccc64658d2a69586f3c6a13f2efe1a973c", + "reviewedCatalogLock": { + "templateLockHash": "tpl_39e7a513", + "galleryTemplateLockHash": "tpl_0c5c4bcd", + "promptSettingsHash": "ps_4e4eb7da" + }, + "promptSha256": "a95f8ab9a463c7c571c8667695bb3162234828a00547f8b20db0826612e5a71d" + }, + "hunyuan_pag_burgundy_knight": { + "workflowId": "HunyuanDiTPAGPipeline:text_to_image", + "sourceTaskTemplateId": "task-template:hunyuan-dit-v1-2-distilled-pag:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:9ff7bd0050b5c50405728a76530205fcdc54531b7b017cc66e3b821b52413dcd", + "originalReceiptSha256": "aa6b64f4a942adbb11c83cbaba89940fd03ed7dbf83175e8e1d17d32291454d3", + "reviewedTemplateSha256": "ff4d1b75e172f8fdb8a45199626ed40a07fe634669e03d1591091a10c176edfe", + "reviewedCatalogLock": { + "templateLockHash": "tpl_e2834f89", + "galleryTemplateLockHash": "tpl_00d848b4", + "promptSettingsHash": "ps_60e8ca60" + }, + "promptSha256": "1a5dd12ea5c33b33c8e1a2621a4c6543a2d2a8f2ac82fe458eaecc7d9b4d71c0" + }, + "chroma_restored_cobalt_backdrop": { + "workflowId": "ChromaInpaintPipeline:inpaint", + "sourceTaskTemplateId": "task-template:chroma1-hd-inpaint:inpaint:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:d3bfd6322b7b1bd0f34b9faa9f444ebefae32fc43c368d37169f6ebfbc6c53cf", + "originalReceiptSha256": "a85451bc142a3f5ef44cc5e8cdb1fcc0f000872241efe5bda751638d36215919", + "reviewedTemplateSha256": "d3c99f24317aaf93b0f25f2681bdc56f456d69554e47a522c0c04487602149f2", + "reviewedCatalogLock": { + "templateLockHash": "tpl_0ca22a3e", + "galleryTemplateLockHash": "tpl_8c282bf7", + "promptSettingsHash": "ps_747e9429" + }, + "promptSha256": "cdcd113dd8102aba0f1838ecc02a170532e8b79ab574afc47d30bbdf7aa95d4d", + "inputSha256": "e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "inputLocatorSha256": "69ba088466bbd714eba0a70d1dc24984230ca1ac74b00ac0ff1bbcb29675799d", + "maskSha256": "1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d" + }, + "sdxl_pix2pix_pale_amber_glass": { + "workflowId": "StableDiffusionXLInstructPix2PixPipeline:edit_image", + "sourceTaskTemplateId": "task-template:sdxl-instruct-pix2pix:edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:be363defe20343a8ad3dda9b464344a590c931b6908d5f2eb8ee4d1ba4974f95", + "originalReceiptSha256": "4655ea8f1f9b86921f07658644599ebe08034ffbe93e081eb19fd08faa214b61", + "reviewedTemplateSha256": "897fb59d568ceba3ef8d85cf1141f79002522b111dbc6ffa67ad51a9acf88495", + "reviewedCatalogLock": { + "templateLockHash": "tpl_e055e288", + "galleryTemplateLockHash": "tpl_5a852750", + "promptSettingsHash": "ps_de1bb4fa" + }, + "promptSha256": "609bfd6392cbca4e4c80a5835e0f013349d84c017387ff69445c9168939b4b1b", + "inputSha256": "ebaca95f96d1573e4292ffc65c78eb0dcf8ff9cc8b5a7e11ec81face61b160fb", + "inputLocatorSha256": "349b8845e5d606d1439af02fa63b2edc09c504d15bf71f58954791ed6d983232" + }, + "sd15_pag_mountain_lake_watercolor": { + "workflowId": "StableDiffusionPAGPipeline:edit_image", + "sourceTaskTemplateId": "task-template:sd15-pag:edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:48cd547df20763361808da8567bee1e81d2f5656cf700b06ca1d7032e05c9a12", + "originalReceiptSha256": "b4929658c32ef7bad47e50f647abec0e6159c54374a1baea1e05d3f93b66effb", + "reviewedTemplateSha256": "6de709bbcfb3ed6e061541584be28f5b7ed05e1170dcdaa69e2deb4fee822154", + "reviewedCatalogLock": { + "templateLockHash": "tpl_de24cda0", + "galleryTemplateLockHash": "tpl_055d66e3", + "promptSettingsHash": "ps_70c72f9b" + }, + "promptSha256": "d05178536094430b2076eb9bbbc38b76f6590185f85ee128b9aad0c910e214d3", + "inputSha256": "88290a96bc8d52f11f2d1e3c0c0e04c2027661816e54b57d7d4739d731ca1e75", + "inputLocatorSha256": "b7e9b68e47a60f438c82f778b960f66d58d319de50749d453a9aa0c30c4df45a" + }, + "sd15_pag_cobalt_studio_repair": { + "workflowId": "StableDiffusionPAGPipeline:inpaint", + "sourceTaskTemplateId": "task-template:sd15-pag:inpaint:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:0236cd78852886d49d629776dae568ae589c27dfc4f499868ba2f40d4fd4867c", + "originalReceiptSha256": "101e965b702766dd0949054f6189d20ca2895fdd05559626eb270f8e12e65069", + "reviewedTemplateSha256": "8373d87ab42e130142a163e3c60733f3f2511b7a77ffad1d9129607bcfba2562", + "reviewedCatalogLock": { + "templateLockHash": "tpl_ab9c14d4", + "galleryTemplateLockHash": "tpl_7552fcab", + "promptSettingsHash": "ps_fbb3534b" + }, + "promptSha256": "92548914e5a66fd80ffeeeae3ee1c86bfd46bd9a53d17bd73f35c0f651615ad3", + "inputSha256": "d143c4922ad498b9bd436d06df424bbff50baf023b93735b53ee401e19e4cbf1", + "inputLocatorSha256": "efcb2b3b9ced784bb620763301bb33ea3b2f6ac2561624a4a60c7a735049cfb1", + "maskSha256": "71817f4823a73712c8e76e7d832ec382c29ec0a0bf5a472e09639448c082da01" + }, + "zimage_golden_amber_glass": { + "workflowId": "ZImageModularPipeline:edit_image", + "sourceTaskTemplateId": "task-template:z-image:edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:09397eba135ea69f8c88d29c6eb65297ece35dc10e039c9c5573165503f8488f", + "originalReceiptSha256": "449bc094096e644f4070a681e382650d133c0854ec6770cfbb736f0299e04179", + "reviewedTemplateSha256": "303a0b1b64a2e1234aeca85941a07eea2157707c8436442a5cf00aedd68c6d97", + "reviewedCatalogLock": { + "templateLockHash": "tpl_50ad3c10", + "galleryTemplateLockHash": "tpl_279a009e", + "promptSettingsHash": "ps_41cfc342" + }, + "promptSha256": "cc55ff0b6d87c11924010d873152025e9ddb936b56140d2f23d291696a65f7ea", + "inputSha256": "ebaca95f96d1573e4292ffc65c78eb0dcf8ff9cc8b5a7e11ec81face61b160fb", + "inputLocatorSha256": "349b8845e5d606d1439af02fa63b2edc09c504d15bf71f58954791ed6d983232" + }, + "sdxl_control_inpaint_warm_plaster": { + "workflowId": "StableDiffusionXLControlNetPipeline:control_inpaint", + "sourceTaskTemplateId": "task-template:sdxl-controlnet-canny:control-inpaint:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:188e60e1e4b295563d9e227a6a5f4b6e856781519579dbe9bc830d6ded6b0807", + "originalReceiptSha256": "ccf8f19d4018fd24d47fa5001209e36f9cec3a36a56e539f87759a99a7ac5fab", + "reviewedTemplateSha256": "7d840698c480d52e5a864d50fcdbe6528680a9d0453e5dc501d76ac89c0991ef", + "reviewedCatalogLock": { + "templateLockHash": "tpl_0ee86d25", + "galleryTemplateLockHash": "tpl_ad048189", + "promptSettingsHash": "ps_a9571e3b" + }, + "promptSha256": "b12a7fc59f32e9bbc795791ac45875649f91220fa32b3f3b74953e5ccc92d30d", + "inputSha256": "e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "inputLocatorSha256": "69ba088466bbd714eba0a70d1dc24984230ca1ac74b00ac0ff1bbcb29675799d", + "maskSha256": "1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d", + "guideSha256": "0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a" + }, + "sd15_canny_guided_green_glass": { + "workflowId": "StableDiffusionPipeline:control_image", + "sourceTaskTemplateId": "task-template:sd15-controlnet-canny:control-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:b0e98f0bb1e20a8d46f1ac67a426e6b0a55fcd817c51b6f60a79d97ab92d6514", + "originalReceiptSha256": "4947a5a7b0a87481e1795185f91486717d6950c0f0f3ae79fc979c46c55ad443", + "reviewedTemplateSha256": "783d03619e47df52cf8b17262e42d07bdaacf9165314c26bce9dc3fc9478e55d", + "reviewedCatalogLock": { + "templateLockHash": "tpl_f24bec27", + "galleryTemplateLockHash": "tpl_1ec33e6c", + "promptSettingsHash": "ps_2fb986e2" + }, + "promptSha256": "26d98191ed235643dc50604bcc3065c35b47e26601b929c86bd3383cab884e69", + "inputSha256": "6d47a2f07006b98f9e5cfc8ee925914c4dbfa39fd38b0b61770be56d12ed04e8", + "inputLocatorSha256": "36f9c290c26da075d212f483d4abbc2aba1520b60c5d135f823768f4966c286c" + }, + "hunyuan_dit_green_glass_study": { + "workflowId": "HunyuanDiTControlNetPipeline:control_image", + "sourceTaskTemplateId": "task-template:hunyuan-dit-v1-2-controlnet-canny:control-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:20f676957f2cca0389d876c1b462e6b947e7d366154f125dd19c262027b9cbbb", + "originalReceiptSha256": "88ca5ccb6b4500e438bd84d42321a2cb61d0f7322e5c3bdaa8343735b8f08648", + "reviewedTemplateSha256": "a132dd6cd433bd0595f962173926edd930ea38cbf44d175d5499234f600d21f2", + "reviewedCatalogLock": { + "templateLockHash": "tpl_ce472b92", + "galleryTemplateLockHash": "tpl_ad56a37f", + "promptSettingsHash": "ps_6990e9b6" + }, + "promptSha256": "15c242632d932ffb74e7c107f2610ce42d94aa7480ee711aa26ef66ff4610dc0", + "inputSha256": "6bd07628a37c087178e9de58a98c6c5879468163f1a2376a581511a42503e2e2", + "inputLocatorSha256": "59660f6454720ae76fa64a1baf2fad2e551e349070cea802c6614fc9864c86dc" + }, + "qwen_control_winter_cabin_blue_hour": { + "workflowId": "QwenImageControlNetPipeline:control_image", + "sourceTaskTemplateId": "task-template:qwen-image-controlnet-direct:control-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:9f21216fd545a1b8d30b5bec044f217749bedecfc1f7377237b944abf9a7bb7d", + "originalReceiptSha256": "e9d03118cfe3e55fb78b42dec749d367bf72d6676aae59e70fd1b3be19ade4c0", + "reviewedTemplateSha256": "eb65cb98a365c056f3a2a7bd5d44515bb16f518f7ec00797a496fe90a25ce07d", + "reviewedCatalogLock": { + "templateLockHash": "tpl_301009d7", + "galleryTemplateLockHash": "tpl_c38a2571", + "promptSettingsHash": "ps_508a465e" + }, + "promptSha256": "5728c894889366a9648c6b78109b8ebaa608fdd22f0bb7a470849b7353a9bcc6", + "inputSha256": "ca250462efc77625134ebe305b2ee67281a1dcf8919e45299c648f0fdacf919a", + "inputLocatorSha256": "5c41a25a1747974eb20ae701984d2e13c2979cd0069944f7ef21429677d4c046" + }, + "sd15_pag_canny_guided_glass": { + "workflowId": "StableDiffusionPAGPipeline:control_image", + "sourceTaskTemplateId": "task-template:sd15-pag-controlnet-canny:control-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:cc03628ea649924bfeca24fd9e93c8aa47c28b4805a0b308fb4adeb9fbb5c0b2", + "originalReceiptSha256": "9bb9602d6c79fd442b5f197809ed32dd1651524f4f5d730c28e1971c7325fc1d", + "reviewedTemplateSha256": "23fc8dfe4150096c38d946116a9839a314a7581d52c9397e9d8e1ad42716624c", + "reviewedCatalogLock": { + "templateLockHash": "tpl_0a0b30c1", + "galleryTemplateLockHash": "tpl_dff4bb5e", + "promptSettingsHash": "ps_d149242b" + }, + "promptSha256": "3195f7028bc2fc48271a962d96f24cfd11cd9d8dc44032a2163ea62a511f8140", + "inputSha256": "6d47a2f07006b98f9e5cfc8ee925914c4dbfa39fd38b0b61770be56d12ed04e8", + "inputLocatorSha256": "36f9c290c26da075d212f483d4abbc2aba1520b60c5d135f823768f4966c286c" + }, + "sdxl_controlnet_glass_study_on_slate": { + "workflowId": "StableDiffusionXLControlNetPipeline:control_image", + "sourceTaskTemplateId": "task-template:sdxl-controlnet-canny:control-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:cd4d26987f6eb195f91493d431e659db42ef4a531b29e26d7eedb08799769c16", + "originalReceiptSha256": "f57b41443261612d95d3e80df2d638617f62526970313989ca69e0652bb4c390", + "reviewedTemplateSha256": "3075b68d97eea65616a9a8fe2519154041e24ced2cd916b395c4849d26c31b71", + "reviewedCatalogLock": { + "templateLockHash": "tpl_380083cc", + "galleryTemplateLockHash": "tpl_45e1f06a", + "promptSettingsHash": "ps_e42996a8" + }, + "promptSha256": "d20a107a17c31f20a4e9d409be51c0e55ca8e58747bb5dfbd6169500a4da21d6", + "inputSha256": "6bd07628a37c087178e9de58a98c6c5879468163f1a2376a581511a42503e2e2", + "inputLocatorSha256": "59660f6454720ae76fa64a1baf2fad2e551e349070cea802c6614fc9864c86dc" + }, + "sdxl_canny_adapter_glass_study": { + "workflowId": "StableDiffusionXLAdapterPipeline:control_image", + "sourceTaskTemplateId": "task-template:sdxl-t2i-adapter-canny:control-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:9012c51eebe966a595a2fc5b93f9645e23a2fd6cc194e28ae0218f87b2495565", + "originalReceiptSha256": "5a911626f9d33032fb2dcdc80cede5ffad9506abc0fb0077dc4ba39947b33a36", + "reviewedTemplateSha256": "eef6570d0a2241aa0a9ff68b200c59591fc6497f43885fba151138ae56517968", + "reviewedCatalogLock": { + "templateLockHash": "tpl_76024be8", + "galleryTemplateLockHash": "tpl_768c7bb4", + "promptSettingsHash": "ps_63d6342f" + }, + "promptSha256": "ec5b7d8ce937a4f50bde17dfddda9d217733d09cf02ca1b7bc944f1bcf231577", + "inputSha256": "6bd07628a37c087178e9de58a98c6c5879468163f1a2376a581511a42503e2e2", + "inputLocatorSha256": "59660f6454720ae76fa64a1baf2fad2e551e349070cea802c6614fc9864c86dc" + }, + "longcat_last_tram_at_dusk": { + "workflowId": "LongCatAudioDiTPipeline:text_to_audio", + "sourceTaskTemplateId": "task-template:longcat-audio-dit-1b:text-to-audio:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:2d149a078f6469b473a083b6116ef47452ae4ccc8a1ca0fc7b0ea416f5257515", + "originalReceiptSha256": "8019b9dbf5af0e8ba5c8eeed7132ec5578968ee0607309dd65327d69599a5c5d", + "reviewedTemplateSha256": "9d0f7b50afd87f366ecf6c0d66352d87dd2bdf0b4ae9a50f818619d6254d6b92", + "reviewedCatalogLock": { + "templateLockHash": "tpl_0738853e", + "galleryTemplateLockHash": "tpl_e6bfed44", + "promptSettingsHash": "ps_11aa3e00" + }, + "promptSha256": "47545a310a3cffc0c8a458241c77dca330e10fe92fbc796239efb689bfb40949" + }, + "qwen_layered_sunset_and_peaks": { + "workflowId": "QwenImageLayeredPipeline:layer_decomposition", + "sourceTaskTemplateId": "task-template:qwen-image-layered-direct:layer-decomposition:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:25bb2ac3d10b3d0f539204d2c4d3181764f192882a9c8442efb5ce54b7d8de43", + "originalReceiptSha256": "826d487fed6b6f0ae2679d2eb842ad65208a9b5929b66722ad1d8e1c0242079e", + "reviewedTemplateSha256": "4ee3847d935f7b245f5c9d9e156da8fe5d97dcb382ad890c59163e573a6c73c9", + "reviewedCatalogLock": { + "templateLockHash": "tpl_54972ded", + "galleryTemplateLockHash": "tpl_831d4207", + "promptSettingsHash": "ps_9236bec4" + }, + "promptSha256": "10e30e8fbc0bcc8c1748851145c9b32a4d27da19cecd06da4d044f565cd2d745", + "inputSha256": "67835db7f30072a35b1650c0a84e7f241c0b01fcf2c324964ddcd5f8424008b3", + "inputLocatorSha256": "1584ce002870000a86ce56d7b6132b4e4920237e6b1c35f2269af9bbcc716aaf" + }, + "wan_a14b_cloudbreak_over_the_ridges": { + "workflowId": "Wan22Pipeline:text_to_video", + "sourceTaskTemplateId": "task-template:wan-22-a14b:text-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:6921f430025f6a760f54a790517b949fc5d03c880f3c9e61eac12ae547b23cf2", + "originalReceiptSha256": "05008ca915711e27396ac9216f34931f91c5444efa2751e9fb4a26c2761a89c2", + "reviewedTemplateSha256": "2fe28c05a3adcb92031d2e5a369cf6be41990463644f08e5440bb998b32bc1fd", + "reviewedCatalogLock": { + "templateLockHash": "tpl_6e4c3186", + "galleryTemplateLockHash": "tpl_80961b58", + "promptSettingsHash": "ps_ca81bdb8" + }, + "promptSha256": "63b8db49c89bbe4efec541259382b051bce2632aa78fb16a8ef47a70bb130eb3" + }, + "cogvideox_mossy_mountain_stream": { + "workflowId": "CogVideoXPipeline:text_to_video", + "sourceTaskTemplateId": "task-template:cogvideox-2b:text-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:798aaa4c7c2501de15aca025081efa81d009df7977fd0fe6fb71c17f5895c105", + "originalReceiptSha256": "3aab2d19bca49f839f8316f19ea75afbe4b0e401ff5a330c16f35484f43f611a", + "reviewedTemplateSha256": "c77c843d9555524c9f9ce04c53af16c2ee6570d7ff9b72d90fba98fd1fc3d9cc", + "reviewedCatalogLock": { + "templateLockHash": "tpl_12ff3dab", + "galleryTemplateLockHash": "tpl_089d3aae", + "promptSettingsHash": "ps_f986f95b" + }, + "promptSha256": "08823b5d6cd6d0166e33c94e61aaccab515dece0668fcc9779c6cfb633462821" + }, + "wan_flf_blue_hour_at_the_tram_shelter": { + "workflowId": "WanImage2VideoModularPipeline:image_to_video", + "sourceTaskTemplateId": "task-template:wan-flf:image-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:f3e6600531ca93b1b326cbfa5e3b0b853b4015ccb5c163302c003b81bc4897a6", + "originalReceiptSha256": "63d626c3c97cd12016b58a9fba71739eeea0459ad300383d5b4f43aa0775740a", + "reviewedTemplateSha256": "719322718cef9254b24004759f2eac08a4302ea27c86cbe538782207d29389f6", + "reviewedCatalogLock": { + "templateLockHash": "tpl_b13aec66", + "galleryTemplateLockHash": "tpl_de5816ae", + "promptSettingsHash": "ps_b86813d0" + }, + "promptSha256": "d9311581aed6eb088806830eb7dcf320b7d8650e06232f9794d9944acbb0fa1d", + "inputSha256": "6d2c561cf33919ae42e773d95a0232799da3f2b92a23a94dad80902cfb73527a", + "inputLocatorSha256": "160363900dea249d2053d49da2b8bb3c801a34ab264d49f7b16098c5a75938a5", + "lastFrameSha256": "191b023efb43a42288799877db722b9a2608d2970740246322ef38cc7c68c590" + }, + "cogvideox_red_tram_model_railway": { + "workflowId": "CogVideoXVideoToVideoPipeline:video_to_video", + "sourceTaskTemplateId": "task-template:cogvideox-2b-video-to-video:video-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:9536733d2657f50f2530e066706a283d282c5dbd7989f70e563942b748489f2d", + "originalReceiptSha256": "c4396b6f2b6b01fcdbcb5d7f370b6284be78d1979e4665a243c1e08193776e08", + "reviewedTemplateSha256": "d74131d9a94ae6422f0824a9948e9ee157fb765058f8d45e515fda25a93c25c6", + "reviewedCatalogLock": { + "templateLockHash": "tpl_305c9ad7", + "galleryTemplateLockHash": "tpl_aca915d8", + "promptSettingsHash": "ps_44a08b73" + }, + "promptSha256": "d6dffbc00ab43ae375ebadab9cb8e7c7da98805ae41099301b26774022d22597", + "inputSha256": "0737fe1e6b127fd4f5f66043b8911e5c7e380e60d50eab7e6bc9ba62e830b9dd", + "inputLocatorSha256": "24cb984db9137c26395f2255fba7bf647016637744b7e301d4e8fe7d8d63bff3" + }, + "sana_tidal_pool_on_black_basalt": { + "workflowId": "SanaPipeline:text_to_image", + "sourceTaskTemplateId": "task-template:sana-600m:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:4c0dd2f1d20300d93bac5d00a84eb057a7ffc5c64cafe9d4727a38d6852b7aab", + "originalReceiptSha256": "8b9112a10ce799d31f77d03e5f3d757d2510a7019f6bdc9e88d3de208f2bfa72", + "reviewedTemplateSha256": "31c6fda19fe62a7282c50fe665069354989947ef1454ac63a1384637792d09c6", + "reviewedCatalogLock": { + "templateLockHash": "tpl_a4797982", + "galleryTemplateLockHash": "tpl_2e1869d7", + "promptSettingsHash": "ps_91375aee" + }, + "promptSha256": "c737a35b3c72ee9af940329b310301855bb8ae6e6f2c3e36cd86a250a0d2d4ac" + }, + "joyimage_herbarium_rainy_porthole": { + "workflowId": "JoyImageEditPipeline:text_to_image", + "sourceTaskTemplateId": "task-template:joyimage-edit:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:764bcfbc5d06837477b63647a4723da8dfce96675828d2f038909bed22b155fd", + "originalReceiptSha256": "655abc48262ac72c9e7cee61c90f7f72430660b5b5102716b97d4ee9730e31fa", + "reviewedTemplateSha256": "5e0a8441e6f6998745a1b9c9a8244aa5d8e4e8591be5277396f519f41adf7ad4", + "reviewedCatalogLock": { + "templateLockHash": "tpl_19b0c1a0", + "galleryTemplateLockHash": "tpl_9e12c4ef", + "promptSettingsHash": "ps_83f27e49" + }, + "promptSha256": "f61ca504d1f282a071ece1bc43cd64b579826005903479fa48b191e4b84112de" + }, + "longcat_florist_end_of_lane": { + "workflowId": "LongCatImagePipeline:text_to_image", + "sourceTaskTemplateId": "task-template:longcat-image:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:b412040d8f6595ffa0093fa82dce6f4993cf6d8db99730610e859ae8badab868", + "originalReceiptSha256": "8020bb532f9bc0fc6222c2083e81579b3c8dac7c9dd934e8d2534db7b3ae5fe1", + "reviewedTemplateSha256": "b90a1a05613457abec04653497adf621e361d94bfc399db6cbd94f093a69421f", + "reviewedCatalogLock": { + "templateLockHash": "tpl_129e0498", + "galleryTemplateLockHash": "tpl_22334457", + "promptSettingsHash": "ps_cbbee99d" + }, + "promptSha256": "301b56ba87f685d46fe7ae0526aab3321afb3b49cef6c8996829e181b574983e" + }, + "kandinsky3_smoked_glass_on_limestone": { + "workflowId": "Kandinsky3Pipeline:edit_image", + "sourceTaskTemplateId": "task-template:kandinsky3:edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:afdbaf12db152f0df94876cdcf5ffc96e5ba2ccbabc71331981e05f9259ae8be", + "originalReceiptSha256": "441798bee62a4e76037a9bf34cb5fe4c95d3682f2144c6f2e32810aa50ad3c4b", + "reviewedTemplateSha256": "196588c637d27503fb83fdcd1b294e9b3e7cad61436214751f92a1c6aaeb7361", + "reviewedCatalogLock": { + "templateLockHash": "tpl_2eb7c636", + "galleryTemplateLockHash": "tpl_1223236b", + "promptSettingsHash": "ps_d94df476" + }, + "promptSha256": "efa4b00d4d6fe890959aa326fe1be0f5296b1b84f92d1e5050cd793697553786", + "inputSha256": "0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "inputLocatorSha256": "e6b781cc8a8fc7ccbd32136c83882dbfb6e034ca9770ab5fba37138841d3772a" + }, + "longcat_clear_glass_at_the_bookshop": { + "workflowId": "LongCatImageEditPipeline:edit_image", + "sourceTaskTemplateId": "task-template:longcat-image-edit:edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:9eb6f51ba74d17909236f695506b2b08feb1855e4c217a6d79b70f30543380c5", + "originalReceiptSha256": "b9f3dd382864d47e950c38650e6ec31d0e51b2453ed302c04955bfb0340785db", + "reviewedTemplateSha256": "057e11900f267163730bdb1009b1be2118ab05c6d94815d4bf4e5af86da75fbe", + "reviewedCatalogLock": { + "templateLockHash": "tpl_7fbfbb02", + "galleryTemplateLockHash": "tpl_cae3d7ea", + "promptSettingsHash": "ps_1052bdee" + }, + "promptSha256": "f0a2850c1d874f17ba2e353339af0ebe7023490cbd24c4cd058e14a6ce6aaf30", + "inputSha256": "ff045be510a0e88cbab69bbe8c3794dd26bd19036bdec26a63a5b6ea5a11bc66", + "inputLocatorSha256": "ba62f91337905681e60c207cb7c94b5674841dbf814c026e6780f76bca2e8c52" + }, + "qwen_2511_pale_amber_on_limestone": { + "workflowId": "QwenImageEditPlusPipeline:edit_image", + "sourceTaskTemplateId": "task-template:qwen-image-edit-plus-direct:edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:487c0e08495ef2eb93b734132375a8ad84ae45d6941454325daa94b03d1e5205", + "originalReceiptSha256": "c701a2eb5a7fe48519e48dffd10ed7bb6b3e25c34353b208224d16d6400c6fcb", + "reviewedTemplateSha256": "196d20bc8bec725ddcc2674124e4815e019d3b054284f444add226044ed195e5", + "reviewedCatalogLock": { + "templateLockHash": "tpl_4d6c4310", + "galleryTemplateLockHash": "tpl_46b7f4fe", + "promptSettingsHash": "ps_5dd80333" + }, + "promptSha256": "d6b5a63423062dee27603a2980982297bdc958d6134e4e4c45d81f3c63cdcb35", + "inputSha256": "0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "inputLocatorSha256": "e6b781cc8a8fc7ccbd32136c83882dbfb6e034ca9770ab5fba37138841d3772a" + }, + "qwen_cobalt_on_charcoal_slate": { + "workflowId": "QwenImageEditPipeline:edit_image", + "sourceTaskTemplateId": "task-template:qwen-image-edit-direct:edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:289e7be3760372b115a67ff25d933895d02e06659182553071b50baebf039160", + "originalReceiptSha256": "f3bf7c16a7aa0008f3cad3df96ff4293889439815a27d7a01dff1b4796ba171a", + "reviewedTemplateSha256": "335c41c4fab432f8ee590dc902ae7d63de98f46464642e1533a3479d339348df", + "reviewedCatalogLock": { + "templateLockHash": "tpl_3bc1bc6b", + "galleryTemplateLockHash": "tpl_3acb8169", + "promptSettingsHash": "ps_94f59a29" + }, + "promptSha256": "a339129e8aa3d96eae7e18eaea4d245271e3773dc040b09d63d1c0c7dc421774", + "inputSha256": "0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "inputLocatorSha256": "e6b781cc8a8fc7ccbd32136c83882dbfb6e034ca9770ab5fba37138841d3772a" + }, + "joy_plus_lavender_on_limestone": { + "workflowId": "JoyImageEditPlusPipeline:edit_image", + "sourceTaskTemplateId": "task-template:joyimage-edit-plus:edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:1f09b68538b0723b1bea8f991a74c94eebbfffd3db4ecf3be5fdee198c7db694", + "originalReceiptSha256": "ec18a41cfd9d91e09bb4339e69b0669faec4a2ac968aef9d90c1a1d3b674d0e7", + "reviewedTemplateSha256": "448dbfb62c1255097be44eff481ff2c89ff04c31415faa5fe86f22a72a71fe4f", + "reviewedCatalogLock": { + "templateLockHash": "tpl_dfad870a", + "galleryTemplateLockHash": "tpl_5fc91f78", + "promptSettingsHash": "ps_5dff34eb" + }, + "promptSha256": "7d0d51afc5f07b38d4a0226946e2e1c7dcc35192807a7b0cb2ef913a96798f21", + "inputSha256": "0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "inputLocatorSha256": "e6b781cc8a8fc7ccbd32136c83882dbfb6e034ca9770ab5fba37138841d3772a" + }, + "omnigen_cobalt_against_soft_apricot": { + "workflowId": "OmniGenPipeline:edit_image", + "sourceTaskTemplateId": "task-template:omnigen-v1:edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:6603d5410b5cd5b8b8fee5d4c54f0fa27be81a6e0989fa470a07fa94f1ac7e0a", + "originalReceiptSha256": "aba148df3940a0700894f8f934e5d800be77f665b85d6796e4afe027debc5a43", + "reviewedTemplateSha256": "932ee2726d371c73f19521cf7e50806fb86a95394047d6207a5cee3007e57f00", + "reviewedCatalogLock": { + "templateLockHash": "tpl_c7941f7a", + "galleryTemplateLockHash": "tpl_843ac3b0", + "promptSettingsHash": "ps_5ed41c97" + }, + "promptSha256": "fc3c89081581d6ab447d53aa73581c879533724d25d02b709e1328c4c4f3ceba", + "inputSha256": "0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "inputLocatorSha256": "1d67ca3bc38832e5f5e10237b6e5449bc61e335b86116736d941eff502817ad8" + }, + "flux_klein_alpine_lake_panorama": { + "workflowId": "Flux2KleinInpaintPipeline:outpaint", + "sourceTaskTemplateId": "task-template:flux2-klein-inpaint-direct:outpaint:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:2989815bea79d34490a6f78257eac8c818445145dbd6adaceb2b5ad86a6fcf4a", + "originalReceiptSha256": "b24c85edd5c183f82ce9510a6623981ef8d9ea2699ca46bc4d3917180d8294e5", + "reviewedTemplateSha256": "f90f8a8162586ea0e94260bb3b332de2885bb642d0776a0a104b3495a593cc6d", + "reviewedCatalogLock": { + "templateLockHash": "tpl_82a46ff5", + "galleryTemplateLockHash": "tpl_044f3f0c", + "promptSettingsHash": "ps_21d55461" + }, + "promptSha256": "58a529a3aed7d1f22d7d29a7c7995135d6d14488caf9785fec647136763b1f97", + "inputSha256": "50270382b4b730b87f79b775accaeeb81f3ff8885cd3d2cea94830206fbc181b", + "inputLocatorSha256": "27d164af0dd37aaced849fc5243e4d05e95e8a5f75a1b9a3c6b0942df95b540a" + }, + "zimage_rocky_glacial_shores": { + "workflowId": "ZImageInpaintPipeline:outpaint", + "sourceTaskTemplateId": "task-template:z-image-inpaint-direct:outpaint:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:f7b725ec789f566f496f4afe4414288f55289d3180b2722f47f855b0cf2c2a39", + "originalReceiptSha256": "ba2d0fcc7d6327ad5b24538e4a07c69ef92a5bebd5534f143d5637194a328e1c", + "reviewedTemplateSha256": "67bc5216f976bce75a6793c5eb33181b777828c34fb7e0573d31073d2ad42bc9", + "reviewedCatalogLock": { + "templateLockHash": "tpl_70253a97", + "galleryTemplateLockHash": "tpl_c88fe575", + "promptSettingsHash": "ps_6b582e00" + }, + "promptSha256": "58a529a3aed7d1f22d7d29a7c7995135d6d14488caf9785fec647136763b1f97", + "inputSha256": "50270382b4b730b87f79b775accaeeb81f3ff8885cd3d2cea94830206fbc181b", + "inputLocatorSha256": "27d164af0dd37aaced849fc5243e4d05e95e8a5f75a1b9a3c6b0942df95b540a" + }, + "qwen_bookshop_gouache": { + "workflowId": "QwenImageModularPipeline:edit_image", + "sourceTaskTemplateId": "task-template:qwen-image-2512:edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:7c05a757728207dbd039194383498c67578647f594c51042bd041297584d99c5", + "originalReceiptSha256": "47e7d688d1f45209de2600fe1f87a5c6d683a55e4b5acb113cc26d1087df31d5", + "reviewedTemplateSha256": "3163da25258525f8cb2c8a71b64a89e5445424ed1ad0a8b44b7321aafceb8175", + "reviewedCatalogLock": { + "templateLockHash": "tpl_a9dd9a74", + "galleryTemplateLockHash": "tpl_bb0efb52", + "promptSettingsHash": "ps_f2c73a20" + }, + "promptSha256": "376a3128d40baffc4a7f7bb8e6afd3c89910458a9bdb31a66bae3c1c9da06b0a", + "inputSha256": "ff045be510a0e88cbab69bbe8c3794dd26bd19036bdec26a63a5b6ea5a11bc66", + "inputLocatorSha256": "14627dfda9752049b179aa2139fb528a313026b5a223de7cd613157d11f2442f" + }, + "kontext_wide_water_alpine_ridge": { + "workflowId": "FluxKontextInpaintPipeline:outpaint", + "sourceTaskTemplateId": "task-template:flux-kontext-inpaint-direct:outpaint:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:991400ad01692ea30254b9cacabc637b1f13b2156533cc4ccd05d1bd2df9a53c", + "originalReceiptSha256": "fabdf2609cbf5d838834845a08c6d12d08401d670edfc34d67a370efbf40414c", + "reviewedTemplateSha256": "8ae90dc2b352689446effd182c4ad144c4e555d5b76fa3adbdb77fa4b767d119", + "reviewedCatalogLock": { + "templateLockHash": "tpl_7b0786de", + "galleryTemplateLockHash": "tpl_1b8d91bd", + "promptSettingsHash": "ps_781a8232" + }, + "promptSha256": "239d6f0f8936a4f70eb01b4b26d1e07fffe766d3fde6d5635e85ffb7d3bd6a57", + "inputSha256": "50270382b4b730b87f79b775accaeeb81f3ff8885cd3d2cea94830206fbc181b", + "inputLocatorSha256": "27d164af0dd37aaced849fc5243e4d05e95e8a5f75a1b9a3c6b0942df95b540a" + }, + "chroma_alpine_block_print": { + "workflowId": "ChromaImg2ImgPipeline:edit_image", + "sourceTaskTemplateId": "task-template:chroma1-hd-img2img:edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:3f23ca4ba74ed0ec547deb55013ac0d0335dba063505c3721c4aa6447caf31b6", + "originalReceiptSha256": "dd23974fab77ebe91e46ed5734e61a75638f10cc0ace0e54240f6afaf233c72b", + "reviewedTemplateSha256": "fbe83f016a250a5749f63a2b3eaa8e9806fc0d0c4b4f849a91a6f2094425dcb0", + "reviewedCatalogLock": { + "templateLockHash": "tpl_89dabcbe", + "galleryTemplateLockHash": "tpl_cda267e7", + "promptSettingsHash": "ps_b12d1fc3" + }, + "promptSha256": "16e06292815a5e4830f50ee7e6ea8f3d6e1e119cbab1223ae8ad9e63f15629f8", + "inputSha256": "88290a96bc8d52f11f2d1e3c0c0e04c2027661816e54b57d7d4739d731ca1e75", + "inputLocatorSha256": "ea52f8405f1f8a16665d592b97911cefd882fa19f3eeaea1598162a41817dc36" + }, + "joyimage_base_cobalt_paper_band": { + "workflowId": "JoyImageEditPipeline:edit_image", + "sourceTaskTemplateId": "task-template:joyimage-edit:edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:f888affd299d0162c7dc01ff45d61ef3d3476ed7625141d8f6d2b4d8c4e6cdf7", + "originalReceiptSha256": "71b096416a43857e71643677e3288af3e75aa96312cbc24673f26ce8824ce46d", + "reviewedTemplateSha256": "895ec1f44e28507344c4bdabd3a3c07c3fe985d5b0fc0b5373f91ec8ad1f92d0", + "reviewedCatalogLock": { + "templateLockHash": "tpl_483e619b", + "galleryTemplateLockHash": "tpl_ef76cf20", + "promptSettingsHash": "ps_5d13f8f9" + }, + "promptSha256": "cdd8bb0acd8defd0a5defb64a19fa3f12f74d54f40a2b1e405f5b5c1bd005797", + "inputSha256": "0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "inputLocatorSha256": "e6b781cc8a8fc7ccbd32136c83882dbfb6e034ca9770ab5fba37138841d3772a" + }, + "sdxl_blue_glass_on_linen": { + "workflowId": "StableDiffusionXLPipeline:edit_image", + "sourceTaskTemplateId": "task-template:sdxl-base:edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:b2fb94a00ca2033f808f3824262500fbad51b761bfa8e7b93079350f26a961ae", + "originalReceiptSha256": "511a0b135e417c10f9a3e9e04b6b35b5aa391ab3b084ec3df25fc66bf6d8d6e3", + "reviewedTemplateSha256": "c54124fc0e1c94b88c70853b0102ad94e7cbbe4d5761528d8c699f2ecd0d6be2", + "reviewedCatalogLock": { + "templateLockHash": "tpl_7afc46a9", + "galleryTemplateLockHash": "tpl_bc28f7ef", + "promptSettingsHash": "ps_1be10bde" + }, + "promptSha256": "ea8e397aa5a60394715dc6a474f681cb63fe9d3a4b4cb40b7d21c86b6f65bfab", + "inputSha256": "0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "inputLocatorSha256": "230a008162b81fcefb15b439dff526362781a3298a297d428469ebc47f7ae9c8" + }, + "qwen_2512_cobalt_backdrop_repair": { + "workflowId": "QwenImageModularPipeline:inpaint", + "sourceTaskTemplateId": "task-template:qwen-image-2512:inpaint:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:5480e0491b621010f2530b034c25a8457f3a3be63b1bb20359b39ab68356be7a", + "originalReceiptSha256": "060b1b3de7cb4a05fe61363c8e6ae58cddddad647f8299a85feb6d8759bf5fb8", + "reviewedTemplateSha256": "9448d9e6aed3bf64c4ada3bf63c282f7cbc03c8e6a5ade076450af1d21a9b800", + "reviewedCatalogLock": { + "templateLockHash": "tpl_5970cf80", + "galleryTemplateLockHash": "tpl_05825928", + "promptSettingsHash": "ps_499eb957" + }, + "promptSha256": "acbac448403136a5043aeadaed0bf7e7638ab0c2c29b41ae6f58d73a12f033ee", + "inputSha256": "f5db354dc97ea11898d868898c5cc8ef454bb75ffe098b00bb2f06bc89f85885", + "inputLocatorSha256": "6202347afddec09dd0c3801941f6d173882dfd06148eb2defc95d71551f4a7ce", + "maskSha256": "75ce495cdb65e3cb92cbd1c2ed94546d3f946e86642095d08334be13fd8a8b8f" + }, + "flux1_dev_limestone_studio_scratch_repair": { + "workflowId": "FluxDevPipeline:inpaint", + "sourceTaskTemplateId": "task-template:flux-dev:inpaint:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:3ca6c83955149d17954a830a5e2f1200d06bedfae40b693d620157b1606184b5", + "originalReceiptSha256": "f3a931273edeb2e41d23016dfd13d6568222cd92e21a4a52280afa814d59f384", + "reviewedTemplateSha256": "fe963e2fc85d8c21f11d606e545a9dcf5d63e5b2abad4b30900cdb64e5a25d36", + "reviewedCatalogLock": { + "templateLockHash": "tpl_d40951ce", + "galleryTemplateLockHash": "tpl_eaa910f1", + "promptSettingsHash": "ps_c7610cad" + }, + "promptSha256": "cdcd113dd8102aba0f1838ecc02a170532e8b79ab574afc47d30bbdf7aa95d4d", + "inputSha256": "e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "inputLocatorSha256": "69ba088466bbd714eba0a70d1dc24984230ca1ac74b00ac0ff1bbcb29675799d", + "maskSha256": "1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d" + }, + "zimage_seamless_cobalt_backdrop": { + "workflowId": "ZImageInpaintPipeline:inpaint", + "sourceTaskTemplateId": "task-template:z-image-inpaint-direct:inpaint:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:262959c3db75dc58cc10c7ba5efafd540dac6a33ad4bd095cfe264ec83ad5dde", + "originalReceiptSha256": "00f04c60e1fc37087db0c90144a1b5c27b1e211e88b1ef8ec567c0ff3eb9853c", + "reviewedTemplateSha256": "2a72cfcaddfa6e69098ca7feceef620a98bc50441abfa93f509c0a18711de478", + "reviewedCatalogLock": { + "templateLockHash": "tpl_8bce11b8", + "galleryTemplateLockHash": "tpl_fc6e804a", + "promptSettingsHash": "ps_06840c42" + }, + "promptSha256": "5185e39c6185fb373d310edd7d1dd7253037a2ee70206591de4f28e7dd9ad700", + "inputSha256": "e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "inputLocatorSha256": "69ba088466bbd714eba0a70d1dc24984230ca1ac74b00ac0ff1bbcb29675799d", + "maskSha256": "1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d" + }, + "sdxl_pag_cobalt_wall": { + "workflowId": "StableDiffusionXLPAGPipeline:inpaint", + "sourceTaskTemplateId": "task-template:sdxl-pag:inpaint:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:9a0b6bef1c8170f91b03876c7b3b0de283e4e5494f6349f2e52759470dd7922b", + "originalReceiptSha256": "9380533f675c9491fe99d896740d7366ab9471ea617ab743d8af35af722f321c", + "reviewedTemplateSha256": "b95bd1828ace6db13d5ea54c01f8e9449bfcd73552ae371dcb52ce1838ecad8d", + "reviewedCatalogLock": { + "templateLockHash": "tpl_c39dfda4", + "galleryTemplateLockHash": "tpl_ceafa1fa", + "promptSettingsHash": "ps_52a8b07a" + }, + "promptSha256": "159253308aba23cc8f6955da96e48e550533d368ca286ad70b6caa601d1291e4", + "inputSha256": "e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "inputLocatorSha256": "69ba088466bbd714eba0a70d1dc24984230ca1ac74b00ac0ff1bbcb29675799d", + "maskSha256": "1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d" + }, + "flux_klein_open_glacial_lake": { + "workflowId": "Flux2KleinInpaintPipeline:inpaint", + "sourceTaskTemplateId": "task-template:flux2-klein-inpaint-direct:inpaint:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:e243008b76ef57a46997f5a6b9e12c84dd7dee5ae863392b8a1a6116869a6e9a", + "originalReceiptSha256": "fdc033422ec6517632bed64a97b54322e17e329956edc239716e4fd599f2c4cd", + "reviewedTemplateSha256": "e100c45ec42735d37c8eb9c6d442d29822234c41d050ba311b178e38ee14baa5", + "reviewedCatalogLock": { + "templateLockHash": "tpl_9e39e3c0", + "galleryTemplateLockHash": "tpl_23b2c7db", + "promptSettingsHash": "ps_cafe7c6f" + }, + "promptSha256": "5add93d6165a7d3670d71c04b2d50bdf45e061ca914038396869d70df78efee4", + "inputSha256": "88290a96bc8d52f11f2d1e3c0c0e04c2027661816e54b57d7d4739d731ca1e75", + "inputLocatorSha256": "b7e9b68e47a60f438c82f778b960f66d58d319de50749d453a9aa0c30c4df45a", + "maskSha256": "877d3c4e0e976d3885419f3f327d8974394d69aca35667e5479b944880d84e04" + }, + "sd15_control_cobalt_handmade_paper": { + "workflowId": "StableDiffusionPipeline:control_edit_image", + "sourceTaskTemplateId": "task-template:sd15-controlnet-canny:control-edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:eba7a5b4abc12764de5075d2119130189e161241038b4bcf1f0dce0acb70f176", + "originalReceiptSha256": "a5828d189ae4e195b01c88ccc1b9d65af720dcf823b64b4509e228a53edabd29", + "reviewedTemplateSha256": "fee63ff957b7394a6472d76a9f662abd1d86193d12ee6c0ab2cf6c77cf1e2b50", + "reviewedCatalogLock": { + "templateLockHash": "tpl_e80b75da", + "galleryTemplateLockHash": "tpl_764eeb73", + "promptSettingsHash": "ps_45a62571" + }, + "promptSha256": "9d5fa41d41e060b722f221c85ed57e821031161acbff73f6c0fb25b7b4909494", + "inputSha256": "d143c4922ad498b9bd436d06df424bbff50baf023b93735b53ee401e19e4cbf1", + "inputLocatorSha256": "efcb2b3b9ced784bb620763301bb33ea3b2f6ac2561624a4a60c7a735049cfb1", + "guideSha256": "6d47a2f07006b98f9e5cfc8ee925914c4dbfa39fd38b0b61770be56d12ed04e8" + }, + "sd15_control_cobalt_studio_wall_repair": { + "workflowId": "StableDiffusionPipeline:control_inpaint", + "sourceTaskTemplateId": "task-template:sd15-controlnet-canny:control-inpaint:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:0d2aba098bb0cecaaf59dc601a54f637849a0918166655f546313f69e29aa5ad", + "originalReceiptSha256": "f46add4e31c93701f24c78093985cdbeac9aa043e94ab595d5314591f00b56b1", + "reviewedTemplateSha256": "871cffe6c8b434f4d3afa1f65009582862b565313d180b56d5a61eedd5fd1aa8", + "reviewedCatalogLock": { + "templateLockHash": "tpl_044156de", + "galleryTemplateLockHash": "tpl_8b4c43db", + "promptSettingsHash": "ps_e2e07bdd" + }, + "promptSha256": "6fc14c5f9b0154a38b165fcb9b2cb766e2091f7dddc1975a2247f8008c6eada5", + "inputSha256": "d143c4922ad498b9bd436d06df424bbff50baf023b93735b53ee401e19e4cbf1", + "inputLocatorSha256": "efcb2b3b9ced784bb620763301bb33ea3b2f6ac2561624a4a60c7a735049cfb1", + "maskSha256": "71817f4823a73712c8e76e7d832ec382c29ec0a0bf5a472e09639448c082da01", + "guideSha256": "6d47a2f07006b98f9e5cfc8ee925914c4dbfa39fd38b0b61770be56d12ed04e8" + }, + "sd15_pag_control_wall_repair": { + "workflowId": "StableDiffusionPAGPipeline:control_inpaint", + "sourceTaskTemplateId": "task-template:sd15-pag-controlnet-canny:control-inpaint:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:b69353e3e634e8d228cf19a84c525efa3b227384920e592d2e7729d428622881", + "originalReceiptSha256": "2a4f209aa2f96d0c76efd48dd8c9656547cbb6609e72d4b90864df1c9ad0f589", + "reviewedTemplateSha256": "155adb3c21e9aacbf62ac042d0e2d3b5ba9987331edd79dcff446b6053438a98", + "reviewedCatalogLock": { + "templateLockHash": "tpl_ab690ded", + "galleryTemplateLockHash": "tpl_59e3f364", + "promptSettingsHash": "ps_79b65484" + }, + "promptSha256": "30f0c5c1651311616c5fa4628d40c4ec493db39825cc7c71a4a8bf669a61cf69", + "inputSha256": "d143c4922ad498b9bd436d06df424bbff50baf023b93735b53ee401e19e4cbf1", + "inputLocatorSha256": "efcb2b3b9ced784bb620763301bb33ea3b2f6ac2561624a4a60c7a735049cfb1", + "maskSha256": "71817f4823a73712c8e76e7d832ec382c29ec0a0bf5a472e09639448c082da01", + "guideSha256": "6d47a2f07006b98f9e5cfc8ee925914c4dbfa39fd38b0b61770be56d12ed04e8" + }, + "sdxl_pag_snow_cabin": { + "workflowId": "StableDiffusionXLPAGPipeline:control_image", + "sourceTaskTemplateId": "task-template:sdxl-pag-controlnet-canny:control-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:24f301293a57d60503933f0cd2a278f6ee932db5617a339310d0a25c36eaa175", + "originalReceiptSha256": "038d2fc8fa5c8079d7d7abed56804816e29ac8032e5a7cdff2c62036060e9349", + "reviewedTemplateSha256": "1c302242a6a0e304537b15c53c8cb94dcffae8955039b0cbf3759331122864e1", + "reviewedCatalogLock": { + "templateLockHash": "tpl_fc73e8c4", + "galleryTemplateLockHash": "tpl_50666a60", + "promptSettingsHash": "ps_109abbf3" + }, + "promptSha256": "1d7010ebe7625c3d79724c0e436e9b7edd359fd4907a5242acdd8737fb8aeab9", + "inputSha256": "ca250462efc77625134ebe305b2ee67281a1dcf8919e45299c648f0fdacf919a", + "inputLocatorSha256": "5c41a25a1747974eb20ae701984d2e13c2979cd0069944f7ef21429677d4c046" + }, + "flux_canny_clean_backdrop": { + "workflowId": "FluxCannyPipeline:control_inpaint", + "sourceTaskTemplateId": "task-template:flux-canny:control-inpaint:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:567248f43a620bfcfb34690914d010f2aba19a147e132f1ada00aeba9fcde561", + "originalReceiptSha256": "1960eca0824640f40d86820463d58beabf4421cb9262a3f3abf93eaa2f07aaa7", + "reviewedTemplateSha256": "ddec004faf0dea8ab0683f015a22350f6086d28d6b41ecc57f2c0abf81ca1755", + "reviewedCatalogLock": { + "templateLockHash": "tpl_20041805", + "galleryTemplateLockHash": "tpl_c1982b94", + "promptSettingsHash": "ps_491e886d" + }, + "promptSha256": "7f566625fe9a4dc897da22dfbcdcbe51ffc427f7fad6c3b9bf694571992a3593", + "inputSha256": "e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "inputLocatorSha256": "69ba088466bbd714eba0a70d1dc24984230ca1ac74b00ac0ff1bbcb29675799d", + "maskSha256": "1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d", + "guideSha256": "6bd07628a37c087178e9de58a98c6c5879468163f1a2376a581511a42503e2e2" + }, + "flux_depth_marine_bow_repair": { + "workflowId": "FluxDepthPipeline:control_inpaint", + "sourceTaskTemplateId": "task-template:flux-depth:control-inpaint:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:ffd5894d66a9372f95715d365e9698c48b72b1422aebad4d1a0f14932b2f03bd", + "originalReceiptSha256": "568eba4ce2c06b085b22ca13a69a6651d27ba404760ea5f6fb621e14ced5df44", + "reviewedTemplateSha256": "c36171bcdbd3076f271fb33743708207b8aeb0f4bfb68be30f7ee7a0239b0869", + "reviewedCatalogLock": { + "templateLockHash": "tpl_6ec376ac", + "galleryTemplateLockHash": "tpl_d739eca3", + "promptSettingsHash": "ps_e637018a" + }, + "promptSha256": "ae3ca5f0917da122af1d33ebe7e5d72ca40bee819f9f9fd0e156e9fa4018d212", + "inputSha256": "c3d52c29b6a8cae80d2feffb8a978cded8b34509abd09216f665ab3af13f189e", + "inputLocatorSha256": "2ae6a397d6ca024be5a0aa7685d94978f9186f46a1ed0ad84470d923b63b790c", + "maskSha256": "765f215aa6f8c0087a67af872a26149223373d5ab4a8afba6331caad5bc45d4c", + "guideSha256": "2e202069a584ee5ada91e2deaea6bf7b92a94f4816e669e695d7cb64d5a1cb0e" + }, + "sdxl_control_golden_boathouse": { + "workflowId": "StableDiffusionXLControlNetPipeline:control_edit_image", + "sourceTaskTemplateId": "task-template:sdxl-controlnet-canny:control-edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:6d79e032074b89f72078418c91345d440f5e348f2890a177b8c33c801b0d385f", + "originalReceiptSha256": "b72a583d7d31a2ba0d5f5cb2ff6b1414f36e4b9c4e41d8d861ce2a586ff843d7", + "reviewedTemplateSha256": "94724166ff9512b26bca310deb3e9d2a16f88116cc157e42694d1a459bfc06cd", + "reviewedCatalogLock": { + "templateLockHash": "tpl_863b942f", + "galleryTemplateLockHash": "tpl_249a8d5d", + "promptSettingsHash": "ps_97318fec" + }, + "promptSha256": "80c99a9930755f9e7da1a0c8ccfdd0f06d0ad161b5eaae238b1564766713dbd1", + "inputSha256": "e1d9736125cad717896f0c7d5274a6373676559f250d76cedcc8f8aae9379ec6", + "inputLocatorSha256": "6d770f577a91e91ca4f072444e8dad46d8459da8b0950cbfeab8c15d30abff67", + "guideSha256": "322a9aa511a7d21524758724b1666fc220abf563def5e5d1294630e7e58a3b96" + }, + "qwen_2511_terracotta_material_transfer": { + "workflowId": "QwenImageEditPlusPipeline:multi_image_reference_edit", + "sourceTaskTemplateId": "task-template:qwen-image-edit-plus-direct:multi-image-reference-edit:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:c0d621c2ba7c54d24a8a3a3e3a584bba49979cf3f26ec2fcf30bf335fc15f4fc", + "originalReceiptSha256": "6400d5376ef83a864dd01e7afbcbabc7a33494b2f658f05c17891860f3fecded", + "reviewedTemplateSha256": "46a74671317b1b01f4ee5c7531e4d9fa32b8ba386bc9ba3321632f0168515b13", + "reviewedCatalogLock": { + "templateLockHash": "tpl_34f41c9d", + "galleryTemplateLockHash": "tpl_5f771a9f", + "promptSettingsHash": "ps_4e83ee4e" + }, + "promptSha256": "4dd64cdc760833745fe93afba3a8b1657f7e11dcbb9657402137c0b3296e3267", + "inputSha256": "0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "inputLocatorSha256": "e6b781cc8a8fc7ccbd32136c83882dbfb6e034ca9770ab5fba37138841d3772a", + "secondaryReferenceSha256": "056615dd7833d38cfed12d45b30bb0c6e439bf1585f4964da4796ca5b43f20ea" + }, + "joy_plus_terracotta_on_limestone": { + "workflowId": "JoyImageEditPlusPipeline:multi_image_reference_edit", + "sourceTaskTemplateId": "task-template:joyimage-edit-plus:multi-image-reference-edit:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:45c63449a5f682f068eaaad12a3cb73dbae46dad5924c18609cbba30d8937f8f", + "originalReceiptSha256": "7a419e8264420f38abdc18d4bf76d8ff9ec7ac21c736bf9c768477249b601d73", + "reviewedTemplateSha256": "2250434e38d29a0c2d27808d6f713bf75965dc3f5ade4a033a11d194ecd687b9", + "reviewedCatalogLock": { + "templateLockHash": "tpl_2069ce43", + "galleryTemplateLockHash": "tpl_871e0927", + "promptSettingsHash": "ps_79969b6a" + }, + "promptSha256": "4d08d478cc5e3a616dcdc7a84ad7a8675dcba95e78031d8d2f1dae92095381b8", + "inputSha256": "0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "inputLocatorSha256": "e6b781cc8a8fc7ccbd32136c83882dbfb6e034ca9770ab5fba37138841d3772a", + "secondaryReferenceSha256": "056615dd7833d38cfed12d45b30bb0c6e439bf1585f4964da4796ca5b43f20ea" + }, + "omnigen_red_enamel_folded_linen": { + "workflowId": "OmniGenPipeline:multi_image_reference_edit", + "sourceTaskTemplateId": "task-template:omnigen-v1:multi-image-reference-edit:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:4d2c6321c55423646e3776f57b41f32a0b7da6ab3d3b74daa49bc81fd17f9793", + "originalReceiptSha256": "a460aeafd20c87b39c7464442ed13322da7e80a4dd8c4977db7f2d52d6c141a7", + "reviewedTemplateSha256": "595a3209f4bfb41d4930f0368e75bab6a19602ad0eae4d44dc535efd0a059652", + "reviewedCatalogLock": { + "templateLockHash": "tpl_4a4099d8", + "galleryTemplateLockHash": "tpl_70aa866a", + "promptSettingsHash": "ps_cb1c21de" + }, + "promptSha256": "c4c716ab31b3f14948aab044849b4b64491d33490e07679a8246077b857511a3", + "inputSha256": "4077a18ad81b7fb6a1e7285777cac6241f6c0109a680945487b81e8561f30d8c", + "inputLocatorSha256": "5a46183214a436513e67baea1b25bb4a8452caf67f66c11c03d3ef404d7459ee", + "secondaryReferenceSha256": "a0b713856d9a2d7956605fe85b26eef641bdede49400583f9c87c25fd3e324ec" + }, + "mochi_surf_over_dark_pebbles": { + "workflowId": "MochiPipeline:text_to_video", + "sourceTaskTemplateId": "task-template:mochi:text-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:bf2b044a50f9b1e7b1813fa51ec77f1e6c1fa910e6aa6236ae7b783eaed6832e", + "originalReceiptSha256": "852641887c47d6707131d5cb71780bd5a93bdd5cf8ea32e5c728cafaeb12baa7", + "reviewedTemplateSha256": "c0a8a85ce8101d4ffcf0a8ab34a46b49b41d38e667a896e8b51f5016bb536b62", + "reviewedCatalogLock": { + "templateLockHash": "tpl_97d94805", + "galleryTemplateLockHash": "tpl_851777f5", + "promptSettingsHash": "ps_0a0165a8" + }, + "promptSha256": "4cd01097ed4ede25efc7d8cb5a340246d78b28e2cc9e7cc560cf34cbd3d4ba3f" + }, + "animatediff_ivory_balloon_blue_mountains": { + "workflowId": "AnimateDiffControlNetPipeline:control_to_video", + "sourceTaskTemplateId": "task-template:animatediff-controlnet:control-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:c3a0bd75af7f0ef791bda2a2658df375640199d9d8d1be6f589f94900e923bf1", + "originalReceiptSha256": "26cefb76bc3b60ebd26d76ccda2ce9aa79a4d2e760023662cf3d1fe868dad7bf", + "reviewedTemplateSha256": "4b4d081ecba0edc45452b914be1e511106c370500951c08bac57264a08abf8c8", + "reviewedCatalogLock": { + "templateLockHash": "tpl_1fe92e51", + "galleryTemplateLockHash": "tpl_bef14c2c", + "promptSettingsHash": "ps_ecae0ab9" + }, + "promptSha256": "c242a0c1ccca509c6ff59916864c9bb16897539cd6770d540ab1b04f9d42a4c9", + "inputSha256": "fb000903f199391388d25d869aedacaedfe3ffbca67800e3113e1173f56e8108", + "inputLocatorSha256": "c7ca64c85bdfd840a9e3c4ebe9796e07e0e79ec012413142bf2e82754cd37ae3", + "guideSha256": "fb000903f199391388d25d869aedacaedfe3ffbca67800e3113e1173f56e8108" + }, + "animatediff_red_tram_through_snow": { + "workflowId": "AnimateDiffVideoToVideoControlNetPipeline:control_video_to_video", + "sourceTaskTemplateId": "task-template:animatediff-controlnet-video-to-video:control-video-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:def788f2dd1441b8d6f37e453ce30da5f5fe0f35711fadbb4d3240d2db95f177", + "originalReceiptSha256": "4f47a4a1a0244ed4b550c9e8ef4f3cfd8c2076d3f87f5ecbb583d6a8c8987b05", + "reviewedTemplateSha256": "95bf2ea59940c6b96e479bc726ca727255822c37d0dc4ed19b4d3b37622520e7", + "reviewedCatalogLock": { + "templateLockHash": "tpl_76ad76e0", + "galleryTemplateLockHash": "tpl_713b29bb", + "promptSettingsHash": "ps_3c45e0a7" + }, + "promptSha256": "d2229096be4447b2e06cc2f4d8f7be783f64b35e9262b8891ca384f69685dddd", + "inputSha256": "88b69acee9f0c3572a98e49b23ad0e853dc86e1d15074fca99b47f690dde900f", + "inputLocatorSha256": "32cc3fb9e01e1375293cf66a00f3dc56229e375aeba0094fdd6a0107e682e549", + "guideSha256": "5911e85b2d5ef93e44ba5d76f73ddf77f9d49d6cf3e4e829c30f0e386a0b8d80" + }, + "sana_i2v_blue_hour_above_rice_terraces": { + "workflowId": "SanaImageToVideoPipeline:image_to_video", + "sourceTaskTemplateId": "task-template:sana-video-480p:image-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:c807f3241ff651858fcd5bd5b6cd96e798c6a65332c1e59fbdb05d4fa588421b", + "originalReceiptSha256": "2aaa21269bbdb611ed68b550a13409221aa56b7d888f379919dc29e147edd0e0", + "reviewedTemplateSha256": "e6ce9b989e565a3504ccb21781d8522fd3bd3d17715c008ae315b068f7773b1c", + "reviewedCatalogLock": { + "templateLockHash": "tpl_8d90e3f3", + "galleryTemplateLockHash": "tpl_d3be4bd4", + "promptSettingsHash": "ps_8dea3f0f" + }, + "promptSha256": "aa62133485f529242a0859631a4859484afed45e2c357e622f52ffad56a79ea1", + "inputSha256": "0644be42f8f1f2a8f9eed3df2cb14a8709d8b681c23749cc4bb69e41d4d0618e", + "inputLocatorSha256": "3ea07eb59e8127a02b6593b0d072a7592ef1a5f44b182c8963ebd545f578f12b" + }, + "sana_video_water_terraces_before_sunrise": { + "workflowId": "SanaVideoPipeline:text_to_video", + "sourceTaskTemplateId": "task-template:sana-video-480p:text-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:266ff690c34b346935cb27b4e1d26771657ca26bab6094c2b061ba634801bb65", + "originalReceiptSha256": "aaea24f57507173bcfce6f0dc24af5af7eb0f0c5da0dbdee1a81b08b17d2fae7", + "reviewedTemplateSha256": "e5d7bb4cd5fa1b68f4840fc0746bea2aa963c1d8183be0985a66b0789be9f1d1", + "reviewedCatalogLock": { + "templateLockHash": "tpl_1d86546b", + "galleryTemplateLockHash": "tpl_77d9ebc0", + "promptSettingsHash": "ps_85fe160f" + }, + "promptSha256": "867b5dcd7d4c498b66e6151e3ec4ffb29db9cb8928d535f9a3ccaffaaa728547" + }, + "animatediff_red_tram_in_watercolor": { + "workflowId": "AnimateDiffVideoToVideoPipeline:video_to_video", + "sourceTaskTemplateId": "task-template:animatediff-video-to-video:video-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:9d80fa0a57f924fae58e094e400e4309f79e3050b6e90de2c5c177c0d2d1358f", + "originalReceiptSha256": "b88aa5f2d7c8e012280b1d13cb812b1890dbc93ad7d14953504a7ca2bac45917", + "reviewedTemplateSha256": "79480aa4c678fa413f77fa4c1c063f243438f1e6bd4573f90fc7f45c01e6af45", + "reviewedCatalogLock": { + "templateLockHash": "tpl_0fe18d94", + "galleryTemplateLockHash": "tpl_37c948d9", + "promptSettingsHash": "ps_c4dd153c" + }, + "promptSha256": "5e4114aa6979ee5d8612552887db858fa9a4d883f340b61ce5f02b6b33624af1", + "inputSha256": "88b69acee9f0c3572a98e49b23ad0e853dc86e1d15074fca99b47f690dde900f", + "inputLocatorSha256": "32cc3fb9e01e1375293cf66a00f3dc56229e375aeba0094fdd6a0107e682e549" + }, + "allegro_basalt_shore_at_dawn": { + "workflowId": "AllegroPipeline:text_to_video", + "sourceTaskTemplateId": "task-template:allegro:text-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:0e0211e72f2b7ecea3abd2ac10ad362852db2995d4a975bc4d064ea6d89dadb6", + "originalReceiptSha256": "abbadb877960f2cab04d6555a9a95475ae7db80e22d6120439456c69b098b10f", + "reviewedTemplateSha256": "5e7fa20679a68bf73600bf9fcb2bb07fffed7e65d5b01c2cd6276b3d98e8a86d", + "reviewedCatalogLock": { + "templateLockHash": "tpl_8138bbc4", + "galleryTemplateLockHash": "tpl_c1f652c2", + "promptSettingsHash": "ps_96a78038" + }, + "promptSha256": "ccfe56e3e636637a793980764510560071ce6d6e88733853861664ca727166c7" + }, + "animatediff_candlelight_behind_amber_glass": { + "workflowId": "AnimateDiffPipeline:text_to_video", + "sourceTaskTemplateId": "task-template:animatediff:text-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:9387c155d24de33e4d9a5a8115a6baa2818a35613f828908c0d46be3c0ab5c44", + "originalReceiptSha256": "8493c1cd300b662ead386632610603cee2531eeff86668b454b314c66e175f0b", + "reviewedTemplateSha256": "fc3355bbe64d94141436cda1cb7c173be5490cfeeeebacd8609ceee18d5e2109", + "reviewedCatalogLock": { + "templateLockHash": "tpl_64219bac", + "galleryTemplateLockHash": "tpl_6605d595", + "promptSettingsHash": "ps_67c4ef8e" + }, + "promptSha256": "ed5ce7da9120ec8d1bc3c141faa7e191f86bd5417d5e1aab00f6beec22cc5af7" + }, + "wan_vace_amber_rings_after_rain": { + "workflowId": "WanVACEPipeline:text_to_video", + "sourceTaskTemplateId": "wan_vace_direct_text_to_video", + "retainedGraphHash": "sha256:canonical-graph-v1:3eb2a114a3997bf20ad212143012e33fcc59e35c7aebb7a78ad5c04793c5de09", + "originalReceiptSha256": "111a1e8352784824dc9d3cb094113e0547b19cd50416b072cff31356c95a0124", + "reviewedTemplateSha256": "520b484950dcf0432791f4a00d6ad8c5de4c785849563aefa07d467f36d679d9", + "reviewedCatalogLock": { + "templateLockHash": "tpl_33970a36", + "galleryTemplateLockHash": "tpl_f7056e34", + "promptSettingsHash": "ps_2a047df0" + }, + "promptSha256": "b8ed1027e4c9b4278d3959aa5941dd46331765d1ef2a731d4557c605218f9bc3" + }, + "wan_a14b_wind_across_pond": { + "workflowId": "WanImageToVideoPipeline:image_to_video", + "sourceTaskTemplateId": "wan_22_i2v_seed_vault", + "retainedGraphHash": "sha256:canonical-graph-v1:0fe1766aff910661f5d55d4bc72abc0a25bd85157b4b9f29e347c67fcb679140", + "originalReceiptSha256": "ad4a68c5d4cd18b02cbcf57d5eb84a8e6ca48512c8b2405cf0e658942c260de2", + "reviewedTemplateSha256": "fd7249fa8e87be9636e616bb278c88abbabc8920e4b093fc896f58b8a8d5dadd", + "reviewedCatalogLock": { + "templateLockHash": "tpl_ed73d76a", + "galleryTemplateLockHash": "tpl_642b4403", + "promptSettingsHash": "ps_f883a531" + }, + "promptSha256": "58437bcca048bffb472a931e6b353e2a6ce31fa67f9817dfffaaa1339d306d46", + "inputSha256": "cd29e54e208f6040d3f4cbbf8c9f096d537f8c71dffb50d5abae3298cc49deaf", + "inputLocatorSha256": "73a3653bae115630375520f4d33bee113745a109e22b1bee94d06aa695747be7" + }, + "wan_ti2v_subway_musician": { + "workflowId": "WanTI2VPipeline:text_to_video", + "sourceTaskTemplateId": "wan_22_ti2v_5b_seed_vault", + "retainedGraphHash": "sha256:canonical-graph-v1:dc5a3915f6767104be7c308fc55384b2abc349a8881e585d48df140b68ee2591", + "originalReceiptSha256": "150e3aea2961acbed6a5fc0ffd8625a0284d64f66c545169b645fdc44927928f", + "reviewedTemplateSha256": "3d639a689fee74a2857de70668d5d6e7939ee25a62025fb84d4435c2b149b183", + "reviewedCatalogLock": { + "templateLockHash": "tpl_f960f001", + "galleryTemplateLockHash": "tpl_97316ddd", + "promptSettingsHash": "ps_007b6d08" + }, + "promptSha256": "43e2a416e56047bdf5e4db4e725c73caab12d75a40064b2497805d4dd8f697ae" + }, + "spandrel_tram_shelter_video_2x": { + "workflowId": "SpandrelVideoUpscale:video_upscale", + "sourceTaskTemplateId": "task-template:real-esrgan-x2-video-upscale:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:ee3276b1993ebb2ab0d6228468f6b3233d73daf72c758a7f2f93d48f3513837e", + "originalReceiptSha256": "7bfd8efa47be68666198cbec16db4d26b427297f0deeb8299cbcd63b1a1df46c", + "reviewedTemplateSha256": "7bbb69fe91f85685502578e96bbcdc6c6bfe1bcf44210a0bcb1315e003605ce6", + "reviewedCatalogLock": { + "templateLockHash": "tpl_eaa3b6d1", + "galleryTemplateLockHash": "tpl_d84cebd5", + "promptSettingsHash": "ps_a113ad7a" + }, + "inputSha256": "5c24b2b67f893f48e4dbf0d893e0aa4308852592f30f8179b44298cca4ce197e", + "inputLocatorSha256": "f0c6bcf6e2ac02da300d9ea08fff96a335c47e436244ab9b36a3bdd47690cf3b" + }, + "wan_animate_glasshouse_keeper": { + "workflowId": "WanAnimatePipeline:character_replace", + "sourceTaskTemplateId": "task-template:wan-animate:character-replace:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:120c2a963fb5ba4565a577eb4c1730b48d3d52d63f7610b6369c04ebf74af3e5", + "originalReceiptSha256": "3201ab9ec6ce7873a6bb2e48e50bf83956edb4169ff0b2dfa2ba4667a85153c2", + "reviewedTemplateSha256": "c709baafb5f990b9f9ca029bfc04ad15d0006f2c84c85759f6a18d68a0cc565d", + "reviewedCatalogLock": { + "templateLockHash": "tpl_db8a8100", + "galleryTemplateLockHash": "tpl_ed4e5a82", + "promptSettingsHash": "ps_ebb62f19" + }, + "promptSha256": "d59a41833449299a528dee0f0a830e437d3b4e854dcc9130fdc2a9ffe82a9d40", + "inputSha256": "ade9d6ac1301a5df16c94c0a03b25d201719f38766874b473f3c22c3fdd84be5", + "inputLocatorSha256": "ca0e442b88fd3082f32afdde686253739533435631755c91a5ae3cad6d008ea2", + "videoConditionerHashes": { + "face": "b90706154957e438dc3df732e59b97467872221695ec87b3e135c8ad29ec9a7f", + "pose": "2fd6db2696b9a6bc7457bb8b747af5cd7ec4ec5603e86b06f01e591f17ed39f2", + "background": "56d9cdc81884fc95644f38a5761ce4be55a441be9c572d3112f2c324541c315e", + "mask": "66238c0f48aef7920122e948c9bfccb8c3c9af842ac989ba744edb575d30f3e2" + } + }, + "animatediff_pag_snowmelt_over_river_stones": { + "workflowId": "AnimateDiffPAGPipeline:text_to_video", + "sourceTaskTemplateId": "task-template:animatediff-pag:text-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:23e63b2c8f8206eeaef3e3745b623c351e586aa733cdaa01f278f1e3409e732c", + "originalReceiptSha256": "60f21d1b1bbbf6d135ced0bd8ab0935a0c62ae95ccefd8d4df6f8bd3a1110343", + "reviewedTemplateSha256": "43087167a4f17c0d0306e72d14750b647cb25811d30726ff3ef5cb57eb37ac4e", + "reviewedCatalogLock": { + "templateLockHash": "tpl_e45524ce", + "galleryTemplateLockHash": "tpl_71c3b95f", + "promptSettingsHash": "ps_b7b30a2a" + }, + "promptSha256": "7e236f35e567abdfe0bab0fb2594e230faea1c5701bd1df7700c3b0ee25c0e4a" + }, + "ltx2_surf_below_the_breakwater": { + "workflowId": "LTX2Pipeline:text_to_video", + "sourceTaskTemplateId": "task-template:ltx2-standard:text-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:b59a7ddbfe865b3d21d1aaa5a7a3dee9277b4b96ecd4e5dcad4f86fa4518d7b0", + "originalReceiptSha256": "5e938a68e6a39a2bb071767f7b82ce56c442a44e513d33c414d4952c4621b17d", + "reviewedTemplateSha256": "0a58a9b6f8ac6a0308cf5e137d09d9412579d9ec92133231858ced4d45e4a01e", + "reviewedCatalogLock": { + "templateLockHash": "tpl_ce9fac63", + "galleryTemplateLockHash": "tpl_d1c61711", + "promptSettingsHash": "ps_c0f28184" + }, + "promptSha256": "09993ec8105ba83b519f1e4ce8adf7ad05854a40b03a88c4ca489e96df156f66" + }, + "ltx2_kiln_at_first_light": { + "workflowId": "LTX2ConditionPipeline:text_to_video", + "sourceTaskTemplateId": "task-template:ltx2:text-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:7301039ea45039f64b122f548aa716f25eb7185cd976f0f0a0b6638c9cb16dfa", + "originalReceiptSha256": "29bc54454d95ecf8dbcf8e2c63cc2642f3d22c06b396273d82b962df59d0aa8b", + "reviewedTemplateSha256": "172e79d27a5e6add55ba522752c17fddb4fb44998d3ff152056befa619c4f5a7", + "reviewedCatalogLock": { + "templateLockHash": "tpl_9b95d216", + "galleryTemplateLockHash": "tpl_36ff17c8", + "promptSettingsHash": "ps_e97cbf70" + }, + "promptSha256": "f06a2bf8d4c912559ed2fc27c6f92b24f1bea16b68b86063f0fa9b681234493f" + }, + "ltx2_glasshouse_drip": { + "workflowId": "LTX2ConditionPipeline:image_to_video", + "sourceTaskTemplateId": "task-template:ltx2:image-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:dd5427ed763a352409689fbf23e57249d830e5ddf7c4ec23c34b4a219d1d9c47", + "originalReceiptSha256": "be5cdbcbab18a06d596223e1372e27b6891e4ea83c1f6534831cd1281227f83c", + "reviewedTemplateSha256": "8e9c88d288257a9ccf86964d32b68646882ceaf3c65b4cae91af6d89eea4e1cb", + "reviewedCatalogLock": { + "templateLockHash": "tpl_eab36b5f", + "galleryTemplateLockHash": "tpl_f369615f", + "promptSettingsHash": "ps_7cadd917" + }, + "promptSha256": "8b66cc740270aa4defbaa73de90c26fe15606f08cc5c598ab648888dc71c3f4b", + "inputSha256": "124d647abcc3d14dcd8388d749814e0b11bc5df820d126e9542ca2f333f73c73", + "inputLocatorSha256": "907a1dfbbd48485ff5f8ad29cbecfc70b658ad49affeed49fbe32454f024dec6" + }, + "wan_animate_signal_through_the_rain": { + "workflowId": "WanAnimatePipeline:character_animate", + "sourceTaskTemplateId": "task-template:wan-animate:character-animate:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:916a843dde25e718457b5621fd1bfa9201300d322cf480133154b0722aa62209", + "originalReceiptSha256": "e40425560eca0a78b964f7eedc9fa5256f93d728be913e8245c0302bd201faf2", + "reviewedTemplateSha256": "3dd570d231c6fb4075f50264809e570747f00ed8f85d367ee494c7d7cd5fe4bf", + "reviewedCatalogLock": { + "templateLockHash": "tpl_1600b960", + "galleryTemplateLockHash": "tpl_28a23eb2", + "promptSettingsHash": "ps_9bf912f3" + }, + "promptSha256": "3bedfa90d73e181781a22ed29cef7d7a41747ed86036dcee73a14badd0d77c92", + "inputSha256": "5e73a03d1c557ef5572faad8f7b270ceb33be54e311982450fb5df2ba799d668", + "inputLocatorSha256": "25d5e368f6217b72299d928af452032ce555f0847722bc56af6a7844f181af0a", + "videoConditionerHashes": { + "face": "523c3b8d098977aa228f4319b81e675cb31ea96394eda45125dbfa24721d0d68", + "pose": "2fd6db2696b9a6bc7457bb8b747af5cd7ec4ec5603e86b06f01e591f17ed39f2" + } + }, + "latte_water_folding_over_slate": { + "workflowId": "LattePipeline:text_to_video", + "sourceTaskTemplateId": "task-template:latte:text-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:602be3cfda32fd79e4700a8ee3b17bafdac7c0f8661ccc6dcdf516a418110461", + "originalReceiptSha256": "b3945315f5fa033cb7721f2d5dd7a789c75fd30157aeaf4fc137074fe3cd368a", + "reviewedTemplateSha256": "663502fcbb5c79310582bf01e0dab2dfba6abadfa43d044f834b8ab10d5bb145", + "reviewedCatalogLock": { + "templateLockHash": "tpl_9dfcf70b", + "galleryTemplateLockHash": "tpl_65b5cee5", + "promptSettingsHash": "ps_83921a2b" + }, + "promptSha256": "d60ce202b766bca9a24140e2976829ee572e929d52560d120c1e85a8648894c5" + }, + "chroma_copper_medallion_outpaint": { + "workflowId": "ChromaInpaintPipeline:outpaint", + "sourceTaskTemplateId": "task-template:chroma1-hd-inpaint:outpaint:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:6b4352e7c6d634521c5ffef10a8d4f9d6ccdcb8e3c2a1c58f9a629afc551cfed", + "originalReceiptSha256": "aca4038c57ccfc738f45a28e69a99d43eaf195fd4225e973d0046e3dabb4d44c", + "reviewedTemplateSha256": "9fecd969c5c6398a2e8194ac8ab7aac9b905267b88bf96f9062cecc16fee7223", + "reviewedCatalogLock": { + "templateLockHash": "tpl_b3dd8566", + "galleryTemplateLockHash": "tpl_9d214139", + "promptSettingsHash": "ps_2aa6587e" + }, + "promptSha256": "433d9f69168f398469fd44d1922be48054adf13096ee080955196df5a000ee11", + "inputSha256": "a8aaf9be57bc6bab356c5c1f9b76a1458e7e85e9daf6681e7e38a28fc28e1535", + "inputLocatorSha256": "1fb1220647ce10288763dd31b8eae1183223bb89b8be2e2425ad276b167c6020" + }, + "ltx2_enamel_teapot_window_light": { + "workflowId": "LTX2ConditionPipeline:reference_to_video", + "sourceTaskTemplateId": "task-template:ltx2:reference-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:88e46ced175df74ba7e8788d085e7543203a02f3518f6fc0296f370f7dcf1a40", + "originalReceiptSha256": "ad1b4d998fc460f0e60c7ab6131bd155c69c96b8f891067f3e28d140961a0cd6", + "reviewedTemplateSha256": "8c01a644d54c04e3ebb653cba32cdf1b14a18c7167e52ef95fdc392aad28599a", + "reviewedCatalogLock": { + "templateLockHash": "tpl_1e93baae", + "galleryTemplateLockHash": "tpl_6cc90a68", + "promptSettingsHash": "ps_9ed12354" + }, + "promptSha256": "666abf5e1ef440d7f09753aa5fee348de97b2feed20a7666d9b71c44c36b4fea", + "inputSha256": "7be24582bd4f26633a636c4110e38baecd94e6c6b3fd35450848f97bc07f2855", + "inputLocatorSha256": "081315f134158bcbff32a84d980fb9aaf32d2531769298002200b295f574322f" + }, + "ltx2_moss_and_basalt": { + "workflowId": "LTX2ConditionPipeline:video_to_video", + "sourceTaskTemplateId": "task-template:ltx2:video-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:b5dfe89e55b083b29e1afa57472019ae9b3a123628162b94d3659c58f8d53af8", + "originalReceiptSha256": "740a535f4c22c2555805e41afd0775e17982cb4352160cd7a645f40e5b078805", + "reviewedTemplateSha256": "680ec55c2e867aab22c21e907eb3ab183c6639af4cd8ba877e6bcec732a5ce1a", + "reviewedCatalogLock": { + "templateLockHash": "tpl_47093481", + "galleryTemplateLockHash": "tpl_b6f15221", + "promptSettingsHash": "ps_637d1d2f" + }, + "promptSha256": "3e581608baa3ede9638fbe51b85a4753d8faea65d69f55fcbbf64a74ed7acc90", + "inputSha256": "3b5e40ac2bf76236d1f901a7a2522addd7c4a1b2701bd89a33c1506b1523bc38", + "inputLocatorSha256": "5640e07d1d708c40a1eeb37577c680cd6489388991816f336b9c31e74b822901" + }, + "sdxl_pag_lighthouse_in_graphite": { + "workflowId": "StableDiffusionXLPAGPipeline:edit_image", + "sourceTaskTemplateId": "task-template:sdxl-pag:edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:44c2801331dfd7f8d54f9f8dd240bc901d7d4e855d8244accbdf111b04696361", + "originalReceiptSha256": "8c57f2453fb72d6ae859a5e52f62c6086cce0a0902f7bff28d5687b52ab87a63", + "reviewedTemplateSha256": "6eb3e04961a9389794619d6ae2342a296287039deb1d08715a785409b279cba3", + "reviewedCatalogLock": { + "templateLockHash": "tpl_b7de231d", + "galleryTemplateLockHash": "tpl_23c07813", + "promptSettingsHash": "ps_91059256" + }, + "promptSha256": "a56d9641a19df5131eb253541bf0f481f0e7f0f662cc5793746512db1c175a37", + "inputSha256": "4cbc984b44c398b6e92b4350513d3543139e9dffe01a38857845c8a7698272c8", + "inputLocatorSha256": "84e8c618763d14e45181b49cef2ef920860384c90c85154c408bb6c91a01c335" + }, + "flux_dev_forest_green_teapot": { + "workflowId": "FluxDevPipeline:edit_image", + "sourceTaskTemplateId": "task-template:flux-dev:edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:234b1d91dd85fbdb63119e93334c45509d81ec63cf35ff7c2917989a02facfb7", + "originalReceiptSha256": "c07e1306c0441d732e2cc24b652e2d9223ba77dd5597030b39bba3c6b271ab0c", + "reviewedTemplateSha256": "733622609f54510a405766166f8b6a2e00eabffc71dccbe5d780eddf18aa63cd", + "reviewedCatalogLock": { + "templateLockHash": "tpl_3dc8367a", + "galleryTemplateLockHash": "tpl_266f6def", + "promptSettingsHash": "ps_75d3d1bb" + }, + "promptSha256": "06ce821665019d8713881a8322b6b02217d4928d2382db9b0bcb6ae4b4703e16", + "inputSha256": "443062a26e22e3542e284f50d0274b7c70b881b3cce76568eb8eb22ce4c396d6", + "inputLocatorSha256": "d42aaca5c9404cc9f28c5db1e7ca570979b8c08345f7535db7ace6c3562391e9" + }, + "animatelcm_sunlit_surf": { + "workflowId": "AnimateLCMPipeline:text_to_video", + "sourceTaskTemplateId": "task-template:animatelcm:text-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:1ca2a40982413d74048c1a056d99e663a004ffca73f8982ba51b12e3821de692", + "originalReceiptSha256": "42c865106617e74f0b4f283316e1712eecfb61e8a78b1d02dfaff346ba718e20", + "reviewedTemplateSha256": "8eb9c374cf4d54c48fc6dab608b1cd5a20acde2948f3e56d0bace61f48f946eb", + "reviewedCatalogLock": { + "templateLockHash": "tpl_3954921d", + "galleryTemplateLockHash": "tpl_d58d08a0", + "promptSettingsHash": "ps_edc78e93" + }, + "promptSha256": "07dae0da2bd2c824ff9f5094cf6dee360e0b08d2ec73c4d60879e4da49079752" + }, + "flux_kontext_bookshop_clear_glass": { + "workflowId": "FluxKontextInpaintPipeline:inpaint", + "sourceTaskTemplateId": "task-template:flux-kontext-inpaint-direct:inpaint:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:a9cc4b1c398fd96d027e5f13d281eedc73357ae004f2d6c46e8ecac4dd401b5b", + "originalReceiptSha256": "393c69f7733fdfd3632682204dbf421cfff4578d0b86c911f4c15110c566ac90", + "reviewedTemplateSha256": "e0b3aa2e3ac0aaf75006ed8110ff7420862ccaef4e03da53db5626f12fc278b6", + "reviewedCatalogLock": { + "templateLockHash": "tpl_69d64dc9", + "galleryTemplateLockHash": "tpl_66d098da", + "promptSettingsHash": "ps_b8e8c482" + }, + "promptSha256": "a7a379c6307dd28a07e15932928b9b7b19877568ddc6c922ced663a3e130ac72", + "inputSha256": "ff045be510a0e88cbab69bbe8c3794dd26bd19036bdec26a63a5b6ea5a11bc66", + "inputLocatorSha256": "ba62f91337905681e60c207cb7c94b5674841dbf814c026e6780f76bca2e8c52", + "maskSha256": "6f9114963580bd8942bc25e31e67a7fa2f7fdea73c775dd49bb9972c65829578" + }, + "sdxl_pag_two_tier_cobalt_glass": { + "workflowId": "StableDiffusionXLPAGPipeline:control_edit_image", + "sourceTaskTemplateId": "task-template:sdxl-pag-controlnet-canny:control-edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:42c0dca0bd5a735551bed85d826240aecd5691b1a0ac0762470363013b07d1a6", + "originalReceiptSha256": "3dfdce82491a893be86fe27d00f8a1b9e5a6e3caddb5d3fa7a688b376106fded", + "reviewedTemplateSha256": "09f0d98df7f8807fd95a733b904b52dde05fd41d82f68c31369c3ff7c434120b", + "reviewedCatalogLock": { + "templateLockHash": "tpl_7b0a2c2f", + "galleryTemplateLockHash": "tpl_4a341313", + "promptSettingsHash": "ps_32f2125d" + }, + "promptSha256": "7304e072d0c5b618f301f8f663e4c512d390df517639a0b971ebe69157f2f3bf", + "inputSha256": "ff30b36f685b657db6de0cb59dff37601e147123ba19b9c42a32fc1060bd323e", + "inputLocatorSha256": "b966dd6c256b44b89c050faba78dd69ca11d01c3fa49897ca9f03a61dc3df64c", + "guideSha256": "64e81c4250408ca9a2ffc11e2987413096ae65674c2935a0417a351a50bb3ba4" + }, + "wan_vace_amber_glass_stabilized": { + "workflowId": "WanVACEPipeline:video_inpaint", + "sourceTaskTemplateId": "wan_vace_masked_object_replace", + "retainedGraphHash": "sha256:canonical-graph-v1:5b7ac5d2442e6c92e28ee9bff7e02847c3de46dc2570e5d7eb779583f186fc0c", + "originalReceiptSha256": "d5451bccf12b116e53dfb6bb685d4e5cc82d5f949eee3a7feb55bd70921d2f7d", + "reviewedTemplateSha256": "0a03ac711cd90be44c4f79f9d39ce3afa4e0cad264bdfc24294d625ce551181d", + "reviewedCatalogLock": { + "templateLockHash": "tpl_5b0b9cdb", + "galleryTemplateLockHash": "tpl_6035cabd", + "promptSettingsHash": "ps_1cd79e28" + }, + "promptSha256": "79656edb849220336b96beeec58d17955f7f1f9d8cc7113a5c0387a401c79bbe", + "inputSha256": "da6a0abe90bfc8c4efcb4a63201a6db839c944416cef49d452b629fbb86c3ec0", + "inputLocatorSha256": "ffaaf8cd52d49e8d2cb2f7841f95af434b2e0db1cb320ed9ddda6b5bc83e6874", + "maskSha256": "c8eefe9665e6ba8965e7d48c5e6116f2e3ba230ac35390efb834140c5d4cdf8b", + "referenceImageSha256": "43a36ae8d33da045a6ad1321195cd163ce3188e1d119008860386afacd21dbc2" + }, + "ltx_long_wind_and_tide_at_the_headland": { + "workflowId": "LTXI2VLongMultiPromptPipeline:image_to_video", + "sourceTaskTemplateId": "task-template:ltx-long:image-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:cdee10882c28fd4417274cbcd16101f9b7a2d144cf8ab828ab261ff6b660e673", + "originalReceiptSha256": "931a643453b17f494211e7a1663a7d1ea65444b8c5e92d7eb6f3c0b46412fafa", + "reviewedTemplateSha256": "73e9ef351cbe53f541789d49ac53118ad61dbc234b40f1c516bd982f9e621153", + "reviewedCatalogLock": { + "templateLockHash": "tpl_c88d362b", + "galleryTemplateLockHash": "tpl_3bb28fd4", + "promptSettingsHash": "ps_75d6a3e5" + }, + "promptSha256": "46826d4c16c0e700fd7f24ce5eb4c04af3c69ea290180244bcd062c3c6a46d79", + "inputSha256": "51624f59295a77119bf336a63bfc7731d33d6612bc44b15495bddabdfae3ef51", + "inputLocatorSha256": "ff67721141957f1b8ee5881a9036cf19512f0dfe8e068e682da35a39060121ad" + }, + "audioldm2_wind_through_high_pines": { + "workflowId": "AudioLDM2Pipeline:text_to_audio", + "sourceTaskTemplateId": "task-template:audioldm2-base:text-to-audio:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:3b4e9f186c35a687114a08eef220f841aba92feaae4d515ce9c6b15252750cd5", + "originalReceiptSha256": "23a27ed8d0cdd7b64c550a961a66853c304e6516533018995fb8e91b8d77dec4", + "reviewedTemplateSha256": "1e95e96945a61ebe10ce15747c762aacbb9cc86520b8cf826aa9a4b91b7f9edd", + "reviewedCatalogLock": { + "templateLockHash": "tpl_3490e48c", + "galleryTemplateLockHash": "tpl_576af977", + "promptSettingsHash": "ps_0a65234d" + }, + "promptSha256": "cdf4f4e12b557231ea6404ae2fb46fef4975a772c2f434a9920386b506ffbe01" + }, + "stable_audio_glass_roof_rain": { + "workflowId": "StableAudioPipeline:text_to_audio", + "sourceTaskTemplateId": "task-template:stable-audio-open-1.0:text-to-audio:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:292049221515a4d709fe400c1d7a75b33e01aa98b2946392761d627fd68f1303", + "originalReceiptSha256": "340891873dc3e460a9d58a70896bdd40b032150f595b241169fe90c5c277ffe4", + "reviewedTemplateSha256": "98b2b306a1e1b6198b80157de33d35a146532b246d2bdd4effb1bbc10415014f", + "reviewedCatalogLock": { + "templateLockHash": "tpl_489c679d", + "galleryTemplateLockHash": "tpl_f2ac2522", + "promptSettingsHash": "ps_0b1b4dfd" + }, + "promptSha256": "0c02765247eaee28f2665fd2913c475b7bc1f3f176bcac72fba1ded830cc95b0" + }, + "stable_video_lighthouse_headland": { + "workflowId": "StableVideoDiffusionPipeline:image_to_video", + "sourceTaskTemplateId": "task-template:stable-video-diffusion:image-to-video:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:938d04de55523ebc54353d3af5de6fff1cd17296559fa89132795f846a628df2", + "originalReceiptSha256": "cb576416b62900e99ebee9d9d302c3691028f424466b91cbe80fe1ca335585b3", + "reviewedTemplateSha256": "0ca724757ea5c4d3ddcb75957d99e5c8c25994915ebcb1610565e329e2542bd4", + "reviewedCatalogLock": { + "templateLockHash": "tpl_8c64b556", + "galleryTemplateLockHash": "tpl_bbc20719", + "promptSettingsHash": "ps_a6c010a4" + }, + "promptSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "inputSha256": "41f07c8ec7ab5d7097cba0f77867b61e666c6a803900784697ff816b851b98de", + "inputLocatorSha256": "d79c9efe3b98c7a29473ef76321ca10b42c37381dadfecc2373db7c51b5777ef" + }, + "flux_canny_black_ink_cube": { + "workflowId": "FluxCannyPipeline:control_edit_image", + "sourceTaskTemplateId": "task-template:flux-canny:control-edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:67b6ea243b95dcc3bd650ffad71d1138f4cc7d1d57e243a755d53acc3ed87fa4", + "originalReceiptSha256": "724ce269610cdd5125ec9134578e90efa01e8a5983e40f24c6430d75c482a33f", + "reviewedTemplateSha256": "31fd14f25aae5426b9b42550ef75f26b26e4847703460e6076bcefea1d9c8cc6", + "reviewedCatalogLock": { + "templateLockHash": "tpl_6309469e", + "galleryTemplateLockHash": "tpl_35d15309", + "promptSettingsHash": "ps_62bb6180" + }, + "promptSha256": "1ec08bfc27e69f226af0d8ce5d8588afb0c103c25b2399189b9f84ade100fbff", + "inputSha256": "0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "inputLocatorSha256": "00d3f6164f425c19f3865f5816408f5ab4f9964483c22293c3b855ca62dfda47", + "guideSha256": "fb9c9cd18138c124335a688b92c15f3194b0f0071f1dac710b71870b9e3b361f" + }, + "flux_depth_marine_teal_bow_edit": { + "workflowId": "FluxDepthPipeline:control_edit_image", + "sourceTaskTemplateId": "task-template:flux-depth:control-edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:fb0d8ae61d4bde3d097d3dfb64fe2f8d3d91e03c30fc36d89cf96ab650313a0d", + "originalReceiptSha256": "0058748cdd192a232fed65515497b9f245d45b3da79f7eeae3edb3ffd040e1d4", + "reviewedTemplateSha256": "4495ab72ea261fbec0dbbe7796bbb1927c5acf5a39dcd6cc28ae13496c76c019", + "reviewedCatalogLock": { + "templateLockHash": "tpl_74cd6773", + "galleryTemplateLockHash": "tpl_9c2a8470", + "promptSettingsHash": "ps_fdc2afcb" + }, + "promptSha256": "b83acc336b8f6dcbf6bb984c351b31875c619517b186894512fc78d58fe73302", + "inputSha256": "c3d52c29b6a8cae80d2feffb8a978cded8b34509abd09216f665ab3af13f189e", + "inputLocatorSha256": "413b3d05273c8b38fd36af33d25ef9f1f5e017f7cdc243f861c9138f071ad452", + "guideSha256": "2e202069a584ee5ada91e2deaea6bf7b92a94f4816e669e695d7cb64d5a1cb0e" + }, + "pixart_sigma_terracotta_herbs": { + "workflowId": "PixArtSigmaPipeline:text_to_image", + "sourceTaskTemplateId": "task-template:pixart-sigma-1024:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:45bdf2a38647f2c0aaa52206922a4a32a60e4253a3d6cf9185f7007125d367f4", + "originalReceiptSha256": "9076f16b4370211173012a13026466ed57e9b82f92a720e5a337391ec71dbe63", + "reviewedTemplateSha256": "480e216355d747c12b2bb430d60fb8b3f6e774775d7976d5ffcf2fc108af82ee", + "reviewedCatalogLock": { + "templateLockHash": "tpl_41e35f4c", + "galleryTemplateLockHash": "tpl_a325d457", + "promptSettingsHash": "ps_7d930751" + }, + "promptSha256": "813f8878c0e2ff1f2dfeba644ba0c587bbfc5f22664a590ac6733ce4e8a459e6" + }, + "pixart_sigma_pag_pink_mascot": { + "workflowId": "PixArtSigmaPAGPipeline:text_to_image", + "sourceTaskTemplateId": "task-template:pixart-sigma-1024-pag:text-to-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:202b5ad2b76097f3e45033e55153e9077e4110164e5878672526eeb72d986b57", + "originalReceiptSha256": "54cc8c6e36ad415979c524badb765ea92ef6d2e3de0cbee165f1d77d0fad26c4", + "reviewedTemplateSha256": "f1f33d46c694c535230dc9b15fd3c021ad4b4b9a9a70d99a5596c01c3a5f2025", + "reviewedCatalogLock": { + "templateLockHash": "tpl_547b61fe", + "galleryTemplateLockHash": "tpl_723f7b31", + "promptSettingsHash": "ps_13489954" + } + }, + "ddpm_cifar32_technical_preview": { + "workflowId": "DDPMPipeline:unconditional_image", + "sourceTaskTemplateId": "task-template:ddpm-cifar10:unconditional-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:4fc0c90a6cd5807a3e07843afc9b41d2464390cd6d445b418d0cc48ce964ecc7", + "originalReceiptSha256": "61f703fb3a33e10d66c0d7b365b2960bcef3adebef89ed32e25da14310758c62", + "reviewedTemplateSha256": "ea0657f083a38e463cf3e03212cb1080bf03a810f8feb162a0f80176cf48b34e", + "reviewedCatalogLock": { + "templateLockHash": "tpl_56aaf24b", + "galleryTemplateLockHash": "tpl_9d22bacd", + "promptSettingsHash": "ps_e4c5ee1c" + } + }, + "consistency_64_technical_preview": { + "workflowId": "ConsistencyModelPipeline:unconditional_image", + "sourceTaskTemplateId": "task-template:consistency-imagenet64:unconditional-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:6912051646a49f18b61e7f98fdf9665059818faaac3ca3d29c796b32941ee479", + "originalReceiptSha256": "334fff51739318953bc9c5b7c98530c929b8765592f800d1ec9f4453744e9495", + "reviewedTemplateSha256": "7c73b72123f3a2fc2e3bdef6594d378cfdb16bf862bab5aa0c230cde93e52bfb", + "reviewedCatalogLock": { + "templateLockHash": "tpl_cdc10e5d", + "galleryTemplateLockHash": "tpl_2aa7d54b", + "promptSettingsHash": "ps_b171853c" + } + }, + "shap_e_traffic_cone_turntable": { + "workflowId": "ShapEPipeline:text_to_3d", + "sourceTaskTemplateId": "task-template:shap-e:text-to-3d:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:eb319f05ba885a4c4e8c35fd06126484d519a95c1fd8078d85cd95574d6c8d08", + "originalReceiptSha256": "c5790dffe67ccbdf93d3d073d3b1018770c296cba10d9b9b99902c56a79b2620", + "reviewedTemplateSha256": "fa62bcb8142d0e8e3cf7816cc648ca33ae32dfcfebb83d455c52e14f662a8ff2", + "reviewedCatalogLock": { + "templateLockHash": "tpl_12256c8e", + "galleryTemplateLockHash": "tpl_60ef5b65", + "promptSettingsHash": "ps_7ddd815e" + }, + "promptSha256": "2c167518c1795e7ce461c297f3f9e1a92b7d5e0dcc49a059d49f190cca7cbd00" + } +} diff --git a/config/retained-gallery-legacy-recipe-locks.v1.json b/config/retained-gallery-legacy-recipe-locks.v1.json new file mode 100644 index 00000000..d409a10d --- /dev/null +++ b/config/retained-gallery-legacy-recipe-locks.v1.json @@ -0,0 +1,101 @@ +{ + "marigold_depth_synthetic_ramp": { + "workflowId": "MarigoldDepthPipeline:depth_estimation", + "sourceTaskTemplateId": "task-template:marigold-depth-lcm-v1-0:depth-estimation:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:ee35e710ecaf34a8a57d93fbefeea28b6a3795027ea8a3a872178501e852e06a", + "originalReceiptSha256": "1c358ef18df00556b704f826c706674d5ddbd89d8ad091478da862b8ad87c6ea", + "reviewedTemplateSha256": "4e43813ae0e4b664e4982545884644ec097eb0cc25e8f13ff549ac24c2f49ce1", + "reviewedCatalogLock": { + "templateLockHash": "tpl_bf1d929b", + "galleryTemplateLockHash": "tpl_611e9ad6", + "promptSettingsHash": "ps_d0a17851" + }, + "inputSha256": "626815c78eaad46cad849732d1598b45b91700ce046c1ee3f4e2444db80aa32a", + "inputFileName": "marigold-depth-source.png" + }, + "spandrel_x2_synthetic_gradient": { + "workflowId": "SpandrelImageUpscale:image_upscale", + "sourceTaskTemplateId": "task-template:real-esrgan-x2-image-upscale:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:700b85c678b691dee3c8ad1e2ea6d4cc0017d1b12d47704e45e913e17f929451", + "originalReceiptSha256": "49336b0f76e158b3be514275763e8b2c50f00c048852a34cff43167687503f15", + "reviewedTemplateSha256": "8de95b8b13a0636a37a7db672fbced2199e00e6719517c282f68f685bc5fd482", + "reviewedCatalogLock": { + "templateLockHash": "tpl_5d99038b", + "galleryTemplateLockHash": "tpl_43c3b587", + "promptSettingsHash": "ps_e7556958" + }, + "inputSha256": "626815c78eaad46cad849732d1598b45b91700ce046c1ee3f4e2444db80aa32a", + "inputFileName": "real-esrgan-x2-smoke-source.png" + }, + "smollm2_rain_gauge": { + "workflowId": "HuggingFaceTextGenerationModel:text_generation", + "sourceTaskTemplateId": "task-template:smollm2-135m-instruct:text-generation:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:285625f017e8de78e065d8fc32c9ce71ed9561b008cd5fa0e23ce9cda3dabefe", + "originalReceiptSha256": "4d0e3ad2819d02cc04c3f264145ddd384b17b9dfa39e83f4af6e923bce34f3d8", + "reviewedTemplateSha256": "aab7cfcf15db94d4e3d1415e963cabc0cf7e6a4baafd243d4095539b1004545b", + "reviewedCatalogLock": { + "templateLockHash": "tpl_84d96f79", + "galleryTemplateLockHash": "tpl_a845a534", + "promptSettingsHash": "ps_fe288802" + }, + "promptSha256": "47eb5ebb2dbce8f755621e569deba76f6f61f251763aeac5fafd5d09be3869b4" + }, + "whisper_tiny_blue_cup_transcription": { + "workflowId": "HuggingFaceSpeechRecognitionModel:speech_to_text", + "sourceTaskTemplateId": "task-template:whisper-tiny:speech-to-text:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:b377ff0dee17374428c2deb83531bdee0b21eac105ea6e81fe705a41c4f98adb", + "originalReceiptSha256": "7ef2a7611856f6a0c111d5e4ffa248201f88718756aed16f5a6a30487e571faa", + "reviewedTemplateSha256": "f9e6bd0b708cc08d7068555be9f4094f68cc9aa6115639792339f50b38c2e35c", + "reviewedCatalogLock": { + "templateLockHash": "tpl_feef81de", + "galleryTemplateLockHash": "tpl_e533ed76", + "promptSettingsHash": "ps_254ff664" + }, + "inputSha256": "d5a4aebb4bd603192b70b0744e6ac158ed10c4c845d423b7fb7b1ef7de0ed41f", + "inputLocatorSha256": "50e837ad6f7de4f94901d12dd299c89410ff225f23a4bd5eb4ccf5621e0aea26" + }, + "lcm_dawn_alpine_lake": { + "workflowId": "LatentConsistencyModelPipeline:edit_image", + "sourceTaskTemplateId": "task-template:lcm-dreamshaper-v7:edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:80fc803df0e8e4fe9a90c302a88cadda57fb613ac3e67857f88fcb24ee7f0a8b", + "originalReceiptSha256": "d29515dfafdcde29ecff2332276275247a6feeae5afd36639da87efc552af4f6", + "reviewedTemplateSha256": "79ee258770b00a581d8e006b743cacd78ad992739353bcfcd724a920eb41fc8e", + "reviewedCatalogLock": { + "templateLockHash": "tpl_606d8d50", + "galleryTemplateLockHash": "tpl_03de02cb", + "promptSettingsHash": "ps_614c9651" + }, + "inputFileName": "prx-linux-bf16-native-efficient-alpine-lake.webp", + "inputSha256": "25fe06d8e93645bc6ff29928556a0cd654aa6d70178d435268b3d17e9188feaa", + "promptSha256": "ec2943b08ef8225e661ab5c3f712a6e555eabd481e4bf2e8ba68b34963367e33" + }, + "sana_sprint_monochrome_tiger": { + "workflowId": "SanaSprintPipeline:edit_image", + "sourceTaskTemplateId": "task-template:sana-sprint-600m:edit-image:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:e69d5c8fa5e75c1387b8dae436e44c580d3b1eb31267946c26b98049e2f7132c", + "originalReceiptSha256": "ec340d225ca8eae07996fc5f93e3561cd25c82e80d1229a3adca1f648ea8d20e", + "reviewedTemplateSha256": "7f1ac6b38c8f3fcc701921fe7f500b4717c4f1bfdf5cc2f059e934972923296b", + "reviewedCatalogLock": { + "templateLockHash": "tpl_b6bc5c52", + "galleryTemplateLockHash": "tpl_8be9c59d", + "promptSettingsHash": "ps_6cb5dccc" + }, + "inputFileName": "retained-tiger-source.webp", + "inputSha256": "a99616590d7d8586a51a25bbe9e36b309f705bc80f2abaab04ac84f1e0d948e4", + "promptSha256": "db2c046f8d489387110e3de23a28dfd52f981d796958433e819988b94c8ed853" + }, + "wav2vec2_station_announcement": { + "workflowId": "HuggingFaceCTCSpeechRecognitionModel:speech_to_text", + "sourceTaskTemplateId": "task-template:wav2vec2-base-960h:speech-to-text:v1", + "retainedGraphHash": "sha256:canonical-graph-v1:36c5afc09d6f5f3be0cf44ba472bc514313464e2c61616a1c934a254f137c1c1", + "originalReceiptSha256": "226c35aaf3a811a8077e0caae4b4652daaf332d3c7718a095f238afde982f7ee", + "reviewedTemplateSha256": "fc0cb2cf3751967eb0ab2910d5b17fd0796bdf047cfc48871e5266346d925e37", + "reviewedCatalogLock": { + "templateLockHash": "tpl_a1f95a4a", + "galleryTemplateLockHash": "tpl_51e4cb19", + "promptSettingsHash": "ps_583a0762" + }, + "inputSha256": "534bf47b7a715e5637443eaf7175e0b2e5288504beb8d8a09d25ee6c66c8d4f8", + "inputLocatorSha256": "b5a6579a0125be7bd9aec165e3f22c0c054f598e4aaaf00b9bf53decbd4f6e18" + } +} diff --git a/config/template-asset-rights.v1.json b/config/template-asset-rights.v1.json index 7f6fa09c..92afdacc 100644 --- a/config/template-asset-rights.v1.json +++ b/config/template-asset-rights.v1.json @@ -1,10 +1,10 @@ { "schemaVersion": 1, - "assetSetId": "sha256:canonical-json:ec61fbc1b76da02110e4a0cddc4e222026e911a6e00451f85678f66d2b32ec85", + "assetSetId": "sha256:canonical-json:2fc79cbb1c9f5a520d57def2623affaeedd307f12f2e34065ec482e485bed13d", "records": [ { "path": "template-gallery/ace_step_audio_continuation.wav", - "sha256": "sha256:bytes:4348daf61934c9e27379efcdabe7891d2a258f2a11d346726f221e35ae954e83", + "sha256": "sha256:bytes:b9bddd5ca2933c064a1dd0f58b7ab438882adb9d1b0aea1ab640999a0e81322f", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", @@ -17,12 +17,12 @@ ], "aiGenerated": true, "humanLikenessConsent": "synthetic", - "marks": [], + "marks": ["MoDiff project name in the project-authored lyrics"], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-accepted-registration", "provenanceTemplateId": "ace_step_audio_continuation" }, { @@ -50,11 +50,11 @@ }, { "path": "template-gallery/ace_step_audio_repaint.wav", - "sha256": "sha256:bytes:dffe1277ff9b72c952abfd6e2e869f6db595de834649db78bffbf6ae1ec42c44", + "sha256": "sha256:bytes:f3741a6a23c75a564e3f860fb0c308efc456a4b9e4c2f641b6246a0bce4aa41b", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", "sourceUrl": "https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", "sourceRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", @@ -67,9 +67,12 @@ "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ace_step_audio_repaint" + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "ace_step_audio_repaint", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "f3741a6a23c75a564e3f860fb0c308efc456a4b9e4c2f641b6246a0bce4aa41b", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" }, { "path": "template-gallery/ace_step_audio_variation.card-poster.png", @@ -95,26 +98,28 @@ "provenanceTemplateId": "ace_step_audio_variation" }, { - "path": "template-gallery/ace_step_audio_variation.wav", - "sha256": "sha256:bytes:9cfcf80ef850634fa6f74c06609949b0f0a513e77d782409db8db48751bbe03a", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", - "sourceRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", + "sourceUrl": "https://huggingface.co/ACE-Step/acestep-v15-xl-base-diffusers/tree/8f40447d21ee59ad4dcee6c99ce248027410bfec", + "sourceRevision": "ACE-Step/acestep-v15-xl-base-diffusers@8f40447d21ee59ad4dcee6c99ce248027410bfec", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "ACE-Step/acestep-v15-xl-turbo-diffusers: MIT; https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0" + "ACE-Step/acestep-v15-xl-base-diffusers: MIT (pinned publisher model-card declaration); https://huggingface.co/ACE-Step/acestep-v15-xl-base-diffusers/tree/8f40447d21ee59ad4dcee6c99ce248027410bfec" ], "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", + "path": "template-gallery/ace_step_audio_variation.wav", + "sha256": "sha256:bytes:c74a4a00a39369cea14791f9590534d19402245646d842be34d0f7893ae4937b", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", "provenanceTemplateId": "ace_step_audio_variation" }, { @@ -212,78 +217,84 @@ "provenanceTemplateId": "ace_step_lyric_music_video" }, { - "path": "template-gallery/ace_step_lyric_music_video.card-preview.mp4", - "sha256": "sha256:bytes:840295a75bcaa7dec5a3ab33a997ceb7c58043543463c7a2ea26fb45c0a91b7e", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", "sourceUrl": "https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", "sourceRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0 | Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "ACE-Step/acestep-v15-xl-turbo-diffusers: MIT; https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + "ACE-Step/acestep-v15-xl-turbo-diffusers: MIT (pinned publisher model-card declaration); https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTX-Video Open Weights License and output provisions; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" ], "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", + "path": "template-gallery/ace_step_lyric_music_video.card-preview.mp4", + "sha256": "sha256:bytes:973958543be22907def60e7e4c68dcbea1e77b482e732149b8ff11e6d14ded7f", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", "provenanceTemplateId": "ace_step_lyric_music_video" }, { - "path": "template-gallery/ace_step_lyric_music_video.mp4", - "sha256": "sha256:bytes:f2005a050e59405481db1f5a9b24f1b6de8912c92818112bfdc8cf3f8a50bbbb", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", "sourceUrl": "https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", "sourceRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0 | Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "ACE-Step/acestep-v15-xl-turbo-diffusers: MIT; https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + "ACE-Step/acestep-v15-xl-turbo-diffusers: MIT (pinned publisher model-card declaration); https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTX-Video Open Weights License and output provisions; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" ], "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", + "path": "template-gallery/ace_step_lyric_music_video.mp4", + "sha256": "sha256:bytes:59d40623926ebe0bcc5962a43d1885da6618a3ba95b4055e159cc743f9f81dc6", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", "provenanceTemplateId": "ace_step_lyric_music_video" }, { - "path": "template-gallery/ace_step_lyric_music_video.poster.png", - "sha256": "sha256:bytes:edd5ca052421a6033a794a9b86028cf551279090cb78c63d510323343ba6b514", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", "sourceUrl": "https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", "sourceRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0 | Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "ACE-Step/acestep-v15-xl-turbo-diffusers: MIT; https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + "ACE-Step/acestep-v15-xl-turbo-diffusers: MIT (pinned publisher model-card declaration); https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTX-Video Open Weights License and output provisions; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" ], "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", + "path": "template-gallery/ace_step_lyric_music_video.poster.png", + "sha256": "sha256:bytes:71c17ecd2a866566eb1a61684b0e6a3c17b36b46cb425f3dc07a00eec241424b", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", "provenanceTemplateId": "ace_step_lyric_music_video" }, { @@ -334,7 +345,7 @@ }, { "path": "template-gallery/ace_step_text_to_audio.wav", - "sha256": "sha256:bytes:e07d05a658d361b6d28af62bcccfaeba9254507467dae1c5839efd546fed96a7", + "sha256": "sha256:bytes:6b8fe846fb7b55fca9cfb47814f2e135a61cdcbbbc09dcb44a14a2889abcb801", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", @@ -347,1139 +358,1295 @@ ], "aiGenerated": true, "humanLikenessConsent": "synthetic", - "marks": [], + "marks": ["MoDiff project name in the project-authored lyrics"], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-accepted-registration", "provenanceTemplateId": "ace_step_text_to_audio" }, { - "path": "template-gallery/character_edit.webp", - "sha256": "sha256:bytes:2f06039573ec8997f9a871577fcd27bbc302a61b40b8107291e61de4aacb3254", + "path": "template-gallery/allegro_basalt_shore_at_dawn.mp4", + "sha256": "sha256:bytes:339a491d6a2cf77eca00db90989738b55f1d5641321ba0bd95f7ff4439ca15e1", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/rhymes-ai/Allegro/tree/c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6", + "sourceRevision": "rhymes-ai/Allegro@c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + "Publisher model terms at https://huggingface.co/rhymes-ai/Allegro/tree/c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "rhymes-ai/Allegro@c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6 https://huggingface.co/rhymes-ai/Allegro/tree/c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "character_edit" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "allegro_basalt_shore_at_dawn" }, { - "path": "template-gallery/fast_lora.card-poster.webp", - "sha256": "sha256:bytes:071786ad9b3120c3d5981e70c4617cbc9c1ab946bd6aafc7a0e055df02fc27ae", + "path": "template-gallery/alpine_lake_in_oils.webp", + "sha256": "sha256:bytes:734b381cd8bb514a1a3aa4e057aa5675e3cd437381d7e081b7577267fb0222bf", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", - "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 | youknownothing/v1-realism-v1-adapter-ZIT-lora@fd6d52d1199ad47f73c18db58339ad01ef766fa7", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Tongyi-MAI/Z-Image-Turbo: Apache-2.0; https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", - "youknownothing/v1-realism-v1-adapter-ZIT-lora: Apache-2.0; https://huggingface.co/youknownothing/v1-realism-v1-adapter-ZIT-lora/tree/fd6d52d1199ad47f73c18db58339ad01ef766fa7" + "creativeml-openrail-m. https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "fast_lora" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "alpine_lake_in_oils" }, { - "path": "template-gallery/fast_lora.webp", - "sha256": "sha256:bytes:1e25d905f57caa98f22475aa9f031beebf34c37df18c0362cb9fbdff07a7183c", + "path": "template-gallery/animatediff_candlelight_behind_amber_glass.mp4", + "sha256": "sha256:bytes:c309175cb9252e11bba17697d8fe18a6e9e27e61b76710ed8fa58b967cbf8539", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", - "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 | youknownothing/v1-realism-v1-adapter-ZIT-lora@fd6d52d1199ad47f73c18db58339ad01ef766fa7", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Tongyi-MAI/Z-Image-Turbo: Apache-2.0; https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", - "youknownothing/v1-realism-v1-adapter-ZIT-lora: Apache-2.0; https://huggingface.co/youknownothing/v1-realism-v1-adapter-ZIT-lora/tree/fd6d52d1199ad47f73c18db58339ad01ef766fa7" + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "fast_lora" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_candlelight_behind_amber_glass" }, { - "path": "template-gallery/flux2_klein_edit.webp", - "sha256": "sha256:bytes:bf9acaad6fb3458f9688b71dfe7e7b5128570934a19801e6211b4a416c5da0ca", + "path": "template-gallery/animatediff_ivory_balloon_blue_mountains.mp4", + "sha256": "sha256:bytes:741ea097f00b994dc9b26b2bd7cb2095ddb87d9bd3a7d492bf147fd2bd7be99c", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", - "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux2_klein_edit" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_ivory_balloon_blue_mountains" }, { - "path": "template-gallery/flux2_klein_multi_reference.webp", - "sha256": "sha256:bytes:9806aac19e5e4d6de3d9d3b2e0e005b3b827197d23fd9cb9f7d1f8388bc568ac", + "path": "template-gallery/animatediff_pag_snowmelt_over_river_stones.mp4", + "sha256": "sha256:bytes:89f219daf95b6017deaca023289cb1bb44d0e465195dae61b9bd0e64eabb9aef", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", - "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + "https://huggingface.co/guoyww/animatediff-motion-adapter-v1-5-2/tree/6167b88ffe39b4441fdf2113e77b99a6f56b7906", + "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux2_klein_multi_reference" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_pag_snowmelt_over_river_stones" }, { - "path": "template-gallery/flux2_klein_text_to_image.webp", - "sha256": "sha256:bytes:a2e67ad72f797df5dae567e0b05f217483ab2eb6c525686b2767392f4326718a", + "path": "template-gallery/animatediff_red_tram_in_watercolor.mp4", + "sha256": "sha256:bytes:88ddfb68b18872e653bcc7c9c05299f7e84186e3d54ac6f31c33ea9390c1e3be", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", - "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux2_klein_text_to_image" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_red_tram_in_watercolor" }, { - "path": "template-gallery/flux_control_canny.webp", - "sha256": "sha256:bytes:a804cb1321c87b86298ebc4697af4d52628c29615ccda38bfa38eb2c7fc566c3", + "path": "template-gallery/animatediff_red_tram_through_snow.mp4", + "sha256": "sha256:bytes:3082836cafeb4561f57b53b62da63e83602ad4b61c7af02fe2fc75ff83375cb6", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", - "sourceRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "black-forest-labs/FLUX.1-Canny-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_control_canny" + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_red_tram_through_snow" }, { - "path": "template-gallery/flux_depth_control.webp", - "sha256": "sha256:bytes:0251b217bc148491321ae32f1298965127cd193edc348042e42deca3bb2aea9f", + "path": "template-gallery/animatelcm_sunlit_surf.mp4", + "sha256": "sha256:bytes:f3d865965b9a15d9688a1c1944e530bdcccff14e6c7792efe2069ef042f80926", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", - "sourceRevision": "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "black-forest-labs/FLUX.1-Depth-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "https://huggingface.co/wangfuyun/AnimateLCM/tree/3d4d00fc113225e1040f4d3bec504b6ec750c10c" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_depth_control" + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatelcm_sunlit_surf" }, { - "path": "template-gallery/flux_dev_expert_text_to_image.card-poster.webp", - "sha256": "sha256:bytes:13c815eb6d245685e543d000e499036aad973bea6c0d4fff01c670580db08206", + "path": "template-gallery/audioldm2_wind_through_high_pines.wav", + "sha256": "sha256:bytes:6466efff6cc71c5f068df11ab58a1443dfe53ccf28e31c3ad2806590fe6190a6", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" - ], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/cvssp/audioldm2/tree/c8e7e189d324425c05c4c2f81214041ef4107983", + "sourceRevision": "cvssp/audioldm2@c8e7e189d324425c05c4c2f81214041ef4107983", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": ["https://huggingface.co/cvssp/audioldm2/blob/c8e7e189d324425c05c4c2f81214041ef4107983/README.md"], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_dev_expert_text_to_image" + "requiredAttribution": [ + "cvssp/audioldm2@c8e7e189d324425c05c4c2f81214041ef4107983 https://huggingface.co/cvssp/audioldm2/tree/c8e7e189d324425c05c4c2f81214041ef4107983" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c897ae58c52588da56b92e22d8b3c6b7d9becac539057047f38e1303230949da", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "audioldm2_wind_through_high_pines" }, { - "path": "template-gallery/flux_dev_expert_text_to_image.webp", - "sha256": "sha256:bytes:13c815eb6d245685e543d000e499036aad973bea6c0d4fff01c670580db08206", + "path": "template-gallery/bookshop_at_blue_hour.webp", + "sha256": "sha256:bytes:ff045be510a0e88cbab69bbe8c3794dd26bd19036bdec26a63a5b6ea5a11bc66", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/baidu/ERNIE-Image-Turbo/tree/bc68c81e2a1730a394d5fc9fae70713dee940140", + "sourceRevision": "baidu/ERNIE-Image-Turbo@bc68c81e2a1730a394d5fc9fae70713dee940140", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + "apache-2.0. https://huggingface.co/baidu/ERNIE-Image-Turbo/tree/bc68c81e2a1730a394d5fc9fae70713dee940140" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_dev_expert_text_to_image" + "requiredAttribution": [ + "baidu/ERNIE-Image-Turbo@bc68c81e2a1730a394d5fc9fae70713dee940140 https://huggingface.co/baidu/ERNIE-Image-Turbo/tree/bc68c81e2a1730a394d5fc9fae70713dee940140" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "bookshop_at_blue_hour" }, { - "path": "template-gallery/flux_fill_inpaint.webp", - "sha256": "sha256:bytes:a0b1a20336f5a068497be656dbf86a9b48cac36777ddb317cce55191f2dc41a9", + "path": "template-gallery/canal_lantern_in_warm_light.webp", + "sha256": "sha256:bytes:245deed3f2a8ac213c630ac7a8517c625c1eaa60971778d816a55220310ed8c3", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev/tree/358293da0354175698b67ec8299acf928313a78a", - "sourceRevision": "black-forest-labs/FLUX.1-Fill-dev@358293da0354175698b67ec8299acf928313a78a", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/tree/aa76e7f4f4928f378716b6716a2130fba3caf5b1", + "sourceRevision": "Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers@aa76e7f4f4928f378716b6716a2130fba3caf5b1", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "black-forest-labs/FLUX.1-Fill-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev/tree/358293da0354175698b67ec8299acf928313a78a" + "apache-2.0. https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/tree/aa76e7f4f4928f378716b6716a2130fba3caf5b1" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_fill_inpaint" + "requiredAttribution": [ + "Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers@aa76e7f4f4928f378716b6716a2130fba3caf5b1 https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/tree/aa76e7f4f4928f378716b6716a2130fba3caf5b1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "canal_lantern_in_warm_light" }, { - "path": "template-gallery/flux_fill_outpaint.webp", - "sha256": "sha256:bytes:465ba287ed383289877edbcbd3618da81f4971b9935b3161a44ca8d59a25df7b", + "path": "template-gallery/character_edit.webp", + "sha256": "sha256:bytes:c7da13667186b8303eab34103e3e2394e590166cc14a0f5c2c769af8942f035d", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev/tree/358293da0354175698b67ec8299acf928313a78a", - "sourceRevision": "black-forest-labs/FLUX.1-Fill-dev@358293da0354175698b67ec8299acf928313a78a", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "black-forest-labs/FLUX.1-Fill-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev/tree/358293da0354175698b67ec8299acf928313a78a" + "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_fill_outpaint" + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "character_edit", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "c7da13667186b8303eab34103e3e2394e590166cc14a0f5c2c769af8942f035d", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" }, { - "path": "template-gallery/flux_kontext_edit.webp", - "sha256": "sha256:bytes:dd459c5d656e4fd85d42513a615110842ee2784bd13becc94bc3fa9ecd743cd6", + "path": "template-gallery/chroma_alpine_block_print.webp", + "sha256": "sha256:bytes:c8c30a11f94c3100910bd565e04097ebc36fad1c412f7adaa8496092ef55a804", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", - "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "black-forest-labs/FLUX.1-Kontext-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + "Publisher model terms at https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_kontext_edit" + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_alpine_block_print" }, { - "path": "template-gallery/flux_kontext_multi_reference.webp", - "sha256": "sha256:bytes:c20e1c377c9ac7c4ea657daea23c6e3a9c494535e8f9c2a438fa32402eea50c9", + "path": "template-gallery/chroma_copper_medallion_outpaint.webp", + "sha256": "sha256:bytes:c81e3852d6455e213f25a3da135b7a66f65e1aec3477a1a21335606a3259775f", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", - "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "black-forest-labs/FLUX.1-Kontext-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" - ], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": ["https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0"], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_kontext_multi_reference" + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_copper_medallion_outpaint" }, { - "path": "template-gallery/flux_krea_text_to_image.webp", - "sha256": "sha256:bytes:9f421cdc0fa80b3aae368bd3b20a8f6f05942ec461f88541f01aec5390468897", + "path": "template-gallery/chroma_restored_cobalt_backdrop.webp", + "sha256": "sha256:bytes:66e00fa95a61ab9d0f77bce099476dd8ffc569697fe59fb509e8c589402dad9b", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Krea-dev/tree/8162a9c7b05a641be098422bf2fcf335615c2f28", - "sourceRevision": "black-forest-labs/FLUX.1-Krea-dev@8162a9c7b05a641be098422bf2fcf335615c2f28", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "black-forest-labs/FLUX.1-Krea-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Krea-dev/tree/8162a9c7b05a641be098422bf2fcf335615c2f28" + "Publisher model terms at https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_krea_text_to_image" + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_restored_cobalt_backdrop" }, { - "path": "template-gallery/flux_lora_cinematic_octane_3d.card-poster.webp", - "sha256": "sha256:bytes:76d5c8873a12ba7f11366bff658c8d3ed257c557a9ae681c84708b3f52f0f74e", + "path": "template-gallery/chroma_terracotta_and_blue.webp", + "sha256": "sha256:bytes:e8dc514cf845631e498cbcb1ed841d25fe5e62ede712e2e216faba3ec9155df3", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainer (OpenAI-assisted generation)", - "creationMethod": "OpenAI-assisted independent Gallery card-poster generation and WebP conversion", - "sourceUrl": "https://openai.com/policies/terms-of-use/", - "sourceRevision": "Generated 2026-08-03", - "sourceLicense": "Original generation", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "OpenAI Terms of Use: as between the user and OpenAI, the user owns Output to the extent permitted by law; https://openai.com/policies/terms-of-use/" + "https://huggingface.co/lodestones/Chroma1-HD/blob/0e0c60ece1e82b17cb7f77342d765ba5024c40c0/README.md" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_cinematic_octane_3d" + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_terracotta_and_blue" }, { - "path": "template-gallery/flux_lora_film_noir.card-poster.webp", - "sha256": "sha256:bytes:a447504091a2b6bba4a220d950771f7812b2bdf950f3f07df28c73adc499487f", + "path": "template-gallery/cobalt_jug_and_lemons.webp", + "sha256": "sha256:bytes:a8f9d05f34a6bbf631bccbb3eadf1d18824a772f5f1e038248db7bfdc8c0dbba", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | dvyio/flux-lora-film-noir@7a7ff13bbae807a2db6c2e4918f3e13bb1265e60", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "dvyio/flux-lora-film-noir: FLUX.1-dev non-commercial terms; https://huggingface.co/dvyio/flux-lora-film-noir/tree/7a7ff13bbae807a2db6c2e4918f3e13bb1265e60" + "creativeml-openrail-m. https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_film_noir" + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "cobalt_jug_and_lemons" }, { - "path": "template-gallery/flux_lora_film_noir.webp", - "sha256": "sha256:bytes:5ae8246396c0052258704b7ac405e7259986d0780ef7effcfd37fb4310368006", + "path": "template-gallery/cogvideox_mossy_mountain_stream.mp4", + "sha256": "sha256:bytes:3b5e40ac2bf76236d1f901a7a2522addd7c4a1b2701bd89a33c1506b1523bc38", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | dvyio/flux-lora-film-noir@7a7ff13bbae807a2db6c2e4918f3e13bb1265e60", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceRevision": "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "dvyio/flux-lora-film-noir: FLUX.1-dev non-commercial terms; https://huggingface.co/dvyio/flux-lora-film-noir/tree/7a7ff13bbae807a2db6c2e4918f3e13bb1265e60" + "Publisher model terms at https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_film_noir" + "requiredAttribution": [ + "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01 https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "cogvideox_mossy_mountain_stream" }, { - "path": "template-gallery/flux_lora_ghibli_story.card-poster.webp", - "sha256": "sha256:bytes:f4d50d5340cf24a1a8cb24b3feb986a9fd9fb892f86604ecb442b8316430d8f7", - "publishDecision": "hold", - "holdReason": "Obtain written permission to publicly redistribute the generated example; the adapter card states personal-use-only and non-commercial use.", - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/alvarobartt/ghibli-characters-flux-lora", - "sourceRevision": "ed846114c71efc525e7f5a51e274dc976bb970a8", - "sourceLicense": "FLUX.1-dev terms plus adapter personal/non-commercial notice", + "path": "template-gallery/cogvideox_red_tram_model_railway.mp4", + "sha256": "sha256:bytes:483437ccec5394217346dcd88e3bc42a003cba69a6056b1153de4cb5868d7825", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceRevision": "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Ghibli characters FLUX LoRA: personal-use-only and non-commercial; https://huggingface.co/alvarobartt/ghibli-characters-flux-lora", - "FLUX.1-dev output terms; https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21/LICENSE.md" + "Publisher model terms at https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", - "marks": ["Studio Ghibli style reference; no franchise character requested"], - "requiredAttribution": [], - "assetLicense": "upstream-terms-only", - "reviewedBy": null, - "reviewedAt": null, - "reviewClass": "upstream-permission-required", - "provenanceTemplateId": "flux_lora_ghibli_story" + "marks": [], + "requiredAttribution": [ + "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01 https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "cogvideox_red_tram_model_railway" }, { - "path": "template-gallery/flux_lora_ghibli_story.webp", - "sha256": "sha256:bytes:cc07164563ac3cd3c38ea657ce96cd32e6cf9648bdb2cf2ef08af1d337b712b7", - "publishDecision": "hold", - "holdReason": "Obtain written permission to publicly redistribute the generated example; the adapter card states personal-use-only and non-commercial use.", - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/alvarobartt/ghibli-characters-flux-lora", - "sourceRevision": "ed846114c71efc525e7f5a51e274dc976bb970a8", - "sourceLicense": "FLUX.1-dev terms plus adapter personal/non-commercial notice", + "path": "template-gallery/consistency_64_technical_preview.webp", + "sha256": "sha256:bytes:51a46954f6fbb16fa13807e9f376ab88a70fd39fc4d134101ebc560569d5a59a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/openai/diffusers-cd_imagenet64_l2/tree/5f462e4403fc37b72ec6004e806c71805db22387", + "sourceRevision": "openai/diffusers-cd_imagenet64_l2@5f462e4403fc37b72ec6004e806c71805db22387", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Ghibli characters FLUX LoRA: personal-use-only and non-commercial; https://huggingface.co/alvarobartt/ghibli-characters-flux-lora", - "FLUX.1-dev output terms; https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21/LICENSE.md" + "Publisher model terms at https://huggingface.co/openai/diffusers-cd_imagenet64_l2/tree/5f462e4403fc37b72ec6004e806c71805db22387" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", - "marks": ["Studio Ghibli style reference; no franchise character requested"], - "requiredAttribution": [], - "assetLicense": "upstream-terms-only", - "reviewedBy": null, - "reviewedAt": null, - "reviewClass": "upstream-permission-required", - "provenanceTemplateId": "flux_lora_ghibli_story" + "marks": [], + "requiredAttribution": [ + "openai/diffusers-cd_imagenet64_l2@5f462e4403fc37b72ec6004e806c71805db22387 https://huggingface.co/openai/diffusers-cd_imagenet64_l2/tree/5f462e4403fc37b72ec6004e806c71805db22387" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "efc64011c443b1678207c0dfd79e89def1c0dc3699668f058803e9044b4bd281", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "consistency_64_technical_preview" }, { - "path": "template-gallery/flux_lora_oil_painting.card-poster.webp", - "sha256": "sha256:bytes:f34c7d8a787a16dbdea073fd9658571f6371d0d79887b0fc14b1637fe63b7e03", + "path": "template-gallery/copper_hour_dunes.webp", + "sha256": "sha256:bytes:45eabeca35fe5982441c80158faa69bca6da1d7f2efb3002a81a8b5c03ae4ef2", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | dtthanh/flux_oil_painting_lora@1118ed195c7304ffc52a6cd42b41a520ef749cd9", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Photoroom/prx-512-t2i-sft/tree/2996423bc26e8eaca48774fac1797484214dfea0", + "sourceRevision": "Photoroom/prx-512-t2i-sft@2996423bc26e8eaca48774fac1797484214dfea0", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "dtthanh/flux_oil_painting_lora: Apache-2.0; https://huggingface.co/dtthanh/flux_oil_painting_lora/tree/1118ed195c7304ffc52a6cd42b41a520ef749cd9" + "apache-2.0. https://huggingface.co/Photoroom/prx-512-t2i-sft/tree/2996423bc26e8eaca48774fac1797484214dfea0" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_oil_painting" + "requiredAttribution": [ + "Photoroom/prx-512-t2i-sft@2996423bc26e8eaca48774fac1797484214dfea0 https://huggingface.co/Photoroom/prx-512-t2i-sft/tree/2996423bc26e8eaca48774fac1797484214dfea0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "copper_hour_dunes" }, { - "path": "template-gallery/flux_lora_oil_painting.webp", - "sha256": "sha256:bytes:9f3f08e474c5bf3cf310ec16356df24867640bf9ac9d8ac8b628d7a281d2cbbf", + "path": "template-gallery/cosmos3_super_text_to_image.webp", + "sha256": "sha256:bytes:90e6a18d8d085a653dd3f74168f93a30d99f8b0b7b74decb4f95f8a60bf4e7ad", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | dtthanh/flux_oil_painting_lora@1118ed195c7304ffc52a6cd42b41a520ef749cd9", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/nvidia/Cosmos3-Super-Text2Image/tree/daf3d374804be4c512c2135568a7cb95d4341d79", + "sourceRevision": "nvidia/Cosmos3-Super-Text2Image@daf3d374804be4c512c2135568a7cb95d4341d79", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "dtthanh/flux_oil_painting_lora: Apache-2.0; https://huggingface.co/dtthanh/flux_oil_painting_lora/tree/1118ed195c7304ffc52a6cd42b41a520ef749cd9" + "https://openmdw.ai/license/1-1/", + "https://huggingface.co/nvidia/Cosmos-Guardrail1/blob/d6d4bfa899a71454a700907664f3e88f503950cf/README.md" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_oil_painting" + "requiredAttribution": [ + "nvidia/Cosmos3-Super-Text2Image@daf3d374804be4c512c2135568a7cb95d4341d79 https://huggingface.co/nvidia/Cosmos3-Super-Text2Image/tree/daf3d374804be4c512c2135568a7cb95d4341d79" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "36d1cce7283b4bbd6aaa87bb55573032136669d29808dca440378965a78c8217", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "cosmos3_super_text_to_image" }, { - "path": "template-gallery/flux_lora_paper_cutout.card-poster.webp", - "sha256": "sha256:bytes:e0d9bc89d960b9831be5021c8ca8f49743b27772c99bf0054cce369899fbd1c1", + "path": "template-gallery/ddim_cifar10_preview.webp", + "sha256": "sha256:bytes:8da37d75c632e43b7131bcb634f76a9e83857a88bf511785fa8f55c746f0f0a4", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | Norod78/Flux_1_Dev_LoRA_Paper-Cutout-Style@5cdd7ac47ad1b99f705ac2a03a39d480d34abb5d", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80", + "sourceRevision": "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "Norod78/Flux_1_Dev_LoRA_Paper-Cutout-Style: FLUX.1-dev terms; https://huggingface.co/Norod78/Flux_1_Dev_LoRA_Paper-Cutout-Style/tree/5cdd7ac47ad1b99f705ac2a03a39d480d34abb5d" + "Publisher model terms at https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_paper_cutout" + "requiredAttribution": [ + "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80 https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "ddim_cifar10_preview" }, { - "path": "template-gallery/flux_lora_paper_cutout.webp", - "sha256": "sha256:bytes:ec1486ef19c6220ddbbfc31313cc13752c957e860aa2e9b2c11be52a4f64699e", + "path": "template-gallery/ddpm_cifar32_technical_preview.webp", + "sha256": "sha256:bytes:c5c8e86cdb7b5b694a8497742b80cbefc3d2563e08ae17be690b666dc6d7d533", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | Norod78/Flux_1_Dev_LoRA_Paper-Cutout-Style@5cdd7ac47ad1b99f705ac2a03a39d480d34abb5d", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80", + "sourceRevision": "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "Norod78/Flux_1_Dev_LoRA_Paper-Cutout-Style: FLUX.1-dev terms; https://huggingface.co/Norod78/Flux_1_Dev_LoRA_Paper-Cutout-Style/tree/5cdd7ac47ad1b99f705ac2a03a39d480d34abb5d" + "Publisher model terms at https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_paper_cutout" + "requiredAttribution": [ + "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80 https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "efc64011c443b1678207c0dfd79e89def1c0dc3699668f058803e9044b4bd281", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ddpm_cifar32_technical_preview" }, { - "path": "template-gallery/flux_lora_photoreal_documentary.card-poster.webp", - "sha256": "sha256:bytes:a5d8512a21313ef4b7efc902020516844c9c9203ca04a2a2a6fbc2ce90a4680e", + "path": "template-gallery/fast_lora.card-poster.webp", + "sha256": "sha256:bytes:071786ad9b3120c3d5981e70c4617cbc9c1ab946bd6aafc7a0e055df02fc27ae", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | XLabs-AI/flux-RealismLora@1965e17d2e745fcbf8f4004bdbdf603421ef37a8", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 | youknownothing/v1-realism-v1-adapter-ZIT-lora@fd6d52d1199ad47f73c18db58339ad01ef766fa7", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "XLabs-AI/flux-RealismLora: FLUX.1-dev non-commercial terms; https://huggingface.co/XLabs-AI/flux-RealismLora/tree/1965e17d2e745fcbf8f4004bdbdf603421ef37a8" + "Tongyi-MAI/Z-Image-Turbo: Apache-2.0; https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "youknownothing/v1-realism-v1-adapter-ZIT-lora: Apache-2.0; https://huggingface.co/youknownothing/v1-realism-v1-adapter-ZIT-lora/tree/fd6d52d1199ad47f73c18db58339ad01ef766fa7" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_photoreal_documentary" + "provenanceTemplateId": "fast_lora" }, { - "path": "template-gallery/flux_lora_photoreal_documentary.webp", - "sha256": "sha256:bytes:fee9159c34ddcd3e2026610e5826f5a397f8e155e8a4047115bb85f5ce236510", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | XLabs-AI/flux-RealismLora@1965e17d2e745fcbf8f4004bdbdf603421ef37a8", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to source/model terms", + "creationMethod": "AI-generated original text-to-image Gallery example", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 | youknownothing/v1-realism-v1-adapter-ZIT-lora@fd6d52d1199ad47f73c18db58339ad01ef766fa7", + "sourceLicense": "Original project generation; see pinned model and adapter terms", "modelTerms": [ - "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "XLabs-AI/flux-RealismLora: FLUX.1-dev non-commercial terms; https://huggingface.co/XLabs-AI/flux-RealismLora/tree/1965e17d2e745fcbf8f4004bdbdf603421ef37a8" + "Tongyi-MAI/Z-Image-Turbo: Apache-2.0; https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "youknownothing/v1-realism-v1-adapter-ZIT-lora: Apache-2.0; https://huggingface.co/youknownothing/v1-realism-v1-adapter-ZIT-lora/tree/fd6d52d1199ad47f73c18db58339ad01ef766fa7" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "path": "template-gallery/fast_lora.webp", + "sha256": "sha256:bytes:4dd22715673f988b2b8191cc7c2417b4c1c147f1572b16f76f947155bbaf8a3d", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_photoreal_documentary" + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-six-z-registration", + "humanApprovalPacketSHA256": "9b728a5f8535fc1ba3c03d2e2759d7ac795a586fafab51beb1509379ed388934", + "provenanceTemplateId": "fast_lora" }, { - "path": "template-gallery/flux_lora_retro_comic.card-poster.webp", - "sha256": "sha256:bytes:2135eac6e596b94192705700d7ad021b5eabc579b4075de4c821907fd0e00515", + "path": "template-gallery/flowers_after_rain.webp", + "sha256": "sha256:bytes:ffebbed5e41a1aadbffe64573e522c4ef1b1131844503200f535d1198df1fe83", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | renderartist/retrocomicflux@46f73222df6c97c9f56c3bef42a11979ba5d5aeb", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/ATH-MaaS/Ovis-Image-7B/tree/41be1c5821a92c970d63d7eb595a2fd3fe32b22e", + "sourceRevision": "ATH-MaaS/Ovis-Image-7B@41be1c5821a92c970d63d7eb595a2fd3fe32b22e", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "renderartist/retrocomicflux: CreativeML Open RAIL-M; https://huggingface.co/renderartist/retrocomicflux/tree/46f73222df6c97c9f56c3bef42a11979ba5d5aeb" + "apache-2.0. https://huggingface.co/ATH-MaaS/Ovis-Image-7B/tree/41be1c5821a92c970d63d7eb595a2fd3fe32b22e" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_retro_comic" + "requiredAttribution": [ + "ATH-MaaS/Ovis-Image-7B@41be1c5821a92c970d63d7eb595a2fd3fe32b22e https://huggingface.co/ATH-MaaS/Ovis-Image-7B/tree/41be1c5821a92c970d63d7eb595a2fd3fe32b22e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "flowers_after_rain" }, { - "path": "template-gallery/flux_lora_retro_comic.webp", - "sha256": "sha256:bytes:b0a7fc4f480faa92d33f506b751cddfc4b7937ae82d258548efb547445353cef", + "path": "template-gallery/flux1_dev_limestone_studio_scratch_repair.webp", + "sha256": "sha256:bytes:b5fe5ad2e6acf82a7fb6cc2730cac9fb9c588a8e0263736e4a16dc2e77442f49", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | renderartist/retrocomicflux@46f73222df6c97c9f56c3bef42a11979ba5d5aeb", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "renderartist/retrocomicflux: CreativeML Open RAIL-M; https://huggingface.co/renderartist/retrocomicflux/tree/46f73222df6c97c9f56c3bef42a11979ba5d5aeb" + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_retro_comic" + "requiredAttribution": [ + "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux1_dev_limestone_studio_scratch_repair" }, { - "path": "template-gallery/flux_lora_watercolor.card-poster.webp", - "sha256": "sha256:bytes:3861280c52dd017ea4996673cd3922f5e25351eccab2aa65b90960fd37a4d03d", + "path": "template-gallery/flux2_dev_text_to_image.webp", + "sha256": "sha256:bytes:6105156764537dd15a17c7fd2fbf73882a0c4991b1f7fb90700e9bbbf51de670", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | SebastianBodza/Flux_Aquarell_Watercolor_v2@a565b2140a05f1eece244514f90d2e29b3b1d45d", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-dev/tree/26afe3a78bb242c0a8bb181dcc8937bb16e5c66c", + "sourceRevision": "black-forest-labs/FLUX.2-dev@26afe3a78bb242c0a8bb181dcc8937bb16e5c66c", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "SebastianBodza/Flux_Aquarell_Watercolor_v2: FLUX.1-dev non-commercial terms; https://huggingface.co/SebastianBodza/Flux_Aquarell_Watercolor_v2/tree/a565b2140a05f1eece244514f90d2e29b3b1d45d" + "https://huggingface.co/black-forest-labs/FLUX.2-dev/blob/26afe3a78bb242c0a8bb181dcc8937bb16e5c66c/LICENSE.md" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_watercolor" + "requiredAttribution": [ + "black-forest-labs/FLUX.2-dev@26afe3a78bb242c0a8bb181dcc8937bb16e5c66c https://huggingface.co/black-forest-labs/FLUX.2-dev/tree/26afe3a78bb242c0a8bb181dcc8937bb16e5c66c" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "36d1cce7283b4bbd6aaa87bb55573032136669d29808dca440378965a78c8217", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux2_dev_text_to_image" }, { - "path": "template-gallery/flux_lora_watercolor.webp", - "sha256": "sha256:bytes:55b05b1cee751203d37fa6166f82c9743e7a202f46bead8f19ed70e77cf5ce85", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | SebastianBodza/Flux_Aquarell_Watercolor_v2@a565b2140a05f1eece244514f90d2e29b3b1d45d", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, with exact-file rights explicitly attested by the maintainer", + "creationMethod": "AI-generated native FLUX.2 Klein image; the edit preserves the declared approved synthetic cube input", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceLicense": "Original generated image; exact-file redistribution rights explicitly attested; see pinned model terms", "modelTerms": [ - "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "SebastianBodza/Flux_Aquarell_Watercolor_v2: FLUX.1-dev non-commercial terms; https://huggingface.co/SebastianBodza/Flux_Aquarell_Watercolor_v2/tree/a565b2140a05f1eece244514f90d2e29b3b1d45d" + "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "sourceRightsAttestation": "I hold the rights needed to publish this exact generated image and its redacted review/technical records under Apache-2.0 in the existing MoDiff Gallery Dataset. No external or real-person reference was used; the edit uses the existing approved synthetic cube input.", + "path": "template-gallery/flux2_klein_edit.webp", + "sha256": "sha256:bytes:6677f582b1ebe83e894b7ac7e6264cc30ec4724990c1e3482bf5ec8b036993c0", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_watercolor" + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-windows-klein-native-image-registration", + "humanApprovalPacketSHA256": "2862dea890936a224953749fccb20cbba222471c43abad480dad091e8437f45a", + "provenanceTemplateId": "flux2_klein_edit" }, { - "path": "template-gallery/flux_redux_edit.webp", - "sha256": "sha256:bytes:56174da5ed300722ee96edfd0b80149d869081cee801e8dbac517734dc56e4bf", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | black-forest-labs/FLUX.1-Redux-dev@c95859fbf7703ca4d6824b4da4407d7cd0434f81", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, with explicit derivative-source rights attestation by SOURAV DAS", + "creationMethod": "AI-generated two-reference derivative material-fusion Gallery example; explicit maintainer derivative-source rights attestation", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceLicense": "Original project derivative generation; both source-image permissions explicitly attested; see pinned model terms; existing source image license labels unchanged", "modelTerms": [ - "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "black-forest-labs/FLUX.1-Redux-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Redux-dev/tree/c95859fbf7703ca4d6824b4da4407d7cd0434f81" + "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "path": "template-gallery/flux2_klein_multi_reference.webp", + "sha256": "sha256:bytes:84e5166bd444404fb49ea1cdca69090a03e4de7ebe460c8e0afec89aae503252", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_redux_edit" + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-klein-derivative-registration", + "humanApprovalPacketSHA256": "6110699f001f269b75ee943b96c82d2c0c37cb33ba4c10fdd1a9cd15d4d48042", + "provenanceTemplateId": "flux2_klein_multi_reference", + "sourceRightsAttestation": "The maintainer holds the rights or permissions needed to use both identified reference images to make and publicly redistribute this exact derivative output under Apache-2.0. Existing input records and licenses are not changed or relicensed. Exact generation model identities for the two runtime input files were not captured in their existing rights records; prior public-input approval alone is not asserted to establish this derivative grant.", + "sourceReferenceContentHashes": [ + "sha256:bytes:1d993540e914f0e2d230f1133b57ae14bb837829237a53c89613fcdef6699995", + "sha256:bytes:fc326ed56f9e5de83262a0a1bc4ce85f4b4b291d654a05efa4a32fc133f97a3f" + ], + "humanApprovalScope": "The maintainer explicitly approved the proposed 4/5 scores, known limits, exact retained Klein two-reference derivative output, its redacted technical/quality metadata, and permission to make and redistribute this derivative under Apache-2.0. Existing source images and their mixed license records remain unchanged; no other assets or held cases are newly approved." }, { - "path": "template-gallery/flux_redux_multi_reference.webp", - "sha256": "sha256:bytes:ea050772cf672d0b115310b1feac79bd435c7538ffcbdb36b83f9e3b219f324a", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | black-forest-labs/FLUX.1-Redux-dev@c95859fbf7703ca4d6824b4da4407d7cd0434f81", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, with exact-file rights explicitly attested by the maintainer", + "creationMethod": "AI-generated native FLUX.2 Klein image; the edit preserves the declared approved synthetic cube input", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceLicense": "Original generated image; exact-file redistribution rights explicitly attested; see pinned model terms", "modelTerms": [ - "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "black-forest-labs/FLUX.1-Redux-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Redux-dev/tree/c95859fbf7703ca4d6824b4da4407d7cd0434f81" + "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "sourceRightsAttestation": "I hold the rights needed to publish this exact generated image and its redacted review/technical records under Apache-2.0 in the existing MoDiff Gallery Dataset. No external or real-person reference was used; the edit uses the existing approved synthetic cube input.", + "path": "template-gallery/flux2_klein_text_to_image.webp", + "sha256": "sha256:bytes:ddc5451ddc7987cb86fcefe2ce0ed6a590089679790585a4b5a7ff425b74ba19", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_redux_multi_reference" + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-windows-klein-native-image-registration", + "humanApprovalPacketSHA256": "2862dea890936a224953749fccb20cbba222471c43abad480dad091e8437f45a", + "provenanceTemplateId": "flux2_klein_text_to_image" }, { - "path": "template-gallery/flux_schnell_text_to_image.webp", - "sha256": "sha256:bytes:fd58754609ae68c0378ce5c9bc66f4b35dfbf36f039177ffbd53d5d33347c236", + "path": "template-gallery/flux3_klein_base_fp8r512_lora_style.webp", + "sha256": "sha256:bytes:9f5bc117a70a66bfae603ab5add47f69bd73349b5268f2c7307462232ef2d5c6", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-schnell/tree/741f7c3ce8b383c54771c7003378a50191e9efe9", - "sourceRevision": "black-forest-labs/FLUX.1-schnell@741f7c3ce8b383c54771c7003378a50191e9efe9", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "sourav-das, subject to the recorded source and model terms", + "creationMethod": "AI-generated fixed-input Gallery example from the retained MoDiff task and pinned model/adapter recipe", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein-base/tree/1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4", + "sourceRevision": "black-forest-labs/flux-3-image-klein-base@1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4 | pjecuacion/flux3-klein-mnt-oil-monet-lora@0d94b6a4601892499defd8c5d89c24f78e78043b", + "sourceLicense": "Model use: FLUX Kommunity License v1.0. Generated outputs retain the publisher-selected asset license; no model distribution is included.", "modelTerms": [ - "black-forest-labs/FLUX.1-schnell: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.1-schnell/tree/741f7c3ce8b383c54771c7003378a50191e9efe9" + "black-forest-labs/flux-3-image-klein-base@1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4: FLUX Kommunity License v1.0; maintainer selected non-commercial model use only. No commercial eligibility attestation or model weight redistribution.", + "pjecuacion/flux3-klein-mnt-oil-monet-lora@0d94b6a4601892499defd8c5d89c24f78e78043b: FLUX Kommunity License v1.0; maintainer selected non-commercial model use only. No commercial eligibility attestation or model weight redistribution.", + "Adapter training-rights provenance is the source author’s statement, not independent verification." ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_schnell_text_to_image" + "requiredAttribution": ["sourav-das"], + "assetLicense": "CC-BY-4.0", + "reviewedBy": "sourav-das", + "reviewedAt": "2026-10-31", + "reviewClass": "exact-file-maintainer-approval-in-originating-chat", + "approvalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "modelUseBasis": "Non-commercial use only", + "provenanceTemplateId": "flux3_klein_base_fp8r512_lora_style" }, { - "path": "template-gallery/high_quality.webp", - "sha256": "sha256:bytes:862e292caa1759156fffde5cfccda8b97ec622514258f81986188cf63a836ea9", + "path": "template-gallery/flux3_klein_base_fp8r512_multi_reference_edit.png", + "sha256": "sha256:bytes:4508e12353cf287912629f28a94854b117902c16f7386512a5f09a00f13478d1", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", - "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "sourav-das, subject to the recorded source and model terms", + "creationMethod": "AI-generated fixed-input Gallery example from the retained MoDiff task and pinned model/adapter recipe", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein-base/tree/1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4", + "sourceRevision": "black-forest-labs/flux-3-image-klein-base@1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4", + "sourceLicense": "Model use: FLUX Kommunity License v1.0. Generated outputs retain the publisher-selected asset license; no model distribution is included.", "modelTerms": [ - "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + "black-forest-labs/flux-3-image-klein-base@1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4: FLUX Kommunity License v1.0; maintainer selected non-commercial model use only. No commercial eligibility attestation or model weight redistribution." ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "high_quality" + "requiredAttribution": ["sourav-das"], + "assetLicense": "CC-BY-4.0", + "reviewedBy": "sourav-das", + "reviewedAt": "2026-10-31", + "reviewClass": "exact-file-maintainer-approval-in-originating-chat", + "approvalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "modelUseBasis": "Non-commercial use only", + "provenanceTemplateId": "flux3_klein_base_fp8r512_multi_reference_edit" }, { - "path": "template-gallery/inputs/character_edit.before.webp", - "sha256": "sha256:bytes:b9909f4cbff8af6e97be6d1e4923c67687eee41dbd64b051a018866781da12ab", + "path": "template-gallery/flux3_klein_base_fp8r512_raw_coordinate_prompt.webp", + "sha256": "sha256:bytes:77da62eeb4da139921de0d654816eca643fee85dee2f6c16cbdb23aa3b1633f2", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "sourav-das, subject to the recorded source and model terms", + "creationMethod": "AI-generated fixed-input Gallery example from the retained MoDiff task and pinned model/adapter recipe", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein-base/tree/1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4", + "sourceRevision": "black-forest-labs/flux-3-image-klein-base@1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4", + "sourceLicense": "Model use: FLUX Kommunity License v1.0. Generated outputs retain the publisher-selected asset license; no model distribution is included.", "modelTerms": [ - "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + "black-forest-labs/flux-3-image-klein-base@1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4: FLUX Kommunity License v1.0; maintainer selected non-commercial model use only. No commercial eligibility attestation or model weight redistribution." ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "character_edit", - "consumingTemplateIds": ["character_edit"] + "requiredAttribution": ["sourav-das"], + "assetLicense": "CC-BY-4.0", + "reviewedBy": "sourav-das", + "reviewedAt": "2026-10-31", + "reviewClass": "exact-file-maintainer-approval-in-originating-chat", + "approvalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "modelUseBasis": "Non-commercial use only", + "provenanceTemplateId": "flux3_klein_base_fp8r512_raw_coordinate_prompt" }, { - "path": "template-gallery/inputs/flux2_klein_edit.before.png", - "sha256": "sha256:bytes:d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24", + "path": "template-gallery/flux3_klein_base_fp8r512_single_reference_edit.webp", + "sha256": "sha256:bytes:12abeba15e8b99c5943daa322e0be94947350e0a2598b893a6419cf7cc21d7ef", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", - "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "sourav-das, subject to the recorded source and model terms", + "creationMethod": "AI-generated fixed-input Gallery example from the retained MoDiff task and pinned model/adapter recipe", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein-base/tree/1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4", + "sourceRevision": "black-forest-labs/flux-3-image-klein-base@1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4", + "sourceLicense": "Model use: FLUX Kommunity License v1.0. Generated outputs retain the publisher-selected asset license; no model distribution is included.", "modelTerms": [ - "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + "black-forest-labs/flux-3-image-klein-base@1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4: FLUX Kommunity License v1.0; maintainer selected non-commercial model use only. No commercial eligibility attestation or model weight redistribution." ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux2_klein_edit", - "consumingTemplateIds": ["flux2_klein_edit"] + "requiredAttribution": ["sourav-das"], + "assetLicense": "CC-BY-4.0", + "reviewedBy": "sourav-das", + "reviewedAt": "2026-10-31", + "reviewClass": "exact-file-maintainer-approval-in-originating-chat", + "approvalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "modelUseBasis": "Non-commercial use only", + "provenanceTemplateId": "flux3_klein_base_fp8r512_single_reference_edit" }, { - "path": "template-gallery/inputs/flux2_klein_multi_reference.before.webp", - "sha256": "sha256:bytes:1d993540e914f0e2d230f1133b57ae14bb837829237a53c89613fcdef6699995", + "path": "template-gallery/flux3_klein_base_fp8r512_text_to_image.webp", + "sha256": "sha256:bytes:7922c52fa07fee6cc38f0da95b22028996637def32a99aeacc414ce8a39e1fe7", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", - "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "sourav-das, subject to the recorded source and model terms", + "creationMethod": "AI-generated fixed-input Gallery example from the retained MoDiff task and pinned model/adapter recipe", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein-base/tree/1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4", + "sourceRevision": "black-forest-labs/flux-3-image-klein-base@1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4", + "sourceLicense": "Model use: FLUX Kommunity License v1.0. Generated outputs retain the publisher-selected asset license; no model distribution is included.", "modelTerms": [ - "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + "black-forest-labs/flux-3-image-klein-base@1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4: FLUX Kommunity License v1.0; maintainer selected non-commercial model use only. No commercial eligibility attestation or model weight redistribution." ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux2_klein_multi_reference", - "consumingTemplateIds": ["flux2_klein_multi_reference"] + "requiredAttribution": ["sourav-das"], + "assetLicense": "CC-BY-4.0", + "reviewedBy": "sourav-das", + "reviewedAt": "2026-10-31", + "reviewClass": "exact-file-maintainer-approval-in-originating-chat", + "approvalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "modelUseBasis": "Non-commercial use only", + "provenanceTemplateId": "flux3_klein_base_fp8r512_text_to_image" }, { - "path": "template-gallery/inputs/flux_control_canny.before.png", - "sha256": "sha256:bytes:3d03ee22a3d29068f30f18afcb31e86ea455fbfbe1ca5aa172cf633a26f21339", + "path": "template-gallery/flux3_klein_fp8r512_lora_style.webp", + "sha256": "sha256:bytes:59ddede1547b6e0e6958b0327a77c8e253cdd654e61aada584e1619aba7b8c54", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", - "sourceRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "sourav-das, subject to the recorded source and model terms", + "creationMethod": "AI-generated fixed-input Gallery example from the retained MoDiff task and pinned model/adapter recipe", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein/tree/8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68 | kocabiyik/nsc7-style-lora@9b998d3bdc3b4aeb2113ab4e8cbd9fe2ebfa1cae", + "sourceLicense": "Model use: FLUX Kommunity License v1.0. Generated outputs retain the publisher-selected asset license; no model distribution is included.", "modelTerms": [ - "black-forest-labs/FLUX.1-Canny-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68: FLUX Kommunity License v1.0; maintainer selected non-commercial model use only. No commercial eligibility attestation or model weight redistribution.", + "kocabiyik/nsc7-style-lora@9b998d3bdc3b4aeb2113ab4e8cbd9fe2ebfa1cae: FLUX Kommunity License v1.0; maintainer selected non-commercial model use only. No commercial eligibility attestation or model weight redistribution.", + "Adapter training-rights provenance is the source author’s statement, not independent verification." ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_control_canny", - "consumingTemplateIds": ["flux_control_canny"] + "requiredAttribution": ["sourav-das"], + "assetLicense": "CC-BY-4.0", + "reviewedBy": "sourav-das", + "reviewedAt": "2026-10-31", + "reviewClass": "exact-file-maintainer-approval-in-originating-chat", + "approvalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "modelUseBasis": "Non-commercial use only", + "provenanceTemplateId": "flux3_klein_fp8r512_lora_style" }, { - "path": "template-gallery/inputs/flux_depth_control.before.png", - "sha256": "sha256:bytes:2e202069a584ee5ada91e2deaea6bf7b92a94f4816e669e695d7cb64d5a1cb0e", + "path": "template-gallery/flux3_klein_fp8r512_multi_reference_edit.png", + "sha256": "sha256:bytes:12f2f2ae8ffcc053d61fb3c409d964f5f0d03b2668d73573c3795e3b5fbd620f", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", - "sourceRevision": "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "sourav-das, subject to the recorded source and model terms", + "creationMethod": "AI-generated fixed-input Gallery example from the retained MoDiff task and pinned model/adapter recipe", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein/tree/8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceLicense": "Model use: FLUX Kommunity License v1.0. Generated outputs retain the publisher-selected asset license; no model distribution is included.", "modelTerms": [ - "black-forest-labs/FLUX.1-Depth-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68: FLUX Kommunity License v1.0; maintainer selected non-commercial model use only. No commercial eligibility attestation or model weight redistribution." ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_depth_control", - "consumingTemplateIds": ["flux_depth_control"] + "requiredAttribution": ["sourav-das"], + "assetLicense": "CC-BY-4.0", + "reviewedBy": "sourav-das", + "reviewedAt": "2026-10-31", + "reviewClass": "exact-file-maintainer-approval-in-originating-chat", + "approvalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "modelUseBasis": "Non-commercial use only", + "provenanceTemplateId": "flux3_klein_fp8r512_multi_reference_edit" }, { - "path": "template-gallery/inputs/flux_fill_inpaint.before.webp", - "sha256": "sha256:bytes:b7c221b367738177e32fece56067d743df96282a6ccb2afd040ee89ea0a8f678", + "path": "template-gallery/flux3_klein_fp8r512_raw_coordinate_prompt.webp", + "sha256": "sha256:bytes:8544a653656be8cd47d87d7550558fa8487d1b72de56ee21adb27313dc34ba8f", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev/tree/358293da0354175698b67ec8299acf928313a78a", - "sourceRevision": "black-forest-labs/FLUX.1-Fill-dev@358293da0354175698b67ec8299acf928313a78a", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "sourav-das, subject to the recorded source and model terms", + "creationMethod": "AI-generated fixed-input Gallery example from the retained MoDiff task and pinned model/adapter recipe", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein/tree/8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceLicense": "Model use: FLUX Kommunity License v1.0. Generated outputs retain the publisher-selected asset license; no model distribution is included.", "modelTerms": [ - "black-forest-labs/FLUX.1-Fill-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev/tree/358293da0354175698b67ec8299acf928313a78a" + "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68: FLUX Kommunity License v1.0; maintainer selected non-commercial model use only. No commercial eligibility attestation or model weight redistribution." ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_fill_inpaint", - "consumingTemplateIds": ["flux_fill_inpaint"] + "requiredAttribution": ["sourav-das"], + "assetLicense": "CC-BY-4.0", + "reviewedBy": "sourav-das", + "reviewedAt": "2026-10-31", + "reviewClass": "exact-file-maintainer-approval-in-originating-chat", + "approvalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "modelUseBasis": "Non-commercial use only", + "provenanceTemplateId": "flux3_klein_fp8r512_raw_coordinate_prompt" }, { - "path": "template-gallery/inputs/flux_fill_outpaint.before.png", - "sha256": "sha256:bytes:bf4dbaa55b83b19ca56c691e9d1a10d3b838ff2fec926aaea6b526561c68f8e6", + "path": "template-gallery/flux3_klein_fp8r512_single_reference_edit.webp", + "sha256": "sha256:bytes:2694ee895e5f91c7c68d5b7966e872b08546d6792a3038707260d595eb48b6e6", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev/tree/358293da0354175698b67ec8299acf928313a78a", - "sourceRevision": "black-forest-labs/FLUX.1-Fill-dev@358293da0354175698b67ec8299acf928313a78a", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "sourav-das, subject to the recorded source and model terms", + "creationMethod": "AI-generated fixed-input Gallery example from the retained MoDiff task and pinned model/adapter recipe", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein/tree/8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceLicense": "Model use: FLUX Kommunity License v1.0. Generated outputs retain the publisher-selected asset license; no model distribution is included.", "modelTerms": [ - "black-forest-labs/FLUX.1-Fill-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev/tree/358293da0354175698b67ec8299acf928313a78a" + "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68: FLUX Kommunity License v1.0; maintainer selected non-commercial model use only. No commercial eligibility attestation or model weight redistribution." ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_fill_outpaint", - "consumingTemplateIds": ["flux_fill_outpaint"] + "requiredAttribution": ["sourav-das"], + "assetLicense": "CC-BY-4.0", + "reviewedBy": "sourav-das", + "reviewedAt": "2026-10-31", + "reviewClass": "exact-file-maintainer-approval-in-originating-chat", + "approvalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "modelUseBasis": "Non-commercial use only", + "provenanceTemplateId": "flux3_klein_fp8r512_single_reference_edit" }, { - "path": "template-gallery/inputs/flux_kontext_edit.before.webp", - "sha256": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", + "path": "template-gallery/flux3_klein_fp8r512_text_to_image.webp", + "sha256": "sha256:bytes:88783643cab795b94b5bc01e6e28d459ff685278d95fb6bf54461094a6400c90", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", - "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "sourav-das, subject to the recorded source and model terms", + "creationMethod": "AI-generated fixed-input Gallery example from the retained MoDiff task and pinned model/adapter recipe", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein/tree/8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceLicense": "Model use: FLUX Kommunity License v1.0. Generated outputs retain the publisher-selected asset license; no model distribution is included.", "modelTerms": [ - "black-forest-labs/FLUX.1-Kontext-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68: FLUX Kommunity License v1.0; maintainer selected non-commercial model use only. No commercial eligibility attestation or model weight redistribution." ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_kontext_edit", - "consumingTemplateIds": ["flux_kontext_edit"] + "requiredAttribution": ["sourav-das"], + "assetLicense": "CC-BY-4.0", + "reviewedBy": "sourav-das", + "reviewedAt": "2026-10-31", + "reviewClass": "exact-file-maintainer-approval-in-originating-chat", + "approvalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "modelUseBasis": "Non-commercial use only", + "provenanceTemplateId": "flux3_klein_fp8r512_text_to_image" }, { - "path": "template-gallery/inputs/flux_kontext_multi_reference.before.webp", - "sha256": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", + "path": "template-gallery/flux_canny_black_ink_cube.webp", + "sha256": "sha256:bytes:6e5d7e57733a301c94e9ec50075492aebb831b8f2686f3c96ab810592a5ff3b0", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", - "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "black-forest-labs/FLUX.1-Kontext-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_kontext_multi_reference", - "consumingTemplateIds": ["flux_kontext_multi_reference"] + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2 https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "68a00a8e0e0cdf80ef52460f27dcb5544125a9d3f5422c6960dfecbd21c953e1", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_canny_black_ink_cube" }, { - "path": "template-gallery/inputs/flux_redux_edit.before.webp", - "sha256": "sha256:bytes:2e0ec8892660785e322468d0153fd2dadf7a4d920fce2d7d4a0b686a8fe8515d", + "path": "template-gallery/flux_canny_clean_backdrop.webp", + "sha256": "sha256:bytes:7261f62b7730f9bd0ceebf9beb3c768cf81640afaeb6285ba6f7f2cdb1406df2", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | black-forest-labs/FLUX.1-Redux-dev@c95859fbf7703ca4d6824b4da4407d7cd0434f81", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "black-forest-labs/FLUX.1-Redux-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Redux-dev/tree/c95859fbf7703ca4d6824b4da4407d7cd0434f81" + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_redux_edit", - "consumingTemplateIds": ["flux_redux_edit"] + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2 https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_canny_clean_backdrop" }, { - "path": "template-gallery/inputs/flux_redux_multi_reference.before.webp", - "sha256": "sha256:bytes:7f1ea58485fa7802765b9fbbf0e6957e8607261c91669fdcc44cbed80c6fb309", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Native MoDiff image generation or editing for flux_control_canny", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceLicense": "Maintainer-approved generated output. The selected models and adapters have separate pinned terms.", + "modelTerms": [ + "FLUX.1 [dev] Non-Commercial License, exact pinned notice retained · https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "sourceRightsAttestation": "The maintainer approved the exact reviewed asset in the Gallery review and requested its registration.", + "path": "template-gallery/flux_control_canny.webp", + "sha256": "sha256:bytes:13ed32399453783f830246f92653bc93ea31ff58170cf928c9f5bc523cdd85de", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | black-forest-labs/FLUX.1-Redux-dev@c95859fbf7703ca4d6824b4da4407d7cd0434f81", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3", + "provenanceTemplateId": "flux_control_canny" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Native MoDiff image generation or editing for flux_depth_control", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceRevision": "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceLicense": "Maintainer-approved generated output. The selected models and adapters have separate pinned terms.", "modelTerms": [ - "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "black-forest-labs/FLUX.1-Redux-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Redux-dev/tree/c95859fbf7703ca4d6824b4da4407d7cd0434f81" + "FLUX.1 [dev] Non-Commercial License, exact pinned notice retained · https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "sourceRightsAttestation": "The maintainer approved the exact reviewed asset in the Gallery review and requested its registration.", + "path": "template-gallery/flux_depth_control.webp", + "sha256": "sha256:bytes:c3d52c29b6a8cae80d2feffb8a978cded8b34509abd09216f665ab3af13f189e", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_redux_multi_reference", - "consumingTemplateIds": ["flux_redux_multi_reference"] + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3", + "provenanceTemplateId": "flux_depth_control" }, { - "path": "template-gallery/inputs/ltx_boardwalk_tracking.end.webp", - "sha256": "sha256:bytes:52ea89c0cdec3142162156be07af12a06a14ad623b68c9700ccbc82bf889100d", + "path": "template-gallery/flux_depth_marine_bow_repair.webp", + "sha256": "sha256:bytes:05697db755f8deae61615744c651ee81af79c0dded87323841d01e980d87c9cf", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceRevision": "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation" + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_depth_marine_bow_repair" }, { - "path": "template-gallery/inputs/ltx_boardwalk_tracking.start.webp", - "sha256": "sha256:bytes:73123a5bb6e8c1367eced6a7fbee6b0e5500ecbabf769ba9d9c18fd10623e36e", + "path": "template-gallery/flux_depth_marine_teal_bow_edit.webp", + "sha256": "sha256:bytes:e169de0a8b997dbb30ba63f329360cd4ac730a9413f124fade3c0a2bd42bffe0", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceRevision": "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation" + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "68a00a8e0e0cdf80ef52460f27dcb5544125a9d3f5422c6960dfecbd21c953e1", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_depth_marine_teal_bow_edit" }, { - "path": "template-gallery/inputs/ltx_video_image_to_video.before.webp", - "sha256": "sha256:bytes:930364ab2667e492e51b8a60664751d66f5ed3f2d580664832977e89bcfbbf26", + "path": "template-gallery/flux_dev_expert_text_to_image.card-poster.webp", + "sha256": "sha256:bytes:13c815eb6d245685e543d000e499036aad973bea6c0d4fff01c670580db08206", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", @@ -1489,290 +1656,354 @@ "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_image_to_video", - "consumingTemplateIds": ["ltx_video_image_to_video"] + "provenanceTemplateId": "flux_dev_expert_text_to_image" }, { - "path": "template-gallery/inputs/ltx_video_multi_reference.before.webp", - "sha256": "sha256:bytes:73123a5bb6e8c1367eced6a7fbee6b0e5500ecbabf769ba9d9c18fd10623e36e", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Native MoDiff image generation or editing for flux_dev_expert_text_to_image", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceLicense": "Maintainer-approved generated output. The selected models and adapters have separate pinned terms.", "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + "FLUX.1 [dev] Non-Commercial License v1.1.1 · https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "sourceRightsAttestation": "The maintainer approved the exact reviewed asset in the Gallery review and requested its registration.", + "path": "template-gallery/flux_dev_expert_text_to_image.webp", + "sha256": "sha256:bytes:b983944ddd54ef1833aad2930b82887f87490ecb4b7b080e31f5641d0af78143", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_multi_reference", - "consumingTemplateIds": ["ltx_video_multi_reference"] + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3", + "provenanceTemplateId": "flux_dev_expert_text_to_image" }, { - "path": "template-gallery/inputs/ltx_video_video_to_video.before.mp4", - "sha256": "sha256:bytes:496fde9e4410d1b1b0ea659fbf0b29d486537d56eefa43f61052a5c6d1808de8", + "path": "template-gallery/flux_dev_forest_green_teapot.webp", + "sha256": "sha256:bytes:43d9a0136c684014d436b8f01142ac239e2833d76b3c071a41df747fa3656565", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/datasets/huggingface/documentation-images", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceLicense": "CC-BY-NC-SA-4.0", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [ - "Source: Hugging Face documentation-images Dataset, CC BY-NC-SA 4.0; modified by the MoDiff LTX workflow." + "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" ], - "assetLicense": "CC-BY-NC-SA-4.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_video_to_video", - "consumingTemplateIds": ["ltx_video_video_to_video"] + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_dev_forest_green_teapot" }, { - "path": "template-gallery/inputs/qwen-carton-layout-control.png", - "sha256": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", + "path": "template-gallery/flux_fill_inpaint.webp", + "sha256": "sha256:bytes:edad9352bd415cd468829ad139fc8d201d3e067d7a9d174d790f6dae4f09fc15", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev/tree/358293da0354175698b67ec8299acf928313a78a", + "sourceRevision": "black-forest-labs/FLUX.1-Fill-dev@358293da0354175698b67ec8299acf928313a78a", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "black-forest-labs/FLUX.1-Fill-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev/tree/358293da0354175698b67ec8299acf928313a78a" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation" + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "flux_fill_inpaint", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "edad9352bd415cd468829ad139fc8d201d3e067d7a9d174d790f6dae4f09fc15", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" }, { - "path": "template-gallery/inputs/qwen_character_angles.before.webp", - "sha256": "sha256:bytes:4b1b8d9e351abd437f2ffff90cc6a958160a87863ba4d8e85a0aa80a37e7a10e", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Native MoDiff image generation or editing for flux_fill_outpaint", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev/tree/358293da0354175698b67ec8299acf928313a78a", + "sourceRevision": "black-forest-labs/FLUX.1-Fill-dev@358293da0354175698b67ec8299acf928313a78a", + "sourceLicense": "Maintainer-approved generated output. The selected models and adapters have separate pinned terms.", "modelTerms": [ - "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + "FLUX.1 [dev] Non-Commercial License, exact pinned notice retained · https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev/tree/358293da0354175698b67ec8299acf928313a78a" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], + "sourceRightsAttestation": "The maintainer approved the exact reviewed asset in the Gallery review and requested its registration.", + "path": "template-gallery/flux_fill_outpaint.webp", + "sha256": "sha256:bytes:5231750f57bed56cc705d53f19661884498a5bb2d981bed82e2c2b5da22d5074", + "publishDecision": "approved", + "holdReason": null, "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_character_angles", - "consumingTemplateIds": ["qwen_character_angles"] + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3", + "provenanceTemplateId": "flux_fill_outpaint" }, { - "path": "template-gallery/inputs/qwen_control_image_layout.before.png", - "sha256": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", + "path": "template-gallery/flux_klein_alpine_lake_panorama.webp", + "sha256": "sha256:bytes:3f2435f483779b1b27d9dad2347c055dc8855373d90aad6442174be9d341d059", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/InstantX/Qwen-Image-ControlNet-Union/tree/b13036f066d6dee7c20513e263d3d673055e9de8", - "sourceRevision": "InstantX/Qwen-Image-ControlNet-Union@b13036f066d6dee7c20513e263d3d673055e9de8 | Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "InstantX/Qwen-Image-ControlNet-Union: Apache-2.0; https://huggingface.co/InstantX/Qwen-Image-ControlNet-Union/tree/b13036f066d6dee7c20513e263d3d673055e9de8", - "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_control_image_layout", - "consumingTemplateIds": ["qwen_control_image_layout"] + "requiredAttribution": [ + "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294 https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_klein_alpine_lake_panorama" }, { - "path": "template-gallery/inputs/qwen_edit_plus_single_image.before.webp", - "sha256": "sha256:bytes:e90e99e27cdd9b6ab7478a05199df2fdf7dce650d700ef2ceb55da7fb206b715", + "path": "template-gallery/flux_klein_open_glacial_lake.webp", + "sha256": "sha256:bytes:32041e979ea1b3c51030e7d64eb3edee675d5c4cdc7abb596817b4e0769ce65b", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "sourceRevision": "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294 https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_edit_plus_single_image", - "consumingTemplateIds": ["qwen_edit_plus_single_image"] + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_klein_open_glacial_lake" }, { - "path": "template-gallery/inputs/qwen_edit_strength_sweep.before.webp", - "sha256": "sha256:bytes:a6d165bd87e2c57ab8cf71fa15de9d8724fccf5782c16c34c25dc77934751676", + "path": "template-gallery/flux_kontext_bookshop_clear_glass.webp", + "sha256": "sha256:bytes:ec9c8cb45d16a96a87ce1cfba214dbbb14693125c9b16d3bc75d25a502e61788", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/blob/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d/LICENSE.md" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_kontext_bookshop_clear_glass" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to previously approved synthetic source rights and recorded model terms", + "creationMethod": "Native local AI-generated output or exact deterministic layer-sheet derivative; original approved bytes retained", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceLicense": "Generated output and approved synthetic input; retained model terms apply", + "modelTerms": [ + "black-forest-labs/FLUX.1-Kontext-dev: FLUX.1 [dev] Non-Commercial License; generated outputs subject to its output provisions; https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": ["Fictional ASTERMIST / LAVENDER SLEEP SPRAY product label"], "requiredAttribution": [], + "publicationBasis": "Existing maintainer publication authorization and current explicit instruction to register these three accepted assets; no new ownership or rights quotation is fabricated.", + "path": "template-gallery/flux_kontext_edit.webp", + "sha256": "sha256:bytes:323f190a20a5e99841d11d8a4a9f5077a22726656ff27747341a453f70e04e8f", + "publishDecision": "approved", + "holdReason": null, "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_edit_strength_sweep", - "consumingTemplateIds": ["qwen_edit_strength_sweep"] + "reviewedBy": "maintainer (current user)", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-native-three-registration", + "humanApprovalPacketSHA256": "69c6b3d9b0ea2fcca16ee538f6e75b414b7141658b74f10578758e61360f63fd", + "provenanceTemplateId": "flux_kontext_edit" }, { - "path": "template-gallery/inputs/qwen_inpaint_mask_draft.before.webp", - "sha256": "sha256:bytes:a2f8ac6f5937d6e618b48ce9947153b8233ff7a82dcf67f28766d20b9917d730", + "creatorOrRightsholder": "MoDiff project maintainers, subject to previously approved synthetic source rights and recorded model terms", + "creationMethod": "Native local AI-generated output or exact deterministic layer-sheet derivative; original approved bytes retained", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceLicense": "Generated output and approved synthetic input; retained model terms apply", + "modelTerms": [ + "black-forest-labs/FLUX.1-Kontext-dev: FLUX.1 [dev] Non-Commercial License; generated outputs subject to its output provisions; https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": ["Fictional ASTERMIST / LAVENDER SLEEP SPRAY product label"], + "requiredAttribution": [], + "publicationBasis": "Existing maintainer publication authorization and current explicit instruction to register these three accepted assets; no new ownership or rights quotation is fabricated.", + "path": "template-gallery/flux_kontext_multi_reference.webp", + "sha256": "sha256:bytes:eec235576a904b885d651ec819f42e05cf78b2ce579ae3c0572c7899d339b8d4", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "assetLicense": "Apache-2.0", + "reviewedBy": "maintainer (current user)", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-native-three-registration", + "humanApprovalPacketSHA256": "69c6b3d9b0ea2fcca16ee538f6e75b414b7141658b74f10578758e61360f63fd", + "provenanceTemplateId": "flux_kontext_multi_reference" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Native MoDiff image generation or editing for flux_krea_text_to_image", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Krea-dev/tree/8162a9c7b05a641be098422bf2fcf335615c2f28", + "sourceRevision": "black-forest-labs/FLUX.1-Krea-dev@8162a9c7b05a641be098422bf2fcf335615c2f28", + "sourceLicense": "Maintainer-approved generated output. The selected models and adapters have separate pinned terms.", "modelTerms": [ - "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + "FLUX.1 [dev] Non-Commercial License v1.1.2 · https://huggingface.co/black-forest-labs/FLUX.1-Krea-dev/tree/8162a9c7b05a641be098422bf2fcf335615c2f28" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], + "sourceRightsAttestation": "The maintainer approved the exact reviewed asset in the Gallery review and requested its registration.", + "path": "template-gallery/flux_krea_text_to_image.webp", + "sha256": "sha256:bytes:95538f4be462f8f8faef04834e1171911162e73e1f1dc3a4fac8cf7e8e12064b", + "publishDecision": "approved", + "holdReason": null, "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_inpaint_mask_draft", - "consumingTemplateIds": ["qwen_inpaint_mask_draft"] + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3", + "provenanceTemplateId": "flux_krea_text_to_image" }, { - "path": "template-gallery/inputs/qwen_inpaint_object_replace.before.webp", - "sha256": "sha256:bytes:9f9f9685db5e9f8e1c162a0515151b03912c84777727b38682b65839db501ae6", + "path": "template-gallery/flux_lora_cinematic_octane_3d.card-poster.webp", + "sha256": "sha256:bytes:76d5c8873a12ba7f11366bff658c8d3ed257c557a9ae681c84708b3f52f0f74e", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainer (OpenAI-assisted generation)", + "creationMethod": "OpenAI-assisted independent Gallery card-poster generation and WebP conversion", + "sourceUrl": "https://openai.com/policies/terms-of-use/", + "sourceRevision": "Generated 2026-08-03", + "sourceLicense": "Original generation", "modelTerms": [ - "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + "OpenAI Terms of Use: as between the user and OpenAI, the user owns Output to the extent permitted by law; https://openai.com/policies/terms-of-use/" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_inpaint_object_replace", - "consumingTemplateIds": ["qwen_inpaint_object_replace"] + "provenanceTemplateId": "flux_lora_cinematic_octane_3d" }, { - "path": "template-gallery/inputs/qwen_logo_texture.before.webp", - "sha256": "sha256:bytes:124415536a8071baccf8821232ad79a0a8ceec30ae62617c91a8d7a0b59d0a8c", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", + "sourceUrl": "https://huggingface.co/aixonlab/FLUX.1-dev-LoRA-Cinematic-Octane/tree/3ab70503ba8df37565d0212e2876ec48e35e7cb4", + "sourceRevision": "aixonlab/FLUX.1-dev-LoRA-Cinematic-Octane@3ab70503ba8df37565d0212e2876ec48e35e7cb4 | black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | prithivMLmods/3D-Render-Flux-LoRA@6b32a1624d3fdfab4d518223e8311731dd432cd8", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + "aixonlab/FLUX.1-dev-LoRA-Cinematic-Octane: FLUX.1-dev non-commercial adapter and base terms; https://huggingface.co/aixonlab/FLUX.1-dev-LoRA-Cinematic-Octane/tree/3ab70503ba8df37565d0212e2876ec48e35e7cb4", + "black-forest-labs/FLUX.1-dev: FLUX.1 [dev] Non-Commercial License; generated-output provisions apply; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "prithivMLmods/3D-Render-Flux-LoRA: CreativeML OpenRAIL-M adapter; FLUX.1-dev base terms apply; https://huggingface.co/prithivMLmods/3D-Render-Flux-LoRA/tree/6b32a1624d3fdfab4d518223e8311731dd432cd8" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", + "path": "template-gallery/flux_lora_cinematic_octane_3d.webp", + "sha256": "sha256:bytes:93964b26fffcdbde39b2e9b23bedd10cdf3d13c2462914b553cefa431dcb899f", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_logo_texture", - "consumingTemplateIds": ["qwen_logo_texture"] + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "flux_lora_cinematic_octane_3d" }, { - "path": "template-gallery/inputs/qwen_multi_reference_product.before.webp", - "sha256": "sha256:bytes:47e56fd165fd2610f34e952191d74e061269b9703ae9fd7f571491f38ce4992c", + "path": "template-gallery/flux_lora_film_noir.card-poster.webp", + "sha256": "sha256:bytes:a447504091a2b6bba4a220d950771f7812b2bdf950f3f07df28c73adc499487f", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | dvyio/flux-lora-film-noir@7a7ff13bbae807a2db6c2e4918f3e13bb1265e60", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "dvyio/flux-lora-film-noir: FLUX.1-dev non-commercial terms; https://huggingface.co/dvyio/flux-lora-film-noir/tree/7a7ff13bbae807a2db6c2e4918f3e13bb1265e60" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_multi_reference_product", - "consumingTemplateIds": ["qwen_multi_reference_product"] + "provenanceTemplateId": "flux_lora_film_noir" }, { - "path": "template-gallery/inputs/qwen_outpaint_aspect_template.before.webp", - "sha256": "sha256:bytes:d898e00f3be4b28e237f71acf8024ad3715a657e1fcf3aeaf57279468dff7a76", + "path": "template-gallery/flux_lora_film_noir.webp", + "sha256": "sha256:bytes:4b512d8c233c626ae423f4a8a6735541fe0c458f421f74fd40b124f43b916c94", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | dvyio/flux-lora-film-noir@7a7ff13bbae807a2db6c2e4918f3e13bb1265e60", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "dvyio/flux-lora-film-noir: FLUX.1-dev non-commercial terms; https://huggingface.co/dvyio/flux-lora-film-noir/tree/7a7ff13bbae807a2db6c2e4918f3e13bb1265e60" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", @@ -1780,98 +2011,98 @@ "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_outpaint_aspect_template", - "consumingTemplateIds": ["qwen_outpaint_aspect_template"] + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "flux_lora_film_noir", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "4b512d8c233c626ae423f4a8a6735541fe0c458f421f74fd40b124f43b916c94", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" }, { - "path": "template-gallery/inputs/qwen_outpaint_draft.before.webp", - "sha256": "sha256:bytes:862e292caa1759156fffde5cfccda8b97ec622514258f81986188cf63a836ea9", - "publishDecision": "approved", - "holdReason": null, + "path": "template-gallery/flux_lora_ghibli_story.card-poster.webp", + "sha256": "sha256:bytes:f4d50d5340cf24a1a8cb24b3feb986a9fd9fb892f86604ecb442b8316430d8f7", + "publishDecision": "hold", + "holdReason": "Obtain written permission to publicly redistribute the generated example; the adapter card states personal-use-only and non-commercial use.", "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceUrl": "https://huggingface.co/alvarobartt/ghibli-characters-flux-lora", + "sourceRevision": "ed846114c71efc525e7f5a51e274dc976bb970a8", + "sourceLicense": "FLUX.1-dev terms plus adapter personal/non-commercial notice", "modelTerms": [ - "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + "Ghibli characters FLUX LoRA: personal-use-only and non-commercial; https://huggingface.co/alvarobartt/ghibli-characters-flux-lora", + "FLUX.1-dev output terms; https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21/LICENSE.md" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", - "marks": [], + "marks": ["Studio Ghibli style reference; no franchise character requested"], "requiredAttribution": [], - "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_outpaint_draft", - "consumingTemplateIds": ["qwen_outpaint_draft"] + "assetLicense": "upstream-terms-only", + "reviewedBy": null, + "reviewedAt": null, + "reviewClass": "upstream-permission-required", + "provenanceTemplateId": "flux_lora_ghibli_story" }, { - "path": "template-gallery/inputs/qwen_packaging_dieline.before.png", - "sha256": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", - "publishDecision": "approved", - "holdReason": null, + "path": "template-gallery/flux_lora_ghibli_story.webp", + "sha256": "sha256:bytes:cc07164563ac3cd3c38ea657ce96cd32e6cf9648bdb2cf2ef08af1d337b712b7", + "publishDecision": "hold", + "holdReason": "Obtain written permission to publicly redistribute the generated example; the adapter card states personal-use-only and non-commercial use.", "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/InstantX/Qwen-Image-ControlNet-Union/tree/b13036f066d6dee7c20513e263d3d673055e9de8", - "sourceRevision": "InstantX/Qwen-Image-ControlNet-Union@b13036f066d6dee7c20513e263d3d673055e9de8 | Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceUrl": "https://huggingface.co/alvarobartt/ghibli-characters-flux-lora", + "sourceRevision": "ed846114c71efc525e7f5a51e274dc976bb970a8", + "sourceLicense": "FLUX.1-dev terms plus adapter personal/non-commercial notice", "modelTerms": [ - "InstantX/Qwen-Image-ControlNet-Union: Apache-2.0; https://huggingface.co/InstantX/Qwen-Image-ControlNet-Union/tree/b13036f066d6dee7c20513e263d3d673055e9de8", - "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + "Ghibli characters FLUX LoRA: personal-use-only and non-commercial; https://huggingface.co/alvarobartt/ghibli-characters-flux-lora", + "FLUX.1-dev output terms; https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21/LICENSE.md" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", - "marks": [], + "marks": ["Studio Ghibli style reference; no franchise character requested"], "requiredAttribution": [], - "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_packaging_dieline", - "consumingTemplateIds": ["qwen_packaging_dieline"] + "assetLicense": "upstream-terms-only", + "reviewedBy": null, + "reviewedAt": null, + "reviewClass": "upstream-permission-required", + "provenanceTemplateId": "flux_lora_ghibli_story" }, { - "path": "template-gallery/inputs/qwen_product_ad_composite.before.webp", - "sha256": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", + "path": "template-gallery/flux_lora_oil_painting.card-poster.webp", + "sha256": "sha256:bytes:f34c7d8a787a16dbdea073fd9658571f6371d0d79887b0fc14b1637fe63b7e03", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | dtthanh/flux_oil_painting_lora@1118ed195c7304ffc52a6cd42b41a520ef749cd9", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "dtthanh/flux_oil_painting_lora: Apache-2.0; https://huggingface.co/dtthanh/flux_oil_painting_lora/tree/1118ed195c7304ffc52a6cd42b41a520ef749cd9" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_product_ad_composite", - "consumingTemplateIds": ["qwen_product_ad_composite"] + "provenanceTemplateId": "flux_lora_oil_painting" }, { - "path": "template-gallery/inputs/qwen_product_relight.before.webp", - "sha256": "sha256:bytes:f791a809c0df307cd7dafa8c54ae86bbe4c53d73afdacb2183ff8cdbeac994c2", + "path": "template-gallery/flux_lora_oil_painting.webp", + "sha256": "sha256:bytes:eadd51446c248f077274e548c2676e7e6c5e6d3f0a26d988f26d17d74e162c4a", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | dtthanh/flux_oil_painting_lora@1118ed195c7304ffc52a6cd42b41a520ef749cd9", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "dtthanh/flux_oil_painting_lora: Apache-2.0; https://huggingface.co/dtthanh/flux_oil_painting_lora/tree/1118ed195c7304ffc52a6cd42b41a520ef749cd9" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", @@ -1879,48 +2110,50 @@ "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_product_relight", - "consumingTemplateIds": ["qwen_product_relight"] + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "flux_lora_oil_painting", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "eadd51446c248f077274e548c2676e7e6c5e6d3f0a26d988f26d17d74e162c4a", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" }, { - "path": "template-gallery/inputs/qwen_tile_extract.before.webp", - "sha256": "sha256:bytes:6224e9ee47765858f2ec0c33679140d020cf3ad6e4fa2fa4557ef50f811aef0e", + "path": "template-gallery/flux_lora_paper_cutout.card-poster.webp", + "sha256": "sha256:bytes:e0d9bc89d960b9831be5021c8ca8f49743b27772c99bf0054cce369899fbd1c1", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | Norod78/Flux_1_Dev_LoRA_Paper-Cutout-Style@5cdd7ac47ad1b99f705ac2a03a39d480d34abb5d", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "Norod78/Flux_1_Dev_LoRA_Paper-Cutout-Style: FLUX.1-dev terms; https://huggingface.co/Norod78/Flux_1_Dev_LoRA_Paper-Cutout-Style/tree/5cdd7ac47ad1b99f705ac2a03a39d480d34abb5d" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_tile_extract", - "consumingTemplateIds": ["qwen_tile_extract"] + "provenanceTemplateId": "flux_lora_paper_cutout" }, { - "path": "template-gallery/inputs/qwen_upscale_finish.before.webp", - "sha256": "sha256:bytes:d13a97a9003a7c53e5220010a56e402e4a987cfdfef0c53b7204295dcfa2fefb", + "path": "template-gallery/flux_lora_paper_cutout.webp", + "sha256": "sha256:bytes:83f9fadbbc3c0015f223c651e1a5628472b4951836f96675c71f47a282a67baa", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/amd/realesrgan-x4plus/tree/bda69abcaf525425b371622349e975245ae090c2", - "sourceRevision": "amd/realesrgan-x4plus@bda69abcaf525425b371622349e975245ae090c2 | Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | Norod78/Flux_1_Dev_LoRA_Paper-Cutout-Style@5cdd7ac47ad1b99f705ac2a03a39d480d34abb5d", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "amd/realesrgan-x4plus: BSD-3-Clause; https://huggingface.co/amd/realesrgan-x4plus/tree/bda69abcaf525425b371622349e975245ae090c2", - "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "Norod78/Flux_1_Dev_LoRA_Paper-Cutout-Style: FLUX.1-dev terms; https://huggingface.co/Norod78/Flux_1_Dev_LoRA_Paper-Cutout-Style/tree/5cdd7ac47ad1b99f705ac2a03a39d480d34abb5d" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", @@ -1928,362 +2161,403 @@ "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_upscale_finish", - "consumingTemplateIds": ["qwen_upscale_finish"] + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "flux_lora_paper_cutout", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "83f9fadbbc3c0015f223c651e1a5628472b4951836f96675c71f47a282a67baa", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" }, { - "path": "template-gallery/inputs/reference_fusion.before.webp", - "sha256": "sha256:bytes:283b1cfb32b15fe6b31a29dce1f2b96026c1ad0826bf3f24aebebf4b6f9a4f07", + "path": "template-gallery/flux_lora_photoreal_documentary.card-poster.webp", + "sha256": "sha256:bytes:a5d8512a21313ef4b7efc902020516844c9c9203ca04a2a2a6fbc2ce90a4680e", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | XLabs-AI/flux-RealismLora@1965e17d2e745fcbf8f4004bdbdf603421ef37a8", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "XLabs-AI/flux-RealismLora: FLUX.1-dev non-commercial terms; https://huggingface.co/XLabs-AI/flux-RealismLora/tree/1965e17d2e745fcbf8f4004bdbdf603421ef37a8" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "reference_fusion", - "consumingTemplateIds": ["reference_fusion"] + "provenanceTemplateId": "flux_lora_photoreal_documentary" }, { - "path": "template-gallery/inputs/wan_vace_grayscale_control.before.mp4", - "sha256": "sha256:bytes:748b164fd91bc2eed97f7c1d1125a04496a056f29cc016d7cc0da3734c2303b7", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Native MoDiff image generation or editing for flux_lora_photoreal_documentary", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceLicense": "Maintainer-approved generated output. The selected models and adapters have separate pinned terms.", "modelTerms": [ - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "Wan-AI/Wan2.1-VACE-1.3B-diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + "FLUX.1 [dev] Non-Commercial License v1.1.1 · https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "FLUX.1 dev Non-Commercial License · https://huggingface.co/XLabs-AI/flux-RealismLora/tree/1965e17d2e745fcbf8f4004bdbdf603421ef37a8" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], + "sourceRightsAttestation": "The maintainer approved the exact reviewed asset in the Gallery review and requested its registration.", + "path": "template-gallery/flux_lora_photoreal_documentary.webp", + "sha256": "sha256:bytes:9904d73d7c35e1844ab7a47a556c15805508d08f09391e1f88c1b76240482d1e", + "publishDecision": "approved", + "holdReason": null, "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_grayscale_control", - "consumingTemplateIds": ["wan_vace_grayscale_control"] + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3", + "provenanceTemplateId": "flux_lora_photoreal_documentary" }, { - "path": "template-gallery/inputs/wan_vace_outpaint_reframe.before.mp4", - "sha256": "sha256:bytes:a8f28e04d03c9a6a2ba0b3ba4bf7db08f6ec99c45d962877cbc91aad5f3ad318", + "path": "template-gallery/flux_lora_retro_comic.card-poster.webp", + "sha256": "sha256:bytes:2135eac6e596b94192705700d7ad021b5eabc579b4075de4c821907fd0e00515", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | renderartist/retrocomicflux@46f73222df6c97c9f56c3bef42a11979ba5d5aeb", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "Wan-AI/Wan2.1-VACE-1.3B-diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "renderartist/retrocomicflux: CreativeML Open RAIL-M; https://huggingface.co/renderartist/retrocomicflux/tree/46f73222df6c97c9f56c3bef42a11979ba5d5aeb" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_outpaint_reframe", - "consumingTemplateIds": ["wan_vace_outpaint_reframe"] + "provenanceTemplateId": "flux_lora_retro_comic" }, { - "path": "template-gallery/inputs/wan_vace_video_color_grade.before.mp4", - "sha256": "sha256:bytes:934b4494442c732bfc27f3de1e1a8e99adf0eb96572bd6405f1a9c72da148289", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Native MoDiff image generation or editing for flux_lora_retro_comic", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceLicense": "Maintainer-approved generated output. The selected models and adapters have separate pinned terms.", "modelTerms": [ - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" + "FLUX.1 [dev] Non-Commercial License v1.1.1 · https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "creativeml-openrail-m · https://huggingface.co/renderartist/retrocomicflux/tree/46f73222df6c97c9f56c3bef42a11979ba5d5aeb" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], + "sourceRightsAttestation": "The maintainer approved the exact reviewed asset in the Gallery review and requested its registration.", + "path": "template-gallery/flux_lora_retro_comic.webp", + "sha256": "sha256:bytes:df7c0c2e750bc46913441a3b8d284ed7fca0563d0cce43faa0142c0db8d95809", + "publishDecision": "approved", + "holdReason": null, "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_video_color_grade", - "consumingTemplateIds": ["wan_vace_video_color_grade"] + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3", + "provenanceTemplateId": "flux_lora_retro_comic" }, { - "path": "template-gallery/inputs/wan_vace_video_to_video.before.mp4", - "sha256": "sha256:bytes:1f5cd051f787fc878bed50d3c26cce840abe00c942d32e49492e544ac2f88cff", + "path": "template-gallery/flux_lora_watercolor.card-poster.webp", + "sha256": "sha256:bytes:3861280c52dd017ea4996673cd3922f5e25351eccab2aa65b90960fd37a4d03d", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | SebastianBodza/Flux_Aquarell_Watercolor_v2@a565b2140a05f1eece244514f90d2e29b3b1d45d", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" + "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "SebastianBodza/Flux_Aquarell_Watercolor_v2: FLUX.1-dev non-commercial terms; https://huggingface.co/SebastianBodza/Flux_Aquarell_Watercolor_v2/tree/a565b2140a05f1eece244514f90d2e29b3b1d45d" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_video_to_video", - "consumingTemplateIds": ["wan_vace_video_to_video"] + "provenanceTemplateId": "flux_lora_watercolor" }, { - "path": "template-gallery/low_vram.webp", - "sha256": "sha256:bytes:596a2bd9334ac38ebd9f56b3a897d11e1371a658504eca427fe09163b2b5e673", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", - "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Native MoDiff image generation or editing for flux_lora_watercolor", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceLicense": "Maintainer-approved generated output. The selected models and adapters have separate pinned terms.", "modelTerms": [ - "Tongyi-MAI/Z-Image-Turbo: Apache-2.0; https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + "FLUX.1 [dev] Non-Commercial License v1.1.1 · https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "FLUX.1 dev Non-Commercial License · https://huggingface.co/SebastianBodza/Flux_Aquarell_Watercolor_v2/tree/a565b2140a05f1eece244514f90d2e29b3b1d45d" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], + "sourceRightsAttestation": "The maintainer approved the exact reviewed asset in the Gallery review and requested its registration.", + "path": "template-gallery/flux_lora_watercolor.webp", + "sha256": "sha256:bytes:75e44686c2194ec8ec79db1cbdd90ac89d5d629509c4892d855caf59846ed876", + "publishDecision": "approved", + "holdReason": null, "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "low_vram" + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3", + "provenanceTemplateId": "flux_lora_watercolor" }, { - "path": "template-gallery/ltx_video_animated_story.card-poster.png", - "sha256": "sha256:bytes:fcd07a3c5a3e8df1890f1dd98f72746a67025a7bf3c4f6559026b24a8afa445c", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | black-forest-labs/FLUX.1-Redux-dev@c95859fbf7703ca4d6824b4da4407d7cd0434f81", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + "black-forest-labs/FLUX.1-dev: FLUX.1 [dev] Non-Commercial License; generated-output provisions apply; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "black-forest-labs/FLUX.1-Redux-dev: FLUX.1 [dev] Non-Commercial License; generated-output provisions apply; https://huggingface.co/black-forest-labs/FLUX.1-Redux-dev/tree/c95859fbf7703ca4d6824b4da4407d7cd0434f81" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", + "path": "template-gallery/flux_redux_edit.webp", + "sha256": "sha256:bytes:37dad69373b93c1a792156ccc44d185158dd0c62ca954d6c6f09cdb648947e82", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_animated_story" + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "flux_redux_edit" }, { - "path": "template-gallery/ltx_video_animated_story.card-preview.mp4", - "sha256": "sha256:bytes:e73844b15d89acf4ee20fa7c9b3a374951016fabdd117f86cdf6c1b35b5c0d00", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | black-forest-labs/FLUX.1-Redux-dev@c95859fbf7703ca4d6824b4da4407d7cd0434f81", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + "black-forest-labs/FLUX.1-dev: FLUX.1 [dev] Non-Commercial License; generated-output provisions apply; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "black-forest-labs/FLUX.1-Redux-dev: FLUX.1 [dev] Non-Commercial License; generated-output provisions apply; https://huggingface.co/black-forest-labs/FLUX.1-Redux-dev/tree/c95859fbf7703ca4d6824b4da4407d7cd0434f81" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", + "path": "template-gallery/flux_redux_multi_reference.webp", + "sha256": "sha256:bytes:c50df8d364a6065443d8f790a347ad7baf84e8bacf91a15245d28619a9f54bd9", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_animated_story" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", + "provenanceTemplateId": "flux_redux_multi_reference" }, { - "path": "template-gallery/ltx_video_animated_story.mp4", - "sha256": "sha256:bytes:974e2d08f28bb2613e6f4195dd016d0c9fc87e8a6d39f677b0afdcc6a00b0950", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, with exact-file rights explicitly attested by the maintainer", + "creationMethod": "AI-generated retained native FLUX.1 Schnell image with a synthetic worker and no external image input", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-schnell/tree/741f7c3ce8b383c54771c7003378a50191e9efe9", + "sourceRevision": "black-forest-labs/FLUX.1-schnell@741f7c3ce8b383c54771c7003378a50191e9efe9", + "sourceLicense": "Original generated image; exact-file redistribution rights explicitly attested; see pinned model terms", "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + "black-forest-labs/FLUX.1-schnell: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.1-schnell/tree/741f7c3ce8b383c54771c7003378a50191e9efe9" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "sourceRightsAttestation": "I hold the rights needed to publish this exact retained generated image and its redacted technical/review records under Apache-2.0 in the existing MoDiff Gallery Dataset. The worker is synthetic; there were no external image inputs or real-person likeness references. The pinned FLUX.1 Schnell Apache-2.0 model terms are retained.", + "path": "template-gallery/flux_schnell_text_to_image.webp", + "sha256": "sha256:bytes:a8d5a32a0eb8638bb9a4fdd4d4c7fbfc6dbdafb8462e4ea4eb45018d0f03b970", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_animated_story" + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-retained-schnell-limited-image-registration", + "humanApprovalPacketSHA256": "488dc05971842cc9ed2b31c5995de204015d8b6a975ebc917329dfe3eac71d2c", + "provenanceTemplateId": "flux_schnell_text_to_image" }, { - "path": "template-gallery/ltx_video_animated_story.poster.png", - "sha256": "sha256:bytes:fb7d322ad8d64ea7b34acf5ac99822dfb089b160dce07857409a305d984cb662", + "path": "template-gallery/forest_ferns.webp", + "sha256": "sha256:bytes:714152e1bc5bbfba9201877fa572f7537204806c5b0ad24f71eda95b09f89f26", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" - ], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/zai-org/GLM-Image/tree/2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4", + "sourceRevision": "zai-org/GLM-Image@2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": ["mit. https://huggingface.co/zai-org/GLM-Image/tree/2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4"], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_animated_story" + "requiredAttribution": [ + "zai-org/GLM-Image@2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4 https://huggingface.co/zai-org/GLM-Image/tree/2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "forest_ferns" }, { - "path": "template-gallery/ltx_video_image_to_video.card-preview.mp4", - "sha256": "sha256:bytes:e1065266a98cf1d2ef4679607aafaa9ba56e1f3eab98f1aa726a2ef0a3f85457", + "path": "template-gallery/glasshouse_rain.webp", + "sha256": "sha256:bytes:56968828743bb61caae1be50d0fe07499cea57eade5d9e6586749cd9da99003b", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + "CreativeML Open RAIL++-M. https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_image_to_video" + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "glasshouse_rain" }, { - "path": "template-gallery/ltx_video_image_to_video.mp4", - "sha256": "sha256:bytes:ae231645ef33dcde428ee04087d4408c56596bcc9ba0b1082fa4b45b56b5ea4d", + "creatorOrRightsholder": "MoDiff project maintainers, with exact-file rights explicitly attested by the maintainer", + "creationMethod": "AI-generated prompt-only native Qwen-Image-2512 image", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "Original prompt-only generation; exact-file redistribution rights explicitly attested; see pinned model terms", + "modelTerms": [ + "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "sourceRightsAttestation": "I hold the rights or permissions needed to publish this exact generated bakery image and its redacted technical/review records under Apache-2.0. The workers are synthetic; no external image inputs or real-person likeness references were used.", + "path": "template-gallery/high_quality.webp", + "sha256": "sha256:bytes:1caa2635e1c168e2d0e06145f7b9c30b92bfc012ffcd7815688ce2444a20c123", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" - ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-qwen-native-image-registration", + "humanApprovalPacketSHA256": "dcea9bcff1de179dad3357926933fe869b99c063cee0f4dc1764833e3cf3ea53", + "provenanceTemplateId": "high_quality" + }, + { + "path": "template-gallery/history/ace_step_audio_variation.v1/ace_step_audio_variation.quality-review.json", + "sha256": "sha256:bytes:b20bf6bd7042d9214f72db5125ff6e0ef3a686ed2ee15143739efe2e50051bb9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_image_to_video" + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "provenanceTemplateId": "ace_step_audio_variation", + "retainedOriginalPath": "template-gallery/reviews/ace_step_audio_variation.quality-review.json", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud." }, { - "path": "template-gallery/ltx_video_image_to_video.poster.png", - "sha256": "sha256:bytes:f1b007220fbecc2ea40814d88ebab427f81a53a50ada4b109a39fd220f325fbe", + "path": "template-gallery/history/ace_step_audio_variation.v1/ace_step_audio_variation.reviewed-provenance.json", + "sha256": "sha256:bytes:f31768feb3e080c0e83ed8a0a982399fa64a38258620ba43214cc7514251948d", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" - ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_image_to_video" + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "provenanceTemplateId": "ace_step_audio_variation", + "retainedOriginalPath": "template-gallery/reviews/ace_step_audio_variation.reviewed-provenance.json", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud." }, { - "path": "template-gallery/ltx_video_long_showcase.card-poster.png", - "sha256": "sha256:bytes:a0b0f93ebf1558f7a8b7c96bb2024bdb55909a54c1362d9d1027ccc24614bdd5", + "path": "template-gallery/history/ace_step_audio_variation.v1/ace_step_audio_variation.wav", + "sha256": "sha256:bytes:9cfcf80ef850634fa6f74c06609949b0f0a513e77d782409db8db48751bbe03a", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceUrl": "https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", + "sourceRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + "ACE-Step/acestep-v15-xl-turbo-diffusers: MIT; https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_long_showcase" + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "provenanceTemplateId": "ace_step_audio_variation", + "retainedOriginalPath": "template-gallery/ace_step_audio_variation.wav", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud." }, { - "path": "template-gallery/ltx_video_long_showcase.card-preview.mp4", - "sha256": "sha256:bytes:c3868d87687b20cbe2df2187da05c0eb6ce7feeb3150b395ad29ed26b178e07d", + "path": "template-gallery/history/ace_step_lyric_music_video.before-accepted-20261115/ace_step_lyric_music_video.card-preview.mp4", + "sha256": "sha256:bytes:840295a75bcaa7dec5a3ab33a997ceb7c58043543463c7a2ea26fb45c0a91b7e", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceUrl": "https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", + "sourceRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0 | Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ + "ACE-Step/acestep-v15-xl-turbo-diffusers: MIT; https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" ], @@ -2293,21 +2567,25 @@ "requiredAttribution": [], "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_long_showcase" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "provenanceTemplateId": "ace_step_lyric_music_video", + "retainedOriginalPath": "template-gallery/ace_step_lyric_music_video.card-preview.mp4", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well" }, { - "path": "template-gallery/ltx_video_long_showcase.mp4", - "sha256": "sha256:bytes:e4adfedfc81f21dae0d5a415698a17aabcbadf2ccc8f63550a1e24539b00997a", + "path": "template-gallery/history/ace_step_lyric_music_video.before-accepted-20261115/ace_step_lyric_music_video.mp4", + "sha256": "sha256:bytes:f2005a050e59405481db1f5a9b24f1b6de8912c92818112bfdc8cf3f8a50bbbb", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceUrl": "https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", + "sourceRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0 | Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ + "ACE-Step/acestep-v15-xl-turbo-diffusers: MIT; https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" ], @@ -2317,21 +2595,25 @@ "requiredAttribution": [], "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_long_showcase" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "provenanceTemplateId": "ace_step_lyric_music_video", + "retainedOriginalPath": "template-gallery/ace_step_lyric_music_video.mp4", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well" }, { - "path": "template-gallery/ltx_video_long_showcase.poster.png", - "sha256": "sha256:bytes:a82c4ec15dea4ab6cc2fc5cc85cfa4e4f21abac8b230920fa7964b01acba965c", + "path": "template-gallery/history/ace_step_lyric_music_video.before-accepted-20261115/ace_step_lyric_music_video.poster.png", + "sha256": "sha256:bytes:edd5ca052421a6033a794a9b86028cf551279090cb78c63d510323343ba6b514", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceUrl": "https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", + "sourceRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0 | Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ + "ACE-Step/acestep-v15-xl-turbo-diffusers: MIT; https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" ], @@ -2341,71 +2623,97 @@ "requiredAttribution": [], "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_long_showcase" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "provenanceTemplateId": "ace_step_lyric_music_video", + "retainedOriginalPath": "template-gallery/ace_step_lyric_music_video.poster.png", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well" }, { - "path": "template-gallery/ltx_video_multi_reference.card-poster.png", - "sha256": "sha256:bytes:95a7196b97f24cc113918a0d989a5b88ed4b29cb551a799c00a83f9b91acf8af", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for two maintainer-accepted native replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/history/ace_step_lyric_music_video.before-accepted-20261115/entry-and-recipe.json", + "sha256": "sha256:bytes:01b07f17aede8913c646cd4e4d84d8e25455cab8f8632a3d07e7b1537d2d4b51", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" - ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", + "provenanceTemplateId": "ace_step_lyric_music_video" + }, + { + "path": "template-gallery/history/ace_step_lyric_music_video.before-accepted-20261115/reviews/ace_step_lyric_music_video.quality-review.json", + "sha256": "sha256:bytes:4f51cfb385ed654b88b0cecb6b064b4a7c50d884a575b9d89c2224cf0916032d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_multi_reference" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "provenanceTemplateId": "ace_step_lyric_music_video", + "retainedOriginalPath": "template-gallery/reviews/ace_step_lyric_music_video.quality-review.json", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well" }, { - "path": "template-gallery/ltx_video_multi_reference.card-preview.mp4", - "sha256": "sha256:bytes:92ed6de4481e1b240dd74f510d6431eef70eb0c5cfcca6c420d73c6e22e5c3c9", + "path": "template-gallery/history/ace_step_lyric_music_video.before-accepted-20261115/reviews/ace_step_lyric_music_video.reviewed-provenance.json", + "sha256": "sha256:bytes:ff73d620c0d459d7cd4e7e69e237ac9d805d579ad75813dedab3445f60326d65", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" - ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_multi_reference" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "provenanceTemplateId": "ace_step_lyric_music_video", + "retainedOriginalPath": "template-gallery/reviews/ace_step_lyric_music_video.reviewed-provenance.json", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well" }, { - "path": "template-gallery/ltx_video_multi_reference.mp4", - "sha256": "sha256:bytes:1abc0dc5217b912ca5c9febefa0c1ce9e221b513370fcb3106b4afbece3a1ced", + "path": "template-gallery/history/flux_redux_edit.v1/flux_redux_edit.before.webp", + "sha256": "sha256:bytes:2e0ec8892660785e322468d0153fd2dadf7a4d920fce2d7d4a0b686a8fe8515d", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | black-forest-labs/FLUX.1-Redux-dev@c95859fbf7703ca4d6824b4da4407d7cd0434f81", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "black-forest-labs/FLUX.1-Redux-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Redux-dev/tree/c95859fbf7703ca4d6824b4da4407d7cd0434f81" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", @@ -2413,71 +2721,75 @@ "requiredAttribution": [], "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_multi_reference" + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "provenanceTemplateId": "flux_redux_edit", + "consumingTemplateIds": ["flux_redux_edit"], + "retainedOriginalPath": "template-gallery/inputs/flux_redux_edit.before.webp", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud." }, { - "path": "template-gallery/ltx_video_multi_reference.poster.png", - "sha256": "sha256:bytes:6260afa6e9efda984a7a75e4420b3d7f7583a6cccdd532b964ca6213b4eb185c", + "path": "template-gallery/history/flux_redux_edit.v1/flux_redux_edit.quality-review.json", + "sha256": "sha256:bytes:ecd1f9a9365ddf28ae4c200e4c040d3f2f48c0429d380f35f099f85530dc617b", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" - ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_multi_reference" + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "provenanceTemplateId": "flux_redux_edit", + "retainedOriginalPath": "template-gallery/reviews/flux_redux_edit.quality-review.json", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud." }, { - "path": "template-gallery/ltx_video_text_to_video.card-poster.png", - "sha256": "sha256:bytes:e131e2f676e04382117e77deeede145851fff469819d173073354cc5033b116d", + "path": "template-gallery/history/flux_redux_edit.v1/flux_redux_edit.reviewed-provenance.json", + "sha256": "sha256:bytes:73c4395d30e0db765215ff48dd521c269c6b58d1e3fdc42e030ca230f51a2477", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" - ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_text_to_video" + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "provenanceTemplateId": "flux_redux_edit", + "retainedOriginalPath": "template-gallery/reviews/flux_redux_edit.reviewed-provenance.json", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud." }, { - "path": "template-gallery/ltx_video_text_to_video.card-preview.mp4", - "sha256": "sha256:bytes:89be8cfd064fd3c81ab2310ed05d7d8660a875f78c132a7b8d01100d547a5ea7", + "path": "template-gallery/history/flux_redux_edit.v1/flux_redux_edit.webp", + "sha256": "sha256:bytes:56174da5ed300722ee96edfd0b80149d869081cee801e8dbac517734dc56e4bf", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | black-forest-labs/FLUX.1-Redux-dev@c95859fbf7703ca4d6824b4da4407d7cd0434f81", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "black-forest-labs/FLUX.1-Redux-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Redux-dev/tree/c95859fbf7703ca4d6824b4da4407d7cd0434f81" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", @@ -2485,23 +2797,49 @@ "requiredAttribution": [], "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_text_to_video" + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "provenanceTemplateId": "flux_redux_edit", + "retainedOriginalPath": "template-gallery/flux_redux_edit.webp", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud." }, { - "path": "template-gallery/ltx_video_text_to_video.mp4", - "sha256": "sha256:bytes:ba1659c0c3c1a5864dfcd6c01f471a731b84cc9523aaa9e4009863ee61714f44", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for two maintainer-accepted native replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/history/flux_redux_multi_reference.before-accepted-20261115/entry-and-recipe.json", + "sha256": "sha256:bytes:ebb4bfa92cf95667679aae9289f34bbb31d41d8a00aab6b480ae5a1f4e6dcbaf", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", + "provenanceTemplateId": "flux_redux_multi_reference" + }, + { + "path": "template-gallery/history/flux_redux_multi_reference.before-accepted-20261115/flux_redux_multi_reference.webp", + "sha256": "sha256:bytes:ea050772cf672d0b115310b1feac79bd435c7538ffcbdb36b83f9e3b219f324a", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | black-forest-labs/FLUX.1-Redux-dev@c95859fbf7703ca4d6824b4da4407d7cd0434f81", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "black-forest-labs/FLUX.1-Redux-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Redux-dev/tree/c95859fbf7703ca4d6824b4da4407d7cd0434f81" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", @@ -2509,23 +2847,26 @@ "requiredAttribution": [], "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_text_to_video" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "provenanceTemplateId": "flux_redux_multi_reference", + "retainedOriginalPath": "template-gallery/flux_redux_multi_reference.webp", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well" }, { - "path": "template-gallery/ltx_video_text_to_video.poster.png", - "sha256": "sha256:bytes:85f93dcd6f8e051abb28509284c154585dbc133ce0bc7ed0acd57dbe68781884", + "path": "template-gallery/history/flux_redux_multi_reference.before-accepted-20261115/inputs/flux_redux_multi_reference.before.webp", + "sha256": "sha256:bytes:7f1ea58485fa7802765b9fbbf0e6957e8607261c91669fdcc44cbed80c6fb309", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | black-forest-labs/FLUX.1-Redux-dev@c95859fbf7703ca4d6824b4da4407d7cd0434f81", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "black-forest-labs/FLUX.1-Redux-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Redux-dev/tree/c95859fbf7703ca4d6824b4da4407d7cd0434f81" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", @@ -2533,46 +2874,95 @@ "requiredAttribution": [], "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_text_to_video" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "provenanceTemplateId": "flux_redux_multi_reference", + "consumingTemplateIds": ["flux_redux_multi_reference"], + "retainedOriginalPath": "template-gallery/inputs/flux_redux_multi_reference.before.webp", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well" }, { - "path": "template-gallery/ltx_video_video_to_video.card-poster.png", - "sha256": "sha256:bytes:e5a259b5ab8a0b21b31cb8ba23ae7c0d45a7c9de193e76c1b2608c5709d0fe8c", + "path": "template-gallery/history/flux_redux_multi_reference.before-accepted-20261115/reviews/flux_redux_multi_reference.quality-review.json", + "sha256": "sha256:bytes:6d1a2b1cd59643e756167a31b4b7fb96242f3775317f05c9139883468cff5c93", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/datasets/huggingface/documentation-images", - "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceLicense": "CC-BY-NC-SA-4.0", - "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" - ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [ - "Source: Hugging Face documentation-images Dataset, CC BY-NC-SA 4.0; modified by the MoDiff LTX workflow." - ], - "assetLicense": "CC-BY-NC-SA-4.0", + "requiredAttribution": [], + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_video_to_video" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "provenanceTemplateId": "flux_redux_multi_reference", + "retainedOriginalPath": "template-gallery/reviews/flux_redux_multi_reference.quality-review.json", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well" }, { - "path": "template-gallery/ltx_video_video_to_video.card-preview.mp4", - "sha256": "sha256:bytes:2b50fa4dbb61316914b39c6ac0990e2f8b069186f7f4012ea5b5342b000b6ce3", + "path": "template-gallery/history/flux_redux_multi_reference.before-accepted-20261115/reviews/flux_redux_multi_reference.reviewed-provenance.json", + "sha256": "sha256:bytes:0e30224ab60a14f2d040e4104454f3cf1867ebf3fb152e7554ee295b9cc69914", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "provenanceTemplateId": "flux_redux_multi_reference", + "retainedOriginalPath": "template-gallery/reviews/flux_redux_multi_reference.reviewed-provenance.json", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/history/ltx_video_animated_story.before-native-20261115/entry-and-recipe.json", + "sha256": "sha256:bytes:3d95c081047dce79ac3cd52a24fbbafbe2a00170d99606999f5fb5d8b8859eab", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "ltx_video_animated_story" + }, + { + "path": "template-gallery/history/ltx_video_animated_story.before-native-20261115/ltx_video_animated_story.card-preview.mp4", + "sha256": "sha256:bytes:e73844b15d89acf4ee20fa7c9b3a374951016fabdd117f86cdf6c1b35b5c0d00", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/datasets/huggingface/documentation-images", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceLicense": "CC-BY-NC-SA-4.0", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" @@ -2580,25 +2970,26 @@ "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [ - "Source: Hugging Face documentation-images Dataset, CC BY-NC-SA 4.0; modified by the MoDiff LTX workflow." - ], - "assetLicense": "CC-BY-NC-SA-4.0", + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_video_to_video" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "ltx_video_animated_story", + "retainedOriginalPath": "template-gallery/ltx_video_animated_story.card-preview.mp4", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/ltx_video_video_to_video.mp4", - "sha256": "sha256:bytes:b6ab8245f0546512215b6eb271d2ef51bd34fa6ac6e22c126c8f359e0be28fdc", + "path": "template-gallery/history/ltx_video_animated_story.before-native-20261115/ltx_video_animated_story.mp4", + "sha256": "sha256:bytes:974e2d08f28bb2613e6f4195dd016d0c9fc87e8a6d39f677b0afdcc6a00b0950", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/datasets/huggingface/documentation-images", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceLicense": "CC-BY-NC-SA-4.0", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" @@ -2606,25 +2997,26 @@ "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [ - "Source: Hugging Face documentation-images Dataset, CC BY-NC-SA 4.0; modified by the MoDiff LTX workflow." - ], - "assetLicense": "CC-BY-NC-SA-4.0", + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_video_to_video" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "ltx_video_animated_story", + "retainedOriginalPath": "template-gallery/ltx_video_animated_story.mp4", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/ltx_video_video_to_video.poster.png", - "sha256": "sha256:bytes:26d96f8085457388b724d4fc962cdbae3acc2b49be1aecf47b3a0efebac9abba", + "path": "template-gallery/history/ltx_video_animated_story.before-native-20261115/ltx_video_animated_story.poster.png", + "sha256": "sha256:bytes:fb7d322ad8d64ea7b34acf5ac99822dfb089b160dce07857409a305d984cb662", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/datasets/huggingface/documentation-images", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceLicense": "CC-BY-NC-SA-4.0", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" @@ -2632,18 +3024,19 @@ "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [ - "Source: Hugging Face documentation-images Dataset, CC BY-NC-SA 4.0; modified by the MoDiff LTX workflow." - ], - "assetLicense": "CC-BY-NC-SA-4.0", + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_video_to_video" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "ltx_video_animated_story", + "retainedOriginalPath": "template-gallery/ltx_video_animated_story.poster.png", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/manifest.json", - "sha256": "sha256:bytes:bcc48de0f85d8a815364b3abfbaf2379b88686ba7e34b4c5d0a568efdf5dbbc4", + "path": "template-gallery/history/ltx_video_animated_story.before-native-20261115/reviews/ltx_video_animated_story.quality-review.json", + "sha256": "sha256:bytes:7520a8a1a714f7ed2943abd482189e83593bfa2a85afe48701c65505986d036b", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers", @@ -2658,370 +3051,438 @@ "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "ltx_video_animated_story", + "retainedOriginalPath": "template-gallery/reviews/ltx_video_animated_story.quality-review.json", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/qwen_character_angles.webp", - "sha256": "sha256:bytes:8dfcb7d31adbab7528a702df93eb70cb92491f822145af38ba8cdd1262195e58", + "path": "template-gallery/history/ltx_video_animated_story.before-native-20261115/reviews/ltx_video_animated_story.reviewed-provenance.json", + "sha256": "sha256:bytes:42d1d53a66c603446963ff929f1493eea420dca97c45f225bd7d100ab64d6982", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" - ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_character_angles" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "ltx_video_animated_story", + "retainedOriginalPath": "template-gallery/reviews/ltx_video_animated_story.reviewed-provenance.json", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/qwen_control_image_layout.webp", - "sha256": "sha256:bytes:f4ec212d15e923c3f82e9c3d09d9491a3da411f87e95751619fb06cd75809c9b", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/InstantX/Qwen-Image-ControlNet-Union/tree/b13036f066d6dee7c20513e263d3d673055e9de8", - "sourceRevision": "InstantX/Qwen-Image-ControlNet-Union@b13036f066d6dee7c20513e263d3d673055e9de8 | Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "InstantX/Qwen-Image-ControlNet-Union: Apache-2.0; https://huggingface.co/InstantX/Qwen-Image-ControlNet-Union/tree/b13036f066d6dee7c20513e263d3d673055e9de8", - "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" - ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", + "path": "template-gallery/history/ltx_video_long_showcase.before-native-20261115/entry-and-recipe.json", + "sha256": "sha256:bytes:d916bb54031b193737e834f3629f02dfdbb613e33424aaceed862ea2193761c9", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_control_image_layout" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "ltx_video_long_showcase" }, { - "path": "template-gallery/qwen_edit_plus_single_image.webp", - "sha256": "sha256:bytes:3156bbe36229159f789855cd951d8a224b6485752e50104822a696870a13bc46", + "path": "template-gallery/history/ltx_video_long_showcase.before-native-20261115/ltx_video_long_showcase.card-preview.mp4", + "sha256": "sha256:bytes:c3868d87687b20cbe2df2187da05c0eb6ce7feeb3150b395ad29ed26b178e07d", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "sourceRevision": "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_edit_plus_single_image" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "ltx_video_long_showcase", + "retainedOriginalPath": "template-gallery/ltx_video_long_showcase.card-preview.mp4", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/qwen_edit_strength_sweep.webp", - "sha256": "sha256:bytes:0f785808b47a1d08dc63928a6730eb49825e2655271f8e8f2717c8f6db337a69", + "path": "template-gallery/history/ltx_video_long_showcase.before-native-20261115/ltx_video_long_showcase.mp4", + "sha256": "sha256:bytes:e4adfedfc81f21dae0d5a415698a17aabcbadf2ccc8f63550a1e24539b00997a", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_edit_strength_sweep" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "ltx_video_long_showcase", + "retainedOriginalPath": "template-gallery/ltx_video_long_showcase.mp4", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/qwen_inpaint_mask_draft.webp", - "sha256": "sha256:bytes:b9cfc1e839e7604789fd0598b4f1810796c92b3c17fb106b411901078cf0fb2c", + "path": "template-gallery/history/ltx_video_long_showcase.before-native-20261115/ltx_video_long_showcase.poster.png", + "sha256": "sha256:bytes:a82c4ec15dea4ab6cc2fc5cc85cfa4e4f21abac8b230920fa7964b01acba965c", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_inpaint_mask_draft" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "ltx_video_long_showcase", + "retainedOriginalPath": "template-gallery/ltx_video_long_showcase.poster.png", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/qwen_inpaint_object_replace.webp", - "sha256": "sha256:bytes:5ccd7adeac6f6ddb1d988de1aec90e75ba53a94ed27a1d32eafd3aec2e2531c9", + "path": "template-gallery/history/ltx_video_long_showcase.before-native-20261115/reviews/ltx_video_long_showcase.quality-review.json", + "sha256": "sha256:bytes:9522f4f25ec827402e5e0ce1e2a0c9058d518ffa9c5c33c3a77f5f789bab4692", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" - ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_inpaint_object_replace" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "ltx_video_long_showcase", + "retainedOriginalPath": "template-gallery/reviews/ltx_video_long_showcase.quality-review.json", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/qwen_layered_portrait.webp", - "sha256": "sha256:bytes:6429d7f3d201d2d160cccf9911bcf124bcc03ae63ca4419503bceeb7ff4e71cb", + "path": "template-gallery/history/ltx_video_long_showcase.before-native-20261115/reviews/ltx_video_long_showcase.reviewed-provenance.json", + "sha256": "sha256:bytes:dac558b12c55e74678c33785a4f0d8affd542b96c0bcc70c9a10bf0dfdca4d33", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", - "sourceRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "Qwen/Qwen-Image-Layered: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf" - ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_layered_portrait" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "ltx_video_long_showcase", + "retainedOriginalPath": "template-gallery/reviews/ltx_video_long_showcase.reviewed-provenance.json", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/qwen_logo_texture.webp", - "sha256": "sha256:bytes:0b55d7f2b6c913996965242f0d71b0ddef713a5cca582bdfcf8dfaee8f1ea577", + "path": "template-gallery/history/ltx_video_video_to_video.v1/ltx_video_video_to_video.before.mp4", + "sha256": "sha256:bytes:496fde9e4410d1b1b0ea659fbf0b29d486537d56eefa43f61052a5c6d1808de8", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceUrl": "https://huggingface.co/datasets/huggingface/documentation-images", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "CC-BY-NC-SA-4.0", "modelTerms": [ - "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "requiredAttribution": [ + "Source: Hugging Face documentation-images Dataset, CC BY-NC-SA 4.0; modified by the MoDiff LTX workflow." + ], + "assetLicense": "CC-BY-NC-SA-4.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_logo_texture" + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "provenanceTemplateId": "ltx_video_video_to_video", + "consumingTemplateIds": ["ltx_video_video_to_video"], + "retainedOriginalPath": "template-gallery/inputs/ltx_video_video_to_video.before.mp4", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud." }, { - "path": "template-gallery/qwen_low_vram_poster_layout.webp", - "sha256": "sha256:bytes:e0b7e1a33ced6d1503ea8877d6ab152959a7334c3d976d2620641bb3c2719c99", + "path": "template-gallery/history/ltx_video_video_to_video.v1/ltx_video_video_to_video.card-preview.mp4", + "sha256": "sha256:bytes:2b50fa4dbb61316914b39c6ac0990e2f8b069186f7f4012ea5b5342b000b6ce3", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", - "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceUrl": "https://huggingface.co/datasets/huggingface/documentation-images", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "CC-BY-NC-SA-4.0", "modelTerms": [ - "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "requiredAttribution": [ + "Source: Hugging Face documentation-images Dataset, CC BY-NC-SA 4.0; modified by the MoDiff LTX workflow." + ], + "assetLicense": "CC-BY-NC-SA-4.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_low_vram_poster_layout" + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "provenanceTemplateId": "ltx_video_video_to_video", + "retainedOriginalPath": "template-gallery/ltx_video_video_to_video.card-preview.mp4", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud." }, { - "path": "template-gallery/qwen_low_vram_product_concept.webp", - "sha256": "sha256:bytes:252309e17982b7ac462daf69ec6e26031aa3cbdd58f58d75620e42612008fa05", + "path": "template-gallery/history/ltx_video_video_to_video.v1/ltx_video_video_to_video.mp4", + "sha256": "sha256:bytes:b6ab8245f0546512215b6eb271d2ef51bd34fa6ac6e22c126c8f359e0be28fdc", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/unsloth/Qwen-Image-2512-unsloth-bnb-4bit/tree/f50b8c24fe21e9265509b15113b7cca82d0a4443", - "sourceRevision": "unsloth/Qwen-Image-2512-unsloth-bnb-4bit@f50b8c24fe21e9265509b15113b7cca82d0a4443", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceUrl": "https://huggingface.co/datasets/huggingface/documentation-images", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "CC-BY-NC-SA-4.0", "modelTerms": [ - "unsloth/Qwen-Image-2512-unsloth-bnb-4bit: Apache-2.0; https://huggingface.co/unsloth/Qwen-Image-2512-unsloth-bnb-4bit/tree/f50b8c24fe21e9265509b15113b7cca82d0a4443" + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "requiredAttribution": [ + "Source: Hugging Face documentation-images Dataset, CC BY-NC-SA 4.0; modified by the MoDiff LTX workflow." + ], + "assetLicense": "CC-BY-NC-SA-4.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_low_vram_product_concept" + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "provenanceTemplateId": "ltx_video_video_to_video", + "retainedOriginalPath": "template-gallery/ltx_video_video_to_video.mp4", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud." }, { - "path": "template-gallery/qwen_low_vram_text_rendering.webp", - "sha256": "sha256:bytes:817a486368f274cb9d8870fe2e894964c276ff31ca4aae1cc1c5df1bb47abc98", + "path": "template-gallery/history/ltx_video_video_to_video.v1/ltx_video_video_to_video.poster.png", + "sha256": "sha256:bytes:26d96f8085457388b724d4fc962cdbae3acc2b49be1aecf47b3a0efebac9abba", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/unsloth/Qwen-Image-2512-unsloth-bnb-4bit/tree/f50b8c24fe21e9265509b15113b7cca82d0a4443", - "sourceRevision": "unsloth/Qwen-Image-2512-unsloth-bnb-4bit@f50b8c24fe21e9265509b15113b7cca82d0a4443", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceUrl": "https://huggingface.co/datasets/huggingface/documentation-images", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "CC-BY-NC-SA-4.0", "modelTerms": [ - "unsloth/Qwen-Image-2512-unsloth-bnb-4bit: Apache-2.0; https://huggingface.co/unsloth/Qwen-Image-2512-unsloth-bnb-4bit/tree/f50b8c24fe21e9265509b15113b7cca82d0a4443" + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "requiredAttribution": [ + "Source: Hugging Face documentation-images Dataset, CC BY-NC-SA 4.0; modified by the MoDiff LTX workflow." + ], + "assetLicense": "CC-BY-NC-SA-4.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_low_vram_text_rendering" + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "provenanceTemplateId": "ltx_video_video_to_video", + "retainedOriginalPath": "template-gallery/ltx_video_video_to_video.poster.png", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud." }, { - "path": "template-gallery/qwen_multi_reference_product.webp", - "sha256": "sha256:bytes:7acc91f678a731bf91d0d7fbee7085894eb1165884ed66aa178911b0925d4bde", + "path": "template-gallery/history/ltx_video_video_to_video.v1/ltx_video_video_to_video.quality-review.json", + "sha256": "sha256:bytes:940e6bab9cef2842792c9ebb5e2302f438a77acb8ee360ad17807183b932895f", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" - ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_multi_reference_product" + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "provenanceTemplateId": "ltx_video_video_to_video", + "retainedOriginalPath": "template-gallery/reviews/ltx_video_video_to_video.quality-review.json", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud." }, { - "path": "template-gallery/qwen_outpaint_aspect_template.webp", - "sha256": "sha256:bytes:6dbd61c93050c6b565923580971be27d3d26360386c92494a5836dc4e19187d2", + "path": "template-gallery/history/ltx_video_video_to_video.v1/ltx_video_video_to_video.reviewed-provenance.json", + "sha256": "sha256:bytes:45a8dd0c6cf29dc699b20d391c087aac8c62364715a84fb9b123427574e802b0", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" - ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_outpaint_aspect_template" + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "provenanceTemplateId": "ltx_video_video_to_video", + "retainedOriginalPath": "template-gallery/reviews/ltx_video_video_to_video.reviewed-provenance.json", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud." }, { - "path": "template-gallery/qwen_outpaint_draft.webp", - "sha256": "sha256:bytes:776cc1d7953e252a676e8ce9c733945f79e3ef3f5aa41281cf072077d1a67581", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/history/wan_vace_cinematic_text_to_video.before-native-20261115/entry-and-recipe.json", + "sha256": "sha256:bytes:0b3a8d6b848052f54c743fed2261197f9719147060d470bb2ebcf8e388eb206c", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" - ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_cinematic_text_to_video" + }, + { + "path": "template-gallery/history/wan_vace_cinematic_text_to_video.before-native-20261115/reviews/wan_vace_cinematic_text_to_video.quality-review.json", + "sha256": "sha256:bytes:e7c7f1a212e20d0aba6dd29b4d4f799f4b32f07fd0ef91a45073a30874c59830", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_outpaint_draft" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_cinematic_text_to_video", + "retainedOriginalPath": "template-gallery/reviews/wan_vace_cinematic_text_to_video.quality-review.json", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/qwen_packaging_dieline.webp", - "sha256": "sha256:bytes:88f242e5ad09fbad113c1bbebd9190baf6ab355d59fd22d825e7895cefd30c34", + "path": "template-gallery/history/wan_vace_cinematic_text_to_video.before-native-20261115/reviews/wan_vace_cinematic_text_to_video.reviewed-provenance.json", + "sha256": "sha256:bytes:0c12b78137241cbce6851ae3221254f9e751964c96d4a1dff0792a99f1cf06e8", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/InstantX/Qwen-Image-ControlNet-Union/tree/b13036f066d6dee7c20513e263d3d673055e9de8", - "sourceRevision": "InstantX/Qwen-Image-ControlNet-Union@b13036f066d6dee7c20513e263d3d673055e9de8 | Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "InstantX/Qwen-Image-ControlNet-Union: Apache-2.0; https://huggingface.co/InstantX/Qwen-Image-ControlNet-Union/tree/b13036f066d6dee7c20513e263d3d673055e9de8", - "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" - ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_packaging_dieline" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_cinematic_text_to_video", + "retainedOriginalPath": "template-gallery/reviews/wan_vace_cinematic_text_to_video.reviewed-provenance.json", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/qwen_poster_logo_text.webp", - "sha256": "sha256:bytes:e0ab22f77f5d966d7868f8950f79702dc6d156d0eaef3e06205097558d5c5bb2", + "path": "template-gallery/history/wan_vace_cinematic_text_to_video.before-native-20261115/wan_vace_cinematic_text_to_video.card-preview.mp4", + "sha256": "sha256:bytes:58c230e968510c26bc2ea6131e64791a057d31ee3e3bd0fe6d7a062b0545b356", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", - "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", @@ -3029,23 +3490,26 @@ "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_poster_logo_text" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_cinematic_text_to_video", + "retainedOriginalPath": "template-gallery/wan_vace_cinematic_text_to_video.card-preview.mp4", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/qwen_product_ad_composite.webp", - "sha256": "sha256:bytes:4b55c8e4d6603d58139d98e9450fcfa5cb62dafa0bbdc12fef0ccd37f2157153", + "path": "template-gallery/history/wan_vace_cinematic_text_to_video.before-native-20261115/wan_vace_cinematic_text_to_video.mp4", + "sha256": "sha256:bytes:47a2f29152a5239d52d8625c8abe3b431d7ae6d834c0d6cd0c0b852071eec171", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", @@ -3053,22 +3517,26 @@ "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_product_ad_composite" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_cinematic_text_to_video", + "retainedOriginalPath": "template-gallery/wan_vace_cinematic_text_to_video.mp4", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/qwen_product_mockup.webp", - "sha256": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", + "path": "template-gallery/history/wan_vace_cinematic_text_to_video.before-native-20261115/wan_vace_cinematic_text_to_video.poster.png", + "sha256": "sha256:bytes:427b6012590b1f010c3b77ee72bd350e84a4fccc84c65a8b0c5607d115adac55", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/unsloth/Qwen-Image-2512-unsloth-bnb-4bit/tree/f50b8c24fe21e9265509b15113b7cca82d0a4443", - "sourceRevision": "unsloth/Qwen-Image-2512-unsloth-bnb-4bit@f50b8c24fe21e9265509b15113b7cca82d0a4443", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "unsloth/Qwen-Image-2512-unsloth-bnb-4bit: Apache-2.0; https://huggingface.co/unsloth/Qwen-Image-2512-unsloth-bnb-4bit/tree/f50b8c24fe21e9265509b15113b7cca82d0a4443" + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", @@ -3076,23 +3544,49 @@ "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_product_mockup" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_cinematic_text_to_video", + "retainedOriginalPath": "template-gallery/wan_vace_cinematic_text_to_video.poster.png", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/qwen_product_relight.webp", - "sha256": "sha256:bytes:a77aead151d72398d73d93719dc258fd797e75d6409a0de80208d43816057c2a", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/history/wan_vace_grayscale_control.before-native-20261115/entry-and-recipe.json", + "sha256": "sha256:bytes:342d4e4899e40ad1a9054a4b7043025298648c4383c12108fba1f9bc0feb8bc2", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_grayscale_control" + }, + { + "path": "template-gallery/history/wan_vace_grayscale_control.before-native-20261115/inputs/wan_vace_grayscale_control.before.mp4", + "sha256": "sha256:bytes:748b164fd91bc2eed97f7c1d1125a04496a056f29cc016d7cc0da3734c2303b7", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-VACE-1.3B-diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", @@ -3100,22 +3594,75 @@ "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_product_relight" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_grayscale_control", + "consumingTemplateIds": ["wan_vace_grayscale_control"], + "retainedOriginalPath": "template-gallery/inputs/wan_vace_grayscale_control.before.mp4", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/qwen_text_rendering.webp", - "sha256": "sha256:bytes:ee80cfdbd3538e6865313be658299f9c460a2726977c126dab7499fc67827b8d", + "path": "template-gallery/history/wan_vace_grayscale_control.before-native-20261115/reviews/wan_vace_grayscale_control.quality-review.json", + "sha256": "sha256:bytes:d135d69159418aecc6d0956b1ec64f2c7fc76137445679a4d4b11a54629c0932", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_grayscale_control", + "retainedOriginalPath": "template-gallery/reviews/wan_vace_grayscale_control.quality-review.json", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" + }, + { + "path": "template-gallery/history/wan_vace_grayscale_control.before-native-20261115/reviews/wan_vace_grayscale_control.reviewed-provenance.json", + "sha256": "sha256:bytes:0366fae2e916bf0c67a90b8e898b9b0f1a2ff66680bcd789b160566e5a462070", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_grayscale_control", + "retainedOriginalPath": "template-gallery/reviews/wan_vace_grayscale_control.reviewed-provenance.json", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" + }, + { + "path": "template-gallery/history/wan_vace_grayscale_control.before-native-20261115/wan_vace_grayscale_control.card-preview.mp4", + "sha256": "sha256:bytes:1ca73ab55f51fbe4eb08d4de5a2fa0c1c9654cf77909f2626aab0414a35f5985", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/unsloth/Qwen-Image-2512-unsloth-bnb-4bit/tree/f50b8c24fe21e9265509b15113b7cca82d0a4443", - "sourceRevision": "unsloth/Qwen-Image-2512-unsloth-bnb-4bit@f50b8c24fe21e9265509b15113b7cca82d0a4443", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "unsloth/Qwen-Image-2512-unsloth-bnb-4bit: Apache-2.0; https://huggingface.co/unsloth/Qwen-Image-2512-unsloth-bnb-4bit/tree/f50b8c24fe21e9265509b15113b7cca82d0a4443" + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-VACE-1.3B-diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", @@ -3123,22 +3670,26 @@ "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_text_rendering" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_grayscale_control", + "retainedOriginalPath": "template-gallery/wan_vace_grayscale_control.card-preview.mp4", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/qwen_tile_extract.webp", - "sha256": "sha256:bytes:66005c52bdbf800764f4de443586346c7bf75a1fd5ebc4255df405d1180c3b00", + "path": "template-gallery/history/wan_vace_grayscale_control.before-native-20261115/wan_vace_grayscale_control.mp4", + "sha256": "sha256:bytes:4a011e34131e9c3bc9b05621184a520f6fb85c282031acd35e2988dda105ff62", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", - "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-VACE-1.3B-diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", @@ -3146,23 +3697,26 @@ "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_tile_extract" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_grayscale_control", + "retainedOriginalPath": "template-gallery/wan_vace_grayscale_control.mp4", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/qwen_upscale_finish.webp", - "sha256": "sha256:bytes:9ddf91ae8f655b8cb44f087115eff24c791ddbee26753d9f328354f738a423ce", + "path": "template-gallery/history/wan_vace_grayscale_control.before-native-20261115/wan_vace_grayscale_control.poster.png", + "sha256": "sha256:bytes:81a77bbc5882c22ab8e76fce76d7a2084e57b938fff42e842e5e9894dbc3010d", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/amd/realesrgan-x4plus/tree/bda69abcaf525425b371622349e975245ae090c2", - "sourceRevision": "amd/realesrgan-x4plus@bda69abcaf525425b371622349e975245ae090c2 | Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "amd/realesrgan-x4plus: BSD-3-Clause; https://huggingface.co/amd/realesrgan-x4plus/tree/bda69abcaf525425b371622349e975245ae090c2", - "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-VACE-1.3B-diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", @@ -3170,23 +3724,49 @@ "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_upscale_finish" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_grayscale_control", + "retainedOriginalPath": "template-gallery/wan_vace_grayscale_control.poster.png", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/reference_fusion.webp", - "sha256": "sha256:bytes:cb5621c2927bdb58ecc595e71d258b9eee2ef2ca164242474846db825cdb2cb1", + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/entry-and-recipe.json", + "sha256": "sha256:bytes:2761544cfb268b53af298f7e2bb89b7367cd4471ecd17ed704fc827341332c8a", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_outpaint_reframe" + }, + { + "path": "template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/inputs/wan_vace_outpaint_reframe.before.mp4", + "sha256": "sha256:bytes:a8f28e04d03c9a6a2ba0b3ba4bf7db08f6ec99c45d962877cbc91aad5f3ad318", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", - "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-VACE-1.3B-diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", @@ -3194,13 +3774,17 @@ "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "reference_fusion" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_outpaint_reframe", + "consumingTemplateIds": ["wan_vace_outpaint_reframe"], + "retainedOriginalPath": "template-gallery/inputs/wan_vace_outpaint_reframe.before.mp4", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/reviews/ace_step_audio_continuation.quality-review.json", - "sha256": "sha256:bytes:e58e802eec1e2fc312f1eddf271416d9617c99c315972c35b99f98441a4b5783", + "path": "template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/reviews/wan_vace_outpaint_reframe.quality-review.json", + "sha256": "sha256:bytes:d6a2b3843f4581565adc30b9d16ee4a17f84751f0ef11d8b0b9b505ff5d57f66", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers", @@ -3215,13 +3799,16 @@ "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ace_step_audio_continuation" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_outpaint_reframe", + "retainedOriginalPath": "template-gallery/reviews/wan_vace_outpaint_reframe.quality-review.json", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/reviews/ace_step_audio_continuation.reviewed-provenance.json", - "sha256": "sha256:bytes:bda2779dfd6ab8e96bb8ccfaab474f9fe989e3cad14320798132045f3a598d1f", + "path": "template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/reviews/wan_vace_outpaint_reframe.reviewed-provenance.json", + "sha256": "sha256:bytes:c4cb91db649df41db5276bb58ea85257d77de542f6349942d07f7f5675788dec", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers", @@ -3236,97 +3823,148 @@ "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ace_step_audio_continuation" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_outpaint_reframe", + "retainedOriginalPath": "template-gallery/reviews/wan_vace_outpaint_reframe.reviewed-provenance.json", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/reviews/ace_step_audio_repaint.quality-review.json", - "sha256": "sha256:bytes:d2cbe043e6636bb17cc55b0c24149e01067077815e2f17a664df39f9ad4e62a4", + "path": "template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/wan_vace_outpaint_reframe.card-preview.mp4", + "sha256": "sha256:bytes:37c1f4b3a9787c6c6dac081ed3cabd2a42d2d0a9c2db10f1ac33a7a98e1ecea2", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-VACE-1.3B-diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ace_step_audio_repaint" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_outpaint_reframe", + "retainedOriginalPath": "template-gallery/wan_vace_outpaint_reframe.card-preview.mp4", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/reviews/ace_step_audio_repaint.reviewed-provenance.json", - "sha256": "sha256:bytes:82d0994007d3c2c447a9f3cae6065db34e494eb9f0353c4cfafa9d0ed473c91c", + "path": "template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/wan_vace_outpaint_reframe.mp4", + "sha256": "sha256:bytes:f899d1af73bd95da7f3babe30c03d834b93c68c3f939eac0b8fb98df094c4d98", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-VACE-1.3B-diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ace_step_audio_repaint" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_outpaint_reframe", + "retainedOriginalPath": "template-gallery/wan_vace_outpaint_reframe.mp4", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/reviews/ace_step_audio_variation.quality-review.json", - "sha256": "sha256:bytes:b20bf6bd7042d9214f72db5125ff6e0ef3a686ed2ee15143739efe2e50051bb9", + "path": "template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/wan_vace_outpaint_reframe.poster.png", + "sha256": "sha256:bytes:df7f715aaadf49fa3df62ef0eb4238e19befadfee6910970ba8eab9e80128f01", "publishDecision": "approved", "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-VACE-1.3B-diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_outpaint_reframe", + "retainedOriginalPath": "template-gallery/wan_vace_outpaint_reframe.poster.png", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" + }, + { "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", "sourceUrl": null, "sourceRevision": null, - "sourceLicense": "Apache-2.0", + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", "modelTerms": [], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", + "path": "template-gallery/history/wan_vace_video_color_grade.before-native-20261115/entry-and-recipe.json", + "sha256": "sha256:bytes:0bd6c104810403f024832dc01a65312d5e7ceecd2c9f7f2ec19d4c10f2b5e479", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ace_step_audio_variation" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_video_color_grade" }, { - "path": "template-gallery/reviews/ace_step_audio_variation.reviewed-provenance.json", - "sha256": "sha256:bytes:f31768feb3e080c0e83ed8a0a982399fa64a38258620ba43214cc7514251948d", + "path": "template-gallery/history/wan_vace_video_color_grade.before-native-20261115/inputs/wan_vace_video_color_grade.before.mp4", + "sha256": "sha256:bytes:934b4494442c732bfc27f3de1e1a8e99adf0eb96572bd6405f1a9c72da148289", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ace_step_audio_variation" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_video_color_grade", + "consumingTemplateIds": ["wan_vace_video_color_grade"], + "retainedOriginalPath": "template-gallery/inputs/wan_vace_video_color_grade.before.mp4", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/reviews/ace_step_lyric_music_video.quality-review.json", - "sha256": "sha256:bytes:4f51cfb385ed654b88b0cecb6b064b4a7c50d884a575b9d89c2224cf0916032d", + "path": "template-gallery/history/wan_vace_video_color_grade.before-native-20261115/reviews/wan_vace_video_color_grade.quality-review.json", + "sha256": "sha256:bytes:8aa386e846e98c6da6ed93369ff02ac9044df43af03a9e5fc109f0ae3e50c629", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers", @@ -3341,13 +3979,16 @@ "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ace_step_lyric_music_video" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_video_color_grade", + "retainedOriginalPath": "template-gallery/reviews/wan_vace_video_color_grade.quality-review.json", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/reviews/ace_step_lyric_music_video.reviewed-provenance.json", - "sha256": "sha256:bytes:ff73d620c0d459d7cd4e7e69e237ac9d805d579ad75813dedab3445f60326d65", + "path": "template-gallery/history/wan_vace_video_color_grade.before-native-20261115/reviews/wan_vace_video_color_grade.reviewed-provenance.json", + "sha256": "sha256:bytes:96b36b2d5b4a9212016d943b486240e0454ce2d30131a4bd39c83d932f865c88", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers", @@ -3362,118 +4003,148 @@ "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ace_step_lyric_music_video" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_video_color_grade", + "retainedOriginalPath": "template-gallery/reviews/wan_vace_video_color_grade.reviewed-provenance.json", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/reviews/ace_step_text_to_audio.quality-review.json", - "sha256": "sha256:bytes:696f5bffb19a0ccda790e668da102797391c665603354e638ac5d937f65c792e", + "path": "template-gallery/history/wan_vace_video_color_grade.before-native-20261115/wan_vace_video_color_grade.card-preview.mp4", + "sha256": "sha256:bytes:aaa8905d5b7e2b1c0cd8b7d7bf62d334db0ec6a8d2a943f73bc82f17026fa9bd", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ace_step_text_to_audio" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_video_color_grade", + "retainedOriginalPath": "template-gallery/wan_vace_video_color_grade.card-preview.mp4", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/reviews/ace_step_text_to_audio.reviewed-provenance.json", - "sha256": "sha256:bytes:e60169416922a2e516557f9ce5c958412c32472db9592119b4f1ccba6afbba36", + "path": "template-gallery/history/wan_vace_video_color_grade.before-native-20261115/wan_vace_video_color_grade.mp4", + "sha256": "sha256:bytes:72a7538470942630455723c7ccd1725d29ed662276e05ef647f4304e16e44d63", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ace_step_text_to_audio" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_video_color_grade", + "retainedOriginalPath": "template-gallery/wan_vace_video_color_grade.mp4", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/reviews/character_edit.quality-review.json", - "sha256": "sha256:bytes:10700042aceac7d071fb5aa3a3f1d26c3cbdef462352a167e7dbbcc1d53ef00f", + "path": "template-gallery/history/wan_vace_video_color_grade.before-native-20261115/wan_vace_video_color_grade.poster.png", + "sha256": "sha256:bytes:5cb855c7951e6aa0e42b04e5583165f02e9fcc978cbcfe5c23b041d92f94f554", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "character_edit" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_video_color_grade", + "retainedOriginalPath": "template-gallery/wan_vace_video_color_grade.poster.png", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/reviews/character_edit.reviewed-provenance.json", - "sha256": "sha256:bytes:cc6d3832032ef61930d18c38f0042ffc3dc80452b035853f07449a25fa36b625", - "publishDecision": "approved", - "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", "sourceUrl": null, "sourceRevision": null, - "sourceLicense": "Apache-2.0", + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", "modelTerms": [], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", + "path": "template-gallery/history/wan_vace_video_to_video.before-native-20261115/entry-and-recipe.json", + "sha256": "sha256:bytes:f930a76e1cebc4e7bf890b791eec17aebb2b36983709092950cdba12ecdbac47", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "character_edit" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_video_to_video" }, { - "path": "template-gallery/reviews/fast_lora.quality-review.json", - "sha256": "sha256:bytes:07534b76dc0cc8b226d1ba705b7d6ae870d7c2387ea1905f258c9f7fc5743744", + "path": "template-gallery/history/wan_vace_video_to_video.before-native-20261115/inputs/wan_vace_video_to_video.before.mp4", + "sha256": "sha256:bytes:1f5cd051f787fc878bed50d3c26cce840abe00c942d32e49492e544ac2f88cff", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "fast_lora" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_video_to_video", + "consumingTemplateIds": ["wan_vace_video_to_video"], + "retainedOriginalPath": "template-gallery/inputs/wan_vace_video_to_video.before.mp4", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/reviews/fast_lora.reviewed-provenance.json", - "sha256": "sha256:bytes:4551fed821f30828ad61a225ee30d0b69de3cd9f0ed71aa14470b7604f946523", + "path": "template-gallery/history/wan_vace_video_to_video.before-native-20261115/reviews/wan_vace_video_to_video.quality-review.json", + "sha256": "sha256:bytes:88168ad146f317c2fd68f5a0db8f369dd398cbbf87073af8fdc6c680e7384a90", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers", @@ -3488,13 +4159,16 @@ "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "fast_lora" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_video_to_video", + "retainedOriginalPath": "template-gallery/reviews/wan_vace_video_to_video.quality-review.json", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/reviews/flux2_klein_edit.duplicate-provenance.json", - "sha256": "sha256:bytes:add0a827b5c9f3d85e926056e717046ed008a9b74eff152e3e2c904893aa3bf3", + "path": "template-gallery/history/wan_vace_video_to_video.before-native-20261115/reviews/wan_vace_video_to_video.reviewed-provenance.json", + "sha256": "sha256:bytes:ee0ba628fb26f4789bfd9729bb534c11479aa170e489fbc3a7174c9c460d3cc2", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers", @@ -3509,3635 +4183,27663 @@ "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux2_klein_edit" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_video_to_video", + "retainedOriginalPath": "template-gallery/reviews/wan_vace_video_to_video.reviewed-provenance.json", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/reviews/flux2_klein_edit.quality-review.json", - "sha256": "sha256:bytes:e870456c2d1ce28d0423f5efbb2a0c674c289be57ac2245a2cc08297834d55a1", + "path": "template-gallery/history/wan_vace_video_to_video.before-native-20261115/wan_vace_video_to_video.card-preview.mp4", + "sha256": "sha256:bytes:7c0738aa477caae0852e7f4fad7fcfb36e9281dd1dbdc0ca091477876d38a074", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux2_klein_edit" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_video_to_video", + "retainedOriginalPath": "template-gallery/wan_vace_video_to_video.card-preview.mp4", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/reviews/flux2_klein_multi_reference.quality-review.json", - "sha256": "sha256:bytes:7a90fab4fbc67f092eab6c32485ad218b84a2d159c9a4f12e0f5d68574560420", + "path": "template-gallery/history/wan_vace_video_to_video.before-native-20261115/wan_vace_video_to_video.mp4", + "sha256": "sha256:bytes:99ccd9e6863e53c76f0a959b6b8953db3001cf3bf90b728d840b3d3a3e48e541", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux2_klein_multi_reference" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_video_to_video", + "retainedOriginalPath": "template-gallery/wan_vace_video_to_video.mp4", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/reviews/flux2_klein_multi_reference.reviewed-provenance.json", - "sha256": "sha256:bytes:8a20fadb16da5e8dcb0799ea2a847d000236c729ab29908f2805d04b1e044df5", + "path": "template-gallery/history/wan_vace_video_to_video.before-native-20261115/wan_vace_video_to_video.poster.png", + "sha256": "sha256:bytes:a893c3eab103355212373709510267ecfa831a2d0b46dfd9e8ca795e06503782", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux2_klein_multi_reference" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "provenanceTemplateId": "wan_vace_video_to_video", + "retainedOriginalPath": "template-gallery/wan_vace_video_to_video.poster.png", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them" }, { - "path": "template-gallery/reviews/flux2_klein_text_to_image.quality-review.json", - "sha256": "sha256:bytes:ed1cafafb9e68f3198424a6e2f29838cff4cce5bf99f882c4c6df37454ff5aa2", + "path": "template-gallery/hunyuan_dit_coastal_lighthouse.webp", + "sha256": "sha256:bytes:849fc3d47db9a23dcea0ec788e336d75e1a5a802e50795e76da3aeb11f8188ef", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceRevision": "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1 https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux2_klein_text_to_image" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "hunyuan_dit_coastal_lighthouse" }, { - "path": "template-gallery/reviews/flux2_klein_text_to_image.reviewed-provenance.json", - "sha256": "sha256:bytes:2ad992337bfa52ad337944508c63e0d7ad97921585f6f28ffb729f39a6d48f24", + "path": "template-gallery/hunyuan_dit_green_glass_study.webp", + "sha256": "sha256:bytes:a8e7cfbff764d792497daf6a8239591e7f1963008946a8593721b931f2cfb41e", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceRevision": "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1 https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux2_klein_text_to_image" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "hunyuan_dit_green_glass_study" }, { - "path": "template-gallery/reviews/flux_control_canny.quality-review.json", - "sha256": "sha256:bytes:cb7b1e20f93d5ea6f796c7d2cc030f76d2327ae4d50cffef3cedc6ef1356dbfd", + "path": "template-gallery/hunyuan_pag_burgundy_knight.webp", + "sha256": "sha256:bytes:9f1c23651fccd748c6caa912c81e5e3983d311374ba2781ee2d27d2b3cf7ae0c", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceRevision": "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1 https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_control_canny" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "hunyuan_pag_burgundy_knight" }, { - "path": "template-gallery/reviews/flux_control_canny.reviewed-provenance.json", - "sha256": "sha256:bytes:761b42bfc3e6c95d884a560a6b2188b8a4a018ee51616857ee02b538b1e9c387", + "path": "template-gallery/inputs/ace_step_audio_variation.before.wav", + "sha256": "sha256:bytes:e07d05a658d361b6d28af62bcccfaeba9254507467dae1c5839efd546fed96a7", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", "sourceUrl": null, "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_control_canny" + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "consumingTemplateIds": ["ace_step_audio_repaint", "ace_step_audio_variation"], + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "ace_step_audio_variation" }, { - "path": "template-gallery/reviews/flux_depth_control.quality-review.json", - "sha256": "sha256:bytes:2976a4ac98fe2fcb0ca30ec3f17a853bd5d5e17150a5a80fb259ed6f87e304dd", + "path": "template-gallery/inputs/alpine_lake_in_oils.before.png", + "sha256": "sha256:bytes:88290a96bc8d52f11f2d1e3c0c0e04c2027661816e54b57d7d4739d731ca1e75", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "creativeml-openrail-m. https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_depth_control" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "alpine_lake_in_oils" }, { - "path": "template-gallery/reviews/flux_depth_control.reviewed-provenance.json", - "sha256": "sha256:bytes:a89189e3ba9f648a9b087d3dba78bffe7e7fbcf02734e494535b7e9f414a1f1f", + "path": "template-gallery/inputs/animatediff_ivory_balloon_blue_mountains.guide.mp4", + "sha256": "sha256:bytes:fb000903f199391388d25d869aedacaedfe3ffbca67800e3113e1173f56e8108", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_depth_control" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_ivory_balloon_blue_mountains" }, { - "path": "template-gallery/reviews/flux_dev_expert_text_to_image.quality-review.json", - "sha256": "sha256:bytes:5848e398fe3095e3b5ff4576567249038021bf1c551530c1feac66d18a37ac21", + "path": "template-gallery/inputs/animatediff_red_tram_in_watercolor.before.mp4", + "sha256": "sha256:bytes:88b69acee9f0c3572a98e49b23ad0e853dc86e1d15074fca99b47f690dde900f", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_dev_expert_text_to_image" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_red_tram_in_watercolor" }, { - "path": "template-gallery/reviews/flux_dev_expert_text_to_image.reviewed-provenance.json", - "sha256": "sha256:bytes:736a0bb30b5d47745e5cc871c07c5c77ade430ccd25d251854bc306d8057d86c", + "path": "template-gallery/inputs/animatediff_red_tram_through_snow.before.mp4", + "sha256": "sha256:bytes:88b69acee9f0c3572a98e49b23ad0e853dc86e1d15074fca99b47f690dde900f", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_dev_expert_text_to_image" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_red_tram_through_snow" }, { - "path": "template-gallery/reviews/flux_fill_inpaint.quality-review.json", - "sha256": "sha256:bytes:8a963ab2e9a56174cf2ad78c00b5c2aa9b30209ef4ef475e50204b6ecfd393a6", + "path": "template-gallery/inputs/animatediff_red_tram_through_snow.guide.mp4", + "sha256": "sha256:bytes:5911e85b2d5ef93e44ba5d76f73ddf77f9d49d6cf3e4e829c30f0e386a0b8d80", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_fill_inpaint" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_red_tram_through_snow" }, { - "path": "template-gallery/reviews/flux_fill_inpaint.reviewed-provenance.json", - "sha256": "sha256:bytes:f627d4cce50a72239069596ecdb183842ca96d5d2bdf691f63f5773220086bf0", + "path": "template-gallery/inputs/character_edit.before.webp", + "sha256": "sha256:bytes:b9909f4cbff8af6e97be6d1e4923c67687eee41dbd64b051a018866781da12ab", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_fill_inpaint" + "provenanceTemplateId": "character_edit", + "consumingTemplateIds": ["character_edit"] }, { - "path": "template-gallery/reviews/flux_fill_outpaint.quality-review.json", - "sha256": "sha256:bytes:bfe72fb5245dc022e878d57972d21ec11b5576f1d204fe95aba599843a22f9a9", + "path": "template-gallery/inputs/chroma_alpine_block_print.before.png", + "sha256": "sha256:bytes:88290a96bc8d52f11f2d1e3c0c0e04c2027661816e54b57d7d4739d731ca1e75", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_fill_outpaint" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_alpine_block_print" }, { - "path": "template-gallery/reviews/flux_fill_outpaint.reviewed-provenance.json", - "sha256": "sha256:bytes:a28f45de914552bca7f191510ed3f1fedf91b562708adc339610a7c9ec67402a", + "path": "template-gallery/inputs/chroma_copper_medallion_outpaint.before.png", + "sha256": "sha256:bytes:a8aaf9be57bc6bab356c5c1f9b76a1458e7e85e9daf6681e7e38a28fc28e1535", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": ["https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0"], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_fill_outpaint" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_copper_medallion_outpaint" }, { - "path": "template-gallery/reviews/flux_kontext_edit.quality-review.json", - "sha256": "sha256:bytes:30230abb20489156c64b2ef814908ecf37df4420c640ad93f3b38f17a2c7b6fa", + "path": "template-gallery/inputs/chroma_restored_cobalt_backdrop.before.png", + "sha256": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_kontext_edit" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_restored_cobalt_backdrop" }, { - "path": "template-gallery/reviews/flux_kontext_edit.reviewed-provenance.json", - "sha256": "sha256:bytes:1365b82eaf2be81ba3b798c0653ecce7fe7258ead2e5536523ac7f0100872d83", + "path": "template-gallery/inputs/chroma_restored_cobalt_backdrop.mask.png", + "sha256": "sha256:bytes:1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_kontext_edit" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_restored_cobalt_backdrop" }, { - "path": "template-gallery/reviews/flux_kontext_multi_reference.quality-review.json", - "sha256": "sha256:bytes:4b38ec98a5f21801d6adf939a96705352dff3fa0005a46b193f152d850cf82e5", + "path": "template-gallery/inputs/cogvideox_red_tram_model_railway.before.mp4", + "sha256": "sha256:bytes:0737fe1e6b127fd4f5f66043b8911e5c7e380e60d50eab7e6bc9ba62e830b9dd", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceRevision": "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01 https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_kontext_multi_reference" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "cogvideox_red_tram_model_railway" }, { - "path": "template-gallery/reviews/flux_kontext_multi_reference.reviewed-provenance.json", - "sha256": "sha256:bytes:2366ddac33df43abb21095bd51ba395a29a69d7911568fc3ed4036195c3899cf", + "path": "template-gallery/inputs/flux1_dev_limestone_studio_scratch_repair.before.png", + "sha256": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_kontext_multi_reference" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux1_dev_limestone_studio_scratch_repair" }, { - "path": "template-gallery/reviews/flux_krea_text_to_image.quality-review.json", - "sha256": "sha256:bytes:79c50447e19b09ec091bc0fbd2986c75001a525f7ea060c6a347d5ae52b15872", + "path": "template-gallery/inputs/flux1_dev_limestone_studio_scratch_repair.mask.png", + "sha256": "sha256:bytes:1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux1_dev_limestone_studio_scratch_repair" + }, + { + "path": "template-gallery/inputs/flux2_klein_edit.before.png", + "sha256": "sha256:bytes:d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_krea_text_to_image" + "provenanceTemplateId": "flux2_klein_edit", + "consumingTemplateIds": [ + "flux2_klein_edit", + "flux3_klein_base_fp8r512_multi_reference_edit", + "flux3_klein_base_fp8r512_single_reference_edit", + "flux3_klein_fp8r512_multi_reference_edit", + "flux3_klein_fp8r512_single_reference_edit" + ] }, { - "path": "template-gallery/reviews/flux_krea_text_to_image.reviewed-provenance.json", - "sha256": "sha256:bytes:3c59ae43a99b7946adea634976786e5105ac537516b3f74c4ca73d1d885fa567", + "path": "template-gallery/inputs/flux2_klein_multi_reference.before.webp", + "sha256": "sha256:bytes:1d993540e914f0e2d230f1133b57ae14bb837829237a53c89613fcdef6699995", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_krea_text_to_image" + "provenanceTemplateId": "flux2_klein_multi_reference", + "consumingTemplateIds": ["flux2_klein_multi_reference"] }, { - "path": "template-gallery/reviews/flux_lora_film_noir.quality-review.json", - "sha256": "sha256:bytes:f8d8308daa26454b809312b43a96956470a2c8143ee6967b4262e2336d1f5851", + "path": "template-gallery/inputs/flux3-packaging-protected-photo-mask-v1.png", + "sha256": "sha256:bytes:d36162153e2009e0b2f3a711825d39e67c02ba3577971a444bd92eebe81169ac", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", + "creatorOrRightsholder": "sourav-das, subject to the recorded source and model terms", + "creationMethod": "Original deterministic rounded-rectangle protection mask", "sourceUrl": null, "sourceRevision": null, - "sourceLicense": "Apache-2.0", + "sourceLicense": "Original authored mask", "modelTerms": [], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], - "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_film_noir" + "requiredAttribution": ["sourav-das"], + "assetLicense": "CC-BY-4.0", + "reviewedBy": "sourav-das", + "reviewedAt": "2026-10-31", + "reviewClass": "exact-file-maintainer-approval-in-originating-chat", + "approvalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "modelUseBasis": null }, { - "path": "template-gallery/reviews/flux_lora_film_noir.reviewed-provenance.json", - "sha256": "sha256:bytes:833d29919af899c20fa213c4dfd0f75e239c66631f746fee9b46e7328a4eec67", + "path": "template-gallery/inputs/flux3_klein_base_fp8r512_multi_reference_edit.before.png", + "sha256": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", "sourceUrl": null, "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_film_noir" + "reviewClass": "byte-identical-copy-of-existing-human-approved-input", + "approvalInheritedFromPath": "template-gallery/inputs/qwen-carton-layout-control.png" }, { - "path": "template-gallery/reviews/flux_lora_ghibli_story.quality-review.json", - "sha256": "sha256:bytes:6009868ad3e76b584a12eb4193daf7680a0f224224bcda917c2ebbe8f543d1a5", + "path": "template-gallery/inputs/flux3_klein_base_fp8r512_single_reference_edit.before.png", + "sha256": "sha256:bytes:d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_ghibli_story" + "reviewClass": "byte-identical-copy-of-existing-human-approved-input", + "provenanceTemplateId": "flux2_klein_edit", + "consumingTemplateIds": [ + "flux2_klein_edit", + "flux3_klein_base_fp8r512_multi_reference_edit", + "flux3_klein_base_fp8r512_single_reference_edit", + "flux3_klein_fp8r512_multi_reference_edit", + "flux3_klein_fp8r512_single_reference_edit" + ], + "approvalInheritedFromPath": "template-gallery/inputs/flux2_klein_edit.before.png" }, { - "path": "template-gallery/reviews/flux_lora_ghibli_story.reviewed-provenance.json", - "sha256": "sha256:bytes:f87545939eb878e8655640f7563f6ddb93b355ba72c716959fb61c39806fa8a3", + "path": "template-gallery/inputs/flux3_klein_fp8r512_multi_reference_edit.before.png", + "sha256": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", "sourceUrl": null, "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_ghibli_story" + "reviewClass": "byte-identical-copy-of-existing-human-approved-input", + "approvalInheritedFromPath": "template-gallery/inputs/qwen-carton-layout-control.png" }, { - "path": "template-gallery/reviews/flux_lora_oil_painting.quality-review.json", - "sha256": "sha256:bytes:b62c3ba1c98b557dd1bee81d7c2c85371ebfe8fe261af18690729f623a1a2ecd", + "path": "template-gallery/inputs/flux3_klein_fp8r512_single_reference_edit.before.png", + "sha256": "sha256:bytes:d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_oil_painting" + "reviewClass": "byte-identical-copy-of-existing-human-approved-input", + "provenanceTemplateId": "flux2_klein_edit", + "consumingTemplateIds": [ + "flux2_klein_edit", + "flux3_klein_base_fp8r512_multi_reference_edit", + "flux3_klein_base_fp8r512_single_reference_edit", + "flux3_klein_fp8r512_multi_reference_edit", + "flux3_klein_fp8r512_single_reference_edit" + ], + "approvalInheritedFromPath": "template-gallery/inputs/flux2_klein_edit.before.png" }, { - "path": "template-gallery/reviews/flux_lora_oil_painting.reviewed-provenance.json", - "sha256": "sha256:bytes:8adce5953e160687b1b714c225ec78a2fae584e7038264d7766305edecfdcf7c", + "path": "template-gallery/inputs/flux_canny_black_ink_cube.guide.png", + "sha256": "sha256:bytes:fb9c9cd18138c124335a688b92c15f3194b0f0071f1dac710b71870b9e3b361f", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2 https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_oil_painting" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "68a00a8e0e0cdf80ef52460f27dcb5544125a9d3f5422c6960dfecbd21c953e1", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_canny_black_ink_cube" }, { - "path": "template-gallery/reviews/flux_lora_paper_cutout.quality-review.json", - "sha256": "sha256:bytes:045e4480718e933637e16d026c8731d879f038d174d7f40f57009bf43eaab51d", + "path": "template-gallery/inputs/flux_canny_clean_backdrop.before.png", + "sha256": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2 https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_paper_cutout" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_canny_clean_backdrop" }, { - "path": "template-gallery/reviews/flux_lora_paper_cutout.reviewed-provenance.json", - "sha256": "sha256:bytes:8fac1a77c1eeab9e791bd350294f04a322d51c6c5a8b5cfcf16aa940f6adfab5", + "path": "template-gallery/inputs/flux_canny_clean_backdrop.guide.png", + "sha256": "sha256:bytes:6bd07628a37c087178e9de58a98c6c5879468163f1a2376a581511a42503e2e2", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2 https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_paper_cutout" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_canny_clean_backdrop" }, { - "path": "template-gallery/reviews/flux_lora_photoreal_documentary.quality-review.json", - "sha256": "sha256:bytes:bc6c3a241cf0fa9a1336717b6d05b2c7a6e50b1a94911088e559e9d1dba69507", + "path": "template-gallery/inputs/flux_canny_clean_backdrop.mask.png", + "sha256": "sha256:bytes:1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2 https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_photoreal_documentary" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_canny_clean_backdrop" }, { - "path": "template-gallery/reviews/flux_lora_photoreal_documentary.reviewed-provenance.json", - "sha256": "sha256:bytes:e7c4fcd6b52af6e45867d22c3adb1416adef0463802cd1d7890ec36129ba234c", + "path": "template-gallery/inputs/flux_control_canny.before.png", + "sha256": "sha256:bytes:3d03ee22a3d29068f30f18afcb31e86ea455fbfbe1ca5aa172cf633a26f21339", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "black-forest-labs/FLUX.1-Canny-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_photoreal_documentary" + "provenanceTemplateId": "flux_control_canny", + "consumingTemplateIds": ["flux_control_canny"] }, { - "path": "template-gallery/reviews/flux_lora_retro_comic.quality-review.json", - "sha256": "sha256:bytes:259d069f67a64529bd2c67a542e988edc231c776724996a12a33083f02d4bf15", + "path": "template-gallery/inputs/flux_depth_control.before.png", + "sha256": "sha256:bytes:2e202069a584ee5ada91e2deaea6bf7b92a94f4816e669e695d7cb64d5a1cb0e", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceRevision": "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "black-forest-labs/FLUX.1-Depth-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_retro_comic" + "provenanceTemplateId": "flux_depth_control", + "consumingTemplateIds": ["flux_depth_control"] }, { - "path": "template-gallery/reviews/flux_lora_retro_comic.reviewed-provenance.json", - "sha256": "sha256:bytes:07f76c1b55b52a8419ed33561a1050e8692b8d9a087ce339958c9ddcf7d68ff2", + "path": "template-gallery/inputs/flux_depth_marine_bow_repair.before.webp", + "sha256": "sha256:bytes:c3d52c29b6a8cae80d2feffb8a978cded8b34509abd09216f665ab3af13f189e", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceRevision": "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_retro_comic" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_depth_marine_bow_repair" }, { - "path": "template-gallery/reviews/flux_lora_watercolor.quality-review.json", - "sha256": "sha256:bytes:d3bd65fb0179f57dd516cc80cbb7124e4a0e868c5880853e06900b65214d31e7", + "path": "template-gallery/inputs/flux_depth_marine_bow_repair.guide.png", + "sha256": "sha256:bytes:2e202069a584ee5ada91e2deaea6bf7b92a94f4816e669e695d7cb64d5a1cb0e", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceRevision": "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_watercolor" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_depth_marine_bow_repair" }, { - "path": "template-gallery/reviews/flux_lora_watercolor.reviewed-provenance.json", - "sha256": "sha256:bytes:c80ee9c29331e71e067fb681c0af5d0979680928f957d422047fde5177120174", + "path": "template-gallery/inputs/flux_depth_marine_bow_repair.mask.png", + "sha256": "sha256:bytes:765f215aa6f8c0087a67af872a26149223373d5ab4a8afba6331caad5bc45d4c", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceRevision": "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_lora_watercolor" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_depth_marine_bow_repair" }, { - "path": "template-gallery/reviews/flux_redux_edit.quality-review.json", - "sha256": "sha256:bytes:ecd1f9a9365ddf28ae4c200e4c040d3f2f48c0429d380f35f099f85530dc617b", + "path": "template-gallery/inputs/flux_dev_forest_green_teapot.before.webp", + "sha256": "sha256:bytes:443062a26e22e3542e284f50d0274b7c70b881b3cce76568eb8eb22ce4c396d6", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_redux_edit" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_dev_forest_green_teapot" }, { - "path": "template-gallery/reviews/flux_redux_edit.reviewed-provenance.json", - "sha256": "sha256:bytes:73c4395d30e0db765215ff48dd521c269c6b58d1e3fdc42e030ca230f51a2477", + "path": "template-gallery/inputs/flux_fill_inpaint.before.webp", + "sha256": "sha256:bytes:b7c221b367738177e32fece56067d743df96282a6ccb2afd040ee89ea0a8f678", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev/tree/358293da0354175698b67ec8299acf928313a78a", + "sourceRevision": "black-forest-labs/FLUX.1-Fill-dev@358293da0354175698b67ec8299acf928313a78a", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "black-forest-labs/FLUX.1-Fill-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev/tree/358293da0354175698b67ec8299acf928313a78a" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_redux_edit" + "provenanceTemplateId": "flux_fill_inpaint", + "consumingTemplateIds": ["flux_fill_inpaint"] }, { - "path": "template-gallery/reviews/flux_redux_multi_reference.quality-review.json", - "sha256": "sha256:bytes:6d1a2b1cd59643e756167a31b4b7fb96242f3775317f05c9139883468cff5c93", + "path": "template-gallery/inputs/flux_fill_outpaint.before.png", + "sha256": "sha256:bytes:bf4dbaa55b83b19ca56c691e9d1a10d3b838ff2fec926aaea6b526561c68f8e6", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev/tree/358293da0354175698b67ec8299acf928313a78a", + "sourceRevision": "black-forest-labs/FLUX.1-Fill-dev@358293da0354175698b67ec8299acf928313a78a", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "black-forest-labs/FLUX.1-Fill-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev/tree/358293da0354175698b67ec8299acf928313a78a" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_redux_multi_reference" + "provenanceTemplateId": "flux_fill_outpaint", + "consumingTemplateIds": ["flux_fill_outpaint"] }, { - "path": "template-gallery/reviews/flux_redux_multi_reference.reviewed-provenance.json", - "sha256": "sha256:bytes:0e30224ab60a14f2d040e4104454f3cf1867ebf3fb152e7554ee295b9cc69914", + "path": "template-gallery/inputs/flux_klein_alpine_lake_panorama.before.png", + "sha256": "sha256:bytes:50270382b4b730b87f79b775accaeeb81f3ff8885cd3d2cea94830206fbc181b", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294 https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_redux_multi_reference" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_klein_alpine_lake_panorama" }, { - "path": "template-gallery/reviews/flux_schnell_text_to_image.quality-review.json", - "sha256": "sha256:bytes:cfe3bfedd9deb4b3a502597bd82a0e539c9ddecacb8c788cc2135256908d5a95", + "path": "template-gallery/inputs/flux_klein_open_glacial_lake.before.png", + "sha256": "sha256:bytes:88290a96bc8d52f11f2d1e3c0c0e04c2027661816e54b57d7d4739d731ca1e75", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294 https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_schnell_text_to_image" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_klein_open_glacial_lake" }, { - "path": "template-gallery/reviews/flux_schnell_text_to_image.reviewed-provenance.json", - "sha256": "sha256:bytes:dd197dbb499c97643aec8991e72978d48ef6880f951a10fb5dc042454d22ccf9", + "path": "template-gallery/inputs/flux_klein_open_glacial_lake.mask.png", + "sha256": "sha256:bytes:877d3c4e0e976d3885419f3f327d8974394d69aca35667e5479b944880d84e04", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294 https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "flux_schnell_text_to_image" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_klein_open_glacial_lake" }, { - "path": "template-gallery/reviews/high_quality.quality-review.json", - "sha256": "sha256:bytes:fe086593792f639371424b347f3bb1d7cc390b1d996630104e08d19d2efd4832", + "path": "template-gallery/inputs/flux_kontext_bookshop_clear_glass.before.webp", + "sha256": "sha256:bytes:ff045be510a0e88cbab69bbe8c3794dd26bd19036bdec26a63a5b6ea5a11bc66", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/blob/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d/LICENSE.md" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "high_quality" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_kontext_bookshop_clear_glass" }, { - "path": "template-gallery/reviews/high_quality.reviewed-provenance.json", - "sha256": "sha256:bytes:5013cd17a686b40e7f1747578b2a235e2f2bfb5ef881fe1d8260208f130daa0f", + "path": "template-gallery/inputs/flux_kontext_bookshop_clear_glass.mask.png", + "sha256": "sha256:bytes:6f9114963580bd8942bc25e31e67a7fa2f7fdea73c775dd49bb9972c65829578", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/blob/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d/LICENSE.md" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "high_quality" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_kontext_bookshop_clear_glass" }, { - "path": "template-gallery/reviews/low_vram.quality-review.json", - "sha256": "sha256:bytes:eaf768e868d48ee76bad96c02f835d2d20abd9e46adcdcd2c36e6b853f82c59b", + "path": "template-gallery/inputs/flux_kontext_edit.before.webp", + "sha256": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "black-forest-labs/FLUX.1-Kontext-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "low_vram" + "provenanceTemplateId": "flux_kontext_edit", + "consumingTemplateIds": ["flux_kontext_edit"] }, { - "path": "template-gallery/reviews/low_vram.reviewed-provenance.json", - "sha256": "sha256:bytes:04028d85f3f3e840000b89077d8ceaafc608141a176ff4d071264ee4ec3f9c9b", + "path": "template-gallery/inputs/flux_kontext_multi_reference.before.webp", + "sha256": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", - "marks": [], - "requiredAttribution": [], - "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "low_vram" - }, - { - "path": "template-gallery/reviews/ltx_video_animated_story.quality-review.json", - "sha256": "sha256:bytes:7520a8a1a714f7ed2943abd482189e83593bfa2a85afe48701c65505986d036b", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "black-forest-labs/FLUX.1-Kontext-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_animated_story" + "provenanceTemplateId": "flux_kontext_multi_reference", + "consumingTemplateIds": ["flux_kontext_multi_reference"] }, { - "path": "template-gallery/reviews/ltx_video_animated_story.reviewed-provenance.json", - "sha256": "sha256:bytes:42d1d53a66c603446963ff929f1493eea420dca97c45f225bd7d100ab64d6982", + "path": "template-gallery/inputs/flux_kontext_multi_reference.material-strip.v2.png", + "sha256": "sha256:bytes:70c74691e2bcd7cdb352b7e64e5af5a1a7f01d77112d32a8edadc0060a95ef34", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "Deterministic material-only crop of the existing rights-approved synthetic cobalt material reference", "sourceUrl": null, "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_animated_story" + "reviewedBy": "maintainer (current user)", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-native-three-registration", + "consumingTemplateIds": ["flux_kontext_multi_reference"], + "derivedFromContentHash": "sha256:bytes:9f421cdc0fa80b3aae368bd3b20a8f6f05942ec461f88541f01aec5390468897", + "publicationBasis": "Existing maintainer publication authorization and current explicit instruction to register these three accepted assets; no new ownership or rights quotation is fabricated.", + "humanApprovalPacketSHA256": "69c6b3d9b0ea2fcca16ee538f6e75b414b7141658b74f10578758e61360f63fd" }, { - "path": "template-gallery/reviews/ltx_video_image_to_video.quality-review.json", - "sha256": "sha256:bytes:201d59e66d2e38c2691ca60021885268583ba4769b554b79b02ebaaad853f4db", + "path": "template-gallery/inputs/flux_redux_edit.before.webp", + "sha256": "sha256:bytes:2e0ec8892660785e322468d0153fd2dadf7a4d920fce2d7d4a0b686a8fe8515d", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | black-forest-labs/FLUX.1-Redux-dev@c95859fbf7703ca4d6824b4da4407d7cd0434f81", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "black-forest-labs/FLUX.1-Redux-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Redux-dev/tree/c95859fbf7703ca4d6824b4da4407d7cd0434f81" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_image_to_video" + "provenanceTemplateId": "flux_redux_edit", + "consumingTemplateIds": ["flux_redux_edit"] }, { - "path": "template-gallery/reviews/ltx_video_image_to_video.reviewed-provenance.json", - "sha256": "sha256:bytes:a98d60755d3a230c52c41f7ee6f0a7cb64403ec866c4558f30142955ff839f4c", + "path": "template-gallery/inputs/flux_redux_multi_reference.before.webp", + "sha256": "sha256:bytes:7f1ea58485fa7802765b9fbbf0e6957e8607261c91669fdcc44cbed80c6fb309", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | black-forest-labs/FLUX.1-Redux-dev@c95859fbf7703ca4d6824b4da4407d7cd0434f81", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "black-forest-labs/FLUX.1-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "black-forest-labs/FLUX.1-Redux-dev: FLUX.1-dev Non-Commercial License; https://huggingface.co/black-forest-labs/FLUX.1-Redux-dev/tree/c95859fbf7703ca4d6824b4da4407d7cd0434f81" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_image_to_video" + "provenanceTemplateId": "flux_redux_multi_reference", + "consumingTemplateIds": ["flux_redux_multi_reference"] }, { - "path": "template-gallery/reviews/ltx_video_long_showcase.quality-review.json", - "sha256": "sha256:bytes:9522f4f25ec827402e5e0ce1e2a0c9058d518ffa9c5c33c3a77f5f789bab4692", + "path": "template-gallery/inputs/hunyuan_dit_green_glass_study.before.png", + "sha256": "sha256:bytes:6bd07628a37c087178e9de58a98c6c5879468163f1a2376a581511a42503e2e2", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceRevision": "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1 https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_long_showcase" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "hunyuan_dit_green_glass_study" }, { - "path": "template-gallery/reviews/ltx_video_long_showcase.reviewed-provenance.json", - "sha256": "sha256:bytes:dac558b12c55e74678c33785a4f0d8affd542b96c0bcc70c9a10bf0dfdca4d33", + "path": "template-gallery/inputs/joy_plus_lavender_on_limestone.before.png", + "sha256": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_long_showcase" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joy_plus_lavender_on_limestone" }, { - "path": "template-gallery/reviews/ltx_video_multi_reference.quality-review.json", - "sha256": "sha256:bytes:a581122ee28f58c36624af785c0a6741cf94bf69303d68aa21dabfbf1c16b846", + "path": "template-gallery/inputs/joy_plus_terracotta_on_limestone.before.png", + "sha256": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_multi_reference" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joy_plus_terracotta_on_limestone" }, { - "path": "template-gallery/reviews/ltx_video_multi_reference.reviewed-provenance.json", - "sha256": "sha256:bytes:6a7413901c5e35628bbc371d3c5c3729a5486d28383f00195adb7f6a9db12446", + "path": "template-gallery/inputs/joy_plus_terracotta_on_limestone.reference-2.png", + "sha256": "sha256:bytes:056615dd7833d38cfed12d45b30bb0c6e439bf1585f4964da4796ca5b43f20ea", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_multi_reference" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joy_plus_terracotta_on_limestone" }, { - "path": "template-gallery/reviews/ltx_video_text_to_video.quality-review.json", - "sha256": "sha256:bytes:0edfcb8a27a65f218f1b42d4d139515cf9ebfbb0b530e2e15122c3b57fe16552", + "path": "template-gallery/inputs/joyimage_base_cobalt_paper_band.before.png", + "sha256": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_text_to_video" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joyimage_base_cobalt_paper_band" }, { - "path": "template-gallery/reviews/ltx_video_text_to_video.reviewed-provenance.json", - "sha256": "sha256:bytes:2967b15d52914d901b0afd4bf90e267c4762639426ccf9826130f5ef477b89ea", + "path": "template-gallery/inputs/kandinsky3_smoked_glass_on_limestone.before.png", + "sha256": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceRevision": "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632 https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_text_to_video" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "kandinsky3_smoked_glass_on_limestone" }, { - "path": "template-gallery/reviews/ltx_video_video_to_video.quality-review.json", - "sha256": "sha256:bytes:940e6bab9cef2842792c9ebb5e2302f438a77acb8ee360ad17807183b932895f", + "path": "template-gallery/inputs/kontext_wide_water_alpine_ridge.before.png", + "sha256": "sha256:bytes:50270382b4b730b87f79b775accaeeb81f3ff8885cd3d2cea94830206fbc181b", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_video_to_video" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "kontext_wide_water_alpine_ridge" }, { - "path": "template-gallery/reviews/ltx_video_video_to_video.reviewed-provenance.json", - "sha256": "sha256:bytes:45a8dd0c6cf29dc699b20d391c087aac8c62364715a84fb9b123427574e802b0", + "path": "template-gallery/inputs/lcm_dawn_alpine_lake.before.webp", + "sha256": "sha256:bytes:25fe06d8e93645bc6ff29928556a0cd654aa6d70178d435268b3d17e9188feaa", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], - "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "ltx_video_video_to_video" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-20", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ba369c5fff89e379be66714d3ecbf1a0e3a9555e2b5ffbc9cb54210d862ec30b", + "publicationBasis": "Maintainer approved the exact Whisper JSON and both exact LCM images, accepted the disclosed LCM changes, and authorized publication of the associated redacted Gallery records.", + "creationMethod": "Exact retained PRX text-generated synthetic daylight lake image used as the LCM Edit source", + "sourceUrl": "https://huggingface.co/Photoroom/prx-512-t2i-sft/resolve/2996423bc26e8eaca48774fac1797484214dfea0/README.md", + "sourceRevision": "Photoroom/prx-512-t2i-sft@2996423bc26e8eaca48774fac1797484214dfea0", + "sourceLicense": "Project-authored synthetic content processed by recorded model(s), subject to their applicable terms", + "modelTerms": [ + "Photoroom/prx-512-t2i-sft@2996423bc26e8eaca48774fac1797484214dfea0 — Apache-2.0 declaration and Gemma use restrictions. https://huggingface.co/Photoroom/prx-512-t2i-sft/resolve/2996423bc26e8eaca48774fac1797484214dfea0/README.md", + "Pinned Photoroom notice names Google T5Gemma 2B-2B UL2 under the Gemma Terms and FLUX.1 Schnell VAE under Apache-2.0. https://huggingface.co/Photoroom/prx-512-t2i-sft/resolve/2996423bc26e8eaca48774fac1797484214dfea0/NOTICE", + "Gemma Terms and use policy. https://ai.google.dev/gemma/terms · https://gemma.ai/resources/prohibited-use/" + ], + "aiGenerated": true, + "requiredAttribution": [ + "Photoroom Inc., PRX 512 SFT. https://huggingface.co/Photoroom/prx-512-t2i-sft/resolve/2996423bc26e8eaca48774fac1797484214dfea0/README.md", + "Google T5Gemma and Black Forest Labs FLUX.1 Schnell VAE component notices. https://huggingface.co/Photoroom/prx-512-t2i-sft/resolve/2996423bc26e8eaca48774fac1797484214dfea0/NOTICE" + ], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "provenanceTemplateId": "lcm_dawn_alpine_lake" }, { - "path": "template-gallery/reviews/qwen_character_angles.quality-review.json", - "sha256": "sha256:bytes:7597e87870f035c267b65d8c5c56e5d1563e432719a6752b5eac41608f9b1147", + "path": "template-gallery/inputs/longcat_clear_glass_at_the_bookshop.before.webp", + "sha256": "sha256:bytes:ff045be510a0e88cbab69bbe8c3794dd26bd19036bdec26a63a5b6ea5a11bc66", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/meituan-longcat/LongCat-Image-Edit/tree/7b54ef423aa7854be7861600024be5c56ab7875a", + "sourceRevision": "meituan-longcat/LongCat-Image-Edit@7b54ef423aa7854be7861600024be5c56ab7875a", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/meituan-longcat/LongCat-Image-Edit/tree/7b54ef423aa7854be7861600024be5c56ab7875a" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "meituan-longcat/LongCat-Image-Edit@7b54ef423aa7854be7861600024be5c56ab7875a https://huggingface.co/meituan-longcat/LongCat-Image-Edit/tree/7b54ef423aa7854be7861600024be5c56ab7875a" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_character_angles" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "longcat_clear_glass_at_the_bookshop" }, { - "path": "template-gallery/reviews/qwen_character_angles.reviewed-provenance.json", - "sha256": "sha256:bytes:6ecd897a6b422e73e97ba6ee17af28f9448531af356852e7a3239f27afcf337f", + "path": "template-gallery/inputs/ltx2_enamel_teapot_window_light.first.png", + "sha256": "sha256:bytes:7be24582bd4f26633a636c4110e38baecd94e6c6b3fd35450848f97bc07f2855", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/blob/47da56e2ad66ce4125a9922b4a8826bf407f9d0a/LICENSE"], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_character_angles" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_enamel_teapot_window_light" }, { - "path": "template-gallery/reviews/qwen_control_image_layout.duplicate-provenance.json", - "sha256": "sha256:bytes:88cf4c98bff0bcfc6b73692b8385f8fd4fd6df5f05e1fa1d4423c3615d99c551", + "path": "template-gallery/inputs/ltx2_glasshouse_drip.first.png", + "sha256": "sha256:bytes:124d647abcc3d14dcd8388d749814e0b11bc5df820d126e9542ca2f333f73c73", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a"], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_control_image_layout" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_glasshouse_drip" }, { - "path": "template-gallery/reviews/qwen_control_image_layout.quality-review.json", - "sha256": "sha256:bytes:945dac5914322567ef3040e21c46709a7a262f2b2bcd0fcdd668d6c2d195971c", + "path": "template-gallery/inputs/ltx2_moss_and_basalt.before.mp4", + "sha256": "sha256:bytes:3b5e40ac2bf76236d1f901a7a2522addd7c4a1b2701bd89a33c1506b1523bc38", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/blob/47da56e2ad66ce4125a9922b4a8826bf407f9d0a/LICENSE"], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_control_image_layout" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_moss_and_basalt" }, { - "path": "template-gallery/reviews/qwen_edit_plus_single_image.duplicate-provenance.json", - "sha256": "sha256:bytes:dd76a3ef7b084e4b419ac4742834c16cbfffd24413a2484c5190eaa933a41f7f", + "path": "template-gallery/inputs/ltx_boardwalk_tracking.end.webp", + "sha256": "sha256:bytes:52ea89c0cdec3142162156be07af12a06a14ad623b68c9700ccbc82bf889100d", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", "sourceUrl": null, "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_edit_plus_single_image" + "reviewClass": "standard-human-attestation" }, { - "path": "template-gallery/reviews/qwen_edit_plus_single_image.quality-review.json", - "sha256": "sha256:bytes:0b438037b118e2b5865e6dfa2ba7c3c06d7dc7f24224886f01777be7f2b2e23b", + "path": "template-gallery/inputs/ltx_boardwalk_tracking.start.webp", + "sha256": "sha256:bytes:73123a5bb6e8c1367eced6a7fbee6b0e5500ecbabf769ba9d9c18fd10623e36e", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", "sourceUrl": null, "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_edit_plus_single_image" + "reviewClass": "standard-human-attestation" }, { - "path": "template-gallery/reviews/qwen_edit_strength_sweep.quality-review.json", - "sha256": "sha256:bytes:496a280901eb5ca3cd80d222d0226537befd1ce050d05ed56fa5ce233b7e7af3", + "path": "template-gallery/inputs/ltx_long_wind_and_tide_at_the_headland.first.png", + "sha256": "sha256:bytes:51624f59295a77119bf336a63bfc7731d33d6612bc44b15495bddabdfae3ef51", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_edit_strength_sweep" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "f90bf0978ad3ec5d295b6d9d5e339207e3586b52567987aa1930881dd1f46e4e", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx_long_wind_and_tide_at_the_headland" }, { - "path": "template-gallery/reviews/qwen_edit_strength_sweep.reviewed-provenance.json", - "sha256": "sha256:bytes:7ed8775e68ea0323457286de63b0bdf828b57b9ca20e871708f4fdfca533762d", + "path": "template-gallery/inputs/ltx_video_image_to_video.before.webp", + "sha256": "sha256:bytes:930364ab2667e492e51b8a60664751d66f5ed3f2d580664832977e89bcfbbf26", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_edit_strength_sweep" + "provenanceTemplateId": "ltx_video_image_to_video", + "consumingTemplateIds": ["ltx_video_image_to_video"] }, { - "path": "template-gallery/reviews/qwen_inpaint_mask_draft.quality-review.json", - "sha256": "sha256:bytes:7a61235df3be93a58bde11c0fb112e266ade8d3d4422f75e118007515c6ae29e", + "path": "template-gallery/inputs/ltx_video_multi_reference.before.webp", + "sha256": "sha256:bytes:73123a5bb6e8c1367eced6a7fbee6b0e5500ecbabf769ba9d9c18fd10623e36e", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_inpaint_mask_draft" + "provenanceTemplateId": "ltx_video_multi_reference", + "consumingTemplateIds": ["ltx_video_multi_reference"] }, { - "path": "template-gallery/reviews/qwen_inpaint_mask_draft.reviewed-provenance.json", - "sha256": "sha256:bytes:8853df637247dc212985e40d9a1ab4b751e18c0c7fad647cd2eef22994dd1876", + "path": "template-gallery/inputs/ltx_video_video_to_video.before.mp4", + "sha256": "sha256:bytes:496fde9e4410d1b1b0ea659fbf0b29d486537d56eefa43f61052a5c6d1808de8", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/datasets/huggingface/documentation-images", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "CC-BY-NC-SA-4.0", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "requiredAttribution": [ + "Source: Hugging Face documentation-images Dataset, CC BY-NC-SA 4.0; modified by the MoDiff LTX workflow." + ], + "assetLicense": "CC-BY-NC-SA-4.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_inpaint_mask_draft" + "provenanceTemplateId": "ltx_video_video_to_video", + "consumingTemplateIds": ["ltx_video_video_to_video"] }, { - "path": "template-gallery/reviews/qwen_inpaint_object_replace.quality-review.json", - "sha256": "sha256:bytes:27aa406a3b4226b341e30b216811782d0bfdd18683b89b29564ecf07e301ce47", + "path": "template-gallery/inputs/marigold_depth_synthetic_ramp.before.png", + "sha256": "sha256:bytes:626815c78eaad46cad849732d1598b45b91700ce046c1ee3f4e2444db80aa32a", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Maintainer-approved original synthetic colour ramp fixture", "sourceUrl": null, "sourceRevision": null, - "sourceLicense": "Apache-2.0", + "sourceLicense": "MoDiff-authored exact fixture or Gallery metadata", "modelTerms": [], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_inpaint_object_replace" + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-19", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "e604b0284a57b65b20343c7776511ae15bef922c7e104c09f0f6931eec610d2d", + "publicationBasis": "Activate and publish the two approved Gallery candidates using their retained native runs.", + "provenanceTemplateId": "marigold_depth_synthetic_ramp" }, { - "path": "template-gallery/reviews/qwen_inpaint_object_replace.reviewed-provenance.json", - "sha256": "sha256:bytes:61958d9a47301ee3d2fb83283d5f2ba7bffab3c49bfcfe93402bc64697f95fa4", + "path": "template-gallery/inputs/omnigen_cobalt_against_soft_apricot.before.png", + "sha256": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268", + "sourceRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268 https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_inpaint_object_replace" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "omnigen_cobalt_against_soft_apricot" }, { - "path": "template-gallery/reviews/qwen_layered_portrait.quality-review.json", - "sha256": "sha256:bytes:01804ef72a061832915725a6aeff8385850f3347489fdec7c1592c313710db76", + "path": "template-gallery/inputs/omnigen_red_enamel_folded_linen.before.png", + "sha256": "sha256:bytes:4077a18ad81b7fb6a1e7285777cac6241f6c0109a680945487b81e8561f30d8c", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268", + "sourceRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268 https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_layered_portrait" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "omnigen_red_enamel_folded_linen" }, { - "path": "template-gallery/reviews/qwen_layered_portrait.reviewed-provenance.json", - "sha256": "sha256:bytes:ee99d6eff080c78f00846a5dc8123d02ec3dfd84b1b48909873b35fb4447f2e9", + "path": "template-gallery/inputs/omnigen_red_enamel_folded_linen.reference-2.png", + "sha256": "sha256:bytes:a0b713856d9a2d7956605fe85b26eef641bdede49400583f9c87c25fd3e324ec", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268", + "sourceRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268 https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_layered_portrait" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "omnigen_red_enamel_folded_linen" }, { - "path": "template-gallery/reviews/qwen_logo_texture.quality-review.json", - "sha256": "sha256:bytes:4671b5e55420dab7ed9fdd700b806ddd6f57a2782ef2a1e89931db6805f58e9e", + "path": "template-gallery/inputs/qwen-carton-layout-control.png", + "sha256": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", "sourceUrl": null, "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_logo_texture" + "reviewClass": "standard-human-attestation" }, { - "path": "template-gallery/reviews/qwen_logo_texture.reviewed-provenance.json", - "sha256": "sha256:bytes:7cdb2104446f3083e04d29643c264c4fe9ceeecfd0e359424b8e135711adc21f", + "path": "template-gallery/inputs/qwen_2511_pale_amber_on_limestone.before.png", + "sha256": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceRevision": "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9 https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_logo_texture" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_2511_pale_amber_on_limestone" }, { - "path": "template-gallery/reviews/qwen_low_vram_poster_layout.quality-review.json", - "sha256": "sha256:bytes:fc98a7a192d1ed561eb5b31c2371c5fe006d578682c0b2450550bd1589f34850", + "path": "template-gallery/inputs/qwen_2511_terracotta_material_transfer.before.png", + "sha256": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceRevision": "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9 https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_low_vram_poster_layout" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_2511_terracotta_material_transfer" }, { - "path": "template-gallery/reviews/qwen_low_vram_poster_layout.reviewed-provenance.json", - "sha256": "sha256:bytes:d1dcc5a590d7ef0d4dee3942998830f13edf7b49ad07f01634f335001a7e490c", + "path": "template-gallery/inputs/qwen_2511_terracotta_material_transfer.reference-2.png", + "sha256": "sha256:bytes:056615dd7833d38cfed12d45b30bb0c6e439bf1585f4964da4796ca5b43f20ea", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceRevision": "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9 https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_low_vram_poster_layout" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_2511_terracotta_material_transfer" }, { - "path": "template-gallery/reviews/qwen_low_vram_product_concept.duplicate-provenance.json", - "sha256": "sha256:bytes:584fe2513facf95e22cdd8c6893e9ffd99d6562ca4fe33d3f11d12d16f428cec", + "path": "template-gallery/inputs/qwen_2512_cobalt_backdrop_repair.before.png", + "sha256": "sha256:bytes:f5db354dc97ea11898d868898c5cc8ef454bb75ffe098b00bb2f06bc89f85885", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26 https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_low_vram_product_concept" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_2512_cobalt_backdrop_repair" }, { - "path": "template-gallery/reviews/qwen_low_vram_product_concept.quality-review.json", - "sha256": "sha256:bytes:923b20299ac0f009693e40c701abe51dc96cd94dbdc81dbf987a7b1680c5f4e9", + "path": "template-gallery/inputs/qwen_2512_cobalt_backdrop_repair.mask.png", + "sha256": "sha256:bytes:75ce495cdb65e3cb92cbd1c2ed94546d3f946e86642095d08334be13fd8a8b8f", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26 https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_low_vram_product_concept" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_2512_cobalt_backdrop_repair" }, { - "path": "template-gallery/reviews/qwen_low_vram_text_rendering.duplicate-provenance.json", - "sha256": "sha256:bytes:6309e9156e073135633f96d4eb276d8d8889329ddaaa92a198f2accba59fc0e6", + "path": "template-gallery/inputs/qwen_bookshop_gouache.before.webp", + "sha256": "sha256:bytes:ff045be510a0e88cbab69bbe8c3794dd26bd19036bdec26a63a5b6ea5a11bc66", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26 https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_low_vram_text_rendering" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_bookshop_gouache" }, { - "path": "template-gallery/reviews/qwen_low_vram_text_rendering.quality-review.json", - "sha256": "sha256:bytes:051df72430a51a5bdc367d4ba6f4bf67ec9cc1d8eb312148a1c4c7db64c94746", + "path": "template-gallery/inputs/qwen_character_angles.before.webp", + "sha256": "sha256:bytes:4b1b8d9e351abd437f2ffff90cc6a958160a87863ba4d8e85a0aa80a37e7a10e", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_low_vram_text_rendering" + "provenanceTemplateId": "qwen_character_angles", + "consumingTemplateIds": ["qwen_character_angles"] }, { - "path": "template-gallery/reviews/qwen_multi_reference_product.quality-review.json", - "sha256": "sha256:bytes:395c6c3e058b55d78d3adbc09d9fe3aa6f1f14c4af845e55b79c0e2a82dc9b68", + "path": "template-gallery/inputs/qwen_cobalt_on_charcoal_slate.before.png", + "sha256": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_multi_reference_product" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_cobalt_on_charcoal_slate" }, { - "path": "template-gallery/reviews/qwen_multi_reference_product.reviewed-provenance.json", - "sha256": "sha256:bytes:9a49f077f6eaefb162e4cf1b2a12801b3ed36bb11e782b80b0d13a654499c131", + "path": "template-gallery/inputs/qwen_control_image_layout.before.png", + "sha256": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/InstantX/Qwen-Image-ControlNet-Union/tree/b13036f066d6dee7c20513e263d3d673055e9de8", + "sourceRevision": "InstantX/Qwen-Image-ControlNet-Union@b13036f066d6dee7c20513e263d3d673055e9de8 | Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "InstantX/Qwen-Image-ControlNet-Union: Apache-2.0; https://huggingface.co/InstantX/Qwen-Image-ControlNet-Union/tree/b13036f066d6dee7c20513e263d3d673055e9de8", + "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_multi_reference_product" + "provenanceTemplateId": "qwen_control_image_layout", + "consumingTemplateIds": [ + "flux3_klein_base_fp8r512_multi_reference_edit", + "flux3_klein_fp8r512_multi_reference_edit", + "qwen_control_image_layout" + ] }, { - "path": "template-gallery/reviews/qwen_outpaint_aspect_template.quality-review.json", - "sha256": "sha256:bytes:2b83ee76cb0393da3228eef42396dd7fc07a7a42fa594d9cf53a1c73b408556a", + "path": "template-gallery/inputs/qwen_control_winter_cabin_blue_hour.before.png", + "sha256": "sha256:bytes:ca250462efc77625134ebe305b2ee67281a1dcf8919e45299c648f0fdacf919a", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26 https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_control_winter_cabin_blue_hour" + }, + { + "path": "template-gallery/inputs/qwen_edit_plus_single_image.before.webp", + "sha256": "sha256:bytes:e90e99e27cdd9b6ab7478a05199df2fdf7dce650d700ef2ceb55da7fb206b715", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceRevision": "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_outpaint_aspect_template" + "provenanceTemplateId": "qwen_edit_plus_single_image", + "consumingTemplateIds": ["qwen_edit_plus_single_image"] }, { - "path": "template-gallery/reviews/qwen_outpaint_aspect_template.reviewed-provenance.json", - "sha256": "sha256:bytes:0dc29edc25438f4b451df5c1f5fda03ebbca50f04e2cad9e73073f72aaef2fbf", + "path": "template-gallery/inputs/qwen_edit_strength_sweep.before.webp", + "sha256": "sha256:bytes:a6d165bd87e2c57ab8cf71fa15de9d8724fccf5782c16c34c25dc77934751676", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_outpaint_aspect_template" + "provenanceTemplateId": "qwen_edit_strength_sweep", + "consumingTemplateIds": ["qwen_edit_strength_sweep"] }, { - "path": "template-gallery/reviews/qwen_outpaint_draft.quality-review.json", - "sha256": "sha256:bytes:7018012c3a5ba1544271df1b3f802f806b3c03f1fa774572b6336ded97faceaf", + "path": "template-gallery/inputs/qwen_inpaint_mask_draft.before.webp", + "sha256": "sha256:bytes:a2f8ac6f5937d6e618b48ce9947153b8233ff7a82dcf67f28766d20b9917d730", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_outpaint_draft" + "provenanceTemplateId": "qwen_inpaint_mask_draft", + "consumingTemplateIds": ["qwen_inpaint_mask_draft"] }, { - "path": "template-gallery/reviews/qwen_outpaint_draft.reviewed-provenance.json", - "sha256": "sha256:bytes:348d1c3fedae6c17387002e6c6e2e4dfa193cb55bc5db82bb81ae7ff430955ef", + "path": "template-gallery/inputs/qwen_inpaint_object_replace.before.webp", + "sha256": "sha256:bytes:9f9f9685db5e9f8e1c162a0515151b03912c84777727b38682b65839db501ae6", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_outpaint_draft" + "provenanceTemplateId": "qwen_inpaint_object_replace", + "consumingTemplateIds": ["qwen_inpaint_object_replace"] }, { - "path": "template-gallery/reviews/qwen_packaging_dieline.duplicate-provenance.json", - "sha256": "sha256:bytes:b941eae359a788818b579925327c244af3115375ff312d58a109a929be7cd6fa", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to previously approved synthetic source rights and recorded model terms", + "creationMethod": "Native local AI-generated output or exact deterministic layer-sheet derivative; original approved bytes retained", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceLicense": "Generated output and approved synthetic input; retained model terms apply", + "modelTerms": [ + "Qwen/Qwen-Image-Layered: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], + "publicationBasis": "Existing maintainer publication authorization and current explicit instruction to register these three accepted assets; no new ownership or rights quotation is fabricated.", + "path": "template-gallery/inputs/qwen_layered_portrait.before.webp", + "sha256": "sha256:bytes:965240cf250a9074a7adab394c76070674cf517bed42b6c4647112d17dec84de", + "publishDecision": "approved", + "holdReason": null, "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_packaging_dieline" + "reviewedBy": "maintainer (current user)", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-native-three-registration", + "humanApprovalPacketSHA256": "69c6b3d9b0ea2fcca16ee538f6e75b414b7141658b74f10578758e61360f63fd", + "provenanceTemplateId": "qwen_layered_portrait" }, { - "path": "template-gallery/reviews/qwen_packaging_dieline.quality-review.json", - "sha256": "sha256:bytes:ede440811cbc3e403a5f4603d2f5bc16fc56b541ba6d29a7425c84f96647d4b5", + "path": "template-gallery/inputs/qwen_layered_sunset_and_peaks.source.png", + "sha256": "sha256:bytes:67835db7f30072a35b1650c0a84e7f241c0b01fcf2c324964ddcd5f8424008b3", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/Qwen/Qwen-Image-Layered/blob/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf/README.md" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_packaging_dieline" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "b16dfc2b7c1c32272b8f79bc1bffbb60376e63f8cf1ab9d0bdf9aea07cccf5cd", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_layered_sunset_and_peaks" }, { - "path": "template-gallery/reviews/qwen_poster_logo_text.quality-review.json", - "sha256": "sha256:bytes:3a06af0cf6c43da9b6974f1049304b765b4d08fb207fcd98f27b5748aed46b0a", + "path": "template-gallery/inputs/qwen_logo_texture.before.webp", + "sha256": "sha256:bytes:124415536a8071baccf8821232ad79a0a8ceec30ae62617c91a8d7a0b59d0a8c", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_poster_logo_text" + "provenanceTemplateId": "qwen_logo_texture", + "consumingTemplateIds": ["qwen_logo_texture"] }, { - "path": "template-gallery/reviews/qwen_poster_logo_text.reviewed-provenance.json", - "sha256": "sha256:bytes:faa7eb4618f418ac601ff1ec3a43ec287881c30495c531d2563a53159f72952c", + "path": "template-gallery/inputs/qwen_multi_reference_product.before.webp", + "sha256": "sha256:bytes:47e56fd165fd2610f34e952191d74e061269b9703ae9fd7f571491f38ce4992c", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_poster_logo_text" + "provenanceTemplateId": "qwen_multi_reference_product", + "consumingTemplateIds": ["qwen_multi_reference_product"] }, { - "path": "template-gallery/reviews/qwen_product_ad_composite.quality-review.json", - "sha256": "sha256:bytes:49eab3a43671aa04a445c7cb38aab25a3c3628a1aaf378dc3a23a5ff9b834234", + "path": "template-gallery/inputs/qwen_outpaint_aspect_template.before.webp", + "sha256": "sha256:bytes:d898e00f3be4b28e237f71acf8024ad3715a657e1fcf3aeaf57279468dff7a76", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_product_ad_composite" + "provenanceTemplateId": "qwen_outpaint_aspect_template", + "consumingTemplateIds": ["qwen_outpaint_aspect_template"] }, { - "path": "template-gallery/reviews/qwen_product_ad_composite.reviewed-provenance.json", - "sha256": "sha256:bytes:39b1f417ec7f7fe2672404d6ba52c9c8ac2707d52e41c911ca7ba8e4ac014430", + "path": "template-gallery/inputs/qwen_outpaint_draft.before.webp", + "sha256": "sha256:bytes:862e292caa1759156fffde5cfccda8b97ec622514258f81986188cf63a836ea9", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_product_ad_composite" + "provenanceTemplateId": "qwen_outpaint_draft", + "consumingTemplateIds": ["qwen_outpaint_draft"] }, { - "path": "template-gallery/reviews/qwen_product_mockup.duplicate-provenance.json", - "sha256": "sha256:bytes:362dfe44ab510d78a7e6ec1ae96514eb43923680866177ee3989b71487c5687a", + "path": "template-gallery/inputs/qwen_packaging_dieline.before.png", + "sha256": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/InstantX/Qwen-Image-ControlNet-Union/tree/b13036f066d6dee7c20513e263d3d673055e9de8", + "sourceRevision": "InstantX/Qwen-Image-ControlNet-Union@b13036f066d6dee7c20513e263d3d673055e9de8 | Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "InstantX/Qwen-Image-ControlNet-Union: Apache-2.0; https://huggingface.co/InstantX/Qwen-Image-ControlNet-Union/tree/b13036f066d6dee7c20513e263d3d673055e9de8", + "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_product_mockup" + "provenanceTemplateId": "qwen_packaging_dieline", + "consumingTemplateIds": ["qwen_packaging_dieline"] }, { - "path": "template-gallery/reviews/qwen_product_mockup.quality-review.json", - "sha256": "sha256:bytes:fbffcc634fb20aefe8a1f36398a5bd8e5ead26dacde2bc37ccaeb28d33fb2302", + "path": "template-gallery/inputs/qwen_product_ad_composite.before.webp", + "sha256": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_product_mockup" + "provenanceTemplateId": "qwen_product_ad_composite", + "consumingTemplateIds": ["qwen_product_ad_composite"] }, { - "path": "template-gallery/reviews/qwen_product_relight.quality-review.json", - "sha256": "sha256:bytes:753786d3770b00a95f1dad1e2296c37421e794565e0941384582ad9e06f4c542", + "path": "template-gallery/inputs/qwen_product_relight.before.webp", + "sha256": "sha256:bytes:f791a809c0df307cd7dafa8c54ae86bbe4c53d73afdacb2183ff8cdbeac994c2", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_product_relight" + "provenanceTemplateId": "qwen_product_relight", + "consumingTemplateIds": ["qwen_product_relight"] }, { - "path": "template-gallery/reviews/qwen_product_relight.reviewed-provenance.json", - "sha256": "sha256:bytes:43b244fc27e57b7b8a2e1723628ea9aeb0bf364b76bfa7c81ec9408d7c88bfba", + "path": "template-gallery/inputs/qwen_tile_extract.before.webp", + "sha256": "sha256:bytes:6224e9ee47765858f2ec0c33679140d020cf3ad6e4fa2fa4557ef50f811aef0e", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_product_relight" + "provenanceTemplateId": "qwen_tile_extract", + "consumingTemplateIds": ["qwen_tile_extract"] }, { - "path": "template-gallery/reviews/qwen_text_rendering.duplicate-provenance.json", - "sha256": "sha256:bytes:ccdbb1a61c3b83eae8fbf2d3a23869c774b55c7b31929d18f8311541952c9f6d", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, with exact-file rights explicitly attested by the maintainer", + "creationMethod": "AI-generated native Qwen image; the final image uses the pinned Spandrel RealESRGAN upscale and the comparison is the genuine same-task base export", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "Original generated image; exact-file redistribution rights explicitly attested; see pinned model terms", + "modelTerms": [ + "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "amd/realesrgan-x4plus: BSD-3-Clause; https://huggingface.co/amd/realesrgan-x4plus/tree/bda69abcaf525425b371622349e975245ae090c2" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], + "sourceRightsAttestation": "I hold the rights needed to publish this exact final 2048 image, its genuine 1024 before-upscale image, and redacted technical/review records under Apache-2.0 in the existing MoDiff Gallery Dataset. No external image inputs or real-person likeness references were used; pinned Qwen Apache-2.0 and RealESRGAN BSD-3-Clause model terms are retained.", + "path": "template-gallery/inputs/qwen_upscale_finish.before.webp", + "sha256": "sha256:bytes:a36d3e25a44989896f0add83aec1a0eaec297e353ab754d13e1eab1a336acadf", + "publishDecision": "approved", + "holdReason": null, "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_text_rendering" + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-qwen-expert-upscale-registration", + "humanApprovalPacketSHA256": "f0167419381c0d2a1a1bcd43d2465a0ad728c294a2d91bbe1c6b090a915c2c98", + "provenanceTemplateId": "qwen_upscale_finish" }, { - "path": "template-gallery/reviews/qwen_text_rendering.quality-review.json", - "sha256": "sha256:bytes:6ef4157557d2a161d4746a011b5367b63e94f984bd175f58b94416b3bf7f165e", + "path": "template-gallery/inputs/reference_fusion.before.webp", + "sha256": "sha256:bytes:283b1cfb32b15fe6b31a29dce1f2b96026c1ad0826bf3f24aebebf4b6f9a4f07", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_text_rendering" + "provenanceTemplateId": "reference_fusion", + "consumingTemplateIds": ["reference_fusion"] }, { - "path": "template-gallery/reviews/qwen_tile_extract.quality-review.json", - "sha256": "sha256:bytes:34c6b47a541749a745738ce15452fd85b2f2bb4883d325f43f70854750b662a1", + "path": "template-gallery/inputs/restoring_the_studio_backdrop.before.png", + "sha256": "sha256:bytes:d143c4922ad498b9bd436d06df424bbff50baf023b93735b53ee401e19e4cbf1", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": ["CreativeML Open RAIL-M at the pinned Stable Diffusion v1.5 revision."], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_tile_extract" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "restoring_the_studio_backdrop" }, { - "path": "template-gallery/reviews/qwen_tile_extract.reviewed-provenance.json", - "sha256": "sha256:bytes:4eb7ec4d1ce6925dac29fba4d929cae2a2815f5c39c81d92c17f07ad0d81f3fc", + "path": "template-gallery/inputs/restoring_the_studio_backdrop.mask.png", + "sha256": "sha256:bytes:71817f4823a73712c8e76e7d832ec382c29ec0a0bf5a472e09639448c082da01", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": ["CreativeML Open RAIL-M at the pinned Stable Diffusion v1.5 revision."], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_tile_extract" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "restoring_the_studio_backdrop" }, { - "path": "template-gallery/reviews/qwen_upscale_finish.quality-review.json", - "sha256": "sha256:bytes:bf07ca5560e2f6a1489a4c5f0b48a49d8d4c7c73b22dee78e364c6f563878345", + "path": "template-gallery/inputs/sana_i2v_blue_hour_above_rice_terraces.first.png", + "sha256": "sha256:bytes:0644be42f8f1f2a8f9eed3df2cb14a8709d8b681c23749cc4bb69e41d4d0618e", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1", + "sourceRevision": "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1 https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_upscale_finish" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sana_i2v_blue_hour_above_rice_terraces" }, { - "path": "template-gallery/reviews/qwen_upscale_finish.reviewed-provenance.json", - "sha256": "sha256:bytes:b6f91a9080fbbb535879b11f4e19dad257df897740f04c271e0f355d1f988987", + "path": "template-gallery/inputs/sana_sprint_monochrome_tiger.before.webp", + "sha256": "sha256:bytes:a99616590d7d8586a51a25bbe9e36b309f705bc80f2abaab04ac84f1e0d948e4", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], - "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "qwen_upscale_finish" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-20", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "40060ba701188a6d287df07e0852c6497d109885495e6fc85a19e8371ef73906", + "publicationBasis": "Maintainer approved both exact Sana Sprint images and redistribution of the redacted review and recipe records.", + "creationMethod": "Exact retained synthetic Sana Sprint source generated from a project-authored prompt", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/blob/aa76e7f4f4928f378716b6716a2130fba3caf5b1/README.md", + "sourceRevision": "Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers@aa76e7f4f4928f378716b6716a2130fba3caf5b1", + "sourceLicense": "Project-authored synthetic example generated with the pinned model and applicable component terms", + "modelTerms": [ + "Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers@aa76e7f4f4928f378716b6716a2130fba3caf5b1 — Apache-2.0. https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/blob/aa76e7f4f4928f378716b6716a2130fba3caf5b1/LICENSE", + "The model card identifies Gemma-2-2B-IT as its text encoder. https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/blob/aa76e7f4f4928f378716b6716a2130fba3caf5b1/README.md", + "Gemma Terms of Use and Prohibited Use Policy. https://gemma.ai/resources/terms/ https://gemma.ai/resources/prohibited-use/" + ], + "aiGenerated": true, + "requiredAttribution": [ + "NVIDIA, MIT HAN Lab and Hugging Face Sana Sprint, plus the Google Gemma 2 text encoder. https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/blob/aa76e7f4f4928f378716b6716a2130fba3caf5b1/README.md" + ], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "provenanceTemplateId": "sana_sprint_monochrome_tiger" }, { - "path": "template-gallery/reviews/reference_fusion.quality-review.json", - "sha256": "sha256:bytes:dc9e6e9fac8d2e1fb11786e7b3027ffac58e4436e10a5f6658958ea20437b94a", + "path": "template-gallery/inputs/sd15_canny_guided_green_glass.before.png", + "sha256": "sha256:bytes:6d47a2f07006b98f9e5cfc8ee925914c4dbfa39fd38b0b61770be56d12ed04e8", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "reference_fusion" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_canny_guided_green_glass" }, { - "path": "template-gallery/reviews/reference_fusion.reviewed-provenance.json", - "sha256": "sha256:bytes:bc56957f55d2b4200c31df83ee548a8b50ebf1cf3b6493bc881b25032d12355f", + "path": "template-gallery/inputs/sd15_control_cobalt_handmade_paper.before.png", + "sha256": "sha256:bytes:d143c4922ad498b9bd436d06df424bbff50baf023b93735b53ee401e19e4cbf1", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "reference_fusion" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_control_cobalt_handmade_paper" }, { - "path": "template-gallery/reviews/wan_22_ti2v_5b_seed_vault.quality-review.json", - "sha256": "sha256:bytes:119627f8cbd5751af0bf7cbf7dc7f5fa6a22ce28000438e0e49fc7569a493596", + "path": "template-gallery/inputs/sd15_control_cobalt_handmade_paper.guide.png", + "sha256": "sha256:bytes:6d47a2f07006b98f9e5cfc8ee925914c4dbfa39fd38b0b61770be56d12ed04e8", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_22_ti2v_5b_seed_vault" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_control_cobalt_handmade_paper" }, { - "path": "template-gallery/reviews/wan_22_ti2v_5b_seed_vault.reviewed-provenance.json", - "sha256": "sha256:bytes:260b3901159d64efad800ec39e72a1ac893e0b1f717551b572288f2a10efe1e8", + "path": "template-gallery/inputs/sd15_control_cobalt_studio_wall_repair.before.png", + "sha256": "sha256:bytes:d143c4922ad498b9bd436d06df424bbff50baf023b93735b53ee401e19e4cbf1", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_22_ti2v_5b_seed_vault" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_control_cobalt_studio_wall_repair" }, { - "path": "template-gallery/reviews/wan_vace_cinematic_text_to_video.quality-review.json", - "sha256": "sha256:bytes:e7c7f1a212e20d0aba6dd29b4d4f799f4b32f07fd0ef91a45073a30874c59830", + "path": "template-gallery/inputs/sd15_control_cobalt_studio_wall_repair.guide.png", + "sha256": "sha256:bytes:6d47a2f07006b98f9e5cfc8ee925914c4dbfa39fd38b0b61770be56d12ed04e8", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_cinematic_text_to_video" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_control_cobalt_studio_wall_repair" }, { - "path": "template-gallery/reviews/wan_vace_cinematic_text_to_video.reviewed-provenance.json", - "sha256": "sha256:bytes:0c12b78137241cbce6851ae3221254f9e751964c96d4a1dff0792a99f1cf06e8", + "path": "template-gallery/inputs/sd15_control_cobalt_studio_wall_repair.mask.png", + "sha256": "sha256:bytes:71817f4823a73712c8e76e7d832ec382c29ec0a0bf5a472e09639448c082da01", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_cinematic_text_to_video" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_control_cobalt_studio_wall_repair" }, { - "path": "template-gallery/reviews/wan_vace_grayscale_control.quality-review.json", - "sha256": "sha256:bytes:d135d69159418aecc6d0956b1ec64f2c7fc76137445679a4d4b11a54629c0932", + "path": "template-gallery/inputs/sd15_pag_canny_guided_glass.before.png", + "sha256": "sha256:bytes:6d47a2f07006b98f9e5cfc8ee925914c4dbfa39fd38b0b61770be56d12ed04e8", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_grayscale_control" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_canny_guided_glass" }, { - "path": "template-gallery/reviews/wan_vace_grayscale_control.reviewed-provenance.json", - "sha256": "sha256:bytes:0366fae2e916bf0c67a90b8e898b9b0f1a2ff66680bcd789b160566e5a462070", + "path": "template-gallery/inputs/sd15_pag_cobalt_studio_repair.before.png", + "sha256": "sha256:bytes:d143c4922ad498b9bd436d06df424bbff50baf023b93735b53ee401e19e4cbf1", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_grayscale_control" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_cobalt_studio_repair" }, { - "path": "template-gallery/reviews/wan_vace_outpaint_reframe.quality-review.json", - "sha256": "sha256:bytes:d6a2b3843f4581565adc30b9d16ee4a17f84751f0ef11d8b0b9b505ff5d57f66", + "path": "template-gallery/inputs/sd15_pag_cobalt_studio_repair.mask.png", + "sha256": "sha256:bytes:71817f4823a73712c8e76e7d832ec382c29ec0a0bf5a472e09639448c082da01", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], - "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_outpaint_reframe" + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_cobalt_studio_repair" }, { - "path": "template-gallery/reviews/wan_vace_outpaint_reframe.reviewed-provenance.json", - "sha256": "sha256:bytes:c4cb91db649df41db5276bb58ea85257d77de542f6349942d07f7f5675788dec", + "path": "template-gallery/inputs/sd15_pag_control_wall_repair.before.png", + "sha256": "sha256:bytes:d143c4922ad498b9bd436d06df424bbff50baf023b93735b53ee401e19e4cbf1", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_outpaint_reframe" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_control_wall_repair" }, { - "path": "template-gallery/reviews/wan_vace_video_color_grade.quality-review.json", - "sha256": "sha256:bytes:8aa386e846e98c6da6ed93369ff02ac9044df43af03a9e5fc109f0ae3e50c629", + "path": "template-gallery/inputs/sd15_pag_control_wall_repair.guide.png", + "sha256": "sha256:bytes:6d47a2f07006b98f9e5cfc8ee925914c4dbfa39fd38b0b61770be56d12ed04e8", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_video_color_grade" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_control_wall_repair" }, { - "path": "template-gallery/reviews/wan_vace_video_color_grade.reviewed-provenance.json", - "sha256": "sha256:bytes:96b36b2d5b4a9212016d943b486240e0454ce2d30131a4bd39c83d932f865c88", + "path": "template-gallery/inputs/sd15_pag_control_wall_repair.mask.png", + "sha256": "sha256:bytes:71817f4823a73712c8e76e7d832ec382c29ec0a0bf5a472e09639448c082da01", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_video_color_grade" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_control_wall_repair" }, { - "path": "template-gallery/reviews/wan_vace_video_to_video.quality-review.json", - "sha256": "sha256:bytes:88168ad146f317c2fd68f5a0db8f369dd398cbbf87073af8fdc6c680e7384a90", + "path": "template-gallery/inputs/sd15_pag_mountain_lake_watercolor.before.png", + "sha256": "sha256:bytes:88290a96bc8d52f11f2d1e3c0c0e04c2027661816e54b57d7d4739d731ca1e75", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_video_to_video" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_mountain_lake_watercolor" }, { - "path": "template-gallery/reviews/wan_vace_video_to_video.reviewed-provenance.json", - "sha256": "sha256:bytes:ee0ba628fb26f4789bfd9729bb534c11479aa170e489fbc3a7174c9c460d3cc2", + "path": "template-gallery/inputs/sdxl_blue_glass_on_linen.before.png", + "sha256": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_video_to_video" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_blue_glass_on_linen" }, { - "path": "template-gallery/reviews/z_image_cinematic_contact_sheet.duplicate-provenance.json", - "sha256": "sha256:bytes:1771c206a72c99013f8926742ddf0d95510aa416522d30381d286e4399bee7b4", + "path": "template-gallery/inputs/sdxl_canny_adapter_glass_study.before.png", + "sha256": "sha256:bytes:6bd07628a37c087178e9de58a98c6c5879468163f1a2376a581511a42503e2e2", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "z_image_cinematic_contact_sheet" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_canny_adapter_glass_study" }, { - "path": "template-gallery/reviews/z_image_cinematic_contact_sheet.quality-review.json", - "sha256": "sha256:bytes:371847c70bebac46cd8012df74ba670cd4a6a2f6d833928ae801db932e3dc69b", + "path": "template-gallery/inputs/sdxl_clear_cobalt_backdrop.before.png", + "sha256": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "z_image_cinematic_contact_sheet" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_clear_cobalt_backdrop" }, { - "path": "template-gallery/reviews/z_image_lora_style.quality-review.json", - "sha256": "sha256:bytes:f8060ea3170c43a2c1d791dc523ef952bfb7370621e186dd7ed07302bb71f6d1", + "path": "template-gallery/inputs/sdxl_clear_cobalt_backdrop.mask.png", + "sha256": "sha256:bytes:1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "z_image_lora_style" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_clear_cobalt_backdrop" }, { - "path": "template-gallery/reviews/z_image_lora_style.reviewed-provenance.json", - "sha256": "sha256:bytes:eb43b7402fd7d59116557f04030467f34c4e819792a9587053de3791739b6bfd", + "path": "template-gallery/inputs/sdxl_control_golden_boathouse.before.png", + "sha256": "sha256:bytes:e1d9736125cad717896f0c7d5274a6373676559f250d76cedcc8f8aae9379ec6", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "z_image_lora_style" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_control_golden_boathouse" }, { - "path": "template-gallery/reviews/z_image_poster.duplicate-provenance.json", - "sha256": "sha256:bytes:13f18ac3e02e6189ec541a2f9bedc405d56b24030a612811daad1742e8f2d923", + "path": "template-gallery/inputs/sdxl_control_golden_boathouse.guide.png", + "sha256": "sha256:bytes:322a9aa511a7d21524758724b1666fc220abf563def5e5d1294630e7e58a3b96", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "z_image_poster" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_control_golden_boathouse" }, { - "path": "template-gallery/reviews/z_image_poster.quality-review.json", - "sha256": "sha256:bytes:f8415337bd646aa621e669290e8d2d393b2247062d7b71c30ed278d6066bf2ce", + "path": "template-gallery/inputs/sdxl_control_inpaint_warm_plaster.before.png", + "sha256": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "z_image_poster" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_control_inpaint_warm_plaster" }, { - "path": "template-gallery/reviews/z_image_product_mockup.duplicate-provenance.json", - "sha256": "sha256:bytes:ef1a624bf0e8839b550fa17e907906903d39b4fe7d9f5cc8e3c262d3b5f77441", + "path": "template-gallery/inputs/sdxl_control_inpaint_warm_plaster.guide.png", + "sha256": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "z_image_product_mockup" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_control_inpaint_warm_plaster" }, { - "path": "template-gallery/reviews/z_image_product_mockup.quality-review.json", - "sha256": "sha256:bytes:e8559afb5ba539822a0d65dfc9445b8e3e9b37f78edfaece154e1056e2ab7601", + "path": "template-gallery/inputs/sdxl_control_inpaint_warm_plaster.mask.png", + "sha256": "sha256:bytes:1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "z_image_product_mockup" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_control_inpaint_warm_plaster" }, { - "path": "template-gallery/reviews/z_image_quick_concept.duplicate-provenance.json", - "sha256": "sha256:bytes:7be6361c9817b09d656f9ee4fffbc36030e3055e8fe6de4ddd9e57cbf0046102", + "path": "template-gallery/inputs/sdxl_controlnet_glass_study_on_slate.before.png", + "sha256": "sha256:bytes:6bd07628a37c087178e9de58a98c6c5879468163f1a2376a581511a42503e2e2", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "z_image_quick_concept" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_controlnet_glass_study_on_slate" }, { - "path": "template-gallery/reviews/z_image_quick_concept.quality-review.json", - "sha256": "sha256:bytes:1de8e435dbae4e7d7ef50f8a2cb8b33007e620d5a03a94e76be75e01e06518c7", + "path": "template-gallery/inputs/sdxl_pag_cobalt_wall.before.png", + "sha256": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "aiGenerated": false, "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "z_image_quick_concept" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_cobalt_wall" }, { - "path": "template-gallery/runtime-inputs/assets/101d50449cc4d74257e88e87fb750363bfe538c58b601b340fb3ce9031c2ed03.mp4", - "sha256": "sha256:bytes:101d50449cc4d74257e88e87fb750363bfe538c58b601b340fb3ce9031c2ed03", + "path": "template-gallery/inputs/sdxl_pag_cobalt_wall.mask.png", + "sha256": "sha256:bytes:1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_cobalt_wall" + }, + { + "path": "template-gallery/inputs/sdxl_pag_lighthouse_in_graphite.before.png", + "sha256": "sha256:bytes:4cbc984b44c398b6e92b4350513d3543139e9dffe01a38857845c8a7698272c8", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_lighthouse_in_graphite" + }, + { + "path": "template-gallery/inputs/sdxl_pag_snow_cabin.before.png", + "sha256": "sha256:bytes:ca250462efc77625134ebe305b2ee67281a1dcf8919e45299c648f0fdacf919a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_snow_cabin" + }, + { + "path": "template-gallery/inputs/sdxl_pag_two_tier_cobalt_glass.before.png", + "sha256": "sha256:bytes:ff30b36f685b657db6de0cb59dff37601e147123ba19b9c42a32fc1060bd323e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/diffusers/controlnet-canny-sdxl-1.0/tree/eb115a19a10d14909256db740ed109532ab1483c", + "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_two_tier_cobalt_glass" + }, + { + "path": "template-gallery/inputs/sdxl_pag_two_tier_cobalt_glass.guide.png", + "sha256": "sha256:bytes:64e81c4250408ca9a2ffc11e2987413096ae65674c2935a0417a351a50bb3ba4", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/diffusers/controlnet-canny-sdxl-1.0/tree/eb115a19a10d14909256db740ed109532ab1483c", + "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_two_tier_cobalt_glass" + }, + { + "path": "template-gallery/inputs/sdxl_pix2pix_pale_amber_glass.before.png", + "sha256": "sha256:bytes:ebaca95f96d1573e4292ffc65c78eb0dcf8ff9cc8b5a7e11ec81face61b160fb", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/diffusers/sdxl-instructpix2pix-768/tree/06653d47f8d22f2c2205a5884d6a24c5e76d2ca7", + "sourceRevision": "diffusers/sdxl-instructpix2pix-768@06653d47f8d22f2c2205a5884d6a24c5e76d2ca7", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/diffusers/sdxl-instructpix2pix-768/tree/06653d47f8d22f2c2205a5884d6a24c5e76d2ca7" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "diffusers/sdxl-instructpix2pix-768@06653d47f8d22f2c2205a5884d6a24c5e76d2ca7 https://huggingface.co/diffusers/sdxl-instructpix2pix-768/tree/06653d47f8d22f2c2205a5884d6a24c5e76d2ca7" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pix2pix_pale_amber_glass" + }, + { + "path": "template-gallery/inputs/spandrel_tram_shelter_video_2x.before.mp4", + "sha256": "sha256:bytes:5c24b2b67f893f48e4dbf0d893e0aa4308852592f30f8179b44298cca4ce197e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "spandrel_tram_shelter_video_2x" + }, + { + "path": "template-gallery/inputs/spandrel_x2_synthetic_gradient.before.png", + "sha256": "sha256:bytes:626815c78eaad46cad849732d1598b45b91700ce046c1ee3f4e2444db80aa32a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Original maintainer-approved synthetic gradient fixture", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "MoDiff-authored fixture or Gallery metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-19", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ea2e749b805706828428bd34589bd41263e9c432a9503fe17c3c6a6d7d932176", + "publicationBasis": "Maintainer approved this exact saved Spandrel 2× technical preview and confirmed redistribution rights.", + "provenanceTemplateId": "spandrel_x2_synthetic_gradient" + }, + { + "path": "template-gallery/inputs/stable_video_lighthouse_headland.first.png", + "sha256": "sha256:bytes:41f07c8ec7ab5d7097cba0f77867b61e666c6a803900784697ff816b851b98de", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/tree/043843887ccd51926e3efed36270444a838e7861", + "sourceRevision": "stabilityai/stable-video-diffusion-img2vid-xt-1-1@043843887ccd51926e3efed36270444a838e7861", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/blob/043843887ccd51926e3efed36270444a838e7861/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-video-diffusion-img2vid-xt-1-1@043843887ccd51926e3efed36270444a838e7861 https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/tree/043843887ccd51926e3efed36270444a838e7861" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "a7a2ce4e3e9bdfddcd33a4f3c2a7df0b69c0e815eef0493a9f0a748acf1716b8", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "stable_video_lighthouse_headland" + }, + { + "path": "template-gallery/inputs/wan_a14b_wind_across_pond.first.png", + "sha256": "sha256:bytes:cd29e54e208f6040d3f4cbbf8c9f096d537f8c71dffb50d5abae3298cc49deaf", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers/tree/596658fd9ca6b7b71d5057529bbf319ecbc61d74", + "sourceRevision": "Wan-AI/Wan2.2-I2V-A14B-Diffusers@596658fd9ca6b7b71d5057529bbf319ecbc61d74", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers/tree/596658fd9ca6b7b71d5057529bbf319ecbc61d74" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-I2V-A14B-Diffusers@596658fd9ca6b7b71d5057529bbf319ecbc61d74 https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers/tree/596658fd9ca6b7b71d5057529bbf319ecbc61d74" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_a14b_wind_across_pond" + }, + { + "path": "template-gallery/inputs/wan_animate_glasshouse_keeper.background.mp4", + "sha256": "sha256:bytes:56d9cdc81884fc95644f38a5761ce4be55a441be9c572d3112f2c324541c315e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceRevision": "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0 https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "01bd531cf1d88e5338a9c8dc4b831048b7660d92b628f61f3b28e75bb68b9a6c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_animate_glasshouse_keeper" + }, + { + "path": "template-gallery/inputs/wan_animate_glasshouse_keeper.face.mp4", + "sha256": "sha256:bytes:b90706154957e438dc3df732e59b97467872221695ec87b3e135c8ad29ec9a7f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceRevision": "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0 https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "01bd531cf1d88e5338a9c8dc4b831048b7660d92b628f61f3b28e75bb68b9a6c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_animate_glasshouse_keeper" + }, + { + "path": "template-gallery/inputs/wan_animate_glasshouse_keeper.first.png", + "sha256": "sha256:bytes:ade9d6ac1301a5df16c94c0a03b25d201719f38766874b473f3c22c3fdd84be5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceRevision": "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0 https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "01bd531cf1d88e5338a9c8dc4b831048b7660d92b628f61f3b28e75bb68b9a6c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_animate_glasshouse_keeper" + }, + { + "path": "template-gallery/inputs/wan_animate_glasshouse_keeper.mask.mp4", + "sha256": "sha256:bytes:66238c0f48aef7920122e948c9bfccb8c3c9af842ac989ba744edb575d30f3e2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceRevision": "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0 https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "01bd531cf1d88e5338a9c8dc4b831048b7660d92b628f61f3b28e75bb68b9a6c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_animate_glasshouse_keeper" + }, + { + "path": "template-gallery/inputs/wan_animate_glasshouse_keeper.pose.mp4", + "sha256": "sha256:bytes:2fd6db2696b9a6bc7457bb8b747af5cd7ec4ec5603e86b06f01e591f17ed39f2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceRevision": "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0 https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "01bd531cf1d88e5338a9c8dc4b831048b7660d92b628f61f3b28e75bb68b9a6c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_animate_glasshouse_keeper" + }, + { + "path": "template-gallery/inputs/wan_animate_signal_through_the_rain.face.mp4", + "sha256": "sha256:bytes:523c3b8d098977aa228f4319b81e675cb31ea96394eda45125dbfa24721d0d68", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceRevision": "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0 https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_animate_signal_through_the_rain" + }, + { + "path": "template-gallery/inputs/wan_animate_signal_through_the_rain.first.png", + "sha256": "sha256:bytes:5e73a03d1c557ef5572faad8f7b270ceb33be54e311982450fb5df2ba799d668", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceRevision": "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0 https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_animate_signal_through_the_rain" + }, + { + "path": "template-gallery/inputs/wan_animate_signal_through_the_rain.pose.mp4", + "sha256": "sha256:bytes:2fd6db2696b9a6bc7457bb8b747af5cd7ec4ec5603e86b06f01e591f17ed39f2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceRevision": "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0 https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_animate_signal_through_the_rain" + }, + { + "path": "template-gallery/inputs/wan_flf_blue_hour_at_the_tram_shelter.first.png", + "sha256": "sha256:bytes:6d2c561cf33919ae42e773d95a0232799da3f2b92a23a94dad80902cfb73527a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7", + "sourceRevision": "Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers@17c30769b1e0b5dcaa1799b117bf20a9c31f59d7", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers@17c30769b1e0b5dcaa1799b117bf20a9c31f59d7 https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_flf_blue_hour_at_the_tram_shelter" + }, + { + "path": "template-gallery/inputs/wan_flf_blue_hour_at_the_tram_shelter.last.png", + "sha256": "sha256:bytes:191b023efb43a42288799877db722b9a2608d2970740246322ef38cc7c68c590", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7", + "sourceRevision": "Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers@17c30769b1e0b5dcaa1799b117bf20a9c31f59d7", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers@17c30769b1e0b5dcaa1799b117bf20a9c31f59d7 https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_flf_blue_hour_at_the_tram_shelter" + }, + { + "path": "template-gallery/inputs/wan_vace_amber_glass_stabilized.before.mp4", + "sha256": "sha256:bytes:da6a0abe90bfc8c4efcb4a63201a6db839c944416cef49d452b629fbb86c3ec0", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceRevision": "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1 https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "f90bf0978ad3ec5d295b6d9d5e339207e3586b52567987aa1930881dd1f46e4e", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_vace_amber_glass_stabilized" + }, + { + "path": "template-gallery/inputs/wan_vace_amber_glass_stabilized.mask.mp4", + "sha256": "sha256:bytes:c8eefe9665e6ba8965e7d48c5e6116f2e3ba230ac35390efb834140c5d4cdf8b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceRevision": "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1 https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "f90bf0978ad3ec5d295b6d9d5e339207e3586b52567987aa1930881dd1f46e4e", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_vace_amber_glass_stabilized" + }, + { + "path": "template-gallery/inputs/wan_vace_amber_glass_stabilized.reference.png", + "sha256": "sha256:bytes:43a36ae8d33da045a6ad1321195cd163ce3188e1d119008860386afacd21dbc2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceRevision": "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1 https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "f90bf0978ad3ec5d295b6d9d5e339207e3586b52567987aa1930881dd1f46e4e", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_vace_amber_glass_stabilized" + }, + { + "path": "template-gallery/inputs/wan_vace_grayscale_control.before.mp4", + "sha256": "sha256:bytes:748b164fd91bc2eed97f7c1d1125a04496a056f29cc016d7cc0da3734c2303b7", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-VACE-1.3B-diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "provenanceTemplateId": "wan_vace_grayscale_control", + "consumingTemplateIds": ["wan_vace_grayscale_control"] + }, + { + "path": "template-gallery/inputs/wan_vace_outpaint_reframe.before.mp4", + "sha256": "sha256:bytes:a8f28e04d03c9a6a2ba0b3ba4bf7db08f6ec99c45d962877cbc91aad5f3ad318", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-VACE-1.3B-diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "provenanceTemplateId": "wan_vace_outpaint_reframe", + "consumingTemplateIds": ["wan_vace_outpaint_reframe"] + }, + { + "path": "template-gallery/inputs/wan_vace_video_color_grade.before.mp4", + "sha256": "sha256:bytes:934b4494442c732bfc27f3de1e1a8e99adf0eb96572bd6405f1a9c72da148289", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "provenanceTemplateId": "wan_vace_video_color_grade", + "consumingTemplateIds": ["wan_vace_video_color_grade"] + }, + { + "path": "template-gallery/inputs/wan_vace_video_to_video.before.mp4", + "sha256": "sha256:bytes:1f5cd051f787fc878bed50d3c26cce840abe00c942d32e49492e544ac2f88cff", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "provenanceTemplateId": "wan_vace_video_to_video", + "consumingTemplateIds": ["wan_vace_video_to_video"] + }, + { + "path": "template-gallery/inputs/zimage_golden_amber_glass.before.png", + "sha256": "sha256:bytes:ebaca95f96d1573e4292ffc65c78eb0dcf8ff9cc8b5a7e11ec81face61b160fb", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "zimage_golden_amber_glass" + }, + { + "path": "template-gallery/inputs/zimage_rocky_glacial_shores.before.png", + "sha256": "sha256:bytes:50270382b4b730b87f79b775accaeeb81f3ff8885cd3d2cea94830206fbc181b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "zimage_rocky_glacial_shores" + }, + { + "path": "template-gallery/inputs/zimage_seamless_cobalt_backdrop.before.png", + "sha256": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "zimage_seamless_cobalt_backdrop" + }, + { + "path": "template-gallery/inputs/zimage_seamless_cobalt_backdrop.mask.png", + "sha256": "sha256:bytes:1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "zimage_seamless_cobalt_backdrop" + }, + { + "path": "template-gallery/janus_red_enamel_teapot.webp", + "sha256": "sha256:bytes:c2cc1b06535dae0816a255e5a08bb20372a4cbd2c4b895f51273140dba4615eb", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceRevision": "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": ["https://github.com/deepseek-ai/Janus/blob/main/LICENSE-MODEL"], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "janus_red_enamel_teapot" + }, + { + "path": "template-gallery/janus_red_triangle_caption.json", + "sha256": "sha256:bytes:1fec185a203f16541cf13a02afff3c4333b83ff6c593a88fc59fa108801e6d44", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceRevision": "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": ["https://github.com/deepseek-ai/Janus/blob/main/LICENSE-MODEL"], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "janus_red_triangle_caption" + }, + { + "path": "template-gallery/janus_reykjavik_travel_note.json", + "sha256": "sha256:bytes:c7fb7a09d2480a8cffde6212e6686a5be04ccb01ec7811c7109281634d7c4daa", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceRevision": "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": ["https://github.com/deepseek-ai/Janus/blob/main/LICENSE-MODEL"], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "janus_reykjavik_travel_note" + }, + { + "path": "template-gallery/joy_plus_lavender_on_limestone.webp", + "sha256": "sha256:bytes:6c1f36ca4b6eb78cc6ce314e60534f4496fae9a972b3f03ce2254257aa9737a3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joy_plus_lavender_on_limestone" + }, + { + "path": "template-gallery/joy_plus_terracotta_on_limestone.webp", + "sha256": "sha256:bytes:d5aedb8394ef70b3281ca66760e5f6e693fa4275508010a9fe4d16776ca3baeb", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joy_plus_terracotta_on_limestone" + }, + { + "path": "template-gallery/joyimage_base_cobalt_paper_band.webp", + "sha256": "sha256:bytes:99fabcac42e8698eb652089bf52698690648937552975d54a68141be9a66b307", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joyimage_base_cobalt_paper_band" + }, + { + "path": "template-gallery/joyimage_herbarium_rainy_porthole.webp", + "sha256": "sha256:bytes:50213ff01502af1445d1d72618c3614c444931fd94739a53191bd2c36f36e578", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "4fc7c52588176cb1f6ba6d699d08741b2986ea71ea87bac650d261716a10b24c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joyimage_herbarium_rainy_porthole" + }, + { + "path": "template-gallery/kandinsky3_ginkgo_on_slate.webp", + "sha256": "sha256:bytes:4b33c6b278e6c9f036ee8f4a11fe6dd4dab58ad385407f844b1f0bb609557ab4", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceRevision": "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632 https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "kandinsky3_ginkgo_on_slate" + }, + { + "path": "template-gallery/kandinsky3_smoked_glass_on_limestone.webp", + "sha256": "sha256:bytes:77d55b454e684b69306ae806b31911750ae496888e58c85c1d896a5f222b71dd", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceRevision": "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632 https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "kandinsky3_smoked_glass_on_limestone" + }, + { + "path": "template-gallery/kontext_wide_water_alpine_ridge.webp", + "sha256": "sha256:bytes:18090bf07900510b2d99c7c4ab38b9e38dc680fe437def20b2ce7297265db4b8", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "kontext_wide_water_alpine_ridge" + }, + { + "path": "template-gallery/latte_water_folding_over_slate.mp4", + "sha256": "sha256:bytes:97cd72f79c9389e0c4f502be0759f4764e00861217cee1e11ce563b54d2d86b8", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/maxin-cn/Latte-1/tree/0653024365272f061fc44d1078134df22842b687", + "sourceRevision": "maxin-cn/Latte-1@0653024365272f061fc44d1078134df22842b687", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": ["https://huggingface.co/maxin-cn/Latte-1/tree/0653024365272f061fc44d1078134df22842b687"], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "maxin-cn/Latte-1@0653024365272f061fc44d1078134df22842b687 https://huggingface.co/maxin-cn/Latte-1/tree/0653024365272f061fc44d1078134df22842b687" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "latte_water_folding_over_slate" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to previously approved synthetic source rights and recorded model terms", + "creationMethod": "Native local AI-generated output or exact deterministic layer-sheet derivative; original approved bytes retained", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceLicense": "Generated output and approved synthetic input; retained model terms apply", + "modelTerms": [ + "Qwen/Qwen-Image-Layered: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "publicationBasis": "Existing maintainer publication authorization and current explicit instruction to register these three accepted assets; no new ownership or rights quotation is fabricated.", + "path": "template-gallery/layers/qwen_layered_portrait.native-layer-00.webp", + "sha256": "sha256:bytes:ba904a37ab5bc2905458dfab79179aba4c268bcf409aa0444549664797eb5dea", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", + "reviewedBy": "maintainer (current user)", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-native-three-registration", + "humanApprovalPacketSHA256": "69c6b3d9b0ea2fcca16ee538f6e75b414b7141658b74f10578758e61360f63fd", + "provenanceTemplateId": "qwen_layered_portrait" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to previously approved synthetic source rights and recorded model terms", + "creationMethod": "Native local AI-generated output or exact deterministic layer-sheet derivative; original approved bytes retained", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceLicense": "Generated output and approved synthetic input; retained model terms apply", + "modelTerms": [ + "Qwen/Qwen-Image-Layered: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "publicationBasis": "Existing maintainer publication authorization and current explicit instruction to register these three accepted assets; no new ownership or rights quotation is fabricated.", + "path": "template-gallery/layers/qwen_layered_portrait.native-layer-01.webp", + "sha256": "sha256:bytes:abb3ae59bfd0395c477d2e20c7725ba75e4acef318f030cb0adb98837639e898", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", + "reviewedBy": "maintainer (current user)", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-native-three-registration", + "humanApprovalPacketSHA256": "69c6b3d9b0ea2fcca16ee538f6e75b414b7141658b74f10578758e61360f63fd", + "provenanceTemplateId": "qwen_layered_portrait" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to previously approved synthetic source rights and recorded model terms", + "creationMethod": "Native local AI-generated output or exact deterministic layer-sheet derivative; original approved bytes retained", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceLicense": "Generated output and approved synthetic input; retained model terms apply", + "modelTerms": [ + "Qwen/Qwen-Image-Layered: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "publicationBasis": "Existing maintainer publication authorization and current explicit instruction to register these three accepted assets; no new ownership or rights quotation is fabricated.", + "path": "template-gallery/layers/qwen_layered_portrait.native-layer-02.webp", + "sha256": "sha256:bytes:4ad39d3025e3421834d92b32ab5e1e49e4a3ce79602acf614758514f78e6db33", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", + "reviewedBy": "maintainer (current user)", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-native-three-registration", + "humanApprovalPacketSHA256": "69c6b3d9b0ea2fcca16ee538f6e75b414b7141658b74f10578758e61360f63fd", + "provenanceTemplateId": "qwen_layered_portrait" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to previously approved synthetic source rights and recorded model terms", + "creationMethod": "Native local AI-generated output or exact deterministic layer-sheet derivative; original approved bytes retained", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceLicense": "Generated output and approved synthetic input; retained model terms apply", + "modelTerms": [ + "Qwen/Qwen-Image-Layered: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "publicationBasis": "Existing maintainer publication authorization and current explicit instruction to register these three accepted assets; no new ownership or rights quotation is fabricated.", + "path": "template-gallery/layers/qwen_layered_portrait.preview-layer-00.png", + "sha256": "sha256:bytes:b9decdea3edb455655594b73d42e5c053f961500e7ff7d65367a2ca855692c87", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", + "reviewedBy": "maintainer (current user)", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-native-three-registration", + "humanApprovalPacketSHA256": "69c6b3d9b0ea2fcca16ee538f6e75b414b7141658b74f10578758e61360f63fd", + "provenanceTemplateId": "qwen_layered_portrait" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to previously approved synthetic source rights and recorded model terms", + "creationMethod": "Native local AI-generated output or exact deterministic layer-sheet derivative; original approved bytes retained", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceLicense": "Generated output and approved synthetic input; retained model terms apply", + "modelTerms": [ + "Qwen/Qwen-Image-Layered: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "publicationBasis": "Existing maintainer publication authorization and current explicit instruction to register these three accepted assets; no new ownership or rights quotation is fabricated.", + "path": "template-gallery/layers/qwen_layered_portrait.preview-layer-01.png", + "sha256": "sha256:bytes:52756ca48a3b51ccb16dc4859207a89cf7c2e38ccc4c0efc325f77718eaeb645", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", + "reviewedBy": "maintainer (current user)", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-native-three-registration", + "humanApprovalPacketSHA256": "69c6b3d9b0ea2fcca16ee538f6e75b414b7141658b74f10578758e61360f63fd", + "provenanceTemplateId": "qwen_layered_portrait" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to previously approved synthetic source rights and recorded model terms", + "creationMethod": "Native local AI-generated output or exact deterministic layer-sheet derivative; original approved bytes retained", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceLicense": "Generated output and approved synthetic input; retained model terms apply", + "modelTerms": [ + "Qwen/Qwen-Image-Layered: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "publicationBasis": "Existing maintainer publication authorization and current explicit instruction to register these three accepted assets; no new ownership or rights quotation is fabricated.", + "path": "template-gallery/layers/qwen_layered_portrait.preview-layer-02.png", + "sha256": "sha256:bytes:58cb19db09e8bfd29a74ce6edb8d7485960abb298659ec8826d4d8ebcc62930a", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", + "reviewedBy": "maintainer (current user)", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-native-three-registration", + "humanApprovalPacketSHA256": "69c6b3d9b0ea2fcca16ee538f6e75b414b7141658b74f10578758e61360f63fd", + "provenanceTemplateId": "qwen_layered_portrait" + }, + { + "path": "template-gallery/layers/qwen_layered_sunset_and_peaks.layer-1.webp", + "sha256": "sha256:bytes:16ffd9f4a965c95164e51c9ee9d72295bc618972d3c67fb837c2df259187682c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/Qwen/Qwen-Image-Layered/blob/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf/README.md" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "b16dfc2b7c1c32272b8f79bc1bffbb60376e63f8cf1ab9d0bdf9aea07cccf5cd", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_layered_sunset_and_peaks" + }, + { + "path": "template-gallery/layers/qwen_layered_sunset_and_peaks.layer-2.webp", + "sha256": "sha256:bytes:866609c2307a1f016cac7eefc56401491f58a2e2d57abf0c20b6bdb0f9da057f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/Qwen/Qwen-Image-Layered/blob/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf/README.md" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "b16dfc2b7c1c32272b8f79bc1bffbb60376e63f8cf1ab9d0bdf9aea07cccf5cd", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_layered_sunset_and_peaks" + }, + { + "path": "template-gallery/layers/qwen_layered_sunset_and_peaks.layer-3.webp", + "sha256": "sha256:bytes:01b27cacca10c2ed53a8b9368d42697c2b13239113790d8291e20ccdb939a896", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/Qwen/Qwen-Image-Layered/blob/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf/README.md" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "b16dfc2b7c1c32272b8f79bc1bffbb60376e63f8cf1ab9d0bdf9aea07cccf5cd", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_layered_sunset_and_peaks" + }, + { + "path": "template-gallery/layers/qwen_layered_sunset_and_peaks.layer-4.webp", + "sha256": "sha256:bytes:186040c0eb257ec0de53821e6f3b03a7720ab2fe03b54a1d0b71290c2e0eda5c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/Qwen/Qwen-Image-Layered/blob/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf/README.md" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "b16dfc2b7c1c32272b8f79bc1bffbb60376e63f8cf1ab9d0bdf9aea07cccf5cd", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_layered_sunset_and_peaks" + }, + { + "path": "template-gallery/lcm_dawn_alpine_lake.webp", + "sha256": "sha256:bytes:6da406d5e24cb7b9e62c1ee617ff8bca851b0f5da3cc7aef2b2e88ac73bfc8d0", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "humanLikenessConsent": "not-applicable", + "marks": [], + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-20", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ba369c5fff89e379be66714d3ecbf1a0e3a9555e2b5ffbc9cb54210d862ec30b", + "publicationBasis": "Maintainer approved the exact Whisper JSON and both exact LCM images, accepted the disclosed LCM changes, and authorized publication of the associated redacted Gallery records.", + "creationMethod": "Exact retained LCM edit of the specified synthetic PRX lake image", + "sourceUrl": "https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7/blob/a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5/README.md", + "sourceRevision": "SimianLuo/LCM_Dreamshaper_v7@a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5", + "sourceLicense": "Project-authored synthetic content processed by recorded model(s), subject to their applicable terms", + "modelTerms": [ + "SimianLuo/LCM_Dreamshaper_v7@a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5 — pinned model card MIT declaration. https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7/blob/a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5/README.md", + "LCM card credits DreamShaper 7 and Stable Diffusion v1.5. DreamShaper 7 card declares CreativeML Open RAIL-M. https://huggingface.co/Lykon/dreamshaper-7", + "Stable Diffusion upstream use terms. https://github.com/CompVis/stable-diffusion/blob/main/LICENSE", + "Photoroom/prx-512-t2i-sft@2996423bc26e8eaca48774fac1797484214dfea0 — Apache-2.0 declaration and Gemma use restrictions. https://huggingface.co/Photoroom/prx-512-t2i-sft/resolve/2996423bc26e8eaca48774fac1797484214dfea0/README.md", + "Pinned Photoroom notice names Google T5Gemma 2B-2B UL2 under the Gemma Terms and FLUX.1 Schnell VAE under Apache-2.0. https://huggingface.co/Photoroom/prx-512-t2i-sft/resolve/2996423bc26e8eaca48774fac1797484214dfea0/NOTICE", + "Gemma Terms and use policy. https://ai.google.dev/gemma/terms · https://gemma.ai/resources/prohibited-use/" + ], + "aiGenerated": true, + "requiredAttribution": [ + "LCM DreamShaper v7. https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7/blob/a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5/README.md", + "DreamShaper 7. https://huggingface.co/Lykon/dreamshaper-7", + "Photoroom Inc., PRX 512 SFT. https://huggingface.co/Photoroom/prx-512-t2i-sft/resolve/2996423bc26e8eaca48774fac1797484214dfea0/README.md", + "Google T5Gemma and Black Forest Labs FLUX.1 Schnell VAE component notices. https://huggingface.co/Photoroom/prx-512-t2i-sft/resolve/2996423bc26e8eaca48774fac1797484214dfea0/NOTICE" + ], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "provenanceTemplateId": "lcm_dawn_alpine_lake" + }, + { + "path": "template-gallery/longcat_clear_glass_at_the_bookshop.webp", + "sha256": "sha256:bytes:a29ccb40ac98bbda8401abaa2b25b9d61722505188056468ae18e66887f89338", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/meituan-longcat/LongCat-Image-Edit/tree/7b54ef423aa7854be7861600024be5c56ab7875a", + "sourceRevision": "meituan-longcat/LongCat-Image-Edit@7b54ef423aa7854be7861600024be5c56ab7875a", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/meituan-longcat/LongCat-Image-Edit/tree/7b54ef423aa7854be7861600024be5c56ab7875a" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "meituan-longcat/LongCat-Image-Edit@7b54ef423aa7854be7861600024be5c56ab7875a https://huggingface.co/meituan-longcat/LongCat-Image-Edit/tree/7b54ef423aa7854be7861600024be5c56ab7875a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "longcat_clear_glass_at_the_bookshop" + }, + { + "path": "template-gallery/longcat_florist_end_of_lane.webp", + "sha256": "sha256:bytes:045dec822bcffaf2825dee3118446a536819a518475c78c4573d68dbb498825b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/meituan-longcat/LongCat-Image/tree/d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8", + "sourceRevision": "meituan-longcat/LongCat-Image@d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/meituan-longcat/LongCat-Image/tree/d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "meituan-longcat/LongCat-Image@d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8 https://huggingface.co/meituan-longcat/LongCat-Image/tree/d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "4fc7c52588176cb1f6ba6d699d08741b2986ea71ea87bac650d261716a10b24c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "longcat_florist_end_of_lane" + }, + { + "path": "template-gallery/longcat_last_tram_at_dusk.wav", + "sha256": "sha256:bytes:6d7e8a05a49b111c59cda0fe69dfb7c5f92fb8e560ae468cf96a16bbd068a78b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/ruixiangma/LongCat-AudioDiT-1B-Diffusers/tree/f4c063ea37f262ba5e6129ebd80095a6d6a9de4d", + "sourceRevision": "ruixiangma/LongCat-AudioDiT-1B-Diffusers@f4c063ea37f262ba5e6129ebd80095a6d6a9de4d", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/ruixiangma/LongCat-AudioDiT-1B-Diffusers/tree/f4c063ea37f262ba5e6129ebd80095a6d6a9de4d" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "ruixiangma/LongCat-AudioDiT-1B-Diffusers@f4c063ea37f262ba5e6129ebd80095a6d6a9de4d https://huggingface.co/ruixiangma/LongCat-AudioDiT-1B-Diffusers/tree/f4c063ea37f262ba5e6129ebd80095a6d6a9de4d" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "15c604ae5df3abed63c95046a78859adb870f415f45c06a99f58ad652fc0dea2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "longcat_last_tram_at_dusk" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to source/model terms", + "creationMethod": "AI-generated original text-to-image Gallery example", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceLicense": "Original project generation; see pinned model and adapter terms", + "modelTerms": [ + "Tongyi-MAI/Z-Image-Turbo: Apache-2.0; https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "path": "template-gallery/low_vram.webp", + "sha256": "sha256:bytes:a69d58bfa342f850d807690080ca9aac583ca9fb69115e55904de315f71938e1", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-six-z-registration", + "humanApprovalPacketSHA256": "9b728a5f8535fc1ba3c03d2e2759d7ac795a586fafab51beb1509379ed388934", + "provenanceTemplateId": "low_vram" + }, + { + "path": "template-gallery/ltx2_enamel_teapot_window_light.mp4", + "sha256": "sha256:bytes:de941b83125f6a84a29c978f968541028dd6c1e41b5e3c4c95ba686ccb69274f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/blob/47da56e2ad66ce4125a9922b4a8826bf407f9d0a/LICENSE"], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_enamel_teapot_window_light" + }, + { + "path": "template-gallery/ltx2_glasshouse_drip.mp4", + "sha256": "sha256:bytes:189410c3652a33b15d16ec0ad6c71b304d9ed2684f04247704202836d498b91c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a"], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_glasshouse_drip" + }, + { + "path": "template-gallery/ltx2_kiln_at_first_light.mp4", + "sha256": "sha256:bytes:75c9bf0b44b5b4c7bcab8c8d7d1381d1b2695bc62d5a251916121c11b79178ed", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a"], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_kiln_at_first_light" + }, + { + "path": "template-gallery/ltx2_moss_and_basalt.mp4", + "sha256": "sha256:bytes:e197eb3cb4ddaf13e4f0e4a71a4c92d30b1cae04dea651fd987213d84d262b09", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/blob/47da56e2ad66ce4125a9922b4a8826bf407f9d0a/LICENSE"], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_moss_and_basalt" + }, + { + "path": "template-gallery/ltx2_surf_below_the_breakwater.mp4", + "sha256": "sha256:bytes:a8d3e7c63417bad7a8a949738fe4cf6f5beb8aa1694476a5289e7037d64dfcd9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a"], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_surf_below_the_breakwater" + }, + { + "path": "template-gallery/ltx_long_wind_and_tide_at_the_headland.mp4", + "sha256": "sha256:bytes:62c8d0eb30f3900276fda6c9c48c8e676cc04385bfbbfe117eecd46144cb81ea", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "f90bf0978ad3ec5d295b6d9d5e339207e3586b52567987aa1930881dd1f46e4e", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx_long_wind_and_tide_at_the_headland" + }, + { + "path": "template-gallery/ltx_video_animated_story.card-poster.png", + "sha256": "sha256:bytes:fcd07a3c5a3e8df1890f1dd98f72746a67025a7bf3c4f6559026b24a8afa445c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "provenanceTemplateId": "ltx_video_animated_story" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Generated media; retained model and output terms apply", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTX-Video Open Weights License and output provisions; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/ltx_video_animated_story.card-preview.mp4", + "sha256": "sha256:bytes:54935c2d3e0db8f926e05f7aacc8bc025f2c1d589951533d5aa32aab1a5e6f1d", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "ltx_video_animated_story" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Generated media; retained model and output terms apply", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTX-Video Open Weights License and output provisions; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/ltx_video_animated_story.mp4", + "sha256": "sha256:bytes:ca548363a0a64ea2011eb0e63e3fd65383c3e8fbbb6fa32126044c13720246f7", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "ltx_video_animated_story" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Generated media; retained model and output terms apply", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTX-Video Open Weights License and output provisions; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/ltx_video_animated_story.poster.png", + "sha256": "sha256:bytes:969f826c9943ba6c4e07507995d12566e9d31d7e32e47e1498f8d4697cb9a223", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "ltx_video_animated_story" + }, + { + "path": "template-gallery/ltx_video_image_to_video.card-preview.mp4", + "sha256": "sha256:bytes:2effe668f4ad43f9b4780400581d282aee66714d8450eb999787a1c29338aea0", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "ltx_video_image_to_video", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "e8804713f41d641d6be227d6d2a2603a1ad17f33164e4a10fa1877101dbe4056", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/ltx_video_image_to_video.mp4", + "sha256": "sha256:bytes:e8804713f41d641d6be227d6d2a2603a1ad17f33164e4a10fa1877101dbe4056", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "ltx_video_image_to_video", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "e8804713f41d641d6be227d6d2a2603a1ad17f33164e4a10fa1877101dbe4056", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/ltx_video_image_to_video.poster.png", + "sha256": "sha256:bytes:eb63789359a844687ed56687ed0ead528c0845bf98631117d8cac28af0c58ad0", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "ltx_video_image_to_video", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "e8804713f41d641d6be227d6d2a2603a1ad17f33164e4a10fa1877101dbe4056", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/ltx_video_long_showcase.card-poster.png", + "sha256": "sha256:bytes:a0b0f93ebf1558f7a8b7c96bb2024bdb55909a54c1362d9d1027ccc24614bdd5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "provenanceTemplateId": "ltx_video_long_showcase" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Generated media; retained model and output terms apply", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTX-Video Open Weights License and output provisions; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/ltx_video_long_showcase.card-preview.mp4", + "sha256": "sha256:bytes:0dc4052d30ff6e11c31ba7ee869d14570739462e01426b6830d9e62c8e5379c7", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "ltx_video_long_showcase" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Generated media; retained model and output terms apply", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTX-Video Open Weights License and output provisions; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/ltx_video_long_showcase.mp4", + "sha256": "sha256:bytes:ba1614fa9b86accd706d8fbc6c92818c43c058f9343cd97431711a47d9bef609", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "ltx_video_long_showcase" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Generated media; retained model and output terms apply", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTX-Video Open Weights License and output provisions; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/ltx_video_long_showcase.poster.png", + "sha256": "sha256:bytes:729b368a30f479ebfa304116f4f60d00881b7935886a3683701f159cc2f51588", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "ltx_video_long_showcase" + }, + { + "path": "template-gallery/ltx_video_multi_reference.card-poster.png", + "sha256": "sha256:bytes:95a7196b97f24cc113918a0d989a5b88ed4b29cb551a799c00a83f9b91acf8af", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "provenanceTemplateId": "ltx_video_multi_reference" + }, + { + "path": "template-gallery/ltx_video_multi_reference.card-preview.mp4", + "sha256": "sha256:bytes:c88c7624b05258ec757e1f543b64f2b42aa94eb02333708c4e5231c902046e55", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "ltx_video_multi_reference", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "debfbe7ec1d1afbba34d05c208762f472fc251434d347ef6021e8476539d7644", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/ltx_video_multi_reference.mp4", + "sha256": "sha256:bytes:debfbe7ec1d1afbba34d05c208762f472fc251434d347ef6021e8476539d7644", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "ltx_video_multi_reference", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "debfbe7ec1d1afbba34d05c208762f472fc251434d347ef6021e8476539d7644", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/ltx_video_multi_reference.poster.png", + "sha256": "sha256:bytes:0f4968be6c8acdd441197f8f3024e48ae103255925869531903af37bb347d859", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "ltx_video_multi_reference", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "debfbe7ec1d1afbba34d05c208762f472fc251434d347ef6021e8476539d7644", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/ltx_video_text_to_video.card-poster.png", + "sha256": "sha256:bytes:e131e2f676e04382117e77deeede145851fff469819d173073354cc5033b116d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "provenanceTemplateId": "ltx_video_text_to_video" + }, + { + "path": "template-gallery/ltx_video_text_to_video.card-preview.mp4", + "sha256": "sha256:bytes:9b8defe3284dcc8bdb9e83485c93c73b65e8c5ade41afe5a383235b04d81b265", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "ltx_video_text_to_video", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "9b2b976acb65a6c4a9c2255e50d2b7a65a42bb54146d6d2a39625dfdd0b0fe14", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/ltx_video_text_to_video.mp4", + "sha256": "sha256:bytes:9b2b976acb65a6c4a9c2255e50d2b7a65a42bb54146d6d2a39625dfdd0b0fe14", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "ltx_video_text_to_video", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "9b2b976acb65a6c4a9c2255e50d2b7a65a42bb54146d6d2a39625dfdd0b0fe14", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/ltx_video_text_to_video.poster.png", + "sha256": "sha256:bytes:c1626d18f12d4cb226de81cca46c0ef9c57628707246efb237f12c30214292fd", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "ltx_video_text_to_video", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "9b2b976acb65a6c4a9c2255e50d2b7a65a42bb54146d6d2a39625dfdd0b0fe14", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/ltx_video_video_to_video.card-poster.png", + "sha256": "sha256:bytes:e5a259b5ab8a0b21b31cb8ba23ae7c0d45a7c9de193e76c1b2608c5709d0fe8c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/datasets/huggingface/documentation-images", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "CC-BY-NC-SA-4.0", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Source: Hugging Face documentation-images Dataset, CC BY-NC-SA 4.0; modified by the MoDiff LTX workflow." + ], + "assetLicense": "CC-BY-NC-SA-4.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "provenanceTemplateId": "ltx_video_video_to_video" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Generated media; retained model and output terms apply", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTX-Video Open Weights License and output provisions; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/ltx_video_video_to_video.card-preview.mp4", + "sha256": "sha256:bytes:f414aaca530e5c7cf7792647a2a0c0efce2792de518e776f9efc3632f0d99306", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "ltx_video_video_to_video" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Generated media; retained model and output terms apply", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTX-Video Open Weights License and output provisions; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/ltx_video_video_to_video.mp4", + "sha256": "sha256:bytes:7ecb7be76078fd602869629b2eba4534382afff58e779e0c70287041e0934b44", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "ltx_video_video_to_video" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Generated media; retained model and output terms apply", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTX-Video Open Weights License and output provisions; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/ltx_video_video_to_video.poster.png", + "sha256": "sha256:bytes:a51e109af8d0f913b6577a9a3f069629db849a895878c893c7c57b2a2292e033", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "ltx_video_video_to_video" + }, + { + "path": "template-gallery/lumina2_larch_on_glacial_pond.webp", + "sha256": "sha256:bytes:06491642cdf97ed7676ad237353957a42aa121a11d3f2423c1a4ac4dd6a53ee5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Alpha-VLLM/Lumina-Image-2.0/tree/53504abd8178b30685b6c4c7a4cd181ff78b73e9", + "sourceRevision": "Alpha-VLLM/Lumina-Image-2.0@53504abd8178b30685b6c4c7a4cd181ff78b73e9", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Alpha-VLLM/Lumina-Image-2.0/tree/53504abd8178b30685b6c4c7a4cd181ff78b73e9" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Alpha-VLLM/Lumina-Image-2.0@53504abd8178b30685b6c4c7a4cd181ff78b73e9 https://huggingface.co/Alpha-VLLM/Lumina-Image-2.0/tree/53504abd8178b30685b6c4c7a4cd181ff78b73e9" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "lumina2_larch_on_glacial_pond" + }, + { + "path": "template-gallery/lumina_opal_pendant_in_limestone.webp", + "sha256": "sha256:bytes:3ff57e957b7db5ad20c9c37789a0536437846cdc8eb4737482cb7f026f25fb8e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Alpha-VLLM/Lumina-Next-SFT-diffusers/tree/0ee5ec90043acf5cb41fe96274af36eb7fad8d95", + "sourceRevision": "Alpha-VLLM/Lumina-Next-SFT-diffusers@0ee5ec90043acf5cb41fe96274af36eb7fad8d95", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/Alpha-VLLM/Lumina-Next-SFT-diffusers/blob/0ee5ec90043acf5cb41fe96274af36eb7fad8d95/README.md" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Alpha-VLLM/Lumina-Next-SFT-diffusers@0ee5ec90043acf5cb41fe96274af36eb7fad8d95 https://huggingface.co/Alpha-VLLM/Lumina-Next-SFT-diffusers/tree/0ee5ec90043acf5cb41fe96274af36eb7fad8d95" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "lumina_opal_pendant_in_limestone" + }, + { + "path": "template-gallery/manifest.json", + "sha256": "sha256:bytes:15616f0e250275d3b5c6771cf667e845a979b8a3e8e61fec6a72a59a6725c074", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "8ed148b43a11d27176b996c42432ccd9bd06c7c94b64f08a48dc4167de24a698", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained." + }, + { + "path": "template-gallery/marigold_depth_synthetic_ramp.webp", + "sha256": "sha256:bytes:129d4b01ca70f532e672214e85be073482aed461465b863467f0c871bf7c94db", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Maintainer-approved exact retained model output", + "sourceUrl": "https://huggingface.co/prs-eth/marigold-depth-lcm-v1-0/tree/04a73502f7fd8fc5e59947b9df3b2266d71d6849", + "sourceRevision": "prs-eth/marigold-depth-lcm-v1-0@04a73502f7fd8fc5e59947b9df3b2266d71d6849", + "sourceLicense": "Generated output subject to recorded model terms", + "modelTerms": [ + "prs-eth/marigold-depth-lcm-v1-0@04a73502f7fd8fc5e59947b9df3b2266d71d6849: Apache-2.0 publisher model declaration; https://huggingface.co/prs-eth/marigold-depth-lcm-v1-0/tree/04a73502f7fd8fc5e59947b9df3b2266d71d6849" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "prs-eth/marigold-depth-lcm-v1-0@04a73502f7fd8fc5e59947b9df3b2266d71d6849 — https://huggingface.co/prs-eth/marigold-depth-lcm-v1-0/tree/04a73502f7fd8fc5e59947b9df3b2266d71d6849" + ], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-19", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "e604b0284a57b65b20343c7776511ae15bef922c7e104c09f0f6931eec610d2d", + "publicationBasis": "Activate and publish the two approved Gallery candidates using their retained native runs.", + "provenanceTemplateId": "marigold_depth_synthetic_ramp" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", + "sourceUrl": "https://huggingface.co/MiniMaxAI/MiniMax-Music3/tree/fbdf52fbaaca799592917417eb05f1899f1255ec", + "sourceRevision": "MiniMaxAI/MiniMax-Music3@fbdf52fbaaca799592917417eb05f1899f1255ec", + "sourceLicense": "Generated media; retained model and output terms apply", + "modelTerms": [ + "MiniMaxAI/MiniMax-Music3: MiniMax-Music3 Community License and Acceptable Use Policy; https://huggingface.co/MiniMaxAI/MiniMax-Music3/tree/fbdf52fbaaca799592917417eb05f1899f1255ec" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": ["AI-generated music — MiniMax-Music3"], + "assetLicense": "Apache-2.0", + "publisherLicenseUrl": "https://huggingface.co/MiniMaxAI/MiniMax-Music3/blob/fbdf52fbaaca799592917417eb05f1899f1255ec/LICENSE", + "path": "template-gallery/minimax_music3_chamber_pop.wav", + "sha256": "sha256:bytes:f98a748584966f463bbac263c2b3a00769c70e074e26b2f91567e76381b7fd6b", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "minimax_music3_chamber_pop" + }, + { + "path": "template-gallery/mochi_surf_over_dark_pebbles.mp4", + "sha256": "sha256:bytes:2462a31378c7108fa7c46143a89630798d8450f2d75f6e7ea4aa24f1621f2ce1", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/genmo/mochi-1-preview/tree/14be5fcea23095ed330cb214647916a451e38b6e", + "sourceRevision": "genmo/mochi-1-preview@14be5fcea23095ed330cb214647916a451e38b6e", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/genmo/mochi-1-preview/tree/14be5fcea23095ed330cb214647916a451e38b6e" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "genmo/mochi-1-preview@14be5fcea23095ed330cb214647916a451e38b6e https://huggingface.co/genmo/mochi-1-preview/tree/14be5fcea23095ed330cb214647916a451e38b6e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "mochi_surf_over_dark_pebbles" + }, + { + "path": "template-gallery/ochre_paper_pavilion.webp", + "sha256": "sha256:bytes:6fd64eda0cd96aca0f5c9d860fec6fed090426ff1c5cd5c9434a639755c06c1e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/zai-org/CogView3-Plus-3B/tree/5d70e40732ac0efac98524c51a7fa9c82707f1e5", + "sourceRevision": "zai-org/CogView3-Plus-3B@5d70e40732ac0efac98524c51a7fa9c82707f1e5", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "apache-2.0. https://huggingface.co/zai-org/CogView3-Plus-3B/tree/5d70e40732ac0efac98524c51a7fa9c82707f1e5" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "zai-org/CogView3-Plus-3B@5d70e40732ac0efac98524c51a7fa9c82707f1e5 https://huggingface.co/zai-org/CogView3-Plus-3B/tree/5d70e40732ac0efac98524c51a7fa9c82707f1e5" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "ochre_paper_pavilion" + }, + { + "path": "template-gallery/omnigen_cobalt_against_soft_apricot.webp", + "sha256": "sha256:bytes:305c3d2b35bc57b3151a332bc6084cbdf962337572c5e15ae3d7d546a07a1ead", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268", + "sourceRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268 https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "omnigen_cobalt_against_soft_apricot" + }, + { + "path": "template-gallery/omnigen_red_enamel_folded_linen.webp", + "sha256": "sha256:bytes:443062a26e22e3542e284f50d0274b7c70b881b3cce76568eb8eb22ce4c396d6", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268", + "sourceRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268 https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "omnigen_red_enamel_folded_linen" + }, + { + "path": "template-gallery/omnigen_tulips_after_rain.webp", + "sha256": "sha256:bytes:57d5f196f4abad78099482deeb23f37810075e6d708e289ca8eb4617acdbdde7", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268", + "sourceRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268 https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "omnigen_tulips_after_rain" + }, + { + "path": "template-gallery/persimmon_glaze.webp", + "sha256": "sha256:bytes:0a8f757232720068dbf3ad94fa81e525c7e9d7260853680328019c43ded30279", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829", + "sourceRevision": "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "apache-2.0. https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829 https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "persimmon_glaze" + }, + { + "path": "template-gallery/pixart_sigma_pag_pink_mascot.webp", + "sha256": "sha256:bytes:3070a4858fe91e8567d36bfc706a6201690ccc27f341e5191be548c99f97c28c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207", + "sourceRevision": "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207 https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "efc64011c443b1678207c0dfd79e89def1c0dc3699668f058803e9044b4bd281", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "pixart_sigma_pag_pink_mascot" + }, + { + "path": "template-gallery/pixart_sigma_terracotta_herbs.webp", + "sha256": "sha256:bytes:97aac37be4286b29536fd415783ee91c3879822ea122c705a5573ba251ac1441", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207", + "sourceRevision": "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207 https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "efc64011c443b1678207c0dfd79e89def1c0dc3699668f058803e9044b4bd281", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "pixart_sigma_terracotta_herbs" + }, + { + "path": "template-gallery/pomegranate_on_blue_linen.webp", + "sha256": "sha256:bytes:ec62b729d1e4b37f37bd7fd8838b831ab10bd82662adc3a359a371cc7e756861", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "creativeml-openrail-m. https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "pomegranate_on_blue_linen" + }, + { + "path": "template-gallery/porcelain_on_slate_linen.webp", + "sha256": "sha256:bytes:78a0954f82ae30dcc721d9087a54f62063d8b9ded7204838864b1d981a1e763d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7/tree/a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5", + "sourceRevision": "SimianLuo/LCM_Dreamshaper_v7@a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "mit. https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7/tree/a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "SimianLuo/LCM_Dreamshaper_v7@a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5 https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7/tree/a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "porcelain_on_slate_linen" + }, + { + "path": "template-gallery/posters/spandrel_tram_shelter_video_2x.webp", + "sha256": "sha256:bytes:6ab0a30271cb628a0a9c50c6544c45ef82c9e2e84f436a8f68bd34e9da1c560e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "spandrel_tram_shelter_video_2x" + }, + { + "path": "template-gallery/posters/wan_a14b_cloudbreak_over_the_ridges.png", + "sha256": "sha256:bytes:c824b505dc5145519de68ecdd4eb3618f214bc8e3aa6a8fd8fada7433b1f509e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers/tree/5be7df9619b54f4e2667b2755bc6a756675b5cd7", + "sourceRevision": "Wan-AI/Wan2.2-T2V-A14B-Diffusers@5be7df9619b54f4e2667b2755bc6a756675b5cd7", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers/tree/5be7df9619b54f4e2667b2755bc6a756675b5cd7" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-T2V-A14B-Diffusers@5be7df9619b54f4e2667b2755bc6a756675b5cd7 https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers/tree/5be7df9619b54f4e2667b2755bc6a756675b5cd7" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_a14b_cloudbreak_over_the_ridges" + }, + { + "path": "template-gallery/posters/wan_ti2v_subway_musician.webp", + "sha256": "sha256:bytes:b035c7d59c603ff5c02ec1f1ea641241cf9e04698231f980903478957bcab40f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635", + "sourceRevision": "Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635 https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_ti2v_subway_musician" + }, + { + "path": "template-gallery/quiet_current.webp", + "sha256": "sha256:bytes:c4db3876adb54a5f2bb9449ab4865601a24c2b486440f5c04d939a42a7f299a4", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/zai-org/CogView4-6B/tree/63a52b7f6dace7033380cd6da14d0915eab3e6b5", + "sourceRevision": "zai-org/CogView4-6B@63a52b7f6dace7033380cd6da14d0915eab3e6b5", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "apache-2.0. https://huggingface.co/zai-org/CogView4-6B/tree/63a52b7f6dace7033380cd6da14d0915eab3e6b5" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "zai-org/CogView4-6B@63a52b7f6dace7033380cd6da14d0915eab3e6b5 https://huggingface.co/zai-org/CogView4-6B/tree/63a52b7f6dace7033380cd6da14d0915eab3e6b5" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "quiet_current" + }, + { + "path": "template-gallery/quiet_kiln_at_daybreak.webp", + "sha256": "sha256:bytes:3cbbe1b912086f3d97cbfd3e8ba4c077166d355b6ba0cf25a07441f2826aa6ab", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/NucleusAI/Nucleus-Image/tree/5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa", + "sourceRevision": "NucleusAI/Nucleus-Image@5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Apache-2.0 per the publisher at this revision. https://huggingface.co/NucleusAI/Nucleus-Image/tree/5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "NucleusAI/Nucleus-Image@5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa https://huggingface.co/NucleusAI/Nucleus-Image/tree/5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "quiet_kiln_at_daybreak" + }, + { + "path": "template-gallery/qwen_2511_pale_amber_on_limestone.webp", + "sha256": "sha256:bytes:126660eff58b75eed79a942adc24e76f731decd65f83db098e72298141531772", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceRevision": "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9 https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_2511_pale_amber_on_limestone" + }, + { + "path": "template-gallery/qwen_2511_terracotta_material_transfer.webp", + "sha256": "sha256:bytes:5bd01cc1777cf575cc9824f801059f5426960920dc8a2b0da03c0b8f0cbca51d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceRevision": "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9 https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_2511_terracotta_material_transfer" + }, + { + "path": "template-gallery/qwen_2512_cobalt_backdrop_repair.webp", + "sha256": "sha256:bytes:6b3a9c583a930c462ec1d484b71d26d97346862c2d4e4a25aa35c2062e3dfefe", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26 https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_2512_cobalt_backdrop_repair" + }, + { + "path": "template-gallery/qwen_bookshop_gouache.webp", + "sha256": "sha256:bytes:555bab08051dc3a0381747c207ed241be3afd54c5c6113a8b4abf04010960201", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26 https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_bookshop_gouache" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, with exact-file rights explicitly attested by the maintainer", + "creationMethod": "AI-generated native Qwen Edit character sheet using the existing approved synthetic portrait", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceLicense": "Original generated image; exact-file redistribution rights explicitly attested; see pinned model terms", + "modelTerms": [ + "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "sourceRightsAttestation": "I hold the rights needed to publish this exact generated angle sheet and its redacted technical/review records under Apache-2.0 in the existing MoDiff Gallery Dataset. The input is the existing approved synthetic character image; no external image inputs or real-person likeness references were used. The pinned Qwen model terms are retained.", + "path": "template-gallery/qwen_character_angles.webp", + "sha256": "sha256:bytes:4a3a001c82fb171de587b505ad269b493eceefa2c243b9c1b4d1a7205777c354", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-qwen-angle-native-image-registration", + "humanApprovalPacketSHA256": "9ca0bb197dbad8a2a27b25cef64aff67875aa6ea6f69fcb3bff581aae35b43d5", + "provenanceTemplateId": "qwen_character_angles" + }, + { + "path": "template-gallery/qwen_cobalt_on_charcoal_slate.webp", + "sha256": "sha256:bytes:3cf9cea1b23834ec9dd589b37335250885be163eb4257155d8e76a08583dade2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_cobalt_on_charcoal_slate" + }, + { + "path": "template-gallery/qwen_control_image_layout.webp", + "sha256": "sha256:bytes:8aea21cd03849912745c7bbc1a2ceabad27cf3649947c6fb08fd86a7eec16c17", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/InstantX/Qwen-Image-ControlNet-Union/tree/b13036f066d6dee7c20513e263d3d673055e9de8", + "sourceRevision": "InstantX/Qwen-Image-ControlNet-Union@b13036f066d6dee7c20513e263d3d673055e9de8 | Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "InstantX/Qwen-Image-ControlNet-Union: Apache-2.0; https://huggingface.co/InstantX/Qwen-Image-ControlNet-Union/tree/b13036f066d6dee7c20513e263d3d673055e9de8", + "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_control_image_layout", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "8aea21cd03849912745c7bbc1a2ceabad27cf3649947c6fb08fd86a7eec16c17", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/qwen_control_winter_cabin_blue_hour.webp", + "sha256": "sha256:bytes:d54f6087af42a8af4f676f49b7c25cfa93df29343ab5cb151d2dc95e5ecd2039", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26 https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_control_winter_cabin_blue_hour" + }, + { + "path": "template-gallery/qwen_edit_plus_single_image.webp", + "sha256": "sha256:bytes:be3f439416a3a4fe5647f032961908a3a4ac98c228cab0f7e13931e21d90e7de", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceRevision": "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_edit_plus_single_image", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "be3f439416a3a4fe5647f032961908a3a4ac98c228cab0f7e13931e21d90e7de", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/qwen_edit_strength_sweep.webp", + "sha256": "sha256:bytes:964eb0865b5f5e07434e604b427aa1d25f77e606eb6c6ea104c730e7e7d3ac62", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_edit_strength_sweep", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "964eb0865b5f5e07434e604b427aa1d25f77e606eb6c6ea104c730e7e7d3ac62", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/qwen_inpaint_mask_draft.webp", + "sha256": "sha256:bytes:fede5f1cd0f1b8a319eb5dee67377a989413ac7bf122df8dabd96415c7030908", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_inpaint_mask_draft", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "fede5f1cd0f1b8a319eb5dee67377a989413ac7bf122df8dabd96415c7030908", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/qwen_inpaint_object_replace.webp", + "sha256": "sha256:bytes:4537acd74aac196bbc1fdf2804ee273605c6d1d44cf08f62e7ecc2f5cf892e39", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_inpaint_object_replace", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "4537acd74aac196bbc1fdf2804ee273605c6d1d44cf08f62e7ecc2f5cf892e39", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to previously approved synthetic source rights and recorded model terms", + "creationMethod": "Native local AI-generated output or exact deterministic layer-sheet derivative; original approved bytes retained", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceLicense": "Generated output and approved synthetic input; retained model terms apply", + "modelTerms": [ + "Qwen/Qwen-Image-Layered: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "publicationBasis": "Existing maintainer publication authorization and current explicit instruction to register these three accepted assets; no new ownership or rights quotation is fabricated.", + "path": "template-gallery/qwen_layered_portrait.png", + "sha256": "sha256:bytes:bcad98e6acbe9ea500f722977a33b72953c3991170ce346bff1f3455803ab4d8", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", + "reviewedBy": "maintainer (current user)", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-native-three-registration", + "humanApprovalPacketSHA256": "69c6b3d9b0ea2fcca16ee538f6e75b414b7141658b74f10578758e61360f63fd", + "provenanceTemplateId": "qwen_layered_portrait" + }, + { + "path": "template-gallery/qwen_layered_sunset_and_peaks.png", + "sha256": "sha256:bytes:5ccb86b18bc5f8a1c18376c72a0236ba9235a4904fef1a9e4f459ac31e2ede2d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/Qwen/Qwen-Image-Layered/blob/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf/README.md" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "b16dfc2b7c1c32272b8f79bc1bffbb60376e63f8cf1ab9d0bdf9aea07cccf5cd", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_layered_sunset_and_peaks" + }, + { + "path": "template-gallery/qwen_logo_texture.webp", + "sha256": "sha256:bytes:c4afc3f779e03437a122845ee9f19d149e5a049f0cce7b076047a69f964bc416", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_logo_texture", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "c4afc3f779e03437a122845ee9f19d149e5a049f0cce7b076047a69f964bc416", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, with exact-file rights explicitly attested by the maintainer", + "creationMethod": "AI-generated prompt-only native Qwen-Image-2512 image", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "Original prompt-only generation; exact-file redistribution rights explicitly attested; see pinned model terms", + "modelTerms": [ + "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": ["TIDELINE: fictional cinema and event"], + "requiredAttribution": [], + "sourceRightsAttestation": "I hold the rights or permissions needed to publish this exact generated TIDELINE cinema image and its redacted technical/review records under Apache-2.0. The film event and cinema are fictional; no external image inputs or real-person likenesses were used.", + "path": "template-gallery/qwen_low_vram_poster_layout.webp", + "sha256": "sha256:bytes:65721301c3819ef40a48281f42c2f56c8ba129bb23545b3f20958d784be13e34", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-qwen-native-image-registration", + "humanApprovalPacketSHA256": "13cb57389a33fb689324c40827376b3ddfe0ade1dd033ffc8a0c51e749e44487", + "provenanceTemplateId": "qwen_low_vram_poster_layout" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, with exact-file rights explicitly attested by the maintainer", + "creationMethod": "AI-generated prompt-only native Qwen-Image-2512 image", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "Original prompt-only generation; exact-file redistribution rights explicitly attested; see pinned model terms", + "modelTerms": [ + "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": ["MICA DROP: fictional product name"], + "requiredAttribution": [], + "sourceRightsAttestation": "I approve this exact image as a reviewed concept with the stated design limitations and incomplete independent resource monitoring, without a fully guarded or hardware-qualification claim. I hold the rights or permissions needed to publish this generated MICA DROP image and its redacted technical/review metadata under Apache-2.0. The product is fictional in this example; no external image input or real-person likeness was used.", + "path": "template-gallery/qwen_low_vram_product_concept.webp", + "sha256": "sha256:bytes:6e8f94cdb1e1323607300f6c60d76dc467900a2d520db117cfc34a02c5beb4cf", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-qwen-native-image-registration", + "humanApprovalPacketSHA256": "3193ab9ed5834bddfafc5c6922bd0eaa60e27e5963ca52c740af7540c2847834", + "provenanceTemplateId": "qwen_low_vram_product_concept" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, with exact-file rights explicitly attested by the maintainer", + "creationMethod": "AI-generated prompt-only native Qwen-Image-2512 image", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "Original prompt-only generation; exact-file redistribution rights explicitly attested; see pinned model terms", + "modelTerms": [ + "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": ["KITE & ANVIL: fictional stationery brand"], + "requiredAttribution": [], + "sourceRightsAttestation": "I hold the rights or permissions needed to publish this exact generated KITE & ANVIL stationery image and its redacted technical/review metadata under Apache-2.0. The stationery brand is fictional in this example; no external image inputs or real-person likenesses were used.", + "path": "template-gallery/qwen_low_vram_text_rendering.webp", + "sha256": "sha256:bytes:884e21aefe6fecfe7015de8382d8dfac06ce5f92ce53c317c596e544d8f4edd4", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-qwen-native-image-registration", + "humanApprovalPacketSHA256": "3193ab9ed5834bddfafc5c6922bd0eaa60e27e5963ca52c740af7540c2847834", + "provenanceTemplateId": "qwen_low_vram_text_rendering" + }, + { + "path": "template-gallery/qwen_multi_reference_product.webp", + "sha256": "sha256:bytes:c0377035121c03214e54df360f380f531a700efdf17a9e2f3d732dc18244e846", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_multi_reference_product", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "c0377035121c03214e54df360f380f531a700efdf17a9e2f3d732dc18244e846", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Native MoDiff image generation or editing for qwen_outpaint_aspect_template", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceLicense": "Maintainer-approved generated output. The selected models and adapters have separate pinned terms.", + "modelTerms": [ + "Apache-2.0 as declared in the pinned model card · https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "sourceRightsAttestation": "The maintainer approved the exact reviewed asset in the Gallery review and requested its registration.", + "path": "template-gallery/qwen_outpaint_aspect_template.webp", + "sha256": "sha256:bytes:d9ccf1960420a487ce16258167a88c7f4eb103fb24444ea0ad997487d1061554", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3", + "provenanceTemplateId": "qwen_outpaint_aspect_template" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Native MoDiff image generation or editing for qwen_outpaint_draft", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceLicense": "Maintainer-approved generated output. The selected models and adapters have separate pinned terms.", + "modelTerms": [ + "Apache-2.0 as declared in the pinned model card · https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "sourceRightsAttestation": "The maintainer approved the exact reviewed asset in the Gallery review and requested its registration.", + "path": "template-gallery/qwen_outpaint_draft.webp", + "sha256": "sha256:bytes:dfa97dd6b2acbe53b05814a1d6d525ca3fdddb2d1dbe000b3dab7fa1ed5feb6a", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3", + "provenanceTemplateId": "qwen_outpaint_draft" + }, + { + "path": "template-gallery/qwen_packaging_dieline.webp", + "sha256": "sha256:bytes:1418c030b8efa5c033b3da9e07a62cc93446b6793c92ea7a707a8dac44820b6d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/InstantX/Qwen-Image-ControlNet-Union/tree/b13036f066d6dee7c20513e263d3d673055e9de8", + "sourceRevision": "InstantX/Qwen-Image-ControlNet-Union@b13036f066d6dee7c20513e263d3d673055e9de8 | Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "InstantX/Qwen-Image-ControlNet-Union: Apache-2.0; https://huggingface.co/InstantX/Qwen-Image-ControlNet-Union/tree/b13036f066d6dee7c20513e263d3d673055e9de8", + "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_packaging_dieline", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "1418c030b8efa5c033b3da9e07a62cc93446b6793c92ea7a707a8dac44820b6d", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, with exact-file rights explicitly attested by the maintainer", + "creationMethod": "AI-generated prompt-only native Qwen-Image-2512 image", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "Original prompt-only generation; exact-file redistribution rights explicitly attested; see pinned model terms", + "modelTerms": [ + "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": ["MATERIAL CULTURE: fictional exhibition title"], + "requiredAttribution": [], + "sourceRightsAttestation": "I hold the rights or permissions needed to publish this exact generated MATERIAL CULTURE exhibition poster and its redacted technical/review metadata under Apache-2.0. The exhibition is fictional in this example; no external image inputs or real-person likenesses were used.", + "path": "template-gallery/qwen_poster_logo_text.webp", + "sha256": "sha256:bytes:0224a184cf3ea0338e4dc51a16b867d39ee84936471cd13c0deeb0f53cfd59b0", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-qwen-native-image-registration", + "humanApprovalPacketSHA256": "fb90296fc1789e995652389997b3295a3b6d7424f449251539c63546c081e108", + "provenanceTemplateId": "qwen_poster_logo_text" + }, + { + "path": "template-gallery/qwen_product_ad_composite.webp", + "sha256": "sha256:bytes:0bc45b6953d46b6553f549a01c39f8ce15d92472d0c855d60e52a8c74dfd4f5e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_product_ad_composite", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "0bc45b6953d46b6553f549a01c39f8ce15d92472d0c855d60e52a8c74dfd4f5e", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, with exact-file rights explicitly attested by the maintainer", + "creationMethod": "AI-generated prompt-only native Qwen-Image-2512 image", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "Original prompt-only generation; exact-file redistribution rights explicitly attested; see pinned model terms", + "modelTerms": [ + "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [ + "ASTERMIST: fictional product name; generated registered symbol does not establish trademark registration" + ], + "requiredAttribution": [], + "sourceRightsAttestation": "I hold the rights or permissions needed to publish this exact generated ASTERMIST spray image, including its model-invented registered symbol, and its redacted technical/review metadata under Apache-2.0. ASTERMIST is fictional in this example; no registration, external image inputs or real-person likenesses are claimed.", + "path": "template-gallery/qwen_product_mockup.webp", + "sha256": "sha256:bytes:e0b112ee6bfec8be80815aac40618440d9b08d707e11446aeafc11d1b2b3c1c8", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-qwen-native-image-registration", + "humanApprovalPacketSHA256": "fb90296fc1789e995652389997b3295a3b6d7424f449251539c63546c081e108", + "provenanceTemplateId": "qwen_product_mockup" + }, + { + "path": "template-gallery/qwen_product_relight.webp", + "sha256": "sha256:bytes:927824741931202a42d711f671723ee5b44353afb8741ed4f279dc7ee2e5dc5c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_product_relight", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "927824741931202a42d711f671723ee5b44353afb8741ed4f279dc7ee2e5dc5c", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, with exact-file rights explicitly attested by the maintainer", + "creationMethod": "AI-generated prompt-only native Qwen-Image-2512 exact-text poster", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "Original prompt-only generation; exact-file redistribution rights explicitly attested; see pinned model terms", + "modelTerms": [ + "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": ["VERDA 03: fictional product name in this generated example"], + "requiredAttribution": [], + "sourceRightsAttestation": "I hold the rights or permissions needed to publicly redistribute this exact generated VERDA 03 poster and its redacted technical and quality metadata under Apache-2.0. VERDA 03 is a fictional product name in this example; no external image inputs or real-person likenesses were used.", + "path": "template-gallery/qwen_text_rendering.webp", + "sha256": "sha256:bytes:3ea86ebec84418b15a11c7ba0ee3a9e8ef1c0053e62ebdab5c9bb3beb7bae873", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-qwen-exact-text-registration", + "humanApprovalPacketSHA256": "a000a897c1a4ae5980d2f50e5e88a2affb992e403dbd6df9d3ebbd5de5db4891", + "provenanceTemplateId": "qwen_text_rendering" + }, + { + "path": "template-gallery/qwen_tile_extract.webp", + "sha256": "sha256:bytes:1b6523e040e6895af885ff53a1033a3caeeb18a4615788ed385a8f061eef6465", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Qwen/Qwen-Image-Edit: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_tile_extract", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "1b6523e040e6895af885ff53a1033a3caeeb18a4615788ed385a8f061eef6465", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, with exact-file rights explicitly attested by the maintainer", + "creationMethod": "AI-generated native Qwen image; the final image uses the pinned Spandrel RealESRGAN upscale and the comparison is the genuine same-task base export", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "Original generated image; exact-file redistribution rights explicitly attested; see pinned model terms", + "modelTerms": [ + "Qwen/Qwen-Image-2512: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "amd/realesrgan-x4plus: BSD-3-Clause; https://huggingface.co/amd/realesrgan-x4plus/tree/bda69abcaf525425b371622349e975245ae090c2" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "sourceRightsAttestation": "I hold the rights needed to publish this exact final 2048 image, its genuine 1024 before-upscale image, and redacted technical/review records under Apache-2.0 in the existing MoDiff Gallery Dataset. No external image inputs or real-person likeness references were used; pinned Qwen Apache-2.0 and RealESRGAN BSD-3-Clause model terms are retained.", + "path": "template-gallery/qwen_upscale_finish.webp", + "sha256": "sha256:bytes:44fcaf1af605d6db76060cc2c6511b9a3a1e9cc2e0b8875f5aed295e5b1db6da", + "publishDecision": "approved", + "holdReason": null, + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-qwen-expert-upscale-registration", + "humanApprovalPacketSHA256": "f0167419381c0d2a1a1bcd43d2465a0ad728c294a2d91bbe1c6b090a915c2c98", + "provenanceTemplateId": "qwen_upscale_finish" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/recipes/ace_step_audio_variation.v1.json", + "sha256": "sha256:bytes:f6e8868f1b1990ae8f45c336edd77d47b837e9e4b313232f166628f6b0e4acb0", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "ace_step_audio_variation" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/recipes/ace_step_audio_variation.v2.json", + "sha256": "sha256:bytes:f3edd6c987c5ded9cfb03e713a12ea38f4981d15dadc94d8db4c63d25c427f3a", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "ace_step_audio_variation" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for two maintainer-accepted native replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/recipes/ace_step_lyric_music_video.accepted-20261115.json", + "sha256": "sha256:bytes:6764457ab58b9b8c2a289a3912f336f01b10f5bfca1bd11d9bea27ec507bc667", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", + "provenanceTemplateId": "ace_step_lyric_music_video" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for two maintainer-accepted native replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/recipes/ace_step_lyric_music_video.inputs-20261115.json", + "sha256": "sha256:bytes:5bd98a0e2e48c331efb732fac1140d47c6f4272419999b6d0e0ee78a5fa99bbb", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", + "provenanceTemplateId": "ace_step_lyric_music_video" + }, + { + "path": "template-gallery/recipes/flux_kontext_multi_reference.v1.json", + "sha256": "sha256:bytes:38697d00973bb332113175f8671f8a4dfb3ee08ff2c498f83968a35c518fcf09", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical, review, input-binding or retained recipe metadata for three maintainer-accepted assets", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media model terms are retained separately", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "maintainer (current user)", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-native-three-registration", + "humanApprovalPacketSHA256": "69c6b3d9b0ea2fcca16ee538f6e75b414b7141658b74f10578758e61360f63fd", + "humanApprovalScope": "The maintainer explicitly approved the proposed 4/5 scores, known limits, exact retained Klein two-reference derivative output, its redacted technical/quality metadata, and permission to make and redistribute this derivative under Apache-2.0. Existing source images and their mixed license records remain unchanged; no other assets or held cases are newly approved.", + "provenanceTemplateId": "flux_kontext_multi_reference" + }, + { + "path": "template-gallery/recipes/flux_kontext_multi_reference.v2.json", + "sha256": "sha256:bytes:44eb1ccfef00a503e210d2ec908ba4156900f973cf79097d9d089b7508e5b937", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical, review, input-binding or retained recipe metadata for three maintainer-accepted assets", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media model terms are retained separately", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "maintainer (current user)", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-native-three-registration", + "humanApprovalPacketSHA256": "69c6b3d9b0ea2fcca16ee538f6e75b414b7141658b74f10578758e61360f63fd", + "humanApprovalScope": "The maintainer explicitly approved the proposed 4/5 scores, known limits, exact retained Klein two-reference derivative output, its redacted technical/quality metadata, and permission to make and redistribute this derivative under Apache-2.0. Existing source images and their mixed license records remain unchanged; no other assets or held cases are newly approved.", + "provenanceTemplateId": "flux_kontext_multi_reference" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/recipes/flux_lora_cinematic_octane_3d.v2.json", + "sha256": "sha256:bytes:3a351220f925b9bd2651f944804cb3758057d88ae6262e8435793ff1b3f2dec8", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "flux_lora_cinematic_octane_3d" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/recipes/flux_redux_edit.v1.json", + "sha256": "sha256:bytes:bf1c6726baec3572b2cbbddc9c09f4bd84d13476209db5e2ee638848e122b673", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "flux_redux_edit" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/recipes/flux_redux_edit.v2.json", + "sha256": "sha256:bytes:f7abf4561990b1d1fa83c65253eee8752dd7b9b8e9439cfe8f7912891429f263", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "flux_redux_edit" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for two maintainer-accepted native replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/recipes/flux_redux_multi_reference.accepted-20261115.json", + "sha256": "sha256:bytes:bf59cee1809a664b6b8c94dc47c21ef3c43b2562d6857d5a1786845ad3071dbe", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", + "provenanceTemplateId": "flux_redux_multi_reference" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/recipes/ltx_video_animated_story.native-20261115.json", + "sha256": "sha256:bytes:a9b841a1a155441e2d9e224fc7cd09c27840702f7dfc9c9f8655df46e200dd0f", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "ltx_video_animated_story" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/recipes/ltx_video_long_showcase.native-20261115.json", + "sha256": "sha256:bytes:a5885f61526e138f6c4a8a364f1b400cbeceb342db4d8ed0ff3cecf6a58ae3c8", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "ltx_video_long_showcase" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/recipes/ltx_video_video_to_video.v1.json", + "sha256": "sha256:bytes:f83109ce73e45a5656056ed71ae8b6dcda302f2d0c976a01d91954298fa01c9d", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "ltx_video_video_to_video" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/recipes/ltx_video_video_to_video.v2.json", + "sha256": "sha256:bytes:c6d4f4541870e99870cda26b52f410f6019474ebe65b14221528121f90561c65", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "ltx_video_video_to_video" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/recipes/minimax_music3_chamber_pop.v2.json", + "sha256": "sha256:bytes:bf5cfe8e8d0f01e9b87e681841496bbb3c6582f77d9744c400c3895b50fa23aa", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "minimax_music3_chamber_pop" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/recipes/wan_vace_cinematic_text_to_video.native-20261115.json", + "sha256": "sha256:bytes:e9d58fc801611410b05c2ebcd4fdd279f0fc34cb64339806f7b71d95ed1cd61b", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_cinematic_text_to_video" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/recipes/wan_vace_grayscale_control.native-20261115.json", + "sha256": "sha256:bytes:0fcf4b5c9de98f033f0c8164eb72d1bff452797deaaba56be247372bdf578ed4", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_grayscale_control" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/recipes/wan_vace_outpaint_reframe.native-20261115.json", + "sha256": "sha256:bytes:447d4ec31e3650bda447a796ef399e743e782c66e4e81340d3747b1175c5aac4", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_outpaint_reframe" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/recipes/wan_vace_video_color_grade.native-20261115.json", + "sha256": "sha256:bytes:698f7323acf85d3742d5e944776879a07e7a7e5574a38eb6e91950c5dcddbfc3", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_video_color_grade" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/recipes/wan_vace_video_to_video.native-20261115.json", + "sha256": "sha256:bytes:33f855f3e17faaf2706294b7ed567f7f84ecaa39d62a41452077ffba45e4d5ca", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_video_to_video" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/recipes/wan_video_long_showcase.v2.json", + "sha256": "sha256:bytes:043dd704245e919f6359a944b50f37e770406b47b07bd2f2378cbd09143b5f46", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "wan_video_long_showcase" + }, + { + "path": "template-gallery/reference_fusion.webp", + "sha256": "sha256:bytes:fcce19c98e3931e5b15de0b7deee704fff89276b3dabbef53de49c73cf08c155", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Maintainer-accepted native MoDiff output or its deterministic Gallery preview", + "sourceUrl": "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "sourceRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "lightx2v/Qwen-Image-Edit-2511-Lightning: Apache-2.0; https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/tree/d74eba145674fd7e31b949324e148e21e7118abd", + "Qwen/Qwen-Image-Edit-2511: Apache-2.0; https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "reference_fusion", + "sourceRightsAttestation": "The maintainer accepted the exact review-gallery asset and expressly requested its registration.", + "acceptedOutputSHA256": "fcce19c98e3931e5b15de0b7deee704fff89276b3dabbef53de49c73cf08c155", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/restoring_the_studio_backdrop.webp", + "sha256": "sha256:bytes:c17be5dd41fc9ee16e58d287503e5daf9507ee1536f9ba9db63182af1e74f693", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": ["CreativeML Open RAIL-M at the pinned Stable Diffusion v1.5 revision."], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "restoring_the_studio_backdrop" + }, + { + "path": "template-gallery/reviews/ace_step_audio_continuation.quality-review.json", + "sha256": "sha256:bytes:71d0e561ba26674f54c4ee09894578414a39ab55596afa74b847c915bbb09cfb", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-accepted-registration", + "provenanceTemplateId": "ace_step_audio_continuation" + }, + { + "path": "template-gallery/reviews/ace_step_audio_continuation.reviewed-provenance.json", + "sha256": "sha256:bytes:1a6dff893fa8e715bff7c939fa196b6f352fe453d30daa888dbfd3d0d1af3314", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-accepted-registration", + "provenanceTemplateId": "ace_step_audio_continuation" + }, + { + "path": "template-gallery/reviews/ace_step_audio_repaint.quality-review.json", + "sha256": "sha256:bytes:d2da911efe18959b70b2d7e9ae21c841edcaabf7e7b5df8022a46e900eab06e3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "ace_step_audio_repaint", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/reviews/ace_step_audio_repaint.reviewed-provenance.json", + "sha256": "sha256:bytes:c1204284a3e29dd12a124e56c30e8f42ed7a61352ae85ecab5157cbc34ce4ed1", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "ace_step_audio_repaint", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/ace_step_audio_variation.quality-review.json", + "sha256": "sha256:bytes:10b071cd644d24c32029c89dfb2401bc9bb195e9ba928cd6e62303055b6ff032", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "ace_step_audio_variation" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/ace_step_audio_variation.reviewed-provenance.json", + "sha256": "sha256:bytes:d743875e83f219845db75512205f034b1f8de9e680c72d9766bfd7b2e78d2b25", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "ace_step_audio_variation" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for two maintainer-accepted native replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/ace_step_lyric_music_video.quality-review.json", + "sha256": "sha256:bytes:9cddab829fa0930e41283d50058e3226f72ae8c49cca2272c89f8ed25785ea1a", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", + "provenanceTemplateId": "ace_step_lyric_music_video" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for two maintainer-accepted native replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/ace_step_lyric_music_video.reviewed-provenance.json", + "sha256": "sha256:bytes:2b945109bd2623d85e91667d4c4aa77aeddb19db1ac152493e12ac951a79f49a", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", + "provenanceTemplateId": "ace_step_lyric_music_video" + }, + { + "path": "template-gallery/reviews/ace_step_text_to_audio.quality-review.json", + "sha256": "sha256:bytes:5e226af4594ba376023fbc2768f6b019cd846e0ac7fd51015d2c54c0dc723b6b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-accepted-registration", + "provenanceTemplateId": "ace_step_text_to_audio" + }, + { + "path": "template-gallery/reviews/ace_step_text_to_audio.reviewed-provenance.json", + "sha256": "sha256:bytes:4b79e1e6ff29b9d54de6b4e8731e5d9dd268f67b0a5180fa39029cb5cb71826f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-accepted-registration", + "provenanceTemplateId": "ace_step_text_to_audio" + }, + { + "path": "template-gallery/reviews/allegro_basalt_shore_at_dawn.original-provenance.json", + "sha256": "sha256:bytes:a2996998d545c63c8b494e783fe57caa254f36dc961a70e708b28e03550bccac", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/rhymes-ai/Allegro/tree/c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6", + "sourceRevision": "rhymes-ai/Allegro@c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/rhymes-ai/Allegro/tree/c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "rhymes-ai/Allegro@c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6 https://huggingface.co/rhymes-ai/Allegro/tree/c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "allegro_basalt_shore_at_dawn" + }, + { + "path": "template-gallery/reviews/allegro_basalt_shore_at_dawn.original-review.json", + "sha256": "sha256:bytes:0b000fdf57c52d56adac605a0f840128da2c78e62aafc58fc3c441800196c747", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/rhymes-ai/Allegro/tree/c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6", + "sourceRevision": "rhymes-ai/Allegro@c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/rhymes-ai/Allegro/tree/c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "rhymes-ai/Allegro@c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6 https://huggingface.co/rhymes-ai/Allegro/tree/c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "allegro_basalt_shore_at_dawn" + }, + { + "path": "template-gallery/reviews/allegro_basalt_shore_at_dawn.quality-review.json", + "sha256": "sha256:bytes:e5da20def6cd0d5058ff1088fa23538fc24d20f454aaf8e426550e07ebe1b0fa", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/rhymes-ai/Allegro/tree/c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6", + "sourceRevision": "rhymes-ai/Allegro@c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/rhymes-ai/Allegro/tree/c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "rhymes-ai/Allegro@c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6 https://huggingface.co/rhymes-ai/Allegro/tree/c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "allegro_basalt_shore_at_dawn" + }, + { + "path": "template-gallery/reviews/allegro_basalt_shore_at_dawn.retained-template-provenance.json", + "sha256": "sha256:bytes:6057e4c649904336d8f2062637440260e4cadffe99e84d251d9e72427957f0f5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/rhymes-ai/Allegro/tree/c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6", + "sourceRevision": "rhymes-ai/Allegro@c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/rhymes-ai/Allegro/tree/c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "rhymes-ai/Allegro@c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6 https://huggingface.co/rhymes-ai/Allegro/tree/c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "allegro_basalt_shore_at_dawn" + }, + { + "path": "template-gallery/reviews/alpine_lake_in_oils.original-provenance.json", + "sha256": "sha256:bytes:9c9ff8e4bae92b7e4564fdc203a36a2cb625489c7b0ca9474ce9979f7bd2d519", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "creativeml-openrail-m. https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "alpine_lake_in_oils" + }, + { + "path": "template-gallery/reviews/alpine_lake_in_oils.original-review.json", + "sha256": "sha256:bytes:9535ffb383b57c57805ca9ad24a1df06ec87fe005d821448727de9c04709a2bd", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "creativeml-openrail-m. https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "alpine_lake_in_oils" + }, + { + "path": "template-gallery/reviews/alpine_lake_in_oils.quality-review.json", + "sha256": "sha256:bytes:ca7c2fd6b10e3f100c7aff867aceb300f4fc93c5d4c3c93919fdf810fdf077b3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "creativeml-openrail-m. https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "alpine_lake_in_oils" + }, + { + "path": "template-gallery/reviews/alpine_lake_in_oils.retained-template-provenance.json", + "sha256": "sha256:bytes:c268ddbea9ba90fcf556ac9afdcc6b290e103883c5c7e9b5b91a1312f0c4eacb", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "creativeml-openrail-m. https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "alpine_lake_in_oils" + }, + { + "path": "template-gallery/reviews/animatediff_candlelight_behind_amber_glass.original-provenance.json", + "sha256": "sha256:bytes:79862c74ca64222731ff6a86973283b578d12ebc72b6fa1e271177e9dcb814aa", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_candlelight_behind_amber_glass" + }, + { + "path": "template-gallery/reviews/animatediff_candlelight_behind_amber_glass.original-review.json", + "sha256": "sha256:bytes:2cb4965c1c1a39eb2a1dcfc0609065b4db61c0b2360663744d4d0e600c9d087f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_candlelight_behind_amber_glass" + }, + { + "path": "template-gallery/reviews/animatediff_candlelight_behind_amber_glass.quality-review.json", + "sha256": "sha256:bytes:38711644268110700dffed84439a0ab8e5f35003b9823fc4b34dd1751291d4a1", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_candlelight_behind_amber_glass" + }, + { + "path": "template-gallery/reviews/animatediff_candlelight_behind_amber_glass.retained-template-provenance.json", + "sha256": "sha256:bytes:2ddc8e7e5616f8a222d9bebe0fab488e4fce11c1e2be03e9ba40d6153050763b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_candlelight_behind_amber_glass" + }, + { + "path": "template-gallery/reviews/animatediff_ivory_balloon_blue_mountains.original-provenance.json", + "sha256": "sha256:bytes:714874a82ef9979fbe7ec94fda08ba641db4264fcdfacd4008ec385bfcf30452", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_ivory_balloon_blue_mountains" + }, + { + "path": "template-gallery/reviews/animatediff_ivory_balloon_blue_mountains.original-review.json", + "sha256": "sha256:bytes:68c41e118c91f05d7d44d2f89d17bbe08e4f0081d7b03d4c7c56cb1f61bd117a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_ivory_balloon_blue_mountains" + }, + { + "path": "template-gallery/reviews/animatediff_ivory_balloon_blue_mountains.quality-review.json", + "sha256": "sha256:bytes:1b02ea17ec15c71c00c0092566a6eca31887f1f0064f59e58041f008a48ed7a4", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_ivory_balloon_blue_mountains" + }, + { + "path": "template-gallery/reviews/animatediff_ivory_balloon_blue_mountains.retained-template-provenance.json", + "sha256": "sha256:bytes:298df24429b6a944e33aa796bf1214547b6ce84f454b4b844c5d0a06492aa042", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_ivory_balloon_blue_mountains" + }, + { + "path": "template-gallery/reviews/animatediff_pag_snowmelt_over_river_stones.original-provenance.json", + "sha256": "sha256:bytes:73a4c1a10f0a30ae90014daf6f8d7c113138636fe1b533efe7bb1aa9a8fe4a7f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/guoyww/animatediff-motion-adapter-v1-5-2/tree/6167b88ffe39b4441fdf2113e77b99a6f56b7906", + "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_pag_snowmelt_over_river_stones" + }, + { + "path": "template-gallery/reviews/animatediff_pag_snowmelt_over_river_stones.original-review.json", + "sha256": "sha256:bytes:19924850a8ecddec18e16ebe09af4050343b542b56bc5e5acd30e18976c8e6f9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/guoyww/animatediff-motion-adapter-v1-5-2/tree/6167b88ffe39b4441fdf2113e77b99a6f56b7906", + "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_pag_snowmelt_over_river_stones" + }, + { + "path": "template-gallery/reviews/animatediff_pag_snowmelt_over_river_stones.quality-review.json", + "sha256": "sha256:bytes:278a3dd1683bbe793b8a0ba89d857cc3b2a46262b489f0dcc3e985188c5ffaf6", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/guoyww/animatediff-motion-adapter-v1-5-2/tree/6167b88ffe39b4441fdf2113e77b99a6f56b7906", + "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_pag_snowmelt_over_river_stones" + }, + { + "path": "template-gallery/reviews/animatediff_pag_snowmelt_over_river_stones.retained-template-provenance.json", + "sha256": "sha256:bytes:9c3ffb884931cb7445f67de31986283eba87d34a67fcbd4212a17a48f324d46a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/guoyww/animatediff-motion-adapter-v1-5-2/tree/6167b88ffe39b4441fdf2113e77b99a6f56b7906", + "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_pag_snowmelt_over_river_stones" + }, + { + "path": "template-gallery/reviews/animatediff_red_tram_in_watercolor.original-provenance.json", + "sha256": "sha256:bytes:e7a460bbb4657cda566f0c90b57d820aa0000785df2737e2ad7777296897f8a4", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_red_tram_in_watercolor" + }, + { + "path": "template-gallery/reviews/animatediff_red_tram_in_watercolor.original-review.json", + "sha256": "sha256:bytes:5cc5387ab876b37c77b2f5885b7c2fc8948c048faee40d0a3748d670c7d46d9d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_red_tram_in_watercolor" + }, + { + "path": "template-gallery/reviews/animatediff_red_tram_in_watercolor.quality-review.json", + "sha256": "sha256:bytes:3828845174e5702fe4a393a86bc6e7b5847f1c8639b23800d61c6e3633183261", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_red_tram_in_watercolor" + }, + { + "path": "template-gallery/reviews/animatediff_red_tram_in_watercolor.retained-template-provenance.json", + "sha256": "sha256:bytes:137902583abc832020f92f256050bc44104f0762360f470138e654746d278b59", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_red_tram_in_watercolor" + }, + { + "path": "template-gallery/reviews/animatediff_red_tram_through_snow.original-provenance.json", + "sha256": "sha256:bytes:b5198902e667bfa48b915027b301a3150ec994c44b132213c3c855b24e3f08f8", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_red_tram_through_snow" + }, + { + "path": "template-gallery/reviews/animatediff_red_tram_through_snow.original-review.json", + "sha256": "sha256:bytes:eef73b832d4acfb53ca4d5ededbd580821d8d91ffb372fcdcfb55f5f469f33cc", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_red_tram_through_snow" + }, + { + "path": "template-gallery/reviews/animatediff_red_tram_through_snow.quality-review.json", + "sha256": "sha256:bytes:c5c55e2d2ac7cbb65ef5ed89611da7b51b57ed5ed52d110fb324fe772eae6a0d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_red_tram_through_snow" + }, + { + "path": "template-gallery/reviews/animatediff_red_tram_through_snow.retained-template-provenance.json", + "sha256": "sha256:bytes:aa34be488b31fd42a12a1db6ff4c0b0ba2ec653439f4a62011698aeb46b71baa", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatediff_red_tram_through_snow" + }, + { + "path": "template-gallery/reviews/animatelcm_sunlit_surf.original-provenance.json", + "sha256": "sha256:bytes:ccbd715d022d2d0121c473a75ad2f06c9a1dbb782b43b5c626726b6df2888ded", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "https://huggingface.co/wangfuyun/AnimateLCM/tree/3d4d00fc113225e1040f4d3bec504b6ec750c10c" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatelcm_sunlit_surf" + }, + { + "path": "template-gallery/reviews/animatelcm_sunlit_surf.original-review.json", + "sha256": "sha256:bytes:273d0f2980b99943ead3cee2ce02a3cb67414cdd3ee3d258f555d168757ec1c8", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "https://huggingface.co/wangfuyun/AnimateLCM/tree/3d4d00fc113225e1040f4d3bec504b6ec750c10c" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatelcm_sunlit_surf" + }, + { + "path": "template-gallery/reviews/animatelcm_sunlit_surf.quality-review.json", + "sha256": "sha256:bytes:491737730d41fb96fb03a8f220ba78248c72619a34be55a8cc64111d822b913b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "https://huggingface.co/wangfuyun/AnimateLCM/tree/3d4d00fc113225e1040f4d3bec504b6ec750c10c" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatelcm_sunlit_surf" + }, + { + "path": "template-gallery/reviews/animatelcm_sunlit_surf.retained-template-provenance.json", + "sha256": "sha256:bytes:0d7bf5194255e03658f6934d1be023dbf4ee556c39b4ff2ad54c10f2e8da3ede", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "https://huggingface.co/wangfuyun/AnimateLCM/tree/3d4d00fc113225e1040f4d3bec504b6ec750c10c" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "animatelcm_sunlit_surf" + }, + { + "path": "template-gallery/reviews/audioldm2_wind_through_high_pines.original-provenance.json", + "sha256": "sha256:bytes:d61c68aaeec091d060e4c9bd260ffe885326826db71078e904acacac42ea3c40", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/cvssp/audioldm2/tree/c8e7e189d324425c05c4c2f81214041ef4107983", + "sourceRevision": "cvssp/audioldm2@c8e7e189d324425c05c4c2f81214041ef4107983", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/cvssp/audioldm2/blob/c8e7e189d324425c05c4c2f81214041ef4107983/README.md"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "cvssp/audioldm2@c8e7e189d324425c05c4c2f81214041ef4107983 https://huggingface.co/cvssp/audioldm2/tree/c8e7e189d324425c05c4c2f81214041ef4107983" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c897ae58c52588da56b92e22d8b3c6b7d9becac539057047f38e1303230949da", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "audioldm2_wind_through_high_pines" + }, + { + "path": "template-gallery/reviews/audioldm2_wind_through_high_pines.original-review.json", + "sha256": "sha256:bytes:429e7cac396b1c29e7348015a777e3ab85483813d80cc6a3e1e5400d34f6f0f4", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/cvssp/audioldm2/tree/c8e7e189d324425c05c4c2f81214041ef4107983", + "sourceRevision": "cvssp/audioldm2@c8e7e189d324425c05c4c2f81214041ef4107983", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/cvssp/audioldm2/blob/c8e7e189d324425c05c4c2f81214041ef4107983/README.md"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "cvssp/audioldm2@c8e7e189d324425c05c4c2f81214041ef4107983 https://huggingface.co/cvssp/audioldm2/tree/c8e7e189d324425c05c4c2f81214041ef4107983" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c897ae58c52588da56b92e22d8b3c6b7d9becac539057047f38e1303230949da", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "audioldm2_wind_through_high_pines" + }, + { + "path": "template-gallery/reviews/audioldm2_wind_through_high_pines.quality-review.json", + "sha256": "sha256:bytes:29dee8c7187cf2cd9b55070b86a8cdc9507df35ee0f69b63706c79f909273895", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/cvssp/audioldm2/tree/c8e7e189d324425c05c4c2f81214041ef4107983", + "sourceRevision": "cvssp/audioldm2@c8e7e189d324425c05c4c2f81214041ef4107983", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/cvssp/audioldm2/blob/c8e7e189d324425c05c4c2f81214041ef4107983/README.md"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "cvssp/audioldm2@c8e7e189d324425c05c4c2f81214041ef4107983 https://huggingface.co/cvssp/audioldm2/tree/c8e7e189d324425c05c4c2f81214041ef4107983" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c897ae58c52588da56b92e22d8b3c6b7d9becac539057047f38e1303230949da", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "audioldm2_wind_through_high_pines" + }, + { + "path": "template-gallery/reviews/audioldm2_wind_through_high_pines.retained-template-provenance.json", + "sha256": "sha256:bytes:58a23cef1b5f084fb1ebca4a74af2c8fb42b39adba46ff2d769944086b224c9f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/cvssp/audioldm2/tree/c8e7e189d324425c05c4c2f81214041ef4107983", + "sourceRevision": "cvssp/audioldm2@c8e7e189d324425c05c4c2f81214041ef4107983", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/cvssp/audioldm2/blob/c8e7e189d324425c05c4c2f81214041ef4107983/README.md"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "cvssp/audioldm2@c8e7e189d324425c05c4c2f81214041ef4107983 https://huggingface.co/cvssp/audioldm2/tree/c8e7e189d324425c05c4c2f81214041ef4107983" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c897ae58c52588da56b92e22d8b3c6b7d9becac539057047f38e1303230949da", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "audioldm2_wind_through_high_pines" + }, + { + "path": "template-gallery/reviews/bookshop_at_blue_hour.original-provenance.json", + "sha256": "sha256:bytes:3f3e4056350e5a1ee59d46aea727b87563ae6fc5fe11a491257e2af7d412f0bf", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/baidu/ERNIE-Image-Turbo/tree/bc68c81e2a1730a394d5fc9fae70713dee940140", + "sourceRevision": "baidu/ERNIE-Image-Turbo@bc68c81e2a1730a394d5fc9fae70713dee940140", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/baidu/ERNIE-Image-Turbo/tree/bc68c81e2a1730a394d5fc9fae70713dee940140" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "baidu/ERNIE-Image-Turbo@bc68c81e2a1730a394d5fc9fae70713dee940140 https://huggingface.co/baidu/ERNIE-Image-Turbo/tree/bc68c81e2a1730a394d5fc9fae70713dee940140" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "bookshop_at_blue_hour" + }, + { + "path": "template-gallery/reviews/bookshop_at_blue_hour.original-review.json", + "sha256": "sha256:bytes:26882cd197ba823799f50be6ea1c01098038ad3cee926a71edf7aa47038d7226", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/baidu/ERNIE-Image-Turbo/tree/bc68c81e2a1730a394d5fc9fae70713dee940140", + "sourceRevision": "baidu/ERNIE-Image-Turbo@bc68c81e2a1730a394d5fc9fae70713dee940140", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/baidu/ERNIE-Image-Turbo/tree/bc68c81e2a1730a394d5fc9fae70713dee940140" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "baidu/ERNIE-Image-Turbo@bc68c81e2a1730a394d5fc9fae70713dee940140 https://huggingface.co/baidu/ERNIE-Image-Turbo/tree/bc68c81e2a1730a394d5fc9fae70713dee940140" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "bookshop_at_blue_hour" + }, + { + "path": "template-gallery/reviews/bookshop_at_blue_hour.quality-review.json", + "sha256": "sha256:bytes:345c8dfefaa685385a016fcf545a50bf4d7554b07cee8c04f76efa270d830e4d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/baidu/ERNIE-Image-Turbo/tree/bc68c81e2a1730a394d5fc9fae70713dee940140", + "sourceRevision": "baidu/ERNIE-Image-Turbo@bc68c81e2a1730a394d5fc9fae70713dee940140", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/baidu/ERNIE-Image-Turbo/tree/bc68c81e2a1730a394d5fc9fae70713dee940140" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "baidu/ERNIE-Image-Turbo@bc68c81e2a1730a394d5fc9fae70713dee940140 https://huggingface.co/baidu/ERNIE-Image-Turbo/tree/bc68c81e2a1730a394d5fc9fae70713dee940140" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "bookshop_at_blue_hour" + }, + { + "path": "template-gallery/reviews/bookshop_at_blue_hour.retained-template-provenance.json", + "sha256": "sha256:bytes:47f8649c5c8bdf345ef71157478da39f55cccda4ef5e6a726bb4738c560de7d7", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/baidu/ERNIE-Image-Turbo/tree/bc68c81e2a1730a394d5fc9fae70713dee940140", + "sourceRevision": "baidu/ERNIE-Image-Turbo@bc68c81e2a1730a394d5fc9fae70713dee940140", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/baidu/ERNIE-Image-Turbo/tree/bc68c81e2a1730a394d5fc9fae70713dee940140" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "baidu/ERNIE-Image-Turbo@bc68c81e2a1730a394d5fc9fae70713dee940140 https://huggingface.co/baidu/ERNIE-Image-Turbo/tree/bc68c81e2a1730a394d5fc9fae70713dee940140" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "bookshop_at_blue_hour" + }, + { + "path": "template-gallery/reviews/canal_lantern_in_warm_light.original-provenance.json", + "sha256": "sha256:bytes:3a802a1d1961ab209994af944eb3889cc6d675e3f9a409414c0504d344b38d7b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/tree/aa76e7f4f4928f378716b6716a2130fba3caf5b1", + "sourceRevision": "Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers@aa76e7f4f4928f378716b6716a2130fba3caf5b1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/tree/aa76e7f4f4928f378716b6716a2130fba3caf5b1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers@aa76e7f4f4928f378716b6716a2130fba3caf5b1 https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/tree/aa76e7f4f4928f378716b6716a2130fba3caf5b1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "canal_lantern_in_warm_light" + }, + { + "path": "template-gallery/reviews/canal_lantern_in_warm_light.original-review.json", + "sha256": "sha256:bytes:fdfac320256dd1dd7bcaa77ef449fe39a537e871db6ea579500579148bffea23", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/tree/aa76e7f4f4928f378716b6716a2130fba3caf5b1", + "sourceRevision": "Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers@aa76e7f4f4928f378716b6716a2130fba3caf5b1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/tree/aa76e7f4f4928f378716b6716a2130fba3caf5b1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers@aa76e7f4f4928f378716b6716a2130fba3caf5b1 https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/tree/aa76e7f4f4928f378716b6716a2130fba3caf5b1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "canal_lantern_in_warm_light" + }, + { + "path": "template-gallery/reviews/canal_lantern_in_warm_light.quality-review.json", + "sha256": "sha256:bytes:721e6e325451df2320c2813bedce2b5c4b37d92d30ac974ca95b4f3edba6b316", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/tree/aa76e7f4f4928f378716b6716a2130fba3caf5b1", + "sourceRevision": "Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers@aa76e7f4f4928f378716b6716a2130fba3caf5b1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/tree/aa76e7f4f4928f378716b6716a2130fba3caf5b1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers@aa76e7f4f4928f378716b6716a2130fba3caf5b1 https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/tree/aa76e7f4f4928f378716b6716a2130fba3caf5b1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "canal_lantern_in_warm_light" + }, + { + "path": "template-gallery/reviews/canal_lantern_in_warm_light.retained-template-provenance.json", + "sha256": "sha256:bytes:5027304dcbef05cecb1baff1771c2f7f96671fee8d3fac34f9fece5f730c3885", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/tree/aa76e7f4f4928f378716b6716a2130fba3caf5b1", + "sourceRevision": "Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers@aa76e7f4f4928f378716b6716a2130fba3caf5b1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/tree/aa76e7f4f4928f378716b6716a2130fba3caf5b1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers@aa76e7f4f4928f378716b6716a2130fba3caf5b1 https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/tree/aa76e7f4f4928f378716b6716a2130fba3caf5b1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "canal_lantern_in_warm_light" + }, + { + "path": "template-gallery/reviews/character_edit.quality-review.json", + "sha256": "sha256:bytes:89cca4e7b8e466c614d973925b4775e18cec8c39e14e639a9d48b89918e7ae7f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "character_edit", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/reviews/character_edit.reviewed-provenance.json", + "sha256": "sha256:bytes:fee8045c51a38c8c73f668af5e3f513d7f0cbbf6978122fe73d2487ab746e110", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "character_edit", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/reviews/chroma_alpine_block_print.original-provenance.json", + "sha256": "sha256:bytes:f17d6523a55fcf5bd0c147d9a46dee5b6e7fc6363f6a08685ba8a65459f73cf2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_alpine_block_print" + }, + { + "path": "template-gallery/reviews/chroma_alpine_block_print.original-review.json", + "sha256": "sha256:bytes:a7ba022616f2a41b3046a7ac3ca7779a6f4efc5692bc02c21dc52701354f8a01", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_alpine_block_print" + }, + { + "path": "template-gallery/reviews/chroma_alpine_block_print.quality-review.json", + "sha256": "sha256:bytes:bb7979a051f9839fdee168737f18bf99c630f5e7edba7ab59f8e7471315d9413", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_alpine_block_print" + }, + { + "path": "template-gallery/reviews/chroma_alpine_block_print.retained-template-provenance.json", + "sha256": "sha256:bytes:d8643c8c82d299a62068afd7b38de0d24fcfd6882585370e73fbe63402726e4a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_alpine_block_print" + }, + { + "path": "template-gallery/reviews/chroma_copper_medallion_outpaint.original-provenance.json", + "sha256": "sha256:bytes:ce863e2679e5452c432729c3096dac08a7361d2e23dbee80a24230057c77cec9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_copper_medallion_outpaint" + }, + { + "path": "template-gallery/reviews/chroma_copper_medallion_outpaint.original-review.json", + "sha256": "sha256:bytes:0e9ec0c5a89f56c48135a248e3418af86261bb649601e757cd8ee3e41b9fcbdd", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_copper_medallion_outpaint" + }, + { + "path": "template-gallery/reviews/chroma_copper_medallion_outpaint.quality-review.json", + "sha256": "sha256:bytes:09fc86de80eb03a9ae7346e73a1fa4f275e43252829b45b253e103496d9a60f1", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_copper_medallion_outpaint" + }, + { + "path": "template-gallery/reviews/chroma_copper_medallion_outpaint.retained-template-provenance.json", + "sha256": "sha256:bytes:729aad830c6768451f07c0ce0b5585e1cb6acc96511f3d4c5eb859562920d077", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_copper_medallion_outpaint" + }, + { + "path": "template-gallery/reviews/chroma_restored_cobalt_backdrop.original-provenance.json", + "sha256": "sha256:bytes:f87d18b81ff559f1298f0c780db0f5eb89e9f8219b4f4aff80c224bc3ef47ce4", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_restored_cobalt_backdrop" + }, + { + "path": "template-gallery/reviews/chroma_restored_cobalt_backdrop.original-review.json", + "sha256": "sha256:bytes:88d1fbfadc2e1d3456f492214f7e51da6bdfd253eb00343fb93990e16c9ba2b9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_restored_cobalt_backdrop" + }, + { + "path": "template-gallery/reviews/chroma_restored_cobalt_backdrop.quality-review.json", + "sha256": "sha256:bytes:803c31f4eb055884cbe955856e99f9846f9259ae58ad6c883d686de581c0dd09", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_restored_cobalt_backdrop" + }, + { + "path": "template-gallery/reviews/chroma_restored_cobalt_backdrop.retained-template-provenance.json", + "sha256": "sha256:bytes:5232b12615a38293b0d86378fdde3003a61a8f5834de95f395a9364e12dd8fd4", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_restored_cobalt_backdrop" + }, + { + "path": "template-gallery/reviews/chroma_terracotta_and_blue.original-provenance.json", + "sha256": "sha256:bytes:92a7762ec200afa64405b665dbd19d630b846f55bdb170fc08bfb5c588b1d258", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/lodestones/Chroma1-HD/blob/0e0c60ece1e82b17cb7f77342d765ba5024c40c0/README.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_terracotta_and_blue" + }, + { + "path": "template-gallery/reviews/chroma_terracotta_and_blue.original-review.json", + "sha256": "sha256:bytes:d935f45b897cc717315684e2b180097b2e3892d275b4c38e96f2a9ec930ae24f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/lodestones/Chroma1-HD/blob/0e0c60ece1e82b17cb7f77342d765ba5024c40c0/README.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_terracotta_and_blue" + }, + { + "path": "template-gallery/reviews/chroma_terracotta_and_blue.quality-review.json", + "sha256": "sha256:bytes:2435a255e05519ab5b750b4728217d7f938631213ffeeb6da882dcb184e9fa7b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/lodestones/Chroma1-HD/blob/0e0c60ece1e82b17cb7f77342d765ba5024c40c0/README.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_terracotta_and_blue" + }, + { + "path": "template-gallery/reviews/chroma_terracotta_and_blue.retained-template-provenance.json", + "sha256": "sha256:bytes:95d0a67308f0dd2b8024a39cacca3fcfd82611a03d01f76a38a429dd1c4c2077", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/lodestones/Chroma1-HD/blob/0e0c60ece1e82b17cb7f77342d765ba5024c40c0/README.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0 https://huggingface.co/lodestones/Chroma1-HD/tree/0e0c60ece1e82b17cb7f77342d765ba5024c40c0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "chroma_terracotta_and_blue" + }, + { + "path": "template-gallery/reviews/cobalt_jug_and_lemons.original-provenance.json", + "sha256": "sha256:bytes:c9b80942080368a5e13eef6d01a31691034655d618c40ef89ab9bd1b0ade0c7e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "creativeml-openrail-m. https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "cobalt_jug_and_lemons" + }, + { + "path": "template-gallery/reviews/cobalt_jug_and_lemons.original-review.json", + "sha256": "sha256:bytes:f55b66df26013db2e002b925f1aceececec95ebd311a306bb082258f292751f1", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "creativeml-openrail-m. https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "cobalt_jug_and_lemons" + }, + { + "path": "template-gallery/reviews/cobalt_jug_and_lemons.quality-review.json", + "sha256": "sha256:bytes:da64a4e035bbe030a037ddfaf23a16946114d0e680c842f37976cc50ff8d6970", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "creativeml-openrail-m. https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "cobalt_jug_and_lemons" + }, + { + "path": "template-gallery/reviews/cobalt_jug_and_lemons.retained-template-provenance.json", + "sha256": "sha256:bytes:066fee762cae8b5f92625cc71f4002422828b06115024c3ce11affd68f34544e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "creativeml-openrail-m. https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "cobalt_jug_and_lemons" + }, + { + "path": "template-gallery/reviews/cogvideox_mossy_mountain_stream.original-provenance.json", + "sha256": "sha256:bytes:33e7bae227d98d35af005ca13238e9adfb288160165643330621b871c48ac32c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceRevision": "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01 https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "cogvideox_mossy_mountain_stream" + }, + { + "path": "template-gallery/reviews/cogvideox_mossy_mountain_stream.original-review.json", + "sha256": "sha256:bytes:3678c4a805bb1d6b4205c0d3d97df2f559b65740a7519ba19674456c26d54d13", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceRevision": "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01 https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "cogvideox_mossy_mountain_stream" + }, + { + "path": "template-gallery/reviews/cogvideox_mossy_mountain_stream.quality-review.json", + "sha256": "sha256:bytes:43fcf40d6bec403f203be3b2386ef27e345752c5dc53882ab2df45537dcbfcd1", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceRevision": "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01 https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "cogvideox_mossy_mountain_stream" + }, + { + "path": "template-gallery/reviews/cogvideox_mossy_mountain_stream.retained-template-provenance.json", + "sha256": "sha256:bytes:2e96867659142d6f562c4607f0db301aa2f003bfb9c4f29f333751365a5d7b66", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceRevision": "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01 https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "cogvideox_mossy_mountain_stream" + }, + { + "path": "template-gallery/reviews/cogvideox_red_tram_model_railway.original-provenance.json", + "sha256": "sha256:bytes:b63d433a2ae3627d260abf77dca4bca8ded0798a3449e9fb5b460628c5a2fa08", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceRevision": "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01 https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "cogvideox_red_tram_model_railway" + }, + { + "path": "template-gallery/reviews/cogvideox_red_tram_model_railway.original-review.json", + "sha256": "sha256:bytes:0b2030e77910993ce5e1947c5378e06ab488e1243b79e67cc6edd44c3cd8d462", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceRevision": "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01 https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "cogvideox_red_tram_model_railway" + }, + { + "path": "template-gallery/reviews/cogvideox_red_tram_model_railway.quality-review.json", + "sha256": "sha256:bytes:56466f759c750421f135ebf3069202ae9eb0374a9f2ee4327b95b0490ec3a583", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceRevision": "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01 https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "cogvideox_red_tram_model_railway" + }, + { + "path": "template-gallery/reviews/cogvideox_red_tram_model_railway.retained-template-provenance.json", + "sha256": "sha256:bytes:71ff0983139861b9a21d9b2882974bb5e96d11903563df161578818d795a1290", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceRevision": "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01 https://huggingface.co/zai-org/CogVideoX-2b/tree/1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "cogvideox_red_tram_model_railway" + }, + { + "path": "template-gallery/reviews/consistency_64_technical_preview.original-provenance.json", + "sha256": "sha256:bytes:c82dfa46d0a9c91b1feeda1193f8edc71f9b41764c039fde7f6342baa26a0308", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/openai/diffusers-cd_imagenet64_l2/tree/5f462e4403fc37b72ec6004e806c71805db22387", + "sourceRevision": "openai/diffusers-cd_imagenet64_l2@5f462e4403fc37b72ec6004e806c71805db22387", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/openai/diffusers-cd_imagenet64_l2/tree/5f462e4403fc37b72ec6004e806c71805db22387" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "openai/diffusers-cd_imagenet64_l2@5f462e4403fc37b72ec6004e806c71805db22387 https://huggingface.co/openai/diffusers-cd_imagenet64_l2/tree/5f462e4403fc37b72ec6004e806c71805db22387" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "efc64011c443b1678207c0dfd79e89def1c0dc3699668f058803e9044b4bd281", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "consistency_64_technical_preview" + }, + { + "path": "template-gallery/reviews/consistency_64_technical_preview.original-review.json", + "sha256": "sha256:bytes:82808ed1d53a1d3f2d221a562605d1d069a4dd7ceb047d87587437b6b2e0842a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/openai/diffusers-cd_imagenet64_l2/tree/5f462e4403fc37b72ec6004e806c71805db22387", + "sourceRevision": "openai/diffusers-cd_imagenet64_l2@5f462e4403fc37b72ec6004e806c71805db22387", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/openai/diffusers-cd_imagenet64_l2/tree/5f462e4403fc37b72ec6004e806c71805db22387" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "openai/diffusers-cd_imagenet64_l2@5f462e4403fc37b72ec6004e806c71805db22387 https://huggingface.co/openai/diffusers-cd_imagenet64_l2/tree/5f462e4403fc37b72ec6004e806c71805db22387" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "efc64011c443b1678207c0dfd79e89def1c0dc3699668f058803e9044b4bd281", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "consistency_64_technical_preview" + }, + { + "path": "template-gallery/reviews/consistency_64_technical_preview.quality-review.json", + "sha256": "sha256:bytes:b4c1485e93b6e771f7179a46190fb3abd473c0755eda9cf3c3a502281ffd6b80", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/openai/diffusers-cd_imagenet64_l2/tree/5f462e4403fc37b72ec6004e806c71805db22387", + "sourceRevision": "openai/diffusers-cd_imagenet64_l2@5f462e4403fc37b72ec6004e806c71805db22387", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/openai/diffusers-cd_imagenet64_l2/tree/5f462e4403fc37b72ec6004e806c71805db22387" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "openai/diffusers-cd_imagenet64_l2@5f462e4403fc37b72ec6004e806c71805db22387 https://huggingface.co/openai/diffusers-cd_imagenet64_l2/tree/5f462e4403fc37b72ec6004e806c71805db22387" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "efc64011c443b1678207c0dfd79e89def1c0dc3699668f058803e9044b4bd281", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "consistency_64_technical_preview" + }, + { + "path": "template-gallery/reviews/consistency_64_technical_preview.retained-template-provenance.json", + "sha256": "sha256:bytes:e7f7e6760448ffa8638c917540596a40382e0cd2b26d4d290346e03127ac0564", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/openai/diffusers-cd_imagenet64_l2/tree/5f462e4403fc37b72ec6004e806c71805db22387", + "sourceRevision": "openai/diffusers-cd_imagenet64_l2@5f462e4403fc37b72ec6004e806c71805db22387", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/openai/diffusers-cd_imagenet64_l2/tree/5f462e4403fc37b72ec6004e806c71805db22387" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "openai/diffusers-cd_imagenet64_l2@5f462e4403fc37b72ec6004e806c71805db22387 https://huggingface.co/openai/diffusers-cd_imagenet64_l2/tree/5f462e4403fc37b72ec6004e806c71805db22387" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "efc64011c443b1678207c0dfd79e89def1c0dc3699668f058803e9044b4bd281", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "consistency_64_technical_preview" + }, + { + "path": "template-gallery/reviews/copper_hour_dunes.original-provenance.json", + "sha256": "sha256:bytes:6223329bd7a1a962703aefba1379c33dae7f57daa40a09aa8e77c1cdd05b099c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Photoroom/prx-512-t2i-sft/tree/2996423bc26e8eaca48774fac1797484214dfea0", + "sourceRevision": "Photoroom/prx-512-t2i-sft@2996423bc26e8eaca48774fac1797484214dfea0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/Photoroom/prx-512-t2i-sft/tree/2996423bc26e8eaca48774fac1797484214dfea0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Photoroom/prx-512-t2i-sft@2996423bc26e8eaca48774fac1797484214dfea0 https://huggingface.co/Photoroom/prx-512-t2i-sft/tree/2996423bc26e8eaca48774fac1797484214dfea0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "copper_hour_dunes" + }, + { + "path": "template-gallery/reviews/copper_hour_dunes.original-review.json", + "sha256": "sha256:bytes:1da7406a3792d864c6aa0e010203a15d608a2f85372e530aabdeabfd7dc7e529", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Photoroom/prx-512-t2i-sft/tree/2996423bc26e8eaca48774fac1797484214dfea0", + "sourceRevision": "Photoroom/prx-512-t2i-sft@2996423bc26e8eaca48774fac1797484214dfea0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/Photoroom/prx-512-t2i-sft/tree/2996423bc26e8eaca48774fac1797484214dfea0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Photoroom/prx-512-t2i-sft@2996423bc26e8eaca48774fac1797484214dfea0 https://huggingface.co/Photoroom/prx-512-t2i-sft/tree/2996423bc26e8eaca48774fac1797484214dfea0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "copper_hour_dunes" + }, + { + "path": "template-gallery/reviews/copper_hour_dunes.quality-review.json", + "sha256": "sha256:bytes:bc0ce5cb8d1e26c9b3491f5d1653365ca11b5305b25cd32647b08398bf889e8f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Photoroom/prx-512-t2i-sft/tree/2996423bc26e8eaca48774fac1797484214dfea0", + "sourceRevision": "Photoroom/prx-512-t2i-sft@2996423bc26e8eaca48774fac1797484214dfea0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/Photoroom/prx-512-t2i-sft/tree/2996423bc26e8eaca48774fac1797484214dfea0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Photoroom/prx-512-t2i-sft@2996423bc26e8eaca48774fac1797484214dfea0 https://huggingface.co/Photoroom/prx-512-t2i-sft/tree/2996423bc26e8eaca48774fac1797484214dfea0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "copper_hour_dunes" + }, + { + "path": "template-gallery/reviews/copper_hour_dunes.retained-template-provenance.json", + "sha256": "sha256:bytes:b1d27bc198b128e1085d6b920a62dff73ed1684735c0d9b7eefbd28ab52d7e5b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Photoroom/prx-512-t2i-sft/tree/2996423bc26e8eaca48774fac1797484214dfea0", + "sourceRevision": "Photoroom/prx-512-t2i-sft@2996423bc26e8eaca48774fac1797484214dfea0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/Photoroom/prx-512-t2i-sft/tree/2996423bc26e8eaca48774fac1797484214dfea0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Photoroom/prx-512-t2i-sft@2996423bc26e8eaca48774fac1797484214dfea0 https://huggingface.co/Photoroom/prx-512-t2i-sft/tree/2996423bc26e8eaca48774fac1797484214dfea0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "copper_hour_dunes" + }, + { + "path": "template-gallery/reviews/cosmos3_super_text_to_image.original-provenance.json", + "sha256": "sha256:bytes:a7aeac67324bb549099efc0baf5dce1f4ee14108a2e41412a2ad6e8be6317e5b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/nvidia/Cosmos3-Super-Text2Image/tree/daf3d374804be4c512c2135568a7cb95d4341d79", + "sourceRevision": "nvidia/Cosmos3-Super-Text2Image@daf3d374804be4c512c2135568a7cb95d4341d79", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://openmdw.ai/license/1-1/", + "https://huggingface.co/nvidia/Cosmos-Guardrail1/blob/d6d4bfa899a71454a700907664f3e88f503950cf/README.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "nvidia/Cosmos3-Super-Text2Image@daf3d374804be4c512c2135568a7cb95d4341d79 https://huggingface.co/nvidia/Cosmos3-Super-Text2Image/tree/daf3d374804be4c512c2135568a7cb95d4341d79" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "36d1cce7283b4bbd6aaa87bb55573032136669d29808dca440378965a78c8217", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "cosmos3_super_text_to_image" + }, + { + "path": "template-gallery/reviews/cosmos3_super_text_to_image.original-review.json", + "sha256": "sha256:bytes:fdddc90b1953e7e304f263d219941667b756f3cf07e33ef25c1e371e88f849f4", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/nvidia/Cosmos3-Super-Text2Image/tree/daf3d374804be4c512c2135568a7cb95d4341d79", + "sourceRevision": "nvidia/Cosmos3-Super-Text2Image@daf3d374804be4c512c2135568a7cb95d4341d79", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://openmdw.ai/license/1-1/", + "https://huggingface.co/nvidia/Cosmos-Guardrail1/blob/d6d4bfa899a71454a700907664f3e88f503950cf/README.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "nvidia/Cosmos3-Super-Text2Image@daf3d374804be4c512c2135568a7cb95d4341d79 https://huggingface.co/nvidia/Cosmos3-Super-Text2Image/tree/daf3d374804be4c512c2135568a7cb95d4341d79" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "36d1cce7283b4bbd6aaa87bb55573032136669d29808dca440378965a78c8217", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "cosmos3_super_text_to_image" + }, + { + "path": "template-gallery/reviews/cosmos3_super_text_to_image.quality-review.json", + "sha256": "sha256:bytes:a5f08e5fa500a0c3f2cecfa572cb8d9c666e6680d0eff5bb8fac9b392cc61fab", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/nvidia/Cosmos3-Super-Text2Image/tree/daf3d374804be4c512c2135568a7cb95d4341d79", + "sourceRevision": "nvidia/Cosmos3-Super-Text2Image@daf3d374804be4c512c2135568a7cb95d4341d79", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://openmdw.ai/license/1-1/", + "https://huggingface.co/nvidia/Cosmos-Guardrail1/blob/d6d4bfa899a71454a700907664f3e88f503950cf/README.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "nvidia/Cosmos3-Super-Text2Image@daf3d374804be4c512c2135568a7cb95d4341d79 https://huggingface.co/nvidia/Cosmos3-Super-Text2Image/tree/daf3d374804be4c512c2135568a7cb95d4341d79" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "36d1cce7283b4bbd6aaa87bb55573032136669d29808dca440378965a78c8217", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "cosmos3_super_text_to_image" + }, + { + "path": "template-gallery/reviews/cosmos3_super_text_to_image.reviewed-provenance.json", + "sha256": "sha256:bytes:73996ca96a80f8244ecb17c4455ae9ea851b09c01c2af1ec8eb62ea0d67aea60", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/nvidia/Cosmos3-Super-Text2Image/tree/daf3d374804be4c512c2135568a7cb95d4341d79", + "sourceRevision": "nvidia/Cosmos3-Super-Text2Image@daf3d374804be4c512c2135568a7cb95d4341d79", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://openmdw.ai/license/1-1/", + "https://huggingface.co/nvidia/Cosmos-Guardrail1/blob/d6d4bfa899a71454a700907664f3e88f503950cf/README.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "nvidia/Cosmos3-Super-Text2Image@daf3d374804be4c512c2135568a7cb95d4341d79 https://huggingface.co/nvidia/Cosmos3-Super-Text2Image/tree/daf3d374804be4c512c2135568a7cb95d4341d79" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "36d1cce7283b4bbd6aaa87bb55573032136669d29808dca440378965a78c8217", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "cosmos3_super_text_to_image" + }, + { + "path": "template-gallery/reviews/ddim_cifar10_preview.original-provenance.json", + "sha256": "sha256:bytes:8fc838dd4bc701aa0c65e6b2630cc749d05736d23623591e3d1ac5af3d6b93d9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80", + "sourceRevision": "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80 https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "ddim_cifar10_preview" + }, + { + "path": "template-gallery/reviews/ddim_cifar10_preview.original-review.json", + "sha256": "sha256:bytes:5a793d20a7b28f16f07648dce956a5cf5d2ecf8b50d85ca9005f965196102391", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80", + "sourceRevision": "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80 https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "ddim_cifar10_preview" + }, + { + "path": "template-gallery/reviews/ddim_cifar10_preview.quality-review.json", + "sha256": "sha256:bytes:24698d674171ad14c31fba20652e694b1e845214fe802d32cb7d0e42611cb7c2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80", + "sourceRevision": "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80 https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "ddim_cifar10_preview" + }, + { + "path": "template-gallery/reviews/ddim_cifar10_preview.retained-template-provenance.json", + "sha256": "sha256:bytes:8f2075aff72c4a31ca3e247ce7b1c1c6ebaa8b8f29d7ad7e124555543b7ddfbd", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80", + "sourceRevision": "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80 https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "ddim_cifar10_preview" + }, + { + "path": "template-gallery/reviews/ddpm_cifar32_technical_preview.original-provenance.json", + "sha256": "sha256:bytes:766480adc6a7bcef178a8d124f1a4fca0fc03b1c708130a14c3b03afa1d110b0", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80", + "sourceRevision": "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80 https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "efc64011c443b1678207c0dfd79e89def1c0dc3699668f058803e9044b4bd281", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ddpm_cifar32_technical_preview" + }, + { + "path": "template-gallery/reviews/ddpm_cifar32_technical_preview.original-review.json", + "sha256": "sha256:bytes:bea6f49fd79e6e4aa10fb89efd4774be93d87aa43f45a0f1369193c4646601a0", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80", + "sourceRevision": "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80 https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "efc64011c443b1678207c0dfd79e89def1c0dc3699668f058803e9044b4bd281", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ddpm_cifar32_technical_preview" + }, + { + "path": "template-gallery/reviews/ddpm_cifar32_technical_preview.quality-review.json", + "sha256": "sha256:bytes:a5b456f0922a48ac8be8bf15923da379a96af7ce3ef8f71225ddf34a0924d1c3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80", + "sourceRevision": "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80 https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "efc64011c443b1678207c0dfd79e89def1c0dc3699668f058803e9044b4bd281", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ddpm_cifar32_technical_preview" + }, + { + "path": "template-gallery/reviews/ddpm_cifar32_technical_preview.retained-template-provenance.json", + "sha256": "sha256:bytes:466a9954a1a05984d31ac6a9b6cb5d3ed37c90460b039093f5dc89565bcf2673", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80", + "sourceRevision": "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80 https://huggingface.co/google/ddpm-cifar10-32/tree/267b167dc01f0e4e61923ea244e8b988f84deb80" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "efc64011c443b1678207c0dfd79e89def1c0dc3699668f058803e9044b4bd281", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ddpm_cifar32_technical_preview" + }, + { + "path": "template-gallery/reviews/fast_lora.quality-review.json", + "sha256": "sha256:bytes:96079ed2226e86a0a0686283402a8c4f567809c73d67138afb4d58fc46936a15", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata from the explicitly approved six-image source packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-six-z-registration", + "provenanceTemplateId": "fast_lora", + "humanApprovalPacketSHA256": "9b728a5f8535fc1ba3c03d2e2759d7ac795a586fafab51beb1509379ed388934" + }, + { + "path": "template-gallery/reviews/fast_lora.reviewed-provenance.json", + "sha256": "sha256:bytes:7a3e3ac94845ad37f5f374c1e808a5ff449b0e5776be72a1891bb2c106fdd722", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata from the explicitly approved six-image source packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-six-z-registration", + "provenanceTemplateId": "fast_lora", + "humanApprovalPacketSHA256": "9b728a5f8535fc1ba3c03d2e2759d7ac795a586fafab51beb1509379ed388934" + }, + { + "path": "template-gallery/reviews/flowers_after_rain.original-provenance.json", + "sha256": "sha256:bytes:4368cd0ed92243d2cc6b5b628ffabba5e64339eeec153282832b253d68efaa87", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/ATH-MaaS/Ovis-Image-7B/tree/41be1c5821a92c970d63d7eb595a2fd3fe32b22e", + "sourceRevision": "ATH-MaaS/Ovis-Image-7B@41be1c5821a92c970d63d7eb595a2fd3fe32b22e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/ATH-MaaS/Ovis-Image-7B/tree/41be1c5821a92c970d63d7eb595a2fd3fe32b22e" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "ATH-MaaS/Ovis-Image-7B@41be1c5821a92c970d63d7eb595a2fd3fe32b22e https://huggingface.co/ATH-MaaS/Ovis-Image-7B/tree/41be1c5821a92c970d63d7eb595a2fd3fe32b22e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "flowers_after_rain" + }, + { + "path": "template-gallery/reviews/flowers_after_rain.original-review.json", + "sha256": "sha256:bytes:0dadd907604fdde95baa31bcc981dd87cab836c1b167fc852542982163bbc455", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/ATH-MaaS/Ovis-Image-7B/tree/41be1c5821a92c970d63d7eb595a2fd3fe32b22e", + "sourceRevision": "ATH-MaaS/Ovis-Image-7B@41be1c5821a92c970d63d7eb595a2fd3fe32b22e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/ATH-MaaS/Ovis-Image-7B/tree/41be1c5821a92c970d63d7eb595a2fd3fe32b22e" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "ATH-MaaS/Ovis-Image-7B@41be1c5821a92c970d63d7eb595a2fd3fe32b22e https://huggingface.co/ATH-MaaS/Ovis-Image-7B/tree/41be1c5821a92c970d63d7eb595a2fd3fe32b22e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "flowers_after_rain" + }, + { + "path": "template-gallery/reviews/flowers_after_rain.quality-review.json", + "sha256": "sha256:bytes:4dc4ac8e4aa12dc1a9f0d685a3416d1039866c8b52d8d2560a8d3b0364cd5121", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/ATH-MaaS/Ovis-Image-7B/tree/41be1c5821a92c970d63d7eb595a2fd3fe32b22e", + "sourceRevision": "ATH-MaaS/Ovis-Image-7B@41be1c5821a92c970d63d7eb595a2fd3fe32b22e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/ATH-MaaS/Ovis-Image-7B/tree/41be1c5821a92c970d63d7eb595a2fd3fe32b22e" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "ATH-MaaS/Ovis-Image-7B@41be1c5821a92c970d63d7eb595a2fd3fe32b22e https://huggingface.co/ATH-MaaS/Ovis-Image-7B/tree/41be1c5821a92c970d63d7eb595a2fd3fe32b22e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "flowers_after_rain" + }, + { + "path": "template-gallery/reviews/flowers_after_rain.retained-template-provenance.json", + "sha256": "sha256:bytes:5251193aa4454f936e7677ee44b91d30938885e46645007effb8b1de8ea61f4a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/ATH-MaaS/Ovis-Image-7B/tree/41be1c5821a92c970d63d7eb595a2fd3fe32b22e", + "sourceRevision": "ATH-MaaS/Ovis-Image-7B@41be1c5821a92c970d63d7eb595a2fd3fe32b22e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/ATH-MaaS/Ovis-Image-7B/tree/41be1c5821a92c970d63d7eb595a2fd3fe32b22e" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "ATH-MaaS/Ovis-Image-7B@41be1c5821a92c970d63d7eb595a2fd3fe32b22e https://huggingface.co/ATH-MaaS/Ovis-Image-7B/tree/41be1c5821a92c970d63d7eb595a2fd3fe32b22e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "flowers_after_rain" + }, + { + "path": "template-gallery/reviews/flux1_dev_limestone_studio_scratch_repair.original-provenance.json", + "sha256": "sha256:bytes:876f2fb80e0352d1c5d25648da72ec9324d03e46bad65e42cd487c415d952626", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux1_dev_limestone_studio_scratch_repair" + }, + { + "path": "template-gallery/reviews/flux1_dev_limestone_studio_scratch_repair.original-review.json", + "sha256": "sha256:bytes:9c6d1ea38c006fe11dd5e65d5c82d040e20844d8d38c680b1d45ea189b9e2282", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux1_dev_limestone_studio_scratch_repair" + }, + { + "path": "template-gallery/reviews/flux1_dev_limestone_studio_scratch_repair.quality-review.json", + "sha256": "sha256:bytes:1233ae9bdb89e3599b691f2bc14408f1f9dd762c3db734bb8fd828fce1f040b0", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux1_dev_limestone_studio_scratch_repair" + }, + { + "path": "template-gallery/reviews/flux1_dev_limestone_studio_scratch_repair.retained-template-provenance.json", + "sha256": "sha256:bytes:61e8601aaefcc918f03d5f110d57e8f26cb2149d6034c22fb9c13915ddb70324", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux1_dev_limestone_studio_scratch_repair" + }, + { + "path": "template-gallery/reviews/flux2_dev_text_to_image.original-provenance.json", + "sha256": "sha256:bytes:fa7804bfeda1cf96922fb74621ad8ac9d6efa8dc468e8154af27165d05d77038", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-dev/tree/26afe3a78bb242c0a8bb181dcc8937bb16e5c66c", + "sourceRevision": "black-forest-labs/FLUX.2-dev@26afe3a78bb242c0a8bb181dcc8937bb16e5c66c", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/black-forest-labs/FLUX.2-dev/blob/26afe3a78bb242c0a8bb181dcc8937bb16e5c66c/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.2-dev@26afe3a78bb242c0a8bb181dcc8937bb16e5c66c https://huggingface.co/black-forest-labs/FLUX.2-dev/tree/26afe3a78bb242c0a8bb181dcc8937bb16e5c66c" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "36d1cce7283b4bbd6aaa87bb55573032136669d29808dca440378965a78c8217", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux2_dev_text_to_image" + }, + { + "path": "template-gallery/reviews/flux2_dev_text_to_image.original-review.json", + "sha256": "sha256:bytes:3d199d7d906fe2003fcc021c072409ce659821bbe5d40ee7fd1eabe1372e8700", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-dev/tree/26afe3a78bb242c0a8bb181dcc8937bb16e5c66c", + "sourceRevision": "black-forest-labs/FLUX.2-dev@26afe3a78bb242c0a8bb181dcc8937bb16e5c66c", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/black-forest-labs/FLUX.2-dev/blob/26afe3a78bb242c0a8bb181dcc8937bb16e5c66c/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.2-dev@26afe3a78bb242c0a8bb181dcc8937bb16e5c66c https://huggingface.co/black-forest-labs/FLUX.2-dev/tree/26afe3a78bb242c0a8bb181dcc8937bb16e5c66c" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "36d1cce7283b4bbd6aaa87bb55573032136669d29808dca440378965a78c8217", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux2_dev_text_to_image" + }, + { + "path": "template-gallery/reviews/flux2_dev_text_to_image.quality-review.json", + "sha256": "sha256:bytes:cf719c3bb27135496b83bca79ff124c9ae8aefa53a79016685bb1c91cddbab7b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-dev/tree/26afe3a78bb242c0a8bb181dcc8937bb16e5c66c", + "sourceRevision": "black-forest-labs/FLUX.2-dev@26afe3a78bb242c0a8bb181dcc8937bb16e5c66c", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/black-forest-labs/FLUX.2-dev/blob/26afe3a78bb242c0a8bb181dcc8937bb16e5c66c/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.2-dev@26afe3a78bb242c0a8bb181dcc8937bb16e5c66c https://huggingface.co/black-forest-labs/FLUX.2-dev/tree/26afe3a78bb242c0a8bb181dcc8937bb16e5c66c" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "36d1cce7283b4bbd6aaa87bb55573032136669d29808dca440378965a78c8217", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux2_dev_text_to_image" + }, + { + "path": "template-gallery/reviews/flux2_dev_text_to_image.reviewed-provenance.json", + "sha256": "sha256:bytes:045e16b448a74a7235a6919aabef1fde27de88b05d7fc59661665f1988e79aea", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-dev/tree/26afe3a78bb242c0a8bb181dcc8937bb16e5c66c", + "sourceRevision": "black-forest-labs/FLUX.2-dev@26afe3a78bb242c0a8bb181dcc8937bb16e5c66c", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/black-forest-labs/FLUX.2-dev/blob/26afe3a78bb242c0a8bb181dcc8937bb16e5c66c/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.2-dev@26afe3a78bb242c0a8bb181dcc8937bb16e5c66c https://huggingface.co/black-forest-labs/FLUX.2-dev/tree/26afe3a78bb242c0a8bb181dcc8937bb16e5c66c" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "36d1cce7283b4bbd6aaa87bb55573032136669d29808dca440378965a78c8217", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux2_dev_text_to_image" + }, + { + "path": "template-gallery/reviews/flux2_klein_edit.quality-review.json", + "sha256": "sha256:bytes:9fb22201199f326234b60ad2b1162dd14d3e94cf6e2bd4d00507c26d240aeebe", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the two explicitly approved native Windows FLUX.2 Klein images", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-windows-klein-native-image-registration", + "provenanceTemplateId": "flux2_klein_edit", + "humanApprovalPacketSHA256": "2862dea890936a224953749fccb20cbba222471c43abad480dad091e8437f45a" + }, + { + "path": "template-gallery/reviews/flux2_klein_edit.reviewed-provenance.json", + "sha256": "sha256:bytes:780517219787eafdce5362cfd9f8cab52f848397edde41b5b91ed9bb3c904462", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the two explicitly approved native Windows FLUX.2 Klein images", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-windows-klein-native-image-registration", + "humanApprovalPacketSHA256": "2862dea890936a224953749fccb20cbba222471c43abad480dad091e8437f45a", + "humanApprovalScope": "The maintainer explicitly approved the proposed 4/5 scores, known limits, exact retained Klein two-reference derivative output, its redacted technical/quality metadata, and permission to make and redistribute this derivative under Apache-2.0. Existing source images and their mixed license records remain unchanged; no other assets or held cases are newly approved.", + "provenanceTemplateId": "flux2_klein_edit" + }, + { + "path": "template-gallery/reviews/flux2_klein_multi_reference.quality-review.json", + "sha256": "sha256:bytes:7f6d97ce71b303302117236ae3c8f3cd047801026a8f808916c69c9008c6c5c5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata from the explicitly approved retained Klein two-reference source packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-klein-derivative-registration", + "provenanceTemplateId": "flux2_klein_multi_reference", + "humanApprovalPacketSHA256": "6110699f001f269b75ee943b96c82d2c0c37cb33ba4c10fdd1a9cd15d4d48042", + "humanApprovalScope": "The maintainer explicitly approved the proposed 4/5 scores, known limits, exact retained Klein two-reference derivative output, its redacted technical/quality metadata, and permission to make and redistribute this derivative under Apache-2.0. Existing source images and their mixed license records remain unchanged; no other assets or held cases are newly approved." + }, + { + "path": "template-gallery/reviews/flux2_klein_multi_reference.reviewed-provenance.json", + "sha256": "sha256:bytes:dd9601157dcff562c822db19d08d7c7f7720a1e069945563609e87c7fc52cf77", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata from the explicitly approved retained Klein two-reference source packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-klein-derivative-registration", + "provenanceTemplateId": "flux2_klein_multi_reference", + "humanApprovalPacketSHA256": "6110699f001f269b75ee943b96c82d2c0c37cb33ba4c10fdd1a9cd15d4d48042", + "humanApprovalScope": "The maintainer explicitly approved the proposed 4/5 scores, known limits, exact retained Klein two-reference derivative output, its redacted technical/quality metadata, and permission to make and redistribute this derivative under Apache-2.0. Existing source images and their mixed license records remain unchanged; no other assets or held cases are newly approved." + }, + { + "path": "template-gallery/reviews/flux2_klein_text_to_image.quality-review.json", + "sha256": "sha256:bytes:2a2f12b34c26df960805a7fcac925e8f36894326f271f20920f720e3b72499ac", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the two explicitly approved native Windows FLUX.2 Klein images", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-windows-klein-native-image-registration", + "provenanceTemplateId": "flux2_klein_text_to_image", + "humanApprovalPacketSHA256": "2862dea890936a224953749fccb20cbba222471c43abad480dad091e8437f45a" + }, + { + "path": "template-gallery/reviews/flux2_klein_text_to_image.reviewed-provenance.json", + "sha256": "sha256:bytes:e24076267505e368ca3f117c3147640dd731493d23ab2cdb32e9581c27b6c366", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the two explicitly approved native Windows FLUX.2 Klein images", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-windows-klein-native-image-registration", + "provenanceTemplateId": "flux2_klein_text_to_image", + "humanApprovalPacketSHA256": "2862dea890936a224953749fccb20cbba222471c43abad480dad091e8437f45a" + }, + { + "path": "template-gallery/reviews/flux3_klein_base_fp8r512_lora_style.quality-review.json", + "sha256": "sha256:bytes:6ecaa3d253c60a36cfa0129575fda00de91b7259d6d5d7aaf7a1eafc1c1539fb", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "sourav-das / MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata derived from the explicitly approved source-media packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; image/model terms remain in their own per-file records", + "modelTerms": [ + "AI-assisted technical quality assessment authored in Codex for this project; no model weights or additional generated media are included." + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "Codex (technical metadata); sourav-das (underlying exact-file rights and publication approval)", + "reviewedAt": "2026-10-31", + "reviewClass": "technical-derivation-of-human-approved-media", + "humanApprovalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "humanApprovalScope": "Exact source images, authored mask and SHA-bound review packet. Numeric quality scores are the AI assessment, not human-supplied scores. The metadata is project-authored; it introduces no new third-party media rights." + }, + { + "path": "template-gallery/reviews/flux3_klein_base_fp8r512_lora_style.reviewed-provenance.json", + "sha256": "sha256:bytes:bf2a88219068ec3c78bf3ab9f847f2c80d7e78035d574dbccc8d48c9c979bdc6", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "sourav-das / MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata derived from the explicitly approved source-media packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; image/model terms remain in their own per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "Codex (technical metadata); sourav-das (underlying exact-file rights and publication approval)", + "reviewedAt": "2026-10-31", + "reviewClass": "technical-derivation-of-human-approved-media", + "humanApprovalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "humanApprovalScope": "Exact source images, authored mask and SHA-bound review packet. Numeric quality scores are the AI assessment, not human-supplied scores. The metadata is project-authored; it introduces no new third-party media rights." + }, + { + "path": "template-gallery/reviews/flux3_klein_base_fp8r512_multi_reference_edit.quality-review.json", + "sha256": "sha256:bytes:0666e990cc08d4014f2f913674e9637a86e4f62fee681de1287c949a6a7dcb5a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "sourav-das / MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata derived from the explicitly approved source-media packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; image/model terms remain in their own per-file records", + "modelTerms": [ + "AI-assisted technical quality assessment authored in Codex for this project; no model weights or additional generated media are included." + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "Codex (technical metadata); sourav-das (underlying exact-file rights and publication approval)", + "reviewedAt": "2026-10-31", + "reviewClass": "technical-derivation-of-human-approved-media", + "humanApprovalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "humanApprovalScope": "Exact source images, authored mask and SHA-bound review packet. Numeric quality scores are the AI assessment, not human-supplied scores. The metadata is project-authored; it introduces no new third-party media rights." + }, + { + "path": "template-gallery/reviews/flux3_klein_base_fp8r512_multi_reference_edit.reviewed-provenance.json", + "sha256": "sha256:bytes:df83c15df43ca7b2739db3032671014c3dea0cb0bd1cd4acb15df5dcccf443bd", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "sourav-das / MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata derived from the explicitly approved source-media packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; image/model terms remain in their own per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "Codex (technical metadata); sourav-das (underlying exact-file rights and publication approval)", + "reviewedAt": "2026-10-31", + "reviewClass": "technical-derivation-of-human-approved-media", + "humanApprovalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "humanApprovalScope": "Exact source images, authored mask and SHA-bound review packet. Numeric quality scores are the AI assessment, not human-supplied scores. The metadata is project-authored; it introduces no new third-party media rights." + }, + { + "path": "template-gallery/reviews/flux3_klein_base_fp8r512_raw_coordinate_prompt.quality-review.json", + "sha256": "sha256:bytes:5a40f1c4b7c13f8678de7fdd41bf090c39071fc884c2e4dfed6c1f03e0ecb09c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "sourav-das / MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata derived from the explicitly approved source-media packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; image/model terms remain in their own per-file records", + "modelTerms": [ + "AI-assisted technical quality assessment authored in Codex for this project; no model weights or additional generated media are included." + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "Codex (technical metadata); sourav-das (underlying exact-file rights and publication approval)", + "reviewedAt": "2026-10-31", + "reviewClass": "technical-derivation-of-human-approved-media", + "humanApprovalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "humanApprovalScope": "Exact source images, authored mask and SHA-bound review packet. Numeric quality scores are the AI assessment, not human-supplied scores. The metadata is project-authored; it introduces no new third-party media rights." + }, + { + "path": "template-gallery/reviews/flux3_klein_base_fp8r512_raw_coordinate_prompt.reviewed-provenance.json", + "sha256": "sha256:bytes:e5684e876125a01c342b522b2a0d8350ae978f6543ccdfcaf56ec2011ccebb5f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "sourav-das / MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata derived from the explicitly approved source-media packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; image/model terms remain in their own per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "Codex (technical metadata); sourav-das (underlying exact-file rights and publication approval)", + "reviewedAt": "2026-10-31", + "reviewClass": "technical-derivation-of-human-approved-media", + "humanApprovalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "humanApprovalScope": "Exact source images, authored mask and SHA-bound review packet. Numeric quality scores are the AI assessment, not human-supplied scores. The metadata is project-authored; it introduces no new third-party media rights." + }, + { + "path": "template-gallery/reviews/flux3_klein_base_fp8r512_single_reference_edit.quality-review.json", + "sha256": "sha256:bytes:f81ca736173a93bb214088dda9879efd933675799244f363506770202ffc80e0", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "sourav-das / MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata derived from the explicitly approved source-media packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; image/model terms remain in their own per-file records", + "modelTerms": [ + "AI-assisted technical quality assessment authored in Codex for this project; no model weights or additional generated media are included." + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "Codex (technical metadata); sourav-das (underlying exact-file rights and publication approval)", + "reviewedAt": "2026-10-31", + "reviewClass": "technical-derivation-of-human-approved-media", + "humanApprovalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "humanApprovalScope": "Exact source images, authored mask and SHA-bound review packet. Numeric quality scores are the AI assessment, not human-supplied scores. The metadata is project-authored; it introduces no new third-party media rights." + }, + { + "path": "template-gallery/reviews/flux3_klein_base_fp8r512_single_reference_edit.reviewed-provenance.json", + "sha256": "sha256:bytes:145688ff7654e0f2b058caf1e3cdc7f4621cd160bc57967529fbfc6deba3e55f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "sourav-das / MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata derived from the explicitly approved source-media packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; image/model terms remain in their own per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "Codex (technical metadata); sourav-das (underlying exact-file rights and publication approval)", + "reviewedAt": "2026-10-31", + "reviewClass": "technical-derivation-of-human-approved-media", + "humanApprovalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "humanApprovalScope": "Exact source images, authored mask and SHA-bound review packet. Numeric quality scores are the AI assessment, not human-supplied scores. The metadata is project-authored; it introduces no new third-party media rights." + }, + { + "path": "template-gallery/reviews/flux3_klein_base_fp8r512_text_to_image.quality-review.json", + "sha256": "sha256:bytes:e4db5a6f68664c24496139808737c35843ad013a84ed8c647cb7bda822b3ab55", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "sourav-das / MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata derived from the explicitly approved source-media packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; image/model terms remain in their own per-file records", + "modelTerms": [ + "AI-assisted technical quality assessment authored in Codex for this project; no model weights or additional generated media are included." + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "Codex (technical metadata); sourav-das (underlying exact-file rights and publication approval)", + "reviewedAt": "2026-10-31", + "reviewClass": "technical-derivation-of-human-approved-media", + "humanApprovalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "humanApprovalScope": "Exact source images, authored mask and SHA-bound review packet. Numeric quality scores are the AI assessment, not human-supplied scores. The metadata is project-authored; it introduces no new third-party media rights." + }, + { + "path": "template-gallery/reviews/flux3_klein_base_fp8r512_text_to_image.reviewed-provenance.json", + "sha256": "sha256:bytes:2db502f5981665759b16abab179f12ae0093312c5bc99fcc33bb346bc6d3ff05", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "sourav-das / MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata derived from the explicitly approved source-media packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; image/model terms remain in their own per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "Codex (technical metadata); sourav-das (underlying exact-file rights and publication approval)", + "reviewedAt": "2026-10-31", + "reviewClass": "technical-derivation-of-human-approved-media", + "humanApprovalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "humanApprovalScope": "Exact source images, authored mask and SHA-bound review packet. Numeric quality scores are the AI assessment, not human-supplied scores. The metadata is project-authored; it introduces no new third-party media rights." + }, + { + "path": "template-gallery/reviews/flux3_klein_fp8r512_lora_style.quality-review.json", + "sha256": "sha256:bytes:563cf20531167d3661cecb5e6897bae7d8a1485eff49e7f16c8cd7fef6486f10", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "sourav-das / MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata derived from the explicitly approved source-media packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; image/model terms remain in their own per-file records", + "modelTerms": [ + "AI-assisted technical quality assessment authored in Codex for this project; no model weights or additional generated media are included." + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "Codex (technical metadata); sourav-das (underlying exact-file rights and publication approval)", + "reviewedAt": "2026-10-31", + "reviewClass": "technical-derivation-of-human-approved-media", + "humanApprovalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "humanApprovalScope": "Exact source images, authored mask and SHA-bound review packet. Numeric quality scores are the AI assessment, not human-supplied scores. The metadata is project-authored; it introduces no new third-party media rights." + }, + { + "path": "template-gallery/reviews/flux3_klein_fp8r512_lora_style.reviewed-provenance.json", + "sha256": "sha256:bytes:945f99e2d8c924809a4e9d6f91056ec417715b7db5e06b2ec0d51a016bdc219b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "sourav-das / MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata derived from the explicitly approved source-media packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; image/model terms remain in their own per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "Codex (technical metadata); sourav-das (underlying exact-file rights and publication approval)", + "reviewedAt": "2026-10-31", + "reviewClass": "technical-derivation-of-human-approved-media", + "humanApprovalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "humanApprovalScope": "Exact source images, authored mask and SHA-bound review packet. Numeric quality scores are the AI assessment, not human-supplied scores. The metadata is project-authored; it introduces no new third-party media rights." + }, + { + "path": "template-gallery/reviews/flux3_klein_fp8r512_multi_reference_edit.quality-review.json", + "sha256": "sha256:bytes:ba9c380fe4ccea2f731999d6aa7d116e4ebf4078c8ddb29ea88f2fee8d37dec9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "sourav-das / MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata derived from the explicitly approved source-media packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; image/model terms remain in their own per-file records", + "modelTerms": [ + "AI-assisted technical quality assessment authored in Codex for this project; no model weights or additional generated media are included." + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "Codex (technical metadata); sourav-das (underlying exact-file rights and publication approval)", + "reviewedAt": "2026-10-31", + "reviewClass": "technical-derivation-of-human-approved-media", + "humanApprovalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "humanApprovalScope": "Exact source images, authored mask and SHA-bound review packet. Numeric quality scores are the AI assessment, not human-supplied scores. The metadata is project-authored; it introduces no new third-party media rights." + }, + { + "path": "template-gallery/reviews/flux3_klein_fp8r512_multi_reference_edit.reviewed-provenance.json", + "sha256": "sha256:bytes:d89ef493877766cc1eb753cc6bdfd9e44dd6a71f33c8969287b4e70b33544f31", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "sourav-das / MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata derived from the explicitly approved source-media packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; image/model terms remain in their own per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "Codex (technical metadata); sourav-das (underlying exact-file rights and publication approval)", + "reviewedAt": "2026-10-31", + "reviewClass": "technical-derivation-of-human-approved-media", + "humanApprovalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "humanApprovalScope": "Exact source images, authored mask and SHA-bound review packet. Numeric quality scores are the AI assessment, not human-supplied scores. The metadata is project-authored; it introduces no new third-party media rights." + }, + { + "path": "template-gallery/reviews/flux3_klein_fp8r512_raw_coordinate_prompt.quality-review.json", + "sha256": "sha256:bytes:5b8429b8102aba95b1fc76e8ff0b3ee823a489ae1ae771c5f10b2c92f583ddf5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "sourav-das / MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata derived from the explicitly approved source-media packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; image/model terms remain in their own per-file records", + "modelTerms": [ + "AI-assisted technical quality assessment authored in Codex for this project; no model weights or additional generated media are included." + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "Codex (technical metadata); sourav-das (underlying exact-file rights and publication approval)", + "reviewedAt": "2026-10-31", + "reviewClass": "technical-derivation-of-human-approved-media", + "humanApprovalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "humanApprovalScope": "Exact source images, authored mask and SHA-bound review packet. Numeric quality scores are the AI assessment, not human-supplied scores. The metadata is project-authored; it introduces no new third-party media rights." + }, + { + "path": "template-gallery/reviews/flux3_klein_fp8r512_raw_coordinate_prompt.reviewed-provenance.json", + "sha256": "sha256:bytes:27ec68baa354642081ee764d33632cafcfeb8477ef05ec6ce1e7ec9d2925d410", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "sourav-das / MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata derived from the explicitly approved source-media packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; image/model terms remain in their own per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "Codex (technical metadata); sourav-das (underlying exact-file rights and publication approval)", + "reviewedAt": "2026-10-31", + "reviewClass": "technical-derivation-of-human-approved-media", + "humanApprovalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "humanApprovalScope": "Exact source images, authored mask and SHA-bound review packet. Numeric quality scores are the AI assessment, not human-supplied scores. The metadata is project-authored; it introduces no new third-party media rights." + }, + { + "path": "template-gallery/reviews/flux3_klein_fp8r512_single_reference_edit.quality-review.json", + "sha256": "sha256:bytes:d3af7d89f63eabfd9313ca12b8ec6b644ae14379265e83ecf75aab453c2df4af", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "sourav-das / MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata derived from the explicitly approved source-media packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; image/model terms remain in their own per-file records", + "modelTerms": [ + "AI-assisted technical quality assessment authored in Codex for this project; no model weights or additional generated media are included." + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "Codex (technical metadata); sourav-das (underlying exact-file rights and publication approval)", + "reviewedAt": "2026-10-31", + "reviewClass": "technical-derivation-of-human-approved-media", + "humanApprovalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "humanApprovalScope": "Exact source images, authored mask and SHA-bound review packet. Numeric quality scores are the AI assessment, not human-supplied scores. The metadata is project-authored; it introduces no new third-party media rights." + }, + { + "path": "template-gallery/reviews/flux3_klein_fp8r512_single_reference_edit.reviewed-provenance.json", + "sha256": "sha256:bytes:bf0f06495f4d9793ebf0f8bc8c4467e6aead1b935bbb5e319b59b92dac3e1b78", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "sourav-das / MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata derived from the explicitly approved source-media packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; image/model terms remain in their own per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "Codex (technical metadata); sourav-das (underlying exact-file rights and publication approval)", + "reviewedAt": "2026-10-31", + "reviewClass": "technical-derivation-of-human-approved-media", + "humanApprovalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "humanApprovalScope": "Exact source images, authored mask and SHA-bound review packet. Numeric quality scores are the AI assessment, not human-supplied scores. The metadata is project-authored; it introduces no new third-party media rights." + }, + { + "path": "template-gallery/reviews/flux3_klein_fp8r512_text_to_image.quality-review.json", + "sha256": "sha256:bytes:9c42b9b5987079824364e4749eaee7e9846949c8a8f9142092ac716447bbf063", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "sourav-das / MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata derived from the explicitly approved source-media packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; image/model terms remain in their own per-file records", + "modelTerms": [ + "AI-assisted technical quality assessment authored in Codex for this project; no model weights or additional generated media are included." + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "Codex (technical metadata); sourav-das (underlying exact-file rights and publication approval)", + "reviewedAt": "2026-10-31", + "reviewClass": "technical-derivation-of-human-approved-media", + "humanApprovalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "humanApprovalScope": "Exact source images, authored mask and SHA-bound review packet. Numeric quality scores are the AI assessment, not human-supplied scores. The metadata is project-authored; it introduces no new third-party media rights." + }, + { + "path": "template-gallery/reviews/flux3_klein_fp8r512_text_to_image.reviewed-provenance.json", + "sha256": "sha256:bytes:bb4186fd1e2fdb16f03bbda92673cbbad1169c0c20a13987775eac45ffcca1d2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "sourav-das / MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata derived from the explicitly approved source-media packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; image/model terms remain in their own per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "Codex (technical metadata); sourav-das (underlying exact-file rights and publication approval)", + "reviewedAt": "2026-10-31", + "reviewClass": "technical-derivation-of-human-approved-media", + "humanApprovalPacketSHA256": "a55745498d9c767d581d947b90b12ad4308e5f95b870224ef67107d5894f2499", + "humanApprovalScope": "Exact source images, authored mask and SHA-bound review packet. Numeric quality scores are the AI assessment, not human-supplied scores. The metadata is project-authored; it introduces no new third-party media rights." + }, + { + "path": "template-gallery/reviews/flux_canny_black_ink_cube.original-provenance.json", + "sha256": "sha256:bytes:ffa8a788f7fb52949d814a9f49fcce56b0c24eedeebcc93ac096af99eccc984b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2 https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "68a00a8e0e0cdf80ef52460f27dcb5544125a9d3f5422c6960dfecbd21c953e1", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_canny_black_ink_cube" + }, + { + "path": "template-gallery/reviews/flux_canny_black_ink_cube.original-review.json", + "sha256": "sha256:bytes:0d2613893fe629784a951879aa26d8edbec5b41635d28daf727aa8ff9ad6c5c5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2 https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "68a00a8e0e0cdf80ef52460f27dcb5544125a9d3f5422c6960dfecbd21c953e1", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_canny_black_ink_cube" + }, + { + "path": "template-gallery/reviews/flux_canny_black_ink_cube.quality-review.json", + "sha256": "sha256:bytes:876e52c4f3137edf34fc3f53ff22a751a987816d9ec54ffc9206627e6a25bcce", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2 https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "68a00a8e0e0cdf80ef52460f27dcb5544125a9d3f5422c6960dfecbd21c953e1", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_canny_black_ink_cube" + }, + { + "path": "template-gallery/reviews/flux_canny_black_ink_cube.retained-template-provenance.json", + "sha256": "sha256:bytes:78610fce6104c3ab1a363716af15194a02a1466e697590b3af0aa3f8edf9aebd", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2 https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "68a00a8e0e0cdf80ef52460f27dcb5544125a9d3f5422c6960dfecbd21c953e1", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_canny_black_ink_cube" + }, + { + "path": "template-gallery/reviews/flux_canny_clean_backdrop.original-provenance.json", + "sha256": "sha256:bytes:7936bae847ef1c4e92911b3bede96023c8f2e13a67a43775eea3de2b73715f1d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2 https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_canny_clean_backdrop" + }, + { + "path": "template-gallery/reviews/flux_canny_clean_backdrop.original-review.json", + "sha256": "sha256:bytes:d45aba0a147f85b027af25e241062e1ff06bb4036eb8d89d5b2b276c4d1368cd", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2 https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_canny_clean_backdrop" + }, + { + "path": "template-gallery/reviews/flux_canny_clean_backdrop.quality-review.json", + "sha256": "sha256:bytes:f14973c5ea5b0c681d9b268c6af7cf6e99b703e3496bea6396217366a2834fe9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2 https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_canny_clean_backdrop" + }, + { + "path": "template-gallery/reviews/flux_canny_clean_backdrop.retained-template-provenance.json", + "sha256": "sha256:bytes:9ddd33a59bfbaa565d73d420d0bb94178a94d1ca498018146307ee223e899a0e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2 https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev/tree/27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_canny_clean_backdrop" + }, + { + "path": "template-gallery/reviews/flux_control_canny.quality-review.json", + "sha256": "sha256:bytes:18fe010ceca23f0e99deb1d854905d52d805c45931b4ab523c364ac36ae594ab", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored Gallery manifest, reviewed provenance or quality review for the accepted morning batch", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "provenanceTemplateId": "flux_control_canny", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3" + }, + { + "path": "template-gallery/reviews/flux_control_canny.reviewed-provenance.json", + "sha256": "sha256:bytes:de3e003b083c9ecbf1dfae92a5c9a225c963943be0820aba88e24723aecc70b0", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored Gallery manifest, reviewed provenance or quality review for the accepted morning batch", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "provenanceTemplateId": "flux_control_canny", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3" + }, + { + "path": "template-gallery/reviews/flux_depth_control.quality-review.json", + "sha256": "sha256:bytes:cfa61450e6b63ad91cdba6b5d17c8ee316db1ce6005b19569595e173c9800daf", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored Gallery manifest, reviewed provenance or quality review for the accepted morning batch", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "provenanceTemplateId": "flux_depth_control", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3" + }, + { + "path": "template-gallery/reviews/flux_depth_control.reviewed-provenance.json", + "sha256": "sha256:bytes:845284bdb0898bb02ddd178e1de0c4b24e2281ae8f84c15eb09de2798abfcf79", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored Gallery manifest, reviewed provenance or quality review for the accepted morning batch", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "provenanceTemplateId": "flux_depth_control", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3" + }, + { + "path": "template-gallery/reviews/flux_depth_marine_bow_repair.original-provenance.json", + "sha256": "sha256:bytes:6f4297f6c64a1fad1390983a37e4015f055f1c9b57b3027b7a5d8f5f21548d21", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceRevision": "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_depth_marine_bow_repair" + }, + { + "path": "template-gallery/reviews/flux_depth_marine_bow_repair.original-review.json", + "sha256": "sha256:bytes:2bc453fab2b78d2814c146229b2983eb25f462f0aa7f0c887a69be55d36d0849", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceRevision": "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_depth_marine_bow_repair" + }, + { + "path": "template-gallery/reviews/flux_depth_marine_bow_repair.quality-review.json", + "sha256": "sha256:bytes:191b266ccc8742d66c753b8cae2dfefd06dd007aad43591dc5fc544711be9a3e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceRevision": "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_depth_marine_bow_repair" + }, + { + "path": "template-gallery/reviews/flux_depth_marine_bow_repair.retained-template-provenance.json", + "sha256": "sha256:bytes:93addd088b5f77d730cd7791c03326143216fe0f59ab07b81f5a5ec8b4ca7799", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceRevision": "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_depth_marine_bow_repair" + }, + { + "path": "template-gallery/reviews/flux_depth_marine_teal_bow_edit.original-provenance.json", + "sha256": "sha256:bytes:1693d179dfee6ccaada54e291c4dee8f818a30ce4adab5d26a2f835a4340a0dd", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceRevision": "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "68a00a8e0e0cdf80ef52460f27dcb5544125a9d3f5422c6960dfecbd21c953e1", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_depth_marine_teal_bow_edit" + }, + { + "path": "template-gallery/reviews/flux_depth_marine_teal_bow_edit.original-review.json", + "sha256": "sha256:bytes:7722237c624f3fa884dade97287657a67130ccf29879ac0ab98c39c7da0e5ed7", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceRevision": "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "68a00a8e0e0cdf80ef52460f27dcb5544125a9d3f5422c6960dfecbd21c953e1", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_depth_marine_teal_bow_edit" + }, + { + "path": "template-gallery/reviews/flux_depth_marine_teal_bow_edit.quality-review.json", + "sha256": "sha256:bytes:f4e528d2c0cdd892a93074a909de8988b0deed238fe06fa38b9d6cbfb66044ed", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceRevision": "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "68a00a8e0e0cdf80ef52460f27dcb5544125a9d3f5422c6960dfecbd21c953e1", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_depth_marine_teal_bow_edit" + }, + { + "path": "template-gallery/reviews/flux_depth_marine_teal_bow_edit.retained-template-provenance.json", + "sha256": "sha256:bytes:41803e83072069305fa268ce320f359268e9422e93e94ca8838ed10707e770a7", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceRevision": "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/tree/fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "68a00a8e0e0cdf80ef52460f27dcb5544125a9d3f5422c6960dfecbd21c953e1", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_depth_marine_teal_bow_edit" + }, + { + "path": "template-gallery/reviews/flux_dev_expert_text_to_image.quality-review.json", + "sha256": "sha256:bytes:4b7d81b2a342e898519cfef4ea3ada3325831a7a0c93b0966a42d59f74999715", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored Gallery manifest, reviewed provenance or quality review for the accepted morning batch", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "provenanceTemplateId": "flux_dev_expert_text_to_image", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3" + }, + { + "path": "template-gallery/reviews/flux_dev_expert_text_to_image.reviewed-provenance.json", + "sha256": "sha256:bytes:56dd0d53dd62f58ff085722eb7266a7c4e10e591b0a78a9408c3b2061e656182", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored Gallery manifest, reviewed provenance or quality review for the accepted morning batch", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "provenanceTemplateId": "flux_dev_expert_text_to_image", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3" + }, + { + "path": "template-gallery/reviews/flux_dev_forest_green_teapot.original-provenance.json", + "sha256": "sha256:bytes:28609162b2b43dace4e077983617ab5160c9af14e1547f422809d4b7a972c73f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_dev_forest_green_teapot" + }, + { + "path": "template-gallery/reviews/flux_dev_forest_green_teapot.original-review.json", + "sha256": "sha256:bytes:f6798fd9a441c2af0f5d766201406c7935c257ee0c67125571aefe6df6226b27", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_dev_forest_green_teapot" + }, + { + "path": "template-gallery/reviews/flux_dev_forest_green_teapot.quality-review.json", + "sha256": "sha256:bytes:585a69e794e648da35ca0890b5d86ac00a456369bf7e4b7ddfc2e27c0e2779cf", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_dev_forest_green_teapot" + }, + { + "path": "template-gallery/reviews/flux_dev_forest_green_teapot.retained-template-provenance.json", + "sha256": "sha256:bytes:fef44975f3e9e55d2f8144ecaa9a9c1907e4312add999370ca4d4da6cb67e721", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/3de623fc3c33e44ffbe2bad470d0f45bccf2eb21" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_dev_forest_green_teapot" + }, + { + "path": "template-gallery/reviews/flux_fill_inpaint.quality-review.json", + "sha256": "sha256:bytes:118df046dca340d5130af71eefea56e4d0182c2beb9b01ac4de9da102fb002ff", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "flux_fill_inpaint", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/reviews/flux_fill_inpaint.reviewed-provenance.json", + "sha256": "sha256:bytes:43b64ed1f67a2e36e9d7646eae58bc0aad9b1d49925425f5ebb98a0607577c3d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "flux_fill_inpaint", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/reviews/flux_fill_outpaint.quality-review.json", + "sha256": "sha256:bytes:cf7d2d52d6d95733fd75be94e96fac1b331e8ad8996d615640123e95d3604edf", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored Gallery manifest, reviewed provenance or quality review for the accepted morning batch", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "provenanceTemplateId": "flux_fill_outpaint", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3" + }, + { + "path": "template-gallery/reviews/flux_fill_outpaint.reviewed-provenance.json", + "sha256": "sha256:bytes:83bd50a5df98a04d55a86ca75b3f39a5d87d11221910a8f2d1cc570dc5cc423c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored Gallery manifest, reviewed provenance or quality review for the accepted morning batch", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "provenanceTemplateId": "flux_fill_outpaint", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3" + }, + { + "path": "template-gallery/reviews/flux_klein_alpine_lake_panorama.original-provenance.json", + "sha256": "sha256:bytes:82e163fa04890d8549972f17c4d863ba445dd9f2f1088199737d534b807c9e97", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294 https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_klein_alpine_lake_panorama" + }, + { + "path": "template-gallery/reviews/flux_klein_alpine_lake_panorama.original-review.json", + "sha256": "sha256:bytes:0af53835f9eb84a14dbbd91c1c6527b27d7e2ef05682c5c5a8b9a120599220c7", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294 https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_klein_alpine_lake_panorama" + }, + { + "path": "template-gallery/reviews/flux_klein_alpine_lake_panorama.quality-review.json", + "sha256": "sha256:bytes:6903b5b197080a67979212e174d52cf4e68a85773c6b6011f8c8d0b2eb5d0271", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294 https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_klein_alpine_lake_panorama" + }, + { + "path": "template-gallery/reviews/flux_klein_alpine_lake_panorama.retained-template-provenance.json", + "sha256": "sha256:bytes:0d74c14cd0dde401464e43f75a8c126b881bbbeb05bf145297ad33d575022aeb", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294 https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_klein_alpine_lake_panorama" + }, + { + "path": "template-gallery/reviews/flux_klein_open_glacial_lake.original-provenance.json", + "sha256": "sha256:bytes:5b7df305704e076244a7d1fbd4e64589e7825ee96a116c0a9a6ef4c16a3231e5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294 https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_klein_open_glacial_lake" + }, + { + "path": "template-gallery/reviews/flux_klein_open_glacial_lake.original-review.json", + "sha256": "sha256:bytes:127d7ce73ad054114252277de338834612bed27d675c1e48dc377bedb84fb237", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294 https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_klein_open_glacial_lake" + }, + { + "path": "template-gallery/reviews/flux_klein_open_glacial_lake.quality-review.json", + "sha256": "sha256:bytes:8fbb74c11639cba4c5ab3fab926e29d8e3c703ba5830fe9305352119e962dd60", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294 https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_klein_open_glacial_lake" + }, + { + "path": "template-gallery/reviews/flux_klein_open_glacial_lake.retained-template-provenance.json", + "sha256": "sha256:bytes:cce6957687fe79ea590c44ce56f1ac0c594f6df854c4e367e88c4509c0b880c2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294 https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_klein_open_glacial_lake" + }, + { + "path": "template-gallery/reviews/flux_kontext_bookshop_clear_glass.original-provenance.json", + "sha256": "sha256:bytes:d55fd398015906cdcda745266d74bb35e8fb98f5c013d850104e8b2f88ba6d54", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/blob/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_kontext_bookshop_clear_glass" + }, + { + "path": "template-gallery/reviews/flux_kontext_bookshop_clear_glass.original-review.json", + "sha256": "sha256:bytes:b5edb7c5b069232e188bc5026cbf7c2bf8f8c48734045204c33caf6a7a7b86d2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/blob/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_kontext_bookshop_clear_glass" + }, + { + "path": "template-gallery/reviews/flux_kontext_bookshop_clear_glass.quality-review.json", + "sha256": "sha256:bytes:e120dbcafe857f60c9e705d7fce6a5935d80010588003902d33573882e53674a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/blob/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_kontext_bookshop_clear_glass" + }, + { + "path": "template-gallery/reviews/flux_kontext_bookshop_clear_glass.retained-template-provenance.json", + "sha256": "sha256:bytes:706c47754ac4f8c85e7d41846a2085f544e52c132178beff600c249cd29b25d0", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/blob/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "flux_kontext_bookshop_clear_glass" + }, + { + "path": "template-gallery/reviews/flux_kontext_edit.quality-review.json", + "sha256": "sha256:bytes:b4ecdefeee42100d34df1f4a1d05c944c3c950e586a7d644496d36961e66c593", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical, review, input-binding or retained recipe metadata for three maintainer-accepted assets", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media model terms are retained separately", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "maintainer (current user)", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-native-three-registration", + "provenanceTemplateId": "flux_kontext_edit", + "humanApprovalPacketSHA256": "69c6b3d9b0ea2fcca16ee538f6e75b414b7141658b74f10578758e61360f63fd" + }, + { + "path": "template-gallery/reviews/flux_kontext_edit.reviewed-provenance.json", + "sha256": "sha256:bytes:a1d3b7605879400b4675dbb92e52b510648d331cbdc715026695b951a4f9970f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical, review, input-binding or retained recipe metadata for three maintainer-accepted assets", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media model terms are retained separately", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "maintainer (current user)", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-native-three-registration", + "provenanceTemplateId": "flux_kontext_edit", + "humanApprovalPacketSHA256": "69c6b3d9b0ea2fcca16ee538f6e75b414b7141658b74f10578758e61360f63fd" + }, + { + "path": "template-gallery/reviews/flux_kontext_multi_reference.quality-review.json", + "sha256": "sha256:bytes:e81c8ef5da7e3e2a0d6b511c093052c6edcc5dff6c5ca59db393450ed2a1cb06", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical, review, input-binding or retained recipe metadata for three maintainer-accepted assets", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media model terms are retained separately", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "maintainer (current user)", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-native-three-registration", + "provenanceTemplateId": "flux_kontext_multi_reference", + "humanApprovalPacketSHA256": "69c6b3d9b0ea2fcca16ee538f6e75b414b7141658b74f10578758e61360f63fd" + }, + { + "path": "template-gallery/reviews/flux_kontext_multi_reference.reviewed-provenance.json", + "sha256": "sha256:bytes:14db077ec2ae9cbc640bab2585a5105d2b129eafded32e7ea7be2464b412bb25", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical, review, input-binding or retained recipe metadata for three maintainer-accepted assets", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media model terms are retained separately", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "maintainer (current user)", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-native-three-registration", + "provenanceTemplateId": "flux_kontext_multi_reference", + "humanApprovalPacketSHA256": "69c6b3d9b0ea2fcca16ee538f6e75b414b7141658b74f10578758e61360f63fd" + }, + { + "path": "template-gallery/reviews/flux_krea_text_to_image.quality-review.json", + "sha256": "sha256:bytes:e60051b4da6abcd87c5c1356a2ff3dae280d92fbe25f9a95360f6d54bad93c45", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored Gallery manifest, reviewed provenance or quality review for the accepted morning batch", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "provenanceTemplateId": "flux_krea_text_to_image", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3" + }, + { + "path": "template-gallery/reviews/flux_krea_text_to_image.reviewed-provenance.json", + "sha256": "sha256:bytes:6cc4951f1e036aa80a7e92f80be0c40d37336f0f76ca7fe3dc118679f3cd08f3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored Gallery manifest, reviewed provenance or quality review for the accepted morning batch", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "provenanceTemplateId": "flux_krea_text_to_image", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/flux_lora_cinematic_octane_3d.quality-review.json", + "sha256": "sha256:bytes:b145a9798d1ac5c44516f02308008140a08bb99ae35a014dd381a650cb30c7f9", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "flux_lora_cinematic_octane_3d" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/flux_lora_cinematic_octane_3d.reviewed-provenance.json", + "sha256": "sha256:bytes:62bf8f0c28985cd8be0da00e7c74548a63dc0daa2893e1aaef7bb7a370b6aa35", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "flux_lora_cinematic_octane_3d" + }, + { + "path": "template-gallery/reviews/flux_lora_film_noir.quality-review.json", + "sha256": "sha256:bytes:d3cf61a480ef2d55e4371d70806b1b70ecd2f97b038906767f36046f7211c1d4", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "flux_lora_film_noir", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/reviews/flux_lora_film_noir.reviewed-provenance.json", + "sha256": "sha256:bytes:063c3b4d37ec01f694e47ca06bce70c54bc9e0abc682fb0b22f914be868a2e18", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "flux_lora_film_noir", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/reviews/flux_lora_ghibli_story.quality-review.json", + "sha256": "sha256:bytes:6009868ad3e76b584a12eb4193daf7680a0f224224bcda917c2ebbe8f543d1a5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "provenanceTemplateId": "flux_lora_ghibli_story" + }, + { + "path": "template-gallery/reviews/flux_lora_ghibli_story.reviewed-provenance.json", + "sha256": "sha256:bytes:f87545939eb878e8655640f7563f6ddb93b355ba72c716959fb61c39806fa8a3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "provenanceTemplateId": "flux_lora_ghibli_story" + }, + { + "path": "template-gallery/reviews/flux_lora_oil_painting.quality-review.json", + "sha256": "sha256:bytes:a081914ac871d3d02e47263f1807eb1dc112b861e517221a71ac6987df5611ee", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "flux_lora_oil_painting", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/reviews/flux_lora_oil_painting.reviewed-provenance.json", + "sha256": "sha256:bytes:04e8530313e3bfcdf2c09550c17ffbe43aed0b4a28eaccf8b8153d217c2aa35f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "flux_lora_oil_painting", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/reviews/flux_lora_paper_cutout.quality-review.json", + "sha256": "sha256:bytes:badbd8d5727387a36c3a65bf2780ea931578ea3c6f1dc50421fcce0352cbb45f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "flux_lora_paper_cutout", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/reviews/flux_lora_paper_cutout.reviewed-provenance.json", + "sha256": "sha256:bytes:0824474e69c3917b7cecea1fa9830e9a473b5b6f1a11bb3f3293bb8237f30f7e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "flux_lora_paper_cutout", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/reviews/flux_lora_photoreal_documentary.quality-review.json", + "sha256": "sha256:bytes:36a405950da3e180bdea7d6912da7ec2d19ca8382e3f4a26bd9bb9e79cc5f6d6", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored Gallery manifest, reviewed provenance or quality review for the accepted morning batch", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "provenanceTemplateId": "flux_lora_photoreal_documentary", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3" + }, + { + "path": "template-gallery/reviews/flux_lora_photoreal_documentary.reviewed-provenance.json", + "sha256": "sha256:bytes:80b8756cfa9e3cc14716d82a93f7322b08d2f53901b913ab119258891fc4dffb", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored Gallery manifest, reviewed provenance or quality review for the accepted morning batch", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "provenanceTemplateId": "flux_lora_photoreal_documentary", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3" + }, + { + "path": "template-gallery/reviews/flux_lora_retro_comic.quality-review.json", + "sha256": "sha256:bytes:4436655b45348e57831e147e268e80be4759cd5aec0e6e0eb8d6f1530de06435", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored Gallery manifest, reviewed provenance or quality review for the accepted morning batch", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "provenanceTemplateId": "flux_lora_retro_comic", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3" + }, + { + "path": "template-gallery/reviews/flux_lora_retro_comic.reviewed-provenance.json", + "sha256": "sha256:bytes:3e44966400c118ba7ea67c8c511dcd0aad51a7e59d64bf1d4a0b96566a96f3e2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored Gallery manifest, reviewed provenance or quality review for the accepted morning batch", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "provenanceTemplateId": "flux_lora_retro_comic", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3" + }, + { + "path": "template-gallery/reviews/flux_lora_watercolor.quality-review.json", + "sha256": "sha256:bytes:3454f88eecab20d70370fe23bbd9248d6e6e3255d0fbfc557a2f1103c94e7ef4", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored Gallery manifest, reviewed provenance or quality review for the accepted morning batch", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "provenanceTemplateId": "flux_lora_watercolor", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3" + }, + { + "path": "template-gallery/reviews/flux_lora_watercolor.reviewed-provenance.json", + "sha256": "sha256:bytes:c51b9dfb5471d1f0f704852672152a09f0c01aeeaee7f5dd0b324e5652fe8b6f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored Gallery manifest, reviewed provenance or quality review for the accepted morning batch", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "provenanceTemplateId": "flux_lora_watercolor", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/flux_redux_edit.quality-review.json", + "sha256": "sha256:bytes:10afc2e145791fb240bdcce1bcfbcee80280f5bec4cd15afe64985da51129788", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "flux_redux_edit" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/flux_redux_edit.reviewed-provenance.json", + "sha256": "sha256:bytes:88dc41a06a6fa368953d24f0d20c0700a375465b6c49591653c5471754690c00", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "flux_redux_edit" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for two maintainer-accepted native replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/flux_redux_multi_reference.quality-review.json", + "sha256": "sha256:bytes:1e4c83b2db81df7e43b8e79a9a01cc8eadfd2de6c826c218d0c31b50d95b7441", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", + "provenanceTemplateId": "flux_redux_multi_reference" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for two maintainer-accepted native replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/flux_redux_multi_reference.reviewed-provenance.json", + "sha256": "sha256:bytes:dd1ea7815bc1bc51589ef774cc1f412b3f8bc2f16a7204a8efe56469913d8179", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", + "provenanceTemplateId": "flux_redux_multi_reference" + }, + { + "path": "template-gallery/reviews/flux_schnell_text_to_image.quality-review.json", + "sha256": "sha256:bytes:5eeda44bb0b251f27d30973ad62659d2d247f1ab620eb4b48af154385958530e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the explicitly approved retained native Linux FLUX.1 Schnell image", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-retained-schnell-limited-image-registration", + "provenanceTemplateId": "flux_schnell_text_to_image", + "humanApprovalPacketSHA256": "488dc05971842cc9ed2b31c5995de204015d8b6a975ebc917329dfe3eac71d2c" + }, + { + "path": "template-gallery/reviews/flux_schnell_text_to_image.reviewed-provenance.json", + "sha256": "sha256:bytes:ccf1ec3ab127ce8c01008df4a8a323bac0548e83679281d58c7d77a964ae07a9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the explicitly approved retained native Linux FLUX.1 Schnell image", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-retained-schnell-limited-image-registration", + "provenanceTemplateId": "flux_schnell_text_to_image", + "humanApprovalPacketSHA256": "488dc05971842cc9ed2b31c5995de204015d8b6a975ebc917329dfe3eac71d2c" + }, + { + "path": "template-gallery/reviews/forest_ferns.original-provenance.json", + "sha256": "sha256:bytes:9f3dbdc8c7c6c2bbd65792b2d1b958cc21e1aeb44489af772f6e1d8e14b1932b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/zai-org/GLM-Image/tree/2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4", + "sourceRevision": "zai-org/GLM-Image@2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["mit. https://huggingface.co/zai-org/GLM-Image/tree/2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "zai-org/GLM-Image@2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4 https://huggingface.co/zai-org/GLM-Image/tree/2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "forest_ferns" + }, + { + "path": "template-gallery/reviews/forest_ferns.original-review.json", + "sha256": "sha256:bytes:c736e68088c4a94fcec6574242c08e840dea34559d3802d63de6f2114f514f1c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/zai-org/GLM-Image/tree/2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4", + "sourceRevision": "zai-org/GLM-Image@2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["mit. https://huggingface.co/zai-org/GLM-Image/tree/2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "zai-org/GLM-Image@2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4 https://huggingface.co/zai-org/GLM-Image/tree/2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "forest_ferns" + }, + { + "path": "template-gallery/reviews/forest_ferns.quality-review.json", + "sha256": "sha256:bytes:8d789319fd8de535f0e638a1fecdc2e65db93e1ff95104c7c63939437994529b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/zai-org/GLM-Image/tree/2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4", + "sourceRevision": "zai-org/GLM-Image@2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["mit. https://huggingface.co/zai-org/GLM-Image/tree/2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "zai-org/GLM-Image@2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4 https://huggingface.co/zai-org/GLM-Image/tree/2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "forest_ferns" + }, + { + "path": "template-gallery/reviews/forest_ferns.retained-template-provenance.json", + "sha256": "sha256:bytes:8776590ac1201f5606eab7521d2ef8283f85cc48038acafdb3cbe60a11f91a82", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/zai-org/GLM-Image/tree/2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4", + "sourceRevision": "zai-org/GLM-Image@2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["mit. https://huggingface.co/zai-org/GLM-Image/tree/2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "zai-org/GLM-Image@2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4 https://huggingface.co/zai-org/GLM-Image/tree/2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "forest_ferns" + }, + { + "path": "template-gallery/reviews/glasshouse_rain.original-provenance.json", + "sha256": "sha256:bytes:0dad28d294233db5c72915ddb9559f8eb2e4fba77cd8ebd8510a254ae0434083", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "CreativeML Open RAIL++-M. https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "glasshouse_rain" + }, + { + "path": "template-gallery/reviews/glasshouse_rain.original-review.json", + "sha256": "sha256:bytes:41b3e9a683bb5af2655b9e2874464a97a79eecdf987b93672f1ea3d142bed370", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "CreativeML Open RAIL++-M. https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "glasshouse_rain" + }, + { + "path": "template-gallery/reviews/glasshouse_rain.quality-review.json", + "sha256": "sha256:bytes:da3cb94631be949ba21fcdf842135099dbc6992bfbf37cc9b30710d1fb997ca4", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "CreativeML Open RAIL++-M. https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "glasshouse_rain" + }, + { + "path": "template-gallery/reviews/glasshouse_rain.retained-template-provenance.json", + "sha256": "sha256:bytes:fdd2f0c10865bfc619852978699d6ab58346d8a4d435b6ad24b706bf2aad4b88", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "CreativeML Open RAIL++-M. https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "glasshouse_rain" + }, + { + "path": "template-gallery/reviews/high_quality.quality-review.json", + "sha256": "sha256:bytes:859a90999ac580d2dfbf45a39d26c475e2af362a6e5a95d72c6ff05626fca54c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the explicitly approved native Qwen bakery image", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-qwen-native-image-registration", + "provenanceTemplateId": "high_quality", + "humanApprovalPacketSHA256": "dcea9bcff1de179dad3357926933fe869b99c063cee0f4dc1764833e3cf3ea53" + }, + { + "path": "template-gallery/reviews/high_quality.reviewed-provenance.json", + "sha256": "sha256:bytes:082cd7fc2b3345ff6bf881df607e19dc9e175081e2f029cf01f2abdafcbc17d4", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the explicitly approved native Qwen bakery image", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-qwen-native-image-registration", + "provenanceTemplateId": "high_quality", + "humanApprovalPacketSHA256": "dcea9bcff1de179dad3357926933fe869b99c063cee0f4dc1764833e3cf3ea53" + }, + { + "path": "template-gallery/reviews/hunyuan_dit_coastal_lighthouse.original-provenance.json", + "sha256": "sha256:bytes:cc5c37061625ef1e2bebb027601e368286272e22d4c68cbe63ea690cfe5871ae", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceRevision": "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1 https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "hunyuan_dit_coastal_lighthouse" + }, + { + "path": "template-gallery/reviews/hunyuan_dit_coastal_lighthouse.original-review.json", + "sha256": "sha256:bytes:ce4389778a7088b592491f31f36d88e5ea83a438d937a9b4c4cb61facc98c0ee", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceRevision": "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1 https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "hunyuan_dit_coastal_lighthouse" + }, + { + "path": "template-gallery/reviews/hunyuan_dit_coastal_lighthouse.quality-review.json", + "sha256": "sha256:bytes:1954559ecbd9de2986fffc2134ea20628a05ada4a85bf2db8a40137a02bedee6", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceRevision": "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1 https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "hunyuan_dit_coastal_lighthouse" + }, + { + "path": "template-gallery/reviews/hunyuan_dit_coastal_lighthouse.retained-template-provenance.json", + "sha256": "sha256:bytes:abcd8ff508cca890cb7be179f5e85d5d0f6eed116e47ec2faad168a174d0d9e0", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceRevision": "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1 https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "hunyuan_dit_coastal_lighthouse" + }, + { + "path": "template-gallery/reviews/hunyuan_dit_green_glass_study.original-provenance.json", + "sha256": "sha256:bytes:293d3b5128a5dec99d0371bc1402731b1264231127d73a9c85759048daee7bdb", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceRevision": "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1 https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "hunyuan_dit_green_glass_study" + }, + { + "path": "template-gallery/reviews/hunyuan_dit_green_glass_study.original-review.json", + "sha256": "sha256:bytes:40f0a76223a6da7fd9be445ca991c684ca1efdd45ef86e695b1f27d493b3a1f0", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceRevision": "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1 https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "hunyuan_dit_green_glass_study" + }, + { + "path": "template-gallery/reviews/hunyuan_dit_green_glass_study.quality-review.json", + "sha256": "sha256:bytes:c0da5754ab4ed0b3106fc0ac394cc83d47ae24431669a6e50014dbe5ac2dbdc3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceRevision": "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1 https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "hunyuan_dit_green_glass_study" + }, + { + "path": "template-gallery/reviews/hunyuan_dit_green_glass_study.retained-template-provenance.json", + "sha256": "sha256:bytes:db66437531e3bdeb92c4d409db6dcea15a834b1c2e5a05a4d93b5442db6568cc", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceRevision": "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1 https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "hunyuan_dit_green_glass_study" + }, + { + "path": "template-gallery/reviews/hunyuan_pag_burgundy_knight.original-provenance.json", + "sha256": "sha256:bytes:c2c30ee01a229dc1a2eafbc42f8e22d19626533c158ebeb4211ddc64f1ac9a9c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceRevision": "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1 https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "hunyuan_pag_burgundy_knight" + }, + { + "path": "template-gallery/reviews/hunyuan_pag_burgundy_knight.original-review.json", + "sha256": "sha256:bytes:b472ba6d082486f25d5c17cf3da66d6d376e9add58924f6d0acbee2e21552588", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceRevision": "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1 https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "hunyuan_pag_burgundy_knight" + }, + { + "path": "template-gallery/reviews/hunyuan_pag_burgundy_knight.quality-review.json", + "sha256": "sha256:bytes:f771127b2e2c8e93148f34e1ab5901488a5c7129f3e8608dcf5a9951f3e12645", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceRevision": "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1 https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "hunyuan_pag_burgundy_knight" + }, + { + "path": "template-gallery/reviews/hunyuan_pag_burgundy_knight.retained-template-provenance.json", + "sha256": "sha256:bytes:dbbb8bbab6db6dd38ae97f532ed1a4c865d0a706c64ea02c4dbafa18b4ce1fea", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceRevision": "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1 https://huggingface.co/Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled/tree/ba991d1546d8c50936c4c16398ed0a87b9b99fb1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "hunyuan_pag_burgundy_knight" + }, + { + "path": "template-gallery/reviews/janus_red_enamel_teapot.original-provenance.json", + "sha256": "sha256:bytes:170501bd8a025aa58341bc17322a6c9f8448be401b7263fdc9c5e9b449d1cb87", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceRevision": "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://github.com/deepseek-ai/Janus/blob/main/LICENSE-MODEL"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "janus_red_enamel_teapot" + }, + { + "path": "template-gallery/reviews/janus_red_enamel_teapot.original-review.json", + "sha256": "sha256:bytes:05d63ee8fe6f5ef33cb0ea16988861ffbbd99e0f7317b039b01c41a67eb4f5f8", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceRevision": "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://github.com/deepseek-ai/Janus/blob/main/LICENSE-MODEL"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "janus_red_enamel_teapot" + }, + { + "path": "template-gallery/reviews/janus_red_enamel_teapot.quality-review.json", + "sha256": "sha256:bytes:b9d911046c3faff978d22cb397ee2a95d23608240d18674dc68fb5b957783f90", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceRevision": "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://github.com/deepseek-ai/Janus/blob/main/LICENSE-MODEL"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "janus_red_enamel_teapot" + }, + { + "path": "template-gallery/reviews/janus_red_enamel_teapot.retained-template-provenance.json", + "sha256": "sha256:bytes:7fc41c79f10344c5621f2184f7086b4b33daf929d83e37e099e9c0e3fc16aa2d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceRevision": "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://github.com/deepseek-ai/Janus/blob/main/LICENSE-MODEL"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "janus_red_enamel_teapot" + }, + { + "path": "template-gallery/reviews/janus_red_triangle_caption.original-provenance.json", + "sha256": "sha256:bytes:3f6648332a0351e6904385e3d670550b1072c8539055ea6d827d3c7d3ee39510", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceRevision": "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://github.com/deepseek-ai/Janus/blob/main/LICENSE-MODEL"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "janus_red_triangle_caption" + }, + { + "path": "template-gallery/reviews/janus_red_triangle_caption.original-review.json", + "sha256": "sha256:bytes:f7b4652f53f7840da5338cc9e77215884c500ae59aa26e66fb83c84bb6e1ede8", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceRevision": "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://github.com/deepseek-ai/Janus/blob/main/LICENSE-MODEL"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "janus_red_triangle_caption" + }, + { + "path": "template-gallery/reviews/janus_red_triangle_caption.quality-review.json", + "sha256": "sha256:bytes:03dd22b437f3d94f8789eed26ccf9c0de4fd24a2162e1bab3d1e164441077ef5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceRevision": "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://github.com/deepseek-ai/Janus/blob/main/LICENSE-MODEL"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "janus_red_triangle_caption" + }, + { + "path": "template-gallery/reviews/janus_red_triangle_caption.retained-template-provenance.json", + "sha256": "sha256:bytes:0e5cecab2d1a8c81c1b36c4e3b2fcd0799b327f94a61d9f4c55fac0ce1f16a9b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceRevision": "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://github.com/deepseek-ai/Janus/blob/main/LICENSE-MODEL"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "janus_red_triangle_caption" + }, + { + "path": "template-gallery/reviews/janus_reykjavik_travel_note.original-provenance.json", + "sha256": "sha256:bytes:e691c32bc7b7eb4bd1bf7feae5773671d7e083d79e5bc9426ed5e768bc78d899", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceRevision": "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://github.com/deepseek-ai/Janus/blob/main/LICENSE-MODEL"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "janus_reykjavik_travel_note" + }, + { + "path": "template-gallery/reviews/janus_reykjavik_travel_note.original-review.json", + "sha256": "sha256:bytes:85c17c8b45a8df155a69a5de0e983b32ef5d9cc917cade0115bae566c861b088", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceRevision": "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://github.com/deepseek-ai/Janus/blob/main/LICENSE-MODEL"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "janus_reykjavik_travel_note" + }, + { + "path": "template-gallery/reviews/janus_reykjavik_travel_note.quality-review.json", + "sha256": "sha256:bytes:08b83eb62ffdf911938d868f1be875cc895f472e9e48936acfaa93bbed96c709", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceRevision": "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://github.com/deepseek-ai/Janus/blob/main/LICENSE-MODEL"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "janus_reykjavik_travel_note" + }, + { + "path": "template-gallery/reviews/janus_reykjavik_travel_note.retained-template-provenance.json", + "sha256": "sha256:bytes:70da97c6adaef6d92f70d91e3aa549503dacb307ea94dd3115047cb3de17945b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceRevision": "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://github.com/deepseek-ai/Janus/blob/main/LICENSE-MODEL"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e https://huggingface.co/deepseek-community/Janus-Pro-1B/tree/1655280bb75959cc1cb85529a2a8b26e7016072e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "janus_reykjavik_travel_note" + }, + { + "path": "template-gallery/reviews/joy_plus_lavender_on_limestone.original-provenance.json", + "sha256": "sha256:bytes:1d38c6f1a9b8c9f496cfb0905e6b4e2c8dd25129110ebf28c86e1070178c1237", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joy_plus_lavender_on_limestone" + }, + { + "path": "template-gallery/reviews/joy_plus_lavender_on_limestone.original-review.json", + "sha256": "sha256:bytes:01efaac50374f321864b496b45ee9d133b3d67a9a30ba61eddf81fd23d7204bb", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joy_plus_lavender_on_limestone" + }, + { + "path": "template-gallery/reviews/joy_plus_lavender_on_limestone.quality-review.json", + "sha256": "sha256:bytes:8bf5fa341804d3de8c849d40c5ac8518f954def1ba5eae8e56da820eb86d148c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joy_plus_lavender_on_limestone" + }, + { + "path": "template-gallery/reviews/joy_plus_lavender_on_limestone.retained-template-provenance.json", + "sha256": "sha256:bytes:9d769bc0f109f129a0a74b77d642cd0029204a037d3bb9e0ab17c322b31e4892", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joy_plus_lavender_on_limestone" + }, + { + "path": "template-gallery/reviews/joy_plus_terracotta_on_limestone.original-provenance.json", + "sha256": "sha256:bytes:fde745107f8dd3d8e87fa149b23617f104a566ee59af33713ca1b3d91b3a3749", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joy_plus_terracotta_on_limestone" + }, + { + "path": "template-gallery/reviews/joy_plus_terracotta_on_limestone.original-review.json", + "sha256": "sha256:bytes:719b8565f2c6e58a4bbd2cdf1298ef95a7a0d08edec6f90c566e87eb6b6353ba", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joy_plus_terracotta_on_limestone" + }, + { + "path": "template-gallery/reviews/joy_plus_terracotta_on_limestone.quality-review.json", + "sha256": "sha256:bytes:2bd0293bdf6802fbcb983cf655f09e8a9b452a5ad1438f1269db06c494558347", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joy_plus_terracotta_on_limestone" + }, + { + "path": "template-gallery/reviews/joy_plus_terracotta_on_limestone.retained-template-provenance.json", + "sha256": "sha256:bytes:646ee4503fc48d2bc5f22df726a697f82799b9152978f5cf6715d94e7c3036cb", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e https://huggingface.co/jdopensource/JoyAI-Image-Edit-Plus-Diffusers/tree/c2686460c7b64d8aa11bc4d0da423fb316b33f9e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joy_plus_terracotta_on_limestone" + }, + { + "path": "template-gallery/reviews/joyimage_base_cobalt_paper_band.original-provenance.json", + "sha256": "sha256:bytes:e8cbdf5d79e8c91cc1f85575b2a5a29fcd3a1b2b470bd08137514d71b4e157ef", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joyimage_base_cobalt_paper_band" + }, + { + "path": "template-gallery/reviews/joyimage_base_cobalt_paper_band.original-review.json", + "sha256": "sha256:bytes:7d27c8cfdbcb51dba2f6b724268469f067e1a2f85320ac168ee4415ac0446ab9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joyimage_base_cobalt_paper_band" + }, + { + "path": "template-gallery/reviews/joyimage_base_cobalt_paper_band.quality-review.json", + "sha256": "sha256:bytes:d2cd9b10d5095d45599db6987b5c8d43beae50b388dae281602eae6a5dd70ddb", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joyimage_base_cobalt_paper_band" + }, + { + "path": "template-gallery/reviews/joyimage_base_cobalt_paper_band.retained-template-provenance.json", + "sha256": "sha256:bytes:e82f59c601357c4dd42e4c4a6ea7d5f71f87afbef7d4ed254e7dc724e1555319", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joyimage_base_cobalt_paper_band" + }, + { + "path": "template-gallery/reviews/joyimage_herbarium_rainy_porthole.original-provenance.json", + "sha256": "sha256:bytes:9d044b889706d4034d96da08aec8f9c6fa2458e2d75b36055a1a707e11140d38", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "4fc7c52588176cb1f6ba6d699d08741b2986ea71ea87bac650d261716a10b24c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joyimage_herbarium_rainy_porthole" + }, + { + "path": "template-gallery/reviews/joyimage_herbarium_rainy_porthole.original-review.json", + "sha256": "sha256:bytes:5f1b196d8b9e9b3740a4745304e7fbbe5bbe5c5385237f87d6895748b75c8e07", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "4fc7c52588176cb1f6ba6d699d08741b2986ea71ea87bac650d261716a10b24c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joyimage_herbarium_rainy_porthole" + }, + { + "path": "template-gallery/reviews/joyimage_herbarium_rainy_porthole.quality-review.json", + "sha256": "sha256:bytes:ee32c1cb4403abeab273a797da25cfc3d6930f9eac84785b905ed12d07f5b567", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "4fc7c52588176cb1f6ba6d699d08741b2986ea71ea87bac650d261716a10b24c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joyimage_herbarium_rainy_porthole" + }, + { + "path": "template-gallery/reviews/joyimage_herbarium_rainy_porthole.retained-template-provenance.json", + "sha256": "sha256:bytes:9dea78e9b2060e8253be0d3862ab101885f5c8ad55f66d0d2424943e634bcc03", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c", + "sourceRevision": "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c https://huggingface.co/jdopensource/JoyAI-Image-Edit-Diffusers/tree/4b41fb25d961f37668750178ccbb380da326201c" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "4fc7c52588176cb1f6ba6d699d08741b2986ea71ea87bac650d261716a10b24c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "joyimage_herbarium_rainy_porthole" + }, + { + "path": "template-gallery/reviews/kandinsky3_ginkgo_on_slate.original-provenance.json", + "sha256": "sha256:bytes:31189848b609ec308b9bd427975d0b09d502ff7583321e88a7ba813f5a968db8", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceRevision": "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632 https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "kandinsky3_ginkgo_on_slate" + }, + { + "path": "template-gallery/reviews/kandinsky3_ginkgo_on_slate.original-review.json", + "sha256": "sha256:bytes:3d23527148ae151f8b05b623d2739f79ab4bcd37202db7b331e391bdf7b6bedf", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceRevision": "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632 https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "kandinsky3_ginkgo_on_slate" + }, + { + "path": "template-gallery/reviews/kandinsky3_ginkgo_on_slate.quality-review.json", + "sha256": "sha256:bytes:ce1d21e1a50c1861198590eda8f52dde82afccaceae93500fbaf612e1b1a2426", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceRevision": "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632 https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "kandinsky3_ginkgo_on_slate" + }, + { + "path": "template-gallery/reviews/kandinsky3_ginkgo_on_slate.retained-template-provenance.json", + "sha256": "sha256:bytes:5be139ba899439bf234dee3274572a5062dbfdbb0fbf6ba12f23b64ce47a2fc3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceRevision": "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632 https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "kandinsky3_ginkgo_on_slate" + }, + { + "path": "template-gallery/reviews/kandinsky3_smoked_glass_on_limestone.original-provenance.json", + "sha256": "sha256:bytes:e62c78c152e7273c32f506b361d4cece5e2a61939ab8763078fb04111795a098", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceRevision": "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632 https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "kandinsky3_smoked_glass_on_limestone" + }, + { + "path": "template-gallery/reviews/kandinsky3_smoked_glass_on_limestone.original-review.json", + "sha256": "sha256:bytes:307daef8829faa1835d0d7092e594aa8bf1b703c51157a8cc7581aaf1e84d437", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceRevision": "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632 https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "kandinsky3_smoked_glass_on_limestone" + }, + { + "path": "template-gallery/reviews/kandinsky3_smoked_glass_on_limestone.quality-review.json", + "sha256": "sha256:bytes:e6d9b0e253b694fab331fe62247c0adf47c2947d841ba8da08629522a37613ef", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceRevision": "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632 https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "kandinsky3_smoked_glass_on_limestone" + }, + { + "path": "template-gallery/reviews/kandinsky3_smoked_glass_on_limestone.retained-template-provenance.json", + "sha256": "sha256:bytes:5dbf90cd4b0f214fdae6e49c20ec03e38fc8552275d07e900ae737af469ea66a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceRevision": "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632 https://huggingface.co/kandinsky-community/kandinsky-3/tree/bf79e6c219da8a94abb50235fdc4567eb8fb4632" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "kandinsky3_smoked_glass_on_limestone" + }, + { + "path": "template-gallery/reviews/kontext_wide_water_alpine_ridge.original-provenance.json", + "sha256": "sha256:bytes:8f93f5553eeb580705586eda046026ac8ed8742b09defff688fd67892e131d90", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "kontext_wide_water_alpine_ridge" + }, + { + "path": "template-gallery/reviews/kontext_wide_water_alpine_ridge.original-review.json", + "sha256": "sha256:bytes:f54561af3e759232c7e01a2515d98b66c38d56d7fe8ece573ce2f83bfcbbf3f8", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "kontext_wide_water_alpine_ridge" + }, + { + "path": "template-gallery/reviews/kontext_wide_water_alpine_ridge.quality-review.json", + "sha256": "sha256:bytes:2dcf22dab88c45ead8d951f9443f61657d37eb30d07add1183a3633dbffcfe98", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "kontext_wide_water_alpine_ridge" + }, + { + "path": "template-gallery/reviews/kontext_wide_water_alpine_ridge.retained-template-provenance.json", + "sha256": "sha256:bytes:97059d8dd67e7e5a82c9c458b4c992c680235cae0fc205fde6ae3915f43f3ff7", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/tree/24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "kontext_wide_water_alpine_ridge" + }, + { + "path": "template-gallery/reviews/latte_water_folding_over_slate.original-provenance.json", + "sha256": "sha256:bytes:78b4bc4724cd17a1257feccd32ddc38735c5df0e4144c27d5d0d8d3ee1fd2ef9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/maxin-cn/Latte-1/tree/0653024365272f061fc44d1078134df22842b687", + "sourceRevision": "maxin-cn/Latte-1@0653024365272f061fc44d1078134df22842b687", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/maxin-cn/Latte-1/tree/0653024365272f061fc44d1078134df22842b687"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "maxin-cn/Latte-1@0653024365272f061fc44d1078134df22842b687 https://huggingface.co/maxin-cn/Latte-1/tree/0653024365272f061fc44d1078134df22842b687" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "latte_water_folding_over_slate" + }, + { + "path": "template-gallery/reviews/latte_water_folding_over_slate.original-review.json", + "sha256": "sha256:bytes:999a0678c180f2fbdba3fe72331f42d997a671785f837f261beec272e97cb95a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/maxin-cn/Latte-1/tree/0653024365272f061fc44d1078134df22842b687", + "sourceRevision": "maxin-cn/Latte-1@0653024365272f061fc44d1078134df22842b687", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/maxin-cn/Latte-1/tree/0653024365272f061fc44d1078134df22842b687"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "maxin-cn/Latte-1@0653024365272f061fc44d1078134df22842b687 https://huggingface.co/maxin-cn/Latte-1/tree/0653024365272f061fc44d1078134df22842b687" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "latte_water_folding_over_slate" + }, + { + "path": "template-gallery/reviews/latte_water_folding_over_slate.quality-review.json", + "sha256": "sha256:bytes:2e2c24315e418c9cf93eb6e742d453a52b43dcfabf21b85d0fc33f9e048dcdc2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/maxin-cn/Latte-1/tree/0653024365272f061fc44d1078134df22842b687", + "sourceRevision": "maxin-cn/Latte-1@0653024365272f061fc44d1078134df22842b687", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/maxin-cn/Latte-1/tree/0653024365272f061fc44d1078134df22842b687"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "maxin-cn/Latte-1@0653024365272f061fc44d1078134df22842b687 https://huggingface.co/maxin-cn/Latte-1/tree/0653024365272f061fc44d1078134df22842b687" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "latte_water_folding_over_slate" + }, + { + "path": "template-gallery/reviews/latte_water_folding_over_slate.retained-template-provenance.json", + "sha256": "sha256:bytes:8f4dd40d5f9ba67c1001b7d41730c004cebe9bda2a8756b5c32caa4041f2b6b5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/maxin-cn/Latte-1/tree/0653024365272f061fc44d1078134df22842b687", + "sourceRevision": "maxin-cn/Latte-1@0653024365272f061fc44d1078134df22842b687", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/maxin-cn/Latte-1/tree/0653024365272f061fc44d1078134df22842b687"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "maxin-cn/Latte-1@0653024365272f061fc44d1078134df22842b687 https://huggingface.co/maxin-cn/Latte-1/tree/0653024365272f061fc44d1078134df22842b687" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "latte_water_folding_over_slate" + }, + { + "path": "template-gallery/reviews/lcm_dawn_alpine_lake.quality-review.json", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "humanLikenessConsent": "not-applicable", + "marks": [], + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-20", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ba369c5fff89e379be66714d3ecbf1a0e3a9555e2b5ffbc9cb54210d862ec30b", + "publicationBasis": "Maintainer approved the exact Whisper JSON and both exact LCM images, accepted the disclosed LCM changes, and authorized publication of the associated redacted Gallery records.", + "creationMethod": "Project-authored redacted retained Gallery review, provenance or registration metadata", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [], + "aiGenerated": false, + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "provenanceTemplateId": "lcm_dawn_alpine_lake", + "sha256": "sha256:bytes:e5c590a6287147faad9d5eab5676b8d2bb8224a8581a2043cf78c8dd50dcb0b9", + "publishDecision": "approved", + "holdReason": null + }, + { + "path": "template-gallery/reviews/lcm_dawn_alpine_lake.retained-template-provenance.json", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "humanLikenessConsent": "not-applicable", + "marks": [], + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-20", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ba369c5fff89e379be66714d3ecbf1a0e3a9555e2b5ffbc9cb54210d862ec30b", + "publicationBasis": "Maintainer approved the exact Whisper JSON and both exact LCM images, accepted the disclosed LCM changes, and authorized publication of the associated redacted Gallery records.", + "creationMethod": "Project-authored redacted retained Gallery review, provenance or registration metadata", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [], + "aiGenerated": false, + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "provenanceTemplateId": "lcm_dawn_alpine_lake", + "sha256": "sha256:bytes:767b8d794460fca5a3e1c79a89aeaa2b1dcdb815d47702e1063ed35d07163247", + "publishDecision": "approved", + "holdReason": null + }, + { + "path": "template-gallery/reviews/longcat_clear_glass_at_the_bookshop.original-provenance.json", + "sha256": "sha256:bytes:055c3ff5cf5493c80e675b8cd97de5c448856204330c1434522cc0c91482b522", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/meituan-longcat/LongCat-Image-Edit/tree/7b54ef423aa7854be7861600024be5c56ab7875a", + "sourceRevision": "meituan-longcat/LongCat-Image-Edit@7b54ef423aa7854be7861600024be5c56ab7875a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/meituan-longcat/LongCat-Image-Edit/tree/7b54ef423aa7854be7861600024be5c56ab7875a" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "meituan-longcat/LongCat-Image-Edit@7b54ef423aa7854be7861600024be5c56ab7875a https://huggingface.co/meituan-longcat/LongCat-Image-Edit/tree/7b54ef423aa7854be7861600024be5c56ab7875a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "longcat_clear_glass_at_the_bookshop" + }, + { + "path": "template-gallery/reviews/longcat_clear_glass_at_the_bookshop.original-review.json", + "sha256": "sha256:bytes:dabecbb61888f492a4e7d8f45e368097c7f286df24c163c8b5e753ce4553d0ff", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/meituan-longcat/LongCat-Image-Edit/tree/7b54ef423aa7854be7861600024be5c56ab7875a", + "sourceRevision": "meituan-longcat/LongCat-Image-Edit@7b54ef423aa7854be7861600024be5c56ab7875a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/meituan-longcat/LongCat-Image-Edit/tree/7b54ef423aa7854be7861600024be5c56ab7875a" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "meituan-longcat/LongCat-Image-Edit@7b54ef423aa7854be7861600024be5c56ab7875a https://huggingface.co/meituan-longcat/LongCat-Image-Edit/tree/7b54ef423aa7854be7861600024be5c56ab7875a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "longcat_clear_glass_at_the_bookshop" + }, + { + "path": "template-gallery/reviews/longcat_clear_glass_at_the_bookshop.quality-review.json", + "sha256": "sha256:bytes:03185586cf4d78ccfa2aae9dcb3962e82b611d03bb5fefc03bdf34851d50a9ed", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/meituan-longcat/LongCat-Image-Edit/tree/7b54ef423aa7854be7861600024be5c56ab7875a", + "sourceRevision": "meituan-longcat/LongCat-Image-Edit@7b54ef423aa7854be7861600024be5c56ab7875a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/meituan-longcat/LongCat-Image-Edit/tree/7b54ef423aa7854be7861600024be5c56ab7875a" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "meituan-longcat/LongCat-Image-Edit@7b54ef423aa7854be7861600024be5c56ab7875a https://huggingface.co/meituan-longcat/LongCat-Image-Edit/tree/7b54ef423aa7854be7861600024be5c56ab7875a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "longcat_clear_glass_at_the_bookshop" + }, + { + "path": "template-gallery/reviews/longcat_clear_glass_at_the_bookshop.retained-template-provenance.json", + "sha256": "sha256:bytes:8df85b747c9a5b0fe11bb20d81d64b1df7bccb96ec505aa99855adbcf9dd6e51", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/meituan-longcat/LongCat-Image-Edit/tree/7b54ef423aa7854be7861600024be5c56ab7875a", + "sourceRevision": "meituan-longcat/LongCat-Image-Edit@7b54ef423aa7854be7861600024be5c56ab7875a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/meituan-longcat/LongCat-Image-Edit/tree/7b54ef423aa7854be7861600024be5c56ab7875a" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "meituan-longcat/LongCat-Image-Edit@7b54ef423aa7854be7861600024be5c56ab7875a https://huggingface.co/meituan-longcat/LongCat-Image-Edit/tree/7b54ef423aa7854be7861600024be5c56ab7875a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "longcat_clear_glass_at_the_bookshop" + }, + { + "path": "template-gallery/reviews/longcat_florist_end_of_lane.original-provenance.json", + "sha256": "sha256:bytes:31fa3b13f1a585031ab220cb3a1039a9e7c2ed40757801c56cbcc846125ac7b8", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/meituan-longcat/LongCat-Image/tree/d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8", + "sourceRevision": "meituan-longcat/LongCat-Image@d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/meituan-longcat/LongCat-Image/tree/d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "meituan-longcat/LongCat-Image@d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8 https://huggingface.co/meituan-longcat/LongCat-Image/tree/d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "4fc7c52588176cb1f6ba6d699d08741b2986ea71ea87bac650d261716a10b24c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "longcat_florist_end_of_lane" + }, + { + "path": "template-gallery/reviews/longcat_florist_end_of_lane.original-review.json", + "sha256": "sha256:bytes:adc8b682f80f09677b97fa57651d336d8b966f7e19586256e6559505f57f9cfc", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/meituan-longcat/LongCat-Image/tree/d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8", + "sourceRevision": "meituan-longcat/LongCat-Image@d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/meituan-longcat/LongCat-Image/tree/d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "meituan-longcat/LongCat-Image@d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8 https://huggingface.co/meituan-longcat/LongCat-Image/tree/d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "4fc7c52588176cb1f6ba6d699d08741b2986ea71ea87bac650d261716a10b24c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "longcat_florist_end_of_lane" + }, + { + "path": "template-gallery/reviews/longcat_florist_end_of_lane.quality-review.json", + "sha256": "sha256:bytes:c2b07ec9dccd4ac97f229ff2c836b5215377c240b8455db32a4f72f0313f7a4c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/meituan-longcat/LongCat-Image/tree/d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8", + "sourceRevision": "meituan-longcat/LongCat-Image@d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/meituan-longcat/LongCat-Image/tree/d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "meituan-longcat/LongCat-Image@d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8 https://huggingface.co/meituan-longcat/LongCat-Image/tree/d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "4fc7c52588176cb1f6ba6d699d08741b2986ea71ea87bac650d261716a10b24c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "longcat_florist_end_of_lane" + }, + { + "path": "template-gallery/reviews/longcat_florist_end_of_lane.retained-template-provenance.json", + "sha256": "sha256:bytes:14da3c1cbc2f7ea57b4ec3d84f1a78d72a4e22b62ce0e0d757db78297c3fbed9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/meituan-longcat/LongCat-Image/tree/d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8", + "sourceRevision": "meituan-longcat/LongCat-Image@d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/meituan-longcat/LongCat-Image/tree/d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "meituan-longcat/LongCat-Image@d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8 https://huggingface.co/meituan-longcat/LongCat-Image/tree/d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "4fc7c52588176cb1f6ba6d699d08741b2986ea71ea87bac650d261716a10b24c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "longcat_florist_end_of_lane" + }, + { + "path": "template-gallery/reviews/longcat_last_tram_at_dusk.original-provenance.json", + "sha256": "sha256:bytes:34b322e643eacf47f4c02019564cb85720cb3b9b8334d524e47226d60c4faa60", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/ruixiangma/LongCat-AudioDiT-1B-Diffusers/tree/f4c063ea37f262ba5e6129ebd80095a6d6a9de4d", + "sourceRevision": "ruixiangma/LongCat-AudioDiT-1B-Diffusers@f4c063ea37f262ba5e6129ebd80095a6d6a9de4d", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/ruixiangma/LongCat-AudioDiT-1B-Diffusers/tree/f4c063ea37f262ba5e6129ebd80095a6d6a9de4d" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "ruixiangma/LongCat-AudioDiT-1B-Diffusers@f4c063ea37f262ba5e6129ebd80095a6d6a9de4d https://huggingface.co/ruixiangma/LongCat-AudioDiT-1B-Diffusers/tree/f4c063ea37f262ba5e6129ebd80095a6d6a9de4d" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "15c604ae5df3abed63c95046a78859adb870f415f45c06a99f58ad652fc0dea2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "longcat_last_tram_at_dusk" + }, + { + "path": "template-gallery/reviews/longcat_last_tram_at_dusk.original-review.json", + "sha256": "sha256:bytes:7ee2f38d8dd9199e6a754312dba9e962007389ba4527f0aebb96272b454394a5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/ruixiangma/LongCat-AudioDiT-1B-Diffusers/tree/f4c063ea37f262ba5e6129ebd80095a6d6a9de4d", + "sourceRevision": "ruixiangma/LongCat-AudioDiT-1B-Diffusers@f4c063ea37f262ba5e6129ebd80095a6d6a9de4d", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/ruixiangma/LongCat-AudioDiT-1B-Diffusers/tree/f4c063ea37f262ba5e6129ebd80095a6d6a9de4d" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "ruixiangma/LongCat-AudioDiT-1B-Diffusers@f4c063ea37f262ba5e6129ebd80095a6d6a9de4d https://huggingface.co/ruixiangma/LongCat-AudioDiT-1B-Diffusers/tree/f4c063ea37f262ba5e6129ebd80095a6d6a9de4d" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "15c604ae5df3abed63c95046a78859adb870f415f45c06a99f58ad652fc0dea2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "longcat_last_tram_at_dusk" + }, + { + "path": "template-gallery/reviews/longcat_last_tram_at_dusk.quality-review.json", + "sha256": "sha256:bytes:f2883c589ff0313062b4c0c995b35ce08d837f02efb4f6f097d004961b8d298f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/ruixiangma/LongCat-AudioDiT-1B-Diffusers/tree/f4c063ea37f262ba5e6129ebd80095a6d6a9de4d", + "sourceRevision": "ruixiangma/LongCat-AudioDiT-1B-Diffusers@f4c063ea37f262ba5e6129ebd80095a6d6a9de4d", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/ruixiangma/LongCat-AudioDiT-1B-Diffusers/tree/f4c063ea37f262ba5e6129ebd80095a6d6a9de4d" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "ruixiangma/LongCat-AudioDiT-1B-Diffusers@f4c063ea37f262ba5e6129ebd80095a6d6a9de4d https://huggingface.co/ruixiangma/LongCat-AudioDiT-1B-Diffusers/tree/f4c063ea37f262ba5e6129ebd80095a6d6a9de4d" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "15c604ae5df3abed63c95046a78859adb870f415f45c06a99f58ad652fc0dea2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "longcat_last_tram_at_dusk" + }, + { + "path": "template-gallery/reviews/longcat_last_tram_at_dusk.retained-template-provenance.json", + "sha256": "sha256:bytes:071240681910f119ab723f580b68bc1037896a28132a51fbb338e61bf9f8a0bf", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/ruixiangma/LongCat-AudioDiT-1B-Diffusers/tree/f4c063ea37f262ba5e6129ebd80095a6d6a9de4d", + "sourceRevision": "ruixiangma/LongCat-AudioDiT-1B-Diffusers@f4c063ea37f262ba5e6129ebd80095a6d6a9de4d", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/ruixiangma/LongCat-AudioDiT-1B-Diffusers/tree/f4c063ea37f262ba5e6129ebd80095a6d6a9de4d" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "ruixiangma/LongCat-AudioDiT-1B-Diffusers@f4c063ea37f262ba5e6129ebd80095a6d6a9de4d https://huggingface.co/ruixiangma/LongCat-AudioDiT-1B-Diffusers/tree/f4c063ea37f262ba5e6129ebd80095a6d6a9de4d" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "15c604ae5df3abed63c95046a78859adb870f415f45c06a99f58ad652fc0dea2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "longcat_last_tram_at_dusk" + }, + { + "path": "template-gallery/reviews/low_vram.quality-review.json", + "sha256": "sha256:bytes:53b25669d880814ac612e803b0c6f2abbcdd8853e7ea4ca6e1e6d0b97fa23352", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata from the explicitly approved six-image source packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-six-z-registration", + "provenanceTemplateId": "low_vram", + "humanApprovalPacketSHA256": "9b728a5f8535fc1ba3c03d2e2759d7ac795a586fafab51beb1509379ed388934" + }, + { + "path": "template-gallery/reviews/low_vram.reviewed-provenance.json", + "sha256": "sha256:bytes:a07f1942cb39c873d7ccd1b99dbece3c203d73296712aa0168a3edf4054b8076", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata from the explicitly approved six-image source packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-six-z-registration", + "provenanceTemplateId": "low_vram", + "humanApprovalPacketSHA256": "9b728a5f8535fc1ba3c03d2e2759d7ac795a586fafab51beb1509379ed388934" + }, + { + "path": "template-gallery/reviews/ltx2_enamel_teapot_window_light.original-provenance.json", + "sha256": "sha256:bytes:1fbe54b9ca2549c6966faf71d0bcbbde7a9c60b2ff64e3bd27086ed97c81aa26", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/blob/47da56e2ad66ce4125a9922b4a8826bf407f9d0a/LICENSE"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_enamel_teapot_window_light" + }, + { + "path": "template-gallery/reviews/ltx2_enamel_teapot_window_light.original-review.json", + "sha256": "sha256:bytes:267b0c3024607fabad7de1a91cc01b0523b7e8aabb82ae45f0ab79522496bf56", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/blob/47da56e2ad66ce4125a9922b4a8826bf407f9d0a/LICENSE"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_enamel_teapot_window_light" + }, + { + "path": "template-gallery/reviews/ltx2_enamel_teapot_window_light.quality-review.json", + "sha256": "sha256:bytes:9b54148c2f192cefa6d83b75ded11a7a45bb048327dd164c4095702c76b98e65", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/blob/47da56e2ad66ce4125a9922b4a8826bf407f9d0a/LICENSE"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_enamel_teapot_window_light" + }, + { + "path": "template-gallery/reviews/ltx2_enamel_teapot_window_light.retained-template-provenance.json", + "sha256": "sha256:bytes:f09d8c8ab232f31491bffe08d4ab09b2e4385849905660c4454d63a6c7d57714", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/blob/47da56e2ad66ce4125a9922b4a8826bf407f9d0a/LICENSE"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_enamel_teapot_window_light" + }, + { + "path": "template-gallery/reviews/ltx2_glasshouse_drip.original-provenance.json", + "sha256": "sha256:bytes:2d1b15c2d57f48e996da58f168af3a46124c5a05735f93c9e7278fcb8a7fc49b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_glasshouse_drip" + }, + { + "path": "template-gallery/reviews/ltx2_glasshouse_drip.original-review.json", + "sha256": "sha256:bytes:b4f072e5c562496ea776a53b1cb5704dbba69e5d273191160afb3cb8f2524ad8", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_glasshouse_drip" + }, + { + "path": "template-gallery/reviews/ltx2_glasshouse_drip.quality-review.json", + "sha256": "sha256:bytes:6caef4f4af6cf21f2de32684a374508b990d6ef392957a11ddbb217b5037a34d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_glasshouse_drip" + }, + { + "path": "template-gallery/reviews/ltx2_glasshouse_drip.retained-template-provenance.json", + "sha256": "sha256:bytes:06e0dc880d5f9233edba458c58390254af536a1657d217d6e2e315e68452d5c3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_glasshouse_drip" + }, + { + "path": "template-gallery/reviews/ltx2_kiln_at_first_light.original-provenance.json", + "sha256": "sha256:bytes:9b3de62f3b8a92705c227b1c737a62113ae2af8e09ce19a82f3ec60f7dd12681", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_kiln_at_first_light" + }, + { + "path": "template-gallery/reviews/ltx2_kiln_at_first_light.original-review.json", + "sha256": "sha256:bytes:fd00080cb70166bef3d980c54eae560171173d4e716a0c2de027b45b455d2035", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_kiln_at_first_light" + }, + { + "path": "template-gallery/reviews/ltx2_kiln_at_first_light.quality-review.json", + "sha256": "sha256:bytes:9838d274b6b603d9842987b9248a067f146364c87ba39edce523c5994771e4e5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_kiln_at_first_light" + }, + { + "path": "template-gallery/reviews/ltx2_kiln_at_first_light.retained-template-provenance.json", + "sha256": "sha256:bytes:e00c10faebe723569e24af1c9266f4dc0b2477558fd861250984392488f97d2c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_kiln_at_first_light" + }, + { + "path": "template-gallery/reviews/ltx2_moss_and_basalt.original-provenance.json", + "sha256": "sha256:bytes:479f80077697b798779e8eff2a07867a7e49b04e0aff6adb7588e294d44af590", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/blob/47da56e2ad66ce4125a9922b4a8826bf407f9d0a/LICENSE"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_moss_and_basalt" + }, + { + "path": "template-gallery/reviews/ltx2_moss_and_basalt.original-review.json", + "sha256": "sha256:bytes:552f9f76f3033f5ca379a4c09b35c3ed9be3f2504481e5a6d3d45da35cc4b007", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/blob/47da56e2ad66ce4125a9922b4a8826bf407f9d0a/LICENSE"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_moss_and_basalt" + }, + { + "path": "template-gallery/reviews/ltx2_moss_and_basalt.quality-review.json", + "sha256": "sha256:bytes:9565db5dd4d9a378cdb9d4c17f3129a55b8d3d4cb72b4df5297e28994904ef85", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/blob/47da56e2ad66ce4125a9922b4a8826bf407f9d0a/LICENSE"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_moss_and_basalt" + }, + { + "path": "template-gallery/reviews/ltx2_moss_and_basalt.retained-template-provenance.json", + "sha256": "sha256:bytes:1ae833652317aef0279d320f60fcbd678045af0bdd4fa056ae3c1735634708c3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/blob/47da56e2ad66ce4125a9922b4a8826bf407f9d0a/LICENSE"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_moss_and_basalt" + }, + { + "path": "template-gallery/reviews/ltx2_surf_below_the_breakwater.original-provenance.json", + "sha256": "sha256:bytes:1d8ad8211ab76299edf0659f556f609b71d729a8db1c6f8404aac40d47dd36f6", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_surf_below_the_breakwater" + }, + { + "path": "template-gallery/reviews/ltx2_surf_below_the_breakwater.original-review.json", + "sha256": "sha256:bytes:9dd1a9b09ae08f162a8f666e69e55cb2fbfe0dce933899aa32c58e3b4a38ea0f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_surf_below_the_breakwater" + }, + { + "path": "template-gallery/reviews/ltx2_surf_below_the_breakwater.quality-review.json", + "sha256": "sha256:bytes:901cf95b6ba4baa4bda362e9fcae6b46e2d758c08612633d294e86abd70a9ba2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_surf_below_the_breakwater" + }, + { + "path": "template-gallery/reviews/ltx2_surf_below_the_breakwater.retained-template-provenance.json", + "sha256": "sha256:bytes:c5d870f9b90d13ecec6edf2bdf0dca17a3603ee1bc9ba0e0f1a956a9b7283dea", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a https://huggingface.co/Lightricks/LTX-2/tree/47da56e2ad66ce4125a9922b4a8826bf407f9d0a" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx2_surf_below_the_breakwater" + }, + { + "path": "template-gallery/reviews/ltx_long_wind_and_tide_at_the_headland.original-provenance.json", + "sha256": "sha256:bytes:2246d2229387b0b8333ea331c7e908267fd298ee62361328594ef0e1c0454261", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "f90bf0978ad3ec5d295b6d9d5e339207e3586b52567987aa1930881dd1f46e4e", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx_long_wind_and_tide_at_the_headland" + }, + { + "path": "template-gallery/reviews/ltx_long_wind_and_tide_at_the_headland.original-review.json", + "sha256": "sha256:bytes:d07b5483c13439d9addbf9e12c3a7bb1be8f7770ec1a895dab76387d3987560f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "f90bf0978ad3ec5d295b6d9d5e339207e3586b52567987aa1930881dd1f46e4e", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx_long_wind_and_tide_at_the_headland" + }, + { + "path": "template-gallery/reviews/ltx_long_wind_and_tide_at_the_headland.quality-review.json", + "sha256": "sha256:bytes:88a3a90318d651835043e95c78198db78dc4e1e47992c6c83798d8fc03f8994e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "f90bf0978ad3ec5d295b6d9d5e339207e3586b52567987aa1930881dd1f46e4e", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx_long_wind_and_tide_at_the_headland" + }, + { + "path": "template-gallery/reviews/ltx_long_wind_and_tide_at_the_headland.retained-template-provenance.json", + "sha256": "sha256:bytes:8a0c4e70cbe66ed06f4c7c5538dc6046533d3af2b6d416073878dee089096e60", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "f90bf0978ad3ec5d295b6d9d5e339207e3586b52567987aa1930881dd1f46e4e", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "ltx_long_wind_and_tide_at_the_headland" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/ltx_video_animated_story.quality-review.json", + "sha256": "sha256:bytes:1ec83b229ba5c7995c8ada2629c448334965939304ffddc7a70161c8b7e1b7f1", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "ltx_video_animated_story" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/ltx_video_animated_story.reviewed-provenance.json", + "sha256": "sha256:bytes:3910ae6f164eb978e38b16e1eab92d73fe7f55dac543b681416ba0b8c43b440d", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "ltx_video_animated_story" + }, + { + "path": "template-gallery/reviews/ltx_video_image_to_video.quality-review.json", + "sha256": "sha256:bytes:6c31e71b0b9e6a6a1c46f55e058dd208b7b2f510f6eeb332648575da388f9431", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "ltx_video_image_to_video", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/reviews/ltx_video_image_to_video.reviewed-provenance.json", + "sha256": "sha256:bytes:ff18a19dd44e03eb76e3879a7e49f1732cc9e6dba6affadcf370feafcc6cf06b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "ltx_video_image_to_video", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/ltx_video_long_showcase.quality-review.json", + "sha256": "sha256:bytes:60cbabfbf56d499a45000cdbabc3c4d64733de27638c1e8b127ba067f1918b9c", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "ltx_video_long_showcase" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/ltx_video_long_showcase.reviewed-provenance.json", + "sha256": "sha256:bytes:c2566ed4233b850092727e2bfc805d1be849c2b11cd9424e42283ff9e19b15d0", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "ltx_video_long_showcase" + }, + { + "path": "template-gallery/reviews/ltx_video_multi_reference.quality-review.json", + "sha256": "sha256:bytes:ccb132c3ffd2e929acca88d871c2f04ba9d0cd69d54750f303b58953a8b9bc93", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "ltx_video_multi_reference", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/reviews/ltx_video_multi_reference.reviewed-provenance.json", + "sha256": "sha256:bytes:9bdf09de275841af2f1f63ce0011dfc1eeaa703e2deeb2ebf678090abad80203", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "ltx_video_multi_reference", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/reviews/ltx_video_text_to_video.quality-review.json", + "sha256": "sha256:bytes:37f6a5c00110c6f9e306447a53691521c77db1ecf3cedf8210dd1e7ed10ea99d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "ltx_video_text_to_video", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/reviews/ltx_video_text_to_video.reviewed-provenance.json", + "sha256": "sha256:bytes:58bfc0b841177bc73dbde13effbf5eebcf9e8d618d3aa90aa8b19afc3a6e5132", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "ltx_video_text_to_video", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/ltx_video_video_to_video.quality-review.json", + "sha256": "sha256:bytes:819fd6d872b8e86bbb091980a435bd363216d069223dd694f65d7942aeb05178", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "ltx_video_video_to_video" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/ltx_video_video_to_video.reviewed-provenance.json", + "sha256": "sha256:bytes:9de3b2659acc8383ab86923bc7c9c87be3e53f3d894a06c77af8a16a155795a4", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "ltx_video_video_to_video" + }, + { + "path": "template-gallery/reviews/lumina2_larch_on_glacial_pond.original-provenance.json", + "sha256": "sha256:bytes:16e6a8baf35baec6d9e1be13523eaa5606174123b3a61274a257d5fbd14977f3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Alpha-VLLM/Lumina-Image-2.0/tree/53504abd8178b30685b6c4c7a4cd181ff78b73e9", + "sourceRevision": "Alpha-VLLM/Lumina-Image-2.0@53504abd8178b30685b6c4c7a4cd181ff78b73e9", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Alpha-VLLM/Lumina-Image-2.0/tree/53504abd8178b30685b6c4c7a4cd181ff78b73e9" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Alpha-VLLM/Lumina-Image-2.0@53504abd8178b30685b6c4c7a4cd181ff78b73e9 https://huggingface.co/Alpha-VLLM/Lumina-Image-2.0/tree/53504abd8178b30685b6c4c7a4cd181ff78b73e9" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "lumina2_larch_on_glacial_pond" + }, + { + "path": "template-gallery/reviews/lumina2_larch_on_glacial_pond.original-review.json", + "sha256": "sha256:bytes:3fa1cbf6c53ed5ce65f8d116779ff9dea32a9c52c8a0877fbb87f77f17237695", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Alpha-VLLM/Lumina-Image-2.0/tree/53504abd8178b30685b6c4c7a4cd181ff78b73e9", + "sourceRevision": "Alpha-VLLM/Lumina-Image-2.0@53504abd8178b30685b6c4c7a4cd181ff78b73e9", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Alpha-VLLM/Lumina-Image-2.0/tree/53504abd8178b30685b6c4c7a4cd181ff78b73e9" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Alpha-VLLM/Lumina-Image-2.0@53504abd8178b30685b6c4c7a4cd181ff78b73e9 https://huggingface.co/Alpha-VLLM/Lumina-Image-2.0/tree/53504abd8178b30685b6c4c7a4cd181ff78b73e9" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "lumina2_larch_on_glacial_pond" + }, + { + "path": "template-gallery/reviews/lumina2_larch_on_glacial_pond.quality-review.json", + "sha256": "sha256:bytes:527cf3a6d6a7820e09450d4a6d533e5d875a914bd2c8771c2060a513f712544e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Alpha-VLLM/Lumina-Image-2.0/tree/53504abd8178b30685b6c4c7a4cd181ff78b73e9", + "sourceRevision": "Alpha-VLLM/Lumina-Image-2.0@53504abd8178b30685b6c4c7a4cd181ff78b73e9", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Alpha-VLLM/Lumina-Image-2.0/tree/53504abd8178b30685b6c4c7a4cd181ff78b73e9" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Alpha-VLLM/Lumina-Image-2.0@53504abd8178b30685b6c4c7a4cd181ff78b73e9 https://huggingface.co/Alpha-VLLM/Lumina-Image-2.0/tree/53504abd8178b30685b6c4c7a4cd181ff78b73e9" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "lumina2_larch_on_glacial_pond" + }, + { + "path": "template-gallery/reviews/lumina2_larch_on_glacial_pond.retained-template-provenance.json", + "sha256": "sha256:bytes:d62e4d0a6e3739b95089003b3095611e419f62bcdc39befbb67aeba846aec0c8", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Alpha-VLLM/Lumina-Image-2.0/tree/53504abd8178b30685b6c4c7a4cd181ff78b73e9", + "sourceRevision": "Alpha-VLLM/Lumina-Image-2.0@53504abd8178b30685b6c4c7a4cd181ff78b73e9", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Alpha-VLLM/Lumina-Image-2.0/tree/53504abd8178b30685b6c4c7a4cd181ff78b73e9" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Alpha-VLLM/Lumina-Image-2.0@53504abd8178b30685b6c4c7a4cd181ff78b73e9 https://huggingface.co/Alpha-VLLM/Lumina-Image-2.0/tree/53504abd8178b30685b6c4c7a4cd181ff78b73e9" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "lumina2_larch_on_glacial_pond" + }, + { + "path": "template-gallery/reviews/lumina_opal_pendant_in_limestone.original-provenance.json", + "sha256": "sha256:bytes:1759ed2ceb7e564e568eced6f47a017c647dd549c2ebdf6e414310d8445a4fd4", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Alpha-VLLM/Lumina-Next-SFT-diffusers/tree/0ee5ec90043acf5cb41fe96274af36eb7fad8d95", + "sourceRevision": "Alpha-VLLM/Lumina-Next-SFT-diffusers@0ee5ec90043acf5cb41fe96274af36eb7fad8d95", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Alpha-VLLM/Lumina-Next-SFT-diffusers/blob/0ee5ec90043acf5cb41fe96274af36eb7fad8d95/README.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Alpha-VLLM/Lumina-Next-SFT-diffusers@0ee5ec90043acf5cb41fe96274af36eb7fad8d95 https://huggingface.co/Alpha-VLLM/Lumina-Next-SFT-diffusers/tree/0ee5ec90043acf5cb41fe96274af36eb7fad8d95" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "lumina_opal_pendant_in_limestone" + }, + { + "path": "template-gallery/reviews/lumina_opal_pendant_in_limestone.original-review.json", + "sha256": "sha256:bytes:11b0b3259e607f479a30ccb2c6f530ff41cb6367245961c43f56ccad21babfb7", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Alpha-VLLM/Lumina-Next-SFT-diffusers/tree/0ee5ec90043acf5cb41fe96274af36eb7fad8d95", + "sourceRevision": "Alpha-VLLM/Lumina-Next-SFT-diffusers@0ee5ec90043acf5cb41fe96274af36eb7fad8d95", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Alpha-VLLM/Lumina-Next-SFT-diffusers/blob/0ee5ec90043acf5cb41fe96274af36eb7fad8d95/README.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Alpha-VLLM/Lumina-Next-SFT-diffusers@0ee5ec90043acf5cb41fe96274af36eb7fad8d95 https://huggingface.co/Alpha-VLLM/Lumina-Next-SFT-diffusers/tree/0ee5ec90043acf5cb41fe96274af36eb7fad8d95" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "lumina_opal_pendant_in_limestone" + }, + { + "path": "template-gallery/reviews/lumina_opal_pendant_in_limestone.quality-review.json", + "sha256": "sha256:bytes:4566c14128c7a9a7b32d92d927cff0c2ca12bb392328bd692272130e0c5fe387", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Alpha-VLLM/Lumina-Next-SFT-diffusers/tree/0ee5ec90043acf5cb41fe96274af36eb7fad8d95", + "sourceRevision": "Alpha-VLLM/Lumina-Next-SFT-diffusers@0ee5ec90043acf5cb41fe96274af36eb7fad8d95", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Alpha-VLLM/Lumina-Next-SFT-diffusers/blob/0ee5ec90043acf5cb41fe96274af36eb7fad8d95/README.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Alpha-VLLM/Lumina-Next-SFT-diffusers@0ee5ec90043acf5cb41fe96274af36eb7fad8d95 https://huggingface.co/Alpha-VLLM/Lumina-Next-SFT-diffusers/tree/0ee5ec90043acf5cb41fe96274af36eb7fad8d95" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "lumina_opal_pendant_in_limestone" + }, + { + "path": "template-gallery/reviews/lumina_opal_pendant_in_limestone.retained-template-provenance.json", + "sha256": "sha256:bytes:a4e3e7b9be7fdd489f3876e63e7d0e9ed65508e84eabb0a673719251d3d46e0e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Alpha-VLLM/Lumina-Next-SFT-diffusers/tree/0ee5ec90043acf5cb41fe96274af36eb7fad8d95", + "sourceRevision": "Alpha-VLLM/Lumina-Next-SFT-diffusers@0ee5ec90043acf5cb41fe96274af36eb7fad8d95", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Alpha-VLLM/Lumina-Next-SFT-diffusers/blob/0ee5ec90043acf5cb41fe96274af36eb7fad8d95/README.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Alpha-VLLM/Lumina-Next-SFT-diffusers@0ee5ec90043acf5cb41fe96274af36eb7fad8d95 https://huggingface.co/Alpha-VLLM/Lumina-Next-SFT-diffusers/tree/0ee5ec90043acf5cb41fe96274af36eb7fad8d95" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "lumina_opal_pendant_in_limestone" + }, + { + "path": "template-gallery/reviews/marigold_depth_synthetic_ramp.quality-review.json", + "sha256": "sha256:bytes:17c3bbb2da127558c468e58ccc2bb08a9b78d4f07f901d483cfe8092732ebb42", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted retained Gallery provenance, review, or registration metadata", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "MoDiff-authored exact fixture or Gallery metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-19", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "e604b0284a57b65b20343c7776511ae15bef922c7e104c09f0f6931eec610d2d", + "publicationBasis": "Activate and publish the two approved Gallery candidates using their retained native runs.", + "provenanceTemplateId": "marigold_depth_synthetic_ramp" + }, + { + "path": "template-gallery/reviews/marigold_depth_synthetic_ramp.retained-template-provenance.json", + "sha256": "sha256:bytes:57b1487ecee6f44016512e1e1ce5c8135e963add06b1519b7e6007cb83184ae0", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted retained Gallery provenance, review, or registration metadata", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "MoDiff-authored exact fixture or Gallery metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-19", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "e604b0284a57b65b20343c7776511ae15bef922c7e104c09f0f6931eec610d2d", + "publicationBasis": "Activate and publish the two approved Gallery candidates using their retained native runs.", + "provenanceTemplateId": "marigold_depth_synthetic_ramp" + }, + { + "path": "template-gallery/reviews/minimax_h3_image_old_town_cat.quality-review.json", + "sha256": "sha256:bytes:ce9fc2a0edaaf3eef1f3db03024d3e64108523e93fc2797fee7cbe7364e7ce97", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Project-authored current-recipe review or redacted provenance for the saved image", + "sourceUrl": "https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/tree/492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceRevision": "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [ + "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439: MiniMax H3 Image Community License Agreement" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-19", + "reviewClass": "per-file-maintainer-accepted-current-recipe", + "humanApprovalPacketSHA256": "97cf1d2ce0a8500d5b3b67ff4efb20a2e91c44a6f1e22d3eafd7b408babc31a2", + "provenanceTemplateId": "minimax_h3_image_old_town_cat" + }, + { + "path": "template-gallery/reviews/minimax_h3_image_old_town_cat.reviewed-provenance.json", + "sha256": "sha256:bytes:9d5792710da6b60188994c51bfa1ac49047121433d83961cd58d22b9caf6030c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Project-authored current-recipe review or redacted provenance for the saved image", + "sourceUrl": "https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/tree/492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceRevision": "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [ + "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439: MiniMax H3 Image Community License Agreement" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-19", + "reviewClass": "per-file-maintainer-accepted-current-recipe", + "humanApprovalPacketSHA256": "97cf1d2ce0a8500d5b3b67ff4efb20a2e91c44a6f1e22d3eafd7b408babc31a2", + "provenanceTemplateId": "minimax_h3_image_old_town_cat" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/minimax_music3_chamber_pop.quality-review.json", + "sha256": "sha256:bytes:cd83b77fc2ccb4b11263406c12dc9d0d222af582e52dc47b77c18a4243462502", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "minimax_music3_chamber_pop" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/minimax_music3_chamber_pop.reviewed-provenance.json", + "sha256": "sha256:bytes:1b2c91a45c40a7d6621bee54083d3e02d9b843d1034c06e3284ff8f1a2e44270", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "minimax_music3_chamber_pop" + }, + { + "path": "template-gallery/reviews/mochi_surf_over_dark_pebbles.original-provenance.json", + "sha256": "sha256:bytes:74b784153cf2626a77aee1e9f6ec452261b07350b643e152f23e864e7ef6259f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/genmo/mochi-1-preview/tree/14be5fcea23095ed330cb214647916a451e38b6e", + "sourceRevision": "genmo/mochi-1-preview@14be5fcea23095ed330cb214647916a451e38b6e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/genmo/mochi-1-preview/tree/14be5fcea23095ed330cb214647916a451e38b6e" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "genmo/mochi-1-preview@14be5fcea23095ed330cb214647916a451e38b6e https://huggingface.co/genmo/mochi-1-preview/tree/14be5fcea23095ed330cb214647916a451e38b6e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "mochi_surf_over_dark_pebbles" + }, + { + "path": "template-gallery/reviews/mochi_surf_over_dark_pebbles.original-review.json", + "sha256": "sha256:bytes:9b8bf5f3fe30fad3bb2bb970e6749a3f7f89ce7946eef3484c840167af3f86f9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/genmo/mochi-1-preview/tree/14be5fcea23095ed330cb214647916a451e38b6e", + "sourceRevision": "genmo/mochi-1-preview@14be5fcea23095ed330cb214647916a451e38b6e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/genmo/mochi-1-preview/tree/14be5fcea23095ed330cb214647916a451e38b6e" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "genmo/mochi-1-preview@14be5fcea23095ed330cb214647916a451e38b6e https://huggingface.co/genmo/mochi-1-preview/tree/14be5fcea23095ed330cb214647916a451e38b6e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "mochi_surf_over_dark_pebbles" + }, + { + "path": "template-gallery/reviews/mochi_surf_over_dark_pebbles.quality-review.json", + "sha256": "sha256:bytes:124e335657f246c8f498b5ebc7d259522bba555c763c9a51fda3596c143690b2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/genmo/mochi-1-preview/tree/14be5fcea23095ed330cb214647916a451e38b6e", + "sourceRevision": "genmo/mochi-1-preview@14be5fcea23095ed330cb214647916a451e38b6e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/genmo/mochi-1-preview/tree/14be5fcea23095ed330cb214647916a451e38b6e" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "genmo/mochi-1-preview@14be5fcea23095ed330cb214647916a451e38b6e https://huggingface.co/genmo/mochi-1-preview/tree/14be5fcea23095ed330cb214647916a451e38b6e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "mochi_surf_over_dark_pebbles" + }, + { + "path": "template-gallery/reviews/mochi_surf_over_dark_pebbles.retained-template-provenance.json", + "sha256": "sha256:bytes:284c2a0297b7e9f83f84b23ce94062462611273672b580b1f65311455803b45f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/genmo/mochi-1-preview/tree/14be5fcea23095ed330cb214647916a451e38b6e", + "sourceRevision": "genmo/mochi-1-preview@14be5fcea23095ed330cb214647916a451e38b6e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/genmo/mochi-1-preview/tree/14be5fcea23095ed330cb214647916a451e38b6e" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "genmo/mochi-1-preview@14be5fcea23095ed330cb214647916a451e38b6e https://huggingface.co/genmo/mochi-1-preview/tree/14be5fcea23095ed330cb214647916a451e38b6e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "mochi_surf_over_dark_pebbles" + }, + { + "path": "template-gallery/reviews/ochre_paper_pavilion.original-provenance.json", + "sha256": "sha256:bytes:5fab665db87b17f2c4cea8e3903ac6df84232912fc2abaabee3bf3107542dc96", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/zai-org/CogView3-Plus-3B/tree/5d70e40732ac0efac98524c51a7fa9c82707f1e5", + "sourceRevision": "zai-org/CogView3-Plus-3B@5d70e40732ac0efac98524c51a7fa9c82707f1e5", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/zai-org/CogView3-Plus-3B/tree/5d70e40732ac0efac98524c51a7fa9c82707f1e5" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "zai-org/CogView3-Plus-3B@5d70e40732ac0efac98524c51a7fa9c82707f1e5 https://huggingface.co/zai-org/CogView3-Plus-3B/tree/5d70e40732ac0efac98524c51a7fa9c82707f1e5" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "ochre_paper_pavilion" + }, + { + "path": "template-gallery/reviews/ochre_paper_pavilion.original-review.json", + "sha256": "sha256:bytes:6e31d3ec89e61e8b5722fb93db8f7bb7ea8328bf1c055028ba44c18affacf058", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/zai-org/CogView3-Plus-3B/tree/5d70e40732ac0efac98524c51a7fa9c82707f1e5", + "sourceRevision": "zai-org/CogView3-Plus-3B@5d70e40732ac0efac98524c51a7fa9c82707f1e5", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/zai-org/CogView3-Plus-3B/tree/5d70e40732ac0efac98524c51a7fa9c82707f1e5" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "zai-org/CogView3-Plus-3B@5d70e40732ac0efac98524c51a7fa9c82707f1e5 https://huggingface.co/zai-org/CogView3-Plus-3B/tree/5d70e40732ac0efac98524c51a7fa9c82707f1e5" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "ochre_paper_pavilion" + }, + { + "path": "template-gallery/reviews/ochre_paper_pavilion.quality-review.json", + "sha256": "sha256:bytes:a635772ae5b26758629581843258dea266c7e85934eb222d4884b9a2522a93c1", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/zai-org/CogView3-Plus-3B/tree/5d70e40732ac0efac98524c51a7fa9c82707f1e5", + "sourceRevision": "zai-org/CogView3-Plus-3B@5d70e40732ac0efac98524c51a7fa9c82707f1e5", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/zai-org/CogView3-Plus-3B/tree/5d70e40732ac0efac98524c51a7fa9c82707f1e5" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "zai-org/CogView3-Plus-3B@5d70e40732ac0efac98524c51a7fa9c82707f1e5 https://huggingface.co/zai-org/CogView3-Plus-3B/tree/5d70e40732ac0efac98524c51a7fa9c82707f1e5" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "ochre_paper_pavilion" + }, + { + "path": "template-gallery/reviews/ochre_paper_pavilion.retained-template-provenance.json", + "sha256": "sha256:bytes:9bd899fe903bcc05057c1ae452c641700d9c36b5001b499dadba6a6a07e36e80", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/zai-org/CogView3-Plus-3B/tree/5d70e40732ac0efac98524c51a7fa9c82707f1e5", + "sourceRevision": "zai-org/CogView3-Plus-3B@5d70e40732ac0efac98524c51a7fa9c82707f1e5", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/zai-org/CogView3-Plus-3B/tree/5d70e40732ac0efac98524c51a7fa9c82707f1e5" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "zai-org/CogView3-Plus-3B@5d70e40732ac0efac98524c51a7fa9c82707f1e5 https://huggingface.co/zai-org/CogView3-Plus-3B/tree/5d70e40732ac0efac98524c51a7fa9c82707f1e5" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "ochre_paper_pavilion" + }, + { + "path": "template-gallery/reviews/omnigen_cobalt_against_soft_apricot.original-provenance.json", + "sha256": "sha256:bytes:88ee6e3f6d910a68983aedb6b0cb553cad2341ca72627f2d6c578ecfefe1d760", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268", + "sourceRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268 https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "omnigen_cobalt_against_soft_apricot" + }, + { + "path": "template-gallery/reviews/omnigen_cobalt_against_soft_apricot.original-review.json", + "sha256": "sha256:bytes:ae25cda076716b4dfe73095b1bcaa75418984db19fda3592f60335da9194e3e2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268", + "sourceRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268 https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "omnigen_cobalt_against_soft_apricot" + }, + { + "path": "template-gallery/reviews/omnigen_cobalt_against_soft_apricot.quality-review.json", + "sha256": "sha256:bytes:f81904cbc14984f2916d4d26b20a38d7e90f46aa967bead471d642c0196ad273", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268", + "sourceRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268 https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "omnigen_cobalt_against_soft_apricot" + }, + { + "path": "template-gallery/reviews/omnigen_cobalt_against_soft_apricot.retained-template-provenance.json", + "sha256": "sha256:bytes:1ac31719c0a2fcf0c59ebf8c1f6fbcff2be9847aa23b748c1bb43a706b8f14fd", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268", + "sourceRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268 https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "omnigen_cobalt_against_soft_apricot" + }, + { + "path": "template-gallery/reviews/omnigen_red_enamel_folded_linen.original-provenance.json", + "sha256": "sha256:bytes:01821146c4f81aa3eef581cd4bfedfa892d75176804ecf4cc7b3ed859779e087", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268", + "sourceRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268 https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "omnigen_red_enamel_folded_linen" + }, + { + "path": "template-gallery/reviews/omnigen_red_enamel_folded_linen.original-review.json", + "sha256": "sha256:bytes:9e64209e76a4bbdcefe54ffae53c9d71d6e2166d84fb605a891c9600c0d85ec3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268", + "sourceRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268 https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "omnigen_red_enamel_folded_linen" + }, + { + "path": "template-gallery/reviews/omnigen_red_enamel_folded_linen.quality-review.json", + "sha256": "sha256:bytes:01c77e3b3474145e708ee18122f5c81ed3364019c260e9888624c7e9a6ab784a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268", + "sourceRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268 https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "omnigen_red_enamel_folded_linen" + }, + { + "path": "template-gallery/reviews/omnigen_red_enamel_folded_linen.retained-template-provenance.json", + "sha256": "sha256:bytes:b066ad2d0e03b2eb348d588e3177a782062d463d50caa7c38bf1801449517e6e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268", + "sourceRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268 https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "omnigen_red_enamel_folded_linen" + }, + { + "path": "template-gallery/reviews/omnigen_tulips_after_rain.original-provenance.json", + "sha256": "sha256:bytes:cd37ada4ad60fccb5fece5fe6ef03dd62ba7a8a66eb141579f8fa424b6265d71", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268", + "sourceRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268 https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "omnigen_tulips_after_rain" + }, + { + "path": "template-gallery/reviews/omnigen_tulips_after_rain.original-review.json", + "sha256": "sha256:bytes:3353e7fabebfddfc0b47f2ebdd668c0ae01f426d9280d1e4ac03d307582b8cc3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268", + "sourceRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268 https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "omnigen_tulips_after_rain" + }, + { + "path": "template-gallery/reviews/omnigen_tulips_after_rain.quality-review.json", + "sha256": "sha256:bytes:333fbf9b662ef072cf2621b37b814052af11c4e219a6640376ba53a2ee4c154f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268", + "sourceRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268 https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "omnigen_tulips_after_rain" + }, + { + "path": "template-gallery/reviews/omnigen_tulips_after_rain.retained-template-provenance.json", + "sha256": "sha256:bytes:143b1e03664e187b0815b81948843d05bf9bf2bc664f9c92b7cd78c3b7755245", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268", + "sourceRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268 https://huggingface.co/Shitao/OmniGen-v1-diffusers/tree/016e2f61d12a98303f6bbdf122687694d7984268" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "omnigen_tulips_after_rain" + }, + { + "path": "template-gallery/reviews/persimmon_glaze.original-provenance.json", + "sha256": "sha256:bytes:dece98191d7fdcae395409a4ca8fb0f7eb215bc095660a8251d668f1dabd0054", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829", + "sourceRevision": "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829 https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "persimmon_glaze" + }, + { + "path": "template-gallery/reviews/persimmon_glaze.original-review.json", + "sha256": "sha256:bytes:3c97652cd91cc4af5660429652241efbe6675b20ec59c7abc73c3f1c185b491a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829", + "sourceRevision": "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829 https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "persimmon_glaze" + }, + { + "path": "template-gallery/reviews/persimmon_glaze.quality-review.json", + "sha256": "sha256:bytes:9c9afc7223597ea8ee65889581c40f1e9f6a63a2bab6d7827b6af207353909ad", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829", + "sourceRevision": "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829 https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "persimmon_glaze" + }, + { + "path": "template-gallery/reviews/persimmon_glaze.retained-template-provenance.json", + "sha256": "sha256:bytes:4813f96f9332d04d4b8b0fc8d30d51e110ab8d157a1aef7c6172474f09bb490f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829", + "sourceRevision": "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829 https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "persimmon_glaze" + }, + { + "path": "template-gallery/reviews/pixart_sigma_pag_pink_mascot.original-provenance.json", + "sha256": "sha256:bytes:14847afca116ec723f4a85007332a14b6cc31f52226c62ae6a04c2c7640982de", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207", + "sourceRevision": "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207 https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "efc64011c443b1678207c0dfd79e89def1c0dc3699668f058803e9044b4bd281", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "pixart_sigma_pag_pink_mascot" + }, + { + "path": "template-gallery/reviews/pixart_sigma_pag_pink_mascot.original-review.json", + "sha256": "sha256:bytes:332ba1b4fcd00c119b88015f82d40f13c985a294661b2c1f48f8b80c00a866b7", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207", + "sourceRevision": "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207 https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "efc64011c443b1678207c0dfd79e89def1c0dc3699668f058803e9044b4bd281", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "pixart_sigma_pag_pink_mascot" + }, + { + "path": "template-gallery/reviews/pixart_sigma_pag_pink_mascot.quality-review.json", + "sha256": "sha256:bytes:b2babd69ef190701f21b5831fef6b8a10f3999e0051db6b6e45226882f5db666", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207", + "sourceRevision": "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207 https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "efc64011c443b1678207c0dfd79e89def1c0dc3699668f058803e9044b4bd281", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "pixart_sigma_pag_pink_mascot" + }, + { + "path": "template-gallery/reviews/pixart_sigma_pag_pink_mascot.retained-template-provenance.json", + "sha256": "sha256:bytes:47d6baf48d8af2f0ba388dc5ffa2c9445a3b3a261056f07b0968c7a52b697315", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207", + "sourceRevision": "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207 https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "efc64011c443b1678207c0dfd79e89def1c0dc3699668f058803e9044b4bd281", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "pixart_sigma_pag_pink_mascot" + }, + { + "path": "template-gallery/reviews/pixart_sigma_terracotta_herbs.original-provenance.json", + "sha256": "sha256:bytes:50104329cd991e137b9fabe09a0177216e250f601eb076ecf26f055dc6e7c12b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207", + "sourceRevision": "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207 https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "efc64011c443b1678207c0dfd79e89def1c0dc3699668f058803e9044b4bd281", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "pixart_sigma_terracotta_herbs" + }, + { + "path": "template-gallery/reviews/pixart_sigma_terracotta_herbs.original-review.json", + "sha256": "sha256:bytes:a4fc8269ed81c851a2ba87c033f6a578343afafe612b1b74f5afd73315cbadcb", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207", + "sourceRevision": "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207 https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "efc64011c443b1678207c0dfd79e89def1c0dc3699668f058803e9044b4bd281", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "pixart_sigma_terracotta_herbs" + }, + { + "path": "template-gallery/reviews/pixart_sigma_terracotta_herbs.quality-review.json", + "sha256": "sha256:bytes:f8446ea6f8c3a4edd86455cfd8aa456b5c899a6e11cfa3e766aed2eccc99e6e4", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207", + "sourceRevision": "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207 https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "efc64011c443b1678207c0dfd79e89def1c0dc3699668f058803e9044b4bd281", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "pixart_sigma_terracotta_herbs" + }, + { + "path": "template-gallery/reviews/pixart_sigma_terracotta_herbs.retained-template-provenance.json", + "sha256": "sha256:bytes:143ee68055070094253340c78699cdfd77ea54a43ff6678400988c1b8f27b56e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207", + "sourceRevision": "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207 https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/e102b3591cc82e97071b8b4cb90d834d0c487207" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "efc64011c443b1678207c0dfd79e89def1c0dc3699668f058803e9044b4bd281", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "pixart_sigma_terracotta_herbs" + }, + { + "path": "template-gallery/reviews/pomegranate_on_blue_linen.original-provenance.json", + "sha256": "sha256:bytes:b9cecf2139bc5a0e5d6a3db462caf017c4d54482267592bf220f5015f7ae690b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "creativeml-openrail-m. https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "pomegranate_on_blue_linen" + }, + { + "path": "template-gallery/reviews/pomegranate_on_blue_linen.original-review.json", + "sha256": "sha256:bytes:752b7cc115a3794d1066785e887b73e3eed5f3bb6735ef5ec89c45035b20d7e4", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "creativeml-openrail-m. https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "pomegranate_on_blue_linen" + }, + { + "path": "template-gallery/reviews/pomegranate_on_blue_linen.quality-review.json", + "sha256": "sha256:bytes:412a9940d2e86768a91a54c8d1282d46ff638f86d94d6582e81738f32c2749ab", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "creativeml-openrail-m. https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "pomegranate_on_blue_linen" + }, + { + "path": "template-gallery/reviews/pomegranate_on_blue_linen.retained-template-provenance.json", + "sha256": "sha256:bytes:15ad50f1686ae7dca486dba01974ad9155dbfc694b97b824314c257e316c185e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "creativeml-openrail-m. https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "pomegranate_on_blue_linen" + }, + { + "path": "template-gallery/reviews/porcelain_on_slate_linen.original-provenance.json", + "sha256": "sha256:bytes:a20717be541cf1ac1dc84a8b7fdfd82f0dfedd5ec322ec1e257654a978ab1842", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7/tree/a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5", + "sourceRevision": "SimianLuo/LCM_Dreamshaper_v7@a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "mit. https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7/tree/a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "SimianLuo/LCM_Dreamshaper_v7@a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5 https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7/tree/a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "porcelain_on_slate_linen" + }, + { + "path": "template-gallery/reviews/porcelain_on_slate_linen.original-review.json", + "sha256": "sha256:bytes:8f6972bd24388616958f18d53ba39b7a9626fd23ef2470a96e888d01599ee303", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7/tree/a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5", + "sourceRevision": "SimianLuo/LCM_Dreamshaper_v7@a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "mit. https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7/tree/a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "SimianLuo/LCM_Dreamshaper_v7@a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5 https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7/tree/a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "porcelain_on_slate_linen" + }, + { + "path": "template-gallery/reviews/porcelain_on_slate_linen.quality-review.json", + "sha256": "sha256:bytes:aa85f397af28e1ca7da538dae08a96d1ff3452c5542f72419447fa5635a2aab3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7/tree/a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5", + "sourceRevision": "SimianLuo/LCM_Dreamshaper_v7@a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "mit. https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7/tree/a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "SimianLuo/LCM_Dreamshaper_v7@a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5 https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7/tree/a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "porcelain_on_slate_linen" + }, + { + "path": "template-gallery/reviews/porcelain_on_slate_linen.retained-template-provenance.json", + "sha256": "sha256:bytes:e1d8fb3b54f1fc0c1d4e3560d9a7d829aaf81d22f3cd543809051b38b598a396", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7/tree/a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5", + "sourceRevision": "SimianLuo/LCM_Dreamshaper_v7@a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "mit. https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7/tree/a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "SimianLuo/LCM_Dreamshaper_v7@a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5 https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7/tree/a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "porcelain_on_slate_linen" + }, + { + "path": "template-gallery/reviews/quiet_current.original-provenance.json", + "sha256": "sha256:bytes:6831c3577cf90fa0a6606497bd13844a9b25d4371f1b402efe9b099e8a58d42c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/zai-org/CogView4-6B/tree/63a52b7f6dace7033380cd6da14d0915eab3e6b5", + "sourceRevision": "zai-org/CogView4-6B@63a52b7f6dace7033380cd6da14d0915eab3e6b5", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/zai-org/CogView4-6B/tree/63a52b7f6dace7033380cd6da14d0915eab3e6b5" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "zai-org/CogView4-6B@63a52b7f6dace7033380cd6da14d0915eab3e6b5 https://huggingface.co/zai-org/CogView4-6B/tree/63a52b7f6dace7033380cd6da14d0915eab3e6b5" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "quiet_current" + }, + { + "path": "template-gallery/reviews/quiet_current.original-review.json", + "sha256": "sha256:bytes:c1596743b2612f0bfcda8cf8d21b3e6bec1c570710c73e19e82d7d6aaea9b61c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/zai-org/CogView4-6B/tree/63a52b7f6dace7033380cd6da14d0915eab3e6b5", + "sourceRevision": "zai-org/CogView4-6B@63a52b7f6dace7033380cd6da14d0915eab3e6b5", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/zai-org/CogView4-6B/tree/63a52b7f6dace7033380cd6da14d0915eab3e6b5" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "zai-org/CogView4-6B@63a52b7f6dace7033380cd6da14d0915eab3e6b5 https://huggingface.co/zai-org/CogView4-6B/tree/63a52b7f6dace7033380cd6da14d0915eab3e6b5" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "quiet_current" + }, + { + "path": "template-gallery/reviews/quiet_current.quality-review.json", + "sha256": "sha256:bytes:2387a8febca71a20ea416bb6db610de9c442c584f64bd913eb66cf3688d84773", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/zai-org/CogView4-6B/tree/63a52b7f6dace7033380cd6da14d0915eab3e6b5", + "sourceRevision": "zai-org/CogView4-6B@63a52b7f6dace7033380cd6da14d0915eab3e6b5", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/zai-org/CogView4-6B/tree/63a52b7f6dace7033380cd6da14d0915eab3e6b5" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "zai-org/CogView4-6B@63a52b7f6dace7033380cd6da14d0915eab3e6b5 https://huggingface.co/zai-org/CogView4-6B/tree/63a52b7f6dace7033380cd6da14d0915eab3e6b5" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "quiet_current" + }, + { + "path": "template-gallery/reviews/quiet_current.retained-template-provenance.json", + "sha256": "sha256:bytes:888aecdcb91637d93c268a9ad7b615ca545e7b73e2f1caf064c12bf4a0681655", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/zai-org/CogView4-6B/tree/63a52b7f6dace7033380cd6da14d0915eab3e6b5", + "sourceRevision": "zai-org/CogView4-6B@63a52b7f6dace7033380cd6da14d0915eab3e6b5", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/zai-org/CogView4-6B/tree/63a52b7f6dace7033380cd6da14d0915eab3e6b5" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "zai-org/CogView4-6B@63a52b7f6dace7033380cd6da14d0915eab3e6b5 https://huggingface.co/zai-org/CogView4-6B/tree/63a52b7f6dace7033380cd6da14d0915eab3e6b5" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "quiet_current" + }, + { + "path": "template-gallery/reviews/quiet_kiln_at_daybreak.original-provenance.json", + "sha256": "sha256:bytes:a4b6c9950b2f2f6d185eb574ad4acddec21e2015fcf8d50bd14195ed24dcee97", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/NucleusAI/Nucleus-Image/tree/5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa", + "sourceRevision": "NucleusAI/Nucleus-Image@5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Apache-2.0 per the publisher at this revision. https://huggingface.co/NucleusAI/Nucleus-Image/tree/5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "NucleusAI/Nucleus-Image@5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa https://huggingface.co/NucleusAI/Nucleus-Image/tree/5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "quiet_kiln_at_daybreak" + }, + { + "path": "template-gallery/reviews/quiet_kiln_at_daybreak.original-review.json", + "sha256": "sha256:bytes:b76ab6d15da10b9d6fb9ddfd83af0abf2f56ca962aac6ab65c78ae231a74d2bd", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/NucleusAI/Nucleus-Image/tree/5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa", + "sourceRevision": "NucleusAI/Nucleus-Image@5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Apache-2.0 per the publisher at this revision. https://huggingface.co/NucleusAI/Nucleus-Image/tree/5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "NucleusAI/Nucleus-Image@5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa https://huggingface.co/NucleusAI/Nucleus-Image/tree/5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "quiet_kiln_at_daybreak" + }, + { + "path": "template-gallery/reviews/quiet_kiln_at_daybreak.quality-review.json", + "sha256": "sha256:bytes:b0118affa79b69e333c6a7977aa8c47328d570dd374aa212f0a371ec5a4a353b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/NucleusAI/Nucleus-Image/tree/5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa", + "sourceRevision": "NucleusAI/Nucleus-Image@5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Apache-2.0 per the publisher at this revision. https://huggingface.co/NucleusAI/Nucleus-Image/tree/5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "NucleusAI/Nucleus-Image@5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa https://huggingface.co/NucleusAI/Nucleus-Image/tree/5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "quiet_kiln_at_daybreak" + }, + { + "path": "template-gallery/reviews/quiet_kiln_at_daybreak.retained-template-provenance.json", + "sha256": "sha256:bytes:ae5db3f69f0a3ae1ad178ca986819e1b8cb1ccdf50c9b3850d5ec2e7d745ba8d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/NucleusAI/Nucleus-Image/tree/5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa", + "sourceRevision": "NucleusAI/Nucleus-Image@5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Apache-2.0 per the publisher at this revision. https://huggingface.co/NucleusAI/Nucleus-Image/tree/5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "NucleusAI/Nucleus-Image@5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa https://huggingface.co/NucleusAI/Nucleus-Image/tree/5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "quiet_kiln_at_daybreak" + }, + { + "path": "template-gallery/reviews/qwen_2511_pale_amber_on_limestone.original-provenance.json", + "sha256": "sha256:bytes:92184da315494eafd5ffb5f97e0b6b16b9adc7e2900cfe2159a74eb95f2c664d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceRevision": "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9 https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_2511_pale_amber_on_limestone" + }, + { + "path": "template-gallery/reviews/qwen_2511_pale_amber_on_limestone.original-review.json", + "sha256": "sha256:bytes:c927ac13e8f20facd97ba72db03ae4fc658d5b2b5120a9473d2bcd280e01356c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceRevision": "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9 https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_2511_pale_amber_on_limestone" + }, + { + "path": "template-gallery/reviews/qwen_2511_pale_amber_on_limestone.quality-review.json", + "sha256": "sha256:bytes:1448c1f4aeddd0ca2238d62a91db71644d723172bad44eee0f62618f89580160", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceRevision": "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9 https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_2511_pale_amber_on_limestone" + }, + { + "path": "template-gallery/reviews/qwen_2511_pale_amber_on_limestone.retained-template-provenance.json", + "sha256": "sha256:bytes:0d91cc6e5417f0defc5ef7615cc85f19de32bf6732e01e75d6051b94be8df0d8", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceRevision": "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9 https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_2511_pale_amber_on_limestone" + }, + { + "path": "template-gallery/reviews/qwen_2511_terracotta_material_transfer.original-provenance.json", + "sha256": "sha256:bytes:accd52fe0dc925cda9f3ad31546498422faf762eaae9d5efc1d1c7ab8b2bceb1", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceRevision": "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9 https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_2511_terracotta_material_transfer" + }, + { + "path": "template-gallery/reviews/qwen_2511_terracotta_material_transfer.original-review.json", + "sha256": "sha256:bytes:6fa09481a5e8937cf2afa452c0f6b0da53124a5ff556756d3c970235d22eeb8f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceRevision": "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9 https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_2511_terracotta_material_transfer" + }, + { + "path": "template-gallery/reviews/qwen_2511_terracotta_material_transfer.quality-review.json", + "sha256": "sha256:bytes:c069a461b67cb90ade5f906200db6359e17ecda252d305bc8e6bc7fe9df15786", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceRevision": "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9 https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_2511_terracotta_material_transfer" + }, + { + "path": "template-gallery/reviews/qwen_2511_terracotta_material_transfer.retained-template-provenance.json", + "sha256": "sha256:bytes:d4b364f299fcce02bee7cdacad3d915d2c8a916b1b97fb9d77f8fa88146c899f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceRevision": "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9 https://huggingface.co/Qwen/Qwen-Image-Edit-2511/tree/6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_2511_terracotta_material_transfer" + }, + { + "path": "template-gallery/reviews/qwen_2512_cobalt_backdrop_repair.original-provenance.json", + "sha256": "sha256:bytes:aff76ebb3392dc74718791d4d3e964e12ed333818e3e3004c2b00efdb1065cda", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26 https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_2512_cobalt_backdrop_repair" + }, + { + "path": "template-gallery/reviews/qwen_2512_cobalt_backdrop_repair.original-review.json", + "sha256": "sha256:bytes:87b770beaa2fa2fbbc469450467e7ba7fd0c1f79e227cc24ba1e226e8b4af900", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26 https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_2512_cobalt_backdrop_repair" + }, + { + "path": "template-gallery/reviews/qwen_2512_cobalt_backdrop_repair.quality-review.json", + "sha256": "sha256:bytes:cfe7231165788dcb08f50c7d45ab5f0953fd96c92da8d1ecd428af7d0a20cbce", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26 https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_2512_cobalt_backdrop_repair" + }, + { + "path": "template-gallery/reviews/qwen_2512_cobalt_backdrop_repair.retained-template-provenance.json", + "sha256": "sha256:bytes:7303db8a55bb4bfb9947f5d501be2907de1da8ebe0e8972578567e04d33ad336", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26 https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_2512_cobalt_backdrop_repair" + }, + { + "path": "template-gallery/reviews/qwen_bookshop_gouache.original-provenance.json", + "sha256": "sha256:bytes:4af138819ecda66dc7754a8ea6886ca1bb324540a235b73b14c3d2bb547e58de", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26 https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_bookshop_gouache" + }, + { + "path": "template-gallery/reviews/qwen_bookshop_gouache.original-review.json", + "sha256": "sha256:bytes:3b34b326d7200df17d7e8ef42964bf5398dd8216fef84e09ec974c7007101271", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26 https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_bookshop_gouache" + }, + { + "path": "template-gallery/reviews/qwen_bookshop_gouache.quality-review.json", + "sha256": "sha256:bytes:94fe1a1dd8188e3f6860c7154e414c605cc8f94e79524fa5dc6f0bb557f23a98", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26 https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_bookshop_gouache" + }, + { + "path": "template-gallery/reviews/qwen_bookshop_gouache.retained-template-provenance.json", + "sha256": "sha256:bytes:7b9356ca691735f772c1a0e914393459401f84cd012e782e4f0d940fac255648", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26 https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_bookshop_gouache" + }, + { + "path": "template-gallery/reviews/qwen_character_angles.quality-review.json", + "sha256": "sha256:bytes:748fb8b3839911be02f80185d329b5b028456c78916da6ad07349e0086b0f106", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the explicitly approved native Linux Qwen character angle sheet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-qwen-angle-native-image-registration", + "provenanceTemplateId": "qwen_character_angles", + "humanApprovalPacketSHA256": "9ca0bb197dbad8a2a27b25cef64aff67875aa6ea6f69fcb3bff581aae35b43d5" + }, + { + "path": "template-gallery/reviews/qwen_character_angles.reviewed-provenance.json", + "sha256": "sha256:bytes:a4d880bcad84c21fe3787001fceb2f9b2f4042fe83e1e2c6733d0f578a586c66", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the explicitly approved native Linux Qwen character angle sheet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-qwen-angle-native-image-registration", + "provenanceTemplateId": "qwen_character_angles", + "humanApprovalPacketSHA256": "9ca0bb197dbad8a2a27b25cef64aff67875aa6ea6f69fcb3bff581aae35b43d5" + }, + { + "path": "template-gallery/reviews/qwen_cobalt_on_charcoal_slate.original-provenance.json", + "sha256": "sha256:bytes:e792e4d45eff40be63575b5d1b983d59aabdecf004890c98e828f6b58a1d549b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_cobalt_on_charcoal_slate" + }, + { + "path": "template-gallery/reviews/qwen_cobalt_on_charcoal_slate.original-review.json", + "sha256": "sha256:bytes:d2caf52b07dff116307a43afe1f087fe17cb98f2daa8549ec5e5c2331e0fac2f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_cobalt_on_charcoal_slate" + }, + { + "path": "template-gallery/reviews/qwen_cobalt_on_charcoal_slate.quality-review.json", + "sha256": "sha256:bytes:492e8a71b24369a4f96ae8e7781fe6926274d5871066c2ae371165026bb585fc", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_cobalt_on_charcoal_slate" + }, + { + "path": "template-gallery/reviews/qwen_cobalt_on_charcoal_slate.retained-template-provenance.json", + "sha256": "sha256:bytes:416a58ebfb2db64e9d1e75995cd8b6e8151b60a60600c9bfe33a472b2c31d8bb", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de https://huggingface.co/Qwen/Qwen-Image-Edit/tree/ac7f9318f633fc4b5778c59367c8128225f1e3de" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_cobalt_on_charcoal_slate" + }, + { + "path": "template-gallery/reviews/qwen_control_image_layout.quality-review.json", + "sha256": "sha256:bytes:96b21e77ef524c853732f9ee920cb0cc6306fae984a78c798aab7cc1314b1c4b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_control_image_layout", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/reviews/qwen_control_image_layout.reviewed-provenance.json", + "sha256": "sha256:bytes:63f6695ce2fd38c8014d2de5216bd4a681c207496d5eaad9ec3906a545ca2820", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304", + "humanApprovalScope": "The maintainer explicitly approved the proposed 4/5 scores, known limits, exact retained Klein two-reference derivative output, its redacted technical/quality metadata, and permission to make and redistribute this derivative under Apache-2.0. Existing source images and their mixed license records remain unchanged; no other assets or held cases are newly approved.", + "provenanceTemplateId": "qwen_control_image_layout" + }, + { + "path": "template-gallery/reviews/qwen_control_winter_cabin_blue_hour.original-provenance.json", + "sha256": "sha256:bytes:a58317e01fd2bffeb6a261279a595539d058304a8c5965c89e43ef6680273fc4", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26 https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_control_winter_cabin_blue_hour" + }, + { + "path": "template-gallery/reviews/qwen_control_winter_cabin_blue_hour.original-review.json", + "sha256": "sha256:bytes:b01f4a91833a2f141f512cb5caee5eeff76481a829590260f823b500824bab24", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26 https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_control_winter_cabin_blue_hour" + }, + { + "path": "template-gallery/reviews/qwen_control_winter_cabin_blue_hour.quality-review.json", + "sha256": "sha256:bytes:b83d8bef8d87dbd5e4587904a947f82d9a2353224781b1581dae0684b86eab65", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26 https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_control_winter_cabin_blue_hour" + }, + { + "path": "template-gallery/reviews/qwen_control_winter_cabin_blue_hour.retained-template-provenance.json", + "sha256": "sha256:bytes:6c21a60f83581753a9e54647ce49a82c877f23a30ea2161be13e675e26eeb0db", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26 https://huggingface.co/Qwen/Qwen-Image-2512/tree/25468b98e3276ca6700de15c6628e51b7de54a26" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_control_winter_cabin_blue_hour" + }, + { + "path": "template-gallery/reviews/qwen_edit_plus_single_image.quality-review.json", + "sha256": "sha256:bytes:bd2066932a1749ee87c340450d232ed2d8f919648ae9e1e64b9ea30f531d73d7", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_edit_plus_single_image", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/reviews/qwen_edit_plus_single_image.reviewed-provenance.json", + "sha256": "sha256:bytes:4b672fc3ddc522c44a41c7065cefda8c82d2d5be5ab7f01375b19cc93e029fe8", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d", + "humanApprovalScope": "The maintainer explicitly approved the proposed 4/5 scores, known limits, exact retained Klein two-reference derivative output, its redacted technical/quality metadata, and permission to make and redistribute this derivative under Apache-2.0. Existing source images and their mixed license records remain unchanged; no other assets or held cases are newly approved.", + "provenanceTemplateId": "qwen_edit_plus_single_image" + }, + { + "path": "template-gallery/reviews/qwen_edit_strength_sweep.quality-review.json", + "sha256": "sha256:bytes:c0632baaea92783a73856fd89295df7ddea9b07712a35311f81fd2c8ca9c0727", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_edit_strength_sweep", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/reviews/qwen_edit_strength_sweep.reviewed-provenance.json", + "sha256": "sha256:bytes:021e25f19a4a62f07513e3556ba7865e2ae7631762ead746ef6563e2912b0a4a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_edit_strength_sweep", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/reviews/qwen_inpaint_mask_draft.quality-review.json", + "sha256": "sha256:bytes:aacac275d7f3885f227d431f1a37be7dfcd720cee639e1a34851cdce54719154", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_inpaint_mask_draft", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/reviews/qwen_inpaint_mask_draft.reviewed-provenance.json", + "sha256": "sha256:bytes:fd5214c8523c581b8535d0bd77afc4a8451445aeb449bb079ac150de9c3d5727", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_inpaint_mask_draft", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/reviews/qwen_inpaint_object_replace.quality-review.json", + "sha256": "sha256:bytes:cdbd7d549bfef1a9513cd8ed5feef6ba7798f380ffe45830cfa588de789c3cdf", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_inpaint_object_replace", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/reviews/qwen_inpaint_object_replace.reviewed-provenance.json", + "sha256": "sha256:bytes:9110d6bf939d4c68541767c20ad62684978c590af344a226d76ee02c32b76fef", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_inpaint_object_replace", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/reviews/qwen_layered_portrait.quality-review.json", + "sha256": "sha256:bytes:2ef67ce5c77e09b88d8a33d6759edbc3ccbfe910bfad17d638dc5ce99794ea7f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical, review, input-binding or retained recipe metadata for three maintainer-accepted assets", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media model terms are retained separately", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "maintainer (current user)", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-native-three-registration", + "provenanceTemplateId": "qwen_layered_portrait", + "humanApprovalPacketSHA256": "69c6b3d9b0ea2fcca16ee538f6e75b414b7141658b74f10578758e61360f63fd" + }, + { + "path": "template-gallery/reviews/qwen_layered_portrait.reviewed-provenance.json", + "sha256": "sha256:bytes:f1f8f884f1a797e5918e01f9b47d1f93d39cd6a305a7d3ca46c9f9b349d18f01", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical, review, input-binding or retained recipe metadata for three maintainer-accepted assets", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media model terms are retained separately", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "maintainer (current user)", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-native-three-registration", + "provenanceTemplateId": "qwen_layered_portrait", + "humanApprovalPacketSHA256": "69c6b3d9b0ea2fcca16ee538f6e75b414b7141658b74f10578758e61360f63fd" + }, + { + "path": "template-gallery/reviews/qwen_layered_sunset_and_peaks.original-provenance.json", + "sha256": "sha256:bytes:9a4c058f2ba7bd3dace465219c32bd818493431063688b00741a9a9c4fb01794", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Qwen/Qwen-Image-Layered/blob/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf/README.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "b16dfc2b7c1c32272b8f79bc1bffbb60376e63f8cf1ab9d0bdf9aea07cccf5cd", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_layered_sunset_and_peaks" + }, + { + "path": "template-gallery/reviews/qwen_layered_sunset_and_peaks.original-review.json", + "sha256": "sha256:bytes:faf0adb0a9c40691caf3ef8f96765406b3b5058aa9618cca5431ae83529a1bcb", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Qwen/Qwen-Image-Layered/blob/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf/README.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "b16dfc2b7c1c32272b8f79bc1bffbb60376e63f8cf1ab9d0bdf9aea07cccf5cd", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_layered_sunset_and_peaks" + }, + { + "path": "template-gallery/reviews/qwen_layered_sunset_and_peaks.quality-review.json", + "sha256": "sha256:bytes:326553aed7aab67e3eed777d7919e21fe02ff9ab837edd7f39bd7a2abece77f0", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Qwen/Qwen-Image-Layered/blob/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf/README.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "b16dfc2b7c1c32272b8f79bc1bffbb60376e63f8cf1ab9d0bdf9aea07cccf5cd", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_layered_sunset_and_peaks" + }, + { + "path": "template-gallery/reviews/qwen_layered_sunset_and_peaks.retained-template-provenance.json", + "sha256": "sha256:bytes:d6aaa0a0d9b84d10864e8a783ac82ac167b487f71d185bacd99cc035f8e22105", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Qwen/Qwen-Image-Layered/blob/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf/README.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf https://huggingface.co/Qwen/Qwen-Image-Layered/tree/8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "b16dfc2b7c1c32272b8f79bc1bffbb60376e63f8cf1ab9d0bdf9aea07cccf5cd", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "qwen_layered_sunset_and_peaks" + }, + { + "path": "template-gallery/reviews/qwen_logo_texture.quality-review.json", + "sha256": "sha256:bytes:27383d10d65bf5bcf81efb5a197751c3ad29476fd23f72cd8a937dc432e6f555", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_logo_texture", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/reviews/qwen_logo_texture.reviewed-provenance.json", + "sha256": "sha256:bytes:d056004421a13aa28a5f5f67ef52e3647ab07573df5c8cf8d9846aeea8d9a698", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_logo_texture", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/reviews/qwen_low_vram_poster_layout.quality-review.json", + "sha256": "sha256:bytes:c75a68e299dcf548661338cd1aa6f8c4d0bcc9dc3d3d7769f5717a8d09e4a8c3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the explicitly approved native Qwen cinema image", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-qwen-native-image-registration", + "provenanceTemplateId": "qwen_low_vram_poster_layout", + "humanApprovalPacketSHA256": "13cb57389a33fb689324c40827376b3ddfe0ade1dd033ffc8a0c51e749e44487" + }, + { + "path": "template-gallery/reviews/qwen_low_vram_poster_layout.reviewed-provenance.json", + "sha256": "sha256:bytes:16aa46e5009c7b4c05ea3dc5325e63b039c3e2a826b11a2845882c589510f194", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the explicitly approved native Qwen cinema image", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-qwen-native-image-registration", + "provenanceTemplateId": "qwen_low_vram_poster_layout", + "humanApprovalPacketSHA256": "13cb57389a33fb689324c40827376b3ddfe0ade1dd033ffc8a0c51e749e44487" + }, + { + "path": "template-gallery/reviews/qwen_low_vram_product_concept.quality-review.json", + "sha256": "sha256:bytes:c1bdc89bee06dad85965f564b4bb5c7657859808d333dfce4e741b344dba2ea2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the explicitly approved native Qwen stationery and product concept images", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-qwen-native-image-registration", + "provenanceTemplateId": "qwen_low_vram_product_concept", + "humanApprovalPacketSHA256": "3193ab9ed5834bddfafc5c6922bd0eaa60e27e5963ca52c740af7540c2847834" + }, + { + "path": "template-gallery/reviews/qwen_low_vram_product_concept.reviewed-provenance.json", + "sha256": "sha256:bytes:c9ff22165ab722da9056022e703f4ccdd45aa76ef6583170f0662d262a5e39a5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the explicitly approved native Qwen stationery and product concept images", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-qwen-native-image-registration", + "humanApprovalPacketSHA256": "3193ab9ed5834bddfafc5c6922bd0eaa60e27e5963ca52c740af7540c2847834", + "humanApprovalScope": "The maintainer explicitly approved the proposed 4/5 scores, known limits, exact retained Klein two-reference derivative output, its redacted technical/quality metadata, and permission to make and redistribute this derivative under Apache-2.0. Existing source images and their mixed license records remain unchanged; no other assets or held cases are newly approved.", + "provenanceTemplateId": "qwen_low_vram_product_concept" + }, + { + "path": "template-gallery/reviews/qwen_low_vram_text_rendering.quality-review.json", + "sha256": "sha256:bytes:64d0c05cdb2830d4a533256b6ed78afcbb2b6c8398b92b27087f8056862458a2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the explicitly approved native Qwen stationery and product concept images", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-qwen-native-image-registration", + "provenanceTemplateId": "qwen_low_vram_text_rendering", + "humanApprovalPacketSHA256": "3193ab9ed5834bddfafc5c6922bd0eaa60e27e5963ca52c740af7540c2847834" + }, + { + "path": "template-gallery/reviews/qwen_low_vram_text_rendering.reviewed-provenance.json", + "sha256": "sha256:bytes:d5e56c96dcc0d1a13aebd648ea2919c23cf26a55083b07c4cd3075fd5eaaa58d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the explicitly approved native Qwen stationery and product concept images", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-qwen-native-image-registration", + "humanApprovalPacketSHA256": "3193ab9ed5834bddfafc5c6922bd0eaa60e27e5963ca52c740af7540c2847834", + "humanApprovalScope": "The maintainer explicitly approved the proposed 4/5 scores, known limits, exact retained Klein two-reference derivative output, its redacted technical/quality metadata, and permission to make and redistribute this derivative under Apache-2.0. Existing source images and their mixed license records remain unchanged; no other assets or held cases are newly approved.", + "provenanceTemplateId": "qwen_low_vram_text_rendering" + }, + { + "path": "template-gallery/reviews/qwen_multi_reference_product.quality-review.json", + "sha256": "sha256:bytes:f541e013bf476dc05c7bf0815db9fd100925c3ed5e4303e275998940c6d38d31", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_multi_reference_product", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/reviews/qwen_multi_reference_product.reviewed-provenance.json", + "sha256": "sha256:bytes:e3855abb4ed1a82b068269f8a1ce817cb327d9f05abe65b7a22ff4fb87dbf597", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_multi_reference_product", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/reviews/qwen_outpaint_aspect_template.quality-review.json", + "sha256": "sha256:bytes:6fa2bc63b9e95cd36614b65c3856ef017b6fd76ed35104ef727e053336b6dee9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored Gallery manifest, reviewed provenance or quality review for the accepted morning batch", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "provenanceTemplateId": "qwen_outpaint_aspect_template", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3" + }, + { + "path": "template-gallery/reviews/qwen_outpaint_aspect_template.reviewed-provenance.json", + "sha256": "sha256:bytes:d0fec0ffe18f3927eef5eac8faa6dc3b7ff8f28b3a79e634bde1a30d886e7390", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored Gallery manifest, reviewed provenance or quality review for the accepted morning batch", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "provenanceTemplateId": "qwen_outpaint_aspect_template", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3" + }, + { + "path": "template-gallery/reviews/qwen_outpaint_draft.quality-review.json", + "sha256": "sha256:bytes:edef85b30a3c7aeb5e0b9a911ad571a82cc3faa213616813a290a74f32fe2cd5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored Gallery manifest, reviewed provenance or quality review for the accepted morning batch", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "provenanceTemplateId": "qwen_outpaint_draft", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3" + }, + { + "path": "template-gallery/reviews/qwen_outpaint_draft.reviewed-provenance.json", + "sha256": "sha256:bytes:d81e1657ee09184d12a43ddf019c19298b0b4b6ba4f673bf764ac4627a3e1c1b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored Gallery manifest, reviewed provenance or quality review for the accepted morning batch", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-approved-gallery-registration", + "provenanceTemplateId": "qwen_outpaint_draft", + "humanApprovalPacketSHA256": "351d122936dc8df9c3fb6217005641dd2cc2ecddc39cd7cd7fadc2939def70b3" + }, + { + "path": "template-gallery/reviews/qwen_packaging_dieline.quality-review.json", + "sha256": "sha256:bytes:dbf5e856ee01a0a2f71fcc96af3c759c08f491dc50c7310b3dfc97b37c7d860a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_packaging_dieline", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304" + }, + { + "path": "template-gallery/reviews/qwen_packaging_dieline.reviewed-provenance.json", + "sha256": "sha256:bytes:0814dfd3c8a87d3701da63ddc4ab1768eccc971192114a79256e643171166262", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "humanApprovalPacketSHA256": "73ddf9ea7fc27eccc6b93817809421a008ce0fd2fb3080ffbdc5831a09205304", + "humanApprovalScope": "The maintainer explicitly approved the proposed 4/5 scores, known limits, exact retained Klein two-reference derivative output, its redacted technical/quality metadata, and permission to make and redistribute this derivative under Apache-2.0. Existing source images and their mixed license records remain unchanged; no other assets or held cases are newly approved.", + "provenanceTemplateId": "qwen_packaging_dieline" + }, + { + "path": "template-gallery/reviews/qwen_poster_logo_text.quality-review.json", + "sha256": "sha256:bytes:0dda4202476ad47c22a1b0958115c2039436fdff54146a6ffe4293b4acecb4f8", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the explicitly approved native Qwen museum and product images", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-qwen-native-image-registration", + "provenanceTemplateId": "qwen_poster_logo_text", + "humanApprovalPacketSHA256": "fb90296fc1789e995652389997b3295a3b6d7424f449251539c63546c081e108" + }, + { + "path": "template-gallery/reviews/qwen_poster_logo_text.reviewed-provenance.json", + "sha256": "sha256:bytes:11bb7ad1c39ca2f942ed46683683368bd2ebb328dee3cca78edf21391ac08a34", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the explicitly approved native Qwen museum and product images", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-qwen-native-image-registration", + "provenanceTemplateId": "qwen_poster_logo_text", + "humanApprovalPacketSHA256": "fb90296fc1789e995652389997b3295a3b6d7424f449251539c63546c081e108" + }, + { + "path": "template-gallery/reviews/qwen_product_ad_composite.quality-review.json", + "sha256": "sha256:bytes:d1fbc94b163a8573d46a2dd47946935ae06ce51ab4f95cd84e64913bd22e377d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_product_ad_composite", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/reviews/qwen_product_ad_composite.reviewed-provenance.json", + "sha256": "sha256:bytes:381e12e3f39be2ae1a7192b918eba815d2029351d68377acb959d31a70eb357b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_product_ad_composite", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/reviews/qwen_product_mockup.quality-review.json", + "sha256": "sha256:bytes:d864e05cd7069e72a254aca6f8519881013d84b954ddc8d67224e1b7bad6d73d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the explicitly approved native Qwen museum and product images", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-qwen-native-image-registration", + "provenanceTemplateId": "qwen_product_mockup", + "humanApprovalPacketSHA256": "fb90296fc1789e995652389997b3295a3b6d7424f449251539c63546c081e108" + }, + { + "path": "template-gallery/reviews/qwen_product_mockup.reviewed-provenance.json", + "sha256": "sha256:bytes:dd0ef580bcfbf2beda1f7f571fc3b444a9c97d9f7dfd7e786000a3dc6a552888", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the explicitly approved native Qwen museum and product images", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-qwen-native-image-registration", + "humanApprovalPacketSHA256": "fb90296fc1789e995652389997b3295a3b6d7424f449251539c63546c081e108", + "humanApprovalScope": "The maintainer explicitly approved the proposed 4/5 scores, known limits, exact retained Klein two-reference derivative output, its redacted technical/quality metadata, and permission to make and redistribute this derivative under Apache-2.0. Existing source images and their mixed license records remain unchanged; no other assets or held cases are newly approved.", + "provenanceTemplateId": "qwen_product_mockup" + }, + { + "path": "template-gallery/reviews/qwen_product_relight.quality-review.json", + "sha256": "sha256:bytes:b861d8ce095fd338d8d55d9b332d1010511af533986d66664186feebdc61bafc", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_product_relight", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/reviews/qwen_product_relight.reviewed-provenance.json", + "sha256": "sha256:bytes:27502d691d21995e461135d22847cb0ae821b03f103eca40cab80c4ad8ce230d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_product_relight", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/reviews/qwen_text_rendering.quality-review.json", + "sha256": "sha256:bytes:60a57aeded56870fe11bb3778c6d76e02332d07713b1b544e41ffcbd4a0b1bb6", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the explicitly approved native Qwen exact-text poster", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-qwen-exact-text-registration", + "provenanceTemplateId": "qwen_text_rendering", + "humanApprovalPacketSHA256": "a000a897c1a4ae5980d2f50e5e88a2affb992e403dbd6df9d3ebbd5de5db4891" + }, + { + "path": "template-gallery/reviews/qwen_text_rendering.reviewed-provenance.json", + "sha256": "sha256:bytes:9611134a5092c7ecc267170fd99485f7c7802881ebfc8b2c9c5ea3d088ed1a9e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the explicitly approved native Qwen exact-text poster", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-qwen-exact-text-registration", + "humanApprovalPacketSHA256": "a000a897c1a4ae5980d2f50e5e88a2affb992e403dbd6df9d3ebbd5de5db4891", + "humanApprovalScope": "The maintainer explicitly approved the proposed 4/5 scores, known limits, exact retained Klein two-reference derivative output, its redacted technical/quality metadata, and permission to make and redistribute this derivative under Apache-2.0. Existing source images and their mixed license records remain unchanged; no other assets or held cases are newly approved.", + "provenanceTemplateId": "qwen_text_rendering" + }, + { + "path": "template-gallery/reviews/qwen_tile_extract.quality-review.json", + "sha256": "sha256:bytes:09131391c3324338e90a40f57fd1cada2f08e321ec5904fcfc0d6c9920ee6aed", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_tile_extract", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/reviews/qwen_tile_extract.reviewed-provenance.json", + "sha256": "sha256:bytes:3b08851c75268f5dd35a5e5f0f4f1e47ecbe95ecfdccde93f1ba08e74f0fc241", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "qwen_tile_extract", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/reviews/qwen_upscale_finish.quality-review.json", + "sha256": "sha256:bytes:6839f40c63e339e656f88b3933285a54e7a902833f1dc585030356d36a172502", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the explicitly approved native Qwen Expert final and genuine before-upscale comparison images", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-qwen-expert-upscale-registration", + "provenanceTemplateId": "qwen_upscale_finish", + "humanApprovalPacketSHA256": "f0167419381c0d2a1a1bcd43d2465a0ad728c294a2d91bbe1c6b090a915c2c98" + }, + { + "path": "template-gallery/reviews/qwen_upscale_finish.reviewed-provenance.json", + "sha256": "sha256:bytes:30c664301de44d2be2f3a0110ce4392de6433a1b5a63e60d31a9c7870ce3b04f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance, Gallery manifest or quality review for the explicitly approved native Qwen Expert final and genuine before-upscale comparison images", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file record", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-human-approved-qwen-expert-upscale-registration", + "provenanceTemplateId": "qwen_upscale_finish", + "humanApprovalPacketSHA256": "f0167419381c0d2a1a1bcd43d2465a0ad728c294a2d91bbe1c6b090a915c2c98" + }, + { + "path": "template-gallery/reviews/reference_fusion.quality-review.json", + "sha256": "sha256:bytes:0042893cc0ba3eb36438c8af0108de25c620cedc8febc83d14b46accb427f73a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "reference_fusion", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/reviews/reference_fusion.reviewed-provenance.json", + "sha256": "sha256:bytes:e8bb52b4d660c345368dd44a7d9d40edf62b00770a01dc444a5d5e9ec8d8bd87", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored Gallery manifest, native provenance or accepted quality review", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-10", + "reviewClass": "per-file-maintainer-accepted-native-gallery-registration", + "provenanceTemplateId": "reference_fusion", + "humanApprovalPacketSHA256": "95893cb17e10b15ae6b23d8b31b57b0e14b9af96f822d75edbc6b68971afb11d" + }, + { + "path": "template-gallery/reviews/restoring_the_studio_backdrop.original-provenance.json", + "sha256": "sha256:bytes:a8d0febc08556ad204bef84d5c8d35bfab9bf69fe8d28b21f10ad315f962b897", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["CreativeML Open RAIL-M at the pinned Stable Diffusion v1.5 revision."], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "restoring_the_studio_backdrop" + }, + { + "path": "template-gallery/reviews/restoring_the_studio_backdrop.original-review.json", + "sha256": "sha256:bytes:633f93991afc1d361ac19a79c101f868f5954814f09dc349bcb61f967b821cf6", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["CreativeML Open RAIL-M at the pinned Stable Diffusion v1.5 revision."], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "restoring_the_studio_backdrop" + }, + { + "path": "template-gallery/reviews/restoring_the_studio_backdrop.quality-review.json", + "sha256": "sha256:bytes:1e0613d7b8b08333cca474aea32b92bd3d6ac680a776e639b93c554a3011b311", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["CreativeML Open RAIL-M at the pinned Stable Diffusion v1.5 revision."], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "restoring_the_studio_backdrop" + }, + { + "path": "template-gallery/reviews/restoring_the_studio_backdrop.retained-template-provenance.json", + "sha256": "sha256:bytes:6a6538a8278e1f94de68eb9b2928131809e5b3163a7157ff7db17d053635fa46", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": ["CreativeML Open RAIL-M at the pinned Stable Diffusion v1.5 revision."], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "restoring_the_studio_backdrop" + }, + { + "path": "template-gallery/reviews/salt_marsh_from_above.original-provenance.json", + "sha256": "sha256:bytes:a126541afded7807e2f7c48f7695571cd00edb4c237e257829dea8025548fdc4", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/fal/AuraFlow-v0.3/tree/2cd8588f04c886002be4571697d84654a50e3af3", + "sourceRevision": "fal/AuraFlow-v0.3@2cd8588f04c886002be4571697d84654a50e3af3", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/fal/AuraFlow-v0.3/tree/2cd8588f04c886002be4571697d84654a50e3af3" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "fal/AuraFlow-v0.3@2cd8588f04c886002be4571697d84654a50e3af3 https://huggingface.co/fal/AuraFlow-v0.3/tree/2cd8588f04c886002be4571697d84654a50e3af3" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "salt_marsh_from_above" + }, + { + "path": "template-gallery/reviews/salt_marsh_from_above.original-review.json", + "sha256": "sha256:bytes:890b1c2f2a76d781d9c1062a1e4ec1e637a5d7de161e8ec21fb4860bfba68365", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/fal/AuraFlow-v0.3/tree/2cd8588f04c886002be4571697d84654a50e3af3", + "sourceRevision": "fal/AuraFlow-v0.3@2cd8588f04c886002be4571697d84654a50e3af3", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/fal/AuraFlow-v0.3/tree/2cd8588f04c886002be4571697d84654a50e3af3" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "fal/AuraFlow-v0.3@2cd8588f04c886002be4571697d84654a50e3af3 https://huggingface.co/fal/AuraFlow-v0.3/tree/2cd8588f04c886002be4571697d84654a50e3af3" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "salt_marsh_from_above" + }, + { + "path": "template-gallery/reviews/salt_marsh_from_above.quality-review.json", + "sha256": "sha256:bytes:deb996a0c76f064ba87fcbde7750b4297dedd4f470a70246be5ce550f88b52d3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/fal/AuraFlow-v0.3/tree/2cd8588f04c886002be4571697d84654a50e3af3", + "sourceRevision": "fal/AuraFlow-v0.3@2cd8588f04c886002be4571697d84654a50e3af3", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/fal/AuraFlow-v0.3/tree/2cd8588f04c886002be4571697d84654a50e3af3" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "fal/AuraFlow-v0.3@2cd8588f04c886002be4571697d84654a50e3af3 https://huggingface.co/fal/AuraFlow-v0.3/tree/2cd8588f04c886002be4571697d84654a50e3af3" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "salt_marsh_from_above" + }, + { + "path": "template-gallery/reviews/salt_marsh_from_above.retained-template-provenance.json", + "sha256": "sha256:bytes:9a904012bac7d429111212a1e17e1b5b08a754a6354230233a6c81b8f1a2cfe2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/fal/AuraFlow-v0.3/tree/2cd8588f04c886002be4571697d84654a50e3af3", + "sourceRevision": "fal/AuraFlow-v0.3@2cd8588f04c886002be4571697d84654a50e3af3", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "apache-2.0. https://huggingface.co/fal/AuraFlow-v0.3/tree/2cd8588f04c886002be4571697d84654a50e3af3" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "fal/AuraFlow-v0.3@2cd8588f04c886002be4571697d84654a50e3af3 https://huggingface.co/fal/AuraFlow-v0.3/tree/2cd8588f04c886002be4571697d84654a50e3af3" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "salt_marsh_from_above" + }, + { + "path": "template-gallery/reviews/sana_i2v_blue_hour_above_rice_terraces.original-provenance.json", + "sha256": "sha256:bytes:7bc9085e6b972b876e8e26e109ce89e2771e2b8b6dab904313f2806be2afc93b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1", + "sourceRevision": "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1 https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sana_i2v_blue_hour_above_rice_terraces" + }, + { + "path": "template-gallery/reviews/sana_i2v_blue_hour_above_rice_terraces.original-review.json", + "sha256": "sha256:bytes:e04a83a228783f9b7b8d9ad023dfc8af480e3b61254957280aea6b5513caaadf", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1", + "sourceRevision": "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1 https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sana_i2v_blue_hour_above_rice_terraces" + }, + { + "path": "template-gallery/reviews/sana_i2v_blue_hour_above_rice_terraces.quality-review.json", + "sha256": "sha256:bytes:b588f00fbc3c68bfe70f263a8b4c36cceeaa5691590fdfcc22b0b51537e89e1a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1", + "sourceRevision": "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1 https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sana_i2v_blue_hour_above_rice_terraces" + }, + { + "path": "template-gallery/reviews/sana_i2v_blue_hour_above_rice_terraces.retained-template-provenance.json", + "sha256": "sha256:bytes:e27e84a5fcdb01e1c410dfa311e43a13912853b1e20272979f078e04c74d5c6e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1", + "sourceRevision": "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1 https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sana_i2v_blue_hour_above_rice_terraces" + }, + { + "path": "template-gallery/reviews/sana_sprint_monochrome_tiger.quality-review.json", + "sha256": "sha256:bytes:daad196fff80a6e8d2543deeb911b5cd94a027a746e8d7cc0a011dc687f8c50e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "humanLikenessConsent": "not-applicable", + "marks": [], + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-20", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "40060ba701188a6d287df07e0852c6497d109885495e6fc85a19e8371ef73906", + "publicationBasis": "Maintainer approved both exact Sana Sprint images and redistribution of the redacted review and recipe records.", + "creationMethod": "Project-authored redacted retained Gallery review, provenance or registration metadata", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [], + "aiGenerated": false, + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "provenanceTemplateId": "sana_sprint_monochrome_tiger" + }, + { + "path": "template-gallery/reviews/sana_sprint_monochrome_tiger.retained-template-provenance.json", + "sha256": "sha256:bytes:9da7a90fdc337893b768009a2d6c619c730606e2544c335f4c4d02d14137d1a9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "humanLikenessConsent": "not-applicable", + "marks": [], + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-20", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "40060ba701188a6d287df07e0852c6497d109885495e6fc85a19e8371ef73906", + "publicationBasis": "Maintainer approved both exact Sana Sprint images and redistribution of the redacted review and recipe records.", + "creationMethod": "Project-authored redacted retained Gallery review, provenance or registration metadata", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [], + "aiGenerated": false, + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "provenanceTemplateId": "sana_sprint_monochrome_tiger" + }, + { + "path": "template-gallery/reviews/sana_tidal_pool_on_black_basalt.original-provenance.json", + "sha256": "sha256:bytes:464b0cb9e776e21bd3b8dfbefa83c8b984bd76684dee47aec59943ff0e6b335a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829", + "sourceRevision": "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829 https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "4fc7c52588176cb1f6ba6d699d08741b2986ea71ea87bac650d261716a10b24c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sana_tidal_pool_on_black_basalt" + }, + { + "path": "template-gallery/reviews/sana_tidal_pool_on_black_basalt.original-review.json", + "sha256": "sha256:bytes:822c6a8b3d52524742bfe5987264df6c10f357ae3c975d695a89cf0d5b9e762a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829", + "sourceRevision": "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829 https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "4fc7c52588176cb1f6ba6d699d08741b2986ea71ea87bac650d261716a10b24c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sana_tidal_pool_on_black_basalt" + }, + { + "path": "template-gallery/reviews/sana_tidal_pool_on_black_basalt.quality-review.json", + "sha256": "sha256:bytes:1dcfd72e9a8ac1f33c8ce5935e64598e279ddca468c1060e266376a8b7d89552", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829", + "sourceRevision": "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829 https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "4fc7c52588176cb1f6ba6d699d08741b2986ea71ea87bac650d261716a10b24c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sana_tidal_pool_on_black_basalt" + }, + { + "path": "template-gallery/reviews/sana_tidal_pool_on_black_basalt.retained-template-provenance.json", + "sha256": "sha256:bytes:66af6aa83b431b3f41da146254ebc0cc75190e50fe626ce635fc20a12f2c7502", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829", + "sourceRevision": "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829 https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "4fc7c52588176cb1f6ba6d699d08741b2986ea71ea87bac650d261716a10b24c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sana_tidal_pool_on_black_basalt" + }, + { + "path": "template-gallery/reviews/sana_video_water_terraces_before_sunrise.original-provenance.json", + "sha256": "sha256:bytes:250635b2ca6018d644f10604fd886da1c4d0b478dee0b119789bcceabbf1494e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1", + "sourceRevision": "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1 https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sana_video_water_terraces_before_sunrise" + }, + { + "path": "template-gallery/reviews/sana_video_water_terraces_before_sunrise.original-review.json", + "sha256": "sha256:bytes:3b96a247980147b258ed402c1614046d15d02e458fcea8a11f5dbb58585a1f7e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1", + "sourceRevision": "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1 https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sana_video_water_terraces_before_sunrise" + }, + { + "path": "template-gallery/reviews/sana_video_water_terraces_before_sunrise.quality-review.json", + "sha256": "sha256:bytes:0bf7cc281ab478b7719c384b06b83a15b8e21745ffd6247e20b5f3ddf33194a3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1", + "sourceRevision": "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1 https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sana_video_water_terraces_before_sunrise" + }, + { + "path": "template-gallery/reviews/sana_video_water_terraces_before_sunrise.retained-template-provenance.json", + "sha256": "sha256:bytes:f0cc994e00a2bc07c096ec6f718af2dc4e279c47654d9b19d09fb6342a536442", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1", + "sourceRevision": "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1 https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sana_video_water_terraces_before_sunrise" + }, + { + "path": "template-gallery/reviews/sd15_canny_guided_green_glass.original-provenance.json", + "sha256": "sha256:bytes:4819d64b35e84d822483b4edf58c0d2a82ca612989a5f283763eff90e1c3dcc4", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_canny_guided_green_glass" + }, + { + "path": "template-gallery/reviews/sd15_canny_guided_green_glass.original-review.json", + "sha256": "sha256:bytes:702ca8e77651aeb71cddfb6daa67ca584309cc1639d3ad81cbe783e65c14ac14", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_canny_guided_green_glass" + }, + { + "path": "template-gallery/reviews/sd15_canny_guided_green_glass.quality-review.json", + "sha256": "sha256:bytes:6b4eb4c2e53322bd651c6da7802034a81a968a063f4d68099d18a47b798b6a2a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_canny_guided_green_glass" + }, + { + "path": "template-gallery/reviews/sd15_canny_guided_green_glass.retained-template-provenance.json", + "sha256": "sha256:bytes:402d8a04c798edda4ccf43f0b2716520eb7b4e3e268b111ac029ce1ef95865bc", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_canny_guided_green_glass" + }, + { + "path": "template-gallery/reviews/sd15_control_cobalt_handmade_paper.original-provenance.json", + "sha256": "sha256:bytes:da7eebeec6ee06c919bd2a1b06634fdc12a0656ba046561fb0540c165ebdee19", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_control_cobalt_handmade_paper" + }, + { + "path": "template-gallery/reviews/sd15_control_cobalt_handmade_paper.original-review.json", + "sha256": "sha256:bytes:5323b4eaa717d668add0b374d57be2cc16458d2dba6a7dab91cef3054e6783e6", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_control_cobalt_handmade_paper" + }, + { + "path": "template-gallery/reviews/sd15_control_cobalt_handmade_paper.quality-review.json", + "sha256": "sha256:bytes:8d1bd3e6ea993d171004dc6960a2384635596ebb4a212694128b4c0596085a38", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_control_cobalt_handmade_paper" + }, + { + "path": "template-gallery/reviews/sd15_control_cobalt_handmade_paper.retained-template-provenance.json", + "sha256": "sha256:bytes:9ab42723e81c7cad64ab3e8d5ffedeb21ab76c17a4aaf7e3d6f5e84e82f2133a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_control_cobalt_handmade_paper" + }, + { + "path": "template-gallery/reviews/sd15_control_cobalt_studio_wall_repair.original-provenance.json", + "sha256": "sha256:bytes:19bf85731e13ea963aab7adba6556b86bbcded7d0030b29342738bb6ef165418", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_control_cobalt_studio_wall_repair" + }, + { + "path": "template-gallery/reviews/sd15_control_cobalt_studio_wall_repair.original-review.json", + "sha256": "sha256:bytes:972cd4b45f317e79624ad0f9d14361ad56ff661b9e8b5bebf049553317cb5af5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_control_cobalt_studio_wall_repair" + }, + { + "path": "template-gallery/reviews/sd15_control_cobalt_studio_wall_repair.quality-review.json", + "sha256": "sha256:bytes:ed1f8ea25aa626c59572eb6c03d8e6c55eae588e1e6378afef6adc536f1983d7", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_control_cobalt_studio_wall_repair" + }, + { + "path": "template-gallery/reviews/sd15_control_cobalt_studio_wall_repair.retained-template-provenance.json", + "sha256": "sha256:bytes:fb2f08438b84f324cd9c37aaff2e4106e02c2302cc21a20e57d2a3ce456d4d12", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_control_cobalt_studio_wall_repair" + }, + { + "path": "template-gallery/reviews/sd15_pag_canny_guided_glass.original-provenance.json", + "sha256": "sha256:bytes:9c932db7355340ac4e8adf44b0d465192ee66096c6e811fd917ab7d0d6858881", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_canny_guided_glass" + }, + { + "path": "template-gallery/reviews/sd15_pag_canny_guided_glass.original-review.json", + "sha256": "sha256:bytes:71b3e8d9324b3a359982cc2544d97acaa55ad8fd919bba1c9638e337c2029b64", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_canny_guided_glass" + }, + { + "path": "template-gallery/reviews/sd15_pag_canny_guided_glass.quality-review.json", + "sha256": "sha256:bytes:17e907b2f792b6f5d3a67cdb23e21cd610731baec7b7bd3914170fb801f4c807", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_canny_guided_glass" + }, + { + "path": "template-gallery/reviews/sd15_pag_canny_guided_glass.retained-template-provenance.json", + "sha256": "sha256:bytes:7f00b5906e8f7b8b9f25ab10145851637e469edfb455660c72f08be72bee8b7b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_canny_guided_glass" + }, + { + "path": "template-gallery/reviews/sd15_pag_cobalt_studio_repair.original-provenance.json", + "sha256": "sha256:bytes:b3a227ef5f8f0ea481c446854ce4be387bfe434ff252d9a5d34887ddb2b69b55", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_cobalt_studio_repair" + }, + { + "path": "template-gallery/reviews/sd15_pag_cobalt_studio_repair.original-review.json", + "sha256": "sha256:bytes:dcbaa8d96f77097c5e763de7dd3602e62e4dc4d1302b2d4e7a426ae606b94de3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_cobalt_studio_repair" + }, + { + "path": "template-gallery/reviews/sd15_pag_cobalt_studio_repair.quality-review.json", + "sha256": "sha256:bytes:ddfa89f8e656c4790a14c0e9dcfffa24a1a034cab5c1bb62390307bfa70bc9fc", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_cobalt_studio_repair" + }, + { + "path": "template-gallery/reviews/sd15_pag_cobalt_studio_repair.retained-template-provenance.json", + "sha256": "sha256:bytes:e2aade8abc03d27c9f342023c60f27dcbb77f28a94d7605522ae0e862672eeed", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_cobalt_studio_repair" + }, + { + "path": "template-gallery/reviews/sd15_pag_control_wall_repair.original-provenance.json", + "sha256": "sha256:bytes:aa19ad771615c138e20115977179f7a966ea7b8cdb2d08e358ee505d2954c623", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_control_wall_repair" + }, + { + "path": "template-gallery/reviews/sd15_pag_control_wall_repair.original-review.json", + "sha256": "sha256:bytes:68dd29ac4fc908290c864d1e0d913aec7dd9773e642e226a83fa75425db275d9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_control_wall_repair" + }, + { + "path": "template-gallery/reviews/sd15_pag_control_wall_repair.quality-review.json", + "sha256": "sha256:bytes:2ebf376b23db382ffeeb0e2297864e4ad5ef7fac59db5a3e96e50c13c91d06e5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_control_wall_repair" + }, + { + "path": "template-gallery/reviews/sd15_pag_control_wall_repair.retained-template-provenance.json", + "sha256": "sha256:bytes:c362aab4aae99eddcf68dab637479045ec7c4cc703bf3fb84a90b54293acec01", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_control_wall_repair" + }, + { + "path": "template-gallery/reviews/sd15_pag_mountain_lake_watercolor.original-provenance.json", + "sha256": "sha256:bytes:53be917cea31e259033fb99bb4ff99b1b975abc7cad671b8eb2511794545082e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_mountain_lake_watercolor" + }, + { + "path": "template-gallery/reviews/sd15_pag_mountain_lake_watercolor.original-review.json", + "sha256": "sha256:bytes:e7226c4664a027c20670f6aa367d4c2751efbe4fc0569afe6cb137349a8f5406", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_mountain_lake_watercolor" + }, + { + "path": "template-gallery/reviews/sd15_pag_mountain_lake_watercolor.quality-review.json", + "sha256": "sha256:bytes:a76c9a2fbcb169ecc2498d87ebc3f17f640cd49c4ca906ffc117a281f885d2af", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_mountain_lake_watercolor" + }, + { + "path": "template-gallery/reviews/sd15_pag_mountain_lake_watercolor.retained-template-provenance.json", + "sha256": "sha256:bytes:f2e571509ee047bbf0f2b7381ba505ec3204898db1f9d4bcf567ad1d661c1c75", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_mountain_lake_watercolor" + }, + { + "path": "template-gallery/reviews/sdxl_blue_glass_on_linen.original-provenance.json", + "sha256": "sha256:bytes:27a97a45a77e030c923d8bdd21038de3f89a94132da92d6313179f752949ac89", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_blue_glass_on_linen" + }, + { + "path": "template-gallery/reviews/sdxl_blue_glass_on_linen.original-review.json", + "sha256": "sha256:bytes:fabaeafe1e26297e9f1601776a60ecb99aff54d8bcd793f59efcdbb24aff75ca", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_blue_glass_on_linen" + }, + { + "path": "template-gallery/reviews/sdxl_blue_glass_on_linen.quality-review.json", + "sha256": "sha256:bytes:ac2ad3f014c2418214a1f5c0d24da1c6e0f854b5f465b5f73fc86a49f691e690", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_blue_glass_on_linen" + }, + { + "path": "template-gallery/reviews/sdxl_blue_glass_on_linen.retained-template-provenance.json", + "sha256": "sha256:bytes:bc7bc5349f88639d71d68f5fbd560c09bae488e4240cd5c53c9731904f655896", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_blue_glass_on_linen" + }, + { + "path": "template-gallery/reviews/sdxl_canny_adapter_glass_study.original-provenance.json", + "sha256": "sha256:bytes:daf26190a849032e45d97c519a2d0a943ea9cab99937916d7f2f9b88b29a69a0", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_canny_adapter_glass_study" + }, + { + "path": "template-gallery/reviews/sdxl_canny_adapter_glass_study.original-review.json", + "sha256": "sha256:bytes:305618170534dc7808c62234e6bc2a428e49d6eb5ed766aabb4aad4cc48f6e07", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_canny_adapter_glass_study" + }, + { + "path": "template-gallery/reviews/sdxl_canny_adapter_glass_study.quality-review.json", + "sha256": "sha256:bytes:f4766cc262cf8d06f5e643b7e4b11bf31ddb550de66b2274727948738550ab7b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_canny_adapter_glass_study" + }, + { + "path": "template-gallery/reviews/sdxl_canny_adapter_glass_study.retained-template-provenance.json", + "sha256": "sha256:bytes:3a6c1a9a6ce7a31c19275f7049b062f62739c7517e13e2ad5c512c805a5a68ef", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_canny_adapter_glass_study" + }, + { + "path": "template-gallery/reviews/sdxl_clear_cobalt_backdrop.original-provenance.json", + "sha256": "sha256:bytes:7361ac84e232f55f7f8e19fae39c5abff4e4df36ac1d1c754ca4d9716d60b1df", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_clear_cobalt_backdrop" + }, + { + "path": "template-gallery/reviews/sdxl_clear_cobalt_backdrop.original-review.json", + "sha256": "sha256:bytes:d7edf6240c066f9d48ab24fd45c77556b2afa52e145f530428c93620496ddf15", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_clear_cobalt_backdrop" + }, + { + "path": "template-gallery/reviews/sdxl_clear_cobalt_backdrop.quality-review.json", + "sha256": "sha256:bytes:c5853176bee61c270f06f94714ff9e968eb466ab7198d26d78a1d9dc4482cb41", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_clear_cobalt_backdrop" + }, + { + "path": "template-gallery/reviews/sdxl_clear_cobalt_backdrop.retained-template-provenance.json", + "sha256": "sha256:bytes:b680690954be3c7784aed2b97110d50706dc3ebb56df9e61611b203150a90b39", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_clear_cobalt_backdrop" + }, + { + "path": "template-gallery/reviews/sdxl_control_golden_boathouse.original-provenance.json", + "sha256": "sha256:bytes:ecfe216b3884fc1471abf2305a3f4e0216b4b7f2eb05324720e081cbcf945eb1", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_control_golden_boathouse" + }, + { + "path": "template-gallery/reviews/sdxl_control_golden_boathouse.original-review.json", + "sha256": "sha256:bytes:c552f8bfe66a6983be2ab31844c4a468a6132e0e43a8a4553e67a497ec70a8ef", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_control_golden_boathouse" + }, + { + "path": "template-gallery/reviews/sdxl_control_golden_boathouse.quality-review.json", + "sha256": "sha256:bytes:3fdc382b76e87f894d2a03a5666ce990b33da15e348abf47e7176aaf82fb8f97", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_control_golden_boathouse" + }, + { + "path": "template-gallery/reviews/sdxl_control_golden_boathouse.retained-template-provenance.json", + "sha256": "sha256:bytes:5d442e9e2219d92d7360b927357bc34f1d8948776601d716369786fcd2a153b9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_control_golden_boathouse" + }, + { + "path": "template-gallery/reviews/sdxl_control_inpaint_warm_plaster.original-provenance.json", + "sha256": "sha256:bytes:661ddabb9dd317859660c6d6c56737672f0969c2637153b2aa3a14b1422cac0b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_control_inpaint_warm_plaster" + }, + { + "path": "template-gallery/reviews/sdxl_control_inpaint_warm_plaster.original-review.json", + "sha256": "sha256:bytes:9ec0f8ff6cc645c9c9c9c9102965753af931061398629edb65727f99d2cb7faa", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_control_inpaint_warm_plaster" + }, + { + "path": "template-gallery/reviews/sdxl_control_inpaint_warm_plaster.quality-review.json", + "sha256": "sha256:bytes:4e3e6d321e3c4b7b17ba5ff675c610bd6c0a86779bda8e1c2fa0b3c25754d15e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_control_inpaint_warm_plaster" + }, + { + "path": "template-gallery/reviews/sdxl_control_inpaint_warm_plaster.retained-template-provenance.json", + "sha256": "sha256:bytes:b55fbe6ba9d7b2243d12fe0227026b502eb8674412f4da62cc0ef72b57a91370", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_control_inpaint_warm_plaster" + }, + { + "path": "template-gallery/reviews/sdxl_controlnet_glass_study_on_slate.original-provenance.json", + "sha256": "sha256:bytes:5eff28279014893ed1b626866eef574cb72798d376da8faef83766c89e3e8223", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_controlnet_glass_study_on_slate" + }, + { + "path": "template-gallery/reviews/sdxl_controlnet_glass_study_on_slate.original-review.json", + "sha256": "sha256:bytes:42676c7dd7b9bd9c2062dd771f1d63f7507670609ba6ef543b066877c6f86de1", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_controlnet_glass_study_on_slate" + }, + { + "path": "template-gallery/reviews/sdxl_controlnet_glass_study_on_slate.quality-review.json", + "sha256": "sha256:bytes:3ad7e229aa4536d60a0337200d22d47e753f7770edbce0528a7dd89f3f7f0895", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_controlnet_glass_study_on_slate" + }, + { + "path": "template-gallery/reviews/sdxl_controlnet_glass_study_on_slate.retained-template-provenance.json", + "sha256": "sha256:bytes:564bd43c3c23f41f40e46ee762ad2a3c61e63ca7a5600f8af0fdf92b263856fe", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_controlnet_glass_study_on_slate" + }, + { + "path": "template-gallery/reviews/sdxl_pag_cobalt_wall.original-provenance.json", + "sha256": "sha256:bytes:73001e41f7161d3d7f501d8901c64ea75b69926342d874f517161846bbc2c65e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_cobalt_wall" + }, + { + "path": "template-gallery/reviews/sdxl_pag_cobalt_wall.original-review.json", + "sha256": "sha256:bytes:9c33914daf546f076a1cd4248d62bca41f48046bbf32641336a61e6af8ce5ae6", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_cobalt_wall" + }, + { + "path": "template-gallery/reviews/sdxl_pag_cobalt_wall.quality-review.json", + "sha256": "sha256:bytes:792bcb8050a146a925e0a3459c499e41ca08f710496292775ed7a85acf4e1ddf", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_cobalt_wall" + }, + { + "path": "template-gallery/reviews/sdxl_pag_cobalt_wall.retained-template-provenance.json", + "sha256": "sha256:bytes:69442605e67b4da6af5ab3971559219066b7c569139088412a65945487509612", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_cobalt_wall" + }, + { + "path": "template-gallery/reviews/sdxl_pag_lighthouse_in_graphite.original-provenance.json", + "sha256": "sha256:bytes:042e90f725818b6ec86db0f60b7b19cc59856e445c3b11c8f81bd11f6b817d18", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_lighthouse_in_graphite" + }, + { + "path": "template-gallery/reviews/sdxl_pag_lighthouse_in_graphite.original-review.json", + "sha256": "sha256:bytes:02aece417b9581ebf7330fdcb4bac17e156a77564df88093d4748342c46011f6", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_lighthouse_in_graphite" + }, + { + "path": "template-gallery/reviews/sdxl_pag_lighthouse_in_graphite.quality-review.json", + "sha256": "sha256:bytes:fff347aeb1f18af04502cb973b04ebda279e36ddcfe30ccfdec6f2e13254f550", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_lighthouse_in_graphite" + }, + { + "path": "template-gallery/reviews/sdxl_pag_lighthouse_in_graphite.retained-template-provenance.json", + "sha256": "sha256:bytes:0a272b63747525e66ca2d17e43739ea139ac97497e02d08443f72486dc980530", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_lighthouse_in_graphite" + }, + { + "path": "template-gallery/reviews/sdxl_pag_snow_cabin.original-provenance.json", + "sha256": "sha256:bytes:9f8fc8e1ec02ce87e641958fdbded7f199cee15cde9e077cbb40b12e0e8d7d93", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_snow_cabin" + }, + { + "path": "template-gallery/reviews/sdxl_pag_snow_cabin.original-review.json", + "sha256": "sha256:bytes:5b23c67819bad2bb24ccdbd2058df59a33a560077c260097e5711ef9a74746ba", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_snow_cabin" + }, + { + "path": "template-gallery/reviews/sdxl_pag_snow_cabin.quality-review.json", + "sha256": "sha256:bytes:d29b39aeafcf213fbcfff098372b9aad723d5a08c8fd63970f98162ed64e8ad3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_snow_cabin" + }, + { + "path": "template-gallery/reviews/sdxl_pag_snow_cabin.retained-template-provenance.json", + "sha256": "sha256:bytes:d82c38326bd8b615ed7a934890b979e34f2870f8b0c7aa6f919f0b541d828905", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_snow_cabin" + }, + { + "path": "template-gallery/reviews/sdxl_pag_two_tier_cobalt_glass.original-provenance.json", + "sha256": "sha256:bytes:d4964819e6cb3ce6ba2484f5cac7f9a7b5eb45a24760cc256e01d060c4ab797b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/diffusers/controlnet-canny-sdxl-1.0/tree/eb115a19a10d14909256db740ed109532ab1483c", + "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_two_tier_cobalt_glass" + }, + { + "path": "template-gallery/reviews/sdxl_pag_two_tier_cobalt_glass.original-review.json", + "sha256": "sha256:bytes:4b05631fe8df2205288c9afa83ffea0814cf681163cabc05a9c5b8cf5ec238c9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/diffusers/controlnet-canny-sdxl-1.0/tree/eb115a19a10d14909256db740ed109532ab1483c", + "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_two_tier_cobalt_glass" + }, + { + "path": "template-gallery/reviews/sdxl_pag_two_tier_cobalt_glass.quality-review.json", + "sha256": "sha256:bytes:b146fa66a1c40921b090b5356a4d288e0bcf9ee27c3c3406d551188acb79eb5a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/diffusers/controlnet-canny-sdxl-1.0/tree/eb115a19a10d14909256db740ed109532ab1483c", + "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_two_tier_cobalt_glass" + }, + { + "path": "template-gallery/reviews/sdxl_pag_two_tier_cobalt_glass.retained-template-provenance.json", + "sha256": "sha256:bytes:0e83d8ea9d2bd9e76097be0cf86fff4049d744c7be289dabb5f08039f6afc599", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/diffusers/controlnet-canny-sdxl-1.0/tree/eb115a19a10d14909256db740ed109532ab1483c", + "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_two_tier_cobalt_glass" + }, + { + "path": "template-gallery/reviews/sdxl_pix2pix_pale_amber_glass.original-provenance.json", + "sha256": "sha256:bytes:173457c9a8b1562e8268041daa277812a04739145a537765cdcb49278cabce33", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/diffusers/sdxl-instructpix2pix-768/tree/06653d47f8d22f2c2205a5884d6a24c5e76d2ca7", + "sourceRevision": "diffusers/sdxl-instructpix2pix-768@06653d47f8d22f2c2205a5884d6a24c5e76d2ca7", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/diffusers/sdxl-instructpix2pix-768/tree/06653d47f8d22f2c2205a5884d6a24c5e76d2ca7" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "diffusers/sdxl-instructpix2pix-768@06653d47f8d22f2c2205a5884d6a24c5e76d2ca7 https://huggingface.co/diffusers/sdxl-instructpix2pix-768/tree/06653d47f8d22f2c2205a5884d6a24c5e76d2ca7" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pix2pix_pale_amber_glass" + }, + { + "path": "template-gallery/reviews/sdxl_pix2pix_pale_amber_glass.original-review.json", + "sha256": "sha256:bytes:8f6ce6ee6887bc2d878b762faa054f5a26d6853c11fadc6ca32b0f71fb4ad080", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/diffusers/sdxl-instructpix2pix-768/tree/06653d47f8d22f2c2205a5884d6a24c5e76d2ca7", + "sourceRevision": "diffusers/sdxl-instructpix2pix-768@06653d47f8d22f2c2205a5884d6a24c5e76d2ca7", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/diffusers/sdxl-instructpix2pix-768/tree/06653d47f8d22f2c2205a5884d6a24c5e76d2ca7" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "diffusers/sdxl-instructpix2pix-768@06653d47f8d22f2c2205a5884d6a24c5e76d2ca7 https://huggingface.co/diffusers/sdxl-instructpix2pix-768/tree/06653d47f8d22f2c2205a5884d6a24c5e76d2ca7" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pix2pix_pale_amber_glass" + }, + { + "path": "template-gallery/reviews/sdxl_pix2pix_pale_amber_glass.quality-review.json", + "sha256": "sha256:bytes:214f457d0759bb55820c36572a44b2cf144ac11d6b87180326a1dd72ec903e12", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/diffusers/sdxl-instructpix2pix-768/tree/06653d47f8d22f2c2205a5884d6a24c5e76d2ca7", + "sourceRevision": "diffusers/sdxl-instructpix2pix-768@06653d47f8d22f2c2205a5884d6a24c5e76d2ca7", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/diffusers/sdxl-instructpix2pix-768/tree/06653d47f8d22f2c2205a5884d6a24c5e76d2ca7" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "diffusers/sdxl-instructpix2pix-768@06653d47f8d22f2c2205a5884d6a24c5e76d2ca7 https://huggingface.co/diffusers/sdxl-instructpix2pix-768/tree/06653d47f8d22f2c2205a5884d6a24c5e76d2ca7" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pix2pix_pale_amber_glass" + }, + { + "path": "template-gallery/reviews/sdxl_pix2pix_pale_amber_glass.retained-template-provenance.json", + "sha256": "sha256:bytes:571dbef32e64cbea069c54c9a71408eb47cbf6854dbbb10e9060dfe04758cf99", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/diffusers/sdxl-instructpix2pix-768/tree/06653d47f8d22f2c2205a5884d6a24c5e76d2ca7", + "sourceRevision": "diffusers/sdxl-instructpix2pix-768@06653d47f8d22f2c2205a5884d6a24c5e76d2ca7", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/diffusers/sdxl-instructpix2pix-768/tree/06653d47f8d22f2c2205a5884d6a24c5e76d2ca7" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "diffusers/sdxl-instructpix2pix-768@06653d47f8d22f2c2205a5884d6a24c5e76d2ca7 https://huggingface.co/diffusers/sdxl-instructpix2pix-768/tree/06653d47f8d22f2c2205a5884d6a24c5e76d2ca7" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pix2pix_pale_amber_glass" + }, + { + "path": "template-gallery/reviews/sdxl_turbo_orange_caps.original-provenance.json", + "sha256": "sha256:bytes:38ebec1786b4ca93369a6e08f61c7fa24ed755f1a11804d2f0378d0b5b4c0f74", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/sdxl-turbo/tree/71153311d3dbb46851df1931d3ca6e939de83304", + "sourceRevision": "stabilityai/sdxl-turbo@71153311d3dbb46851df1931d3ca6e939de83304", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/stabilityai/sdxl-turbo/blob/71153311d3dbb46851df1931d3ca6e939de83304/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/sdxl-turbo@71153311d3dbb46851df1931d3ca6e939de83304 https://huggingface.co/stabilityai/sdxl-turbo/tree/71153311d3dbb46851df1931d3ca6e939de83304" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_turbo_orange_caps" + }, + { + "path": "template-gallery/reviews/sdxl_turbo_orange_caps.original-review.json", + "sha256": "sha256:bytes:45bccd884aec054b8054d8253ef61fe6a09716a97d2ca3331eae39fed60d675c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/sdxl-turbo/tree/71153311d3dbb46851df1931d3ca6e939de83304", + "sourceRevision": "stabilityai/sdxl-turbo@71153311d3dbb46851df1931d3ca6e939de83304", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/stabilityai/sdxl-turbo/blob/71153311d3dbb46851df1931d3ca6e939de83304/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/sdxl-turbo@71153311d3dbb46851df1931d3ca6e939de83304 https://huggingface.co/stabilityai/sdxl-turbo/tree/71153311d3dbb46851df1931d3ca6e939de83304" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_turbo_orange_caps" + }, + { + "path": "template-gallery/reviews/sdxl_turbo_orange_caps.quality-review.json", + "sha256": "sha256:bytes:b65f8f13cbb77853bc90c4015ce3432a353f22d1b4b8d3faeecb5ac1a00ba9e0", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/sdxl-turbo/tree/71153311d3dbb46851df1931d3ca6e939de83304", + "sourceRevision": "stabilityai/sdxl-turbo@71153311d3dbb46851df1931d3ca6e939de83304", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/stabilityai/sdxl-turbo/blob/71153311d3dbb46851df1931d3ca6e939de83304/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/sdxl-turbo@71153311d3dbb46851df1931d3ca6e939de83304 https://huggingface.co/stabilityai/sdxl-turbo/tree/71153311d3dbb46851df1931d3ca6e939de83304" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_turbo_orange_caps" + }, + { + "path": "template-gallery/reviews/sdxl_turbo_orange_caps.retained-template-provenance.json", + "sha256": "sha256:bytes:485e9d39648d71e0c2d449418ed6124bb37ae1e7928a2bcbc1592040929f01bd", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/sdxl-turbo/tree/71153311d3dbb46851df1931d3ca6e939de83304", + "sourceRevision": "stabilityai/sdxl-turbo@71153311d3dbb46851df1931d3ca6e939de83304", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/stabilityai/sdxl-turbo/blob/71153311d3dbb46851df1931d3ca6e939de83304/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/sdxl-turbo@71153311d3dbb46851df1931d3ca6e939de83304 https://huggingface.co/stabilityai/sdxl-turbo/tree/71153311d3dbb46851df1931d3ca6e939de83304" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_turbo_orange_caps" + }, + { + "path": "template-gallery/reviews/shap_e_traffic_cone_turntable.original-provenance.json", + "sha256": "sha256:bytes:668bdbe05f99a8ab63a923569cb852fc7fb9dc28fd5bd8a978425bd02db021d8", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/openai/shap-e/tree/7bd337afdea1c17842e1c3cc45c4e268356dba40", + "sourceRevision": "openai/shap-e@7bd337afdea1c17842e1c3cc45c4e268356dba40", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/openai/shap-e/tree/7bd337afdea1c17842e1c3cc45c4e268356dba40" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "openai/shap-e@7bd337afdea1c17842e1c3cc45c4e268356dba40 https://huggingface.co/openai/shap-e/tree/7bd337afdea1c17842e1c3cc45c4e268356dba40" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "8ed148b43a11d27176b996c42432ccd9bd06c7c94b64f08a48dc4167de24a698", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "shap_e_traffic_cone_turntable" + }, + { + "path": "template-gallery/reviews/shap_e_traffic_cone_turntable.original-review.json", + "sha256": "sha256:bytes:9fd2d7c5b61bfca3f70994218c302b4c939cbe6f78064360fe32d93633969c22", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/openai/shap-e/tree/7bd337afdea1c17842e1c3cc45c4e268356dba40", + "sourceRevision": "openai/shap-e@7bd337afdea1c17842e1c3cc45c4e268356dba40", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/openai/shap-e/tree/7bd337afdea1c17842e1c3cc45c4e268356dba40" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "openai/shap-e@7bd337afdea1c17842e1c3cc45c4e268356dba40 https://huggingface.co/openai/shap-e/tree/7bd337afdea1c17842e1c3cc45c4e268356dba40" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "8ed148b43a11d27176b996c42432ccd9bd06c7c94b64f08a48dc4167de24a698", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "shap_e_traffic_cone_turntable" + }, + { + "path": "template-gallery/reviews/shap_e_traffic_cone_turntable.quality-review.json", + "sha256": "sha256:bytes:241507a58736bbcd8f4ca1948fc842276fda4fe1635ddd6cd0bfe057159a7505", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/openai/shap-e/tree/7bd337afdea1c17842e1c3cc45c4e268356dba40", + "sourceRevision": "openai/shap-e@7bd337afdea1c17842e1c3cc45c4e268356dba40", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/openai/shap-e/tree/7bd337afdea1c17842e1c3cc45c4e268356dba40" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "openai/shap-e@7bd337afdea1c17842e1c3cc45c4e268356dba40 https://huggingface.co/openai/shap-e/tree/7bd337afdea1c17842e1c3cc45c4e268356dba40" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "8ed148b43a11d27176b996c42432ccd9bd06c7c94b64f08a48dc4167de24a698", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "shap_e_traffic_cone_turntable" + }, + { + "path": "template-gallery/reviews/shap_e_traffic_cone_turntable.retained-template-provenance.json", + "sha256": "sha256:bytes:72579b5cd08573adefe06f1ddda3b6f9c1c42f3f2c36622ef64cec896d03d0f7", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/openai/shap-e/tree/7bd337afdea1c17842e1c3cc45c4e268356dba40", + "sourceRevision": "openai/shap-e@7bd337afdea1c17842e1c3cc45c4e268356dba40", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/openai/shap-e/tree/7bd337afdea1c17842e1c3cc45c4e268356dba40" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "openai/shap-e@7bd337afdea1c17842e1c3cc45c4e268356dba40 https://huggingface.co/openai/shap-e/tree/7bd337afdea1c17842e1c3cc45c4e268356dba40" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "8ed148b43a11d27176b996c42432ccd9bd06c7c94b64f08a48dc4167de24a698", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "shap_e_traffic_cone_turntable" + }, + { + "path": "template-gallery/reviews/smollm2_rain_gauge.quality-review.json", + "sha256": "sha256:bytes:a457e4143d17eecd1af499e61a28e7df0533b4a6a8f67712182ab8a829115e09", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted retained Gallery provenance, review, or registration metadata", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "MoDiff-authored exact fixture or Gallery metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-19", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "e604b0284a57b65b20343c7776511ae15bef922c7e104c09f0f6931eec610d2d", + "publicationBasis": "Activate and publish the two approved Gallery candidates using their retained native runs.", + "provenanceTemplateId": "smollm2_rain_gauge" + }, + { + "path": "template-gallery/reviews/smollm2_rain_gauge.retained-template-provenance.json", + "sha256": "sha256:bytes:6b45536aab6905c02b1e937fb6c684765c30354ceff8e05c7ec6c1454500f168", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted retained Gallery provenance, review, or registration metadata", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "MoDiff-authored exact fixture or Gallery metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-19", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "e604b0284a57b65b20343c7776511ae15bef922c7e104c09f0f6931eec610d2d", + "publicationBasis": "Activate and publish the two approved Gallery candidates using their retained native runs.", + "provenanceTemplateId": "smollm2_rain_gauge" + }, + { + "path": "template-gallery/reviews/smolvlm_red_triangle.original-provenance.json", + "sha256": "sha256:bytes:7ef65f47028ad3af96b1189b40a52d085c696475b0e9ee55ea1d780f286a3481", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/HuggingFaceTB/SmolVLM-256M-Instruct/tree/7e3e67edbbed1bf9888184d9df282b700a323964", + "sourceRevision": "HuggingFaceTB/SmolVLM-256M-Instruct@7e3e67edbbed1bf9888184d9df282b700a323964", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/HuggingFaceTB/SmolVLM-256M-Instruct/tree/7e3e67edbbed1bf9888184d9df282b700a323964" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "HuggingFaceTB/SmolVLM-256M-Instruct@7e3e67edbbed1bf9888184d9df282b700a323964 https://huggingface.co/HuggingFaceTB/SmolVLM-256M-Instruct/tree/7e3e67edbbed1bf9888184d9df282b700a323964" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "smolvlm_red_triangle" + }, + { + "path": "template-gallery/reviews/smolvlm_red_triangle.original-review.json", + "sha256": "sha256:bytes:24aae45e0bf9ca8ec749e8521293a25beb56dc264276604e634699eed52f852e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/HuggingFaceTB/SmolVLM-256M-Instruct/tree/7e3e67edbbed1bf9888184d9df282b700a323964", + "sourceRevision": "HuggingFaceTB/SmolVLM-256M-Instruct@7e3e67edbbed1bf9888184d9df282b700a323964", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/HuggingFaceTB/SmolVLM-256M-Instruct/tree/7e3e67edbbed1bf9888184d9df282b700a323964" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "HuggingFaceTB/SmolVLM-256M-Instruct@7e3e67edbbed1bf9888184d9df282b700a323964 https://huggingface.co/HuggingFaceTB/SmolVLM-256M-Instruct/tree/7e3e67edbbed1bf9888184d9df282b700a323964" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "smolvlm_red_triangle" + }, + { + "path": "template-gallery/reviews/smolvlm_red_triangle.quality-review.json", + "sha256": "sha256:bytes:d7f5e471998c28cb0ba86532b0471c0a2a3ff1c9ea17e2e9169bcb91cf835bd1", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/HuggingFaceTB/SmolVLM-256M-Instruct/tree/7e3e67edbbed1bf9888184d9df282b700a323964", + "sourceRevision": "HuggingFaceTB/SmolVLM-256M-Instruct@7e3e67edbbed1bf9888184d9df282b700a323964", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/HuggingFaceTB/SmolVLM-256M-Instruct/tree/7e3e67edbbed1bf9888184d9df282b700a323964" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "HuggingFaceTB/SmolVLM-256M-Instruct@7e3e67edbbed1bf9888184d9df282b700a323964 https://huggingface.co/HuggingFaceTB/SmolVLM-256M-Instruct/tree/7e3e67edbbed1bf9888184d9df282b700a323964" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "smolvlm_red_triangle" + }, + { + "path": "template-gallery/reviews/smolvlm_red_triangle.retained-template-provenance.json", + "sha256": "sha256:bytes:45f154d4661611e859e67593f38fef064e544c1806c03a1f67919120b169d4f1", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/HuggingFaceTB/SmolVLM-256M-Instruct/tree/7e3e67edbbed1bf9888184d9df282b700a323964", + "sourceRevision": "HuggingFaceTB/SmolVLM-256M-Instruct@7e3e67edbbed1bf9888184d9df282b700a323964", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/HuggingFaceTB/SmolVLM-256M-Instruct/tree/7e3e67edbbed1bf9888184d9df282b700a323964" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "HuggingFaceTB/SmolVLM-256M-Instruct@7e3e67edbbed1bf9888184d9df282b700a323964 https://huggingface.co/HuggingFaceTB/SmolVLM-256M-Instruct/tree/7e3e67edbbed1bf9888184d9df282b700a323964" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "smolvlm_red_triangle" + }, + { + "path": "template-gallery/reviews/spandrel_tram_shelter_video_2x.original-provenance.json", + "sha256": "sha256:bytes:93548255b2f66162d1dae4838547a8144eb5b0bba7885db5914d54702f98efe5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "spandrel_tram_shelter_video_2x" + }, + { + "path": "template-gallery/reviews/spandrel_tram_shelter_video_2x.original-review.json", + "sha256": "sha256:bytes:ebc2cc444a1f0e83614e35d41b598ab8a78c57768313b6bc45f5ca4dff1b72e9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "spandrel_tram_shelter_video_2x" + }, + { + "path": "template-gallery/reviews/spandrel_tram_shelter_video_2x.quality-review.json", + "sha256": "sha256:bytes:584a2e4480f23b8489a3dd11930f64fdd7956619e25c24b7489e859f665b70e8", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "spandrel_tram_shelter_video_2x" + }, + { + "path": "template-gallery/reviews/spandrel_tram_shelter_video_2x.retained-template-provenance.json", + "sha256": "sha256:bytes:2ad672e15b395ae0437eae8380083ed4ee76bf6a1efafa683570226080a212c1", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "spandrel_tram_shelter_video_2x" + }, + { + "path": "template-gallery/reviews/spandrel_x2_synthetic_gradient.quality-review.json", + "sha256": "sha256:bytes:75cd20b7aa48a0e129f10d09801f4ee7183c8a3bda5cf8a16bf372d9459c97f1", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted retained Gallery review, provenance or registration metadata", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "MoDiff-authored fixture or Gallery metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-19", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ea2e749b805706828428bd34589bd41263e9c432a9503fe17c3c6a6d7d932176", + "publicationBasis": "Maintainer approved this exact saved Spandrel 2× technical preview and confirmed redistribution rights.", + "provenanceTemplateId": "spandrel_x2_synthetic_gradient" + }, + { + "path": "template-gallery/reviews/spandrel_x2_synthetic_gradient.retained-template-provenance.json", + "sha256": "sha256:bytes:43789929c6d5eab5bf18f99df491e30a71f0ebd0a74b8162af30893303e282c0", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted retained Gallery review, provenance or registration metadata", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "MoDiff-authored fixture or Gallery metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-19", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ea2e749b805706828428bd34589bd41263e9c432a9503fe17c3c6a6d7d932176", + "publicationBasis": "Maintainer approved this exact saved Spandrel 2× technical preview and confirmed redistribution rights.", + "provenanceTemplateId": "spandrel_x2_synthetic_gradient" + }, + { + "path": "template-gallery/reviews/stable_audio_glass_roof_rain.original-provenance.json", + "sha256": "sha256:bytes:26867757b5d173fd0561791ca6114c84c2cb07b0790c2c2c292b3a109af12bc9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-audio-open-1.0/tree/f21265c1e2710b3bd2386596943f0007f55f802e", + "sourceRevision": "stabilityai/stable-audio-open-1.0@f21265c1e2710b3bd2386596943f0007f55f802e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/stabilityai/stable-audio-open-1.0/blob/f21265c1e2710b3bd2386596943f0007f55f802e/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-audio-open-1.0@f21265c1e2710b3bd2386596943f0007f55f802e https://huggingface.co/stabilityai/stable-audio-open-1.0/tree/f21265c1e2710b3bd2386596943f0007f55f802e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "a7a2ce4e3e9bdfddcd33a4f3c2a7df0b69c0e815eef0493a9f0a748acf1716b8", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "stable_audio_glass_roof_rain" + }, + { + "path": "template-gallery/reviews/stable_audio_glass_roof_rain.original-review.json", + "sha256": "sha256:bytes:57dc1622e671d71d0f34df6890aaf520a98e64dd2f333edcac58fb6a641afea9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-audio-open-1.0/tree/f21265c1e2710b3bd2386596943f0007f55f802e", + "sourceRevision": "stabilityai/stable-audio-open-1.0@f21265c1e2710b3bd2386596943f0007f55f802e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/stabilityai/stable-audio-open-1.0/blob/f21265c1e2710b3bd2386596943f0007f55f802e/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-audio-open-1.0@f21265c1e2710b3bd2386596943f0007f55f802e https://huggingface.co/stabilityai/stable-audio-open-1.0/tree/f21265c1e2710b3bd2386596943f0007f55f802e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "a7a2ce4e3e9bdfddcd33a4f3c2a7df0b69c0e815eef0493a9f0a748acf1716b8", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "stable_audio_glass_roof_rain" + }, + { + "path": "template-gallery/reviews/stable_audio_glass_roof_rain.quality-review.json", + "sha256": "sha256:bytes:2aa5a85090091d93cf2b23494790f75146c523fe1880bef0b0212d9f8bd7d2d5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-audio-open-1.0/tree/f21265c1e2710b3bd2386596943f0007f55f802e", + "sourceRevision": "stabilityai/stable-audio-open-1.0@f21265c1e2710b3bd2386596943f0007f55f802e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/stabilityai/stable-audio-open-1.0/blob/f21265c1e2710b3bd2386596943f0007f55f802e/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-audio-open-1.0@f21265c1e2710b3bd2386596943f0007f55f802e https://huggingface.co/stabilityai/stable-audio-open-1.0/tree/f21265c1e2710b3bd2386596943f0007f55f802e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "a7a2ce4e3e9bdfddcd33a4f3c2a7df0b69c0e815eef0493a9f0a748acf1716b8", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "stable_audio_glass_roof_rain" + }, + { + "path": "template-gallery/reviews/stable_audio_glass_roof_rain.retained-template-provenance.json", + "sha256": "sha256:bytes:6681cbf847e93d8e25b0bde0f61aaa1d7928e68d439875d8c204c69dc55fb7e9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-audio-open-1.0/tree/f21265c1e2710b3bd2386596943f0007f55f802e", + "sourceRevision": "stabilityai/stable-audio-open-1.0@f21265c1e2710b3bd2386596943f0007f55f802e", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/stabilityai/stable-audio-open-1.0/blob/f21265c1e2710b3bd2386596943f0007f55f802e/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-audio-open-1.0@f21265c1e2710b3bd2386596943f0007f55f802e https://huggingface.co/stabilityai/stable-audio-open-1.0/tree/f21265c1e2710b3bd2386596943f0007f55f802e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "a7a2ce4e3e9bdfddcd33a4f3c2a7df0b69c0e815eef0493a9f0a748acf1716b8", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "stable_audio_glass_roof_rain" + }, + { + "path": "template-gallery/reviews/stable_video_lighthouse_headland.original-provenance.json", + "sha256": "sha256:bytes:25bb70c7420bc425e8d919e74d2a48e7debf888e362b5c6da84ae841878cab74", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/tree/043843887ccd51926e3efed36270444a838e7861", + "sourceRevision": "stabilityai/stable-video-diffusion-img2vid-xt-1-1@043843887ccd51926e3efed36270444a838e7861", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/blob/043843887ccd51926e3efed36270444a838e7861/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-video-diffusion-img2vid-xt-1-1@043843887ccd51926e3efed36270444a838e7861 https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/tree/043843887ccd51926e3efed36270444a838e7861" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "a7a2ce4e3e9bdfddcd33a4f3c2a7df0b69c0e815eef0493a9f0a748acf1716b8", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "stable_video_lighthouse_headland" + }, + { + "path": "template-gallery/reviews/stable_video_lighthouse_headland.original-review.json", + "sha256": "sha256:bytes:9c2dbec34ba3818608ecd4e0f72729926d8ea1d536e90fb2e1a64d3cb1cad597", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/tree/043843887ccd51926e3efed36270444a838e7861", + "sourceRevision": "stabilityai/stable-video-diffusion-img2vid-xt-1-1@043843887ccd51926e3efed36270444a838e7861", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/blob/043843887ccd51926e3efed36270444a838e7861/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-video-diffusion-img2vid-xt-1-1@043843887ccd51926e3efed36270444a838e7861 https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/tree/043843887ccd51926e3efed36270444a838e7861" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "a7a2ce4e3e9bdfddcd33a4f3c2a7df0b69c0e815eef0493a9f0a748acf1716b8", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "stable_video_lighthouse_headland" + }, + { + "path": "template-gallery/reviews/stable_video_lighthouse_headland.quality-review.json", + "sha256": "sha256:bytes:f61d4759e7dd2ef99f9553cce415e5f278eca5c61c68391935b6a5d9ac90ad3d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/tree/043843887ccd51926e3efed36270444a838e7861", + "sourceRevision": "stabilityai/stable-video-diffusion-img2vid-xt-1-1@043843887ccd51926e3efed36270444a838e7861", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/blob/043843887ccd51926e3efed36270444a838e7861/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-video-diffusion-img2vid-xt-1-1@043843887ccd51926e3efed36270444a838e7861 https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/tree/043843887ccd51926e3efed36270444a838e7861" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "a7a2ce4e3e9bdfddcd33a4f3c2a7df0b69c0e815eef0493a9f0a748acf1716b8", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "stable_video_lighthouse_headland" + }, + { + "path": "template-gallery/reviews/stable_video_lighthouse_headland.retained-template-provenance.json", + "sha256": "sha256:bytes:4522c6ff83f21b51ed4de646d27e95475255931ac9e243c77d167bc039c66f67", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/tree/043843887ccd51926e3efed36270444a838e7861", + "sourceRevision": "stabilityai/stable-video-diffusion-img2vid-xt-1-1@043843887ccd51926e3efed36270444a838e7861", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/blob/043843887ccd51926e3efed36270444a838e7861/LICENSE.md" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-video-diffusion-img2vid-xt-1-1@043843887ccd51926e3efed36270444a838e7861 https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/tree/043843887ccd51926e3efed36270444a838e7861" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "a7a2ce4e3e9bdfddcd33a4f3c2a7df0b69c0e815eef0493a9f0a748acf1716b8", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "stable_video_lighthouse_headland" + }, + { + "path": "template-gallery/reviews/the_glasshouse_seed_tray.original-provenance.json", + "sha256": "sha256:bytes:267ab964ea3749739c8f58b86f7b94aa2c2cfe506a12c4f33c615c8415a97230", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "CreativeML Open RAIL++-M. https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "the_glasshouse_seed_tray" + }, + { + "path": "template-gallery/reviews/the_glasshouse_seed_tray.original-review.json", + "sha256": "sha256:bytes:49410d9deaf87256d1f77a2ee3839b8ae49ddd9ba4a33b6bc740347c4ce12744", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "CreativeML Open RAIL++-M. https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "the_glasshouse_seed_tray" + }, + { + "path": "template-gallery/reviews/the_glasshouse_seed_tray.quality-review.json", + "sha256": "sha256:bytes:ddc92db2d2f6ce8da152019e33a20b66ffd61a780d72b76ce550fd2d00d63a33", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "CreativeML Open RAIL++-M. https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "the_glasshouse_seed_tray" + }, + { + "path": "template-gallery/reviews/the_glasshouse_seed_tray.retained-template-provenance.json", + "sha256": "sha256:bytes:c719553a51b1b44737b448ad981e6e14d2e71ad4a63deb0a865453e94e7c78c8", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "CreativeML Open RAIL++-M. https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "the_glasshouse_seed_tray" + }, + { + "path": "template-gallery/reviews/wan_22_ti2v_5b_seed_vault.quality-review.json", + "sha256": "sha256:bytes:119627f8cbd5751af0bf7cbf7dc7f5fa6a22ce28000438e0e49fc7569a493596", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "provenanceTemplateId": "wan_22_ti2v_5b_seed_vault" + }, + { + "path": "template-gallery/reviews/wan_22_ti2v_5b_seed_vault.reviewed-provenance.json", + "sha256": "sha256:bytes:260b3901159d64efad800ec39e72a1ac893e0b1f717551b572288f2a10efe1e8", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "provenanceTemplateId": "wan_22_ti2v_5b_seed_vault" + }, + { + "path": "template-gallery/reviews/wan_a14b_cloudbreak_over_the_ridges.original-provenance.json", + "sha256": "sha256:bytes:865acf7a0ce08eb184068a1dea15a3f7327c627d39056a104856e226f845e312", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers/tree/5be7df9619b54f4e2667b2755bc6a756675b5cd7", + "sourceRevision": "Wan-AI/Wan2.2-T2V-A14B-Diffusers@5be7df9619b54f4e2667b2755bc6a756675b5cd7", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers/tree/5be7df9619b54f4e2667b2755bc6a756675b5cd7" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-T2V-A14B-Diffusers@5be7df9619b54f4e2667b2755bc6a756675b5cd7 https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers/tree/5be7df9619b54f4e2667b2755bc6a756675b5cd7" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_a14b_cloudbreak_over_the_ridges" + }, + { + "path": "template-gallery/reviews/wan_a14b_cloudbreak_over_the_ridges.original-review.json", + "sha256": "sha256:bytes:f34e7a0de89fb4c48b70237f53f6db6f4de06d26ad7c6f582c6f7a6513f780ba", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers/tree/5be7df9619b54f4e2667b2755bc6a756675b5cd7", + "sourceRevision": "Wan-AI/Wan2.2-T2V-A14B-Diffusers@5be7df9619b54f4e2667b2755bc6a756675b5cd7", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers/tree/5be7df9619b54f4e2667b2755bc6a756675b5cd7" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-T2V-A14B-Diffusers@5be7df9619b54f4e2667b2755bc6a756675b5cd7 https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers/tree/5be7df9619b54f4e2667b2755bc6a756675b5cd7" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_a14b_cloudbreak_over_the_ridges" + }, + { + "path": "template-gallery/reviews/wan_a14b_cloudbreak_over_the_ridges.quality-review.json", + "sha256": "sha256:bytes:f6b307987e3779cdf108f2c9832d960e3a3d53087267a6e38446aeb43a05c5b6", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers/tree/5be7df9619b54f4e2667b2755bc6a756675b5cd7", + "sourceRevision": "Wan-AI/Wan2.2-T2V-A14B-Diffusers@5be7df9619b54f4e2667b2755bc6a756675b5cd7", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers/tree/5be7df9619b54f4e2667b2755bc6a756675b5cd7" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-T2V-A14B-Diffusers@5be7df9619b54f4e2667b2755bc6a756675b5cd7 https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers/tree/5be7df9619b54f4e2667b2755bc6a756675b5cd7" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_a14b_cloudbreak_over_the_ridges" + }, + { + "path": "template-gallery/reviews/wan_a14b_cloudbreak_over_the_ridges.retained-template-provenance.json", + "sha256": "sha256:bytes:179c61ab54e5174a0c8504960903d5abf55bb04033116946d8a0fd5c994a7c70", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers/tree/5be7df9619b54f4e2667b2755bc6a756675b5cd7", + "sourceRevision": "Wan-AI/Wan2.2-T2V-A14B-Diffusers@5be7df9619b54f4e2667b2755bc6a756675b5cd7", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers/tree/5be7df9619b54f4e2667b2755bc6a756675b5cd7" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-T2V-A14B-Diffusers@5be7df9619b54f4e2667b2755bc6a756675b5cd7 https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers/tree/5be7df9619b54f4e2667b2755bc6a756675b5cd7" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_a14b_cloudbreak_over_the_ridges" + }, + { + "path": "template-gallery/reviews/wan_a14b_wind_across_pond.original-provenance.json", + "sha256": "sha256:bytes:c8288cada585d18cd7a71b7094fd19125131e3753171d94f3c79ebf12c59c64a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers/tree/596658fd9ca6b7b71d5057529bbf319ecbc61d74", + "sourceRevision": "Wan-AI/Wan2.2-I2V-A14B-Diffusers@596658fd9ca6b7b71d5057529bbf319ecbc61d74", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers/tree/596658fd9ca6b7b71d5057529bbf319ecbc61d74" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-I2V-A14B-Diffusers@596658fd9ca6b7b71d5057529bbf319ecbc61d74 https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers/tree/596658fd9ca6b7b71d5057529bbf319ecbc61d74" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_a14b_wind_across_pond" + }, + { + "path": "template-gallery/reviews/wan_a14b_wind_across_pond.original-review.json", + "sha256": "sha256:bytes:abce3c693a5c298d0cf580e200540b6bcb16b3f461acc27e4bf750d829f4cafe", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers/tree/596658fd9ca6b7b71d5057529bbf319ecbc61d74", + "sourceRevision": "Wan-AI/Wan2.2-I2V-A14B-Diffusers@596658fd9ca6b7b71d5057529bbf319ecbc61d74", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers/tree/596658fd9ca6b7b71d5057529bbf319ecbc61d74" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-I2V-A14B-Diffusers@596658fd9ca6b7b71d5057529bbf319ecbc61d74 https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers/tree/596658fd9ca6b7b71d5057529bbf319ecbc61d74" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_a14b_wind_across_pond" + }, + { + "path": "template-gallery/reviews/wan_a14b_wind_across_pond.quality-review.json", + "sha256": "sha256:bytes:5f9946d7d69874e43eb07b24732b57e4aae4fddc6e281b5afa84803638d1298b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers/tree/596658fd9ca6b7b71d5057529bbf319ecbc61d74", + "sourceRevision": "Wan-AI/Wan2.2-I2V-A14B-Diffusers@596658fd9ca6b7b71d5057529bbf319ecbc61d74", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers/tree/596658fd9ca6b7b71d5057529bbf319ecbc61d74" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-I2V-A14B-Diffusers@596658fd9ca6b7b71d5057529bbf319ecbc61d74 https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers/tree/596658fd9ca6b7b71d5057529bbf319ecbc61d74" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_a14b_wind_across_pond" + }, + { + "path": "template-gallery/reviews/wan_a14b_wind_across_pond.retained-template-provenance.json", + "sha256": "sha256:bytes:d9b781b0ff4349d361c02cd395e3340c7ffe622cbcf311b805231c86ec4cf9c1", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers/tree/596658fd9ca6b7b71d5057529bbf319ecbc61d74", + "sourceRevision": "Wan-AI/Wan2.2-I2V-A14B-Diffusers@596658fd9ca6b7b71d5057529bbf319ecbc61d74", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers/tree/596658fd9ca6b7b71d5057529bbf319ecbc61d74" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-I2V-A14B-Diffusers@596658fd9ca6b7b71d5057529bbf319ecbc61d74 https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers/tree/596658fd9ca6b7b71d5057529bbf319ecbc61d74" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_a14b_wind_across_pond" + }, + { + "path": "template-gallery/reviews/wan_animate_glasshouse_keeper.original-provenance.json", + "sha256": "sha256:bytes:ce7cd68be0d73e65a89ec5136e5cb21e16940f318448d7d85493c4109135ce10", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceRevision": "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0 https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "01bd531cf1d88e5338a9c8dc4b831048b7660d92b628f61f3b28e75bb68b9a6c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_animate_glasshouse_keeper" + }, + { + "path": "template-gallery/reviews/wan_animate_glasshouse_keeper.original-review.json", + "sha256": "sha256:bytes:368f120d1eb2c48f11a688a7c1293371bbad8cd67c026e24cf0655d8dc8f4e04", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceRevision": "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0 https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "01bd531cf1d88e5338a9c8dc4b831048b7660d92b628f61f3b28e75bb68b9a6c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_animate_glasshouse_keeper" + }, + { + "path": "template-gallery/reviews/wan_animate_glasshouse_keeper.quality-review.json", + "sha256": "sha256:bytes:c0a191c85ddf88e695030d83c665e5016a5dc4a119724bc6330e3536b8406244", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceRevision": "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0 https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "01bd531cf1d88e5338a9c8dc4b831048b7660d92b628f61f3b28e75bb68b9a6c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_animate_glasshouse_keeper" + }, + { + "path": "template-gallery/reviews/wan_animate_glasshouse_keeper.retained-template-provenance.json", + "sha256": "sha256:bytes:cbc0bb0c647d903d9b6a26858b83d660ba333be4bdda28c14b3098f069f19970", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceRevision": "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0 https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "01bd531cf1d88e5338a9c8dc4b831048b7660d92b628f61f3b28e75bb68b9a6c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_animate_glasshouse_keeper" + }, + { + "path": "template-gallery/reviews/wan_animate_signal_through_the_rain.original-provenance.json", + "sha256": "sha256:bytes:c6ade5109c32d17a15fbaebf57c45ee32cee41502f0be365a3ddee7c012d2c47", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceRevision": "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0 https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_animate_signal_through_the_rain" + }, + { + "path": "template-gallery/reviews/wan_animate_signal_through_the_rain.original-review.json", + "sha256": "sha256:bytes:85d59351c41ffbb1c9910be7830d71b326910bebabd39f89fb1cc4a1db880914", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceRevision": "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0 https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_animate_signal_through_the_rain" + }, + { + "path": "template-gallery/reviews/wan_animate_signal_through_the_rain.quality-review.json", + "sha256": "sha256:bytes:d4949512728370151d4e5422724129744515972b08dee0fbba2fd5883ead261c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceRevision": "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0 https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_animate_signal_through_the_rain" + }, + { + "path": "template-gallery/reviews/wan_animate_signal_through_the_rain.retained-template-provenance.json", + "sha256": "sha256:bytes:0e9f6bb00b8bd54c23aaf8c63cb3fb27d3c4a8adfdc103f63b61b6730413a483", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceRevision": "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0 https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_animate_signal_through_the_rain" + }, + { + "path": "template-gallery/reviews/wan_flf_blue_hour_at_the_tram_shelter.original-provenance.json", + "sha256": "sha256:bytes:556edbb96784d97900a95f4c3cdf618102ae2f492b2791a67ef5cd9e258f3dfb", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7", + "sourceRevision": "Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers@17c30769b1e0b5dcaa1799b117bf20a9c31f59d7", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers@17c30769b1e0b5dcaa1799b117bf20a9c31f59d7 https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_flf_blue_hour_at_the_tram_shelter" + }, + { + "path": "template-gallery/reviews/wan_flf_blue_hour_at_the_tram_shelter.original-review.json", + "sha256": "sha256:bytes:70b7a63ed50e5c3ccd8c706fd07917afec3ac8ef088d33b28b8d22d57f800548", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7", + "sourceRevision": "Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers@17c30769b1e0b5dcaa1799b117bf20a9c31f59d7", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers@17c30769b1e0b5dcaa1799b117bf20a9c31f59d7 https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_flf_blue_hour_at_the_tram_shelter" + }, + { + "path": "template-gallery/reviews/wan_flf_blue_hour_at_the_tram_shelter.quality-review.json", + "sha256": "sha256:bytes:a549ff13492e46da3c707f861fb33fd71411034ffb96a81550d7a16fcd79cf12", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7", + "sourceRevision": "Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers@17c30769b1e0b5dcaa1799b117bf20a9c31f59d7", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers@17c30769b1e0b5dcaa1799b117bf20a9c31f59d7 https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_flf_blue_hour_at_the_tram_shelter" + }, + { + "path": "template-gallery/reviews/wan_flf_blue_hour_at_the_tram_shelter.retained-template-provenance.json", + "sha256": "sha256:bytes:e4deed2284f9ae122cbb97a82049d7407fdec05f34d332f8225b40fd40b13820", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7", + "sourceRevision": "Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers@17c30769b1e0b5dcaa1799b117bf20a9c31f59d7", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers@17c30769b1e0b5dcaa1799b117bf20a9c31f59d7 https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_flf_blue_hour_at_the_tram_shelter" + }, + { + "path": "template-gallery/reviews/wan_ti2v_subway_musician.original-provenance.json", + "sha256": "sha256:bytes:2b4a47b2aa7e904f2541a51b150497e420d1970fa202e44a99bb04956f3fa703", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635", + "sourceRevision": "Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635 https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_ti2v_subway_musician" + }, + { + "path": "template-gallery/reviews/wan_ti2v_subway_musician.original-review.json", + "sha256": "sha256:bytes:e0c162c7130f640bcd9375d070f0d5eff1ef4c4ec26b829c18733dd8d644dd8c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635", + "sourceRevision": "Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635 https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_ti2v_subway_musician" + }, + { + "path": "template-gallery/reviews/wan_ti2v_subway_musician.quality-review.json", + "sha256": "sha256:bytes:e0fff184772e4c8465c986c3c9bb2f5024ed19cc809330bbcfa7705ee452bdfc", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635", + "sourceRevision": "Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635 https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_ti2v_subway_musician" + }, + { + "path": "template-gallery/reviews/wan_ti2v_subway_musician.retained-template-provenance.json", + "sha256": "sha256:bytes:5aef1cb2eff8bd92f71e8d9be5fa04a6df49e01f0800f5fb76076681f7e1bb14", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635", + "sourceRevision": "Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635 https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_ti2v_subway_musician" + }, + { + "path": "template-gallery/reviews/wan_vace_amber_glass_stabilized.original-provenance.json", + "sha256": "sha256:bytes:6b08670223819852e7ed62a06af7ddf1707a38b7364f2269aa22d5e6592dce0b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceRevision": "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1 https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "f90bf0978ad3ec5d295b6d9d5e339207e3586b52567987aa1930881dd1f46e4e", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_vace_amber_glass_stabilized" + }, + { + "path": "template-gallery/reviews/wan_vace_amber_glass_stabilized.original-review.json", + "sha256": "sha256:bytes:66f4440a92234772ba4de1ccd6eec655251cb53b2059e99568a6f7fa7f1254c0", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceRevision": "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1 https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "f90bf0978ad3ec5d295b6d9d5e339207e3586b52567987aa1930881dd1f46e4e", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_vace_amber_glass_stabilized" + }, + { + "path": "template-gallery/reviews/wan_vace_amber_glass_stabilized.quality-review.json", + "sha256": "sha256:bytes:fecde3eeefab0f0a2351a6ceaacb18fddf91668c5f74e0e847962ae98e28a404", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceRevision": "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1 https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "f90bf0978ad3ec5d295b6d9d5e339207e3586b52567987aa1930881dd1f46e4e", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_vace_amber_glass_stabilized" + }, + { + "path": "template-gallery/reviews/wan_vace_amber_glass_stabilized.retained-template-provenance.json", + "sha256": "sha256:bytes:7eba7fc91b85672ce34324a462f2a040c52857c8b72c739e4a37b17315fe9e76", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceRevision": "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1 https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "f90bf0978ad3ec5d295b6d9d5e339207e3586b52567987aa1930881dd1f46e4e", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_vace_amber_glass_stabilized" + }, + { + "path": "template-gallery/reviews/wan_vace_amber_rings_after_rain.original-provenance.json", + "sha256": "sha256:bytes:4596d993891c34f721ac085d6d9377e63af8610998160c4d582fc2761b1efdff", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceRevision": "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1 https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_vace_amber_rings_after_rain" + }, + { + "path": "template-gallery/reviews/wan_vace_amber_rings_after_rain.original-review.json", + "sha256": "sha256:bytes:7ed3a6bacaf029f014c5f7540c50ba7da542903367a6bfbe39eca6c3c15a5196", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceRevision": "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1 https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_vace_amber_rings_after_rain" + }, + { + "path": "template-gallery/reviews/wan_vace_amber_rings_after_rain.quality-review.json", + "sha256": "sha256:bytes:82fa4f72865bc998461d725a6454112962566b14586b42ead517d8f446ac0599", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceRevision": "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1 https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_vace_amber_rings_after_rain" + }, + { + "path": "template-gallery/reviews/wan_vace_amber_rings_after_rain.retained-template-provenance.json", + "sha256": "sha256:bytes:c416efe725b4ba3e2dd7ea08c16b574205d292c3c3e2198d707b602a0fcb0bac", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceRevision": "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1 https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_vace_amber_rings_after_rain" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/wan_vace_cinematic_text_to_video.quality-review.json", + "sha256": "sha256:bytes:3d564d7a20781eb6a2020f9713270acb01e067a47d7570b8532b252d92b33be1", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_cinematic_text_to_video" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/wan_vace_cinematic_text_to_video.reviewed-provenance.json", + "sha256": "sha256:bytes:33a8867f911b54baf18359735e43aed771dc371516661321cf34cd6b84a65244", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_cinematic_text_to_video" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/wan_vace_grayscale_control.quality-review.json", + "sha256": "sha256:bytes:f2b8a46ff87c971bd9b78faa55a8965ae4591789bac92db05998878d52ddd36e", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_grayscale_control" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/wan_vace_grayscale_control.reviewed-provenance.json", + "sha256": "sha256:bytes:32a06c926d52bf16fb3de077275d097978e75a57494a2b575335973aa5b538a5", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_grayscale_control" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/wan_vace_outpaint_reframe.quality-review.json", + "sha256": "sha256:bytes:837f3092922cff1c26a1ef17da195fcc3d0dd1ca66b282c5baee93a12c85c643", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_outpaint_reframe" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/wan_vace_outpaint_reframe.reviewed-provenance.json", + "sha256": "sha256:bytes:05f0ed9a25e8c162397f0fa291c0cec908c093d499844e3fee9b7e38862e9c62", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_outpaint_reframe" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/wan_vace_video_color_grade.quality-review.json", + "sha256": "sha256:bytes:c51237d1857467ecc3d41dc5cc9394734d44ab67fbdd717c4e1ac3ee42c6173d", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_video_color_grade" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/wan_vace_video_color_grade.reviewed-provenance.json", + "sha256": "sha256:bytes:2a5f97b9fee2b3281086ece08aac774ac716faa4b185f908146535f3dcbe30ec", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_video_color_grade" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/wan_vace_video_to_video.quality-review.json", + "sha256": "sha256:bytes:1dba7702a6b9d474e807c503eb6af9214fb7f473e25735da39eee56bcc0fe93e", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_video_to_video" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for seven maintainer-accepted native video replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/wan_vace_video_to_video.reviewed-provenance.json", + "sha256": "sha256:bytes:befa2e12c5fa698bcb467fc9f954bcd6967d68c2fa8542357d3bc8144753afb6", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_video_to_video" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/wan_video_long_showcase.quality-review.json", + "sha256": "sha256:bytes:ce34b17a445aeea573275f45ac2e3ea0578b6e8458b12191d6884d6d5f28e0b4", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "wan_video_long_showcase" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for six maintainer-accepted native results", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/reviews/wan_video_long_showcase.reviewed-provenance.json", + "sha256": "sha256:bytes:4e355061c502c865d206fe9cbddd4c74984385d4d78254af5b629202b18ad1be", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "wan_video_long_showcase" + }, + { + "path": "template-gallery/reviews/wav2vec2_station_announcement.quality-review.json", + "sha256": "sha256:bytes:7baa800c8cbcdc9fb820deaa07c82e1755f24720eb00a254753ab487cd02ebf1", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted retained Gallery review, provenance or registration metadata", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-21", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "5a790d4a6c9f82b2e00140b8d1c62fc3721c0b66856e4e2e7f2440890772b0e0", + "publicationBasis": "Maintainer approved the exact Wav2Vec2 transcript, the disclosed limitations and the redacted review and technical records under Apache-2.0. The source WAV is private." + }, + { + "path": "template-gallery/reviews/wav2vec2_station_announcement.retained-template-provenance.json", + "sha256": "sha256:bytes:4eb550b72db5b3c48a5dc5a1807067dc92ca77d9c288cbcc6e66e8fe3d15e78c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted retained Gallery review, provenance or registration metadata", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-21", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "5a790d4a6c9f82b2e00140b8d1c62fc3721c0b66856e4e2e7f2440890772b0e0", + "publicationBasis": "Maintainer approved the exact Wav2Vec2 transcript, the disclosed limitations and the redacted review and technical records under Apache-2.0. The source WAV is private." + }, + { + "path": "template-gallery/reviews/whisper_small_an_open_door.original-provenance.json", + "sha256": "sha256:bytes:f8c6523ab16cc4c21dd7239dfb6d08930eb74dcf26109391f7eccdc1243ec1f8", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/openai/whisper-small/tree/973afd24965f72e36ca33b3055d56a652f456b4d", + "sourceRevision": "openai/whisper-small@973afd24965f72e36ca33b3055d56a652f456b4d", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/openai/whisper-small/tree/973afd24965f72e36ca33b3055d56a652f456b4d" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "openai/whisper-small@973afd24965f72e36ca33b3055d56a652f456b4d https://huggingface.co/openai/whisper-small/tree/973afd24965f72e36ca33b3055d56a652f456b4d" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "whisper_small_an_open_door" + }, + { + "path": "template-gallery/reviews/whisper_small_an_open_door.original-review.json", + "sha256": "sha256:bytes:eaecd7b4ce1cfb2fcbbe8304f8700b1f46c29f5fea4befa7fff971aea95f2a7f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/openai/whisper-small/tree/973afd24965f72e36ca33b3055d56a652f456b4d", + "sourceRevision": "openai/whisper-small@973afd24965f72e36ca33b3055d56a652f456b4d", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/openai/whisper-small/tree/973afd24965f72e36ca33b3055d56a652f456b4d" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "openai/whisper-small@973afd24965f72e36ca33b3055d56a652f456b4d https://huggingface.co/openai/whisper-small/tree/973afd24965f72e36ca33b3055d56a652f456b4d" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "whisper_small_an_open_door" + }, + { + "path": "template-gallery/reviews/whisper_small_an_open_door.quality-review.json", + "sha256": "sha256:bytes:86f1cf2540c9c980f232d3ee7e1927d38e32b5b5f613bb40801ec8d7f9945d33", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/openai/whisper-small/tree/973afd24965f72e36ca33b3055d56a652f456b4d", + "sourceRevision": "openai/whisper-small@973afd24965f72e36ca33b3055d56a652f456b4d", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/openai/whisper-small/tree/973afd24965f72e36ca33b3055d56a652f456b4d" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "openai/whisper-small@973afd24965f72e36ca33b3055d56a652f456b4d https://huggingface.co/openai/whisper-small/tree/973afd24965f72e36ca33b3055d56a652f456b4d" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "whisper_small_an_open_door" + }, + { + "path": "template-gallery/reviews/whisper_small_an_open_door.retained-template-provenance.json", + "sha256": "sha256:bytes:07e2575fa2b29c75f4f4f5a4dcad63f6cd5c790386f16d6ccf277628fbfb5483", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/openai/whisper-small/tree/973afd24965f72e36ca33b3055d56a652f456b4d", + "sourceRevision": "openai/whisper-small@973afd24965f72e36ca33b3055d56a652f456b4d", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/openai/whisper-small/tree/973afd24965f72e36ca33b3055d56a652f456b4d" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "openai/whisper-small@973afd24965f72e36ca33b3055d56a652f456b4d https://huggingface.co/openai/whisper-small/tree/973afd24965f72e36ca33b3055d56a652f456b4d" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "whisper_small_an_open_door" + }, + { + "path": "template-gallery/reviews/whisper_tiny_blue_cup_transcription.quality-review.json", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "humanLikenessConsent": "not-applicable", + "marks": [], + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-20", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ba369c5fff89e379be66714d3ecbf1a0e3a9555e2b5ffbc9cb54210d862ec30b", + "publicationBasis": "Maintainer approved the exact Whisper JSON and both exact LCM images, accepted the disclosed LCM changes, and authorized publication of the associated redacted Gallery records.", + "creationMethod": "Project-authored redacted retained Gallery review, provenance or registration metadata", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [], + "aiGenerated": false, + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "provenanceTemplateId": "whisper_tiny_blue_cup_transcription", + "sha256": "sha256:bytes:e25cabb7027838e4593af9155c9dba2dc695d23ee2cccc2ad8bbc991a992c5e5", + "publishDecision": "approved", + "holdReason": null + }, + { + "path": "template-gallery/reviews/whisper_tiny_blue_cup_transcription.retained-template-provenance.json", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "humanLikenessConsent": "not-applicable", + "marks": [], + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-20", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ba369c5fff89e379be66714d3ecbf1a0e3a9555e2b5ffbc9cb54210d862ec30b", + "publicationBasis": "Maintainer approved the exact Whisper JSON and both exact LCM images, accepted the disclosed LCM changes, and authorized publication of the associated redacted Gallery records.", + "creationMethod": "Project-authored redacted retained Gallery review, provenance or registration metadata", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [], + "aiGenerated": false, + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "provenanceTemplateId": "whisper_tiny_blue_cup_transcription", + "sha256": "sha256:bytes:410e2c8efcb1ae5a4bf6827f9bf327fc9bfa6bc84f32eedb269b1120cbbfd3a9", + "publishDecision": "approved", + "holdReason": null + }, + { + "path": "template-gallery/reviews/z_image_cinematic_contact_sheet.quality-review.json", + "sha256": "sha256:bytes:4a895beb586a81c69f6afeaf387bf2797333d59396023c188920d1913ee86029", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-accepted-registration", + "provenanceTemplateId": "z_image_cinematic_contact_sheet" + }, + { + "path": "template-gallery/reviews/z_image_cinematic_contact_sheet.reviewed-provenance.json", + "sha256": "sha256:bytes:a356fc5d856cf7cb93af1c45a98aa932ae2fc94a2d1b68d8658be0819de5ffa5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical metadata or review record", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-accepted-registration", + "provenanceTemplateId": "z_image_cinematic_contact_sheet" + }, + { + "path": "template-gallery/reviews/z_image_lora_style.quality-review.json", + "sha256": "sha256:bytes:6a2e0b888d8c11c5cb00e08c4d0737d573f75a020896d476204f219d8841b3a2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata from the explicitly approved six-image source packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-six-z-registration", + "provenanceTemplateId": "z_image_lora_style", + "humanApprovalPacketSHA256": "9b728a5f8535fc1ba3c03d2e2759d7ac795a586fafab51beb1509379ed388934" + }, + { + "path": "template-gallery/reviews/z_image_lora_style.reviewed-provenance.json", + "sha256": "sha256:bytes:4f5e5b003f72345d01213ae2fe4d30e8de58cc6695aed1d15cf450c66c3ac4be", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata from the explicitly approved six-image source packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-six-z-registration", + "provenanceTemplateId": "z_image_lora_style", + "humanApprovalPacketSHA256": "9b728a5f8535fc1ba3c03d2e2759d7ac795a586fafab51beb1509379ed388934" + }, + { + "path": "template-gallery/reviews/z_image_poster.quality-review.json", + "sha256": "sha256:bytes:29893f356060254640937a736f1bfcd8979ec2cdc18387db7961702947a2e84f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata from the explicitly approved six-image source packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-six-z-registration", + "provenanceTemplateId": "z_image_poster", + "humanApprovalPacketSHA256": "9b728a5f8535fc1ba3c03d2e2759d7ac795a586fafab51beb1509379ed388934" + }, + { + "path": "template-gallery/reviews/z_image_poster.reviewed-provenance.json", + "sha256": "sha256:bytes:8898724b99b9f2ed4b16609ef0bfa23d4573a4f992b6602ecb9d50877212c62d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata from the explicitly approved six-image source packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-six-z-registration", + "humanApprovalPacketSHA256": "9b728a5f8535fc1ba3c03d2e2759d7ac795a586fafab51beb1509379ed388934", + "humanApprovalScope": "The maintainer explicitly approved the proposed 4/5 quality rubric and scores, known limits, exact six Z-image outputs and their project-authored redacted provenance/review records. This packet includes no source photographs, authored masks or unrelated assets.", + "provenanceTemplateId": "z_image_poster" + }, + { + "path": "template-gallery/reviews/z_image_product_mockup.quality-review.json", + "sha256": "sha256:bytes:a536521d8c5fd5ebb6ef5cf95b33663378ede471a94e3acc1fc1852079b4cb11", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata from the explicitly approved six-image source packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-six-z-registration", + "provenanceTemplateId": "z_image_product_mockup", + "humanApprovalPacketSHA256": "9b728a5f8535fc1ba3c03d2e2759d7ac795a586fafab51beb1509379ed388934" + }, + { + "path": "template-gallery/reviews/z_image_product_mockup.reviewed-provenance.json", + "sha256": "sha256:bytes:0dff7e19b43d2347dfec2dd6e2bb9e88470880fe6b949e9c1cddd998d30bf146", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata from the explicitly approved six-image source packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-six-z-registration", + "humanApprovalPacketSHA256": "9b728a5f8535fc1ba3c03d2e2759d7ac795a586fafab51beb1509379ed388934", + "humanApprovalScope": "The maintainer explicitly approved the proposed 4/5 quality rubric and scores, known limits, exact six Z-image outputs and their project-authored redacted provenance/review records. This packet includes no source photographs, authored masks or unrelated assets.", + "provenanceTemplateId": "z_image_product_mockup" + }, + { + "path": "template-gallery/reviews/z_image_quick_concept.quality-review.json", + "sha256": "sha256:bytes:3c965eb4fea2465d300093425187452e07c305808bee30f671b32674a7fd5411", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata from the explicitly approved six-image source packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-six-z-registration", + "provenanceTemplateId": "z_image_quick_concept", + "humanApprovalPacketSHA256": "9b728a5f8535fc1ba3c03d2e2759d7ac795a586fafab51beb1509379ed388934" + }, + { + "path": "template-gallery/reviews/z_image_quick_concept.reviewed-provenance.json", + "sha256": "sha256:bytes:c31016b24e0b3935d7963b97d0fca05e9e8d208d2c9ae872ee5602d40173e8ec", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "MoDiff-authored technical provenance or quality metadata from the explicitly approved six-image source packet", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; generated-media terms remain in their exact per-file records", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-six-z-registration", + "humanApprovalPacketSHA256": "9b728a5f8535fc1ba3c03d2e2759d7ac795a586fafab51beb1509379ed388934", + "humanApprovalScope": "The maintainer explicitly approved the proposed 4/5 quality rubric and scores, known limits, exact six Z-image outputs and their project-authored redacted provenance/review records. This packet includes no source photographs, authored masks or unrelated assets.", + "provenanceTemplateId": "z_image_quick_concept" + }, + { + "path": "template-gallery/reviews/zimage_golden_amber_glass.original-provenance.json", + "sha256": "sha256:bytes:38001f1b676cbc30bb15e344e3dcb30102e11f204aa09a81002f6eb9d973b8a3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "zimage_golden_amber_glass" + }, + { + "path": "template-gallery/reviews/zimage_golden_amber_glass.original-review.json", + "sha256": "sha256:bytes:1ada33599f214a4d4a2cb3076823b66328fd5d17f1bb816259dcf37b6c474dd1", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "zimage_golden_amber_glass" + }, + { + "path": "template-gallery/reviews/zimage_golden_amber_glass.quality-review.json", + "sha256": "sha256:bytes:9eccd9055e341b7ef305b74e6103d70458bece7336d79ce64f2dd3f1bf7cdb1d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "zimage_golden_amber_glass" + }, + { + "path": "template-gallery/reviews/zimage_golden_amber_glass.retained-template-provenance.json", + "sha256": "sha256:bytes:b7b4cc1441995324830d2c34d883b4bcb86b62faf445afbc15ea77b7855d024a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "zimage_golden_amber_glass" + }, + { + "path": "template-gallery/reviews/zimage_rocky_glacial_shores.original-provenance.json", + "sha256": "sha256:bytes:f6f52781f50d76e5f47500b56a32d904ad2fe1c05ffc3db32232b0c3b1811aa7", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "zimage_rocky_glacial_shores" + }, + { + "path": "template-gallery/reviews/zimage_rocky_glacial_shores.original-review.json", + "sha256": "sha256:bytes:3b2e791eb5191adbb9deb87721e44a602c3078e85930124f8b0de631ff6752a0", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "zimage_rocky_glacial_shores" + }, + { + "path": "template-gallery/reviews/zimage_rocky_glacial_shores.quality-review.json", + "sha256": "sha256:bytes:9017baf79260e6a9ae4b85b8663ef71de2ccff3edad73c1275562af14d3b8750", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "zimage_rocky_glacial_shores" + }, + { + "path": "template-gallery/reviews/zimage_rocky_glacial_shores.retained-template-provenance.json", + "sha256": "sha256:bytes:625f42767a68845e1dd2e09a4760d7938138c8c8a8b8a196d3748184b0bfa44d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "zimage_rocky_glacial_shores" + }, + { + "path": "template-gallery/reviews/zimage_seamless_cobalt_backdrop.original-provenance.json", + "sha256": "sha256:bytes:d4a52b23af4248329ef8232b4058b8fcf3c877ddfcfc9b20c4e27a3aacadfa9f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "zimage_seamless_cobalt_backdrop" + }, + { + "path": "template-gallery/reviews/zimage_seamless_cobalt_backdrop.original-review.json", + "sha256": "sha256:bytes:b112c13caaa7ec635f2dfc8a4dc8fd2304778d1bc7aa5f1dab5c6c430ed48704", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "zimage_seamless_cobalt_backdrop" + }, + { + "path": "template-gallery/reviews/zimage_seamless_cobalt_backdrop.quality-review.json", + "sha256": "sha256:bytes:0d1d91ea0c9d9c165f2ab152c8a6405e6bb43ad26dc886a844367c051ea3ea8c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "zimage_seamless_cobalt_backdrop" + }, + { + "path": "template-gallery/reviews/zimage_seamless_cobalt_backdrop.retained-template-provenance.json", + "sha256": "sha256:bytes:dc64773a27bdd47d79712c11274cbdf9b3bde35a576d2e96be1ef1dc12972361", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Project-authored redacted Gallery review, provenance or registration metadata", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceLicense": "MoDiff-authored Gallery metadata", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "zimage_seamless_cobalt_backdrop" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to original synthetic source terms", + "creationMethod": "Exact original synthetic opening image or deterministic crop in the maintainer-accepted nine-scene Moonflower recipe; recovered without generation", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Generated image and deterministic preparation; original Z-Image-Turbo and FLUX.2-klein-4B source-chain terms retained", + "modelTerms": [ + "Tongyi-MAI/Z-Image-Turbo: Apache-2.0; https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/runtime-inputs/assets/0ea2dd6fd5c75c7b49e5677c3ff74666b6e8b3d3cf7f62ba1ad416253a76f63b.webp", + "sha256": "sha256:bytes:0ea2dd6fd5c75c7b49e5677c3ff74666b6e8b3d3cf7f62ba1ad416253a76f63b", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", + "provenanceTemplateId": "ace_step_lyric_music_video" + }, + { + "path": "template-gallery/runtime-inputs/assets/101d50449cc4d74257e88e87fb750363bfe538c58b601b340fb3ce9031c2ed03.mp4", + "sha256": "sha256:bytes:101d50449cc4d74257e88e87fb750363bfe538c58b601b340fb3ce9031c2ed03", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["wan_vace_outpaint_reframe"] + }, + { + "path": "template-gallery/runtime-inputs/assets/124415536a8071baccf8821232ad79a0a8ceec30ae62617c91a8d7a0b59d0a8c.webp", + "sha256": "sha256:bytes:124415536a8071baccf8821232ad79a0a8ceec30ae62617c91a8d7a0b59d0a8c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["qwen_logo_texture"] + }, + { + "path": "template-gallery/runtime-inputs/assets/16f6ea27b5d7cfaed106e2e694572bbe92b7c7e2a43835b3f4313a748f510f74.png", + "sha256": "sha256:bytes:16f6ea27b5d7cfaed106e2e694572bbe92b7c7e2a43835b3f4313a748f510f74", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["flux_fill_inpaint"] + }, + { + "path": "template-gallery/runtime-inputs/assets/1d993540e914f0e2d230f1133b57ae14bb837829237a53c89613fcdef6699995.webp", + "sha256": "sha256:bytes:1d993540e914f0e2d230f1133b57ae14bb837829237a53c89613fcdef6699995", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["flux2_klein_multi_reference"] + }, + { + "path": "template-gallery/runtime-inputs/assets/218d83e0706fec201097582a6e5e00dc79f2d7d1ecb0badba2214c5ecaae1866.mp4", + "sha256": "sha256:bytes:218d83e0706fec201097582a6e5e00dc79f2d7d1ecb0badba2214c5ecaae1866", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["wan_vace_video_to_video"] + }, + { + "path": "template-gallery/runtime-inputs/assets/233d1b3a123fceb4f3b68d2d3a9f5b4129627073b8235fe7248ae6ebdeecb554.mp4", + "sha256": "sha256:bytes:233d1b3a123fceb4f3b68d2d3a9f5b4129627073b8235fe7248ae6ebdeecb554", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": "https://huggingface.co/datasets/huggingface/documentation-images", + "sourceRevision": null, + "sourceLicense": "CC-BY-NC-SA-4.0", + "modelTerms": [ + "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Source: Hugging Face documentation-images Dataset, CC BY-NC-SA 4.0; modified by the MoDiff LTX workflow." + ], + "assetLicense": "CC-BY-NC-SA-4.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["ltx_video_video_to_video"] + }, + { + "path": "template-gallery/runtime-inputs/assets/283b1cfb32b15fe6b31a29dce1f2b96026c1ad0826bf3f24aebebf4b6f9a4f07.webp", + "sha256": "sha256:bytes:283b1cfb32b15fe6b31a29dce1f2b96026c1ad0826bf3f24aebebf4b6f9a4f07", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["reference_fusion"] + }, + { + "path": "template-gallery/runtime-inputs/assets/29722ed072feec11cd36adce7b6cb48483bff3f05776048b93f960b5554ab533.png", + "sha256": "sha256:bytes:29722ed072feec11cd36adce7b6cb48483bff3f05776048b93f960b5554ab533", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["qwen_inpaint_mask_draft"] + }, + { + "path": "template-gallery/runtime-inputs/assets/2e0ec8892660785e322468d0153fd2dadf7a4d920fce2d7d4a0b686a8fe8515d.webp", + "sha256": "sha256:bytes:2e0ec8892660785e322468d0153fd2dadf7a4d920fce2d7d4a0b686a8fe8515d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["flux_redux_edit"] + }, + { + "path": "template-gallery/runtime-inputs/assets/2e202069a584ee5ada91e2deaea6bf7b92a94f4816e669e695d7cb64d5a1cb0e.png", + "sha256": "sha256:bytes:2e202069a584ee5ada91e2deaea6bf7b92a94f4816e669e695d7cb64d5a1cb0e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["flux_depth_control"] + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to original synthetic source terms", + "creationMethod": "Exact original synthetic opening image or deterministic crop in the maintainer-accepted nine-scene Moonflower recipe; recovered without generation", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Generated image and deterministic preparation; original Z-Image-Turbo and FLUX.2-klein-4B source-chain terms retained", + "modelTerms": [ + "Tongyi-MAI/Z-Image-Turbo: Apache-2.0; https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/runtime-inputs/assets/379cdf80a147cdbe84ccad4b97daec4a734c0a274761da9900e658a09ca48d28.webp", + "sha256": "sha256:bytes:379cdf80a147cdbe84ccad4b97daec4a734c0a274761da9900e658a09ca48d28", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", + "provenanceTemplateId": "ace_step_lyric_music_video" + }, + { + "path": "template-gallery/runtime-inputs/assets/3807d712e24a94c4b445c2fa950a784bba334f5f665e74964fe4d47a43856230.wav", + "sha256": "sha256:bytes:3807d712e24a94c4b445c2fa950a784bba334f5f665e74964fe4d47a43856230", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["ace_step_audio_continuation"] + }, + { + "path": "template-gallery/runtime-inputs/assets/38a6f334f89048effe579fc473d6fb38437eb579f324ac399d1ec0f6509f74d9.webp", + "sha256": "sha256:bytes:38a6f334f89048effe579fc473d6fb38437eb579f324ac399d1ec0f6509f74d9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["ltx_video_long_showcase"] + }, + { + "path": "template-gallery/runtime-inputs/assets/39428f00f67b49fc6d624617df2964c9f869de21e7e188ef5b231ae04c4aeacc.webp", + "sha256": "sha256:bytes:39428f00f67b49fc6d624617df2964c9f869de21e7e188ef5b231ae04c4aeacc", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["qwen_multi_reference_product", "reference_fusion"] + }, + { + "path": "template-gallery/runtime-inputs/assets/3c4d3a7a58a7be7f8d8920106dcfea30e28b4af115ce406bcf5b16cec4b4297a.mp4", + "sha256": "sha256:bytes:3c4d3a7a58a7be7f8d8920106dcfea30e28b4af115ce406bcf5b16cec4b4297a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["wan_vace_outpaint_reframe"] + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to original synthetic source terms", + "creationMethod": "Exact original synthetic opening image or deterministic crop in the maintainer-accepted nine-scene Moonflower recipe; recovered without generation", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Generated image and deterministic preparation; original Z-Image-Turbo and FLUX.2-klein-4B source-chain terms retained", + "modelTerms": [ + "Tongyi-MAI/Z-Image-Turbo: Apache-2.0; https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/runtime-inputs/assets/3c77210d30a5954105564bbf3025322eb5b3cfb839717185eed8f4f3bac12c3c.webp", + "sha256": "sha256:bytes:3c77210d30a5954105564bbf3025322eb5b3cfb839717185eed8f4f3bac12c3c", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", + "provenanceTemplateId": "ace_step_lyric_music_video" + }, + { + "path": "template-gallery/runtime-inputs/assets/3d03ee22a3d29068f30f18afcb31e86ea455fbfbe1ca5aa172cf633a26f21339.png", + "sha256": "sha256:bytes:3d03ee22a3d29068f30f18afcb31e86ea455fbfbe1ca5aa172cf633a26f21339", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["flux_control_canny"] + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to original synthetic source terms", + "creationMethod": "Exact original synthetic opening image or deterministic crop in the maintainer-accepted nine-scene Moonflower recipe; recovered without generation", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Generated image and deterministic preparation; original Z-Image-Turbo and FLUX.2-klein-4B source-chain terms retained", + "modelTerms": [ + "Tongyi-MAI/Z-Image-Turbo: Apache-2.0; https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/runtime-inputs/assets/424477289e9872767f3d880913cbe89a55fd765a4c7a78cc05e16543d57f5da9.webp", + "sha256": "sha256:bytes:424477289e9872767f3d880913cbe89a55fd765a4c7a78cc05e16543d57f5da9", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", + "provenanceTemplateId": "ace_step_lyric_music_video" + }, + { + "path": "template-gallery/runtime-inputs/assets/47e56fd165fd2610f34e952191d74e061269b9703ae9fd7f571491f38ce4992c.webp", + "sha256": "sha256:bytes:47e56fd165fd2610f34e952191d74e061269b9703ae9fd7f571491f38ce4992c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["qwen_multi_reference_product"] + }, + { + "path": "template-gallery/runtime-inputs/assets/4b1b8d9e351abd437f2ffff90cc6a958160a87863ba4d8e85a0aa80a37e7a10e.webp", + "sha256": "sha256:bytes:4b1b8d9e351abd437f2ffff90cc6a958160a87863ba4d8e85a0aa80a37e7a10e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["qwen_character_angles"] + }, + { + "path": "template-gallery/runtime-inputs/assets/4b800b6a362c9ad7755858a3ec2affbda8706c5a71578ced35b80432fd234741.webp", + "sha256": "sha256:bytes:4b800b6a362c9ad7755858a3ec2affbda8706c5a71578ced35b80432fd234741", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["flux_redux_multi_reference"] + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to original synthetic source terms", + "creationMethod": "Exact original synthetic opening image or deterministic crop in the maintainer-accepted nine-scene Moonflower recipe; recovered without generation", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Generated image and deterministic preparation; original Z-Image-Turbo and FLUX.2-klein-4B source-chain terms retained", + "modelTerms": [ + "Tongyi-MAI/Z-Image-Turbo: Apache-2.0; https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/runtime-inputs/assets/4fcc47b98431770a667597cca11ca0d7de82dd340ab999e4c5057a07fc46c6e6.webp", + "sha256": "sha256:bytes:4fcc47b98431770a667597cca11ca0d7de82dd340ab999e4c5057a07fc46c6e6", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", + "provenanceTemplateId": "ace_step_lyric_music_video" + }, + { + "path": "template-gallery/runtime-inputs/assets/52ea89c0cdec3142162156be07af12a06a14ad623b68c9700ccbc82bf889100d.webp", + "sha256": "sha256:bytes:52ea89c0cdec3142162156be07af12a06a14ad623b68c9700ccbc82bf889100d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["ltx_video_multi_reference"] + }, + { + "path": "template-gallery/runtime-inputs/assets/6224e9ee47765858f2ec0c33679140d020cf3ad6e4fa2fa4557ef50f811aef0e.webp", + "sha256": "sha256:bytes:6224e9ee47765858f2ec0c33679140d020cf3ad6e4fa2fa4557ef50f811aef0e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["qwen_tile_extract"] + }, + { + "path": "template-gallery/runtime-inputs/assets/70c74691e2bcd7cdb352b7e64e5af5a1a7f01d77112d32a8edadc0060a95ef34.png", + "sha256": "sha256:bytes:70c74691e2bcd7cdb352b7e64e5af5a1a7f01d77112d32a8edadc0060a95ef34", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "Deterministic material-only crop of the existing rights-approved synthetic cobalt material reference", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "maintainer (current user)", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-native-three-registration", + "consumingTemplateIds": ["flux_kontext_multi_reference"], + "derivedFromContentHash": "sha256:bytes:9f421cdc0fa80b3aae368bd3b20a8f6f05942ec461f88541f01aec5390468897", + "publicationBasis": "Existing maintainer publication authorization and current explicit instruction to register these three accepted assets; no new ownership or rights quotation is fabricated.", + "humanApprovalPacketSHA256": "69c6b3d9b0ea2fcca16ee538f6e75b414b7141658b74f10578758e61360f63fd" + }, + { + "path": "template-gallery/runtime-inputs/assets/73123a5bb6e8c1367eced6a7fbee6b0e5500ecbabf769ba9d9c18fd10623e36e.webp", + "sha256": "sha256:bytes:73123a5bb6e8c1367eced6a7fbee6b0e5500ecbabf769ba9d9c18fd10623e36e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["ltx_video_multi_reference"] + }, + { + "path": "template-gallery/runtime-inputs/assets/799d82b016a108d4b6902500b4226afd5d2391f4a7b0693af75255425c943a5e.png", + "sha256": "sha256:bytes:799d82b016a108d4b6902500b4226afd5d2391f4a7b0693af75255425c943a5e", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["flux_fill_outpaint"] + }, + { + "path": "template-gallery/runtime-inputs/assets/7f1ea58485fa7802765b9fbbf0e6957e8607261c91669fdcc44cbed80c6fb309.webp", + "sha256": "sha256:bytes:7f1ea58485fa7802765b9fbbf0e6957e8607261c91669fdcc44cbed80c6fb309", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["flux_redux_multi_reference"] + }, + { + "path": "template-gallery/runtime-inputs/assets/862e292caa1759156fffde5cfccda8b97ec622514258f81986188cf63a836ea9.webp", + "sha256": "sha256:bytes:862e292caa1759156fffde5cfccda8b97ec622514258f81986188cf63a836ea9", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["qwen_outpaint_draft"] + }, + { + "path": "template-gallery/runtime-inputs/assets/88a7ada5cb91a6ef86de0ff7c26c6b4683df25cc0baa18382371ce0748cd0bd6.webp", + "sha256": "sha256:bytes:88a7ada5cb91a6ef86de0ff7c26c6b4683df25cc0baa18382371ce0748cd0bd6", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["ltx_video_long_showcase"] + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to original synthetic source terms", + "creationMethod": "Exact original synthetic opening image or deterministic crop in the maintainer-accepted nine-scene Moonflower recipe; recovered without generation", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Generated image and deterministic preparation; original Z-Image-Turbo and FLUX.2-klein-4B source-chain terms retained", + "modelTerms": [ + "Tongyi-MAI/Z-Image-Turbo: Apache-2.0; https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/runtime-inputs/assets/923228d65b793a2c9b4007d067309ba38aa1384a5692f5e89ceadb20e53655e7.png", + "sha256": "sha256:bytes:923228d65b793a2c9b4007d067309ba38aa1384a5692f5e89ceadb20e53655e7", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", + "provenanceTemplateId": "ace_step_lyric_music_video" + }, + { + "path": "template-gallery/runtime-inputs/assets/930364ab2667e492e51b8a60664751d66f5ed3f2d580664832977e89bcfbbf26.webp", + "sha256": "sha256:bytes:930364ab2667e492e51b8a60664751d66f5ed3f2d580664832977e89bcfbbf26", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["ltx_video_image_to_video", "ltx_video_long_showcase"] + }, + { + "path": "template-gallery/runtime-inputs/assets/9328061557396ef591a9f4a6242abf1cdd61082846518726c3114f746ccedd63.webp", + "sha256": "sha256:bytes:9328061557396ef591a9f4a6242abf1cdd61082846518726c3114f746ccedd63", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["qwen_logo_texture"] + }, + { + "path": "template-gallery/runtime-inputs/assets/965240cf250a9074a7adab394c76070674cf517bed42b6c4647112d17dec84de.webp", + "sha256": "sha256:bytes:965240cf250a9074a7adab394c76070674cf517bed42b6c4647112d17dec84de", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["qwen_layered_portrait"] + }, + { + "path": "template-gallery/runtime-inputs/assets/9f9f9685db5e9f8e1c162a0515151b03912c84777727b38682b65839db501ae6.webp", + "sha256": "sha256:bytes:9f9f9685db5e9f8e1c162a0515151b03912c84777727b38682b65839db501ae6", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["qwen_inpaint_object_replace"] + }, + { + "path": "template-gallery/runtime-inputs/assets/a2f8ac6f5937d6e618b48ce9947153b8233ff7a82dcf67f28766d20b9917d730.webp", + "sha256": "sha256:bytes:a2f8ac6f5937d6e618b48ce9947153b8233ff7a82dcf67f28766d20b9917d730", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["qwen_inpaint_mask_draft"] + }, + { + "path": "template-gallery/runtime-inputs/assets/a6d165bd87e2c57ab8cf71fa15de9d8724fccf5782c16c34c25dc77934751676.webp", + "sha256": "sha256:bytes:a6d165bd87e2c57ab8cf71fa15de9d8724fccf5782c16c34c25dc77934751676", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["qwen_edit_strength_sweep"] + }, + { + "path": "template-gallery/runtime-inputs/assets/a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b.webp", + "sha256": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": [ + "flux_kontext_edit", + "flux_kontext_multi_reference", + "qwen_product_ad_composite", + "qwen_product_relight" + ] + }, + { + "path": "template-gallery/runtime-inputs/assets/b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67.png", + "sha256": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["qwen_control_image_layout", "qwen_packaging_dieline"] + }, + { + "path": "template-gallery/runtime-inputs/assets/b7c221b367738177e32fece56067d743df96282a6ccb2afd040ee89ea0a8f678.webp", + "sha256": "sha256:bytes:b7c221b367738177e32fece56067d743df96282a6ccb2afd040ee89ea0a8f678", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["flux_fill_inpaint"] + }, + { + "path": "template-gallery/runtime-inputs/assets/b9909f4cbff8af6e97be6d1e4923c67687eee41dbd64b051a018866781da12ab.webp", + "sha256": "sha256:bytes:b9909f4cbff8af6e97be6d1e4923c67687eee41dbd64b051a018866781da12ab", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["character_edit"] + }, + { + "path": "template-gallery/runtime-inputs/assets/bf4dbaa55b83b19ca56c691e9d1a10d3b838ff2fec926aaea6b526561c68f8e6.png", + "sha256": "sha256:bytes:bf4dbaa55b83b19ca56c691e9d1a10d3b838ff2fec926aaea6b526561c68f8e6", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["flux_fill_outpaint"] + }, + { + "path": "template-gallery/runtime-inputs/assets/c810699838c636767d2a5b25fb457df94a4b76a70da9a77e77009681779acbf2.webp", + "sha256": "sha256:bytes:c810699838c636767d2a5b25fb457df94a4b76a70da9a77e77009681779acbf2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["ltx_video_long_showcase"] + }, + { + "path": "template-gallery/runtime-inputs/assets/d49908e24c58d144f4264f4028cb0f7f2e72fb02b315443fd021715ebed1e737.webp", + "sha256": "sha256:bytes:d49908e24c58d144f4264f4028cb0f7f2e72fb02b315443fd021715ebed1e737", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["ltx_video_long_showcase"] + }, + { + "path": "template-gallery/runtime-inputs/assets/d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24.png", + "sha256": "sha256:bytes:d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["flux2_klein_edit"] + }, + { + "path": "template-gallery/runtime-inputs/assets/d86b921f1be36360b5b660b8a5b9d0e9165e888be8a06fe2d8f362e87de40429.mp4", + "sha256": "sha256:bytes:d86b921f1be36360b5b660b8a5b9d0e9165e888be8a06fe2d8f362e87de40429", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["wan_vace_video_color_grade"] + }, + { + "path": "template-gallery/runtime-inputs/assets/d898e00f3be4b28e237f71acf8024ad3715a657e1fcf3aeaf57279468dff7a76.webp", + "sha256": "sha256:bytes:d898e00f3be4b28e237f71acf8024ad3715a657e1fcf3aeaf57279468dff7a76", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["qwen_outpaint_aspect_template"] + }, + { + "path": "template-gallery/runtime-inputs/assets/ddaccd06100d51494e5aaaecedab7b27eaeeda5290d453498d3e1cb9460ad474.webp", + "sha256": "sha256:bytes:ddaccd06100d51494e5aaaecedab7b27eaeeda5290d453498d3e1cb9460ad474", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["ltx_video_long_showcase"] + }, + { + "path": "template-gallery/runtime-inputs/assets/e07d05a658d361b6d28af62bcccfaeba9254507467dae1c5839efd546fed96a7.wav", + "sha256": "sha256:bytes:e07d05a658d361b6d28af62bcccfaeba9254507467dae1c5839efd546fed96a7", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["ace_step_audio_repaint", "ace_step_audio_variation"] + }, + { + "path": "template-gallery/runtime-inputs/assets/e0ab22f77f5d966d7868f8950f79702dc6d156d0eaef3e06205097558d5c5bb2.webp", + "sha256": "sha256:bytes:e0ab22f77f5d966d7868f8950f79702dc6d156d0eaef3e06205097558d5c5bb2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["qwen_product_ad_composite"] + }, + { + "path": "template-gallery/runtime-inputs/assets/e0f19676addbba6fe954711c235878ef43495e8066b84ed70b5c240a8512b026.mp4", + "sha256": "sha256:bytes:e0f19676addbba6fe954711c235878ef43495e8066b84ed70b5c240a8512b026", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["wan_vace_grayscale_control"] + }, + { + "path": "template-gallery/runtime-inputs/assets/e14e0fb4bccace254e3430bbddd49728980e5445b988eff1ae8164f135d1cc8d.png", + "sha256": "sha256:bytes:e14e0fb4bccace254e3430bbddd49728980e5445b988eff1ae8164f135d1cc8d", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["qwen_inpaint_object_replace"] + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to original synthetic source terms", + "creationMethod": "Exact original synthetic opening image or deterministic crop in the maintainer-accepted nine-scene Moonflower recipe; recovered without generation", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Generated image and deterministic preparation; original Z-Image-Turbo and FLUX.2-klein-4B source-chain terms retained", + "modelTerms": [ + "Tongyi-MAI/Z-Image-Turbo: Apache-2.0; https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/runtime-inputs/assets/e7445aefeb2c248ff76caa56c1da1a29129ac57994b4d62fcb8cb0bcfe6a0734.png", + "sha256": "sha256:bytes:e7445aefeb2c248ff76caa56c1da1a29129ac57994b4d62fcb8cb0bcfe6a0734", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", + "provenanceTemplateId": "ace_step_lyric_music_video" + }, + { + "path": "template-gallery/runtime-inputs/assets/e90e99e27cdd9b6ab7478a05199df2fdf7dce650d700ef2ceb55da7fb206b715.webp", + "sha256": "sha256:bytes:e90e99e27cdd9b6ab7478a05199df2fdf7dce650d700ef2ceb55da7fb206b715", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["qwen_edit_plus_single_image"] + }, + { + "path": "template-gallery/runtime-inputs/assets/f791a809c0df307cd7dafa8c54ae86bbe4c53d73afdacb2183ff8cdbeac994c2.webp", + "sha256": "sha256:bytes:f791a809c0df307cd7dafa8c54ae86bbe4c53d73afdacb2183ff8cdbeac994c2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["qwen_product_relight"] + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to original synthetic source terms", + "creationMethod": "Exact original synthetic opening image or deterministic crop in the maintainer-accepted nine-scene Moonflower recipe; recovered without generation", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Generated image and deterministic preparation; original Z-Image-Turbo and FLUX.2-klein-4B source-chain terms retained", + "modelTerms": [ + "Tongyi-MAI/Z-Image-Turbo: Apache-2.0; https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/runtime-inputs/assets/f92394469d782bfcc9e00fdda22a9aff3ce0f0cfd9c3258ef9ff0a7ed2b2b89b.png", + "sha256": "sha256:bytes:f92394469d782bfcc9e00fdda22a9aff3ce0f0cfd9c3258ef9ff0a7ed2b2b89b", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", + "provenanceTemplateId": "ace_step_lyric_music_video" + }, + { + "path": "template-gallery/runtime-inputs/assets/fc326ed56f9e5de83262a0a1bc4ce85f4b4b291d654a05efa4a32fc133f97a3f.webp", + "sha256": "sha256:bytes:fc326ed56f9e5de83262a0a1bc4ce85f4b4b291d654a05efa4a32fc133f97a3f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", + "creationMethod": "AI-generated Gallery media or deterministic derivative", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "modelTerms": [ + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-08-03", + "reviewClass": "standard-human-attestation", + "consumingTemplateIds": ["flux2_klein_multi_reference"] + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to original synthetic source terms", + "creationMethod": "Exact original synthetic opening image or deterministic crop in the maintainer-accepted nine-scene Moonflower recipe; recovered without generation", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Generated image and deterministic preparation; original Z-Image-Turbo and FLUX.2-klein-4B source-chain terms retained", + "modelTerms": [ + "Tongyi-MAI/Z-Image-Turbo: Apache-2.0; https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "black-forest-labs/FLUX.2-klein-4B: Apache-2.0; https://huggingface.co/black-forest-labs/FLUX.2-klein-4B/tree/e7b7dc27f91deacad38e78976d1f2b499d76a294" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/runtime-inputs/assets/fcca725348f3a6ffbb0f4db657c52e16216dbe6735305fbcc5e164f1fee49ab4.webp", + "sha256": "sha256:bytes:fcca725348f3a6ffbb0f4db657c52e16216dbe6735305fbcc5e164f1fee49ab4", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", + "provenanceTemplateId": "ace_step_lyric_music_video" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers", + "creationMethod": "Project-authored redacted technical/review records or versioned declarations for two maintainer-accepted native replacements", + "sourceUrl": null, + "sourceRevision": null, + "sourceLicense": "Apache-2.0 project-authored metadata; media and model terms remain separate", + "modelTerms": [], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/runtime-inputs/default-input-bindings.json", + "sha256": "sha256:bytes:a09ede412c08ff3ff701506e3d3de52a7fbff3dfbec105de73dbb30a69849966", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-two-registration", + "humanApprovalPacketSHA256": "c3c5e06d05771cf28f823e1dee31a9e7e3765d2f84038823aaadc505ee8290f5", + "publicationBasis": "you can register these two as well", + "provenanceTemplateId": "ace_step_lyric_music_video" + }, + { + "path": "template-gallery/salt_marsh_from_above.webp", + "sha256": "sha256:bytes:6447268a9bef5f8a4503d73760f91e8d930e9ce620880e958f461d7d6539f27c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/fal/AuraFlow-v0.3/tree/2cd8588f04c886002be4571697d84654a50e3af3", + "sourceRevision": "fal/AuraFlow-v0.3@2cd8588f04c886002be4571697d84654a50e3af3", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "apache-2.0. https://huggingface.co/fal/AuraFlow-v0.3/tree/2cd8588f04c886002be4571697d84654a50e3af3" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "fal/AuraFlow-v0.3@2cd8588f04c886002be4571697d84654a50e3af3 https://huggingface.co/fal/AuraFlow-v0.3/tree/2cd8588f04c886002be4571697d84654a50e3af3" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "salt_marsh_from_above" + }, + { + "path": "template-gallery/sana_i2v_blue_hour_above_rice_terraces.mp4", + "sha256": "sha256:bytes:3b948924eeb984126741dc465d78482ae9a01704010ae59e9ffec3ed9973351a", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1", + "sourceRevision": "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1 https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sana_i2v_blue_hour_above_rice_terraces" + }, + { + "path": "template-gallery/sana_sprint_monochrome_tiger.webp", + "sha256": "sha256:bytes:f22b1d5a1d2944949698b47eec10e7f8d04b23bc0746f4e089b41d78e9d94ff7", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "humanLikenessConsent": "not-applicable", + "marks": [], + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-20", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "40060ba701188a6d287df07e0852c6497d109885495e6fc85a19e8371ef73906", + "publicationBasis": "Maintainer approved both exact Sana Sprint images and redistribution of the redacted review and recipe records.", + "creationMethod": "Exact retained Sana Sprint 0.75 image edit of the synthetic source", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/blob/aa76e7f4f4928f378716b6716a2130fba3caf5b1/README.md", + "sourceRevision": "Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers@aa76e7f4f4928f378716b6716a2130fba3caf5b1", + "sourceLicense": "Project-authored synthetic example generated with the pinned model and applicable component terms", + "modelTerms": [ + "Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers@aa76e7f4f4928f378716b6716a2130fba3caf5b1 — Apache-2.0. https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/blob/aa76e7f4f4928f378716b6716a2130fba3caf5b1/LICENSE", + "The model card identifies Gemma-2-2B-IT as its text encoder. https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/blob/aa76e7f4f4928f378716b6716a2130fba3caf5b1/README.md", + "Gemma Terms of Use and Prohibited Use Policy. https://gemma.ai/resources/terms/ https://gemma.ai/resources/prohibited-use/" + ], + "aiGenerated": true, + "requiredAttribution": [ + "NVIDIA, MIT HAN Lab and Hugging Face Sana Sprint, plus the Google Gemma 2 text encoder. https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/blob/aa76e7f4f4928f378716b6716a2130fba3caf5b1/README.md" + ], + "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "provenanceTemplateId": "sana_sprint_monochrome_tiger" + }, + { + "path": "template-gallery/sana_tidal_pool_on_black_basalt.webp", + "sha256": "sha256:bytes:4d7f257b35ebd4a7c0e087257a6320c9c427b5ea174ade60f044f0c4b631ce17", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829", + "sourceRevision": "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829 https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers/tree/28f3af7689de15f3883d5863059a2fca0aa9b829" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "4fc7c52588176cb1f6ba6d699d08741b2986ea71ea87bac650d261716a10b24c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sana_tidal_pool_on_black_basalt" + }, + { + "path": "template-gallery/sana_video_water_terraces_before_sunrise.mp4", + "sha256": "sha256:bytes:532ab779797e91108d78d646478cf5e997b35b74acab8f2011d79bd421846301", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1", + "sourceRevision": "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1 https://huggingface.co/Efficient-Large-Model/SANA-Video_2B_480p_diffusers/tree/db5f398b13ca086d09a50ce156c20527773841b1" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sana_video_water_terraces_before_sunrise" + }, + { + "path": "template-gallery/sd15_canny_guided_green_glass.webp", + "sha256": "sha256:bytes:d564a03d8e7b1a96083bd314b3700e828da2575b2b355cc574ebbcb17dd7a2d5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_canny_guided_green_glass" + }, + { + "path": "template-gallery/sd15_control_cobalt_handmade_paper.webp", + "sha256": "sha256:bytes:bb215a263ec6f735c37ee9a4c1692c77681492dca527b149d3aa98aff5c3a2ed", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_control_cobalt_handmade_paper" + }, + { + "path": "template-gallery/sd15_control_cobalt_studio_wall_repair.webp", + "sha256": "sha256:bytes:249492d460424c36cd16c3785213eb22da9d18b355075e423a11fe5e0d79e16f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["wan_vace_outpaint_reframe"] + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_control_cobalt_studio_wall_repair" }, { - "path": "template-gallery/runtime-inputs/assets/124415536a8071baccf8821232ad79a0a8ceec30ae62617c91a8d7a0b59d0a8c.webp", - "sha256": "sha256:bytes:124415536a8071baccf8821232ad79a0a8ceec30ae62617c91a8d7a0b59d0a8c", + "path": "template-gallery/sd15_pag_canny_guided_glass.webp", + "sha256": "sha256:bytes:3458a6d0acea5261f8f829121eabb8d1dc77a2f057e62d18485e34f097f1da6b", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["qwen_logo_texture"] + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_canny_guided_glass" }, { - "path": "template-gallery/runtime-inputs/assets/16f6ea27b5d7cfaed106e2e694572bbe92b7c7e2a43835b3f4313a748f510f74.png", - "sha256": "sha256:bytes:16f6ea27b5d7cfaed106e2e694572bbe92b7c7e2a43835b3f4313a748f510f74", + "path": "template-gallery/sd15_pag_cobalt_studio_repair.webp", + "sha256": "sha256:bytes:eb511fda2b5d227685893fac25fd214c4b4a25ac7c1f61e0205983ac657f82de", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["flux_fill_inpaint"] + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_cobalt_studio_repair" }, { - "path": "template-gallery/runtime-inputs/assets/1d993540e914f0e2d230f1133b57ae14bb837829237a53c89613fcdef6699995.webp", - "sha256": "sha256:bytes:1d993540e914f0e2d230f1133b57ae14bb837829237a53c89613fcdef6699995", + "path": "template-gallery/sd15_pag_control_wall_repair.webp", + "sha256": "sha256:bytes:3e1ed497d90cdb3a9aac8adf5828edb265706430b9482426b5a5cd1531e2594e", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["flux2_klein_multi_reference"] + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_control_wall_repair" }, { - "path": "template-gallery/runtime-inputs/assets/218d83e0706fec201097582a6e5e00dc79f2d7d1ecb0badba2214c5ecaae1866.mp4", - "sha256": "sha256:bytes:218d83e0706fec201097582a6e5e00dc79f2d7d1ecb0badba2214c5ecaae1866", + "path": "template-gallery/sd15_pag_mountain_lake_watercolor.webp", + "sha256": "sha256:bytes:d3956b48ecf149f19ce45b003a6216ab7e0ca1771ba0aaec1fa420cac710158f", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "Publisher model terms at https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["wan_vace_video_to_video"] + "requiredAttribution": [ + "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14 https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/451f4fe16113bff5a5d2269ed5ad43b0592e9a14" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sd15_pag_mountain_lake_watercolor" }, { - "path": "template-gallery/runtime-inputs/assets/233d1b3a123fceb4f3b68d2d3a9f5b4129627073b8235fe7248ae6ebdeecb554.mp4", - "sha256": "sha256:bytes:233d1b3a123fceb4f3b68d2d3a9f5b4129627073b8235fe7248ae6ebdeecb554", + "path": "template-gallery/sdxl_blue_glass_on_linen.webp", + "sha256": "sha256:bytes:a6a5af6e608dfc8de66c3ad394aaf39c0b82692cf89619979f6a3997a7fbec62", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/datasets/huggingface/documentation-images", - "sourceRevision": null, - "sourceLicense": "CC-BY-NC-SA-4.0", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Lightricks/LTX-Video-0.9.8-13B-distilled: LTXV Open Weights License 0.X; https://huggingface.co/Lightricks/LTX-Video-0.9.8-13B-distilled/tree/7c64400e1861cc0d7b98d570a1926d5408ec60cd", - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_blue_glass_on_linen" + }, + { + "path": "template-gallery/sdxl_canny_adapter_glass_study.webp", + "sha256": "sha256:bytes:a3cc3458190184277baebd012898e3eef8504570f6ce52a64228a78f68400eef", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_canny_adapter_glass_study" + }, + { + "path": "template-gallery/sdxl_clear_cobalt_backdrop.webp", + "sha256": "sha256:bytes:98b57164602d8cfd6b61c689fa26770421f9dce8a7b9c23bc879a49d4def1004", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_clear_cobalt_backdrop" + }, + { + "path": "template-gallery/sdxl_control_golden_boathouse.webp", + "sha256": "sha256:bytes:73d25ad408e3db3308743a876e4b6e8b272496ba44ab4f51b7e1a89dba723f8f", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_control_golden_boathouse" + }, + { + "path": "template-gallery/sdxl_control_inpaint_warm_plaster.webp", + "sha256": "sha256:bytes:843d44d49afe20f03301931466a5578f2924c089bf33a8e6121f4346c33780f4", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_control_inpaint_warm_plaster" + }, + { + "path": "template-gallery/sdxl_controlnet_glass_study_on_slate.webp", + "sha256": "sha256:bytes:a900fb44cec09e91eb4d6237dc5a81aa9dfa0a92deea9ccfa3c5f84b2c7dc4e5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "3968c7cbe37a94789a9f839d8e83a9e0f102629b797d5f7baacf0304a8d18153", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_controlnet_glass_study_on_slate" + }, + { + "path": "template-gallery/sdxl_pag_cobalt_wall.webp", + "sha256": "sha256:bytes:dc976b97d1919d526a84c397596fbb4b440edf3cf53fad156f07fba46810e8de", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_cobalt_wall" + }, + { + "path": "template-gallery/sdxl_pag_lighthouse_in_graphite.webp", + "sha256": "sha256:bytes:6acd5e4afd90b2da12ba56d2efc594b9a3b0f99450b8aa373d0f6e6ae00abec2", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_lighthouse_in_graphite" + }, + { + "path": "template-gallery/sdxl_pag_snow_cabin.webp", + "sha256": "sha256:bytes:22b8ba630d466d07025f3d272878330192f5f0fec9bcea03cb13a38ce171d541", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d7e2fd301d16eede3da44cec1811930560ba0d958dfd46d8d0962eb3a22eea63", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_snow_cabin" + }, + { + "path": "template-gallery/sdxl_pag_two_tier_cobalt_glass.webp", + "sha256": "sha256:bytes:2ac737f90e471c9f792b1d2a478645d7cc09c56889f31befc3266a0fef10ac2c", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/diffusers/controlnet-canny-sdxl-1.0/tree/eb115a19a10d14909256db740ed109532ab1483c", + "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pag_two_tier_cobalt_glass" + }, + { + "path": "template-gallery/sdxl_pix2pix_pale_amber_glass.webp", + "sha256": "sha256:bytes:a56a057711364a3b747c202652999f5fcde7ee1b91c0c7a2a92e6ca26c6c3dff", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/diffusers/sdxl-instructpix2pix-768/tree/06653d47f8d22f2c2205a5884d6a24c5e76d2ca7", + "sourceRevision": "diffusers/sdxl-instructpix2pix-768@06653d47f8d22f2c2205a5884d6a24c5e76d2ca7", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/diffusers/sdxl-instructpix2pix-768/tree/06653d47f8d22f2c2205a5884d6a24c5e76d2ca7" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "diffusers/sdxl-instructpix2pix-768@06653d47f8d22f2c2205a5884d6a24c5e76d2ca7 https://huggingface.co/diffusers/sdxl-instructpix2pix-768/tree/06653d47f8d22f2c2205a5884d6a24c5e76d2ca7" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_pix2pix_pale_amber_glass" + }, + { + "path": "template-gallery/sdxl_turbo_orange_caps.webp", + "sha256": "sha256:bytes:e69bdc004989467e4e0df8d7d5b3d7e19f95158dff49e3ca649bb6da42f2cf59", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/sdxl-turbo/tree/71153311d3dbb46851df1931d3ca6e939de83304", + "sourceRevision": "stabilityai/sdxl-turbo@71153311d3dbb46851df1931d3ca6e939de83304", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "https://huggingface.co/stabilityai/sdxl-turbo/blob/71153311d3dbb46851df1931d3ca6e939de83304/LICENSE.md" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "stabilityai/sdxl-turbo@71153311d3dbb46851df1931d3ca6e939de83304 https://huggingface.co/stabilityai/sdxl-turbo/tree/71153311d3dbb46851df1931d3ca6e939de83304" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "sdxl_turbo_orange_caps" + }, + { + "path": "template-gallery/shap_e_traffic_cone_turntable.mp4", + "sha256": "sha256:bytes:6fd6dacd583bf43561c100a2d8df7773ab4faeb054325cc22ca2d00bb3f45836", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/openai/shap-e/tree/7bd337afdea1c17842e1c3cc45c4e268356dba40", + "sourceRevision": "openai/shap-e@7bd337afdea1c17842e1c3cc45c4e268356dba40", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/openai/shap-e/tree/7bd337afdea1c17842e1c3cc45c4e268356dba40" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [ - "Source: Hugging Face documentation-images Dataset, CC BY-NC-SA 4.0; modified by the MoDiff LTX workflow." - ], - "assetLicense": "CC-BY-NC-SA-4.0", + "requiredAttribution": [ + "openai/shap-e@7bd337afdea1c17842e1c3cc45c4e268356dba40 https://huggingface.co/openai/shap-e/tree/7bd337afdea1c17842e1c3cc45c4e268356dba40" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "8ed148b43a11d27176b996c42432ccd9bd06c7c94b64f08a48dc4167de24a698", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "shap_e_traffic_cone_turntable" + }, + { + "path": "template-gallery/shap_e_traffic_cone_turntable.poster.webp", + "sha256": "sha256:bytes:a61343b31e7b7aa532aa5d501ecf820543595fed119374b42470b08cf44d5c2b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/openai/shap-e/tree/7bd337afdea1c17842e1c3cc45c4e268356dba40", + "sourceRevision": "openai/shap-e@7bd337afdea1c17842e1c3cc45c4e268356dba40", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/openai/shap-e/tree/7bd337afdea1c17842e1c3cc45c4e268356dba40" + ], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "openai/shap-e@7bd337afdea1c17842e1c3cc45c4e268356dba40 https://huggingface.co/openai/shap-e/tree/7bd337afdea1c17842e1c3cc45c4e268356dba40" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "8ed148b43a11d27176b996c42432ccd9bd06c7c94b64f08a48dc4167de24a698", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "shap_e_traffic_cone_turntable" + }, + { + "path": "template-gallery/showcases/flux3-kolkata-bride.v1.json", + "sha256": "sha256:bytes:64a51a70baec5b4a99937ac3952e458450c7d699669b6f31241106da33f70b55", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Project-authored redacted consumed-control record and maintainer-accepted review", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein/tree/8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": ["black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68: Apache-2.0"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["ltx_video_video_to_video"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/283b1cfb32b15fe6b31a29dce1f2b96026c1ad0826bf3f24aebebf4b6f9a4f07.webp", - "sha256": "sha256:bytes:283b1cfb32b15fe6b31a29dce1f2b96026c1ad0826bf3f24aebebf4b6f9a4f07", + "path": "template-gallery/showcases/flux3-kolkata-bride.v1.webp", + "sha256": "sha256:bytes:1172abd0f44a2031c6d75e7a48459c84c31ec019a082920f180db5417cdd0467", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." - ], + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Native MoDiff model generation", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein/tree/8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceLicense": "Original synthetic generation; underlying model terms retained", + "modelTerms": ["black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68: Apache-2.0"], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["reference_fusion"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/29722ed072feec11cd36adce7b6cb48483bff3f05776048b93f960b5554ab533.png", - "sha256": "sha256:bytes:29722ed072feec11cd36adce7b6cb48483bff3f05776048b93f960b5554ab533", + "path": "template-gallery/showcases/flux3-material-atlas-liquid.v2.json", + "sha256": "sha256:bytes:057f75151945129a737c2574a067255dc3b8d4f5e7bbee296b340a2043d317a0", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." - ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Project-authored redacted consumed-control record and maintainer-accepted review", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein/tree/8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": ["black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68: Apache-2.0"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["qwen_inpaint_mask_draft"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/2e0ec8892660785e322468d0153fd2dadf7a4d920fce2d7d4a0b686a8fe8515d.webp", - "sha256": "sha256:bytes:2e0ec8892660785e322468d0153fd2dadf7a4d920fce2d7d4a0b686a8fe8515d", + "path": "template-gallery/showcases/flux3-material-atlas-liquid.v2.webp", + "sha256": "sha256:bytes:d942084632ca80c1ef06fca1cb2d0881100303df863baf7f71b7dde9cd83ea5a", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." - ], + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Native MoDiff model generation", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein/tree/8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceLicense": "Original synthetic generation; underlying model terms retained", + "modelTerms": ["black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68: Apache-2.0"], "aiGenerated": true, "humanLikenessConsent": "synthetic", - "marks": [], + "marks": ["Fictional MATERIAL ATLAS label"], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["flux_redux_edit"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/2e202069a584ee5ada91e2deaea6bf7b92a94f4816e669e695d7cb64d5a1cb0e.png", - "sha256": "sha256:bytes:2e202069a584ee5ada91e2deaea6bf7b92a94f4816e669e695d7cb64d5a1cb0e", + "path": "template-gallery/showcases/flux3-material-atlas-pup.v1.json", + "sha256": "sha256:bytes:5388ea1fccfe50e1b99707da87087a4bbf03a7e0422a71d4b151c696eef962b5", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Project-authored redacted consumed-control record and maintainer-accepted review", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein/tree/8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceLicense": "Apache-2.0 project-authored metadata", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68: Apache-2.0", + "black-forest-labs/flux-3-image-klein-pup@3f3edb52b2c55de0d49feab28598b68f7f8e4830: Apache-2.0" ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["flux_depth_control"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/3807d712e24a94c4b445c2fa950a784bba334f5f665e74964fe4d47a43856230.wav", - "sha256": "sha256:bytes:3807d712e24a94c4b445c2fa950a784bba334f5f665e74964fe4d47a43856230", + "path": "template-gallery/showcases/flux3-material-atlas-pup.v1.webp", + "sha256": "sha256:bytes:3ae022143d5330dd780dbae7b8aa4b07891983d10b566013ba0ba9376567af71", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Native MoDiff model generation", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein/tree/8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceLicense": "Original synthetic generation; underlying model terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68: Apache-2.0", + "black-forest-labs/flux-3-image-klein-pup@3f3edb52b2c55de0d49feab28598b68f7f8e4830: Apache-2.0" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", + "marks": ["Fictional MATERIAL ATLAS label"], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" + }, + { + "path": "template-gallery/showcases/flux3-material-atlas.v1.json", + "sha256": "sha256:bytes:58e8ab0f8794e7ace794a54994cff0025d2d18b356b66ed0e8d6588764135337", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Project-authored redacted consumed-control record and maintainer-accepted review", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein/tree/8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": ["black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68: Apache-2.0"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["ace_step_audio_continuation"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/38a6f334f89048effe579fc473d6fb38437eb579f324ac399d1ec0f6509f74d9.webp", - "sha256": "sha256:bytes:38a6f334f89048effe579fc473d6fb38437eb579f324ac399d1ec0f6509f74d9", + "path": "template-gallery/showcases/flux3-material-atlas.v1.webp", + "sha256": "sha256:bytes:0e2fecdb52b719905b2557ce5f55b7d4e05f391d426b69dae48b0de62bed3489", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." - ], + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Native MoDiff model generation", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein/tree/8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceLicense": "Original synthetic generation; underlying model terms retained", + "modelTerms": ["black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68: Apache-2.0"], "aiGenerated": true, "humanLikenessConsent": "synthetic", + "marks": ["Fictional MATERIAL ATLAS label"], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" + }, + { + "path": "template-gallery/showcases/flux3-old-town-blue-hour.v2.json", + "sha256": "sha256:bytes:67f31ba055e1ac3a7d09f039cd0f3048043e9e09e493d4cc75b59e5a71575002", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Project-authored redacted consumed-control record and maintainer-accepted review", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein/tree/8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": ["black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68: Apache-2.0"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["ltx_video_long_showcase"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/39428f00f67b49fc6d624617df2964c9f869de21e7e188ef5b231ae04c4aeacc.webp", - "sha256": "sha256:bytes:39428f00f67b49fc6d624617df2964c9f869de21e7e188ef5b231ae04c4aeacc", + "path": "template-gallery/showcases/flux3-old-town-blue-hour.v2.webp", + "sha256": "sha256:bytes:11683d423d3bc4d39cbde524c2b2e885f73181e8e48372eea3204d01ba3c5478", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." - ], + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Native MoDiff model generation", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein/tree/8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceLicense": "Original synthetic generation; underlying model terms retained", + "modelTerms": ["black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68: Apache-2.0"], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["qwen_multi_reference_product", "reference_fusion"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/3c4d3a7a58a7be7f8d8920106dcfea30e28b4af115ce406bcf5b16cec4b4297a.mp4", - "sha256": "sha256:bytes:3c4d3a7a58a7be7f8d8920106dcfea30e28b4af115ce406bcf5b16cec4b4297a", + "path": "template-gallery/showcases/flux3-old-town-human-cat.json", + "sha256": "sha256:bytes:3ce0313e04d9a4f7015a05c86b4111253d397bd229b7c8c2908421d081924eb2", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." - ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Project-authored redacted consumed-control record and maintainer-accepted review", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein/tree/8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceLicense": "Apache-2.0 project-authored metadata", + "modelTerms": ["black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68: Apache-2.0"], + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["wan_vace_outpaint_reframe"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/3d03ee22a3d29068f30f18afcb31e86ea455fbfbe1ca5aa172cf633a26f21339.png", - "sha256": "sha256:bytes:3d03ee22a3d29068f30f18afcb31e86ea455fbfbe1ca5aa172cf633a26f21339", + "path": "template-gallery/showcases/flux3-old-town-human-cat.webp", + "sha256": "sha256:bytes:a8914e6b18c916445654cd8b1ccd6723d613921af2450042790845b18a80871d", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", - "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." - ], + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Native MoDiff model generation", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein/tree/8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceLicense": "Original synthetic generation; underlying model terms retained", + "modelTerms": ["black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68: Apache-2.0"], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["flux_control_canny"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/47e56fd165fd2610f34e952191d74e061269b9703ae9fd7f571491f38ce4992c.webp", - "sha256": "sha256:bytes:47e56fd165fd2610f34e952191d74e061269b9703ae9fd7f571491f38ce4992c", + "path": "template-gallery/showcases/flux3-pine-lake-mountains-pup.v1.json", + "sha256": "sha256:bytes:00ad230f799c0d99130adf498b8a0afa0e8f64708bb40c5522fe9a47cee226ca", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Project-authored redacted consumed-control record and maintainer-accepted review", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein/tree/8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceLicense": "Apache-2.0 project-authored metadata", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68: Apache-2.0", + "black-forest-labs/flux-3-image-klein-pup@3f3edb52b2c55de0d49feab28598b68f7f8e4830: Apache-2.0" ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["qwen_multi_reference_product"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/4b1b8d9e351abd437f2ffff90cc6a958160a87863ba4d8e85a0aa80a37e7a10e.webp", - "sha256": "sha256:bytes:4b1b8d9e351abd437f2ffff90cc6a958160a87863ba4d8e85a0aa80a37e7a10e", + "path": "template-gallery/showcases/flux3-pine-lake-mountains-pup.v1.webp", + "sha256": "sha256:bytes:5557814b5aec0f1a0992a78471e4b36ed3a99ec65832916c54a246983e03d73b", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Native MoDiff model generation", + "sourceUrl": "https://huggingface.co/black-forest-labs/flux-3-image-klein/tree/8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "sourceLicense": "Original synthetic generation; underlying model terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68: Apache-2.0", + "black-forest-labs/flux-3-image-klein-pup@3f3edb52b2c55de0d49feab28598b68f7f8e4830: Apache-2.0" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["qwen_character_angles"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/4b800b6a362c9ad7755858a3ec2affbda8706c5a71578ced35b80432fd234741.webp", - "sha256": "sha256:bytes:4b800b6a362c9ad7755858a3ec2affbda8706c5a71578ced35b80432fd234741", + "path": "template-gallery/showcases/h3-copper-cap-edit.json", + "sha256": "sha256:bytes:0ae33ebe907fe47012ffe83615607a91df6d0427ac13f6e0aaf6e45392224d14", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Project-authored redacted consumed-control record and maintainer-accepted review", + "sourceUrl": "https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/tree/492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceRevision": "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceLicense": "Apache-2.0 project-authored metadata", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439: MiniMax H3 Image Community License Agreement" ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["flux_redux_multi_reference"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/52ea89c0cdec3142162156be07af12a06a14ad623b68c9700ccbc82bf889100d.webp", - "sha256": "sha256:bytes:52ea89c0cdec3142162156be07af12a06a14ad623b68c9700ccbc82bf889100d", + "path": "template-gallery/showcases/h3-copper-cap-edit.webp", + "sha256": "sha256:bytes:8a750edf55445e82da15c3161216ba5e74236fde0990af49b3e1f69fafb07f77", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Native MoDiff model generation", + "sourceUrl": "https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/tree/492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceRevision": "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceLicense": "Original synthetic generation; underlying model terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439: MiniMax H3 Image Community License Agreement" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["ltx_video_multi_reference"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/6224e9ee47765858f2ec0c33679140d020cf3ad6e4fa2fa4557ef50f811aef0e.webp", - "sha256": "sha256:bytes:6224e9ee47765858f2ec0c33679140d020cf3ad6e4fa2fa4557ef50f811aef0e", + "path": "template-gallery/showcases/h3-emerald-material-transfer.json", + "sha256": "sha256:bytes:864b0e509c2c60c85ddd833a4e171ba65ebfe14ab2a0c05819396057b447d644", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Project-authored redacted consumed-control record and maintainer-accepted review", + "sourceUrl": "https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/tree/492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceRevision": "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceLicense": "Apache-2.0 project-authored metadata", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439: MiniMax H3 Image Community License Agreement" ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["qwen_tile_extract"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/73123a5bb6e8c1367eced6a7fbee6b0e5500ecbabf769ba9d9c18fd10623e36e.webp", - "sha256": "sha256:bytes:73123a5bb6e8c1367eced6a7fbee6b0e5500ecbabf769ba9d9c18fd10623e36e", + "path": "template-gallery/showcases/h3-emerald-material-transfer.webp", + "sha256": "sha256:bytes:b35fa527960c392c3f4c268a488b608824544dbfc4898831edf094a619ec6eec", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Native MoDiff model generation", + "sourceUrl": "https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/tree/492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceRevision": "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceLicense": "Original synthetic generation; underlying model terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439: MiniMax H3 Image Community License Agreement" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", - "marks": [], + "marks": ["Fictional MATERIAL ATLAS label"], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["ltx_video_multi_reference"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/799d82b016a108d4b6902500b4226afd5d2391f4a7b0693af75255425c943a5e.png", - "sha256": "sha256:bytes:799d82b016a108d4b6902500b4226afd5d2391f4a7b0693af75255425c943a5e", + "path": "template-gallery/showcases/h3-kolkata-bride.v1.json", + "sha256": "sha256:bytes:0bd8b06ae0a27eacb48e5748f5abbd5dcfc4e071f9fed65fa119d2af07bdc753", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Project-authored redacted consumed-control record and maintainer-accepted review", + "sourceUrl": "https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/tree/492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceRevision": "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceLicense": "Apache-2.0 project-authored metadata", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439: MiniMax H3 Image Community License Agreement" ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["flux_fill_outpaint"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/7f1ea58485fa7802765b9fbbf0e6957e8607261c91669fdcc44cbed80c6fb309.webp", - "sha256": "sha256:bytes:7f1ea58485fa7802765b9fbbf0e6957e8607261c91669fdcc44cbed80c6fb309", + "path": "template-gallery/showcases/h3-kolkata-bride.v1.webp", + "sha256": "sha256:bytes:800b8835bf2372833e0629c3dae7a4f09f892974d7de59226be91fa9ab98ce00", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Native MoDiff model generation", + "sourceUrl": "https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/tree/492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceRevision": "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceLicense": "Original synthetic generation; underlying model terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439: MiniMax H3 Image Community License Agreement" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["flux_redux_multi_reference"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/862e292caa1759156fffde5cfccda8b97ec622514258f81986188cf63a836ea9.webp", - "sha256": "sha256:bytes:862e292caa1759156fffde5cfccda8b97ec622514258f81986188cf63a836ea9", + "path": "template-gallery/showcases/h3-kolkata-explicit-dusk.v2.json", + "sha256": "sha256:bytes:04a373fa9debe30185a09cf7e99285ecb127cb0be897a4ffbf1a9a94959fbb0b", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Project-authored redacted consumed-control record and maintainer-accepted review", + "sourceUrl": "https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/tree/492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceRevision": "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceLicense": "Apache-2.0 project-authored metadata", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439: MiniMax H3 Image Community License Agreement" ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["qwen_outpaint_draft"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/88a7ada5cb91a6ef86de0ff7c26c6b4683df25cc0baa18382371ce0748cd0bd6.webp", - "sha256": "sha256:bytes:88a7ada5cb91a6ef86de0ff7c26c6b4683df25cc0baa18382371ce0748cd0bd6", + "path": "template-gallery/showcases/h3-kolkata-explicit-dusk.v2.webp", + "sha256": "sha256:bytes:3cbb6639f68bd721af9ae138cdc0a293b57754e2f61448104385b873dd77138d", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Native MoDiff model generation", + "sourceUrl": "https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/tree/492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceRevision": "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceLicense": "Original synthetic generation; underlying model terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439: MiniMax H3 Image Community License Agreement" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["ltx_video_long_showcase"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/930364ab2667e492e51b8a60664751d66f5ed3f2d580664832977e89bcfbbf26.webp", - "sha256": "sha256:bytes:930364ab2667e492e51b8a60664751d66f5ed3f2d580664832977e89bcfbbf26", + "path": "template-gallery/showcases/h3-material-atlas-text.json", + "sha256": "sha256:bytes:1313a5b4e8a7fe0da9f822366c21f87e80e413bd6f543394c6c3ab0b5b4012ec", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Project-authored redacted consumed-control record and maintainer-accepted review", + "sourceUrl": "https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/tree/492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceRevision": "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceLicense": "Apache-2.0 project-authored metadata", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439: MiniMax H3 Image Community License Agreement" ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["ltx_video_image_to_video", "ltx_video_long_showcase"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/9328061557396ef591a9f4a6242abf1cdd61082846518726c3114f746ccedd63.webp", - "sha256": "sha256:bytes:9328061557396ef591a9f4a6242abf1cdd61082846518726c3114f746ccedd63", + "path": "template-gallery/showcases/h3-material-atlas-text.webp", + "sha256": "sha256:bytes:684cd3b52382df72df0ca93577e07f2e1dd7bc502ab3a32428a11369347e0de3", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Native MoDiff model generation", + "sourceUrl": "https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/tree/492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceRevision": "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceLicense": "Original synthetic generation; underlying model terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439: MiniMax H3 Image Community License Agreement" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", - "marks": [], + "marks": ["Fictional MATERIAL ATLAS label"], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["qwen_logo_texture"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/965240cf250a9074a7adab394c76070674cf517bed42b6c4647112d17dec84de.webp", - "sha256": "sha256:bytes:965240cf250a9074a7adab394c76070674cf517bed42b6c4647112d17dec84de", + "path": "template-gallery/showcases/h3-old-town-blue-hour.v2.json", + "sha256": "sha256:bytes:b07b899ec46ad069cd0ac73a8ffc9093f4e49862b0451c06354f3ff2650b0968", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Project-authored redacted consumed-control record and maintainer-accepted review", + "sourceUrl": "https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/tree/492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceRevision": "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceLicense": "Apache-2.0 project-authored metadata", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439: MiniMax H3 Image Community License Agreement" ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["qwen_layered_portrait"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/9f421cdc0fa80b3aae368bd3b20a8f6f05942ec461f88541f01aec5390468897.webp", - "sha256": "sha256:bytes:9f421cdc0fa80b3aae368bd3b20a8f6f05942ec461f88541f01aec5390468897", + "path": "template-gallery/showcases/h3-old-town-blue-hour.v2.webp", + "sha256": "sha256:bytes:e4df5af0479d4367236d6d8328a1d30dfda691fcf6f0f642af88aa8d0095c8d6", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Native MoDiff model generation", + "sourceUrl": "https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/tree/492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceRevision": "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceLicense": "Original synthetic generation; underlying model terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439: MiniMax H3 Image Community License Agreement" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["flux_kontext_multi_reference"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/9f9f9685db5e9f8e1c162a0515151b03912c84777727b38682b65839db501ae6.webp", - "sha256": "sha256:bytes:9f9f9685db5e9f8e1c162a0515151b03912c84777727b38682b65839db501ae6", + "path": "template-gallery/showcases/h3-old-town-human-cat.json", + "sha256": "sha256:bytes:2c88791f543facbabf6fdb4d66e7d53498e8a57e3446e87d46e289901c32186d", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Project-authored redacted consumed-control record and maintainer-accepted review", + "sourceUrl": "https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/tree/492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceRevision": "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceLicense": "Apache-2.0 project-authored metadata", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439: MiniMax H3 Image Community License Agreement" ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["qwen_inpaint_object_replace"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/a2f8ac6f5937d6e618b48ce9947153b8233ff7a82dcf67f28766d20b9917d730.webp", - "sha256": "sha256:bytes:a2f8ac6f5937d6e618b48ce9947153b8233ff7a82dcf67f28766d20b9917d730", + "path": "template-gallery/showcases/h3-old-town-human-cat.webp", + "sha256": "sha256:bytes:f75387bfe53e060e42281861559927d67ad8a3ac790e653692d2c8bc515e80d3", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Native MoDiff model generation", + "sourceUrl": "https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/tree/492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceRevision": "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceLicense": "Original synthetic generation; underlying model terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439: MiniMax H3 Image Community License Agreement" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["qwen_inpaint_mask_draft"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/a6d165bd87e2c57ab8cf71fa15de9d8724fccf5782c16c34c25dc77934751676.webp", - "sha256": "sha256:bytes:a6d165bd87e2c57ab8cf71fa15de9d8724fccf5782c16c34c25dc77934751676", + "path": "template-gallery/showcases/h3-pine-lake-mountains.v1.json", + "sha256": "sha256:bytes:fd33ad9cc41a5cae87171df101e0ae180472717e7550c5f1cca1296c9d02313f", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Project-authored redacted consumed-control record and maintainer-accepted review", + "sourceUrl": "https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/tree/492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceRevision": "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceLicense": "Apache-2.0 project-authored metadata", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439: MiniMax H3 Image Community License Agreement" ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["qwen_edit_strength_sweep"] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b.webp", - "sha256": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", + "path": "template-gallery/showcases/h3-pine-lake-mountains.v1.webp", + "sha256": "sha256:bytes:4327354bbfefe07ef2cf43f93ef6387802903d79610fe3deca6dc3ae1ab6babb", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded model terms", + "creationMethod": "Native MoDiff model generation", + "sourceUrl": "https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/tree/492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceRevision": "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439", + "sourceLicense": "Original synthetic generation; underlying model terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439: MiniMax H3 Image Community License Agreement" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": [ - "flux_kontext_edit", - "flux_kontext_multi_reference", - "qwen_product_ad_composite", - "qwen_product_relight" - ] + "reviewedAt": "2026-11-12", + "reviewClass": "per-file-maintainer-accepted-supplementary-showcase", + "humanApprovalPacketSHA256": "955557efb82141c2c2603bf97dae483fbdf4a23e0b72934fbde52a3b414f4d6e" }, { - "path": "template-gallery/runtime-inputs/assets/b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67.png", - "sha256": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", + "path": "template-gallery/showcases/ltx25-monday-morning-brisk-crossing.v1.json", + "sha256": "sha256:bytes:2f0dacddc7d5260b2e0ac8c607d9b9aecf737b74582f36690d2c536eb0c1d7f6", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainer, subject to the recorded model terms", + "creationMethod": "Project-authored redacted generation, postproduction and review summary.", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2.5-Diffusers/tree/4791a1100e0cf97f7ed5c55c12dd71dce13f9dd3", + "sourceRevision": "Lightricks/LTX-2.5-Diffusers@4791a1100e0cf97f7ed5c55c12dd71dce13f9dd3", + "sourceLicense": "Project-authored metadata", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "Lightricks/LTX-2.5-Diffusers@4791a1100e0cf97f7ed5c55c12dd71dce13f9dd3: LTX-2.x Community License Agreement (https://github.com/Lightricks/LTX-2/blob/c1b4675863c07c59c92e502446cccdaedbe5889c/LICENSE-2_x)" ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["qwen_control_image_layout", "qwen_packaging_dieline"] + "requiredAttribution": ["AI-generated with Lightricks LTX-2.5 Full. Original edit and Foley by MoDiff."], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace owner", + "reviewedAt": "2026-11-18", + "reviewClass": "exact-file-owner-approved-supplementary-workflow-showcase", + "humanApprovalPacketSHA256": "102b403c456c00c578eaf9a7499f4ed338948792bb5aa4bbddc948b1f7cb4b8a" }, { - "path": "template-gallery/runtime-inputs/assets/b7c221b367738177e32fece56067d743df96282a6ccb2afd040ee89ea0a8f678.webp", - "sha256": "sha256:bytes:b7c221b367738177e32fece56067d743df96282a6ccb2afd040ee89ea0a8f678", + "path": "template-gallery/showcases/ltx25-monday-morning-brisk-crossing.v1.mp4", + "sha256": "sha256:bytes:31112653ca805e2c11a4fdb9f651f9ca1315876bec0a728b833fa60d85cd618f", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainer, subject to the recorded model terms", + "creationMethod": "Original LTX-2.5 Full synthetic video edited in two shots with original frame-cued Foley.", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2.5-Diffusers/tree/4791a1100e0cf97f7ed5c55c12dd71dce13f9dd3", + "sourceRevision": "Lightricks/LTX-2.5-Diffusers@4791a1100e0cf97f7ed5c55c12dd71dce13f9dd3", + "sourceLicense": "Original synthetic media and project-authored Foley", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "Lightricks/LTX-2.5-Diffusers@4791a1100e0cf97f7ed5c55c12dd71dce13f9dd3: LTX-2.x Community License Agreement (https://github.com/Lightricks/LTX-2/blob/c1b4675863c07c59c92e502446cccdaedbe5889c/LICENSE-2_x)" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["flux_fill_inpaint"] + "requiredAttribution": ["AI-generated with Lightricks LTX-2.5 Full. Original edit and Foley by MoDiff."], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace owner", + "reviewedAt": "2026-11-18", + "reviewClass": "exact-file-owner-approved-supplementary-workflow-showcase", + "humanApprovalPacketSHA256": "102b403c456c00c578eaf9a7499f4ed338948792bb5aa4bbddc948b1f7cb4b8a" }, { - "path": "template-gallery/runtime-inputs/assets/b9909f4cbff8af6e97be6d1e4923c67687eee41dbd64b051a018866781da12ab.webp", - "sha256": "sha256:bytes:b9909f4cbff8af6e97be6d1e4923c67687eee41dbd64b051a018866781da12ab", + "path": "template-gallery/showcases/ltx25-monday-morning-brisk-crossing.v1.poster.png", + "sha256": "sha256:bytes:2032e9a113e8cf08d0bd4286f01c4a4f3ff722bb4b2d4125b0110d35075a9711", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainer, subject to the recorded model terms", + "creationMethod": "Unaltered frame selected from the approved AI-generated two-shot edit.", + "sourceUrl": "https://huggingface.co/Lightricks/LTX-2.5-Diffusers/tree/4791a1100e0cf97f7ed5c55c12dd71dce13f9dd3", + "sourceRevision": "Lightricks/LTX-2.5-Diffusers@4791a1100e0cf97f7ed5c55c12dd71dce13f9dd3", + "sourceLicense": "Original synthetic media and project-authored Foley", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "Lightricks/LTX-2.5-Diffusers@4791a1100e0cf97f7ed5c55c12dd71dce13f9dd3: LTX-2.x Community License Agreement (https://github.com/Lightricks/LTX-2/blob/c1b4675863c07c59c92e502446cccdaedbe5889c/LICENSE-2_x)" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["character_edit"] + "requiredAttribution": ["AI-generated with Lightricks LTX-2.5 Full. Original edit and Foley by MoDiff."], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace owner", + "reviewedAt": "2026-11-18", + "reviewClass": "exact-file-owner-approved-supplementary-workflow-showcase", + "humanApprovalPacketSHA256": "102b403c456c00c578eaf9a7499f4ed338948792bb5aa4bbddc948b1f7cb4b8a" }, { - "path": "template-gallery/runtime-inputs/assets/bf4dbaa55b83b19ca56c691e9d1a10d3b838ff2fec926aaea6b526561c68f8e6.png", - "sha256": "sha256:bytes:bf4dbaa55b83b19ca56c691e9d1a10d3b838ff2fec926aaea6b526561c68f8e6", + "path": "template-gallery/smollm2_rain_gauge.json", + "sha256": "sha256:bytes:c92d19b1c39c5157b09f19d654c871f7453a9c794c733265fd89b7cc9521ea43", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Maintainer-approved exact retained model output", + "sourceUrl": "https://huggingface.co/HuggingFaceTB/SmolLM2-135M-Instruct/tree/12fd25f77366fa6b3b4b768ec3050bf629380bac", + "sourceRevision": "HuggingFaceTB/SmolLM2-135M-Instruct@12fd25f77366fa6b3b4b768ec3050bf629380bac", + "sourceLicense": "Generated output subject to recorded model terms", + "modelTerms": [ + "HuggingFaceTB/SmolLM2-135M-Instruct@12fd25f77366fa6b3b4b768ec3050bf629380bac: Apache-2.0 publisher model declaration; https://huggingface.co/HuggingFaceTB/SmolLM2-135M-Instruct/tree/12fd25f77366fa6b3b4b768ec3050bf629380bac" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "HuggingFaceTB/SmolLM2-135M-Instruct@12fd25f77366fa6b3b4b768ec3050bf629380bac — https://huggingface.co/HuggingFaceTB/SmolLM2-135M-Instruct/tree/12fd25f77366fa6b3b4b768ec3050bf629380bac" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-19", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "e604b0284a57b65b20343c7776511ae15bef922c7e104c09f0f6931eec610d2d", + "publicationBasis": "Activate and publish the two approved Gallery candidates using their retained native runs.", + "provenanceTemplateId": "smollm2_rain_gauge" + }, + { + "path": "template-gallery/smolvlm_red_triangle.json", + "sha256": "sha256:bytes:ec3bb29dcf29943847d3c22f36369927a30eac1834541e25d8ae4ac7f7fd2fb3", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/HuggingFaceTB/SmolVLM-256M-Instruct/tree/7e3e67edbbed1bf9888184d9df282b700a323964", + "sourceRevision": "HuggingFaceTB/SmolVLM-256M-Instruct@7e3e67edbbed1bf9888184d9df282b700a323964", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "Publisher model terms at https://huggingface.co/HuggingFaceTB/SmolVLM-256M-Instruct/tree/7e3e67edbbed1bf9888184d9df282b700a323964" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["flux_fill_outpaint"] + "requiredAttribution": [ + "HuggingFaceTB/SmolVLM-256M-Instruct@7e3e67edbbed1bf9888184d9df282b700a323964 https://huggingface.co/HuggingFaceTB/SmolVLM-256M-Instruct/tree/7e3e67edbbed1bf9888184d9df282b700a323964" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "smolvlm_red_triangle" }, { - "path": "template-gallery/runtime-inputs/assets/c810699838c636767d2a5b25fb457df94a4b76a70da9a77e77009681779acbf2.webp", - "sha256": "sha256:bytes:c810699838c636767d2a5b25fb457df94a4b76a70da9a77e77009681779acbf2", + "path": "template-gallery/spandrel_tram_shelter_video_2x.mp4", + "sha256": "sha256:bytes:60fae4330a462a468fe68e62c692f22f713a9f908cf286942206260e8aa42fc0", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "Publisher model terms at https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["ltx_video_long_showcase"] + "requiredAttribution": [ + "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "spandrel_tram_shelter_video_2x" }, { - "path": "template-gallery/runtime-inputs/assets/d49908e24c58d144f4264f4028cb0f7f2e72fb02b315443fd021715ebed1e737.webp", - "sha256": "sha256:bytes:d49908e24c58d144f4264f4028cb0f7f2e72fb02b315443fd021715ebed1e737", + "path": "template-gallery/spandrel_x2_synthetic_gradient.webp", + "sha256": "sha256:bytes:5b1ea25aacbedb50055ac010b38da45dbb3dab5477be1b2b1d99781a299e8729", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact maintainer-approved retained technical upscale output", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceLicense": "Generated output subject to recorded model terms", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" ], "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 — https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" + ], "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["ltx_video_long_showcase"] + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-19", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ea2e749b805706828428bd34589bd41263e9c432a9503fe17c3c6a6d7d932176", + "publicationBasis": "Maintainer approved this exact saved Spandrel 2× technical preview and confirmed redistribution rights.", + "provenanceTemplateId": "spandrel_x2_synthetic_gradient" }, { - "path": "template-gallery/runtime-inputs/assets/d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24.png", - "sha256": "sha256:bytes:d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24", + "path": "template-gallery/stable_audio_glass_roof_rain.wav", + "sha256": "sha256:bytes:9fe09d48f7f229f04d2b34c2e193cf7346c68115bb618b84959478a3599a1e05", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-audio-open-1.0/tree/f21265c1e2710b3bd2386596943f0007f55f802e", + "sourceRevision": "stabilityai/stable-audio-open-1.0@f21265c1e2710b3bd2386596943f0007f55f802e", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "https://huggingface.co/stabilityai/stable-audio-open-1.0/blob/f21265c1e2710b3bd2386596943f0007f55f802e/LICENSE.md" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["flux2_klein_edit"] + "requiredAttribution": [ + "stabilityai/stable-audio-open-1.0@f21265c1e2710b3bd2386596943f0007f55f802e https://huggingface.co/stabilityai/stable-audio-open-1.0/tree/f21265c1e2710b3bd2386596943f0007f55f802e" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "a7a2ce4e3e9bdfddcd33a4f3c2a7df0b69c0e815eef0493a9f0a748acf1716b8", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "stable_audio_glass_roof_rain" }, { - "path": "template-gallery/runtime-inputs/assets/d86b921f1be36360b5b660b8a5b9d0e9165e888be8a06fe2d8f362e87de40429.mp4", - "sha256": "sha256:bytes:d86b921f1be36360b5b660b8a5b9d0e9165e888be8a06fe2d8f362e87de40429", + "path": "template-gallery/stable_video_lighthouse_headland.mp4", + "sha256": "sha256:bytes:e08e06f8a9f0a1d88e5d34c224636586cce7b91bb79c25e89d197484c740a88c", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/tree/043843887ccd51926e3efed36270444a838e7861", + "sourceRevision": "stabilityai/stable-video-diffusion-img2vid-xt-1-1@043843887ccd51926e3efed36270444a838e7861", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/blob/043843887ccd51926e3efed36270444a838e7861/LICENSE.md" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["wan_vace_video_color_grade"] + "requiredAttribution": [ + "stabilityai/stable-video-diffusion-img2vid-xt-1-1@043843887ccd51926e3efed36270444a838e7861 https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/tree/043843887ccd51926e3efed36270444a838e7861" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "a7a2ce4e3e9bdfddcd33a4f3c2a7df0b69c0e815eef0493a9f0a748acf1716b8", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "stable_video_lighthouse_headland" }, { - "path": "template-gallery/runtime-inputs/assets/d898e00f3be4b28e237f71acf8024ad3715a657e1fcf3aeaf57279468dff7a76.webp", - "sha256": "sha256:bytes:d898e00f3be4b28e237f71acf8024ad3715a657e1fcf3aeaf57279468dff7a76", + "path": "template-gallery/stable_video_lighthouse_headland.poster.png", + "sha256": "sha256:bytes:67955f6727290e49f37945a2a27eeaf25032d7cd5595112523f1e9289d462292", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/tree/043843887ccd51926e3efed36270444a838e7861", + "sourceRevision": "stabilityai/stable-video-diffusion-img2vid-xt-1-1@043843887ccd51926e3efed36270444a838e7861", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/blob/043843887ccd51926e3efed36270444a838e7861/LICENSE.md" ], - "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "aiGenerated": false, + "humanLikenessConsent": "not-applicable", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["qwen_outpaint_aspect_template"] + "requiredAttribution": [ + "stabilityai/stable-video-diffusion-img2vid-xt-1-1@043843887ccd51926e3efed36270444a838e7861 https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/tree/043843887ccd51926e3efed36270444a838e7861" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "a7a2ce4e3e9bdfddcd33a4f3c2a7df0b69c0e815eef0493a9f0a748acf1716b8", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "stable_video_lighthouse_headland" }, { - "path": "template-gallery/runtime-inputs/assets/ddaccd06100d51494e5aaaecedab7b27eaeeda5290d453498d3e1cb9460ad474.webp", - "sha256": "sha256:bytes:ddaccd06100d51494e5aaaecedab7b27eaeeda5290d453498d3e1cb9460ad474", + "path": "template-gallery/the_glasshouse_seed_tray.webp", + "sha256": "sha256:bytes:21fc2abc9656ec805dfa5836064beb5c53e920fd8d75a658b7cfefdcff83a35f", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b", + "sourceRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "CreativeML Open RAIL++-M. https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["ltx_video_long_showcase"] + "requiredAttribution": [ + "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/462165984030d82259a11f4367a4eed129e94a7b" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "35e15ee46e08574b15020847ccf826c5c6856165e43538d40f69820ea48ad25f", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped 21 saved cases with model terms retained.", + "provenanceTemplateId": "the_glasshouse_seed_tray" }, { - "path": "template-gallery/runtime-inputs/assets/e07d05a658d361b6d28af62bcccfaeba9254507467dae1c5839efd546fed96a7.wav", - "sha256": "sha256:bytes:e07d05a658d361b6d28af62bcccfaeba9254507467dae1c5839efd546fed96a7", + "path": "template-gallery/wan_21_t2v_13b_seed_vault.card-poster.png", + "sha256": "sha256:bytes:fd3dbd225c9cd6d1a07b0bcfd80724b60b235f4287423a234c0a56017cd1d3b2", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", @@ -7156,11 +31858,11 @@ "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["ace_step_audio_repaint", "ace_step_audio_variation"] + "provenanceTemplateId": "wan_21_t2v_13b_seed_vault" }, { - "path": "template-gallery/runtime-inputs/assets/e0ab22f77f5d966d7868f8950f79702dc6d156d0eaef3e06205097558d5c5bb2.webp", - "sha256": "sha256:bytes:e0ab22f77f5d966d7868f8950f79702dc6d156d0eaef3e06205097558d5c5bb2", + "path": "template-gallery/wan_22_i2v_seed_vault.card-poster.png", + "sha256": "sha256:bytes:d2a566526d5779d3002ac1f8364d88643e6f34c256c360b0a2217cced0c91602", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", @@ -7179,284 +31881,320 @@ "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["qwen_product_ad_composite"] + "provenanceTemplateId": "wan_22_i2v_seed_vault" }, { - "path": "template-gallery/runtime-inputs/assets/e0f19676addbba6fe954711c235878ef43495e8066b84ed70b5c240a8512b026.mp4", - "sha256": "sha256:bytes:e0f19676addbba6fe954711c235878ef43495e8066b84ed70b5c240a8512b026", + "path": "template-gallery/wan_22_ti2v_5b_seed_vault.card-poster.png", + "sha256": "sha256:bytes:58d411a5a1a4b4f827eb6b32a74d26af79b0c3556549958bb1faf8244a66e00f", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, + "sourceUrl": "https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", + "sourceRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0 | Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "ACE-Step/acestep-v15-xl-turbo-diffusers: MIT; https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", + "Wan-AI/Wan2.2-TI2V-5B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["wan_vace_grayscale_control"] + "provenanceTemplateId": "wan_22_ti2v_5b_seed_vault" }, { - "path": "template-gallery/runtime-inputs/assets/e14e0fb4bccace254e3430bbddd49728980e5445b988eff1ae8164f135d1cc8d.png", - "sha256": "sha256:bytes:e14e0fb4bccace254e3430bbddd49728980e5445b988eff1ae8164f135d1cc8d", + "path": "template-gallery/wan_22_ti2v_5b_seed_vault.card-preview.mp4", + "sha256": "sha256:bytes:f610ee34c08aa97e5b2a42e029c7e4acfe2e22f5a73431dcd9ce875ec4dd1145", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, + "sourceUrl": "https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", + "sourceRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0 | Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "ACE-Step/acestep-v15-xl-turbo-diffusers: MIT; https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", + "Wan-AI/Wan2.2-TI2V-5B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["qwen_inpaint_object_replace"] + "provenanceTemplateId": "wan_22_ti2v_5b_seed_vault" }, { - "path": "template-gallery/runtime-inputs/assets/e90e99e27cdd9b6ab7478a05199df2fdf7dce650d700ef2ceb55da7fb206b715.webp", - "sha256": "sha256:bytes:e90e99e27cdd9b6ab7478a05199df2fdf7dce650d700ef2ceb55da7fb206b715", + "path": "template-gallery/wan_22_ti2v_5b_seed_vault.mp4", + "sha256": "sha256:bytes:2056b7fb1da71b48ebad25a95d8ea7fb124ba7eb884df940520224f8f488da7b", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, + "sourceUrl": "https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", + "sourceRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0 | Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "ACE-Step/acestep-v15-xl-turbo-diffusers: MIT; https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", + "Wan-AI/Wan2.2-TI2V-5B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["qwen_edit_plus_single_image"] + "provenanceTemplateId": "wan_22_ti2v_5b_seed_vault" }, { - "path": "template-gallery/runtime-inputs/assets/f791a809c0df307cd7dafa8c54ae86bbe4c53d73afdacb2183ff8cdbeac994c2.webp", - "sha256": "sha256:bytes:f791a809c0df307cd7dafa8c54ae86bbe4c53d73afdacb2183ff8cdbeac994c2", + "path": "template-gallery/wan_22_ti2v_5b_seed_vault.poster.png", + "sha256": "sha256:bytes:5c9d7a7553921204ceca0ac74d5405d6ce81909e230e81e9edffaf0f2ffc50c6", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, + "sourceUrl": "https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", + "sourceRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0 | Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "ACE-Step/acestep-v15-xl-turbo-diffusers: MIT; https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", + "Wan-AI/Wan2.2-TI2V-5B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", + "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["qwen_product_relight"] + "provenanceTemplateId": "wan_22_ti2v_5b_seed_vault" }, { - "path": "template-gallery/runtime-inputs/assets/fc326ed56f9e5de83262a0a1bc4ce85f4b4b291d654a05efa4a32fc133f97a3f.webp", - "sha256": "sha256:bytes:fc326ed56f9e5de83262a0a1bc4ce85f4b4b291d654a05efa4a32fc133f97a3f", + "path": "template-gallery/wan_a14b_cloudbreak_over_the_ridges.mp4", + "sha256": "sha256:bytes:fb2da087759066d72082f0b3e9894204f9e8cc448153b43730c06522483c254f", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers/tree/5be7df9619b54f4e2667b2755bc6a756675b5cd7", + "sourceRevision": "Wan-AI/Wan2.2-T2V-A14B-Diffusers@5be7df9619b54f4e2667b2755bc6a756675b5cd7", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers/tree/5be7df9619b54f4e2667b2755bc6a756675b5cd7" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "consumingTemplateIds": ["flux2_klein_multi_reference"] + "requiredAttribution": [ + "Wan-AI/Wan2.2-T2V-A14B-Diffusers@5be7df9619b54f4e2667b2755bc6a756675b5cd7 https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers/tree/5be7df9619b54f4e2667b2755bc6a756675b5cd7" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_a14b_cloudbreak_over_the_ridges" }, { - "path": "template-gallery/runtime-inputs/default-input-bindings.json", - "sha256": "sha256:bytes:84f8c3bd524f5a1b72d4c2fc166d670f1435c506a845356a9a83b2916eb1359c", + "path": "template-gallery/wan_a14b_wind_across_pond.mp4", + "sha256": "sha256:bytes:5d6b75cd3c7925c53f4f4fb12adc62170594bb4c56275d38fb0278d2f803bb69", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers", - "creationMethod": "MoDiff-authored technical metadata or review record", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Apache-2.0", - "modelTerms": [], - "aiGenerated": false, - "humanLikenessConsent": "not-applicable", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers/tree/596658fd9ca6b7b71d5057529bbf319ecbc61d74", + "sourceRevision": "Wan-AI/Wan2.2-I2V-A14B-Diffusers@596658fd9ca6b7b71d5057529bbf319ecbc61d74", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers/tree/596658fd9ca6b7b71d5057529bbf319ecbc61d74" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-I2V-A14B-Diffusers@596658fd9ca6b7b71d5057529bbf319ecbc61d74 https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers/tree/596658fd9ca6b7b71d5057529bbf319ecbc61d74" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_a14b_wind_across_pond" }, { - "path": "template-gallery/wan_21_t2v_13b_seed_vault.card-poster.png", - "sha256": "sha256:bytes:fd3dbd225c9cd6d1a07b0bcfd80724b60b235f4287423a234c0a56017cd1d3b2", + "path": "template-gallery/wan_animate_glasshouse_keeper.mp4", + "sha256": "sha256:bytes:4d936509b7aa591221f0a7de3e15bc815b4d322d1bb9e78d894d767a48c55a19", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceRevision": "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_21_t2v_13b_seed_vault" + "requiredAttribution": [ + "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0 https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "01bd531cf1d88e5338a9c8dc4b831048b7660d92b628f61f3b28e75bb68b9a6c", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_animate_glasshouse_keeper" }, - { - "path": "template-gallery/wan_22_i2v_seed_vault.card-poster.png", - "sha256": "sha256:bytes:d2a566526d5779d3002ac1f8364d88643e6f34c256c360b0a2217cced0c91602", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + { + "path": "template-gallery/wan_animate_signal_through_the_rain.mp4", + "sha256": "sha256:bytes:a9e2a96cfba367aea3a8d5cdc9cc1cfbc60a288d50e056b82977d696a37b805b", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceRevision": "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], - "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_22_i2v_seed_vault" + "requiredAttribution": [ + "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0 https://huggingface.co/Wan-AI/Wan2.2-Animate-14B-Diffusers/tree/6f4df10861c758af86ac3c979aacc1bf5c03eff0" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "aeba59d388381d75a2935a470ac831faabbd1f0b0be51af0bca839e601c1d034", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_animate_signal_through_the_rain" }, { - "path": "template-gallery/wan_22_ti2v_5b_seed_vault.card-poster.png", - "sha256": "sha256:bytes:58d411a5a1a4b4f827eb6b32a74d26af79b0c3556549958bb1faf8244a66e00f", + "path": "template-gallery/wan_flf_blue_hour_at_the_tram_shelter.mp4", + "sha256": "sha256:bytes:a356ce3baa0be0556829715ccc72f1a9ccbe99625315cca04e3ee33a4e83f550", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", - "sourceRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0 | Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7", + "sourceRevision": "Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers@17c30769b1e0b5dcaa1799b117bf20a9c31f59d7", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "ACE-Step/acestep-v15-xl-turbo-diffusers: MIT; https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", - "Wan-AI/Wan2.2-TI2V-5B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635" + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers@17c30769b1e0b5dcaa1799b117bf20a9c31f59d7 https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers/tree/17c30769b1e0b5dcaa1799b117bf20a9c31f59d7" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_22_ti2v_5b_seed_vault" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ffeaa41a5c94b59135d2cdb15a5c7f79f073c15fd78792ce00a157398ab15d59", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_flf_blue_hour_at_the_tram_shelter" }, { - "path": "template-gallery/wan_22_ti2v_5b_seed_vault.card-preview.mp4", - "sha256": "sha256:bytes:f610ee34c08aa97e5b2a42e029c7e4acfe2e22f5a73431dcd9ce875ec4dd1145", + "path": "template-gallery/wan_ti2v_subway_musician.mp4", + "sha256": "sha256:bytes:287344e1179d07788f3e9714324d15fe98a025855dbbe8d1f5b600288952ce68", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", - "sourceRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0 | Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635", + "sourceRevision": "Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "ACE-Step/acestep-v15-xl-turbo-diffusers: MIT; https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", - "Wan-AI/Wan2.2-TI2V-5B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635" + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635 https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_22_ti2v_5b_seed_vault" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_ti2v_subway_musician" }, { - "path": "template-gallery/wan_22_ti2v_5b_seed_vault.mp4", - "sha256": "sha256:bytes:2056b7fb1da71b48ebad25a95d8ea7fb124ba7eb884df940520224f8f488da7b", + "path": "template-gallery/wan_vace_amber_glass_stabilized.mp4", + "sha256": "sha256:bytes:a90aff3b61c664b51073574cc6c12efa894f45b88226637b254c9d81a53aad87", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", - "sourceRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0 | Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceRevision": "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "ACE-Step/acestep-v15-xl-turbo-diffusers: MIT; https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", - "Wan-AI/Wan2.2-TI2V-5B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635" + "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1 https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_22_ti2v_5b_seed_vault" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "f90bf0978ad3ec5d295b6d9d5e339207e3586b52567987aa1930881dd1f46e4e", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_vace_amber_glass_stabilized" }, { - "path": "template-gallery/wan_22_ti2v_5b_seed_vault.poster.png", - "sha256": "sha256:bytes:5c9d7a7553921204ceca0ac74d5405d6ce81909e230e81e9edffaf0f2ffc50c6", + "path": "template-gallery/wan_vace_amber_rings_after_rain.mp4", + "sha256": "sha256:bytes:e89cb86ed3bd34040b7fc6c699f99e21c4dc827ac943258c7d9daad9d58b752c", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", - "sourceRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0 | Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceRevision": "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "ACE-Step/acestep-v15-xl-turbo-diffusers: MIT; https://huggingface.co/ACE-Step/acestep-v15-xl-turbo-diffusers/tree/200ba991ae448051e14b0183157e35c2d27c9fb0", - "Wan-AI/Wan2.2-TI2V-5B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers/tree/b8fff7315c768468a5333511427288870b2e9635" + "Publisher model terms at https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1 https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_22_ti2v_5b_seed_vault" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "de8db2f2fa14b59514ea146654439aea279cc6fad5be1dca8cf17e057abe9945", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "wan_vace_amber_rings_after_rain" }, { "path": "template-gallery/wan_vace_cinematic_text_to_video.card-poster.png", @@ -7483,75 +32221,81 @@ "provenanceTemplateId": "wan_vace_cinematic_text_to_video" }, { - "path": "template-gallery/wan_vace_cinematic_text_to_video.card-preview.mp4", - "sha256": "sha256:bytes:58c230e968510c26bc2ea6131e64791a057d31ee3e3bd0fe6d7a062b0545b356", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" ], "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", + "path": "template-gallery/wan_vace_cinematic_text_to_video.card-preview.mp4", + "sha256": "sha256:bytes:2293ea940f855c1defa2616d27da0aeb1362c429b1c0de1fc5a97d035c367620", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", "provenanceTemplateId": "wan_vace_cinematic_text_to_video" }, { - "path": "template-gallery/wan_vace_cinematic_text_to_video.mp4", - "sha256": "sha256:bytes:47a2f29152a5239d52d8625c8abe3b431d7ae6d834c0d6cd0c0b852071eec171", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" ], "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", + "path": "template-gallery/wan_vace_cinematic_text_to_video.mp4", + "sha256": "sha256:bytes:5db74e68b3321474b5abdf145bdda486ac3fe7d18735e6ef3a5bce318e89ed49", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", "provenanceTemplateId": "wan_vace_cinematic_text_to_video" }, { - "path": "template-gallery/wan_vace_cinematic_text_to_video.poster.png", - "sha256": "sha256:bytes:427b6012590b1f010c3b77ee72bd350e84a4fccc84c65a8b0c5607d115adac55", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" ], "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", + "path": "template-gallery/wan_vace_cinematic_text_to_video.poster.png", + "sha256": "sha256:bytes:34d6179828466121c5352e1b72e4e73d1b723be48f2d3e4a85c8acd0dd950cf5", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", "provenanceTemplateId": "wan_vace_cinematic_text_to_video" }, { @@ -7602,75 +32346,81 @@ "provenanceTemplateId": "wan_vace_grayscale_control" }, { - "path": "template-gallery/wan_vace_grayscale_control.card-preview.mp4", - "sha256": "sha256:bytes:1ca73ab55f51fbe4eb08d4de5a2fa0c1c9654cf77909f2626aab0414a35f5985", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "Wan-AI/Wan2.1-VACE-1.3B-diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" ], "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", + "path": "template-gallery/wan_vace_grayscale_control.card-preview.mp4", + "sha256": "sha256:bytes:9304d9a3047069720679a6035132b364bca408a6328b373a7386afa86bd9bf12", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", "provenanceTemplateId": "wan_vace_grayscale_control" }, { - "path": "template-gallery/wan_vace_grayscale_control.mp4", - "sha256": "sha256:bytes:4a011e34131e9c3bc9b05621184a520f6fb85c282031acd35e2988dda105ff62", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "Wan-AI/Wan2.1-VACE-1.3B-diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" ], "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", + "path": "template-gallery/wan_vace_grayscale_control.mp4", + "sha256": "sha256:bytes:de6511454dd028b570c4b4d11f99b55c6c2f037f3b0befa5867fb37f513183ad", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", "provenanceTemplateId": "wan_vace_grayscale_control" }, { - "path": "template-gallery/wan_vace_grayscale_control.poster.png", - "sha256": "sha256:bytes:81a77bbc5882c22ab8e76fce76d7a2084e57b938fff42e842e5e9894dbc3010d", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "Wan-AI/Wan2.1-VACE-1.3B-diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" ], "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", + "path": "template-gallery/wan_vace_grayscale_control.poster.png", + "sha256": "sha256:bytes:c4c0b351c43fd53d3656294a9fc15689394a06e2b70b81248da2254386fa1f04", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", "provenanceTemplateId": "wan_vace_grayscale_control" }, { @@ -7721,42 +32471,96 @@ "provenanceTemplateId": "wan_vace_outpaint_reframe" }, { + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceLicense": "Generated media; retained model and output terms apply", + "modelTerms": [ + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-VACE-1.3B-diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", "path": "template-gallery/wan_vace_outpaint_reframe.card-preview.mp4", - "sha256": "sha256:bytes:37c1f4b3a9787c6c6dac081ed3cabd2a42d2d0a9c2db10f1ac33a7a98e1ecea2", + "sha256": "sha256:bytes:d66c6566b92c98fd7dba24d9fbe34ada9dfd3e49ffc153d290b9b447b9e21232", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_outpaint_reframe" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "Wan-AI/Wan2.1-VACE-1.3B-diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" ], "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", + "path": "template-gallery/wan_vace_outpaint_reframe.mp4", + "sha256": "sha256:bytes:d2d642aecce780056363e8cef15fa9129e458689b89f82c2024d01180c32feea", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", "provenanceTemplateId": "wan_vace_outpaint_reframe" }, { - "path": "template-gallery/wan_vace_outpaint_reframe.mp4", - "sha256": "sha256:bytes:f899d1af73bd95da7f3babe30c03d834b93c68c3f939eac0b8fb98df094c4d98", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceLicense": "Generated media; retained model and output terms apply", + "modelTerms": [ + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-VACE-1.3B-diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/wan_vace_outpaint_reframe.poster.png", + "sha256": "sha256:bytes:3c6d7b078c9f7b90d10e5af4b935a92b520e3256df2f5d938e3c94a2f1d62789", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_outpaint_reframe" + }, + { + "path": "template-gallery/wan_vace_video_color_grade.card-poster.png", + "sha256": "sha256:bytes:b7ecb4e84b0284f59f37f9e20f814435fbd08619f6af85fffa0fd56d94a2b612", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "Wan-AI/Wan2.1-VACE-1.3B-diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", @@ -7766,35 +32570,89 @@ "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_outpaint_reframe" + "provenanceTemplateId": "wan_vace_video_color_grade" }, { - "path": "template-gallery/wan_vace_outpaint_reframe.poster.png", - "sha256": "sha256:bytes:df7f715aaadf49fa3df62ef0eb4238e19befadfee6910970ba8eab9e80128f01", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", + "sourceLicense": "Generated media; retained model and output terms apply", + "modelTerms": [ + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/wan_vace_video_color_grade.card-preview.mp4", + "sha256": "sha256:bytes:9d86c293d91ea1f693901bffbafb1bc60899b577a01431a59fa9c0633b64f07a", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_video_color_grade" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", + "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", + "sourceLicense": "Generated media; retained model and output terms apply", + "modelTerms": [ + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [], + "assetLicense": "Apache-2.0", + "path": "template-gallery/wan_vace_video_color_grade.mp4", + "sha256": "sha256:bytes:720aa30d4537298bc9ca454a146dc8ca44288c4e2f2233c34ce5756a03fd2656", + "publishDecision": "approved", + "holdReason": null, + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_video_color_grade" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "Wan-AI/Wan2.1-VACE-1.3B-diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers/tree/ec4d2cb062b548996b179d493fdd05340de702a1" + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" ], "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", + "path": "template-gallery/wan_vace_video_color_grade.poster.png", + "sha256": "sha256:bytes:4d459d51e3e60aeeace7688ccb7fad10f2cc9f3a9afb61ff59d3b505bf2c3cc5", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_outpaint_reframe" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_video_color_grade" }, { - "path": "template-gallery/wan_vace_video_color_grade.card-poster.png", - "sha256": "sha256:bytes:b7ecb4e84b0284f59f37f9e20f814435fbd08619f6af85fffa0fd56d94a2b612", + "path": "template-gallery/wan_vace_video_to_video.card-poster.png", + "sha256": "sha256:bytes:dc49d059f34c6823cb5c02b8dd09899f5f53f81947bbbce35afb1418e70f3b62", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", @@ -7814,116 +32672,117 @@ "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_video_color_grade" + "provenanceTemplateId": "wan_vace_video_to_video" }, { - "path": "template-gallery/wan_vace_video_color_grade.card-preview.mp4", - "sha256": "sha256:bytes:aaa8905d5b7e2b1c0cd8b7d7bf62d334db0ec6a8d2a943f73bc82f17026fa9bd", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" ], "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", + "path": "template-gallery/wan_vace_video_to_video.card-preview.mp4", + "sha256": "sha256:bytes:1770ee434817acf2ebb504499b2201622b8d5a7597d0104b21f53f34e7151cb9", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_video_color_grade" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_video_to_video" }, { - "path": "template-gallery/wan_vace_video_color_grade.mp4", - "sha256": "sha256:bytes:72a7538470942630455723c7ccd1725d29ed662276e05ef647f4304e16e44d63", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" ], "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", + "path": "template-gallery/wan_vace_video_to_video.mp4", + "sha256": "sha256:bytes:ccbbf1496a3bd3e73bdbd81f4ebe376829cf6ed2c5a89c748a8e07e4fe091cb1", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_video_color_grade" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_video_to_video" }, { - "path": "template-gallery/wan_vace_video_color_grade.poster.png", - "sha256": "sha256:bytes:5cb855c7951e6aa0e42b04e5583165f02e9fcc978cbcfe5c23b041d92f94f554", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" ], "aiGenerated": true, - "humanLikenessConsent": "synthetic", + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", + "path": "template-gallery/wan_vace_video_to_video.poster.png", + "sha256": "sha256:bytes:074df4975b809405acd262052f7481aad8d71adb3b1e670b68a337fea0d861a5", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_video_color_grade" + "reviewedAt": "2026-11-15", + "reviewClass": "per-file-maintainer-accepted-native-seven-registration", + "humanApprovalPacketSHA256": "95c7c2ed080c3d618db1701b066724660595337460c46df8305b50810783eaa3", + "publicationBasis": "these are approved, you can register them", + "provenanceTemplateId": "wan_vace_video_to_video" }, { - "path": "template-gallery/wan_vace_video_to_video.card-poster.png", - "sha256": "sha256:bytes:dc49d059f34c6823cb5c02b8dd09899f5f53f81947bbbce35afb1418e70f3b62", + "path": "template-gallery/wan_video_long_showcase.card-poster.png", + "sha256": "sha256:bytes:c3e65e089c4b2bf72269114ac5699701ffd71a6c10c8e3f6f2d13eb25e517dc9", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", + "sourceUrl": null, + "sourceRevision": null, "sourceLicense": "Original generation or recorded workflow input; see modelTerms", "modelTerms": [ - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" + "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], - "assetLicense": "Apache-2.0", + "assetLicense": "MoDiff-Gallery-Restricted-1.0", "reviewedBy": "SOURAV DAS", "reviewedAt": "2026-08-03", "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_video_to_video" + "provenanceTemplateId": "wan_video_long_showcase" }, { - "path": "template-gallery/wan_vace_video_to_video.card-preview.mp4", - "sha256": "sha256:bytes:7c0738aa477caae0852e7f4fad7fcfb36e9281dd1dbdc0ca091477876d38a074", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" ], "aiGenerated": true, @@ -7931,23 +32790,25 @@ "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", + "path": "template-gallery/wan_video_long_showcase.card-preview.mp4", + "sha256": "sha256:bytes:b22af0bdf2f24727378d08ce00bd3700091c3595d99c5a9774d3ea4a01d790ce", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_video_to_video" + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "wan_video_long_showcase" }, { - "path": "template-gallery/wan_vace_video_to_video.mp4", - "sha256": "sha256:bytes:99ccd9e6863e53c76f0a959b6b8953db3001cf3bf90b728d840b3d3a3e48e541", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" ], "aiGenerated": true, @@ -7955,23 +32816,25 @@ "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", + "path": "template-gallery/wan_video_long_showcase.mp4", + "sha256": "sha256:bytes:8c11448cdae831396c0ba01e3d180afa6b92c2abb0f386e3bcedc046029e2d1b", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_video_to_video" + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "wan_video_long_showcase" }, { - "path": "template-gallery/wan_vace_video_to_video.poster.png", - "sha256": "sha256:bytes:a893c3eab103355212373709510267ecfa831a2d0b46dfd9e8ca795e06503782", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "creatorOrRightsholder": "MoDiff project maintainers, subject to the approved synthetic source and recorded model terms", + "creationMethod": "Maintainer-accepted native local AI-generated output or deterministic poster/card derivative; original full media is unchanged", "sourceUrl": "https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "sourceRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceLicense": "Generated media; retained model and output terms apply", "modelTerms": [ - "nateraw/real-esrgan: BSD-3-Clause; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "nateraw/real-esrgan: BSD-3-Clause model terms; https://huggingface.co/nateraw/real-esrgan/tree/42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", "Wan-AI/Wan2.1-T2V-1.3B-Diffusers: Apache-2.0; https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers/tree/0fad780a534b6463e45facd96134c9f345acfa5b" ], "aiGenerated": true, @@ -7979,37 +32842,102 @@ "marks": [], "requiredAttribution": [], "assetLicense": "Apache-2.0", + "path": "template-gallery/wan_video_long_showcase.poster.png", + "sha256": "sha256:bytes:4e2e0c44ddca2e4669ac3ee3c67edea7e50d4f49c799ca2e99d35fa06a95c67d", + "publishDecision": "approved", + "holdReason": null, "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_vace_video_to_video" + "reviewedAt": "2026-11-13", + "reviewClass": "per-file-maintainer-accepted-native-six-registration", + "humanApprovalPacketSHA256": "03b66b4631afb15032d62a1705331b56f6b12c4882c23945175ec92cc45a506f", + "publicationBasis": "Register the six approved assets now while Moonflower runs on Linux. Use Windows in parallel wherever possible, and keep the longer workflows separate for AMD cloud.", + "provenanceTemplateId": "wan_video_long_showcase" }, { - "path": "template-gallery/wan_video_long_showcase.card-poster.png", - "sha256": "sha256:bytes:c3e65e089c4b2bf72269114ac5699701ffd71a6c10c8e3f6f2d13eb25e517dc9", + "path": "template-gallery/wav2vec2_station_announcement.json", + "sha256": "sha256:bytes:619cc94b2dda660e87ae3c2a684aa2c7e7cc56c6d9b6df86f488ab4eea690751", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", - "sourceUrl": null, - "sourceRevision": null, - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact retained Wav2Vec2 transcription of a project-authored synthetic station announcement", + "sourceUrl": "https://huggingface.co/facebook/wav2vec2-base-960h/tree/22aad52d435eb6dbaf354bdad9b0da84ce7d6156", + "sourceRevision": "facebook/wav2vec2-base-960h@22aad52d435eb6dbaf354bdad9b0da84ce7d6156", + "sourceLicense": "Project-authored synthetic content processed by the pinned Wav2Vec2 model (Apache-2.0 declaration)", "modelTerms": [ - "Independent Gallery media: exact generation model was not captured in checked provenance; human output-rights attestation required." + "facebook/wav2vec2-base-960h@22aad52d435eb6dbaf354bdad9b0da84ce7d6156 — pinned Hub card Apache-2.0 declaration. https://huggingface.co/facebook/wav2vec2-base-960h/tree/22aad52d435eb6dbaf354bdad9b0da84ce7d6156" + ], + "aiGenerated": true, + "humanLikenessConsent": "not-applicable", + "marks": [], + "requiredAttribution": [ + "Meta Wav2Vec2 Base 960h. https://huggingface.co/facebook/wav2vec2-base-960h/tree/22aad52d435eb6dbaf354bdad9b0da84ce7d6156" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-21", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "5a790d4a6c9f82b2e00140b8d1c62fc3721c0b66856e4e2e7f2440890772b0e0", + "publicationBasis": "Maintainer approved the exact Wav2Vec2 transcript, the disclosed limitations and the redacted review and technical records under Apache-2.0. The source WAV is private.", + "provenanceTemplateId": "wav2vec2_station_announcement" + }, + { + "path": "template-gallery/whisper_small_an_open_door.json", + "sha256": "sha256:bytes:6f8a84cafae41e8903b7b60d97701dbf24b8f41fab860913b419deea1a84e263", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/openai/whisper-small/tree/973afd24965f72e36ca33b3055d56a652f456b4d", + "sourceRevision": "openai/whisper-small@973afd24965f72e36ca33b3055d56a652f456b4d", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/openai/whisper-small/tree/973afd24965f72e36ca33b3055d56a652f456b4d" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "openai/whisper-small@973afd24965f72e36ca33b3055d56a652f456b4d https://huggingface.co/openai/whisper-small/tree/973afd24965f72e36ca33b3055d56a652f456b4d" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "d216f065bdc316366c6183592f657bcfbbd7cb05acd0e510c6b3877fe56bcec2", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped six saved cases with model terms retained.", + "provenanceTemplateId": "whisper_small_an_open_door" + }, + { + "path": "template-gallery/whisper_tiny_blue_cup_transcription.json", + "sha256": "sha256:bytes:19ad6ca1cda03c92aa6f86f590a69c052e8bded5c8340189a56c68193c2ed9ec", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "humanLikenessConsent": "not-applicable", + "marks": [], + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-20", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "ba369c5fff89e379be66714d3ecbf1a0e3a9555e2b5ffbc9cb54210d862ec30b", + "publicationBasis": "Maintainer approved the exact Whisper JSON and both exact LCM images, accepted the disclosed LCM changes, and authorized publication of the associated redacted Gallery records.", + "creationMethod": "Exact retained structured transcription of two project-authored synthetic sentences", + "sourceUrl": "https://huggingface.co/openai/whisper-tiny/blob/169d4a4341b33bc18d8881c4b69c2e104e1cc0af/README.md", + "sourceRevision": "openai/whisper-tiny@169d4a4341b33bc18d8881c4b69c2e104e1cc0af", + "sourceLicense": "Project-authored synthetic content processed by recorded model(s), subject to their applicable terms", + "modelTerms": [ + "openai/whisper-tiny@169d4a4341b33bc18d8881c4b69c2e104e1cc0af — pinned Hub card Apache-2.0 declaration. https://huggingface.co/openai/whisper-tiny/blob/169d4a4341b33bc18d8881c4b69c2e104e1cc0af/README.md", + "OpenAI upstream Whisper project identifies its code and model weights as MIT. https://github.com/openai/whisper#license" + ], + "aiGenerated": true, + "requiredAttribution": [ + "OpenAI Whisper Tiny. https://huggingface.co/openai/whisper-tiny/blob/169d4a4341b33bc18d8881c4b69c2e104e1cc0af/README.md" + ], "assetLicense": "MoDiff-Gallery-Restricted-1.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "wan_video_long_showcase" + "provenanceTemplateId": "whisper_tiny_blue_cup_transcription" }, { "path": "template-gallery/z_image_cinematic_contact_sheet.webp", - "sha256": "sha256:bytes:6224e9ee47765858f2ec0c33679140d020cf3ad6e4fa2fa4557ef50f811aef0e", + "sha256": "sha256:bytes:4c2bbf8e5c5fc23984d3cbb7cf716220d6a5a3a628510b0de9bae418b3447723", "publishDecision": "approved", "holdReason": null, "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", @@ -8026,8 +32954,8 @@ "requiredAttribution": [], "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-accepted-registration", "provenanceTemplateId": "z_image_cinematic_contact_sheet" }, { @@ -8055,15 +32983,11 @@ "provenanceTemplateId": "z_image_lora_style" }, { - "path": "template-gallery/z_image_lora_style.webp", - "sha256": "sha256:bytes:027a7fb3657066a6ccca2f0e56d1e74c6771f89e5396e2c7e38f6bbb683242c7", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "creatorOrRightsholder": "MoDiff project maintainers, subject to source/model terms", + "creationMethod": "AI-generated original text-to-image Gallery example", "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 | youknownothing/v1-realism-v1-adapter-ZIT-lora@fd6d52d1199ad47f73c18db58339ad01ef766fa7", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceLicense": "Original project generation; see pinned model and adapter terms", "modelTerms": [ "Tongyi-MAI/Z-Image-Turbo: Apache-2.0; https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", "youknownothing/v1-realism-v1-adapter-ZIT-lora: Apache-2.0; https://huggingface.co/youknownothing/v1-realism-v1-adapter-ZIT-lora/tree/fd6d52d1199ad47f73c18db58339ad01ef766fa7" @@ -8072,22 +32996,23 @@ "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], + "path": "template-gallery/z_image_lora_style.webp", + "sha256": "sha256:bytes:238b923245e35c674111d5e67e789971a2108323322375796c64bbde16082f2d", + "publishDecision": "approved", + "holdReason": null, "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-six-z-registration", + "humanApprovalPacketSHA256": "9b728a5f8535fc1ba3c03d2e2759d7ac795a586fafab51beb1509379ed388934", "provenanceTemplateId": "z_image_lora_style" }, { - "path": "template-gallery/z_image_poster.webp", - "sha256": "sha256:bytes:4ada0a09ff88ca792ee007269811f94fa09232ceb54fcfad82be0b86522f9aa4", - "publishDecision": "approved", - "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "creatorOrRightsholder": "MoDiff project maintainers, subject to source/model terms", + "creationMethod": "AI-generated original text-to-image Gallery example", "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceLicense": "Original project generation; see pinned model and adapter terms", "modelTerms": [ "Tongyi-MAI/Z-Image-Turbo: Apache-2.0; https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" ], @@ -8095,22 +33020,47 @@ "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], + "path": "template-gallery/z_image_poster.webp", + "sha256": "sha256:bytes:ec5e413831a8bca837f98159ca663e02bbc73276b50814d53066530f734e1ad4", + "publishDecision": "approved", + "holdReason": null, "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-six-z-registration", + "humanApprovalPacketSHA256": "9b728a5f8535fc1ba3c03d2e2759d7ac795a586fafab51beb1509379ed388934", "provenanceTemplateId": "z_image_poster" }, { + "creatorOrRightsholder": "MoDiff project maintainers, subject to source/model terms", + "creationMethod": "AI-generated original text-to-image Gallery example", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceLicense": "Original project generation; see pinned model and adapter terms", + "modelTerms": [ + "Tongyi-MAI/Z-Image-Turbo: Apache-2.0; https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": ["LumaPod project-authored concept name/wordmark approved in this packet"], + "requiredAttribution": [], "path": "template-gallery/z_image_product_mockup.webp", - "sha256": "sha256:bytes:951142f49008e9a26d799065766c1627f63b9f108d3fe7d284f56d1618f2ebb5", + "sha256": "sha256:bytes:0d9c80e29c95d62835f56c95d666ed6d8b47e6792005ab59aef1d1c9b6de84df", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "assetLicense": "Apache-2.0", + "reviewedBy": "SOURAV DAS", + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-six-z-registration", + "humanApprovalPacketSHA256": "9b728a5f8535fc1ba3c03d2e2759d7ac795a586fafab51beb1509379ed388934", + "provenanceTemplateId": "z_image_product_mockup" + }, + { + "creatorOrRightsholder": "MoDiff project maintainers, subject to source/model terms", + "creationMethod": "AI-generated original text-to-image Gallery example", "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceLicense": "Original project generation; see pinned model and adapter terms", "modelTerms": [ "Tongyi-MAI/Z-Image-Turbo: Apache-2.0; https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" ], @@ -8118,34 +33068,97 @@ "humanLikenessConsent": "synthetic", "marks": [], "requiredAttribution": [], + "path": "template-gallery/z_image_quick_concept.webp", + "sha256": "sha256:bytes:781fa343e70418155f5097a48c4a0a99293f84157a1dc951c3cad8aec120043c", + "publishDecision": "approved", + "holdReason": null, "assetLicense": "Apache-2.0", "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "z_image_product_mockup" + "reviewedAt": "2026-11-09", + "reviewClass": "per-file-human-approved-six-z-registration", + "humanApprovalPacketSHA256": "9b728a5f8535fc1ba3c03d2e2759d7ac795a586fafab51beb1509379ed388934", + "provenanceTemplateId": "z_image_quick_concept" }, { - "path": "template-gallery/z_image_quick_concept.webp", - "sha256": "sha256:bytes:800de87d2bb49e3fc068ebac0c81a21a5722541900aba83992ed51a6f6865b7f", + "path": "template-gallery/zimage_golden_amber_glass.webp", + "sha256": "sha256:bytes:b4894bf9bead0f509fa4e7ef27eccd341b3d855dfe74fe70be3117d184eef990", "publishDecision": "approved", "holdReason": null, - "creatorOrRightsholder": "MoDiff project maintainers, subject to the recorded source and model terms", - "creationMethod": "AI-generated Gallery media or deterministic derivative", + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", - "sourceLicense": "Original generation or recorded workflow input; see modelTerms", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", "modelTerms": [ - "Tongyi-MAI/Z-Image-Turbo: Apache-2.0; https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + "Publisher model terms at https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" ], "aiGenerated": true, "humanLikenessConsent": "synthetic", "marks": [], - "requiredAttribution": [], + "requiredAttribution": [ + "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], "assetLicense": "Apache-2.0", - "reviewedBy": "SOURAV DAS", - "reviewedAt": "2026-08-03", - "reviewClass": "standard-human-attestation", - "provenanceTemplateId": "z_image_quick_concept" + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "c2df9edb92f8ff905b6c9a138a285e67c621f3d2dfa3232f859aaf963b725aca", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "zimage_golden_amber_glass" + }, + { + "path": "template-gallery/zimage_rocky_glacial_shores.webp", + "sha256": "sha256:bytes:7a94fbad28ad8901a49b53de126a2bd9e34077ad7402efa15caeaa7b970a0cae", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "zimage_rocky_glacial_shores" + }, + { + "path": "template-gallery/zimage_seamless_cobalt_backdrop.webp", + "sha256": "sha256:bytes:8149300a89e8cc784540a3fa663e83ca708d68d250a57710266f8a1e126fd4b5", + "publishDecision": "approved", + "holdReason": null, + "creatorOrRightsholder": "MoDiff project maintainers, as confirmed by workspace maintainer", + "creationMethod": "Exact approved file captured from a saved MoDiff workflow", + "sourceUrl": "https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "sourceLicense": "Maintainer-authorized file with publisher terms retained", + "modelTerms": [ + "Publisher model terms at https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "aiGenerated": true, + "humanLikenessConsent": "synthetic", + "marks": [], + "requiredAttribution": [ + "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 https://huggingface.co/Tongyi-MAI/Z-Image-Turbo/tree/f332072aa78be7aecdf3ee76d5c247082da564a6" + ], + "assetLicense": "Apache-2.0", + "reviewedBy": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25", + "reviewClass": "per-file-maintainer-accepted-retained-registration", + "humanApprovalPacketSHA256": "60b01498a2df5f4e4622cdc2f9a43c83d187820780d2425a19718c13707db501", + "publicationBasis": "Maintainer approved the exact files and confirmed redistribution rights for the scoped saved cases with model terms retained.", + "provenanceTemplateId": "zimage_seamless_cobalt_backdrop" } ] } diff --git a/config/template-assets.v1.json b/config/template-assets.v1.json index 915118a2..3554c012 100644 --- a/config/template-assets.v1.json +++ b/config/template-assets.v1.json @@ -4,8 +4,8 @@ "assets": [ { "path": "template-gallery/ace_step_audio_continuation.wav", - "size": 2880044, - "sha256": "sha256:bytes:4348daf61934c9e27379efcdabe7891d2a258f2a11d346726f221e35ae954e83", + "size": 17280044, + "sha256": "sha256:bytes:b9bddd5ca2933c064a1dd0f58b7ab438882adb9d1b0aea1ab640999a0e81322f", "contentType": "audio/x-wav", "purposes": [ "runtime" @@ -25,7 +25,7 @@ { "path": "template-gallery/ace_step_audio_repaint.wav", "size": 5760044, - "sha256": "sha256:bytes:dffe1277ff9b72c952abfd6e2e869f6db595de834649db78bffbf6ae1ec42c44", + "sha256": "sha256:bytes:f3741a6a23c75a564e3f860fb0c308efc456a4b9e4c2f641b6246a0bce4aa41b", "contentType": "audio/x-wav", "purposes": [ "runtime" @@ -45,7 +45,7 @@ { "path": "template-gallery/ace_step_audio_variation.wav", "size": 5760044, - "sha256": "sha256:bytes:9cfcf80ef850634fa6f74c06609949b0f0a513e77d782409db8db48751bbe03a", + "sha256": "sha256:bytes:c74a4a00a39369cea14791f9590534d19402245646d842be34d0f7893ae4937b", "contentType": "audio/x-wav", "purposes": [ "runtime" @@ -95,8 +95,8 @@ }, { "path": "template-gallery/ace_step_lyric_music_video.card-preview.mp4", - "size": 443873, - "sha256": "sha256:bytes:840295a75bcaa7dec5a3ab33a997ceb7c58043543463c7a2ea26fb45c0a91b7e", + "size": 225876, + "sha256": "sha256:bytes:973958543be22907def60e7e4c68dcbea1e77b482e732149b8ff11e6d14ded7f", "contentType": "video/mp4", "purposes": [ "runtime" @@ -104,8 +104,8 @@ }, { "path": "template-gallery/ace_step_lyric_music_video.mp4", - "size": 221077208, - "sha256": "sha256:bytes:f2005a050e59405481db1f5a9b24f1b6de8912c92818112bfdc8cf3f8a50bbbb", + "size": 113352499, + "sha256": "sha256:bytes:59d40623926ebe0bcc5962a43d1885da6618a3ba95b4055e159cc743f9f81dc6", "contentType": "video/mp4", "purposes": [ "runtime" @@ -113,8 +113,8 @@ }, { "path": "template-gallery/ace_step_lyric_music_video.poster.png", - "size": 2368114, - "sha256": "sha256:bytes:edd5ca052421a6033a794a9b86028cf551279090cb78c63d510323343ba6b514", + "size": 1504675, + "sha256": "sha256:bytes:71c17ecd2a866566eb1a61684b0e6a3c17b36b46cb425f3dc07a00eec241424b", "contentType": "image/png", "purposes": [ "runtime" @@ -145,8 +145,8 @@ }, { "path": "template-gallery/ace_step_text_to_audio.wav", - "size": 5760044, - "sha256": "sha256:bytes:e07d05a658d361b6d28af62bcccfaeba9254507467dae1c5839efd546fed96a7", + "size": 14400044, + "sha256": "sha256:bytes:6b8fe846fb7b55fca9cfb47814f2e135a61cdcbbbc09dcb44a14a2889abcb801", "contentType": "audio/x-wav", "purposes": [ "runtime", @@ -154,20 +154,18 @@ ] }, { - "path": "template-gallery/character_edit.webp", - "size": 245424, - "sha256": "sha256:bytes:2f06039573ec8997f9a871577fcd27bbc302a61b40b8107291e61de4aacb3254", - "contentType": "image/webp", + "path": "template-gallery/allegro_basalt_shore_at_dawn.mp4", + "size": 1170894, + "sha256": "sha256:bytes:339a491d6a2cf77eca00db90989738b55f1d5641321ba0bd95f7ff4439ca15e1", + "contentType": "video/mp4", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/fast_lora.card-poster.webp", - "size": 211346, - "sha256": "sha256:bytes:071786ad9b3120c3d5981e70c4617cbc9c1ab946bd6aafc7a0e055df02fc27ae", + "path": "template-gallery/alpine_lake_in_oils.webp", + "size": 565124, + "sha256": "sha256:bytes:734b381cd8bb514a1a3aa4e057aa5675e3cd437381d7e081b7577267fb0222bf", "contentType": "image/webp", "purposes": [ "runtime" @@ -176,64 +174,72 @@ "height": 1024 }, { - "path": "template-gallery/fast_lora.webp", - "size": 141476, - "sha256": "sha256:bytes:1e25d905f57caa98f22475aa9f031beebf34c37df18c0362cb9fbdff07a7183c", - "contentType": "image/webp", + "path": "template-gallery/animatediff_candlelight_behind_amber_glass.mp4", + "size": 393798, + "sha256": "sha256:bytes:c309175cb9252e11bba17697d8fe18a6e9e27e61b76710ed8fa58b967cbf8539", + "contentType": "video/mp4", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/flux2_klein_edit.webp", - "size": 167360, - "sha256": "sha256:bytes:bf9acaad6fb3458f9688b71dfe7e7b5128570934a19801e6211b4a416c5da0ca", - "contentType": "image/webp", + "path": "template-gallery/animatediff_ivory_balloon_blue_mountains.mp4", + "size": 280090, + "sha256": "sha256:bytes:741ea097f00b994dc9b26b2bd7cb2095ddb87d9bd3a7d492bf147fd2bd7be99c", + "contentType": "video/mp4", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/flux2_klein_multi_reference.webp", - "size": 318536, - "sha256": "sha256:bytes:9806aac19e5e4d6de3d9d3b2e0e005b3b827197d23fd9cb9f7d1f8388bc568ac", - "contentType": "image/webp", + "path": "template-gallery/animatediff_pag_snowmelt_over_river_stones.mp4", + "size": 1062279, + "sha256": "sha256:bytes:89f219daf95b6017deaca023289cb1bb44d0e465195dae61b9bd0e64eabb9aef", + "contentType": "video/mp4", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/flux2_klein_text_to_image.webp", - "size": 324546, - "sha256": "sha256:bytes:a2e67ad72f797df5dae567e0b05f217483ab2eb6c525686b2767392f4326718a", - "contentType": "image/webp", + "path": "template-gallery/animatediff_red_tram_in_watercolor.mp4", + "size": 70088, + "sha256": "sha256:bytes:88ddfb68b18872e653bcc7c9c05299f7e84186e3d54ac6f31c33ea9390c1e3be", + "contentType": "video/mp4", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/flux_control_canny.webp", - "size": 191804, - "sha256": "sha256:bytes:a804cb1321c87b86298ebc4697af4d52628c29615ccda38bfa38eb2c7fc566c3", - "contentType": "image/webp", + "path": "template-gallery/animatediff_red_tram_through_snow.mp4", + "size": 110415, + "sha256": "sha256:bytes:3082836cafeb4561f57b53b62da63e83602ad4b61c7af02fe2fc75ff83375cb6", + "contentType": "video/mp4", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/flux_depth_control.webp", - "size": 551212, - "sha256": "sha256:bytes:0251b217bc148491321ae32f1298965127cd193edc348042e42deca3bb2aea9f", + "path": "template-gallery/animatelcm_sunlit_surf.mp4", + "size": 872096, + "sha256": "sha256:bytes:f3d865965b9a15d9688a1c1944e530bdcccff14e6c7792efe2069ef042f80926", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/audioldm2_wind_through_high_pines.wav", + "size": 320044, + "sha256": "sha256:bytes:6466efff6cc71c5f068df11ab58a1443dfe53ccf28e31c3ad2806590fe6190a6", + "contentType": "audio/x-wav", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/bookshop_at_blue_hour.webp", + "size": 569776, + "sha256": "sha256:bytes:ff045be510a0e88cbab69bbe8c3794dd26bd19036bdec26a63a5b6ea5a11bc66", "contentType": "image/webp", "purposes": [ "runtime" @@ -242,9 +248,9 @@ "height": 1024 }, { - "path": "template-gallery/flux_dev_expert_text_to_image.card-poster.webp", - "size": 408558, - "sha256": "sha256:bytes:13c815eb6d245685e543d000e499036aad973bea6c0d4fff01c670580db08206", + "path": "template-gallery/canal_lantern_in_warm_light.webp", + "size": 315492, + "sha256": "sha256:bytes:245deed3f2a8ac213c630ac7a8517c625c1eaa60971778d816a55220310ed8c3", "contentType": "image/webp", "purposes": [ "runtime" @@ -253,9 +259,9 @@ "height": 1024 }, { - "path": "template-gallery/flux_dev_expert_text_to_image.webp", - "size": 408558, - "sha256": "sha256:bytes:13c815eb6d245685e543d000e499036aad973bea6c0d4fff01c670580db08206", + "path": "template-gallery/character_edit.webp", + "size": 242746, + "sha256": "sha256:bytes:c7da13667186b8303eab34103e3e2394e590166cc14a0f5c2c769af8942f035d", "contentType": "image/webp", "purposes": [ "runtime" @@ -264,9 +270,9 @@ "height": 1024 }, { - "path": "template-gallery/flux_fill_inpaint.webp", - "size": 210382, - "sha256": "sha256:bytes:a0b1a20336f5a068497be656dbf86a9b48cac36777ddb317cce55191f2dc41a9", + "path": "template-gallery/chroma_alpine_block_print.webp", + "size": 374366, + "sha256": "sha256:bytes:c8c30a11f94c3100910bd565e04097ebc36fad1c412f7adaa8496092ef55a804", "contentType": "image/webp", "purposes": [ "runtime" @@ -275,20 +281,20 @@ "height": 1024 }, { - "path": "template-gallery/flux_fill_outpaint.webp", - "size": 344252, - "sha256": "sha256:bytes:465ba287ed383289877edbcbd3618da81f4971b9935b3161a44ca8d59a25df7b", + "path": "template-gallery/chroma_copper_medallion_outpaint.webp", + "size": 73742, + "sha256": "sha256:bytes:c81e3852d6455e213f25a3da135b7a66f65e1aec3477a1a21335606a3259775f", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1536, - "height": 1024 + "width": 1024, + "height": 768 }, { - "path": "template-gallery/flux_kontext_edit.webp", - "size": 248650, - "sha256": "sha256:bytes:dd459c5d656e4fd85d42513a615110842ee2784bd13becc94bc3fa9ecd743cd6", + "path": "template-gallery/chroma_restored_cobalt_backdrop.webp", + "size": 119420, + "sha256": "sha256:bytes:66e00fa95a61ab9d0f77bce099476dd8ffc569697fe59fb509e8c589402dad9b", "contentType": "image/webp", "purposes": [ "runtime" @@ -297,9 +303,9 @@ "height": 1024 }, { - "path": "template-gallery/flux_kontext_multi_reference.webp", - "size": 205582, - "sha256": "sha256:bytes:c20e1c377c9ac7c4ea657daea23c6e3a9c494535e8f9c2a438fa32402eea50c9", + "path": "template-gallery/chroma_terracotta_and_blue.webp", + "size": 520308, + "sha256": "sha256:bytes:e8dc514cf845631e498cbcb1ed841d25fe5e62ede712e2e216faba3ec9155df3", "contentType": "image/webp", "purposes": [ "runtime" @@ -308,43 +314,60 @@ "height": 1024 }, { - "path": "template-gallery/flux_krea_text_to_image.webp", - "size": 270072, - "sha256": "sha256:bytes:9f421cdc0fa80b3aae368bd3b20a8f6f05942ec461f88541f01aec5390468897", + "path": "template-gallery/cobalt_jug_and_lemons.webp", + "size": 116500, + "sha256": "sha256:bytes:a8f9d05f34a6bbf631bccbb3eadf1d18824a772f5f1e038248db7bfdc8c0dbba", "contentType": "image/webp", "purposes": [ - "runtime", - "tooling" + "runtime" ], - "width": 1024, - "height": 1024 + "width": 512, + "height": 512 }, { - "path": "template-gallery/flux_lora_cinematic_octane_3d.card-poster.webp", - "size": 193932, - "sha256": "sha256:bytes:76d5c8873a12ba7f11366bff658c8d3ed257c557a9ae681c84708b3f52f0f74e", + "path": "template-gallery/cogvideox_mossy_mountain_stream.mp4", + "size": 579374, + "sha256": "sha256:bytes:3b5e40ac2bf76236d1f901a7a2522addd7c4a1b2701bd89a33c1506b1523bc38", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/cogvideox_red_tram_model_railway.mp4", + "size": 105659, + "sha256": "sha256:bytes:483437ccec5394217346dcd88e3bc42a003cba69a6056b1153de4cb5868d7825", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/consistency_64_technical_preview.webp", + "size": 1670, + "sha256": "sha256:bytes:51a46954f6fbb16fa13807e9f376ab88a70fd39fc4d134101ebc560569d5a59a", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 768, - "height": 1024 + "width": 64, + "height": 64 }, { - "path": "template-gallery/flux_lora_film_noir.card-poster.webp", - "size": 188542, - "sha256": "sha256:bytes:a447504091a2b6bba4a220d950771f7812b2bdf950f3f07df28c73adc499487f", + "path": "template-gallery/copper_hour_dunes.webp", + "size": 135298, + "sha256": "sha256:bytes:45eabeca35fe5982441c80158faa69bca6da1d7f2efb3002a81a8b5c03ae4ef2", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 512, + "height": 512 }, { - "path": "template-gallery/flux_lora_film_noir.webp", - "size": 232496, - "sha256": "sha256:bytes:5ae8246396c0052258704b7ac405e7259986d0780ef7effcfd37fb4310368006", + "path": "template-gallery/cosmos3_super_text_to_image.webp", + "size": 228568, + "sha256": "sha256:bytes:90e6a18d8d085a653dd3f74168f93a30d99f8b0b7b74decb4f95f8a60bf4e7ad", "contentType": "image/webp", "purposes": [ "runtime" @@ -353,31 +376,31 @@ "height": 1024 }, { - "path": "template-gallery/flux_lora_ghibli_story.card-poster.webp", - "size": 188540, - "sha256": "sha256:bytes:f4d50d5340cf24a1a8cb24b3feb986a9fd9fb892f86604ecb442b8316430d8f7", + "path": "template-gallery/ddim_cifar10_preview.webp", + "size": 962, + "sha256": "sha256:bytes:8da37d75c632e43b7131bcb634f76a9e83857a88bf511785fa8f55c746f0f0a4", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 768 + "width": 32, + "height": 32 }, { - "path": "template-gallery/flux_lora_ghibli_story.webp", - "size": 363214, - "sha256": "sha256:bytes:cc07164563ac3cd3c38ea657ce96cd32e6cf9648bdb2cf2ef08af1d337b712b7", + "path": "template-gallery/ddpm_cifar32_technical_preview.webp", + "size": 954, + "sha256": "sha256:bytes:c5c8e86cdb7b5b694a8497742b80cbefc3d2563e08ae17be690b666dc6d7d533", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 768 + "width": 32, + "height": 32 }, { - "path": "template-gallery/flux_lora_oil_painting.card-poster.webp", - "size": 363766, - "sha256": "sha256:bytes:f34c7d8a787a16dbdea073fd9658571f6371d0d79887b0fc14b1637fe63b7e03", + "path": "template-gallery/fast_lora.card-poster.webp", + "size": 211346, + "sha256": "sha256:bytes:071786ad9b3120c3d5981e70c4617cbc9c1ab946bd6aafc7a0e055df02fc27ae", "contentType": "image/webp", "purposes": [ "runtime" @@ -386,9 +409,9 @@ "height": 1024 }, { - "path": "template-gallery/flux_lora_oil_painting.webp", - "size": 380032, - "sha256": "sha256:bytes:9f3f08e474c5bf3cf310ec16356df24867640bf9ac9d8ac8b628d7a281d2cbbf", + "path": "template-gallery/fast_lora.webp", + "size": 141440, + "sha256": "sha256:bytes:4dd22715673f988b2b8191cc7c2417b4c1c147f1572b16f76f947155bbaf8a3d", "contentType": "image/webp", "purposes": [ "runtime" @@ -397,9 +420,9 @@ "height": 1024 }, { - "path": "template-gallery/flux_lora_paper_cutout.card-poster.webp", - "size": 341582, - "sha256": "sha256:bytes:e0d9bc89d960b9831be5021c8ca8f49743b27772c99bf0054cce369899fbd1c1", + "path": "template-gallery/flowers_after_rain.webp", + "size": 253846, + "sha256": "sha256:bytes:ffebbed5e41a1aadbffe64573e522c4ef1b1131844503200f535d1198df1fe83", "contentType": "image/webp", "purposes": [ "runtime" @@ -408,9 +431,9 @@ "height": 1024 }, { - "path": "template-gallery/flux_lora_paper_cutout.webp", - "size": 421816, - "sha256": "sha256:bytes:ec1486ef19c6220ddbbfc31313cc13752c957e860aa2e9b2c11be52a4f64699e", + "path": "template-gallery/flux1_dev_limestone_studio_scratch_repair.webp", + "size": 119092, + "sha256": "sha256:bytes:b5fe5ad2e6acf82a7fb6cc2730cac9fb9c588a8e0263736e4a16dc2e77442f49", "contentType": "image/webp", "purposes": [ "runtime" @@ -419,9 +442,9 @@ "height": 1024 }, { - "path": "template-gallery/flux_lora_photoreal_documentary.card-poster.webp", - "size": 279462, - "sha256": "sha256:bytes:a5d8512a21313ef4b7efc902020516844c9c9203ca04a2a2a6fbc2ce90a4680e", + "path": "template-gallery/flux2_dev_text_to_image.webp", + "size": 297422, + "sha256": "sha256:bytes:6105156764537dd15a17c7fd2fbf73882a0c4991b1f7fb90700e9bbbf51de670", "contentType": "image/webp", "purposes": [ "runtime" @@ -430,9 +453,9 @@ "height": 1024 }, { - "path": "template-gallery/flux_lora_photoreal_documentary.webp", - "size": 258492, - "sha256": "sha256:bytes:fee9159c34ddcd3e2026610e5826f5a397f8e155e8a4047115bb85f5ce236510", + "path": "template-gallery/flux2_klein_edit.webp", + "size": 163900, + "sha256": "sha256:bytes:6677f582b1ebe83e894b7ac7e6264cc30ec4724990c1e3482bf5ec8b036993c0", "contentType": "image/webp", "purposes": [ "runtime" @@ -441,9 +464,9 @@ "height": 1024 }, { - "path": "template-gallery/flux_lora_retro_comic.card-poster.webp", - "size": 452056, - "sha256": "sha256:bytes:2135eac6e596b94192705700d7ad021b5eabc579b4075de4c821907fd0e00515", + "path": "template-gallery/flux2_klein_multi_reference.webp", + "size": 318418, + "sha256": "sha256:bytes:84e5166bd444404fb49ea1cdca69090a03e4de7ebe460c8e0afec89aae503252", "contentType": "image/webp", "purposes": [ "runtime" @@ -452,9 +475,9 @@ "height": 1024 }, { - "path": "template-gallery/flux_lora_retro_comic.webp", - "size": 684938, - "sha256": "sha256:bytes:b0a7fc4f480faa92d33f506b751cddfc4b7937ae82d258548efb547445353cef", + "path": "template-gallery/flux2_klein_text_to_image.webp", + "size": 306886, + "sha256": "sha256:bytes:ddc5451ddc7987cb86fcefe2ce0ed6a590089679790585a4b5a7ff425b74ba19", "contentType": "image/webp", "purposes": [ "runtime" @@ -463,21 +486,21 @@ "height": 1024 }, { - "path": "template-gallery/flux_lora_watercolor.card-poster.webp", - "size": 406974, - "sha256": "sha256:bytes:3861280c52dd017ea4996673cd3922f5e25351eccab2aa65b90960fd37a4d03d", + "path": "template-gallery/flux3_klein_base_fp8r512_lora_style.webp", + "size": 152854, + "sha256": "sha256:bytes:9f5bc117a70a66bfae603ab5add47f69bd73349b5268f2c7307462232ef2d5c6", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 512, + "height": 512 }, { - "path": "template-gallery/flux_lora_watercolor.webp", - "size": 382120, - "sha256": "sha256:bytes:55b05b1cee751203d37fa6166f82c9743e7a202f46bead8f19ed70e77cf5ce85", - "contentType": "image/webp", + "path": "template-gallery/flux3_klein_base_fp8r512_multi_reference_edit.png", + "size": 80336, + "sha256": "sha256:bytes:4508e12353cf287912629f28a94854b117902c16f7386512a5f09a00f13478d1", + "contentType": "image/png", "purposes": [ "runtime" ], @@ -485,55 +508,54 @@ "height": 1024 }, { - "path": "template-gallery/flux_redux_edit.webp", - "size": 270600, - "sha256": "sha256:bytes:56174da5ed300722ee96edfd0b80149d869081cee801e8dbac517734dc56e4bf", + "path": "template-gallery/flux3_klein_base_fp8r512_raw_coordinate_prompt.webp", + "size": 71556, + "sha256": "sha256:bytes:77da62eeb4da139921de0d654816eca643fee85dee2f6c16cbdb23aa3b1633f2", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 512, + "height": 512 }, { - "path": "template-gallery/flux_redux_multi_reference.webp", - "size": 293786, - "sha256": "sha256:bytes:ea050772cf672d0b115310b1feac79bd435c7538ffcbdb36b83f9e3b219f324a", + "path": "template-gallery/flux3_klein_base_fp8r512_single_reference_edit.webp", + "size": 44274, + "sha256": "sha256:bytes:12abeba15e8b99c5943daa322e0be94947350e0a2598b893a6419cf7cc21d7ef", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 512, + "height": 512 }, { - "path": "template-gallery/flux_schnell_text_to_image.webp", - "size": 468788, - "sha256": "sha256:bytes:fd58754609ae68c0378ce5c9bc66f4b35dfbf36f039177ffbd53d5d33347c236", + "path": "template-gallery/flux3_klein_base_fp8r512_text_to_image.webp", + "size": 71624, + "sha256": "sha256:bytes:7922c52fa07fee6cc38f0da95b22028996637def32a99aeacc414ce8a39e1fe7", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 512, + "height": 512 }, { - "path": "template-gallery/high_quality.webp", - "size": 296084, - "sha256": "sha256:bytes:862e292caa1759156fffde5cfccda8b97ec622514258f81986188cf63a836ea9", + "path": "template-gallery/flux3_klein_fp8r512_lora_style.webp", + "size": 95654, + "sha256": "sha256:bytes:59ddede1547b6e0e6958b0327a77c8e253cdd654e61aada584e1619aba7b8c54", "contentType": "image/webp", "purposes": [ - "runtime", - "tooling" + "runtime" ], - "width": 1024, - "height": 1024 + "width": 512, + "height": 512 }, { - "path": "template-gallery/inputs/character_edit.before.webp", - "size": 329508, - "sha256": "sha256:bytes:b9909f4cbff8af6e97be6d1e4923c67687eee41dbd64b051a018866781da12ab", - "contentType": "image/webp", + "path": "template-gallery/flux3_klein_fp8r512_multi_reference_edit.png", + "size": 79459, + "sha256": "sha256:bytes:12f2f2ae8ffcc053d61fb3c409d964f5f0d03b2668d73573c3795e3b5fbd620f", + "contentType": "image/png", "purposes": [ "runtime" ], @@ -541,10 +563,10 @@ "height": 1024 }, { - "path": "template-gallery/inputs/flux2_klein_edit.before.png", - "size": 266188, - "sha256": "sha256:bytes:d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24", - "contentType": "image/png", + "path": "template-gallery/flux3_klein_fp8r512_raw_coordinate_prompt.webp", + "size": 108576, + "sha256": "sha256:bytes:8544a653656be8cd47d87d7550558fa8487d1b72de56ee21adb27313dc34ba8f", + "contentType": "image/webp", "purposes": [ "runtime" ], @@ -552,43 +574,42 @@ "height": 512 }, { - "path": "template-gallery/inputs/flux2_klein_multi_reference.before.webp", - "size": 281216, - "sha256": "sha256:bytes:1d993540e914f0e2d230f1133b57ae14bb837829237a53c89613fcdef6699995", + "path": "template-gallery/flux3_klein_fp8r512_single_reference_edit.webp", + "size": 45456, + "sha256": "sha256:bytes:2694ee895e5f91c7c68d5b7966e872b08546d6792a3038707260d595eb48b6e6", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 512, + "height": 512 }, { - "path": "template-gallery/inputs/flux_control_canny.before.png", - "size": 22013, - "sha256": "sha256:bytes:3d03ee22a3d29068f30f18afcb31e86ea455fbfbe1ca5aa172cf633a26f21339", - "contentType": "image/png", + "path": "template-gallery/flux3_klein_fp8r512_text_to_image.webp", + "size": 94460, + "sha256": "sha256:bytes:88783643cab795b94b5bc01e6e28d459ff685278d95fb6bf54461094a6400c90", + "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1344, - "height": 768 + "width": 512, + "height": 512 }, { - "path": "template-gallery/inputs/flux_depth_control.before.png", - "size": 157468, - "sha256": "sha256:bytes:2e202069a584ee5ada91e2deaea6bf7b92a94f4816e669e695d7cb64d5a1cb0e", - "contentType": "image/png", + "path": "template-gallery/flux_canny_black_ink_cube.webp", + "size": 104436, + "sha256": "sha256:bytes:6e5d7e57733a301c94e9ec50075492aebb831b8f2686f3c96ab810592a5ff3b0", + "contentType": "image/webp", "purposes": [ - "runtime", - "tooling" + "runtime" ], "width": 1024, "height": 1024 }, { - "path": "template-gallery/inputs/flux_fill_inpaint.before.webp", - "size": 142192, - "sha256": "sha256:bytes:b7c221b367738177e32fece56067d743df96282a6ccb2afd040ee89ea0a8f678", + "path": "template-gallery/flux_canny_clean_backdrop.webp", + "size": 119146, + "sha256": "sha256:bytes:7261f62b7730f9bd0ceebf9beb3c768cf81640afaeb6285ba6f7f2cdb1406df2", "contentType": "image/webp", "purposes": [ "runtime" @@ -597,20 +618,20 @@ "height": 1024 }, { - "path": "template-gallery/inputs/flux_fill_outpaint.before.png", - "size": 1032894, - "sha256": "sha256:bytes:bf4dbaa55b83b19ca56c691e9d1a10d3b838ff2fec926aaea6b526561c68f8e6", - "contentType": "image/png", + "path": "template-gallery/flux_control_canny.webp", + "size": 191202, + "sha256": "sha256:bytes:13ed32399453783f830246f92653bc93ea31ff58170cf928c9f5bc523cdd85de", + "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1536, + "width": 1024, "height": 1024 }, { - "path": "template-gallery/inputs/flux_kontext_edit.before.webp", - "size": 196402, - "sha256": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", + "path": "template-gallery/flux_depth_control.webp", + "size": 548974, + "sha256": "sha256:bytes:c3d52c29b6a8cae80d2feffb8a978cded8b34509abd09216f665ab3af13f189e", "contentType": "image/webp", "purposes": [ "runtime" @@ -619,9 +640,9 @@ "height": 1024 }, { - "path": "template-gallery/inputs/flux_kontext_multi_reference.before.webp", - "size": 196402, - "sha256": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", + "path": "template-gallery/flux_depth_marine_bow_repair.webp", + "size": 535562, + "sha256": "sha256:bytes:05697db755f8deae61615744c651ee81af79c0dded87323841d01e980d87c9cf", "contentType": "image/webp", "purposes": [ "runtime" @@ -630,21 +651,20 @@ "height": 1024 }, { - "path": "template-gallery/inputs/flux_redux_edit.before.webp", - "size": 330492, - "sha256": "sha256:bytes:2e0ec8892660785e322468d0153fd2dadf7a4d920fce2d7d4a0b686a8fe8515d", + "path": "template-gallery/flux_depth_marine_teal_bow_edit.webp", + "size": 502632, + "sha256": "sha256:bytes:e169de0a8b997dbb30ba63f329360cd4ac730a9413f124fade3c0a2bd42bffe0", "contentType": "image/webp", "purposes": [ - "runtime", - "tooling" + "runtime" ], "width": 1024, "height": 1024 }, { - "path": "template-gallery/inputs/flux_redux_multi_reference.before.webp", - "size": 477366, - "sha256": "sha256:bytes:7f1ea58485fa7802765b9fbbf0e6957e8607261c91669fdcc44cbed80c6fb309", + "path": "template-gallery/flux_dev_expert_text_to_image.card-poster.webp", + "size": 408558, + "sha256": "sha256:bytes:13c815eb6d245685e543d000e499036aad973bea6c0d4fff01c670580db08206", "contentType": "image/webp", "purposes": [ "runtime" @@ -653,9 +673,9 @@ "height": 1024 }, { - "path": "template-gallery/inputs/ltx_boardwalk_tracking.end.webp", - "size": 62370, - "sha256": "sha256:bytes:52ea89c0cdec3142162156be07af12a06a14ad623b68c9700ccbc82bf889100d", + "path": "template-gallery/flux_dev_expert_text_to_image.webp", + "size": 294230, + "sha256": "sha256:bytes:b983944ddd54ef1833aad2930b82887f87490ecb4b7b080e31f5641d0af78143", "contentType": "image/webp", "purposes": [ "runtime" @@ -664,9 +684,9 @@ "height": 1024 }, { - "path": "template-gallery/inputs/ltx_boardwalk_tracking.start.webp", - "size": 440656, - "sha256": "sha256:bytes:73123a5bb6e8c1367eced6a7fbee6b0e5500ecbabf769ba9d9c18fd10623e36e", + "path": "template-gallery/flux_dev_forest_green_teapot.webp", + "size": 142004, + "sha256": "sha256:bytes:43d9a0136c684014d436b8f01142ac239e2833d76b3c071a41df747fa3656565", "contentType": "image/webp", "purposes": [ "runtime" @@ -675,65 +695,65 @@ "height": 1024 }, { - "path": "template-gallery/inputs/ltx_video_image_to_video.before.webp", - "size": 301384, - "sha256": "sha256:bytes:930364ab2667e492e51b8a60664751d66f5ed3f2d580664832977e89bcfbbf26", + "path": "template-gallery/flux_fill_inpaint.webp", + "size": 189448, + "sha256": "sha256:bytes:edad9352bd415cd468829ad139fc8d201d3e067d7a9d174d790f6dae4f09fc15", "contentType": "image/webp", "purposes": [ - "runtime", - "tooling" + "runtime" ], "width": 1024, "height": 1024 }, { - "path": "template-gallery/inputs/ltx_video_multi_reference.before.webp", - "size": 440656, - "sha256": "sha256:bytes:73123a5bb6e8c1367eced6a7fbee6b0e5500ecbabf769ba9d9c18fd10623e36e", + "path": "template-gallery/flux_fill_outpaint.webp", + "size": 344634, + "sha256": "sha256:bytes:5231750f57bed56cc705d53f19661884498a5bb2d981bed82e2c2b5da22d5074", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, + "width": 1536, "height": 1024 }, { - "path": "template-gallery/inputs/ltx_video_video_to_video.before.mp4", - "size": 257812, - "sha256": "sha256:bytes:496fde9e4410d1b1b0ea659fbf0b29d486537d56eefa43f61052a5c6d1808de8", - "contentType": "video/mp4", + "path": "template-gallery/flux_klein_alpine_lake_panorama.webp", + "size": 579614, + "sha256": "sha256:bytes:3f2435f483779b1b27d9dad2347c055dc8855373d90aad6442174be9d341d059", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1344, + "height": 768 }, { - "path": "template-gallery/inputs/qwen-carton-layout-control.png", - "size": 11137, - "sha256": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", - "contentType": "image/png", + "path": "template-gallery/flux_klein_open_glacial_lake.webp", + "size": 420904, + "sha256": "sha256:bytes:32041e979ea1b3c51030e7d64eb3edee675d5c4cdc7abb596817b4e0769ce65b", + "contentType": "image/webp", "purposes": [ - "tooling" + "runtime" ], "width": 1024, "height": 1024 }, { - "path": "template-gallery/inputs/qwen_character_angles.before.webp", - "size": 388454, - "sha256": "sha256:bytes:4b1b8d9e351abd437f2ffff90cc6a958160a87863ba4d8e85a0aa80a37e7a10e", + "path": "template-gallery/flux_kontext_bookshop_clear_glass.webp", + "size": 552568, + "sha256": "sha256:bytes:ec9c8cb45d16a96a87ce1cfba214dbbb14693125c9b16d3bc75d25a502e61788", "contentType": "image/webp", "purposes": [ - "runtime", - "tooling" + "runtime" ], "width": 1024, "height": 1024 }, { - "path": "template-gallery/inputs/qwen_control_image_layout.before.png", - "size": 11137, - "sha256": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", - "contentType": "image/png", + "path": "template-gallery/flux_kontext_edit.webp", + "size": 211874, + "sha256": "sha256:bytes:323f190a20a5e99841d11d8a4a9f5077a22726656ff27747341a453f70e04e8f", + "contentType": "image/webp", "purposes": [ "runtime" ], @@ -741,9 +761,9 @@ "height": 1024 }, { - "path": "template-gallery/inputs/qwen_edit_plus_single_image.before.webp", - "size": 32852, - "sha256": "sha256:bytes:e90e99e27cdd9b6ab7478a05199df2fdf7dce650d700ef2ceb55da7fb206b715", + "path": "template-gallery/flux_kontext_multi_reference.webp", + "size": 195986, + "sha256": "sha256:bytes:eec235576a904b885d651ec819f42e05cf78b2ce579ae3c0572c7899d339b8d4", "contentType": "image/webp", "purposes": [ "runtime" @@ -752,9 +772,9 @@ "height": 1024 }, { - "path": "template-gallery/inputs/qwen_edit_strength_sweep.before.webp", - "size": 262892, - "sha256": "sha256:bytes:a6d165bd87e2c57ab8cf71fa15de9d8724fccf5782c16c34c25dc77934751676", + "path": "template-gallery/flux_krea_text_to_image.webp", + "size": 256340, + "sha256": "sha256:bytes:95538f4be462f8f8faef04834e1171911162e73e1f1dc3a4fac8cf7e8e12064b", "contentType": "image/webp", "purposes": [ "runtime", @@ -764,31 +784,31 @@ "height": 1024 }, { - "path": "template-gallery/inputs/qwen_inpaint_mask_draft.before.webp", - "size": 331300, - "sha256": "sha256:bytes:a2f8ac6f5937d6e618b48ce9947153b8233ff7a82dcf67f28766d20b9917d730", + "path": "template-gallery/flux_lora_cinematic_octane_3d.card-poster.webp", + "size": 193932, + "sha256": "sha256:bytes:76d5c8873a12ba7f11366bff658c8d3ed257c557a9ae681c84708b3f52f0f74e", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, + "width": 768, "height": 1024 }, { - "path": "template-gallery/inputs/qwen_inpaint_object_replace.before.webp", - "size": 154818, - "sha256": "sha256:bytes:9f9f9685db5e9f8e1c162a0515151b03912c84777727b38682b65839db501ae6", + "path": "template-gallery/flux_lora_cinematic_octane_3d.webp", + "size": 139448, + "sha256": "sha256:bytes:93964b26fffcdbde39b2e9b23bedd10cdf3d13c2462914b553cefa431dcb899f", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, + "width": 768, "height": 1024 }, { - "path": "template-gallery/inputs/qwen_logo_texture.before.webp", - "size": 57604, - "sha256": "sha256:bytes:124415536a8071baccf8821232ad79a0a8ceec30ae62617c91a8d7a0b59d0a8c", + "path": "template-gallery/flux_lora_film_noir.card-poster.webp", + "size": 188542, + "sha256": "sha256:bytes:a447504091a2b6bba4a220d950771f7812b2bdf950f3f07df28c73adc499487f", "contentType": "image/webp", "purposes": [ "runtime" @@ -797,9 +817,9 @@ "height": 1024 }, { - "path": "template-gallery/inputs/qwen_multi_reference_product.before.webp", - "size": 145418, - "sha256": "sha256:bytes:47e56fd165fd2610f34e952191d74e061269b9703ae9fd7f571491f38ce4992c", + "path": "template-gallery/flux_lora_film_noir.webp", + "size": 86268, + "sha256": "sha256:bytes:4b512d8c233c626ae423f4a8a6735541fe0c458f421f74fd40b124f43b916c94", "contentType": "image/webp", "purposes": [ "runtime" @@ -808,32 +828,32 @@ "height": 1024 }, { - "path": "template-gallery/inputs/qwen_outpaint_aspect_template.before.webp", - "size": 433928, - "sha256": "sha256:bytes:d898e00f3be4b28e237f71acf8024ad3715a657e1fcf3aeaf57279468dff7a76", + "path": "template-gallery/flux_lora_ghibli_story.card-poster.webp", + "size": 188540, + "sha256": "sha256:bytes:f4d50d5340cf24a1a8cb24b3feb986a9fd9fb892f86604ecb442b8316430d8f7", "contentType": "image/webp", "purposes": [ "runtime" ], "width": 1024, - "height": 1024 + "height": 768 }, { - "path": "template-gallery/inputs/qwen_outpaint_draft.before.webp", - "size": 296084, - "sha256": "sha256:bytes:862e292caa1759156fffde5cfccda8b97ec622514258f81986188cf63a836ea9", + "path": "template-gallery/flux_lora_ghibli_story.webp", + "size": 363214, + "sha256": "sha256:bytes:cc07164563ac3cd3c38ea657ce96cd32e6cf9648bdb2cf2ef08af1d337b712b7", "contentType": "image/webp", "purposes": [ "runtime" ], "width": 1024, - "height": 1024 + "height": 768 }, { - "path": "template-gallery/inputs/qwen_packaging_dieline.before.png", - "size": 11137, - "sha256": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", - "contentType": "image/png", + "path": "template-gallery/flux_lora_oil_painting.card-poster.webp", + "size": 363766, + "sha256": "sha256:bytes:f34c7d8a787a16dbdea073fd9658571f6371d0d79887b0fc14b1637fe63b7e03", + "contentType": "image/webp", "purposes": [ "runtime" ], @@ -841,9 +861,9 @@ "height": 1024 }, { - "path": "template-gallery/inputs/qwen_product_ad_composite.before.webp", - "size": 196402, - "sha256": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", + "path": "template-gallery/flux_lora_oil_painting.webp", + "size": 171762, + "sha256": "sha256:bytes:eadd51446c248f077274e548c2676e7e6c5e6d3f0a26d988f26d17d74e162c4a", "contentType": "image/webp", "purposes": [ "runtime" @@ -852,9 +872,9 @@ "height": 1024 }, { - "path": "template-gallery/inputs/qwen_product_relight.before.webp", - "size": 215222, - "sha256": "sha256:bytes:f791a809c0df307cd7dafa8c54ae86bbe4c53d73afdacb2183ff8cdbeac994c2", + "path": "template-gallery/flux_lora_paper_cutout.card-poster.webp", + "size": 341582, + "sha256": "sha256:bytes:e0d9bc89d960b9831be5021c8ca8f49743b27772c99bf0054cce369899fbd1c1", "contentType": "image/webp", "purposes": [ "runtime" @@ -863,20 +883,20 @@ "height": 1024 }, { - "path": "template-gallery/inputs/qwen_tile_extract.before.webp", - "size": 223184, - "sha256": "sha256:bytes:6224e9ee47765858f2ec0c33679140d020cf3ad6e4fa2fa4557ef50f811aef0e", + "path": "template-gallery/flux_lora_paper_cutout.webp", + "size": 193160, + "sha256": "sha256:bytes:83f9fadbbc3c0015f223c651e1a5628472b4951836f96675c71f47a282a67baa", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1344, - "height": 768 + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/inputs/qwen_upscale_finish.before.webp", - "size": 298444, - "sha256": "sha256:bytes:d13a97a9003a7c53e5220010a56e402e4a987cfdfef0c53b7204295dcfa2fefb", + "path": "template-gallery/flux_lora_photoreal_documentary.card-poster.webp", + "size": 279462, + "sha256": "sha256:bytes:a5d8512a21313ef4b7efc902020516844c9c9203ca04a2a2a6fbc2ce90a4680e", "contentType": "image/webp", "purposes": [ "runtime" @@ -885,9 +905,9 @@ "height": 1024 }, { - "path": "template-gallery/inputs/reference_fusion.before.webp", - "size": 102088, - "sha256": "sha256:bytes:283b1cfb32b15fe6b31a29dce1f2b96026c1ad0826bf3f24aebebf4b6f9a4f07", + "path": "template-gallery/flux_lora_photoreal_documentary.webp", + "size": 135492, + "sha256": "sha256:bytes:9904d73d7c35e1844ab7a47a556c15805508d08f09391e1f88c1b76240482d1e", "contentType": "image/webp", "purposes": [ "runtime" @@ -896,45 +916,53 @@ "height": 1024 }, { - "path": "template-gallery/inputs/wan_vace_grayscale_control.before.mp4", - "size": 289576, - "sha256": "sha256:bytes:748b164fd91bc2eed97f7c1d1125a04496a056f29cc016d7cc0da3734c2303b7", - "contentType": "video/mp4", + "path": "template-gallery/flux_lora_retro_comic.card-poster.webp", + "size": 452056, + "sha256": "sha256:bytes:2135eac6e596b94192705700d7ad021b5eabc579b4075de4c821907fd0e00515", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/inputs/wan_vace_outpaint_reframe.before.mp4", - "size": 521627, - "sha256": "sha256:bytes:a8f28e04d03c9a6a2ba0b3ba4bf7db08f6ec99c45d962877cbc91aad5f3ad318", - "contentType": "video/mp4", + "path": "template-gallery/flux_lora_retro_comic.webp", + "size": 374028, + "sha256": "sha256:bytes:df7c0c2e750bc46913441a3b8d284ed7fca0563d0cce43faa0142c0db8d95809", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/inputs/wan_vace_video_color_grade.before.mp4", - "size": 351753, - "sha256": "sha256:bytes:934b4494442c732bfc27f3de1e1a8e99adf0eb96572bd6405f1a9c72da148289", - "contentType": "video/mp4", + "path": "template-gallery/flux_lora_watercolor.card-poster.webp", + "size": 406974, + "sha256": "sha256:bytes:3861280c52dd017ea4996673cd3922f5e25351eccab2aa65b90960fd37a4d03d", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/inputs/wan_vace_video_to_video.before.mp4", - "size": 1164611, - "sha256": "sha256:bytes:1f5cd051f787fc878bed50d3c26cce840abe00c942d32e49492e544ac2f88cff", - "contentType": "video/mp4", + "path": "template-gallery/flux_lora_watercolor.webp", + "size": 61852, + "sha256": "sha256:bytes:75e44686c2194ec8ec79db1cbdd90ac89d5d629509c4892d855caf59846ed876", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/low_vram.webp", - "size": 230440, - "sha256": "sha256:bytes:596a2bd9334ac38ebd9f56b3a897d11e1371a658504eca427fe09163b2b5e673", + "path": "template-gallery/flux_redux_edit.webp", + "size": 270200, + "sha256": "sha256:bytes:37dad69373b93c1a792156ccc44d185158dd0c62ca954d6c6f09cdb648947e82", "contentType": "image/webp", "purposes": [ "runtime" @@ -943,107 +971,110 @@ "height": 1024 }, { - "path": "template-gallery/ltx_video_animated_story.card-poster.png", - "size": 2259121, - "sha256": "sha256:bytes:fcd07a3c5a3e8df1890f1dd98f72746a67025a7bf3c4f6559026b24a8afa445c", - "contentType": "image/png", + "path": "template-gallery/flux_redux_multi_reference.webp", + "size": 245960, + "sha256": "sha256:bytes:c50df8d364a6065443d8f790a347ad7baf84e8bacf91a15245d28619a9f54bd9", + "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1672, - "height": 941 + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/ltx_video_animated_story.card-preview.mp4", - "size": 493622, - "sha256": "sha256:bytes:e73844b15d89acf4ee20fa7c9b3a374951016fabdd117f86cdf6c1b35b5c0d00", - "contentType": "video/mp4", + "path": "template-gallery/flux_schnell_text_to_image.webp", + "size": 471890, + "sha256": "sha256:bytes:a8d5a32a0eb8638bb9a4fdd4d4c7fbfc6dbdafb8462e4ea4eb45018d0f03b970", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/ltx_video_animated_story.mp4", - "size": 4548147, - "sha256": "sha256:bytes:974e2d08f28bb2613e6f4195dd016d0c9fc87e8a6d39f677b0afdcc6a00b0950", - "contentType": "video/mp4", + "path": "template-gallery/forest_ferns.webp", + "size": 295506, + "sha256": "sha256:bytes:714152e1bc5bbfba9201877fa572f7537204806c5b0ad24f71eda95b09f89f26", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/ltx_video_animated_story.poster.png", - "size": 2139783, - "sha256": "sha256:bytes:fb7d322ad8d64ea7b34acf5ac99822dfb089b160dce07857409a305d984cb662", - "contentType": "image/png", + "path": "template-gallery/glasshouse_rain.webp", + "size": 555700, + "sha256": "sha256:bytes:56968828743bb61caae1be50d0fe07499cea57eade5d9e6586749cd9da99003b", + "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1536, + "width": 1024, "height": 1024 }, { - "path": "template-gallery/ltx_video_image_to_video.card-preview.mp4", - "size": 942563, - "sha256": "sha256:bytes:e1065266a98cf1d2ef4679607aafaa9ba56e1f3eab98f1aa726a2ef0a3f85457", - "contentType": "video/mp4", + "path": "template-gallery/high_quality.webp", + "size": 294374, + "sha256": "sha256:bytes:1caa2635e1c168e2d0e06145f7b9c30b92bfc012ffcd7815688ce2444a20c123", + "contentType": "image/webp", "purposes": [ - "runtime" - ] + "runtime", + "tooling" + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/ltx_video_image_to_video.mp4", - "size": 4340159, - "sha256": "sha256:bytes:ae231645ef33dcde428ee04087d4408c56596bcc9ba0b1082fa4b45b56b5ea4d", - "contentType": "video/mp4", + "path": "template-gallery/history/ace_step_audio_variation.v1/ace_step_audio_variation.quality-review.json", + "size": 3106, + "sha256": "sha256:bytes:b20bf6bd7042d9214f72db5125ff6e0ef3a686ed2ee15143739efe2e50051bb9", + "contentType": "application/json", "purposes": [ "runtime" ] }, { - "path": "template-gallery/ltx_video_image_to_video.poster.png", - "size": 1530457, - "sha256": "sha256:bytes:f1b007220fbecc2ea40814d88ebab427f81a53a50ada4b109a39fd220f325fbe", - "contentType": "image/png", + "path": "template-gallery/history/ace_step_audio_variation.v1/ace_step_audio_variation.reviewed-provenance.json", + "size": 44904, + "sha256": "sha256:bytes:f31768feb3e080c0e83ed8a0a982399fa64a38258620ba43214cc7514251948d", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1536, - "height": 1024 + ] }, { - "path": "template-gallery/ltx_video_long_showcase.card-poster.png", - "size": 2687100, - "sha256": "sha256:bytes:a0b0f93ebf1558f7a8b7c96bb2024bdb55909a54c1362d9d1027ccc24614bdd5", - "contentType": "image/png", + "path": "template-gallery/history/ace_step_audio_variation.v1/ace_step_audio_variation.wav", + "size": 5760044, + "sha256": "sha256:bytes:9cfcf80ef850634fa6f74c06609949b0f0a513e77d782409db8db48751bbe03a", + "contentType": "audio/x-wav", "purposes": [ "runtime" - ], - "width": 1672, - "height": 941 + ] }, { - "path": "template-gallery/ltx_video_long_showcase.card-preview.mp4", - "size": 452347, - "sha256": "sha256:bytes:c3868d87687b20cbe2df2187da05c0eb6ce7feeb3150b395ad29ed26b178e07d", + "path": "template-gallery/history/ace_step_lyric_music_video.before-accepted-20261115/ace_step_lyric_music_video.card-preview.mp4", + "size": 443873, + "sha256": "sha256:bytes:840295a75bcaa7dec5a3ab33a997ceb7c58043543463c7a2ea26fb45c0a91b7e", "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/ltx_video_long_showcase.mp4", - "size": 24799133, - "sha256": "sha256:bytes:e4adfedfc81f21dae0d5a415698a17aabcbadf2ccc8f63550a1e24539b00997a", + "path": "template-gallery/history/ace_step_lyric_music_video.before-accepted-20261115/ace_step_lyric_music_video.mp4", + "size": 221077208, + "sha256": "sha256:bytes:f2005a050e59405481db1f5a9b24f1b6de8912c92818112bfdc8cf3f8a50bbbb", "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/ltx_video_long_showcase.poster.png", - "size": 1611293, - "sha256": "sha256:bytes:a82c4ec15dea4ab6cc2fc5cc85cfa4e4f21abac8b230920fa7964b01acba965c", + "path": "template-gallery/history/ace_step_lyric_music_video.before-accepted-20261115/ace_step_lyric_music_video.poster.png", + "size": 2368114, + "sha256": "sha256:bytes:edd5ca052421a6033a794a9b86028cf551279090cb78c63d510323343ba6b514", "contentType": "image/png", "purposes": [ "runtime" @@ -1052,118 +1083,152 @@ "height": 1024 }, { - "path": "template-gallery/ltx_video_multi_reference.card-poster.png", - "size": 2987012, - "sha256": "sha256:bytes:95a7196b97f24cc113918a0d989a5b88ed4b29cb551a799c00a83f9b91acf8af", - "contentType": "image/png", + "path": "template-gallery/history/ace_step_lyric_music_video.before-accepted-20261115/entry-and-recipe.json", + "size": 4192, + "sha256": "sha256:bytes:01b07f17aede8913c646cd4e4d84d8e25455cab8f8632a3d07e7b1537d2d4b51", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1672, - "height": 941 + ] }, { - "path": "template-gallery/ltx_video_multi_reference.card-preview.mp4", - "size": 583149, - "sha256": "sha256:bytes:92ed6de4481e1b240dd74f510d6431eef70eb0c5cfcca6c420d73c6e22e5c3c9", - "contentType": "video/mp4", + "path": "template-gallery/history/ace_step_lyric_music_video.before-accepted-20261115/reviews/ace_step_lyric_music_video.quality-review.json", + "size": 8439, + "sha256": "sha256:bytes:4f51cfb385ed654b88b0cecb6b064b4a7c50d884a575b9d89c2224cf0916032d", + "contentType": "application/json", "purposes": [ "runtime" ] }, { - "path": "template-gallery/ltx_video_multi_reference.mp4", - "size": 1981325, - "sha256": "sha256:bytes:1abc0dc5217b912ca5c9febefa0c1ce9e221b513370fcb3106b4afbece3a1ced", - "contentType": "video/mp4", + "path": "template-gallery/history/ace_step_lyric_music_video.before-accepted-20261115/reviews/ace_step_lyric_music_video.reviewed-provenance.json", + "size": 93784, + "sha256": "sha256:bytes:ff73d620c0d459d7cd4e7e69e237ac9d805d579ad75813dedab3445f60326d65", + "contentType": "application/json", "purposes": [ "runtime" ] }, { - "path": "template-gallery/ltx_video_multi_reference.poster.png", - "size": 1853850, - "sha256": "sha256:bytes:6260afa6e9efda984a7a75e4420b3d7f7583a6cccdd532b964ca6213b4eb185c", - "contentType": "image/png", + "path": "template-gallery/history/flux_redux_edit.v1/flux_redux_edit.before.webp", + "size": 330492, + "sha256": "sha256:bytes:2e0ec8892660785e322468d0153fd2dadf7a4d920fce2d7d4a0b686a8fe8515d", + "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1536, + "width": 1024, "height": 1024 }, { - "path": "template-gallery/ltx_video_text_to_video.card-poster.png", - "size": 2308944, - "sha256": "sha256:bytes:e131e2f676e04382117e77deeede145851fff469819d173073354cc5033b116d", - "contentType": "image/png", + "path": "template-gallery/history/flux_redux_edit.v1/flux_redux_edit.quality-review.json", + "size": 4321, + "sha256": "sha256:bytes:ecd1f9a9365ddf28ae4c200e4c040d3f2f48c0429d380f35f099f85530dc617b", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1672, - "height": 941 + ] }, { - "path": "template-gallery/ltx_video_text_to_video.card-preview.mp4", - "size": 875572, - "sha256": "sha256:bytes:89be8cfd064fd3c81ab2310ed05d7d8660a875f78c132a7b8d01100d547a5ea7", - "contentType": "video/mp4", + "path": "template-gallery/history/flux_redux_edit.v1/flux_redux_edit.reviewed-provenance.json", + "size": 42445, + "sha256": "sha256:bytes:73c4395d30e0db765215ff48dd521c269c6b58d1e3fdc42e030ca230f51a2477", + "contentType": "application/json", "purposes": [ "runtime" ] }, { - "path": "template-gallery/ltx_video_text_to_video.mp4", - "size": 2917726, - "sha256": "sha256:bytes:ba1659c0c3c1a5864dfcd6c01f471a731b84cc9523aaa9e4009863ee61714f44", - "contentType": "video/mp4", + "path": "template-gallery/history/flux_redux_edit.v1/flux_redux_edit.webp", + "size": 270600, + "sha256": "sha256:bytes:56174da5ed300722ee96edfd0b80149d869081cee801e8dbac517734dc56e4bf", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/history/flux_redux_multi_reference.before-accepted-20261115/entry-and-recipe.json", + "size": 3633, + "sha256": "sha256:bytes:ebb4bfa92cf95667679aae9289f34bbb31d41d8a00aab6b480ae5a1f4e6dcbaf", + "contentType": "application/json", "purposes": [ "runtime" ] }, { - "path": "template-gallery/ltx_video_text_to_video.poster.png", - "size": 2016741, - "sha256": "sha256:bytes:85f93dcd6f8e051abb28509284c154585dbc133ce0bc7ed0acd57dbe68781884", - "contentType": "image/png", + "path": "template-gallery/history/flux_redux_multi_reference.before-accepted-20261115/flux_redux_multi_reference.webp", + "size": 293786, + "sha256": "sha256:bytes:ea050772cf672d0b115310b1feac79bd435c7538ffcbdb36b83f9e3b219f324a", + "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1536, + "width": 1024, "height": 1024 }, { - "path": "template-gallery/ltx_video_video_to_video.card-poster.png", - "size": 2728925, - "sha256": "sha256:bytes:e5a259b5ab8a0b21b31cb8ba23ae7c0d45a7c9de193e76c1b2608c5709d0fe8c", - "contentType": "image/png", + "path": "template-gallery/history/flux_redux_multi_reference.before-accepted-20261115/inputs/flux_redux_multi_reference.before.webp", + "size": 477366, + "sha256": "sha256:bytes:7f1ea58485fa7802765b9fbbf0e6957e8607261c91669fdcc44cbed80c6fb309", + "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1672, - "height": 941 + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/ltx_video_video_to_video.card-preview.mp4", - "size": 116837, - "sha256": "sha256:bytes:2b50fa4dbb61316914b39c6ac0990e2f8b069186f7f4012ea5b5342b000b6ce3", + "path": "template-gallery/history/flux_redux_multi_reference.before-accepted-20261115/reviews/flux_redux_multi_reference.quality-review.json", + "size": 4379, + "sha256": "sha256:bytes:6d1a2b1cd59643e756167a31b4b7fb96242f3775317f05c9139883468cff5c93", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/history/flux_redux_multi_reference.before-accepted-20261115/reviews/flux_redux_multi_reference.reviewed-provenance.json", + "size": 53054, + "sha256": "sha256:bytes:0e30224ab60a14f2d040e4104454f3cf1867ebf3fb152e7554ee295b9cc69914", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/history/ltx_video_animated_story.before-native-20261115/entry-and-recipe.json", + "size": 7881, + "sha256": "sha256:bytes:3d95c081047dce79ac3cd52a24fbbafbe2a00170d99606999f5fb5d8b8859eab", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/history/ltx_video_animated_story.before-native-20261115/ltx_video_animated_story.card-preview.mp4", + "size": 493622, + "sha256": "sha256:bytes:e73844b15d89acf4ee20fa7c9b3a374951016fabdd117f86cdf6c1b35b5c0d00", "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/ltx_video_video_to_video.mp4", - "size": 498170, - "sha256": "sha256:bytes:b6ab8245f0546512215b6eb271d2ef51bd34fa6ac6e22c126c8f359e0be28fdc", + "path": "template-gallery/history/ltx_video_animated_story.before-native-20261115/ltx_video_animated_story.mp4", + "size": 4548147, + "sha256": "sha256:bytes:974e2d08f28bb2613e6f4195dd016d0c9fc87e8a6d39f677b0afdcc6a00b0950", "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/ltx_video_video_to_video.poster.png", - "size": 368903, - "sha256": "sha256:bytes:26d96f8085457388b724d4fc962cdbae3acc2b49be1aecf47b3a0efebac9abba", + "path": "template-gallery/history/ltx_video_animated_story.before-native-20261115/ltx_video_animated_story.poster.png", + "size": 2139783, + "sha256": "sha256:bytes:fb7d322ad8d64ea7b34acf5ac99822dfb089b160dce07857409a305d984cb662", "contentType": "image/png", "purposes": [ "runtime" @@ -1172,1542 +1237,10260 @@ "height": 1024 }, { - "path": "template-gallery/manifest.json", - "size": 180959, - "sha256": "sha256:bytes:bcc48de0f85d8a815364b3abfbaf2379b88686ba7e34b4c5d0a568efdf5dbbc4", + "path": "template-gallery/history/ltx_video_animated_story.before-native-20261115/reviews/ltx_video_animated_story.quality-review.json", + "size": 5696, + "sha256": "sha256:bytes:7520a8a1a714f7ed2943abd482189e83593bfa2a85afe48701c65505986d036b", "contentType": "application/json", "purposes": [ "runtime" ] }, { - "path": "template-gallery/qwen_character_angles.webp", - "size": 203184, - "sha256": "sha256:bytes:8dfcb7d31adbab7528a702df93eb70cb92491f822145af38ba8cdd1262195e58", - "contentType": "image/webp", + "path": "template-gallery/history/ltx_video_animated_story.before-native-20261115/reviews/ltx_video_animated_story.reviewed-provenance.json", + "size": 62383, + "sha256": "sha256:bytes:42d1d53a66c603446963ff929f1493eea420dca97c45f225bd7d100ab64d6982", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/qwen_control_image_layout.webp", - "size": 103296, - "sha256": "sha256:bytes:f4ec212d15e923c3f82e9c3d09d9491a3da411f87e95751619fb06cd75809c9b", - "contentType": "image/webp", + "path": "template-gallery/history/ltx_video_long_showcase.before-native-20261115/entry-and-recipe.json", + "size": 10071, + "sha256": "sha256:bytes:d916bb54031b193737e834f3629f02dfdbb613e33424aaceed862ea2193761c9", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 768, - "height": 768 + ] }, { - "path": "template-gallery/qwen_edit_plus_single_image.webp", - "size": 163116, - "sha256": "sha256:bytes:3156bbe36229159f789855cd951d8a224b6485752e50104822a696870a13bc46", - "contentType": "image/webp", + "path": "template-gallery/history/ltx_video_long_showcase.before-native-20261115/ltx_video_long_showcase.card-preview.mp4", + "size": 452347, + "sha256": "sha256:bytes:c3868d87687b20cbe2df2187da05c0eb6ce7feeb3150b395ad29ed26b178e07d", + "contentType": "video/mp4", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/qwen_edit_strength_sweep.webp", - "size": 211152, - "sha256": "sha256:bytes:0f785808b47a1d08dc63928a6730eb49825e2655271f8e8f2717c8f6db337a69", - "contentType": "image/webp", + "path": "template-gallery/history/ltx_video_long_showcase.before-native-20261115/ltx_video_long_showcase.mp4", + "size": 24799133, + "sha256": "sha256:bytes:e4adfedfc81f21dae0d5a415698a17aabcbadf2ccc8f63550a1e24539b00997a", + "contentType": "video/mp4", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/qwen_inpaint_mask_draft.webp", - "size": 324782, - "sha256": "sha256:bytes:b9cfc1e839e7604789fd0598b4f1810796c92b3c17fb106b411901078cf0fb2c", - "contentType": "image/webp", + "path": "template-gallery/history/ltx_video_long_showcase.before-native-20261115/ltx_video_long_showcase.poster.png", + "size": 1611293, + "sha256": "sha256:bytes:a82c4ec15dea4ab6cc2fc5cc85cfa4e4f21abac8b230920fa7964b01acba965c", + "contentType": "image/png", "purposes": [ "runtime" ], - "width": 1024, + "width": 1536, "height": 1024 }, { - "path": "template-gallery/qwen_inpaint_object_replace.webp", - "size": 158158, - "sha256": "sha256:bytes:5ccd7adeac6f6ddb1d988de1aec90e75ba53a94ed27a1d32eafd3aec2e2531c9", - "contentType": "image/webp", + "path": "template-gallery/history/ltx_video_long_showcase.before-native-20261115/reviews/ltx_video_long_showcase.quality-review.json", + "size": 8425, + "sha256": "sha256:bytes:9522f4f25ec827402e5e0ce1e2a0c9058d518ffa9c5c33c3a77f5f789bab4692", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/qwen_layered_portrait.webp", - "size": 230522, - "sha256": "sha256:bytes:6429d7f3d201d2d160cccf9911bcf124bcc03ae63ca4419503bceeb7ff4e71cb", - "contentType": "image/webp", + "path": "template-gallery/history/ltx_video_long_showcase.before-native-20261115/reviews/ltx_video_long_showcase.reviewed-provenance.json", + "size": 74319, + "sha256": "sha256:bytes:dac558b12c55e74678c33785a4f0d8affd542b96c0bcc70c9a10bf0dfdca4d33", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1536, - "height": 1108 + ] }, { - "path": "template-gallery/qwen_logo_texture.webp", - "size": 261230, - "sha256": "sha256:bytes:0b55d7f2b6c913996965242f0d71b0ddef713a5cca582bdfcf8dfaee8f1ea577", - "contentType": "image/webp", + "path": "template-gallery/history/ltx_video_video_to_video.v1/ltx_video_video_to_video.before.mp4", + "size": 257812, + "sha256": "sha256:bytes:496fde9e4410d1b1b0ea659fbf0b29d486537d56eefa43f61052a5c6d1808de8", + "contentType": "video/mp4", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/qwen_low_vram_poster_layout.webp", - "size": 264472, - "sha256": "sha256:bytes:e0b7e1a33ced6d1503ea8877d6ab152959a7334c3d976d2620641bb3c2719c99", - "contentType": "image/webp", + "path": "template-gallery/history/ltx_video_video_to_video.v1/ltx_video_video_to_video.card-preview.mp4", + "size": 116837, + "sha256": "sha256:bytes:2b50fa4dbb61316914b39c6ac0990e2f8b069186f7f4012ea5b5342b000b6ce3", + "contentType": "video/mp4", "purposes": [ "runtime" - ], - "width": 768, - "height": 1024 + ] }, { - "path": "template-gallery/qwen_low_vram_product_concept.webp", - "size": 113248, - "sha256": "sha256:bytes:252309e17982b7ac462daf69ec6e26031aa3cbdd58f58d75620e42612008fa05", - "contentType": "image/webp", + "path": "template-gallery/history/ltx_video_video_to_video.v1/ltx_video_video_to_video.mp4", + "size": 498170, + "sha256": "sha256:bytes:b6ab8245f0546512215b6eb271d2ef51bd34fa6ac6e22c126c8f359e0be28fdc", + "contentType": "video/mp4", "purposes": [ "runtime" - ], - "width": 1024, - "height": 768 + ] }, { - "path": "template-gallery/qwen_low_vram_text_rendering.webp", - "size": 242606, - "sha256": "sha256:bytes:817a486368f274cb9d8870fe2e894964c276ff31ca4aae1cc1c5df1bb47abc98", - "contentType": "image/webp", + "path": "template-gallery/history/ltx_video_video_to_video.v1/ltx_video_video_to_video.poster.png", + "size": 368903, + "sha256": "sha256:bytes:26d96f8085457388b724d4fc962cdbae3acc2b49be1aecf47b3a0efebac9abba", + "contentType": "image/png", "purposes": [ "runtime" ], - "width": 1024, + "width": 1536, "height": 1024 }, { - "path": "template-gallery/qwen_multi_reference_product.webp", - "size": 195330, - "sha256": "sha256:bytes:7acc91f678a731bf91d0d7fbee7085894eb1165884ed66aa178911b0925d4bde", - "contentType": "image/webp", + "path": "template-gallery/history/ltx_video_video_to_video.v1/ltx_video_video_to_video.quality-review.json", + "size": 7626, + "sha256": "sha256:bytes:940e6bab9cef2842792c9ebb5e2302f438a77acb8ee360ad17807183b932895f", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/qwen_outpaint_aspect_template.webp", - "size": 403554, - "sha256": "sha256:bytes:6dbd61c93050c6b565923580971be27d3d26360386c92494a5836dc4e19187d2", - "contentType": "image/webp", + "path": "template-gallery/history/ltx_video_video_to_video.v1/ltx_video_video_to_video.reviewed-provenance.json", + "size": 62144, + "sha256": "sha256:bytes:45a8dd0c6cf29dc699b20d391c087aac8c62364715a84fb9b123427574e802b0", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1344, - "height": 768 + ] }, { - "path": "template-gallery/qwen_outpaint_draft.webp", - "size": 286502, - "sha256": "sha256:bytes:776cc1d7953e252a676e8ce9c733945f79e3ef3f5aa41281cf072077d1a67581", - "contentType": "image/webp", + "path": "template-gallery/history/wan_vace_cinematic_text_to_video.before-native-20261115/entry-and-recipe.json", + "size": 6444, + "sha256": "sha256:bytes:0b3a8d6b848052f54c743fed2261197f9719147060d470bb2ebcf8e388eb206c", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1344, - "height": 768 + ] }, { - "path": "template-gallery/qwen_packaging_dieline.webp", - "size": 147874, - "sha256": "sha256:bytes:88f242e5ad09fbad113c1bbebd9190baf6ab355d59fd22d825e7895cefd30c34", - "contentType": "image/webp", + "path": "template-gallery/history/wan_vace_cinematic_text_to_video.before-native-20261115/reviews/wan_vace_cinematic_text_to_video.quality-review.json", + "size": 6217, + "sha256": "sha256:bytes:e7c7f1a212e20d0aba6dd29b4d4f799f4b32f07fd0ef91a45073a30874c59830", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 768, - "height": 768 + ] }, { - "path": "template-gallery/qwen_poster_logo_text.webp", - "size": 261816, - "sha256": "sha256:bytes:e0ab22f77f5d966d7868f8950f79702dc6d156d0eaef3e06205097558d5c5bb2", - "contentType": "image/webp", + "path": "template-gallery/history/wan_vace_cinematic_text_to_video.before-native-20261115/reviews/wan_vace_cinematic_text_to_video.reviewed-provenance.json", + "size": 58734, + "sha256": "sha256:bytes:0c12b78137241cbce6851ae3221254f9e751964c96d4a1dff0792a99f1cf06e8", + "contentType": "application/json", "purposes": [ - "runtime", - "tooling" - ], - "width": 768, - "height": 1344 + "runtime" + ] }, { - "path": "template-gallery/qwen_product_ad_composite.webp", - "size": 194110, - "sha256": "sha256:bytes:4b55c8e4d6603d58139d98e9450fcfa5cb62dafa0bbdc12fef0ccd37f2157153", - "contentType": "image/webp", - "purposes": [ - "runtime" - ], - "width": 1024, - "height": 1024 - }, - { - "path": "template-gallery/qwen_product_mockup.webp", - "size": 196402, - "sha256": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", - "contentType": "image/webp", - "purposes": [ - "runtime", - "tooling" - ], - "width": 1024, - "height": 1024 - }, - { - "path": "template-gallery/qwen_product_relight.webp", - "size": 198082, - "sha256": "sha256:bytes:a77aead151d72398d73d93719dc258fd797e75d6409a0de80208d43816057c2a", - "contentType": "image/webp", + "path": "template-gallery/history/wan_vace_cinematic_text_to_video.before-native-20261115/wan_vace_cinematic_text_to_video.card-preview.mp4", + "size": 935858, + "sha256": "sha256:bytes:58c230e968510c26bc2ea6131e64791a057d31ee3e3bd0fe6d7a062b0545b356", + "contentType": "video/mp4", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/qwen_text_rendering.webp", - "size": 229832, - "sha256": "sha256:bytes:ee80cfdbd3538e6865313be658299f9c460a2726977c126dab7499fc67827b8d", - "contentType": "image/webp", + "path": "template-gallery/history/wan_vace_cinematic_text_to_video.before-native-20261115/wan_vace_cinematic_text_to_video.mp4", + "size": 3509355, + "sha256": "sha256:bytes:47a2f29152a5239d52d8625c8abe3b431d7ae6d834c0d6cd0c0b852071eec171", + "contentType": "video/mp4", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/qwen_tile_extract.webp", - "size": 85542, - "sha256": "sha256:bytes:66005c52bdbf800764f4de443586346c7bf75a1fd5ebc4255df405d1180c3b00", - "contentType": "image/webp", + "path": "template-gallery/history/wan_vace_cinematic_text_to_video.before-native-20261115/wan_vace_cinematic_text_to_video.poster.png", + "size": 1742463, + "sha256": "sha256:bytes:427b6012590b1f010c3b77ee72bd350e84a4fccc84c65a8b0c5607d115adac55", + "contentType": "image/png", "purposes": [ "runtime" ], - "width": 1344, - "height": 768 + "width": 1664, + "height": 960 }, { - "path": "template-gallery/qwen_upscale_finish.webp", - "size": 883636, - "sha256": "sha256:bytes:9ddf91ae8f655b8cb44f087115eff24c791ddbee26753d9f328354f738a423ce", - "contentType": "image/webp", + "path": "template-gallery/history/wan_vace_grayscale_control.before-native-20261115/entry-and-recipe.json", + "size": 7009, + "sha256": "sha256:bytes:342d4e4899e40ad1a9054a4b7043025298648c4383c12108fba1f9bc0feb8bc2", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 2048, - "height": 2048 + ] }, { - "path": "template-gallery/reference_fusion.webp", - "size": 324236, - "sha256": "sha256:bytes:cb5621c2927bdb58ecc595e71d258b9eee2ef2ca164242474846db825cdb2cb1", - "contentType": "image/webp", + "path": "template-gallery/history/wan_vace_grayscale_control.before-native-20261115/inputs/wan_vace_grayscale_control.before.mp4", + "size": 289576, + "sha256": "sha256:bytes:748b164fd91bc2eed97f7c1d1125a04496a056f29cc016d7cc0da3734c2303b7", + "contentType": "video/mp4", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/reviews/ace_step_audio_continuation.quality-review.json", - "size": 3147, - "sha256": "sha256:bytes:e58e802eec1e2fc312f1eddf271416d9617c99c315972c35b99f98441a4b5783", + "path": "template-gallery/history/wan_vace_grayscale_control.before-native-20261115/reviews/wan_vace_grayscale_control.quality-review.json", + "size": 6963, + "sha256": "sha256:bytes:d135d69159418aecc6d0956b1ec64f2c7fc76137445679a4d4b11a54629c0932", "contentType": "application/json", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/ace_step_audio_continuation.reviewed-provenance.json", - "size": 44824, - "sha256": "sha256:bytes:bda2779dfd6ab8e96bb8ccfaab474f9fe989e3cad14320798132045f3a598d1f", + "path": "template-gallery/history/wan_vace_grayscale_control.before-native-20261115/reviews/wan_vace_grayscale_control.reviewed-provenance.json", + "size": 64317, + "sha256": "sha256:bytes:0366fae2e916bf0c67a90b8e898b9b0f1a2ff66680bcd789b160566e5a462070", "contentType": "application/json", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/ace_step_audio_repaint.quality-review.json", - "size": 3110, - "sha256": "sha256:bytes:d2cbe043e6636bb17cc55b0c24149e01067077815e2f17a664df39f9ad4e62a4", - "contentType": "application/json", + "path": "template-gallery/history/wan_vace_grayscale_control.before-native-20261115/wan_vace_grayscale_control.card-preview.mp4", + "size": 201263, + "sha256": "sha256:bytes:1ca73ab55f51fbe4eb08d4de5a2fa0c1c9654cf77909f2626aab0414a35f5985", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/ace_step_audio_repaint.reviewed-provenance.json", - "size": 44702, - "sha256": "sha256:bytes:82d0994007d3c2c447a9f3cae6065db34e494eb9f0353c4cfafa9d0ed473c91c", - "contentType": "application/json", + "path": "template-gallery/history/wan_vace_grayscale_control.before-native-20261115/wan_vace_grayscale_control.mp4", + "size": 957106, + "sha256": "sha256:bytes:4a011e34131e9c3bc9b05621184a520f6fb85c282031acd35e2988dda105ff62", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/ace_step_audio_variation.quality-review.json", - "size": 3106, - "sha256": "sha256:bytes:b20bf6bd7042d9214f72db5125ff6e0ef3a686ed2ee15143739efe2e50051bb9", - "contentType": "application/json", + "path": "template-gallery/history/wan_vace_grayscale_control.before-native-20261115/wan_vace_grayscale_control.poster.png", + "size": 1080262, + "sha256": "sha256:bytes:81a77bbc5882c22ab8e76fce76d7a2084e57b938fff42e842e5e9894dbc3010d", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1664, + "height": 960 }, { - "path": "template-gallery/reviews/ace_step_audio_variation.reviewed-provenance.json", - "size": 44904, - "sha256": "sha256:bytes:f31768feb3e080c0e83ed8a0a982399fa64a38258620ba43214cc7514251948d", + "path": "template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/entry-and-recipe.json", + "size": 6975, + "sha256": "sha256:bytes:2761544cfb268b53af298f7e2bb89b7367cd4471ecd17ed704fc827341332c8a", "contentType": "application/json", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/ace_step_lyric_music_video.quality-review.json", - "size": 8439, - "sha256": "sha256:bytes:4f51cfb385ed654b88b0cecb6b064b4a7c50d884a575b9d89c2224cf0916032d", - "contentType": "application/json", + "path": "template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/inputs/wan_vace_outpaint_reframe.before.mp4", + "size": 521627, + "sha256": "sha256:bytes:a8f28e04d03c9a6a2ba0b3ba4bf7db08f6ec99c45d962877cbc91aad5f3ad318", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/ace_step_lyric_music_video.reviewed-provenance.json", - "size": 93784, - "sha256": "sha256:bytes:ff73d620c0d459d7cd4e7e69e237ac9d805d579ad75813dedab3445f60326d65", + "path": "template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/reviews/wan_vace_outpaint_reframe.quality-review.json", + "size": 6916, + "sha256": "sha256:bytes:d6a2b3843f4581565adc30b9d16ee4a17f84751f0ef11d8b0b9b505ff5d57f66", "contentType": "application/json", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/ace_step_text_to_audio.quality-review.json", - "size": 3229, - "sha256": "sha256:bytes:696f5bffb19a0ccda790e668da102797391c665603354e638ac5d937f65c792e", + "path": "template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/reviews/wan_vace_outpaint_reframe.reviewed-provenance.json", + "size": 67904, + "sha256": "sha256:bytes:c4cb91db649df41db5276bb58ea85257d77de542f6349942d07f7f5675788dec", "contentType": "application/json", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/ace_step_text_to_audio.reviewed-provenance.json", - "size": 42808, - "sha256": "sha256:bytes:e60169416922a2e516557f9ce5c958412c32472db9592119b4f1ccba6afbba36", - "contentType": "application/json", + "path": "template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/wan_vace_outpaint_reframe.card-preview.mp4", + "size": 324218, + "sha256": "sha256:bytes:37c1f4b3a9787c6c6dac081ed3cabd2a42d2d0a9c2db10f1ac33a7a98e1ecea2", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/character_edit.quality-review.json", - "size": 5058, - "sha256": "sha256:bytes:10700042aceac7d071fb5aa3a3f1d26c3cbdef462352a167e7dbbcc1d53ef00f", - "contentType": "application/json", + "path": "template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/wan_vace_outpaint_reframe.mp4", + "size": 1352471, + "sha256": "sha256:bytes:f899d1af73bd95da7f3babe30c03d834b93c68c3f939eac0b8fb98df094c4d98", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/character_edit.reviewed-provenance.json", - "size": 46906, - "sha256": "sha256:bytes:cc6d3832032ef61930d18c38f0042ffc3dc80452b035853f07449a25fa36b625", - "contentType": "application/json", + "path": "template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/wan_vace_outpaint_reframe.poster.png", + "size": 763693, + "sha256": "sha256:bytes:df7f715aaadf49fa3df62ef0eb4238e19befadfee6910970ba8eab9e80128f01", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1664, + "height": 960 }, { - "path": "template-gallery/reviews/fast_lora.quality-review.json", - "size": 4189, - "sha256": "sha256:bytes:07534b76dc0cc8b226d1ba705b7d6ae870d7c2387ea1905f258c9f7fc5743744", + "path": "template-gallery/history/wan_vace_video_color_grade.before-native-20261115/entry-and-recipe.json", + "size": 6965, + "sha256": "sha256:bytes:0bd6c104810403f024832dc01a65312d5e7ceecd2c9f7f2ec19d4c10f2b5e479", "contentType": "application/json", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/fast_lora.reviewed-provenance.json", - "size": 53422, - "sha256": "sha256:bytes:4551fed821f30828ad61a225ee30d0b69de3cd9f0ed71aa14470b7604f946523", - "contentType": "application/json", + "path": "template-gallery/history/wan_vace_video_color_grade.before-native-20261115/inputs/wan_vace_video_color_grade.before.mp4", + "size": 351753, + "sha256": "sha256:bytes:934b4494442c732bfc27f3de1e1a8e99adf0eb96572bd6405f1a9c72da148289", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/flux2_klein_edit.duplicate-provenance.json", - "size": 78923, - "sha256": "sha256:bytes:add0a827b5c9f3d85e926056e717046ed008a9b74eff152e3e2c904893aa3bf3", + "path": "template-gallery/history/wan_vace_video_color_grade.before-native-20261115/reviews/wan_vace_video_color_grade.quality-review.json", + "size": 7054, + "sha256": "sha256:bytes:8aa386e846e98c6da6ed93369ff02ac9044df43af03a9e5fc109f0ae3e50c629", "contentType": "application/json", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/flux2_klein_edit.quality-review.json", - "size": 1353, - "sha256": "sha256:bytes:e870456c2d1ce28d0423f5efbb2a0c674c289be57ac2245a2cc08297834d55a1", + "path": "template-gallery/history/wan_vace_video_color_grade.before-native-20261115/reviews/wan_vace_video_color_grade.reviewed-provenance.json", + "size": 64258, + "sha256": "sha256:bytes:96b36b2d5b4a9212016d943b486240e0454ce2d30131a4bd39c83d932f865c88", "contentType": "application/json", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/flux2_klein_multi_reference.quality-review.json", - "size": 4131, - "sha256": "sha256:bytes:7a90fab4fbc67f092eab6c32485ad218b84a2d159c9a4f12e0f5d68574560420", - "contentType": "application/json", + "path": "template-gallery/history/wan_vace_video_color_grade.before-native-20261115/wan_vace_video_color_grade.card-preview.mp4", + "size": 127148, + "sha256": "sha256:bytes:aaa8905d5b7e2b1c0cd8b7d7bf62d334db0ec6a8d2a943f73bc82f17026fa9bd", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/flux2_klein_multi_reference.reviewed-provenance.json", - "size": 41769, - "sha256": "sha256:bytes:8a20fadb16da5e8dcb0799ea2a847d000236c729ab29908f2805d04b1e044df5", - "contentType": "application/json", + "path": "template-gallery/history/wan_vace_video_color_grade.before-native-20261115/wan_vace_video_color_grade.mp4", + "size": 569543, + "sha256": "sha256:bytes:72a7538470942630455723c7ccd1725d29ed662276e05ef647f4304e16e44d63", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/flux2_klein_text_to_image.quality-review.json", - "size": 3965, - "sha256": "sha256:bytes:ed1cafafb9e68f3198424a6e2f29838cff4cce5bf99f882c4c6df37454ff5aa2", - "contentType": "application/json", + "path": "template-gallery/history/wan_vace_video_color_grade.before-native-20261115/wan_vace_video_color_grade.poster.png", + "size": 572909, + "sha256": "sha256:bytes:5cb855c7951e6aa0e42b04e5583165f02e9fcc978cbcfe5c23b041d92f94f554", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1664, + "height": 960 }, { - "path": "template-gallery/reviews/flux2_klein_text_to_image.reviewed-provenance.json", - "size": 38796, - "sha256": "sha256:bytes:2ad992337bfa52ad337944508c63e0d7ad97921585f6f28ffb729f39a6d48f24", + "path": "template-gallery/history/wan_vace_video_to_video.before-native-20261115/entry-and-recipe.json", + "size": 6918, + "sha256": "sha256:bytes:f930a76e1cebc4e7bf890b791eec17aebb2b36983709092950cdba12ecdbac47", "contentType": "application/json", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/flux_control_canny.quality-review.json", - "size": 4414, - "sha256": "sha256:bytes:cb7b1e20f93d5ea6f796c7d2cc030f76d2327ae4d50cffef3cedc6ef1356dbfd", - "contentType": "application/json", + "path": "template-gallery/history/wan_vace_video_to_video.before-native-20261115/inputs/wan_vace_video_to_video.before.mp4", + "size": 1164611, + "sha256": "sha256:bytes:1f5cd051f787fc878bed50d3c26cce840abe00c942d32e49492e544ac2f88cff", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/flux_control_canny.reviewed-provenance.json", - "size": 41982, - "sha256": "sha256:bytes:761b42bfc3e6c95d884a560a6b2188b8a4a018ee51616857ee02b538b1e9c387", + "path": "template-gallery/history/wan_vace_video_to_video.before-native-20261115/reviews/wan_vace_video_to_video.quality-review.json", + "size": 6952, + "sha256": "sha256:bytes:88168ad146f317c2fd68f5a0db8f369dd398cbbf87073af8fdc6c680e7384a90", "contentType": "application/json", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/flux_depth_control.quality-review.json", - "size": 4189, - "sha256": "sha256:bytes:2976a4ac98fe2fcb0ca30ec3f17a853bd5d5e17150a5a80fb259ed6f87e304dd", + "path": "template-gallery/history/wan_vace_video_to_video.before-native-20261115/reviews/wan_vace_video_to_video.reviewed-provenance.json", + "size": 63294, + "sha256": "sha256:bytes:ee0ba628fb26f4789bfd9729bb534c11479aa170e489fbc3a7174c9c460d3cc2", "contentType": "application/json", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/flux_depth_control.reviewed-provenance.json", - "size": 41179, - "sha256": "sha256:bytes:a89189e3ba9f648a9b087d3dba78bffe7e7fbcf02734e494535b7e9f414a1f1f", - "contentType": "application/json", + "path": "template-gallery/history/wan_vace_video_to_video.before-native-20261115/wan_vace_video_to_video.card-preview.mp4", + "size": 355050, + "sha256": "sha256:bytes:7c0738aa477caae0852e7f4fad7fcfb36e9281dd1dbdc0ca091477876d38a074", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/flux_dev_expert_text_to_image.quality-review.json", - "size": 3853, - "sha256": "sha256:bytes:5848e398fe3095e3b5ff4576567249038021bf1c551530c1feac66d18a37ac21", - "contentType": "application/json", + "path": "template-gallery/history/wan_vace_video_to_video.before-native-20261115/wan_vace_video_to_video.mp4", + "size": 1542178, + "sha256": "sha256:bytes:99ccd9e6863e53c76f0a959b6b8953db3001cf3bf90b728d840b3d3a3e48e541", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/flux_dev_expert_text_to_image.reviewed-provenance.json", - "size": 49961, - "sha256": "sha256:bytes:736a0bb30b5d47745e5cc871c07c5c77ade430ccd25d251854bc306d8057d86c", - "contentType": "application/json", + "path": "template-gallery/history/wan_vace_video_to_video.before-native-20261115/wan_vace_video_to_video.poster.png", + "size": 1768482, + "sha256": "sha256:bytes:a893c3eab103355212373709510267ecfa831a2d0b46dfd9e8ca795e06503782", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1664, + "height": 960 }, { - "path": "template-gallery/reviews/flux_fill_inpaint.quality-review.json", - "size": 4118, - "sha256": "sha256:bytes:8a963ab2e9a56174cf2ad78c00b5c2aa9b30209ef4ef475e50204b6ecfd393a6", - "contentType": "application/json", + "path": "template-gallery/hunyuan_dit_coastal_lighthouse.webp", + "size": 514518, + "sha256": "sha256:bytes:849fc3d47db9a23dcea0ec788e336d75e1a5a802e50795e76da3aeb11f8188ef", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/flux_fill_inpaint.reviewed-provenance.json", - "size": 43884, - "sha256": "sha256:bytes:f627d4cce50a72239069596ecdb183842ca96d5d2bdf691f63f5773220086bf0", - "contentType": "application/json", + "path": "template-gallery/hunyuan_dit_green_glass_study.webp", + "size": 428092, + "sha256": "sha256:bytes:a8e7cfbff764d792497daf6a8239591e7f1963008946a8593721b931f2cfb41e", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/flux_fill_outpaint.quality-review.json", - "size": 4082, - "sha256": "sha256:bytes:bfe72fb5245dc022e878d57972d21ec11b5576f1d204fe95aba599843a22f9a9", - "contentType": "application/json", + "path": "template-gallery/hunyuan_pag_burgundy_knight.webp", + "size": 274754, + "sha256": "sha256:bytes:9f1c23651fccd748c6caa912c81e5e3983d311374ba2781ee2d27d2b3cf7ae0c", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/flux_fill_outpaint.reviewed-provenance.json", - "size": 43436, - "sha256": "sha256:bytes:a28f45de914552bca7f191510ed3f1fedf91b562708adc339610a7c9ec67402a", - "contentType": "application/json", + "path": "template-gallery/inputs/ace_step_audio_variation.before.wav", + "size": 5760044, + "sha256": "sha256:bytes:e07d05a658d361b6d28af62bcccfaeba9254507467dae1c5839efd546fed96a7", + "contentType": "audio/x-wav", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/flux_kontext_edit.quality-review.json", - "size": 4452, - "sha256": "sha256:bytes:30230abb20489156c64b2ef814908ecf37df4420c640ad93f3b38f17a2c7b6fa", - "contentType": "application/json", + "path": "template-gallery/inputs/alpine_lake_in_oils.before.png", + "size": 1509971, + "sha256": "sha256:bytes:88290a96bc8d52f11f2d1e3c0c0e04c2027661816e54b57d7d4739d731ca1e75", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/flux_kontext_edit.reviewed-provenance.json", - "size": 40285, - "sha256": "sha256:bytes:1365b82eaf2be81ba3b798c0653ecce7fe7258ead2e5536523ac7f0100872d83", - "contentType": "application/json", + "path": "template-gallery/inputs/animatediff_ivory_balloon_blue_mountains.guide.mp4", + "size": 11404, + "sha256": "sha256:bytes:fb000903f199391388d25d869aedacaedfe3ffbca67800e3113e1173f56e8108", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/flux_kontext_multi_reference.quality-review.json", - "size": 4584, - "sha256": "sha256:bytes:4b38ec98a5f21801d6adf939a96705352dff3fa0005a46b193f152d850cf82e5", - "contentType": "application/json", + "path": "template-gallery/inputs/animatediff_red_tram_in_watercolor.before.mp4", + "size": 23393, + "sha256": "sha256:bytes:88b69acee9f0c3572a98e49b23ad0e853dc86e1d15074fca99b47f690dde900f", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/flux_kontext_multi_reference.reviewed-provenance.json", - "size": 40954, - "sha256": "sha256:bytes:2366ddac33df43abb21095bd51ba395a29a69d7911568fc3ed4036195c3899cf", - "contentType": "application/json", + "path": "template-gallery/inputs/animatediff_red_tram_through_snow.before.mp4", + "size": 23393, + "sha256": "sha256:bytes:88b69acee9f0c3572a98e49b23ad0e853dc86e1d15074fca99b47f690dde900f", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/flux_krea_text_to_image.quality-review.json", - "size": 3961, - "sha256": "sha256:bytes:79c50447e19b09ec091bc0fbd2986c75001a525f7ea060c6a347d5ae52b15872", - "contentType": "application/json", + "path": "template-gallery/inputs/animatediff_red_tram_through_snow.guide.mp4", + "size": 61066, + "sha256": "sha256:bytes:5911e85b2d5ef93e44ba5d76f73ddf77f9d49d6cf3e4e829c30f0e386a0b8d80", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/flux_krea_text_to_image.reviewed-provenance.json", - "size": 37803, - "sha256": "sha256:bytes:3c59ae43a99b7946adea634976786e5105ac537516b3f74c4ca73d1d885fa567", - "contentType": "application/json", + "path": "template-gallery/inputs/character_edit.before.webp", + "size": 329508, + "sha256": "sha256:bytes:b9909f4cbff8af6e97be6d1e4923c67687eee41dbd64b051a018866781da12ab", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/flux_lora_film_noir.quality-review.json", - "size": 3112, - "sha256": "sha256:bytes:f8d8308daa26454b809312b43a96956470a2c8143ee6967b4262e2336d1f5851", - "contentType": "application/json", + "path": "template-gallery/inputs/chroma_alpine_block_print.before.png", + "size": 1509971, + "sha256": "sha256:bytes:88290a96bc8d52f11f2d1e3c0c0e04c2027661816e54b57d7d4739d731ca1e75", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/flux_lora_film_noir.reviewed-provenance.json", - "size": 52218, - "sha256": "sha256:bytes:833d29919af899c20fa213c4dfd0f75e239c66631f746fee9b46e7328a4eec67", - "contentType": "application/json", + "path": "template-gallery/inputs/chroma_copper_medallion_outpaint.before.png", + "size": 313225, + "sha256": "sha256:bytes:a8aaf9be57bc6bab356c5c1f9b76a1458e7e85e9daf6681e7e38a28fc28e1535", + "contentType": "image/png", "purposes": [ "runtime" - ] - }, + ], + "width": 832, + "height": 768 + }, { - "path": "template-gallery/reviews/flux_lora_ghibli_story.quality-review.json", - "size": 3389, - "sha256": "sha256:bytes:6009868ad3e76b584a12eb4193daf7680a0f224224bcda917c2ebbe8f543d1a5", - "contentType": "application/json", + "path": "template-gallery/inputs/chroma_restored_cobalt_backdrop.before.png", + "size": 623267, + "sha256": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/flux_lora_ghibli_story.reviewed-provenance.json", - "size": 53038, - "sha256": "sha256:bytes:f87545939eb878e8655640f7563f6ddb93b355ba72c716959fb61c39806fa8a3", - "contentType": "application/json", + "path": "template-gallery/inputs/chroma_restored_cobalt_backdrop.mask.png", + "size": 1571, + "sha256": "sha256:bytes:1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/flux_lora_oil_painting.quality-review.json", - "size": 3127, - "sha256": "sha256:bytes:b62c3ba1c98b557dd1bee81d7c2c85371ebfe8fe261af18690729f623a1a2ecd", - "contentType": "application/json", + "path": "template-gallery/inputs/cogvideox_red_tram_model_railway.before.mp4", + "size": 78771, + "sha256": "sha256:bytes:0737fe1e6b127fd4f5f66043b8911e5c7e380e60d50eab7e6bc9ba62e830b9dd", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/flux_lora_oil_painting.reviewed-provenance.json", - "size": 52151, - "sha256": "sha256:bytes:8adce5953e160687b1b714c225ec78a2fae584e7038264d7766305edecfdcf7c", - "contentType": "application/json", + "path": "template-gallery/inputs/flux1_dev_limestone_studio_scratch_repair.before.png", + "size": 623267, + "sha256": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/flux_lora_paper_cutout.quality-review.json", - "size": 3177, - "sha256": "sha256:bytes:045e4480718e933637e16d026c8731d879f038d174d7f40f57009bf43eaab51d", - "contentType": "application/json", + "path": "template-gallery/inputs/flux1_dev_limestone_studio_scratch_repair.mask.png", + "size": 1571, + "sha256": "sha256:bytes:1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/flux_lora_paper_cutout.reviewed-provenance.json", - "size": 52276, - "sha256": "sha256:bytes:8fac1a77c1eeab9e791bd350294f04a322d51c6c5a8b5cfcf16aa940f6adfab5", - "contentType": "application/json", + "path": "template-gallery/inputs/flux2_klein_edit.before.png", + "size": 266188, + "sha256": "sha256:bytes:d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 512, + "height": 512 }, { - "path": "template-gallery/reviews/flux_lora_photoreal_documentary.quality-review.json", - "size": 3246, - "sha256": "sha256:bytes:bc6c3a241cf0fa9a1336717b6d05b2c7a6e50b1a94911088e559e9d1dba69507", - "contentType": "application/json", + "path": "template-gallery/inputs/flux2_klein_multi_reference.before.webp", + "size": 281216, + "sha256": "sha256:bytes:1d993540e914f0e2d230f1133b57ae14bb837829237a53c89613fcdef6699995", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/flux_lora_photoreal_documentary.reviewed-provenance.json", - "size": 52433, - "sha256": "sha256:bytes:e7c4fcd6b52af6e45867d22c3adb1416adef0463802cd1d7890ec36129ba234c", - "contentType": "application/json", + "path": "template-gallery/inputs/flux3-packaging-protected-photo-mask-v1.png", + "size": 1524, + "sha256": "sha256:bytes:d36162153e2009e0b2f3a711825d39e67c02ba3577971a444bd92eebe81169ac", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/flux_lora_retro_comic.quality-review.json", - "size": 3307, - "sha256": "sha256:bytes:259d069f67a64529bd2c67a542e988edc231c776724996a12a33083f02d4bf15", - "contentType": "application/json", + "path": "template-gallery/inputs/flux3_klein_base_fp8r512_multi_reference_edit.before.png", + "size": 11137, + "sha256": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/flux_lora_retro_comic.reviewed-provenance.json", - "size": 52797, - "sha256": "sha256:bytes:07f76c1b55b52a8419ed33561a1050e8692b8d9a087ce339958c9ddcf7d68ff2", - "contentType": "application/json", + "path": "template-gallery/inputs/flux3_klein_base_fp8r512_single_reference_edit.before.png", + "size": 266188, + "sha256": "sha256:bytes:d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 512, + "height": 512 }, { - "path": "template-gallery/reviews/flux_lora_watercolor.quality-review.json", - "size": 3441, - "sha256": "sha256:bytes:d3bd65fb0179f57dd516cc80cbb7124e4a0e868c5880853e06900b65214d31e7", - "contentType": "application/json", + "path": "template-gallery/inputs/flux3_klein_fp8r512_multi_reference_edit.before.png", + "size": 11137, + "sha256": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/flux_lora_watercolor.reviewed-provenance.json", - "size": 52678, - "sha256": "sha256:bytes:c80ee9c29331e71e067fb681c0af5d0979680928f957d422047fde5177120174", - "contentType": "application/json", + "path": "template-gallery/inputs/flux3_klein_fp8r512_single_reference_edit.before.png", + "size": 266188, + "sha256": "sha256:bytes:d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 512, + "height": 512 }, { - "path": "template-gallery/reviews/flux_redux_edit.quality-review.json", - "size": 4321, - "sha256": "sha256:bytes:ecd1f9a9365ddf28ae4c200e4c040d3f2f48c0429d380f35f099f85530dc617b", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_canny_black_ink_cube.guide.png", + "size": 5492, + "sha256": "sha256:bytes:fb9c9cd18138c124335a688b92c15f3194b0f0071f1dac710b71870b9e3b361f", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/flux_redux_edit.reviewed-provenance.json", - "size": 42445, - "sha256": "sha256:bytes:73c4395d30e0db765215ff48dd521c269c6b58d1e3fdc42e030ca230f51a2477", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_canny_clean_backdrop.before.png", + "size": 623267, + "sha256": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/flux_redux_multi_reference.quality-review.json", - "size": 4379, - "sha256": "sha256:bytes:6d1a2b1cd59643e756167a31b4b7fb96242f3775317f05c9139883468cff5c93", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_canny_clean_backdrop.guide.png", + "size": 7281, + "sha256": "sha256:bytes:6bd07628a37c087178e9de58a98c6c5879468163f1a2376a581511a42503e2e2", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/flux_redux_multi_reference.reviewed-provenance.json", - "size": 53054, - "sha256": "sha256:bytes:0e30224ab60a14f2d040e4104454f3cf1867ebf3fb152e7554ee295b9cc69914", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_canny_clean_backdrop.mask.png", + "size": 1571, + "sha256": "sha256:bytes:1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/flux_schnell_text_to_image.quality-review.json", - "size": 4094, - "sha256": "sha256:bytes:cfe3bfedd9deb4b3a502597bd82a0e539c9ddecacb8c788cc2135256908d5a95", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_control_canny.before.png", + "size": 22013, + "sha256": "sha256:bytes:3d03ee22a3d29068f30f18afcb31e86ea455fbfbe1ca5aa172cf633a26f21339", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1344, + "height": 768 }, { - "path": "template-gallery/reviews/flux_schnell_text_to_image.reviewed-provenance.json", - "size": 40307, - "sha256": "sha256:bytes:dd197dbb499c97643aec8991e72978d48ef6880f951a10fb5dc042454d22ccf9", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_depth_control.before.png", + "size": 157468, + "sha256": "sha256:bytes:2e202069a584ee5ada91e2deaea6bf7b92a94f4816e669e695d7cb64d5a1cb0e", + "contentType": "image/png", "purposes": [ - "runtime" - ] + "runtime", + "tooling" + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/high_quality.quality-review.json", - "size": 3806, - "sha256": "sha256:bytes:fe086593792f639371424b347f3bb1d7cc390b1d996630104e08d19d2efd4832", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_depth_marine_bow_repair.before.webp", + "size": 548974, + "sha256": "sha256:bytes:c3d52c29b6a8cae80d2feffb8a978cded8b34509abd09216f665ab3af13f189e", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/high_quality.reviewed-provenance.json", - "size": 37809, - "sha256": "sha256:bytes:5013cd17a686b40e7f1747578b2a235e2f2bfb5ef881fe1d8260208f130daa0f", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_depth_marine_bow_repair.guide.png", + "size": 157468, + "sha256": "sha256:bytes:2e202069a584ee5ada91e2deaea6bf7b92a94f4816e669e695d7cb64d5a1cb0e", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/low_vram.quality-review.json", - "size": 3850, - "sha256": "sha256:bytes:eaf768e868d48ee76bad96c02f835d2d20abd9e46adcdcd2c36e6b853f82c59b", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_depth_marine_bow_repair.mask.png", + "size": 2006, + "sha256": "sha256:bytes:765f215aa6f8c0087a67af872a26149223373d5ab4a8afba6331caad5bc45d4c", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/low_vram.reviewed-provenance.json", - "size": 38909, - "sha256": "sha256:bytes:04028d85f3f3e840000b89077d8ceaafc608141a176ff4d071264ee4ec3f9c9b", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_dev_forest_green_teapot.before.webp", + "size": 143918, + "sha256": "sha256:bytes:443062a26e22e3542e284f50d0274b7c70b881b3cce76568eb8eb22ce4c396d6", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/ltx_video_animated_story.quality-review.json", - "size": 5696, - "sha256": "sha256:bytes:7520a8a1a714f7ed2943abd482189e83593bfa2a85afe48701c65505986d036b", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_fill_inpaint.before.webp", + "size": 142192, + "sha256": "sha256:bytes:b7c221b367738177e32fece56067d743df96282a6ccb2afd040ee89ea0a8f678", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/ltx_video_animated_story.reviewed-provenance.json", - "size": 62383, - "sha256": "sha256:bytes:42d1d53a66c603446963ff929f1493eea420dca97c45f225bd7d100ab64d6982", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_fill_outpaint.before.png", + "size": 1032894, + "sha256": "sha256:bytes:bf4dbaa55b83b19ca56c691e9d1a10d3b838ff2fec926aaea6b526561c68f8e6", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1536, + "height": 1024 }, { - "path": "template-gallery/reviews/ltx_video_image_to_video.quality-review.json", - "size": 7012, - "sha256": "sha256:bytes:201d59e66d2e38c2691ca60021885268583ba4769b554b79b02ebaaad853f4db", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_klein_alpine_lake_panorama.before.png", + "size": 1003084, + "sha256": "sha256:bytes:50270382b4b730b87f79b775accaeeb81f3ff8885cd3d2cea94830206fbc181b", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 832, + "height": 768 }, { - "path": "template-gallery/reviews/ltx_video_image_to_video.reviewed-provenance.json", - "size": 60427, - "sha256": "sha256:bytes:a98d60755d3a230c52c41f7ee6f0a7cb64403ec866c4558f30142955ff839f4c", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_klein_open_glacial_lake.before.png", + "size": 1509971, + "sha256": "sha256:bytes:88290a96bc8d52f11f2d1e3c0c0e04c2027661816e54b57d7d4739d731ca1e75", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/ltx_video_long_showcase.quality-review.json", - "size": 8425, - "sha256": "sha256:bytes:9522f4f25ec827402e5e0ce1e2a0c9058d518ffa9c5c33c3a77f5f789bab4692", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_klein_open_glacial_lake.mask.png", + "size": 4475, + "sha256": "sha256:bytes:877d3c4e0e976d3885419f3f327d8974394d69aca35667e5479b944880d84e04", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/ltx_video_long_showcase.reviewed-provenance.json", - "size": 74319, - "sha256": "sha256:bytes:dac558b12c55e74678c33785a4f0d8affd542b96c0bcc70c9a10bf0dfdca4d33", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_kontext_bookshop_clear_glass.before.webp", + "size": 569776, + "sha256": "sha256:bytes:ff045be510a0e88cbab69bbe8c3794dd26bd19036bdec26a63a5b6ea5a11bc66", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/ltx_video_multi_reference.quality-review.json", - "size": 7831, - "sha256": "sha256:bytes:a581122ee28f58c36624af785c0a6741cf94bf69303d68aa21dabfbf1c16b846", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_kontext_bookshop_clear_glass.mask.png", + "size": 1441, + "sha256": "sha256:bytes:6f9114963580bd8942bc25e31e67a7fa2f7fdea73c775dd49bb9972c65829578", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/ltx_video_multi_reference.reviewed-provenance.json", - "size": 60742, - "sha256": "sha256:bytes:6a7413901c5e35628bbc371d3c5c3729a5486d28383f00195adb7f6a9db12446", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_kontext_edit.before.webp", + "size": 196402, + "sha256": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/ltx_video_text_to_video.quality-review.json", - "size": 6741, - "sha256": "sha256:bytes:0edfcb8a27a65f218f1b42d4d139515cf9ebfbb0b530e2e15122c3b57fe16552", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_kontext_multi_reference.before.webp", + "size": 196402, + "sha256": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", + "contentType": "image/webp", "purposes": [ - "runtime" - ] + "runtime", + "tooling" + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/ltx_video_text_to_video.reviewed-provenance.json", - "size": 57954, - "sha256": "sha256:bytes:2967b15d52914d901b0afd4bf90e267c4762639426ccf9826130f5ef477b89ea", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_kontext_multi_reference.material-strip.v2.png", + "size": 3714, + "sha256": "sha256:bytes:70c74691e2bcd7cdb352b7e64e5af5a1a7f01d77112d32a8edadc0060a95ef34", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 32, + "height": 96 }, { - "path": "template-gallery/reviews/ltx_video_video_to_video.quality-review.json", - "size": 7626, - "sha256": "sha256:bytes:940e6bab9cef2842792c9ebb5e2302f438a77acb8ee360ad17807183b932895f", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_redux_edit.before.webp", + "size": 330492, + "sha256": "sha256:bytes:2e0ec8892660785e322468d0153fd2dadf7a4d920fce2d7d4a0b686a8fe8515d", + "contentType": "image/webp", "purposes": [ - "runtime" - ] + "runtime", + "tooling" + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/ltx_video_video_to_video.reviewed-provenance.json", - "size": 62144, - "sha256": "sha256:bytes:45a8dd0c6cf29dc699b20d391c087aac8c62364715a84fb9b123427574e802b0", - "contentType": "application/json", + "path": "template-gallery/inputs/flux_redux_multi_reference.before.webp", + "size": 477366, + "sha256": "sha256:bytes:7f1ea58485fa7802765b9fbbf0e6957e8607261c91669fdcc44cbed80c6fb309", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_character_angles.quality-review.json", - "size": 4132, - "sha256": "sha256:bytes:7597e87870f035c267b65d8c5c56e5d1563e432719a6752b5eac41608f9b1147", - "contentType": "application/json", + "path": "template-gallery/inputs/hunyuan_dit_green_glass_study.before.png", + "size": 7281, + "sha256": "sha256:bytes:6bd07628a37c087178e9de58a98c6c5879468163f1a2376a581511a42503e2e2", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_character_angles.reviewed-provenance.json", - "size": 41104, - "sha256": "sha256:bytes:6ecd897a6b422e73e97ba6ee17af28f9448531af356852e7a3239f27afcf337f", - "contentType": "application/json", + "path": "template-gallery/inputs/joy_plus_lavender_on_limestone.before.png", + "size": 624887, + "sha256": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_control_image_layout.duplicate-provenance.json", - "size": 99461, - "sha256": "sha256:bytes:88cf4c98bff0bcfc6b73692b8385f8fd4fd6df5f05e1fa1d4423c3615d99c551", - "contentType": "application/json", + "path": "template-gallery/inputs/joy_plus_terracotta_on_limestone.before.png", + "size": 624887, + "sha256": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_control_image_layout.quality-review.json", - "size": 3927, - "sha256": "sha256:bytes:945dac5914322567ef3040e21c46709a7a262f2b2bcd0fcdd668d6c2d195971c", - "contentType": "application/json", + "path": "template-gallery/inputs/joy_plus_terracotta_on_limestone.reference-2.png", + "size": 103533, + "sha256": "sha256:bytes:056615dd7833d38cfed12d45b30bb0c6e439bf1585f4964da4796ca5b43f20ea", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_edit_plus_single_image.duplicate-provenance.json", - "size": 82296, - "sha256": "sha256:bytes:dd76a3ef7b084e4b419ac4742834c16cbfffd24413a2484c5190eaa933a41f7f", - "contentType": "application/json", + "path": "template-gallery/inputs/joyimage_base_cobalt_paper_band.before.png", + "size": 624887, + "sha256": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_edit_plus_single_image.quality-review.json", - "size": 1583, - "sha256": "sha256:bytes:0b438037b118e2b5865e6dfa2ba7c3c06d7dc7f24224886f01777be7f2b2e23b", - "contentType": "application/json", + "path": "template-gallery/inputs/kandinsky3_smoked_glass_on_limestone.before.png", + "size": 624887, + "sha256": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_edit_strength_sweep.quality-review.json", - "size": 4164, - "sha256": "sha256:bytes:496a280901eb5ca3cd80d222d0226537befd1ce050d05ed56fa5ce233b7e7af3", - "contentType": "application/json", + "path": "template-gallery/inputs/kontext_wide_water_alpine_ridge.before.png", + "size": 1003084, + "sha256": "sha256:bytes:50270382b4b730b87f79b775accaeeb81f3ff8885cd3d2cea94830206fbc181b", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 832, + "height": 768 }, { - "path": "template-gallery/reviews/qwen_edit_strength_sweep.reviewed-provenance.json", - "size": 38475, - "sha256": "sha256:bytes:7ed8775e68ea0323457286de63b0bdf828b57b9ca20e871708f4fdfca533762d", - "contentType": "application/json", + "path": "template-gallery/inputs/lcm_dawn_alpine_lake.before.webp", + "size": 164148, + "sha256": "sha256:bytes:25fe06d8e93645bc6ff29928556a0cd654aa6d70178d435268b3d17e9188feaa", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 512, + "height": 512 }, { - "path": "template-gallery/reviews/qwen_inpaint_mask_draft.quality-review.json", - "size": 4826, - "sha256": "sha256:bytes:7a61235df3be93a58bde11c0fb112e266ade8d3d4422f75e118007515c6ae29e", - "contentType": "application/json", + "path": "template-gallery/inputs/longcat_clear_glass_at_the_bookshop.before.webp", + "size": 569776, + "sha256": "sha256:bytes:ff045be510a0e88cbab69bbe8c3794dd26bd19036bdec26a63a5b6ea5a11bc66", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_inpaint_mask_draft.reviewed-provenance.json", - "size": 45735, - "sha256": "sha256:bytes:8853df637247dc212985e40d9a1ab4b751e18c0c7fad647cd2eef22994dd1876", - "contentType": "application/json", + "path": "template-gallery/inputs/ltx2_enamel_teapot_window_light.first.png", + "size": 611837, + "sha256": "sha256:bytes:7be24582bd4f26633a636c4110e38baecd94e6c6b3fd35450848f97bc07f2855", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_inpaint_object_replace.quality-review.json", - "size": 4203, - "sha256": "sha256:bytes:27aa406a3b4226b341e30b216811782d0bfdd18683b89b29564ecf07e301ce47", - "contentType": "application/json", + "path": "template-gallery/inputs/ltx2_glasshouse_drip.first.png", + "size": 2109128, + "sha256": "sha256:bytes:124d647abcc3d14dcd8388d749814e0b11bc5df820d126e9542ca2f333f73c73", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_inpaint_object_replace.reviewed-provenance.json", - "size": 44712, - "sha256": "sha256:bytes:61958d9a47301ee3d2fb83283d5f2ba7bffab3c49bfcfe93402bc64697f95fa4", - "contentType": "application/json", + "path": "template-gallery/inputs/ltx2_moss_and_basalt.before.mp4", + "size": 579374, + "sha256": "sha256:bytes:3b5e40ac2bf76236d1f901a7a2522addd7c4a1b2701bd89a33c1506b1523bc38", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/qwen_layered_portrait.quality-review.json", - "size": 6007, - "sha256": "sha256:bytes:01804ef72a061832915725a6aeff8385850f3347489fdec7c1592c313710db76", - "contentType": "application/json", + "path": "template-gallery/inputs/ltx_boardwalk_tracking.end.webp", + "size": 62370, + "sha256": "sha256:bytes:52ea89c0cdec3142162156be07af12a06a14ad623b68c9700ccbc82bf889100d", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_layered_portrait.reviewed-provenance.json", - "size": 46147, - "sha256": "sha256:bytes:ee99d6eff080c78f00846a5dc8123d02ec3dfd84b1b48909873b35fb4447f2e9", - "contentType": "application/json", + "path": "template-gallery/inputs/ltx_boardwalk_tracking.start.webp", + "size": 440656, + "sha256": "sha256:bytes:73123a5bb6e8c1367eced6a7fbee6b0e5500ecbabf769ba9d9c18fd10623e36e", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_logo_texture.quality-review.json", - "size": 4525, - "sha256": "sha256:bytes:4671b5e55420dab7ed9fdd700b806ddd6f57a2782ef2a1e89931db6805f58e9e", - "contentType": "application/json", + "path": "template-gallery/inputs/ltx_long_wind_and_tide_at_the_headland.first.png", + "size": 614949, + "sha256": "sha256:bytes:51624f59295a77119bf336a63bfc7731d33d6612bc44b15495bddabdfae3ef51", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 768, + "height": 512 }, { - "path": "template-gallery/reviews/qwen_logo_texture.reviewed-provenance.json", - "size": 46983, - "sha256": "sha256:bytes:7cdb2104446f3083e04d29643c264c4fe9ceeecfd0e359424b8e135711adc21f", - "contentType": "application/json", + "path": "template-gallery/inputs/ltx_video_image_to_video.before.webp", + "size": 301384, + "sha256": "sha256:bytes:930364ab2667e492e51b8a60664751d66f5ed3f2d580664832977e89bcfbbf26", + "contentType": "image/webp", "purposes": [ - "runtime" - ] + "runtime", + "tooling" + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_low_vram_poster_layout.quality-review.json", - "size": 3957, - "sha256": "sha256:bytes:fc98a7a192d1ed561eb5b31c2371c5fe006d578682c0b2450550bd1589f34850", - "contentType": "application/json", + "path": "template-gallery/inputs/ltx_video_multi_reference.before.webp", + "size": 440656, + "sha256": "sha256:bytes:73123a5bb6e8c1367eced6a7fbee6b0e5500ecbabf769ba9d9c18fd10623e36e", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_low_vram_poster_layout.reviewed-provenance.json", - "size": 37899, - "sha256": "sha256:bytes:d1dcc5a590d7ef0d4dee3942998830f13edf7b49ad07f01634f335001a7e490c", - "contentType": "application/json", + "path": "template-gallery/inputs/ltx_video_video_to_video.before.mp4", + "size": 257812, + "sha256": "sha256:bytes:496fde9e4410d1b1b0ea659fbf0b29d486537d56eefa43f61052a5c6d1808de8", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/qwen_low_vram_product_concept.duplicate-provenance.json", - "size": 53269, - "sha256": "sha256:bytes:584fe2513facf95e22cdd8c6893e9ffd99d6562ca4fe33d3f11d12d16f428cec", - "contentType": "application/json", + "path": "template-gallery/inputs/marigold_depth_synthetic_ramp.before.png", + "size": 177, + "sha256": "sha256:bytes:626815c78eaad46cad849732d1598b45b91700ce046c1ee3f4e2444db80aa32a", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 64, + "height": 48 }, { - "path": "template-gallery/reviews/qwen_low_vram_product_concept.quality-review.json", - "size": 1524, - "sha256": "sha256:bytes:923b20299ac0f009693e40c701abe51dc96cd94dbdc81dbf987a7b1680c5f4e9", - "contentType": "application/json", + "path": "template-gallery/inputs/omnigen_cobalt_against_soft_apricot.before.png", + "size": 624887, + "sha256": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_low_vram_text_rendering.duplicate-provenance.json", - "size": 47639, - "sha256": "sha256:bytes:6309e9156e073135633f96d4eb276d8d8889329ddaaa92a198f2accba59fc0e6", - "contentType": "application/json", + "path": "template-gallery/inputs/omnigen_red_enamel_folded_linen.before.png", + "size": 173437, + "sha256": "sha256:bytes:4077a18ad81b7fb6a1e7285777cac6241f6c0109a680945487b81e8561f30d8c", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 384, + "height": 384 }, { - "path": "template-gallery/reviews/qwen_low_vram_text_rendering.quality-review.json", - "size": 1515, - "sha256": "sha256:bytes:051df72430a51a5bdc367d4ba6f4bf67ec9cc1d8eb312148a1c4c7db64c94746", - "contentType": "application/json", + "path": "template-gallery/inputs/omnigen_red_enamel_folded_linen.reference-2.png", + "size": 81944, + "sha256": "sha256:bytes:a0b713856d9a2d7956605fe85b26eef641bdede49400583f9c87c25fd3e324ec", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 512, + "height": 128 }, { - "path": "template-gallery/reviews/qwen_multi_reference_product.quality-review.json", - "size": 5028, - "sha256": "sha256:bytes:395c6c3e058b55d78d3adbc09d9fe3aa6f1f14c4af845e55b79c0e2a82dc9b68", - "contentType": "application/json", + "path": "template-gallery/inputs/qwen-carton-layout-control.png", + "size": 11137, + "sha256": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", + "contentType": "image/png", "purposes": [ - "runtime" - ] + "tooling" + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_multi_reference_product.reviewed-provenance.json", - "size": 49298, - "sha256": "sha256:bytes:9a49f077f6eaefb162e4cf1b2a12801b3ed36bb11e782b80b0d13a654499c131", - "contentType": "application/json", + "path": "template-gallery/inputs/qwen_2511_pale_amber_on_limestone.before.png", + "size": 624887, + "sha256": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_outpaint_aspect_template.quality-review.json", - "size": 4059, - "sha256": "sha256:bytes:2b83ee76cb0393da3228eef42396dd7fc07a7a42fa594d9cf53a1c73b408556a", - "contentType": "application/json", + "path": "template-gallery/inputs/qwen_2511_terracotta_material_transfer.before.png", + "size": 624887, + "sha256": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_outpaint_aspect_template.reviewed-provenance.json", - "size": 43638, - "sha256": "sha256:bytes:0dc29edc25438f4b451df5c1f5fda03ebbca50f04e2cad9e73073f72aaef2fbf", - "contentType": "application/json", + "path": "template-gallery/inputs/qwen_2511_terracotta_material_transfer.reference-2.png", + "size": 103533, + "sha256": "sha256:bytes:056615dd7833d38cfed12d45b30bb0c6e439bf1585f4964da4796ca5b43f20ea", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_outpaint_draft.quality-review.json", - "size": 4917, - "sha256": "sha256:bytes:7018012c3a5ba1544271df1b3f802f806b3c03f1fa774572b6336ded97faceaf", - "contentType": "application/json", + "path": "template-gallery/inputs/qwen_2512_cobalt_backdrop_repair.before.png", + "size": 891109, + "sha256": "sha256:bytes:f5db354dc97ea11898d868898c5cc8ef454bb75ffe098b00bb2f06bc89f85885", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1328, + "height": 1328 }, { - "path": "template-gallery/reviews/qwen_outpaint_draft.reviewed-provenance.json", - "size": 43793, - "sha256": "sha256:bytes:348d1c3fedae6c17387002e6c6e2e4dfa193cb55bc5db82bb81ae7ff430955ef", - "contentType": "application/json", + "path": "template-gallery/inputs/qwen_2512_cobalt_backdrop_repair.mask.png", + "size": 2405, + "sha256": "sha256:bytes:75ce495cdb65e3cb92cbd1c2ed94546d3f946e86642095d08334be13fd8a8b8f", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1328, + "height": 1328 }, { - "path": "template-gallery/reviews/qwen_packaging_dieline.duplicate-provenance.json", - "size": 99305, - "sha256": "sha256:bytes:b941eae359a788818b579925327c244af3115375ff312d58a109a929be7cd6fa", - "contentType": "application/json", + "path": "template-gallery/inputs/qwen_bookshop_gouache.before.webp", + "size": 569776, + "sha256": "sha256:bytes:ff045be510a0e88cbab69bbe8c3794dd26bd19036bdec26a63a5b6ea5a11bc66", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/qwen_character_angles.before.webp", + "size": 388454, + "sha256": "sha256:bytes:4b1b8d9e351abd437f2ffff90cc6a958160a87863ba4d8e85a0aa80a37e7a10e", + "contentType": "image/webp", + "purposes": [ + "runtime", + "tooling" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/qwen_cobalt_on_charcoal_slate.before.png", + "size": 624887, + "sha256": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/qwen_control_image_layout.before.png", + "size": 11137, + "sha256": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/qwen_control_winter_cabin_blue_hour.before.png", + "size": 8404, + "sha256": "sha256:bytes:ca250462efc77625134ebe305b2ee67281a1dcf8919e45299c648f0fdacf919a", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/qwen_edit_plus_single_image.before.webp", + "size": 32852, + "sha256": "sha256:bytes:e90e99e27cdd9b6ab7478a05199df2fdf7dce650d700ef2ceb55da7fb206b715", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/qwen_edit_strength_sweep.before.webp", + "size": 262892, + "sha256": "sha256:bytes:a6d165bd87e2c57ab8cf71fa15de9d8724fccf5782c16c34c25dc77934751676", + "contentType": "image/webp", + "purposes": [ + "runtime", + "tooling" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/qwen_inpaint_mask_draft.before.webp", + "size": 331300, + "sha256": "sha256:bytes:a2f8ac6f5937d6e618b48ce9947153b8233ff7a82dcf67f28766d20b9917d730", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/qwen_inpaint_object_replace.before.webp", + "size": 154818, + "sha256": "sha256:bytes:9f9f9685db5e9f8e1c162a0515151b03912c84777727b38682b65839db501ae6", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/qwen_layered_portrait.before.webp", + "size": 298906, + "sha256": "sha256:bytes:965240cf250a9074a7adab394c76070674cf517bed42b6c4647112d17dec84de", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/qwen_layered_sunset_and_peaks.source.png", + "size": 11061, + "sha256": "sha256:bytes:67835db7f30072a35b1650c0a84e7f241c0b01fcf2c324964ddcd5f8424008b3", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/qwen_logo_texture.before.webp", + "size": 57604, + "sha256": "sha256:bytes:124415536a8071baccf8821232ad79a0a8ceec30ae62617c91a8d7a0b59d0a8c", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/qwen_multi_reference_product.before.webp", + "size": 145418, + "sha256": "sha256:bytes:47e56fd165fd2610f34e952191d74e061269b9703ae9fd7f571491f38ce4992c", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/qwen_outpaint_aspect_template.before.webp", + "size": 433928, + "sha256": "sha256:bytes:d898e00f3be4b28e237f71acf8024ad3715a657e1fcf3aeaf57279468dff7a76", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/qwen_outpaint_draft.before.webp", + "size": 296084, + "sha256": "sha256:bytes:862e292caa1759156fffde5cfccda8b97ec622514258f81986188cf63a836ea9", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/qwen_packaging_dieline.before.png", + "size": 11137, + "sha256": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/qwen_product_ad_composite.before.webp", + "size": 196402, + "sha256": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/qwen_product_relight.before.webp", + "size": 215222, + "sha256": "sha256:bytes:f791a809c0df307cd7dafa8c54ae86bbe4c53d73afdacb2183ff8cdbeac994c2", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/qwen_tile_extract.before.webp", + "size": 223184, + "sha256": "sha256:bytes:6224e9ee47765858f2ec0c33679140d020cf3ad6e4fa2fa4557ef50f811aef0e", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1344, + "height": 768 + }, + { + "path": "template-gallery/inputs/qwen_upscale_finish.before.webp", + "size": 297232, + "sha256": "sha256:bytes:a36d3e25a44989896f0add83aec1a0eaec297e353ab754d13e1eab1a336acadf", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/reference_fusion.before.webp", + "size": 102088, + "sha256": "sha256:bytes:283b1cfb32b15fe6b31a29dce1f2b96026c1ad0826bf3f24aebebf4b6f9a4f07", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/restoring_the_studio_backdrop.before.png", + "size": 271303, + "sha256": "sha256:bytes:d143c4922ad498b9bd436d06df424bbff50baf023b93735b53ee401e19e4cbf1", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 512, + "height": 512 + }, + { + "path": "template-gallery/inputs/restoring_the_studio_backdrop.mask.png", + "size": 568, + "sha256": "sha256:bytes:71817f4823a73712c8e76e7d832ec382c29ec0a0bf5a472e09639448c082da01", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 512, + "height": 512 + }, + { + "path": "template-gallery/inputs/sana_i2v_blue_hour_above_rice_terraces.first.png", + "size": 741863, + "sha256": "sha256:bytes:0644be42f8f1f2a8f9eed3df2cb14a8709d8b681c23749cc4bb69e41d4d0618e", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 832, + "height": 480 + }, + { + "path": "template-gallery/inputs/sana_sprint_monochrome_tiger.before.webp", + "size": 256118, + "sha256": "sha256:bytes:a99616590d7d8586a51a25bbe9e36b309f705bc80f2abaab04ac84f1e0d948e4", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/sd15_canny_guided_green_glass.before.png", + "size": 9470, + "sha256": "sha256:bytes:6d47a2f07006b98f9e5cfc8ee925914c4dbfa39fd38b0b61770be56d12ed04e8", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 512, + "height": 512 + }, + { + "path": "template-gallery/inputs/sd15_control_cobalt_handmade_paper.before.png", + "size": 271303, + "sha256": "sha256:bytes:d143c4922ad498b9bd436d06df424bbff50baf023b93735b53ee401e19e4cbf1", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 512, + "height": 512 + }, + { + "path": "template-gallery/inputs/sd15_control_cobalt_handmade_paper.guide.png", + "size": 9470, + "sha256": "sha256:bytes:6d47a2f07006b98f9e5cfc8ee925914c4dbfa39fd38b0b61770be56d12ed04e8", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 512, + "height": 512 + }, + { + "path": "template-gallery/inputs/sd15_control_cobalt_studio_wall_repair.before.png", + "size": 271303, + "sha256": "sha256:bytes:d143c4922ad498b9bd436d06df424bbff50baf023b93735b53ee401e19e4cbf1", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 512, + "height": 512 + }, + { + "path": "template-gallery/inputs/sd15_control_cobalt_studio_wall_repair.guide.png", + "size": 9470, + "sha256": "sha256:bytes:6d47a2f07006b98f9e5cfc8ee925914c4dbfa39fd38b0b61770be56d12ed04e8", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 512, + "height": 512 + }, + { + "path": "template-gallery/inputs/sd15_control_cobalt_studio_wall_repair.mask.png", + "size": 568, + "sha256": "sha256:bytes:71817f4823a73712c8e76e7d832ec382c29ec0a0bf5a472e09639448c082da01", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 512, + "height": 512 + }, + { + "path": "template-gallery/inputs/sd15_pag_canny_guided_glass.before.png", + "size": 9470, + "sha256": "sha256:bytes:6d47a2f07006b98f9e5cfc8ee925914c4dbfa39fd38b0b61770be56d12ed04e8", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 512, + "height": 512 + }, + { + "path": "template-gallery/inputs/sd15_pag_cobalt_studio_repair.before.png", + "size": 271303, + "sha256": "sha256:bytes:d143c4922ad498b9bd436d06df424bbff50baf023b93735b53ee401e19e4cbf1", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 512, + "height": 512 + }, + { + "path": "template-gallery/inputs/sd15_pag_cobalt_studio_repair.mask.png", + "size": 568, + "sha256": "sha256:bytes:71817f4823a73712c8e76e7d832ec382c29ec0a0bf5a472e09639448c082da01", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 512, + "height": 512 + }, + { + "path": "template-gallery/inputs/sd15_pag_control_wall_repair.before.png", + "size": 271303, + "sha256": "sha256:bytes:d143c4922ad498b9bd436d06df424bbff50baf023b93735b53ee401e19e4cbf1", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 512, + "height": 512 + }, + { + "path": "template-gallery/inputs/sd15_pag_control_wall_repair.guide.png", + "size": 9470, + "sha256": "sha256:bytes:6d47a2f07006b98f9e5cfc8ee925914c4dbfa39fd38b0b61770be56d12ed04e8", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 512, + "height": 512 + }, + { + "path": "template-gallery/inputs/sd15_pag_control_wall_repair.mask.png", + "size": 568, + "sha256": "sha256:bytes:71817f4823a73712c8e76e7d832ec382c29ec0a0bf5a472e09639448c082da01", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 512, + "height": 512 + }, + { + "path": "template-gallery/inputs/sd15_pag_mountain_lake_watercolor.before.png", + "size": 1509971, + "sha256": "sha256:bytes:88290a96bc8d52f11f2d1e3c0c0e04c2027661816e54b57d7d4739d731ca1e75", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/sdxl_blue_glass_on_linen.before.png", + "size": 624887, + "sha256": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/sdxl_canny_adapter_glass_study.before.png", + "size": 7281, + "sha256": "sha256:bytes:6bd07628a37c087178e9de58a98c6c5879468163f1a2376a581511a42503e2e2", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/sdxl_clear_cobalt_backdrop.before.png", + "size": 623267, + "sha256": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/sdxl_clear_cobalt_backdrop.mask.png", + "size": 1571, + "sha256": "sha256:bytes:1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/sdxl_control_golden_boathouse.before.png", + "size": 2140271, + "sha256": "sha256:bytes:e1d9736125cad717896f0c7d5274a6373676559f250d76cedcc8f8aae9379ec6", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/sdxl_control_golden_boathouse.guide.png", + "size": 1030761, + "sha256": "sha256:bytes:322a9aa511a7d21524758724b1666fc220abf563def5e5d1294630e7e58a3b96", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/sdxl_control_inpaint_warm_plaster.before.png", + "size": 623267, + "sha256": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/sdxl_control_inpaint_warm_plaster.guide.png", + "size": 624887, + "sha256": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/sdxl_control_inpaint_warm_plaster.mask.png", + "size": 1571, + "sha256": "sha256:bytes:1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/sdxl_controlnet_glass_study_on_slate.before.png", + "size": 7281, + "sha256": "sha256:bytes:6bd07628a37c087178e9de58a98c6c5879468163f1a2376a581511a42503e2e2", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/sdxl_pag_cobalt_wall.before.png", + "size": 623267, + "sha256": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/sdxl_pag_cobalt_wall.mask.png", + "size": 1571, + "sha256": "sha256:bytes:1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/sdxl_pag_lighthouse_in_graphite.before.png", + "size": 1663180, + "sha256": "sha256:bytes:4cbc984b44c398b6e92b4350513d3543139e9dffe01a38857845c8a7698272c8", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/sdxl_pag_snow_cabin.before.png", + "size": 8404, + "sha256": "sha256:bytes:ca250462efc77625134ebe305b2ee67281a1dcf8919e45299c648f0fdacf919a", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/sdxl_pag_two_tier_cobalt_glass.before.png", + "size": 613011, + "sha256": "sha256:bytes:ff30b36f685b657db6de0cb59dff37601e147123ba19b9c42a32fc1060bd323e", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/sdxl_pag_two_tier_cobalt_glass.guide.png", + "size": 6118, + "sha256": "sha256:bytes:64e81c4250408ca9a2ffc11e2987413096ae65674c2935a0417a351a50bb3ba4", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/sdxl_pix2pix_pale_amber_glass.before.png", + "size": 494048, + "sha256": "sha256:bytes:ebaca95f96d1573e4292ffc65c78eb0dcf8ff9cc8b5a7e11ec81face61b160fb", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 768, + "height": 768 + }, + { + "path": "template-gallery/inputs/spandrel_tram_shelter_video_2x.before.mp4", + "size": 373918, + "sha256": "sha256:bytes:5c24b2b67f893f48e4dbf0d893e0aa4308852592f30f8179b44298cca4ce197e", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/inputs/spandrel_x2_synthetic_gradient.before.png", + "size": 177, + "sha256": "sha256:bytes:626815c78eaad46cad849732d1598b45b91700ce046c1ee3f4e2444db80aa32a", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 64, + "height": 48 + }, + { + "path": "template-gallery/inputs/stable_video_lighthouse_headland.first.png", + "size": 883588, + "sha256": "sha256:bytes:41f07c8ec7ab5d7097cba0f77867b61e666c6a803900784697ff816b851b98de", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 576 + }, + { + "path": "template-gallery/inputs/wan_a14b_wind_across_pond.first.png", + "size": 669116, + "sha256": "sha256:bytes:cd29e54e208f6040d3f4cbbf8c9f096d537f8c71dffb50d5abae3298cc49deaf", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 768, + "height": 512 + }, + { + "path": "template-gallery/inputs/wan_animate_glasshouse_keeper.background.mp4", + "size": 389870, + "sha256": "sha256:bytes:56d9cdc81884fc95644f38a5761ce4be55a441be9c572d3112f2c324541c315e", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/inputs/wan_animate_glasshouse_keeper.face.mp4", + "size": 1640506, + "sha256": "sha256:bytes:b90706154957e438dc3df732e59b97467872221695ec87b3e135c8ad29ec9a7f", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/inputs/wan_animate_glasshouse_keeper.first.png", + "size": 434726, + "sha256": "sha256:bytes:ade9d6ac1301a5df16c94c0a03b25d201719f38766874b473f3c22c3fdd84be5", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 768, + "height": 512 + }, + { + "path": "template-gallery/inputs/wan_animate_glasshouse_keeper.mask.mp4", + "size": 4737, + "sha256": "sha256:bytes:66238c0f48aef7920122e948c9bfccb8c3c9af842ac989ba744edb575d30f3e2", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/inputs/wan_animate_glasshouse_keeper.pose.mp4", + "size": 59742, + "sha256": "sha256:bytes:2fd6db2696b9a6bc7457bb8b747af5cd7ec4ec5603e86b06f01e591f17ed39f2", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/inputs/wan_animate_signal_through_the_rain.face.mp4", + "size": 23786, + "sha256": "sha256:bytes:523c3b8d098977aa228f4319b81e675cb31ea96394eda45125dbfa24721d0d68", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/inputs/wan_animate_signal_through_the_rain.first.png", + "size": 484717, + "sha256": "sha256:bytes:5e73a03d1c557ef5572faad8f7b270ceb33be54e311982450fb5df2ba799d668", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 768, + "height": 512 + }, + { + "path": "template-gallery/inputs/wan_animate_signal_through_the_rain.pose.mp4", + "size": 59742, + "sha256": "sha256:bytes:2fd6db2696b9a6bc7457bb8b747af5cd7ec4ec5603e86b06f01e591f17ed39f2", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/inputs/wan_flf_blue_hour_at_the_tram_shelter.first.png", + "size": 695609, + "sha256": "sha256:bytes:6d2c561cf33919ae42e773d95a0232799da3f2b92a23a94dad80902cfb73527a", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 768, + "height": 512 + }, + { + "path": "template-gallery/inputs/wan_flf_blue_hour_at_the_tram_shelter.last.png", + "size": 659773, + "sha256": "sha256:bytes:191b023efb43a42288799877db722b9a2608d2970740246322ef38cc7c68c590", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 768, + "height": 512 + }, + { + "path": "template-gallery/inputs/wan_vace_amber_glass_stabilized.before.mp4", + "size": 88384819, + "sha256": "sha256:bytes:da6a0abe90bfc8c4efcb4a63201a6db839c944416cef49d452b629fbb86c3ec0", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/inputs/wan_vace_amber_glass_stabilized.mask.mp4", + "size": 47859, + "sha256": "sha256:bytes:c8eefe9665e6ba8965e7d48c5e6116f2e3ba230ac35390efb834140c5d4cdf8b", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/inputs/wan_vace_amber_glass_stabilized.reference.png", + "size": 1105663, + "sha256": "sha256:bytes:43a36ae8d33da045a6ad1321195cd163ce3188e1d119008860386afacd21dbc2", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1664, + "height": 960 + }, + { + "path": "template-gallery/inputs/wan_vace_grayscale_control.before.mp4", + "size": 289576, + "sha256": "sha256:bytes:748b164fd91bc2eed97f7c1d1125a04496a056f29cc016d7cc0da3734c2303b7", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/inputs/wan_vace_outpaint_reframe.before.mp4", + "size": 521627, + "sha256": "sha256:bytes:a8f28e04d03c9a6a2ba0b3ba4bf7db08f6ec99c45d962877cbc91aad5f3ad318", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/inputs/wan_vace_video_color_grade.before.mp4", + "size": 351753, + "sha256": "sha256:bytes:934b4494442c732bfc27f3de1e1a8e99adf0eb96572bd6405f1a9c72da148289", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/inputs/wan_vace_video_to_video.before.mp4", + "size": 1164611, + "sha256": "sha256:bytes:1f5cd051f787fc878bed50d3c26cce840abe00c942d32e49492e544ac2f88cff", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/inputs/zimage_golden_amber_glass.before.png", + "size": 494048, + "sha256": "sha256:bytes:ebaca95f96d1573e4292ffc65c78eb0dcf8ff9cc8b5a7e11ec81face61b160fb", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 768, + "height": 768 + }, + { + "path": "template-gallery/inputs/zimage_rocky_glacial_shores.before.png", + "size": 1003084, + "sha256": "sha256:bytes:50270382b4b730b87f79b775accaeeb81f3ff8885cd3d2cea94830206fbc181b", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 832, + "height": 768 + }, + { + "path": "template-gallery/inputs/zimage_seamless_cobalt_backdrop.before.png", + "size": 623267, + "sha256": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/inputs/zimage_seamless_cobalt_backdrop.mask.png", + "size": 1571, + "sha256": "sha256:bytes:1f48775f2826f84e0c5b55f16f3475bdc80ecad8b931d6b0279598610e9a828d", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/janus_red_enamel_teapot.webp", + "size": 33688, + "sha256": "sha256:bytes:c2cc1b06535dae0816a255e5a08bb20372a4cbd2c4b895f51273140dba4615eb", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 384, + "height": 384 + }, + { + "path": "template-gallery/janus_red_triangle_caption.json", + "size": 1791, + "sha256": "sha256:bytes:1fec185a203f16541cf13a02afff3c4333b83ff6c593a88fc59fa108801e6d44", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/janus_reykjavik_travel_note.json", + "size": 1834, + "sha256": "sha256:bytes:c7fb7a09d2480a8cffde6212e6686a5be04ccb01ec7811c7109281634d7c4daa", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/joy_plus_lavender_on_limestone.webp", + "size": 115464, + "sha256": "sha256:bytes:6c1f36ca4b6eb78cc6ce314e60534f4496fae9a972b3f03ce2254257aa9737a3", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/joy_plus_terracotta_on_limestone.webp", + "size": 126430, + "sha256": "sha256:bytes:d5aedb8394ef70b3281ca66760e5f6e693fa4275508010a9fe4d16776ca3baeb", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/joyimage_base_cobalt_paper_band.webp", + "size": 121610, + "sha256": "sha256:bytes:99fabcac42e8698eb652089bf52698690648937552975d54a68141be9a66b307", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/joyimage_herbarium_rainy_porthole.webp", + "size": 356600, + "sha256": "sha256:bytes:50213ff01502af1445d1d72618c3614c444931fd94739a53191bd2c36f36e578", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/kandinsky3_ginkgo_on_slate.webp", + "size": 578858, + "sha256": "sha256:bytes:4b33c6b278e6c9f036ee8f4a11fe6dd4dab58ad385407f844b1f0bb609557ab4", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/kandinsky3_smoked_glass_on_limestone.webp", + "size": 84442, + "sha256": "sha256:bytes:77d55b454e684b69306ae806b31911750ae496888e58c85c1d896a5f222b71dd", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/kontext_wide_water_alpine_ridge.webp", + "size": 457222, + "sha256": "sha256:bytes:18090bf07900510b2d99c7c4ab38b9e38dc680fe437def20b2ce7297265db4b8", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1344, + "height": 768 + }, + { + "path": "template-gallery/latte_water_folding_over_slate.mp4", + "size": 714235, + "sha256": "sha256:bytes:97cd72f79c9389e0c4f502be0759f4764e00861217cee1e11ce563b54d2d86b8", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/layers/qwen_layered_portrait.native-layer-00.webp", + "size": 103484, + "sha256": "sha256:bytes:ba904a37ab5bc2905458dfab79179aba4c268bcf409aa0444549664797eb5dea", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 640, + "height": 640 + }, + { + "path": "template-gallery/layers/qwen_layered_portrait.native-layer-01.webp", + "size": 70932, + "sha256": "sha256:bytes:abb3ae59bfd0395c477d2e20c7725ba75e4acef318f030cb0adb98837639e898", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 640, + "height": 640 + }, + { + "path": "template-gallery/layers/qwen_layered_portrait.native-layer-02.webp", + "size": 71524, + "sha256": "sha256:bytes:4ad39d3025e3421834d92b32ab5e1e49e4a3ce79602acf614758514f78e6db33", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 640, + "height": 640 + }, + { + "path": "template-gallery/layers/qwen_layered_portrait.preview-layer-00.png", + "size": 510676, + "sha256": "sha256:bytes:b9decdea3edb455655594b73d42e5c053f961500e7ff7d65367a2ca855692c87", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 640, + "height": 640 + }, + { + "path": "template-gallery/layers/qwen_layered_portrait.preview-layer-01.png", + "size": 383418, + "sha256": "sha256:bytes:52756ca48a3b51ccb16dc4859207a89cf7c2e38ccc4c0efc325f77718eaeb645", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 640, + "height": 640 + }, + { + "path": "template-gallery/layers/qwen_layered_portrait.preview-layer-02.png", + "size": 398851, + "sha256": "sha256:bytes:58cb19db09e8bfd29a74ce6edb8d7485960abb298659ec8826d4d8ebcc62930a", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 640, + "height": 640 + }, + { + "path": "template-gallery/layers/qwen_layered_sunset_and_peaks.layer-1.webp", + "size": 36622, + "sha256": "sha256:bytes:16ffd9f4a965c95164e51c9ee9d72295bc618972d3c67fb837c2df259187682c", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/layers/qwen_layered_sunset_and_peaks.layer-2.webp", + "size": 257204, + "sha256": "sha256:bytes:866609c2307a1f016cac7eefc56401491f58a2e2d57abf0c20b6bdb0f9da057f", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/layers/qwen_layered_sunset_and_peaks.layer-3.webp", + "size": 194496, + "sha256": "sha256:bytes:01b27cacca10c2ed53a8b9368d42697c2b13239113790d8291e20ccdb939a896", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/layers/qwen_layered_sunset_and_peaks.layer-4.webp", + "size": 253762, + "sha256": "sha256:bytes:186040c0eb257ec0de53821e6f3b03a7720ab2fe03b54a1d0b71290c2e0eda5c", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/lcm_dawn_alpine_lake.webp", + "size": 119274, + "sha256": "sha256:bytes:6da406d5e24cb7b9e62c1ee617ff8bca851b0f5da3cc7aef2b2e88ac73bfc8d0", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 512, + "height": 512 + }, + { + "path": "template-gallery/longcat_clear_glass_at_the_bookshop.webp", + "size": 481278, + "sha256": "sha256:bytes:a29ccb40ac98bbda8401abaa2b25b9d61722505188056468ae18e66887f89338", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/longcat_florist_end_of_lane.webp", + "size": 423160, + "sha256": "sha256:bytes:045dec822bcffaf2825dee3118446a536819a518475c78c4573d68dbb498825b", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/longcat_last_tram_at_dusk.wav", + "size": 237612, + "sha256": "sha256:bytes:6d7e8a05a49b111c59cda0fe69dfb7c5f92fb8e560ae468cf96a16bbd068a78b", + "contentType": "audio/x-wav", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/low_vram.webp", + "size": 230540, + "sha256": "sha256:bytes:a69d58bfa342f850d807690080ca9aac583ca9fb69115e55904de315f71938e1", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/ltx2_enamel_teapot_window_light.mp4", + "size": 3941814, + "sha256": "sha256:bytes:de941b83125f6a84a29c978f968541028dd6c1e41b5e3c4c95ba686ccb69274f", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/ltx2_glasshouse_drip.mp4", + "size": 5764256, + "sha256": "sha256:bytes:189410c3652a33b15d16ec0ad6c71b304d9ed2684f04247704202836d498b91c", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/ltx2_kiln_at_first_light.mp4", + "size": 1273728, + "sha256": "sha256:bytes:75c9bf0b44b5b4c7bcab8c8d7d1381d1b2695bc62d5a251916121c11b79178ed", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/ltx2_moss_and_basalt.mp4", + "size": 4920421, + "sha256": "sha256:bytes:e197eb3cb4ddaf13e4f0e4a71a4c92d30b1cae04dea651fd987213d84d262b09", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/ltx2_surf_below_the_breakwater.mp4", + "size": 7510392, + "sha256": "sha256:bytes:a8d3e7c63417bad7a8a949738fe4cf6f5beb8aa1694476a5289e7037d64dfcd9", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/ltx_long_wind_and_tide_at_the_headland.mp4", + "size": 235350, + "sha256": "sha256:bytes:62c8d0eb30f3900276fda6c9c48c8e676cc04385bfbbfe117eecd46144cb81ea", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/ltx_video_animated_story.card-poster.png", + "size": 2259121, + "sha256": "sha256:bytes:fcd07a3c5a3e8df1890f1dd98f72746a67025a7bf3c4f6559026b24a8afa445c", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1672, + "height": 941 + }, + { + "path": "template-gallery/ltx_video_animated_story.card-preview.mp4", + "size": 508410, + "sha256": "sha256:bytes:54935c2d3e0db8f926e05f7aacc8bc025f2c1d589951533d5aa32aab1a5e6f1d", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/ltx_video_animated_story.mp4", + "size": 35900274, + "sha256": "sha256:bytes:ca548363a0a64ea2011eb0e63e3fd65383c3e8fbbb6fa32126044c13720246f7", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/ltx_video_animated_story.poster.png", + "size": 1435568, + "sha256": "sha256:bytes:969f826c9943ba6c4e07507995d12566e9d31d7e32e47e1498f8d4697cb9a223", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1536, + "height": 1024 + }, + { + "path": "template-gallery/ltx_video_image_to_video.card-preview.mp4", + "size": 987796, + "sha256": "sha256:bytes:2effe668f4ad43f9b4780400581d282aee66714d8450eb999787a1c29338aea0", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/ltx_video_image_to_video.mp4", + "size": 30718837, + "sha256": "sha256:bytes:e8804713f41d641d6be227d6d2a2603a1ad17f33164e4a10fa1877101dbe4056", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/ltx_video_image_to_video.poster.png", + "size": 1269054, + "sha256": "sha256:bytes:eb63789359a844687ed56687ed0ead528c0845bf98631117d8cac28af0c58ad0", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1536, + "height": 1024 + }, + { + "path": "template-gallery/ltx_video_long_showcase.card-poster.png", + "size": 2687100, + "sha256": "sha256:bytes:a0b0f93ebf1558f7a8b7c96bb2024bdb55909a54c1362d9d1027ccc24614bdd5", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1672, + "height": 941 + }, + { + "path": "template-gallery/ltx_video_long_showcase.card-preview.mp4", + "size": 506890, + "sha256": "sha256:bytes:0dc4052d30ff6e11c31ba7ee869d14570739462e01426b6830d9e62c8e5379c7", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/ltx_video_long_showcase.mp4", + "size": 25330013, + "sha256": "sha256:bytes:ba1614fa9b86accd706d8fbc6c92818c43c058f9343cd97431711a47d9bef609", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/ltx_video_long_showcase.poster.png", + "size": 1038095, + "sha256": "sha256:bytes:729b368a30f479ebfa304116f4f60d00881b7935886a3683701f159cc2f51588", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1536, + "height": 1024 + }, + { + "path": "template-gallery/ltx_video_multi_reference.card-poster.png", + "size": 2987012, + "sha256": "sha256:bytes:95a7196b97f24cc113918a0d989a5b88ed4b29cb551a799c00a83f9b91acf8af", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1672, + "height": 941 + }, + { + "path": "template-gallery/ltx_video_multi_reference.card-preview.mp4", + "size": 604708, + "sha256": "sha256:bytes:c88c7624b05258ec757e1f543b64f2b42aa94eb02333708c4e5231c902046e55", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/ltx_video_multi_reference.mp4", + "size": 14926816, + "sha256": "sha256:bytes:debfbe7ec1d1afbba34d05c208762f472fc251434d347ef6021e8476539d7644", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/ltx_video_multi_reference.poster.png", + "size": 1483533, + "sha256": "sha256:bytes:0f4968be6c8acdd441197f8f3024e48ae103255925869531903af37bb347d859", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1536, + "height": 1024 + }, + { + "path": "template-gallery/ltx_video_text_to_video.card-poster.png", + "size": 2308944, + "sha256": "sha256:bytes:e131e2f676e04382117e77deeede145851fff469819d173073354cc5033b116d", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1672, + "height": 941 + }, + { + "path": "template-gallery/ltx_video_text_to_video.card-preview.mp4", + "size": 920701, + "sha256": "sha256:bytes:9b8defe3284dcc8bdb9e83485c93c73b65e8c5ade41afe5a383235b04d81b265", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/ltx_video_text_to_video.mp4", + "size": 18056810, + "sha256": "sha256:bytes:9b2b976acb65a6c4a9c2255e50d2b7a65a42bb54146d6d2a39625dfdd0b0fe14", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/ltx_video_text_to_video.poster.png", + "size": 1365296, + "sha256": "sha256:bytes:c1626d18f12d4cb226de81cca46c0ef9c57628707246efb237f12c30214292fd", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1536, + "height": 1024 + }, + { + "path": "template-gallery/ltx_video_video_to_video.card-poster.png", + "size": 2728925, + "sha256": "sha256:bytes:e5a259b5ab8a0b21b31cb8ba23ae7c0d45a7c9de193e76c1b2608c5709d0fe8c", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1672, + "height": 941 + }, + { + "path": "template-gallery/ltx_video_video_to_video.card-preview.mp4", + "size": 126116, + "sha256": "sha256:bytes:f414aaca530e5c7cf7792647a2a0c0efce2792de518e776f9efc3632f0d99306", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/ltx_video_video_to_video.mp4", + "size": 8288321, + "sha256": "sha256:bytes:7ecb7be76078fd602869629b2eba4534382afff58e779e0c70287041e0934b44", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/ltx_video_video_to_video.poster.png", + "size": 968461, + "sha256": "sha256:bytes:a51e109af8d0f913b6577a9a3f069629db849a895878c893c7c57b2a2292e033", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1536, + "height": 1024 + }, + { + "path": "template-gallery/lumina2_larch_on_glacial_pond.webp", + "size": 457128, + "sha256": "sha256:bytes:06491642cdf97ed7676ad237353957a42aa121a11d3f2423c1a4ac4dd6a53ee5", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/lumina_opal_pendant_in_limestone.webp", + "size": 279270, + "sha256": "sha256:bytes:3ff57e957b7db5ad20c9c37789a0536437846cdc8eb4737482cb7f026f25fb8e", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/manifest.json", + "size": 548992, + "sha256": "sha256:bytes:15616f0e250275d3b5c6771cf667e845a979b8a3e8e61fec6a72a59a6725c074", + "contentType": "application/json", + "purposes": [ + "runtime", + "tooling" + ] + }, + { + "path": "template-gallery/marigold_depth_synthetic_ramp.webp", + "size": 542, + "sha256": "sha256:bytes:129d4b01ca70f532e672214e85be073482aed461465b863467f0c871bf7c94db", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 64, + "height": 48 + }, + { + "path": "template-gallery/minimax_music3_chamber_pop.wav", + "size": 10596396, + "sha256": "sha256:bytes:f98a748584966f463bbac263c2b3a00769c70e074e26b2f91567e76381b7fd6b", + "contentType": "audio/x-wav", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/mochi_surf_over_dark_pebbles.mp4", + "size": 184158, + "sha256": "sha256:bytes:2462a31378c7108fa7c46143a89630798d8450f2d75f6e7ea4aa24f1621f2ce1", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/ochre_paper_pavilion.webp", + "size": 150332, + "sha256": "sha256:bytes:6fd64eda0cd96aca0f5c9d860fec6fed090426ff1c5cd5c9434a639755c06c1e", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/omnigen_cobalt_against_soft_apricot.webp", + "size": 66642, + "sha256": "sha256:bytes:305c3d2b35bc57b3151a332bc6084cbdf962337572c5e15ae3d7d546a07a1ead", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/omnigen_red_enamel_folded_linen.webp", + "size": 143918, + "sha256": "sha256:bytes:443062a26e22e3542e284f50d0274b7c70b881b3cce76568eb8eb22ce4c396d6", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/omnigen_tulips_after_rain.webp", + "size": 293564, + "sha256": "sha256:bytes:57d5f196f4abad78099482deeb23f37810075e6d708e289ca8eb4617acdbdde7", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/persimmon_glaze.webp", + "size": 67650, + "sha256": "sha256:bytes:0a8f757232720068dbf3ad94fa81e525c7e9d7260853680328019c43ded30279", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/pixart_sigma_pag_pink_mascot.webp", + "size": 249382, + "sha256": "sha256:bytes:3070a4858fe91e8567d36bfc706a6201690ccc27f341e5191be548c99f97c28c", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/pixart_sigma_terracotta_herbs.webp", + "size": 395394, + "sha256": "sha256:bytes:97aac37be4286b29536fd415783ee91c3879822ea122c705a5573ba251ac1441", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/pomegranate_on_blue_linen.webp", + "size": 142146, + "sha256": "sha256:bytes:ec62b729d1e4b37f37bd7fd8838b831ab10bd82662adc3a359a371cc7e756861", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 512, + "height": 512 + }, + { + "path": "template-gallery/porcelain_on_slate_linen.webp", + "size": 65926, + "sha256": "sha256:bytes:78a0954f82ae30dcc721d9087a54f62063d8b9ded7204838864b1d981a1e763d", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 512, + "height": 512 + }, + { + "path": "template-gallery/posters/spandrel_tram_shelter_video_2x.webp", + "size": 323458, + "sha256": "sha256:bytes:6ab0a30271cb628a0a9c50c6544c45ef82c9e2e84f436a8f68bd34e9da1c560e", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1800, + "height": 1100 + }, + { + "path": "template-gallery/posters/wan_a14b_cloudbreak_over_the_ridges.png", + "size": 377021, + "sha256": "sha256:bytes:c824b505dc5145519de68ecdd4eb3618f214bc8e3aa6a8fd8fada7433b1f509e", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 768, + "height": 512 + }, + { + "path": "template-gallery/posters/wan_ti2v_subway_musician.webp", + "size": 68512, + "sha256": "sha256:bytes:b035c7d59c603ff5c02ec1f1ea641241cf9e04698231f980903478957bcab40f", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 960, + "height": 528 + }, + { + "path": "template-gallery/quiet_current.webp", + "size": 109696, + "sha256": "sha256:bytes:c4db3876adb54a5f2bb9449ab4865601a24c2b486440f5c04d939a42a7f299a4", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/quiet_kiln_at_daybreak.webp", + "size": 202092, + "sha256": "sha256:bytes:3cbbe1b912086f3d97cbfd3e8ba4c077166d355b6ba0cf25a07441f2826aa6ab", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/qwen_2511_pale_amber_on_limestone.webp", + "size": 133998, + "sha256": "sha256:bytes:126660eff58b75eed79a942adc24e76f731decd65f83db098e72298141531772", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/qwen_2511_terracotta_material_transfer.webp", + "size": 159564, + "sha256": "sha256:bytes:5bd01cc1777cf575cc9824f801059f5426960920dc8a2b0da03c0b8f0cbca51d", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/qwen_2512_cobalt_backdrop_repair.webp", + "size": 168926, + "sha256": "sha256:bytes:6b3a9c583a930c462ec1d484b71d26d97346862c2d4e4a25aa35c2062e3dfefe", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1328, + "height": 1328 + }, + { + "path": "template-gallery/qwen_bookshop_gouache.webp", + "size": 787262, + "sha256": "sha256:bytes:555bab08051dc3a0381747c207ed241be3afd54c5c6113a8b4abf04010960201", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1328, + "height": 1328 + }, + { + "path": "template-gallery/qwen_character_angles.webp", + "size": 200648, + "sha256": "sha256:bytes:4a3a001c82fb171de587b505ad269b493eceefa2c243b9c1b4d1a7205777c354", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/qwen_cobalt_on_charcoal_slate.webp", + "size": 128874, + "sha256": "sha256:bytes:3cf9cea1b23834ec9dd589b37335250885be163eb4257155d8e76a08583dade2", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/qwen_control_image_layout.webp", + "size": 100258, + "sha256": "sha256:bytes:8aea21cd03849912745c7bbc1a2ceabad27cf3649947c6fb08fd86a7eec16c17", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 768, + "height": 768 + }, + { + "path": "template-gallery/qwen_control_winter_cabin_blue_hour.webp", + "size": 398200, + "sha256": "sha256:bytes:d54f6087af42a8af4f676f49b7c25cfa93df29343ab5cb151d2dc95e5ecd2039", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/qwen_edit_plus_single_image.webp", + "size": 165018, + "sha256": "sha256:bytes:be3f439416a3a4fe5647f032961908a3a4ac98c228cab0f7e13931e21d90e7de", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/qwen_edit_strength_sweep.webp", + "size": 198596, + "sha256": "sha256:bytes:964eb0865b5f5e07434e604b427aa1d25f77e606eb6c6ea104c730e7e7d3ac62", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/qwen_inpaint_mask_draft.webp", + "size": 323382, + "sha256": "sha256:bytes:fede5f1cd0f1b8a319eb5dee67377a989413ac7bf122df8dabd96415c7030908", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/qwen_inpaint_object_replace.webp", + "size": 161870, + "sha256": "sha256:bytes:4537acd74aac196bbc1fdf2804ee273605c6d1d44cf08f62e7ecc2f5cf892e39", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/qwen_layered_portrait.png", + "size": 1079459, + "sha256": "sha256:bytes:bcad98e6acbe9ea500f722977a33b72953c3991170ce346bff1f3455803ab4d8", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1536, + "height": 1108 + }, + { + "path": "template-gallery/qwen_layered_sunset_and_peaks.png", + "size": 322406, + "sha256": "sha256:bytes:5ccb86b18bc5f8a1c18376c72a0236ba9235a4904fef1a9e4f459ac31e2ede2d", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 960, + "height": 710 + }, + { + "path": "template-gallery/qwen_logo_texture.webp", + "size": 256582, + "sha256": "sha256:bytes:c4afc3f779e03437a122845ee9f19d149e5a049f0cce7b076047a69f964bc416", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/qwen_low_vram_poster_layout.webp", + "size": 262908, + "sha256": "sha256:bytes:65721301c3819ef40a48281f42c2f56c8ba129bb23545b3f20958d784be13e34", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 768, + "height": 1024 + }, + { + "path": "template-gallery/qwen_low_vram_product_concept.webp", + "size": 108284, + "sha256": "sha256:bytes:6e8f94cdb1e1323607300f6c60d76dc467900a2d520db117cfc34a02c5beb4cf", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 768 + }, + { + "path": "template-gallery/qwen_low_vram_text_rendering.webp", + "size": 234528, + "sha256": "sha256:bytes:884e21aefe6fecfe7015de8382d8dfac06ce5f92ce53c317c596e544d8f4edd4", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/qwen_multi_reference_product.webp", + "size": 195546, + "sha256": "sha256:bytes:c0377035121c03214e54df360f380f531a700efdf17a9e2f3d732dc18244e846", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/qwen_outpaint_aspect_template.webp", + "size": 403880, + "sha256": "sha256:bytes:d9ccf1960420a487ce16258167a88c7f4eb103fb24444ea0ad997487d1061554", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1344, + "height": 768 + }, + { + "path": "template-gallery/qwen_outpaint_draft.webp", + "size": 287108, + "sha256": "sha256:bytes:dfa97dd6b2acbe53b05814a1d6d525ca3fdddb2d1dbe000b3dab7fa1ed5feb6a", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1344, + "height": 768 + }, + { + "path": "template-gallery/qwen_packaging_dieline.webp", + "size": 142470, + "sha256": "sha256:bytes:1418c030b8efa5c033b3da9e07a62cc93446b6793c92ea7a707a8dac44820b6d", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 768, + "height": 768 + }, + { + "path": "template-gallery/qwen_poster_logo_text.webp", + "size": 260114, + "sha256": "sha256:bytes:0224a184cf3ea0338e4dc51a16b867d39ee84936471cd13c0deeb0f53cfd59b0", + "contentType": "image/webp", + "purposes": [ + "runtime", + "tooling" + ], + "width": 768, + "height": 1344 + }, + { + "path": "template-gallery/qwen_product_ad_composite.webp", + "size": 173146, + "sha256": "sha256:bytes:0bc45b6953d46b6553f549a01c39f8ce15d92472d0c855d60e52a8c74dfd4f5e", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/qwen_product_mockup.webp", + "size": 177478, + "sha256": "sha256:bytes:e0b112ee6bfec8be80815aac40618440d9b08d707e11446aeafc11d1b2b3c1c8", + "contentType": "image/webp", + "purposes": [ + "runtime", + "tooling" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/qwen_product_relight.webp", + "size": 196658, + "sha256": "sha256:bytes:927824741931202a42d711f671723ee5b44353afb8741ed4f279dc7ee2e5dc5c", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/qwen_text_rendering.webp", + "size": 248624, + "sha256": "sha256:bytes:3ea86ebec84418b15a11c7ba0ee3a9e8ef1c0053e62ebdab5c9bb3beb7bae873", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/qwen_tile_extract.webp", + "size": 85964, + "sha256": "sha256:bytes:1b6523e040e6895af885ff53a1033a3caeeb18a4615788ed385a8f061eef6465", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1344, + "height": 768 + }, + { + "path": "template-gallery/qwen_upscale_finish.webp", + "size": 936062, + "sha256": "sha256:bytes:44fcaf1af605d6db76060cc2c6511b9a3a1e9cc2e0b8875f5aed295e5b1db6da", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 2048, + "height": 2048 + }, + { + "path": "template-gallery/recipes/ace_step_audio_variation.v1.json", + "size": 11279, + "sha256": "sha256:bytes:f6e8868f1b1990ae8f45c336edd77d47b837e9e4b313232f166628f6b0e4acb0", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/recipes/ace_step_audio_variation.v2.json", + "size": 11947, + "sha256": "sha256:bytes:f3edd6c987c5ded9cfb03e713a12ea38f4981d15dadc94d8db4c63d25c427f3a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/recipes/ace_step_lyric_music_video.accepted-20261115.json", + "size": 18385, + "sha256": "sha256:bytes:6764457ab58b9b8c2a289a3912f336f01b10f5bfca1bd11d9bea27ec507bc667", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/recipes/ace_step_lyric_music_video.inputs-20261115.json", + "size": 22933, + "sha256": "sha256:bytes:5bd98a0e2e48c331efb732fac1140d47c6f4272419999b6d0e0ee78a5fa99bbb", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/recipes/flux_kontext_multi_reference.v1.json", + "size": 9622, + "sha256": "sha256:bytes:38697d00973bb332113175f8671f8a4dfb3ee08ff2c498f83968a35c518fcf09", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/recipes/flux_kontext_multi_reference.v2.json", + "size": 11527, + "sha256": "sha256:bytes:44eb1ccfef00a503e210d2ec908ba4156900f973cf79097d9d089b7508e5b937", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/recipes/flux_lora_cinematic_octane_3d.v2.json", + "size": 10244, + "sha256": "sha256:bytes:3a351220f925b9bd2651f944804cb3758057d88ae6262e8435793ff1b3f2dec8", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/recipes/flux_redux_edit.v1.json", + "size": 10999, + "sha256": "sha256:bytes:bf1c6726baec3572b2cbbddc9c09f4bd84d13476209db5e2ee638848e122b673", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/recipes/flux_redux_edit.v2.json", + "size": 10127, + "sha256": "sha256:bytes:f7abf4561990b1d1fa83c65253eee8752dd7b9b8e9439cfe8f7912891429f263", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/recipes/flux_redux_multi_reference.accepted-20261115.json", + "size": 13108, + "sha256": "sha256:bytes:bf59cee1809a664b6b8c94dc47c21ef3c43b2562d6857d5a1786845ad3071dbe", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/recipes/ltx_video_animated_story.native-20261115.json", + "size": 13416, + "sha256": "sha256:bytes:a9b841a1a155441e2d9e224fc7cd09c27840702f7dfc9c9f8655df46e200dd0f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/recipes/ltx_video_long_showcase.native-20261115.json", + "size": 19254, + "sha256": "sha256:bytes:a5885f61526e138f6c4a8a364f1b400cbeceb342db4d8ed0ff3cecf6a58ae3c8", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/recipes/ltx_video_video_to_video.v1.json", + "size": 14717, + "sha256": "sha256:bytes:f83109ce73e45a5656056ed71ae8b6dcda302f2d0c976a01d91954298fa01c9d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/recipes/ltx_video_video_to_video.v2.json", + "size": 13196, + "sha256": "sha256:bytes:c6d4f4541870e99870cda26b52f410f6019474ebe65b14221528121f90561c65", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/recipes/minimax_music3_chamber_pop.v2.json", + "size": 9873, + "sha256": "sha256:bytes:bf5cfe8e8d0f01e9b87e681841496bbb3c6582f77d9744c400c3895b50fa23aa", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/recipes/wan_vace_cinematic_text_to_video.native-20261115.json", + "size": 12812, + "sha256": "sha256:bytes:e9d58fc801611410b05c2ebcd4fdd279f0fc34cb64339806f7b71d95ed1cd61b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/recipes/wan_vace_grayscale_control.native-20261115.json", + "size": 14961, + "sha256": "sha256:bytes:0fcf4b5c9de98f033f0c8164eb72d1bff452797deaaba56be247372bdf578ed4", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/recipes/wan_vace_outpaint_reframe.native-20261115.json", + "size": 15549, + "sha256": "sha256:bytes:447d4ec31e3650bda447a796ef399e743e782c66e4e81340d3747b1175c5aac4", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/recipes/wan_vace_video_color_grade.native-20261115.json", + "size": 15134, + "sha256": "sha256:bytes:698f7323acf85d3742d5e944776879a07e7a7e5574a38eb6e91950c5dcddbfc3", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/recipes/wan_vace_video_to_video.native-20261115.json", + "size": 14048, + "sha256": "sha256:bytes:33f855f3e17faaf2706294b7ed567f7f84ecaa39d62a41452077ffba45e4d5ca", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/recipes/wan_video_long_showcase.v2.json", + "size": 14658, + "sha256": "sha256:bytes:043dd704245e919f6359a944b50f37e770406b47b07bd2f2378cbd09143b5f46", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reference_fusion.webp", + "size": 322954, + "sha256": "sha256:bytes:fcce19c98e3931e5b15de0b7deee704fff89276b3dabbef53de49c73cf08c155", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/restoring_the_studio_backdrop.webp", + "size": 45142, + "sha256": "sha256:bytes:c17be5dd41fc9ee16e58d287503e5daf9507ee1536f9ba9db63182af1e74f693", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 512, + "height": 512 + }, + { + "path": "template-gallery/reviews/ace_step_audio_continuation.quality-review.json", + "size": 2439, + "sha256": "sha256:bytes:71d0e561ba26674f54c4ee09894578414a39ab55596afa74b847c915bbb09cfb", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ace_step_audio_continuation.reviewed-provenance.json", + "size": 137849, + "sha256": "sha256:bytes:1a6dff893fa8e715bff7c939fa196b6f352fe453d30daa888dbfd3d0d1af3314", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ace_step_audio_repaint.quality-review.json", + "size": 4292, + "sha256": "sha256:bytes:d2da911efe18959b70b2d7e9ae21c841edcaabf7e7b5df8022a46e900eab06e3", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ace_step_audio_repaint.reviewed-provenance.json", + "size": 129851, + "sha256": "sha256:bytes:c1204284a3e29dd12a124e56c30e8f42ed7a61352ae85ecab5157cbc34ce4ed1", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ace_step_audio_variation.quality-review.json", + "size": 3440, + "sha256": "sha256:bytes:10b071cd644d24c32029c89dfb2401bc9bb195e9ba928cd6e62303055b6ff032", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ace_step_audio_variation.reviewed-provenance.json", + "size": 129403, + "sha256": "sha256:bytes:d743875e83f219845db75512205f034b1f8de9e680c72d9766bfd7b2e78d2b25", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ace_step_lyric_music_video.quality-review.json", + "size": 7001, + "sha256": "sha256:bytes:9cddab829fa0930e41283d50058e3226f72ae8c49cca2272c89f8ed25785ea1a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ace_step_lyric_music_video.reviewed-provenance.json", + "size": 596523, + "sha256": "sha256:bytes:2b945109bd2623d85e91667d4c4aa77aeddb19db1ac152493e12ac951a79f49a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ace_step_text_to_audio.quality-review.json", + "size": 2431, + "sha256": "sha256:bytes:5e226af4594ba376023fbc2768f6b019cd846e0ac7fd51015d2c54c0dc723b6b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ace_step_text_to_audio.reviewed-provenance.json", + "size": 130775, + "sha256": "sha256:bytes:4b79e1e6ff29b9d54de6b4e8731e5d9dd268f67b0a5180fa39029cb5cb71826f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/allegro_basalt_shore_at_dawn.original-provenance.json", + "size": 1061, + "sha256": "sha256:bytes:a2996998d545c63c8b494e783fe57caa254f36dc961a70e708b28e03550bccac", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/allegro_basalt_shore_at_dawn.original-review.json", + "size": 683, + "sha256": "sha256:bytes:0b000fdf57c52d56adac605a0f840128da2c78e62aafc58fc3c441800196c747", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/allegro_basalt_shore_at_dawn.quality-review.json", + "size": 2544, + "sha256": "sha256:bytes:e5da20def6cd0d5058ff1088fa23538fc24d20f454aaf8e426550e07ebe1b0fa", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/allegro_basalt_shore_at_dawn.retained-template-provenance.json", + "size": 3549, + "sha256": "sha256:bytes:6057e4c649904336d8f2062637440260e4cadffe99e84d251d9e72427957f0f5", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/alpine_lake_in_oils.original-provenance.json", + "size": 3315, + "sha256": "sha256:bytes:9c9ff8e4bae92b7e4564fdc203a36a2cb625489c7b0ca9474ce9979f7bd2d519", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/alpine_lake_in_oils.original-review.json", + "size": 677, + "sha256": "sha256:bytes:9535ffb383b57c57805ca9ad24a1df06ec87fe005d821448727de9c04709a2bd", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/alpine_lake_in_oils.quality-review.json", + "size": 2525, + "sha256": "sha256:bytes:ca7c2fd6b10e3f100c7aff867aceb300f4fc93c5d4c3c93919fdf810fdf077b3", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/alpine_lake_in_oils.retained-template-provenance.json", + "size": 3564, + "sha256": "sha256:bytes:c268ddbea9ba90fcf556ac9afdcc6b290e103883c5c7e9b5b91a1312f0c4eacb", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatediff_candlelight_behind_amber_glass.original-provenance.json", + "size": 1429, + "sha256": "sha256:bytes:79862c74ca64222731ff6a86973283b578d12ebc72b6fa1e271177e9dcb814aa", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatediff_candlelight_behind_amber_glass.original-review.json", + "size": 681, + "sha256": "sha256:bytes:2cb4965c1c1a39eb2a1dcfc0609065b4db61c0b2360663744d4d0e600c9d087f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatediff_candlelight_behind_amber_glass.quality-review.json", + "size": 2584, + "sha256": "sha256:bytes:38711644268110700dffed84439a0ab8e5f35003b9823fc4b34dd1751291d4a1", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatediff_candlelight_behind_amber_glass.retained-template-provenance.json", + "size": 3770, + "sha256": "sha256:bytes:2ddc8e7e5616f8a222d9bebe0fab488e4fce11c1e2be03e9ba40d6153050763b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatediff_ivory_balloon_blue_mountains.original-provenance.json", + "size": 2036, + "sha256": "sha256:bytes:714874a82ef9979fbe7ec94fda08ba641db4264fcdfacd4008ec385bfcf30452", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatediff_ivory_balloon_blue_mountains.original-review.json", + "size": 959, + "sha256": "sha256:bytes:68c41e118c91f05d7d44d2f89d17bbe08e4f0081d7b03d4c7c56cb1f61bd117a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatediff_ivory_balloon_blue_mountains.quality-review.json", + "size": 2747, + "sha256": "sha256:bytes:1b02ea17ec15c71c00c0092566a6eca31887f1f0064f59e58041f008a48ed7a4", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatediff_ivory_balloon_blue_mountains.retained-template-provenance.json", + "size": 4397, + "sha256": "sha256:bytes:298df24429b6a944e33aa796bf1214547b6ce84f454b4b844c5d0a06492aa042", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatediff_pag_snowmelt_over_river_stones.original-provenance.json", + "size": 2460, + "sha256": "sha256:bytes:73a4c1a10f0a30ae90014daf6f8d7c113138636fe1b533efe7bb1aa9a8fe4a7f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatediff_pag_snowmelt_over_river_stones.original-review.json", + "size": 609, + "sha256": "sha256:bytes:19924850a8ecddec18e16ebe09af4050343b542b56bc5e5acd30e18976c8e6f9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatediff_pag_snowmelt_over_river_stones.quality-review.json", + "size": 2575, + "sha256": "sha256:bytes:278a3dd1683bbe793b8a0ba89d857cc3b2a46262b489f0dcc3e985188c5ffaf6", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatediff_pag_snowmelt_over_river_stones.retained-template-provenance.json", + "size": 4096, + "sha256": "sha256:bytes:9c3ffb884931cb7445f67de31986283eba87d34a67fcbd4212a17a48f324d46a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatediff_red_tram_in_watercolor.original-provenance.json", + "size": 1424, + "sha256": "sha256:bytes:e7a460bbb4657cda566f0c90b57d820aa0000785df2737e2ad7777296897f8a4", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatediff_red_tram_in_watercolor.original-review.json", + "size": 913, + "sha256": "sha256:bytes:5cc5387ab876b37c77b2f5885b7c2fc8948c048faee40d0a3748d670c7d46d9d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatediff_red_tram_in_watercolor.quality-review.json", + "size": 2924, + "sha256": "sha256:bytes:3828845174e5702fe4a393a86bc6e7b5847f1c8639b23800d61c6e3633183261", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatediff_red_tram_in_watercolor.retained-template-provenance.json", + "size": 3993, + "sha256": "sha256:bytes:137902583abc832020f92f256050bc44104f0762360f470138e654746d278b59", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatediff_red_tram_through_snow.original-provenance.json", + "size": 2314, + "sha256": "sha256:bytes:b5198902e667bfa48b915027b301a3150ec994c44b132213c3c855b24e3f08f8", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatediff_red_tram_through_snow.original-review.json", + "size": 1064, + "sha256": "sha256:bytes:eef73b832d4acfb53ca4d5ededbd580821d8d91ffb372fcdcfb55f5f469f33cc", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatediff_red_tram_through_snow.quality-review.json", + "size": 2692, + "sha256": "sha256:bytes:c5c55e2d2ac7cbb65ef5ed89611da7b51b57ed5ed52d110fb324fe772eae6a0d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatediff_red_tram_through_snow.retained-template-provenance.json", + "size": 4630, + "sha256": "sha256:bytes:aa34be488b31fd42a12a1db6ff4c0b0ba2ec653439f4a62011698aeb46b71baa", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatelcm_sunlit_surf.original-provenance.json", + "size": 2718, + "sha256": "sha256:bytes:ccbd715d022d2d0121c473a75ad2f06c9a1dbb782b43b5c626726b6df2888ded", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatelcm_sunlit_surf.original-review.json", + "size": 658, + "sha256": "sha256:bytes:273d0f2980b99943ead3cee2ce02a3cb67414cdd3ee3d258f555d168757ec1c8", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatelcm_sunlit_surf.quality-review.json", + "size": 2572, + "sha256": "sha256:bytes:491737730d41fb96fb03a8f220ba78248c72619a34be55a8cc64111d822b913b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/animatelcm_sunlit_surf.retained-template-provenance.json", + "size": 3894, + "sha256": "sha256:bytes:0d7bf5194255e03658f6934d1be023dbf4ee556c39b4ff2ad54c10f2e8da3ede", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/audioldm2_wind_through_high_pines.original-provenance.json", + "size": 1354, + "sha256": "sha256:bytes:d61c68aaeec091d060e4c9bd260ffe885326826db71078e904acacac42ea3c40", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/audioldm2_wind_through_high_pines.original-review.json", + "size": 702, + "sha256": "sha256:bytes:429e7cac396b1c29e7348015a777e3ab85483813d80cc6a3e1e5400d34f6f0f4", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/audioldm2_wind_through_high_pines.quality-review.json", + "size": 2438, + "sha256": "sha256:bytes:29dee8c7187cf2cd9b55070b86a8cdc9507df35ee0f69b63706c79f909273895", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/audioldm2_wind_through_high_pines.retained-template-provenance.json", + "size": 3438, + "sha256": "sha256:bytes:58a23cef1b5f084fb1ebca4a74af2c8fb42b39adba46ff2d769944086b224c9f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/bookshop_at_blue_hour.original-provenance.json", + "size": 2922, + "sha256": "sha256:bytes:3f3e4056350e5a1ee59d46aea727b87563ae6fc5fe11a491257e2af7d412f0bf", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/bookshop_at_blue_hour.original-review.json", + "size": 598, + "sha256": "sha256:bytes:26882cd197ba823799f50be6ea1c01098038ad3cee926a71edf7aa47038d7226", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/bookshop_at_blue_hour.quality-review.json", + "size": 2270, + "sha256": "sha256:bytes:345c8dfefaa685385a016fcf545a50bf4d7554b07cee8c04f76efa270d830e4d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/bookshop_at_blue_hour.retained-template-provenance.json", + "size": 3302, + "sha256": "sha256:bytes:47f8649c5c8bdf345ef71157478da39f55cccda4ef5e6a726bb4738c560de7d7", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/canal_lantern_in_warm_light.original-provenance.json", + "size": 2421, + "sha256": "sha256:bytes:3a802a1d1961ab209994af944eb3889cc6d675e3f9a409414c0504d344b38d7b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/canal_lantern_in_warm_light.original-review.json", + "size": 604, + "sha256": "sha256:bytes:fdfac320256dd1dd7bcaa77ef449fe39a537e871db6ea579500579148bffea23", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/canal_lantern_in_warm_light.quality-review.json", + "size": 2308, + "sha256": "sha256:bytes:721e6e325451df2320c2813bedce2b5c4b37d92d30ac974ca95b4f3edba6b316", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/canal_lantern_in_warm_light.retained-template-provenance.json", + "size": 3356, + "sha256": "sha256:bytes:5027304dcbef05cecb1baff1771c2f7f96671fee8d3fac34f9fece5f730c3885", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/character_edit.quality-review.json", + "size": 3905, + "sha256": "sha256:bytes:89cca4e7b8e466c614d973925b4775e18cec8c39e14e639a9d48b89918e7ae7f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/character_edit.reviewed-provenance.json", + "size": 106076, + "sha256": "sha256:bytes:fee8045c51a38c8c73f668af5e3f513d7f0cbbf6978122fe73d2487ab746e110", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/chroma_alpine_block_print.original-provenance.json", + "size": 1270, + "sha256": "sha256:bytes:f17d6523a55fcf5bd0c147d9a46dee5b6e7fc6363f6a08685ba8a65459f73cf2", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/chroma_alpine_block_print.original-review.json", + "size": 882, + "sha256": "sha256:bytes:a7ba022616f2a41b3046a7ac3ca7779a6f4efc5692bc02c21dc52701354f8a01", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/chroma_alpine_block_print.quality-review.json", + "size": 2565, + "sha256": "sha256:bytes:bb7979a051f9839fdee168737f18bf99c630f5e7edba7ab59f8e7471315d9413", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/chroma_alpine_block_print.retained-template-provenance.json", + "size": 3669, + "sha256": "sha256:bytes:d8643c8c82d299a62068afd7b38de0d24fcfd6882585370e73fbe63402726e4a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/chroma_copper_medallion_outpaint.original-provenance.json", + "size": 2229, + "sha256": "sha256:bytes:ce863e2679e5452c432729c3096dac08a7361d2e23dbee80a24230057c77cec9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/chroma_copper_medallion_outpaint.original-review.json", + "size": 650, + "sha256": "sha256:bytes:0e9ec0c5a89f56c48135a248e3418af86261bb649601e757cd8ee3e41b9fcbdd", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/chroma_copper_medallion_outpaint.quality-review.json", + "size": 2581, + "sha256": "sha256:bytes:09fc86de80eb03a9ae7346e73a1fa4f275e43252829b45b253e103496d9a60f1", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/chroma_copper_medallion_outpaint.retained-template-provenance.json", + "size": 4008, + "sha256": "sha256:bytes:729aad830c6768451f07c0ce0b5585e1cb6acc96511f3d4c5eb859562920d077", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/chroma_restored_cobalt_backdrop.original-provenance.json", + "size": 1422, + "sha256": "sha256:bytes:f87d18b81ff559f1298f0c780db0f5eb89e9f8219b4f4aff80c224bc3ef47ce4", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/chroma_restored_cobalt_backdrop.original-review.json", + "size": 851, + "sha256": "sha256:bytes:88d1fbfadc2e1d3456f492214f7e51da6bdfd253eb00343fb93990e16c9ba2b9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/chroma_restored_cobalt_backdrop.quality-review.json", + "size": 2325, + "sha256": "sha256:bytes:803c31f4eb055884cbe955856e99f9846f9259ae58ad6c883d686de581c0dd09", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/chroma_restored_cobalt_backdrop.retained-template-provenance.json", + "size": 4094, + "sha256": "sha256:bytes:5232b12615a38293b0d86378fdde3003a61a8f5834de95f395a9364e12dd8fd4", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/chroma_terracotta_and_blue.original-provenance.json", + "size": 1746, + "sha256": "sha256:bytes:92a7762ec200afa64405b665dbd19d630b846f55bdb170fc08bfb5c588b1d258", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/chroma_terracotta_and_blue.original-review.json", + "size": 428, + "sha256": "sha256:bytes:d935f45b897cc717315684e2b180097b2e3892d275b4c38e96f2a9ec930ae24f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/chroma_terracotta_and_blue.quality-review.json", + "size": 2389, + "sha256": "sha256:bytes:2435a255e05519ab5b750b4728217d7f938631213ffeeb6da882dcb184e9fa7b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/chroma_terracotta_and_blue.retained-template-provenance.json", + "size": 3309, + "sha256": "sha256:bytes:95d0a67308f0dd2b8024a39cacca3fcfd82611a03d01f76a38a429dd1c4c2077", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/cobalt_jug_and_lemons.original-provenance.json", + "size": 2633, + "sha256": "sha256:bytes:c9b80942080368a5e13eef6d01a31691034655d618c40ef89ab9bd1b0ade0c7e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/cobalt_jug_and_lemons.original-review.json", + "size": 853, + "sha256": "sha256:bytes:f55b66df26013db2e002b925f1aceececec95ebd311a306bb082258f292751f1", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/cobalt_jug_and_lemons.quality-review.json", + "size": 2680, + "sha256": "sha256:bytes:da64a4e035bbe030a037ddfaf23a16946114d0e680c842f37976cc50ff8d6970", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/cobalt_jug_and_lemons.retained-template-provenance.json", + "size": 3318, + "sha256": "sha256:bytes:066fee762cae8b5f92625cc71f4002422828b06115024c3ce11affd68f34544e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/cogvideox_mossy_mountain_stream.original-provenance.json", + "size": 1330, + "sha256": "sha256:bytes:33e7bae227d98d35af005ca13238e9adfb288160165643330621b871c48ac32c", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/cogvideox_mossy_mountain_stream.original-review.json", + "size": 583, + "sha256": "sha256:bytes:3678c4a805bb1d6b4205c0d3d97df2f559b65740a7519ba19674456c26d54d13", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/cogvideox_mossy_mountain_stream.quality-review.json", + "size": 2694, + "sha256": "sha256:bytes:43fcf40d6bec403f203be3b2386ef27e345752c5dc53882ab2df45537dcbfcd1", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/cogvideox_mossy_mountain_stream.retained-template-provenance.json", + "size": 3514, + "sha256": "sha256:bytes:2e96867659142d6f562c4607f0db301aa2f003bfb9c4f29f333751365a5d7b66", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/cogvideox_red_tram_model_railway.original-provenance.json", + "size": 1239, + "sha256": "sha256:bytes:b63d433a2ae3627d260abf77dca4bca8ded0798a3449e9fb5b460628c5a2fa08", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/cogvideox_red_tram_model_railway.original-review.json", + "size": 741, + "sha256": "sha256:bytes:0b2030e77910993ce5e1947c5378e06ab488e1243b79e67cc6edd44c3cd8d462", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/cogvideox_red_tram_model_railway.quality-review.json", + "size": 2488, + "sha256": "sha256:bytes:56466f759c750421f135ebf3069202ae9eb0374a9f2ee4327b95b0490ec3a583", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/cogvideox_red_tram_model_railway.retained-template-provenance.json", + "size": 3774, + "sha256": "sha256:bytes:71ff0983139861b9a21d9b2882974bb5e96d11903563df161578818d795a1290", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/consistency_64_technical_preview.original-provenance.json", + "size": 1051, + "sha256": "sha256:bytes:c82dfa46d0a9c91b1feeda1193f8edc71f9b41764c039fde7f6342baa26a0308", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/consistency_64_technical_preview.original-review.json", + "size": 506, + "sha256": "sha256:bytes:82808ed1d53a1d3f2d221a562605d1d069a4dd7ceb047d87587437b6b2e0842a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/consistency_64_technical_preview.quality-review.json", + "size": 2444, + "sha256": "sha256:bytes:b4c1485e93b6e771f7179a46190fb3abd473c0755eda9cf3c3a502281ffd6b80", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/consistency_64_technical_preview.retained-template-provenance.json", + "size": 3394, + "sha256": "sha256:bytes:e7f7e6760448ffa8638c917540596a40382e0cd2b26d4d290346e03127ac0564", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/copper_hour_dunes.original-provenance.json", + "size": 3659, + "sha256": "sha256:bytes:6223329bd7a1a962703aefba1379c33dae7f57daa40a09aa8e77c1cdd05b099c", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/copper_hour_dunes.original-review.json", + "size": 839, + "sha256": "sha256:bytes:1da7406a3792d864c6aa0e010203a15d608a2f85372e530aabdeabfd7dc7e529", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/copper_hour_dunes.quality-review.json", + "size": 2722, + "sha256": "sha256:bytes:bc0ce5cb8d1e26c9b3491f5d1653365ca11b5305b25cd32647b08398bf889e8f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/copper_hour_dunes.retained-template-provenance.json", + "size": 3274, + "sha256": "sha256:bytes:b1d27bc198b128e1085d6b920a62dff73ed1684735c0d9b7eefbd28ab52d7e5b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/cosmos3_super_text_to_image.original-provenance.json", + "size": 1821, + "sha256": "sha256:bytes:a7aeac67324bb549099efc0baf5dce1f4ee14108a2e41412a2ad6e8be6317e5b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/cosmos3_super_text_to_image.original-review.json", + "size": 693, + "sha256": "sha256:bytes:fdddc90b1953e7e304f263d219941667b756f3cf07e33ef25c1e371e88f849f4", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/cosmos3_super_text_to_image.quality-review.json", + "size": 2638, + "sha256": "sha256:bytes:a5f08e5fa500a0c3f2cecfa572cb8d9c666e6680d0eff5bb8fac9b392cc61fab", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/cosmos3_super_text_to_image.reviewed-provenance.json", + "size": 3192, + "sha256": "sha256:bytes:73996ca96a80f8244ecb17c4455ae9ea851b09c01c2af1ec8eb62ea0d67aea60", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ddim_cifar10_preview.original-provenance.json", + "size": 873, + "sha256": "sha256:bytes:8fc838dd4bc701aa0c65e6b2630cc749d05736d23623591e3d1ac5af3d6b93d9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ddim_cifar10_preview.original-review.json", + "size": 474, + "sha256": "sha256:bytes:5a793d20a7b28f16f07648dce956a5cf5d2ecf8b50d85ca9005f965196102391", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ddim_cifar10_preview.quality-review.json", + "size": 2306, + "sha256": "sha256:bytes:24698d674171ad14c31fba20652e694b1e845214fe802d32cb7d0e42611cb7c2", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ddim_cifar10_preview.retained-template-provenance.json", + "size": 3342, + "sha256": "sha256:bytes:8f2075aff72c4a31ca3e247ce7b1c1c6ebaa8b8f29d7ad7e124555543b7ddfbd", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ddpm_cifar32_technical_preview.original-provenance.json", + "size": 999, + "sha256": "sha256:bytes:766480adc6a7bcef178a8d124f1a4fca0fc03b1c708130a14c3b03afa1d110b0", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ddpm_cifar32_technical_preview.original-review.json", + "size": 488, + "sha256": "sha256:bytes:bea6f49fd79e6e4aa10fb89efd4774be93d87aa43f45a0f1369193c4646601a0", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ddpm_cifar32_technical_preview.quality-review.json", + "size": 2416, + "sha256": "sha256:bytes:a5b456f0922a48ac8be8bf15923da379a96af7ce3ef8f71225ddf34a0924d1c3", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ddpm_cifar32_technical_preview.retained-template-provenance.json", + "size": 3337, + "sha256": "sha256:bytes:466a9954a1a05984d31ac6a9b6cb5d3ed37c90460b039093f5dc89565bcf2673", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/fast_lora.quality-review.json", + "size": 2589, + "sha256": "sha256:bytes:96079ed2226e86a0a0686283402a8c4f567809c73d67138afb4d58fc46936a15", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/fast_lora.reviewed-provenance.json", + "size": 106511, + "sha256": "sha256:bytes:7a3e3ac94845ad37f5f374c1e808a5ff449b0e5776be72a1891bb2c106fdd722", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flowers_after_rain.original-provenance.json", + "size": 3371, + "sha256": "sha256:bytes:4368cd0ed92243d2cc6b5b628ffabba5e64339eeec153282832b253d68efaa87", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flowers_after_rain.original-review.json", + "size": 702, + "sha256": "sha256:bytes:0dadd907604fdde95baa31bcc981dd87cab836c1b167fc852542982163bbc455", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flowers_after_rain.quality-review.json", + "size": 2590, + "sha256": "sha256:bytes:4dc4ac8e4aa12dc1a9f0d685a3416d1039866c8b52d8d2560a8d3b0364cd5121", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flowers_after_rain.retained-template-provenance.json", + "size": 3284, + "sha256": "sha256:bytes:5251193aa4454f936e7677ee44b91d30938885e46645007effb8b1de8ea61f4a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux1_dev_limestone_studio_scratch_repair.original-provenance.json", + "size": 1674, + "sha256": "sha256:bytes:876f2fb80e0352d1c5d25648da72ec9324d03e46bad65e42cd487c415d952626", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux1_dev_limestone_studio_scratch_repair.original-review.json", + "size": 1023, + "sha256": "sha256:bytes:9c6d1ea38c006fe11dd5e65d5c82d040e20844d8d38c680b1d45ea189b9e2282", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux1_dev_limestone_studio_scratch_repair.quality-review.json", + "size": 2852, + "sha256": "sha256:bytes:1233ae9bdb89e3599b691f2bc14408f1f9dd762c3db734bb8fd828fce1f040b0", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux1_dev_limestone_studio_scratch_repair.retained-template-provenance.json", + "size": 4137, + "sha256": "sha256:bytes:61e8601aaefcc918f03d5f110d57e8f26cb2149d6034c22fb9c13915ddb70324", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux2_dev_text_to_image.original-provenance.json", + "size": 1726, + "sha256": "sha256:bytes:fa7804bfeda1cf96922fb74621ad8ac9d6efa8dc468e8154af27165d05d77038", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux2_dev_text_to_image.original-review.json", + "size": 720, + "sha256": "sha256:bytes:3d199d7d906fe2003fcc021c072409ce659821bbe5d40ee7fd1eabe1372e8700", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux2_dev_text_to_image.quality-review.json", + "size": 2530, + "sha256": "sha256:bytes:cf719c3bb27135496b83bca79ff124c9ae8aefa53a79016685bb1c91cddbab7b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux2_dev_text_to_image.reviewed-provenance.json", + "size": 2728, + "sha256": "sha256:bytes:045e16b448a74a7235a6919aabef1fde27de88b05d7fc59661665f1988e79aea", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux2_klein_edit.quality-review.json", + "size": 4024, + "sha256": "sha256:bytes:9fb22201199f326234b60ad2b1162dd14d3e94cf6e2bd4d00507c26d240aeebe", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux2_klein_edit.reviewed-provenance.json", + "size": 96521, + "sha256": "sha256:bytes:780517219787eafdce5362cfd9f8cab52f848397edde41b5b91ed9bb3c904462", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux2_klein_multi_reference.quality-review.json", + "size": 3297, + "sha256": "sha256:bytes:7f6d97ce71b303302117236ae3c8f3cd047801026a8f808916c69c9008c6c5c5", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux2_klein_multi_reference.reviewed-provenance.json", + "size": 98777, + "sha256": "sha256:bytes:dd9601157dcff562c822db19d08d7c7f7720a1e069945563609e87c7fc52cf77", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux2_klein_text_to_image.quality-review.json", + "size": 3928, + "sha256": "sha256:bytes:2a2f12b34c26df960805a7fcac925e8f36894326f271f20920f720e3b72499ac", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux2_klein_text_to_image.reviewed-provenance.json", + "size": 92220, + "sha256": "sha256:bytes:e24076267505e368ca3f117c3147640dd731493d23ab2cdb32e9581c27b6c366", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux3_klein_base_fp8r512_lora_style.quality-review.json", + "size": 3156, + "sha256": "sha256:bytes:6ecaa3d253c60a36cfa0129575fda00de91b7259d6d5d7aaf7a1eafc1c1539fb", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux3_klein_base_fp8r512_lora_style.reviewed-provenance.json", + "size": 101754, + "sha256": "sha256:bytes:bf2a88219068ec3c78bf3ab9f847f2c80d7e78035d574dbccc8d48c9c979bdc6", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux3_klein_base_fp8r512_multi_reference_edit.quality-review.json", + "size": 3132, + "sha256": "sha256:bytes:0666e990cc08d4014f2f913674e9637a86e4f62fee681de1287c949a6a7dcb5a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux3_klein_base_fp8r512_multi_reference_edit.reviewed-provenance.json", + "size": 132386, + "sha256": "sha256:bytes:df83c15df43ca7b2739db3032671014c3dea0cb0bd1cd4acb15df5dcccf443bd", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux3_klein_base_fp8r512_raw_coordinate_prompt.quality-review.json", + "size": 3020, + "sha256": "sha256:bytes:5a40f1c4b7c13f8678de7fdd41bf090c39071fc884c2e4dfed6c1f03e0ecb09c", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux3_klein_base_fp8r512_raw_coordinate_prompt.reviewed-provenance.json", + "size": 94834, + "sha256": "sha256:bytes:e5684e876125a01c342b522b2a0d8350ae978f6543ccdfcaf56ec2011ccebb5f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux3_klein_base_fp8r512_single_reference_edit.quality-review.json", + "size": 2937, + "sha256": "sha256:bytes:f81ca736173a93bb214088dda9879efd933675799244f363506770202ffc80e0", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux3_klein_base_fp8r512_single_reference_edit.reviewed-provenance.json", + "size": 100367, + "sha256": "sha256:bytes:145688ff7654e0f2b058caf1e3cdc7f4621cd160bc57967529fbfc6deba3e55f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux3_klein_base_fp8r512_text_to_image.quality-review.json", + "size": 2950, + "sha256": "sha256:bytes:e4db5a6f68664c24496139808737c35843ad013a84ed8c647cb7bda822b3ab55", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux3_klein_base_fp8r512_text_to_image.reviewed-provenance.json", + "size": 97026, + "sha256": "sha256:bytes:2db502f5981665759b16abab179f12ae0093312c5bc99fcc33bb346bc6d3ff05", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux3_klein_fp8r512_lora_style.quality-review.json", + "size": 3183, + "sha256": "sha256:bytes:563cf20531167d3661cecb5e6897bae7d8a1485eff49e7f16c8cd7fef6486f10", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux3_klein_fp8r512_lora_style.reviewed-provenance.json", + "size": 93938, + "sha256": "sha256:bytes:945f99e2d8c924809a4e9d6f91056ec417715b7db5e06b2ec0d51a016bdc219b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux3_klein_fp8r512_multi_reference_edit.quality-review.json", + "size": 3159, + "sha256": "sha256:bytes:ba9c380fe4ccea2f731999d6aa7d116e4ebf4078c8ddb29ea88f2fee8d37dec9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux3_klein_fp8r512_multi_reference_edit.reviewed-provenance.json", + "size": 124866, + "sha256": "sha256:bytes:d89ef493877766cc1eb753cc6bdfd9e44dd6a71f33c8969287b4e70b33544f31", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux3_klein_fp8r512_raw_coordinate_prompt.quality-review.json", + "size": 3041, + "sha256": "sha256:bytes:5b8429b8102aba95b1fc76e8ff0b3ee823a489ae1ae771c5f10b2c92f583ddf5", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux3_klein_fp8r512_raw_coordinate_prompt.reviewed-provenance.json", + "size": 87364, + "sha256": "sha256:bytes:27ec68baa354642081ee764d33632cafcfeb8477ef05ec6ce1e7ec9d2925d410", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux3_klein_fp8r512_single_reference_edit.quality-review.json", + "size": 2937, + "sha256": "sha256:bytes:d3af7d89f63eabfd9313ca12b8ec6b644ae14379265e83ecf75aab453c2df4af", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux3_klein_fp8r512_single_reference_edit.reviewed-provenance.json", + "size": 92880, + "sha256": "sha256:bytes:bf0f06495f4d9793ebf0f8bc8c4467e6aead1b935bbb5e319b59b92dac3e1b78", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux3_klein_fp8r512_text_to_image.quality-review.json", + "size": 2953, + "sha256": "sha256:bytes:9c42b9b5987079824364e4749eaee7e9846949c8a8f9142092ac716447bbf063", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux3_klein_fp8r512_text_to_image.reviewed-provenance.json", + "size": 89559, + "sha256": "sha256:bytes:bb4186fd1e2fdb16f03bbda92673cbbad1169c0c20a13987775eac45ffcca1d2", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_canny_black_ink_cube.original-provenance.json", + "size": 1472, + "sha256": "sha256:bytes:ffa8a788f7fb52949d814a9f49fcce56b0c24eedeebcc93ac096af99eccc984b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_canny_black_ink_cube.original-review.json", + "size": 565, + "sha256": "sha256:bytes:0d2613893fe629784a951879aa26d8edbec5b41635d28daf727aa8ff9ad6c5c5", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_canny_black_ink_cube.quality-review.json", + "size": 2681, + "sha256": "sha256:bytes:876e52c4f3137edf34fc3f53ff22a751a987816d9ec54ffc9206627e6a25bcce", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_canny_black_ink_cube.retained-template-provenance.json", + "size": 3875, + "sha256": "sha256:bytes:78610fce6104c3ab1a363716af15194a02a1466e697590b3af0aa3f8edf9aebd", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_canny_clean_backdrop.original-provenance.json", + "size": 1732, + "sha256": "sha256:bytes:7936bae847ef1c4e92911b3bede96023c8f2e13a67a43775eea3de2b73715f1d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_canny_clean_backdrop.original-review.json", + "size": 697, + "sha256": "sha256:bytes:d45aba0a147f85b027af25e241062e1ff06bb4036eb8d89d5b2b276c4d1368cd", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_canny_clean_backdrop.quality-review.json", + "size": 2257, + "sha256": "sha256:bytes:f14973c5ea5b0c681d9b268c6af7cf6e99b703e3496bea6396217366a2834fe9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_canny_clean_backdrop.retained-template-provenance.json", + "size": 4136, + "sha256": "sha256:bytes:9ddd33a59bfbaa565d73d420d0bb94178a94d1ca498018146307ee223e899a0e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_control_canny.quality-review.json", + "size": 4766, + "sha256": "sha256:bytes:18fe010ceca23f0e99deb1d854905d52d805c45931b4ab523c364ac36ae594ab", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_control_canny.reviewed-provenance.json", + "size": 163707, + "sha256": "sha256:bytes:de3e003b083c9ecbf1dfae92a5c9a225c963943be0820aba88e24723aecc70b0", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_depth_control.quality-review.json", + "size": 4666, + "sha256": "sha256:bytes:cfa61450e6b63ad91cdba6b5d17c8ee316db1ce6005b19569595e173c9800daf", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_depth_control.reviewed-provenance.json", + "size": 162839, + "sha256": "sha256:bytes:845284bdb0898bb02ddd178e1de0c4b24e2281ae8f84c15eb09de2798abfcf79", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_depth_marine_bow_repair.original-provenance.json", + "size": 1726, + "sha256": "sha256:bytes:6f4297f6c64a1fad1390983a37e4015f055f1c9b57b3027b7a5d8f5f21548d21", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_depth_marine_bow_repair.original-review.json", + "size": 777, + "sha256": "sha256:bytes:2bc453fab2b78d2814c146229b2983eb25f462f0aa7f0c887a69be55d36d0849", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_depth_marine_bow_repair.quality-review.json", + "size": 2533, + "sha256": "sha256:bytes:191b266ccc8742d66c753b8cae2dfefd06dd007aad43591dc5fc544711be9a3e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_depth_marine_bow_repair.retained-template-provenance.json", + "size": 4156, + "sha256": "sha256:bytes:93addd088b5f77d730cd7791c03326143216fe0f59ab07b81f5a5ec8b4ca7799", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_depth_marine_teal_bow_edit.original-provenance.json", + "size": 1468, + "sha256": "sha256:bytes:1693d179dfee6ccaada54e291c4dee8f818a30ce4adab5d26a2f835a4340a0dd", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_depth_marine_teal_bow_edit.original-review.json", + "size": 536, + "sha256": "sha256:bytes:7722237c624f3fa884dade97287657a67130ccf29879ac0ab98c39c7da0e5ed7", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_depth_marine_teal_bow_edit.quality-review.json", + "size": 2639, + "sha256": "sha256:bytes:f4e528d2c0cdd892a93074a909de8988b0deed238fe06fa38b9d6cbfb66044ed", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_depth_marine_teal_bow_edit.retained-template-provenance.json", + "size": 3903, + "sha256": "sha256:bytes:41803e83072069305fa268ce320f359268e9422e93e94ca8838ed10707e770a7", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_dev_expert_text_to_image.quality-review.json", + "size": 4079, + "sha256": "sha256:bytes:4b7d81b2a342e898519cfef4ea3ada3325831a7a0c93b0966a42d59f74999715", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_dev_expert_text_to_image.reviewed-provenance.json", + "size": 102483, + "sha256": "sha256:bytes:56dd0d53dd62f58ff085722eb7266a7c4e10e591b0a78a9408c3b2061e656182", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_dev_forest_green_teapot.original-provenance.json", + "size": 1312, + "sha256": "sha256:bytes:28609162b2b43dace4e077983617ab5160c9af14e1547f422809d4b7a972c73f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_dev_forest_green_teapot.original-review.json", + "size": 540, + "sha256": "sha256:bytes:f6798fd9a441c2af0f5d766201406c7935c257ee0c67125571aefe6df6226b27", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_dev_forest_green_teapot.quality-review.json", + "size": 2619, + "sha256": "sha256:bytes:585a69e794e648da35ca0890b5d86ac00a456369bf7e4b7ddfc2e27c0e2779cf", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_dev_forest_green_teapot.retained-template-provenance.json", + "size": 3717, + "sha256": "sha256:bytes:fef44975f3e9e55d2f8144ecaa9a9c1907e4312add999370ca4d4da6cb67e721", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_fill_inpaint.quality-review.json", + "size": 5326, + "sha256": "sha256:bytes:118df046dca340d5130af71eefea56e4d0182c2beb9b01ac4de9da102fb002ff", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_fill_inpaint.reviewed-provenance.json", + "size": 168046, + "sha256": "sha256:bytes:43b64ed1f67a2e36e9d7646eae58bc0aad9b1d49925425f5ebb98a0607577c3d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_fill_outpaint.quality-review.json", + "size": 4863, + "sha256": "sha256:bytes:cf7d2d52d6d95733fd75be94e96fac1b331e8ad8996d615640123e95d3604edf", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_fill_outpaint.reviewed-provenance.json", + "size": 167448, + "sha256": "sha256:bytes:83bd50a5df98a04d55a86ca75b3f39a5d87d11221910a8f2d1cc570dc5cc423c", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_klein_alpine_lake_panorama.original-provenance.json", + "size": 1582, + "sha256": "sha256:bytes:82e163fa04890d8549972f17c4d863ba445dd9f2f1088199737d534b807c9e97", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_klein_alpine_lake_panorama.original-review.json", + "size": 1110, + "sha256": "sha256:bytes:0af53835f9eb84a14dbbd91c1c6527b27d7e2ef05682c5c5a8b9a120599220c7", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_klein_alpine_lake_panorama.quality-review.json", + "size": 2610, + "sha256": "sha256:bytes:6903b5b197080a67979212e174d52cf4e68a85773c6b6011f8c8d0b2eb5d0271", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_klein_alpine_lake_panorama.retained-template-provenance.json", + "size": 3982, + "sha256": "sha256:bytes:0d74c14cd0dde401464e43f75a8c126b881bbbeb05bf145297ad33d575022aeb", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_klein_open_glacial_lake.original-provenance.json", + "size": 1489, + "sha256": "sha256:bytes:5b7df305704e076244a7d1fbd4e64589e7825ee96a116c0a9a6ef4c16a3231e5", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_klein_open_glacial_lake.original-review.json", + "size": 890, + "sha256": "sha256:bytes:127d7ce73ad054114252277de338834612bed27d675c1e48dc377bedb84fb237", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_klein_open_glacial_lake.quality-review.json", + "size": 2409, + "sha256": "sha256:bytes:8fbb74c11639cba4c5ab3fab926e29d8e3c703ba5830fe9305352119e962dd60", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_klein_open_glacial_lake.retained-template-provenance.json", + "size": 4104, + "sha256": "sha256:bytes:cce6957687fe79ea590c44ce56f1ac0c594f6df854c4e367e88c4509c0b880c2", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_kontext_bookshop_clear_glass.original-provenance.json", + "size": 1608, + "sha256": "sha256:bytes:d55fd398015906cdcda745266d74bb35e8fb98f5c013d850104e8b2f88ba6d54", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_kontext_bookshop_clear_glass.original-review.json", + "size": 744, + "sha256": "sha256:bytes:b5edb7c5b069232e188bc5026cbf7c2bf8f8c48734045204c33caf6a7a7b86d2", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_kontext_bookshop_clear_glass.quality-review.json", + "size": 2572, + "sha256": "sha256:bytes:e120dbcafe857f60c9e705d7fce6a5935d80010588003902d33573882e53674a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_kontext_bookshop_clear_glass.retained-template-provenance.json", + "size": 4183, + "sha256": "sha256:bytes:706c47754ac4f8c85e7d41846a2085f544e52c132178beff600c249cd29b25d0", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_kontext_edit.quality-review.json", + "size": 4081, + "sha256": "sha256:bytes:b4ecdefeee42100d34df1f4a1d05c944c3c950e586a7d644496d36961e66c593", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_kontext_edit.reviewed-provenance.json", + "size": 115594, + "sha256": "sha256:bytes:a1d3b7605879400b4675dbb92e52b510648d331cbdc715026695b951a4f9970f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_kontext_multi_reference.quality-review.json", + "size": 4298, + "sha256": "sha256:bytes:e81c8ef5da7e3e2a0d6b511c093052c6edcc5dff6c5ca59db393450ed2a1cb06", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_kontext_multi_reference.reviewed-provenance.json", + "size": 132915, + "sha256": "sha256:bytes:14db077ec2ae9cbc640bab2585a5105d2b129eafded32e7ea7be2464b412bb25", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_krea_text_to_image.quality-review.json", + "size": 4794, + "sha256": "sha256:bytes:e60051b4da6abcd87c5c1356a2ff3dae280d92fbe25f9a95360f6d54bad93c45", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_krea_text_to_image.reviewed-provenance.json", + "size": 89106, + "sha256": "sha256:bytes:6cc4951f1e036aa80a7e92f80be0c40d37336f0f76ca7fe3dc118679f3cd08f3", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_lora_cinematic_octane_3d.quality-review.json", + "size": 3502, + "sha256": "sha256:bytes:b145a9798d1ac5c44516f02308008140a08bb99ae35a014dd381a650cb30c7f9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_lora_cinematic_octane_3d.reviewed-provenance.json", + "size": 110364, + "sha256": "sha256:bytes:62bf8f0c28985cd8be0da00e7c74548a63dc0daa2893e1aaef7bb7a370b6aa35", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_lora_film_noir.quality-review.json", + "size": 4786, + "sha256": "sha256:bytes:d3cf61a480ef2d55e4371d70806b1b70ecd2f97b038906767f36046f7211c1d4", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_lora_film_noir.reviewed-provenance.json", + "size": 106470, + "sha256": "sha256:bytes:063c3b4d37ec01f694e47ca06bce70c54bc9e0abc682fb0b22f914be868a2e18", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_lora_ghibli_story.quality-review.json", + "size": 3389, + "sha256": "sha256:bytes:6009868ad3e76b584a12eb4193daf7680a0f224224bcda917c2ebbe8f543d1a5", + "contentType": "application/json", + "purposes": [ + "runtime", + "tooling" + ] + }, + { + "path": "template-gallery/reviews/flux_lora_ghibli_story.reviewed-provenance.json", + "size": 53038, + "sha256": "sha256:bytes:f87545939eb878e8655640f7563f6ddb93b355ba72c716959fb61c39806fa8a3", + "contentType": "application/json", + "purposes": [ + "runtime", + "tooling" + ] + }, + { + "path": "template-gallery/reviews/flux_lora_oil_painting.quality-review.json", + "size": 4685, + "sha256": "sha256:bytes:a081914ac871d3d02e47263f1807eb1dc112b861e517221a71ac6987df5611ee", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_lora_oil_painting.reviewed-provenance.json", + "size": 106369, + "sha256": "sha256:bytes:04e8530313e3bfcdf2c09550c17ffbe43aed0b4a28eaccf8b8153d217c2aa35f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_lora_paper_cutout.quality-review.json", + "size": 4842, + "sha256": "sha256:bytes:badbd8d5727387a36c3a65bf2780ea931578ea3c6f1dc50421fcce0352cbb45f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_lora_paper_cutout.reviewed-provenance.json", + "size": 106530, + "sha256": "sha256:bytes:0824474e69c3917b7cecea1fa9830e9a473b5b6f1a11bb3f3293bb8237f30f7e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_lora_photoreal_documentary.quality-review.json", + "size": 4360, + "sha256": "sha256:bytes:36a405950da3e180bdea7d6912da7ec2d19ca8382e3f4a26bd9bb9e79cc5f6d6", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_lora_photoreal_documentary.reviewed-provenance.json", + "size": 106591, + "sha256": "sha256:bytes:80b8756cfa9e3cc14716d82a93f7322b08d2f53901b913ab119258891fc4dffb", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_lora_retro_comic.quality-review.json", + "size": 4525, + "sha256": "sha256:bytes:4436655b45348e57831e147e268e80be4759cd5aec0e6e0eb8d6f1530de06435", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_lora_retro_comic.reviewed-provenance.json", + "size": 107029, + "sha256": "sha256:bytes:3e44966400c118ba7ea67c8c511dcd0aad51a7e59d64bf1d4a0b96566a96f3e2", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_lora_watercolor.quality-review.json", + "size": 4145, + "sha256": "sha256:bytes:3454f88eecab20d70370fe23bbd9248d6e6e3255d0fbfc557a2f1103c94e7ef4", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_lora_watercolor.reviewed-provenance.json", + "size": 106882, + "sha256": "sha256:bytes:c51b9dfb5471d1f0f704852672152a09f0c01aeeaee7f5dd0b324e5652fe8b6f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_redux_edit.quality-review.json", + "size": 3943, + "sha256": "sha256:bytes:10afc2e145791fb240bdcce1bcfbcee80280f5bec4cd15afe64985da51129788", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_redux_edit.reviewed-provenance.json", + "size": 180120, + "sha256": "sha256:bytes:88dc41a06a6fa368953d24f0d20c0700a375465b6c49591653c5471754690c00", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_redux_multi_reference.quality-review.json", + "size": 5103, + "sha256": "sha256:bytes:1e4c83b2db81df7e43b8e79a9a01cc8eadfd2de6c826c218d0c31b50d95b7441", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_redux_multi_reference.reviewed-provenance.json", + "size": 189567, + "sha256": "sha256:bytes:dd1ea7815bc1bc51589ef774cc1f412b3f8bc2f16a7204a8efe56469913d8179", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_schnell_text_to_image.quality-review.json", + "size": 5151, + "sha256": "sha256:bytes:5eeda44bb0b251f27d30973ad62659d2d247f1ab620eb4b48af154385958530e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/flux_schnell_text_to_image.reviewed-provenance.json", + "size": 91343, + "sha256": "sha256:bytes:ccf1ec3ab127ce8c01008df4a8a323bac0548e83679281d58c7d77a964ae07a9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/forest_ferns.original-provenance.json", + "size": 3364, + "sha256": "sha256:bytes:9f3dbdc8c7c6c2bbd65792b2d1b958cc21e1aeb44489af772f6e1d8e14b1932b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/forest_ferns.original-review.json", + "size": 695, + "sha256": "sha256:bytes:c736e68088c4a94fcec6574242c08e840dea34559d3802d63de6f2114f514f1c", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/forest_ferns.quality-review.json", + "size": 2579, + "sha256": "sha256:bytes:8d789319fd8de535f0e638a1fecdc2e65db93e1ff95104c7c63939437994529b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/forest_ferns.retained-template-provenance.json", + "size": 3248, + "sha256": "sha256:bytes:8776590ac1201f5606eab7521d2ef8283f85cc48038acafdb3cbe60a11f91a82", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/glasshouse_rain.original-provenance.json", + "size": 3275, + "sha256": "sha256:bytes:0dad28d294233db5c72915ddb9559f8eb2e4fba77cd8ebd8510a254ae0434083", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/glasshouse_rain.original-review.json", + "size": 852, + "sha256": "sha256:bytes:41b3e9a683bb5af2655b9e2874464a97a79eecdf987b93672f1ea3d142bed370", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/glasshouse_rain.quality-review.json", + "size": 2632, + "sha256": "sha256:bytes:da3cb94631be949ba21fcdf842135099dbc6992bfbf37cc9b30710d1fb997ca4", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/glasshouse_rain.retained-template-provenance.json", + "size": 3292, + "sha256": "sha256:bytes:fdd2f0c10865bfc619852978699d6ab58346d8a4d435b6ad24b706bf2aad4b88", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/high_quality.quality-review.json", + "size": 3663, + "sha256": "sha256:bytes:859a90999ac580d2dfbf45a39d26c475e2af362a6e5a95d72c6ff05626fca54c", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/high_quality.reviewed-provenance.json", + "size": 102347, + "sha256": "sha256:bytes:082cd7fc2b3345ff6bf881df607e19dc9e175081e2f029cf01f2abdafcbc17d4", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/hunyuan_dit_coastal_lighthouse.original-provenance.json", + "size": 1640, + "sha256": "sha256:bytes:cc5c37061625ef1e2bebb027601e368286272e22d4c68cbe63ea690cfe5871ae", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/hunyuan_dit_coastal_lighthouse.original-review.json", + "size": 383, + "sha256": "sha256:bytes:ce4389778a7088b592491f31f36d88e5ea83a438d937a9b4c4cb61facc98c0ee", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/hunyuan_dit_coastal_lighthouse.quality-review.json", + "size": 2318, + "sha256": "sha256:bytes:1954559ecbd9de2986fffc2134ea20628a05ada4a85bf2db8a40137a02bedee6", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/hunyuan_dit_coastal_lighthouse.retained-template-provenance.json", + "size": 3374, + "sha256": "sha256:bytes:abcd8ff508cca890cb7be179f5e85d5d0f6eed116e47ec2faad168a174d0d9e0", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/hunyuan_dit_green_glass_study.original-provenance.json", + "size": 1236, + "sha256": "sha256:bytes:293d3b5128a5dec99d0371bc1402731b1264231127d73a9c85759048daee7bdb", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/hunyuan_dit_green_glass_study.original-review.json", + "size": 652, + "sha256": "sha256:bytes:40f0a76223a6da7fd9be445ca991c684ca1efdd45ef86e695b1f27d493b3a1f0", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/hunyuan_dit_green_glass_study.quality-review.json", + "size": 2476, + "sha256": "sha256:bytes:c0da5754ab4ed0b3106fc0ac394cc83d47ae24431669a6e50014dbe5ac2dbdc3", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/hunyuan_dit_green_glass_study.retained-template-provenance.json", + "size": 3712, + "sha256": "sha256:bytes:db66437531e3bdeb92c4d409db6dcea15a834b1c2e5a05a4d93b5442db6568cc", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/hunyuan_pag_burgundy_knight.original-provenance.json", + "size": 1758, + "sha256": "sha256:bytes:c2c30ee01a229dc1a2eafbc42f8e22d19626533c158ebeb4211ddc64f1ac9a9c", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/hunyuan_pag_burgundy_knight.original-review.json", + "size": 470, + "sha256": "sha256:bytes:b472ba6d082486f25d5c17cf3da66d6d376e9add58924f6d0acbee2e21552588", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/hunyuan_pag_burgundy_knight.quality-review.json", + "size": 2609, + "sha256": "sha256:bytes:f771127b2e2c8e93148f34e1ab5901488a5c7129f3e8608dcf5a9951f3e12645", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/hunyuan_pag_burgundy_knight.retained-template-provenance.json", + "size": 3476, + "sha256": "sha256:bytes:dbbb8bbab6db6dd38ae97f532ed1a4c865d0a706c64ea02c4dbafa18b4ce1fea", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/janus_red_enamel_teapot.original-provenance.json", + "size": 1699, + "sha256": "sha256:bytes:170501bd8a025aa58341bc17322a6c9f8448be401b7263fdc9c5e9b449d1cb87", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/janus_red_enamel_teapot.original-review.json", + "size": 567, + "sha256": "sha256:bytes:05d63ee8fe6f5ef33cb0ea16988861ffbbd99e0f7317b039b01c41a67eb4f5f8", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/janus_red_enamel_teapot.quality-review.json", + "size": 2364, + "sha256": "sha256:bytes:b9d911046c3faff978d22cb397ee2a95d23608240d18674dc68fb5b957783f90", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/janus_red_enamel_teapot.retained-template-provenance.json", + "size": 3317, + "sha256": "sha256:bytes:7fc41c79f10344c5621f2184f7086b4b33daf929d83e37e099e9c0e3fc16aa2d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/janus_red_triangle_caption.original-provenance.json", + "size": 2343, + "sha256": "sha256:bytes:3f6648332a0351e6904385e3d670550b1072c8539055ea6d827d3c7d3ee39510", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/janus_red_triangle_caption.original-review.json", + "size": 545, + "sha256": "sha256:bytes:f7b4652f53f7840da5338cc9e77215884c500ae59aa26e66fb83c84bb6e1ede8", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/janus_red_triangle_caption.quality-review.json", + "size": 2288, + "sha256": "sha256:bytes:03dd22b437f3d94f8789eed26ccf9c0de4fd24a2162e1bab3d1e164441077ef5", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/janus_red_triangle_caption.retained-template-provenance.json", + "size": 3538, + "sha256": "sha256:bytes:0e5cecab2d1a8c81c1b36c4e3b2fcd0799b327f94a61d9f4c55fac0ce1f16a9b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/janus_reykjavik_travel_note.original-provenance.json", + "size": 2277, + "sha256": "sha256:bytes:e691c32bc7b7eb4bd1bf7feae5773671d7e083d79e5bc9426ed5e768bc78d899", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/janus_reykjavik_travel_note.original-review.json", + "size": 517, + "sha256": "sha256:bytes:85c17c8b45a8df155a69a5de0e983b32ef5d9cc917cade0115bae566c861b088", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/janus_reykjavik_travel_note.quality-review.json", + "size": 2193, + "sha256": "sha256:bytes:08b83eb62ffdf911938d868f1be875cc895f472e9e48936acfaa93bbed96c709", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/janus_reykjavik_travel_note.retained-template-provenance.json", + "size": 3451, + "sha256": "sha256:bytes:70da97c6adaef6d92f70d91e3aa549503dacb307ea94dd3115047cb3de17945b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/joy_plus_lavender_on_limestone.original-provenance.json", + "size": 1437, + "sha256": "sha256:bytes:1d38c6f1a9b8c9f496cfb0905e6b4e2c8dd25129110ebf28c86e1070178c1237", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/joy_plus_lavender_on_limestone.original-review.json", + "size": 889, + "sha256": "sha256:bytes:01efaac50374f321864b496b45ee9d133b3d67a9a30ba61eddf81fd23d7204bb", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/joy_plus_lavender_on_limestone.quality-review.json", + "size": 2644, + "sha256": "sha256:bytes:8bf5fa341804d3de8c849d40c5ac8518f954def1ba5eae8e56da820eb86d148c", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/joy_plus_lavender_on_limestone.retained-template-provenance.json", + "size": 3715, + "sha256": "sha256:bytes:9d769bc0f109f129a0a74b77d642cd0029204a037d3bb9e0ab17c322b31e4892", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/joy_plus_terracotta_on_limestone.original-provenance.json", + "size": 1666, + "sha256": "sha256:bytes:fde745107f8dd3d8e87fa149b23617f104a566ee59af33713ca1b3d91b3a3749", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/joy_plus_terracotta_on_limestone.original-review.json", + "size": 966, + "sha256": "sha256:bytes:719b8565f2c6e58a4bbd2cdf1298ef95a7a0d08edec6f90c566e87eb6b6353ba", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/joy_plus_terracotta_on_limestone.quality-review.json", + "size": 2691, + "sha256": "sha256:bytes:2bd0293bdf6802fbcb983cf655f09e8a9b452a5ad1438f1269db06c494558347", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/joy_plus_terracotta_on_limestone.retained-template-provenance.json", + "size": 4278, + "sha256": "sha256:bytes:646ee4503fc48d2bc5f22df726a697f82799b9152978f5cf6715d94e7c3036cb", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/joyimage_base_cobalt_paper_band.original-provenance.json", + "size": 1429, + "sha256": "sha256:bytes:e8cbdf5d79e8c91cc1f85575b2a5a29fcd3a1b2b470bd08137514d71b4e157ef", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/joyimage_base_cobalt_paper_band.original-review.json", + "size": 840, + "sha256": "sha256:bytes:7d27c8cfdbcb51dba2f6b724268469f067e1a2f85320ac168ee4415ac0446ab9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/joyimage_base_cobalt_paper_band.quality-review.json", + "size": 2256, + "sha256": "sha256:bytes:d2cd9b10d5095d45599db6987b5c8d43beae50b388dae281602eae6a5dd70ddb", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/joyimage_base_cobalt_paper_band.retained-template-provenance.json", + "size": 3767, + "sha256": "sha256:bytes:e82f59c601357c4dd42e4c4a6ea7d5f71f87afbef7d4ed254e7dc724e1555319", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/joyimage_herbarium_rainy_porthole.original-provenance.json", + "size": 1049, + "sha256": "sha256:bytes:9d044b889706d4034d96da08aec8f9c6fa2458e2d75b36055a1a707e11140d38", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/joyimage_herbarium_rainy_porthole.original-review.json", + "size": 613, + "sha256": "sha256:bytes:5f1b196d8b9e9b3740a4745304e7fbbe5bbe5c5385237f87d6895748b75c8e07", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/joyimage_herbarium_rainy_porthole.quality-review.json", + "size": 2435, + "sha256": "sha256:bytes:ee32c1cb4403abeab273a797da25cfc3d6930f9eac84785b905ed12d07f5b567", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/joyimage_herbarium_rainy_porthole.retained-template-provenance.json", + "size": 3363, + "sha256": "sha256:bytes:9dea78e9b2060e8253be0d3862ab101885f5c8ad55f66d0d2424943e634bcc03", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/kandinsky3_ginkgo_on_slate.original-provenance.json", + "size": 1302, + "sha256": "sha256:bytes:31189848b609ec308b9bd427975d0b09d502ff7583321e88a7ba813f5a968db8", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/kandinsky3_ginkgo_on_slate.original-review.json", + "size": 467, + "sha256": "sha256:bytes:3d23527148ae151f8b05b623d2739f79ab4bcd37202db7b331e391bdf7b6bedf", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/kandinsky3_ginkgo_on_slate.quality-review.json", + "size": 2699, + "sha256": "sha256:bytes:ce1d21e1a50c1861198590eda8f52dde82afccaceae93500fbaf612e1b1a2426", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/kandinsky3_ginkgo_on_slate.retained-template-provenance.json", + "size": 3374, + "sha256": "sha256:bytes:5be139ba899439bf234dee3274572a5062dbfdbb0fbf6ba12f23b64ce47a2fc3", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/kandinsky3_smoked_glass_on_limestone.original-provenance.json", + "size": 1538, + "sha256": "sha256:bytes:e62c78c152e7273c32f506b361d4cece5e2a61939ab8763078fb04111795a098", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/kandinsky3_smoked_glass_on_limestone.original-review.json", + "size": 968, + "sha256": "sha256:bytes:307daef8829faa1835d0d7092e594aa8bf1b703c51157a8cc7581aaf1e84d437", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/kandinsky3_smoked_glass_on_limestone.quality-review.json", + "size": 2646, + "sha256": "sha256:bytes:e6d9b0e253b694fab331fe62247c0adf47c2947d841ba8da08629522a37613ef", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/kandinsky3_smoked_glass_on_limestone.retained-template-provenance.json", + "size": 3797, + "sha256": "sha256:bytes:5dbf90cd4b0f214fdae6e49c20ec03e38fc8552275d07e900ae737af469ea66a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/kontext_wide_water_alpine_ridge.original-provenance.json", + "size": 1549, + "sha256": "sha256:bytes:8f93f5553eeb580705586eda046026ac8ed8742b09defff688fd67892e131d90", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/kontext_wide_water_alpine_ridge.original-review.json", + "size": 1047, + "sha256": "sha256:bytes:f54561af3e759232c7e01a2515d98b66c38d56d7fe8ece573ce2f83bfcbbf3f8", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/kontext_wide_water_alpine_ridge.quality-review.json", + "size": 2400, + "sha256": "sha256:bytes:2dcf22dab88c45ead8d951f9443f61657d37eb30d07add1183a3633dbffcfe98", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/kontext_wide_water_alpine_ridge.retained-template-provenance.json", + "size": 3986, + "sha256": "sha256:bytes:97059d8dd67e7e5a82c9c458b4c992c680235cae0fc205fde6ae3915f43f3ff7", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/latte_water_folding_over_slate.original-provenance.json", + "size": 1675, + "sha256": "sha256:bytes:78b4bc4724cd17a1257feccd32ddc38735c5df0e4144c27d5d0d8d3ee1fd2ef9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/latte_water_folding_over_slate.original-review.json", + "size": 554, + "sha256": "sha256:bytes:999a0678c180f2fbdba3fe72331f42d997a671785f837f261beec272e97cb95a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/latte_water_folding_over_slate.quality-review.json", + "size": 2578, + "sha256": "sha256:bytes:2e2c24315e418c9cf93eb6e742d453a52b43dcfabf21b85d0fc33f9e048dcdc2", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/latte_water_folding_over_slate.retained-template-provenance.json", + "size": 3491, + "sha256": "sha256:bytes:8f4dd40d5f9ba67c1001b7d41730c004cebe9bda2a8756b5c32caa4041f2b6b5", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/lcm_dawn_alpine_lake.quality-review.json", + "size": 2982, + "sha256": "sha256:bytes:e5c590a6287147faad9d5eab5676b8d2bb8224a8581a2043cf78c8dd50dcb0b9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/lcm_dawn_alpine_lake.retained-template-provenance.json", + "size": 5757, + "sha256": "sha256:bytes:767b8d794460fca5a3e1c79a89aeaa2b1dcdb815d47702e1063ed35d07163247", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/longcat_clear_glass_at_the_bookshop.original-provenance.json", + "size": 1396, + "sha256": "sha256:bytes:055c3ff5cf5493c80e675b8cd97de5c448856204330c1434522cc0c91482b522", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/longcat_clear_glass_at_the_bookshop.original-review.json", + "size": 899, + "sha256": "sha256:bytes:dabecbb61888f492a4e7d8f45e368097c7f286df24c163c8b5e753ce4553d0ff", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/longcat_clear_glass_at_the_bookshop.quality-review.json", + "size": 2651, + "sha256": "sha256:bytes:03185586cf4d78ccfa2aae9dcb3962e82b611d03bb5fefc03bdf34851d50a9ed", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/longcat_clear_glass_at_the_bookshop.retained-template-provenance.json", + "size": 3725, + "sha256": "sha256:bytes:8df85b747c9a5b0fe11bb20d81d64b1df7bccb96ec505aa99855adbcf9dd6e51", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/longcat_florist_end_of_lane.original-provenance.json", + "size": 1109, + "sha256": "sha256:bytes:31fa3b13f1a585031ab220cb3a1039a9e7c2ed40757801c56cbcc846125ac7b8", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/longcat_florist_end_of_lane.original-review.json", + "size": 696, + "sha256": "sha256:bytes:adc8b682f80f09677b97fa57651d336d8b966f7e19586256e6559505f57f9cfc", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/longcat_florist_end_of_lane.quality-review.json", + "size": 2455, + "sha256": "sha256:bytes:c2b07ec9dccd4ac97f229ff2c836b5215377c240b8455db32a4f72f0313f7a4c", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/longcat_florist_end_of_lane.retained-template-provenance.json", + "size": 3415, + "sha256": "sha256:bytes:14da3c1cbc2f7ea57b4ec3d84f1a78d72a4e22b62ce0e0d757db78297c3fbed9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/longcat_last_tram_at_dusk.original-provenance.json", + "size": 1251, + "sha256": "sha256:bytes:34b322e643eacf47f4c02019564cb85720cb3b9b8334d524e47226d60c4faa60", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/longcat_last_tram_at_dusk.original-review.json", + "size": 541, + "sha256": "sha256:bytes:7ee2f38d8dd9199e6a754312dba9e962007389ba4527f0aebb96272b454394a5", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/longcat_last_tram_at_dusk.quality-review.json", + "size": 2332, + "sha256": "sha256:bytes:f2883c589ff0313062b4c0c995b35ce08d837f02efb4f6f097d004961b8d298f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/longcat_last_tram_at_dusk.retained-template-provenance.json", + "size": 3457, + "sha256": "sha256:bytes:071240681910f119ab723f580b68bc1037896a28132a51fbb338e61bf9f8a0bf", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/low_vram.quality-review.json", + "size": 2522, + "sha256": "sha256:bytes:53b25669d880814ac612e803b0c6f2abbcdd8853e7ea4ca6e1e6d0b97fa23352", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/low_vram.reviewed-provenance.json", + "size": 100927, + "sha256": "sha256:bytes:a07f1942cb39c873d7ccd1b99dbece3c203d73296712aa0168a3edf4054b8076", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx2_enamel_teapot_window_light.original-provenance.json", + "size": 2397, + "sha256": "sha256:bytes:1fbe54b9ca2549c6966faf71d0bcbbde7a9c60b2ff64e3bd27086ed97c81aa26", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx2_enamel_teapot_window_light.original-review.json", + "size": 802, + "sha256": "sha256:bytes:267b0c3024607fabad7de1a91cc01b0523b7e8aabb82ae45f0ab79522496bf56", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx2_enamel_teapot_window_light.quality-review.json", + "size": 3265, + "sha256": "sha256:bytes:9b54148c2f192cefa6d83b75ded11a7a45bb048327dd164c4095702c76b98e65", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx2_enamel_teapot_window_light.retained-template-provenance.json", + "size": 4504, + "sha256": "sha256:bytes:f09d8c8ab232f31491bffe08d4ab09b2e4385849905660c4454d63a6c7d57714", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx2_glasshouse_drip.original-provenance.json", + "size": 2116, + "sha256": "sha256:bytes:2d1b15c2d57f48e996da58f168af3a46124c5a05735f93c9e7278fcb8a7fc49b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx2_glasshouse_drip.original-review.json", + "size": 590, + "sha256": "sha256:bytes:b4f072e5c562496ea776a53b1cb5704dbba69e5d273191160afb3cb8f2524ad8", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx2_glasshouse_drip.quality-review.json", + "size": 2751, + "sha256": "sha256:bytes:6caef4f4af6cf21f2de32684a374508b990d6ef392957a11ddbb217b5037a34d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx2_glasshouse_drip.retained-template-provenance.json", + "size": 4087, + "sha256": "sha256:bytes:06e0dc880d5f9233edba458c58390254af536a1657d217d6e2e315e68452d5c3", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx2_kiln_at_first_light.original-provenance.json", + "size": 2033, + "sha256": "sha256:bytes:9b3de62f3b8a92705c227b1c737a62113ae2af8e09ce19a82f3ec60f7dd12681", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx2_kiln_at_first_light.original-review.json", + "size": 604, + "sha256": "sha256:bytes:fd00080cb70166bef3d980c54eae560171173d4e716a0c2de027b45b455d2035", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx2_kiln_at_first_light.quality-review.json", + "size": 2850, + "sha256": "sha256:bytes:9838d274b6b603d9842987b9248a067f146364c87ba39edce523c5994771e4e5", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx2_kiln_at_first_light.retained-template-provenance.json", + "size": 3877, + "sha256": "sha256:bytes:e00c10faebe723569e24af1c9266f4dc0b2477558fd861250984392488f97d2c", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx2_moss_and_basalt.original-provenance.json", + "size": 3482, + "sha256": "sha256:bytes:479f80077697b798779e8eff2a07867a7e49b04e0aff6adb7588e294d44af590", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx2_moss_and_basalt.original-review.json", + "size": 816, + "sha256": "sha256:bytes:552f9f76f3033f5ca379a4c09b35c3ed9be3f2504481e5a6d3d45da35cc4b007", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx2_moss_and_basalt.quality-review.json", + "size": 3102, + "sha256": "sha256:bytes:9565db5dd4d9a378cdb9d4c17f3129a55b8d3d4cb72b4df5297e28994904ef85", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx2_moss_and_basalt.retained-template-provenance.json", + "size": 4449, + "sha256": "sha256:bytes:1ae833652317aef0279d320f60fcbd678045af0bdd4fa056ae3c1735634708c3", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx2_surf_below_the_breakwater.original-provenance.json", + "size": 2043, + "sha256": "sha256:bytes:1d8ad8211ab76299edf0659f556f609b71d729a8db1c6f8404aac40d47dd36f6", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx2_surf_below_the_breakwater.original-review.json", + "size": 509, + "sha256": "sha256:bytes:9dd1a9b09ae08f162a8f666e69e55cb2fbfe0dce933899aa32c58e3b4a38ea0f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx2_surf_below_the_breakwater.quality-review.json", + "size": 2706, + "sha256": "sha256:bytes:901cf95b6ba4baa4bda362e9fcae6b46e2d758c08612633d294e86abd70a9ba2", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx2_surf_below_the_breakwater.retained-template-provenance.json", + "size": 3905, + "sha256": "sha256:bytes:c5d870f9b90d13ecec6edf2bdf0dca17a3603ee1bc9ba0e0f1a956a9b7283dea", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx_long_wind_and_tide_at_the_headland.original-provenance.json", + "size": 3868, + "sha256": "sha256:bytes:2246d2229387b0b8333ea331c7e908267fd298ee62361328594ef0e1c0454261", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx_long_wind_and_tide_at_the_headland.original-review.json", + "size": 912, + "sha256": "sha256:bytes:d07b5483c13439d9addbf9e12c3a7bb1be8f7770ec1a895dab76387d3987560f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx_long_wind_and_tide_at_the_headland.quality-review.json", + "size": 3138, + "sha256": "sha256:bytes:88a3a90318d651835043e95c78198db78dc4e1e47992c6c83798d8fc03f8994e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx_long_wind_and_tide_at_the_headland.retained-template-provenance.json", + "size": 4013, + "sha256": "sha256:bytes:8a0c4e70cbe66ed06f4c7c5538dc6046533d3af2b6d416073878dee089096e60", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx_video_animated_story.quality-review.json", + "size": 5831, + "sha256": "sha256:bytes:1ec83b229ba5c7995c8ada2629c448334965939304ffddc7a70161c8b7e1b7f1", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx_video_animated_story.reviewed-provenance.json", + "size": 256227, + "sha256": "sha256:bytes:3910ae6f164eb978e38b16e1eab92d73fe7f55dac543b681416ba0b8c43b440d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx_video_image_to_video.quality-review.json", + "size": 6506, + "sha256": "sha256:bytes:6c31e71b0b9e6a6a1c46f55e058dd208b7b2f510f6eeb332648575da388f9431", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx_video_image_to_video.reviewed-provenance.json", + "size": 143757, + "sha256": "sha256:bytes:ff18a19dd44e03eb76e3879a7e49f1732cc9e6dba6affadcf370feafcc6cf06b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx_video_long_showcase.quality-review.json", + "size": 5986, + "sha256": "sha256:bytes:60cbabfbf56d499a45000cdbabc3c4d64733de27638c1e8b127ba067f1918b9c", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx_video_long_showcase.reviewed-provenance.json", + "size": 444547, + "sha256": "sha256:bytes:c2566ed4233b850092727e2bfc805d1be849c2b11cd9424e42283ff9e19b15d0", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx_video_multi_reference.quality-review.json", + "size": 6794, + "sha256": "sha256:bytes:ccb132c3ffd2e929acca88d871c2f04ba9d0cd69d54750f303b58953a8b9bc93", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx_video_multi_reference.reviewed-provenance.json", + "size": 144273, + "sha256": "sha256:bytes:9bdf09de275841af2f1f63ce0011dfc1eeaa703e2deeb2ebf678090abad80203", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx_video_text_to_video.quality-review.json", + "size": 6898, + "sha256": "sha256:bytes:37f6a5c00110c6f9e306447a53691521c77db1ecf3cedf8210dd1e7ed10ea99d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx_video_text_to_video.reviewed-provenance.json", + "size": 140131, + "sha256": "sha256:bytes:58bfc0b841177bc73dbde13effbf5eebcf9e8d618d3aa90aa8b19afc3a6e5132", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx_video_video_to_video.quality-review.json", + "size": 6549, + "sha256": "sha256:bytes:819fd6d872b8e86bbb091980a435bd363216d069223dd694f65d7942aeb05178", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ltx_video_video_to_video.reviewed-provenance.json", + "size": 146951, + "sha256": "sha256:bytes:9de3b2659acc8383ab86923bc7c9c87be3e53f3d894a06c77af8a16a155795a4", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/lumina2_larch_on_glacial_pond.original-provenance.json", + "size": 1634, + "sha256": "sha256:bytes:16e6a8baf35baec6d9e1be13523eaa5606174123b3a61274a257d5fbd14977f3", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/lumina2_larch_on_glacial_pond.original-review.json", + "size": 410, + "sha256": "sha256:bytes:3fa1cbf6c53ed5ce65f8d116779ff9dea32a9c52c8a0877fbb87f77f17237695", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/lumina2_larch_on_glacial_pond.quality-review.json", + "size": 2377, + "sha256": "sha256:bytes:527cf3a6d6a7820e09450d4a6d533e5d875a914bd2c8771c2060a513f712544e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/lumina2_larch_on_glacial_pond.retained-template-provenance.json", + "size": 3324, + "sha256": "sha256:bytes:d62e4d0a6e3739b95089003b3095611e419f62bcdc39befbb67aeba846aec0c8", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/lumina_opal_pendant_in_limestone.original-provenance.json", + "size": 2146, + "sha256": "sha256:bytes:1759ed2ceb7e564e568eced6f47a017c647dd549c2ebdf6e414310d8445a4fd4", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/lumina_opal_pendant_in_limestone.original-review.json", + "size": 569, + "sha256": "sha256:bytes:11b0b3259e607f479a30ccb2c6f530ff41cb6367245961c43f56ccad21babfb7", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/lumina_opal_pendant_in_limestone.quality-review.json", + "size": 2396, + "sha256": "sha256:bytes:4566c14128c7a9a7b32d92d927cff0c2ca12bb392328bd692272130e0c5fe387", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/lumina_opal_pendant_in_limestone.retained-template-provenance.json", + "size": 3347, + "sha256": "sha256:bytes:a4e3e7b9be7fdd489f3876e63e7d0e9ed65508e84eabb0a673719251d3d46e0e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/marigold_depth_synthetic_ramp.quality-review.json", + "size": 2882, + "sha256": "sha256:bytes:17c3bbb2da127558c468e58ccc2bb08a9b78d4f07f901d483cfe8092732ebb42", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/marigold_depth_synthetic_ramp.retained-template-provenance.json", + "size": 2639, + "sha256": "sha256:bytes:57b1487ecee6f44016512e1e1ce5c8135e963add06b1519b7e6007cb83184ae0", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/minimax_h3_image_old_town_cat.quality-review.json", + "size": 3140, + "sha256": "sha256:bytes:ce9fc2a0edaaf3eef1f3db03024d3e64108523e93fc2797fee7cbe7364e7ce97", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/minimax_h3_image_old_town_cat.reviewed-provenance.json", + "size": 96855, + "sha256": "sha256:bytes:9d5792710da6b60188994c51bfa1ac49047121433d83961cd58d22b9caf6030c", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/minimax_music3_chamber_pop.quality-review.json", + "size": 3481, + "sha256": "sha256:bytes:cd83b77fc2ccb4b11263406c12dc9d0d222af582e52dc47b77c18a4243462502", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/minimax_music3_chamber_pop.reviewed-provenance.json", + "size": 96233, + "sha256": "sha256:bytes:1b2c91a45c40a7d6621bee54083d3e02d9b843d1034c06e3284ff8f1a2e44270", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/mochi_surf_over_dark_pebbles.original-provenance.json", + "size": 1097, + "sha256": "sha256:bytes:74b784153cf2626a77aee1e9f6ec452261b07350b643e152f23e864e7ef6259f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/mochi_surf_over_dark_pebbles.original-review.json", + "size": 613, + "sha256": "sha256:bytes:9b8bf5f3fe30fad3bb2bb970e6749a3f7f89ce7946eef3484c840167af3f86f9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/mochi_surf_over_dark_pebbles.quality-review.json", + "size": 2503, + "sha256": "sha256:bytes:124e335657f246c8f498b5ebc7d259522bba555c763c9a51fda3596c143690b2", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/mochi_surf_over_dark_pebbles.retained-template-provenance.json", + "size": 3492, + "sha256": "sha256:bytes:284c2a0297b7e9f83f84b23ce94062462611273672b580b1f65311455803b45f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ochre_paper_pavilion.original-provenance.json", + "size": 3254, + "sha256": "sha256:bytes:5fab665db87b17f2c4cea8e3903ac6df84232912fc2abaabee3bf3107542dc96", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ochre_paper_pavilion.original-review.json", + "size": 664, + "sha256": "sha256:bytes:6e31d3ec89e61e8b5722fb93db8f7bb7ea8328bf1c055028ba44c18affacf058", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ochre_paper_pavilion.quality-review.json", + "size": 2465, + "sha256": "sha256:bytes:a635772ae5b26758629581843258dea266c7e85934eb222d4884b9a2522a93c1", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/ochre_paper_pavilion.retained-template-provenance.json", + "size": 3298, + "sha256": "sha256:bytes:9bd899fe903bcc05057c1ae452c641700d9c36b5001b499dadba6a6a07e36e80", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/omnigen_cobalt_against_soft_apricot.original-provenance.json", + "size": 1525, + "sha256": "sha256:bytes:88ee6e3f6d910a68983aedb6b0cb553cad2341ca72627f2d6c578ecfefe1d760", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/omnigen_cobalt_against_soft_apricot.original-review.json", + "size": 1043, + "sha256": "sha256:bytes:ae25cda076716b4dfe73095b1bcaa75418984db19fda3592f60335da9194e3e2", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/omnigen_cobalt_against_soft_apricot.quality-review.json", + "size": 2659, + "sha256": "sha256:bytes:f81904cbc14984f2916d4d26b20a38d7e90f46aa967bead471d642c0196ad273", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/omnigen_cobalt_against_soft_apricot.retained-template-provenance.json", + "size": 3869, + "sha256": "sha256:bytes:1ac31719c0a2fcf0c59ebf8c1f6fbcff2be9847aa23b748c1bb43a706b8f14fd", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/omnigen_red_enamel_folded_linen.original-provenance.json", + "size": 1782, + "sha256": "sha256:bytes:01821146c4f81aa3eef581cd4bfedfa892d75176804ecf4cc7b3ed859779e087", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/omnigen_red_enamel_folded_linen.original-review.json", + "size": 951, + "sha256": "sha256:bytes:9e64209e76a4bbdcefe54ffae53c9d71d6e2166d84fb605a891c9600c0d85ec3", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/omnigen_red_enamel_folded_linen.quality-review.json", + "size": 2406, + "sha256": "sha256:bytes:01c77e3b3474145e708ee18122f5c81ed3364019c260e9888624c7e9a6ab784a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/omnigen_red_enamel_folded_linen.retained-template-provenance.json", + "size": 4319, + "sha256": "sha256:bytes:b066ad2d0e03b2eb348d588e3177a782062d463d50caa7c38bf1801449517e6e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/omnigen_tulips_after_rain.original-provenance.json", + "size": 1602, + "sha256": "sha256:bytes:cd37ada4ad60fccb5fece5fe6ef03dd62ba7a8a66eb141579f8fa424b6265d71", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/omnigen_tulips_after_rain.original-review.json", + "size": 381, + "sha256": "sha256:bytes:3353e7fabebfddfc0b47f2ebdd668c0ae01f426d9280d1e4ac03d307582b8cc3", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/omnigen_tulips_after_rain.quality-review.json", + "size": 2298, + "sha256": "sha256:bytes:333fbf9b662ef072cf2621b37b814052af11c4e219a6640376ba53a2ee4c154f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/omnigen_tulips_after_rain.retained-template-provenance.json", + "size": 3311, + "sha256": "sha256:bytes:143b1e03664e187b0815b81948843d05bf9bf2bc664f9c92b7cd78c3b7755245", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/persimmon_glaze.original-provenance.json", + "size": 2814, + "sha256": "sha256:bytes:dece98191d7fdcae395409a4ca8fb0f7eb215bc095660a8251d668f1dabd0054", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/persimmon_glaze.original-review.json", + "size": 571, + "sha256": "sha256:bytes:3c97652cd91cc4af5660429652241efbe6675b20ec59c7abc73c3f1c185b491a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/persimmon_glaze.quality-review.json", + "size": 2235, + "sha256": "sha256:bytes:9c9afc7223597ea8ee65889581c40f1e9f6a63a2bab6d7827b6af207353909ad", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/persimmon_glaze.retained-template-provenance.json", + "size": 3294, + "sha256": "sha256:bytes:4813f96f9332d04d4b8b0fc8d30d51e110ab8d157a1aef7c6172474f09bb490f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/pixart_sigma_pag_pink_mascot.original-provenance.json", + "size": 1237, + "sha256": "sha256:bytes:14847afca116ec723f4a85007332a14b6cc31f52226c62ae6a04c2c7640982de", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/pixart_sigma_pag_pink_mascot.original-review.json", + "size": 525, + "sha256": "sha256:bytes:332ba1b4fcd00c119b88015f82d40f13c985a294661b2c1f48f8b80c00a866b7", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/pixart_sigma_pag_pink_mascot.quality-review.json", + "size": 2440, + "sha256": "sha256:bytes:b2babd69ef190701f21b5831fef6b8a10f3999e0051db6b6e45226882f5db666", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/pixart_sigma_pag_pink_mascot.retained-template-provenance.json", + "size": 3373, + "sha256": "sha256:bytes:47d6baf48d8af2f0ba388dc5ffa2c9445a3b3a261056f07b0968c7a52b697315", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/pixart_sigma_terracotta_herbs.original-provenance.json", + "size": 1434, + "sha256": "sha256:bytes:50104329cd991e137b9fabe09a0177216e250f601eb076ecf26f055dc6e7c12b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/pixart_sigma_terracotta_herbs.original-review.json", + "size": 474, + "sha256": "sha256:bytes:a4fc8269ed81c851a2ba87c033f6a578343afafe612b1b74f5afd73315cbadcb", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/pixart_sigma_terracotta_herbs.quality-review.json", + "size": 2330, + "sha256": "sha256:bytes:f8446ea6f8c3a4edd86455cfd8aa456b5c899a6e11cfa3e766aed2eccc99e6e4", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/pixart_sigma_terracotta_herbs.retained-template-provenance.json", + "size": 3350, + "sha256": "sha256:bytes:143ee68055070094253340c78699cdfd77ea54a43ff6678400988c1b8f27b56e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/pomegranate_on_blue_linen.original-provenance.json", + "size": 2497, + "sha256": "sha256:bytes:b9cecf2139bc5a0e5d6a3db462caf017c4d54482267592bf220f5015f7ae690b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/pomegranate_on_blue_linen.original-review.json", + "size": 654, + "sha256": "sha256:bytes:752b7cc115a3794d1066785e887b73e3eed5f3bb6735ef5ec89c45035b20d7e4", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/pomegranate_on_blue_linen.quality-review.json", + "size": 2426, + "sha256": "sha256:bytes:412a9940d2e86768a91a54c8d1282d46ff638f86d94d6582e81738f32c2749ab", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/pomegranate_on_blue_linen.retained-template-provenance.json", + "size": 3335, + "sha256": "sha256:bytes:15ad50f1686ae7dca486dba01974ad9155dbfc694b97b824314c257e316c185e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/porcelain_on_slate_linen.original-provenance.json", + "size": 2629, + "sha256": "sha256:bytes:a20717be541cf1ac1dc84a8b7fdfd82f0dfedd5ec322ec1e257654a978ab1842", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/porcelain_on_slate_linen.original-review.json", + "size": 607, + "sha256": "sha256:bytes:8f6972bd24388616958f18d53ba39b7a9626fd23ef2470a96e888d01599ee303", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/porcelain_on_slate_linen.quality-review.json", + "size": 2260, + "sha256": "sha256:bytes:aa85f397af28e1ca7da538dae08a96d1ff3452c5542f72419447fa5635a2aab3", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/porcelain_on_slate_linen.retained-template-provenance.json", + "size": 3329, + "sha256": "sha256:bytes:e1d8fb3b54f1fc0c1d4e3560d9a7d829aaf81d22f3cd543809051b38b598a396", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/quiet_current.original-provenance.json", + "size": 2802, + "sha256": "sha256:bytes:6831c3577cf90fa0a6606497bd13844a9b25d4371f1b402efe9b099e8a58d42c", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/quiet_current.original-review.json", + "size": 637, + "sha256": "sha256:bytes:c1596743b2612f0bfcda8cf8d21b3e6bec1c570710c73e19e82d7d6aaea9b61c", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/quiet_current.quality-review.json", + "size": 2405, + "sha256": "sha256:bytes:2387a8febca71a20ea416bb6db610de9c442c584f64bd913eb66cf3688d84773", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/quiet_current.retained-template-provenance.json", + "size": 3257, + "sha256": "sha256:bytes:888aecdcb91637d93c268a9ad7b615ca545e7b73e2f1caf064c12bf4a0681655", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/quiet_kiln_at_daybreak.original-provenance.json", + "size": 3958, + "sha256": "sha256:bytes:a4b6c9950b2f2f6d185eb574ad4acddec21e2015fcf8d50bd14195ed24dcee97", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/quiet_kiln_at_daybreak.original-review.json", + "size": 740, + "sha256": "sha256:bytes:b76ab6d15da10b9d6fb9ddfd83af0abf2f56ca962aac6ab65c78ae231a74d2bd", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/quiet_kiln_at_daybreak.quality-review.json", + "size": 2679, + "sha256": "sha256:bytes:b0118affa79b69e333c6a7977aa8c47328d570dd374aa212f0a371ec5a4a353b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/quiet_kiln_at_daybreak.retained-template-provenance.json", + "size": 3306, + "sha256": "sha256:bytes:ae5db3f69f0a3ae1ad178ca986819e1b8cb1ccdf50c9b3850d5ec2e7d745ba8d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_2511_pale_amber_on_limestone.original-provenance.json", + "size": 1390, + "sha256": "sha256:bytes:92184da315494eafd5ffb5f97e0b6b16b9adc7e2900cfe2159a74eb95f2c664d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_2511_pale_amber_on_limestone.original-review.json", + "size": 884, + "sha256": "sha256:bytes:c927ac13e8f20facd97ba72db03ae4fc658d5b2b5120a9473d2bcd280e01356c", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_2511_pale_amber_on_limestone.quality-review.json", + "size": 2604, + "sha256": "sha256:bytes:1448c1f4aeddd0ca2238d62a91db71644d723172bad44eee0f62618f89580160", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_2511_pale_amber_on_limestone.retained-template-provenance.json", + "size": 3718, + "sha256": "sha256:bytes:0d91cc6e5417f0defc5ef7615cc85f19de32bf6732e01e75d6051b94be8df0d8", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_2511_terracotta_material_transfer.original-provenance.json", + "size": 1622, + "sha256": "sha256:bytes:accd52fe0dc925cda9f3ad31546498422faf762eaae9d5efc1d1c7ab8b2bceb1", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_2511_terracotta_material_transfer.original-review.json", + "size": 1044, + "sha256": "sha256:bytes:6fa09481a5e8937cf2afa452c0f6b0da53124a5ff556756d3c970235d22eeb8f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_2511_terracotta_material_transfer.quality-review.json", + "size": 2894, + "sha256": "sha256:bytes:c069a461b67cb90ade5f906200db6359e17ecda252d305bc8e6bc7fe9df15786", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_2511_terracotta_material_transfer.retained-template-provenance.json", + "size": 4296, + "sha256": "sha256:bytes:d4b364f299fcce02bee7cdacad3d915d2c8a916b1b97fb9d77f8fa88146c899f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_2512_cobalt_backdrop_repair.original-provenance.json", + "size": 1644, + "sha256": "sha256:bytes:aff76ebb3392dc74718791d4d3e964e12ed333818e3e3004c2b00efdb1065cda", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_2512_cobalt_backdrop_repair.original-review.json", + "size": 960, + "sha256": "sha256:bytes:87b770beaa2fa2fbbc469450467e7ba7fd0c1f79e227cc24ba1e226e8b4af900", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_2512_cobalt_backdrop_repair.quality-review.json", + "size": 2646, + "sha256": "sha256:bytes:cfe7231165788dcb08f50c7d45ab5f0953fd96c92da8d1ecd428af7d0a20cbce", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_2512_cobalt_backdrop_repair.retained-template-provenance.json", + "size": 4098, + "sha256": "sha256:bytes:7303db8a55bb4bfb9947f5d501be2907de1da8ebe0e8972578567e04d33ad336", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_bookshop_gouache.original-provenance.json", + "size": 1272, + "sha256": "sha256:bytes:4af138819ecda66dc7754a8ea6886ca1bb324540a235b73b14c3d2bb547e58de", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_bookshop_gouache.original-review.json", + "size": 839, + "sha256": "sha256:bytes:3b34b326d7200df17d7e8ef42964bf5398dd8216fef84e09ec974c7007101271", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_bookshop_gouache.quality-review.json", + "size": 2431, + "sha256": "sha256:bytes:94fe1a1dd8188e3f6860c7154e414c605cc8f94e79524fa5dc6f0bb557f23a98", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_bookshop_gouache.retained-template-provenance.json", + "size": 3653, + "sha256": "sha256:bytes:7b9356ca691735f772c1a0e914393459401f84cd012e782e4f0d940fac255648", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_character_angles.quality-review.json", + "size": 4382, + "sha256": "sha256:bytes:748fb8b3839911be02f80185d329b5b028456c78916da6ad07349e0086b0f106", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_character_angles.reviewed-provenance.json", + "size": 106701, + "sha256": "sha256:bytes:a4d880bcad84c21fe3787001fceb2f9b2f4042fe83e1e2c6733d0f578a586c66", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_cobalt_on_charcoal_slate.original-provenance.json", + "size": 1377, + "sha256": "sha256:bytes:e792e4d45eff40be63575b5d1b983d59aabdecf004890c98e828f6b58a1d549b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_cobalt_on_charcoal_slate.original-review.json", + "size": 894, + "sha256": "sha256:bytes:d2caf52b07dff116307a43afe1f087fe17cb98f2daa8549ec5e5c2331e0fac2f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_cobalt_on_charcoal_slate.quality-review.json", + "size": 2634, + "sha256": "sha256:bytes:492e8a71b24369a4f96ae8e7781fe6926274d5871066c2ae371165026bb585fc", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_cobalt_on_charcoal_slate.retained-template-provenance.json", + "size": 3688, + "sha256": "sha256:bytes:416a58ebfb2db64e9d1e75995cd8b6e8151b60a60600c9bfe33a472b2c31d8bb", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_control_image_layout.quality-review.json", + "size": 3645, + "sha256": "sha256:bytes:96b21e77ef524c853732f9ee920cb0cc6306fae984a78c798aab7cc1314b1c4b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_control_image_layout.reviewed-provenance.json", + "size": 118637, + "sha256": "sha256:bytes:63f6695ce2fd38c8014d2de5216bd4a681c207496d5eaad9ec3906a545ca2820", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_control_winter_cabin_blue_hour.original-provenance.json", + "size": 1192, + "sha256": "sha256:bytes:a58317e01fd2bffeb6a261279a595539d058304a8c5965c89e43ef6680273fc4", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_control_winter_cabin_blue_hour.original-review.json", + "size": 704, + "sha256": "sha256:bytes:b01f4a91833a2f141f512cb5caee5eeff76481a829590260f823b500824bab24", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_control_winter_cabin_blue_hour.quality-review.json", + "size": 2586, + "sha256": "sha256:bytes:b83d8bef8d87dbd5e4587904a947f82d9a2353224781b1581dae0684b86eab65", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_control_winter_cabin_blue_hour.retained-template-provenance.json", + "size": 3679, + "sha256": "sha256:bytes:6c21a60f83581753a9e54647ce49a82c877f23a30ea2161be13e675e26eeb0db", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_edit_plus_single_image.quality-review.json", + "size": 3415, + "sha256": "sha256:bytes:bd2066932a1749ee87c340450d232ed2d8f919648ae9e1e64b9ea30f531d73d7", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_edit_plus_single_image.reviewed-provenance.json", + "size": 98849, + "sha256": "sha256:bytes:4b672fc3ddc522c44a41c7065cefda8c82d2d5be5ab7f01375b19cc93e029fe8", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_edit_strength_sweep.quality-review.json", + "size": 3369, + "sha256": "sha256:bytes:c0632baaea92783a73856fd89295df7ddea9b07712a35311f81fd2c8ca9c0727", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_edit_strength_sweep.reviewed-provenance.json", + "size": 99281, + "sha256": "sha256:bytes:021e25f19a4a62f07513e3556ba7865e2ae7631762ead746ef6563e2912b0a4a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_inpaint_mask_draft.quality-review.json", + "size": 5304, + "sha256": "sha256:bytes:aacac275d7f3885f227d431f1a37be7dfcd720cee639e1a34851cdce54719154", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_inpaint_mask_draft.reviewed-provenance.json", + "size": 167028, + "sha256": "sha256:bytes:fd5214c8523c581b8535d0bd77afc4a8451445aeb449bb079ac150de9c3d5727", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_inpaint_object_replace.quality-review.json", + "size": 3893, + "sha256": "sha256:bytes:cdbd7d549bfef1a9513cd8ed5feef6ba7798f380ffe45830cfa588de789c3cdf", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_inpaint_object_replace.reviewed-provenance.json", + "size": 109340, + "sha256": "sha256:bytes:9110d6bf939d4c68541767c20ad62684978c590af344a226d76ee02c32b76fef", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_layered_portrait.quality-review.json", + "size": 5507, + "sha256": "sha256:bytes:2ef67ce5c77e09b88d8a33d6759edbc3ccbfe910bfad17d638dc5ce99794ea7f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_layered_portrait.reviewed-provenance.json", + "size": 130355, + "sha256": "sha256:bytes:f1f8f884f1a797e5918e01f9b47d1f93d39cd6a305a7d3ca46c9f9b349d18f01", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_layered_sunset_and_peaks.original-provenance.json", + "size": 2264, + "sha256": "sha256:bytes:9a4c058f2ba7bd3dace465219c32bd818493431063688b00741a9a9c4fb01794", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_layered_sunset_and_peaks.original-review.json", + "size": 614, + "sha256": "sha256:bytes:faf0adb0a9c40691caf3ef8f96765406b3b5058aa9618cca5431ae83529a1bcb", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_layered_sunset_and_peaks.quality-review.json", + "size": 2562, + "sha256": "sha256:bytes:326553aed7aab67e3eed777d7919e21fe02ff9ab837edd7f39bd7a2abece77f0", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_layered_sunset_and_peaks.retained-template-provenance.json", + "size": 5700, + "sha256": "sha256:bytes:d6aaa0a0d9b84d10864e8a783ac82ac167b487f71d185bacd99cc035f8e22105", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_logo_texture.quality-review.json", + "size": 3936, + "sha256": "sha256:bytes:27383d10d65bf5bcf81efb5a197751c3ad29476fd23f72cd8a937dc432e6f555", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_logo_texture.reviewed-provenance.json", + "size": 106958, + "sha256": "sha256:bytes:d056004421a13aa28a5f5f67ef52e3647ab07573df5c8cf8d9846aeea8d9a698", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_low_vram_poster_layout.quality-review.json", + "size": 3915, + "sha256": "sha256:bytes:c75a68e299dcf548661338cd1aa6f8c4d0bcc9dc3d3d7769f5717a8d09e4a8c3", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_low_vram_poster_layout.reviewed-provenance.json", + "size": 102419, + "sha256": "sha256:bytes:16aa46e5009c7b4c05ea3dc5325e63b039c3e2a826b11a2845882c589510f194", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_low_vram_product_concept.quality-review.json", + "size": 4604, + "sha256": "sha256:bytes:c1bdc89bee06dad85965f564b4bb5c7657859808d333dfce4e741b344dba2ea2", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_low_vram_product_concept.reviewed-provenance.json", + "size": 104113, + "sha256": "sha256:bytes:c9ff22165ab722da9056022e703f4ccdd45aa76ef6583170f0662d262a5e39a5", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_low_vram_text_rendering.quality-review.json", + "size": 3514, + "sha256": "sha256:bytes:64d0c05cdb2830d4a533256b6ed78afcbb2b6c8398b92b27087f8056862458a2", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_low_vram_text_rendering.reviewed-provenance.json", + "size": 101225, + "sha256": "sha256:bytes:d5e56c96dcc0d1a13aebd648ea2919c23cf26a55083b07c4cd3075fd5eaaa58d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_multi_reference_product.quality-review.json", + "size": 4364, + "sha256": "sha256:bytes:f541e013bf476dc05c7bf0815db9fd100925c3ed5e4303e275998940c6d38d31", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_multi_reference_product.reviewed-provenance.json", + "size": 109254, + "sha256": "sha256:bytes:e3855abb4ed1a82b068269f8a1ce817cb327d9f05abe65b7a22ff4fb87dbf597", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_outpaint_aspect_template.quality-review.json", + "size": 4721, + "sha256": "sha256:bytes:6fa2bc63b9e95cd36614b65c3856ef017b6fd76ed35104ef727e053336b6dee9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_outpaint_aspect_template.reviewed-provenance.json", + "size": 165827, + "sha256": "sha256:bytes:d0fec0ffe18f3927eef5eac8faa6dc3b7ff8f28b3a79e634bde1a30d886e7390", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_outpaint_draft.quality-review.json", + "size": 4688, + "sha256": "sha256:bytes:edef85b30a3c7aeb5e0b9a911ad571a82cc3faa213616813a290a74f32fe2cd5", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_outpaint_draft.reviewed-provenance.json", + "size": 166059, + "sha256": "sha256:bytes:d81e1657ee09184d12a43ddf019c19298b0b4b6ba4f673bf764ac4627a3e1c1b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_packaging_dieline.quality-review.json", + "size": 3983, + "sha256": "sha256:bytes:dbf5e856ee01a0a2f71fcc96af3c759c08f491dc50c7310b3dfc97b37c7d860a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_packaging_dieline.reviewed-provenance.json", + "size": 118404, + "sha256": "sha256:bytes:0814dfd3c8a87d3701da63ddc4ab1768eccc971192114a79256e643171166262", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_poster_logo_text.quality-review.json", + "size": 3817, + "sha256": "sha256:bytes:0dda4202476ad47c22a1b0958115c2039436fdff54146a6ffe4293b4acecb4f8", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_poster_logo_text.reviewed-provenance.json", + "size": 102255, + "sha256": "sha256:bytes:11bb7ad1c39ca2f942ed46683683368bd2ebb328dee3cca78edf21391ac08a34", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_product_ad_composite.quality-review.json", + "size": 3944, + "sha256": "sha256:bytes:d1fbc94b163a8573d46a2dd47946935ae06ce51ab4f95cd84e64913bd22e377d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_product_ad_composite.reviewed-provenance.json", + "size": 108001, + "sha256": "sha256:bytes:381e12e3f39be2ae1a7192b918eba815d2029351d68377acb959d31a70eb357b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_product_mockup.quality-review.json", + "size": 3433, + "sha256": "sha256:bytes:d864e05cd7069e72a254aca6f8519881013d84b954ddc8d67224e1b7bad6d73d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_product_mockup.reviewed-provenance.json", + "size": 102654, + "sha256": "sha256:bytes:dd0ef580bcfbf2beda1f7f571fc3b444a9c97d9f7dfd7e786000a3dc6a552888", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_product_relight.quality-review.json", + "size": 3508, + "sha256": "sha256:bytes:b861d8ce095fd338d8d55d9b332d1010511af533986d66664186feebdc61bafc", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_product_relight.reviewed-provenance.json", + "size": 108714, + "sha256": "sha256:bytes:27502d691d21995e461135d22847cb0ae821b03f103eca40cab80c4ad8ce230d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_text_rendering.quality-review.json", + "size": 3480, + "sha256": "sha256:bytes:60a57aeded56870fe11bb3778c6d76e02332d07713b1b544e41ffcbd4a0b1bb6", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_text_rendering.reviewed-provenance.json", + "size": 101176, + "sha256": "sha256:bytes:9611134a5092c7ecc267170fd99485f7c7802881ebfc8b2c9c5ea3d088ed1a9e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_tile_extract.quality-review.json", + "size": 3373, + "sha256": "sha256:bytes:09131391c3324338e90a40f57fd1cada2f08e321ec5904fcfc0d6c9920ee6aed", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_tile_extract.reviewed-provenance.json", + "size": 99836, + "sha256": "sha256:bytes:3b08851c75268f5dd35a5e5f0f4f1e47ecbe95ecfdccde93f1ba08e74f0fc241", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_upscale_finish.quality-review.json", + "size": 4739, + "sha256": "sha256:bytes:6839f40c63e339e656f88b3933285a54e7a902833f1dc585030356d36a172502", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/qwen_upscale_finish.reviewed-provenance.json", + "size": 107319, + "sha256": "sha256:bytes:30c664301de44d2be2f3a0110ce4392de6433a1b5a63e60d31a9c7870ce3b04f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/reference_fusion.quality-review.json", + "size": 3490, + "sha256": "sha256:bytes:0042893cc0ba3eb36438c8af0108de25c620cedc8febc83d14b46accb427f73a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/reference_fusion.reviewed-provenance.json", + "size": 107349, + "sha256": "sha256:bytes:e8bb52b4d660c345368dd44a7d9d40edf62b00770a01dc444a5d5e9ec8d8bd87", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/restoring_the_studio_backdrop.original-provenance.json", + "size": 2263, + "sha256": "sha256:bytes:a8d0febc08556ad204bef84d5c8d35bfab9bf69fe8d28b21f10ad315f962b897", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/restoring_the_studio_backdrop.original-review.json", + "size": 403, + "sha256": "sha256:bytes:633f93991afc1d361ac19a79c101f868f5954814f09dc349bcb61f967b821cf6", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/restoring_the_studio_backdrop.quality-review.json", + "size": 2397, + "sha256": "sha256:bytes:1e0613d7b8b08333cca474aea32b92bd3d6ac680a776e639b93c554a3011b311", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/restoring_the_studio_backdrop.retained-template-provenance.json", + "size": 3994, + "sha256": "sha256:bytes:6a6538a8278e1f94de68eb9b2928131809e5b3163a7157ff7db17d053635fa46", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/salt_marsh_from_above.original-provenance.json", + "size": 3298, + "sha256": "sha256:bytes:a126541afded7807e2f7c48f7695571cd00edb4c237e257829dea8025548fdc4", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/salt_marsh_from_above.original-review.json", + "size": 720, + "sha256": "sha256:bytes:890b1c2f2a76d781d9c1062a1e4ec1e637a5d7de161e8ec21fb4860bfba68365", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/salt_marsh_from_above.quality-review.json", + "size": 2636, + "sha256": "sha256:bytes:deb996a0c76f064ba87fcbde7750b4297dedd4f470a70246be5ce550f88b52d3", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/salt_marsh_from_above.retained-template-provenance.json", + "size": 3289, + "sha256": "sha256:bytes:9a904012bac7d429111212a1e17e1b5b08a754a6354230233a6c81b8f1a2cfe2", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sana_i2v_blue_hour_above_rice_terraces.original-provenance.json", + "size": 1517, + "sha256": "sha256:bytes:7bc9085e6b972b876e8e26e109ce89e2771e2b8b6dab904313f2806be2afc93b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sana_i2v_blue_hour_above_rice_terraces.original-review.json", + "size": 761, + "sha256": "sha256:bytes:e04a83a228783f9b7b8d9ad023dfc8af480e3b61254957280aea6b5513caaadf", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sana_i2v_blue_hour_above_rice_terraces.quality-review.json", + "size": 2662, + "sha256": "sha256:bytes:b588f00fbc3c68bfe70f263a8b4c36cceeaa5691590fdfcc22b0b51537e89e1a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sana_i2v_blue_hour_above_rice_terraces.retained-template-provenance.json", + "size": 3917, + "sha256": "sha256:bytes:e27e84a5fcdb01e1c410dfa311e43a13912853b1e20272979f078e04c74d5c6e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sana_sprint_monochrome_tiger.quality-review.json", + "size": 3320, + "sha256": "sha256:bytes:daad196fff80a6e8d2543deeb911b5cd94a027a746e8d7cc0a011dc687f8c50e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sana_sprint_monochrome_tiger.retained-template-provenance.json", + "size": 5206, + "sha256": "sha256:bytes:9da7a90fdc337893b768009a2d6c619c730606e2544c335f4c4d02d14137d1a9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sana_tidal_pool_on_black_basalt.original-provenance.json", + "size": 1721, + "sha256": "sha256:bytes:464b0cb9e776e21bd3b8dfbefa83c8b984bd76684dee47aec59943ff0e6b335a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sana_tidal_pool_on_black_basalt.original-review.json", + "size": 435, + "sha256": "sha256:bytes:822c6a8b3d52524742bfe5987264df6c10f357ae3c975d695a89cf0d5b9e762a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sana_tidal_pool_on_black_basalt.quality-review.json", + "size": 2421, + "sha256": "sha256:bytes:1dcfd72e9a8ac1f33c8ce5935e64598e279ddca468c1060e266376a8b7d89552", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sana_tidal_pool_on_black_basalt.retained-template-provenance.json", + "size": 3352, + "sha256": "sha256:bytes:66af6aa83b431b3f41da146254ebc0cc75190e50fe626ce635fc20a12f2c7502", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sana_video_water_terraces_before_sunrise.original-provenance.json", + "size": 1165, + "sha256": "sha256:bytes:250635b2ca6018d644f10604fd886da1c4d0b478dee0b119789bcceabbf1494e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sana_video_water_terraces_before_sunrise.original-review.json", + "size": 640, + "sha256": "sha256:bytes:3b96a247980147b258ed402c1614046d15d02e458fcea8a11f5dbb58585a1f7e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sana_video_water_terraces_before_sunrise.quality-review.json", + "size": 2592, + "sha256": "sha256:bytes:0bf7cc281ab478b7719c384b06b83a15b8e21745ffd6247e20b5f3ddf33194a3", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sana_video_water_terraces_before_sunrise.retained-template-provenance.json", + "size": 3583, + "sha256": "sha256:bytes:f0cc994e00a2bc07c096ec6f718af2dc4e279c47654d9b19d09fb6342a536442", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_canny_guided_green_glass.original-provenance.json", + "size": 1208, + "sha256": "sha256:bytes:4819d64b35e84d822483b4edf58c0d2a82ca612989a5f283763eff90e1c3dcc4", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_canny_guided_green_glass.original-review.json", + "size": 607, + "sha256": "sha256:bytes:702ca8e77651aeb71cddfb6daa67ca584309cc1639d3ad81cbe783e65c14ac14", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_canny_guided_green_glass.quality-review.json", + "size": 2327, + "sha256": "sha256:bytes:6b4eb4c2e53322bd651c6da7802034a81a968a063f4d68099d18a47b798b6a2a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_canny_guided_green_glass.retained-template-provenance.json", + "size": 3662, + "sha256": "sha256:bytes:402d8a04c798edda4ccf43f0b2716520eb7b4e3e268b111ac029ce1ef95865bc", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_control_cobalt_handmade_paper.original-provenance.json", + "size": 1400, + "sha256": "sha256:bytes:da7eebeec6ee06c919bd2a1b06634fdc12a0656ba046561fb0540c165ebdee19", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_control_cobalt_handmade_paper.original-review.json", + "size": 716, + "sha256": "sha256:bytes:5323b4eaa717d668add0b374d57be2cc16458d2dba6a7dab91cef3054e6783e6", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_control_cobalt_handmade_paper.quality-review.json", + "size": 2629, + "sha256": "sha256:bytes:8d1bd3e6ea993d171004dc6960a2384635596ebb4a212694128b4c0596085a38", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_control_cobalt_handmade_paper.retained-template-provenance.json", + "size": 3927, + "sha256": "sha256:bytes:9ab42723e81c7cad64ab3e8d5ffedeb21ab76c17a4aaf7e3d6f5e84e82f2133a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_control_cobalt_studio_wall_repair.original-provenance.json", + "size": 1552, + "sha256": "sha256:bytes:19bf85731e13ea963aab7adba6556b86bbcded7d0030b29342738bb6ef165418", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_control_cobalt_studio_wall_repair.original-review.json", + "size": 644, + "sha256": "sha256:bytes:972cd4b45f317e79624ad0f9d14361ad56ff661b9e8b5bebf049553317cb5af5", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_control_cobalt_studio_wall_repair.quality-review.json", + "size": 2438, + "sha256": "sha256:bytes:ed1f8ea25aa626c59572eb6c03d8e6c55eae588e1e6378afef6adc536f1983d7", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_control_cobalt_studio_wall_repair.retained-template-provenance.json", + "size": 4285, + "sha256": "sha256:bytes:fb2f08438b84f324cd9c37aaff2e4106e02c2302cc21a20e57d2a3ce456d4d12", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_pag_canny_guided_glass.original-provenance.json", + "size": 1257, + "sha256": "sha256:bytes:9c932db7355340ac4e8adf44b0d465192ee66096c6e811fd917ab7d0d6858881", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_pag_canny_guided_glass.original-review.json", + "size": 663, + "sha256": "sha256:bytes:71b3e8d9324b3a359982cc2544d97acaa55ad8fd919bba1c9638e337c2029b64", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_pag_canny_guided_glass.quality-review.json", + "size": 2346, + "sha256": "sha256:bytes:17e907b2f792b6f5d3a67cdb23e21cd610731baec7b7bd3914170fb801f4c807", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_pag_canny_guided_glass.retained-template-provenance.json", + "size": 3708, + "sha256": "sha256:bytes:7f00b5906e8f7b8b9f25ab10145851637e469edfb455660c72f08be72bee8b7b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_pag_cobalt_studio_repair.original-provenance.json", + "size": 1518, + "sha256": "sha256:bytes:b3a227ef5f8f0ea481c446854ce4be387bfe434ff252d9a5d34887ddb2b69b55", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_pag_cobalt_studio_repair.original-review.json", + "size": 961, + "sha256": "sha256:bytes:dcbaa8d96f77097c5e763de7dd3602e62e4dc4d1302b2d4e7a426ae606b94de3", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_pag_cobalt_studio_repair.quality-review.json", + "size": 2492, + "sha256": "sha256:bytes:ddfa89f8e656c4790a14c0e9dcfffa24a1a034cab5c1bb62390307bfa70bc9fc", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_pag_cobalt_studio_repair.retained-template-provenance.json", + "size": 4162, + "sha256": "sha256:bytes:e2aade8abc03d27c9f342023c60f27dcbb77f28a94d7605522ae0e862672eeed", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_pag_control_wall_repair.original-provenance.json", + "size": 1600, + "sha256": "sha256:bytes:aa19ad771615c138e20115977179f7a966ea7b8cdb2d08e358ee505d2954c623", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_pag_control_wall_repair.original-review.json", + "size": 692, + "sha256": "sha256:bytes:68dd29ac4fc908290c864d1e0d913aec7dd9773e642e226a83fa75425db275d9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_pag_control_wall_repair.quality-review.json", + "size": 2428, + "sha256": "sha256:bytes:2ebf376b23db382ffeeb0e2297864e4ad5ef7fac59db5a3e96e50c13c91d06e5", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_pag_control_wall_repair.retained-template-provenance.json", + "size": 4279, + "sha256": "sha256:bytes:c362aab4aae99eddcf68dab637479045ec7c4cc703bf3fb84a90b54293acec01", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_pag_mountain_lake_watercolor.original-provenance.json", + "size": 1302, + "sha256": "sha256:bytes:53be917cea31e259033fb99bb4ff99b1b975abc7cad671b8eb2511794545082e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_pag_mountain_lake_watercolor.original-review.json", + "size": 886, + "sha256": "sha256:bytes:e7226c4664a027c20670f6aa367d4c2751efbe4fc0569afe6cb137349a8f5406", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_pag_mountain_lake_watercolor.quality-review.json", + "size": 2463, + "sha256": "sha256:bytes:a76c9a2fbcb169ecc2498d87ebc3f17f640cd49c4ca906ffc117a281f885d2af", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sd15_pag_mountain_lake_watercolor.retained-template-provenance.json", + "size": 3780, + "sha256": "sha256:bytes:f2e571509ee047bbf0f2b7381ba505ec3204898db1f9d4bcf567ad1d661c1c75", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_blue_glass_on_linen.original-provenance.json", + "size": 1408, + "sha256": "sha256:bytes:27a97a45a77e030c923d8bdd21038de3f89a94132da92d6313179f752949ac89", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_blue_glass_on_linen.original-review.json", + "size": 807, + "sha256": "sha256:bytes:fabaeafe1e26297e9f1601776a60ecb99aff54d8bcd793f59efcdbb24aff75ca", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_blue_glass_on_linen.quality-review.json", + "size": 2364, + "sha256": "sha256:bytes:ac2ad3f014c2418214a1f5c0d24da1c6e0f854b5f465b5f73fc86a49f691e690", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_blue_glass_on_linen.retained-template-provenance.json", + "size": 3671, + "sha256": "sha256:bytes:bc7bc5349f88639d71d68f5fbd560c09bae488e4240cd5c53c9731904f655896", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_canny_adapter_glass_study.original-provenance.json", + "size": 1220, + "sha256": "sha256:bytes:daf26190a849032e45d97c519a2d0a943ea9cab99937916d7f2f9b88b29a69a0", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_canny_adapter_glass_study.original-review.json", + "size": 684, + "sha256": "sha256:bytes:305618170534dc7808c62234e6bc2a428e49d6eb5ed766aabb4aad4cc48f6e07", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_canny_adapter_glass_study.quality-review.json", + "size": 2526, + "sha256": "sha256:bytes:f4766cc262cf8d06f5e643b7e4b11bf31ddb550de66b2274727948738550ab7b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_canny_adapter_glass_study.retained-template-provenance.json", + "size": 3678, + "sha256": "sha256:bytes:3a6c1a9a6ce7a31c19275f7049b062f62739c7517e13e2ad5c512c805a5a68ef", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_clear_cobalt_backdrop.original-provenance.json", + "size": 1214, + "sha256": "sha256:bytes:7361ac84e232f55f7f8e19fae39c5abff4e4df36ac1d1c754ca4d9716d60b1df", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_clear_cobalt_backdrop.original-review.json", + "size": 473, + "sha256": "sha256:bytes:d7edf6240c066f9d48ab24fd45c77556b2afa52e145f530428c93620496ddf15", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_clear_cobalt_backdrop.quality-review.json", + "size": 2291, + "sha256": "sha256:bytes:c5853176bee61c270f06f94714ff9e968eb466ab7198d26d78a1d9dc4482cb41", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_clear_cobalt_backdrop.retained-template-provenance.json", + "size": 3981, + "sha256": "sha256:bytes:b680690954be3c7784aed2b97110d50706dc3ebb56df9e61611b203150a90b39", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_control_golden_boathouse.original-provenance.json", + "size": 1796, + "sha256": "sha256:bytes:ecfe216b3884fc1471abf2305a3f4e0216b4b7f2eb05324720e081cbcf945eb1", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_control_golden_boathouse.original-review.json", + "size": 769, + "sha256": "sha256:bytes:c552f8bfe66a6983be2ab31844c4a468a6132e0e43a8a4553e67a497ec70a8ef", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_control_golden_boathouse.quality-review.json", + "size": 2609, + "sha256": "sha256:bytes:3fdc382b76e87f894d2a03a5666ce990b33da15e348abf47e7176aaf82fb8f97", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_control_golden_boathouse.retained-template-provenance.json", + "size": 3955, + "sha256": "sha256:bytes:5d442e9e2219d92d7360b927357bc34f1d8948776601d716369786fcd2a153b9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_control_inpaint_warm_plaster.original-provenance.json", + "size": 1498, + "sha256": "sha256:bytes:661ddabb9dd317859660c6d6c56737672f0969c2637153b2aa3a14b1422cac0b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_control_inpaint_warm_plaster.original-review.json", + "size": 570, + "sha256": "sha256:bytes:9ec0f8ff6cc645c9c9c9c9102965753af931061398629edb65727f99d2cb7faa", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_control_inpaint_warm_plaster.quality-review.json", + "size": 2463, + "sha256": "sha256:bytes:4e3e6d321e3c4b7b17ba5ff675c610bd6c0a86779bda8e1c2fa0b3c25754d15e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_control_inpaint_warm_plaster.retained-template-provenance.json", + "size": 4261, + "sha256": "sha256:bytes:b55fbe6ba9d7b2243d12fe0227026b502eb8674412f4da62cc0ef72b57a91370", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_controlnet_glass_study_on_slate.original-provenance.json", + "size": 1214, + "sha256": "sha256:bytes:5eff28279014893ed1b626866eef574cb72798d376da8faef83766c89e3e8223", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_controlnet_glass_study_on_slate.original-review.json", + "size": 595, + "sha256": "sha256:bytes:42676c7dd7b9bd9c2062dd771f1d63f7507670609ba6ef543b066877c6f86de1", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_controlnet_glass_study_on_slate.quality-review.json", + "size": 2271, + "sha256": "sha256:bytes:3ad7e229aa4536d60a0337200d22d47e753f7770edbce0528a7dd89f3f7f0895", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_controlnet_glass_study_on_slate.retained-template-provenance.json", + "size": 3701, + "sha256": "sha256:bytes:564bd43c3c23f41f40e46ee762ad2a3c61e63ca7a5600f8af0fdf92b263856fe", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_pag_cobalt_wall.original-provenance.json", + "size": 1601, + "sha256": "sha256:bytes:73001e41f7161d3d7f501d8901c64ea75b69926342d874f517161846bbc2c65e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_pag_cobalt_wall.original-review.json", + "size": 1074, + "sha256": "sha256:bytes:9c33914daf546f076a1cd4248d62bca41f48046bbf32641336a61e6af8ce5ae6", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_pag_cobalt_wall.quality-review.json", + "size": 2807, + "sha256": "sha256:bytes:792bcb8050a146a925e0a3459c499e41ca08f710496292775ed7a85acf4e1ddf", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_pag_cobalt_wall.retained-template-provenance.json", + "size": 4118, + "sha256": "sha256:bytes:69442605e67b4da6af5ab3971559219066b7c569139088412a65945487509612", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_pag_lighthouse_in_graphite.original-provenance.json", + "size": 2754, + "sha256": "sha256:bytes:042e90f725818b6ec86db0f60b7b19cc59856e445c3b11c8f81bd11f6b817d18", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_pag_lighthouse_in_graphite.original-review.json", + "size": 614, + "sha256": "sha256:bytes:02aece417b9581ebf7330fdcb4bac17e156a77564df88093d4748342c46011f6", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_pag_lighthouse_in_graphite.quality-review.json", + "size": 2460, + "sha256": "sha256:bytes:fff347aeb1f18af04502cb973b04ebda279e36ddcfe30ccfdec6f2e13254f550", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_pag_lighthouse_in_graphite.retained-template-provenance.json", + "size": 3771, + "sha256": "sha256:bytes:0a272b63747525e66ca2d17e43739ea139ac97497e02d08443f72486dc980530", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_pag_snow_cabin.original-provenance.json", + "size": 1325, + "sha256": "sha256:bytes:9f8fc8e1ec02ce87e641958fdbded7f199cee15cde9e077cbb40b12e0e8d7d93", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_pag_snow_cabin.original-review.json", + "size": 733, + "sha256": "sha256:bytes:5b23c67819bad2bb24ccdbd2058df59a33a560077c260097e5711ef9a74746ba", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_pag_snow_cabin.quality-review.json", + "size": 2536, + "sha256": "sha256:bytes:d29b39aeafcf213fbcfff098372b9aad723d5a08c8fd63970f98162ed64e8ad3", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_pag_snow_cabin.retained-template-provenance.json", + "size": 3678, + "sha256": "sha256:bytes:d82c38326bd8b615ed7a934890b979e34f2870f8b0c7aa6f919f0b541d828905", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_pag_two_tier_cobalt_glass.original-provenance.json", + "size": 2329, + "sha256": "sha256:bytes:d4964819e6cb3ce6ba2484f5cac7f9a7b5eb45a24760cc256e01d060c4ab797b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_pag_two_tier_cobalt_glass.original-review.json", + "size": 664, + "sha256": "sha256:bytes:4b05631fe8df2205288c9afa83ffea0814cf681163cabc05a9c5b8cf5ec238c9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_pag_two_tier_cobalt_glass.quality-review.json", + "size": 2595, + "sha256": "sha256:bytes:b146fa66a1c40921b090b5356a4d288e0bcf9ee27c3c3406d551188acb79eb5a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_pag_two_tier_cobalt_glass.retained-template-provenance.json", + "size": 4075, + "sha256": "sha256:bytes:0e83d8ea9d2bd9e76097be0cf86fff4049d744c7be289dabb5f08039f6afc599", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_pix2pix_pale_amber_glass.original-provenance.json", + "size": 1287, + "sha256": "sha256:bytes:173457c9a8b1562e8268041daa277812a04739145a537765cdcb49278cabce33", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_pix2pix_pale_amber_glass.original-review.json", + "size": 834, + "sha256": "sha256:bytes:8f6ce6ee6887bc2d878b762faa054f5a26d6853c11fadc6ca32b0f71fb4ad080", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_pix2pix_pale_amber_glass.quality-review.json", + "size": 2321, + "sha256": "sha256:bytes:214f457d0759bb55820c36572a44b2cf144ac11d6b87180326a1dd72ec903e12", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_pix2pix_pale_amber_glass.retained-template-provenance.json", + "size": 3750, + "sha256": "sha256:bytes:571dbef32e64cbea069c54c9a71408eb47cbf6854dbbb10e9060dfe04758cf99", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_turbo_orange_caps.original-provenance.json", + "size": 997, + "sha256": "sha256:bytes:38ebec1786b4ca93369a6e08f61c7fa24ed755f1a11804d2f0378d0b5b4c0f74", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_turbo_orange_caps.original-review.json", + "size": 465, + "sha256": "sha256:bytes:45bccd884aec054b8054d8253ef61fe6a09716a97d2ca3331eae39fed60d675c", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_turbo_orange_caps.quality-review.json", + "size": 2257, + "sha256": "sha256:bytes:b65f8f13cbb77853bc90c4015ce3432a353f22d1b4b8d3faeecb5ac1a00ba9e0", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/sdxl_turbo_orange_caps.retained-template-provenance.json", + "size": 3306, + "sha256": "sha256:bytes:485e9d39648d71e0c2d449418ed6124bb37ae1e7928a2bcbc1592040929f01bd", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/shap_e_traffic_cone_turntable.original-provenance.json", + "size": 1105, + "sha256": "sha256:bytes:668bdbe05f99a8ab63a923569cb852fc7fb9dc28fd5bd8a978425bd02db021d8", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/shap_e_traffic_cone_turntable.original-review.json", + "size": 530, + "sha256": "sha256:bytes:9fd2d7c5b61bfca3f70994218c302b4c939cbe6f78064360fe32d93633969c22", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/shap_e_traffic_cone_turntable.quality-review.json", + "size": 2488, + "sha256": "sha256:bytes:241507a58736bbcd8f4ca1948fc842276fda4fe1635ddd6cd0bfe057159a7505", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/shap_e_traffic_cone_turntable.retained-template-provenance.json", + "size": 3699, + "sha256": "sha256:bytes:72579b5cd08573adefe06f1ddda3b6f9c1c42f3f2c36622ef64cec896d03d0f7", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/smollm2_rain_gauge.quality-review.json", + "size": 2378, + "sha256": "sha256:bytes:a457e4143d17eecd1af499e61a28e7df0533b4a6a8f67712182ab8a829115e09", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/smollm2_rain_gauge.retained-template-provenance.json", + "size": 2565, + "sha256": "sha256:bytes:6b45536aab6905c02b1e937fb6c684765c30354ceff8e05c7ec6c1454500f168", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/smolvlm_red_triangle.original-provenance.json", + "size": 1393, + "sha256": "sha256:bytes:7ef65f47028ad3af96b1189b40a52d085c696475b0e9ee55ea1d780f286a3481", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/smolvlm_red_triangle.original-review.json", + "size": 549, + "sha256": "sha256:bytes:24aae45e0bf9ca8ec749e8521293a25beb56dc264276604e634699eed52f852e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/smolvlm_red_triangle.quality-review.json", + "size": 2273, + "sha256": "sha256:bytes:d7f5e471998c28cb0ba86532b0471c0a2a3ff1c9ea17e2e9169bcb91cf835bd1", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/smolvlm_red_triangle.retained-template-provenance.json", + "size": 3535, + "sha256": "sha256:bytes:45f154d4661611e859e67593f38fef064e544c1806c03a1f67919120b169d4f1", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/spandrel_tram_shelter_video_2x.original-provenance.json", + "size": 1321, + "sha256": "sha256:bytes:93548255b2f66162d1dae4838547a8144eb5b0bba7885db5914d54702f98efe5", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/spandrel_tram_shelter_video_2x.original-review.json", + "size": 868, + "sha256": "sha256:bytes:ebc2cc444a1f0e83614e35d41b598ab8a78c57768313b6bc45f5ca4dff1b72e9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/spandrel_tram_shelter_video_2x.quality-review.json", + "size": 3061, + "sha256": "sha256:bytes:584a2e4480f23b8489a3dd11930f64fdd7956619e25c24b7489e859f665b70e8", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/spandrel_tram_shelter_video_2x.retained-template-provenance.json", + "size": 4433, + "sha256": "sha256:bytes:2ad672e15b395ae0437eae8380083ed4ee76bf6a1efafa683570226080a212c1", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/spandrel_x2_synthetic_gradient.quality-review.json", + "size": 2674, + "sha256": "sha256:bytes:75cd20b7aa48a0e129f10d09801f4ee7183c8a3bda5cf8a16bf372d9459c97f1", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/spandrel_x2_synthetic_gradient.retained-template-provenance.json", + "size": 3397, + "sha256": "sha256:bytes:43789929c6d5eab5bf18f99df491e30a71f0ebd0a74b8162af30893303e282c0", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/stable_audio_glass_roof_rain.original-provenance.json", + "size": 1270, + "sha256": "sha256:bytes:26867757b5d173fd0561791ca6114c84c2cb07b0790c2c2c292b3a109af12bc9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/stable_audio_glass_roof_rain.original-review.json", + "size": 636, + "sha256": "sha256:bytes:57dc1622e671d71d0f34df6890aaf520a98e64dd2f333edcac58fb6a641afea9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/stable_audio_glass_roof_rain.quality-review.json", + "size": 2579, + "sha256": "sha256:bytes:2aa5a85090091d93cf2b23494790f75146c523fe1880bef0b0212d9f8bd7d2d5", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/stable_audio_glass_roof_rain.retained-template-provenance.json", + "size": 3447, + "sha256": "sha256:bytes:6681cbf847e93d8e25b0bde0f61aaa1d7928e68d439875d8c204c69dc55fb7e9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/stable_video_lighthouse_headland.original-provenance.json", + "size": 1200, + "sha256": "sha256:bytes:25bb70c7420bc425e8d919e74d2a48e7debf888e362b5c6da84ae841878cab74", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/stable_video_lighthouse_headland.original-review.json", + "size": 662, + "sha256": "sha256:bytes:9c2dbec34ba3818608ecd4e0f72729926d8ea1d536e90fb2e1a64d3cb1cad597", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/stable_video_lighthouse_headland.quality-review.json", + "size": 2507, + "sha256": "sha256:bytes:f61d4759e7dd2ef99f9553cce415e5f278eca5c61c68391935b6a5d9ac90ad3d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/stable_video_lighthouse_headland.retained-template-provenance.json", + "size": 4026, + "sha256": "sha256:bytes:4522c6ff83f21b51ed4de646d27e95475255931ac9e243c77d167bc039c66f67", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/the_glasshouse_seed_tray.original-provenance.json", + "size": 2794, + "sha256": "sha256:bytes:267ab964ea3749739c8f58b86f7b94aa2c2cfe506a12c4f33c615c8415a97230", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/the_glasshouse_seed_tray.original-review.json", + "size": 685, + "sha256": "sha256:bytes:49410d9deaf87256d1f77a2ee3839b8ae49ddd9ba4a33b6bc740347c4ce12744", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/the_glasshouse_seed_tray.quality-review.json", + "size": 2512, + "sha256": "sha256:bytes:ddc92db2d2f6ce8da152019e33a20b66ffd61a780d72b76ce550fd2d00d63a33", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/the_glasshouse_seed_tray.retained-template-provenance.json", + "size": 3330, + "sha256": "sha256:bytes:c719553a51b1b44737b448ad981e6e14d2e71ad4a63deb0a865453e94e7c78c8", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_22_ti2v_5b_seed_vault.quality-review.json", + "size": 8097, + "sha256": "sha256:bytes:119627f8cbd5751af0bf7cbf7dc7f5fa6a22ce28000438e0e49fc7569a493596", + "contentType": "application/json", + "purposes": [ + "runtime", + "tooling" + ] + }, + { + "path": "template-gallery/reviews/wan_22_ti2v_5b_seed_vault.reviewed-provenance.json", + "size": 79278, + "sha256": "sha256:bytes:260b3901159d64efad800ec39e72a1ac893e0b1f717551b572288f2a10efe1e8", + "contentType": "application/json", + "purposes": [ + "runtime", + "tooling" + ] + }, + { + "path": "template-gallery/reviews/wan_a14b_cloudbreak_over_the_ridges.original-provenance.json", + "size": 2280, + "sha256": "sha256:bytes:865acf7a0ce08eb184068a1dea15a3f7327c627d39056a104856e226f845e312", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_a14b_cloudbreak_over_the_ridges.original-review.json", + "size": 478, + "sha256": "sha256:bytes:f34e7a0de89fb4c48b70237f53f6db6f4de06d26ad7c6f582c6f7a6513f780ba", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_a14b_cloudbreak_over_the_ridges.quality-review.json", + "size": 2389, + "sha256": "sha256:bytes:f6b307987e3779cdf108f2c9832d960e3a3d53087267a6e38446aeb43a05c5b6", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_a14b_cloudbreak_over_the_ridges.retained-template-provenance.json", + "size": 3763, + "sha256": "sha256:bytes:179c61ab54e5174a0c8504960903d5abf55bb04033116946d8a0fd5c994a7c70", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_a14b_wind_across_pond.original-provenance.json", + "size": 1278, + "sha256": "sha256:bytes:c8288cada585d18cd7a71b7094fd19125131e3753171d94f3c79ebf12c59c64a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_a14b_wind_across_pond.original-review.json", + "size": 744, + "sha256": "sha256:bytes:abce3c693a5c298d0cf580e200540b6bcb16b3f461acc27e4bf750d829f4cafe", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_a14b_wind_across_pond.quality-review.json", + "size": 2511, + "sha256": "sha256:bytes:5f9946d7d69874e43eb07b24732b57e4aae4fddc6e281b5afa84803638d1298b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_a14b_wind_across_pond.retained-template-provenance.json", + "size": 3839, + "sha256": "sha256:bytes:d9b781b0ff4349d361c02cd395e3340c7ffe622cbcf311b805231c86ec4cf9c1", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_animate_glasshouse_keeper.original-provenance.json", + "size": 5203, + "sha256": "sha256:bytes:ce7cd68be0d73e65a89ec5136e5cb21e16940f318448d7d85493c4109135ce10", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_animate_glasshouse_keeper.original-review.json", + "size": 1152, + "sha256": "sha256:bytes:368f120d1eb2c48f11a688a7c1293371bbad8cd67c026e24cf0655d8dc8f4e04", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_animate_glasshouse_keeper.quality-review.json", + "size": 3520, + "sha256": "sha256:bytes:c0a191c85ddf88e695030d83c665e5016a5dc4a119724bc6330e3536b8406244", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_animate_glasshouse_keeper.retained-template-provenance.json", + "size": 4925, + "sha256": "sha256:bytes:cbc0bb0c647d903d9b6a26858b83d660ba333be4bdda28c14b3098f069f19970", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_animate_signal_through_the_rain.original-provenance.json", + "size": 2614, + "sha256": "sha256:bytes:c6ade5109c32d17a15fbaebf57c45ee32cee41502f0be365a3ddee7c012d2c47", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_animate_signal_through_the_rain.original-review.json", + "size": 837, + "sha256": "sha256:bytes:85d59351c41ffbb1c9910be7830d71b326910bebabd39f89fb1cc4a1db880914", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_animate_signal_through_the_rain.quality-review.json", + "size": 2790, + "sha256": "sha256:bytes:d4949512728370151d4e5422724129744515972b08dee0fbba2fd5883ead261c", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_animate_signal_through_the_rain.retained-template-provenance.json", + "size": 4484, + "sha256": "sha256:bytes:0e9f6bb00b8bd54c23aaf8c63cb3fb27d3c4a8adfdc103f63b61b6730413a483", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_flf_blue_hour_at_the_tram_shelter.original-provenance.json", + "size": 1322, + "sha256": "sha256:bytes:556edbb96784d97900a95f4c3cdf618102ae2f492b2791a67ef5cd9e258f3dfb", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_flf_blue_hour_at_the_tram_shelter.original-review.json", + "size": 652, + "sha256": "sha256:bytes:70b7a63ed50e5c3ccd8c706fd07917afec3ac8ef088d33b28b8d22d57f800548", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_flf_blue_hour_at_the_tram_shelter.quality-review.json", + "size": 2433, + "sha256": "sha256:bytes:a549ff13492e46da3c707f861fb33fd71411034ffb96a81550d7a16fcd79cf12", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_flf_blue_hour_at_the_tram_shelter.retained-template-provenance.json", + "size": 4102, + "sha256": "sha256:bytes:e4deed2284f9ae122cbb97a82049d7407fdec05f34d332f8225b40fd40b13820", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_ti2v_subway_musician.original-provenance.json", + "size": 3839, + "sha256": "sha256:bytes:2b4a47b2aa7e904f2541a51b150497e420d1970fa202e44a99bb04956f3fa703", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_ti2v_subway_musician.original-review.json", + "size": 547, + "sha256": "sha256:bytes:e0c162c7130f640bcd9375d070f0d5eff1ef4c4ec26b829c18733dd8d644dd8c", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_ti2v_subway_musician.quality-review.json", + "size": 3058, + "sha256": "sha256:bytes:e0fff184772e4c8465c986c3c9bb2f5024ed19cc809330bbcfa7705ee452bdfc", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_ti2v_subway_musician.retained-template-provenance.json", + "size": 4290, + "sha256": "sha256:bytes:5aef1cb2eff8bd92f71e8d9be5fa04a6df49e01f0800f5fb76076681f7e1bb14", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_vace_amber_glass_stabilized.original-provenance.json", + "size": 2446, + "sha256": "sha256:bytes:6b08670223819852e7ed62a06af7ddf1707a38b7364f2269aa22d5e6592dce0b", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_vace_amber_glass_stabilized.original-review.json", + "size": 928, + "sha256": "sha256:bytes:66f4440a92234772ba4de1ccd6eec655251cb53b2059e99568a6f7fa7f1254c0", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_vace_amber_glass_stabilized.quality-review.json", + "size": 3296, + "sha256": "sha256:bytes:fecde3eeefab0f0a2351a6ceaacb18fddf91668c5f74e0e847962ae98e28a404", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_vace_amber_glass_stabilized.retained-template-provenance.json", + "size": 4686, + "sha256": "sha256:bytes:7eba7fc91b85672ce34324a462f2a040c52857c8b72c739e4a37b17315fe9e76", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_vace_amber_rings_after_rain.original-provenance.json", + "size": 1478, + "sha256": "sha256:bytes:4596d993891c34f721ac085d6d9377e63af8610998160c4d582fc2761b1efdff", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_vace_amber_rings_after_rain.original-review.json", + "size": 616, + "sha256": "sha256:bytes:7ed3a6bacaf029f014c5f7540c50ba7da542903367a6bfbe39eca6c3c15a5196", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_vace_amber_rings_after_rain.quality-review.json", + "size": 2521, + "sha256": "sha256:bytes:82fa4f72865bc998461d725a6454112962566b14586b42ead517d8f446ac0599", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_vace_amber_rings_after_rain.retained-template-provenance.json", + "size": 3663, + "sha256": "sha256:bytes:c416efe725b4ba3e2dd7ea08c16b574205d292c3c3e2198d707b602a0fcb0bac", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_vace_cinematic_text_to_video.quality-review.json", + "size": 6183, + "sha256": "sha256:bytes:3d564d7a20781eb6a2020f9713270acb01e067a47d7570b8532b252d92b33be1", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_vace_cinematic_text_to_video.reviewed-provenance.json", + "size": 154971, + "sha256": "sha256:bytes:33a8867f911b54baf18359735e43aed771dc371516661321cf34cd6b84a65244", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_vace_grayscale_control.quality-review.json", + "size": 7297, + "sha256": "sha256:bytes:f2b8a46ff87c971bd9b78faa55a8965ae4591789bac92db05998878d52ddd36e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_vace_grayscale_control.reviewed-provenance.json", + "size": 170250, + "sha256": "sha256:bytes:32a06c926d52bf16fb3de077275d097978e75a57494a2b575335973aa5b538a5", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_vace_outpaint_reframe.quality-review.json", + "size": 7198, + "sha256": "sha256:bytes:837f3092922cff1c26a1ef17da195fcc3d0dd1ca66b282c5baee93a12c85c643", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_vace_outpaint_reframe.reviewed-provenance.json", + "size": 175153, + "sha256": "sha256:bytes:05f0ed9a25e8c162397f0fa291c0cec908c093d499844e3fee9b7e38862e9c62", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_vace_video_color_grade.quality-review.json", + "size": 6948, + "sha256": "sha256:bytes:c51237d1857467ecc3d41dc5cc9394734d44ab67fbdd717c4e1ac3ee42c6173d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_vace_video_color_grade.reviewed-provenance.json", + "size": 384006, + "sha256": "sha256:bytes:2a5f97b9fee2b3281086ece08aac774ac716faa4b185f908146535f3dcbe30ec", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_vace_video_to_video.quality-review.json", + "size": 7090, + "sha256": "sha256:bytes:1dba7702a6b9d474e807c503eb6af9214fb7f473e25735da39eee56bcc0fe93e", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_vace_video_to_video.reviewed-provenance.json", + "size": 161379, + "sha256": "sha256:bytes:befa2e12c5fa698bcb467fc9f954bcd6967d68c2fa8542357d3bc8144753afb6", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_video_long_showcase.quality-review.json", + "size": 6168, + "sha256": "sha256:bytes:ce34b17a445aeea573275f45ac2e3ea0578b6e8458b12191d6884d6d5f28e0b4", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wan_video_long_showcase.reviewed-provenance.json", + "size": 308774, + "sha256": "sha256:bytes:4e355061c502c865d206fe9cbddd4c74984385d4d78254af5b629202b18ad1be", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wav2vec2_station_announcement.quality-review.json", + "size": 2461, + "sha256": "sha256:bytes:7baa800c8cbcdc9fb820deaa07c82e1755f24720eb00a254753ab487cd02ebf1", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/wav2vec2_station_announcement.retained-template-provenance.json", + "size": 3692, + "sha256": "sha256:bytes:4eb550b72db5b3c48a5dc5a1807067dc92ca77d9c288cbcc6e66e8fe3d15e78c", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/whisper_small_an_open_door.original-provenance.json", + "size": 856, + "sha256": "sha256:bytes:f8c6523ab16cc4c21dd7239dfb6d08930eb74dcf26109391f7eccdc1243ec1f8", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/whisper_small_an_open_door.original-review.json", + "size": 470, + "sha256": "sha256:bytes:eaecd7b4ce1cfb2fcbbe8304f8700b1f46c29f5fea4befa7fff971aea95f2a7f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/whisper_small_an_open_door.quality-review.json", + "size": 2270, + "sha256": "sha256:bytes:86f1cf2540c9c980f232d3ee7e1927d38e32b5b5f613bb40801ec8d7f9945d33", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/whisper_small_an_open_door.retained-template-provenance.json", + "size": 3535, + "sha256": "sha256:bytes:07e2575fa2b29c75f4f4f5a4dcad63f6cd5c790386f16d6ccf277628fbfb5483", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/whisper_tiny_blue_cup_transcription.quality-review.json", + "size": 2380, + "sha256": "sha256:bytes:e25cabb7027838e4593af9155c9dba2dc695d23ee2cccc2ad8bbc991a992c5e5", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/whisper_tiny_blue_cup_transcription.retained-template-provenance.json", + "size": 3759, + "sha256": "sha256:bytes:410e2c8efcb1ae5a4bf6827f9bf327fc9bfa6bc84f32eedb269b1120cbbfd3a9", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/z_image_cinematic_contact_sheet.quality-review.json", + "size": 2401, + "sha256": "sha256:bytes:4a895beb586a81c69f6afeaf387bf2797333d59396023c188920d1913ee86029", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/z_image_cinematic_contact_sheet.reviewed-provenance.json", + "size": 102371, + "sha256": "sha256:bytes:a356fc5d856cf7cb93af1c45a98aa932ae2fc94a2d1b68d8658be0819de5ffa5", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/z_image_lora_style.quality-review.json", + "size": 3168, + "sha256": "sha256:bytes:6a2e0b888d8c11c5cb00e08c4d0737d573f75a020896d476204f219d8841b3a2", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/z_image_lora_style.reviewed-provenance.json", + "size": 106347, + "sha256": "sha256:bytes:4f5e5b003f72345d01213ae2fe4d30e8de58cc6695aed1d15cf450c66c3ac4be", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/z_image_poster.quality-review.json", + "size": 3210, + "sha256": "sha256:bytes:29893f356060254640937a736f1bfcd8979ec2cdc18387db7961702947a2e84f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/z_image_poster.reviewed-provenance.json", + "size": 100870, + "sha256": "sha256:bytes:8898724b99b9f2ed4b16609ef0bfa23d4573a4f992b6602ecb9d50877212c62d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/z_image_product_mockup.quality-review.json", + "size": 2575, + "sha256": "sha256:bytes:a536521d8c5fd5ebb6ef5cf95b33663378ede471a94e3acc1fc1852079b4cb11", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/z_image_product_mockup.reviewed-provenance.json", + "size": 100365, + "sha256": "sha256:bytes:0dff7e19b43d2347dfec2dd6e2bb9e88470880fe6b949e9c1cddd998d30bf146", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/z_image_quick_concept.quality-review.json", + "size": 2987, + "sha256": "sha256:bytes:3c965eb4fea2465d300093425187452e07c305808bee30f671b32674a7fd5411", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/z_image_quick_concept.reviewed-provenance.json", + "size": 101145, + "sha256": "sha256:bytes:c31016b24e0b3935d7963b97d0fca05e9e8d208d2c9ae872ee5602d40173e8ec", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/zimage_golden_amber_glass.original-provenance.json", + "size": 1214, + "sha256": "sha256:bytes:38001f1b676cbc30bb15e344e3dcb30102e11f204aa09a81002f6eb9d973b8a3", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/zimage_golden_amber_glass.original-review.json", + "size": 795, + "sha256": "sha256:bytes:1ada33599f214a4d4a2cb3076823b66328fd5d17f1bb816259dcf37b6c474dd1", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/zimage_golden_amber_glass.quality-review.json", + "size": 2343, + "sha256": "sha256:bytes:9eccd9055e341b7ef305b74e6103d70458bece7336d79ce64f2dd3f1bf7cdb1d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/zimage_golden_amber_glass.retained-template-provenance.json", + "size": 3660, + "sha256": "sha256:bytes:b7b4cc1441995324830d2c34d883b4bcb86b62faf445afbc15ea77b7855d024a", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/zimage_rocky_glacial_shores.original-provenance.json", + "size": 1571, + "sha256": "sha256:bytes:f6f52781f50d76e5f47500b56a32d904ad2fe1c05ffc3db32232b0c3b1811aa7", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/zimage_rocky_glacial_shores.original-review.json", + "size": 1090, + "sha256": "sha256:bytes:3b2e791eb5191adbb9deb87721e44a602c3078e85930124f8b0de631ff6752a0", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/zimage_rocky_glacial_shores.quality-review.json", + "size": 2543, + "sha256": "sha256:bytes:9017baf79260e6a9ae4b85b8663ef71de2ccff3edad73c1275562af14d3b8750", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/zimage_rocky_glacial_shores.retained-template-provenance.json", + "size": 3949, + "sha256": "sha256:bytes:625f42767a68845e1dd2e09a4760d7938138c8c8a8b8a196d3748184b0bfa44d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/zimage_seamless_cobalt_backdrop.original-provenance.json", + "size": 1582, + "sha256": "sha256:bytes:d4a52b23af4248329ef8232b4058b8fcf3c877ddfcfc9b20c4e27a3aacadfa9f", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/zimage_seamless_cobalt_backdrop.original-review.json", + "size": 940, + "sha256": "sha256:bytes:b112c13caaa7ec635f2dfc8a4dc8fd2304778d1bc7aa5f1dab5c6c430ed48704", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/zimage_seamless_cobalt_backdrop.quality-review.json", + "size": 2592, + "sha256": "sha256:bytes:0d1d91ea0c9d9c165f2ab152c8a6405e6bb43ad26dc886a844367c051ea3ea8c", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/reviews/zimage_seamless_cobalt_backdrop.retained-template-provenance.json", + "size": 4101, + "sha256": "sha256:bytes:dc64773a27bdd47d79712c11274cbdf9b3bde35a576d2e96be1ef1dc12972361", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/runtime-inputs/assets/0ea2dd6fd5c75c7b49e5677c3ff74666b6e8b3d3cf7f62ba1ad416253a76f63b.webp", + "size": 91186, + "sha256": "sha256:bytes:0ea2dd6fd5c75c7b49e5677c3ff74666b6e8b3d3cf7f62ba1ad416253a76f63b", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 576 + }, + { + "path": "template-gallery/runtime-inputs/assets/101d50449cc4d74257e88e87fb750363bfe538c58b601b340fb3ce9031c2ed03.mp4", + "size": 684528, + "sha256": "sha256:bytes:101d50449cc4d74257e88e87fb750363bfe538c58b601b340fb3ce9031c2ed03", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/runtime-inputs/assets/124415536a8071baccf8821232ad79a0a8ceec30ae62617c91a8d7a0b59d0a8c.webp", + "size": 57604, + "sha256": "sha256:bytes:124415536a8071baccf8821232ad79a0a8ceec30ae62617c91a8d7a0b59d0a8c", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/16f6ea27b5d7cfaed106e2e694572bbe92b7c7e2a43835b3f4313a748f510f74.png", + "size": 3890, + "sha256": "sha256:bytes:16f6ea27b5d7cfaed106e2e694572bbe92b7c7e2a43835b3f4313a748f510f74", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/1d993540e914f0e2d230f1133b57ae14bb837829237a53c89613fcdef6699995.webp", + "size": 281216, + "sha256": "sha256:bytes:1d993540e914f0e2d230f1133b57ae14bb837829237a53c89613fcdef6699995", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/218d83e0706fec201097582a6e5e00dc79f2d7d1ecb0badba2214c5ecaae1866.mp4", + "size": 1312979, + "sha256": "sha256:bytes:218d83e0706fec201097582a6e5e00dc79f2d7d1ecb0badba2214c5ecaae1866", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/runtime-inputs/assets/233d1b3a123fceb4f3b68d2d3a9f5b4129627073b8235fe7248ae6ebdeecb554.mp4", + "size": 240426, + "sha256": "sha256:bytes:233d1b3a123fceb4f3b68d2d3a9f5b4129627073b8235fe7248ae6ebdeecb554", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/runtime-inputs/assets/283b1cfb32b15fe6b31a29dce1f2b96026c1ad0826bf3f24aebebf4b6f9a4f07.webp", + "size": 102088, + "sha256": "sha256:bytes:283b1cfb32b15fe6b31a29dce1f2b96026c1ad0826bf3f24aebebf4b6f9a4f07", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/29722ed072feec11cd36adce7b6cb48483bff3f05776048b93f960b5554ab533.png", + "size": 10170, + "sha256": "sha256:bytes:29722ed072feec11cd36adce7b6cb48483bff3f05776048b93f960b5554ab533", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/2e0ec8892660785e322468d0153fd2dadf7a4d920fce2d7d4a0b686a8fe8515d.webp", + "size": 330492, + "sha256": "sha256:bytes:2e0ec8892660785e322468d0153fd2dadf7a4d920fce2d7d4a0b686a8fe8515d", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/2e202069a584ee5ada91e2deaea6bf7b92a94f4816e669e695d7cb64d5a1cb0e.png", + "size": 157468, + "sha256": "sha256:bytes:2e202069a584ee5ada91e2deaea6bf7b92a94f4816e669e695d7cb64d5a1cb0e", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/379cdf80a147cdbe84ccad4b97daec4a734c0a274761da9900e658a09ca48d28.webp", + "size": 345792, + "sha256": "sha256:bytes:379cdf80a147cdbe84ccad4b97daec4a734c0a274761da9900e658a09ca48d28", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 576 + }, + { + "path": "template-gallery/runtime-inputs/assets/3807d712e24a94c4b445c2fa950a784bba334f5f665e74964fe4d47a43856230.wav", + "size": 14400044, + "sha256": "sha256:bytes:3807d712e24a94c4b445c2fa950a784bba334f5f665e74964fe4d47a43856230", + "contentType": "audio/x-wav", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/runtime-inputs/assets/38a6f334f89048effe579fc473d6fb38437eb579f324ac399d1ec0f6509f74d9.webp", + "size": 303584, + "sha256": "sha256:bytes:38a6f334f89048effe579fc473d6fb38437eb579f324ac399d1ec0f6509f74d9", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/39428f00f67b49fc6d624617df2964c9f869de21e7e188ef5b231ae04c4aeacc.webp", + "size": 193748, + "sha256": "sha256:bytes:39428f00f67b49fc6d624617df2964c9f869de21e7e188ef5b231ae04c4aeacc", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/3c4d3a7a58a7be7f8d8920106dcfea30e28b4af115ce406bcf5b16cec4b4297a.mp4", + "size": 60165, + "sha256": "sha256:bytes:3c4d3a7a58a7be7f8d8920106dcfea30e28b4af115ce406bcf5b16cec4b4297a", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/runtime-inputs/assets/3c77210d30a5954105564bbf3025322eb5b3cfb839717185eed8f4f3bac12c3c.webp", + "size": 228950, + "sha256": "sha256:bytes:3c77210d30a5954105564bbf3025322eb5b3cfb839717185eed8f4f3bac12c3c", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 576 + }, + { + "path": "template-gallery/runtime-inputs/assets/3d03ee22a3d29068f30f18afcb31e86ea455fbfbe1ca5aa172cf633a26f21339.png", + "size": 22013, + "sha256": "sha256:bytes:3d03ee22a3d29068f30f18afcb31e86ea455fbfbe1ca5aa172cf633a26f21339", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1344, + "height": 768 + }, + { + "path": "template-gallery/runtime-inputs/assets/424477289e9872767f3d880913cbe89a55fd765a4c7a78cc05e16543d57f5da9.webp", + "size": 154336, + "sha256": "sha256:bytes:424477289e9872767f3d880913cbe89a55fd765a4c7a78cc05e16543d57f5da9", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 576 }, { - "path": "template-gallery/reviews/qwen_packaging_dieline.quality-review.json", - "size": 1477, - "sha256": "sha256:bytes:ede440811cbc3e403a5f4603d2f5bc16fc56b541ba6d29a7425c84f96647d4b5", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/47e56fd165fd2610f34e952191d74e061269b9703ae9fd7f571491f38ce4992c.webp", + "size": 145418, + "sha256": "sha256:bytes:47e56fd165fd2610f34e952191d74e061269b9703ae9fd7f571491f38ce4992c", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_poster_logo_text.quality-review.json", - "size": 3661, - "sha256": "sha256:bytes:3a06af0cf6c43da9b6974f1049304b765b4d08fb207fcd98f27b5748aed46b0a", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/4b1b8d9e351abd437f2ffff90cc6a958160a87863ba4d8e85a0aa80a37e7a10e.webp", + "size": 388454, + "sha256": "sha256:bytes:4b1b8d9e351abd437f2ffff90cc6a958160a87863ba4d8e85a0aa80a37e7a10e", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_poster_logo_text.reviewed-provenance.json", - "size": 37731, - "sha256": "sha256:bytes:faa7eb4618f418ac601ff1ec3a43ec287881c30495c531d2563a53159f72952c", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/4b800b6a362c9ad7755858a3ec2affbda8706c5a71578ced35b80432fd234741.webp", + "size": 452222, + "sha256": "sha256:bytes:4b800b6a362c9ad7755858a3ec2affbda8706c5a71578ced35b80432fd234741", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_product_ad_composite.quality-review.json", - "size": 4979, - "sha256": "sha256:bytes:49eab3a43671aa04a445c7cb38aab25a3c3628a1aaf378dc3a23a5ff9b834234", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/4fcc47b98431770a667597cca11ca0d7de82dd340ab999e4c5057a07fc46c6e6.webp", + "size": 163442, + "sha256": "sha256:bytes:4fcc47b98431770a667597cca11ca0d7de82dd340ab999e4c5057a07fc46c6e6", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 576 }, { - "path": "template-gallery/reviews/qwen_product_ad_composite.reviewed-provenance.json", - "size": 48107, - "sha256": "sha256:bytes:39b1f417ec7f7fe2672404d6ba52c9c8ac2707d52e41c911ca7ba8e4ac014430", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/52ea89c0cdec3142162156be07af12a06a14ad623b68c9700ccbc82bf889100d.webp", + "size": 62370, + "sha256": "sha256:bytes:52ea89c0cdec3142162156be07af12a06a14ad623b68c9700ccbc82bf889100d", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_product_mockup.duplicate-provenance.json", - "size": 71946, - "sha256": "sha256:bytes:362dfe44ab510d78a7e6ec1ae96514eb43923680866177ee3989b71487c5687a", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/6224e9ee47765858f2ec0c33679140d020cf3ad6e4fa2fa4557ef50f811aef0e.webp", + "size": 223184, + "sha256": "sha256:bytes:6224e9ee47765858f2ec0c33679140d020cf3ad6e4fa2fa4557ef50f811aef0e", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1344, + "height": 768 }, { - "path": "template-gallery/reviews/qwen_product_mockup.quality-review.json", - "size": 1764, - "sha256": "sha256:bytes:fbffcc634fb20aefe8a1f36398a5bd8e5ead26dacde2bc37ccaeb28d33fb2302", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/70c74691e2bcd7cdb352b7e64e5af5a1a7f01d77112d32a8edadc0060a95ef34.png", + "size": 3714, + "sha256": "sha256:bytes:70c74691e2bcd7cdb352b7e64e5af5a1a7f01d77112d32a8edadc0060a95ef34", + "contentType": "image/png", + "purposes": [ + "runtime", + "tooling" + ], + "width": 32, + "height": 96 + }, + { + "path": "template-gallery/runtime-inputs/assets/73123a5bb6e8c1367eced6a7fbee6b0e5500ecbabf769ba9d9c18fd10623e36e.webp", + "size": 440656, + "sha256": "sha256:bytes:73123a5bb6e8c1367eced6a7fbee6b0e5500ecbabf769ba9d9c18fd10623e36e", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_product_relight.quality-review.json", - "size": 4413, - "sha256": "sha256:bytes:753786d3770b00a95f1dad1e2296c37421e794565e0941384582ad9e06f4c542", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/799d82b016a108d4b6902500b4226afd5d2391f4a7b0693af75255425c943a5e.png", + "size": 6258, + "sha256": "sha256:bytes:799d82b016a108d4b6902500b4226afd5d2391f4a7b0693af75255425c943a5e", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1536, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_product_relight.reviewed-provenance.json", - "size": 48693, - "sha256": "sha256:bytes:43b244fc27e57b7b8a2e1723628ea9aeb0bf364b76bfa7c81ec9408d7c88bfba", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/7f1ea58485fa7802765b9fbbf0e6957e8607261c91669fdcc44cbed80c6fb309.webp", + "size": 477366, + "sha256": "sha256:bytes:7f1ea58485fa7802765b9fbbf0e6957e8607261c91669fdcc44cbed80c6fb309", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/862e292caa1759156fffde5cfccda8b97ec622514258f81986188cf63a836ea9.webp", + "size": 296084, + "sha256": "sha256:bytes:862e292caa1759156fffde5cfccda8b97ec622514258f81986188cf63a836ea9", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/88a7ada5cb91a6ef86de0ff7c26c6b4683df25cc0baa18382371ce0748cd0bd6.webp", + "size": 369210, + "sha256": "sha256:bytes:88a7ada5cb91a6ef86de0ff7c26c6b4683df25cc0baa18382371ce0748cd0bd6", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/923228d65b793a2c9b4007d067309ba38aa1384a5692f5e89ceadb20e53655e7.png", + "size": 723414, + "sha256": "sha256:bytes:923228d65b793a2c9b4007d067309ba38aa1384a5692f5e89ceadb20e53655e7", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 576 + }, + { + "path": "template-gallery/runtime-inputs/assets/930364ab2667e492e51b8a60664751d66f5ed3f2d580664832977e89bcfbbf26.webp", + "size": 301384, + "sha256": "sha256:bytes:930364ab2667e492e51b8a60664751d66f5ed3f2d580664832977e89bcfbbf26", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/9328061557396ef591a9f4a6242abf1cdd61082846518726c3114f746ccedd63.webp", + "size": 325508, + "sha256": "sha256:bytes:9328061557396ef591a9f4a6242abf1cdd61082846518726c3114f746ccedd63", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/965240cf250a9074a7adab394c76070674cf517bed42b6c4647112d17dec84de.webp", + "size": 298906, + "sha256": "sha256:bytes:965240cf250a9074a7adab394c76070674cf517bed42b6c4647112d17dec84de", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/9f9f9685db5e9f8e1c162a0515151b03912c84777727b38682b65839db501ae6.webp", + "size": 154818, + "sha256": "sha256:bytes:9f9f9685db5e9f8e1c162a0515151b03912c84777727b38682b65839db501ae6", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/a2f8ac6f5937d6e618b48ce9947153b8233ff7a82dcf67f28766d20b9917d730.webp", + "size": 331300, + "sha256": "sha256:bytes:a2f8ac6f5937d6e618b48ce9947153b8233ff7a82dcf67f28766d20b9917d730", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/a6d165bd87e2c57ab8cf71fa15de9d8724fccf5782c16c34c25dc77934751676.webp", + "size": 262892, + "sha256": "sha256:bytes:a6d165bd87e2c57ab8cf71fa15de9d8724fccf5782c16c34c25dc77934751676", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b.webp", + "size": 196402, + "sha256": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", + "contentType": "image/webp", + "purposes": [ + "runtime", + "tooling" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67.png", + "size": 11137, + "sha256": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/b7c221b367738177e32fece56067d743df96282a6ccb2afd040ee89ea0a8f678.webp", + "size": 142192, + "sha256": "sha256:bytes:b7c221b367738177e32fece56067d743df96282a6ccb2afd040ee89ea0a8f678", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/b9909f4cbff8af6e97be6d1e4923c67687eee41dbd64b051a018866781da12ab.webp", + "size": 329508, + "sha256": "sha256:bytes:b9909f4cbff8af6e97be6d1e4923c67687eee41dbd64b051a018866781da12ab", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/bf4dbaa55b83b19ca56c691e9d1a10d3b838ff2fec926aaea6b526561c68f8e6.png", + "size": 1032894, + "sha256": "sha256:bytes:bf4dbaa55b83b19ca56c691e9d1a10d3b838ff2fec926aaea6b526561c68f8e6", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1536, + "height": 1024 + }, + { + "path": "template-gallery/runtime-inputs/assets/c810699838c636767d2a5b25fb457df94a4b76a70da9a77e77009681779acbf2.webp", + "size": 319584, + "sha256": "sha256:bytes:c810699838c636767d2a5b25fb457df94a4b76a70da9a77e77009681779acbf2", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_text_rendering.duplicate-provenance.json", - "size": 69145, - "sha256": "sha256:bytes:ccdbb1a61c3b83eae8fbf2d3a23869c774b55c7b31929d18f8311541952c9f6d", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/d49908e24c58d144f4264f4028cb0f7f2e72fb02b315443fd021715ebed1e737.webp", + "size": 265914, + "sha256": "sha256:bytes:d49908e24c58d144f4264f4028cb0f7f2e72fb02b315443fd021715ebed1e737", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_text_rendering.quality-review.json", - "size": 1768, - "sha256": "sha256:bytes:6ef4157557d2a161d4746a011b5367b63e94f984bd175f58b94416b3bf7f165e", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24.png", + "size": 266188, + "sha256": "sha256:bytes:d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 512, + "height": 512 }, { - "path": "template-gallery/reviews/qwen_tile_extract.quality-review.json", - "size": 4031, - "sha256": "sha256:bytes:34c6b47a541749a745738ce15452fd85b2f2bb4883d325f43f70854750b662a1", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/d86b921f1be36360b5b660b8a5b9d0e9165e888be8a06fe2d8f362e87de40429.mp4", + "size": 444129, + "sha256": "sha256:bytes:d86b921f1be36360b5b660b8a5b9d0e9165e888be8a06fe2d8f362e87de40429", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/qwen_tile_extract.reviewed-provenance.json", - "size": 40954, - "sha256": "sha256:bytes:4eb7ec4d1ce6925dac29fba4d929cae2a2815f5c39c81d92c17f07ad0d81f3fc", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/d898e00f3be4b28e237f71acf8024ad3715a657e1fcf3aeaf57279468dff7a76.webp", + "size": 433928, + "sha256": "sha256:bytes:d898e00f3be4b28e237f71acf8024ad3715a657e1fcf3aeaf57279468dff7a76", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_upscale_finish.quality-review.json", - "size": 4584, - "sha256": "sha256:bytes:bf07ca5560e2f6a1489a4c5f0b48a49d8d4c7c73b22dee78e364c6f563878345", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/ddaccd06100d51494e5aaaecedab7b27eaeeda5290d453498d3e1cb9460ad474.webp", + "size": 170884, + "sha256": "sha256:bytes:ddaccd06100d51494e5aaaecedab7b27eaeeda5290d453498d3e1cb9460ad474", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1536, + "height": 1024 }, { - "path": "template-gallery/reviews/qwen_upscale_finish.reviewed-provenance.json", - "size": 44413, - "sha256": "sha256:bytes:b6f91a9080fbbb535879b11f4e19dad257df897740f04c271e0f355d1f988987", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/e07d05a658d361b6d28af62bcccfaeba9254507467dae1c5839efd546fed96a7.wav", + "size": 5760044, + "sha256": "sha256:bytes:e07d05a658d361b6d28af62bcccfaeba9254507467dae1c5839efd546fed96a7", + "contentType": "audio/x-wav", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/reference_fusion.quality-review.json", - "size": 4266, - "sha256": "sha256:bytes:dc9e6e9fac8d2e1fb11786e7b3027ffac58e4436e10a5f6658958ea20437b94a", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/e0ab22f77f5d966d7868f8950f79702dc6d156d0eaef3e06205097558d5c5bb2.webp", + "size": 261816, + "sha256": "sha256:bytes:e0ab22f77f5d966d7868f8950f79702dc6d156d0eaef3e06205097558d5c5bb2", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 768, + "height": 1344 }, { - "path": "template-gallery/reviews/reference_fusion.reviewed-provenance.json", - "size": 47402, - "sha256": "sha256:bytes:bc56957f55d2b4200c31df83ee548a8b50ebf1cf3b6493bc881b25032d12355f", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/e0f19676addbba6fe954711c235878ef43495e8066b84ed70b5c240a8512b026.mp4", + "size": 479597, + "sha256": "sha256:bytes:e0f19676addbba6fe954711c235878ef43495e8066b84ed70b5c240a8512b026", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/wan_22_ti2v_5b_seed_vault.quality-review.json", - "size": 8097, - "sha256": "sha256:bytes:119627f8cbd5751af0bf7cbf7dc7f5fa6a22ce28000438e0e49fc7569a493596", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/e14e0fb4bccace254e3430bbddd49728980e5445b988eff1ae8164f135d1cc8d.png", + "size": 3340, + "sha256": "sha256:bytes:e14e0fb4bccace254e3430bbddd49728980e5445b988eff1ae8164f135d1cc8d", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/wan_22_ti2v_5b_seed_vault.reviewed-provenance.json", - "size": 79278, - "sha256": "sha256:bytes:260b3901159d64efad800ec39e72a1ac893e0b1f717551b572288f2a10efe1e8", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/e7445aefeb2c248ff76caa56c1da1a29129ac57994b4d62fcb8cb0bcfe6a0734.png", + "size": 681985, + "sha256": "sha256:bytes:e7445aefeb2c248ff76caa56c1da1a29129ac57994b4d62fcb8cb0bcfe6a0734", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 576 }, { - "path": "template-gallery/reviews/wan_vace_cinematic_text_to_video.quality-review.json", - "size": 6217, - "sha256": "sha256:bytes:e7c7f1a212e20d0aba6dd29b4d4f799f4b32f07fd0ef91a45073a30874c59830", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/e90e99e27cdd9b6ab7478a05199df2fdf7dce650d700ef2ceb55da7fb206b715.webp", + "size": 32852, + "sha256": "sha256:bytes:e90e99e27cdd9b6ab7478a05199df2fdf7dce650d700ef2ceb55da7fb206b715", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/wan_vace_cinematic_text_to_video.reviewed-provenance.json", - "size": 58734, - "sha256": "sha256:bytes:0c12b78137241cbce6851ae3221254f9e751964c96d4a1dff0792a99f1cf06e8", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/f791a809c0df307cd7dafa8c54ae86bbe4c53d73afdacb2183ff8cdbeac994c2.webp", + "size": 215222, + "sha256": "sha256:bytes:f791a809c0df307cd7dafa8c54ae86bbe4c53d73afdacb2183ff8cdbeac994c2", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/wan_vace_grayscale_control.quality-review.json", - "size": 6963, - "sha256": "sha256:bytes:d135d69159418aecc6d0956b1ec64f2c7fc76137445679a4d4b11a54629c0932", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/f92394469d782bfcc9e00fdda22a9aff3ce0f0cfd9c3258ef9ff0a7ed2b2b89b.png", + "size": 472482, + "sha256": "sha256:bytes:f92394469d782bfcc9e00fdda22a9aff3ce0f0cfd9c3258ef9ff0a7ed2b2b89b", + "contentType": "image/png", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 576 }, { - "path": "template-gallery/reviews/wan_vace_grayscale_control.reviewed-provenance.json", - "size": 64317, - "sha256": "sha256:bytes:0366fae2e916bf0c67a90b8e898b9b0f1a2ff66680bcd789b160566e5a462070", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/fc326ed56f9e5de83262a0a1bc4ce85f4b4b291d654a05efa4a32fc133f97a3f.webp", + "size": 535240, + "sha256": "sha256:bytes:fc326ed56f9e5de83262a0a1bc4ce85f4b4b291d654a05efa4a32fc133f97a3f", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/wan_vace_outpaint_reframe.quality-review.json", - "size": 6916, - "sha256": "sha256:bytes:d6a2b3843f4581565adc30b9d16ee4a17f84751f0ef11d8b0b9b505ff5d57f66", - "contentType": "application/json", + "path": "template-gallery/runtime-inputs/assets/fcca725348f3a6ffbb0f4db657c52e16216dbe6735305fbcc5e164f1fee49ab4.webp", + "size": 259764, + "sha256": "sha256:bytes:fcca725348f3a6ffbb0f4db657c52e16216dbe6735305fbcc5e164f1fee49ab4", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 576 }, { - "path": "template-gallery/reviews/wan_vace_outpaint_reframe.reviewed-provenance.json", - "size": 67904, - "sha256": "sha256:bytes:c4cb91db649df41db5276bb58ea85257d77de542f6349942d07f7f5675788dec", + "path": "template-gallery/runtime-inputs/default-input-bindings.json", + "size": 48499, + "sha256": "sha256:bytes:a09ede412c08ff3ff701506e3d3de52a7fbff3dfbec105de73dbb30a69849966", "contentType": "application/json", "purposes": [ - "runtime" + "tooling" ] }, { - "path": "template-gallery/reviews/wan_vace_video_color_grade.quality-review.json", - "size": 7054, - "sha256": "sha256:bytes:8aa386e846e98c6da6ed93369ff02ac9044df43af03a9e5fc109f0ae3e50c629", - "contentType": "application/json", + "path": "template-gallery/salt_marsh_from_above.webp", + "size": 542348, + "sha256": "sha256:bytes:6447268a9bef5f8a4503d73760f91e8d930e9ce620880e958f461d7d6539f27c", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1536, + "height": 768 }, { - "path": "template-gallery/reviews/wan_vace_video_color_grade.reviewed-provenance.json", - "size": 64258, - "sha256": "sha256:bytes:96b36b2d5b4a9212016d943b486240e0454ce2d30131a4bd39c83d932f865c88", - "contentType": "application/json", + "path": "template-gallery/sana_i2v_blue_hour_above_rice_terraces.mp4", + "size": 528391, + "sha256": "sha256:bytes:3b948924eeb984126741dc465d78482ae9a01704010ae59e9ffec3ed9973351a", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/wan_vace_video_to_video.quality-review.json", - "size": 6952, - "sha256": "sha256:bytes:88168ad146f317c2fd68f5a0db8f369dd398cbbf87073af8fdc6c680e7384a90", - "contentType": "application/json", + "path": "template-gallery/sana_sprint_monochrome_tiger.webp", + "size": 365662, + "sha256": "sha256:bytes:f22b1d5a1d2944949698b47eec10e7f8d04b23bc0746f4e089b41d78e9d94ff7", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/wan_vace_video_to_video.reviewed-provenance.json", - "size": 63294, - "sha256": "sha256:bytes:ee0ba628fb26f4789bfd9729bb534c11479aa170e489fbc3a7174c9c460d3cc2", - "contentType": "application/json", + "path": "template-gallery/sana_tidal_pool_on_black_basalt.webp", + "size": 668670, + "sha256": "sha256:bytes:4d7f257b35ebd4a7c0e087257a6320c9c427b5ea174ade60f044f0c4b631ce17", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/z_image_cinematic_contact_sheet.duplicate-provenance.json", - "size": 72723, - "sha256": "sha256:bytes:1771c206a72c99013f8926742ddf0d95510aa416522d30381d286e4399bee7b4", - "contentType": "application/json", + "path": "template-gallery/sana_video_water_terraces_before_sunrise.mp4", + "size": 716974, + "sha256": "sha256:bytes:532ab779797e91108d78d646478cf5e997b35b74acab8f2011d79bd421846301", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/reviews/z_image_cinematic_contact_sheet.quality-review.json", - "size": 1784, - "sha256": "sha256:bytes:371847c70bebac46cd8012df74ba670cd4a6a2f6d833928ae801db932e3dc69b", - "contentType": "application/json", + "path": "template-gallery/sd15_canny_guided_green_glass.webp", + "size": 53292, + "sha256": "sha256:bytes:d564a03d8e7b1a96083bd314b3700e828da2575b2b355cc574ebbcb17dd7a2d5", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 512, + "height": 512 }, { - "path": "template-gallery/reviews/z_image_lora_style.quality-review.json", - "size": 3873, - "sha256": "sha256:bytes:f8060ea3170c43a2c1d791dc523ef952bfb7370621e186dd7ed07302bb71f6d1", - "contentType": "application/json", + "path": "template-gallery/sd15_control_cobalt_handmade_paper.webp", + "size": 78398, + "sha256": "sha256:bytes:bb215a263ec6f735c37ee9a4c1692c77681492dca527b149d3aa98aff5c3a2ed", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 512, + "height": 512 }, { - "path": "template-gallery/reviews/z_image_lora_style.reviewed-provenance.json", - "size": 52848, - "sha256": "sha256:bytes:eb43b7402fd7d59116557f04030467f34c4e819792a9587053de3791739b6bfd", - "contentType": "application/json", + "path": "template-gallery/sd15_control_cobalt_studio_wall_repair.webp", + "size": 45192, + "sha256": "sha256:bytes:249492d460424c36cd16c3785213eb22da9d18b355075e423a11fe5e0d79e16f", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 512, + "height": 512 }, { - "path": "template-gallery/reviews/z_image_poster.duplicate-provenance.json", - "size": 78654, - "sha256": "sha256:bytes:13f18ac3e02e6189ec541a2f9bedc405d56b24030a612811daad1742e8f2d923", - "contentType": "application/json", + "path": "template-gallery/sd15_pag_canny_guided_glass.webp", + "size": 80516, + "sha256": "sha256:bytes:3458a6d0acea5261f8f829121eabb8d1dc77a2f057e62d18485e34f097f1da6b", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 512, + "height": 512 }, { - "path": "template-gallery/reviews/z_image_poster.quality-review.json", - "size": 1540, - "sha256": "sha256:bytes:f8415337bd646aa621e669290e8d2d393b2247062d7b71c30ed278d6066bf2ce", - "contentType": "application/json", + "path": "template-gallery/sd15_pag_cobalt_studio_repair.webp", + "size": 45174, + "sha256": "sha256:bytes:eb511fda2b5d227685893fac25fd214c4b4a25ac7c1f61e0205983ac657f82de", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 512, + "height": 512 }, { - "path": "template-gallery/reviews/z_image_product_mockup.duplicate-provenance.json", - "size": 77638, - "sha256": "sha256:bytes:ef1a624bf0e8839b550fa17e907906903d39b4fe7d9f5cc8e3c262d3b5f77441", - "contentType": "application/json", + "path": "template-gallery/sd15_pag_control_wall_repair.webp", + "size": 45136, + "sha256": "sha256:bytes:3e1ed497d90cdb3a9aac8adf5828edb265706430b9482426b5a5cd1531e2594e", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 512, + "height": 512 }, { - "path": "template-gallery/reviews/z_image_product_mockup.quality-review.json", - "size": 1847, - "sha256": "sha256:bytes:e8559afb5ba539822a0d65dfc9445b8e3e9b37f78edfaece154e1056e2ab7601", - "contentType": "application/json", + "path": "template-gallery/sd15_pag_mountain_lake_watercolor.webp", + "size": 449078, + "sha256": "sha256:bytes:d3956b48ecf149f19ce45b003a6216ab7e0ca1771ba0aaec1fa420cac710158f", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/z_image_quick_concept.duplicate-provenance.json", - "size": 78504, - "sha256": "sha256:bytes:7be6361c9817b09d656f9ee4fffbc36030e3055e8fe6de4ddd9e57cbf0046102", - "contentType": "application/json", + "path": "template-gallery/sdxl_blue_glass_on_linen.webp", + "size": 154298, + "sha256": "sha256:bytes:a6a5af6e608dfc8de66c3ad394aaf39c0b82692cf89619979f6a3997a7fbec62", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/reviews/z_image_quick_concept.quality-review.json", - "size": 1586, - "sha256": "sha256:bytes:1de8e435dbae4e7d7ef50f8a2cb8b33007e620d5a03a94e76be75e01e06518c7", - "contentType": "application/json", + "path": "template-gallery/sdxl_canny_adapter_glass_study.webp", + "size": 140860, + "sha256": "sha256:bytes:a3cc3458190184277baebd012898e3eef8504570f6ce52a64228a78f68400eef", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/runtime-inputs/assets/101d50449cc4d74257e88e87fb750363bfe538c58b601b340fb3ce9031c2ed03.mp4", - "size": 684528, - "sha256": "sha256:bytes:101d50449cc4d74257e88e87fb750363bfe538c58b601b340fb3ce9031c2ed03", - "contentType": "video/mp4", + "path": "template-gallery/sdxl_clear_cobalt_backdrop.webp", + "size": 119828, + "sha256": "sha256:bytes:98b57164602d8cfd6b61c689fa26770421f9dce8a7b9c23bc879a49d4def1004", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, - { - "path": "template-gallery/runtime-inputs/assets/124415536a8071baccf8821232ad79a0a8ceec30ae62617c91a8d7a0b59d0a8c.webp", - "size": 57604, - "sha256": "sha256:bytes:124415536a8071baccf8821232ad79a0a8ceec30ae62617c91a8d7a0b59d0a8c", + { + "path": "template-gallery/sdxl_control_golden_boathouse.webp", + "size": 433038, + "sha256": "sha256:bytes:73d25ad408e3db3308743a876e4b6e8b272496ba44ab4f51b7e1a89dba723f8f", "contentType": "image/webp", "purposes": [ "runtime" @@ -2716,10 +11499,10 @@ "height": 1024 }, { - "path": "template-gallery/runtime-inputs/assets/16f6ea27b5d7cfaed106e2e694572bbe92b7c7e2a43835b3f4313a748f510f74.png", - "size": 3890, - "sha256": "sha256:bytes:16f6ea27b5d7cfaed106e2e694572bbe92b7c7e2a43835b3f4313a748f510f74", - "contentType": "image/png", + "path": "template-gallery/sdxl_control_inpaint_warm_plaster.webp", + "size": 119380, + "sha256": "sha256:bytes:843d44d49afe20f03301931466a5578f2924c089bf33a8e6121f4346c33780f4", + "contentType": "image/webp", "purposes": [ "runtime" ], @@ -2727,9 +11510,9 @@ "height": 1024 }, { - "path": "template-gallery/runtime-inputs/assets/1d993540e914f0e2d230f1133b57ae14bb837829237a53c89613fcdef6699995.webp", - "size": 281216, - "sha256": "sha256:bytes:1d993540e914f0e2d230f1133b57ae14bb837829237a53c89613fcdef6699995", + "path": "template-gallery/sdxl_controlnet_glass_study_on_slate.webp", + "size": 171678, + "sha256": "sha256:bytes:a900fb44cec09e91eb4d6237dc5a81aa9dfa0a92deea9ccfa3c5f84b2c7dc4e5", "contentType": "image/webp", "purposes": [ "runtime" @@ -2738,27 +11521,31 @@ "height": 1024 }, { - "path": "template-gallery/runtime-inputs/assets/218d83e0706fec201097582a6e5e00dc79f2d7d1ecb0badba2214c5ecaae1866.mp4", - "size": 1312979, - "sha256": "sha256:bytes:218d83e0706fec201097582a6e5e00dc79f2d7d1ecb0badba2214c5ecaae1866", - "contentType": "video/mp4", + "path": "template-gallery/sdxl_pag_cobalt_wall.webp", + "size": 119358, + "sha256": "sha256:bytes:dc976b97d1919d526a84c397596fbb4b440edf3cf53fad156f07fba46810e8de", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/runtime-inputs/assets/233d1b3a123fceb4f3b68d2d3a9f5b4129627073b8235fe7248ae6ebdeecb554.mp4", - "size": 240426, - "sha256": "sha256:bytes:233d1b3a123fceb4f3b68d2d3a9f5b4129627073b8235fe7248ae6ebdeecb554", - "contentType": "video/mp4", + "path": "template-gallery/sdxl_pag_lighthouse_in_graphite.webp", + "size": 447288, + "sha256": "sha256:bytes:6acd5e4afd90b2da12ba56d2efc594b9a3b0f99450b8aa373d0f6e6ae00abec2", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 1024, + "height": 1024 }, { - "path": "template-gallery/runtime-inputs/assets/283b1cfb32b15fe6b31a29dce1f2b96026c1ad0826bf3f24aebebf4b6f9a4f07.webp", - "size": 102088, - "sha256": "sha256:bytes:283b1cfb32b15fe6b31a29dce1f2b96026c1ad0826bf3f24aebebf4b6f9a4f07", + "path": "template-gallery/sdxl_pag_snow_cabin.webp", + "size": 329912, + "sha256": "sha256:bytes:22b8ba630d466d07025f3d272878330192f5f0fec9bcea03cb13a38ce171d541", "contentType": "image/webp", "purposes": [ "runtime" @@ -2767,10 +11554,10 @@ "height": 1024 }, { - "path": "template-gallery/runtime-inputs/assets/29722ed072feec11cd36adce7b6cb48483bff3f05776048b93f960b5554ab533.png", - "size": 10170, - "sha256": "sha256:bytes:29722ed072feec11cd36adce7b6cb48483bff3f05776048b93f960b5554ab533", - "contentType": "image/png", + "path": "template-gallery/sdxl_pag_two_tier_cobalt_glass.webp", + "size": 116618, + "sha256": "sha256:bytes:2ac737f90e471c9f792b1d2a478645d7cc09c56889f31befc3266a0fef10ac2c", + "contentType": "image/webp", "purposes": [ "runtime" ], @@ -2778,450 +11565,447 @@ "height": 1024 }, { - "path": "template-gallery/runtime-inputs/assets/2e0ec8892660785e322468d0153fd2dadf7a4d920fce2d7d4a0b686a8fe8515d.webp", - "size": 330492, - "sha256": "sha256:bytes:2e0ec8892660785e322468d0153fd2dadf7a4d920fce2d7d4a0b686a8fe8515d", + "path": "template-gallery/sdxl_pix2pix_pale_amber_glass.webp", + "size": 135420, + "sha256": "sha256:bytes:a56a057711364a3b747c202652999f5fcde7ee1b91c0c7a2a92e6ca26c6c3dff", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 768, + "height": 768 }, { - "path": "template-gallery/runtime-inputs/assets/2e202069a584ee5ada91e2deaea6bf7b92a94f4816e669e695d7cb64d5a1cb0e.png", - "size": 157468, - "sha256": "sha256:bytes:2e202069a584ee5ada91e2deaea6bf7b92a94f4816e669e695d7cb64d5a1cb0e", - "contentType": "image/png", + "path": "template-gallery/sdxl_turbo_orange_caps.webp", + "size": 75822, + "sha256": "sha256:bytes:e69bdc004989467e4e0df8d7d5b3d7e19f95158dff49e3ca649bb6da42f2cf59", + "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 512, + "height": 512 }, { - "path": "template-gallery/runtime-inputs/assets/3807d712e24a94c4b445c2fa950a784bba334f5f665e74964fe4d47a43856230.wav", - "size": 14400044, - "sha256": "sha256:bytes:3807d712e24a94c4b445c2fa950a784bba334f5f665e74964fe4d47a43856230", - "contentType": "audio/x-wav", + "path": "template-gallery/shap_e_traffic_cone_turntable.mp4", + "size": 18588, + "sha256": "sha256:bytes:6fd6dacd583bf43561c100a2d8df7773ab4faeb054325cc22ca2d00bb3f45836", + "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/runtime-inputs/assets/38a6f334f89048effe579fc473d6fb38437eb579f324ac399d1ec0f6509f74d9.webp", - "size": 303584, - "sha256": "sha256:bytes:38a6f334f89048effe579fc473d6fb38437eb579f324ac399d1ec0f6509f74d9", + "path": "template-gallery/shap_e_traffic_cone_turntable.poster.webp", + "size": 1390, + "sha256": "sha256:bytes:a61343b31e7b7aa532aa5d501ecf820543595fed119374b42470b08cf44d5c2b", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 256, + "height": 256 }, { - "path": "template-gallery/runtime-inputs/assets/39428f00f67b49fc6d624617df2964c9f869de21e7e188ef5b231ae04c4aeacc.webp", - "size": 193748, - "sha256": "sha256:bytes:39428f00f67b49fc6d624617df2964c9f869de21e7e188ef5b231ae04c4aeacc", + "path": "template-gallery/showcases/flux3-kolkata-bride.v1.json", + "size": 5475, + "sha256": "sha256:bytes:64a51a70baec5b4a99937ac3952e458450c7d699669b6f31241106da33f70b55", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/showcases/flux3-kolkata-bride.v1.webp", + "size": 2565954, + "sha256": "sha256:bytes:1172abd0f44a2031c6d75e7a48459c84c31ec019a082920f180db5417cdd0467", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 1728, + "height": 2592 }, { - "path": "template-gallery/runtime-inputs/assets/3c4d3a7a58a7be7f8d8920106dcfea30e28b4af115ce406bcf5b16cec4b4297a.mp4", - "size": 60165, - "sha256": "sha256:bytes:3c4d3a7a58a7be7f8d8920106dcfea30e28b4af115ce406bcf5b16cec4b4297a", - "contentType": "video/mp4", + "path": "template-gallery/showcases/flux3-material-atlas-liquid.v2.json", + "size": 4912, + "sha256": "sha256:bytes:057f75151945129a737c2574a067255dc3b8d4f5e7bbee296b340a2043d317a0", + "contentType": "application/json", "purposes": [ "runtime" ] }, { - "path": "template-gallery/runtime-inputs/assets/3d03ee22a3d29068f30f18afcb31e86ea455fbfbe1ca5aa172cf633a26f21339.png", - "size": 22013, - "sha256": "sha256:bytes:3d03ee22a3d29068f30f18afcb31e86ea455fbfbe1ca5aa172cf633a26f21339", - "contentType": "image/png", + "path": "template-gallery/showcases/flux3-material-atlas-liquid.v2.webp", + "size": 1063430, + "sha256": "sha256:bytes:d942084632ca80c1ef06fca1cb2d0881100303df863baf7f71b7dde9cd83ea5a", + "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1344, - "height": 768 + "width": 2048, + "height": 2048 }, { - "path": "template-gallery/runtime-inputs/assets/47e56fd165fd2610f34e952191d74e061269b9703ae9fd7f571491f38ce4992c.webp", - "size": 145418, - "sha256": "sha256:bytes:47e56fd165fd2610f34e952191d74e061269b9703ae9fd7f571491f38ce4992c", - "contentType": "image/webp", + "path": "template-gallery/showcases/flux3-material-atlas-pup.v1.json", + "size": 5335, + "sha256": "sha256:bytes:5388ea1fccfe50e1b99707da87087a4bbf03a7e0422a71d4b151c696eef962b5", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/runtime-inputs/assets/4b1b8d9e351abd437f2ffff90cc6a958160a87863ba4d8e85a0aa80a37e7a10e.webp", - "size": 388454, - "sha256": "sha256:bytes:4b1b8d9e351abd437f2ffff90cc6a958160a87863ba4d8e85a0aa80a37e7a10e", + "path": "template-gallery/showcases/flux3-material-atlas-pup.v1.webp", + "size": 1028178, + "sha256": "sha256:bytes:3ae022143d5330dd780dbae7b8aa4b07891983d10b566013ba0ba9376567af71", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 2048, + "height": 2048 }, { - "path": "template-gallery/runtime-inputs/assets/4b800b6a362c9ad7755858a3ec2affbda8706c5a71578ced35b80432fd234741.webp", - "size": 452222, - "sha256": "sha256:bytes:4b800b6a362c9ad7755858a3ec2affbda8706c5a71578ced35b80432fd234741", - "contentType": "image/webp", + "path": "template-gallery/showcases/flux3-material-atlas.v1.json", + "size": 3437, + "sha256": "sha256:bytes:58e8ab0f8794e7ace794a54994cff0025d2d18b356b66ed0e8d6588764135337", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/runtime-inputs/assets/52ea89c0cdec3142162156be07af12a06a14ad623b68c9700ccbc82bf889100d.webp", - "size": 62370, - "sha256": "sha256:bytes:52ea89c0cdec3142162156be07af12a06a14ad623b68c9700ccbc82bf889100d", + "path": "template-gallery/showcases/flux3-material-atlas.v1.webp", + "size": 1028954, + "sha256": "sha256:bytes:0e2fecdb52b719905b2557ce5f55b7d4e05f391d426b69dae48b0de62bed3489", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 2048, + "height": 2048 }, { - "path": "template-gallery/runtime-inputs/assets/6224e9ee47765858f2ec0c33679140d020cf3ad6e4fa2fa4557ef50f811aef0e.webp", - "size": 223184, - "sha256": "sha256:bytes:6224e9ee47765858f2ec0c33679140d020cf3ad6e4fa2fa4557ef50f811aef0e", - "contentType": "image/webp", + "path": "template-gallery/showcases/flux3-old-town-blue-hour.v2.json", + "size": 5008, + "sha256": "sha256:bytes:67f31ba055e1ac3a7d09f039cd0f3048043e9e09e493d4cc75b59e5a71575002", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1344, - "height": 768 + ] }, { - "path": "template-gallery/runtime-inputs/assets/73123a5bb6e8c1367eced6a7fbee6b0e5500ecbabf769ba9d9c18fd10623e36e.webp", - "size": 440656, - "sha256": "sha256:bytes:73123a5bb6e8c1367eced6a7fbee6b0e5500ecbabf769ba9d9c18fd10623e36e", + "path": "template-gallery/showcases/flux3-old-town-blue-hour.v2.webp", + "size": 1735766, + "sha256": "sha256:bytes:11683d423d3bc4d39cbde524c2b2e885f73181e8e48372eea3204d01ba3c5478", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 2048, + "height": 2048 }, { - "path": "template-gallery/runtime-inputs/assets/799d82b016a108d4b6902500b4226afd5d2391f4a7b0693af75255425c943a5e.png", - "size": 6258, - "sha256": "sha256:bytes:799d82b016a108d4b6902500b4226afd5d2391f4a7b0693af75255425c943a5e", - "contentType": "image/png", + "path": "template-gallery/showcases/flux3-old-town-human-cat.json", + "size": 4371, + "sha256": "sha256:bytes:3ce0313e04d9a4f7015a05c86b4111253d397bd229b7c8c2908421d081924eb2", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1536, - "height": 1024 + ] }, { - "path": "template-gallery/runtime-inputs/assets/7f1ea58485fa7802765b9fbbf0e6957e8607261c91669fdcc44cbed80c6fb309.webp", - "size": 477366, - "sha256": "sha256:bytes:7f1ea58485fa7802765b9fbbf0e6957e8607261c91669fdcc44cbed80c6fb309", + "path": "template-gallery/showcases/flux3-old-town-human-cat.webp", + "size": 1894830, + "sha256": "sha256:bytes:a8914e6b18c916445654cd8b1ccd6723d613921af2450042790845b18a80871d", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 2048, + "height": 2048 }, { - "path": "template-gallery/runtime-inputs/assets/862e292caa1759156fffde5cfccda8b97ec622514258f81986188cf63a836ea9.webp", - "size": 296084, - "sha256": "sha256:bytes:862e292caa1759156fffde5cfccda8b97ec622514258f81986188cf63a836ea9", - "contentType": "image/webp", + "path": "template-gallery/showcases/flux3-pine-lake-mountains-pup.v1.json", + "size": 6713, + "sha256": "sha256:bytes:00ad230f799c0d99130adf498b8a0afa0e8f64708bb40c5522fe9a47cee226ca", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/runtime-inputs/assets/88a7ada5cb91a6ef86de0ff7c26c6b4683df25cc0baa18382371ce0748cd0bd6.webp", - "size": 369210, - "sha256": "sha256:bytes:88a7ada5cb91a6ef86de0ff7c26c6b4683df25cc0baa18382371ce0748cd0bd6", + "path": "template-gallery/showcases/flux3-pine-lake-mountains-pup.v1.webp", + "size": 3179406, + "sha256": "sha256:bytes:5557814b5aec0f1a0992a78471e4b36ed3a99ec65832916c54a246983e03d73b", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 2592, + "height": 1728 }, { - "path": "template-gallery/runtime-inputs/assets/930364ab2667e492e51b8a60664751d66f5ed3f2d580664832977e89bcfbbf26.webp", - "size": 301384, - "sha256": "sha256:bytes:930364ab2667e492e51b8a60664751d66f5ed3f2d580664832977e89bcfbbf26", - "contentType": "image/webp", + "path": "template-gallery/showcases/h3-copper-cap-edit.json", + "size": 3183, + "sha256": "sha256:bytes:0ae33ebe907fe47012ffe83615607a91df6d0427ac13f6e0aaf6e45392224d14", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/runtime-inputs/assets/9328061557396ef591a9f4a6242abf1cdd61082846518726c3114f746ccedd63.webp", - "size": 325508, - "sha256": "sha256:bytes:9328061557396ef591a9f4a6242abf1cdd61082846518726c3114f746ccedd63", + "path": "template-gallery/showcases/h3-copper-cap-edit.webp", + "size": 995074, + "sha256": "sha256:bytes:8a750edf55445e82da15c3161216ba5e74236fde0990af49b3e1f69fafb07f77", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 2048, + "height": 2048 }, { - "path": "template-gallery/runtime-inputs/assets/965240cf250a9074a7adab394c76070674cf517bed42b6c4647112d17dec84de.webp", - "size": 298906, - "sha256": "sha256:bytes:965240cf250a9074a7adab394c76070674cf517bed42b6c4647112d17dec84de", - "contentType": "image/webp", + "path": "template-gallery/showcases/h3-emerald-material-transfer.json", + "size": 3891, + "sha256": "sha256:bytes:864b0e509c2c60c85ddd833a4e171ba65ebfe14ab2a0c05819396057b447d644", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/runtime-inputs/assets/9f421cdc0fa80b3aae368bd3b20a8f6f05942ec461f88541f01aec5390468897.webp", - "size": 270072, - "sha256": "sha256:bytes:9f421cdc0fa80b3aae368bd3b20a8f6f05942ec461f88541f01aec5390468897", + "path": "template-gallery/showcases/h3-emerald-material-transfer.webp", + "size": 862560, + "sha256": "sha256:bytes:b35fa527960c392c3f4c268a488b608824544dbfc4898831edf094a619ec6eec", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 2048, + "height": 2048 }, { - "path": "template-gallery/runtime-inputs/assets/9f9f9685db5e9f8e1c162a0515151b03912c84777727b38682b65839db501ae6.webp", - "size": 154818, - "sha256": "sha256:bytes:9f9f9685db5e9f8e1c162a0515151b03912c84777727b38682b65839db501ae6", - "contentType": "image/webp", + "path": "template-gallery/showcases/h3-kolkata-bride.v1.json", + "size": 5492, + "sha256": "sha256:bytes:0bd8b06ae0a27eacb48e5748f5abbd5dcfc4e071f9fed65fa119d2af07bdc753", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/runtime-inputs/assets/a2f8ac6f5937d6e618b48ce9947153b8233ff7a82dcf67f28766d20b9917d730.webp", - "size": 331300, - "sha256": "sha256:bytes:a2f8ac6f5937d6e618b48ce9947153b8233ff7a82dcf67f28766d20b9917d730", + "path": "template-gallery/showcases/h3-kolkata-bride.v1.webp", + "size": 1869470, + "sha256": "sha256:bytes:800b8835bf2372833e0629c3dae7a4f09f892974d7de59226be91fa9ab98ce00", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 1728, + "height": 2592 }, { - "path": "template-gallery/runtime-inputs/assets/a6d165bd87e2c57ab8cf71fa15de9d8724fccf5782c16c34c25dc77934751676.webp", - "size": 262892, - "sha256": "sha256:bytes:a6d165bd87e2c57ab8cf71fa15de9d8724fccf5782c16c34c25dc77934751676", - "contentType": "image/webp", + "path": "template-gallery/showcases/h3-kolkata-explicit-dusk.v2.json", + "size": 6227, + "sha256": "sha256:bytes:04a373fa9debe30185a09cf7e99285ecb127cb0be897a4ffbf1a9a94959fbb0b", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/runtime-inputs/assets/a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b.webp", - "size": 196402, - "sha256": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", + "path": "template-gallery/showcases/h3-kolkata-explicit-dusk.v2.webp", + "size": 1458562, + "sha256": "sha256:bytes:3cbb6639f68bd721af9ae138cdc0a293b57754e2f61448104385b873dd77138d", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 1728, + "height": 2592 }, { - "path": "template-gallery/runtime-inputs/assets/b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67.png", - "size": 11137, - "sha256": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", - "contentType": "image/png", + "path": "template-gallery/showcases/h3-material-atlas-text.json", + "size": 3341, + "sha256": "sha256:bytes:1313a5b4e8a7fe0da9f822366c21f87e80e413bd6f543394c6c3ab0b5b4012ec", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/runtime-inputs/assets/b7c221b367738177e32fece56067d743df96282a6ccb2afd040ee89ea0a8f678.webp", - "size": 142192, - "sha256": "sha256:bytes:b7c221b367738177e32fece56067d743df96282a6ccb2afd040ee89ea0a8f678", + "path": "template-gallery/showcases/h3-material-atlas-text.webp", + "size": 911408, + "sha256": "sha256:bytes:684cd3b52382df72df0ca93577e07f2e1dd7bc502ab3a32428a11369347e0de3", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 2048, + "height": 2048 }, { - "path": "template-gallery/runtime-inputs/assets/b9909f4cbff8af6e97be6d1e4923c67687eee41dbd64b051a018866781da12ab.webp", - "size": 329508, - "sha256": "sha256:bytes:b9909f4cbff8af6e97be6d1e4923c67687eee41dbd64b051a018866781da12ab", + "path": "template-gallery/showcases/h3-old-town-blue-hour.v2.json", + "size": 5043, + "sha256": "sha256:bytes:b07b899ec46ad069cd0ac73a8ffc9093f4e49862b0451c06354f3ff2650b0968", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/showcases/h3-old-town-blue-hour.v2.webp", + "size": 1361990, + "sha256": "sha256:bytes:e4df5af0479d4367236d6d8328a1d30dfda691fcf6f0f642af88aa8d0095c8d6", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 2048, + "height": 2048 + }, + { + "path": "template-gallery/showcases/h3-old-town-human-cat.json", + "size": 4192, + "sha256": "sha256:bytes:2c88791f543facbabf6fdb4d66e7d53498e8a57e3446e87d46e289901c32186d", + "contentType": "application/json", + "purposes": [ + "runtime" + ] }, { - "path": "template-gallery/runtime-inputs/assets/bf4dbaa55b83b19ca56c691e9d1a10d3b838ff2fec926aaea6b526561c68f8e6.png", - "size": 1032894, - "sha256": "sha256:bytes:bf4dbaa55b83b19ca56c691e9d1a10d3b838ff2fec926aaea6b526561c68f8e6", - "contentType": "image/png", + "path": "template-gallery/showcases/h3-old-town-human-cat.webp", + "size": 1738058, + "sha256": "sha256:bytes:f75387bfe53e060e42281861559927d67ad8a3ac790e653692d2c8bc515e80d3", + "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1536, - "height": 1024 + "width": 2048, + "height": 2048 }, { - "path": "template-gallery/runtime-inputs/assets/c810699838c636767d2a5b25fb457df94a4b76a70da9a77e77009681779acbf2.webp", - "size": 319584, - "sha256": "sha256:bytes:c810699838c636767d2a5b25fb457df94a4b76a70da9a77e77009681779acbf2", - "contentType": "image/webp", + "path": "template-gallery/showcases/h3-pine-lake-mountains.v1.json", + "size": 4369, + "sha256": "sha256:bytes:fd33ad9cc41a5cae87171df101e0ae180472717e7550c5f1cca1296c9d02313f", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/runtime-inputs/assets/d49908e24c58d144f4264f4028cb0f7f2e72fb02b315443fd021715ebed1e737.webp", - "size": 265914, - "sha256": "sha256:bytes:d49908e24c58d144f4264f4028cb0f7f2e72fb02b315443fd021715ebed1e737", + "path": "template-gallery/showcases/h3-pine-lake-mountains.v1.webp", + "size": 2482660, + "sha256": "sha256:bytes:4327354bbfefe07ef2cf43f93ef6387802903d79610fe3deca6dc3ae1ab6babb", "contentType": "image/webp", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 2592, + "height": 1728 }, { - "path": "template-gallery/runtime-inputs/assets/d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24.png", - "size": 266188, - "sha256": "sha256:bytes:d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24", - "contentType": "image/png", + "path": "template-gallery/showcases/ltx25-monday-morning-brisk-crossing.v1.json", + "size": 7845, + "sha256": "sha256:bytes:2f0dacddc7d5260b2e0ac8c607d9b9aecf737b74582f36690d2c536eb0c1d7f6", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 512, - "height": 512 + ] }, { - "path": "template-gallery/runtime-inputs/assets/d86b921f1be36360b5b660b8a5b9d0e9165e888be8a06fe2d8f362e87de40429.mp4", - "size": 444129, - "sha256": "sha256:bytes:d86b921f1be36360b5b660b8a5b9d0e9165e888be8a06fe2d8f362e87de40429", + "path": "template-gallery/showcases/ltx25-monday-morning-brisk-crossing.v1.mp4", + "size": 25428412, + "sha256": "sha256:bytes:31112653ca805e2c11a4fdb9f651f9ca1315876bec0a728b833fa60d85cd618f", "contentType": "video/mp4", "purposes": [ "runtime" ] }, { - "path": "template-gallery/runtime-inputs/assets/d898e00f3be4b28e237f71acf8024ad3715a657e1fcf3aeaf57279468dff7a76.webp", - "size": 433928, - "sha256": "sha256:bytes:d898e00f3be4b28e237f71acf8024ad3715a657e1fcf3aeaf57279468dff7a76", - "contentType": "image/webp", + "path": "template-gallery/showcases/ltx25-monday-morning-brisk-crossing.v1.poster.png", + "size": 972698, + "sha256": "sha256:bytes:2032e9a113e8cf08d0bd4286f01c4a4f3ff722bb4b2d4125b0110d35075a9711", + "contentType": "image/png", "purposes": [ "runtime" ], "width": 1024, - "height": 1024 + "height": 576 }, { - "path": "template-gallery/runtime-inputs/assets/ddaccd06100d51494e5aaaecedab7b27eaeeda5290d453498d3e1cb9460ad474.webp", - "size": 170884, - "sha256": "sha256:bytes:ddaccd06100d51494e5aaaecedab7b27eaeeda5290d453498d3e1cb9460ad474", - "contentType": "image/webp", + "path": "template-gallery/smollm2_rain_gauge.json", + "size": 1190, + "sha256": "sha256:bytes:c92d19b1c39c5157b09f19d654c871f7453a9c794c733265fd89b7cc9521ea43", + "contentType": "application/json", "purposes": [ "runtime" - ], - "width": 1536, - "height": 1024 + ] }, { - "path": "template-gallery/runtime-inputs/assets/e07d05a658d361b6d28af62bcccfaeba9254507467dae1c5839efd546fed96a7.wav", - "size": 5760044, - "sha256": "sha256:bytes:e07d05a658d361b6d28af62bcccfaeba9254507467dae1c5839efd546fed96a7", - "contentType": "audio/x-wav", + "path": "template-gallery/smolvlm_red_triangle.json", + "size": 1291, + "sha256": "sha256:bytes:ec3bb29dcf29943847d3c22f36369927a30eac1834541e25d8ae4ac7f7fd2fb3", + "contentType": "application/json", "purposes": [ "runtime" ] }, { - "path": "template-gallery/runtime-inputs/assets/e0ab22f77f5d966d7868f8950f79702dc6d156d0eaef3e06205097558d5c5bb2.webp", - "size": 261816, - "sha256": "sha256:bytes:e0ab22f77f5d966d7868f8950f79702dc6d156d0eaef3e06205097558d5c5bb2", - "contentType": "image/webp", + "path": "template-gallery/spandrel_tram_shelter_video_2x.mp4", + "size": 574204, + "sha256": "sha256:bytes:60fae4330a462a468fe68e62c692f22f713a9f908cf286942206260e8aa42fc0", + "contentType": "video/mp4", "purposes": [ "runtime" - ], - "width": 768, - "height": 1344 + ] }, { - "path": "template-gallery/runtime-inputs/assets/e0f19676addbba6fe954711c235878ef43495e8066b84ed70b5c240a8512b026.mp4", - "size": 479597, - "sha256": "sha256:bytes:e0f19676addbba6fe954711c235878ef43495e8066b84ed70b5c240a8512b026", - "contentType": "video/mp4", + "path": "template-gallery/spandrel_x2_synthetic_gradient.webp", + "size": 3094, + "sha256": "sha256:bytes:5b1ea25aacbedb50055ac010b38da45dbb3dab5477be1b2b1d99781a299e8729", + "contentType": "image/webp", "purposes": [ "runtime" - ] + ], + "width": 128, + "height": 96 }, { - "path": "template-gallery/runtime-inputs/assets/e14e0fb4bccace254e3430bbddd49728980e5445b988eff1ae8164f135d1cc8d.png", - "size": 3340, - "sha256": "sha256:bytes:e14e0fb4bccace254e3430bbddd49728980e5445b988eff1ae8164f135d1cc8d", - "contentType": "image/png", + "path": "template-gallery/stable_audio_glass_roof_rain.wav", + "size": 5760044, + "sha256": "sha256:bytes:9fe09d48f7f229f04d2b34c2e193cf7346c68115bb618b84959478a3599a1e05", + "contentType": "audio/x-wav", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/runtime-inputs/assets/e90e99e27cdd9b6ab7478a05199df2fdf7dce650d700ef2ceb55da7fb206b715.webp", - "size": 32852, - "sha256": "sha256:bytes:e90e99e27cdd9b6ab7478a05199df2fdf7dce650d700ef2ceb55da7fb206b715", - "contentType": "image/webp", + "path": "template-gallery/stable_video_lighthouse_headland.mp4", + "size": 229224, + "sha256": "sha256:bytes:e08e06f8a9f0a1d88e5d34c224636586cce7b91bb79c25e89d197484c740a88c", + "contentType": "video/mp4", "purposes": [ "runtime" - ], - "width": 1024, - "height": 1024 + ] }, { - "path": "template-gallery/runtime-inputs/assets/f791a809c0df307cd7dafa8c54ae86bbe4c53d73afdacb2183ff8cdbeac994c2.webp", - "size": 215222, - "sha256": "sha256:bytes:f791a809c0df307cd7dafa8c54ae86bbe4c53d73afdacb2183ff8cdbeac994c2", - "contentType": "image/webp", + "path": "template-gallery/stable_video_lighthouse_headland.poster.png", + "size": 437122, + "sha256": "sha256:bytes:67955f6727290e49f37945a2a27eeaf25032d7cd5595112523f1e9289d462292", + "contentType": "image/png", "purposes": [ "runtime" ], - "width": 1024, - "height": 1024 + "width": 960, + "height": 360 }, { - "path": "template-gallery/runtime-inputs/assets/fc326ed56f9e5de83262a0a1bc4ce85f4b4b291d654a05efa4a32fc133f97a3f.webp", - "size": 535240, - "sha256": "sha256:bytes:fc326ed56f9e5de83262a0a1bc4ce85f4b4b291d654a05efa4a32fc133f97a3f", + "path": "template-gallery/the_glasshouse_seed_tray.webp", + "size": 406498, + "sha256": "sha256:bytes:21fc2abc9656ec805dfa5836064beb5c53e920fd8d75a658b7cfefdcff83a35f", "contentType": "image/webp", "purposes": [ "runtime" @@ -3229,15 +12013,6 @@ "width": 1024, "height": 1024 }, - { - "path": "template-gallery/runtime-inputs/default-input-bindings.json", - "size": 43140, - "sha256": "sha256:bytes:84f8c3bd524f5a1b72d4c2fc166d670f1435c506a845356a9a83b2916eb1359c", - "contentType": "application/json", - "purposes": [ - "tooling" - ] - }, { "path": "template-gallery/wan_21_t2v_13b_seed_vault.card-poster.png", "size": 2904091, @@ -3277,7 +12052,8 @@ "sha256": "sha256:bytes:f610ee34c08aa97e5b2a42e029c7e4acfe2e22f5a73431dcd9ce875ec4dd1145", "contentType": "video/mp4", "purposes": [ - "runtime" + "runtime", + "tooling" ] }, { @@ -3286,7 +12062,8 @@ "sha256": "sha256:bytes:2056b7fb1da71b48ebad25a95d8ea7fb124ba7eb884df940520224f8f488da7b", "contentType": "video/mp4", "purposes": [ - "runtime" + "runtime", + "tooling" ] }, { @@ -3295,11 +12072,84 @@ "sha256": "sha256:bytes:5c9d7a7553921204ceca0ac74d5405d6ce81909e230e81e9edffaf0f2ffc50c6", "contentType": "image/png", "purposes": [ - "runtime" + "runtime", + "tooling" ], "width": 1280, "height": 704 }, + { + "path": "template-gallery/wan_a14b_cloudbreak_over_the_ridges.mp4", + "size": 126623, + "sha256": "sha256:bytes:fb2da087759066d72082f0b3e9894204f9e8cc448153b43730c06522483c254f", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/wan_a14b_wind_across_pond.mp4", + "size": 1155250, + "sha256": "sha256:bytes:5d6b75cd3c7925c53f4f4fb12adc62170594bb4c56275d38fb0278d2f803bb69", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/wan_animate_glasshouse_keeper.mp4", + "size": 256854, + "sha256": "sha256:bytes:4d936509b7aa591221f0a7de3e15bc815b4d322d1bb9e78d894d767a48c55a19", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/wan_animate_signal_through_the_rain.mp4", + "size": 287523, + "sha256": "sha256:bytes:a9e2a96cfba367aea3a8d5cdc9cc1cfbc60a288d50e056b82977d696a37b805b", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/wan_flf_blue_hour_at_the_tram_shelter.mp4", + "size": 398821, + "sha256": "sha256:bytes:a356ce3baa0be0556829715ccc72f1a9ccbe99625315cca04e3ee33a4e83f550", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/wan_ti2v_subway_musician.mp4", + "size": 34981157, + "sha256": "sha256:bytes:287344e1179d07788f3e9714324d15fe98a025855dbbe8d1f5b600288952ce68", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/wan_vace_amber_glass_stabilized.mp4", + "size": 24359650, + "sha256": "sha256:bytes:a90aff3b61c664b51073574cc6c12efa894f45b88226637b254c9d81a53aad87", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/wan_vace_amber_rings_after_rain.mp4", + "size": 706351, + "sha256": "sha256:bytes:e89cb86ed3bd34040b7fc6c699f99e21c4dc827ac943258c7d9daad9d58b752c", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, { "path": "template-gallery/wan_vace_cinematic_text_to_video.card-poster.png", "size": 2220363, @@ -3313,8 +12163,8 @@ }, { "path": "template-gallery/wan_vace_cinematic_text_to_video.card-preview.mp4", - "size": 935858, - "sha256": "sha256:bytes:58c230e968510c26bc2ea6131e64791a057d31ee3e3bd0fe6d7a062b0545b356", + "size": 993020, + "sha256": "sha256:bytes:2293ea940f855c1defa2616d27da0aeb1362c429b1c0de1fc5a97d035c367620", "contentType": "video/mp4", "purposes": [ "runtime" @@ -3322,8 +12172,8 @@ }, { "path": "template-gallery/wan_vace_cinematic_text_to_video.mp4", - "size": 3509355, - "sha256": "sha256:bytes:47a2f29152a5239d52d8625c8abe3b431d7ae6d834c0d6cd0c0b852071eec171", + "size": 21231435, + "sha256": "sha256:bytes:5db74e68b3321474b5abdf145bdda486ac3fe7d18735e6ef3a5bce318e89ed49", "contentType": "video/mp4", "purposes": [ "runtime", @@ -3332,8 +12182,8 @@ }, { "path": "template-gallery/wan_vace_cinematic_text_to_video.poster.png", - "size": 1742463, - "sha256": "sha256:bytes:427b6012590b1f010c3b77ee72bd350e84a4fccc84c65a8b0c5607d115adac55", + "size": 1484044, + "sha256": "sha256:bytes:34d6179828466121c5352e1b72e4e73d1b723be48f2d3e4a85c8acd0dd950cf5", "contentType": "image/png", "purposes": [ "runtime" @@ -3365,8 +12215,8 @@ }, { "path": "template-gallery/wan_vace_grayscale_control.card-preview.mp4", - "size": 201263, - "sha256": "sha256:bytes:1ca73ab55f51fbe4eb08d4de5a2fa0c1c9654cf77909f2626aab0414a35f5985", + "size": 195025, + "sha256": "sha256:bytes:9304d9a3047069720679a6035132b364bca408a6328b373a7386afa86bd9bf12", "contentType": "video/mp4", "purposes": [ "runtime" @@ -3374,8 +12224,8 @@ }, { "path": "template-gallery/wan_vace_grayscale_control.mp4", - "size": 957106, - "sha256": "sha256:bytes:4a011e34131e9c3bc9b05621184a520f6fb85c282031acd35e2988dda105ff62", + "size": 16554516, + "sha256": "sha256:bytes:de6511454dd028b570c4b4d11f99b55c6c2f037f3b0befa5867fb37f513183ad", "contentType": "video/mp4", "purposes": [ "runtime", @@ -3384,8 +12234,8 @@ }, { "path": "template-gallery/wan_vace_grayscale_control.poster.png", - "size": 1080262, - "sha256": "sha256:bytes:81a77bbc5882c22ab8e76fce76d7a2084e57b938fff42e842e5e9894dbc3010d", + "size": 1228710, + "sha256": "sha256:bytes:c4c0b351c43fd53d3656294a9fc15689394a06e2b70b81248da2254386fa1f04", "contentType": "image/png", "purposes": [ "runtime" @@ -3417,8 +12267,8 @@ }, { "path": "template-gallery/wan_vace_outpaint_reframe.card-preview.mp4", - "size": 324218, - "sha256": "sha256:bytes:37c1f4b3a9787c6c6dac081ed3cabd2a42d2d0a9c2db10f1ac33a7a98e1ecea2", + "size": 334202, + "sha256": "sha256:bytes:d66c6566b92c98fd7dba24d9fbe34ada9dfd3e49ffc153d290b9b447b9e21232", "contentType": "video/mp4", "purposes": [ "runtime" @@ -3426,8 +12276,8 @@ }, { "path": "template-gallery/wan_vace_outpaint_reframe.mp4", - "size": 1352471, - "sha256": "sha256:bytes:f899d1af73bd95da7f3babe30c03d834b93c68c3f939eac0b8fb98df094c4d98", + "size": 20176692, + "sha256": "sha256:bytes:d2d642aecce780056363e8cef15fa9129e458689b89f82c2024d01180c32feea", "contentType": "video/mp4", "purposes": [ "runtime" @@ -3435,8 +12285,8 @@ }, { "path": "template-gallery/wan_vace_outpaint_reframe.poster.png", - "size": 763693, - "sha256": "sha256:bytes:df7f715aaadf49fa3df62ef0eb4238e19befadfee6910970ba8eab9e80128f01", + "size": 1183345, + "sha256": "sha256:bytes:3c6d7b078c9f7b90d10e5af4b935a92b520e3256df2f5d938e3c94a2f1d62789", "contentType": "image/png", "purposes": [ "runtime" @@ -3457,8 +12307,8 @@ }, { "path": "template-gallery/wan_vace_video_color_grade.card-preview.mp4", - "size": 127148, - "sha256": "sha256:bytes:aaa8905d5b7e2b1c0cd8b7d7bf62d334db0ec6a8d2a943f73bc82f17026fa9bd", + "size": 131520, + "sha256": "sha256:bytes:9d86c293d91ea1f693901bffbafb1bc60899b577a01431a59fa9c0633b64f07a", "contentType": "video/mp4", "purposes": [ "runtime" @@ -3466,8 +12316,8 @@ }, { "path": "template-gallery/wan_vace_video_color_grade.mp4", - "size": 569543, - "sha256": "sha256:bytes:72a7538470942630455723c7ccd1725d29ed662276e05ef647f4304e16e44d63", + "size": 19216367, + "sha256": "sha256:bytes:720aa30d4537298bc9ca454a146dc8ca44288c4e2f2233c34ce5756a03fd2656", "contentType": "video/mp4", "purposes": [ "runtime" @@ -3475,8 +12325,8 @@ }, { "path": "template-gallery/wan_vace_video_color_grade.poster.png", - "size": 572909, - "sha256": "sha256:bytes:5cb855c7951e6aa0e42b04e5583165f02e9fcc978cbcfe5c23b041d92f94f554", + "size": 1145745, + "sha256": "sha256:bytes:4d459d51e3e60aeeace7688ccb7fad10f2cc9f3a9afb61ff59d3b505bf2c3cc5", "contentType": "image/png", "purposes": [ "runtime" @@ -3497,8 +12347,8 @@ }, { "path": "template-gallery/wan_vace_video_to_video.card-preview.mp4", - "size": 355050, - "sha256": "sha256:bytes:7c0738aa477caae0852e7f4fad7fcfb36e9281dd1dbdc0ca091477876d38a074", + "size": 383310, + "sha256": "sha256:bytes:1770ee434817acf2ebb504499b2201622b8d5a7597d0104b21f53f34e7151cb9", "contentType": "video/mp4", "purposes": [ "runtime" @@ -3506,8 +12356,8 @@ }, { "path": "template-gallery/wan_vace_video_to_video.mp4", - "size": 1542178, - "sha256": "sha256:bytes:99ccd9e6863e53c76f0a959b6b8953db3001cf3bf90b728d840b3d3a3e48e541", + "size": 19212627, + "sha256": "sha256:bytes:ccbbf1496a3bd3e73bdbd81f4ebe376829cf6ed2c5a89c748a8e07e4fe091cb1", "contentType": "video/mp4", "purposes": [ "runtime" @@ -3515,8 +12365,8 @@ }, { "path": "template-gallery/wan_vace_video_to_video.poster.png", - "size": 1768482, - "sha256": "sha256:bytes:a893c3eab103355212373709510267ecfa831a2d0b46dfd9e8ca795e06503782", + "size": 1508753, + "sha256": "sha256:bytes:074df4975b809405acd262052f7481aad8d71adb3b1e670b68a337fea0d861a5", "contentType": "image/png", "purposes": [ "runtime" @@ -3535,10 +12385,66 @@ "width": 1672, "height": 941 }, + { + "path": "template-gallery/wan_video_long_showcase.card-preview.mp4", + "size": 451699, + "sha256": "sha256:bytes:b22af0bdf2f24727378d08ce00bd3700091c3595d99c5a9774d3ea4a01d790ce", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/wan_video_long_showcase.mp4", + "size": 84872855, + "sha256": "sha256:bytes:8c11448cdae831396c0ba01e3d180afa6b92c2abb0f386e3bcedc046029e2d1b", + "contentType": "video/mp4", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/wan_video_long_showcase.poster.png", + "size": 1400753, + "sha256": "sha256:bytes:4e2e0c44ddca2e4669ac3ee3c67edea7e50d4f49c799ca2e99d35fa06a95c67d", + "contentType": "image/png", + "purposes": [ + "runtime" + ], + "width": 1664, + "height": 960 + }, + { + "path": "template-gallery/wav2vec2_station_announcement.json", + "size": 1574, + "sha256": "sha256:bytes:619cc94b2dda660e87ae3c2a684aa2c7e7cc56c6d9b6df86f488ab4eea690751", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/whisper_small_an_open_door.json", + "size": 352, + "sha256": "sha256:bytes:6f8a84cafae41e8903b7b60d97701dbf24b8f41fab860913b419deea1a84e263", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, + { + "path": "template-gallery/whisper_tiny_blue_cup_transcription.json", + "size": 305, + "sha256": "sha256:bytes:19ad6ca1cda03c92aa6f86f590a69c052e8bded5c8340189a56c68193c2ed9ec", + "contentType": "application/json", + "purposes": [ + "runtime" + ] + }, { "path": "template-gallery/z_image_cinematic_contact_sheet.webp", - "size": 223184, - "sha256": "sha256:bytes:6224e9ee47765858f2ec0c33679140d020cf3ad6e4fa2fa4557ef50f811aef0e", + "size": 182632, + "sha256": "sha256:bytes:4c2bbf8e5c5fc23984d3cbb7cf716220d6a5a3a628510b0de9bae418b3447723", "contentType": "image/webp", "purposes": [ "runtime", @@ -3560,8 +12466,8 @@ }, { "path": "template-gallery/z_image_lora_style.webp", - "size": 350962, - "sha256": "sha256:bytes:027a7fb3657066a6ccca2f0e56d1e74c6771f89e5396e2c7e38f6bbb683242c7", + "size": 350808, + "sha256": "sha256:bytes:238b923245e35c674111d5e67e789971a2108323322375796c64bbde16082f2d", "contentType": "image/webp", "purposes": [ "runtime" @@ -3571,8 +12477,8 @@ }, { "path": "template-gallery/z_image_poster.webp", - "size": 243272, - "sha256": "sha256:bytes:4ada0a09ff88ca792ee007269811f94fa09232ceb54fcfad82be0b86522f9aa4", + "size": 204634, + "sha256": "sha256:bytes:ec5e413831a8bca837f98159ca663e02bbc73276b50814d53066530f734e1ad4", "contentType": "image/webp", "purposes": [ "runtime" @@ -3582,8 +12488,8 @@ }, { "path": "template-gallery/z_image_product_mockup.webp", - "size": 160078, - "sha256": "sha256:bytes:951142f49008e9a26d799065766c1627f63b9f108d3fe7d284f56d1618f2ebb5", + "size": 133358, + "sha256": "sha256:bytes:0d9c80e29c95d62835f56c95d666ed6d8b47e6792005ab59aef1d1c9b6de84df", "contentType": "image/webp", "purposes": [ "runtime" @@ -3593,8 +12499,41 @@ }, { "path": "template-gallery/z_image_quick_concept.webp", - "size": 277588, - "sha256": "sha256:bytes:800de87d2bb49e3fc068ebac0c81a21a5722541900aba83992ed51a6f6865b7f", + "size": 210002, + "sha256": "sha256:bytes:781fa343e70418155f5097a48c4a0a99293f84157a1dc951c3cad8aec120043c", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1024, + "height": 1024 + }, + { + "path": "template-gallery/zimage_golden_amber_glass.webp", + "size": 84094, + "sha256": "sha256:bytes:b4894bf9bead0f509fa4e7ef27eccd341b3d855dfe74fe70be3117d184eef990", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 640, + "height": 640 + }, + { + "path": "template-gallery/zimage_rocky_glacial_shores.webp", + "size": 532258, + "sha256": "sha256:bytes:7a94fbad28ad8901a49b53de126a2bd9e34077ad7402efa15caeaa7b970a0cae", + "contentType": "image/webp", + "purposes": [ + "runtime" + ], + "width": 1344, + "height": 768 + }, + { + "path": "template-gallery/zimage_seamless_cobalt_backdrop.webp", + "size": 119866, + "sha256": "sha256:bytes:8149300a89e8cc784540a3fa663e83ca708d68d250a57710266f8a1e126fd4b5", "contentType": "image/webp", "purposes": [ "runtime" @@ -3603,9 +12542,9 @@ "height": 1024 } ], - "assetSetId": "sha256:canonical-json:ec61fbc1b76da02110e4a0cddc4e222026e911a6e00451f85678f66d2b32ec85", + "assetSetId": "sha256:canonical-json:2fc79cbb1c9f5a520d57def2623affaeedd307f12f2e34065ec482e485bed13d", "status": "ready", - "assetCount": 360, - "totalBytes": 488731153, + "assetCount": 1296, + "totalBytes": 1295252364, "missingAssets": [] } diff --git a/config/template-recipe-history.v1.json b/config/template-recipe-history.v1.json new file mode 100644 index 00000000..551e4158 --- /dev/null +++ b/config/template-recipe-history.v1.json @@ -0,0 +1,128 @@ +{ + "schemaVersion": 1, + "format": "modiff.gallery.recipe-history.v1", + "source": { + "repository": "sourav-das/modiff-template-gallery", + "revision": "b3fefedf324c08cb50eaf4654ce68fefc041d0ef" + }, + "records": [ + { + "templateId": "flux_lora_ghibli_story", + "currentTemplateLockHash": "tpl_2365c66a", + "bindings": { + "templateLockHash": "tpl_c3ae3e8e", + "promptSettingsHash": "ps_df2d27f3", + "modelRevision": "alvarobartt/ghibli-characters-flux-lora@ed846114c71efc525e7f5a51e274dc976bb970a8 | black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "modelCommit": "alvarobartt/ghibli-characters-flux-lora@ed846114c71efc525e7f5a51e274dc976bb970a8 | black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "modelSetHash": "sha256:model-set-v1:5fa8d82d74196e11dc0c520be9d31596292a1f268a01c393d049b0dbd1c42341", + "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "templateRevisionHash": "sha256:template-revision-v1:5699062506dfb9ea15f344016f6ac66a00b2dcecead1d6f6b3813315fa248444", + "graphHash": "sha256:canonical-graph-v1:b563b60f373571d19da7d0e99c2ef5c5a620e944e71f63d706c6e1fe99698da1", + "proofLockHash": "sha256:live-proof-lock-v1:4a1c9bc6fd1a8cb83e4354d88e53e4d9c9ba912dc9a5b8684621f4dbe7096ddd", + "provenanceHash": "sha256:canonical-json:22c15d4f1d99bf087a3d04c6d337bad19ee7b0240b416d9bec55f36d3344d288", + "qualityReviewHash": "sha256:canonical-json:55b5a31babbb0eafbf0457d8b0b8263f8d3da35bf53e1be4e8e277d1bba5f18b", + "mediaHash": "sha256:decoded-rgba:9a9d7ec768c9e3baa85918763f0e61c73a08eae3eec6a060a98334436977e236", + "outputPath": "/template-gallery/flux_lora_ghibli_story.webp", + "provenancePath": "/template-gallery/reviews/flux_lora_ghibli_story.reviewed-provenance.json", + "qualityReviewPath": "/template-gallery/reviews/flux_lora_ghibli_story.quality-review.json" + }, + "creator": { + "executionSelection": null, + "workflowBlocks": ["lora"], + "workflowBlockSettings": { + "lora": { + "model": { + "source": "hub", + "value": "alvarobartt/ghibli-characters-flux-lora", + "revision": "ed846114c71efc525e7f5a51e274dc976bb970a8", + "sha256": "5216bd7eeb12bf6f18cd5d40cb090831796b28aca7446577d08c5a7e4a09dc63", + "byteSize": 171969336, + "license": "flux-1-dev-non-commercial; personal-use-only" + }, + "weightName": "ghibli-characters-flux-lora.safetensors", + "adapterName": "ghibli_style", + "scale": 0.8 + } + } + }, + "declarationSource": { + "source": "Original immutable Gallery creator lock and retained proof. The later native-stage execution selection is absent in this saved recipe." + }, + "evidenceScope": "approved_historical_recipe", + "currentGraphExecutionProved": false + }, + { + "templateId": "wan_22_ti2v_5b_seed_vault", + "currentTemplateLockHash": "tpl_8552a85a", + "evidenceScope": "approved_historical_recipe", + "currentGraphExecutionProved": false, + "creator": { + "executionSelection": null, + "workflowBlockSettings": { + "soundtrack": { + "model": { + "source": "hub", + "value": "ACE-Step/acestep-v15-xl-turbo-diffusers", + "revision": "200ba991ae448051e14b0183157e35c2d27c9fb0" + }, + "pipelineClass": "AceStepPipeline", + "prompt": "Instrumental diegetic solo acoustic-guitar soundtrack matching existing subway footage. For the entire twelve seconds, perform forceful uninterrupted 84 BPM eighth-note down-up chord strumming on one warm steel-string acoustic guitar. Start the established strumming pattern immediately and keep its energy, tempo, and full-chord attack constant past ten seconds. Use a clear alternating downstroke-upstroke pick pattern, realistic pick attack, and natural fret noise, with no pauses or melodic detours. Do not cadence, resolve, decay, slow down, thin out, or stop early; the usable soundtrack will be cut from the middle of this continuous performance. Keep subtle station room ambience far beneath the guitar. No fingerpicking, arpeggio, lead melody, vocals, spoken words, drums, percussion, bass, band, synthesizer, applause, crowd cheering, fade-in, fade-out, or early ending.", + "negativePrompt": "fingerpicking, fingerpicked riff, arpeggio, arpeggiated guitar, lead guitar, lead melody, guitar solo, single-note melody, sparse picking, gentle picking, vocals, singing, speech, drums, percussion, bass guitar, full band, synthesizer, electronic beat, applause, crowd cheering, silence, pause, breakdown, cadence, final chord, early resolution, early decay, early ending, long intro, fade-in, fade-out, clipping, abrupt cutoff", + "durationSeconds": 12, + "steps": 8, + "guidanceScale": 1, + "seed": 1684710282, + "bpm": 84, + "keyscale": "E minor", + "timesignature": "4/4", + "audioFit": { + "sourceStartSeconds": 1, + "sourceDurationSeconds": 5.041666666666667, + "targetDurationSeconds": 5.041666666666667, + "delaySeconds": 0.16666666666666666, + "targetSampleRate": 48000, + "fadeInSeconds": 0.008, + "fadeOutSeconds": 0.12 + } + } + } + }, + "bindings": { + "verificationStatus": "reviewed", + "promptSettingsHash": "ps_7a8322d1", + "templateLockHash": "tpl_28550081", + "modelRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0 | Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635", + "runtimeFingerprint": "sha256:stable-runtime-v1:82d4fd031dfb97607d1a1919c782d4ee3fa2fec4c95a46e3778bf01625334ba3", + "graphHash": "sha256:canonical-graph-v1:1e80e3dfd8b6ccd39ab616a34727853a3816a9d7d1c0e5645722f5b5c9df6436", + "proofLockHash": "sha256:live-proof-lock-v1:1f07f9a222ff0509490fa7f971714ceb54fffcd5d57b2627e7562f9047c927f3", + "backendSourceFingerprint": "sha256:backend-source-v1:d87e3a14c747fafb3350a4678a7f24569a36482551153716cd8e3937618d1b73", + "backendContractFingerprint": "sha256:backend-contract-v1:b45747235e613231f4d66b46f8dae48cf642ee4a7b036b2c06cf6b1096156ad6", + "modelCommit": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0 | Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635", + "modelSetHash": "sha256:model-set-v1:1e8868fb125d028ff0d54ccb1bc67be6d4a8dc0e623d14bc89e0ce2b8dd67f17", + "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "templateRevisionHash": "sha256:template-revision-v1:caa6c16a2bac675ca369f7c3155b0f8a3f112e1ba7bb5615b3960183d5b6052e", + "provenancePath": "/template-gallery/reviews/wan_22_ti2v_5b_seed_vault.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:c33a05cce51bae8c8d8133333bb0b5697545dac15d594921db1214f109961dc1", + "outputPath": "/template-gallery/wan_22_ti2v_5b_seed_vault.mp4", + "thumbnailPath": "/template-gallery/wan_22_ti2v_5b_seed_vault.poster.png", + "mediaHash": "sha256:decoded-video-framemd5:f46d1387bd5848c62fe9343a800d813a906ea33e0139f43f50926cc822bb1de7", + "decodedAudioHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:7971158f3e9988632c8c2100cd1f485c3477dbdb1006e9814d52fcbb1c84db3d", + "audiovisualMediaHash": "sha256:decoded-av-v1:abb6bde8c9ac4d302e1741e51eb38bc139d873ae6914b5de548058a00c4bb476", + "mediaType": "video", + "verificationTimestamp": "2026-07-24T16:33:53.785Z", + "qualityReviewPath": "/template-gallery/reviews/wan_22_ti2v_5b_seed_vault.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:7d1a9b1e47da3c779078312ac1d0ee42c339554f78154f29564d54f865c30ab8", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "Maintainer synchronized-playback approval with Codex technical verification", + "reviewedAt": "2026-07-24T16:29:22.000Z", + "width": 1280, + "height": 704, + "frames": 121, + "durationSeconds": 5.04, + "cardPreviewPath": "/template-gallery/wan_22_ti2v_5b_seed_vault.card-preview.mp4", + "cardPreviewSha256": "sha256:bytes:f610ee34c08aa97e5b2a42e029c7e4acfe2e22f5a73431dcd9ce875ec4dd1145" + } + } + ], + "recordsHash": "sha256:canonical-json:e302107a88e92f2591a8315ba263d097d861c6eafc65e86cc22d01d0a27b744e" +} diff --git a/docs/README.md b/docs/README.md index 8596e766..adfdb6e1 100644 --- a/docs/README.md +++ b/docs/README.md @@ -6,6 +6,12 @@ This directory contains durable user, operator, and contributor documentation fo [Developer-first node authoring](developer-first-node-ux.md) covers the unified editor, custom imports, matching sockets and supported image/audio attachments. +The [image template workflow guide](image-template-workflows.md) covers fresh +template graphs, preserved settings and the distinction from historical examples. +The [audio workflow guide](audio-workflows.md) explains real generation stages, +source audio, selected adapter ownership, playback and validation boundaries. +The [video workflow guide](video-workflows.md) covers shared stages, source media, +retained upscaling and soundtrack branches, and validation boundaries. | Guide | Audience | What it covers | | ----------------------------------------------- | ------------------- | --------------------------------------------------------------------------------------------- | diff --git a/docs/audio-workflows.md b/docs/audio-workflows.md new file mode 100644 index 00000000..bd5974ef --- /dev/null +++ b/docs/audio-workflows.md @@ -0,0 +1,120 @@ +# Audio workflow stages + +Audio workflows use the same graph, ordinary nodes, Block interfaces, execution +and resource management as image workflows. Choose a task, select its exact model +and edit the controls declared by the backend. A model change must refresh the +task contract as well as the repository and revision. + +## Keep the stages meaningful + +| Route | Real computation | Presentation | +| ----------------------------------------- | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ACE-Step | Load pipeline -> Generate -> Export | Model Setup can combine the loader, its exclusive recipe/configuration and an authorized adapter. Generate retains prompt, lyrics and task controls. Export retains the existing audio player. | +| Stable Audio, LongCat AudioDiT, AudioLDM2 | Load pipeline -> Generate -> Export | The same ordinary operations, with controls and output formats supplied by the selected backend adapter. | +| MiniMax Music3 | Load models -> Semantic Generation -> Denoise -> Decode Audio -> Export | Decode Audio and its connected exporter can form Audio Output, keeping four visible stages and all five executable leaves. | +| Speech recognition | Load model + Load Audio -> Transcribe -> Transcript | Audio stays a separate previewable input. The output is text/structured transcription, rather than an audio output group. | +| Trim, join, loudness match | Load Audio source(s) -> Process Audio -> Export | Ordinary deterministic operations; no model loader or adapter is required. | + +The direct audio pipelines expose an integrated upstream Generate operation. +Splitting it into decorative Encode, Denoise and Decode nodes would not make its +internal computation editable. MiniMax's semantic generation is an actual stage +and must remain distinct from prompt encoding. + +In Model Setup, **Device and offload** puts the connected execution recipe's +Runtime Offload and Execution Device immediately below the model picker. These +are the same controls used by the loader. Quantization and manual device maps +remain in their own sections. Disconnecting the recipe restores the loader's +saved placement settings. Opening the stage leaves the resource mode and +workflow recipe intact. + +Grouping is an explicit, undoable presentation change using the existing Block +contract. Choose **Inspect implementation** to see which operations a stage contains. +Use **Edit stages** to wire those operations, then **Done editing** to return. +To place the operations directly on the canvas, select **Convert to independent nodes…** +and confirm the list. +Flattened execution, connected values and model ownership stay authoritative. +Existing saved workflows retain their presentation until deliberately changed. +Shared, ambiguous or custom branches require explicit structural editing. + +## Sources and task controls + +ACE variation, continuation and repaint require a connected source audio node. +Keep upload, preview, playback and seek available on that source. Continuation +can retain separate loudness-match and join operations; repaint keeps its bounded +time interval. These operations do not disappear when Model Setup is grouped. + +The source-cover template selects `ACE-Step/acestep-v15-xl-base-diffusers` at +`8f40447d21ee59ad4dcee6c99ce248027410bfec`, including its native audio tokenizer +and detokenizer. Its accepted recipe uses 50 steps, guidance 7 and Expert memory +policy through the same generic stages. The curated Turbo snapshot lacks those +source-cover components. Base compatibility does not extend the separate +Turbo/Runware adapter-authoring grant or establish Auto/hardware qualification. + +Music controls such as lyrics, language, BPM and key appear only where the task +contract supports them. A nominal audio socket alone does not make those controls +valid for a sound-generation or speech model. AudioLDM2's candidate waveforms +remain available through Audio Variations. LongCat duration follows upstream +VAE-frame quantization; output is not padded to manufacture an exact duration. + +The selected audio contract must agree with the owner's literal repository, +immutable revision, pipeline and task. The revision remains on the model owner; +the audio signal itself carries the repository. Selecting an alternate compatible base must not +retain the previous model's hidden contract or source requirements. + +## LoRA ownership + +An adapter authoring declaration is permission to edit a particular model branch. +It is separate from broad model capabilities, installed artifacts, runtime +qualification and Automatic memory eligibility. The backend declares exact +tasks, repository/revision pairs, adapter node and supported row count; the +client validates that declaration against the current graph and node registry. + +The selected ACE authoring route initially supports one owned adapter row. Edit, +replace and remove remain available at that capacity. Loading another adapter +with the ordinary Load Adapter action does not establish a blended chain: that +action activates its selected adapter. Multi-adapter blending needs an explicit +Set Adapters operation and its actual runtime/resource contracts. Other audio +families receive no adapter permission merely because they share a loader shape. + +Legacy manual graphs remain editable through their ordinary nodes. Structural +removal can safely disconnect an owned row even after authoring permission is +withdrawn. Missing, stale, connected or ambiguous model identity must not grant +new automatic adapter edits. Direct audio adapter branches remain ineligible for +Automatic memory planning until their complete ownership and resource accounting +is supported; use the declared Custom/Expert path deliberately. + +## Delivery and validation + +AudioLDM2 needs a small compatibility bridge because the reviewed GPT-2 model +does not inherit the generation helper called by Diffusers. The bridge binds +the official Transformers helper, accepts only the reviewed releases +`5.16.0.dev0` and `5.18.0`, and verifies its source hash before use. It does not +install or activate a runtime. An unknown version or changed helper produces a +compatibility error instead of silently applying an unreviewed patch. + +Audio Output uses the existing audio field/player and original file export. +Verify playback, seek, download and restoration against the same completed task. +Input previews and transcoded playback are not proof of the original output's +identity. Record measured duration, sample rate, channels, finite samples and +nonempty output separately from listening quality, lyrics, timing or edit seams. + +Audio history retains node-local ACE dispatch evidence: the actual task type, +repaint bounds, and consumed source/reference tensor identity after conversion. +The backend hashes at most 32 MiB of plain dense CPU/CUDA conditioning audio and +records the native sample rate, shape, dtype, original device and byte count. +Unsupported or larger inputs retain an explicit capture status without a hash. +The client preserves these fields without adding them to the legacy form summary +or filling gaps in older receipts. A dispatch hash does not establish listening +quality or unchanged audio outside an edit interval. + +Offload can reduce accelerator residency while increasing host-memory demand. +Supported options do not establish that a particular model, duration and recipe +fits a Windows machine. Quantized image support does not automatically authorize +quantized audio. Preserve creator settings and record any explicit test-instance +changes; a short smoke does not qualify the original full-length template. + +Contract tests, browser interaction, real generation, independent repeat +inference, listening, memory qualification and public media approval are separate +proof levels. Follow [workbench acceptance](workbench-acceptance.md) and the +[engineering procedure](cluster-engineering-lessons.md). Video and mixed +audio/video workflows have their own contracts and are outside this audio work. diff --git a/docs/auto-mode-design.md b/docs/auto-mode-design.md index c94aa423..66f0c40a 100644 --- a/docs/auto-mode-design.md +++ b/docs/auto-mode-design.md @@ -177,6 +177,9 @@ If any step is missing, keep the profile visible as Expert-only or blocked with ## Custom and multiple-Block workflow Auto The information button beside Resources opens Workflow resources in the right panel. +Managed Studio workflows expose the same whole-workflow assessment and Auto check, +with their selected-model options shown separately. A selected-model compatibility +estimate does not establish combined workflow eligibility. The existing source-recipe assessment remains read-only. **Check Auto execution plan** also validates the actual executable graph through `POST /auto_resource/workflow` (`schemaVersion: 1`, `graph` containing the existing @@ -227,6 +230,11 @@ current values, external connections and preview references survive; the reusabl library definition is not rewritten. Missing exact source metadata remains an explicit diagnostic. +Every Automatic run, including a managed Studio workflow, obtains this complete +plan before submission. The backend requires its receipt before runtime +preparation; a primary-model candidate alone cannot authorize the complete graph +or overwrite its planned resource fields. + Run checks the graph again after planning and updates only supported visible resource controls. A `workflowAutoPlan` receipt binds the resulting API graph by hash. At dispatch the backend verifies the hash and re-plans against current diff --git a/docs/cluster-engineering-lessons.md b/docs/cluster-engineering-lessons.md index 15153c8d..7f2663e1 100644 --- a/docs/cluster-engineering-lessons.md +++ b/docs/cluster-engineering-lessons.md @@ -30,6 +30,19 @@ unreasonable user expectations. The corrective obligations are: ## Invariants to protect +- One ordinary node is the default for a single executable stage. Reuse + generic stages across compatible models and keep their ports named by role. + Fold internal operations only under the same owner with no independent + consumer of the intermediate result. Reserve new Blocks for a meaningful + typed boundary, such as a complete shot, reusable composition or loop. +- Keep each model stage's task with its own execution owner. When an export + combines video with a separately generated soundtrack, test the published + graph and confirm that the audio loader retains its declared audio mode. +- Present one editor for a connected setting and retain the saved fallback. + When selecting the default for similar stages, verify the fresh Creator + path and the corresponding saved workflow, including the precise ordered + execution export, compatible model switch and reopening. Preserve legacy + Block interfaces and registered definition hashes. - One owning `BlockInstanceV2`, one flat effective execution graph and one existing backend executor. Nested containment is not a second persisted execution system. Ordinary leaves remain ordinary nodes. @@ -96,6 +109,22 @@ unreasonable user expectations. The corrective obligations are: ## Cross-machine preservation and merge +Shared value edits must inspect the complete connected authoring graph when a +nested container consumes a loader owned outside it. Resolve each visible alias +through its declared control binding before finding its scoped peers; a local +container graph cannot prove those external relationships. Apply value changes +atomically through the existing field writers, preserve sealed controls and +unrelated shots, and keep model/task adaptation restrictions separate. Regression +tests must call the real exposed-control setter and cover both directions, +Undo/Redo and save/reopen; mutating an already-flat test graph misses this defect. + +When composing stage Blocks inside another Block, preserve exact child-port +field identities (including colon-qualified keys); sanitize only the new public +port identifier. Remap advisory references across sibling containers together, +not only inside each container. Test repeated real branches sharing one model, +their independent paired controls, common mirrored inputs, save/reopen and scoped +Run. A routing flag or a single-branch test cannot prove a sequence template. + Before retiring a machine, preserve code history, all secondary worktrees, uncommitted changes, generated media, reference inputs, saved workflows/User Nodes, run receipts, exact parameters, test evidence and session handoffs. @@ -124,6 +153,24 @@ not evidence of harmless compilation. Inspect pressure promptly, distinguish a kernel OOM kill from an assumed driver failure, and verify supervisor/UI recovery before retrying a known failed or cancelled task. +On Windows, freed CPU tensors can leave committed pages in Torch's bundled +mimalloc allocator while the process is idle. Empty model registries, a small +GC-visible tensor sample and `torch.cuda.empty_cache()` do not establish that +host memory was returned. Compare a bounded allocate/free reproduction with +process commit and OS availability, then repeat the original model sequence. +The existing pre-import startup policy defaults `MIMALLOC_PURGE_DELAY=0` on +Windows and preserves an explicit operator value. Document its allocation +performance tradeoff; an allocator-only reproduction is not model fit proof. + +Immediate purge does not guarantee reclamation when short-lived loader threads +allocate tensors that another thread later frees. Preserve thread ownership and +pool lifetime in allocator controls. Windows startup defaults official Diffusers +and Transformers loading to serial before imports, preserving each explicit +operator flag; other platforms retain their loading defaults. Document the +load-time tradeoff and require a fresh process when flags change. Repeat the +original model, cache release and next run separately; a CPU control or one +successful image cannot establish broad fit or repeatability. + ## Native edits and dynamic input types A successful run seeded through numeric test data does not prove the same field @@ -274,6 +321,20 @@ the original geometry assertions, then repeat the concurrent generation gesture. - Runtime-only failures need the same visible correction path, restricted to their exact active workflow/run. Keep them advisory after edits until a new execution verifies the correction; never fabricate an initial tensor or model. +- Bind Run-blocked recovery actions to the document and effective inputs that + produced the diagnostic, not only whichever tab is active when clicked. + Preserve exact field and declared runtime targets. Prove ordinary navigation, + delayed metadata, panel departure and stale-action rejection without installing + packages or submitting a graph. Focus requests are volatile; progress and + presentation changes must not impersonate authored input changes. Keep actual + resource rejection and unsupported-platform checks intact. +- Setup must inspect the same lowered and selected Run closure without authoring + a graph, executing suppliers or randomizing seeds. Keep base packages, exact + model artifacts, optional environments and system steps distinct in one + checklist. A staged install is not activation, and each requested profile + needs a verified active identity. Deduplicate exact selections and durable + jobs; a file count cannot prove download-file identity. Lost status reads + must not create duplicate installs or turn last-known progress into readiness. - Diagnose the effective bound iteration input, not only the enclosing loop's original Pipeline State. Report bounded type/shape summaries, never contents, and preserve the resource-error category for memory failures. @@ -600,6 +661,11 @@ runtimes or rewrite graph inputs. - Test legacy NanoID prefixes, public wires, completed previews, mixed selections, missing destinations and Undo/Redo. Native evidence must use actual selection and drag gestures; a reducer test alone does not prove toolbar behavior. +- Composing complete Blocks preserves each child's local primary preview. The + new outer Block keeps its own primary, or the first child primary in graph + order, and retains later child previews as secondary outer previews. Prove + sibling and mixed-node composition without weakening the one-primary schema + invariant or changing child definitions, values, hierarchy, or wires. ## Auto owner lifetimes and computed controls @@ -742,6 +808,19 @@ successful run, and retain immutable definitions and unrelated preview owners. - Opt-in generation tests need explicit backend isolation, installed-artifact checks, an idle queue, bounded execution and task-scoped cleanup. A file-path environment variable or an empty queue alone does not establish isolation. +- Exercise ordinary output persistence after a native submission. The Client + writes the executed API snapshot through `/studio_outputs`. An isolated + capture must accept the metadata save for its own task, then independently + join it to the original graph request and terminal event. Preserve any + missing snapshot as a capture gap. +- For an archived server run with capture gaps, compare its running queue and + terminal records by task, attempt, client run and input identity. Match the + saved executable graph independently. Record which original messages are + absent in the receipt. +- A registry replay uses archived source bytes and recorded runtime packages. + It verifies the node schemas without executing a model. Where preprocessing + changes input bytes, recompute the normalized pixel identity and compare it + with the saved execution. - Keep reviewed upstream source checkouts outside ordinary application test discovery. Distinguish collection/harness failures from product failures; reproduce suspect pre-existing assertions on the original commit. @@ -750,6 +829,23 @@ successful run, and retain immutable definitions and unrelated preview owners. minified files or mistake regenerated inventory hashes for new qualification. Stop expanding the campaign when the requested scope has sufficient evidence. +## Admitting a new model route + +- Exercise each advertised task's actual pinned-library preparation path with + small inputs before acquiring weights. A text call can pass while an image + or video branch needs an additional codec. Put required Python packages in + the ordinary project contract and exercise the same capability probe during + guided setup and preflight. +- Check the connected stage's real component reads, including dependencies on + components owned by other stages. Test decode working memory separately + from weight residency, and check phase transitions clear obsolete progress. +- Verify that a fresh template, a saved workflow and a compatible model switch + all display the same generic stage cards. Compare the ordered executable + graph before and after presentation changes and keep the saved input and + output evidence tied to its recorded run. + +For visual stage discovery, exercise both a name and an action alias in the picker, import a saved graph, and verify its typed wires and executable export. Search metadata belongs to the published registry. A wording change must preserve the recorded recipe and the approved asset. + Keep acceptance criteria in [workbench acceptance](workbench-acceptance.md), implementation contracts in technical references, and dated plans/run ledgers in Git history or local evidence. Retiring a tracker must preserve unresolved diff --git a/docs/deployment.md b/docs/deployment.md index 5fbc1ab5..e5fda61c 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -43,10 +43,12 @@ disk reads rather than Hub requests. See Release qualification fingerprints the backend's actual installer inputs: `pyproject.toml`, `modiff/compatibility/accelerators.v1.json`, and every profile -requirements file named by that manifest. The backend intentionally declares -`[tool.uv] managed = false`; its accelerator-aware installer owns the executable -environment, so there is no repository `uv.lock` and the client release contract -must not require or synthesize one. +requirements file named by that manifest. Native CPU, CUDA and XPU setup uses +the committed `uv.lock` with the selected accelerator extra; Apple Silicon uses +the native default. Specialized AMD setup retains its reviewed direct-wheel +profile. The release fingerprint currently covers the declared installer inputs; +record the selected lock resolution and installed versions with live evidence +rather than treating an installer fingerprint as proof of a runtime installation. Before starting the long-running template qualification campaign on a clean host, refresh its plan and verify every selected template's exact immutable @@ -64,6 +66,11 @@ restarting only the frontend is insufficient. Historical V2 receipts without this worker attestation require a fresh run and cannot be upgraded from the current checkout. +The release candidate report splits verified standalone executions into +`alreadyReleaseEligible` and `awaitingReleaseEligibility`. The first group +is already included in the eligible workflow total. The second group still +needs the release evidence listed against each workflow. + ```bash npm run release:qualification:run -- \ --dry-run \ @@ -126,24 +133,164 @@ npm run preview -- --host 127.0.0.1 --port 4173 This confirms that built assets load, but it is not a full MoDiff runtime test. Registry, file, queue, websocket, model, and generation behavior still require a compatible backend. +The accepted Redux recipe, generic encoding presets and recovered Moonflower +inputs measure 505922/684410/346546 gzip bytes for the largest startup chunk, +startup total and deferred total, versus 505304/683793/346215 previously. The +ceilings add only the measured 618/617/331 bytes and retain 248/246/122 bytes of +headroom. All 95 JavaScript assets and four startup/91 deferred memberships are +unchanged; only `studio-templates.js` and `operation-authoring-tools.js` differ +after import-URL normalization. Dependencies, loading/minifier rules and the +independent 64 KiB deferred chunk cap remain fixed. + +Strict optional media-evidence persistence adds 1026/1026/66 gzip bytes to the +largest startup chunk, startup total and deferred total, respectively: +506948/685436/346612 versus 505922/684410/346546. The measured ceilings preserve +248/246/122 bytes of headroom. Only `studio-templates.js` differs after versioned +import URL normalization; all 95 JavaScript assets and four startup/91 deferred +memberships remain unchanged. Dependencies, build/loading rules and the separate +64 KiB deferred chunk cap are unchanged. + Run the bundle budget after changes that affect dependencies or code splitting: ```bash npm run bundle:check ``` +Node-local audio dispatch history and the approved retained Schnell asset measure +498243/676733/336133 gzip bytes for the largest startup chunk, startup total and +deferred total, versus 498146/676633/336052 in the closed 38-template build. The +ceilings add only the measured 97/100/81 bytes, retaining 12/15/63 bytes of +headroom. All 119 assets and four startup/90 deferred memberships are unchanged. +Only `studio-templates.js` and the immutable asset descriptor differ after import +URL normalization. Dependencies, loading/minifier rules and the independent +64 KiB deferred chunk cap remain fixed. + +Required media loaders in fresh video drafts measure 673303 gzip bytes of startup +JavaScript, with a 494816-byte largest chunk and 329249 deferred bytes. Startup +growth is 13/10 bytes; ceilings become 673314/494824 with the same 11/8 bytes +of headroom. Deferred caps, dependencies and build rules remain unchanged. Only +`DeveloperWorkflowLauncher.js` changes after URL-version normalization; the same +94 JavaScript asset names retain their loading membership. + +Versioned video task observations measure 673290 gzip bytes of startup +JavaScript, with a 494806-byte largest startup chunk and 329066 deferred bytes. +The measured startup growth is 52/57 bytes over the preceding video build; +ceilings become 673301/494814, retaining 11/8 bytes of headroom. Both deferred +caps remain unchanged. The same 94 JavaScript asset names retain membership; +only `studio-templates.js` changes after URL-version normalization. Dependencies, +chunk rules, minifier and identity checks remain unchanged. + +The versioned FLUX3 prompts, scoped image receipts and protected-PNG template +authoring measure 672742 gzip bytes of startup JavaScript, with a 494259-byte +largest startup chunk and 328069 deferred bytes. Compared with the accepted +hydration build, aggregate growth is 1047/1051/1043 bytes respectively. The +ceilings are 672753/494267/328312, retaining 11/8/243 bytes of headroom. Four +startup assets retain their loading membership; deferred assets grow from 89 to +90 with a template-authoring facade. Dependencies, minifier, eager loading +boundaries, graph/media/identity validators and the independent 65536-byte +deferred chunk cap stay fixed. These are aggregate measurements, not per-module +attribution. The following measurements remain historical. + +The save/read hydration ownership fix measures 671695 gzip bytes of startup +JavaScript, with a 493208-byte largest startup chunk and 327026 deferred bytes. +Compared with the accepted authored-device import, immutable Model Install and +workspace checkpoint build, the measured aggregate startup growth is 36 bytes, +including 38 bytes in the largest startup chunk. The startup ceilings are 671706 +and 493216, preserving 11 and 8 bytes of headroom. Both deferred ceilings remain +unchanged at 327269 aggregate and 65536 per chunk. The same four startup and 89 +deferred assets keep their loading membership; all deferred bodies match after +versioned URL normalization. The 107-byte deferred decrease reflects versioned +import compression. These are aggregate build measurements, not per-module +attribution. Dependencies, chunk rules, minifier and identity validators stay +fixed. The following measurements remain historical. + +The reviewed authored-device import, immutable Model Install and page-owned +workspace checkpoint changes measure 671659 gzip bytes of startup JavaScript, +with a 493170-byte largest startup chunk and 327133 deferred bytes. Compared with +the accepted 9ff client, the measured growth is 1651 startup bytes, 1649 largest- +chunk bytes and 156 deferred bytes. The startup ceilings are 671670 and 493178, +retaining 11 and 8 bytes of headroom. Both deferred ceilings remain unchanged at +327269 aggregate and 65536 per chunk. The same four startup and 89 deferred +assets keep their loading membership; dependencies, chunk rules, minifier and +identity validators stay fixed. The following measurements remain historical. + +The Windows saved-form and service-cache follow-up measures 669945 gzip bytes +of startup JavaScript, with a 491457-byte largest startup chunk and 327044 +deferred bytes. Relative to the earlier 28 October candidate, the measured +aggregate increases are 650 startup bytes, 643 largest-chunk bytes and 334 +deferred bytes. All 89 deferred bodies are identical after normalizing versioned +URLs; their compressed-size difference comes from the changed version strings. +Current ceilings are 669956, 491465 and 327269 bytes respectively, preserving +11, 8 and 225 bytes of headroom. The same four startup and 89 deferred assets +keep their loading membership; dependencies, chunk rules, minifier settings, +validators and the 65536-byte per-deferred-chunk ceiling stay fixed. + +The earlier 28 October Windows candidate measures 669295 gzip bytes of startup +JavaScript, with a 490814-byte largest startup chunk and 326710 deferred bytes. +The Block/checkbox/default/readiness correctness fixes and reviewed Vite +8.1.4 → 8.1.6 security update add 498 aggregate startup bytes and 322 bytes to +the largest startup chunk versus the last accepted build. Allow only those +measured increases: its ceilings are 669306 and 490822 bytes, retaining +11 and 8 bytes of headroom. The same four startup and 89 deferred assets keep +their loading membership; chunk rules, minifier settings and validators stay +fixed. Its deferred limits are 326935 bytes aggregate and 65536 bytes per chunk. +The earlier measurements below describe their historical checkpoints. The +original failed measurement remains evidence for its original source and limits. + That gate also checks emitted module identity: static imports, dynamic imports (including minified backtick strings), and preloads must use one versioned URL per module. Duplicate URLs create independent workflow stores and can break portable export. Shared Lucide dependencies initialize in `graph-vendor` so lazy panels cannot capture undefined icons through an entry-chunk cycle. The -startup graph ceiling is 613 KiB gzip, with a 439 KiB largest startup chunk. -Explicit default-equal edit provenance and validation of bounded inactive -model drafts bring measured startup to about 612.1 KiB. Their synchronous -validation stays with the editor; model-change planning and right-panel forms -remain lazy. No dependency was added. Deferred code is separately bounded by -the budget script. Test cold panel startup, -native portable import/Save/export, and browser resource URLs on the built app. +earlier startup graph ceiling was 642816 gzip bytes, with a 464512-byte largest startup +chunk. The reviewed media-migration build measures 642098 startup bytes and +463792 bytes for its largest startup chunk. Model-change planning and +right-panel forms remain lazy. Preserving one declared media source across +new required inputs adds 746 deferred gzip bytes, from 267236 to 267982; +the source-label follow-up adds another 588 bytes and the reviewed deferred +aggregate ceiling at that stage was 268800 bytes. The existing +65536-byte deferred-chunk ceiling and dependencies stay fixed. Test cold +panel startup, native portable import/Save/export, and browser resource URLs +on the built app. + +The combined Windows and Linux recovery, checkpoint, preview and complete-scope +Auto fixes measure 642639 startup bytes, a 464333-byte largest startup chunk and +268989 deferred bytes after sharing normalized attention/progress, preview +identities and unique media drivers. These reviewed changes add bounded ceilings +of 512 startup bytes and 256 deferred bytes, making the deferred ceiling at that stage +269056 bytes. Earlier failed measurements remain failures for their original +source and limits. No dependencies, lazy boundaries or deferred-chunk limit change. + +Bounded optional-runtime status polling then adds visible last-progress errors, +eight-failure transient recovery and explicit status-only retry in the existing +lazy workspace. Its reviewed upstream build adds 457 deferred bytes and allows +512 bytes. Preserve that allowance alongside the Windows allowance: +268800 + 256 + 512 = 269568 deferred bytes. The combined build measures 642643 +startup bytes, a 464336-byte largest startup chunk and 269414 deferred bytes. +The startup ceilings remain 642816 and 464512 bytes, and the individual deferred +chunk ceiling remains 65536 bytes. Dependencies and loading boundaries stay fixed. + +Declared text/JSON Gallery previews, original-file downloads and Session JSON +classification reuse the existing text viewer, Previous formatter and export path. +Together with captured-null and declared-family preservation, their measured build +adds 915 deferred gzip bytes, from 269414 to 270329. A bounded +1024-byte aggregate allowance makes the ceiling 269568 + 1024 = 270592 bytes. +Startup measures 642694 bytes and the largest startup chunk 464387 bytes; their +ceilings remain 642816 and 464512, and the deferred chunk ceiling remains 65536. +No dependency or loading-boundary change is included in this allowance. + +The subsequent Linux update adds exact experimental full-image recipe metadata +and reviewed terms, backend-bound Custom prerequisites, and non-JSON transient +HTTP status recovery. Preserve its bounded allowances alongside the Windows +fixes: startup 642816 + 1536 = 644352 bytes; largest startup chunk +464512 + 1536 = 466048 bytes; deferred aggregate +268800 + 512 + 256 + 1024 + 128 + 2048 = 272768 bytes. The shared 512-byte +optional-runtime polling allowance is counted once. The combined build measures +644101 startup bytes, a 465794-byte largest startup chunk, and 272590 deferred +bytes. The largest deferred chunk is 36508 bytes against the unchanged 65536-byte +ceiling. Dependencies and loading boundaries remain unchanged; the new recipe +cards are editorial illustrations with unverified examples, not generated-output, +Auto, hardware-fit or Gallery qualification. When updating selected loader field metadata, regenerate the paired `BlockDefinitionV2` catalog and frontend identity pins together. This metadata @@ -153,6 +300,13 @@ hash with the tested build. ## Copy The Build Into The Backend +The selected LTX/Wan video stages and retained finishing branches measure +494749/673238/329380 gzip bytes for largest startup/startup total/deferred total, +against the preceding 494455/672941/328233. The measured allowance is 294/297/1147 +bytes, retaining 8/11/79 bytes of headroom. The four startup and 90 deferred asset +members, dependencies, loading boundaries, minifier and independent 65536-byte +deferred chunk ceiling remain fixed. + The MoDiff backend serves the integrated application from its `web/` directory. Replace generated client content, but preserve backend/user-owned content that is not produced by this client checkout. PowerShell example from `MoDiff-client`. `robocopy` exit codes below 8 are @@ -238,3 +392,36 @@ Before publishing a client/backend pair: 8. Confirm user/custom files in `web/` were not deleted by the sync. 9. Document which model paths were mocked, schema-validated, or live-run; do not collapse those proof levels into one support claim. 10. Keep the server on localhost unless the deployment has the controls listed under separate-origin hosting. + +### Fresh example stage layout cost + +The fresh Example opener, shared whole-pipeline Model Setup/Generate boundaries, +measured layout, bounded media previews and utility history labels measure +507459 bytes for the largest startup chunk, 685944 total startup bytes and +349238 deferred bytes (gzip level 9). The packaged baseline measured +506948/685436/346612. The budgets add exactly the measured 511/508/2626-byte +cost, retaining 248/246/122 bytes of headroom. There are four startup and 92 +deferred JavaScript assets: two lazy presentation modules were added and the +former operationScope chunk was folded into the authoring graph. No dependency, +minifier or build rule changed; the individual deferred chunk cap remains +65536 bytes. Native graph identity and browser layout checks remain separate +from model execution and release qualification. + +The subsequent whole-task import recovery and historical creator compatibility +checks measure 507641/686124/349257 bytes. They fit the same ceilings, leaving +66/66/103 bytes of headroom; this follow-up does not raise a budget. + +Native legacy field preservation, the pure Block movement boundary, scoped +preview history and approved MiniMax showcase curation measure +507642/686129/349717 bytes. The startup ceilings and 65536-byte individual +deferred ceiling remain unchanged. The aggregate deferred allowance adds exactly +the measured 460-byte increase, retaining 103 bytes of headroom. All 96 JavaScript +assets, four startup paths, dependencies and build/minifier rules are unchanged. + +Scoped native signal refresh and first-frame measurement readiness measure +510482/688967/349744 bytes (largest/startup/deferred gzip), versus the v16 +510207/688694/349905 baseline. Add only the measured 275/273 startup bytes, +retaining the existing 64/60 bytes of headroom. Deferred ceilings, all 96 +JavaScript assets, four startup/92 deferred memberships, dependencies and build +rules stay fixed. Incompatible attention backends remain rejected; no model, +resource, consent or qualification guard is relaxed by these UI changes. diff --git a/docs/developer-first-node-ux.md b/docs/developer-first-node-ux.md index 7e41baed..7319855f 100644 --- a/docs/developer-first-node-ux.md +++ b/docs/developer-first-node-ux.md @@ -7,14 +7,25 @@ are retained. ## Custom nodes -The full-width yellow **Add custom node** button opens Local, Hugging Face or Git. +**Saved Blocks** reuse groups of canvas nodes and their settings. Use **Create +block** for selected nodes or **Save as reusable Block…** on a stage group, then +insert the saved copy from the library. **Custom nodes** are Python extensions: +use **Add custom node** when you want to supply new code. Saving a Block does not +write Python or authorize additional source; existing source approvals still apply. + +On a collapsed reusable Block, **Expand block** shows its contents for ordinary +canvas editing. Collapse it again when finished; exposed controls stay directly +editable without expansion. Saving changes offers workflow-only, new reusable +Block and applicable existing-definition choices. + +Choose **+ Custom** in the Nodes panel header to add a node from Local, Hugging Face or Git. Selected source cards have a yellow border, tint and checkmark. Advanced contains optional name/revision settings; normal remote imports need only a repository. Add/Load/Reload authorizes trusted Python in one action. Validation and dependency errors are visible; dependencies are never installed implicitly. This is not a sandbox or malware scanner. -Drop a structured `.py` file on the canvas, or use Choose Python file. A canvas +Drop a structured `.py` file on the canvas, or use **Choose Python file** and then **Add node**. Selecting a local file alone keeps it on the browser computer. A canvas drop inserts its node, or offers a dropdown when it declares several nodes. Dropping inside an expanded Block uses the existing Block adoption transaction. Undo removes the insertion, not installed source files. If the workflow changes @@ -25,6 +36,19 @@ The permanent Custom nodes category discovers backend `custom/` files/packages without running them. Use Load deliberately, then Reload after editing. Disable keeps the source. Registry refresh does not rewrite existing node port definitions. Code/dependency identity changes invalidate execution until Reload. +Enabled nodes appear under their Python-declared category within Custom nodes. +Search by node name or category to find the operation you want to insert. + +An approved custom Block's **Load Models** component fields use their own exact +lowercase 40-character revisions when you select **Install** beside a Hub model. +Another cached revision does not hide that install action; missing exact cache +evidence keeps it available. Set a literal repository and revision first: +connected, missing or mutable pins report a correction instead of downloading a +default branch. Expand a Block to install from its component loader when the +collapsed or nested control cannot prove the pin owner. Ordinary model controls +retain their catalog behavior. Alias inspection follows declared ownership only; +malformed, cyclic or excessive control chains require expansion. This installs model files only; +source approval, dependency readiness and Custom memory requirements still apply. ## Image/audio attachment @@ -48,7 +72,19 @@ instead of silently discarding authored settings. | Upscale / refinement | Retain named downstream image operations, connect ordinary image outputs | | ACE variation/repaint/continuation | Attach Load Audio to declared source_audio; keep prompt/lyrics controls | | Transcription / processing | Connect existing typed audio sources to declared consumers; no automatic model-family substitution | -| Video | Existing functionality unchanged; simplification deferred | +| Video | Shared stages for selected LTX/Wan routes; existing native video stages use the same grouping | + +Pika H3 Flex has a conservative presentation profile alongside MiniMax H3, so +capability parsing and saved-form restoration retain its exact model identity +for text, keyframe and reference tasks. The backend still owns its provider, +task-selected weights, required adapter and fixed sampler. This presentation +registration grants no Auto, template, Gallery or live-output qualification. + +When one declared producer publishes both video frames and audio, a fresh +workflow attaches the existing joined exporter and presents Video Output. Both +typed streams stay connected to that same producer. Independently generated +soundtracks retain their separate stages; missing or incompatible joined +exporters produce a connection notice. Existing saved graphs are unchanged. This audit does not claim fewer backend classes: existing generic modular stages already share their execution implementations, and the remaining Generate/Edit @@ -58,19 +94,25 @@ minimal native image graph has five stages including Preview. The connected SDXL starter also exposes Guider and Layers, giving seven nodes with Preview; attaching an image adds Load Image and Image Encode, giving nine executable nodes. New eligible starters now present these as six and seven top-level nodes using -the visual groups below. It does not replace the execution graph. Model/catalog variants are not node -kinds. Isolated startup registered234 built-in definitions; the default public -palette showed63 entries, separately from121 upstream catalog entries. +the visual groups below. It does not replace the execution graph. The registry includes implementation actions and compatibility identities. +The common picker lists ordinary stages and media processors. Searching by name, +dragging from a compatible socket, or enabling implementation nodes reveals +specialists. The sidebar counts matching runtime nodes and catalog entries separately. ## Encode Inputs and Guidance New native image starters combine their input encoding stages into **Encode Inputs**. Related Guider and Layers stages appear as **Guidance** where they are connected. +Fresh Qwen/Z-Image templates also present a single actual Guider as Guidance, +shared by encoding and denoising. Z-Image Turbo keeps CFG disabled; paths without +an upstream guider do not add one. See [image template workflows](image-template-workflows.md). Encode Inputs uses the ordinary node layout, scrolling controls and status-strip resize grip. It is not an expandable canvas Block. Backend encoding stages remain separate, with typed conditioning, latent and route-state outputs. Guidance uses the same ordinary node shell, with Guider/Layers controls and a secondary options -menu for inspection, reusable saving and **Separate guidance stages**. Schedulers +menu for inspection and reusable saving. Choose **Edit stages** to work inside +Guidance and **Done editing** to return. To place the Guider and Layers directly +on the canvas, choose **Convert to independent nodes…** and confirm. Schedulers and adapters remain separate. Guider selection and layer-stack selection use the backend's declared field @@ -96,34 +138,155 @@ are not silently repaired or structurally rewritten when opened. in one Undo step. Cancelling node search or failing preparation changes nothing. 3. Required encoding stages are prepared behind the same Encode Inputs node. Text and image can both be used; section collapse only hides fields. Load Image - stays separate, as do Denoise, Decode and Preview. + stays separate. In native image workflows, Generate owns its matching denoiser + and decoder, and Image Output displays the result. Existing ControlNet and custom branches are retained; Image does not mean Control Image. Unsupported or ambiguous preparation reports an error rather than silently choosing a different operation or discarding existing work. -4. Use **Inspect implementation** in the options menu for stage details. Use - **Separate encoding stages** to edit individual stages/custom connections on - the canvas, with one Undo to restore the combined node. Inspection never turns - the node into an enclosing Block. +4. Choose **Edit stages** to wire the underlying operations on the canvas. **Done editing** + returns to the same stage and keeps your edits. The stage menu also offers + **Inspect implementation** for a read-only overview and **Convert to independent + nodes…** when you want the listed operations to become standalone nodes. Review + the list before confirming the conversion. 5. Change model/task through Load Models. Compatible values and external branches - are retained; incompatible changes still require the normal review. Save and - refresh retain the presentation and values. + are retained; incompatible changes still require the normal review. An existing + image/audio source also supplies newly required inputs with the same declared + media role and compatible type when the preserved source is unambiguous. + Different roles and already authored inputs remain separate. Save and refresh + retain the presentation and values. + +Uploading or removing a source file updates Run readiness immediately, including +optional loader pickers connected to required workflow inputs. Existing workflows are not regrouped on open. Their loader inspector's **Workflow stage actions** menu offers **Group input encoders**, **Group guidance** and **Add image / audio input…** where supported. That explicit attachment action opens the supported-role/source chooser; it is not a permanent form and ordinary typed wiring does not require it. Audio sources retain upload, playback and seek. -Individual implementation nodes -remain available. Grouping changes encoder runtime IDs once, so a first run may -recompute encoding; opening details or collapsing field sections does not change runtime identities. +Individual implementation nodes remain available. Grouping changes the selected +stages' runtime IDs once, so a first run may recompute encoding or recreate loader +ownership. Opening details or collapsing field sections does not change runtime identities. Shared seed controls still update across the visual boundary. Grouping does not grant model capabilities or Automatic memory qualification. Whole-pipeline operations remain whole-pipeline operations; no fake encoder is inserted. A group with manually nested containers or mirrored custom interfaces requires explicit structural editing/ungrouping before automatic task adaptation. -New audio grouping recipes, Model Setup, Prepare Mask and Image Output are -follow-on candidates; video simplification remains deferred. +Audio supports the applicable Model Setup and Audio Output groups described +below. Selected LTX/Wan video routes use the shared stage presentation too; +other video routes retain their existing native Modular or whole-pipeline nodes. +Fresh image, audio and video template cards with an explicit execution recipe +use that same backend-owned starter through the normal creation path. Selected +video templates retain their creative settings, source nodes, upscaler and +soundtrack branches. Their ordinary stage graph is checkpointed and restored +without a managed receipt for a different topology. This fresh-template routing +does not convert previously saved whole-pipeline workflows. +Add media reads declared image, audio and video input roles for the selected +model. It can add an ordinary media loader or use a compatible existing source. +The attachment stays in the same graph and is one Undo/Redo transaction; +unsupported task changes still require review. Existing saved graphs are not +rewritten on open, and missing source files continue to block Run. + +Model Setup shows inline adapter controls where they apply. A native workflow +with declared non-image outputs omits the empty image LoRA panel. Existing +adapter rows and external connections remain inspectable, and supported audio +routes retain their declared adapter controls. + +When a built-in execution recipe supplies placement inside Model Setup, the +canvas and inspector show **Execution Device** and **Runtime Offload**. Direct +image, audio, video and 3D loaders use these settings. Disconnect the recipe +to edit the loader's saved device, automatic offload switch and offload mode. +A connected VAE setting follows the same rule. Custom controls and ambiguous +connections stay visible. Base model and adapter revisions keep their +separate values. A stock image loader whose conditioning selector is set to None +hides the auxiliary model picker and revision in Model Setup and Inspector. +Connected supplier controls and the saved values remain available when applicable. + +In a built-in execution recipe, **Layerwise Casting** reveals its components, +storage dtype and compute dtype. **Channels Last** reveals its own components. +Show each switch first on the raw node, grouped stage and inspector. A wired +switch keeps its settings available, and a wired option stays visible. Turning +a switch off preserves its saved options for the next time it is enabled. + +Use role-specific captions for inputs and outputs. Image composition names the +overlay and base separately, and generated dimensions are labeled as measured +outputs. Presentation changes preserve authored names, field IDs and socket types. +The raw reviewed modular placement action stays resolvable for saved workflows. +The registered Block picker supplies the exact contract and is its authoring path. + +Recorded ordinary video stage inputs keep condition strength and denoise +strength separate. A source-video pixel digest identifies the ordered frozen +PIL frames used by Encode Inputs, alongside their count; it is not a source-file +hash. Other frame types report an unavailable digest. Saved receipts survive +history reload without borrowing values from the current form. + +## Audio stages + +The same stage actions offer **Group model setup** for eligible direct audio +loaders and their exclusive configuration/adapter nodes. Native MiniMax keeps +**Generate Semantics** for its song structure and uses one **Generate** card for +denoising and decoding. **Audio Output** holds the file export and player. Direct +whole-pipeline Generate operations also retain their separate exporter. Source +audio and other processing nodes remain connected outside those stages. + +Selected ACE branches can expose one owned adapter row when the backend declares +the exact task, model revision and registered transport. Capacity restricts Add; +the existing row can still be edited, replaced or removed. Other audio models do +not inherit that permission. See [audio workflow stages](audio-workflows.md) for +the full task, adapter and qualification boundaries. + +## Optional image stages + +**Workflow stage actions** in the loader’s Node inspector, or inside an existing +Model Setup node, offers these explicit groups when the existing model branch +contains the required nodes: + +- **Group model setup** combines the loader with connected built-in LoRA + descriptors/adapters or quantization/execution-recipe configuration. A bare + loader stays Load Models. Unrelated loaders, ControlNet, Guidance and shared + modifiers remain separate. +- **Group mask preparation** combines Load Image and the existing Outpaint + Canvas utility only when its canvas and mask outputs feed the same declared + inpaint/outpaint consumer. Geometry, margins, overlap, feathering and file + selection stay on those original fields. A plain inpaint mask loader has no + new preprocessing step. +- **Group image output** combines a declared native image decoder with its + directly connected Preview Image nodes. Whole-pipeline output already goes + straight to Preview, so that single node is not wrapped. + +These groups use the ordinary node shell, with real controls and declared +sockets. Image Output displays the existing backend preview. The stage menu opens +inspection and interface configuration, saves eligible stages as reusable Blocks, +or converts the listed operations to independent nodes after confirmation. +Converting or grouping operations takes one Undo step. Refreshing keeps the +chosen layout and settings. Saving snapshots current values +and creates independent reusable instances through the same User Node contract. + +Model Setup retains the model picker and Change model / task review. Applying a +change adapts its complete connected workflow, including Encode Inputs and +Denoise outside the wrapper. Cancelling leaves the graph unchanged. Existing +saved workflows and new template defaults are not automatically regrouped. +Grouping folds real canvas nodes/wires into a V2 interface; executable stages, +component wires, backend cache policies and the executor stay the same. + +The same menu offers **Use component bundle** and **Expose components** when +actual operation contracts declare that a loader aggregate supplies exact scoped +component members to the existing stage inputs. The initial backend prototype +publishes this relation for Qwen native text to image. It keeps the same loader, +Encode Inputs, Guidance, Denoise and Decode implementations; four raw loader +component connections become three aggregate connections, reducing this graph +by one wire. It does not replace the shared, per-run Guidance strategy with the +bundle's default guider. There is no model-name dispatch in the client action. + +An independent component supplier, modifier path, literal component override or +custom aggregate cannot prove the backend's sealed loader/member identity, so +that entire consumer keeps its existing ordinary component connections. Breakout +restores the declared raw loader connections while keeping explicit overrides. +Both actions use one Undo transaction and persist on refresh; reusable V2 +snapshots and unrelated branches retain their existing authority. Backend checks +still enforce actual object identity, component roles, loader ownership and +runtime generation. This is explicit opt-in wiring; template defaults and saved +graphs are not automatically converted. Broader component facades remain deferred. ## Connection guidance @@ -133,6 +296,11 @@ missing types require **Show unverified matches**. This includes deliberately generic utilities such as Data Viewer. Type compatibility is not a guarantee of model availability, shape, memory or the behavior of arbitrary Python. +On ordinary nodes and collapsed stages, selecting a node or wire keeps the +wire's hit area below other node controls. Selection still changes its stroke, +and exposed wire sections remain selectable. Expanded child edges retain the +existing hierarchy layering; this changes no saved graph or execution wiring. + New mask inputs use a loaded black/white image's pixels. Use the explicitly named Alpha mask output only when you intend transparency to define the mask. A model must still support the chosen task. Automatic memory recipes are separate from @@ -141,6 +309,19 @@ explicit Custom settings and are not silently admitted by attachment. ## Verification trail +The library parser accepts collection schema 7 with explicit immutable source +supplements, while preserving schema 5/6 collections. Member definitions keep +their own schema and source revision; adding a source does not rewrite existing +definition hashes. Source metadata is for authoring and does not activate a +runtime, approve custom code or establish model/hardware qualification. The +client renders these declarations without model-specific parameter branches. + +The unpruned hierarchy API uses collection schema 2 with separate schema 1 source +snapshots. Select the definition's exact revision before showing or compiling its +tree; an unavailable source remains unavailable. Standalone historical schema 1 +snapshots stay readable. Source grouping does not grant edited-tree execution or +change an existing graph's source identity. + Focused source/lifecycle, graph transactions, saved-Block boundaries, registry and search tests precede real browser journeys. The model-free Local/Hub/Git journeys import, insert, connect, Run and refresh using a real backend. The Hub @@ -154,3 +335,30 @@ repository you can access). Do not point the isolated fixture root at operator data. Remote tests skip explicitly without a repository; skips are not evidence. Native Windows/RTX4080 and all-model generation qualification are separate from these Linux UI/contract checks. + +For a new speech graph, add **Transcribe Audio** and wire a speech model and +source audio. The model connection controls which settings appear. A +sequence-to-sequence recognizer offers language, translation and three timing +choices. A CTC recognizer offers plain text or word timing. Switching back +restores the settings for the previous recognizer. Saved CTC recipes retain +their original action and timestamp field. + +Saved graphs discard transient signal values. A loader that always supplies +the same model family can declare its output signal `fixed: true`. Reopening +restores that capability from the installed registry. Mark a newly added +optional input with `fieldOptions.omitInactiveDefault` when a disconnected +default has no effect. Older graphs then offer the socket, and their executable +recipes acquire the input when the user connects or edits it. + +**Process Video** accepts files, retained clips and decoded frame sequences. +The file picker is the fallback when the Source input is disconnected. Files +carry their own frame rate and embedded audio. Decoded frames use the frame +rate entered on the stage and carry no audio track. + +## Finding a stage by its action + +Browse starts with 15 everyday stages. Show task stages adds 14. Advanced includes six more. Search by stage or action, for example `KSampler`, `CheckpointLoaderSimple`, `Canny` or `fit audio duration`. Expand a result to choose an available action. A search from a wire also checks its type, direction and role. The Docs tab shows the action in the selected stage. Custom authors can declare searchable `searchTerms` on their node class. + +Choose **Show on canvas** to locate an existing instance. For an independently inserted node, open its help menu and use **Stage action** to switch modes. The editor restores values for the selected mode and identifies any wire that needs your attention. For a model-bound workflow, use Model Setup to change the model or task for the connected stages. + +Searching an exact older implementation name such as `WorkflowImageDenoise` on an empty canvas lists the stages that can own it. Select a compatible model and task to enable the action. Searching from a wire shows the insertable choices for that port. diff --git a/docs/frontend-style-guide.md b/docs/frontend-style-guide.md index 86ac18c5..bbc42bb5 100644 --- a/docs/frontend-style-guide.md +++ b/docs/frontend-style-guide.md @@ -98,6 +98,8 @@ Use or extend these before creating feature-local visual systems: When a feature needs a repeated visual pattern that is not listed here, add a small primitive to `src/ui` and export it from `src/ui/index.ts`. +Shared single- and multiple-choice menus show an inline search field from 16 options onward. Filtering matches the visible label, group and option value. Keep full labels readable inside the popup, preserve selections while filtering, and restore focus to the trigger on Escape. Model filters in Template Browser should offer choices backed by a matching recipe in the current category and filter scope. + Shared primitives own focus, disabled/read-only/required/invalid state, label and description associations, portal layering, and selected-value behavior. Feature and graph wrappers may add domain actions and preserve `nodrag`/`nowheel`, but must not recreate those contracts or import the underlying Headless UI control directly. Standalone actions use the shared 28px compact, 32px dense, 36px normal, or 40px prominent sizes. ## Headless UI Policy diff --git a/docs/image-template-workflows.md b/docs/image-template-workflows.md new file mode 100644 index 00000000..578b55f3 --- /dev/null +++ b/docs/image-template-workflows.md @@ -0,0 +1,288 @@ +# Image template workflows + +Creating a fresh image template now builds the selected backend operation recipe +as the visible, editable developer workflow. The canvas is the graph that Run +submits. It uses the same ordinary nodes, validation, Automatic/Custom memory +selection, model readiness and output handling as a workflow authored by hand. +Opening an existing saved workflow preserves its graph. + +## Current template inventory + +The current inventory contains 66 image templates. The historical 54 converted +templates retain their creator prompts, seeds, sizes, inference settings, +immutable model revisions and required input roles. Their fresh graphs +use explicit execution-profile selections rather than a family-wide default. + +| Native stage family | Templates | Tasks | +| -------------------------- | --------: | ------------------------------------------------- | +| Z-Image Turbo | 7 | Text to image and styles using LoRAs | +| Qwen Image | 10 | Text to image and ControlNet image layout | +| Qwen Image Edit | 7 | Image editing, inpainting and outpainting | +| Qwen Image Edit Plus | 7 | Single-image and multiple-reference editing | +| Qwen Image Layered | 1 | Layer decomposition | +| FLUX Schnell, Dev and Krea | 11 | Text to image and styles using LoRAs | +| FLUX Kontext | 2 | Single-image and multiple-reference editing | +| FLUX.2 Klein | 3 | Text to image and image/reference editing | +| FLUX.2 Dev | 1 | Full-model text to image | +| Cosmos 3 Super | 1 | Full-model text to image with mandatory safety | +| FLUX 3 Klein Distilled | 5 | Generation, reference edits, raw layout and style | +| FLUX 3 Klein Base | 5 | Generation, reference edits, raw layout and style | + +The 48 historical native recipes, two additional full-model candidates and ten +reviewed FLUX 3 recipes contain +real model loading, input encoding, denoising and latent decoding stages. The two +full-model candidates remain separately unqualified; their presence does not +establish Auto readiness or fit on ordinary hardware. Fresh eligible native graphs present **Model Setup → Encode Inputs +→ Generate → Image Output**. **Encode Inputs** presents the relevant encoding and +actual Guidance stages together; +the exported graph retains their distinct backend calls and typed connections. +Image, mask, control and reference inputs remain separate when their roles differ. +Model Setup includes exclusive connected LoRA/configuration leaves, while shared +suppliers stay external. Generate contains the matching sampler and latent decoder; +Image Output retains the delivered preview. Component-based image recipes use +this same presentation as the prepared-state recipes. Grouping requires one +sampler/decoder pair connected to the same model owner; missing or ambiguous +pairs are not folded. Any external latent consumer keeps its boundary connection. +Additional media preparation, control, composite or upscale branches remain visible; +the four-stage presentation is the core native diffusion path, not a limit on all +workflow node counts. Existing saved layouts change only through explicit stage +actions. **Combine encoding and Guidance** groups the connected operations. To +put the operations back on the canvas as individual nodes, open the stage menu, +choose **Convert to independent nodes…**, then confirm. Either change takes one +Undo step. Inspecting or saving a workflow preserves its reusable library definition. + +MiniMax H3 Image uses the same generic Model Setup, Encode Inputs, Generate and +Preview stages. Generate combines the real denoising and decoding calls, with +one shared component input; expanding it preserves the executable graph. Its +reference-image preparation remains inside Encode Inputs. Required-input checks +use the exact backend-declared block selected by literal pipeline, workflow and +block identifiers. A prepared-state encoder therefore needs its state connection, +while a direct-image encoder still needs its image connection. Saved operation +hints cannot override this contract; unknown, connected or conflicting selectors +retain the conservative registry requirements. + +The **Image** collection features **MiniMax H3 Image — Old Town: Human & Cat**. +It creates the same generic text-to-image stages, with a fictional adult and a +cat as the foreground subjects and a detailed street background. Its pinned +2048-square BF16 recipe uses Custom memory and SSD group offload. The Gallery +includes the reviewed output for this exact recipe. Its review records brighter +ambient light than the requested blue hour and visibly sharpened edges. The +recipe's fallback vector illustration can be rendered with +`node scripts/render-h3-template-poster.mjs`. +The template adds no Auto or broader hardware qualification. Edit the prompt to +turn the old town into a modern city. + +The four Qwen masked-edit/outpaint templates use real native stages with a +backend-owned compatibility path for their original image preparation and final +mask composite. Their dimensions, strength, crop padding and outpaint canvas +settings stay explicit. Ordinary developer starters keep their native defaults; +saved workflows retain their own route and values. Matched original outputs and +Auto/repeat checks on local ROCm remain separate from Windows or cloud hardware +qualification. Changing a fresh template's execution selection invalidates its +current exact-template evidence while retaining the historical example. + +The other six recipes use generic pipeline stages while retaining their selected +official pipeline's specialty conditioning and sampling contract: + +| Pipeline-stage path | Templates | Preserved boundary | +| ------------------------ | --------: | ------------------------------------------------------------------- | +| FLUX Fill | 2 | Text encoding, official image/mask sampling, decoding and composite | +| FLUX Canny/Depth control | 2 | Text and VAE control encoding, official latent sampling and decode | +| FLUX Redux | 2 | Pinned prior in reference order, matching base sampler and VAE | + +Their fresh graphs use the same **Model Setup → Encode Inputs → Generate → +Image Output** presentation, plus required media preparation and utility stages. +Generate contains the real Denoise and Decode Latents operations; their declared +conditioning, latent binding and dimensions remain wired to the same pipeline +owner, including through its ordered adapter chain. The official pipeline's +denoising implementation remains in use. These recipes do not add an unused +Guidance owner. Existing saved whole-pipeline workflows retain their original +route and presentation. + +## Guidance and preserved settings + +Qwen and Z-Image recipes contain a real **Guidance** owner whose Diffusers guider +feeds both prompt encoding and denoising. This owner is inside Encode Inputs in +fresh graphs. Closing its Guidance disclosure hides the controls without disabling +execution; use its Enabled setting to change execution. Models without declared +Guidance have no Guidance section. Their **Encode Inputs** stages retain +the authored positive and negative prompts; disabled guidance does not encode +an unused negative. Qwen retains the upstream classifier-free +guidance formulation and the template's scale. The seven Z-Image templates +converted from the standard pipeline preserve its observed two-batch CFG: +guidance is enabled with the original formulation, `positive + scale * +(positive - negative)`, and the creator's scale. This template policy is separate +from the ordinary upstream developer starter, which keeps guidance disabled. + +Studio offers denoising strength and strength variations only when the selected +image task has a reviewed execution binding for that setting. An image input or +an aggregate node's strength port does not establish that its active route uses +the value. Plain Qwen Image Edit, Edit Plus, Layered, and Redux/Kontext/Klein +reference edits do not use this control; inpainting and supported image-to-image +tasks retain it. The template +with the historical ID `qwen_edit_strength_sweep` is a single-image reference +edit, now labelled **Reference Variations**. Its original prompt, seed and +execution route are preserved. An unused historical strength value is not a +claim that the workflow performs a strength sweep. +The thirteen converted Flux and Kontext recipes also use a real Guidance owner +shared by encoding and denoising. Their creator guidance scalar retains the +standard pipeline's true CFG setting. The separate embedded model guidance keeps +the original Gallery's effective value: `3.5` for Flux Dev/Krea and Kontext. +Schnell consumes no embedded guidance tensor; its native scalar `0` and the old +pipeline's inactive default do not affect model output. The old Gallery left the +secondary override disabled, so Kontext used the standard pipeline's `3.5` +default. Its ordinary native developer starter still defaults embedded guidance +to `2.5`. Schnell keeps CFG disabled. Ordinary developer Flux starters keep their guider disabled +at scale `1`; creating a converted template explicitly applies that template's +preserved settings. + +The 35 recipes converted from whole-pipeline loading bind their original +attention backend and enabled VAE slicing/tiling explicitly. The original 13 +native recipes retain inherited attention and unset VAE policies. Schnell's +template preserves its authored 512-token prompt limit; the ordinary developer +starter still defaults to 256, with a reviewed maximum of 512. + +LoRA descriptors preserve their immutable files, adapter names, scales and +order. Native descriptor chains feed the one model owner through +`previous_loras`; they do not modify a second hidden pipeline. Scheduler options, +reference assembly, outpaint placement and the optional upscaler branch retain +their declared recipe values. Every generator initialization retains the seed +and the backend's device/state contract. +Model Setup exposes owned adapters as ordered real-node rows. Add LoRA opens a +draft form and inserts nothing until the selection is complete. Hub selections +require the exact commit, Safetensors weight filename and expected SHA-256. Add, +Remove and Move preserve other branches and support Undo; external shared suppliers +remain connected. Editing this form or grouping stages does not install a runtime +or load model weights. Normal model readiness and Run validation still apply. + +New image adapter edits also require the current selected backend capability, +execution profile and its exact `repository_revisions` pair to agree with the +registered adapter transport. An alias cannot override its native pipeline's +declared restriction. Missing or unsupported authority disables Add and ordering; +saved rows remain inspectable, and Remove can repair them through ordinary Undo +without silently discarding their values or shared connections on import. + +The converted Z-Image LoRA Style and Fast LoRA recipes explicitly retain the +original whole-pipeline adapter name `default`. Their creator settings omitted +the name, so this default is part of the selected execution policy. Original +native recipes with unnamed descriptors retain their generated identities; +explicitly named adapters retain their authored names. + +## Historical Gallery examples + +The Cinematic Octane portrait's **recipe v3** removes injury references and uses +true CFG 1 with the retained distilled guidance 3.5. The previous true-CFG-3 +recipe produced soft detail even in an adapter-free control. The v3 recipe keeps +the two immutable adapters and their strengths, seed, dimensions, steps and +group offload, and explicitly selects Custom memory. Its original v1 creator +fixture and comparison remain unchanged; the separate creative-revision fixture +permits only the new prompt, true CFG and memory-policy selection. This is a new +creative recipe, not pixel parity with v1, Auto/Windows qualification or public +media approval. + +An existing approved image generated with the previous recipe can remain visible +as **Previous recipe example** when its original prompt, settings, inputs and +model revision still match. It is historical output, not visual qualification of +the new graph. Stale or revoked proof does not qualify either recipe. Changing +the execution selection or its explicit component/guidance/LoRA policy changes the template's +exactness identity; old approvals are not copied onto the new identity. + +Fresh generation and review must record the actual exported graph and consumed +recipe. Structural checks alone cannot establish equal image quality or pixel +parity. Use the backend's [image template validation guide](https://github.com/sdevil7th/MoDiff/blob/develop/docs/image-template-validation.md) +for matched old/new runs, runtime and input identity checks, decoded-image +comparison and the Windows validation procedure. + +## Reviewed FLUX 3 recipes + +The two reviewed FLUX 3 style recipes name the selected immutable +adapters: [NASA concept art](https://huggingface.co/kocabiyik/nsc7-style-lora/blob/9b998d3bdc3b4aeb2113ab4e8cbd9fe2ebfa1cae/README.md) +for Distilled at scale `0.75`, and [Monet oil painting](https://huggingface.co/pjecuacion/flux3-klein-mnt-oil-monet-lora/blob/0d94b6a4601892499defd8c5d89c24f78e78043b/README.md) +for Base at scale `0.65`. Both cards declare the +[FLUX Kommunity License v1.0](https://huggingface.co/black-forest-labs/flux-3-image-klein-base/blob/1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4/LICENSE.md). +Their training-data provenance is the authors' statement, not independent rights +verification. The Base recipe explicitly replaces Tarot; saved Tarot +workflows and historical evidence keep their original identities. + +The revised recipes use the ring-habitat and meadow-fox prompts, seeds +`481205` and `481405`, 512-square FP8r/BF16 recipes, 16/50 steps and guidance 1/3.5. +The original radio/fox recipes and their failed outputs retain their historical +identities. The two plain-radio recipes use revised two-front-control prompts +and seeds `481402` (Distilled) and `481401` (Base). PUP remains +disabled. The locked public settings are Expert with no offload and +`autoOffload=false`. Successful local `model_cpu` / `autoOffload=true` trials +are separate recipes and cannot qualify these locks. The ten fixed-input outputs +passed their bounded visual reviews and have exact-file publication approval. +They enter Experimental with their original task/source/model/input provenance; +publishing a preview keeps explicitly declared experimental creators in that +category. It does not grant visibility through the ordinary model catalog or +change the model profiles' global qualification flags. Matching older +evidence retains its historical scope. Separate native Auto checks cover the six +basic routes and the selected NASA/Monet lifecycle cases only on the tested Linux +x86_64 ROCm gfx1151 shared-memory host. They do not qualify larger workloads, +Windows fit, or other hardware. Fixed-output acceptance does not establish a +general adapter benefit or NASA endorsement. Inspect new outputs for invented +marks and signatures; their rights are separate from approval of these exact files. + +The two packaging recipes preserve the ordered model references, then +compose the generated photograph onto the second reference using ordinary image +nodes. The declared mask protects all pixels outside the photo panel. Three +explicit Lanczos resize/pad operations precede a 1024-square crop at `y=205` +(Distilled) or `y=165` (Base), followed by Mask Composite and Save Image. The +generation remains 512-square; the composited Gallery image is 1024-square PNG. +This is generated plus composited media, without a native Fill claim. Creation +requires the declared mask, a single-image batch and the paired backend's PNG +Save Image preview contract. The authored mask and selected output media must be +published and verified through the normal asset contract before Gallery admission. +Existing saved graphs retain their own nodes, settings and outputs. + +The two raw-coordinate examples retain their literal caption plus JSON prompt. +Their `raw_layout_reference` quality policy checks one caption, matching unique +object IDs, integer `bbox` coordinates in `0..1000`, valid box extents and concrete +descriptions with visual treatment. The audit is bounded to 16,384 characters and +32 objects. Malformed or incomplete documents fail; this policy never executes +JSON, seeds a structured-layout widget or rewrites the prompt. Distilled's exact +public profile has no negative-prompt input. The reviewed Base recipes use empty +negative conditioning at CFG up to 3.5 while retaining Base's negative-input +support. These declarations do not extend to a different execution profile. + +## Qualification-only blocked-template probes + +A complete recipe may remain a blocked planning template while its exact output +and visual quality are unqualified. The Gallery runner's explicit +`--allow-blocked-probe --record-qualification` combination may retain a successful +locked run as an execution receipt. Direct `release:template:qualify` accepts +`--allow-blocked-probe` for the same lookup scope. A current canonical workflow, +unchanged recipe locks, immutable model, valid output and resource measurements +remain required. This does not clear the template's blocked status or authorize +Gallery publication, model/Auto eligibility, or reuse of failed evidence. Normal +media provenance, quality review and per-file rights gates still apply. + +## Contributor checks + +The current builder is shared by interactive template creation and the developer +Gallery/workflow-library harness. Harnesses generating a new image graph must +use that selected path. Explicit historical fixtures may keep the previous +builder to test saved managed workflows; production authoring must not use them. + +```bash +npm run test:templates +npm run test:gallery-harness +npm run typecheck +npm run check +npm run check:ui +``` + +`template-operation-workflows.test.mjs` obtains the real selected backend +starters, public capabilities and node schemas without constructing models or +reading operator extensions. Its historical migration fixture checks the original +54 creator contracts, typed graph +exports, component policies, shared guidance and seeds, controlled extras, +save/restore, undo/redo and stale asynchronous construction. The current public +catalog contains 66 image templates; additional native candidates have separate +selected-recipe tests. Those are contract tests. Real model generation, paired +image comparison, visual review and hardware qualification remain separate evidence. +Fresh workflows group an exclusive source and outpaint canvas into **Prepare +Mask**, and an exclusive ordered image source and stitch operation into +**Reference Images**. The grouped controls edit the original source selection +and preparation settings. Shared sources stay available to their other branches. diff --git a/docs/linux-support.md b/docs/linux-support.md index b27b5726..c1a35694 100644 --- a/docs/linux-support.md +++ b/docs/linux-support.md @@ -19,19 +19,29 @@ sudo apt update sudo apt install -y git curl build-essential ffmpeg libgl1 libglib2.0-0 ``` -The backend installer bootstraps a hash-verified local uv and Python 3.12 when -needed. Install Node 24.12.0 with your normal system tooling. CUDA toolkit/NVCC +Install uv with its official instructions or your package manager; the backend +does not require an exact uv version. uv can provision Python 3.12. Install Node 24.12.0 with your normal system tooling. CUDA toolkit/NVCC is only required for optional packages that compile native CUDA extensions. ## Backend Setup -Developers can use the backend's -[uv setup commands](https://github.com/sdevil7th/MoDiff/blob/feat/generic-diffusers-workbench/docs/developer-setup.md) -to plan, install, check and run the managed environment without shell launchers. -Start the client with `npm ci` followed by `npm run dev` in a second terminal. -Stop each process with `Ctrl+C`. Use a separate checkout for a clean CPU test; -`modiff.dev setup` preserves an existing `.venv` unless `--repair` is explicit. -The guided launcher path is also available: +Use native uv commands for NVIDIA setup: + +```bash +uv sync --extra cuda +uv run --extra cuda python -m modiff.preflight --json --check-port 8088 --fail-on-error +uv run --extra cuda python main.py +``` + +Choose `--extra cpu` for CPU or `--extra xpu` for Intel, and keep the same extra +on sync and run. Transformers and PEFT are mandatory base packages. Start the +client with `npm ci --include=dev` and `npm run dev` in another terminal. Ctrl+C stops each +process. `uv sync` reconciles the selected environment; test a different profile +in another checkout. The [developer guide](https://github.com/sdevil7th/MoDiff/blob/develop/docs/developer-setup.md) +explains explicit `uv pip`, repair, and upgrades. + +Specialized AMD vendor wheels retain the guided installation path below; +do not reconcile a reviewed ROCm environment with a CPU/CUDA extra. From the backend checkout: diff --git a/docs/macos-support.md b/docs/macos-support.md index 4289128e..6b4ec24e 100644 --- a/docs/macos-support.md +++ b/docs/macos-support.md @@ -16,7 +16,7 @@ Install the common Homebrew packages: ```bash xcode-select --install -brew install node@24 ffmpeg +brew install uv node@24 ffmpeg ``` If Homebrew does not put Node 24 first on your `PATH`, use your normal shell @@ -27,15 +27,17 @@ profile to add it before running the development installer. From the backend checkout: ```bash -./install.sh --accelerator mps -./.venv/bin/python -m modiff.preflight --json --check-port 8088 --fail-on-error -./run.sh +uv sync +uv run python -m modiff.preflight --json --check-port 8088 --fail-on-error +uv run python main.py ``` The Apple Silicon profile keeps the core backend install on normal PyPI wheels so PyTorch can use CPU/MPS support. CUDA-only packages such as `bitsandbytes`, `dfloat11[cuda12]`, Nunchaku, `xformers`, FlashAttention, and SageAttention are not part of the default macOS path. -The installer owns this environment and validates the MPS profile before -promotion. Do not layer a separate pip-managed Torch stack into `.venv`. +Transformers and PEFT are required base packages. Native `uv sync` uses the +committed lock; no optional activation is needed for normal image or LoRA +workflows. Keep operator pip changes in a separately managed environment, or +declare them in the project before using `uv run` auto-sync. Put large model caches on a writable disk with enough space by setting `HF_HOME`, `HF_HUB_CACHE`, or `[huggingface] cache_dir` in `config.ini`. If you change `config.ini`, keep local development on: diff --git a/docs/modiff-client-architecture.md b/docs/modiff-client-architecture.md index 9861f03d..0778d981 100644 --- a/docs/modiff-client-architecture.md +++ b/docs/modiff-client-architecture.md @@ -1,5 +1,24 @@ # MoDiff Client Architecture +Ordinary stages open as a single task node. **Edit stages** or **Edit stage connections** +opens the owned operations on the canvas. **Done editing** returns to the same stage +and keeps edits to its controls and wires. The optional instance presentation flag +`stageEditorOpen` records this explicit view independently of execution. Older +workflows with only the Block expansion flag open as ordinary stages. **Convert to +independent nodes** is a separate, confirmed change to the workflow structure. + +Ordinary visual stages follow native model-contract visibility. A scoped metadata +reply that enables an editor omitted by the original model adds that editor to +the effective instance interface, preserving its value, wires, reusable +definition and any deliberate interface removal. Later incompatible models hide +that editor while retaining its value for switching back. Explicit User Node and +registered Block interfaces keep their existing public-control visibility policy. +Numeric editors display retained values outside a newly selected model's bounds +as invalid. Opening, focusing or leaving the editor does not silently clamp the +execution value. An explicit edit uses the existing model bounds and participates +in the normal Undo/Redo history. A model switch is one user edit, including +updates that the selected model signals to downstream nodes. Reapplying a +received signal during Undo or reload preserves the Redo history. This document describes the current frontend structure, ownership boundaries, data flow, persistence, and extension points. Update it in the same change when a subsystem moves or a public contract changes. ## System Boundary @@ -25,6 +44,37 @@ MoDiff Python backend The frontend treats backend responses, websocket messages, local storage, dynamic node definitions, and imported packages as untrusted data at their boundaries. Use parsers/type guards before storing or rendering them. +Task telemetry distinguishes omission from explicit `null`. Omitted fields in a +partial or legacy message preserve the previous observation; `null` clears it. +Keep that distinction through websocket handling, HTTP queue coercion, current +tasks and session-history merges. Otherwise loader component/shard/step details +can remain visible after sampling or decoding starts. The task store retains +nullable observations, and presentation omits them rather than substituting zero. + +Backend field metadata may declare `requiredWhen: { field, equals }` alongside +an optional static `required` value. Graph Fix and Run readiness evaluate the +same read-only string-selector condition against the current registry. They +retain saved values and wires, including older nodes without that metadata. +An unknown, malformed or connected selector keeps the static requirement; +inspection never executes a supplier or guesses its computed value. Runtime +validation remains authoritative. Ordered media references use this for the +selected image/video/audio input; the initial list and video soundtrack remain +optional. This contract is generic and adds no model-specific frontend branch. + +Run readiness also checks literal `filebrowser` fields. Unannotated editors on +normally validated nodes are mandatory; explicit optionality and dynamic +skip-validation remain respected. Raw, immutable and saved definitions stay intact. +Empty paths/collections and blank collection members block submission without +inventing another node or changing the graph. Optional selectors remain optional. +This checks input presence, not filesystem access or decoding; backend boundaries +remain authoritative. + +For ordinary graphs, a declared media or text preview linked by `dataSource` to +an output port establishes a visible output even after its node label changes. +Input-backed players and label widgets do not establish an output. The existing +connection, required-input, disabled-node and resource checks still apply; +recognizing a preview does not authorize execution or qualify its result. + The backend may use official model libraries maintained and published by Hugging Face, but the client remains runtime-agnostic. It renders backend-declared task inputs, parameters, outputs, missing optional runtimes, and readiness instead of selecting library classes or maintaining model-specific execution branches. The browser never loads a model runtime or invokes a hosted inference provider. ## Technology @@ -67,6 +117,13 @@ document. If that document changes while recovery is pending, automatic navigati is cancelled. The activity shelf still reports a running task and opens it on explicit selection; a fresh empty session can recover its snapshot. Recovery must not mutate the running graph or steal the user's editing tab. +The empty-canvas workflow launcher opens after startup completes. If discovery +fails, the startup dialog owns keyboard and pointer input until the user retries +or dismisses the error and opens a fresh workflow. + +Workflow snapshots and portable packages may omit the viewport. Import and +restore retain the current valid camera when it is absent or rejected by the +existing viewport normalizer, without changing graph content or provenance. ## Graph State And Mutations @@ -87,7 +144,22 @@ Mutation logic is split into: The store persists only nodes, edges, and viewport under `modiff.flow`. Runtime, history, and in-flight state are not persisted. A legacy `reactflow` key is migrated when present. -Encode Inputs uses the ordinary node surface. Supported inactive image-encoding +Native Delete uses `removeElements` in one history transaction, including selected +nodes, descendants, incident edges and separately selected edges. The existing +Block deletion checks run before removing any selected wires. One Undo restores +the complete graph; a rejected structural deletion leaves the selection intact. + +Single-action whole-pipeline generation uses its ordinary node card. Loading a +workflow with an authored pipeline field set restores the registered actions +for those fields and retains the selected contract's field inventory. +Presentation changes preserve the ordered executable graph. + +Built-in grouped stage cards use the ordinary node surface with the existing interface, +bindings, and graph lowering. A saved expanded stage restores as a single card. +Shot groups and reusable Blocks keep their composition controls. Inside an +authored Shot, the generated image input, encoding and generation stages use +ordinary cards. The generated assembly stage uses the same surface. Older +unmarked user Blocks retain their saved form. Supported inactive image-encoding sockets are derived read-only from backend operation contracts. Connecting one uses `encodingNodeConnection` and the existing route planner to materialize real stage endpoints and commit the selected wire in one history transaction; it does @@ -140,6 +212,56 @@ enumeration stays in the popup's lazy `nodeConnectionSearch` module, outside canvas startup. Expert's Stages panel also resolves connected starters from `POST /operations/starter`. +An explicitly validated evaluation runtime can publish a separate, bounded +`evaluationAuthoring` namespace for Custom memory authoring. Its private profiles +join the same generic model picker and starter path. A reviewed identity can have +internal presentation typing for future templates without becoming a runnable +Studio capability. Explicit contract-only and display-only records must retain +false Automatic/template/Gallery/live flags and no published execution profiles, +runnable modes or qualified modes. The separate private authoring namespace +remains authoritative; presentation typing does not change its starter or grant +qualification. +The parser rejects any collision with an existing public pipeline profile, and +selection and Apply both require Custom memory. Ordinary runtime discovery omits +the namespace and retains the existing choices. + +Compatible evaluation models remain visible while Automatic memory is selected, +with a Custom-memory requirement. Searching by model or repository ignores +spacing and punctuation. An explicit button changes the current workflow to +Custom; browsing, cancelling, or changing memory never selects or runs a model. +Optional evaluation `adapterAuthoring` uses the existing immutable policy parser +and requires current verified runtime metadata, the exact selected task/profile, +and all declared loader controls before normal Add/Edit LoRA is available. It +does not expand the public model union or grant Auto support. Optional per-task +`authoringRecipes` select a current declared starter; its enhancement offer is +attached after ordinary media/output completion without enabling a provider. + +Model Setup's model/task change resolves these offers from the exact selected +public or evaluation descriptor. A public offer does not require Custom memory; +evaluation descriptors retain that separate guard. Preview and Apply preserve the +declared recipe identity, and changing models only attaches the enhancement offer. +Enabling its provider remains an explicit action. + +An optional per-task `rawAuthoringRecipeId` declares a distinct raw-prompt +alternative. Explicit Enable selects that exact alternative for a null layout, +or the original declaration for authored regions. Both fresh responses must +declare identical parent operations, bindings, values and edges. Selection and +Enable commit together; existing bindings and explicit structured recipes are +not migrated. Missing, malformed or changed metadata refuses without mutation. +Optional `rawAuthoringRecipeChoices` adds at most four unique, labelled raw +alternatives, including the declared default. The pre-Enable selector changes +only a local choice. Enable revalidates the exact selected recipe; an explicit +raw choice refuses a structured layout instead of selecting a different provider. +The existing parent identity retains that choice through Disable and reload. +These choices grant no runtime installation, resource fit or model qualification. + +Static registered fields render versioned option availability from the current +node registry, including after a cross-platform import or registry refresh. This +projection preserves saved values, labels, membership and graph/recipe hashes; +an imported-only or ambiguous option remains unavailable. Dynamic actions and +`optionsSource` retain their existing authority and consent. No registry refresh +changes an authored selection or performs an install. + The backend supplies ordinary node schemas and reviewed connections; the client assigns canvas IDs through the normal node factory. The result is a normal graph, with no template receipt or additional execution representation. Users can build @@ -147,13 +269,36 @@ the same stages manually with native typed wires and add an output Preview, Save or Export node. Plain scalar aliases such as `text`/`string` and `bool`/`boolean` match in native connections; media collections and model objects remain distinct. +Fresh lyric-video templates use the declared audio starter plus their actual +visual sequence, composition, upscale, lyric overlay, timeline fit and AV export +nodes. The soundtrack's stored branch prompt overrides the advisory root prompt +at creation, and the primary audio task selects its immutable model independently +of the final video media type. The new graph has no managed Studio binding, so +later finalization and reopening cannot reapply the root prompt or a historical +forced-math policy. Ordinary node edits remain authoritative. Existing managed +documents and registered definitions retain their original contracts. This +authoring behavior grants neither Auto admission nor model/output qualification. + `operationAuthoring` is a versioned, advisory annotation on those ordinary nodes. It stores the selected operation, initial visible defaults and retained unsupported settings. It does not grant execution permission or replace node params. + +When an exact video owner publishes both video-only and synchronized AV operations, +the backend starter selects the one generation operation in its reviewed source +recipe. The wire parser accepts only the bounded owner-plus-one-consumer partition, +with the same declared pipeline socket and a concrete video output. Both operation +contracts remain available; a new starter does not imply two generation runs. +Across an explicit implementation change, a renamed media output can retain an +external connection when both contracts declare media, the former node has one +compatible media output and the selected implementation has one best destination. +Multiple compatible results remain a review issue. This does not infer tensor, +model-weight or custom-code compatibility from a shared type. Backend-declared `sharedInputs` bind seed controls of stages that continue one generator. `operationSharedInputs` validates their loader scope and membership; ordinary parameter edits update the group under one history transaction. Export uses one random draw per group and rejects inconsistent literals or input sources. +Untouched random-field controls use the declared default before unwrapping the +stored value, so Run and inspection retain a locked zero seed consistently. New stages inherit the existing shared value; a connected custom source is wired to every member. Distinct loader branches remain independent. No additional execution representation or model-family dispatch is introduced. The lazy @@ -174,6 +319,68 @@ indices only when the backend also declares the path as a selectable option. Reserved/empty path segments, undeclared paths, operation ports and ordinary parameter names remain subject to strict validation. +An optional `layout_conditioning` value uses the built-in `layout` editor only +when its field declares `fieldOptions.layoutConditioning`. Version 1 retains +its original placement/source grammar and declared reference count of 1–8. +Version 2 declares explicit `place`, `relocate` and `remove` actions. Removal +uses a null target box and requires a bound source; placement has no source. +Both versions use normalized XYXY coordinates, at most 32 unique region IDs, +4096 Unicode code points per description and a 64 KiB compact UTF-8 JSON limit. +Text is preserved, including whitespace; unpaired surrogates are refused. +Raw mode stores `null`. Edits use normal parameter history and Block bindings +and never rewrite the prompt field. The backend owns effective serialization. + +Source tools remain disabled unless the selected version-2 descriptor declares +`supportsBoundSourceRegions: true` and the operator reads an actual encoded +reference summary through the ordinary cache route. The string output +`layout_reference_summary` on the actual Image Encode supplier is joined to its producer's persisted task, attempt, +run-input hash, workflow and exact current source ancestry. The comparison uses +durable signal declarations: runtime `signal.value` payloads +are discarded from both live and saved ancestry, matching task persistence. +Source values, wiring, signal declarations and task identity remain checked. +Cache reads expand the same executable graph as Run and use its canonical leaf +IDs for ordinary, visual-stage and expanded Blocks. A persisted snapshot may +omit rendered children; those leaves are resolved only from the validated +execution projection, never by guessing presentation aliases. +A genuine encoding +cache hit may retain its earlier producer identity; the client does not relabel +it as a fresh computation. Image Encode can publish a new summary independently +of a Prompt that correctly refuses stale source IDs; re-encode that source branch, +read its summary and explicitly rebind the saved region. The compatible Prompt +summary remains available, but the widget reads the actual incoming supplier. +The summary describes up to ten ordered references, +their content identities and original/processed dimensions. It is local display +context, not an opaque execution receipt. Source/owner/graph changes mark it +stale, and each saved source region requires explicit rebind to a current ID. +An explicit region edit may retain identical already-stale siblings so several +regions can be rebound, removed or reordered one at a time. Every changed or new +region must satisfy the current verified source context; the complete layout +retains its error until all saved sources agree. Whole-layout validation and +backend execution never use this authoring-only exception. +The backend independently verifies the same process-local receipt in Prompt and +Denoise against actual images, processed tensors, owner and tensor versions. +Imported counts or summary strings cannot grant execution authority. A declared +editor does not grant model support, resource fit or runtime readiness. + +Generic workflow model descriptors can also carry optional immutable artifact +inventories. Model Manager keeps the existing native selection as its default; +`weightFormatSelections` adds up to two exact FP8R/NVFP4 repository, revision and +file selections through the existing Install/Repair action. These rows require +the existing public execution-profile and selected pipeline-support joins. +Private or unavailable profiles are excluded even if raw capabilities contain +download metadata. Installed files are labeled **Installed**, separately from +execution support, qualification and required-runtime status. This discovery +path does not extend the legacy Studio model union or infer Auto/template grants. + +The same generic inventory may declare `defaultWeightFormat` as `native`, +`fp8r` or `nvfp4` for new drafts. A non-native default must match exactly one +declared format selection for the capability's own repository and sole immutable +revision. The ordinary backend starter supplies the resolved field value together +with its selected profile's size and compute dtype. The client validates the +declaration and copies that starter through the existing node factory. Discovery, +opening saved graphs and Run never apply these creation defaults over authored +values. Defaults do not establish installed files, resource fit or qualification. + Backend-resolved operation schemas suppress mount-time selector initialization and automatic signal actions that would replace exact-profile metadata with generic family defaults. Signal transport, connection-driven control visibility @@ -203,6 +410,27 @@ write occurs. Task/model replacement keeps fresh runtime IDs where required; collapse/expand does not invalidate execution identity. Shared input edits and export resolve the same connected loader scope across group boundaries. +The same projection supports direct audio Model Setup and native audio +decode/export output groups. Audio Output derives its wording and preview from +the contained media contracts and uses the existing `UIAudioField`. The ordinary +node shell reserves the shared audio minimum width for declared Block previews +as well as ordinary `ui_audio` parameters. Whole-pipeline audio generation stays +integrated, and transcription retains text output. Backend-published selected +adapter policies use the same strict profile/artifact/task join for image and +audio; authoring permission does not enable Automatic memory planning or qualify +model execution. See [audio workflow stages](audio-workflows.md). + +Fresh ordinary video drafts group their adjacent native sampler and decoder as +Generate before grouping Video Output. An intervening upscale or an independent +soundtrack keeps its own operation and feeds a separate file exporter. The +encoded-frame alternative validates the same owner and conditioning chain when +decoding must remain inside the native generator. Input file pickers retain their +own media previews; those are distinct from execution output preview bindings. +Image Input, Video Input and Prepare Mask retain their actual typed source and +preparation nodes. Finite scalar/media union boundary types such as +`video|str|image` preserve every native alternative in the canvas and both +validators; nested collection expressions retain their exact identity. + New eligible starters opt into grouping; saved workflows require an explicit group action. Complex manually nested/mirrored interfaces fail closed during automatic adaptation, with an explicit editing instruction instead of data loss. @@ -213,6 +441,87 @@ still owns values, interfaces and execution. Inspection is read-only; Separate stages is an explicit undoable structural edit. The interface inspector includes visible optional encoding sockets and labels their deferred stage preparation. +Fresh eligible native image drafts present **Model Setup → Encode Inputs → +Denoise → Image Output**. Encode Inputs contains its actual encoding and Guidance +leaves. Its Guidance disclosure hides controls only; the backend-declared Enabled +setting changes execution. A route without Guidance has no empty Guidance section. +Combined input groups use presentation provenance `modiff.visual-stages.v2/inputs` +so switching to a route without Guidance and back retains this layout. The graph +and executor still use the existing Block V2 contract. Historical v1 groups retain +their separate layout until the user selects **Combine encoding and Guidance**. +Combine and Separate each commit one history transaction. Combine creates a new +workflow-local definition from the current leaves; it never writes saved library +definitions. Current values, control labels, seals and explicitly removed controls +survive the conversion. Unsupported integrated or whole-pipeline tasks retain their +actual operations; required media and additional branches remain visible separately. + +Image Model Setup, Prepare Mask and Image Output use that same ordinary +node shell and `BlockInstanceV2` contract. `visualOperationGroups` selects only +existing eligible leaves: a loader with connected built-in descriptor/configuration +utilities, an exact Load Image/Outpaint Canvas pair feeding both image and mask +to the same masked consumer, or a declared image decoder plus its direct previews. +Fresh native image drafts wrap a single eligible loader as Model Setup and its +decoder/preview as Image Output. Whole-pipeline previews and unrelated/shared +modifiers remain external. Prepare Mask remains an explicit optional grouping. +Explicit stage actions leave other instances untouched and commit one history +transaction; opening saved documents does not opt into new groups. Output preview bindings use the existing V2 +preview inventory and backend output-slot authority. Model Setup's projected +loader resolves back to its unpacked runtime owner for the complete ordinary +workflow planner, rather than adapting only the wrapper's implementation. Values, +configured interfaces, immutable reusable snapshots and explicit save/separate +behavior keep their existing authority. For a pinned Hub image stage owner, the +model-change preview resolves the source profile and matching immutable revision. +It describes replaced starter connections as rebuilt and still flags an authored +wire whose target disappears. +Model Setup's Adapters controls follow the real ordered adapter wires. The Add +dialog keeps a local draft until a populated local selection or immutable Hub +selection is accepted; blank rows never enter the executable graph. Hub adapters +require an exact commit, contained Safetensors weight filename and expected SHA-256. +Add, Remove and Move use the same graph transaction and Undo path. Native +`previous_loras` chains and whole-pipeline `pipeline`/`output` chains keep their +declared sockets and backend validation. Shared descriptor/configuration suppliers +stay outside the wrapper; connected scalar suppliers and unrelated branches remain +intact. Sealed controls cannot be changed or removed by these actions. A later +whole-pipeline adapter cannot replace and unload earlier adapters silently. +Current selected-profile `adapterAuthoring` metadata can grant image adapter +edits for an exact task, immutable base pair and registered adapter transport, +independently of aggregate capability and qualification flags. The execution +profile parser validates its bounded schema; the permission resolver rechecks +the current operation, profile, selectors, pins and registry before each edit. +Absent policy retains canonical capability restrictions; malformed or mismatched +policy does not fall back. Add checks the declared owned-row limit separately +from permission to edit or reorder existing rows. Structural inspection and safe +Remove can handle an existing bounded chain without granting new authoring. +Other ordered-chain callers retain their legacy limit. This policy does not +change the effective graph, runtime adapter validation, Auto admission or +installation consent. +Optional groups retain ordinary type-inferred scalar editors even when registry +fields omit `display`. An empty or suppressed field label uses its field name +in the explicit interface; the original leaf field and value remain unchanged. +`visualOperationGroupProjection` contains the ordinary renderer/store's +read-only projection and shared-value planning. Structural grouping stays in +the deferred `visualOperationGroups` planner; Guidance's asynchronous schema +edit loads regrouping only when requested. Public graph helper exports and +the same graph transaction remain unchanged. + +`operationComponentBundle` adds explicit **Use component bundle** / **Expose +components** actions through those same workflow stage controls. It consumes +parsed `semantics.suppliedBy` declarations and exact scoped component members; +it does not dispatch on model names. The first backend declaration is native +Qwen text to image. Existing loader-to-stage component fanout is replaced only +where the aggregate provides those exact inputs, preserving loader and stage +IDs, creative controls, the separate Guider, and unrelated branches. Independent +suppliers, modifier paths, literal overrides and alternate aggregate sources +leave the entire consumer's raw path unchanged because static type compatibility +cannot prove the backend's sealed component identity. Breakout restores raw +connections without replacing explicit inputs. Required-input/fix projection uses +`componentBundleInputs`; backend object/role/owner/generation checks remain the +execution authority. Each action commits the existing full-graph transaction, +including visual-stage unwrapping/restoration and Undo. This prototype reduces +Qwen T2I's four loader component edges to three, and leaves template defaults and +previous documents unchanged. No alternate executor or hidden implementation +collapse is introduced. + Guidance interface edits record explicitly removed field bindings in optional `presentation.removedControlBindings` on the instance. The bounded, unique `{nodeId, fieldId}` list is visibility metadata, not an execution toggle. Removing @@ -229,6 +538,39 @@ loaders for typed required media inputs before grouping. It reuses sources only for equal media roles, keeps masks separate from alpha-mask outputs, and reports missing/incompatible loader definitions. It does not touch existing documents, invent media for text-only routes, or infer a tensor from a path-only field. +The declared `mask_composite` task belongs to the Image category, so its fresh +draft includes separate ordinary image and mask loaders and a Preview. Its image +loader accepts the ordered background and foreground inputs; the mask loader +supplies the explicit mask pixels. Task categorization grants no runtime authority. +Execution-spec bindings distinguish empty text (`empty`) from an empty component +selection (`emptyList`). Multiple-choice component fields retain arrays in fresh +drafts and canonical exports, including when quantization is disabled. Backend +validation remains authoritative for every selected component. +Server-reported runtime cache IDs remain transient view metadata. Block layout, +control, child measurement and internal wiring reprojection must derive cache +flags again from those IDs and the current exact graph, including the first +collapsed minimum-height measurement after refresh. A restored tab +reprojects them against its current exact owner graph, so reconnect cache state +survives durable snapshot restoration. Native execution records the actual leaf +ID; cache release retires the IDs acknowledged by the backend. These IDs are +never saved as workflow authority and do not establish resource fit or reuse. + +Service and CLI tasks do not need a Studio run context to refresh this transient +cache view. Their successful execution and terminal events request the backend's +bounded `GET /cache` roster, matched by exact runtime IDs. The response must still +belong to the current connection and backend identity; newer cache writes, +release requests and acknowledgements retire older reads. This reconciliation +does not grant progress, parameter, preview or document ownership. Those updates +retain the existing task, attempt and workflow checks. + +The media attachment source picker retains the exact node/port values and graph +ordering. Friendly node/field labels add the nearest upstream declared model +repository or local-source context; remaining identical labels use visible branch +ordinals. Read-only Block projections resolve effective controls and exact output +bindings, with immutable instances cached. Unresolved retained crossings add no +display context and remain available for ordinary repair. This context is +presentation only: all existing source choices, stale-selection checks, task +planning, ownership and cycle validation remain unchanged. Readiness also checks required file pickers in the selected executable closure. A connected loader output does not satisfy an empty required source file. Current @@ -256,6 +598,13 @@ inferred to be missing. A compatible enabled incoming connection satisfies this presence check; file existence and actual runtime objects still belong to backend validation. +The ordinary Process Image palette facade resolves Image/Mask requirements from +the cached backend operation contract for its current pipeline and operation. +Graph Fix and required-input readiness share that read-only resolution: adjustment, +tiling and stitching do not demand a mask; Mask Composite still does. Inspection +preserves saved fields and wires. Unknown, computed or ambiguous task selections +retain the existing inspection behavior rather than being declared optional. + `blockControlConnectionsV2` resolves root and nested control aliases against the owning effective graph and external public-input wires. Connected body controls show their saved fallback read-only, with the source node/port and an explicit @@ -271,11 +620,19 @@ This is not an error-suppression mechanism or a claim that all observer loops ar resolved. Selection-only toolbar code loads on the first actual selection and then stays mounted so focus changes do not discard open dialog state. +The selection toolbar measures the activity overlay within its own canvas +workspace when positioning its controls. An off-screen selection must not dock +over the activity disclosure; opening the list must also leave node actions +reachable. Activity mount/removal and dimensions trigger a scheduled layout +read. Observer-driven state updates stay outside ResizeObserver delivery and +are discarded on unmount. These DOM layout markers carry no workflow state. + Running from a V2 Block root or internal Block selects all enabled terminal branches in that semantic scope and their contained upstream dependencies. -Outside suppliers are removed before validation and lowering, including public-input -suppliers; stored internal fallbacks remain available. Whole-workflow execution keeps -the crossing wires. Missing +Wired outside suppliers and their upstream owners remain in the dependency closure +before validation and lowering, including public-input suppliers. Disconnected +unrelated owners remain outside selected execution. Stored internal fallbacks +remain available. Missing previews never mean "run the whole workflow". Disabled descendants are excluded; an entirely disabled/non-executable selection produces an actionable error. The representative node used for run metadata still prefers a terminal media @@ -605,7 +962,14 @@ readers reject new declarations rather than silently dropping them. `BlockInstanceV2.presentation.internalLayout` stores each node's compact own box relative to its immediate semantic parent. It must not store a recursively expanded subtree size. At render time the projector measures visible children -bottom-up, derives expanded ancestor bounds with header/right/bottom padding, +bottom-up. An explicit nested-card resize sets that layout entry's optional +`sizeMode: 'compact'`; subsequent moves and DOM minimum-size measurements retain +it, but measurements never create it. Both client and backend reject any other +present value. Moving an expanded frame retains its marked compact dimensions +rather than persisting the derived child envelope. Unmarked entries keep the legacy expanded-footprint migration, +so manual sizes are not confused with historical recursive bounds. This marker +is presentation-only and cannot change graph hashes or execution authority. +The projector derives expanded ancestor bounds with header/right/bottom padding, and shifts colliding siblings without rewriting the saved preferred positions. The same collision solver applies to root-relative (non-hierarchical) Blocks, including standard-pipeline catalog routes. Root-relative coordinates are @@ -697,6 +1061,19 @@ ID grammar. Canvas search shares these catalog entries, filters and factories with the Nodes library. Registered task Blocks appear in normal search; upstream implementation entries and catalog-only structural Blocks require Show implementation nodes. +The Nodes sidebar groups ordinary stages by task and exposes alternative actions +on the same row. Action search uses the backend catalog vocabulary. The Workflows +sidebar groups starters by output, and its layout follows panel width. +Examples search matches individual words across the title, action, model and +repository. Older indexes can provide the model through their example directory. +Saved workflows and drafts use the same keyword matching on their titles and +source labels. +Dragging a typed wire also searches model-specific operation contracts. An +operation or saved stage boundary can supply the pipeline and task when the +user has not selected them. Ambiguous boundaries leave that choice to the user. +A candidate can declare a port absent from its generic registry entry. Selection +resolves the operation, verifies that exact port and direction, and connects it +in one graph edit. An unverified match still requires explicit opt-in. Typed suggestions load `/huggingface/registered-block-interfaces` and match only compiled public ports whose complete route pins agree. Upstream leaf suggestions use the ordinary node factory's declared sockets; containers without public @@ -721,6 +1098,12 @@ entries in a disposable temporary directory and is required by the main validation gates. The hidden dynamic-field compiler is retained only for explicit, receipt-bound legacy V1 migration. +Sealed admission-declared signal identities retain only their exact options-map +branch in compiled definitions; unrelated installed pipeline choices cannot change +the immutable selected contract. Ordinary node descriptors and mutable selectors +retain their full maps, and a missing selected branch or mismatched signal refuses +compilation. + Values stored in a reviewed compiled catalog entry establish the initial `BlockInstanceV2` baseline and MUST start with customization state `unchanged`; they are not user edits merely because the compiler emits them @@ -751,6 +1134,16 @@ executable. It is never an automatic definition update or silent graph reset. - `/model_capabilities` Studio profile compatibility - `/hf_download` install/repair tasks +The shared model cache-status helper matches exact repository IDs. For an exact +revision/file selection, additive backend `observed_selections` metadata takes +precedence over historical `planned_revision`/`planned_files` download receipts. +A complete selected snapshot can be ready even when an unrelated native receipt +is stale or incomplete; a negative or malformed observation cannot fall back to +that receipt. Older backends and artifact layouts without observations keep the +receipt compatibility path. Observations describe bounded file presence, sizes +and managed-cache containment, not content verification or execution permission. +Studio and ordinary graph requirements consume this same result. + The additive `operationContracts` catalog on `/model_capabilities` describes the existing generic Modular stages and task-scoped standard image/video/audio/3D adapters. `src/workflow/operationContracts.ts` validates versions 1, 2 and 3, @@ -836,12 +1229,65 @@ is the single policy selector. Both storage keys and legacy normalizers remain unchanged. A restored workflow keeps its own resource settings while tabs share the global editing preference. +Import, backend hydration and local-storage restore coerce persisted form types +without selecting a new Auto recipe. Authored precision, quantization and offload +values survive even when today's profile recommends another placement. An +explicit model/settings edit can request a new plan; Run still validates the +unchanged document against current backend admission. Restoring values grants +neither resource fit nor execution qualification. +Explicit graph imports preserve the document's normalized memory policy while +inferring their image recipe summary. Raw graph imports also retain each node's +authored device value and default, including mixed CPU/accelerator placement; +the current form device does not rebase them. Summary defaults do not repair +missing or malformed graph fields. Explicit device rebasing remains separate. +Generation graphs with an upscaler or deterministic processing stage infer their +summary from recognized model-loader declarations before standalone processing +fallbacks. Staged video retains a compatible authored task, Encode Inputs prompt, +Denoise frame/settings values and ordinary export frame rate without requiring +Studio roles. Profiles sharing a repository retain matching authored model +context. This is a descriptive summary, not graph validation, resource admission +or permission to rewrite executable nodes; standalone operations retain their +own task summaries. +Passive tab switching, closing, backend hydration and browser reload retain a +recognized saved ordinary image form; +Save As, Duplicate and output Restore retain that form too. These paths do not +replace authored captions, model/task summaries or resource settings from graph +inference, and an unchanged checkpoint does not trigger an autosave. The saved +selected mode remains the existing mirror of the normalized form mode. Managed +and template recovery keep their existing separate rules. Graph inference must +not replace an explicit Custom policy with Automatic. +Missing or unrecognized legacy forms still infer a graph summary, including +output restores before default-value coercion could hide the missing form. +Missing or invalid legacy choices and fresh raw-graph inference still default to Automatic. Graph Fix and Run Issues may open Expert tools without changing execution policy. Older clients can read the same workflow fields but still couple their controls; independent behavior requires the matching updated client bundle. An optional runtime requirement is discovery data, not permission to mutate the Python environment. Template browsing/opening, registry refresh, and Auto planning must remain non-installing. Installation begins only from an explicit user action against a reviewed backend runtime profile, and the client keeps Run blocked until a later backend status confirms the compatible installation. +`WorkflowSetupChecklist` combines base environment, concrete model artifacts, +extra feature packages and system prerequisites. `workflowSetup.ts` exports the +same enabled/selected dependency closure and ordinary modular lowering as Run, +with seed randomization disabled and no graph submission or preparation actions. +It sends this concrete graph to read-only `POST /runtime/workflow-setup`, binds +responses to the active document and backend instance, and discards obsolete +observations. Exact model revisions remain separate; connected model values are +not filled from registry defaults. Unresolved computed selections remain unknown. +Runtime actions reuse the existing consent/job lifecycle below, not a second +installer. Staged installation, restart, verification and active worker status +are distinct. Every required runtime profile needs an exact active match; an +explicit composite alias can satisfy that match. Optional profiles outside the +inspected scope remain available under Show other runtimes, without becoming +prerequisites. Job file counts do not establish exact download-file identity: +follow the existing repository job and prevent duplicate mutations when the +public status cannot prove that row's selection. + +While the current runtime observation is pending, the checklist shows checking +instead of passing a null profile to the setup card. A failed read is unavailable +verification, not evidence that installation is missing. Only a successful current +read supplies profile conclusions. Refresh uses the existing model-index batch +once; that batch already refreshes the runtime and optional-package catalog. + The Setup surface renders install or repair only when the exact profile is `qualified`, `cutoverReady`, and the backend advertises `installActionAvailable`. It sends the profile ID, exact spec digest, and @@ -900,7 +1346,31 @@ account action and install recovery uses the backend's structured error code. ## Websocket And Task State +Node execution `memoryUsage` records carry finite byte measurements or `null` +when a measurement is unavailable (including CPU-only runs). The parser accepts +those null values without dropping the execution event; the cache store preserves +them and the node memory footer/popover displays a dash, not an invented zero. +Measured zero remains `0 B`. Execution timing and phase timing records still +require finite numbers, and numeric strings or malformed memory records are rejected. + +Every welcome refreshes authoritative runtime readiness, including after worker +replacement or package repair. The existing discovery request gate discards older +responses so they cannot restore stale Setup errors after the replacement is ready. +During HTTP recovery, a validated new backend instance also triggers one runtime +read while health is unready. Setup can therefore show repair requirements before +the readiness gate permits reconnecting. Repeated probes for the same instance +do not repeatedly inspect the runtime, and stale connection probes cannot refresh it. + +Fresh executable attention bindings use the authored automatic policy unless a +reviewed candidate explicitly supplies another backend. The disabled registered +compiler skeleton retains its existing metadata identity; qualification replaces +its provisional attention values before enabling children. A CUDA device does +not by itself authorize forced native flash attention. + - `src/stores/useWebsocketStore.ts` owns connection/session identity, reconnect state, and loop timers. +- Retiring a pending socket detaches application callbacks immediately and closes + it after its handshake. Open sockets close immediately; retired sockets cannot + update a replacement connection or start recovery work. - `src/components/WebsocketProvider.tsx` connects the store to React lifecycle. - `src/stores/websocketMessageHandler.ts` validates/routes runtime messages. - `src/stores/useTaskStore.ts` owns the queue snapshot, current task, count, and progress presentation. @@ -935,6 +1405,12 @@ an empty request or changing controls in the incoming custom workflow. ## Studio Domain +Registered Block planning projects declared speech controls, including audio, +language, timestamps, chunk length and stride, into the corresponding task +form fields. Single-file media controls project a native one-file upload list +to its exact path without changing the instance. Multiple or substituted files +remain subject to backend authority equality and filesystem validation. + The `src/studio` directory contains domain logic rather than one monolithic component: - `types.ts`: forms, modes, model profiles, graph bindings, tabs, outputs, templates, and run context @@ -952,7 +1428,7 @@ The `src/studio` directory contains domain logic rather than one monolithic comp - `templateReadiness.ts`, `templateExactness.ts`, and `templateQuality.ts`: publication/readiness rules - `workflowInference.ts`: infer Studio context from imported/custom graphs -`src/stores/useStudioStore.ts` persists stable authoring state under `modiff.studio`: form values, prompt/snippet data, imported assets, workflow tabs, app-mode configs, blueprints, and pinned inputs. Output history and preview-slot state are backend-owned, hydrated from `/studio_outputs`, and deliberately excluded from local storage. Live graph binding, graph-finalization status, Auto request state, and active run contexts remain volatile unless restored from a package/output snapshot. +`src/stores/useStudioStore.ts` checkpoints stable authoring state in page-owned `sessionStorage` under `modiff.studio`: form values, prompt/snippet data, imported assets, workflow tabs, app-mode configs, blueprints, and pinned inputs. Output history and preview-slot state are backend-owned, hydrated from `/studio_outputs`, and deliberately excluded from browser checkpoints. Live graph binding, graph-finalization status, Auto request state, and active run contexts remain volatile unless restored from a package/output snapshot. See [Browser page workspace checkpoints](#browser-page-workspace-checkpoints) for legacy recovery and closed-page limits. `src/studio/workflowFileSave.ts` and the workflow request helpers persist named snapshots through the backend workflow API. Local tabs remain the editing surface; a successful explicit Save creates or replaces a backend library file, @@ -962,8 +1438,36 @@ Tab arrangement is browser-local presentation. `moveWorkflowTab` resolves source and destination IDs against current state and changes only the array order. Pointer previews stay outside the store until drop; structural tab changes cancel an in-flight gesture. Backend document-sync signatures are order-independent. -The bounded local checkpoint selects active/dirty/recent tabs but preserves their -original relative order, both when writing and restoring older checkpoints. +The local checkpoint selects at most twelve active/recent saved tabs and retains +every dirty tab, preserving their original relative order both when writing and +restoring older checkpoints. Unsaved edits must not disappear merely because +more tabs are open. A failed browser storage write leaves editing usable and +shows a persistent warning to Save or export before refreshing. Flow, settings, +and Studio use the shared `checkpointStorage.ts` adapter so failed writes cannot +abort canvas edits or panel actions. The warning clears only after every failed +storage key has recovered; a successful unrelated write cannot clear it. +Background sync durably saves +recovery drafts on the backend; explicit Save places the current document in +the named workflow library. Neither can be assumed to have succeeded while +its persistence request is failing. + +An unchanged canvas checkpoint preserves the document's dirty marker and edit +timestamp. Autosave rechecks the exact backend-owned document signature when its +shared write chain reaches dispatch, so an acknowledged explicit Save is not +followed by a duplicate PUT. Newer edits and a rejected save still require their +normal persistence request; acknowledgement and hydration guards remain intact. + +Startup hydration captures each originally clean document before its backend +read. A delayed canvas checkpoint may add passive connection flags and an empty +preview declared by the current registry; these alone must not turn the older +browser checkpoint into an authored update over the newer backend document. +The startup merge compares that clean baseline within the same canvas and +revision context. It recognizes only absent/false connection flags and exact +registry-declared empty image previews; every other value, form, intent, layout, +wire and definition stays exact. This comparison does not rewrite persisted +snapshots or apply to own-save acknowledgements. Restored dirty documents, +edits made during the read and active runs retain their existing protections, +and a tab closed during the read is not reopened by its response. `src/components/StudioPanel.tsx` is a UI composition layer over those modules. It must not become the owner of graph execution, network parsing, or long-lived domain state. @@ -1122,10 +1626,33 @@ dialog with the backend explanation and a fresh-Run recovery path. This feedback stays visible until dismissed; it does not fabricate a task or failed generation. Late responses cannot open it after a workflow, graph or memory-policy change. +Run-blocking diagnostics retain their exact Studio field or backend-declared +optional-runtime alternatives when available. **Edit setting** and **Choose +supported task/model** reveal the actual Studio control; **Review runtime** opens +its Setup entry; **Review Auto options** opens the read-only workflow resource +inspector. Navigation does not install packages, submit a graph, change settings +or grant Auto authority. Unsupported runtimes remain explicitly unavailable. + +`runRecovery.ts` binds each displayed issue list to its workflow/canvas/form +epochs and durable graph inputs. Recovery checks that origin again at the click, +rejecting stale actions without treating progress, selection or node positioning +as edits. `useRunRecoveryFocus.ts` owns bounded, volatile focus requests: it opens +existing disclosures, waits for the requested control or runtime metadata, and +cancels on panel departure or changed document. Reload cannot restore a pending +focus request. Runtime failure history retains its separate task/run ownership. + Session activity merges queue history by execution timestamps before applying its 30-entry limit, retaining running work ahead of waiting tasks and finished history. Repeated or reordered history snapshots must not evict a new submission or promote old runs. +The activity shelf can fold into its heading without dismissing notifications. +Its disclosure is volatile component state, independent of workflow data and +task ownership. The heading retains active-work status while folded; explicit +toolbar download navigation opens the list. Clear and per-item dismissal keep +their existing meanings. Collapsing must preserve graph values, positions, +viewport and all active, failed and finished records; test actual pointer access +behind the overlay as well as keyboard disclosure behavior at scaled viewports. + Saved User Nodes retain model/prompt/settings provenance independently of registered-route authority. For an unambiguous Modular Diffusers User Node, `blockRunFormV2.ts` reads its expanded executable loader and parameter fields @@ -1166,6 +1693,12 @@ being filled from the current filesystem or a later backend response. Fields must preserve `data-key`, `modiff-field`, `nodrag`, `nowheel`, hidden, disabled, and backend-action contracts. Backend-provided styles are sanitized to safe layout properties by `src/theme/modiffStyle.ts`; visual styling from dynamic payloads is not trusted. +Ordinary numeric controls keep incomplete typing in a local text draft. Blur, +Enter, step buttons and completed drags commit the bounded finite value as a JSON +number, including zero and precise floats. Arrow keys adjust the draft until +commit; Escape restores the prior value. Historical imported numeric strings +remain readable; merely opening a field does not rewrite the saved document. + The backend isolates reviewed nonqueued generic Modular loader/schema callbacks from live model owners. Their existing `/fields/action` and WebSocket messages are unchanged; no client model-family dispatch or extra execution path is needed. @@ -1231,6 +1764,24 @@ model object or credential is captured. Receipt identity cannot be reassigned by history enrichment. See the paired backend API reference for limits and omissions; receipt presence is not output-quality/publication proof. +History and workflow packages preserve the bounded decoded RGB input projection +for reviewed image edits and the typed audio input observation for speech +recognition. The Edit projection identifies the pixels supplied to Diffusers +and their connected source. Speech control accounting records the dispatched +timestamp, chunking and task arguments separately from the audio identity. +Missing observations in older receipts stay missing. The canonical evidence +reader checks saved inputs, native outputs and the pinned recipe before +accepting a private execution record. + +Optional `summaryScopeVersion: 2` keeps builtin LoRA/adapter descriptor fields in +their original node records while excluding them from the primary-model summary. +The parser recomputes summary, ambiguity and omissions with the same exact builtin +identities as the backend. Other primary owners and custom lookalikes remain +subject to ordinary ambiguity checks. Unknown versions are rejected. Without the +marker, legacy all-node aggregation remains unchanged, including a historical +adapter/base revision ambiguity. Refresh, output packages and history retain the +marker; parsing does not rewrite old receipts or prove that an adapter was applied. + `update_value` messages that match recognized output fields are attributed to the active run context. The client stores a bounded output view and synchronizes through `/studio_outputs`. A backend preview slot, scoped by workflow/node/field, is the authority for the main preview: an accepted new run marks the slot pending, a generated output promotes its durable output ID, and tab changes or browser refreshes do not reclassify it. The Previous strip excludes that ID. Saved canvas values and current-run heuristics are compatibility fallbacks only when talking to an older backend that has no preview-slot contract. An output can carry: @@ -1246,6 +1797,16 @@ Encoded video measurements are retained per media item as `mediaMetadata` with ` Gallery restore creates a workflow tab from the snapshot. Rerun recomputes current readiness and Auto state before submitting; persisted output metadata is not blindly trusted as current runtime proof. +Gallery and Previous previews preserve declared text and JSON output types. Strings +display literally; other captured values use formatted JSON, including `0`, `false` +and `null`. React text rendering keeps markup inert in cards and the shared text +viewer. History parsing preserves explicit captured null; only absent values keep +the legacy URL fallback. Gallery's text/JSON download fetches the original backend file without +reserializing it; Previous and viewer downloads export the displayed text. PNG +packages, image overlays and Send to edit are unavailable for text/JSON outputs. +Metadata packages, favorites, history identity, workflow restore and rerun retain +their existing contracts. + For images, Gallery uses decoded media dimensions for the output-size label and reports captured input dimensions separately. Reference-driven edit geometry may have no explicit width/height call arguments. Do not infer those missing inputs @@ -1259,6 +1820,21 @@ their separate encoded-image input contract. Workflow packages are JSON. Image packages can also embed the `modiff.workflow` metadata key in PNG text chunks. Imported packages must be parsed/coerced at the boundary before they affect stores. +Studio's custom graph summary reads the current lowered graph on import and +reopen. A single declared model owner with literal selectors can use the +backend display label for its exact pipeline, profile and repository. A missing +or conflicting catalog label falls back to the declared pipeline. Model +references from several nodes or unresolved selectors retain the general graph +summary. A workflow share export also records that model identity in the +portable summary from the same captured graph. Legacy Studio form validation +and recorded output restore data keep their existing contracts. The portable +summary never rewrites executable nodes or attaches a managed Studio binding. + +Gallery's PNG package export preserves existing PNG image bytes and converts +other decodable image formats, including JPEG and WebP, to PNG before embedding +workflow metadata. Conversion uses the browser image codec and rejects images +larger than 64 megapixels. Decode or encode failures remain visible export errors. + Expert's **Export → Service package** lazily loads `ServiceExportDialog`. It reuses TopBar's existing Block/Modular lowering, checks the captured workflow context, and asks the backend `/service_package` boundary for supported scalar inputs and @@ -1343,6 +1919,16 @@ and step counters update their normal task surfaces without revalidating the entire Block graph or rebuilding its Fix plan. Resource snapshots remain a separate invalidation signal, and changing the selected workflow rechecks queue ownership even when its graph is otherwise unchanged. +Explicit null telemetry clears the previous phase's status fields. Terminal +activity shows the final status and late progress cannot replace its archived +name, percentage or phase. + +Run Details can offer Retry Decode when the backend confirms a saved denoising +checkpoint for that failed run. Submitting it opens a new run in the normal +queue and preserves the original model placement and VAE tiling by default. +Where the backend enables the option, a user may explicitly turn on VAE tiling +for that retry. An expired or unavailable checkpoint leaves the failure details +open with the backend's reason. - `scripts/*.test.mjs`: unit/contract tests for graphs, templates, requests, Gallery, styles, and coordination - `tests/e2e/studio-mocked/`: deterministic browser coverage with mocked backend routes @@ -1389,6 +1975,27 @@ Do not relax generic input validation to accept an image file adaptation on a video loader. The focused regression exports both creators with only their required media paths supplied. +Helios Base, Pyramid, and Pyramid Distilled expose the generated video file +on the Image-to-Video and Video-to-Video Block boundary. Source width and +height remain independent outputs and describe the loaded input. The rendered +preview still comes from the same Video Export action. Saved instances retain +their original immutable graph and public sockets. Auto recognizes the exact +prior catalog definitions and applies the same graph, interface and resource +checks when those instances reopen. + +The registered Cosmos 3 text-to-image outputs appear as Image on the +canvas. Wav2Vec2 and Whisper text outputs appear as Transcript. These +labels are presentation defaults for the exact registered output +descriptors. Editing a port label overrides the default. The displayed +name leaves the saved identifier, type, binding and definition hash intact. + +The four registered Cosmos 3 Omni routes whose standard decode container +has exactly one decoder display an ordinary Decode Latents stage. The stage +projects every decoder socket, including the unwired Latents and Output Type +inputs. Inspect Implementation shows the original decoder. Audio branches +and customized container interfaces retain their own expandable views. The +projection leaves the stored hierarchy and execution graph intact. + Running from a generic User Node root resolves to a terminal media preview inside that specific expanded instance (or its first terminal node when it has no media preview). Both the store export and run coordinator use this @@ -1413,21 +2020,343 @@ without changing graph values or execution ownership. ### Recognized graph tasks in output history `resolvedExecutionInputs` can carry backend `graphTasks` alongside captured call -arguments. The client validates each owner against the receipt's captured Modular -loader and model identity. A unique supported task updates the output label while -leaving its saved form untouched. Legacy receipts remain readable; incomplete or -ambiguous graph recognition does not invent a task. This metadata grants no +arguments. The client validates each owner against its captured execution class: +Modular loaders, whole image pipelines, Transformers depth/caption loaders and +built-in image processors retain their existing node contracts. A unique supported task updates the output label while +leaving its saved form untouched. Gallery labels a receipt with absent, null or +conflicting task recognition as **Task not uniquely captured**, rather than using +the saved form's task. Only outputs without a consumed-input receipt retain their +historical task label. This metadata grants no execution or resource authority and adds no frontend model-family dispatch. -History model labels and Gallery filters also use the validated captured model -identity. Registered identities reuse existing display labels; custom pipeline -identities remain distinct, and missing or ambiguous evidence is explicitly +Legacy whole-image imports with presentation roles and no explicit managed receipt +retain ordinary graph authority. Import preserves their executable values and +wires instead of synthesizing a managed execution specification. Explicit or +invalid managed receipts continue through their existing validation. + +History model labels and Gallery filters use the validated captured model +identity. A readable catalog label for a generic pipeline requires a single +observed loader with a matching published repository and immutable revision. +Conflicting or missing catalog labels keep the captured pipeline name, and +Gallery filters keep their canonical model keys. Output packages include an +observed model owner in their portable summary while preserving the recorded +legacy restore form and receipt. Missing or ambiguous evidence is explicitly uncaptured. Legacy outputs without receipts keep their historical labels. Finite, safe decimal strings from native controls can be displayed as numbers without rewriting the receipt or saved form. This presentation conversion never merges conflicting captures or fills missing values from form defaults. +Versioned deterministic operation descriptors (`Builtin*OperationV1`) resolve +to their existing built-in presentation profiles only when the validated receipt +contains the exact native processor owner and matching summary identity. Their +source is the versioned `builtin://` operation contract, not a Hub model inherited +from a form. Without a graph-task declaration, a unique supported task can be +displayed from complete native media call controls; missing, conflicting or +unsupported controls remain uncaptured. Native receipts and historical forms stay +unchanged through history, output packages and reload. Captured outputs with no +prompt or model repository never borrow those fields from compatibility defaults. + Block preview projections retain source-field artifact metadata only when its URL and available task identity match the current instance media reference. Older cached artifacts stay in the immutable source snapshot but cannot override a newer rendered output, including after save/reload or explicit legacy conversion. + +V2 preview fields resolve their declared, owner-bound source to the canonical +execution node and output field before reading the active workflow's current +preview slot. A ready slot supplies the complete ordered media collection; +pending or failed slots retain their current-run status. The exact-task scalar +reference remains the saved fallback when no current slot exists. This applies +to collapsed and nested previews and older definitions that expose a declared +output preview as a control, without changing their saved graph or interface. + +Durable Block text previews display the text value from the exact task and +field, rather than the retained `.txt` download URL. Only an explicit current +preview slot for the active workflow can advance the preview to a different +task. New Block creation excludes output preview fields from editable controls; +existing saved definitions remain intact. Legacy preview controls also project +the matching instance preview and cannot display stale source artifacts. + +Queue rows and tooltips give completed/cancelled/failed states priority over +retained progress messages. Failure diagnostics remain visible, including for +older backend receipts. + +Runtime Auto resource updates are applied only after the websocket handler +checks the active run's ownership. Their current-value comparison uses the pure +expanded-leaf export with seed randomization disabled; it never requests fresh +ancillary execution authority or submits that snapshot. Connected resource fields, +newer literal edits and conflicting shared Block controls continue to reject the +update. Successful patches retain one Undo transaction. Actual Run and Preview +still require their exact current ancillary execution scope before export and +submission. + +Ancillary graph readiness resolves the current declaration asynchronously before +the synchronous collector inspects its execution scope. While metadata is pending +the graph shows Preparing; failed verification blocks Run with reload/reopen +guidance. Consumers share a display-only witness tied to the complete durable +graph, active workflow epochs and current registry/operation metadata. Stale +requests are aborted and cannot replace the current tab's result. Ordinary graphs +remain synchronous and request no ancillary metadata. Run and Preview still +resolve fresh declarations, and an unprepared synchronous export still refuses. + +Durable node snapshots treat absent UI state and UI state containing only live +validation/status fields as the same authoring state. This keeps normal run +status updates from invalidating an unchanged Preview. Explicit authored UI +settings, including `false` and zero values, remain part of the source identity; +input, wire, worker and proposal receipt changes still invalidate Apply. + +Reviewed graph transactions clear selection by default, including full model/task +replacement. An in-place action can explicitly preserve selection for same-ID +nodes when its plan declares no selection intent. PUP uses that option to keep +its inspector mounted through request refresh, verification and Apply. A plan +that explicitly selects or deselects nodes still controls selection. Selection +remains transient: it is absent from durable snapshots and does not relax +workflow epochs, graph signatures or Apply guards. + +The additive `append-details-preserve-layout-v1` declaration selects the generic +`enhance_prompt_append_details` operation and one plain PUP generation. Its +version-three `caption-append-preserve-layout-v1` proposal appends the exact native +wording to the exact authored caption with two newlines; the entire authored +layout, including descriptions, remains unchanged. The client independently +checks that composition against the current declared policy, operation, request +hashes and producer before enabling Apply. Native wording cannot contain region +tags, Markdown fences or a table. The UI labels this as appended wording, never +native layout generation or semantic-fidelity proof. Apply stays one ordinary +history transaction; Regenerate recaptures the original request after an +untouched Apply, so appended text does not accumulate. Existing plain and native +structured proposal schemas remain strict and retain their own declarations. + +Public append has separate FP32 and BF16/NF4 identities. The FP32 default and all +older parent DTOs retain their hashes; selecting the NF4 layout choice binds its +fixed provider controls without changing append composition or layout validation. +When a saved enhancement's current metadata is unavailable, Disable has a local +removal-only path: bounded matching parent/child role maps, the two exact built-in +provider/proposal types, their complete expected edges, and exclusive ownership +must all agree. It preserves the current authored pair instead of restoring an +unverifiable original request. Workflow context/signature guards and one normal +Undo transaction still apply. It neither refreshes execution authority nor +rebinds a profile; the ordinary reviewed model-change planner must select the +current public model before a current enhancement can be enabled. + +A source-declared `required_diffusers_provider` binds an execution profile to +one of its declared optional overlays and to an explicit required-now runtime +requirement. Its specification repeats the exact identity as the hash-covered +`requiredDiffusersProvider`. Both legacy specification key sets remain valid +without that extension; omission, a different provider, base delivery or a stale +hash refuses a new provider-bound specification. This declarative dependency +does not hide model choices or grant installation, activation, fit or Auto +qualification. Observed runtime readiness remains a separate backend decision. + +An explicit public execution profile may declare bounded per-task +`authoringRecipes`, including a distinct raw default and labelled raw choices. +Public descriptors and the private evaluation namespace share the same strict +offer parser: every row must belong to its exact profile, pipeline and supported +task, with unique choices and the declared default included. Known Studio model +identities retain those offers through the ordinary workflow picker rather than +discarding them at the legacy presentation boundary. The existing prompt editing +controls consume the same descriptor maps for both sources; public offers do not +receive `evaluationOnly` or inherit private authority. Payloads without explicit +offers preserve their earlier behavior, and public/private collisions still +refuse. This editing metadata grants neither model fit nor execution readiness. + +The optional `layoutAuthoringRecipeChoices` offer adds explicit modes for authored +regions. It includes the normal append default and is disjoint from raw choices. +The descriptor carries these as `layoutPromptAuthoringChoices`; Enable selects +only an exact currently declared identity. A saved explicit mode survives Disable +and reload, while null layout, conflicting raw/layout selections and withdrawn +metadata refuse without editing the graph. Selecting a mode and enabling its +nodes remain one Undo transaction. No model name selects this policy. + +The `constrained-authored-table-v1` mode uses a separate hash-covered +`authoredLayoutConstraint` and the generic `enhance_prompt_constrained_authored_v1` +operation. The client validates the closed source/tokenizer/limit contract and +matches it to the consumed request, exact original row projection, token input +fingerprint and sealed completion. A complete EOS may end at the token limit only +for this explicit mode. Existing plain/append completion rules and key sets stay +unchanged. The raw output hash is part of the existing sealed producer record; +it is not reconstructed from parsed JSON, whose escapes may differ. Apply still +requires the current producer, atomic authored-pair checks and human wording +review. Fixed coordinates, a valid table and `contract_only` metadata establish +neither generated geometry nor semantic quality, Auto or hardware qualification. + +### Template weight storage format + +Optional form and locked-template `weightFormat` selects immutable storage, +independently of compute dtype and diffusion quantization. Missing or native +values preserve historical native recipe hashes. A present unsupported or null +saved/imported value becomes a blocked `null` sentinel: the workflow and its +authored graph remain recoverable, hashes distinguish it from Native, and an +explicit supported selection is required before planning, installation or Run. +Execution and field-edit parsing stays strict. Explicit non-native values +participate in recipe locks, Modified detection, persistence and resource-plan +identity. Managed controls synchronize only inside their existing binding; +ordinary graphs remain authoritative over their own node values. + +A non-native selection needs the current backend's exact profile, pipeline, Hub +repository, immutable revision and format-specific file manifest. Model Manager +uses that manifest, so a native-only installation cannot satisfy the selected +format. This metadata grants no runtime, Auto, model or Gallery qualification +and does not install packages or files during discovery. The legacy managed +Studio form planner still requires Expert for non-native formats. Ordinary +workflow graphs carry the exact `weight_format` field into the complete backend +workflow Auto plan; only that plan can admit a declared format and workload. +Native-only plans cannot be reused as format-specific readiness or hardware-fit +evidence. + +## Browser page workspace checkpoints + +Studio workflow tabs, the active document/form and the Flow canvas checkpoint use +`sessionStorage`, so another app page's welcome/output refresh cannot overwrite +the workspace restored on reload. Settings continue using shared `localStorage`. +When a page has no checkpoint, it recovers exact bytes once from the current +`modiff.studio`/`modiff.flow` shared keys before trying `studio`/`reactflow` aliases. +The page keeps a per-key recovery marker; clearing its checkpoint does not revive +an old shared document on reload. Shared recovery bytes are never overwritten or +removed. Existing document normalization and dirty-workflow retention still apply. +A blocked/full session store keeps live editing usable and shows the existing +Save/export warning; it never falls back to shared workspace writes. Session +checkpoints survive page reload. Saved workflows and server-backed drafts remain +available after app/server restart; closed-page or browser-session recovery uses +saved workflows/exports, with no promise to restore a closed page's unsaved tab +roster. Legacy import can recover only the retained historical shared snapshot, +not values that an older page already overwrote. + +### File-backed audio and video input players + +Load-node players and file-picker previews share `fileBackedMediaPreviewUrl`. +Selected filesystem paths are backend identifiers and go through the managed +`/media/preview` endpoint, including absolute POSIX paths and Windows paths. +Existing browser URLs and bundled public assets retain their normal handling. +Both scalar and picker-array selections project without rewriting saved params; +clearing the selection also clears stale output-backed input previews on reload. +Audio references selected from AV files use the backend's soundtrack conversion. +For a reviewed Gallery video input the player prefers its declared browser-playable +derivative. If playback fails it tries the original and the managed preview of the +local input. Downloads and execution continue to use the source recording. +When a built-in loader includes a dedicated player for the selected file, +the file field keeps its replace and remove actions. A distinct retained result +and a newly selected source each keep their own player. File fields shown alone, +including in the inspector, still display their source media. + +Video file-picker previews reserve a bounded landscape frame before metadata +loads. Portrait clips remain fully visible inside that frame through +`object-contain`; their intrinsic dimensions cannot enlarge an arranged node and +cover neighbouring controls. This display sizing does not change the source +file, authored node positions, wires or saved execution parameters. + +### Fresh example stage presentation + +Bundled Example workflows use the same V2 visual stages as fresh templates. The +opener infers the form from the original graph, folds actual connected operations, +and preserves the ordered executable graph. Whole-pipeline Diffusers paths combine +the loader, private quantization and execution settings in Model Setup; their +native generation operation sits inside the shared Generate stage and already +performs its own encoding and decoding. The V2 boundary retains its authored call +fields rather than hydrating inactive controls for other models from the generic +root-node schema. Internal-only setup connections remain inside Model Setup. +Shared suppliers stay external. Connected video Load and Normalize operations +share Video Input unless another branch consumes the original clip. Storyboards +retain separate Shot groups. These wrappers grant no new execution or editing +authority, and ordinary imported files and saved documents retain their authored +presentation. + +Fresh example and template layouts wait for two consecutive measurements of the +visible layout nodes, with a bounded five-second deadline and an explicit retry +error on timeout. Hidden nodes and owned projections are excluded consistently +with the layout engine. Initial form inference may settle during this wait; +switching the selected document or changing its canvas cancels the pending layout. +The final arrangement updates the same durable Block presentation used by normal +Arrange, before acknowledging the opening or creation. + +Whole-task legacy imports follow the same ordinary-graph policy across image, +audio, video, 3D, speech, text and deterministic media. Presentation roles without +a current managed receipt do not grant managed-template authority. Existing +explicit managed receipts and template-owned documents keep their normal +validation. A rejected automatic form synchronization reports its error instead +of throwing through the React view; the strict imperative synchronization check +and existing Auto/Custom submission policy remain in force. + +Existing decomposed template creators explicitly retain their historical stage +traversal, including the original provenance factory byte vectors. Fresh bundled +Examples instead preserve their canonical source order before folding any stages. +This compatibility choice changes presentation ordering metadata only and does +not reinterpret historical approvals or rewrite saved documents. + +Planning-only templates remain available for reading their notes. Their card and +detail actions say “Planning only” and cannot create a workflow. The shared +creation entry point checks the same policy before creating a tab or changing +the active document, including callers outside the browser dialog. Model terms +review is not requested for an unavailable creation action. This presentation +guard does not change model execution, resource limits or historical assets. + +New self-contained Block creation uses the existing legacy movement reducer as +a pure graph operation. The UI wrapper supplies reusable definitions and Cluster +metadata for explicit legacy edits; importing a planner does not import browser +configuration or read stores. The reducer and ordinary V2 compiler remain shared. + +Node preview history requires the same workflow identity as the current document. +Unscoped legacy outputs remain in the gallery. Reusing canonical node IDs in a +fresh example cannot attach those outputs to its input previews or expand its +layout with unrelated media. + + +Aliased Block controls resolve current runtime option presentation through the +same declared control bindings used by connected-input hints. Every mirror must +agree. The current backend may mark hardware status as +`runtimeOptions: availability` or physical device enumeration as `choices`; +saved/imported markers cannot grant this behavior. Dynamic options providers +remain authoritative. This refresh never persists a second field schema or +changes values, definition hashes, executable API or authority receipts. + +Numeric fields compare a committed value with the actual saved value/default +before writing. Leaving an untouched field cannot add an Undo entry, and Enter +commits once. Out-of-range saved values can still be corrected by an explicit +commit. Native browser regressions cover Tab, Enter, Undo/Redo and Save/reload. + +Ordinary visual stages resolve field actions through their declared native +bindings, including mirrors. Their renderer uses the real node identity; a +presentation label is not an action owner. Imported schemas may omit callback +hooks, so explicit edits resolve those hooks from the current native registry. +Returned field values and metadata update the workflow-owned effective graph +and public values through the existing Block reducers. Reusable definitions and +registered Block editing policies remain intact. + +A changed native signal from a scoped metadata response or a user connection +may dispatch its registered downstream metadata hook. Imported ordinary consumers +with omitted or suppressed automatic hooks use the current registered hook for +that explicit change too. A scoped reply identifies its exact publishing field +and value; superseded payloads cannot replay callbacks, and a rendered relay +copying the value early cannot swallow the downstream refresh. Opening or restoring a +stage does not replay those hooks. Saved disabled presentation cannot veto a +registered metadata refresh, but does not grant execution or bypass model, +resource, consent or sealed-control checks. Stale session, tab, canvas and form +responses retain the ordinary rejection rules. Browser regressions exercise +model switching, downstream contract updates, Undo/Redo and Save/reload without +submitting a graph or downloading weights. + +Fresh graph measurement waits start their bounded observation window on the first +available browser frame. A large synchronous initial render must not exhaust that +window before ResizeObserver can report its first bounds. Completion still requires +two consecutive measured frames; incomplete graphs still fail instead of being +laid out using invented dimensions. Example and template opening share this rule. + +Model-reference inspection reads `modelReferenceInactiveWhenHidden` only from the +current native registry. An explicitly inactive auxiliary may retain its selected +repository without being reported as a missing dependency. Imported opt-out hints, +hidden primary models, active auxiliaries and unknown visibility remain conservative. +Inspection never clears a selection or grants backend execution/resource admission. +Stage control disclosures use a zero-minimum single-column grid. A long model +identifier must shrink or truncate within its control rather than setting an +intrinsic grid width larger than the node. Apply this constraint to both shared +stage controls and Encode Inputs groups; clipping the parent alone hides the +controls and does not correct their layout. This is presentation only and must +preserve the native execution graph and authored values. + +# Expanded visual-stage field actions + +Projected containers expose declared local controls, not native callback owners. +Resolve those controls through the owning instance and its exact container +interface before looking up the native field action. This also applies when a +visual stage is nested inside a storyboard shot. Stale renderer identities and +foreign owners must fail closed. Hidden inherited aliases remain presentation +metadata and must not be treated as additional visible controls or rewritten in +the persisted execution graph. diff --git a/docs/privacy-and-security.md b/docs/privacy-and-security.md index e5dbbae9..eb3cc212 100644 --- a/docs/privacy-and-security.md +++ b/docs/privacy-and-security.md @@ -26,13 +26,17 @@ Run `./run-dev.sh --no-browser` on the remote host, then open ## Browser Data -The client persists state in the browser origin's local storage: +The client keeps page-owned workspace checkpoints in `sessionStorage` and shared preferences in `localStorage`: -| Key | Typical contents | -| ----------------- | ---------------------------------------------------------------------------------------------------- | -| `modiff.flow` | Visual graph, node parameters, edges, viewport, and related graph state | -| `modiff.settings` | User interface preferences and non-volatile settings | -| `modiff.studio` | Studio form values, workflow tabs, prompts/snippets, template provenance, and recent output metadata | +| Key | Storage | Typical contents | +| ----------------- | ---------------- | ------------------------------------------------------------------------------- | +| `modiff.flow` | `sessionStorage` | Visual graph, node parameters, edges, and viewport | +| `modiff.settings` | `localStorage` | User interface preferences and non-volatile settings | +| `modiff.studio` | `sessionStorage` | Studio form values, workflow tabs, prompts/snippets, imports, and pinned inputs | + +Page checkpoints survive reload but are not a backup for closing a page or browser session. Save important workflows to the backend library or export them. Backend-owned output history is restored from `/studio_outputs`, not from these checkpoints. + +A page without a checkpoint can recover retained legacy workspace bytes once from shared `localStorage`. Recovery does not overwrite or delete those historical keys. Clearing a page checkpoint does not clear the shared recovery data. If browser storage is blocked or full, live editing remains available and the app warns you to Save or export; it does not redirect workspace writes to shared storage. Depending on the workflow, these records can contain prompts, negative prompts, seeds, model names, local/backend file references, output URLs, and restorable graph metadata. Anyone with access to the browser profile may be able to inspect them. @@ -127,7 +131,7 @@ For a suspected vulnerability, follow [SECURITY.md](../SECURITY.md) instead of o - Restrict permissions on data, cache, model, log, and export directories. - Review every custom module/field and optional dependency before enabling it. - Keep model artifacts pinned or otherwise provenance-aware when reproducibility matters. -- Back up workflows intentionally; do not treat browser local storage as a backup. +- Back up workflows intentionally; do not treat browser storage as a backup. - Define retention and cleanup for uploads, outputs, caches, and exported packages. - Verify that diagnostics are redacted before sharing them. diff --git a/docs/release-preview-scope.md b/docs/release-preview-scope.md new file mode 100644 index 00000000..3826ee3d --- /dev/null +++ b/docs/release-preview-scope.md @@ -0,0 +1,74 @@ +# Qualified-example preview scope + +The November 2026 release candidate selects 81 registered examples from the +original 89-case campaign. The executable selection is +`config/release-showcase-scope.v1.json`; it binds the exact immutable Dataset +revision and each accepted recipe. Run `npm run release:showcases:verify` to +verify that selection. This check does not replace the full release gate. + +Marigold Depth LCM — Synthetic Ramp, SmolLM2 — Rain Gauge Answer, and Spandrel +Real-ESRGAN 2× — Synthetic Gradient are registered in the Gallery as supplements. +They count toward the workflow release report and sit outside the original +89-case selection. + +Shap-E — Traffic Cone Turntable is also a supplement. Its approved 256 × 256 +rendered turntable is an exact technical preview. It establishes the text-to-3D +workflow's rendered output and leaves mesh quality unmeasured. + +Five originals remain deferred to AMD cloud: Amber Glass Replacement, The Winter +Delivery, Subway Musician, Final Mise en Place and Morning Light Teapot. Chinese +New Year Ensemble, Ghibli Story Illustration and Cosmos 3 Publisher Caption +remain excluded for rights/access reasons. Their rejected or unapproved outputs +must not become release showcases. The two-hour local campaign budget is an +operator scheduling choice; MoDiff imposes no corresponding user runtime limit. + +The preview's evidence claims cover the selected accepted examples and their +recorded configurations. They do not qualify every canonical developer workflow, +declared memory/quantization variant or physical platform. CPU/NVIDIA qualification +remains limited to the existing measured baselines; AMD observations are +conditional and Apple MPS still needs physical qualification. Approved historical +media and current native recipe evidence remain distinct proof levels. + +Before distributing the paired candidate, run the full client check and browser +checks, asset release gate, backend gate, integrated HTTP/package checks and the +current contract/resource report verifiers. Retain the full Gallery and global +qualification gate results, including exclusions and other missing execution +evidence. A failed global gate means the complete catalogue cannot be described +as a fully qualified stable release. A passing selected-example check supports a +clearly labelled preview with the documented limits. + +Redux Courier now uses its accepted prompt, seed 8414, guidance 3.5 and 80/20 +reference weights inside the generic Encode Inputs stage. Moonflower uses the +accepted nine-scene, 45-second Custom recipe and ten ordered image slots from +nine byte-pinned source files. Its lyric overlay is disabled by default. Original +media is retained; registration and input recovery require no model rerender. + +Standalone deterministic utility evidence is separate from the 81-example scope. +The three input-free data utilities can qualify exact private text/JSON results +through the normal queue and canonical recorder, without a fictitious model +revision or public Gallery approval. The recorder checks their delivered and +persisted previews and exported bytes against an independent expected result. +This grants no model-memory, hardware, full consumed-field or browser-interaction +claim. File-backed media utilities and model-backed workflows retain their own +evidence requirements; see the canonical recorder in `CONTRIBUTING.md`. + +The four DreamLite workflows qualify for noncommercial research with their +previews withheld. The checker repeats the saved evidence validation and binds +the exact accepted graph and output to the existing restricted artifact review. +The release report lists them separately under `previewFreeResearchWorkflows`. +Their proof does not extend to Gallery publication or Auto resource admission. + +The release report also lists `privateQualifiedWorkflows`. This covers Chinese +New Year Ensemble under its research and academic terms, Ghibli Story Illustration +under its personal noncommercial terms, and the exact operator-approved FramePack +keyframe clip under its territory-limited private scope. The release checker +requires the local native request, acknowledgement, completion, model pins and +decoded media to match their recorded hashes. The two adapter workflows must +match their current executable exports. FramePack requires the verified original +recipe and the approved variant with both reference images. The registry carries +hashes, and the private media and run records stay outside Git and the Gallery. +Both the asset and workflow release checks verify that these templates expose +no Gallery previews and that the public asset list contains none of their exact +output bytes under any filename. These checks also run on a clean checkout. +This server-side evidence establishes execution and delivery. Browser interaction +and hardware qualification use their own checks. diff --git a/docs/studio-user-flow.md b/docs/studio-user-flow.md index 75f58d96..ae0760f4 100644 --- a/docs/studio-user-flow.md +++ b/docs/studio-user-flow.md @@ -34,6 +34,8 @@ When the canvas is empty, the task launcher offers common guided entry points: **Browse recipes** opens the template browser. Templates are often the clearest way to discover image, video, audio, or advanced workflows that are not shown as first-screen shortcuts. +In **All templates**, search for a card title, recipe ID, model name or words from its prompt. The **Recommended** sort puts matching names ahead of recipes that only mention the words in their prompts. Choose **Task**, **Model** or **Runtime** to order the same matches by that field. + The model list is filtered by task. A model profile being visible means the client understands its intended fields and requirements; it does not guarantee that the current backend, artifact, or machine can run it. ## Understand The Interface @@ -46,6 +48,8 @@ The model list is filtered by task. A model profile being visible means the clie already-open Queue, Setup, or Block tool. Refresh preserves your explicit open/collapsed choice. - **Save** writes the active snapshot to the backend **My workflows** library. Its menu provides Save as and a JSON file copy; `Ctrl+S` saves the current name and `Ctrl+Shift+S` opens Save as. + Opening a saved workflow from the library keeps its saved revision and timestamp. + Subsequent edits still autosave; opening an unchanged document does not save it again. - **Export** provides a workflow package, latest-output package, and Gallery shortcut. Expert also exposes raw workflow/API graph JSON. - **Auto view / Expert view** changes editing tools and node discovery. It preserves the graph and execution settings. - **Resources → Automatic / Expert overrides** selects this workflow's execution policy in either view. @@ -237,9 +241,12 @@ save operation rather than allowing it to save a different instance. - **Studio** contains guided task/model/form controls and graph-aware readiness. - **Queue** shows current and recent task progress, cancellation, and errors. - **Setup** reports backend runtime, capability metadata, model/cache state, and install diagnostics. -- **Setup → Runtime optimizations** shows supported optimization packages, isolated environments, qualification - receipts, activation, and rollback. Install or activate only entries supported by the current backend profile, and - do not treat an unqualified probe as production evidence. +- **Setup → Extra feature packages → Optional runtimes → Optimizations** shows available + accelerators and their requirements. Use **Regional torch.compile → Probe** to test the compiler + before selecting **Regional Compile** in a compatible Expert execution recipe. **Attention Backend** + distinguishes built-in PyTorch flash SDPA, the separate FlashAttention package, and Hub kernels. + The available choices depend on the runtime and the selected model. Auto uses an optimization + after you enable it and review a measured improvement for the same workload. - **Setup → Template Gallery assets** verifies the installed byte-pinned payload and offers an explicit app-owned install or repair. It plans the complete download and staging reservation alongside active model downloads, @@ -345,6 +352,8 @@ For gated models, accept the provider's terms and authenticate through supported ## Run Readiness +Template cards show **Auto check at Run** when their model prerequisites and required inputs pass the template check. This is not a current memory-fit assessment of the complete workflow. Run checks the actual graph and current memory before submitting an Auto task. Explicit Custom recipes retain their experimental prerequisite status; built-in processing that needs no model download can show **Ready now**. + The current graph is checked before submission. Blocking issues can include: - Backend or websocket unavailable @@ -480,3 +489,30 @@ This test avoids claiming real model support when only the UI is available. Use 14. Stop the dev processes with the repository stop script and confirm unrelated listeners are left untouched. For automated UI coverage, run `npm run check:ui`. It uses mocked backend routes and proves client behavior without downloading or executing a real model. + +The Models window separates local files from supported model variants. A metadata-only +or incomplete Hub snapshot stays visible for diagnosis. A verified selection confirms +the selected files; running the workflow also depends on its requirements. Search +accepts a repository, variant label, or task. The download view shows the cache +destination and available capacity when the server reports it. + +On shared-memory accelerators, Resource usage shows the accessible pool and dedicated +reservation separately. The compact gauge names the busiest measured resource. Storage +shows free space for model downloads, managed Studio outputs, and default disk offload. +Setup lists requirements for the inspected workflow first. Use **Show other runtimes** +to explore additional installations. **Review runtime** opens the package named by a run issue and keeps its controls visible while they have keyboard focus. + +### Reviewing a run and navigating the canvas + +Select a completed run in Queue or Session activity to see that run’s output. Use +**Open workflow** in the preview to inspect its stages. A result in Gallery has +a **Download** menu for the available file and recipe formats. **Result details** +opens its generation settings and provenance. Restoring a result uses its saved +workflow name when available. + +On a narrow screen, the canvas keeps its width as the libraries and workspace +open one at a time. **More toolbar actions** contains file, setup and export +controls. Use **Ctrl+K** (or **Command+K**), type a command and press Enter. +The arrow keys move through available commands. Keyboard users can jump to +the canvas from the first navigation link or resize a desktop panel by focusing +its separator and pressing the left or right arrow. diff --git a/docs/template-gallery-assets.md b/docs/template-gallery-assets.md index 198ee34e..62db8e1a 100644 --- a/docs/template-gallery-assets.md +++ b/docs/template-gallery-assets.md @@ -5,39 +5,348 @@ while Git contains only code, metadata, and SHA-256 identities. Runtime URLs are pinned to one immutable Dataset commit. Public users do not need a Hugging Face token. +The browser groups recipes by task and lists **Advanced & planning** last. This group contains recipes that explicitly declare a custom experimental creator, plus planning-only drafts. Recipes with private previews retain their task categories. Declared creator recipes also appear in their relevant task categories. Model and operation filters follow the recipes in the current results, including independently named checkpoints that use the same execution pipeline. + +**Recommended** combines curated examples across media with each task category’s featured recipes. **Getting started** includes every recipe marked Starter. **Low VRAM** collects recipes explicitly classified or tagged for low-memory use. These collections overlap with task categories so an image workflow can appear under both Image and Getting started. Use **Ready on this machine** to filter by the current setup. + +Sorting by recommendation gives one matching recipe a larger card with its own approved Gallery output. Recommended, All templates and Image open with **Larch on the Glacial Pond**. Opening that card creates the Lumina Image 2.0 landscape workflow. The separate FLUX 3 pine-lake landscape is available under **Ceramic Radio → Model showcase**, together with its prompt-upsampling recipe. Opening the Ceramic Radio workflow uses the radio recipe shown on its card. Template authors can nominate category leads in `src/studio/templateBrowser.ts`. When a filter excludes the first choice, the browser selects another matching reviewed output. + +The browser shows a loading message while it checks the Gallery index. A failed lookup retries once. If the retry also fails, reopening Templates checks again. The private-preview placeholder appears only after the index loads successfully and contains no approved output for the recipe. + +Approved supplementary showcases are listed in `src/studio/templateShowcases.json`. +Their exact media and redacted recipe/review records use this same immutable +Dataset, asset inventory, per-file rights ledger and publication verifier. Each +entry binds both file hashes. Template cards use the current recipe’s approved preview, with a +placeholder when the manifest has no matching result. In a template’s detail +view, **Model showcase** opens the supplementary media and links its own consumed +prompt, ordered inputs, model pins, settings and accepted limitations. +The MiniMax green-centre perfume showcase is an ordered-reference material edit; +its blue-centre text-to-image source is separately registered. + +Workflow video showcases use the same pinned Dataset and file-by-file rights +checks. Look for them under **Workflows → Example workflows**. Monday Morning +in New York uses the LTX-2.5 Full image-to-video with audio route for its crossing. +The card plays the approved two-shot edit and links its recipe and review record. + [Hugging Face's current storage policy](https://huggingface.co/docs/hub/en/storage-limits) describes storage for a free user or organization's public repositories as **best effort**, and asks that public uploads provide real community value. The -current Gallery is about 466 MiB and 360 files, well below the Hub's -repository-structure recommendations, so a public Dataset is a reasonable -zero-cost home for this release. It is not a contractual free hosting -guarantee: monitor the current Hub policy and keep the byte manifest portable -enough to migrate to another public Dataset namespace if needed. +[versioned asset inventory](../config/template-assets.v1.json) records the exact +file count, total size and per-file hashes for the complete Gallery. The runtime +source descriptor separately selects the approved available subset. This release +uses a public Dataset; that is not a contractual free hosting guarantee. Monitor +the current Hub policy and keep the byte manifest portable enough to migrate to +another public Dataset namespace if needed. The checked-in source configuration is -`src/studio/templateAssetSource.json`. `mode: "local"` is the safe migration -default; it keeps the current application working until a real Dataset is -uploaded and verified. Do not replace it with a guessed namespace or a moving -`main` revision. +`src/studio/templateAssetSource.json`. The current release selects a public +Hugging Face Dataset by immutable revision and explicitly lists withheld assets. +`mode: "local"` remains available for a complete verified local copy. Never replace +the reviewed source with a guessed namespace or a moving `main` revision. + +## Deterministic inventory and current-source reports + +The inventory uses repository-owned MIME mappings for supported Gallery formats, +including the existing `audio/x-wav` spelling, rather than the host's registry. +Unknown extensions remain `application/octet-stream`. PNG/WebP dimensions come +from their checked headers even when the operating system has no MIME entry; +an invalid known image is an error, not an opaque-file fallback. Byte hashes, +sizes, purposes and complete-set checks remain strict. + +This does not rewrite an older approved manifest. If identical image bytes have +older generic MIME metadata or omitted dimensions, preserve that original set +and prepare a separate metadata proposal for review. Running `inventory --write` +changes the asset-set identity; it is not a way to dismiss a mismatch without +reviewing dependent rights/source records and the immutable Dataset update. + +The release-candidate report runs the existing `release-contract.mjs --check` +before claiming `releaseContractCurrent`. A stale contract, verifier failure, +timeout or inability to start the check makes that gate false and adds +`release-contract-not-current`. The bounded check never regenerates the contract, +installs packages or fills missing qualification evidence. Its private diagnostics +are not copied into the public report. `--check` still verifies the report itself, +and `--require-ready` still enforces every other release gate. ## One-time public Dataset setup +Before publishing or refreshing examples, preserve each run's original consumed +recipe, graph, task receipts, model/input identities and source/runtime provenance. +Historical examples keep their original recipe authority when templates change. +Updating a template hash alone does not establish equivalent execution. + +The template browser labels retained approved media **Previous recipe example** +when the earlier creator lock matches without the new execution selection. +It also recognizes an added explicit Hub artifact revision only when the +published record's model revision and model commit both already contain that +exact immutable repository/revision pair. The previous lock must still match +all other settings, weight hashes, input bindings and review requirements. +This read-only display lookup never rewrites the current template or published +record, and never satisfies current-graph exactness or the release Gallery gate. + +### Explicit historical recipe records and curated showcases + +`config/template-recipe-history.v1.json` retains exact creator declarations for +approved examples whose authoring stages have changed. Each record binds the +current declaration to the original template lock, graph, full model set, inputs, +media, provenance and review hashes. Older selection metadata comes from the +preserved source declaration; it is not inferred from a similar pipeline name. +Run `npm run gallery:recipes:verify` against the materialized pinned Gallery. +The verifier rejects changed prompts, controls, model sets, inputs or sidecars. +It never edits an original receipt or grants current-graph execution proof. +When accepted current-recipe replacements supersede every active historical +example, this ledger may contain zero records. Preserve prior declarations and +sidecars in the immutable Dataset history; an empty active ledger grants no proof. + +Run `npm run gallery:verify -- --reviewed-history` to verify the complete +Gallery using any exact historical recipe records. The report separates +verified current examples, available historical examples, and historical +records whose media are withheld. Rights, media, provenance and review checks +still apply. The default `npm run gallery:verify` continues to check the +current recipes only. + +The detail view links these outputs under **Previous recipe example**. +Repository-relative weight filenames can resolve to their exact recorded Hub +repository, but only the added revision field may be omitted from an older lock; +weight hashes, filenames and every other setting remain binding. + +`config/release-showcase-scope.v1.json` names a curated preview selection and every +excluded template with a reason. `npm run release:showcases:verify` checks that +selection with the ordinary Gallery media, provenance, review, storage and rights +checks. Historical entries additionally require their explicit recipe records. +It reports current and historical examples separately and never counts excluded +items as completed. The full storage subset is still hash-verified. + +The release contract keeps the original quality decision separate from +`reviewedExampleReleaseApproved`. Current release approval requires the exact +current-recipe manifest entry and available media, previews and review records. +A prior approval remains recorded when its recipe changes or the source +descriptor withholds an asset for rights review, but cannot satisfy this gate. +Unknown approval-status spellings also remain blocked. + +This is a showcase gate, not overall release approval. Ordinary Gallery coverage, +canonical-workflow, resource and hardware qualification gates remain strict and +must be reported separately. Curation neither hides execution failures nor sets +a time limit on users' workflows. The default complete Gallery verifier is +unchanged; only an explicit maintainer selection scopes its example checks. + +### Reproducing reviewed input bindings + +`npm run gallery:runtime-inputs:check` recognizes both historical snake-case input +roles and the native camel-case roles, including ordered `referenceImages[n]` +inputs. It preserves original provenance and verifies exact input bytes. A +comparison image produced by the connected denoiser/decoder/upscaler chain is +not a root workflow input. Missing or disconnected ancestry remains an error. + +The generator can reuse hash-verified installed runtime input files. It stages +all originals before replacing that cache, including inputs referenced by a +retained recipe declaration. Explicitly authored appended templates are checked +without changing their bindings or assigning them base-template packed indexes. +Reviewed binding identifiers and labels belong in +`scripts/template-default-input-overrides.json`; they do not authorize different +source bytes. Changed generated binding metadata follows the same immutable +Dataset update procedure as other asset metadata. + +The maintainer-only `gallery:repair-evidence` command repairs one retained example +from its original evidence. It requires the original per-run provenance and +matching creator settings, admission locks, consumed form, canonical graph, +completed task/node receipts and pinned inputs. Indexed reference roles preserve +input order. It refuses missing authority or changed recipes before modifying +sidecars, preserves source/runtime/model identities, capture time and the original +ordered output byte identities, and retains content-addressed before-copies with +rollback if paired writes fail. Persistent storage failure or process termination +can require recovery from those originals; this is not a crash-atomic transaction. Its media +discovery excludes sidecars and preserves output collection order. Use it on +private retained evidence; public asset updates still follow the publication +procedure below. Missing current execution or quality proof requires recovery +and review of matching receipts or a genuinely accepted new run. + +For historical reconciliation, preserve the original manifest, provenance and +quality-review bytes before assembling a candidate. Keep current recipe +comparison separate from the retained creator and any recorded derivative. +Media with a previous-recipe match remains historical even when its bytes and +review are valid. A missing complete model-set record cannot be reconstructed +from a singular model field or a graph naming one loader. + +Public provenance intentionally redacts source/runtime details. Its maintained +public verification uses the pinned original attestations; a private validator +requiring unredacted source inventories is not interchangeable with that check. +Do not interpret expected redaction diagnostics as authority to fill missing +fields, relax current proof requirements or rewrite approved sidecars. + +A later private run can supply a current-recipe replacement candidate when an +original pre-run declaration matches today's locked settings and execution +selection, and the original task, consumed controls, graph, model, source and +media independently corroborate it. Keep any absent output template identity +absent. Preserve the run's source, capture time and original public/private +status; do not retrospectively label it a public-default execution. + +Prepare its proposed entry, public-format provenance and exact media outside the +active Gallery. A single reviewed run is not an exact duplicate proof. Carry +private human acceptance separately from the template rubric, per-file rights +and publication decision. An unfinished review must continue to fail the normal +publication checks. An isolated local verification fixture is not authority to +change the real Dataset source or weaken its complete-set checks. + +In particular, matching prompts, seed and media do not make Expert execution +prove a currently selected Auto recipe. Required-input paths are real input +bindings rather than blank template defaults; retain their original content +identity and establish current bundled-input authority separately. Missing +consumed fields cannot be filled from submitted intent or listening approval. +The [paired recovery checkpoint](https://github.com/sdevil7th/MoDiff/blob/fix-ui-ux-issues/plans/release-20261028/gallery-evidence-recovery.md) +records the recovered current-recipe replacements and their remaining proof +boundaries. Original Expert observations retain their recorded policy; later +Auto observations remain separate evidence. Register an accepted retained output +only after its formal quality review and exact-file redistribution approval. + +### Registering an accepted retained output + +Bind the original media bytes and creator settings to the actual completed task, +graph, consumed controls, immutable model set and source/runtime evidence. Carry +the existing visual or listening verdict separately; never fill missing execution +fields from that verdict or relabel a single reviewed run as duplicate exactness. + +Complete the existing template-quality rubric and record the reviewer and review +time. A proposed score is not a score previously supplied by the reviewer. Obtain +explicit approval of the proposed record and the per-file rights terms before +publishing new or changed bytes. Preserve earlier Gallery entries, media, +provenance and reviews outside the active set and retain the prior immutable +Dataset revision for rollback. + +A maintainer can explicitly accept an example with its disclosed visual +limitations. Retain the original scores in that case. Record +`maintainerAcceptance` with schema version 1, decision +`accepted_with_disclosed_limitations`, the same reviewer and acceptance time as +the review, the maintainer's statement, and `acceptedReviewHash`. Compute that +hash using `canonicalJsonHash` over the complete review before adding +`maintainerAcceptance`. This binds acceptance to the exact media and execution +bindings, scores, findings and limitations. Ordinary reviews require scores of +at least four. An explicitly accepted review permits scores from one to five +while retaining the technical, objective, hard-failure and modality checks. +Publication still requires the exact-file rights record. + +For video, `acceptedFindings` can list the specific qualitative diagnostics the +maintainer accepted, such as disclosed subject morphing or temporal artifacts. +The verifier accepts only its enumerated visual findings. Full playback, +card-size inspection, source comparison, duration, frame counts and execution +evidence still require their own records. Keep the actual findings in the review. + +Fresh image-conditioned LTX evidence uses the existing native video reader. +It binds the ordered `Image.Load` byte hashes, reference wires and consumed +conditioning strength, alongside generator and upscaler ownership. Fresh modular +control evidence uses `observed-workflow-auto-control-resource-v1`. That reader +binds the base and auxiliary model, exact source-image bytes, native loading +controls and both Guider and denoiser guidance values. It preserves the original +null task and explicitly records that the control-scale argument was not captured. +The saved loading request and the current Auto default may differ while the +original graph and native applied policy retain their exact values. + +Verify the replacement entries with the normal Gallery verifier, then refresh +the complete byte inventory and SHA-bound rights ledger. Unchanged approved bytes +keep their original rights reviews; changed metadata and media require their own +approved records. Publish the approved subset when holds remain, anonymously +verify the exact returned commit, and update the complete inventory and pinned +source descriptor together. Do not clear unrelated rights or model holds. + +After the source update, rerun Gallery verification and coverage and compare the +remaining errors with the preserved report. Report repaired entries separately +from overall release eligibility. Build/package and test the changed source before +claiming that a running application serves the new registration. + +The release-contract generator also inspects the bundled backend node sources. +It ignores removed module directories only when they are empty or contain solely +the residual `__pycache__` directory. Other missing initializers, Python sources +or unresolved registry declarations remain errors; cached bytecode is never +imported to reconstruct a missing module. + +Hardware registration uses the run's measured execution device and backend, +not the first accelerator listed by its host. CPU execution cannot qualify a +CUDA, ROCm, XPU or MPS profile. GPU evidence must identify the actual device +index in captured physical device metadata, with a matching backend. Missing +or contradictory measurements remain blocked; old receipts are not rewritten +to supply them. A conditional/preview profile still records an observation, +not supported-profile qualification. Runtime installation tiers and CI checks +alone do not establish physical model qualification. + +Resource qualification reads the locked baseline through its release receipt. +A `/template-gallery/` reference resolves only inside the client or bundled +Gallery cache; it names a reviewed provenance bundle whose original `run` is +retained. A direct retained v2 file remains supported. Both readers verify the +receipt's original content hash and exact template, task, graph, model, runtime, +candidate, output, duration and peak-memory fields. Files are bounded and cannot +escape their managed root or traverse symbolic links. A corrupt preferred cache +is an error, not a reason to select a different copy or a newer run. +Gallery hashes use the existing provenance canonicalization, including its +case-sensitive key ordering; they are not interchangeable with workflow-graph +hashes. When current retained and Gallery receipts share a completion time, +the explicitly current canonical association takes precedence. A newer matching +receipt still wins, and stale receipts remain excluded. Original private run +fields are never filled from a redacted projection or today's checkout. + +This permits reuse of complete original resource evidence without inference. +Reading a public baseline does not restore source attestation removed by +redaction: the candidate run still needs the full provenance validator, unchanged +workload, declared resource recipe and native measurements. Family qualification +does not grant the separate exact-route two-proof lane, hardware qualification, +Auto admission, visual approval or publication authority. + +Resource contracts distinguish the legacy catalog family from the selected +backend execution class. `resourceRecipes.executionModelType` comes from the +template's declared selection; an absent selection preserves the legacy type. +Receipts retain the original runtime `modelType` and add a separate +`resourceFamily` for family coverage. Different catalog families never merge +merely because they use the same execution class. Old receipts without that +field retain their original family identity; no alias is inferred from a run. + +Current health reports use a resource fingerprint, while completed tasks retain +a separate execution fingerprint. Hardware registration compares the resource +domain to health, then binds the unchanged execution identity and normalized +runtime to original provenance and the worker's exact source inventory. It does +not replace an execution hash with a resource hash. Retained live-proof artifact +directories must include the original `run-terminal.json`, `backend-health.json` +and `run-provenance.json` alongside `status.json`; the completed task must own +that provenance. The full provenance validator still applies. A status marker +or an old output file alone cannot establish qualification. + +The ACE-Step RTX 4080 cold-load check applies to both the catalog display alias +and the actual backend pipeline class. Changing that identity spelling does +not remove its required timing evidence or its 120-second limit. + +For ordinary direct-audio graphs without a legacy Studio binding, the proof +reader can recover a manual resource identity from one executed loader, its +connected disabled-quantization recipe and the exact Generate/Export chain. +Source-backed and loudness-match/join chains must retain their required input +connections and execution order. The audio contract, immutable model revision, +resource controls and saved manual policy must agree. This identity names the +actual backend pipeline, not a display alias from the form. It does not recover +missing consumed controls, establish input bytes or grant model, hardware, +Automatic memory, listening or publication qualification. Unsupported or +ambiguous compositions remain held; canonical field-accounting coverage is a +separate contract. + +The ordinary Audio Load and Export nodes can retain `ui_audio` preview values +after execution and reopening. Their declared `filename`/`file` preview sources +are presentation metadata, with bounded literal media references. The proof +reader preserves those references and retains the same resource identity; +connected preview suppliers, unknown keys, structured values and unsupported +preview sources remain rejected. This does not supply missing input-byte or +consumed-control evidence, and never rewrites the original submitted graph. + Choose a user or organization namespace where you have write permission. The recommended repository name is `/modiff-template-gallery`. The repository must remain public for unauthenticated open-source use. -Before running an upload, settle the Gallery media license. The application is -Apache-2.0, but that does not automatically license generated outputs, input -fixtures, model-derived examples, or third-party marks. The current Dataset -card intentionally uses `license: other` because the 140 checked provenance and -review records do not declare a reusable asset license. Its metadata is also -intentionally incomplete, so it cannot be published accidentally. [Hugging -Face's repository-license contract](https://huggingface.co/docs/hub/en/repositories-licenses) -requires `license: other` to include both a descriptive `license_name` in -`docs/template-gallery-dataset-card.md` and the actual terms in -`docs/template-gallery-dataset-license.txt`; the uploader refuses all Hub -mutations until both exist. Do not choose Apache-2.0, CC0, CC-BY, or another -license unless every included asset can legally be distributed on those terms. +Before running an upload, review the rights for every included file. The +application is Apache-2.0, but that does not automatically license generated +outputs, input fixtures, model-derived examples, or third-party marks. The +Dataset card declares `license: other`, +`license_name: modiff-template-gallery-mixed-asset-terms`, and `license_link: LICENSE`. +The complete terms already exist in `docs/template-gallery-dataset-license.txt`; +they defer to each exact file's rights record and grant no blanket asset license. +[Hugging Face's repository-license contract](https://huggingface.co/docs/hub/en/repositories-licenses) +requires a descriptive name and actual terms for `license: other`, and the +uploader checks both before any Hub mutation. These existing Dataset terms do +not approve new media. Choose each file's license only after reviewing its source, +model and adapter terms, attribution, consent, and redistribution rights. Publication also requires `config/template-asset-rights.v1.json`. It is a SHA-bound, one-record-per-file ledger and is uploaded alongside the byte @@ -52,8 +361,10 @@ record the creator/rightsholder, creation method, source URL and revision, source license, model terms, AI-generation flag, likeness/consent status, marks, attribution, asset license, reviewer, and review date. Change the decision to `approved` only after a human review. The uploader requires exact -path and SHA coverage and refuses stale, missing, duplicate, or held records -before authenticating or changing a Hub repository. +path and SHA coverage and refuses stale, missing, or duplicate records before +authenticating or changing a Hub repository. Complete publication also refuses +held records; provisional publication includes only the approved subset and +retains every hold. The commands below use the backend environment because it already contains `huggingface_hub` and `hf_xet`. Authenticate with a write-scoped token. Never @@ -121,7 +432,16 @@ does not delete `README.md`, `.gitattributes`, or unrelated Dataset files. While upstream permissions are pending, `upload-provisional` may publish only the ledger's approved records. It writes a blocked manifest, lists every withheld path in the Dataset card, verifies the public bytes anonymously, and -has no activation option: +has no activation option. + +The provisional command validates the complete checked-in inventory and rights +ledger, then stages only approved files. Withheld local files may be absent; +their descriptors and holds remain unchanged. Every approved file must still +have exact local bytes and a safe regular-file path. Staging and byte verification +finish before credential access or a Hub mutation. Complete-set verification, +upload, activation and pruning retain their stricter complete-set requirements. + +For example: ```bash ../MoDiff/.venv/bin/python scripts/template-gallery-assets.py upload-provisional \ @@ -132,7 +452,10 @@ has no activation option: Open the printed manifest URL in a private browser window where you are not signed into Hugging Face. It must return JSON. The upload already performed a -full anonymous byte verification; repeat it independently before activation: +full anonymous byte verification. For a complete publication, repeat it before +activation. For a provisional publication, first follow the +[reviewed approved-subset source update](#reviewed-approved-subset-source-updates) +procedure, which validates against the candidate descriptor: ```bash ../MoDiff/.venv/bin/python scripts/template-gallery-assets.py verify-remote \ @@ -144,7 +467,7 @@ full anonymous byte verification; repeat it independently before activation: Full verification also rejects any stale or unexpected file under the two MoDiff-managed prefixes. -Then activate that exact commit: +For a complete publication only, activate that exact commit: ```bash ../MoDiff/.venv/bin/python scripts/template-gallery-assets.py activate \ @@ -162,17 +485,20 @@ public visibility and every managed asset byte, and only then updates ## Current publication state -The complete local set contains 360 verified files. The rights ledger approves -356 and holds four ACE Chinese New Year / Ghibli media files while written -permission is pending. Publish the approved subset with `upload-provisional`; -do not activate it. After both permissions are recorded, approve those exact -four records, run the complete `upload` command, and activate only its fully -verified immutable revision. - -The current strict inventory has 360 required paths: 358 are used at runtime -(14 are also used by maintainer tooling) and 2 are tooling-only. Of these, 359 -files are present and total 465.91 MiB; the poster above is the one missing -path. The scanner covers runtime TypeScript/JavaScript/JSON, generated source, +The checked complete manifest declares 522 files with no undeclared missing paths. Its +rights ledger marks 518 approved and holds four ACE Chinese New Year / Ghibli media +files while written permission is pending. The current source descriptor pins +the public approved subset and names those four unavailable paths. These are +contract counts, not a claim that every file is materialized in each checkout. +Recompute them after an asset change. + +Use `upload-provisional` while holds remain and review any new source pin using +the approved-subset procedure below. Keep each held path and digest unchanged +until its own permission evidence is recorded. Complete-set `upload` and +`activate` require a fully approved set. + +The strict inventory classifies runtime and maintainer references separately. +The scanner covers runtime TypeScript/JavaScript/JSON, generated source, the public Gallery manifest, maintainer scripts, and JSON/YAML/TOML configs. It recognizes `/template-gallery/...`, `public/template-gallery/...`, and bare `template-gallery/...` references. Adding a concrete reference in a durable but @@ -224,7 +550,7 @@ two gates intentionally hash the local files and are not clean-checkout gates. The normal backend installer automatically materializes the exact pinned snapshot, forces a local-mode client build, and mirrors the complete payload to `web/template-gallery`. If the checked source is still in migration-time local -mode, it verifies the existing 360 files before building. If it is in +mode, it verifies the complete expected asset set before building. If it is in Hugging Face mode, it downloads anonymously first. Installation fails closed on a missing file or hash mismatch. @@ -442,15 +768,535 @@ with `download`. After the integrated application test succeeds, review 2. Add or replace reviewed files and update Gallery qualification metadata. 3. Run `inventory --write`, `verify`, and the normal Gallery qualification gates. -4. Upload without `--create` to the same public Dataset. -5. Test the printed revision unauthenticated. -6. Activate the new commit and run the full frontend acceptance suite. +4. Refresh the per-file rights skeleton. New or changed bytes remain held until + their specific human review; do not use a blanket attestation. +5. Upload without `--create` to the same public Dataset, using + `upload-provisional` while any holds remain, and verify the returned revision + anonymously. +6. Use complete-set activation or the reviewed approved-subset source update, + as applicable, then run the required frontend acceptance checks. 7. Commit the new storage manifest and pinned source configuration together. Never mutate a released source configuration to `main`, a tag, or a pull-request ref. Rollback means restoring the previous checked-in commit SHA and asset-set identity. +## Reviewed approved-subset source updates + +`upload-provisional` remains non-activating. When a release deliberately retains +held previews, maintainers may review an immutable source-descriptor update, +as the existing approved-subset runtime contract supports. This is separate +from the complete-set `activate` command. + +After human rights approval of every newly included byte and the uploader's +anonymous verification, review the exact returned Dataset revision and subset +manifest against the complete local manifest and rights ledger. Update only +`repoId`, the immutable `revision`, and the corresponding source identities in +`src/studio/templateAssetSource.json`: `assetSetId` is the verified subset; +`completeAssetSetId` is the complete checked authoring manifest; and the sorted +`unavailableAssets` list must exactly match the verified remote `missingAssets`. +Preserve the existing path roots and Dataset type. Never infer these values +from directory contents or clear a hold to make the sets match. + +Preserve the previous descriptor bytes before preparing this change. The edited +descriptor is a release candidate; do not build or deploy it until verification +succeeds. If verification fails, restore those exact descriptor bytes and +retain the failure evidence. + +Run `verify-remote --full` against that reviewed descriptor before its commit. +It validates the exact complete manifest or approved-subset projection and +rights ledger, then anonymously verifies every included byte and rejects +unexpected managed files. Run the ordinary asset storage/release checks and +Setup's Gallery materialization check for the same pinned source. Rollback is +the previous descriptor and identities. Keep held assets excluded; do not use +complete-set `activate` or `prune-local` for a subset. + +This source update does not approve media rights, template quality, model +execution, Auto, or Gallery eligibility. New inputs and previews still require +the normal per-file human rights and template evidence reviews. + +The reviewed Marigold depth preview, SmolLM2 rain-gauge reply, Spandrel +Real-ESRGAN 2× comparison, Whisper Tiny transcription and LCM dawn edit use +`modiff.gallery.retained-template-provenance.v1`. +This format is limited to immutable reviewed associations. It binds the active catalog recipe, +observed source and runtime, the approved publication bytes, and the exact +quality review. The original standalone task identifiers and private captures +remain in the private archive. SmolLM2's JSON retains its own encoded and +decoded identities alongside the archived transport hash. Marigold records the +source-size visual preview of a synthetic ramp. Spandrel binds the original +64 × 48 source and 128 × 96 delivery to its pinned weight file. The comparison +is a technical preview of the 2× route and measures no fine-detail recovery. +Whisper publishes the exact JSON delivered by the transcription node. Its +retained association verifies the original audio input hash, native transcript +transport and exact JSON. The original recording remains private. The LCM +comparison retains both original WebPs and binds the source and the saved +prompt. Its accepted review records the substantial changes to the ridge and +shoreline and the stronger dawn light. + +Their original canonical workflow rows remain attached to the standalone task +skeletons. Release qualification links each row to its verified Gallery +template. The retained receipt keeps the absent native resource candidate and +declared observation limits. It grants no broader platform or Auto qualification. + +A retained video can carry a separately reviewed delivery adjustment. Preserve +the native output and reproduce the adjustment from that output before review. +Record the adjustment and both encoded identities in the pinned association. +Exposure correction preserves the native silent stream's geometry and cadence. +Audio gain preserves the exact decoded video, sample rate and channel count. +The edited streams must differ from their native counterparts. The normal +media checks, quality review and exact-file rights apply to the delivery file. + +`npm run gallery:verify` verifies locally materialized bytes against the active +source descriptor. For an immutable Hugging Face subset, it requires the exact +complete storage manifest and rights ledger, verifies every included file's +byte identity, and reports `withheldAssets` and `withheldExamples` separately +from `verifiedExamples`. An exclusion must be an explicit rights hold with an +exact path and hash; held bytes found locally remain withheld. All available +media, provenance, quality review, and current template checks remain required, +including the metadata checks for withheld examples. Local-source mode still +requires the complete Gallery. This check does not approve held content, +replace anonymous `verify-remote --full`, or establish new execution or quality +evidence. + +## Decoded-video identity across reviewed FFmpeg producers + +Historical `sha256:decoded-video-framemd5` identities hash FFmpeg's complete +frame-checksum output, including its software banner. The reviewed Linux +`Lavf61.1.100` and Windows `Lavf61.7.100` producers can emit identical stream +metadata, timestamps and per-frame checksums with different software comments. +The verifier retains the actual raw digest and accepts a historical digest only +when changing that single banner to a reviewed producer reproduces it exactly. +It reports each use in `decodedHashCompatibilityMatches`. All remaining checksum +bytes, published-file SHA-256, audio PCM, provenance and review checks stay strict. +For AV identity, only a matching historical video identity and the actual decoded +audio identity can reproduce the recorded AV hash. No media, manifest hash or +approval record is rewritten. This compatibility does not qualify a changed +template recipe; stale creator locks and other release failures remain blocking. + ## Live generation batching The maintainer-only Gallery runner may reuse a loaded pipeline only for consecutive templates with the same normalized Studio `modelType`. The first template, every model boundary, and every failed template resets the reuse chain and invokes accelerator cleanup. Template inputs come from an explicit checked-in input map; the runner never acquires or repairs a model during execution. Use `npm run gallery:run -- --help` for the current options rather than retaining dated host-specific command batches in documentation. + +## Retained whole-workflow Auto observations + +### Reviewed native media and qualitative acceptance + +The maintainer provenance reader also recognizes completed first-attempt Expert +image/video graphs with explicit Encode Inputs, Denoise and Decode stages, and +modular audio semantic-generation/denoise/decode graphs. It requires exact +task, session, output, workflow, source, immutable model and captured resource +joins. Connected controls must identify their actual source port. Additional +terminal shot exports are allowed only as declared siblings of the selected +film. A backend adapter's implicit model dependency requires a source-bound, +immutable dependency audit; an extra model name alone is insufficient. + +This recovers an executed resource identity, not hardware qualification or a +claim that every requested field was independently captured. In particular, +lyrics missing from native consumption telemetry remain unverified. Historical +forms, receipt flags and model versions are preserved unchanged. + +A reviewed asset may retain qualitative human acceptance with null numerical +scores when a valid `maintainerAcceptance` binds the exact review. This does +not waive technical proof, hard failures, playback requirements or explicitly +rejected output identities. Accepted visual limitations remain in the review. + +A video-to-video showcase may declare `expectedOutput.sourceTiming` with the +genuine input's byte hash, frame count and cadence. Only matching before-source +and complete output timing permit a short source clip through the Gallery +duration floor. Ordinary video checks keep their existing minimums. A short +card derivative may repeat that clip; the full accepted output remains intact. +Audio delivery-rate checks use the native stream rate, separately from the +48 kHz PCM normalization used for comparison hashes. These are Gallery curation +rules; they add no duration or time limit to user workflow execution. + +A normal graph Run can have a verified whole-workflow Auto receipt without a +primary Studio candidate ID. For a completed, fresh, unquantized native modular +text-to-image graph, the provenance reader can recover an observed resource +identity from the original task's backend-resolved fields and consumed node +receipts. It checks the exact request/output/task/attempt/session/workflow joins, +worker graph hash, immutable literal model owner, controls and backend task +declaration. Missing, conflicting, connected, reused, deferred, patched or +unsupported evidence stays held. Client form intent alone supplies no identity. + +The `observed-workflow-auto-resource-v1` identity records that executed recipe; +it does not assert a registered primary Auto recipe, hardware qualification or +publication approval. Node IDs, prompts and seeds do not manufacture distinct +resource recipes; model pins, effective settings and geometry remain bound. +Original tasks retain their original candidate fields, source and capture time. +Native BF16 ordinary Expert graphs can recover a manual loading identity only +from a completed first attempt with exact task/session/workflow/form joins, +complete consumed owner controls, a freshly activated adapter state matched to +every declared ordered adapter, and the complete immutable installed model set. +The supported graph is one connected text-to-image owner with an optional ordered +LoRA chain, Guider and Spandrel upscale, and one or two Preview leaves. The manual +recipe names the concrete captured loader class; a historical Studio chooser alias +stays unchanged in the original form. Missing, reordered or contradictory adapter +applications fail closed. The selected output must retain every ancestor; an unused base +Preview is the only permitted missing capture. A graph alone, reused owner or +partial capture cannot supply this identity. Missing form weight format and +ancillary profile identifiers remain absent; the explicit native loader format +is recorded separately. Uncaptured upscale controls remain graph evidence and +must not be presented as native per-control telemetry. The existing FP8r Expert +reader keeps its separate durable-authoring checks. +The text-to-image observation also retains an optional `EncodePrompt` +`max_sequence_length` control. It must be a positive safe integer, recorded as +an unconnected literal in the graph and native consumed-input capture, and +equal the requested form's `maxSequenceLength`. Missing or omitted captures, +coercible values, conflicting controls and other encoder fields remain held. +This evidence check does not replace the backend's model-specific token limits +or infer an unexposed encoder control. A missing negative-prompt port is allowed +only when the form is empty and the native capture has no such field or omission. +A legacy text form model label requires matching active durable ModelsLoader +authoring and literal pipeline binding; the observed identity retains that label +separately from the consumed loader class. +Fresh plain and single-adapter Auto text graphs can also retain decoder width +and height connected to the denoiser outputs. Both native values, source node +and ports, backend-resolved dimensions and any retained inline defaults must +agree. The observation records `decoderGeometryRoute: denoiser_dimensions`; +final validation checks the canonical decoder, denoiser, output and locked +dimensions even if someone removes the marker and recomputes metadata hashes. +This does not relax historical missing-port, adapter or image-edit checks. +Do not rerun a model merely to add this maintainer metadata, rewrite a raw task, +refresh a stale public template lock, or infer missing consumed defaults. The +existing source/model/input/media validators and human review still apply. + +A separate `observed-workflow-auto-lora-resource-v1` vocabulary covers one +literal pinned Hub `ModularDiffusers.Lora` descriptor connected to the ordinary +modular text-to-image owner, optionally with the existing Guider. It requires the +original complete, freshly activated native adapter application and the existing +strict ordered-adapter proof, including installed base/adapter identities, +artifact pin/hash, name and numeric scale. The resource projection retains the +validated adapter material; per-application IDs stay in execution evidence and +do not manufacture a different resource recipe. The final provenance validator +joins that projection back to the strict native proof even if someone recomputes +its hash. Legacy plain-graph identities are unchanged. + +Multiple adapters, predecessor chains, scheduler overrides, connected descriptor +controls, missing/ambiguous pins, unavailable/truncated state and reused owners +remain outside this observed-reader scope. This reader runs only in maintainer +evidence tooling: it does not add an Auto recipe, execute a supplier, alter saved +graphs/receipts, acquire weights or grant hardware, quality or publication +qualification. A missing original task candidate remains missing; the derived +observation records the actual retained execution separately. + +The `observed-workflow-auto-audio-resource-v1` vocabulary covers a fresh, +unquantized direct-audio text-to-audio graph or its ordinary Load → Generate → +MatchLoudness → Join → Export continuation. It requires a completed first attempt, +one immutable installed model, the exact five/eight-node graph and typed audio +contract, matching request/task/output/session/workflow/form snapshots, the worker +graph hash, complete native consumed controls and backend-resolved Auto fields. +Automatic attention, the exact loader/recipe/disabled quantization settings and +every claimed creative input must agree; a form selection alone is insufficient. + +The resource projection distinguishes the requested source duration from the +full generated continuation target and final delivered duration. Prompt, lyrics, +seed and node labels remain in execution evidence rather than manufacturing new +resource recipes. Rehashed observations must still match the canonical controls, +installed model pin, sample rate and output duration. Original tasks keep their +absent primary candidate ID. Repaint, variation, patched/deferred/reused owners, +quantization and unsupported graphs stay outside this reader's scope. A valid +observation closes only this execution-identity gap: source/input/media checks, +human listening, current-template review and publication decisions remain +separate. It adds no runtime, Auto admission, hardware qualification or download. + +The separate `observed-workflow-auto-video-resource-v1` vocabulary currently +covers the eight-leaf native LTX text-to-video path with its pinned 2× Spandrel +delivery. It requires a completed first attempt, matching original graph, +task/session/workflow/form, native consumed controls, backend-resolved placement, +both immutable installed owners and measured delivered geometry. Reused owners, +adapters, external inputs, additional controls, compilation, quantization and +unsupported paths remain held. The shared requested encoder length is retained +separately from the native LTX cap of 128; at guidance one the authored empty +negative prompt is captured as null. Neither value is rewritten in the receipt. +Rehashed projections must still match the canonical graph, model set and final +frame geometry. This maintainer-only observation adds no admission, execution, +quality approval, resource fit or hardware qualification. + +The maintainer-only `observed-native-auto-video-stages-v1` reader records the +explicit multi-shot LTX and pinned Wan 1.3B stage paths, including VACE's encoded +render and retained-shot assembly. It joins the completed first-attempt task, +output, native consumed inputs, original graph hash, immutable models and actual +backend-resolved Auto placement. It retains the complete runtime preparation +observation instead of describing prepared or scheduled work as an empty plan. +Its derived resource identity binds the canonical graph, complete model set, +input artifacts and backend source. Resource controls, native stage bindings +and the upscaler's installed pin must +also match the canonical graph; recomputing an observation hash cannot replace +those controls or turn this record into hardware or full-field qualification. +Existing closed LTX observation identities are preferred and remain unchanged. +This reader does not execute, admit or +qualify a model; full field accounting, input/media verification, output quality, +independent memory evidence and publication approval remain separate checks. + +If a synchronized output omits the client's API graph snapshot, this reader can +instead retain the exact separately captured loopback `POST /graph` body. The +request must match the supplied API graph, completed task/session/run identities, +native consumed inputs and backend Auto preparation. The observation explicitly +records that the output snapshot was absent, preserves the original request and +its byte hash, and rechecks its canonical graph when validating a saved proof. +Missing capture, contradictory snapshots, altered requests and non-native paths +remain rejected. Neither the output nor the original request is backfilled. +For the pinned Wan video-to-video route, the encoded normalized source supplies +the frame count; the sampler's unused form literal is not reported as consumed. +Its captured source length and dimensions must match the connected normalization +stage, and active strength must be captured. Source pixel hashes and unrecorded +normalization details still require separate media verification. +Release artifact declarations split an executed multi-model revision lock into +its individual immutable repository pins. A generator/upscaler pair must never +be emitted as one repository name; existing pins are retained and deduplicated, +and malformed or conflicting locks fail the contract check. + +The `observed-workflow-auto-image-resource-v1` vocabulary covers one fresh, +unquantized one-reference edit or two-reference modular image-conditioned graph: one literal pinned +ModelsLoader, Image.Load, ImageEncode, EncodePrompt, Denoise, DecodeLatents and +Preview. Every source file must have ordered native hashes and complete RGB +geometry captures. ImageEncode must use that loader's VAE; its latents and the +same loader's text, denoiser and decoder components must reach the sole output. +Task, attempt, session, workflow, form, worker graph hash, resolved Auto controls +and consumed controls must agree. Reused, deferred, patched, quantized, +adapter-bearing and unsupported graphs remain held. + +The reader also covers the eight-leaf single-reference native-state route with +an explicit Guider. Its original `edit_image` task remains recorded. ImageEncode +and Denoise must consume the same Guider, Denoise must consume ImageEncode's +route state, and DecodeLatents must consume Denoise's route state. The literal +ClassifierFreeGuidance configuration and all eight captured scalar controls +must agree; an empty, unconnected layers slot stays empty. Masks, crops and +other route variants remain outside this reader's scope. + +Historical image-conditioned captures can explicitly report `graphTasks.task: +null`. That null remains recorded as `reportedGraphTask`; it is not rewritten as +a backend task declaration. The observed operation comes from the saved +edit or multi-reference mode, literal `image_conditioned` workflow and complete connected +path. A legacy form model label is retained separately from the actual executed +loader class and immutable installed model. Neither a label nor an Auto hint +alone establishes execution evidence. + +For a single-reference edit, an explicit ordinary owner loading override can +differ from the requested form policy. The observation retains both requested +offload fields; the effective policy still requires literal graph controls, +backend-resolved Auto fields and native consumed-input agreement. The final +validator checks the requested fields against the locked template and the +effective fields against the canonical graph. This does not qualify the +requested policy or another device. The two-reference policy checks are unchanged. + +An upscale comparison can retain the genuine internally generated base export +as an `upscaleSourceComparison` artifact. Verify its original task/output join, +durable path, bytes and hash before binding it to the before panel. This records +the comparison export; it is neither an external reference nor a claim that the +upscaler reopened that encoded file. Obtain exact-file publication rights for +both the base export and final image. + +The separate `observed-workflow-auto-legacy-resource-v1` vocabulary covers a +fresh, unquantized modular text-to-image owner with an optional Guider when the +original loader contract exposed neither `weight_format` nor +`weight_loading_mode`. Both fields must also be absent from the graph, native +trace and resolved Auto fields; the form must have no weight-format selection. +The recovered complete source inventory must match the worker attestation, and +the retained node contract must confirm the missing ports. The observation binds +both source and contract fingerprints and leaves the loading mode absent. +Reused owners, adapters and image-conditioned graphs remain outside this +historical vocabulary. Final validation joins the actual controls, connected +path, current recipe, sole immutable model and full image geometry. This closes +an execution-identity gap without claiming an unrecorded loading policy, +independent memory monitoring or hardware qualification. +When the old decoder consumes dimensions from the denoiser, both connected +native values and source ports must agree with the graph and output geometry. +Any retained inline defaults stay recorded. An optional Guider requires all eight +native scalar controls and the same connected owner at prompt encoding and +denoising; unsupported guidance configurations remain held. + +The `observed-retained-expert-text-resource-v1` vocabulary separately covers a +retained, first-attempt Expert text-to-image task with six executable leaves: +one modular owner, explicit ClassifierFreeGuidance, prompt encoding, denoising, +decoding and CPU Preview. It requires BF16, group-CPU offload, no quantization or +adapters, and an immutable Hub revision. The old loader contract, graph and native +capture must all lack `weight_format` and `weight_loading_mode`; the missing +controls remain absent. A legacy form model label and a blank original loader +workflow ID stay separate from the durable modular pipeline and executed task. + +Pass `retainedNativeEvidence` to `createRunProvenance` only with the original +receipt, requests, responses, derived call record, raw JSONL journal and observer +metadata, each as `{ text, sha256 }`. Each UTF-8 record is bounded to 16 MiB and +their total to 48 MiB. Invalid records produce no fallback resource identity; +this option cannot be combined with `canonicalAccountingProof`. The reader joins +the sole submitted graph and successful response to the task/session, complete +source inventory, six native captures, three actual official calls and returns, +every scheduler step, applied component policies and decoded image geometry. +The original scheduler's first started index is null; its returned indices +must be 1 through the full step count. Journal events from other tasks supply no +proof. Observer metadata must predate execution; the retained library metadata +must identify the official Diffusers upstream and immutable commit. + +The bounded observation retains the six raw-record hashes and whether the output +originally had an API graph snapshot. A separately captured request can witness a +missing snapshot; it never inserts one into the original output. Final validation +rejoins the canonical graph, locked settings, source/contract fingerprints, sole +pinned model and single image. A hash of the originally executed creative and +VAE controls also rejects matching edits to both graph and public settings. +Prompt/seed changes alter the execution-plan hash, +while the resource identity describes the same resource recipe. This historical +reader supplies no independent memory monitoring, original-time installed file +inventory, reconstructed loading controls, residency or hardware-fit claim. All +ordinary model-byte, media, quality, rights and publication checks still apply. + +The separate `observed-retained-direct-image-resource-v1` reader handles a +retained first-attempt direct image task: one `LoadPipeline`, connected +`DiffusersExecutionRecipe` and `PipelineQuantizationConfigV2`, generic `Inpaint` +or `ControlGenerate`, one or two image loaders, and CPU Preview. An optional +`OutpaintCanvas` must have its own original observed call and return. The route +requires BF16, an immutable Hub revision, no quantization or applied adapters, +and a consumed model-CPU or group-CPU recipe. Auto and Expert remain distinct. +This is a maintainer evidence vocabulary; it adds no runtime, execution route, +Auto admission, package activation or hardware qualification. + +For this route, `retainedNativeEvidence` has eight `{ text, sha256 }` records: +`receipt`, `requests`, `responses`, `derived`, `journal`, `observer`, `comparison` +and `inputs`. The first six are preserved originals. `comparison` is the original +image comparison contract, including its positional source roles. `inputs` is a +current, independently verified pixel inventory: `{ schemaVersion: 1, sources }`. +Each source records `role`, `contentHash`, `byteSize`, `originalContractRole`, +`decodedRgbaSha256` and `[width, height]` as `size`. Construct this inventory from +the actual current encoded files and decoded RGBA pixels. Its semantic roles +must match `inputArtifacts`; the original contract's positional roles remain +separate. A current file hash cannot supply a missing original PIL pixel hash. +The journal limit is 64 MiB, the current input inventory limit is 1 MiB, other +records are limited to 16 MiB each, and the total is limited to 112 MiB. + +The reader joins every original scheduler step and sole official call/return to +the submitted graph, task/session/attempt, native consumed controls, complete +source inventory, sole current model identity, exact source bytes and original +PIL pixel hashes. Prepared outpaint additionally joins the actual source pixels, +utility controls and source body, prepared canvas/mask and model call. Scalar +and one-item-array file selections, original alpha policies, legacy form model +labels, and current operation names are preserved. True CFG and embedded guidance +stay separate; an unsupported negative-prompt field remains unused. The consumed +connected recipe stays separate from the loader's inactive offload fallback. + +Final validation binds the observation back to the canonical graph parameters, +locked controls, template/task, source/contract fingerprints, model pin, input +roles/bytes and single output geometry. Invalid records never fall through to +a manual identity, and this route also excludes `canonicalAccountingProof`. +Original null candidate IDs remain null. The recorded direct component hook +markers are unobserved; consumed recipe controls do not prove native hook +placement, residency, independent memory monitoring or fit. A separately reviewed +implementation-file hash and immutable official library commit remain distinct +from the call observer's decorator-file hash. All normal model-file, media, +quality, rights and publication gates remain required. + +The final validator joins the observed identity back to the original canonical +controls, single installed model, freshly applied empty adapter state, ordered +input paths/hashes and measured output. Rehashing a changed observation cannot +substitute another model, input order, control tuple or output. Source dimensions +remain native capture evidence; no new pixel identity is inferred from file +hashes. Existing source, input-byte, media, quality, rights and publication checks +still apply. The original primary candidate and template identifiers remain +absent where originally absent. This maintainer-only reader does not execute a +model, admit a resource recipe, qualify hardware, alter saved graphs or authorize +publication. Other image, video, repaint and variation routes need their own +evidence review. + +`observed-native-modular-image-resource-v1` separately joins original completed +single-reference edits, ordered two-reference edits with one native stitch, +and three-layer image decompositions. It checks the original graph, immutable +model bodies, source and contract fingerprints, native captured controls, +ordered input identities and actual output bytes. Legacy form pipeline labels +remain separate from the actual modular owner. Fields absent from native +capture stay declared-only; unavailable adapter observations remain unavailable. +This maintainer-only reader neither executes models nor establishes full field +accounting, resource admission or hardware qualification. + +For an approved retained layer sheet, `template-gallery-retained-layer-sheet.py` +can verify original lossless PNG exports by reproducing each native WebP byte +stream at its recorded quality setting, then reproduce the approved sheet. +Its derivative records both native and lossless identities, the recomposition +error, processor hash and font metadata. An optional operator-supplied font is +not redistributed. The original creation-time review caption is preserved; +the separate accepted quality record supplies the current review decision. +This reproduction does not claim the new processor created the original run. + +The compact generated input map preserves explicit binding IDs, asset IDs and +filenames in optional packed metadata. Default identities retain their previous +encoding. Changing a reference body must not silently rename another input or +lose a versioned material-strip filename during JSON-to-TypeScript generation. + +`observed-retained-modular-image-resource-v1` covers a retained single- or +two-reference modular edit with eight native leaves, or nine with one applied +adapter. It joins the four original official encode/image/denoise/decode calls, +every scheduler step, complete native captures, immutable base and adapter +identities, source/contract fingerprints, ordered current input bytes and +original consumed PIL pixel hashes. Its eight bounded evidence records use the +same names and size limits as the direct image reader described above. + +An adapter additionally needs its original load and activation, actual weight +body, transformer object binding, and the active scale on every consuming +forward and layer within the denoise interval. Configured names and generated +runtime names remain distinct. Native CPU and accelerator Preview devices are +preserved. Absent historical loading controls remain absent. The original graph +task may be null, and generic form strength/sequence fields are recorded as +unused when the original calls did not consume them. + +The identifier binds the complete observation, rejects contradictory or unknown +authority fields, and the final validator joins it back to canonical controls, +model pins, adapter descriptor, input roles and output dimensions. Invalid raw +records cannot fall through to a manual or Expert identity. This read-only +historical vocabulary supplies no original-time installed inventory, independent +memory monitoring, resource admission, residency or hardware qualification, and +does not authorize publication. + +The separate `observed-workflow-auto-masked-image-resource-v1` reader binds a +fresh nine-leaf native inpaint: source and mask loaders, model owner, Guider, +prompt/image encoding, denoise, decode and Preview. Its deliberately narrow +whole-compatible route keeps the actual group-CPU graph policy separate from +the saved form's requested loading. It joins both native encoded-body hashes, +source/mask dimensions and modes, consumed controls, resolved Auto fields, +single immutable model and output geometry. `whole_v1` is supported by the +original graph and Auto resolution; it is not presented as an independently +observed official-call argument. The generic sequence-length form field remains +explicitly unused. Reordered semantic roles, extra suppliers, missing captures +and changed source/mask bodies fail closed. This receipt reader supplies no +runtime, resource admission, quality approval or hardware qualification. + +The native video reader also handles a ten-leaf source-video remaster with +`Video.Load` and `VideoConditioning.Normalize`. Supply a separate bounded +`videoNormalizationEvidence` to `createRunProvenance`: the exact encoded source +hash/size, original geometry/frame rate/count, declared cover crop and sampled +geometry/count, ordered RGB pixel descriptors, native normalized-pixel digest, +the complete backend source fingerprint and the four preparation/capture file +hashes, plus the local decoder distribution versions and executable hash. Build +it by decoding the exact source with the recorded decoder and replaying only the +attested pure preparation functions. Its digest must equal the original +Encode Inputs connected pixel capture. A current encoded-file hash is not +invented for `Video.Load`, whose native receipt does not contain one. + +The final validator binds this evidence back to the encoded input, connected +normalizer, full source inventory, original normalized frame sequence, generator +and upscaler. Active `denoise_strength` stays separate from the generic inactive +`strength` and independent conditioning scale. Source timing, cover cropping and +uniform frame sampling remain visible limitations; neither a playback review nor +photorealism follows from a matching pixel digest. Retained or canonical +accounting records cannot substitute for this fresh native evidence. + +Accepted native recipes can declare bounded numeric-array encoding presets in +`workflowBlockSettings.encodingInputs`. Fresh graphs use the existing JSON text +utility inside **Encode Inputs**, wired to declared compatible encoder fields. +The template lock includes these presets. This changes neither saved drafts nor +the backend execution path. Redux's accepted 80/20 recipe binds the JSON literal +to both original native consumer arrays; missing supplier controls remain absent. + +The retained `executed-expert-audiovisual-graph-v1` evidence reader covers the +reviewed two-owner LTX/ACE composition, with immutable pins and original native +loader/generator captures. It preserves missing historical preparation mode, +audio graph-task and fitting-control captures as limitations. It supplies neither +Auto admission nor hardware qualification. Unknown owners, extra suppliers, +contradictory modes or altered captures fail closed. + +Quality checks take duration and caption applicability from the authoritative +template declaration. Moonflower's accepted nine-scene recipe is 45 seconds with +an empty, disabled lyric overlay; caption synchronisation is explicitly not +applicable. Enabling lyrics retains the listening and cue-alignment requirements. +Its accepted quiet garden motion uses the existing localized-subject profile: +3% adjacent-frame coverage, 75% cumulative coverage, 80% active and 65% strong +motion windows, with at most 50% low-motion frames. The previous 8% adjacent-frame +expectation is retained in the pre-registration declaration. Petal changes and +limited motion remain accepted visual limitations, not flawless geometry claims. diff --git a/docs/template-gallery-dataset-card.md b/docs/template-gallery-dataset-card.md index 37e95cd0..38724701 100644 --- a/docs/template-gallery-dataset-card.md +++ b/docs/template-gallery-dataset-card.md @@ -107,3 +107,7 @@ Maintainers generate and verify the storage manifest locally, upload one reviewed asset set, and pin the resulting commit SHA in MoDiff. Replacing a file creates a new asset-set identity and requires a new pinned Dataset commit. Historical application releases continue resolving their original revision. + +## MiniMax-Music3 example disclosure + +The Leave a Little Light example and its previews are **AI-generated music — MiniMax-Music3**. The per-file ledger retains the immutable publisher license and acceptable-use terms. Human acceptance of this example is not an independent lyric, similarity, or listening certification. No model weights are included. diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 6b54cab2..24daead6 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -37,11 +37,11 @@ The launcher also saves its latest report at `artifacts/dev-server-current/backe The supported client toolchain is defined in `.nvmrc`, `package.json`, and `package-lock.json`. 1. Confirm Node `24.12.x` and npm `11.6.x`. -2. For paired development, rerun `./install-dev.sh --accelerator auto` or - `.\install-dev.ps1 -BackendPath ..\MoDiff -Accelerator auto`. Use `npm ci` - directly only for client-only work against an already-installed backend. - Do not regenerate the lockfile just to work around an install failure. -3. If the lockfile and manifest intentionally changed together, run `npm install` once as part of that dependency change, review the diff, and return to `npm ci` for validation. +2. For paired development, run `uv sync --locked` with your accelerator extra in the + backend, then `npm ci --include=dev` here. The combined development installers remain + available for specialized profiles. Do not regenerate the npm lockfile just + to work around an install failure. +3. If the lockfile and manifest intentionally changed together, run `npm install` once as part of that dependency change, review the diff, and return to `npm ci --include=dev` for validation. 4. If native browser installation fails, retry `npx playwright install chromium` and follow Playwright's platform dependency message. ## Backend Path Not Found @@ -110,12 +110,59 @@ If direct requests work but proxied requests do not: If using direct server mode, `VITE_SERVER_ADDRESS` must include the protocol and must point to the backend, not the Vite port. -The production bundle derives its supervisor address from the backend address, -using the adjacent port (for example, backend `8096`, supervisor `8097`). Vite's -development proxy settings do not select the production recovery endpoint. -Set `VITE_SUPERVISOR_CONTROL_ADDRESS` explicitly at build time only when the -supervisor uses a different address. This endpoint must stay available while -the model worker is restarting so Stop and queue recovery can work. +Browser refresh closes the previous WebSocket and requests. MoDiff cancels the +old health probe and ignores callbacks from that connection; reconnect requires +a successful backend `/health` response. Vite filters only teardown errors tied +to the closed browser socket. Connection refusal, backend resets while the +browser is still connected, and other errors remain visible. If errors repeat, +record the terminal and stack excerpt and check `/health` directly and through +the proxy; a locally served favicon does not prove the backend is ready. + +For `Error: write ECONNABORTED`, retain the line immediately before the error and +the bounded stack. Archived Windows examples came from Vite's `ws proxy error` +and `ws proxy socket error` loggers. That identifies a development-proxy path; +the same error text without those prefixes does not establish the same cause. +Integrated production serving does not use the Vite proxy. + +If it recurs, record: + +- Which terminal emitted it: Vite/Node, backend/Python, supervisor or a tunnel; + include the process/port identity and exact client/backend revisions. +- The timestamp, startup/refresh/close gesture and whether a task was active. +- The error prefix and bounded stack, with secrets and private paths redacted. +- Direct and proxied `/health` status/body, using the actual configured ports. + Keep connection refusal and malformed/unready responses visible. + +Do not stop or repeat a generation merely to collect this record, attach an +extra socket to its session, or suppress all abort/reset errors. Existing focused +checks can run without models or downloads: + +```text +node --test scripts/backend-proxy-lifecycle.test.mjs scripts/websocket-connection.test.mjs +``` + +MoDiff uses the backend's verified `workerControl` metadata for the supervisor +address. A standalone worker advertises no supervisor, so background queue reads +are skipped. Startup waits up to one second for node/runtime discovery already +in progress, then retains the existing five-second queue restoration bound. +A busy worker or older backend without metadata keeps the trusted loopback +fallback: the adjacent backend port (for example, `8096` → `8097`), or the +explicit build-time `VITE_SUPERVISOR_CONTROL_ADDRESS`. That endpoint must stay +available while the supervised model worker restarts. Temporary health failure +retains the last verified supervisor address; genuine connection failures remain +visible and retries use bounded backoff. Explicit Stop remains immediate. + +When using an SSH tunnel, forward both the backend and supervisor ports. For +example, if backend `8088` and supervisor `8089` are forwarded to local `18088` +and `18089`, open `http://127.0.0.1:18088`. The client resolves that verified +adjacent pair through the local tunnel instead of contacting local `8089`. +Development uses the actual backend proxy target, or an explicit +`VITE_SERVER_ADDRESS`, rather than the frontend port. A custom nonadjacent +supervisor mapping requires an explicit loopback +`VITE_SUPERVISOR_CONTROL_ADDRESS` when building or serving the client. An +unresolved mapping makes no supervisor request; Stop can still use the ordinary +backend endpoint. Direct backends retain their advertised custom supervisor +port, and remote or malformed supervisor destinations remain rejected. ## Registry Or Studio Nodes Are Missing @@ -178,6 +225,11 @@ Use Auto for the first known recipe. Switch to Expert only when you intend to di 4. Retry with a known Auto recipe, smaller spatial/temporal inputs, fewer frames, or a lighter model. 5. Restart the backend if the runtime remains unhealthy. +Cleanup warnings appear with the server's exact reasons. For example, live +offload hooks can retain their disk files even after other caches are released. +A zero released-file count alone does not mean cleanup failed: files may already +have been reclaimed when their owners were released. + An Auto recipe can reduce risk but cannot guarantee success under changing memory pressure. Include the selected model, task, dimensions/frames, and the redacted exception type in a bug report. ## A Run Is Taking Much Longer Than Expected diff --git a/docs/video-workflows.md b/docs/video-workflows.md new file mode 100644 index 00000000..ee89db67 --- /dev/null +++ b/docs/video-workflows.md @@ -0,0 +1,92 @@ +# Video workflows + +New selected LTX and Wan workflows use shared stage nodes: **Model Setup → Encode +Inputs → Denoise → Video Output**. Expand a group to inspect and edit its ordinary +nodes. A model-specific function is not presented as a new kind of frontend node. +Four is not a stage limit: upscaling, a separately generated soundtrack and audio +timeline fitting remain visible when a template includes them. + +LTX's declared separate-stage tasks accept text, an opening image, ordered +reference images or source video. The selected Wan 2.2 5B backend route currently +accepts text only. Model names and cached weights do not prove another task is +supported. Existing whole-pipeline graphs retain their original representation; +loading an old workflow does not migrate its nodes or discard saved settings. +For whole-pipeline stages, passive visibility updates affect existing fields. +A newly declared field or explicit value can still appear after a model change. + +Choose a supported task and exact model selection, enter the prompt and required +media, and review the resource settings before Run. The backend owns loading, +sampling and decoding. Auto availability and native validation remain separate +from whether a template can be created. Large video model acceptance is performed +on Linux; this interface does not promise that those weights fit every Windows +machine. + +New video drafts also connect ordinary file loaders for their declared required +image, video or audio inputs. Select the files on those loader nodes. Inputs with +different roles, such as first and last frames, keep separate loaders. An absent +or incompatible loader produces a connection notice instead of a guessed wire. +Existing saved graphs are not rewritten. + +For a model that requires VAE tiling, Model Setup shows **VAE Tiling +(required by model)** switched on and locked. This also appears in the node +inspector and on the execution recipe when viewing its individual nodes. +A shared recipe's **VAE Tiling (optional models only)** switch still controls +its other models. Disconnecting the required loader restores the saved choice. + +Encode Inputs can reuse unchanged prompt data. Denoise consumes encoding from the +same model owner, and Video Output decodes that owner's current latents. Changing +the owner or relevant recipe requires fresh runtime data. Saved values and wires +survive reopening; runtime tensors are recomputed after restarting the app. + +LTX templates retain their delivery upscaler. Wan's music-video template retains +its independent audio model, authored soundtrack, timeline fit and muxed export. +An independently generated soundtrack is not described as audio from the video +decoder. A real upscaler between decode and export remains a separate stage. + +When an upscaler or separately produced soundtrack follows decoding, the +connected denoiser and decoder appear as **Generate**. The shared pipeline +input feeds both operations and checks that the selected model supports both +actions. An exclusive video loader and normalizer appear in one input stage. +The card uses its declared role, such as **Source Video** or **Control Video**, +and shows **Video Input** when the saved workflow has no role. The file picker +previews the clip. Target width, height, frames and fit control normalization. +Use **Edit stages** to inspect the underlying operations. + +In a saved workflow, choose **Model Setup → options → Simplify connected +stages** to apply the same grouping to that branch. Undo restores its previous +presentation. + +The implementation and proof boundaries are described in the paired backend's +`docs/video-pipeline-stages.md`. Schema tests and mocked workflows establish +authoring behavior, not successful video generation. A testable release needs +native task completion and playback on the deployed source pair. + +For a separately encoded Generate stage, select the source video, mask and +references at its input stages. Generate requires their connected encoded result +instead of asking for those files again. Current backend declarations govern +readiness after reopening a saved workflow; the saved fields and values remain +unchanged. A disconnected or disabled encoder continues to block Run. + +Inside Shot groups, input-stage file controls are aliases of the actual loader. +Run validates the selected files on that loader and the resolved Block boundary; +an empty structural control alias does not add another file requirement. This +also applies to nested image, audio and video input stages. Empty or disabled +real suppliers still leave their consumers blocked. + +New successful stage runs capture the actual video task, encoded prompt and final +frame format in output history. The optional `graphTasksVersion: 2` distinguishes +the added video-owner vocabulary from older receipts. Existing receipts and saved +forms remain unchanged; missing or conflicting observations do not become support +or publication qualification. + +The model manager can show backend-declared task artifact selections. Choose the +task before Install or Repair; text/keyframe and reference workflows can need +different transformer partitions from the same repository. Installed status is +checked against that selection's exact revision and files. Downloading one +partition does not mark the others installed. This uses the existing model +download and terms acknowledgement flow, without a second installer. + +First/last-frame starters show their separate image inputs. Reference starters +show their ordered reference inputs and assembler. Switching tasks must preserve +compatible data and archive incompatible controls; it must not insert an empty +reference helper into a keyframe workflow. diff --git a/docs/windows-support.md b/docs/windows-support.md index 01d4c5ca..b720cdd7 100644 --- a/docs/windows-support.md +++ b/docs/windows-support.md @@ -7,7 +7,7 @@ can use the uv/npm commands below; combined PowerShell launchers are also availa - 64-bit Windows 10/11 - Git -- uv `0.11.26` for the developer commands below; it can provision Python 3.12 +- uv for the developer commands below (no exact version required); it can provision Python 3.12 - PowerShell 5.1 or PowerShell 7+ - Node.js `24.12.0` and npm `11.6.2` - A current NVIDIA driver for CUDA workflows @@ -25,42 +25,60 @@ C:\path\to\projects\ `-- MoDiff-client\ ``` +Maintainers publishing these paired changes should commit and push the backend +first, then obtain that backend commit's full SHA with `git rev-parse HEAD` from +`MoDiff`. In `MoDiff-client/.github/workflows/ci.yml`, replace the historical +`ref` under **Check out the matching backend contract** with that actual SHA +before committing and pushing the client. Keep the backend reference immutable; +do not replace it with a branch name or a guessed future SHA. Client CI checks +the paired backend's `uv.lock` and node contracts, so its old backend pin cannot +validate this migration. Pull both corresponding commits on the Windows test +workstation before running the setup and validation commands below. + +Private comparison HTML and runtime evidence are kept outside both Git +repositories and do not arrive through `git pull`. Copy a supplied standalone +HTML separately to review its embedded old/new images offline. Its numerical +results apply to the recorded same-host/runtime pairs; Linux ROCm and Windows +CUDA are not guaranteed to produce identical pixels. Record Windows hardware, +runtime and outputs separately, and check migration parity against a matched +same-platform baseline. + ## Developer Setup With uv And npm -From a clean backend checkout, install the CPU development profile: +From a clean backend checkout, install the native NVIDIA profile: ```powershell -uv run --no-project --no-sync --python 3.12 -m modiff.dev plan --accelerator cpu --backend-only --json -uv run --no-project --no-sync --python 3.12 -m modiff.dev setup --accelerator cpu --backend-only --non-interactive -uv run --no-project --no-sync --python 3.12 -m modiff.dev check --json --check-port 8088 --fail-on-error -uv run --no-project --no-sync --python 3.12 -m modiff.dev run +uv sync --locked --extra cuda +uv run --locked --extra cuda python -m modiff.preflight --json --check-port 8088 --fail-on-error +uv run --locked --extra cuda python main.py ``` -In a second terminal, from `MoDiff-client`: +Use `--extra cpu` for CPU development or `--extra xpu` for supported Intel +hardware. Keep the same extra on sync and run. In a second terminal, from +`MoDiff-client`: ```powershell -npm ci +npm ci --include=dev npm run dev ``` -Open the URL printed by Vite. Stop each process with `Ctrl+C` in its terminal. -These commands do not require running a repository PowerShell script or changing -PowerShell execution policy. The backend-only install serves the checked client -bundle too, at . - -Setup installs Python packages, including Torch, without downloading inference -weights. An existing managed `.venv` is preserved; use `check` to inspect it and -`run` to launch it. Test a clean CPU install in a separate checkout from a working -GPU environment. A deliberate profile replacement requires `setup --repair`. -Choose `--accelerator nvidia`, `intel`, or `auto` in both `plan` and `setup` for -the applicable accelerator profile. Optional runtimes retain their explicit -installation and consent flow. - -The backend's [developer setup guide](https://github.com/sdevil7th/MoDiff/blob/feat/generic-diffusers-workbench/docs/developer-setup.md) -explains the managed dependency contract and uv flags. Ordinary `uv sync` and -project-resolving `uv run` are not supported in the accelerator environment. -For named API inputs/outputs and the model-free service example, see the -[service prototyping guide](https://github.com/sdevil7th/MoDiff/blob/feat/generic-diffusers-workbench/docs/service-prototyping.md). +Open the URL printed by Vite. Ctrl+C stops each process. These commands do not +require repository PowerShell scripts or an execution-policy change. Transformers +and PEFT are installed with the backend, with no separate activation for normal +image and LoRA workflows. Setup downloads packages, not inference weights. +`uv sync` reconciles the selected environment; use another checkout to test a +different accelerator. The backend's +[developer setup guide](https://github.com/sdevil7th/MoDiff/blob/fix-ui-ux-issues/docs/developer-setup.md) +also documents explicit `uv pip` commands, repair, and uv upgrades. + +Windows uses PyTorch's default allocator. MoDiff does not set +`expandable_segments:True` there; explicit operator allocator variables are +preserved. Ordinary image workflows run eager/native SDPA without Triton. +Compilation is optional and must pass an executed kernel probe. Workflows that +require compiled FlexAttention fail before weight allocation when the toolchain +is unavailable. If you choose compilation, match +[triton-windows](https://github.com/triton-lang/triton-windows) to your PyTorch +version and validate an actual compiled GPU operation. ## Backend Setup @@ -104,7 +122,7 @@ For combined setup and launch through PowerShell scripts, run from `MoDiff-clien The launcher: - detects the sibling backend or accepts `-BackendPath` -- uses and validates the backend's managed `.venv\Scripts\python.exe` +- uses and validates the backend's `.venv\Scripts\python.exe` - runs the backend preflight before starting a new backend - starts the backend in a dedicated PowerShell window - starts Vite in a second window with the backend proxy configured @@ -167,13 +185,40 @@ Remove-Item Env:VITE_SERVER_ADDRESS -ErrorAction SilentlyContinue - Put Hugging Face caches and disk offload on a drive with adequate free space; configure paths through the backend, not by moving individual snapshot blobs. - Restart the backend after changing packages, drivers, or allocator environment variables. +## Optional Runtime Availability And Recovery + +The current additional optional-package profiles are not qualified for Windows +installation or activation. In **Setup**, **Optional runtimes** should report +their unavailable target and omit **Install** and **Activate** controls. This is +an expected compatibility limit; ordinary image and LoRA workflows use the +installed base Transformers and PEFT packages. Optional compiler probes are a +separate capability check. + +If an existing optional selection reports `repair_required`, return to the +verified base through the normal recovery control: + +1. Finish or cancel active and queued runs, then wait until the queue is idle. +2. Run the backend preflight above. Repair missing base packages with the same + accelerator extra used during setup before attempting the reset. +3. Open **Setup**, find **Optional runtimes**, and choose **Reset to base**. + Review **Reset optional runtime to base?**, then confirm **Reset**. +4. Wait for restart and reconnection. If a custom unsupervised launch asks for a + manual restart, restart that backend normally. Verify `/health` and + `/runtime/status`, then run an ordinary base workflow. + +The reset clears active and previous optional selections and keeps installed +optional files. It does not delete models, workflows, or output history. If no +legacy repair state exists, this recovery case is not applicable; do not create +one merely to test the button. Successful install/activation lifecycle evidence +requires a target that actually publishes qualified actions. + ## Validation Client gates: ```powershell -npm run check npx playwright install chromium +npm run check npm run check:ui ``` @@ -190,4 +235,60 @@ Before calling the Gallery functional, also run `npm run test:asset-storage` and `npm run release:assets:gate`, then confirm its pinned Dataset requests succeed in a browser where you are not signed into Hugging Face. +Use the cases below for the actual Windows workstation. Start with a model that +fits the machine and keep the template's original dimensions, steps, seed, model +revision, input images, and adapter settings when checking migration parity. + +| Case | Action and expected result | +| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Clean base environment | Run the uv/npm setup above, open Setup, and create an image template. Transformers and PEFT are available without an optional install or Activate step. Record the selected Torch build and device. | +| Fresh template graph | Create a new Gallery workflow and inspect its nodes against [Image template workflows](image-template-workflows.md). Native routes use the current developer stages, including real EncodeInputs and Guidance where supported; documented whole-pipeline exceptions retain their exact recipe. Saved workflows keep their existing nodes. | +| Repeated Auto runs | Run the full template, repeat it, then change only the prompt and seed and run again. A compatible resident model must remain usable when current headroom is sufficient. Record the Auto plan and any blocker instead of changing memory policy to hide it. | +| Browser refresh | Refresh during an active run, then after completion. Connection and queue status recover, the active task stays visible, and its output remains available. Keep the Vite terminal and browser console logs if a live connection fails; a canceled request during page teardown alone is not a backend failure. | +| Stop and recovery | Start a generation, press Stop, wait for its terminal status, then run again. The second run must not inherit a stuck task or stale busy state. | +| Model and task branches | Test the cached image families and input-conditioned branches you intend to use, including edit, ControlNet, and inpaint/outpaint. Check the complete input images, geometry, scheduler, guidance, and revision rather than substituting a lighter recipe. | +| Named LoRAs | Run a template with its full ordered adapter set and original scales, then repeat it. Confirm the run receipt retains each artifact identity and adapter name; changing or removing an adapter must affect the next run. | +| Optional runtime availability | Current additional Windows package targets report unavailable and expose no Install/Activate action. Ordinary image and LoRA workflows remain base-ready. Record the target and reason; this result is not a successful install/activation lifecycle test. | +| Legacy runtime recovery | If an existing selection reports `repair_required`, follow **Optional Runtime Availability And Recovery** above and verify the base worker returns ready. Otherwise record this case as not applicable. | +| Optional runtime lifecycle | Only on a target with published qualified actions, use Setup's Optional runtimes controls. Install must reach a clear final state; Activate must show validation, restart, and reconnection until the replacement worker is ready. Refresh during the job and verify restored progress. Current additional Windows targets do not exercise this case. | +| Eager and optional compile | Confirm ordinary image generation works without Triton. If testing compilation, run Probe and wait for its executed-kernel result before enabling it. A workflow that requires unsupported compiled attention must report that limitation before loading weights. | + +A missing base dependency or an unavailable backend is a setup defect. A reviewed +route that exceeds the workstation's capacity, or needs an unsupported optional +kernel, is a separate compatibility result; capture its exact message and +resource plan. Passing the mocked client gates does not establish Windows GPU +compatibility or image parity. The backend's +[image template validation guide](https://github.com/sdevil7th/MoDiff/blob/fix-ui-ux-issues/docs/image-template-validation.md) +documents paired output comparison and the runtime, recipe, and raw-output +evidence to retain. Historical Gallery examples remain historical until a new +execution has its own matching proof. + For integrated static serving, follow [Build and deployment](deployment.md). For listener, connection, download, and accelerator recovery, see [Troubleshooting](troubleshooting.md). + +## Controlled video and historical output metadata + +Quality video sequences connect each generated shot's FPS to its retained asset. +The builder enables that existing scalar input socket explicitly; the backend +registry remains authoritative for the field's type and other execution schema. +The controlled graph proof permits this FPS socket change only on its declared +retention node and still checks the complete reviewed route. + +Quality sequence authoring uses automatic attention unless an operator supplies +an explicit expert attention backend. A CUDA device name does not establish that +the installed Torch build provides native flash SDPA. Explicit unsupported +backends still fail before model loading; ordinary authoring must not insert one +based only on the device name. + +Sequence and quality-loop transformations disable their replaced single-shot +nodes. Their submission carries the actual ordinary graph and controlled route +identities without claiming that the removed nodes match the base single-shot +runtime specification. Additive routes keep the base receipt. A selected Auto +plan that requires a specification receipt still fails closed at the backend +when it is missing; this correction does not qualify an unsupported Auto recipe. + +Receipt-free Gallery records retain only explicitly supplied historical fields +for presentation. `legacyRecordedFields` preserves that presence through history +coercion; it is not backend execution evidence. Missing task, model and seed are +shown as uncaptured, and download names use an uncaptured model identifier. +Actual resolved execution receipts continue to take precedence over historical +form settings. diff --git a/docs/workflow-authoring-ux.md b/docs/workflow-authoring-ux.md index eca69e1a..0672fb19 100644 --- a/docs/workflow-authoring-ux.md +++ b/docs/workflow-authoring-ux.md @@ -1,49 +1,380 @@ # Workflow authoring and model selection -The developer-first editor opens Workflows and also offers Templates. It uses one editable +Creator opens Templates. Developer opens Workflows. Both use the same editable nodes, Blocks, execution path and independent memory policy. +## Choose a node on an empty canvas + +Start with Process Image, Process Audio, Process Video or Process Text/Data for a +deterministic media operation. Select the operation on the card. For generation, +start from the task to get the connected model setup, inputs, generation and output +that its adapter supports. A mask, independent control source, optional upscale +or second soundtrack has its own editable connection. + +Search for a specialist such as Gaussian Blur or Decode Latents when you need +its precise controls or an intermediate result. Dragging from a port offers +compatible specialists. **Show implementation nodes** opens the broader library. +When an output has no compatible destination, the picker can offer another +output on the same node and name a destination for it. For example, a native +depth map can offer its preview image for an image processor. **Use … output** +switches the starting socket. Choose a destination to add the node and wire, +or press Escape to leave the workflow as it was. A search with no results +can be cleared to recover the matching destinations for the original socket. +On an empty canvas, **Include catalog Blocks** adds prebuilt compositions to the +unfiltered picker. A matching name or compatible wire also finds them. Saved +Blocks stay accessible under their authored names. + +After inserting an advanced operation, its card shows the selected action. +For example, **Pipeline Quantization** supplies a quantization configuration +to **Execution Settings**, which collects device, memory and other loading +choices for the model. Search **Runtime Settings** to find both. A custom +heading on a saved node stays visible. + +Fresh examples use one Video Input for a file and its normalization, including +when the prepared clip feeds an edge processor. Prepare Mask combines loading +and aligning a mask. Composite can include foreground sizing, padding and cropping. +A video-to-video workflow with separate footage and motion guidance has two Video +Input cards. Their file pickers identify the source video and the control video. +A saved loader from before per-action video metadata can restore controls when +its library, adapter, schema and ordered modes still match the current registry. +A separately consumed intermediate remains accessible. Opening an existing user +document respects the presentation saved in that document. + +Importing a generated workflow JSON by file picker or drag uses its verified +layout signature. Studio measures the visible cards before spacing them, so a +tall file picker has room beside the next stage. Import keeps the graph's nodes, +connections and order. Moving or resizing a node in the JSON invalidates its +generated geometry. Saved Studio documents, exported workflow packages and +older files without the signature reopen with their authored positions. Use +**Arrange graph** to lay out one of those documents manually. +Dropping workflows in quick succession opens them in that order. An unreadable +file reports its error and the next import can still open. + +Older saved model loaders can omit the role of a component output. On +restore, Studio fills that gap from the installed node definition when the +action, socket, direction and type match. This keeps existing wires connected +as the downstream controls load. Changing the model still checks each wire +against the new model's component contract. + +Scheduled video recipes load their prompt windows into the Generate stage on +first open. Masked video recipes can place a single Composite stage between +Upscale and Video Output. It takes the original clip, the generated clip, and +the aligned mask from their existing connections. Prepare Mask owns mask +growth. Composite owns edge feathering. + +## Preview an image batch + +**All images** passes on the full batch. **Image indices** chooses what the +**Selected images** socket sends. Enter `0` for the first image, `2,0` for the +third followed by the first, or leave the field empty to select the whole batch. +When the incoming wire carries latents, connect a **VAE** and choose the +**Decode device**. Connecting decoded image pixels hides unused decoder settings. A connected decoder stays accessible. + ## Start a workflow -In Workflows, search for an action or filter by Image, Audio, Video, 3D, or Text & +In Developer, search for an action or filter by Image, Audio, Video, 3D, or Text & Utilities. Click a task once to create connected nodes. Select the model on the loader and edit the prompt or parameters on the graph. Creating a graph does not -load models or install packages. Custom nodes are available through -**Nodes → Add custom node**, or by dropping a structured Python file on the canvas. +load models or install packages. Custom node source review remains available at +the bottom of the chooser and through Nodes → Custom nodes. The backend resolves a task against published execution profiles. It prefers the last explicitly selected compatible model when its exact artifacts and runtime -are available, otherwise an installed composable route, preferring the lower -estimated memory requirement among suitable routes. Automatic memory also -checks the existing read-only resource planner; Custom memory leaves that choice -to the operator. No selection loads weights or changes creative defaults. If no +are available. For new image tasks, eligible FLUX 3, MiniMax H3 Image, FLUX.2 +and FLUX.1 models have priority in that order. Within each group and for other +tasks, Studio prefers a composable route, then the lower estimated memory +requirement. Templates and saved graphs open with their authored models. +Automatic memory checks the existing read-only resource planner. Custom memory +leaves that choice to the operator. No selection loads weights or changes creative defaults. If no route qualifies, the connected draft has an empty required model field. Select a model there before running. Run independently rechecks inputs and resources. Remembered selections are bounded local authoring preferences, not execution approval. -Composable routes expose meaningful independent nodes such as Load Models, -Encode Prompt, Denoise and Decode Latents. Tasks can need additional image, mask, +Fresh public model selections use the backend's declared size, compute dtype and +optional weight storage format defaults. A bounded profile can therefore start +at 512 square with FP8r storage while retaining BF16 compute. These are visible +creation settings; selecting a model never installs its files or qualifies it +for Automatic memory. Saved workflows and authored values keep their settings, +and Run checks the exact current graph against the backend's resource plan. + +Composable routes present independent steps in task stages such as Model Setup, +Encode Inputs and Generate. Tasks can need additional image, mask, conditioning or audio operations. Whole-pipeline routes expose Generate/Edit operations instead; those nodes do not claim independently replaceable denoising. -Qwen-Image 2.1 uses its supported whole-pipeline route at the reviewed Diffusers pin. +Qwen-Image 2.1 uses its supported whole-pipeline route with the compatible +installed Diffusers release. Its historical source review remains separately +pinned. + +Built-in stages use the same ordinary node renderer across image, audio and video. +**Generate** presents the public sampling and decoding controls in one card. +**Inspect implementation** lists the underlying operations. **Edit stages** +separates those operations on the canvas as an undoable edit. A saved built-in +stage that was expanded under the older renderer opens as one node. +Reusable Blocks and storyboard shots retain their expandable composition view. +Opening a shot shows ordinary Image Input, Encode Inputs and Generate cards +where those stages are used. Assemble or Assemble & Export is a single card +with the ordered shot inputs and delivery controls. A stage with an authored +nested composition retains its editable Block view. +Identical typed model inputs share one socket when they receive the same output. +Empty optional bundle inputs can also share a socket when their consumers belong +to one model owner. Different sources, required empty inputs and authored bundle +values stay separate. This presentation does not change backend execution. + +Encode Inputs keeps one connection when the same image output supplies matching +encoders. Opening and closing frames have separate sockets. Generate uses one +VAE connection when the sampler and decoder share the same component output. +Different sources and fields with their own fallback values remain separate. +Music routes that encode inside Generate keep that existing structure. + +For an older saved Encode Inputs or Generate stage, open the node's options +menu and choose **Merge shared inputs**. The edit is undoable, preserves the +saved reusable definition and current settings, and refuses inputs that cannot +be shared safely. Opening a saved workflow alone does not rewrite its interface. +Model and task changes retain a repaired shared connection when the new route +can retain the supplier and its compatible consumers. + +The node palette lists **Encode Image** under Models & Components → Condition. +Find the shared **Upscale Image or Video** node under Image & Video → Upscale, +or search by either media type. The Normalize Video, Scheduler, audio mux and +audio generation cards distinguish their controls from the results available +on their sockets. + +Curated fresh image recipes can request an exact backend `authoringRecipeId` on +the ordinary operation-starter endpoint. Its optional hash-covered `authoring` +record uses the existing role, edge and semantic form-binding tuples, plus +primitive `initialValues` triples. The backend binds the recipe to the reviewed +pipeline, task, execution profile and base specification. It declares retained +attention/VAE settings, the real Guider's CFG control and FLUX's separate embedded +scale. Qwen masked recipes explicitly select the owned whole-v1 compatibility +policy; outpainting declares the canvas utility and image/mask wires directly. +These are creation defaults, not a second executor or model-loading path. Clients +materialize ordinary nodes, seed untouched unconnected values and then apply +the authored form values. Existing authored or connected settings are preserved. +Requests without a recipe retain the ordinary developer starter defaults and +response envelope. Opening or running a saved graph never requests these defaults +or rewrites that graph. Unknown recipe IDs and mismatched pipeline/task/profile +selections fail closed. + +Canonical example-library generation publishes ordinary executable leaves using +the existing projection for MoDiff's declared visual stage groups. Current public +control values, typed wires, operation ownership and stage roles are preserved; +user/custom Blocks are retained. This export mode validates the existing Block +hashes before projection and applies portable-data cleanup afterward. Ordinary +Save/export and the active canvas retain their grouped Block definitions. The +generator does not edit or rehash immutable nested definitions to sanitize them. +Pair-only regeneration also retains the published device fallback defaults on +unchanged, unambiguously matched executable nodes, rather than substituting the +generator host's defaults. Authored device values and fresh field schemas remain +intact; ambiguous matches or incompatible preserved defaults reject regeneration. + +## Keep activity out of the editing area + +When a page opens with only finished activity, **Session activity** shows a +compact count. Live work opens the list automatically and keeps its result +visible unless you fold it. Click the heading to fold or reveal the same +notifications, or use Enter or Space. The heading retains **Active now** while +work is running or downloading. Folding preserves history, work and the canvas. +The toolbar's download activity button opens the list when you need download +progress. **Clear** remains a separate action for finished notifications. +When panning or resizing, the selected-node toolbar moves clear of activity so +its actions and the activity heading remain reachable. + +## Structured image layout and optional prompt enhancement + +An encoding field exposes structured layout only when its current backend schema +declares support. Region IDs, descriptions and normalized boxes remain ordinary +graph values with Undo/Redo and saved-workflow persistence. Version two separates +Place, Relocate from source and Remove from source. Removing a source explicitly +converts the draft to Place, retaining its description and target box; a removal +without a target starts with the full-frame target. Connected fields remain read-only. + +Source-region tools require **Read encoded references** from the matching encoding +task. The client checks the recorded graph and reference identities before offering +those coordinates. Replacing or reordering media invalidates that context; read the +new encoding and explicitly rebind affected regions. A cached display summary is +not permission to execute a different source graph. Ordinary nodes and exposed +Block fields share the same editor and validation. + +Where the current backend recipe declares an optional enhancement, **Enable +enhancement** adds its ordinary nodes and bindings through one graph transaction. +Review its model and resource settings, then choose **Preview**. Normal workflow +Run continues to use the authored prompt and excludes the declared optional +branch; Preview runs only that branch and its declared dependencies. Both paths +retain the selected Auto or Expert resource policy. + +**Apply** requires the completed owned Preview, current runtime/source identity, +consumed inputs and validated output summary to agree with the current document. +Changing the prompt, references, model, workflow or worker invalidates a stale +proposal. Apply uses the ordinary Undo transaction. **Regenerate** reuses the +original request after an untouched Apply; **Disable** preserves subsequent user +edits. Reload requires a fresh verified Preview before applying a proposal. + +For an authored layout, **Append wording: BF16 + NF4, preserve authored layout** +is an explicit alternative to the unchanged FP32 append default. Choose it before +Enable. It pins the reviewed PUP model and BF16/NF4 provider controls; it never +falls back to another precision. Both append modes keep the exact original caption +prefix and every authored layout field, adding only reviewed wording. They do not +ask the model to generate a region table. Runtime readiness and memory fit remain +separate checks. + +An older enabled enhancement may refer to a retired execution profile. If its +current declaration cannot be resolved, **Disable** can still remove the two +exclusively owned built-in enhancement nodes after checking their saved ownership +and complete connections. This recovery keeps the current prompt, layout, media +and unrelated graph values, including previously applied wording. It is one +undoable edit and grants no execution permission. Then use **Choose model** to +select the current public version of the same model, review the normal model +change, select the desired current enhancement mode, and **Enable**. Refresh alone +does not migrate an old profile; shared or ambiguous enhancement branches require +explicit connection repair before Disable. + +Older schema-one operation hints may omit the retained-settings list. Reading +those controls treats the missing list as empty without rewriting the document. +A present malformed list remains invalid; the current backend declaration and +normal reviewed model change are still required. + +The same-model change preserves an inline legacy layout when its exact task, +artifact, owner and resolved layout schema remain compatible. Bound source regions +also require the existing ordered reference and preprocessing context to remain +exact; only the explicitly replaced execution-profile selector is excluded from +that comparison. Other changes, including changed context declarations, keep the +old layout in the normal retained-setting review rather than reusing stale source +bindings. Connected layout inputs use the ordinary connection review. + +An enhancement declaration may additionally select `preserve-authored-v1` for +structured layouts. Preview may enhance the caption and region descriptions only. +This capability uses a distinct private version-two authoring recipe. Existing +version-one plain recipes keep their exact declarations and bindings; importing +an old document does not silently upgrade it to structured enhancement. +The complete table must map one-to-one to the authored IDs, source image indices, +source/target boxes and actions. A generated ID can be remapped only through a +unique exact geometry/source/action match; ambiguous or changed regions are refused. +Coordinates must map exactly to the publisher's integer grid and are never rounded. +Existing reference bindings are retained, never created by enhancement. Apply +does not grant a new source-region tool: `sourceRegions: false` retains that +boundary while `layoutPolicy` admits preservation of an already authored DTO. +The downstream encoder still checks the current reference binding. Apply +changes the caption/layout pair in one Undo transaction. Native model output, +browser Apply, model turnover, Auto placement and hardware fit require their own +validation; a declaration or client contract test does not establish them. + +## Group nodes into a reusable Block + +Select nodes and choose **Create block**. New definitions use Block V2 and can +contain existing Blocks such as Encode Inputs. Their nested contents, values and +crossing connections are retained. Existing saved definitions are not rewritten. +Creation errors appear inside the dialog. Public sockets and controls remain +available; the dialog lets you choose controls and rename ports. -## Arrange workflow tabs +Connection validation follows executable nodes inside containers. A loader and +denoiser grouped around an external encoder can exchange values without creating +an execution cycle. Required input checks also inspect these internal nodes; a +missing model connection blocks Run and identifies the affected node or Block. -Drag a tab label left or right to reorder open workflows. The accent marker -shows the drop position; hold near either edge to scroll a crowded tab strip. -Escape or releasing outside the strip cancels. Dragging does not switch the -active workflow, edit its graph, or interrupt a run. Close and New tab remain -separate actions. +**Fix graph** recognizes output connections through public, mirrored and direct +Block crossing sockets, including collapsed internal nodes. Moving a Resize out +of a Block keeps its existing route to an internal Preview; Fix does not suggest +bypassing it. Missing or invalid crossing connections still receive diagnostics. -With a tab focused, use Alt+Shift+Left/Right to move it; ordinary arrow keys -still move focus, and Enter selects it. Order is retained on refresh in this -browser. The existing recovery limit remains 12 tabs: active, unsaved and recent -workflows are retained in their arranged relative order. Save important workflows -to the backend library; browser recovery is not a backup or cross-device tab sync. +When changing a model inside a Block, the change preview may retire untouched, +automatically derived outputs that the new route cannot provide and nobody uses. +Connected outputs, configured interfaces and preview bindings remain protected. +Incompatible contracts require repair before the change can be applied. + +Scalar inputs declared with an editor (text, number, toggle or choices) retain +both their editor and optional socket. A connection supplies the execution value +and disables the literal editor; disconnecting restores the saved fallback. +The source is shown when available. Model and media inputs retain their sockets. + +Field callbacks follow declared aliases on containers and visual stages. An +ordinary native leaf inside a user Block keeps its direct callback owner; its +input or output socket is not another container interface. Cyclic projected +aliases stop resolution without changing the Block or granting a new callback. + +For a custom graph using Auto memory, **Graph ready · Auto check at Run** means +static graph checks passed. Run checks the exact backend resource plan before +submission. Use **Resources → Check Auto execution plan** to inspect it earlier. +Installed model files alone do not qualify a recipe; Custom memory retains your +chosen settings without claiming Auto qualification. ## Change the model -The model field of a canonical loader opens **Choose model for Load Models**. +### Model Setup adapters + +An empty Modular setup with a connected, declared non-image output hides the +image adapter section. Existing adapter rows and connected suppliers remain +visible. Direct audio workflows use their own declared adapter policy. + +**Add LoRA** requires the selected image model's current backend capability, +execution profile, exact repository/revision pair and registered adapter sockets +to agree. Missing, refreshing or unsupported metadata disables the action with a +reason; opening and applying an adapter draft both recheck it. A LoRA socket alone +does not declare model support. The profile's optional `repository_revisions` +metadata contains bounded, unique pairs for its declared repositories; older +metadata remains readable but does not authorize new adapter edits. +An optional selected-profile `adapterAuthoring` policy can explicitly permit +editing adapters for its declared task, exact base-model pair and registered +adapter node. That permission is separate from aggregate model support and +runtime qualification. An optional `requiredControls` map constrains the +actual model owner before Add, Edit or Move. The current conditional Super +image route requires NONE/Auto Offload disabled/CPU weight staging, no +quantization or external components, and remote code disabled. Redux editing +requires effective NONE, no quantization/prequantized component, and declared +`device_map=none`. A declared pure execution recipe may override placement; a non-`none` raw +loader device map still wins over the recipe. Unbound `null` inputs qualify +only through the current registered optional-input schema. Missing, +malformed, unknown or ambiguous controls disable editing with a reason; no +field or execution recipe is inserted to obtain permission. Auto can use +only an already admitted candidate satisfying these controls. These checks +do not enable model execution or satisfy Cosmos safety/runtime readiness. +Without it, native aliases retain the canonical +pipeline's adapter restrictions. Malformed or mismatched policy disables edits. +Separate policies cover the dense pinned FLUX.1-dev, FLUX.1-schnell and +FLUX.1-Krea-dev native text-to-image profiles, FLUX.1-Kontext-dev editing, and +FLUX.2-klein-4B text-to-image and editing. Each permits only its own reviewed +repository/revision pair; sharing a pipeline class does not transfer permission. +Multi-reference authoring uses the current backend owner's explicitly declared +edit execution mode, with the actual task and profile still checked. Saved graph +hints cannot grant that mapping. Compatible FP8/NVFP4 models, Klein Base/KV and +unrelated tasks receive no permission from these policies. Existing runtime +routes and qualification remain unchanged. Add also checks the owned-row limit. Reaching that limit +leaves permitted existing rows editable and reorderable. + +Existing unsupported adapters stay visible with their values and connections. +Their editors and ordering controls remain disabled; **Remove** can repair the +graph through the ordinary Undo transaction, subject to shared supplier and +sealed interface checks. Opening a saved graph never discards adapters or regroups +its stages. Reviewed whole-image adapters preserve the owner-to-generation scope +through their actual pipeline sockets rather than becoming operation stages. + +Fresh native image recipes group their declared image decoder and connected +Preview into **Image Output**, including decoders whose backend operation uses +the generic `diffusion.decode_latents` identity. This changes presentation only; +the executable decoder, output fields and Preview edge remain intact. + +### Guidance control visibility + +Removing a Guidance row through Configure interface hides the row, not the +underlying operation or its effect. The current value is retained on its original +stage. Explicit removals are recorded by `{nodeId, fieldId}` in the optional +instance `presentation.removedControlBindings` list and survive reload and dynamic +field refresh. Re-exposing a control clears its removal record. Reusable-node +definitions can carry the same optional `removedControlBindings` list as initial +presentation; it is excluded from execution identity. Both client and backend +validate bounded, unique bindings. Historical omissions without a removal record +are not guessed to be deliberate removals, and opening a workflow does not rewrite it. + +### Model selection + +The **Model** row shows the current checkpoint. Open it to choose a different +one. The reset icon restores the model's defaults for unconnected prompts +and generation controls. The cable icon opens the available connection and grouping +actions. Hover or focus either icon to see its label. **Runtime settings** +contains the built-in loader controls for device placement and memory use. +A narrowed node shortens the displayed model name. Hover the selector or open +it to read the complete name. + +The model field of a canonical loader opens **Choose model**. Search by model or repository and optionally filter to Downloaded. Names precede repository IDs; download status is a trailing badge. Selecting a row resolves the backend starter and updates the owned operation graph through the normal graph @@ -55,6 +386,19 @@ Edited values, custom wiring or ambiguous outputs use the preservation/review planner. Schema or connection differences requiring review are shown before applying. Undo/Redo and saved workflow reload use the same graph history and persistence. +Model-change **Needs attention** details open automatically for each selected +model requiring review. Read the incompatible values before Apply; the operator +can still collapse and reopen the section with the pointer or keyboard. Keeping +the current model leaves the graph unchanged. This presentation does not resolve +an incompatibility, waive validation or change the model-selection planner. + +Legacy managed Task changes apply the existing fallback for an unavailable +default/CUDA device using the current backend runtime metadata before building +the graph. CPU offload settings normalize through the ordinary form policy; +authored prompts remain intact. Explicit unavailable XPU, MPS or unknown device +choices remain visible for validation. A newer document or creative edit still +cancels a pending graph operation. + A raw implementation/component loader has a picker restricted to compatible installed artifacts. In a connected workflow, model selection derives the Pipeline Type and applies both atomically. A raw implementation loader exposes Pipeline Type @@ -71,45 +415,15 @@ under the row's disclosure. An explicit successful selection is remembered per t **Restore model defaults** resets unconnected creative controls using the selected profile's starter. Model ownership, memory settings, media and custom branches remain intact; Undo restores the prior graph. Public Block model controls resolve -the owning internal loader before using the existing atomic Block transaction. -Intentional Add/Load/Reload enables validated custom code; opening a picker or -discovering a file does not. Only load trusted Python. - -## Group nodes into a reusable Block - -Select nodes and choose **Create block**. New definitions use Block V2 and can -contain existing Blocks such as Encode Inputs. Their nested contents, values and -crossing connections are retained. Existing saved definitions are not rewritten. -Creation errors appear inside the dialog. Public sockets and controls remain -available; the dialog lets you choose controls and rename ports. - -Connection validation follows executable nodes inside containers. A loader and -denoiser grouped around an external encoder can exchange values without creating -an execution cycle. Required input checks also inspect these internal nodes; a -missing model connection blocks Run and identifies the affected node or Block. - -When changing a model inside a Block, the change preview may retire untouched, -automatically derived outputs that the new route cannot provide and nobody uses. -Connected outputs, configured interfaces and preview bindings remain protected. -Incompatible contracts require repair before the change can be applied. - -Scalar inputs declared with an editor (text, number, toggle or choices) retain -both their editor and optional socket. A connection supplies the execution value -and disables the literal editor; disconnecting restores the saved fallback. -The source is shown when available. Model and media inputs retain their sockets. - -For a custom graph using Auto memory, **Graph ready · Auto check at Run** means -static graph checks passed. Run checks the exact backend resource plan before -submission. Use **Resources → Check Auto execution plan** to inspect it earlier. -Installed model files alone do not qualify a recipe; Custom memory retains your -chosen settings without claiming Auto qualification. +the owning internal loader before using the existing atomic Block transaction. Imported custom sources still require explicit review +and approval; opening a picker or choosing Developer does not enable code. ## Names, examples and library Raw loaders use distinct names: **Load Image Pipeline**, **Load Audio Pipeline**, -**Load Modular Components**, and **Load Model Component**. Canonical workflows use -**Load Models**. Other corrected names include **Prepare Outpaint Canvas**, -**Generate Image with Control**, **Preview Latents**, and **Export Video Asset**. +**Load Modular Components**, and **Load Model Component**. Composable workflow +canvases present the loader and its settings as **Model Setup**. Other corrected names include **Prepare Outpaint Canvas**, +**Generate Image with Control**, **Preview 4-Channel Latent**, and **Export Video Asset**. Names are selected by execution identity, not guessed from class-name substrings. Serialized identities and custom titles are preserved; previous built-in labels remain searchable. @@ -123,7 +437,7 @@ values. Full creator-example coverage and all legacy insertion paths remain trac work; the presence of a sample does not qualify a model's output. The sidebar offers **Start**, **My workflows**, **Example workflows** and -**Recovery drafts**. Start uses the same task browser as the Workflows launcher; +**Recovery drafts**. Start uses the same task browser as the Developer launcher; it creates a separate tab without replacing the current graph. Open workflow shows My workflows. Lists remain bounded and paginated. @@ -131,6 +445,17 @@ New documents autosave as recovery drafts. Explicit Save promotes them to My workflows; a delayed autosave cannot demote a saved document. Existing documents without an intent marker are treated as saved without rewriting their files. Unknown historical documents are not reclassified or deleted. +The open library incorporates acknowledged backend saves and deletions immediately, +so closing a newly saved tab keeps its row available without Reload workflows. +These summary updates do not refetch on canvas edits or overwrite newer unsaved +tab contents. An older list response cannot undo a later save acknowledgement. + +Reopening an acknowledged document does not create a new backend revision just +because the canvas adds disconnected-port metadata or the registry's exact empty +image preview. Save comparison uses the same narrow hydration rules and captures +the relevant node definitions at acknowledgement. It does not rewrite the stored +snapshot or ignore authored inputs, nonempty previews, schema changes, wiring, +positions or later registry changes. Actual edits still autosave normally. Shared select, combobox and multiselect menus use an 18rem preferred cap, further limited by available viewport space. The cap is passed through Headless UI's @@ -188,3 +513,58 @@ with a bookkeeping assertion that expected the still-open recovery draft in the mocked saved-document list; application execution, output capture and error checks had already passed, and only the explicitly saved workflow had correctly been written there. + +## Preview image framing + +Template image cards and their detail view keep the complete published image +inside the existing preview frame. The image must be sized against the frame; +`object-fit: contain` alone does not prevent intrinsic image height from +overflowing a CSS grid and being clipped. Square, portrait and landscape media +are covered by measured frame-boundary browser checks at narrow and wide sizes. +This is presentation only: source media, approved recipes and generation +parameters remain unchanged. + +## Large saved workflow checkpoints + +The browser recovery cache retains the active workflow, every dirty workflow, +and unacknowledged documents. It bounds redundant inactive saved copies by +count and serialized size so several large saved graphs cannot prevent the +active tab checkpoint from being updated. This does not close live tabs, delete +backend documents, trim their contents or limit workflow/model size. Saved +documents omitted from the browser cache remain in My workflows; clean +acknowledged drafts remain in Recovery drafts. If the active +workflow or unsaved edits alone exceed browser capacity, the existing Save or +export warning remains in effect. + +## Guidance model connections + +The standalone Guider exposes its choice of guidance algorithm and its +model-specific controls after a connected Denoise stage supplies a model +identity accepted by the Guider. General guidance controls remain editable +while the model connection is absent. The canvas and Parameters view show +where to reconnect. The Interface view records the Layers socket and its +dependency on a model connection. + +Removing the model connection keeps authored guidance values and any existing +Layers wire. A connected Layers socket stays visible. Undoing the removal or +reconnecting the same supported model restores the authored settings. The +editor applies the same presentation rules to older saved workflows and +uses the current registry to check which model identities the Guider accepts. + +## Opening and inspecting a workflow + +Fresh tasks, templates and examples wait for each stage’s controls to load, then measure the open sections and sockets before arranging the graph. A status message announces preparation, and the canvas accepts keyboard and pointer input when its stages are visible. If a stage’s controls cannot load, its workflow remains available. Choose **Reload workspace to retry** in the affected stage to recover its controls. This includes nodes supplied by a Python extension. Long forms start with up to 960 pixels of controls. Right-click the stage and choose **Fit height to controls** to expand a stage further. Saved workflows reopen at their authored sizes and positions. + +**Enabled** opens the settings for a guidance operation. Switching it off preserves your settings for the next time you enable it. A modular model loader shows **Offload Mode** when automatic offload is enabled, supplied by a wire, or required by the selected model’s adapter settings. Canvas and inspector controls edit the same stored values. + +New task starters fit the visible graph after its stages are measured. Use **Fit workflow in view** to see the whole graph, or select stages and use **Focus selected stages**. These actions move the canvas view and preserve your stage positions. + +An ordinary stage displays its working ports and wired outputs. **Show implementation ports** reveals available diagnostics, route state and guidance-layer settings. Connecting one keeps its socket visible when the other implementation ports are hidden. **Choose model** on Model Setup opens supported models for the current task. **Change model / task** in the same dialog previews compatible substitutions and the affected wires. Device selectors use the reported accelerator name alongside the exact runtime device ID when available. + +**Node help** describes the current stage and its exposed inputs and outputs. For a saved stage, port descriptions follow its bound operations and current wiring. For custom nodes, add a description to the node and each declared port. Model component sockets and wires share a role color. Read their labels or hover over a socket to see its role when two components use the same underlying wire type. + +When Studio opens a saved stock workflow, its cards show the controls in the order declared for the operation. For example, a video prompt comes before callback settings. Model authors can supply the choices and captions for a field, including supported audio sample rates. Turning off **Sample** hides temperature, Top P and Top K for text generation. Turning it back on restores the stored values. A connected control remains visible. For an older image workflow, the selected model can add a secondary guidance setting. Its override opens the numeric control and uses the registered editor, including after the workflow is reopened. + +On an empty canvas, opening Templates gives that dialog keyboard and pointer focus. Escape returns to the workflow chooser with its previous selections. + +When creating a reusable Block, review the suggested inputs, outputs and editable settings under **Customize Block interface**. Existing external wires keep their ports. Other available ports or settings can be enabled before saving. In **Add custom node**, **Choose Python file** selects a file on your browser computer. **Add node** sends the selected file to the backend and enables it. Local paths entered under **Advanced options** refer to the backend machine. diff --git a/eslint.config.js b/eslint.config.js index ff5160fe..f2959509 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -7,7 +7,7 @@ import reactRefresh from 'eslint-plugin-react-refresh'; import tseslint from 'typescript-eslint'; export default tseslint.config( - { ignores: ['dist', 'artifacts', 'playwright-report', 'test-results'] }, + { ignores: ['dist', 'artifacts', 'playwright-report', 'test-results', 'reviews'] }, { files: ['playwright.config.ts', 'tests/e2e/**/*.ts'], languageOptions: { diff --git a/install-dev.ps1 b/install-dev.ps1 index 33bc83a8..5a9b0439 100644 --- a/install-dev.ps1 +++ b/install-dev.ps1 @@ -4,6 +4,7 @@ param( [switch]$AllowExperimental, [switch]$Resume, [switch]$Repair ) $ErrorActionPreference = "Stop" +$BackendPath = (Resolve-Path -LiteralPath $BackendPath).ProviderPath $installer = Join-Path $BackendPath "install.ps1" if (!(Test-Path $installer)) { throw "MoDiff backend installer not found at $installer" } & $installer -Accelerator $Accelerator -AllowExperimental:$AllowExperimental -Resume:$Resume -Repair:$Repair -BackendOnly @@ -11,14 +12,18 @@ if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } $python = Join-Path $BackendPath ".venv\Scripts\python.exe" $testRequirements = Join-Path $BackendPath "requirements\test.txt" -$uvRoot = Join-Path $BackendPath ".modiff\tools\uv" -$uv = Get-ChildItem $uvRoot -Filter uv.exe -File -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1 -if (!$uv) { throw "MoDiff's verified uv executable was not found under $uvRoot" } -& $uv.FullName pip install --python $python -r $testRequirements +Push-Location -LiteralPath $BackendPath +try { + $uv = & $python -c "from pathlib import Path; from modiff.tool_locks import resolve_uv; print(resolve_uv(Path('.modiff')))" + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } +} finally { + Pop-Location +} +& $uv pip install --python $python -r $testRequirements if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } Set-Location $PSScriptRoot -& npm.cmd ci +& npm.cmd ci --include=dev if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } $artifactDir = Join-Path $PSScriptRoot "artifacts\dev-install-current" New-Item -ItemType Directory -Force -Path $artifactDir | Out-Null diff --git a/install-dev.sh b/install-dev.sh index 1a61fc0f..1fcf87b8 100644 --- a/install-dev.sh +++ b/install-dev.sh @@ -6,19 +6,17 @@ if [[ ! -x "$BACKEND_PATH/install.sh" ]]; then echo "MoDiff backend installer not found at $BACKEND_PATH/install.sh" >&2 exit 2 fi +BACKEND_PATH="$(cd -- "$BACKEND_PATH" && pwd -P)" "$BACKEND_PATH/install.sh" "$@" --backend-only -UV_BIN="$(find "$BACKEND_PATH/.modiff/tools/uv" -type f -name uv -perm -u+x -print -quit 2>/dev/null)" -if [[ -z "$UV_BIN" ]]; then - echo "MoDiff's verified uv executable was not found under $BACKEND_PATH/.modiff/tools/uv" >&2 - exit 2 -fi +PYTHON_BIN="$BACKEND_PATH/.venv/bin/python" +UV_BIN="$(cd -- "$BACKEND_PATH" && "$PYTHON_BIN" -c "from pathlib import Path; from modiff.tool_locks import resolve_uv; print(resolve_uv(Path('.modiff')))")" "$UV_BIN" pip install \ - --python "$BACKEND_PATH/.venv/bin/python" \ + --python "$PYTHON_BIN" \ -r "$BACKEND_PATH/requirements/test.txt" cd -- "$SCRIPT_DIR" -npm ci +npm ci --include=dev mkdir -p artifacts/dev-install-current -"$BACKEND_PATH/.venv/bin/python" -m modiff.preflight --json --fail-on-error > artifacts/dev-install-current/backend-preflight.json +"$PYTHON_BIN" -m modiff.preflight --json --fail-on-error > artifacts/dev-install-current/backend-preflight.json echo "Development environment is ready. Run ./run-dev.sh." diff --git a/package-lock.json b/package-lock.json index 6bffc778..52d31c3a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "terser": "^5.48.0", "typescript": "~5.9.2", "typescript-eslint": "^8.40.0", - "vite": "^8.1.4" + "vite": "^8.1.6" }, "engines": { "node": ">=24.12.0 <25", @@ -1795,9 +1795,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", - "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2079,9 +2079,9 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", - "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", "dev": true, "license": "MIT", "dependencies": { @@ -3685,9 +3685,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -3920,16 +3920,16 @@ } }, "node_modules/vite": { - "version": "8.1.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.4.tgz", - "integrity": "sha512-bTT9PsdWO+MQMNG9ZXIP/qM9wGh37DFxTV/sPq9cFpHr3w4jkgef032PkAL9jAqhk3Nz8NQw3O8n6/xFkqO4QQ==", + "version": "8.1.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.6.tgz", + "integrity": "sha512-aRAHIxx5SW5zc1sMqFwJU/t5qaFfXb5Hj0J7W0VXihu/X99+346tz6080tO1T1xVIJORX/b3zVTXGFqUXh35uw==", "license": "MIT", "peer": true, "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.5", - "postcss": "^8.5.16", - "rolldown": "~1.1.4", + "postcss": "^8.5.17", + "rolldown": "~1.1.5", "tinyglobby": "^0.2.17" }, "bin": { diff --git a/package.json b/package.json index 6dd1765b..45ac4aac 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "e2e:studio:mocked": "playwright test tests/e2e/studio-mocked/studio-mocked.spec.ts", "e2e:studio:live-backend": "playwright test tests/e2e/live-backend/live-backend.spec.ts", "e2e:migration:isolated": "node scripts/run-isolated-historical-migration-e2e.mjs", - "e2e:shared-controls": "playwright test tests/e2e/shared-controls/shared-controls.spec.ts", + "e2e:shared-controls": "playwright test tests/e2e/shared-controls/shared-controls.spec.ts tests/e2e/shared-controls/layout-conditioning.spec.ts", "format": "prettier --write .", "format:check": "prettier --check .", "gallery:run": "node scripts/template-gallery-runner.mjs", @@ -70,41 +70,43 @@ "test:block-schema-v2": "node --test scripts/block-schema-v2.test.mjs scripts/block-container-interface-v1.test.mjs", "test:block-route-selection-v1": "node --test scripts/block-route-selection-v1.test.mjs", "test:block-runtime-v2": "node --test scripts/block-runtime-v2.test.mjs scripts/block-media-readiness-v2.test.mjs", - "test:block-renderer-v2": "node --test scripts/block-renderer-v2.test.mjs scripts/encoding-node-presentation.test.mjs scripts/encoding-optional-input.test.mjs", + "test:block-renderer-v2": "node --test scripts/block-renderer-v2.test.mjs scripts/encoding-node-presentation.test.mjs scripts/encoding-optional-input.test.mjs scripts/layout-conditioning.test.mjs", "test:block-persistence-v2": "node --test scripts/block-persistence-v2.test.mjs", "test:modular-hierarchy-v2": "node --test scripts/modular-hierarchy-v2.test.mjs scripts/catalog-evidence-discovery.test.mjs scripts/modular-composition-execution.test.mjs scripts/reviewed-value-ports-v2.test.mjs", "test:composite-migration-ui": "node --test scripts/composite-migration-ui.test.mjs", "test:legacy-cluster-recovery-audit": "node --test scripts/legacy-cluster-recovery-audit.test.mjs", "test:composite-block-capabilities-v2": "node --test scripts/composite-block-capabilities-v2.test.mjs", "test:registered-block-v2-adapter": "node --test scripts/wan-video-boundary.test.mjs scripts/registered-block-v2-adapter.test.mjs scripts/registered-block-v2-insertion.test.mjs scripts/registered-block-v2-route-audit.test.mjs", - "test:graph-export": "node --test scripts/flow-graph-export.test.mjs", + "test:graph-export": "node --test scripts/flow-graph-export.test.mjs scripts/graph-visible-output-readiness.test.mjs", "test:hugging-face-cluster-drag": "node --test scripts/hugging-face-cluster-drag.test.mjs", - "test:hugging-face-node-library": "node --test scripts/hugging-face-node-library.test.mjs", - "test:templates": "node --test scripts/modiff-template.test.mjs", - "test:task-templates": "node --test scripts/task-template-contracts.test.mjs", + "test:hugging-face-node-library": "node --test scripts/hugging-face-node-library.test.mjs scripts/hugging-face-source-supplements.test.mjs", + "test:templates": "node --test scripts/modiff-template.test.mjs scripts/template-operation-workflows.test.mjs scripts/image-full-native-template-candidates.test.mjs scripts/image-model-usage-policies.test.mjs scripts/workflow-library-dependency-contracts.test.mjs scripts/workflow-library-canonical-export.test.mjs scripts/workflow-library-image-stages.test.mjs scripts/weight-format-template-binding.test.mjs scripts/flux3-public-template-planning.test.mjs scripts/h3-image-template.test.mjs scripts/template-showcases.test.mjs scripts/template-stage-coverage.test.mjs scripts/retained-gallery-templates.test.mjs scripts/video-sequence-stages.test.mjs scripts/canonical-workflow-execution.test.mjs", + "test:task-templates": "node --test scripts/task-template-contracts.test.mjs scripts/large-av-starter.test.mjs", "test:template-assets:local": "node --test scripts/template-default-inputs.test.mjs", "test:template-quality": "node --test scripts/template-quality.test.mjs", - "test:live-qwen-proof": "node --test scripts/live-qwen-proof.test.mjs scripts/hardware-qualification.test.mjs scripts/release-qualification-policy.test.mjs scripts/resource-qualification.test.mjs scripts/route-resource-qualification.test.mjs scripts/resource-qualification-campaign.test.mjs scripts/template-qualification.test.mjs scripts/release-qualification-campaign.test.mjs", - "test:release-contract": "node --test scripts/backend-installer-contract.test.mjs scripts/backend-node-registry.test.mjs scripts/release-contract.test.mjs scripts/template-asset-release-contract.test.mjs", + "test:live-qwen-proof": "node --test scripts/live-qwen-proof.test.mjs scripts/native-modular-image-resource.test.mjs scripts/executed-native-media-resource.test.mjs scripts/workflow-auto-provenance.test.mjs scripts/workflow-auto-audio-provenance.test.mjs scripts/workflow-auto-video-provenance.test.mjs scripts/workflow-auto-control-provenance.test.mjs scripts/workflow-auto-masked-image-provenance.test.mjs scripts/retained-native-text-provenance.test.mjs scripts/retained-native-direct-image-provenance.test.mjs scripts/retained-native-modular-image-provenance.test.mjs scripts/canonical-runtime-hints.test.mjs scripts/hardware-qualification.test.mjs scripts/hardware-execution-device.test.mjs scripts/hardware-runtime-identity.test.mjs scripts/release-qualification-policy.test.mjs scripts/resource-qualification.test.mjs scripts/route-resource-qualification.test.mjs scripts/resource-qualification-campaign.test.mjs scripts/template-qualification.test.mjs scripts/release-qualification-campaign.test.mjs", + "test:release-contract": "node --test scripts/backend-installer-contract.test.mjs scripts/backend-node-registry.test.mjs scripts/release-contract.test.mjs scripts/release-candidate-report.test.mjs scripts/template-asset-release-contract.test.mjs scripts/builtin-media-qualification.test.mjs scripts/input-bound-model-evidence.test.mjs scripts/video-upscale-evidence.test.mjs scripts/layer-decomposition-evidence.test.mjs scripts/canonical-image-accounting.test.mjs scripts/marigold-preview-evidence.test.mjs scripts/private-speech-evidence.test.mjs scripts/retained-speech-gallery-evidence.test.mjs scripts/private-image-edit-evidence.test.mjs scripts/image-edit-source-binding.test.mjs scripts/control-inpaint-evidence.test.mjs scripts/saved-control-image-evidence.test.mjs scripts/saved-vace-composite-evidence.test.mjs scripts/prompt-variant-evidence.test.mjs scripts/retained-template-association.test.mjs scripts/retained-gallery-release.test.mjs scripts/saved-workflow-compatibility.test.mjs", "test:live-backend-contract": "node scripts/live-backend-contract.mjs", - "test:gallery-harness": "node --test scripts/template-gallery-harness.test.mjs", + "test:gallery-harness": "node --test scripts/template-gallery-harness.test.mjs scripts/source-video-timing.test.mjs scripts/retained-layer-sheet.test.mjs scripts/template-gallery-maintainer-acceptance.test.mjs scripts/template-recipe-history.test.mjs scripts/release-showcase-scope.test.mjs scripts/template-input-roles.test.mjs", "test:gallery-runner": "node --test scripts/template-gallery-runner.test.mjs && npm run test:demo-tools", "test:demo-tools": "node --test scripts/bounded-browser-process.test.mjs scripts/run-fashion-demo.test.mjs scripts/prepare-fashion-demo.test.mjs scripts/export-fashion-demo.test.mjs scripts/image-prototyping-campaign.test.mjs", "test:gallery-queue": "node --test scripts/example-generation-queue.test.mjs scripts/image-prototyping-campaign.test.mjs", - "test:driver-contract": "node --test scripts/hugging-face-runtime-contract.test.mjs", - "test:graph-mutations": "node --test scripts/flow-graph-mutations.test.mjs scripts/graph-fixer.test.mjs scripts/block-seed-repair-v2.test.mjs scripts/block-derived-control-repair-v2.test.mjs", - "test:graph-visuals": "node --test scripts/graph-visuals.test.mjs scripts/node-measurement-dispatch.test.mjs scripts/node-connection-search.test.mjs", - "test:media-viewer": "node --test scripts/media-viewer.test.mjs", - "test:requests": "node --test scripts/media-attachment.test.mjs scripts/node-presentation.test.mjs scripts/service-package.test.mjs scripts/node-store-requests.test.mjs scripts/operation-catalog.test.mjs scripts/operation-authoring.test.mjs scripts/operation-modification-matrix.test.mjs scripts/request-boundary.test.mjs scripts/server-actions.test.mjs scripts/shared-store-requests.test.mjs scripts/studio-output-requests.test.mjs scripts/resolved-execution-inputs.test.mjs scripts/runtime-resources.test.mjs", - "test:run-coordinator": "node --test scripts/run-coordinator.test.mjs scripts/run-issue-store.test.mjs scripts/block-runtime-hints-v2.test.mjs", + "test:driver-contract": "node --test scripts/hugging-face-runtime-contract.test.mjs scripts/workflow-setup.test.mjs", + "test:graph-mutations": "node --test scripts/flow-graph-mutations.test.mjs scripts/graph-fixer.test.mjs scripts/conditional-input-requirements.test.mjs scripts/process-image-input-requirements.test.mjs scripts/block-seed-repair-v2.test.mjs scripts/block-derived-control-repair-v2.test.mjs scripts/adapter-chain-links.test.mjs", + "test:graph-visuals": "node --test scripts/visual-node-catalog.test.mjs scripts/graph-visuals.test.mjs scripts/node-measurement-dispatch.test.mjs scripts/node-connection-search.test.mjs", + "test:media-viewer": "node --test scripts/media-viewer.test.mjs scripts/workflow-png-package.test.mjs", + "test:requests": "node --test scripts/controlled-execution-receipt.test.mjs scripts/media-attachment.test.mjs scripts/node-presentation.test.mjs scripts/service-package.test.mjs scripts/node-store-requests.test.mjs scripts/operation-catalog.test.mjs scripts/operation-component-bundle-inputs.test.mjs scripts/operation-component-bundle.test.mjs scripts/operation-authoring.test.mjs scripts/operation-authoring-headless.test.mjs scripts/operation-authoring-recipes.test.mjs scripts/image-stage-groups.test.mjs scripts/shared-stage-inputs.test.mjs scripts/video-stage-groups.test.mjs scripts/model-setup-adapter-authority.test.mjs scripts/audio-authoring.test.mjs scripts/operation-modification-matrix.test.mjs scripts/request-boundary.test.mjs scripts/server-actions.test.mjs scripts/shared-store-requests.test.mjs scripts/supervisor-startup.test.mjs scripts/studio-output-requests.test.mjs scripts/resolved-execution-inputs.test.mjs scripts/prompt-enhancement-summary.test.mjs scripts/ancillary-operations.test.mjs scripts/ancillary-execution-scope.test.mjs scripts/prompt-enhancement-authoring.test.mjs scripts/prompt-enhancement-preview.test.mjs scripts/runtime-resources.test.mjs scripts/websocket-connection.test.mjs scripts/backend-proxy-lifecycle.test.mjs", + "test:run-coordinator": "node --test scripts/run-coordinator.test.mjs scripts/ancillary-run-coordinator.test.mjs scripts/compatibility-panel.test.mjs scripts/run-issue-store.test.mjs scripts/block-runtime-hints-v2.test.mjs scripts/workflow-auto-weight-loading.test.mjs", "test:run-activity": "node --test scripts/run-activity.test.mjs", "test:template-input-preview": "node --test scripts/template-input-preview.test.mjs", "test:asset-storage": "node --test scripts/template-assets.test.mjs && node scripts/run-python.mjs scripts/template-gallery-assets.test.py", - "test:workflow-save": "node --test scripts/workflow-save.test.mjs scripts/workflow-backend-sync.test.mjs", + "test:workflow-save": "node --test scripts/workflow-save.test.mjs scripts/page-workspace-checkpoint.test.mjs scripts/workflow-backend-sync.test.mjs scripts/workflow-hydration-lifecycle.test.mjs scripts/workflow-document-origin.test.mjs scripts/workflow-package-import-title.test.mjs", "test:styles": "node --test scripts/modiff-style.test.mjs", "test:unit": "npm run test:styles && npm run test:templates && npm run test:task-templates && npm run test:template-quality && npm run gallery:card-coverage && npm run test:release-contract && npm run test:live-qwen-proof && npm run test:gallery-harness && npm run test:gallery-runner && node --test scripts/generation-campaign-retry-ledger.test.mjs && npm run test:gallery-queue && npm run test:driver-contract && npm run test:hugging-face-node-library && npm run test:modular-hierarchy-v2 && npm run test:block-schema-v2 && npm run test:block-route-selection-v1 && npm run test:block-runtime-v2 && npm run test:block-renderer-v2 && npm run test:block-persistence-v2 && npm run test:composite-migration-ui && npm run test:legacy-cluster-recovery-audit && npm run test:composite-block-capabilities-v2 && npm run test:registered-block-v2-adapter && npm run test:hugging-face-cluster-drag && npm run test:graph-export && npm run test:graph-mutations && npm run test:graph-visuals && npm run test:media-viewer && npm run test:requests && npm run test:run-coordinator && npm run test:run-activity && npm run test:template-input-preview && npm run test:asset-storage && npm run test:workflow-save", "typecheck": "tsc -b --pretty false", - "preview": "vite preview" + "preview": "vite preview", + "gallery:recipes:verify": "node scripts/template-recipe-records.mjs", + "release:showcases:verify": "node scripts/release-showcases-verify.mjs" }, "dependencies": { "@fontsource/ibm-plex-mono": "^5.2.7", @@ -135,6 +137,6 @@ "terser": "^5.48.0", "typescript": "~5.9.2", "typescript-eslint": "^8.40.0", - "vite": "^8.1.4" + "vite": "^8.1.6" } } diff --git a/plans/release-20261028/README.md b/plans/release-20261028/README.md new file mode 100644 index 00000000..5185184a --- /dev/null +++ b/plans/release-20261028/README.md @@ -0,0 +1,193 @@ +# Release preparation for 28 October 2026 + +This plan was requested for execution in separate Windows and Linux chats. The +original deadline was **28 October 2026, 18:00 IST (12:30 UTC)** for a deployed, +testable candidate, with 18:00–21:00 IST reserved for manual testing. On 28 October, +the maintainer explicitly approved continuing unfinished work past 18:00 and +delaying manual testing. The schedule and cutoff references below retain the +original planning checkpoints; that manual-testing window is now superseded. +Provide a freshly verified deployment and handoff before beginning the maintainer's +2–3 hours of manual testing. This extension does not close unavailable-hardware, +catalog-evidence or publication-approval requirements. +The review started around 01:00 IST, leaving about 17 hours under the original +cutoff, not two working days. + +This is a plan, not a statement that its acceptance checks have passed. The +canonical copy is in the backend repository; the client carries an identical copy +so either checkout can supply the handoff. Keep the five files together. + +## Read and use these files + +1. [Review and feedback chronology](review-and-feedback.md): what was inspected, + what is already implemented, actual gaps, and mistakes to avoid. +2. [Windows execution plan](windows.md): setup, constrained-memory generation, + frontend acceptance, final integration and deployment. Includes a chat prompt. +3. [Linux execution plan](linux.md): backend/service/custom-node acceptance and + the bounded remaining Linux cases. Includes a chat prompt. +4. [Deferred release work](remaining-release.md): every broader open workstream, + its implementation boundary and prerequisites. Deferred does not mean done. + +`BE/` and `FE/` below mean repository-relative paths in MoDiff and MoDiff-client. +They are not literal directories to create. No private logs, credentials, model +weights, user workflows or generated media belong in these plan commits. + +## Reviewed starting point and publication + +| Repository | Reviewed application source | Starting branch | +| ---------- | ------------------------------------------ | ------------------------------ | +| Backend | `ae09c2014f01198d359a1310d63a1d8d619796be` | `work/manual-testing-20261020` | +| Client | `fd3d3dacbcda0b4f44ff23497276658f0233eea8` | `work/manual-testing-20261020` | + +Both reviewed heads were pushed to that branch before authoring this plan. The +existing `codex/windows-delivery-20261026` remote branches also contain that code +pair. The subsequent plan commits contain documentation only. Read their actual +Git heads when starting; do not invent a future commit ID or treat branch names as +immutable execution evidence. The deployed Windows application still has the +reviewed application pair until the Windows owner deliberately deploys another. + +Both active primary checkouts were clean. Historical worktrees retain preserved +overlays already incorporated or superseded; they are not the starting point for +new work. Their exact disposition is in the review. No new actionable runtime +defect was established by the clean-baseline review, so no speculative runtime +patch was made. One confirmed documentation defect remains: ordinary installation +instructions still select the older `fix-ui-ux-issues` branch. W1 corrects it. + +For an existing clean checkout, update its remote references, inspect the branch +and start the lane branch from the published working branch: + +```text +git status --short +git fetch origin work/manual-testing-20261020 +git log -1 origin/work/manual-testing-20261020 +``` + +Run these in each repository. Preserve any dirty local work first; do not reset, +clean or overwrite an existing Linux checkout. Use the lane-specific branch +instructions in the two execution plans. Never run a generic CPU/CUDA environment +sync on an existing specialist ROCm installation. + +## What can be delivered by the deadline + +The achievable target is a **reviewed Windows update with an explicitly bounded +support statement**, tested installation instructions, representative image +prototyping, preserved user data, and a usable manual-test checklist. Available +Linux results strengthen the shared implementation and retain their Linux scope. + +The original expanded release means 80 public templates, 203 ordinary workflows, +58 declared resource tuples and the supported hardware predicates. That is not a +credible promise within this window. Apple MPS has no available host; general +canonical evidence collection remains incomplete; Gallery has unresolved evidence +and quality issues. The whole-app acceptance gate must retain those failures. +Do not change its denominator, skip predicates silently or call this candidate +the completed all-catalog/all-hardware release. + +If the maintainer requires the original full-release claim at 21:00, the present +plan has a **no-go** until those requirements are actually met. A date cannot turn +an untested route into a supported one. A bounded Windows release must state its +tested routes and remaining limitations plainly. + +## Priorities and ownership + +| Task | Owner | Estimate | Deadline importance | +| ---------------------------------------------------------------------- | ------------------------------------------------------ | -----------------------------------------: | ------------------------------------------------------------------------------------- | +| W0/L0: establish exact source, app, evidence and ownership | Both, separate hosts | 30–45 min each | Required before mutations | +| W1: correct paired setup/distribution guidance | Windows | 45–90 min | Required for delivery | +| W2: untouched Windows CUDA setup, base libraries, no-Triton eager path | Windows | 1.5–3 h, downloads additional | Required for installation claim | +| W3: Qwen cold/repeated Auto; distinguish the FLUX3 capacity hold | Windows; Linux assists only by assigned code ownership | 3–6 h if admitted | Required to close the original memory feedback | +| W4: representative Block/model/port/persistence journey | Windows | 2–4 h, sharing W3 model runs where valid | Required for prototyping claim | +| W5: refresh/recovery and optional installation status | Windows | 1–2 h; full optional reinstall 1–2 h extra | Required affected behavior; optional reinstall conditional | +| L1: model-backed custom Block and service journey | Linux | 2–4 h | Required for the service/custom integration claim; Windows persistence still needs W4 | +| L2: remaining joint/reverse adapter controls | Linux | 1.5–3 h including deployment and capture | Bounded follow-up after critical L1 blockers | +| L3: disk-offload/lifecycle and Linux Auto refusal | Linux | 1–2.5 h | Bounded follow-up if fresh capacity admits it | +| R1: integrate, full applicable software gates, deploy and handoff | Windows integrator | Reserve 3 h plus 1 h contingency | Cannot be traded for more catalog runs | + +The rows are not an additive elapsed-time promise: several observations can be +collected in one genuine journey, and Windows/Linux run independently. Plan for +about **20–30 person-hours across the two lanes**, attempting to fit the critical +slice into **12–16 elapsed hours**. Native fit, download time and newly diagnosed +defects can exceed this. The earlier 15–25-hour estimate covered representative +feedback closure, not every model transition or the expanded catalog. Re-estimate +at the checkpoints below instead of promising completion from feature presence. + +## Schedule, all times IST on 28 October + +| Time | Windows lane | Linux lane | Required decision/result | +| ---------------------- | ----------------------------------------------------------- | --------------------------------------------------------- | ------------------------------------------------------- | +| By 02:00 | W0, W1; start isolated setup | L0; obtain exact pair and prerequisites | Named owners, safe app/data boundaries, reachable hosts | +| 02:00–04:00 | W2; establish W3 first-route admission | Begin L1 custom/service journey | First install/runtime and model-admission result | +| 04:00 checkpoint | Classify a real failure before further attempts | Report genuine code failure versus fixture/access failure | No blind rerun of the same failed setup or recipe | +| 04:00–08:00 | W3 causal fix if needed; cold/warm sequence | Finish L1; focused backend fixes with assigned files | Native evidence or an exact unresolved blocker | +| 08:00–11:00 | W4 integrated UI journey; W5 refresh | L2, then L3 only if prerequisites pass | Stable candidate changes; retained failures | +| 11:00–12:00 | Finish required targeted checks and release notes | Finish current bounded case; no broad campaign | List passed, failed, blocked and unrun separately | +| 12:00 scope checkpoint | Choose deliverable claims from evidence | Send ordered commit/validation handoff | No new features or catalog expansion | +| By 13:00 | Receive Linux patches and inspect conflicts | Last source handoff; stop source mutations | Both lanes agree the exact pair to integrate | +| 13:00–14:00 | Integrate source, regenerate affected contracts/build | Independent review of merged backend changes | Freeze application source by 14:00 | +| 14:00–16:00 | Required final gates and emitted-bundle checks | Run only assigned isolated checks on the frozen pair | No competing inference or editing served source | +| 16:00–17:00 | Deploy exact pair at idle; affected native checks | Close evidence and cleanup only owned jobs | Actual served candidate verified | +| 17:00–18:00 | Buffer, final preservation and manual-test handoff | No new runs that jeopardize handoff | URL/build IDs/checklist; idle app ready at 18:00 | +| 18:00–21:00 | Maintainer manual testing; targeted fixes only by agreement | Available for diagnosed issues | No autonomous broad testing/restarts | + +If work starts late, shorten deferred scope, not preservation, required checks or +manual testing. By 12:00, an unresolved first image, save/data-loss issue or +repeated-run crash is a release blocker. Revert only the lane's diagnosed change +through a normal reviewed commit when appropriate; preserve unrelated changes. +Never stop an unknown active job to meet a calendar time. + +## Parallel work contract + +- Windows is the sole release integrator and owner of FE product source, setup + documentation, CI pairing, generated client assets and final Windows deployment. +- Linux initially owns BE service/custom-extension defects: `modiff/service.py`, + `modiff/service_package.py`, the diagnosed custom-extension modules and their + focused tests. It owns its private native evidence and Linux app lifecycle. +- Shared critical files (`modiff/server.py`, `NodeBase.py`, memory/offload modules, + `modules/ModularDiffusers/loaders.py`, receipt producers/parsers, manifests and + lockfiles) need one explicit owner in the shared handoff before editing. Default + owner is Windows/integrator. Linux reports a reproduction and proposed patch + scope; it must not independently rewrite them while Windows diagnoses memory. +- Linux may inspect FE evidence tools but does not edit them concurrently with + Windows. Transfer a file's ownership explicitly if a receipt defect needs work. +- Each lane uses its own branch and app/test data root. No shared writable runtime, + user data, model offload directory, qualification registry or browser storage. +- One heavy inference job per host. Avoid running full suites alongside model + generation on that host. Tests must not instantiate supervisors against live + operator data. Source/collector bytes remain frozen during captured runs. +- Handoffs contain base/commit IDs for both repos, changed files, diagnosis, + commands/results, proof level, retained failures, deployment state and remaining + work. Push ordinary branches; no force push. Only the integrator merges into the + release candidate. Direct cross-chat messaging requires the user's authorization; + a pushed handoff can be carried by the user without such authorization. + +## Verification budget and final admission + +Reuse existing evidence at its original scope. The reviewed pair already passed +8,540 backend tests, 12,978 subtests, 11 static/generated checks, the client quality +gate and 328 browser checks. The latest measured full gate cost was approximately +26 minutes backend + 8.5 minutes client + 33 minutes browser, before integration +and deployment. Do not rerun that campaign merely to inspect documentation. + +For an actual change: reproduce narrowly, add the causal regression, run focused +checks, then run the applicable complete CONTRIBUTING gates on the final source. +Update both immutable FE CI backend refs after a coordinated BE code commit. Keep +historical source-audit fixtures separate from the installed runtime. Run any +required active-optional-runtime checks with the supported validated runner; +base-environment skips do not prove optional execution. + +`npm run check:acceptance` is the whole-app gate. Record its real result and the +first failing stage; later short-circuited stages are **unrun**, not passed. Do not +repeat a known failing Gallery stage without changed evidence, or silently replace +the whole gate with `npm run check`. For a bounded candidate, independently run +the applicable software and asset checks and disclose the unmet full-release gate. + +The 18:00 handoff must include: + +1. Verified application URL, exact BE/FE commits, runtime, and served-bundle identity. +2. Changes since the already testable pair, plus known unchanged limitations. +3. Required native results with model/task/settings and actual consumed values. +4. Preservation result for existing workflows, outputs, custom nodes and runtime. +5. A 2–3-hour manual checklist with expected results and recovery instructions. +6. Failed/blocked/unrun items, including the Mac and full-catalog boundaries. + +No final source edits after testing without updating the impact assessment and +rerunning the checks affected by those edits. A passing old bundle is not evidence +for a newer deployed one. diff --git a/plans/release-20261028/linux.md b/plans/release-20261028/linux.md new file mode 100644 index 00000000..8acd6d74 --- /dev/null +++ b/plans/release-20261028/linux.md @@ -0,0 +1,284 @@ +# Linux lane: bounded backend and native acceptance + +Use the [shared plan](README.md), [review](review-and-feedback.md) and +[deferred backlog](remaining-release.md). Deadline: **28 October 2026, 18:00 IST**. +Deliver source handoff by **13:00 IST**; shared source freeze is **14:00 IST**. +Do not move these later because an old handoff proposes a different schedule. + +The purpose of a separate Linux chat is real parallelism: available Linux model +capacity and backend/service checks can run while Windows handles setup, UI and +constrained-memory behavior. Linux success never substitutes for Windows proof. + +## L0 — source parity, current machine and preserved state + +**Budget: 30–45 minutes, plus diagnosis if the host is unavailable.** + +Start with both remote working branches updated by the clean-baseline review. +Run branch creation only in a separate non-served checkout/worktree. A clean tree +can still be serving the app: fetch/inspect first and defer any served-source +switch until the admitted idle stop and preservation capture. + +```text +git status --short +git fetch origin work/manual-testing-20261020 +git switch -c codex/release-linux-20261028 origin/work/manual-testing-20261020 +git rev-parse HEAD +``` + +Run in each clean repository. If the branch exists, inspect and resume it; preserve +dirty code before any switch. Do not reset the current Linux app checkout merely +to obtain the plan. The plan's reviewed application pair is BE `ae09c201` / FE +`fd3d3dac`; later plan-only commits do not mean the running server already changed. +The last retained Linux app pair was older and needs deliberate source parity. + +Read AGENTS, CONTRIBUTING, SECURITY, the complete mirrored cluster lessons, +`docs/custom-nodes.md`, `docs/service-prototyping.md` and workbench acceptance. +Resolve current host/process/launcher/runtime, app/control origins, current/queued +tasks, downloads, installed model revisions, data/cache/offload roots and available +memory/disk. Do not assume a historical PID, forwarded port or receipt count. + +Keep app and supervisor on loopback. If accessed from Windows, both authenticated +forwards must lead to the same remote app/control pair; a working app forward alone +does not prove that Stop/restart is safe. A connection reset does not authorize +starting another worker or repeating an unknown task. + +Before an idle source refresh, privately preserve source state, workflows/User +Nodes, inputs/outputs, exact models, runtime/launcher/config and prior evidence. +Obtain the actual machine-local launcher/environment bindings, supervisor/worker +ownership, app/control ports, runtime contract, configuration/data roots, latest +preservation baseline and existing lifecycle procedure privately. Published source +alone does not reconstruct the specialist runtime. If any required item cannot be +established, stop before source/process changes and name it; do not substitute a +generic installer or guessed startup command. + +Use that existing guarded ordinary refresh procedure. Deploy the admitted backend +and its verified client bundle; verify the exact client-source binding, emitted +and served assets, process-start source and unchanged runtime. Rebuild only when +the selected source changed or the accepted bundle is unavailable, with the +integrator owning that bundle. +Do not reinstall ROCm or apply generic `uv sync --extra cpu/cuda` to that environment. + +**Important prior boundaries:** retained Linux records include allowed runtime +observation growth and an unresolved raw-preservation hold. Preserve both; do not +blanket-normalize JSON or silently relabel the old hold as a pass. Fresh current +inventory is required. Scope cleanup to owned tasks/caches only. + +## L1 — one actual custom-model, Block and service journey + +**Budget: 30-minute prerequisite selection, then 2–3 hours. Type: integrated +acceptance gap, with backend fixes only for diagnosed behavior.** + +**Where:** BE `modiff/custom_extension_source.py`, `custom_extensions.py`, +`custom_extension_api.py`, `custom_modular_extension.py`, `custom_modular_models.py`, +`custom_modular_inspection.py`, `service.py`, `service_api.py`, `service_package.py`; +`examples/custom_nodes/ModularImageReconstruction/`; FE normal custom-node, +Block/persistence and Service Export UI. + +The existing model-consuming example calls a connected **AutoencoderKL** to +reconstruct an image. It requires a compatible cached component. The existing +FLUX3 VAE must not be assumed compatible. The source is a runnable starting point, +not a new integration to invent. See the example README and actual `block.py`. + +1. Select one approved cached compatible model/component and permitted input. + Record immutable model/source identity and installed dependency contract. +2. For a Hub-import claim, identify and inspect an actual compatible custom-Block + source and its immutable commit. A model repository alone is not custom-node + code. The inspected local records did not establish a ready-to-use immutable + Hub source pin. If none can be admitted in the 30-minute slot, record this + prerequisite; a local example does not close the Hub-specific acceptance. +3. Use the normal Add/Load/Reload action after source/dependency review. The action + is code consent; discovery or workflow import is not. Do not automatically + install dependencies or execute arbitrary repository Python. +4. Connect model components → Models, approved input → Image, output → Preview. + Put the supported graph in a Block and expose Amount. Run with a nonzero Amount; + inspect actual model execution and decoded result, not only a successful status. +5. Save/reopen, change Amount and confirm a fresh affected computation while + retaining the compatible model owner. Save as User Node and reinsert; compare + effective values/graph. At idle, restart and verify the same graph/source/model + identity. Exercise actual visible controls rather than injected stores. +6. Export the actual API graph and Service package through the normal UI. Bind + only declared Amount/input/output fields. Use the existing service CLI against + the local backend, with an explicit bound. Match returned named outputs to its + actual task and durable media. Preserve the source manifest/trust boundary. +7. Release only owned caches and inspect output persistence, actual manager state, + app responsiveness and visible release acknowledgment. + +The CLI accepts these arguments. Define `MODIFF_PYTHON` as the verified interpreter +and `MODIFF_ORIGIN`/`CASE_DIR` as the observed local origin/new private case directory. +The examples below use the repository wrapper with the interpreter supplied as +its command argument. A private managed-overlay launcher can have a different +argument contract; inspect and reproduce that actual launcher rather than assuming +this wrapper reconstructs its environment. The graph/inputs/bindings are actual exports and values, +not fixtures to fabricate. Output paths must be new: + +```bash +./scripts/with-runtime-env.sh "$MODIFF_PYTHON" -m modiff.service inspect "$CASE_DIR/api-graph.json" \ + --server "$MODIFF_ORIGIN" --output "$CASE_DIR/service-inspection.json" +./scripts/with-runtime-env.sh "$MODIFF_PYTHON" -m modiff.service build "$CASE_DIR/api-graph.json" \ + --interface "$CASE_DIR/interface.json" --server "$MODIFF_ORIGIN" \ + --output "$CASE_DIR/service-package.json" +./scripts/with-runtime-env.sh "$MODIFF_PYTHON" -m modiff.service run "$CASE_DIR/service-package.json" \ + --inputs "$CASE_DIR/inputs.json" --server "$MODIFF_ORIGIN" --timeout 900 \ + --output "$CASE_DIR/service-result.json" +``` + +`--timeout` does not cancel the task. It reports its identity; inspect and use the +normal Stop path before any retry. CLI service invocation is the product's real +service route, not a substitute hidden browser submission. The service remains a +local MoDiff graph; standalone Diffusers-Python export is not implemented here. + +**Focused checks if corresponding code changes:** + +```text +python -m pytest -q tests/test_custom_extensions.py tests/test_custom_extension_source.py tests/test_custom_modular_identity.py tests/test_service_package.py tests/test_service_modular_fields.py +``` + +Use an isolated reviewed test environment; do not point these at live app data or +assume the active optional-runtime environment is the baseline test environment. + +**Exit:** a real model-backed edited/restarted graph and callable service with +correct named outputs, or a concrete retained prerequisite/failure. Local-only, +Linux-only and model-free proofs remain separately labeled. + +## L2 — the two remaining adapter-order controls + +**Budget: 1.5–3 hours including capture/recovery. Type: finite native acceptance.** + +Twelve finite executions are already retained: ten original cases plus NASA and +Monet scale-zero controls. Do not repeat them just to refresh timestamps. NASA +style remains unconfirmed; Monet's observed difference is narrow. None grants +publication approval. + +Use the retained exact control lock and original permitted input/media inventory. +Its SHA-256 is +`78d77b2ee6b4cbefddbb26a33d473d605965ccfe4fff93314488cb9337d574a0`. +The private relative record is +`final-release-20261027/linux/four-lora-controls-preparation-20261027/control-locks-and-observation-plan.json`. +Recover it from the originating private evidence store if absent on Linux. Git +contains this plan, not private inputs or raw receipts. Do not reconstruct absent +model revisions, adapter hashes, prompts or task evidence from this prose. + +1. Deploy the reviewed applied-adapter producer/parser before these runs. Old + receipts cannot retroactively acquire native activation observations. +2. **Joint:** actual retained T05 NASA recipe, NASA scale 0.75 followed by Outpaint + scale 1.5; 512×512, 16 steps, seed 481005, BF16/FP8r, CPU loading, no offload, + Auto false. Exact pinned artifacts and all other values come from the lock. +3. **Reverse:** same owned graph/IDs/settings, retaining first-run caches; reverse + only the adapter chain. Require actual changed application identity/order and + fresh downstream execution. Timing or a plausible image alone cannot prove it. +4. Retain original graph/creator/output packages, native task/attempt, resolved + inputs, applied adapter observations, model/runtime/source identities, decoded + bytes and actual visual assessment. Verify no stale or duplicate adapters. + +Each model task has a 900-second whole-task bound and normal Stop available. One +visible ordinary Run at a time; no hidden POST/store mutation to bypass UI behavior. +Do not resubmit when task outcome is unknown. Capture failure before cleanup. + +**Where if a defect appears:** `BE/modiff/applied_adapter_provenance.py`, +`native_disk_lora.py`, `modules/ModularDiffusers/loaders.py`; FE +`scripts/applied-adapter-provenance.mjs`, `live-proof-provenance.mjs` and +`src/studio/resolvedExecutionInputs.ts`. These are shared files: report a precise +reproduction and obtain explicit single-editor ownership from the integrator. + +**Checks if changed:** `tests/test_applied_adapter_provenance.py`, affected native +adapter tests and client receipt/provenance tests. Keep the strict recorder's +single-owner scope; do not loosen it for an unrelated multi-owner graph. + +**Exit:** original joint and reversed-order observations correctly match actual +application state and outputs, with any visual failure retained. This establishes +those controls, not NASA's style efficacy or public-template quality. + +## L3 — one adapter-bearing Group Disk lifecycle and truthful Auto refusal + +**Budget: 1–2.5 hours. Type: unclosed native resource/lifecycle acceptance.** + +The old disk-capacity obstacle was resolved by an already authorized, exact unused +model-cache deletion. Historical free space was 19,397,165,056 bytes against the +then required payload-plus-reserve floor of 17,454,649,984 bytes. The small margin +must be checked again on the actual writable offload filesystem. Do not schedule +more cleanup automatically or assume the old hold is still current. + +1. Obtain fresh capacity/artifact admission. If refused, record current numbers + and stop that row; do not erase important files or bypass the floor. +2. Save a separate owned copy of the retained approved Outpaint variant, preserving + exact input, seed, scale and other settings. Explicitly select `group_disk` with + AutoOffload true. It is a separately scoped resource variant, not the public + no-offload recipe. + Recover its original saved graph/creator package, input bytes, model/adapter + pins, seed, scale and resource settings in the private handoff. The adapter-order + lock alone is not this disk-case inventory. Missing originals block this row; + do not reconstruct them from prose or borrow an unrelated run's output. +3. Run with a 900-second bound. Observe component/load-specific offload directories, + actual output and applied-adapter state. Distinct owners/components must not + reuse equal-shaped wrong weights or stale group files. +4. Release the owned graph normally; inspect registry/manager ownership and actual + file cleanup. Retain shared owners and durable outputs. Empty cache counts alone + do not prove memory/file cleanup. Check the updated Linux Setup release indicator; + the old source retained a stale enabled indicator after backend cleanup. +5. Inspect the existing Linux FLUX3 Auto restriction through the normal UI without + submitting an unsupported model run. A truthful refusal on unsupported hardware + is the expected result; do not add Linux Auto authority merely to make it green. + +**Where:** `BE/modiff/diffusers_offload.py`, disk-offload/lifecycle modules, +`workflow_auto_lifecycle.py`, `flux3_auto_resource.py`, native loader hooks. Required +focused regression entry points include `tests/test_diffusers_disk_offload_lifecycle.py` +and `tests/test_pipeline_disk_offload_isolation.py` if those paths change. + +## Code ownership, handoff and stop conditions + +Default to evidence-only execution until a real defect is diagnosed. This lane +may own the L1 custom/service modules, selected example and corresponding tests. +Do not edit shared executor, Auto/resource, loader/provenance, FE source, lockfiles, +generated ledgers or web assets without recorded ownership transfer. Windows is +the sole final integrator. Read-only review is always useful during waits. + +By 13:00, push the Linux branch normally and supply: + +- Exact BE/FE base and head commits, changed files and ordered commit list. +- Reproduction, causal fix, commands/results, failed/skipped checks and source + impact; no full-suite claims from focused tests. +- For each native case: source/runtime/model/task/output identities, consumed + values, proof level, visible result and retained quality/capacity holds. +- Preservation and cleanup findings, active task/queue state and actual deployed + pair. Keep private logs/media out of public Git. +- Remaining prerequisites, estimated fix time and whether final Windows checks + must repeat because a shared execution path changed. + +Stop starting new cases at the handoff cutoff. Diagnose two same-category failures +instead of a third blind retry. Missing reviewed Hub source, incompatible cached +VAE, unreachable host, absent normal browser access, missing private locks or +insufficient disk are specific blockers. Report them immediately and continue only +independent admitted work. Do not hide them behind a substituted model-free demo. + +Cap this lane at eight hours and the 13:00 source handoff, whichever comes first: +L1, then L2, then L3 if time and capacity permit. The upper individual estimates +can sum to almost ten hours before fixes, so all three are not guaranteed. Leave +the last row explicitly unrun rather than overrun integration. Six to eight hours +is the target with cached compatible artifacts and healthy deployment. There is +no promise to finish Gallery/canonical/all-model work in this budget, and no +new-media publication is authorized by this plan. + +## Prompt for the Linux chat + +> Execute the bounded Linux lane in `plans/release-20261028/linux.md`, reading +> its README, review and required repository guides first. My delivery cutoff is +> 28 October 2026 at 18:00 IST, with 18:00–21:00 reserved for manual testing. +> Start from the pushed `work/manual-testing-20261020` pair in both repositories; +> preserve local work and use dedicated Linux branches. Establish current host, +> app/control ports, runtime, source, queues, data and offload capacity before +> changing the application. Tell me the exact task before acting. Preserve +> existing workflows, outputs, inputs, model caches, runtime and original failure +> evidence. Execute L1's real custom-model/Block/service journey, then the two +> remaining locked joint/reverse adapter controls and one Group Disk lifecycle +> when their prerequisites pass. Do not repeat completed scale-zero or original +> cases merely to refresh evidence. Admit concrete custom source through the +> normal deliberate Add/Load/Reload flow; never guess a Hub revision or substitute +> a model-free result. Use normal visible UI runs for model cases and the existing +> service CLI for the service case. Timeouts do not cancel unknown tasks. +> Own only the listed custom/service files and focused tests for diagnosed bugs; +> coordinate shared-file changes with the Windows integrator. Push a compact +> source/evidence handoff by 13:00 IST; source freeze is 14:00. Do not run duplicate +> broad gates, expand the catalog, weaken validators, change creator defaults or +> publish media. Report concrete blockers early and continue independent work +> within this finite plan. Routine actions already authorized by this execution +> request do not need another permission question. diff --git a/plans/release-20261028/r03-editable-prototyping.md b/plans/release-20261028/r03-editable-prototyping.md new file mode 100644 index 00000000..4a2ee55e --- /dev/null +++ b/plans/release-20261028/r03-editable-prototyping.md @@ -0,0 +1,35 @@ +# R03 editable prototyping + +Continue in the same backend/client PR7 pair. The existing task-first chooser, +native stage groups, inspectable Blocks, backend-declared model/task planners, +typed socket suggestions and nested UserNodes supply the representative path. +Do not replace these with a second executor or a client model compatibility table. + +The diagnosed remaining review defect is that model-selection attention details +were collapsed while Apply was available. A real browser RED retained the false +expanded state. The repair opens those details for the selected model, keeping +pointer/keyboard disclosure and the existing atomic Apply/Cancel transaction. +It changes no model selection, workflow values, resource policy or runtime path. + +The focused regression and 10 related mocked browser journeys pass, covering +native-stage preservation, compatible switching, delayed-read invalidation, +typed suggestions in both directions, Undo/Redo and reusable-node persistence. +163 focused unit contracts pass. These are software/authoring checks, not model +output or hardware qualification. Full paired gates, current CI, exact packaging, +fresh protected adoption and a native no-model journey remain required before +delivery; record their exact source and results in the existing PR descriptions. + +The native journey starts from a task, inspects actual stages, edits a prompt, +inserts a typed processor, reviews a cached compatible model/task switch and an +incompatibility, then saves/reloads and reuses a nested UserNode. Record gestures, +dialogs, corrections and unexpected rebuilding rather than claiming a universal +node-count target. Inspecting a stage must preserve the executable API graph. +Keep whole-pipeline exceptions explicit and saved templates/defaults unchanged. + +A fresh user prototyping review is required before closing the original A01 +usability goal. Technical tests cannot supply that verdict. R02 is separately +delivered; its closed setup/model/native proofs must not be repeated for R03. +All43 missing-model cases remain user-held. This UI-only change needs no model +run, installation, download, cache retirement or modification of accepted media. +Original Auto/creative, codec, Wan deadline, Gallery/public-lock, physical hardware +and publication limitations retain their separate scope. diff --git a/plans/release-20261028/remaining-release.md b/plans/release-20261028/remaining-release.md new file mode 100644 index 00000000..d29a4c37 --- /dev/null +++ b/plans/release-20261028/remaining-release.md @@ -0,0 +1,224 @@ +# Broader remaining work and release boundaries + +These tasks remain visible after the [28 October candidate plan](README.md). +They are not silently dropped from the originally requested whole-app release. +Do not start them in the Windows manual-testing window. A later continuation +needs an explicit finite selection and updated source/evidence inventory. + +The retained 27 October catalog census describes 80 public templates, 203 ordinary +workflows, 149 standalone/nonpublic-source rows, 58 resource tuples and seven +hardware profiles. Fifty-four ordinary workflows overlap public source templates; +these are not 283 independent model jobs. The 149 standalone rows include 100 image, +33 video, six audio and ten JSON outputs, with 20 deterministic builtins across +that set. It spans 91 model types. Refresh this census from the final source before +execution; the historical source pair is not current qualification. + +## B1 — complete the canonical execution-evidence path + +**Implementation incomplete. Budget: 4–8 hours for one bounded, genuinely native +tranche; approximately 1–3 additional working days for wider task/input/builtin +coverage, subject to the first tranche's findings.** This is tooling effort before +the missing model campaign, not an estimate for all 149 outputs. + +**Where:** BE `modiff/execution_input_provenance.py`, `NodeBase.py`, +`modules/DiffusersRuntime/main.py`, `modules/DiffusersImage/call_inputs.py`, affected +loaders/output producers and `tests/test_canonical_field_accounting.py`; FE +`scripts/live-proof-provenance.mjs`, `release-contract-core.mjs`, +`release-contract.mjs`, `template-qualification.mjs`, their fixture/negative tests +and `src/studio/resolvedExecutionInputs.ts`. + +**Current limitations:** input-free initial accounting is deliberately narrow; +input-backed canonical qualification and deterministic builtins are explicitly +rejected. A strict five-node DDIM accounting fixture is not universal graph support. +The actual three-node UI smoke did not supply the unchanged canonical graph's +complete evidence. Loader execution-profile/recipe accounting and generator +presentation-contract identity remained incomplete. Actual 32×32 bytes and legacy +1024×1024 form metadata must remain distinguishable. + +**Approach:** + +1. Reproduce the smallest real producer → normal export → reader failure without + editing original packages. Trace which values were requested, normalized, + consumed, inactive, superseded or merely presentation metadata. +2. Fix the actual producer/normalizer/join only where causality is established. + Preserve bounded payloads, privacy, legacy normalization and explicit unknowns. +3. Prove one unchanged canonical graph through the normal UI and original exports. + Confirm exact graph/default/prompt/model/component/task/output identities and + actual measurements. Do not infer missing fields from the current catalog. +4. Add input-backed evidence at execution time, binding the consumed input bytes; + a later file copy is insufficient. Add builtin semantics where model/accelerator + identity is genuinely not applicable, with real execution and output proof. +5. Extend accounting by declared task policy, including multiple outputs/owners, + only with positive and negative cases. Keep retry/fallback, quantization and + unsupported joins explicitly held until intentionally covered. +6. Reuse the existing executor and recorder. No second workflow representation, + fake model identity, loosened hash validator or automatic qualification promotion. + +**Exit:** native receipts pass the maintained reader for each newly supported scope; +unknown IDs, changed graphs/inputs/model sets, truncated evidence and unsupported +claims fail. Quality, hardware fit, rights and publication still require separate +acceptance. A recorder pass does not approve a template. + +## B2 — reconcile the historical Gallery before scheduling reruns + +**Mixed evidence/recipe/decoder gaps. Budget: 3–6 hours for the recoverable diagnostic +subset; 1–3 additional working days may be needed for actual replacements.** Media +generation/access and human quality approval are additional dependencies. + +**Where:** FE `scripts/template-gallery-harness.mjs`, +`template-gallery-repair-evidence.mjs`, `template-gallery-repair-contract.mjs`, +`live-proof-provenance.mjs`, `src/studio/templateExactness.ts`, `templates.ts`, +`templateOperationSelections.ts`, asset-source/rights descriptors and corresponding +tests. Preserve the original public Dataset and original approved bytes. + +The latest retained report had **83 overlapping errors across 70 examples**. +All 356 approved local files were recovered; the old missing-byte problem is not +the current blocker. This is neither 83 mandatory reruns nor 49 accepted repairs: + +| Group | Current issue | Correct next action | +| ------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | +| 49 historical candidates | Selection-only lock differences appear recoverable | Prove exact historical equivalence and original authority; preserve original recipe/source identities | +| Two ACE recipes | Real prompt/lyrics/meter/duration changes | Recover genuinely matching new evidence or generate the actual changed recipe; never pad audio or widen tolerances | +| Six Qwen Edit entries | Residual workflow-lock discrepancy unresolved | Compare original executed graph, adapter settings and current selection semantically | +| Two legacy Qwen bundles | Incomplete complete-model-set evidence | Recover original authoritative set or retain the hold; do not drop inconvenient duplicates | +| Thirteen video identities | Decoder/AV identity mismatch; derivative cases differ | Compare encoded bytes, original decoder/version/raw output and actual frame/AV identity before changing validation | + +Frame-checksum headers can include software/timing metadata, but header drift has +not been established as the sole cause of these original discrepancies. Preserve +all failed hashes and rights holds until evidence supports a scoped correction. +The maintained evidence-repair command is not permission to attach today's settings +to yesterday's output. + +**Exit:** every repaired row has original evidence justifying the repair and an +immutable before-copy; changed recipes/media obtain new execution and review. +`gallery:verify`/coverage results state remaining rows accurately. New public media +still needs explicit output-specific publication approval. + +## B3 — close the remaining selected FLUX3 templates and visual holds + +**Native/visual/rights acceptance, not one generic source bug. Budget: 2–4 hours +for L2/L3's finite controls; 4–8 hours for an initial quality-diagnosis tranche. +Publication timing depends on approval and successful new evidence.** + +The original eight-template target expanded with NASA/Monet candidate work and +controls. Keep public templates, private planning candidates, experimental +canonical graphs and scale-zero controls distinct; do not inflate the published +catalog count. A generated private trial is not a registered public recipe. + +Retained original visual holds include erased lower packaging panels, incorrect +stem/control counts or unintended labels, erased central accents, and unconfirmed +NASA styling. Windows two-reference quality holds remain separate from Linux +results. The two Windows outputs completed but did not satisfy their frozen visual +brief. No dropped-reference code cause was established in that audit. + +**Approach:** use the exact reviewed model/adapter/input order and original prompt, +size, steps, seed and resource recipe. Compare consumed controls and actual output +against the specific visual criterion. After two equivalent failures, change one +justified engineering/recipe hypothesis or retain the quality hold. A modified +recipe needs a new lock and new evidence. A Linux no-offload output cannot qualify +the Windows CPU-offload variant or vice versa. + +NASA requires a convincing intended style decision; Monet's scale-zero comparison +showed only a limited brushwork difference. Public recipe acceptance and concrete +rights/output-publication approval remain open. Preserve the original Tarot hold; +testing Monet did not grant Tarot's missing permission. + +## B4 — full advertised image/prototyping breadth + +**Some implementation exists; complete native variant/transition coverage does +not. Budget: 0.5–1 day for a representative additional transition tranche; several +days for the wider advertised route set after inventory and model access.** + +**Where:** BE executable specifications, image adapters, native modular selection +and custom composition; FE operation catalog/change planner, block persistence, +template admission, developer-first UX and service export. + +Freeze the union of actual advertised models/tasks/variants across palette, +starters, templates, pickers and documentation. Compare to the exact reviewed +upstream native exports. A missing MoDiff adapter is not an upstream exception. +For a legitimate whole-pipeline exception, document the exact task, unavailable +stage editing/reuse, supported controls and revisit trigger. + +Prioritize distinct semantic transitions rather than every alias permutation: +conditioning/latent changes, edit versus img2img, added required media, guidance +contract changes, custom nodes and saved interfaces. Retain edited values and wires, +review destructive changes, and prove actual execution after save/reinsert. Expand +audio/video usability independently; September's image announcement did not claim +that video simplification was completed. Standalone Python-code generation remains +a separate product feature, not a promise made by the current service exporter. + +## B5 — missing catalog executions and resource recipes + +**Large unmeasured campaign. Budget: first 2 hours to recover/classify receipts and +measure a representative runnable batch; thereafter estimate from actual runtimes +and artifact availability. The earlier extra 5–10-working-day allowance is +provisional, not a commitment.** + +Dependencies are B1 for unsupported canonical scopes, model/access/license/input +availability, usable target hardware and complete current evidence capture. +The 58 resource tuples are 23 resident, 26 model-CPU, eight group-disk and one +group-CPU in the retained census. They are not every-template × every-mode × +every-device. Preserve the maintained representative-selection rules and exact +workload identities. + +**Approach:** + +1. Recover original complete receipts from their originating hosts. Absence in the + current local registry does not prove absence everywhere. A custom-artifact + exemption is not a measured model pass. +2. Refresh source contracts and freeze the remaining exact row set. Resolve model, + component, input and recipe pins before downloading/running anything. +3. Group runnable rows by model for scheduling; each different locked workload + still needs its own evidence. Run one model job per host with task-specific + time/cancellation bounds. Do not launch an unbounded all-catalog loop. +4. Collect actual outputs, durations/peaks, reuse/resource behavior and task-specific + quality. Unknown or missing measurements stay missing. Keep supported resources + and hardware observations distinct from broad Auto authority. +5. Re-estimate after the first batch using remaining counts, observed durations, + downloads, failures and review time. Stop at the agreed finite batch boundary. + +Maintained commands include `release:qualification:run`, `release:resources:run`, +`release:template:qualify`, `release:hardware:qualify` and contract/report generators. +Read their current CLI help/source before invoking. Some commands called dry-run +still write derived reports. No general all-203 native campaign should be claimed +until its supported collector scope actually exists. + +## B6 — hardware and optional compiler qualification + +**External availability plus platform-specific work. Budget: about 0.5–1 day per +new available hardware profile for setup and a finite initial qualification; +model breadth, driver problems and downloads add time. No ETA for unavailable +hardware.** + +- Windows NVIDIA and CPU can supply their own exact native results. +- Linux Radeon shared memory supplies conditional Linux observations; it is not + additional dedicated VRAM and does not qualify a 16 GB Windows GPU. +- Apple Silicon is unavailable. The mandatory MPS predicate remains blocked. +- Intel XPU, AMD Windows and MI300X physical access is unestablished. AMD Windows + also lacks the fully reviewed SDK wheel lock required by its current installer. +- Optional Windows compilation needs a compatible reviewed toolchain and actual + kernel probe. Eager operation without Triton is independently useful and must + remain usable. Do not invent a Triton-Windows pin or install arbitrary wheels. + +The product's runtime tiers and per-model hardware support statements need +consistent wording. Changing a claimed support scope is a deliberate release +decision, never a way to silently pass a missing physical-hardware gate. + +## B7 — publication, final release and durable handoff + +**Budget: 2–4 hours once outputs, rights and all required gates are ready; approval +waits and new failures are outside that estimate.** + +Obtain concrete approval for each proposed new output and its rights/provenance. +Publish approved media to the configured public Hugging Face Dataset, pin the +actual revision, verify bytes/availability and update only approved source +descriptors/hashes/docs in Git. Never publish private logs, input media or generated +files merely because account write access is available. + +Freeze the final source/evidence pair. Run complete backend and compatible client +acceptance, asset and qualification gates. Failed, blocked and short-circuited +stages remain explicit. Deploy the verified bundle, preserve user data and produce +a supported-workflow/limitations handoff with actual source/runtime identity. + +The 28 October Windows candidate can be useful and testable while these rows stay +open. It must not be represented as their completion. diff --git a/plans/release-20261028/review-and-feedback.md b/plans/release-20261028/review-and-feedback.md new file mode 100644 index 00000000..3cc24509 --- /dev/null +++ b/plans/release-20261028/review-and-feedback.md @@ -0,0 +1,160 @@ +# Reviewed baseline, chronological feedback and remaining gaps + +Read this with the [deadline and ownership plan](README.md). Findings describe the +reviewed BE `ae09c201` / FE `fd3d3dac` pair. They distinguish missing implementation, +diagnosed defects, incomplete native acceptance and externally blocked work. + +## Clean-baseline review completed before planning + +The review inspected Git status, staged/unstaged/untracked paths, worktree heads, +history, preserved integration records, current authored changes, their call paths +and tests, and live remote branch identities. It did not change the application, +install packages, run models, restart services or perform another full test campaign. + +| Scope | Result | +| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| Backend | 12 worktrees: 10 clean, two historical dirty overlays | +| Client | 15 worktrees: 11 clean, four historical dirty overlays | +| Active primary and paired delivery checkouts | Clean, exact reviewed pair | +| Deployed Windows source checkout | Clean at reviewed backend commit | +| Historical backend overlays | 272 + 197 changed paths; 461 surviving file bodies and eight deletions match the preserved integration snapshot; statuses/indexes unchanged | +| Historical client overlays | 106 changed paths; exact preserved bytes/status path sets, zero newly added/missing paths or drift | +| Integration status | Existing source incorporated or superseded; no new pending implementation found | + +The backend historical overlays include 133 formerly untracked files; the client +image/audio overlay includes 17. These are preserved historical work, not a reason +to bulk-stage old files. Current client has all 17 and all 61 added literal test +titles extracted from that overlay's modified tests. Fifty of its 100 files still +match current contents after normalization; fifty have later primary changes. +The historical 54-exact/33-incorporated/13-superseded classification describes the +earlier integration, not today's whole-file equality. + +Other client overlays retain the already integrated policy/hydration fixes and +an unfinished Auto browser test whose intended coverage is superseded by current +FP8r/NVFP4 accepted/refused cases. The backend merge +`93fe5949e528f698a1cbed60bf661a9d0d9cc859` is an ancestor of the reviewed head. +One old backend contract branch has patch-equivalent commits rather than a new +missing implementation. Preserve all original copies and private records. A clean +new starting pair does not require destroying historical worktrees. + +Latest authored BE review covered `modiff/applied_adapter_provenance.py`, +`execution_input_provenance.py`, `native_disk_lora.py`, `NodeBase.py`, the affected +Diffusers loaders/call-input producers and their regressions. FE review covered +`resolvedExecutionInputs.ts`, `applied-adapter-provenance.mjs`, the provenance +factory, canonical recorder/reader, their negative tests and cache-release UI. +No new high-confidence runtime defect was established. Optional incomplete +evidence remains incomplete; it is not falsely promoted to acceptance. + +Both working-branch remote heads were updated normally to the reviewed application +pair before these plan files were written. The historical overlays were neither +reapplied nor deleted. No public media was published. + +## Chronology: what changed, and what did not become accepted + +Dates below are the supplied feedback dates. Implementation dates and commits are +separate. A commit subject or a developer announcement is not a native pass or +the reviewer's approval. + +| Feedback | Implementation/history inspected | Current disposition and task | +| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 20 August: quick iteration should be simpler than coding; one magic node plus editable stages | BE `e0481ed2` had generic contracts. September 12 BE `d70d737f` / FE `5c0b755` added the later nested modular representation and persistence. Current `BlockNodeV2.tsx`, `blockPersistenceV2.ts` and backend composition contracts implement the actual hierarchy. | Implemented for reviewed native routes. Continuous model-backed usability/persistence still needs W4/L1. Arbitrary imported Python is not automatically decompiled into editable stages. | +| 20 August: import custom Blocks from Hub and remember models/parameters | September custom-component loading includes BE `a1f24642`, `4bc0028f`; FE September 26 `9378cc7` simplifies intentional Add/Load. Current custom-extension registry and UI are implemented. | Missing integrated current-host evidence, not a missing Add button. L1 plus W4. Add/Load/Reload is explicit code authorization; graph import is not. | +| August follow-up: edited Cluster becomes reusable user node | Current accepted persistence contract stores workflow-instance edits and explicitly snapshots a reusable Block with Save as User Node. | The original automatic conversion proposal was superseded intentionally. Do not reintroduce destructive automatic conversion as a feedback fix. | +| 11 September: four understandable stages, visible graph, compatible family/task changes | FE `c08b02b` generic authoring, `7477c8b` model-change mapping; BE `59bc3421` task-first authoring; FE `c7af715` later visual grouping. Current `operationAuthoring.ts`, stage grouping and model/task review/Undo paths are implemented. | W4 covers a representative distinct transition, existing custom wiring and restart. Exactly four boxes everywhere is not a requirement; meaningful Guidance/Preview/input nodes may remain. All-family transitions remain broader work. | +| 11 September: typed suggestions when dragging from an empty port | Current `NodeSearchDialog.tsx`, `nodeConnectionMatching.ts` and type-compatibility logic implement verified matches plus explicit unverified matches. | Implemented; include the actual gesture in W4. Nominal type equality alone cannot establish arbitrary tensor semantics. | +| 11 September: repeated load/encode/unload/crash; Qwen would not run on Windows 16 GB/32 GB | BE September 17 `897e27a9` separates recompute/model lifetime; `b2e8ec5a` strengthens reuse; September 26 `01d91919` fixes cached Modular loading. Later owner/accounting fixes remain in current code. | Exact current Windows original-route acceptance remains open: W3. Historical larger/shared-memory Qwen output cannot close it. | +| 26 September: announcement of generic image workflows, exposed controls and uv/npm/custom-node docs | September 26 `e7cb7353`, `a0d29db8`, FE `9378cc7` and existing workbench guides. | The reply promised a later test, not approval. Assess actual simplicity through W4, not port/node counts. | +| 5 October: setup, core dependencies, Windows platform behavior, progress and memory failures | BE October 7 `0183fbed`, October 8 `11db2aa9`, October 9 `30924930`, `283c55b9`, `c43b5709`, `1634d936`; FE optional-runtime recovery `e2f535d` and later transport fixes. | Most implementation exists; original native installation/repeat-run acceptance remains W2/W3/W5. Details below. | +| 26–27 October: consolidation and current Windows update | BE `93fe5949`, `9d991969`, `a099c7b5`, `ae09c201`; FE `758d3564`, `fd3d3dac`. | Current tested build exists. Saved-list acknowledgment and cache-release timeout/error fixes are already delivered; do not schedule them as unimplemented. | + +## Each 5 October item + +| Item | Actual current code/contract | Remaining action | +| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 1. No-script path still called scripts | `BE/docs/developer-setup.md`, `pyproject.toml`, native `uv sync`/`uv run` and FE `npm ci`/`npm run dev` are direct. | W1 fixes stale distribution target; W2 executes the ordinary Windows instructions from a new isolated environment. | +| 2. Redundant flags | Ordinary examples no longer need `--no-sync`/`--no-project`. Isolated managed bootstrap legitimately has a different context. | Check the actual quick start; do not remove meaningful bootstrap isolation globally. | +| 3. Allocator and missing Triton | `BE/modiff/runtime_environment.py` applies platform policy before imports; `runtime_compilation.py` requires a real optional kernel probe. | W2 proves eager Windows generation with Triton absent; optional compiler support remains separate. Preserve operator overrides. | +| 4. Transformers optional | Required base dependency in `BE/pyproject.toml`; `modiff/base_runtime.py` verifies readiness lazily. | W2 fresh installation and isolated repair. No product dependency redesign needed. | +| 5. PEFT optional | Required base dependency; ordinary adapter integration uses upstream APIs. | W2 base readiness, W3/W4 ordinary Windows LoRA when its route/artifact is available, L2 exact Linux adapter controls. A tiny or Linux test does not prove full Windows LoRA replacement. | +| 6. uv pinned/no upgrade guidance | Operator uv accepted; tool upgrade, project lock update and ABI changes are documented separately. | W2 verifies commands in a disposable environment; no broad dependency upgrade. | +| 7. ECONNABORTED spam | FE `scripts/backend-proxy-lifecycle.ts` narrowly handles owned disconnected Vite sockets; actual backend failures remain visible. | W5 production and normal Vite refresh. Capture an emitting stack if it recurs. | +| 8. Immediate missing-package UI error | Base-included runtime profiles suppress optional Install/Activate; damaged foundations expose repair. | W2 verifies healthy startup and isolated damaged-environment recovery. Never damage the user's live runtime. | +| 9. Install/Activate delay and unclear status | FE `RuntimeOptimizationsCard.tsx`, `optionalRuntimePolling.ts`; BE durable optional job identity and ready replacement-worker checks. | W5 current visible progress/recovery. Actual fresh optional install is conditional and separate from ordinary base generation. | +| 10. Second-run Combined systemRamBytes failure | `BE/modiff/workflow_auto_resource.py` separates RAM/VRAM, grants exact resident credit once; `workflow_auto_lifecycle.py` checks actual post-release memory. | W3 original cold/warm sequence. The message described host RAM, not dedicated VRAM. | + +## Concrete gaps, with proof level + +1. **Wrong distribution instructions — diagnosed.** BE README and developer + setup, FE README/CONTRIBUTING/Windows links still name `fix-ui-ux-issues`. + Remote heads at review were BE `1634d936`, FE `2146f456`, behind the tested pair. + Current working/delivery branches contain the pair. W1 fixes the instructions + and their command-contract assertions; it must not silently merge public main. +2. **Windows Qwen 16 GB VRAM/32 GB RAM — native acceptance missing.** No exact + current qualifying receipt was established. Source tests and historical Qwen + runs on other hardware do not establish fit. W3 may discover a real defect or + an honest capacity limit; neither outcome should be guessed in advance. +3. **FLUX3 W01 — genuine retained cold-load capacity hold.** The latest retained + load needed 14,850,133,600 bytes of host RAM with 12,097,413,120 available. + Availability fell 3,298,099,200 bytes after dispatch; causality is unproved. + This is distinct from Qwen and the old warm-run complaint. No current duplicate + reserve bug was found. Do not lower the guard or close arbitrary user apps. +4. **Continuous custom/model/service journey — acceptance gap.** The pieces + exist. Existing model-free service export and representative model-switch + results do not close the same edited, saved, restarted, model-backed journey. +5. **General canonical collector — implementation incomplete.** FE + `scripts/release-contract-core.mjs` rejects deterministic builtin qualification + and input-backed canonical evidence. Current accounting join supports a narrow + input-free DDIM path. Actual native smoke had three grouped nodes rather than + the five-node canonical fixture, unaccounted loader profile/recipe fields and + an image-contract metadata mismatch. Do not edit original receipts to fit it. +6. **Native smoke display versus media — retained discrepancy.** Durable output + is correctly 32×32 while legacy top-level/form dimensions remained 1024×1024. + Trace requested/form/consumed/encoded origins before any metadata/UI fix; this + does not prove that the model generated at the requested displayed size. +7. **Strict applied-adapter multi-owner acceptance — explicit narrow scope.** + FE `scripts/applied-adapter-provenance.mjs` strict mode requires all executed + loader owners while individual proof records are output-ancestry scoped. The + existing strict joint/reverse protocol uses one owner; ordinary optional + recording is unaffected. Extend only with a deliberate multi-owner contract + and failing regression when that broader claim is needed. +8. **Historical first-click issue — unresolved, not reproduced as current.** + `docs/workflow-authoring-ux.md` retains an early non-submission after switching; + later repetitions passed. W4 observes first-click behavior; do not invent a fix. + +## Existing proof that should be reused honestly + +The exact pair has full software gates and one genuine 32×32 DDIM Custom/Expert +image, plus save, close, reopen, scoped cache release and original-data preservation. +Its Auto candidate is null. It proves current deployment/execution at that scope; +it does not qualify Auto, repeated inference, full-weight LoRA, the unchanged +canonical graph, every workflow or any absent hardware. + +Linux has 12 retained finite executions: ten original cases and two scale-zero +controls. Six original outputs are visual candidates; four remain quality holds. +The missing joint/reverse controls are L2. Historical disk cleanup resolved the +old capacity floor with a narrow margin; fresh admission is still required. Do +not repeat completed cases unless source impact or a new hypothesis warrants it. + +## Mistakes the next execution must avoid + +| Observed failure pattern | Required prevention | +| -------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| Repeated full suites consumed implementation time | Start with a reproduction and focused checks; reserve one final stable-source gate cycle. | +| Wrong base versus evaluated optional environment produced hundreds of test failures | Resolve interpreter/profile first. Keep stable base checks and validated optional-runtime checks separate. | +| A Windows `.venv` junction resolved into another checkout | Resolve real environment paths before sync/install; isolated directory names alone do not establish isolation. | +| Tests constructed a supervisor against live data | Set isolated storage before importing the server singleton; assert queue/data roots. | +| Sealed optional environments gained bytecode through bare PYTHONPATH | Use `scripts/test_reviewed_optional_runtime.py` and suppress bytecode writes through child processes. | +| Source, HMR or collector changed during a run | Freeze the actual serving and evidence-producing bytes, not merely a Git label. | +| Old form/model identity substituted for actual execution | Join original task, graph, model owner, consumed inputs and durable media; keep discrepancies visible. | +| Cache hit reported as independent inference | Inspect per-node compute/cache observations and timings; seed/prompt changes must cause appropriate computation. | +| Longer timeout hid unresponsive cleanup | Profile HTTP/worker responsiveness and lease ownership; 120 seconds is only the full release request deadline. | +| UI test hit a toast/overlay or stale node geometry | Inspect actual pointer target/drag threshold; preserve the failed harness evidence and repeat only the missing gesture. | +| Missing PATH/USERNAME, fonts, sibling checkout or artifact capacity caused repeated setup failures | Verify these prerequisites once in the actual isolated runner; two same-category failures trigger diagnosis. | +| Old resource or Gallery counts treated as new truth | Refresh the denominator at source freeze; compare semantics and retain original scope. | +| Output media/source inputs or derivative videos were confused | Select the declared output and compare task/hash; decoded-frame headers can differ without established pixel drift. | +| Quality failure was treated as a receipt or rerun problem | Preserve its failed visual criterion; after two failures require a changed hypothesis. | +| Merge/push described as deployed/accepted | Verify running source and served bundle, then actual affected user behavior. | + +The mirrored `docs/cluster-engineering-lessons.md`, CONTRIBUTING, SECURITY and +workbench acceptance guide remain required reading. This plan supplements them; +it does not authorize changing quality criteria or weakening execution boundaries. diff --git a/plans/release-20261028/windows.md b/plans/release-20261028/windows.md new file mode 100644 index 00000000..b667a3e6 --- /dev/null +++ b/plans/release-20261028/windows.md @@ -0,0 +1,346 @@ +# Windows lane: implementation, acceptance and final delivery + +Follow the [shared deadline/ownership plan](README.md) and +[review findings](review-and-feedback.md). All deadlines are 28 October 2026 IST: +Linux handoff by 13:00, code freeze 14:00, verified deployment by 18:00, manual +testing 18:00–21:00. This lane is the release integrator. + +## W0 — establish the candidate and protect the existing app + +**Budget: 30–45 minutes.** No product defect is implied by this task. + +Start from the clean published working branch in both repositories. Run branch +creation only in a non-served checkout/worktree; a clean tree can still be serving +the application. Defer any served-source switch until an idle, preserved cutover. +Use separate lane branches if no branch with that name exists: + +```text +git fetch origin work/manual-testing-20261020 +git switch -c codex/release-windows-20261028 origin/work/manual-testing-20261020 +git status --short +git rev-parse HEAD +``` + +For an existing lane branch, inspect it and resume deliberately; do not force +recreate it. Review local AGENTS/CONTRIBUTING/SECURITY and the complete mirrored +cluster lessons. Resolve actual worktree and `.venv` paths, including junctions. + +Record privately the serving source pair, worker/supervisor identity, app/control +origins, queues and downloads, runtime/profile, model cache roots, disk, system RAM +and dedicated VRAM. Preserve hashes of existing workflows, reusable Blocks, inputs, +outputs, configuration, launcher/runtime and backend-owned `web/user` files. +Inspect the actual `queued` map as well as the current task. A historical PID, +port number, empty `pending` property or remembered count is not current evidence. + +Keep the already testable app available while preparing isolated setup/test work. +Use the existing deployment procedure at an idle boundary. Do not introduce a new +server/controller, change global Python/Node installations or close user apps. + +**Exit:** known source/runtime/data boundaries, named Linux owner, safe separate +test storage and a compact before-state. If these cannot be established, diagnose +the prerequisite before running tests against an unknown app. + +## W1 — make the advertised installation obtain this update + +**Budget: 45–90 minutes. Type: diagnosed documentation/contract defect.** + +**Where:** `BE/README.md`, `BE/docs/developer-setup.md`, related current installation +examples such as `BE/docs/windows-fashion-demo.md`; `FE/README.md`, +`FE/CONTRIBUTING.md`, `FE/docs/windows-support.md` and +`FE/scripts/backend-installer-contract.test.mjs`. + +Those live instructions still clone/link `fix-ui-ux-issues`, whose remote heads +predate the reviewed pair. A user following them can reproduce older bugs even +though the running local app is updated. + +**Approach:** + +1. Verify remote refs again. Use the already published delivery branch for the + interim candidate, or a deliberately published reviewed release ref. Do not + imply that `main`/`develop` already contain the changes. Never force-push those + branches to repair documentation. +2. Update both ordinary quick starts and active setup links to the same compatible + pair. Explain the exact paired commits for reproducibility; a matching branch + name alone is insufficient. Preserve historical dated evidence as historical. +3. Update the existing command-contract assertions. Keep native `uv`/`npm` commands, + the same accelerator extra on sync/run, correct Windows Python path, and + specialist AMD instructions separate. No installer wrapper in the advertised + direct path; no unnecessary global version/package upgrade. +4. Test the published instructions from the fresh checkout used by W2. Verify + referenced paths and ordinary Git fetch/checkout from the remote, not merely + a local branch name. Keep the upcoming release target and plan links consistent. + +**Checks:** focused `node --test scripts/backend-installer-contract.test.mjs`, +Markdown/format/link checks, and `tests/test_dev_entrypoint.py` if entrypoint +behavior changes. These documentation-command assertions do not prove installation. +Include the required full client gate at final freeze for changed setup/config +examples, as CONTRIBUTING specifies. + +**Exit:** a reviewer can obtain the tested source pair from the published commands. +**Blocker:** choosing a public release branch/tag is separate from changing docs; +use the existing authorized candidate branch rather than inventing a release. + +## W2 — ordinary fresh Windows setup and readiness + +**Budget: 1.5–3 hours; network/package download time is additional. Type: native +acceptance gap; most source implementation already exists.** + +**Where:** `BE/pyproject.toml`, `uv.lock`, `modiff/base_runtime.py`, +`runtime_environment.py`, `runtime_compilation.py`, `optimization_packages.py`, +`docs/developer-setup.md`; FE `src/components/RuntimeOptimizationsCard.tsx`, +`src/studio/templateReadiness.ts` and `src/studio/optionalRuntimePolling.ts`. + +Use a genuinely separate checkout/environment/data directory, not a second folder +whose `.venv` resolves into the live runtime. Preserve package/download caches; +sharing immutable package-cache bytes does not make the new environment non-fresh. + +1. Follow W1's checkout instructions. Verify Node/npm versions and ordinary + operator-installed uv. Install the declared CUDA profile without repository + installer wrappers: + + ```text + uv sync --extra cuda --locked + uv pip check --python .venv/Scripts/python.exe + uv run --extra cuda python -m modiff.preflight --json --fail-on-error + ``` + +2. Configure an isolated data root and unused loopback ports using the existing + documented configuration. Check the intended port before launch. Start with + the same CUDA extra; do not launch another backend on an existing app's port. +3. Inspect dependency versions and capability readiness. Transformers and PEFT + must already be present. Startup, browsing and Auto inspection must not install + anything. An ordinary template must not ask the user to Activate those core + libraries. Model weights and gated access remain separate prerequisites. +4. Record the actual allocator settings and whether Triton is absent. Run one + supported eager/SDPA image through the normal UI with an already approved cached + model. A small model is suitable for setup plumbing, but label that scope; + it cannot replace W3's Qwen workload or establish optional compiler support. +5. In this disposable environment only, exercise the documented missing-base + repair path and ordinary same-profile update. Do not uninstall a foundational + package from the user's active environment or intentionally upgrade all packages. +6. Launch the matching FE with `npm ci` then `npm run dev`; cover the normal Vite + path separately from the backend-served production client in W5. + +**Expected:** reproducible setup, accurate healthy/missing-base UI, no foundational +Install/Activate ceremony, a genuine image, and ordinary Windows operation without +Triton or unsupported allocator warnings injected by MoDiff. + +**Blockers:** package download/access, insufficient isolated-disk capacity, GPU +driver/runtime incompatibility, a currently busy GPU. Report these directly. +After two failures in one setup category, inspect cause instead of starting a +third installation. Native uv CUDA and the existing managed composite are distinct +runtime contracts; do not merge their proof. + +## W3 — original Windows Qwen and repeat-run memory complaint + +**Budget: 3–6 hours if the exact route is admitted. Initial capacity verdict by +04:00. Type: open native acceptance; a new memory bug is not yet established.** + +**Where to trace:** + +- `BE/modiff/NodeBase.py`: input snapshots, implementation identity, cache reasons. +- `BE/modiff/server.py`: per-node execution/reuse events, exact cached owner + bindings, normal cache release and memory observations. +- `BE/modiff/workflow_auto_resource.py`: separate RAM/VRAM, candidate scope, + loading/conversion allocations and once-only resident storage credit. +- `BE/modiff/workflow_auto_lifecycle.py`: ownership removal and actual next-owner + capacity, not assumed reclaimable bytes. +- `BE/modules/ModularDiffusers/loaders.py`: component reuse, placement, optional + quantization and pre-allocation guards. +- For the separate FLUX3 case: `BE/modiff/flux3_auto_resource.py` and the bounded + CUDA loading helpers. FLUX3 evidence does not close Qwen feedback. + +**Approach:** + +1. Identify the exact original Qwen text-to-image template/route, immutable model, + full creator settings and approved installed artifacts. Do not substitute Qwen + 2.1, a different model, reduced resolution/steps or Custom mode and call it the + original Auto acceptance. Record a separately chosen supported recipe separately. +2. Obtain live Auto assessment and idle RAM/dedicated VRAM. If refused, preserve the + exact requirement/availability and source before any retry. Trace cold loading, + retained owners and actual process/OS memory to identify an overcount, leak or + genuine shortage. A capacity floor is not automatically a bug. +3. For a diagnosed defect, make a minimal shared correction with a failing focused + regression. Never remove safety reserve, count shared memory twice, credit a + partial/dead owner, close arbitrary user applications or restart to disguise a + warm-run memory failure. Contact the Linux owner before shared-file changes. +4. Once admitted, run A–E below consecutively without intermediate cache release, + worker restart or unrelated cleanup. Capture actual node events, model load and + encoder observations, memory and terminal receipts. An unchanged cache hit is + legitimate, but label it as delivered cached output. + +| Case | User action | Expected result | +| ------------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | +| A | Cold run of exact saved recipe | Successful load, complete output set and responsive UI at full settings | +| B | Run again unchanged | Valid cached delivery or actual compute identified; no unnecessary weight reload or crash | +| C | Change seed only | New downstream computation; model and unchanged prompt encoding reused where supported; consumed seed matches | +| D | Change positive prompt and seed | Prompt re-encoded, new generation; unaffected settings/models retained | +| E | Restore original values | Correct restored execution or honest cache reuse; no stale embeddings/adapters/guider state | +| F/G, only if time permits | Switch to another supported model and back | Reviewed compatible values/wires preserved; valid owner replacement/reuse or accurate refusal | + +5. Share W4's save/reopen and LoRA observations with these runs only when they + really use the same graph/settings/source. After A–E, exercise scoped Release; + output bytes persist and unrelated owners remain. Then verify next-run behavior. + +**Focused tests when affected:** `tests/test_node_base.py`, +`test_modular_workflow_reuse.py`, `test_workflow_auto_resource.py`, +`test_workflow_auto_cuda_recovery.py`, `test_node_cache_cleanup.py`, and exact +FLUX3/quantization tests only for changes to that separate route. + +**Separate FLUX3 capacity diagnosis:** the retained W01 refusal happened before +generation, with a 2.75-billion-byte RAM shortfall. The earlier loading-overlap +fix is already in the baseline. First attribute the dispatch-to-load memory drop; +do not replay the same recipe hoping free memory changes. If the real envelope +cannot fit with supported policies, preserve the hold and its practical user +guidance. This prevents claiming that the original Windows memory feedback is +fully resolved. + +## W4 — one continuous image-prototyping and persistence journey + +**Budget: 2–4 hours, reusing genuine W3 observations where applicable. Type: +integrated acceptance plus narrowly diagnosed UX fixes.** + +**Where:** FE `src/components/BlockNodeV2.tsx`, +`src/components/CustomExtensionsPanel.tsx`, `src/components/NodeSearchDialog.tsx`, +`src/studio/blockPersistenceV2.ts`, `src/workflow/operationAuthoring.ts`, +`src/workflow/operationLegacyBlockChange.ts`, +`src/workflow/nodeConnectionMatching.ts`, the existing workflow save/sync store +modules and `src/components/ServiceExportDialog.tsx`. BE custom/composition/service source is owned according +to the shared plan, not edited concurrently. + +1. Create an image workflow through the normal task browser. Show its generic + load/setup → encode → denoise → output stages. Advanced options should remain + discoverable. Do not redesign the product or enforce four boxes everywhere. +2. Drag from an unconnected image/text port onto empty canvas. Verify compatible + suggestions and insertion with the correct wire. Check that unrelated types + are excluded by default. Preserve the explicit unverified-match option. +3. Use a reviewed native modular Block and expand its actual upstream hierarchy; + an ordinary visual group around a whole-pipeline call does not establish this + acceptance. Edit prompt, seed and another applicable control through visible + inputs; commit focus. Collapse/expand, resize, move a supported internal node and make + one supported connection edit. Inspect usable internal controls, all ancestor + bounds and semantic connections. No hidden-store injection is acceptance. +4. Use an already reviewed custom node or the exact source admitted by L1. For a + true Hub-Block claim, exercise the actual pinned Hub Add/Load path on Windows; + a local text helper alone cannot supply that claim. If the source/model is + unavailable, retain the partial Windows result and precise missing prerequisite. +5. Review a supported cross-family or text-to-image/image-to-image change. Test + Cancel before Apply; apply one compatible change; Undo/Redo. Preserve authored + values, user nodes, layout and connections; require missing input media openly. + Observe the first Run click after a model change rather than silently clicking + again if no task is submitted. +6. Save the workflow, explicitly Save as User Node, close its tab and reopen from + My workflows without reloading the browser. Insert the reusable Block. Compare + effective defaults plus overrides and exported execution graph, not just the + overrides dictionary. Plain edits must not overwrite the library definition. +7. At an idle boundary, refresh and restart the actual candidate. Reopen/reinsert + and Run with saved model/parameters. Match the restored generated preview to + the actual task/media, excluding input images and thumbnails. +8. Verify model-backed service execution on Windows if claimed for this release; + otherwise document L1's Linux-only scope. The existing service package is a + local MoDiff API graph, not standalone Diffusers Python generation. +9. Reserve 45–90 minutes within the W3/W4 model budget for one ordinary Windows + LoRA case if compatible approved artifacts are already cached. Freeze the base + model, adapter revision/hash/name and full recipe. Compare base/zero and nonzero + scale with the same seed, then change scale and restore/remove the adapter. + Confirm actual activation, affected fresh computation, persisted settings and + no stale adapter after removal. If a second approved adapter is available, + exercise replacement as a distinct observation. Do not infer effect from a + descriptor alone. If fit/artifact/time admission fails, leave Windows LoRA + acceptance explicitly held; PEFT installation and Linux L2 cannot close it. + +**Checks if changed:** existing operation-authoring, block-persistence, graph +export, node-connection-search and workflow-backend-sync tests, plus the relevant +native/browser gesture. No new source change is required merely because a proof +row was previously missing. + +**Exit:** one continuous, recorded journey with exact values and output after +restart. A defect receives a causal fix; an unrun transition remains unrun. +Arbitrary family/task permutations are outside this deadline. + +## W5 — refresh, progress, release and installation status + +**Budget: 1–2 hours. A real optional reinstall adds 1–2 hours and is admitted only +if needed for an affected release claim.** + +**Where:** FE `scripts/backend-proxy-lifecycle.ts`, +`src/studio/optionalRuntimePolling.ts`, `src/components/RuntimeOptimizationsCard.tsx`, connection +and supervisor helpers, `src/utils/serverActions.ts`, `src/components/CustomNode.tsx`; BE websocket, +optional-runtime job/replacement-worker and cache teardown paths. + +- Observe production startup and five refreshes during a genuine owned run. The + same task/progress/output recovers; another edited tab stays selected and intact. + Repeat the disconnect observation through normal Vite serving. Record emitting + process/stack if ECONNABORTED recurs. Do not globally suppress network errors. +- On a separate owned run, ordinary Stop reaches a durable terminal state and the + queue drains before retry. Distinguish graceful cancellation from worker + replacement. Retain the failed attempt; never retry an unknown active task. +- After genuinely loaded-model execution, Release cache updates the UI from the + acknowledged removed-node set, preserves outputs, stays responsive and shows an + error if it fails. The current full cache-release request timeout is 120 seconds; ordinary + requests and recompute retain their narrower policy. +- In an isolated runtime only, if a real optional install/activate is necessary, + capture durable job ID and visible install → verify → activate/restart → ready + stages, refresh recovery, failure recovery and replacement-worker identity. + HTTP 202, an installed directory or a returned Activate button is not readiness. + Ordinary base dependencies must never require this ceremony. + +Use existing request/proxy/polling regressions when their code changes. A mocked +polling pass alone does not close actual installation or native refresh acceptance. + +## R1 — integrate once, verify, deploy and hand over + +**Reserve 14:00–18:00.** Read Linux's exact commit/validation handoff by 13:00. +Inspect semantic conflicts even if Git merges cleanly. Preserve old evidence and +user data; do not merge historical dirty overlays again. + +1. Freeze BE source, then update both immutable FE CI backend refs to the real + compatible BE commit when coordinated code changes require it. Run focused + conflict/contract checks; build the client from source. +2. Mirror final client `dist/` into BE `web/` through the established procedure, + preserving `web/user` and local Gallery installs. Never hand-merge minified JS. +3. Check all maintained generated contracts using the exact contributor/CI + commands, including operation inventory and image-prototyping readiness. + Regenerate only affected outputs. The dependent ledger chain is upstream + coverage → template candidates → authoring specs → Comfy contract/evidence + resolution; operation inventory/readiness also require their own checks. + Compare semantic changes; hash refreshes grant no qualification. +4. Run complete BE CONTRIBUTING validation and compatible FE `npm run check` / + required browser gate on frozen source. The same interpreter/runtime cannot + be assumed valid for base and active optional tests. Preserve skips/failures. +5. Record the whole-app gate limitation separately. Inspect Gallery, release and + asset stages when their inputs changed; do not describe short-circuited stages + as successful. An unavailable Mac remains blocked. +6. At idle, deploy the exact accepted pair using the existing guarded process. + Compare source identity, disk and HTTP asset bytes, main/control worker identity, + saved-data before/after and ordinary output access. Recheck only affected native + paths on the deployed view. Keep a verified prior candidate for rollback. +7. Push both source branches normally and publish the exact paired identities. + Clean active checkouts must contain no forgotten implementation changes. + +**18:00 manual checklist:** allocate about 20 minutes setup/launch, 40 minutes +generation/repeats, 40 minutes graph/model/custom edits, 30 minutes save/restart/ +reopen, 20 minutes Stop/refresh/cache release, plus 30 minutes for observations. +Give concrete workflow names, settings, expected result and known limitations in +the actual handoff. This is a 3-hour maximum guide, not a demand to rerun a broad +qualification suite. Leave the app idle and ready for the maintainer. + +## Prompt for the Windows chat + +> Execute the Windows lane in `plans/release-20261028/windows.md` together with +> its README and review. Deadline is 28 October 2026 at 18:00 IST; reserve +> 18:00–21:00 for my manual testing. Begin from the published clean +> `work/manual-testing-20261020` pair and create/resume the dedicated Windows +> branches safely. Read the required repository guides and establish current +> app/runtime/data ownership before changing anything. Tell me the exact task +> before working on it. W1–W5 are the scope; diagnose actual failures and implement +> focused fixes, rather than repeatedly running full tests. Preserve user data, +> runtime, model settings and all original failed evidence. Keep Qwen acceptance +> separate from the FLUX3 capacity hold. You own frontend, setup/distribution and +> final integration; coordinate shared backend files with the Linux chat through +> the agreed handoff. Source freeze is 14:00, deployment verification before +> 18:00. Use one final stable-pair gate cycle, report blocked/unrun requirements +> honestly, and provide the actual URL, changes and expected manual-test results. +> Do not expand into the full catalog or publish new Gallery media. Raise concrete +> missing access, source approval or hardware prerequisites promptly; do not ask +> again for routine actions already authorized by this execution request. diff --git a/public/THIRD_PARTY_LICENSES.txt b/public/THIRD_PARTY_LICENSES.txt index d9f81d82..fa46f89b 100644 --- a/public/THIRD_PARTY_LICENSES.txt +++ b/public/THIRD_PARTY_LICENSES.txt @@ -4454,7 +4454,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================================================ -source-map-js@1.2.1 +source-map-js@1.2.2 Declared license: BSD-3-Clause ================================================================================ @@ -4782,7 +4782,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================================================ -vite@8.1.4 +vite@8.1.6 Declared license: MIT ================================================================================ diff --git a/public/assets/cosmos3-super.card-poster.png b/public/assets/cosmos3-super.card-poster.png new file mode 100644 index 00000000..5179df92 Binary files /dev/null and b/public/assets/cosmos3-super.card-poster.png differ diff --git a/public/assets/cosmos3-super.card-poster.svg b/public/assets/cosmos3-super.card-poster.svg new file mode 100644 index 00000000..33234479 --- /dev/null +++ b/public/assets/cosmos3-super.card-poster.svg @@ -0,0 +1,35 @@ + + Cosmos 3 Super editorial workflow illustration + An original vector caption and image diagram with encoding, denoising, decoding and safety stages. This is editorial artwork; a generated image example is pending. + + + + + + EDITORIAL WORKFLOW ILLUSTRATION + Cosmos 3 Super + From a detailed caption to an image. + Publisher caption workflow + Native stages, including safety checks. + Generated image example pending. + + + + CAPTION + + + + + + + IMAGE · ILLUSTRATED + + + + + + + CaptionEncode inputsDenoiseDecodeSafety check + + Illustration only · Full-model template · Image output not yet published + diff --git a/public/assets/flux2-dev.card-poster.png b/public/assets/flux2-dev.card-poster.png new file mode 100644 index 00000000..0e724d08 Binary files /dev/null and b/public/assets/flux2-dev.card-poster.png differ diff --git a/public/assets/flux2-dev.card-poster.svg b/public/assets/flux2-dev.card-poster.svg new file mode 100644 index 00000000..dfe51e3c --- /dev/null +++ b/public/assets/flux2-dev.card-poster.svg @@ -0,0 +1,38 @@ + + FLUX.2-dev editorial workflow illustration + An original vector teapot and a four-stage workflow diagram. This is editorial artwork; a generated image example is pending. + + + + + + + + + + EDITORIAL WORKFLOW ILLUSTRATION + FLUX.2-dev + A prompt. Four simple stages. + Morning light teapot + Original vector artwork for browsing. + Generated image example pending. + + + + + + + + + + + MORNING + LIGHT + + + + + PromptEncode inputsDenoiseDecode image + + Illustration only · Full-model template · Image output not yet published + diff --git a/public/assets/minimax-h3-old-town.card-poster.png b/public/assets/minimax-h3-old-town.card-poster.png new file mode 100644 index 00000000..518f6bd3 Binary files /dev/null and b/public/assets/minimax-h3-old-town.card-poster.png differ diff --git a/public/assets/minimax-h3-old-town.card-poster.svg b/public/assets/minimax-h3-old-town.card-poster.svg new file mode 100644 index 00000000..292912b5 --- /dev/null +++ b/public/assets/minimax-h3-old-town.card-poster.svg @@ -0,0 +1,56 @@ + + Human and cat editorial workflow illustration + Original vector artwork of an adult and an orange cat on a bench in an old town. This is an editorial illustration; the generated example awaits review. + + + + + + + + + EDITORIAL WORKFLOW ILLUSTRATION + MiniMax H3 Image + Old town. Human & cat. + Two subjects. A street full of life. + Original vector artwork for browsing. + Generated example awaiting review. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Model setupEncode inputsGeneratePreview + + Illustration only · Experimental full-model template · No generated image published + diff --git a/public/template-gallery/manifest.json b/public/template-gallery/manifest.json index 3326fe23..818683f0 100644 --- a/public/template-gallery/manifest.json +++ b/public/template-gallery/manifest.json @@ -1,228 +1,250 @@ { "schemaVersion": 2, - "generatedAt": "2026-07-28T03:20:46.526Z", - "runtimeFingerprint": "sha256:stable-runtime-v1:63040a4327d52e83952a6e3236e25f2b45026f345548e67b8de1b077986ba4cb", + "generatedAt": "2026-11-15T04:36:21.281026+00:00", + "runtimeFingerprint": "sha256:stable-runtime-v1:d6393f9274337dffc2f9e7989dcfadebff77da4f76e3a7d777c0be0451656304", "examples": [ { "templateId": "ace_step_audio_continuation", - "verificationStatus": "reviewed", - "promptSettingsHash": "ps_88ca0440", - "templateLockHash": "tpl_3fd0c7f6", + "promptSettingsHash": "ps_b7f40fe7", + "templateLockHash": "tpl_ffc05ace", "modelRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0", - "runtimeFingerprint": "sha256:stable-runtime-v1:a1bb688020dc8225508ce1bdead3dcc2da0d27ce7ccfe0c83cca13e3c69ec606", - "graphHash": "sha256:canonical-graph-v1:3475f78b638f9ea30e139d41fa21dc8cf6e301500afdc991c65a89b401eef658", - "proofLockHash": "sha256:live-proof-lock-v1:05b4879d39ce1f60721a3264296e9c85b49989534deea8cb2bf1df9da6267a7a", - "backendSourceFingerprint": "sha256:backend-source-v1:246ddbd9437c82301c73405e210014ddb21fe37a7bb93b34c01d0ec4151703b4", - "backendContractFingerprint": "sha256:backend-contract-v1:4d014ddcf9a8e03de7b5fd0b277f842763076e15c78bc947eb24add9c202f24e", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:1bbede0296926bae1a4361e3503f1c2bed1b8ca81c51a53e49f44644552a1324", + "proofLockHash": "sha256:live-proof-lock-v1:a5c54d874bd1825b7ee339ab1708921200c7fb06c8b6729bcbf554d1fbc150d4", + "backendSourceFingerprint": "sha256:backend-source-v1:f2abf44f5ca8acadbff85dbe3a906c84454d653c1663e3cdd742180a0b1ad8c8", + "backendContractFingerprint": "sha256:backend-contract-v1:417e17e98ccc5c53560fa8c5e422e8a92fc815650fe7f392c7af856918eaeb8f", "modelCommit": "200ba991ae448051e14b0183157e35c2d27c9fb0", + "templateRevisionHash": "sha256:template-revision-v1:ce94c324abc3f91a1bca39ea3c37bbe6cbcf02d08ee8e04d6eb8f95de7baafe7", "modelSetHash": "sha256:model-set-v1:cb98800567bfc5639f18b289df8601c58d751c1385f7d7f14d4d494d291c660e", - "inputArtifactsHash": "sha256:input-artifacts-v1:dc7de6b40b6ace66065ae35c9c7f2e31aae690d4e77ed774195799240dca24ea", - "templateRevisionHash": "sha256:template-revision-v1:676f97b33c732351d48ce5da1b4b3868377f1c2a4f9a1329b143e07a9d9fb49f", + "inputArtifactsHash": "sha256:input-artifacts-v1:bd1cbd02f87b2799cf414f0c9dbeeccabfbfe9ef72ce8bc603f02355cb528f14", + "templateInputContractHash": "tic_f5949adc", "provenancePath": "/template-gallery/reviews/ace_step_audio_continuation.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:38ddd3515e4f20fb41e0c5a0e75b942126603b89c9ddace863dd1e6a7b50e43a", + "provenanceHash": "sha256:canonical-json:11e38d435b4e801558adbe3c182ab9097347af2d9e68364b841aac0c0fa7a7bc", "outputPath": "/template-gallery/ace_step_audio_continuation.wav", "thumbnailPath": "/template-gallery/ace_step_audio_continuation.wav", - "mediaHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:23455c350949e36b5edb8254aa2b24de840dc07b77d6a83ef707b38d3d0dacaf", + "mediaHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:450087f278f07acc8243e98ecdf39a57ccc9c564635b81c3dde9753367d67859", "mediaType": "audio", - "verificationTimestamp": "2026-07-18T06:11:27.597Z", + "verificationTimestamp": "2026-11-08T20:34:02.779007+00:00", "qualityReviewPath": "/template-gallery/reviews/ace_step_audio_continuation.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:083757d361565796e920a4857aa8f87385ae9979f3dfa8713b9050cd34efbb86", + "qualityReviewHash": "sha256:canonical-json:7fbd76053bc4eaed7cf81abe036a70c918bd1ca67cc4ad35307254eecfe2fdb2", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex decoded-audio, waveform, and deterministic parity review", - "reviewedAt": "2026-07-18T06:05:00.000Z", - "durationSeconds": 15, - "sampleRate": 48000, - "templateInputContractHash": "tic_f5949adc" + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-08T20:34:02.779007+00:00", + "verificationStatus": "reviewed", + "durationSeconds": 90, + "sampleRate": 48000 }, { "templateId": "ace_step_audio_repaint", "verificationStatus": "reviewed", "promptSettingsHash": "ps_3360c342", - "templateLockHash": "tpl_a33bdc2c", + "templateLockHash": "tpl_f6c20413", "modelRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0", - "runtimeFingerprint": "sha256:stable-runtime-v1:a1bb688020dc8225508ce1bdead3dcc2da0d27ce7ccfe0c83cca13e3c69ec606", - "graphHash": "sha256:canonical-graph-v1:84ba4acae54e109765bae3adae200f763436529ad91461aab0662c7005c90755", - "proofLockHash": "sha256:live-proof-lock-v1:765a81529d7753ac8effa0440dee1afefabc90c0ec00bd659a9c7ffa69258ae7", - "backendSourceFingerprint": "sha256:backend-source-v1:246ddbd9437c82301c73405e210014ddb21fe37a7bb93b34c01d0ec4151703b4", - "backendContractFingerprint": "sha256:backend-contract-v1:4d014ddcf9a8e03de7b5fd0b277f842763076e15c78bc947eb24add9c202f24e", + "runtimeFingerprint": "sha256:stable-runtime-v1:e02cad6304cbe4b3049532fb4fd705013b248d18d388ae8d212caed0ddf156c4", + "graphHash": "sha256:canonical-graph-v1:51980f88271e910ff9d119add49782822955acae731c4ff1b86a3c934d4138e7", + "proofLockHash": "sha256:live-proof-lock-v1:963b25d7ca34f54bdd12ff21958da6ed10023280aa008996142b2ea5cf6e3129", + "backendSourceFingerprint": "sha256:backend-source-v1:abecb8fb5f9949afc19f6a7940854f1eac60a49f8809e60977564042ece1a255", + "backendContractFingerprint": "sha256:backend-contract-v1:d4e5f75308bbc86686b264d3cf63a842d8e2e733d51aecf218a5ca48a32b5f60", "modelCommit": "200ba991ae448051e14b0183157e35c2d27c9fb0", - "modelSetHash": "sha256:model-set-v1:cb98800567bfc5639f18b289df8601c58d751c1385f7d7f14d4d494d291c660e", - "inputArtifactsHash": "sha256:input-artifacts-v1:dc7de6b40b6ace66065ae35c9c7f2e31aae690d4e77ed774195799240dca24ea", - "templateRevisionHash": "sha256:template-revision-v1:62621bfff6ef5829c456fddcc43fe357ebccabc4c3c880ba70db34192dde9fd2", + "templateRevisionHash": "sha256:template-revision-v1:b48fda8dfbea2aa54fc2f96a598328a193388ed77cce3f567296725d41d3cce8", + "modelSetHash": "sha256:model-set-v1:03b88354ec7065c85fc6e94bed31db43970bd5a3d92dbf022ba7988f08be9dcf", + "inputArtifactsHash": "sha256:input-artifacts-v1:8ac5de43bc8ee45f49f8a72f59578eb66eb494d12ccb28e04600125f86bf4e04", "provenancePath": "/template-gallery/reviews/ace_step_audio_repaint.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:444ae0236bb181d3b9487ad90aa640a3d0a8fc1097711d3a28735b47de5dad82", + "provenanceHash": "sha256:canonical-json:a3f0454789f1aa5b2fd1e8f33a2bee15959fb6aa7475422b412186de33c23507", "outputPath": "/template-gallery/ace_step_audio_repaint.wav", - "thumbnailPath": "/template-gallery/ace_step_audio_repaint.wav", - "mediaHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:974f210d7a92aee1266300b61b98df59c10d9a4ffc53c60e8649dc74fef45913", + "mediaHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:b9867d1dd5791bf57387f2712b8a099f638fbef6d3c0b27d1832d3f68ea9a300", "mediaType": "audio", - "verificationTimestamp": "2026-07-18T06:11:27.659Z", + "verificationTimestamp": "2026-11-10T00:14:58.272Z", "qualityReviewPath": "/template-gallery/reviews/ace_step_audio_repaint.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:2b9ab73c65d76a97b69c127578b1cbb577b35d69942d44a3541e2ac6c61c2646", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex decoded-audio, waveform, and deterministic parity review", - "reviewedAt": "2026-07-18T06:05:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T10:00:44.504Z", "durationSeconds": 30, "sampleRate": 48000, - "templateInputContractHash": "tic_125abf35" + "channels": 2, + "thumbnailPath": "/template-gallery/ace_step_audio_repaint.wav", + "templateInputContractHash": "tic_125abf35", + "qualityReviewHash": "sha256:canonical-json:9a05f47e3fa383f0e96057380a0e2ed835c64176da785914c22e2fd96f6db7b1" }, { "templateId": "ace_step_audio_variation", "verificationStatus": "reviewed", - "promptSettingsHash": "ps_424313c4", - "templateLockHash": "tpl_61440690", - "modelRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0", - "runtimeFingerprint": "sha256:stable-runtime-v1:a1bb688020dc8225508ce1bdead3dcc2da0d27ce7ccfe0c83cca13e3c69ec606", - "graphHash": "sha256:canonical-graph-v1:ca9521083074321884168196b7e5f7dfe973335eedeb914333b71afc72b58d51", - "proofLockHash": "sha256:live-proof-lock-v1:dd6ded8b15c7294bbf171f7c23757b2d7118920953127a460e1d2a8e30753020", - "backendSourceFingerprint": "sha256:backend-source-v1:246ddbd9437c82301c73405e210014ddb21fe37a7bb93b34c01d0ec4151703b4", - "backendContractFingerprint": "sha256:backend-contract-v1:4d014ddcf9a8e03de7b5fd0b277f842763076e15c78bc947eb24add9c202f24e", - "modelCommit": "200ba991ae448051e14b0183157e35c2d27c9fb0", - "modelSetHash": "sha256:model-set-v1:cb98800567bfc5639f18b289df8601c58d751c1385f7d7f14d4d494d291c660e", - "inputArtifactsHash": "sha256:input-artifacts-v1:dc7de6b40b6ace66065ae35c9c7f2e31aae690d4e77ed774195799240dca24ea", - "templateRevisionHash": "sha256:template-revision-v1:84a1fd1c9d12b7989b34b6d008bb13767a7b1f0c26856730e69068ebd5cc2d9f", + "templateLockHash": "tpl_5b2a07bf", + "modelRevision": "ACE-Step/acestep-v15-xl-base-diffusers@8f40447d21ee59ad4dcee6c99ce248027410bfec", + "runtimeFingerprint": "sha256:stable-runtime-v1:c06d972c4d52a9fdd37ec4107aeab0975431683a1d9d46e116a4258a5fe825a5", + "graphHash": "sha256:canonical-graph-v1:785119420b1350560d8c1375a43fc4be1f3f2dc02c8d27a4adc0e1dfd25ebecd", + "proofLockHash": "sha256:live-proof-lock-v1:b1a18492b3bdd705e082cfc89119d0a62b5398640c5fb02f47406cde59f03e0e", + "backendSourceFingerprint": "sha256:backend-source-v1:3b1cea6c3a06684092aafdb6430b37ed9937bdc9772f349a9d103e919234eca4", + "backendContractFingerprint": "sha256:backend-contract-v1:620e460b527daebd2bc4e83d103dda1e173aa9f4d0e5d6b72413fb25b9300c55", + "modelCommit": "8f40447d21ee59ad4dcee6c99ce248027410bfec", + "templateRevisionHash": "sha256:template-revision-v1:d580415ce1686a24eb5a388f1a42dff27d846842e368674eab4ab99ef134ee52", + "promptSettingsHash": "ps_7d121c3e", + "templateInputContractHash": "tic_fd3903bd", + "modelSetHash": "sha256:model-set-v1:023d69536d84cdb3ca7b882d09679697efba6e23e4bd52c7b22d6184188c6a3c", + "inputArtifactsHash": "sha256:input-artifacts-v1:b40e2bd855a07eb185dfd4311f5c89a7eadbc7016936ac67c640358620da1a68", "provenancePath": "/template-gallery/reviews/ace_step_audio_variation.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:1e42fe3e821502a9f1f185f13d5e4b9c8da326b68e2b6e5cbe4fc087f66eb5c1", + "provenanceHash": "sha256:canonical-json:f260180b6d7c7f0f153ef88d5d5a8cc77c61e16da7bbfa15e8b44b27cac4b37d", "outputPath": "/template-gallery/ace_step_audio_variation.wav", "thumbnailPath": "/template-gallery/ace_step_audio_variation.wav", - "mediaHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:58089ddbffa8c462c7f5ac4d13cde3af82a8ffedf186852a6ecccc073d3aa571", + "mediaHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:f598aea95a2e46f78f3b85bc2f835f2660ff3f87307d49a3816db9d70dbe2297", "mediaType": "audio", - "verificationTimestamp": "2026-07-18T06:11:27.541Z", + "verificationTimestamp": "2026-11-13T17:44:33.633Z", "qualityReviewPath": "/template-gallery/reviews/ace_step_audio_variation.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:fb53e7df8ce781def90bf6ec5625549471e66a0a302c90476b16cce2b8224648", + "qualityReviewHash": "sha256:canonical-json:2a1d87641b23a2e0e344683dfa24550704ca24b2907d6b4d0cbb018ba8b34caf", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex decoded-audio, waveform, and deterministic parity review", - "reviewedAt": "2026-07-18T06:05:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-13T17:44:33.633Z", + "supplementaryRecords": [ + "/template-gallery/history/ace_step_audio_variation.v1/ace_step_audio_variation.wav", + "/template-gallery/history/ace_step_audio_variation.v1/ace_step_audio_variation.reviewed-provenance.json", + "/template-gallery/history/ace_step_audio_variation.v1/ace_step_audio_variation.quality-review.json", + "/template-gallery/recipes/ace_step_audio_variation.v1.json", + "/template-gallery/recipes/ace_step_audio_variation.v2.json" + ], "durationSeconds": 30, "sampleRate": 48000, - "templateInputContractHash": "tic_fd3903bd" + "beforePath": "/template-gallery/inputs/ace_step_audio_variation.before.wav", + "beforeMediaHash": "sha256:bytes:e07d05a658d361b6d28af62bcccfaeba9254507467dae1c5839efd546fed96a7", + "afterPath": "/template-gallery/ace_step_audio_variation.wav" }, { "templateId": "ace_step_lyric_music_video", "verificationStatus": "reviewed", - "promptSettingsHash": "ps_57e885e4", - "templateLockHash": "tpl_13816876", + "templateLockHash": "tpl_c1323bf1", "modelRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0 | Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "runtimeFingerprint": "sha256:stable-runtime-v1:a1bb688020dc8225508ce1bdead3dcc2da0d27ce7ccfe0c83cca13e3c69ec606", - "graphHash": "sha256:canonical-graph-v1:f2b0b3b6c086780fa5f4488a9885999b9c94fe4dc2783e36d9a3be801e055c72", - "proofLockHash": "sha256:live-proof-lock-v1:cc197f07794946cc1b0363ca248ea813fdbc782ea87e3d31b416613344ea543f", - "backendSourceFingerprint": "sha256:backend-source-v1:d522fe8c3465be793abc890c480e9adb89f1d03d12716deb5fa0f34be52732fc", - "backendContractFingerprint": "sha256:backend-contract-v1:8cc908cde16afdd8327d1a943abcf38c66a83fb6134aa040fef6db93d1d1fb77", + "runtimeFingerprint": "sha256:stable-runtime-v1:f7dfb201f8fce05c6fbc7d0bc9541f6d61eb5a7a8ff08bdca719a4d5648ea19a", + "graphHash": "sha256:canonical-graph-v1:2a79947979eca5049cac33d646624a64fe7f74c22e872a6a83e65ba2d3183ea6", + "proofLockHash": "sha256:live-proof-lock-v1:606004c99ffcfd3511f05dc728e2c763845bd14fddea2990377973f076e6aa0c", + "backendSourceFingerprint": "sha256:backend-source-v1:498e4d94080c93f91614558aa7baee66d61ec8993b2153396bc2401660b855cb", + "backendContractFingerprint": "sha256:backend-contract-v1:c126e618706e4c9de59b409be5b24af7d623d90ea4097c386f67c57b249af4eb", "modelCommit": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0 | Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "modelSetHash": "sha256:model-set-v1:6971fcf265434a53ee01554597f56869a0627ef57faf35b598d89b239c907959", - "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:3c015e0cdff1e8269514c56591149854da114e406e2aa899eb756bec07bc92ae", + "templateRevisionHash": "sha256:template-revision-v1:832b19c2a3564673c0cb8e711a26b44324f8f055289eb25c40b7e38ad0dca76c", + "promptSettingsHash": "ps_0c96b6ce", + "modelSetHash": "sha256:model-set-v1:7f73f721c484f469d5ca7de7d31461d5c2039b73589db4487f647549163b4ecf", + "inputArtifactsHash": "sha256:input-artifacts-v1:62a47e14a3bbc6f06402df236e5a223f55eaeab6e610929e9eff023e21cc30d5", "provenancePath": "/template-gallery/reviews/ace_step_lyric_music_video.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:39f91834dad4f90287d4cb4b8342cee73bd014375be5f493517728461e040694", + "provenanceHash": "sha256:canonical-json:1f3e2af462dc34a1f705ae1ceb1afd19237768693ce2765e2a41041fbaca7f61", "outputPath": "/template-gallery/ace_step_lyric_music_video.mp4", "thumbnailPath": "/template-gallery/ace_step_lyric_music_video.poster.png", - "mediaHash": "sha256:decoded-video-framemd5:fa6642190a432c3d7e9d0dad43b3f7eaf3164c9c4442af7afbc62f7b4729f66a", - "decodedAudioHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:973ac2a0786a83d90fc59fdacd15280388c20e4fdc35555c599c96838d069812", - "audiovisualMediaHash": "sha256:decoded-av-v1:531043ce0ecad1d27efcb88991e00642363fba9434f250bd15812e7ae5dfdad7", + "mediaHash": "sha256:decoded-video-framemd5:f5e057bbe597be017c9e5058a06cc36ea6106e24cb96f518172905ca842adac8", "mediaType": "video", - "verificationTimestamp": "2026-07-24T17:04:24.240Z", + "verificationTimestamp": "2026-11-15T04:36:21.281026+00:00", "qualityReviewPath": "/template-gallery/reviews/ace_step_lyric_music_video.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:e756ad8402dc6f578701b69fccc4d685bb1132dc64b0b9ead1a7b1e61590e46d", + "qualityReviewHash": "sha256:canonical-json:2c6564cd2fccfcfce82433bf3eb3a16b3978ba77f9af085bfda6eb67df6730e9", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Maintainer synchronized-playback approval with Codex technical verification", - "reviewedAt": "2026-07-24T16:48:52.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-15T04:36:21.281026+00:00", + "supplementaryRecords": [ + "/template-gallery/history/ace_step_lyric_music_video.before-accepted-20261115/ace_step_lyric_music_video.mp4", + "/template-gallery/history/ace_step_lyric_music_video.before-accepted-20261115/ace_step_lyric_music_video.poster.png", + "/template-gallery/history/ace_step_lyric_music_video.before-accepted-20261115/ace_step_lyric_music_video.card-preview.mp4", + "/template-gallery/history/ace_step_lyric_music_video.before-accepted-20261115/reviews/ace_step_lyric_music_video.reviewed-provenance.json", + "/template-gallery/history/ace_step_lyric_music_video.before-accepted-20261115/reviews/ace_step_lyric_music_video.quality-review.json", + "/template-gallery/history/ace_step_lyric_music_video.before-accepted-20261115/entry-and-recipe.json", + "/template-gallery/recipes/ace_step_lyric_music_video.accepted-20261115.json", + "/template-gallery/recipes/ace_step_lyric_music_video.inputs-20261115.json" + ], "width": 1536, "height": 1024, - "frames": 381, - "durationSeconds": 23.81, "cardPreviewPath": "/template-gallery/ace_step_lyric_music_video.card-preview.mp4", - "cardPreviewSha256": "sha256:bytes:840295a75bcaa7dec5a3ab33a997ceb7c58043543463c7a2ea26fb45c0a91b7e" + "cardPreviewSha256": "sha256:bytes:973958543be22907def60e7e4c68dcbea1e77b482e732149b8ff11e6d14ded7f", + "frames": 720, + "durationSeconds": 45, + "decodedAudioHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:af1ba66d3415dfa1e600272cfade9ef401983b0cd068607908d540eb5a2cb4ad", + "audiovisualMediaHash": "sha256:decoded-av-v1:65aa568c81a99d931af61f0beadf124ba8ab1c90b79646c9f4fde6fecf097b74", + "templateInputContractHash": "tic_586ee889" }, { "templateId": "ace_step_text_to_audio", - "verificationStatus": "reviewed", - "promptSettingsHash": "ps_a39ca215", - "templateLockHash": "tpl_353215b5", + "promptSettingsHash": "ps_99c1f484", + "templateLockHash": "tpl_3005ad61", "modelRevision": "ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0", - "runtimeFingerprint": "sha256:stable-runtime-v1:a1bb688020dc8225508ce1bdead3dcc2da0d27ce7ccfe0c83cca13e3c69ec606", - "graphHash": "sha256:canonical-graph-v1:0beed8a453cdb994fee59085622de8c4eb3f30bd6e6b52a948c882b564946327", - "proofLockHash": "sha256:live-proof-lock-v1:de0750234d993d1c6b1ce9424f2add68807562254b4ddc18864b8b18fb40870b", - "backendSourceFingerprint": "sha256:backend-source-v1:246ddbd9437c82301c73405e210014ddb21fe37a7bb93b34c01d0ec4151703b4", - "backendContractFingerprint": "sha256:backend-contract-v1:c7a40e2c1bb0f0aca7db640943074cc28967bb5cbc6b148f3e3d86099162d739", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:3c2f20084aa2f52099872906b45898d2e32875f01e286056eaee5c4930f2e65b", + "proofLockHash": "sha256:live-proof-lock-v1:32909b135d7224c6e774cf1a6e6b8abaff8243bb338584528e851b6a7b468ef2", + "backendSourceFingerprint": "sha256:backend-source-v1:f2abf44f5ca8acadbff85dbe3a906c84454d653c1663e3cdd742180a0b1ad8c8", + "backendContractFingerprint": "sha256:backend-contract-v1:92104623eb3205adaa23cccc593a604da25d7f696e79cd9b947b553b92da39f0", "modelCommit": "200ba991ae448051e14b0183157e35c2d27c9fb0", + "templateRevisionHash": "sha256:template-revision-v1:8386ac0252280fc41ac5e0136f79fc87c44815804fc1760cf2dbd838d97585f5", "modelSetHash": "sha256:model-set-v1:cb98800567bfc5639f18b289df8601c58d751c1385f7d7f14d4d494d291c660e", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:0216459a1bf215be834cff20fa3203e801c709fc4a4ae486d7af2359124300aa", "provenancePath": "/template-gallery/reviews/ace_step_text_to_audio.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:34198cb704ba77766d68fed3a7ab3309fb65148bde9edc0d9139c2c8488b9dd6", + "provenanceHash": "sha256:canonical-json:2cf04053e925de65363ddfa41c798ac48964004c5661bfed09f8c073f46b3e12", "outputPath": "/template-gallery/ace_step_text_to_audio.wav", "thumbnailPath": "/template-gallery/ace_step_text_to_audio.wav", - "mediaHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:9d12230a015d308435b6e33b6bb08491b657b3cc9f5e066a9473d0f78400387c", + "mediaHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:6330f84ea77bba870e0dd51a7a531b4a3a187bcd896f44b2fe10837209339325", "mediaType": "audio", - "verificationTimestamp": "2026-07-18T06:11:26.097Z", + "verificationTimestamp": "2026-11-08T20:34:02.779007+00:00", "qualityReviewPath": "/template-gallery/reviews/ace_step_text_to_audio.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:5bcee7d2da8acb1c131715ef1a2442c8eeb17d1ba02dfc76828a1e884da70553", + "qualityReviewHash": "sha256:canonical-json:5198d752570ad3098e6022373c896129af1923982fc086377d9a81def76b6425", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex decoded-audio, waveform, and deterministic parity review", - "reviewedAt": "2026-07-18T06:05:00.000Z", - "durationSeconds": 30, + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-08T20:34:02.779007+00:00", + "verificationStatus": "reviewed", + "durationSeconds": 75, "sampleRate": 48000 }, { "templateId": "character_edit", "verificationStatus": "reviewed", "promptSettingsHash": "ps_3b2942a6", - "templateLockHash": "tpl_63c0197d", + "templateLockHash": "tpl_7d39d579", "modelRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:82cd88279f3914706e0b41b87733af1367d85d3c77c94f2d3e8b14ba1bb13e36", - "proofLockHash": "sha256:live-proof-lock-v1:d76def1cc6e1dd1104d09b1c889e3f42f65d5f7be35918b2576b78b5f91a6e7d", - "backendSourceFingerprint": "sha256:backend-source-v1:eb832afc73df59d566bff4990d7f31420fadfe580857a01773d840e291c7ffb3", - "backendContractFingerprint": "sha256:backend-contract-v1:c7deb20dde1f079d61d108d50287348de33a94920dcc728c11887e987f02445d", + "runtimeFingerprint": "sha256:stable-runtime-v1:5c61022abc0bb28824b5d21b769c7bdaeeed32630840c744c38a765a36e0bda1", + "graphHash": "sha256:canonical-graph-v1:53b7959b358dfdcc58d40234de45eaf8495d79fe08050a64f6cdbb36f39554f9", + "proofLockHash": "sha256:live-proof-lock-v1:576b49bbe17533ac57dd38a2502af3657fba028792de7d30878f25b0e20c62ee", + "backendSourceFingerprint": "sha256:backend-source-v1:5e3fcb9d5e7bd28201b74510a953afd65f3b9d4f52a495ddbf56437241bb7da2", + "backendContractFingerprint": "sha256:backend-contract-v1:c25b1dcf06c7ab6fd74433df9a4660f6c22179d00ecfea8fcd94c2c125b43ee9", "modelCommit": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "modelSetHash": "sha256:model-set-v1:17c315b5d6d53c90b928f6fab22efe305568dcea7458f66fc28773e8dc212f22", - "inputArtifactsHash": "sha256:input-artifacts-v1:98a355e3e7544174a7762d677b885c60be0e4eafb18fab7348e735f7309ca22e", - "templateRevisionHash": "sha256:template-revision-v1:7ecf416bcab9cca7894e39ea0c72e476f6bb74f34dfc9e0e7382834b489e6672", + "templateRevisionHash": "sha256:template-revision-v1:2437b3a7d0b9af637f68dc29f4a3dedc62ea07982fa567811f11c42dd6d1cb65", + "modelSetHash": "sha256:model-set-v1:e09af3b409345d16bf793174b4cd003c763fdfd20931624c4d30dd8b15c17fed", + "inputArtifactsHash": "sha256:input-artifacts-v1:170eb4f8ea03185890e9921068acf2bde561e154afd7c214941d1b92bd21f873", "provenancePath": "/template-gallery/reviews/character_edit.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:268e028f39c1801fc4dd9be8aa9b14b3cdb72dc8de93e379948f6d6a1d6f0253", + "provenanceHash": "sha256:canonical-json:4568af2a56fa7d781d7893b293de8187095104c795a00f225d6ca78c4d07980f", "outputPath": "/template-gallery/character_edit.webp", - "thumbnailPath": "/template-gallery/character_edit.webp", - "beforePath": "/template-gallery/inputs/character_edit.before.webp", - "beforeMediaHash": "sha256:bytes:b9909f4cbff8af6e97be6d1e4923c67687eee41dbd64b051a018866781da12ab", - "afterPath": "/template-gallery/character_edit.webp", - "mediaHash": "sha256:decoded-rgba:16a941e8608c3a661e06ff9b3f06d444af5fb6238577e5803427e2be81df52a0", + "mediaHash": "sha256:decoded-rgba:566f4c385229c0a53a4708509c4be74c71cb9d9a7866286e8d715bf5343dad4f", "mediaType": "image", - "verificationTimestamp": "2026-07-14T19:10:26.294Z", + "verificationTimestamp": "2026-10-06T22:29:25.377Z", "qualityReviewPath": "/template-gallery/reviews/character_edit.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:74529214897535a22ff67cb58286e56f3a1ed9b0e29de2678ef1da709b3f1583", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T19:10:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T17:00:35.452Z", "width": 1024, "height": 1024, - "templateInputContractHash": "tic_0d8fab77" + "thumbnailPath": "/template-gallery/character_edit.webp", + "templateInputContractHash": "tic_0d8fab77", + "beforePath": "/template-gallery/inputs/character_edit.before.webp", + "beforeMediaHash": "sha256:bytes:b9909f4cbff8af6e97be6d1e4923c67687eee41dbd64b051a018866781da12ab", + "afterPath": "/template-gallery/character_edit.webp", + "qualityReviewHash": "sha256:canonical-json:9bdea2ec911a16820045af3bf6f88d7f78f72a6bc2f3d9800af99b0cf89bf287" }, { "templateId": "fast_lora", "verificationStatus": "reviewed", "promptSettingsHash": "ps_e087ef46", - "templateLockHash": "tpl_73b18c49", + "templateLockHash": "tpl_15c4d78a", "modelRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 | youknownothing/v1-realism-v1-adapter-ZIT-lora@fd6d52d1199ad47f73c18db58339ad01ef766fa7", - "runtimeFingerprint": "sha256:stable-runtime-v1:63040a4327d52e83952a6e3236e25f2b45026f345548e67b8de1b077986ba4cb", - "graphHash": "sha256:canonical-graph-v1:87dcb28551cc026081eb1d8bdc5d49e9fab1940b8cdc6f36ed90fe6c454444dd", - "proofLockHash": "sha256:live-proof-lock-v1:b782d694b7f779ef4748f182762e65bbf5c37187ee4ade893b5c0dbd94501b8a", - "backendSourceFingerprint": "sha256:backend-source-v1:4d84e6ca1d3423d7af8a95ae9e510b6cd5e3afdf6f117982d3e0355ee303486b", - "backendContractFingerprint": "sha256:backend-contract-v1:98a8937624b75332b29fb7df907a4db84a1bbdd6ed8ae5ee36b50e95a1f6883a", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:d7e91436962499d100a6a77eed728b09a15967c973bf8911e7c969a52c2edd03", + "proofLockHash": "sha256:live-proof-lock-v1:61815d1f2c1991e204007a25289926c725e3cca8319188a10f4afe549ff5f3c0", + "backendSourceFingerprint": "sha256:backend-source-v1:83b3ee16077c3bd5797057b6267c67232e3e32a24d98b0e1ca69d79568b45131", + "backendContractFingerprint": "sha256:backend-contract-v1:220b7a37fef611350e95cefe30f23ff6ed14ef42c92e5d14b9d3ebe5ec7258b2", "modelCommit": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 | youknownothing/v1-realism-v1-adapter-ZIT-lora@fd6d52d1199ad47f73c18db58339ad01ef766fa7", + "templateRevisionHash": "sha256:template-revision-v1:9928c7d38d32446a80d71824362807da6bf6d396080eaea1c2098f9490cc7e48", "modelSetHash": "sha256:model-set-v1:d538b7ec5e55f545c0d0400f899b3f01acbb682ad84b5e96ddb4ab901ac7ffa5", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:0e9483df488b1717242a7fb689fa4818d84dbef0d94747ae5b45a0c31d3e2186", "provenancePath": "/template-gallery/reviews/fast_lora.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:57a017685d0760533ed06539824201dfec74315e6482da5f97dcf047e649273f", + "provenanceHash": "sha256:canonical-json:7a2c7421b1f9635d19252680dcc27620b39d599801afb859709bcedad556ce03", "outputPath": "/template-gallery/fast_lora.webp", "thumbnailPath": "/template-gallery/fast_lora.webp", - "mediaHash": "sha256:decoded-rgba:a5cebec99455e372c68430ce9b3fad5860ae6825eee9e1e1809572d9d8167023", + "mediaHash": "sha256:decoded-rgba:57847c17e96e79414c31cf8d41345e11a5d83793350342e092d5b79097714331", "mediaType": "image", - "verificationTimestamp": "2026-07-28T03:20:46.525Z", + "verificationTimestamp": "2026-11-09T07:12:13.927142+00:00", "qualityReviewPath": "/template-gallery/reviews/fast_lora.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:c1307ceeadc9f14ea04b4945fc4713bd6de5db60f53a19c0ccfb191a54824030", + "qualityReviewHash": "sha256:canonical-json:a03a3cfbd80b113962f74f94fabd6c39270292aff90f623dff769ac024a8a15d", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-28T07:48:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-09T07:12:13.927142+00:00", "width": 1024, "height": 1024 }, @@ -230,97 +252,97 @@ "templateId": "flux_control_canny", "verificationStatus": "reviewed", "promptSettingsHash": "ps_f1deff84", - "templateLockHash": "tpl_4022ac80", + "templateLockHash": "tpl_1ce537c9", "modelRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", - "runtimeFingerprint": "sha256:stable-runtime-v1:69176a2c48aa17b7e8d1a22ddb5e28515054580a405f9370f75695c79ce43426", - "graphHash": "sha256:canonical-graph-v1:028271f90cdb783905824de628e6de39413ec1236f7256ad66a71e60158a2719", - "proofLockHash": "sha256:live-proof-lock-v1:1458133e1b2107d8f1d879499f5ccf60518bb4e64c48885a02526a15fa4a0acf", - "backendSourceFingerprint": "sha256:backend-source-v1:bafd8ba87b1472a818fae2455e15a1f784482f2f2d8a5a195451e01882dc9419", - "backendContractFingerprint": "sha256:backend-contract-v1:441249e8d09dfeb6aa893274be252590d8cfe027307059c0f56d61796be18568", + "runtimeFingerprint": "sha256:stable-runtime-v1:5c61022abc0bb28824b5d21b769c7bdaeeed32630840c744c38a765a36e0bda1", + "graphHash": "sha256:canonical-graph-v1:7f8009350a75740240c0d5f0ec324f577c72daadef893a1453e568ce8a9c53d2", + "proofLockHash": "sha256:live-proof-lock-v1:3e6f1a7b02ea72855db3ef0069797d583d85cf3a35fd050ae3c6bdc9abe05e0a", + "backendSourceFingerprint": "sha256:backend-source-v1:5e3fcb9d5e7bd28201b74510a953afd65f3b9d4f52a495ddbf56437241bb7da2", + "backendContractFingerprint": "sha256:backend-contract-v1:3d609863e8fecd8c929a7d917115d94124e692165dffc2859097ad87f2dee690", "modelCommit": "27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", - "modelSetHash": "sha256:model-set-v1:172e7a078e28c7ba717b709bd10437e4ef57aa57f9f4a0b5d1a8e0f6e3e77df0", - "inputArtifactsHash": "sha256:input-artifacts-v1:7252d39c03f5f1bf4b8963f4b333ecc1a4c09179000c631731a84d65c51e7f4c", - "templateRevisionHash": "sha256:template-revision-v1:71405fc02a8c19b46af44b5e1544b1409401ac448f8183813da5c15b794d92f6", + "templateRevisionHash": "sha256:template-revision-v1:93b5a961a191830c4a26b4a48610afe2091175a272de3e34bbe690e40e46defa", + "modelSetHash": "sha256:model-set-v1:018182836fdcce9d331546623b0b838a75c31a10460b5f853152f29cb3493b19", + "inputArtifactsHash": "sha256:input-artifacts-v1:3f1b07e9ed94aa9d43ebb2ffb316fa123687dcfdb4a54e513ed193dc6024949b", "provenancePath": "/template-gallery/reviews/flux_control_canny.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:0b7d7937f7fa23fdac5f569f0e4a3a3ef0fd662161cf20f36d3fcaf4c2aeab38", + "provenanceHash": "sha256:canonical-json:866b7361e3e8b4cadce99dc965f8534078cae0b7490017866fc69c6165690168", "outputPath": "/template-gallery/flux_control_canny.webp", "thumbnailPath": "/template-gallery/flux_control_canny.webp", - "beforePath": "/template-gallery/inputs/flux_control_canny.before.png", - "beforeMediaHash": "sha256:bytes:3d03ee22a3d29068f30f18afcb31e86ea455fbfbe1ca5aa172cf633a26f21339", - "afterPath": "/template-gallery/flux_control_canny.webp", - "mediaHash": "sha256:decoded-rgba:758ee1a5c8800cb589293112dd66fc30a40cd1772c0b0db281f75f99945aa416", + "mediaHash": "sha256:decoded-rgba:cd0935edd24e2805d9b29c809b00a13f02e6ee877a1591c62dd2514c698b6a64", "mediaType": "image", - "verificationTimestamp": "2026-07-13T21:43:32.167Z", + "verificationTimestamp": "2026-11-10T08:34:46.954Z", "qualityReviewPath": "/template-gallery/reviews/flux_control_canny.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:ea1d086a737abe871ae21c50309c3fdf055520b405ad16cb3a9fbcaa3c7ca758", + "qualityReviewHash": "sha256:canonical-json:894d7d2e9655147007c2e7ccc2ea408ee4a4ed54eafbae229319da8742c71c1b", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-13T21:43:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T08:34:46.954Z", "width": 1024, "height": 1024, - "templateInputContractHash": "tic_3a363257" + "templateInputContractHash": "tic_3a363257", + "beforePath": "/template-gallery/inputs/flux_control_canny.before.png", + "beforeMediaHash": "sha256:bytes:3d03ee22a3d29068f30f18afcb31e86ea455fbfbe1ca5aa172cf633a26f21339", + "afterPath": "/template-gallery/flux_control_canny.webp" }, { "templateId": "flux_depth_control", "verificationStatus": "reviewed", "promptSettingsHash": "ps_6f3bc8eb", - "templateLockHash": "tpl_cffe7d06", + "templateLockHash": "tpl_033b7129", "modelRevision": "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:e073262e43a3ee0d86aef6158ae8b382b1d5146d3f2e2973bfd2a83d5b5ba722", - "proofLockHash": "sha256:live-proof-lock-v1:a5e1937c70ab19ce50b3136cfd9381d220525b378bd36e957e71130427d3697a", - "backendSourceFingerprint": "sha256:backend-source-v1:f987c1564cf384443c43b36d8a47e39369043f37096fd4aea08182948c113f52", - "backendContractFingerprint": "sha256:backend-contract-v1:bde13b7fd9ba1b22124cd06fbdfbf17efe1a08ab441961b09e08f7f76b68712d", + "runtimeFingerprint": "sha256:stable-runtime-v1:5c61022abc0bb28824b5d21b769c7bdaeeed32630840c744c38a765a36e0bda1", + "graphHash": "sha256:canonical-graph-v1:ffd10241551056c24a4581c1b24e643fa2e65d78159aeb13546633b17e4a3dd1", + "proofLockHash": "sha256:live-proof-lock-v1:ea1e7c5c10cc2f7ec6af06f7ec2f2ffde61ce45fa99704703717d8456e2cbbdf", + "backendSourceFingerprint": "sha256:backend-source-v1:5e3fcb9d5e7bd28201b74510a953afd65f3b9d4f52a495ddbf56437241bb7da2", + "backendContractFingerprint": "sha256:backend-contract-v1:3d609863e8fecd8c929a7d917115d94124e692165dffc2859097ad87f2dee690", "modelCommit": "fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", - "modelSetHash": "sha256:model-set-v1:8ee2a43654098e7e7b67f5d5a13ae7ab14aa8af6198230ce654c66fc5d8f3bb4", - "inputArtifactsHash": "sha256:input-artifacts-v1:c8e0de9462ae3648f04318e76c2fb03a6d0da7d5cf784ec2d3ef061e558f7a0e", - "templateRevisionHash": "sha256:template-revision-v1:5cec03c72efd21373d01e66045f0292455ba6058848aba5771160373fd819f00", + "templateRevisionHash": "sha256:template-revision-v1:5afe291236c9231f759c3deaad80321b4345031a181fb34f4a5bf14572761d6b", + "modelSetHash": "sha256:model-set-v1:256f90b76600661de31c273eecd6043e581ea79ef09bd79c578c0df5b8969490", + "inputArtifactsHash": "sha256:input-artifacts-v1:e8fc5ea9895f5c1d3c65c8d9654d5d976422a9fb359cfc2c296d2d0f609ec312", "provenancePath": "/template-gallery/reviews/flux_depth_control.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:201f8751d826464a534e63c7815e8300b734daf4e72fdb972200358c1845244c", + "provenanceHash": "sha256:canonical-json:eae0f0fbfdb27e841e8c6785a240deaad6441905d16c745f114e5437d1c92df8", "outputPath": "/template-gallery/flux_depth_control.webp", "thumbnailPath": "/template-gallery/flux_depth_control.webp", - "beforePath": "/template-gallery/inputs/flux_depth_control.before.png", - "beforeMediaHash": "sha256:bytes:2e202069a584ee5ada91e2deaea6bf7b92a94f4816e669e695d7cb64d5a1cb0e", - "afterPath": "/template-gallery/flux_depth_control.webp", - "mediaHash": "sha256:decoded-rgba:0a95a109e14acc8ea72b4ba4154b0a7adca1ab16d6c8672cb1d0b453546b4fed", + "mediaHash": "sha256:decoded-rgba:922b4da90b6682efda79cb0109031cef106149d36dd91700b3d519867676b7bf", "mediaType": "image", - "verificationTimestamp": "2026-07-14T07:58:33.465Z", + "verificationTimestamp": "2026-11-10T08:34:46.954Z", "qualityReviewPath": "/template-gallery/reviews/flux_depth_control.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:1b57bf7a93860422d8dcde4a5050ba4e61ab6ca6ca64a48f8697578b5448a120", + "qualityReviewHash": "sha256:canonical-json:bc44331d1ad8f87c96cbb921d522245557699357bed8066f8867167d63af170f", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T07:58:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T08:34:46.954Z", "width": 1024, "height": 1024, - "templateInputContractHash": "tic_88d84487" + "templateInputContractHash": "tic_88d84487", + "beforePath": "/template-gallery/inputs/flux_depth_control.before.png", + "beforeMediaHash": "sha256:bytes:2e202069a584ee5ada91e2deaea6bf7b92a94f4816e669e695d7cb64d5a1cb0e", + "afterPath": "/template-gallery/flux_depth_control.webp" }, { "templateId": "flux_dev_expert_text_to_image", "verificationStatus": "reviewed", "promptSettingsHash": "ps_3381ea38", - "templateLockHash": "tpl_1cee718d", + "templateLockHash": "tpl_218c5369", "modelRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "runtimeFingerprint": "sha256:stable-runtime-v1:63040a4327d52e83952a6e3236e25f2b45026f345548e67b8de1b077986ba4cb", - "graphHash": "sha256:canonical-graph-v1:4e66ac0909262f5e662944a5f4c8b3cc2f80ac99592307cb3c6b8f0e4d5283cc", - "proofLockHash": "sha256:live-proof-lock-v1:90ff05c5543f943f52781ae782b6414a44aef3ffc31ca027bea345f915ac42e7", - "backendSourceFingerprint": "sha256:backend-source-v1:7dd7de283a512bfff8da170d09803843981ac9f2f93272e7c71b61621938a49b", - "backendContractFingerprint": "sha256:backend-contract-v1:498534573dcc8e5700cd2cdf1187e378cb25ba66f2db2021c8a05ce8ae9a2648", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:f7fb95e7588379c23c1331936a4e01b6e88cdfbd42c4d7ec8a979d53b4e3180a", + "proofLockHash": "sha256:live-proof-lock-v1:d9dec5f110d75475e7e626adac80154fca1496a76975ef75a75e1b6c62ffca6b", + "backendSourceFingerprint": "sha256:backend-source-v1:5d82dbf942b18dbbe381f4c3e77e831a511cf5f9393dd68a8e2264d75498de5c", + "backendContractFingerprint": "sha256:backend-contract-v1:961cb20eb19be2cb1632d7ea6bf8925ffb67659db5a6784e9fa23e8175f6a9b2", "modelCommit": "3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", - "modelSetHash": "sha256:model-set-v1:c2dc4ad0ae8eb2146c1a7595df42de1272992bad583be84d4f0d15d5ecbcb847", + "templateRevisionHash": "sha256:template-revision-v1:531082cf7fb757a66a6d1b9ca28a48cc237be41ebe68e78fa07ecb7cf3bbbbae", + "modelSetHash": "sha256:model-set-v1:ef3ef6f4e31031629f31c7a17abce7613cb47e21af7b49b462a8b4ecd921c5ca", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:1cd59b2b3ae815929d39c31a6c64bf75af6c1179529e9ab271d1a3e3f78a346f", "provenancePath": "/template-gallery/reviews/flux_dev_expert_text_to_image.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:38f9ebd12703885ecf1362cd024782d3af784e7475a6c7bde7abe0791e9ccbe5", + "provenanceHash": "sha256:canonical-json:a64d90ebdbc4e59b670b2047c18d358540b2d01923fd5b5fa55b89829ee090bb", "outputPath": "/template-gallery/flux_dev_expert_text_to_image.webp", "thumbnailPath": "/template-gallery/flux_dev_expert_text_to_image.webp", - "mediaHash": "sha256:decoded-rgba:ba7a1f06135dad9192651e7be68d7c2f6ac551df5d582cb2b341de66f3fd52d1", + "mediaHash": "sha256:decoded-rgba:697e2c466502b8b2eaf611358e50ebcfdb229e7a5a0b6d53558a35bdcb216a0b", "mediaType": "image", - "verificationTimestamp": "2026-07-28T01:35:24.297Z", + "verificationTimestamp": "2026-11-10T08:34:46.954Z", "qualityReviewPath": "/template-gallery/reviews/flux_dev_expert_text_to_image.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:7c2cc198b431bcd75dd6225120939aee79f0c0ac24e07d2aa9b0cef694b86859", + "qualityReviewHash": "sha256:canonical-json:fc5459b342048ac530dca317070f2bd8d2d435d392c8421c4932824d0d6a08bd", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-28T06:00:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T08:34:46.954Z", "width": 1024, "height": 1024 }, @@ -328,197 +350,235 @@ "templateId": "flux_fill_inpaint", "verificationStatus": "reviewed", "promptSettingsHash": "ps_8e73aa92", - "templateLockHash": "tpl_39061582", + "templateLockHash": "tpl_9e4895fd", "modelRevision": "black-forest-labs/FLUX.1-Fill-dev@358293da0354175698b67ec8299acf928313a78a", - "runtimeFingerprint": "sha256:stable-runtime-v1:69176a2c48aa17b7e8d1a22ddb5e28515054580a405f9370f75695c79ce43426", - "graphHash": "sha256:canonical-graph-v1:2fbacd41f4fa627be7414a983bd546b1e5ddadf3200741ccec1b1a740bfc6653", - "proofLockHash": "sha256:live-proof-lock-v1:b5e1550234651ca6d65510a14b5cd29fbaf4e552560dd09a82116e965e1c370d", - "backendSourceFingerprint": "sha256:backend-source-v1:56e671e4622cc61dd718fe6f6b24c805535bec4372894bc210f593a0b3daa63c", - "backendContractFingerprint": "sha256:backend-contract-v1:3f9541441eefc55209da00fabff27f2b0539397d72d4e341346baa758c5fb818", + "runtimeFingerprint": "sha256:stable-runtime-v1:5c61022abc0bb28824b5d21b769c7bdaeeed32630840c744c38a765a36e0bda1", + "graphHash": "sha256:canonical-graph-v1:6bb9662fbc057cf51029bf48bae8278e5bfeccab9e8f460a5efe2a94d6279e7a", + "proofLockHash": "sha256:live-proof-lock-v1:8eb905d14ab854a923dc55a36b5309c4570b68b5f9dd4a86da272f9abe2f4584", + "backendSourceFingerprint": "sha256:backend-source-v1:5e3fcb9d5e7bd28201b74510a953afd65f3b9d4f52a495ddbf56437241bb7da2", + "backendContractFingerprint": "sha256:backend-contract-v1:7f909d90b42b732fd1e9fd5edbcb5df81fd6a17da018bf8a358da5c02dba2bd3", "modelCommit": "358293da0354175698b67ec8299acf928313a78a", - "modelSetHash": "sha256:model-set-v1:fc096d26f0bc624b3a36a014476dca6a901d62889157773fc7e5d5e8ac4d9e23", - "inputArtifactsHash": "sha256:input-artifacts-v1:4df2a5f17e94dd782cdf92002cf5a3608785df80445df7830895d554542fc648", - "templateRevisionHash": "sha256:template-revision-v1:d68e80f655ab88c61199c40c80c64092113d1e32d29232f2f22b47eb0821bbb2", + "templateRevisionHash": "sha256:template-revision-v1:cd19bcd8154ad8881d1e4f52bd464b26d02140af9ce987ebd82d97d46a0513a6", + "modelSetHash": "sha256:model-set-v1:2c20dde270a9fea7421c359ca39753ac7e4f1298ccc2e40dc4ad25603ef872b6", + "inputArtifactsHash": "sha256:input-artifacts-v1:e1e96a6d814c847343c7452def836b6dfadd53880c718b04ba54b7bfb259f11b", "provenancePath": "/template-gallery/reviews/flux_fill_inpaint.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:88f471ddc35a55131939d72b705c8cd9a0da09c31c687f7b92c907f55d92926a", + "provenanceHash": "sha256:canonical-json:ff699ae81a2e6ec72ee04f17a71fdd603dee443eaa1c5bee0de75faa1d770ee0", "outputPath": "/template-gallery/flux_fill_inpaint.webp", - "thumbnailPath": "/template-gallery/flux_fill_inpaint.webp", - "beforePath": "/template-gallery/inputs/flux_fill_inpaint.before.webp", - "beforeMediaHash": "sha256:bytes:b7c221b367738177e32fece56067d743df96282a6ccb2afd040ee89ea0a8f678", - "afterPath": "/template-gallery/flux_fill_inpaint.webp", - "mediaHash": "sha256:decoded-rgba:272020d045ef9069c74b6ac88e372449f03d7c82f240ceeece88cfd1a98b3339", + "mediaHash": "sha256:decoded-rgba:a92601fcf13491f13d0a2d18fc1b83bd6ec58d2e42b16068612c62552b3514f5", "mediaType": "image", - "verificationTimestamp": "2026-07-13T19:15:24.460Z", + "verificationTimestamp": "2026-10-06T22:47:18.900Z", "qualityReviewPath": "/template-gallery/reviews/flux_fill_inpaint.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:34035d1c2f2dde3cde2a8405637c241ffa9ba32afb6f3bf3c40dbaaf18ffd5ae", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-13T19:14:41.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T10:00:44.504Z", "width": 1024, "height": 1024, - "templateInputContractHash": "tic_7c873b13" + "thumbnailPath": "/template-gallery/flux_fill_inpaint.webp", + "templateInputContractHash": "tic_7c873b13", + "beforePath": "/template-gallery/inputs/flux_fill_inpaint.before.webp", + "beforeMediaHash": "sha256:bytes:b7c221b367738177e32fece56067d743df96282a6ccb2afd040ee89ea0a8f678", + "afterPath": "/template-gallery/flux_fill_inpaint.webp", + "qualityReviewHash": "sha256:canonical-json:efe76057f746518756a47479a221cd4c0a3c00f15b0f4810e3ae685928c3a42a" }, { "templateId": "flux_fill_outpaint", "verificationStatus": "reviewed", "promptSettingsHash": "ps_73ce7ad5", - "templateLockHash": "tpl_75816c88", + "templateLockHash": "tpl_7142fa39", "modelRevision": "black-forest-labs/FLUX.1-Fill-dev@358293da0354175698b67ec8299acf928313a78a", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:d4393b9d5a1de223b93641b2e2741ad741b59d0e8bc94a7049ed1483b8c0746d", - "proofLockHash": "sha256:live-proof-lock-v1:7d9ca8d0b1a921a1b313da49bac6d0fab3da2c349047c329a5a8c93ed37dc2eb", - "backendSourceFingerprint": "sha256:backend-source-v1:f987c1564cf384443c43b36d8a47e39369043f37096fd4aea08182948c113f52", - "backendContractFingerprint": "sha256:backend-contract-v1:8abd3a833fc98c347bef995859d219a3bbd3beb45345f94f9ba1a027eee9fe0d", + "runtimeFingerprint": "sha256:stable-runtime-v1:400b9b2a748fb265ee1d64e592ce59e6629d7a1db69e67f5bec19a0719f689d6", + "graphHash": "sha256:canonical-graph-v1:435bbd50dc6c7e05d26f68830afb9c600c779c543f987e5f709f610926ccfdcd", + "proofLockHash": "sha256:live-proof-lock-v1:570ac2186f6c4084b1606dc318ecf7e646dca8ba2baaee3c1b966f56cf1d078e", + "backendSourceFingerprint": "sha256:backend-source-v1:b42ecb2bb1d7136527433bba088254bc0da42f94dce702d6849a72bfb3c8a730", + "backendContractFingerprint": "sha256:backend-contract-v1:7f909d90b42b732fd1e9fd5edbcb5df81fd6a17da018bf8a358da5c02dba2bd3", "modelCommit": "358293da0354175698b67ec8299acf928313a78a", - "modelSetHash": "sha256:model-set-v1:fc096d26f0bc624b3a36a014476dca6a901d62889157773fc7e5d5e8ac4d9e23", - "inputArtifactsHash": "sha256:input-artifacts-v1:1a7fbbd6cceeb85a85834abf958b7618d21918bfced49524ed0488b3b0db3b6d", - "templateRevisionHash": "sha256:template-revision-v1:75420d5893d04944bf9549067dd3ccf161ee9081e53fbd9786083cd8d128ea88", + "templateRevisionHash": "sha256:template-revision-v1:a01238ad1e3c0495c8681219973e0f747c6982379a22df9e93195446563f6ba9", + "modelSetHash": "sha256:model-set-v1:2c20dde270a9fea7421c359ca39753ac7e4f1298ccc2e40dc4ad25603ef872b6", + "inputArtifactsHash": "sha256:input-artifacts-v1:26ea4d51f87894d0c3ecd08091c887c88e6bcbd593cd6f5af8ec27d692df9e98", "provenancePath": "/template-gallery/reviews/flux_fill_outpaint.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:6a363ca558c993990b9a5ffa7a8e0b6c7c2b50995a6e9214732fb0a82e0cc934", + "provenanceHash": "sha256:canonical-json:e978152ce0a01201ba15f7f273846d899d39da80ca674d92ac86d30d08f527d3", "outputPath": "/template-gallery/flux_fill_outpaint.webp", "thumbnailPath": "/template-gallery/flux_fill_outpaint.webp", - "beforePath": "/template-gallery/inputs/flux_fill_outpaint.before.png", - "beforeMediaHash": "sha256:bytes:bf4dbaa55b83b19ca56c691e9d1a10d3b838ff2fec926aaea6b526561c68f8e6", - "afterPath": "/template-gallery/flux_fill_outpaint.webp", - "mediaHash": "sha256:decoded-rgba:662c0991670265f01b5e217d9fd4da3aca4652b208fc243160520c566717ee04", + "mediaHash": "sha256:decoded-rgba:bb7eab9fc38bdf80aba3e8a78df7e3a32378df4e63cd1f582eb5e311cb28408a", "mediaType": "image", - "verificationTimestamp": "2026-07-14T07:48:58.168Z", + "verificationTimestamp": "2026-11-10T08:34:46.954Z", "qualityReviewPath": "/template-gallery/reviews/flux_fill_outpaint.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:3b1ee2d78c193fd9fe387a670ffe592c3f5577a549197c95fb9869dba75d2222", + "qualityReviewHash": "sha256:canonical-json:b4517bc04516fedc72722a45fe49b6b3d917db9fcbd56063e8e2153d03587ba8", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T07:49:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T08:34:46.954Z", "width": 1536, "height": 1024, - "templateInputContractHash": "tic_4b16cb23" + "templateInputContractHash": "tic_4b16cb23", + "beforePath": "/template-gallery/inputs/flux_fill_outpaint.before.png", + "beforeMediaHash": "sha256:bytes:bf4dbaa55b83b19ca56c691e9d1a10d3b838ff2fec926aaea6b526561c68f8e6", + "afterPath": "/template-gallery/flux_fill_outpaint.webp" }, { "templateId": "flux_kontext_edit", "verificationStatus": "reviewed", - "promptSettingsHash": "ps_0f69655c", - "templateLockHash": "tpl_8be56f10", + "templateLockHash": "tpl_6460339f", "modelRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:ff5451c5f9e25b41d0a22d317d4c2db1df1f648d0523597232b705f6a3836cfa", - "proofLockHash": "sha256:live-proof-lock-v1:4a85f1f540a56fd63865ee89f31244c08d8fe4bbf71f3126668ed0a98a77f532", - "backendSourceFingerprint": "sha256:backend-source-v1:2c1c5964b9be7b452552543433ed9f2e51b9114d34157fe8a742c3e3d20ccd28", - "backendContractFingerprint": "sha256:backend-contract-v1:b173a981e4c4e78faadf0debed52108470ed05602d239bebbeb1e9481065ffba", + "runtimeFingerprint": "sha256:stable-runtime-v1:f7dfb201f8fce05c6fbc7d0bc9541f6d61eb5a7a8ff08bdca719a4d5648ea19a", + "graphHash": "sha256:canonical-graph-v1:8c83867f7e787cc9f23fdc852074ff4ee78d4e19ef7a0470eca78995a76593d4", + "proofLockHash": "sha256:live-proof-lock-v1:e2a369154c1b80652382e35438af961ff174fcfe72624188a36b0fcbef6f5e04", + "backendSourceFingerprint": "sha256:backend-source-v1:002b2f76328c3160e4487de5441fa37807dbdc41718fe9d726e148813da068e8", + "backendContractFingerprint": "sha256:backend-contract-v1:fff518e32b3cd928ded92fd1e27920b7244305001d1b8cf18d6caa66da9c5f06", "modelCommit": "24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", - "modelSetHash": "sha256:model-set-v1:530d3fbca29d1cb1cdc99338c623f9c8777d613814d68e0f38e0f0046c493d80", - "inputArtifactsHash": "sha256:input-artifacts-v1:096e0ae4d378551f8986d5ae34eb092d2aba647b8c6f510ab133fabdc84c44fc", - "templateRevisionHash": "sha256:template-revision-v1:ef5e8bfbaa05900debcf6b87eb57cf2c4a5db0095952d6c0057ace473150ba7b", + "templateRevisionHash": "sha256:template-revision-v1:2371e451beac5ed1471fdad0e250d8597559188ec01b9d273fffe7ff829d0beb", + "promptSettingsHash": "ps_0f69655c", + "templateInputContractHash": "tic_0c20f1de", + "modelSetHash": "sha256:model-set-v1:8e081257c4e724f3995736a3ef5e68b7275a5295a849410750c4fda3bad8e21d", + "inputArtifactsHash": "sha256:input-artifacts-v1:000d9b9bb07ba79cf01262671973dc38f950256304f9184a524cb5763ae6606a", "provenancePath": "/template-gallery/reviews/flux_kontext_edit.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:f7f8aa68315917f224a410de846aab2e6d4c3164d3fe40831eeb7caeca2d7c1b", + "provenanceHash": "sha256:canonical-json:cb21213107b2573cea12610fabe9d256aff1d4c18b55971406c26cf12fd887bb", "outputPath": "/template-gallery/flux_kontext_edit.webp", "thumbnailPath": "/template-gallery/flux_kontext_edit.webp", - "beforePath": "/template-gallery/inputs/flux_kontext_edit.before.webp", - "beforeMediaHash": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", - "afterPath": "/template-gallery/flux_kontext_edit.webp", - "mediaHash": "sha256:decoded-rgba:224c27e7397926a1844b3921f3e5b5b7963ce2f13d56cc543caac919f74bd2cc", + "mediaHash": "sha256:decoded-rgba:645123644d067607aa7dacd5309159bea5950f647a0c49663cd735523f66691b", "mediaType": "image", - "verificationTimestamp": "2026-07-13T23:33:42.988Z", + "verificationTimestamp": "2026-11-12T09:31:16.171Z", "qualityReviewPath": "/template-gallery/reviews/flux_kontext_edit.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:b642add5e56b0a19f2d08aa44b8fec4a85ffe5c19b611b2daef0493f7f706f13", + "qualityReviewHash": "sha256:canonical-json:ea876c61c806e3e883614a9cd2268d384740db42b956035d4f7f8a29ae63251e", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-13T23:33:02.000Z", + "reviewer": "maintainer (current user)", + "reviewedAt": "2026-11-12T03:46:07.677190+00:00", "width": 1024, "height": 1024, - "templateInputContractHash": "tic_0c20f1de" + "beforePath": "/template-gallery/inputs/flux_kontext_edit.before.webp", + "beforeMediaHash": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", + "afterPath": "/template-gallery/flux_kontext_edit.webp" }, { "templateId": "flux_kontext_multi_reference", "verificationStatus": "reviewed", - "promptSettingsHash": "ps_7f671012", - "templateLockHash": "tpl_d717c437", + "templateLockHash": "tpl_0d568def", "modelRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:92139e258c3c2b0e1d1b3917c25e83b27e295a85602081e72d817d215bebf875", - "proofLockHash": "sha256:live-proof-lock-v1:f562f17644d64d718aefb2052e469c87e7889b83659bcd93acde3c5b6922e886", - "backendSourceFingerprint": "sha256:backend-source-v1:5226125ecb6e48dc7d599aefcd41cea1fd8a0c532287f2a732e59927c5277e7e", - "backendContractFingerprint": "sha256:backend-contract-v1:b173a981e4c4e78faadf0debed52108470ed05602d239bebbeb1e9481065ffba", + "runtimeFingerprint": "sha256:stable-runtime-v1:f7dfb201f8fce05c6fbc7d0bc9541f6d61eb5a7a8ff08bdca719a4d5648ea19a", + "graphHash": "sha256:canonical-graph-v1:220caffe6ababed3d431f9bf6050b1eba5624e13b40eff56f0eec199e4588ea8", + "proofLockHash": "sha256:live-proof-lock-v1:3a9972920c0ad2d030b4b3c9c4d4cce80f75a50f23dcf4028d6979db7bc5ad16", + "backendSourceFingerprint": "sha256:backend-source-v1:002b2f76328c3160e4487de5441fa37807dbdc41718fe9d726e148813da068e8", + "backendContractFingerprint": "sha256:backend-contract-v1:4b0b0a345ad76ab19095b6dfead0b81379dd645c57941517a7656671d6ef11d7", "modelCommit": "24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", - "modelSetHash": "sha256:model-set-v1:530d3fbca29d1cb1cdc99338c623f9c8777d613814d68e0f38e0f0046c493d80", - "inputArtifactsHash": "sha256:input-artifacts-v1:4d9f559021034999326d6f9ea6f59c7a7c7db8339177d321b261de26633eccec", - "templateRevisionHash": "sha256:template-revision-v1:aac98e9a19a32bcedd878ef6f724980a3fef1f687fc97be2963fc92965f3b037", + "templateRevisionHash": "sha256:template-revision-v1:e30d76443f7cc17453c3d86fe96100eba75f436aeba4b05ecdf6325c515a0ae4", + "promptSettingsHash": "ps_553b50d6", + "templateInputContractHash": "tic_445d65d8", + "modelSetHash": "sha256:model-set-v1:8e081257c4e724f3995736a3ef5e68b7275a5295a849410750c4fda3bad8e21d", + "inputArtifactsHash": "sha256:input-artifacts-v1:57a49acfed8e0513756c941571be2708863f1ed978d4a46c6ff16890eccefd6b", "provenancePath": "/template-gallery/reviews/flux_kontext_multi_reference.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:fab8105e0e3df45cccfc5ff2d624ddd2edd95f84c9f7a90337d99f878e209bd6", + "provenanceHash": "sha256:canonical-json:41718e9debecfe9383f50ebde05239c91cbc3a1e547ec9ca503b1224eecfe902", "outputPath": "/template-gallery/flux_kontext_multi_reference.webp", "thumbnailPath": "/template-gallery/flux_kontext_multi_reference.webp", - "beforePath": "/template-gallery/inputs/flux_kontext_multi_reference.before.webp", - "beforeMediaHash": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", - "afterPath": "/template-gallery/flux_kontext_multi_reference.webp", - "mediaHash": "sha256:decoded-rgba:1ca9d00113598a7486f004c7841ecad104438551847fc4897f1faab47d6f9444", + "mediaHash": "sha256:decoded-rgba:23c5a7788eb1b94ca3d1b2402502fee70f2f3e84f5b6555077a96a8bb8ea0ade", "mediaType": "image", - "verificationTimestamp": "2026-07-13T23:52:14.388Z", + "verificationTimestamp": "2026-11-12T09:31:16.171Z", "qualityReviewPath": "/template-gallery/reviews/flux_kontext_multi_reference.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:7ca7e5e76b905b9b81fb54370a804ffd8710ef70b1cd5cd86aba692dbc98e446", + "qualityReviewHash": "sha256:canonical-json:00e171fde8087d4ff0431b9090dc8eedc89e9a1f63dd3b41018f4739d156d642", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-13T23:51:15.000Z", + "reviewer": "maintainer (current user)", + "reviewedAt": "2026-11-12T03:46:07.677190+00:00", "width": 1024, "height": 1024, - "templateInputContractHash": "tic_f48d1ae9" + "supplementaryRecords": [ + "/template-gallery/recipes/flux_kontext_multi_reference.v1.json", + "/template-gallery/recipes/flux_kontext_multi_reference.v2.json", + "/template-gallery/inputs/flux_kontext_multi_reference.material-strip.v2.png" + ], + "beforePath": "/template-gallery/inputs/flux_kontext_multi_reference.before.webp", + "beforeMediaHash": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", + "afterPath": "/template-gallery/flux_kontext_multi_reference.webp" }, { "templateId": "flux_krea_text_to_image", "verificationStatus": "reviewed", "promptSettingsHash": "ps_3434189d", - "templateLockHash": "tpl_38d94e59", + "templateLockHash": "tpl_27c2f055", "modelRevision": "black-forest-labs/FLUX.1-Krea-dev@8162a9c7b05a641be098422bf2fcf335615c2f28", - "runtimeFingerprint": "sha256:stable-runtime-v1:69176a2c48aa17b7e8d1a22ddb5e28515054580a405f9370f75695c79ce43426", - "graphHash": "sha256:canonical-graph-v1:0819af244a635a57026be010a89faa9d40fde81da89c8aed17e381cce5a69384", - "proofLockHash": "sha256:live-proof-lock-v1:8f514f5df98aad037d8c56f2e74ef77f43f1663ba966489572a3bb261d02df41", - "backendSourceFingerprint": "sha256:backend-source-v1:6f42a2f530647db914919dd0c601a9ef5034440edb1d51cc6ef73f28017516af", - "backendContractFingerprint": "sha256:backend-contract-v1:9ccccb7977b342906c7a45786e4bc86f6b5c0f83c321c297039e0160acbe9755", + "runtimeFingerprint": "sha256:stable-runtime-v1:2ae5133ef1ae5b075e17ba798e6e781c26d4e4f818c495998426ee6db791a0f4", + "graphHash": "sha256:canonical-graph-v1:ca3232023efb937136b81640e917b5b3e73d31cc4651a26441bdb7747e43385a", + "proofLockHash": "sha256:live-proof-lock-v1:5030c40c1d2894cdd8d856663d4316438ffc2e19069e713dd99f924e8cca1034", + "backendSourceFingerprint": "sha256:backend-source-v1:0408ad4c3209e5a301957d45c800c531d210a33f6a972139ce37852fb5da286b", + "backendContractFingerprint": "sha256:backend-contract-v1:1164cad7d086c89d0a18f10c7aedb7f251b01d9f99a9cd727e530f9b77e0af85", "modelCommit": "8162a9c7b05a641be098422bf2fcf335615c2f28", - "modelSetHash": "sha256:model-set-v1:709df91326b2459b08450bc01f798795109938f0ea1722992ce85cd126b3cc81", + "templateRevisionHash": "sha256:template-revision-v1:0327f1332fd44fd17f6bd1fb9307a5153ea134111a282e20e8bd732cbe87ccb2", + "modelSetHash": "sha256:model-set-v1:2c0a51105fce40c19879355d4cc0e9f63f018cbd3cb28701d699f214edc093ec", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:889bcfdea68f39aeba0f49bfe02c340af663191ae47c2230ab5eb6afc617751e", "provenancePath": "/template-gallery/reviews/flux_krea_text_to_image.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:4b4ccc4363a4364567e94168aa91bb639673fd1a18ddbc93d548d20d66296e1f", + "provenanceHash": "sha256:canonical-json:8e9b757f96652bcdf5e2e04f04700ef7a69cad7b1f73b207cb7dc0c2a487b170", "outputPath": "/template-gallery/flux_krea_text_to_image.webp", "thumbnailPath": "/template-gallery/flux_krea_text_to_image.webp", - "mediaHash": "sha256:decoded-rgba:973877d1b33745b7fcbcc15ddeef2b3b00f94cc4e5ee687f3063194f7c9ad9eb", + "mediaHash": "sha256:decoded-rgba:04eb4646456141f0163b223eb7fd0fb116540b1e8e54fe175ac80dfa73c53206", "mediaType": "image", - "verificationTimestamp": "2026-07-13T18:14:00.763Z", + "verificationTimestamp": "2026-11-10T08:34:46.954Z", "qualityReviewPath": "/template-gallery/reviews/flux_krea_text_to_image.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:477fc541caa52e7fc480df64e3acd6b31b4283c752f82a792cd106667a58cce7", + "qualityReviewHash": "sha256:canonical-json:92b3253e8eb0c62309dad9a45395e12bc864e881c05175af67d479fea93f53ce", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-13T18:16:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T08:34:46.954Z", "width": 1024, "height": 1024 }, + { + "templateId": "flux_lora_cinematic_octane_3d", + "verificationStatus": "reviewed", + "templateLockHash": "tpl_afc2b089", + "modelRevision": "aixonlab/FLUX.1-dev-LoRA-Cinematic-Octane@3ab70503ba8df37565d0212e2876ec48e35e7cb4 | black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | prithivMLmods/3D-Render-Flux-LoRA@6b32a1624d3fdfab4d518223e8311731dd432cd8", + "runtimeFingerprint": "sha256:stable-runtime-v1:f7dfb201f8fce05c6fbc7d0bc9541f6d61eb5a7a8ff08bdca719a4d5648ea19a", + "graphHash": "sha256:canonical-graph-v1:4ef5e4533581e6d4fd511ec15bbf35c90a2220098ea7d31832a0d42c8182b6f0", + "proofLockHash": "sha256:live-proof-lock-v1:4f573da279e93b809dae366de2f3b06abf2ed33f1483080bfb3dc9a2dd4cd7f3", + "backendSourceFingerprint": "sha256:backend-source-v1:498e4d94080c93f91614558aa7baee66d61ec8993b2153396bc2401660b855cb", + "backendContractFingerprint": "sha256:backend-contract-v1:6b7c9c7fab275d9550aada6dbc46621054814830b46a863ee6a8303b17e6a61a", + "modelCommit": "aixonlab/FLUX.1-dev-LoRA-Cinematic-Octane@3ab70503ba8df37565d0212e2876ec48e35e7cb4 | black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | prithivMLmods/3D-Render-Flux-LoRA@6b32a1624d3fdfab4d518223e8311731dd432cd8", + "templateRevisionHash": "sha256:template-revision-v1:7c16147ea2fa1e4ddb8217489e655493f868c48ab0219c46e7580897bb1b21a9", + "promptSettingsHash": "ps_3f7c6922", + "modelSetHash": "sha256:model-set-v1:e7fa4f8392fc1a78ecaaf54cb04dc5ad50e4c2c008b0a9e0233407b272159bca", + "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "provenancePath": "/template-gallery/reviews/flux_lora_cinematic_octane_3d.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:ddce0549615480514f82e09af2e97c708a12c512d863253b949f6388d7c2d124", + "outputPath": "/template-gallery/flux_lora_cinematic_octane_3d.webp", + "thumbnailPath": "/template-gallery/flux_lora_cinematic_octane_3d.webp", + "mediaHash": "sha256:decoded-rgba:63a9905b63e05f49462bcb099933bb178bbcfb9112baa60f49543bd7d164a563", + "mediaType": "image", + "verificationTimestamp": "2026-11-13T17:44:33.633Z", + "qualityReviewPath": "/template-gallery/reviews/flux_lora_cinematic_octane_3d.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:d78ada66278965c74c0919d01a177f024b26342f52235027214db519e11fc84e", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-13T17:44:33.633Z", + "supplementaryRecords": [ + "/template-gallery/recipes/flux_lora_cinematic_octane_3d.v2.json" + ], + "width": 768, + "height": 1024 + }, { "templateId": "flux_lora_film_noir", "verificationStatus": "reviewed", "promptSettingsHash": "ps_4e66e40f", - "templateLockHash": "tpl_f72a2f62", + "templateLockHash": "tpl_e78041c6", "modelRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | dvyio/flux-lora-film-noir@7a7ff13bbae807a2db6c2e4918f3e13bb1265e60", - "runtimeFingerprint": "sha256:stable-runtime-v1:63040a4327d52e83952a6e3236e25f2b45026f345548e67b8de1b077986ba4cb", - "graphHash": "sha256:canonical-graph-v1:47f779d3ec590ca5932ebd250948aeb44cb5d1bb6fefc7864d35babed77a8e1b", - "proofLockHash": "sha256:live-proof-lock-v1:deec8e16a6e1d21d1ba22923cbb7feb6be9c371cd4c83866d7051465e2c219ac", - "backendSourceFingerprint": "sha256:backend-source-v1:7dd7de283a512bfff8da170d09803843981ac9f2f93272e7c71b61621938a49b", - "backendContractFingerprint": "sha256:backend-contract-v1:98a8937624b75332b29fb7df907a4db84a1bbdd6ed8ae5ee36b50e95a1f6883a", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:6bf50a4229e5007c5bb69bf28f7fc6dc1c2f7ff34c7f33c7f4f51e825deae9e2", + "proofLockHash": "sha256:live-proof-lock-v1:b475b67c6f8512955a70070946d4ccbd9279687cc155ae2357bf70beaaf73404", + "backendSourceFingerprint": "sha256:backend-source-v1:5d82dbf942b18dbbe381f4c3e77e831a511cf5f9393dd68a8e2264d75498de5c", + "backendContractFingerprint": "sha256:backend-contract-v1:220b7a37fef611350e95cefe30f23ff6ed14ef42c92e5d14b9d3ebe5ec7258b2", "modelCommit": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | dvyio/flux-lora-film-noir@7a7ff13bbae807a2db6c2e4918f3e13bb1265e60", - "modelSetHash": "sha256:model-set-v1:f35a73291e25a92d573bc1679283899af75d43c6a38743126550af9dcf26526d", + "templateRevisionHash": "sha256:template-revision-v1:4f5a552ba8256327040c3b4c6062df842f8149d0260f4bb77fe0b37ea076cee8", + "modelSetHash": "sha256:model-set-v1:0916ea275abf838ffe444fee97f30a69d5e42cb8d142d6756beb211be21ac0da", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:e1cf865a1a5c8ae3704768e8d5a830e64d4741a80a065e4b999a33e939827048", "provenancePath": "/template-gallery/reviews/flux_lora_film_noir.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:b9d41299c544466235476d72a50ec79fe3bd33341bc57f130dca64274acac2f0", + "provenanceHash": "sha256:canonical-json:84595e3917500edf3bd9feee161f374f6edff13cd5a808824da16adcc8256527", "outputPath": "/template-gallery/flux_lora_film_noir.webp", - "thumbnailPath": "/template-gallery/flux_lora_film_noir.webp", - "mediaHash": "sha256:decoded-rgba:5b009008ac1fa8f42114264d14fb1118b54bfb0859cdfb84a8d30bf0b4a30208", + "mediaHash": "sha256:decoded-rgba:84bab5ef20b7ddd3909d3a3700be6cb5f0db5860a79493dc7ad90a327f5276a2", "mediaType": "image", - "verificationTimestamp": "2026-07-28T01:35:25.014Z", + "verificationTimestamp": "2026-11-10T02:31:55.414Z", "qualityReviewPath": "/template-gallery/reviews/flux_lora_film_noir.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:657365f9706a078de361959ab60fd51fbbcfc42a24dda04608b8a3e3aadba607", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-28T06:00:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T10:00:44.504Z", "width": 1024, - "height": 1024 + "height": 1024, + "thumbnailPath": "/template-gallery/flux_lora_film_noir.webp", + "qualityReviewHash": "sha256:canonical-json:61e95548c44636b8b3d6d173381a47b2a2623ee4625d19fe275adfa2e791a6d6" }, { "templateId": "flux_lora_ghibli_story", @@ -554,89 +614,89 @@ "templateId": "flux_lora_oil_painting", "verificationStatus": "reviewed", "promptSettingsHash": "ps_3317b8ef", - "templateLockHash": "tpl_e5dbbad2", + "templateLockHash": "tpl_fdaa5bce", "modelRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | dtthanh/flux_oil_painting_lora@1118ed195c7304ffc52a6cd42b41a520ef749cd9", - "runtimeFingerprint": "sha256:stable-runtime-v1:63040a4327d52e83952a6e3236e25f2b45026f345548e67b8de1b077986ba4cb", - "graphHash": "sha256:canonical-graph-v1:8d6fb4e92292820564a2f758d9048a8a639aab525c04a2651f9eac8eb3276b55", - "proofLockHash": "sha256:live-proof-lock-v1:8c8fb1afe32c1d961dd02ce78b139b59baa2e5076fdecfee1f51f30a6c5c2370", - "backendSourceFingerprint": "sha256:backend-source-v1:7dd7de283a512bfff8da170d09803843981ac9f2f93272e7c71b61621938a49b", - "backendContractFingerprint": "sha256:backend-contract-v1:98a8937624b75332b29fb7df907a4db84a1bbdd6ed8ae5ee36b50e95a1f6883a", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:5fe976b0b469ffc711c332479e87f1b7e49426b91fb5c30a78893eed5b843574", + "proofLockHash": "sha256:live-proof-lock-v1:72ceda9213a24ae713d16c1acfd14ae81100741f2702a2b827da549a209718ec", + "backendSourceFingerprint": "sha256:backend-source-v1:5d82dbf942b18dbbe381f4c3e77e831a511cf5f9393dd68a8e2264d75498de5c", + "backendContractFingerprint": "sha256:backend-contract-v1:220b7a37fef611350e95cefe30f23ff6ed14ef42c92e5d14b9d3ebe5ec7258b2", "modelCommit": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | dtthanh/flux_oil_painting_lora@1118ed195c7304ffc52a6cd42b41a520ef749cd9", - "modelSetHash": "sha256:model-set-v1:c475face6938a3ca7ba0fa8da54717e9fd1f60b7393e6522993e207a630bc213", + "templateRevisionHash": "sha256:template-revision-v1:9e76290429b007a02a4391b461f58539d7d3fba56bf14a2791a10cba8bdfd924", + "modelSetHash": "sha256:model-set-v1:277c2cba18a141e2fa27f609ddcef1591ee54468c30e636118daec7b377ba3b9", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:0af469257b31c8fd82eaa552a9c8d4474085c4cba38ebae22408af219f445559", "provenancePath": "/template-gallery/reviews/flux_lora_oil_painting.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:1e0a3911834797f55a014fd3a2d5319369991c2e10522d3e3d5f56f7c7a02ffe", + "provenanceHash": "sha256:canonical-json:5ffcbf4965d234ba086c16c5afa19329f36e33560cf37c6a0650f4cb8968b697", "outputPath": "/template-gallery/flux_lora_oil_painting.webp", - "thumbnailPath": "/template-gallery/flux_lora_oil_painting.webp", - "mediaHash": "sha256:decoded-rgba:560a8d56b62bddc445ddb508c1dca291e53b0609eb39e963feb21826bdcefd86", + "mediaHash": "sha256:decoded-rgba:9fd21a6f2f3916259a7f0df26e23f04ad954a87e5c5da3411d953cb55b2cfd99", "mediaType": "image", - "verificationTimestamp": "2026-07-28T01:35:25.763Z", + "verificationTimestamp": "2026-11-10T02:22:35.700Z", "qualityReviewPath": "/template-gallery/reviews/flux_lora_oil_painting.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:eb0800030b88e37c92c62e3d358bd24a7b89e74e29a9e0eaa3a64bfd3236ca6a", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-28T06:00:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T10:00:44.504Z", "width": 1024, - "height": 1024 + "height": 1024, + "thumbnailPath": "/template-gallery/flux_lora_oil_painting.webp", + "qualityReviewHash": "sha256:canonical-json:68493e4a7b7133c80860c57b4adf746e34a5a051125a597bb5335971317bdc41" }, { "templateId": "flux_lora_paper_cutout", "verificationStatus": "reviewed", "promptSettingsHash": "ps_10841b23", - "templateLockHash": "tpl_2a0b9b99", + "templateLockHash": "tpl_3348b655", "modelRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | Norod78/Flux_1_Dev_LoRA_Paper-Cutout-Style@5cdd7ac47ad1b99f705ac2a03a39d480d34abb5d", - "runtimeFingerprint": "sha256:stable-runtime-v1:63040a4327d52e83952a6e3236e25f2b45026f345548e67b8de1b077986ba4cb", - "graphHash": "sha256:canonical-graph-v1:95c784221eb69530be609ab3281c603eef1b26fd87f71600c0a14fc191a64c07", - "proofLockHash": "sha256:live-proof-lock-v1:ef5a0f683cf56ca775050f77382f0600217b7c34c3758e2bfee4e07c2bf521a1", - "backendSourceFingerprint": "sha256:backend-source-v1:7dd7de283a512bfff8da170d09803843981ac9f2f93272e7c71b61621938a49b", - "backendContractFingerprint": "sha256:backend-contract-v1:98a8937624b75332b29fb7df907a4db84a1bbdd6ed8ae5ee36b50e95a1f6883a", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:e845cf67ffcdc11936aba5de6bf44771dbefc7cf1feebbc40d8022609a8985a1", + "proofLockHash": "sha256:live-proof-lock-v1:cb42b6a1ea4be8c823e56e2683ea5cfe1c2589a3b6ba165c0536dda90d30aa6b", + "backendSourceFingerprint": "sha256:backend-source-v1:5d82dbf942b18dbbe381f4c3e77e831a511cf5f9393dd68a8e2264d75498de5c", + "backendContractFingerprint": "sha256:backend-contract-v1:220b7a37fef611350e95cefe30f23ff6ed14ef42c92e5d14b9d3ebe5ec7258b2", "modelCommit": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | Norod78/Flux_1_Dev_LoRA_Paper-Cutout-Style@5cdd7ac47ad1b99f705ac2a03a39d480d34abb5d", - "modelSetHash": "sha256:model-set-v1:f46399d831a140c80933a68ce5a4317a9be0649b08cf192c3b402cf46f309540", + "templateRevisionHash": "sha256:template-revision-v1:d755b425058b71bd267b4e665a04103364c986b33690e494e9603da70376c496", + "modelSetHash": "sha256:model-set-v1:a2a5306b7d8c34c97d15bc615abb76faa5f5f08bce03c5ae6aeda819c2140566", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:9909404fc0301daf71e40fc7a53f8f70cdb0898bb7eec9dc7fd72fe83bf24596", "provenancePath": "/template-gallery/reviews/flux_lora_paper_cutout.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:5124ef5c12ab6b22ef76c0cd856ba150fc23b002f0f95838ea670fd96f402163", + "provenanceHash": "sha256:canonical-json:07ac0730865ed7549f7a6deb1e2873330fc471ef8dfc96e6e335ab489b81ced0", "outputPath": "/template-gallery/flux_lora_paper_cutout.webp", - "thumbnailPath": "/template-gallery/flux_lora_paper_cutout.webp", - "mediaHash": "sha256:decoded-rgba:65e3696eea7f66c60ce30709d3c9d21716246ab8b6fcfa7058c37555abc6c3e1", + "mediaHash": "sha256:decoded-rgba:a651735fcf42e4c405543d3eb1e1967c8a51eb82bb2e5278bf323ac2d6fa1174", "mediaType": "image", - "verificationTimestamp": "2026-07-28T01:35:26.538Z", + "verificationTimestamp": "2026-11-10T02:52:41.415Z", "qualityReviewPath": "/template-gallery/reviews/flux_lora_paper_cutout.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:0ce210e1bb04bbccf5f69f1dd511ebe489fb4c9934130b472283bd04f1499aa1", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-28T06:00:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T10:00:44.504Z", "width": 1024, - "height": 1024 + "height": 1024, + "thumbnailPath": "/template-gallery/flux_lora_paper_cutout.webp", + "qualityReviewHash": "sha256:canonical-json:47f4de1918e9749c6832f115cbea2ca81b067da8380f5d6be14542bf0bb67e6d" }, { "templateId": "flux_lora_photoreal_documentary", "verificationStatus": "reviewed", "promptSettingsHash": "ps_4919a9f6", - "templateLockHash": "tpl_3194494c", + "templateLockHash": "tpl_8d82f310", "modelRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | XLabs-AI/flux-RealismLora@1965e17d2e745fcbf8f4004bdbdf603421ef37a8", - "runtimeFingerprint": "sha256:stable-runtime-v1:63040a4327d52e83952a6e3236e25f2b45026f345548e67b8de1b077986ba4cb", - "graphHash": "sha256:canonical-graph-v1:c5814a3fd64097f8ac2b4a949f36501e6ac618e6c94326f05bb3cad4e0e8e8f3", - "proofLockHash": "sha256:live-proof-lock-v1:ccff5fa76b277eb28c583ee44b4d91236ace6910219fa479f0ab8e4de37bcfe5", - "backendSourceFingerprint": "sha256:backend-source-v1:7dd7de283a512bfff8da170d09803843981ac9f2f93272e7c71b61621938a49b", - "backendContractFingerprint": "sha256:backend-contract-v1:98a8937624b75332b29fb7df907a4db84a1bbdd6ed8ae5ee36b50e95a1f6883a", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:b982da19df20d1fa7df8a962d10a17d847bf045da2db11abbc725e1045f4f11c", + "proofLockHash": "sha256:live-proof-lock-v1:6afdb10451b613691ae911d01413c77090092cae6bb94b3c483af4416b4ea561", + "backendSourceFingerprint": "sha256:backend-source-v1:5d82dbf942b18dbbe381f4c3e77e831a511cf5f9393dd68a8e2264d75498de5c", + "backendContractFingerprint": "sha256:backend-contract-v1:220b7a37fef611350e95cefe30f23ff6ed14ef42c92e5d14b9d3ebe5ec7258b2", "modelCommit": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | XLabs-AI/flux-RealismLora@1965e17d2e745fcbf8f4004bdbdf603421ef37a8", - "modelSetHash": "sha256:model-set-v1:05c9c9a583f3f66ae25ba6bf591d7bd18a166afb611ca462acb00ca1e89c252c", + "templateRevisionHash": "sha256:template-revision-v1:7a9e3e373153f7c6afc16d9e9d08af49cf268f0b4cfa5ac89638361437e05929", + "modelSetHash": "sha256:model-set-v1:b4cb85ffaf19b42f78fbe542011a8fd5787996ce5dd3d7a458ae10eb506cea8f", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:b07eef13ce009d0a04f9ea8d4abd4f37d23e0fcef72ea558a83a0f87d4069f9b", "provenancePath": "/template-gallery/reviews/flux_lora_photoreal_documentary.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:77200beae1fffc60c3fadc056351dc33f3ed06cd29e7a5a7000285572982b06b", + "provenanceHash": "sha256:canonical-json:b04691114bec39fe7f1630176b88a60a652cb1128202d73a7cd254989d18ff85", "outputPath": "/template-gallery/flux_lora_photoreal_documentary.webp", "thumbnailPath": "/template-gallery/flux_lora_photoreal_documentary.webp", - "mediaHash": "sha256:decoded-rgba:874efd637cd014ecc69d96ed5c22d0fa5adb36e66032cb8b9bdef70ad8d7279b", + "mediaHash": "sha256:decoded-rgba:2bade0fc6adfd25672f2de5b2dfeaa47ea9127598806688758b5943f60d4b0e7", "mediaType": "image", - "verificationTimestamp": "2026-07-28T01:35:27.294Z", + "verificationTimestamp": "2026-11-10T08:34:46.954Z", "qualityReviewPath": "/template-gallery/reviews/flux_lora_photoreal_documentary.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:8e73e747a831435038f35fce7511425991b7ca8119a37e21f3c7ff7bf637c39e", + "qualityReviewHash": "sha256:canonical-json:b635559f23eb7f6f360fab2c07322fd3ed358af373bc9937e73a07a8beaf0bf2", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-28T06:00:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T08:34:46.954Z", "width": 1024, "height": 1024 }, @@ -644,29 +704,29 @@ "templateId": "flux_lora_retro_comic", "verificationStatus": "reviewed", "promptSettingsHash": "ps_fd5529db", - "templateLockHash": "tpl_05f62e5f", + "templateLockHash": "tpl_a046674b", "modelRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | renderartist/retrocomicflux@46f73222df6c97c9f56c3bef42a11979ba5d5aeb", - "runtimeFingerprint": "sha256:stable-runtime-v1:63040a4327d52e83952a6e3236e25f2b45026f345548e67b8de1b077986ba4cb", - "graphHash": "sha256:canonical-graph-v1:13a07c14419df0a78f460321fd1f74be6845667245d81a3e65187fa223e9eb73", - "proofLockHash": "sha256:live-proof-lock-v1:00fc57f8cff9c221a64fdc7fede169d5c63358383271792678237a90c6cda8ec", - "backendSourceFingerprint": "sha256:backend-source-v1:4d84e6ca1d3423d7af8a95ae9e510b6cd5e3afdf6f117982d3e0355ee303486b", - "backendContractFingerprint": "sha256:backend-contract-v1:98a8937624b75332b29fb7df907a4db84a1bbdd6ed8ae5ee36b50e95a1f6883a", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:7c38c053dab3d4d26f554bad9445a4ddb8f57aa56cc0df64905b156998ae8f0a", + "proofLockHash": "sha256:live-proof-lock-v1:cb0532265304b72b24b57b017c86f81238c8ea4df5b98da8aab19a8d3d3fa889", + "backendSourceFingerprint": "sha256:backend-source-v1:5d82dbf942b18dbbe381f4c3e77e831a511cf5f9393dd68a8e2264d75498de5c", + "backendContractFingerprint": "sha256:backend-contract-v1:220b7a37fef611350e95cefe30f23ff6ed14ef42c92e5d14b9d3ebe5ec7258b2", "modelCommit": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | renderartist/retrocomicflux@46f73222df6c97c9f56c3bef42a11979ba5d5aeb", - "modelSetHash": "sha256:model-set-v1:6af44937a8bd582cd8dc2fd192c29480bcd204caf52197d9f58b920bbf83877f", + "templateRevisionHash": "sha256:template-revision-v1:c5aa1dab39e45bffd015761980df0db7a44ff06f66458f5eb0cd1368ee200ed1", + "modelSetHash": "sha256:model-set-v1:80ac7b78ab1af54f46118e43874d14aaa15aedb9de83c6c27dda9b29b48017cd", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:aefb306a79e765190d557a437ce118e70bf8b868a283ac0223651d5e60f5cf3b", "provenancePath": "/template-gallery/reviews/flux_lora_retro_comic.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:7005fabe5e0e73bd23beba6deb28863c1a4d0883118a36c1e11498ba83f38d6f", + "provenanceHash": "sha256:canonical-json:a535e927fa9d5acc04110c347c235447b38166ba75c7200666f3d61159d78401", "outputPath": "/template-gallery/flux_lora_retro_comic.webp", "thumbnailPath": "/template-gallery/flux_lora_retro_comic.webp", - "mediaHash": "sha256:decoded-rgba:d3989867ad5cdaa0507dd43e6d48509d1f2a1177d76ff3b70e1f4ce728760868", + "mediaHash": "sha256:decoded-rgba:4a50d929d2cb02a74a06c7e3577763c9353e11e5b3806e5173609db180923cd3", "mediaType": "image", - "verificationTimestamp": "2026-07-28T02:34:18.342Z", + "verificationTimestamp": "2026-11-10T08:34:46.954Z", "qualityReviewPath": "/template-gallery/reviews/flux_lora_retro_comic.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:f031d03c740098e0fa470e37b38a3d4e38b2030cff3bfdb50c7a369514b2a45e", + "qualityReviewHash": "sha256:canonical-json:e5fc22521aa62a5d8a14161053e954f118b1dd44af1a858437d92148d61f81dc", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-28T06:45:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T08:34:46.954Z", "width": 1024, "height": 1024 }, @@ -674,255 +734,587 @@ "templateId": "flux_lora_watercolor", "verificationStatus": "reviewed", "promptSettingsHash": "ps_1744ad79", - "templateLockHash": "tpl_49cab43f", + "templateLockHash": "tpl_018427d3", "modelRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | SebastianBodza/Flux_Aquarell_Watercolor_v2@a565b2140a05f1eece244514f90d2e29b3b1d45d", - "runtimeFingerprint": "sha256:stable-runtime-v1:63040a4327d52e83952a6e3236e25f2b45026f345548e67b8de1b077986ba4cb", - "graphHash": "sha256:canonical-graph-v1:51c74fca0862748f5740c7d3e3eb622b5959eb0f44aa6dc121c82d77a3c2cb32", - "proofLockHash": "sha256:live-proof-lock-v1:3ebc10c1185a74af76fa2b2c00a4ba0b7540bf13cfb28370ad96529f0e10a1d5", - "backendSourceFingerprint": "sha256:backend-source-v1:4d84e6ca1d3423d7af8a95ae9e510b6cd5e3afdf6f117982d3e0355ee303486b", - "backendContractFingerprint": "sha256:backend-contract-v1:98a8937624b75332b29fb7df907a4db84a1bbdd6ed8ae5ee36b50e95a1f6883a", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:89bf0f397b13c32ce5cccd30bb1a5da1f86305ed8bcc592f5289234a7c0cf89e", + "proofLockHash": "sha256:live-proof-lock-v1:35d31ce4d3b1040e5a8003034288cd1f13ae854198e089bc4ea6c232bca23a42", + "backendSourceFingerprint": "sha256:backend-source-v1:5d82dbf942b18dbbe381f4c3e77e831a511cf5f9393dd68a8e2264d75498de5c", + "backendContractFingerprint": "sha256:backend-contract-v1:220b7a37fef611350e95cefe30f23ff6ed14ef42c92e5d14b9d3ebe5ec7258b2", "modelCommit": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | SebastianBodza/Flux_Aquarell_Watercolor_v2@a565b2140a05f1eece244514f90d2e29b3b1d45d", - "modelSetHash": "sha256:model-set-v1:b274a34540e5cb8be0dcd0c764bfb1d99277d8a2b4a531c1c3dd39e94f5e7594", + "templateRevisionHash": "sha256:template-revision-v1:21ebd4e49508dcce86339fb578f0c83578b07cf508b4c5e2cf492ed8da28d31f", + "modelSetHash": "sha256:model-set-v1:4ef125a6c6d511c766f036a3419e7976d981a24d6c1f2796a2e209012cafc472", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:0795785a459f3d582248ac12add18e4ffac794f8d708d761bb5c403514eb2f11", "provenancePath": "/template-gallery/reviews/flux_lora_watercolor.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:5a0b29b2016d89975da4d17e714224b929674c442d647d0c71e5dbefbf4df082", + "provenanceHash": "sha256:canonical-json:2e930f25ee2c4db9340faa01feb95b44e81e8170556e0a4076479cbba6d19a36", "outputPath": "/template-gallery/flux_lora_watercolor.webp", "thumbnailPath": "/template-gallery/flux_lora_watercolor.webp", - "mediaHash": "sha256:decoded-rgba:3d95a36a787f48491d2663a504098fc80e09d4d7dfab2d421747f52434cb1216", + "mediaHash": "sha256:decoded-rgba:4cc6f154dbeca491451b0ca0149c84bb53bfa3b508bf03ea102412e519772ae2", "mediaType": "image", - "verificationTimestamp": "2026-07-28T02:46:50.505Z", + "verificationTimestamp": "2026-11-10T08:34:46.954Z", "qualityReviewPath": "/template-gallery/reviews/flux_lora_watercolor.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:7980dcca2242d8b4ee6b374b408f12fae31c7206b29439a1b43e752015041d29", + "qualityReviewHash": "sha256:canonical-json:395346b85a6a110da7b21e17614a9411fa8eb3f42ae0b380267168ec9232fbae", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-28T07:10:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T08:34:46.954Z", "width": 1024, "height": 1024 }, { "templateId": "flux_redux_edit", "verificationStatus": "reviewed", - "promptSettingsHash": "ps_855fde36", - "templateLockHash": "tpl_bfba997e", + "templateLockHash": "tpl_5decd690", "modelRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | black-forest-labs/FLUX.1-Redux-dev@c95859fbf7703ca4d6824b4da4407d7cd0434f81", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:3b494061ba61a5356e59e428bed4d57b46badc466b9b5b021ab5927be7d23422", - "proofLockHash": "sha256:live-proof-lock-v1:ba3e2924be60c70ba381d42ecf9c52b990986b690338925429e577f306d626ba", - "backendSourceFingerprint": "sha256:backend-source-v1:f987c1564cf384443c43b36d8a47e39369043f37096fd4aea08182948c113f52", - "backendContractFingerprint": "sha256:backend-contract-v1:b173a981e4c4e78faadf0debed52108470ed05602d239bebbeb1e9481065ffba", + "runtimeFingerprint": "sha256:stable-runtime-v1:f7dfb201f8fce05c6fbc7d0bc9541f6d61eb5a7a8ff08bdca719a4d5648ea19a", + "graphHash": "sha256:canonical-graph-v1:8c499b4ae616f566126d23aef1ed10a6b4a0086aaefefa599ed8fc1d6b8c463a", + "proofLockHash": "sha256:live-proof-lock-v1:357cc2459b9dbc0720d5b554df3475d74e328fee9c7813566de6f3b71e1936fc", + "backendSourceFingerprint": "sha256:backend-source-v1:c58c00ef5acb623fad10211d025530eb31aebc1033d3ef6237b580ca675b257e", + "backendContractFingerprint": "sha256:backend-contract-v1:a0db116542ee7fca5654e742aabe177731c62ff215dc2a2ba62ccf0e9313eac9", "modelCommit": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | black-forest-labs/FLUX.1-Redux-dev@c95859fbf7703ca4d6824b4da4407d7cd0434f81", - "modelSetHash": "sha256:model-set-v1:b9b20ccf371021dbb211f501a604bc90631e3d9bb7f26b03256bc8c5e2d15b6d", - "inputArtifactsHash": "sha256:input-artifacts-v1:fa39ab40890408a0f9f5281e54ff873f3cdac4dfd672248d1c145ef30dec5912", - "templateRevisionHash": "sha256:template-revision-v1:5edc18339547eb43c0e7a1cffd70c2ed9be61c795d97b9399790e473e9d2e29d", + "templateRevisionHash": "sha256:template-revision-v1:cc6a89a355faf9d1deab9fd581461eecc90df11ae3b9a8fb97f2fc67d17b5258", + "promptSettingsHash": "ps_855fde36", + "templateInputContractHash": "tic_43d9a1d4", + "modelSetHash": "sha256:model-set-v1:4512efa5824d297538835278953b0255962c33aec322a286d1a2ad95024cd466", + "inputArtifactsHash": "sha256:input-artifacts-v1:998f7fe6035472b8f4d647363eb0efe4b1be7dcbcf46eae3641e9050a636169f", "provenancePath": "/template-gallery/reviews/flux_redux_edit.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:04835c613b4db2f2decf732bc12212a005ac509352b5388912751ff6317d8298", + "provenanceHash": "sha256:canonical-json:4fa073a475b6686db05967577e0d1d2c2072f11bfd59ba397057d1c85867b9ec", "outputPath": "/template-gallery/flux_redux_edit.webp", "thumbnailPath": "/template-gallery/flux_redux_edit.webp", - "beforePath": "/template-gallery/inputs/flux_redux_edit.before.webp", - "beforeMediaHash": "sha256:bytes:2e0ec8892660785e322468d0153fd2dadf7a4d920fce2d7d4a0b686a8fe8515d", - "afterPath": "/template-gallery/flux_redux_edit.webp", - "mediaHash": "sha256:decoded-rgba:2be51f3d9c47b5eab0911a586b92feb2070499c3efed7ee916e77660aa14e2de", + "mediaHash": "sha256:decoded-rgba:0c285053a5e98e6d4e3f48ae9c4e0def2cf76fabf57cccafffbad9580af9b4aa", "mediaType": "image", - "verificationTimestamp": "2026-07-14T08:15:58.922Z", + "verificationTimestamp": "2026-11-13T17:44:33.633Z", "qualityReviewPath": "/template-gallery/reviews/flux_redux_edit.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:b68ba26d1d852c025af87544bc03d88412cc6b9b86f9fd7406432f1fb5192b13", + "qualityReviewHash": "sha256:canonical-json:7ea7e307f5eeb61815266f6c53c6ee1ea471edb6a911d01d37a90a1440dc9920", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T08:16:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-13T17:44:33.633Z", + "supplementaryRecords": [ + "/template-gallery/history/flux_redux_edit.v1/flux_redux_edit.webp", + "/template-gallery/history/flux_redux_edit.v1/flux_redux_edit.before.webp", + "/template-gallery/history/flux_redux_edit.v1/flux_redux_edit.reviewed-provenance.json", + "/template-gallery/history/flux_redux_edit.v1/flux_redux_edit.quality-review.json", + "/template-gallery/recipes/flux_redux_edit.v1.json", + "/template-gallery/recipes/flux_redux_edit.v2.json" + ], "width": 1024, "height": 1024, - "templateInputContractHash": "tic_43d9a1d4" + "beforePath": "/template-gallery/inputs/flux_redux_edit.before.webp", + "beforeMediaHash": "sha256:bytes:2e0ec8892660785e322468d0153fd2dadf7a4d920fce2d7d4a0b686a8fe8515d", + "afterPath": "/template-gallery/flux_redux_edit.webp" }, { "templateId": "flux_redux_multi_reference", "verificationStatus": "reviewed", - "promptSettingsHash": "ps_ef4760f1", - "templateLockHash": "tpl_895c3706", + "templateLockHash": "tpl_3e3ca521", "modelRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | black-forest-labs/FLUX.1-Redux-dev@c95859fbf7703ca4d6824b4da4407d7cd0434f81", - "runtimeFingerprint": "sha256:stable-runtime-v1:44da7de4a4af37673082dfd0b7cafd88f0228bd0d5ff2760f67b99c29bb388ce", - "graphHash": "sha256:canonical-graph-v1:cc59f4b3b4858c65704e298db7c81bdcef4d94674935789a5a9d7267559442f9", - "proofLockHash": "sha256:live-proof-lock-v1:86ae461fd30b56b9bd4ae38a4dc0453ae64b74a525ad32deab3b75e69a193995", - "backendSourceFingerprint": "sha256:backend-source-v1:9044c6db3bb36c38fbbf9e77390c9be25b8ca8a9d76910a06f9d52f3c17e8940", - "backendContractFingerprint": "sha256:backend-contract-v1:ce1a78f94fa96fb96968d8e4b36ec6e28f152f039905be69c7bd0d5cc9ec656c", + "runtimeFingerprint": "sha256:stable-runtime-v1:f7dfb201f8fce05c6fbc7d0bc9541f6d61eb5a7a8ff08bdca719a4d5648ea19a", + "graphHash": "sha256:canonical-graph-v1:d84bfa5a35b127633d9ec205ab9ca51704f5f8a058c750b5b87cb85b506420ae", + "proofLockHash": "sha256:live-proof-lock-v1:9cc05739da5c94d4aa469a8f180eed8ae663485863ed2ddd60b9a9e5bd464f5e", + "backendSourceFingerprint": "sha256:backend-source-v1:498e4d94080c93f91614558aa7baee66d61ec8993b2153396bc2401660b855cb", + "backendContractFingerprint": "sha256:backend-contract-v1:223a2258506f90ddf88f8e5e3ca3ba5c06a2d710d30f7d240989b627d8b97626", "modelCommit": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21 | black-forest-labs/FLUX.1-Redux-dev@c95859fbf7703ca4d6824b4da4407d7cd0434f81", - "modelSetHash": "sha256:model-set-v1:b9b20ccf371021dbb211f501a604bc90631e3d9bb7f26b03256bc8c5e2d15b6d", - "inputArtifactsHash": "sha256:input-artifacts-v1:1a9236f5bcce8a149da215fc6f8cf2b47c7f51822502788bf9569a41a44e2089", - "templateRevisionHash": "sha256:template-revision-v1:534604954065d0599a6ec3a2e1dbf0bbacb2962092e94ddfc46bf45d99f803b9", + "templateRevisionHash": "sha256:template-revision-v1:3cd0b224c055a588a4855dc7e52e1d14fce3416200a4c8b60916ab967b1513be", + "promptSettingsHash": "ps_b7c07cef", + "templateInputContractHash": "tic_94bfa17b", + "modelSetHash": "sha256:model-set-v1:4512efa5824d297538835278953b0255962c33aec322a286d1a2ad95024cd466", + "inputArtifactsHash": "sha256:input-artifacts-v1:136ff787513b61ab44ab547ad9c2f374fbecd7cc4d02bcdcc8685e3ed8e7881a", "provenancePath": "/template-gallery/reviews/flux_redux_multi_reference.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:380dd90474d574f683680679409363dd900f45f8373109db9e4d8b22ab2ff973", + "provenanceHash": "sha256:canonical-json:d2318a280ce858df8f9097fb1806481df8462a913c7b65dd20196417a44cae0c", "outputPath": "/template-gallery/flux_redux_multi_reference.webp", "thumbnailPath": "/template-gallery/flux_redux_multi_reference.webp", - "beforePath": "/template-gallery/inputs/flux_redux_multi_reference.before.webp", - "beforeMediaHash": "sha256:bytes:7f1ea58485fa7802765b9fbbf0e6957e8607261c91669fdcc44cbed80c6fb309", - "afterPath": "/template-gallery/flux_redux_multi_reference.webp", - "mediaHash": "sha256:decoded-rgba:de8dc7c667bdd02a9aeb571c4eb31dd337fc7dadef2404b47e50a42312fc95a9", + "mediaHash": "sha256:decoded-rgba:1224ce51abf34115963046db8648b38b6c69dadd156577f2a7ff44da75b62914", "mediaType": "image", - "verificationTimestamp": "2026-07-21T08:11:42.002Z", + "verificationTimestamp": "2026-11-15T04:36:21.281026+00:00", "qualityReviewPath": "/template-gallery/reviews/flux_redux_multi_reference.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:6e069ed465f2affd8cdf1247cf7546844aafda8ee1fcd328e6bb88fe202a5da4", + "qualityReviewHash": "sha256:canonical-json:c2373a8f63ddfa189b502c013a48190ae8b189daae11ac819862f213dbfa0e92", "qualityReviewStatus": "approved_reviewed", - "reviewer": "User visual approval with Codex provenance verification", - "reviewedAt": "2026-07-21T08:05:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-15T04:36:21.281026+00:00", + "supplementaryRecords": [ + "/template-gallery/history/flux_redux_multi_reference.before-accepted-20261115/flux_redux_multi_reference.webp", + "/template-gallery/history/flux_redux_multi_reference.before-accepted-20261115/inputs/flux_redux_multi_reference.before.webp", + "/template-gallery/history/flux_redux_multi_reference.before-accepted-20261115/reviews/flux_redux_multi_reference.reviewed-provenance.json", + "/template-gallery/history/flux_redux_multi_reference.before-accepted-20261115/reviews/flux_redux_multi_reference.quality-review.json", + "/template-gallery/history/flux_redux_multi_reference.before-accepted-20261115/entry-and-recipe.json", + "/template-gallery/recipes/flux_redux_multi_reference.accepted-20261115.json" + ], "width": 1024, "height": 1024, - "templateInputContractHash": "tic_94bfa17b" + "beforePath": "/template-gallery/inputs/flux_redux_multi_reference.before.webp", + "beforeMediaHash": "sha256:bytes:7f1ea58485fa7802765b9fbbf0e6957e8607261c91669fdcc44cbed80c6fb309", + "afterPath": "/template-gallery/flux_redux_multi_reference.webp" }, { "templateId": "flux_schnell_text_to_image", "verificationStatus": "reviewed", "promptSettingsHash": "ps_2d0346d5", - "templateLockHash": "tpl_af34decb", + "templateLockHash": "tpl_2aadce3f", "modelRevision": "black-forest-labs/FLUX.1-schnell@741f7c3ce8b383c54771c7003378a50191e9efe9", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:2855373366cae963272e73ac389e8bcb67cdd5529722938a12269d52cc3a0b84", - "proofLockHash": "sha256:live-proof-lock-v1:54908798f14b2510f8b1902e4b5a059152a2f3846c7391ccbb4331e92a6df0a6", - "backendSourceFingerprint": "sha256:backend-source-v1:abf44f6a4d030ec6f55964748eab40d9ae56d5f2912253b94354681a42bb2a48", - "backendContractFingerprint": "sha256:backend-contract-v1:9df780a7d6206fa8cfbbde1c42d8a1351afa61a36ded9c31e51c3b6ce754dbfa", + "runtimeFingerprint": "sha256:stable-runtime-v1:f17482c2c7f7588f38a399ba7c2c8beeaa7a5932d05cb9cc28555eaefeccb658", + "graphHash": "sha256:canonical-graph-v1:8dec5df31a28b59984c342b9aaa46ba2f4c8fcb2d9aa9e768948bd897bea6072", + "proofLockHash": "sha256:live-proof-lock-v1:8b98ec2b23947d19dfb1d24773e0cfc716363eaaac990bed0afbf443ee0fb85b", + "backendSourceFingerprint": "sha256:backend-source-v1:0408ad4c3209e5a301957d45c800c531d210a33f6a972139ce37852fb5da286b", + "backendContractFingerprint": "sha256:backend-contract-v1:557afe5858efc291775652d0d08bcb231bfc6f979db6a0a6dca8b02e41829480", "modelCommit": "741f7c3ce8b383c54771c7003378a50191e9efe9", - "modelSetHash": "sha256:model-set-v1:291809b6849f0a88555f952b16cddf9b53e2c428b2a51fa61eda9547e571803c", + "templateRevisionHash": "sha256:template-revision-v1:debd639b90ce7012091c2e0c52c7df240e40c5f5ce82786004c62419abd4ec23", + "modelSetHash": "sha256:model-set-v1:57924c6453619069b60d1d1772a54a00dffb3b1ecc6eaa62f06793963ca8eff4", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:2561edbffc4f098c4e5172ca8a6db964a4a2281af97f5820648dc4fba67715f9", "provenancePath": "/template-gallery/reviews/flux_schnell_text_to_image.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:c03b33dd6cc9cd9225618c048c402fdef508d046afe12a5bd5a779865dab05e0", + "provenanceHash": "sha256:canonical-json:cd90cf747e6702ab73672c45d0fd193f6da704f23a8f51419a2f42aa039bc797", "outputPath": "/template-gallery/flux_schnell_text_to_image.webp", "thumbnailPath": "/template-gallery/flux_schnell_text_to_image.webp", - "mediaHash": "sha256:decoded-rgba:f31152ec0f650dc8bccd78464943ee077529021cd86f6eac050ff0cfc7567c77", + "mediaHash": "sha256:decoded-rgba:867411de5928f6d00356e28dbc6b62d8cbfd2ec12afdf06029bf949d5d891c2e", "mediaType": "image", - "verificationTimestamp": "2026-07-14T06:28:04.113Z", + "verificationTimestamp": "2026-11-09T22:16:34.082Z", "qualityReviewPath": "/template-gallery/reviews/flux_schnell_text_to_image.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:c85e64fa8cf4565fedde8a662dc665754bcd5c143450b2741abe659d27d4ad47", + "qualityReviewHash": "sha256:canonical-json:d445358fd14875a813f64a72231ca5b5e1f98ca702de5a4e79abf5463a28fced", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T06:29:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-09T22:16:34.082Z", "width": 1024, "height": 1024 }, { "templateId": "flux2_klein_edit", - "verificationStatus": "exact", + "verificationStatus": "reviewed", "promptSettingsHash": "ps_d446ffb3", - "templateLockHash": "tpl_e796a349", + "templateLockHash": "tpl_d3d27316", "modelRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", - "runtimeFingerprint": "sha256:stable-runtime-v1:69176a2c48aa17b7e8d1a22ddb5e28515054580a405f9370f75695c79ce43426", - "graphHash": "sha256:canonical-graph-v1:4728ddd0db052abb5413f3b7d41413d09822fbb440cd2f1f285cc208a522b691", - "proofLockHash": "sha256:live-proof-lock-v1:10aa5c9b3168d884fb20d2e12745ca7f2785d6fc65f920d868ead7f7b1e67c52", - "backendSourceFingerprint": "sha256:backend-source-v1:caa8fcbdd928adda945a82fc251080765d52a6875023a76dc6e56e82d7b94b24", - "backendContractFingerprint": "sha256:backend-contract-v1:bb9694cb2c9d8b8fa231ecb13b31ddde359641f3d35a26a8f41f81ba9cca0264", + "runtimeFingerprint": "sha256:stable-runtime-v1:e02cad6304cbe4b3049532fb4fd705013b248d18d388ae8d212caed0ddf156c4", + "graphHash": "sha256:canonical-graph-v1:7d9e931228648613be04eb68a01c87ef09e0b6029ae17de95839c90c51c515e3", + "proofLockHash": "sha256:live-proof-lock-v1:2786796d16239bd556875d1dc914416604d6068813edaa5ac401e5ae0b9da8b7", + "backendSourceFingerprint": "sha256:backend-source-v1:b4b936c36805df0ec2c7112ecbbe1d9679c010e341d2c71130e45d4df6dd52bc", + "backendContractFingerprint": "sha256:backend-contract-v1:1231b0bcab52c7c79269880d2f159fe8c20b497461a77e299a57ec6bb79c8830", "modelCommit": "e7b7dc27f91deacad38e78976d1f2b499d76a294", - "modelSetHash": "sha256:model-set-v1:937ef05db0f9c1ff380c9dfcfbdb7e7f1dc3ffd4fcf941da23d44782e841f503", - "inputArtifactsHash": "sha256:input-artifacts-v1:8d243d02783ecc65a611fddc0affa2d3c2f96eeebc1aa7b81ddd816ccec5dc68", - "templateRevisionHash": "sha256:template-revision-v1:c55f84516ebcd2f4919b4964f8cc4a05fee8f836097f9281250f2545c5618841", - "provenancePath": "/template-gallery/reviews/flux2_klein_edit.duplicate-provenance.json", - "provenanceHash": "sha256:canonical-json:13168afc8a930080697a79fbe7c6ac57fb156519b8a3f6197847aa1bf5495d88", + "templateRevisionHash": "sha256:template-revision-v1:07ea5452dac9c03f5add27ec3fcd223676df757b1063ec0008ad68392306055b", + "modelSetHash": "sha256:model-set-v1:424aa92a2138ba4c1302e1bfc4f5bdf3af95fe179465aa02f3774fa47c565b2b", + "inputArtifactsHash": "sha256:input-artifacts-v1:d0d977831aa92a352b93ef937c124d7b8ca4fe91418e05ce5de409ee72141f75", + "provenancePath": "/template-gallery/reviews/flux2_klein_edit.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:92ec7a0d614da6ea3ead223bb77d126d877a878c8eb8fa22fbb77d58cf613b46", "outputPath": "/template-gallery/flux2_klein_edit.webp", "thumbnailPath": "/template-gallery/flux2_klein_edit.webp", - "beforePath": "/template-gallery/inputs/flux2_klein_edit.before.png", - "beforeMediaHash": "sha256:bytes:d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24", - "afterPath": "/template-gallery/flux2_klein_edit.webp", - "mediaHash": "sha256:decoded-rgba:d2a6fd2bdbe04c92d484f64d1b4bee005a74149c9fa8ba8c9fe6b8eb5fd9eb26", + "mediaHash": "sha256:decoded-rgba:ce95dac164adab81b84c90b1e3e69c39c9a8a88eb0f4184f161b2986541151e6", "mediaType": "image", - "verificationTimestamp": "2026-07-13T13:26:36.042Z", + "verificationTimestamp": "2026-11-09T20:19:07.314Z", "qualityReviewPath": "/template-gallery/reviews/flux2_klein_edit.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:4cae42351d391e2ef3e4b27623f3c996bd9c543bdc2f381270f62e9901322bbb", - "qualityReviewStatus": "approved_exact", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-13T13:26:00.000Z", + "qualityReviewHash": "sha256:canonical-json:2cfaf4b9bdaef5f2f4b331a3e1ca87cde54c998f42532b077fa51f5542970b9a", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-09T20:19:07.314Z", "width": 1024, "height": 1024, - "templateInputContractHash": "tic_ede78485" + "templateInputContractHash": "tic_ede78485", + "beforePath": "/template-gallery/inputs/flux2_klein_edit.before.png", + "beforeMediaHash": "sha256:bytes:d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24", + "afterPath": "/template-gallery/flux2_klein_edit.webp" }, { "templateId": "flux2_klein_multi_reference", "verificationStatus": "reviewed", "promptSettingsHash": "ps_b173784f", - "templateLockHash": "tpl_e8810fa2", + "templateLockHash": "tpl_91f5b874", "modelRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:6b4b7f2caec7312d89726c2c2f009fb0b44e35bc587c9d4176deb19ab7cc9cce", - "proofLockHash": "sha256:live-proof-lock-v1:527c558ecf58c7f78ebdc88be6b841335dc879419daa0fb761269ac887ba0d03", - "backendSourceFingerprint": "sha256:backend-source-v1:35081eee9f9c9c4fcf7f063fe912ee846eef6b86a044e90705917dd244030a15", - "backendContractFingerprint": "sha256:backend-contract-v1:a8292b70c5d53177d74056f994b494fe98933ce5731d599efc14a3015baf60c0", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:fd93cd9bb3fbb48ac065b9efcca78ce5457288db7829be057a0240e33e3b16e7", + "proofLockHash": "sha256:live-proof-lock-v1:3a951df3cdd14bf93a3a3067cc976ed4ad710646af21a996825c6176b8af8cef", + "backendSourceFingerprint": "sha256:backend-source-v1:0d79d1e64d3829b9b19942af1fc486e6a4e4fd5215367dea0cab4c13b0d61678", + "backendContractFingerprint": "sha256:backend-contract-v1:ecb390fa0a9c2f25a08b3e564b6dc40f5a6b8d6a26809930081ef9cdc732d4db", "modelCommit": "e7b7dc27f91deacad38e78976d1f2b499d76a294", + "templateRevisionHash": "sha256:template-revision-v1:3b7d00f16a4fdfcd838f1be8cd191346763c8d042e2f946fa75e45e8a0fb2651", "modelSetHash": "sha256:model-set-v1:937ef05db0f9c1ff380c9dfcfbdb7e7f1dc3ffd4fcf941da23d44782e841f503", - "inputArtifactsHash": "sha256:input-artifacts-v1:cf1ff2497725efa71d1b6f7fa12f3f8cf95d31d8cd212bfc39746798f65d2359", - "templateRevisionHash": "sha256:template-revision-v1:79050f92998d9c9eb1453b339af1a2e16e4634f9aa0a00b93eb64b6472297d9b", + "inputArtifactsHash": "sha256:input-artifacts-v1:9da34f02b17740bc272e5eb398fd380e92b70b01b17b56ce54ec9b34564a261a", "provenancePath": "/template-gallery/reviews/flux2_klein_multi_reference.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:2d95efbb0b221c3f7cf7549232eb4dec33cf56c5babfe9d0e2e251b086e3ccdf", + "provenanceHash": "sha256:canonical-json:610ec319c811dcfd38343bbfcb1321590afda7aab860a92caea9efa9e87f6d3b", "outputPath": "/template-gallery/flux2_klein_multi_reference.webp", "thumbnailPath": "/template-gallery/flux2_klein_multi_reference.webp", - "beforePath": "/template-gallery/inputs/flux2_klein_multi_reference.before.webp", - "beforeMediaHash": "sha256:bytes:1d993540e914f0e2d230f1133b57ae14bb837829237a53c89613fcdef6699995", - "afterPath": "/template-gallery/flux2_klein_multi_reference.webp", - "mediaHash": "sha256:decoded-rgba:120f7098431614911db91e7440e7636f842a6cca39ccbd7e0f297f4a86539b0e", + "mediaHash": "sha256:decoded-rgba:22f27a5c19cfd02640f75a2f7860e557c5fec8d30cf99cbf2edf8e01ecc149ea", "mediaType": "image", - "verificationTimestamp": "2026-07-14T09:07:53.999Z", + "verificationTimestamp": "2026-11-09T12:51:13.882492+00:00", "qualityReviewPath": "/template-gallery/reviews/flux2_klein_multi_reference.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:d193998a1fdb089f3e9abeb4e1ae261a578466298e451b79b5822dc1c21f7851", + "qualityReviewHash": "sha256:canonical-json:01ea1667017bf1e2cf0cf480965dd9612d5e42dd2b8db80913c28e8afe4e4269", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T09:08:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-09T12:51:13.882492+00:00", "width": 1024, "height": 1024, - "templateInputContractHash": "tic_b4495140" + "templateInputContractHash": "tic_b4495140", + "beforePath": "/template-gallery/inputs/flux2_klein_multi_reference.before.webp", + "beforeMediaHash": "sha256:bytes:1d993540e914f0e2d230f1133b57ae14bb837829237a53c89613fcdef6699995", + "afterPath": "/template-gallery/flux2_klein_multi_reference.webp" }, { "templateId": "flux2_klein_text_to_image", "verificationStatus": "reviewed", "promptSettingsHash": "ps_53819d4c", - "templateLockHash": "tpl_30b1d38b", + "templateLockHash": "tpl_4ede4f41", "modelRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", - "runtimeFingerprint": "sha256:stable-runtime-v1:69176a2c48aa17b7e8d1a22ddb5e28515054580a405f9370f75695c79ce43426", - "graphHash": "sha256:canonical-graph-v1:4ea71c73bffe2c8db32fc8ab4cc1a3c49dcb606228c039e7e637fbf5427729c2", - "proofLockHash": "sha256:live-proof-lock-v1:16872a7a3a460975b12039804ee98cbb05b56cd1b00cef9f8eb3bc3758ca8a39", - "backendSourceFingerprint": "sha256:backend-source-v1:6f42a2f530647db914919dd0c601a9ef5034440edb1d51cc6ef73f28017516af", - "backendContractFingerprint": "sha256:backend-contract-v1:9ccccb7977b342906c7a45786e4bc86f6b5c0f83c321c297039e0160acbe9755", + "runtimeFingerprint": "sha256:stable-runtime-v1:e02cad6304cbe4b3049532fb4fd705013b248d18d388ae8d212caed0ddf156c4", + "graphHash": "sha256:canonical-graph-v1:fd41047a33c769bbcd0cb20d3aef75f442bf6f00fd41afd49dd883846c7120a6", + "proofLockHash": "sha256:live-proof-lock-v1:dce45ba790f861ebde07c68d806004346391d0bc2a1a7076b792ee18b25c16d3", + "backendSourceFingerprint": "sha256:backend-source-v1:b4b936c36805df0ec2c7112ecbbe1d9679c010e341d2c71130e45d4df6dd52bc", + "backendContractFingerprint": "sha256:backend-contract-v1:71ac9c690df8a9232965907d1f9c4112871ece25be3ab8182480cc2845e172ab", "modelCommit": "e7b7dc27f91deacad38e78976d1f2b499d76a294", - "modelSetHash": "sha256:model-set-v1:937ef05db0f9c1ff380c9dfcfbdb7e7f1dc3ffd4fcf941da23d44782e841f503", + "templateRevisionHash": "sha256:template-revision-v1:b08f817bd2e37f8d252cebe33730692779fd92664948b51075a50321f0f4716c", + "modelSetHash": "sha256:model-set-v1:424aa92a2138ba4c1302e1bfc4f5bdf3af95fe179465aa02f3774fa47c565b2b", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:d1a5c13cfd648a51059a5a2db2fb261032cf4de60505eab27dab8f76b297d3c2", "provenancePath": "/template-gallery/reviews/flux2_klein_text_to_image.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:80ed663673b2f9c55b2baa30dd3b18797634f2d88004da13397f31085fe69cef", + "provenanceHash": "sha256:canonical-json:011b19c3b5dc1554e1bd0f654dea020ce79a38f4f343ab81a8380d6266980838", "outputPath": "/template-gallery/flux2_klein_text_to_image.webp", "thumbnailPath": "/template-gallery/flux2_klein_text_to_image.webp", - "mediaHash": "sha256:decoded-rgba:83cbcddba2398e0a207a3d07dab2d1845b9e953bbaf285958d923d418732be54", + "mediaHash": "sha256:decoded-rgba:e9995932c36de0d177ed95126268ae0de77a064884ab56cd421af451406179bf", "mediaType": "image", - "verificationTimestamp": "2026-07-13T17:59:18.340Z", + "verificationTimestamp": "2026-11-09T20:19:07.314Z", "qualityReviewPath": "/template-gallery/reviews/flux2_klein_text_to_image.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:0527ea7f78c334dd4e4b190974d4f0941f78e113d5652eb7f174e3bc986a69cc", + "qualityReviewHash": "sha256:canonical-json:9862c5145d98f6fb89cb0c91757af7ea0a2a2cc6bcef43ccc20a2d4b8f83efb2", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-13T18:02:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-09T20:19:07.314Z", + "width": 1024, + "height": 1024 + }, + { + "templateId": "flux3_klein_base_fp8r512_lora_style", + "verificationStatus": "reviewed", + "promptSettingsHash": "ps_45fc840c", + "templateLockHash": "tpl_b8fe4791", + "modelRevision": "black-forest-labs/flux-3-image-klein-base@1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4 | pjecuacion/flux3-klein-mnt-oil-monet-lora@0d94b6a4601892499defd8c5d89c24f78e78043b", + "runtimeFingerprint": "sha256:stable-runtime-v1:d6393f9274337dffc2f9e7989dcfadebff77da4f76e3a7d777c0be0451656304", + "graphHash": "sha256:canonical-graph-v1:d3312a8e5c8e0fcc4ae50709f7363a83bbb07de55d6fd5e2ff2f6ed6df6f0f8b", + "proofLockHash": "sha256:live-proof-lock-v1:85fd5a2522cab0738fd72ac71460ea7775a4502d2e3ba9052cba4879a6ba1020", + "backendSourceFingerprint": "sha256:backend-source-v1:42faf1330d661102d912e79bea517de856edea4e6b6aa08ae93617a1111e166f", + "backendContractFingerprint": "sha256:backend-contract-v1:46031e39a597e30e0295d793b465899647983b9a4a0607be8648cec87e226ccb", + "modelCommit": "black-forest-labs/flux-3-image-klein-base@1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4 | pjecuacion/flux3-klein-mnt-oil-monet-lora@0d94b6a4601892499defd8c5d89c24f78e78043b", + "modelSetHash": "sha256:model-set-v1:308afa3c4df9dec68f81ac438f44410f5d95be81d083592267d49dcef74ddada", + "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "templateRevisionHash": "sha256:template-revision-v1:10f9876967b6d679d86ad3faa7ae5f53c4923bc710cd7fafe9966536aba6fd38", + "provenancePath": "/template-gallery/reviews/flux3_klein_base_fp8r512_lora_style.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:74a613ed136957a82a9adf34dc07906428946eecbc53cf533b3ae0668b3d7ae8", + "outputPath": "/template-gallery/flux3_klein_base_fp8r512_lora_style.webp", + "thumbnailPath": "/template-gallery/flux3_klein_base_fp8r512_lora_style.webp", + "mediaHash": "sha256:decoded-rgba:cf900eafa34f9a73715a1de4ebba142004f887721c30d6bbc2050185f8b980dc", + "mediaType": "image", + "verificationTimestamp": "2026-10-31T15:47:51.800Z", + "qualityReviewPath": "/template-gallery/reviews/flux3_klein_base_fp8r512_lora_style.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:5213b00293c1194dbd8b1c65ec50ca66ea8582f868fc3ceaf01435d84177e796", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "Codex (AI visual assessment); sourav-das (exact-file publication approval)", + "reviewedAt": "2026-10-31T14:59:34.117Z", + "width": 512, + "height": 512 + }, + { + "templateId": "flux3_klein_base_fp8r512_multi_reference_edit", + "verificationStatus": "reviewed", + "promptSettingsHash": "ps_eda85443", + "templateLockHash": "tpl_6c612164", + "templateInputContractHash": "tic_38eb1289", + "modelRevision": "black-forest-labs/flux-3-image-klein-base@1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4", + "runtimeFingerprint": "sha256:stable-runtime-v1:d6393f9274337dffc2f9e7989dcfadebff77da4f76e3a7d777c0be0451656304", + "graphHash": "sha256:canonical-graph-v1:1f470bad2870220245b7b5103f3fbff4004134358fc6fb02f2971bd70b8d83c0", + "proofLockHash": "sha256:live-proof-lock-v1:beca90316dd861eb57f836e60ed31028a4bcba695ba304c81afa18f7f035838f", + "backendSourceFingerprint": "sha256:backend-source-v1:42faf1330d661102d912e79bea517de856edea4e6b6aa08ae93617a1111e166f", + "backendContractFingerprint": "sha256:backend-contract-v1:586fd63f8d461246cbdc13e3a9c5615c3a0960b87c46f04684e49a411cc5324f", + "modelCommit": "1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4", + "modelSetHash": "sha256:model-set-v1:df7eadeee009e34cd9b0e8e6d38d469d3282aabd897b9e5ffbc60ac99bc6c397", + "inputArtifactsHash": "sha256:input-artifacts-v1:1921feafaf51c572a1490bc5d1e947cd0be520b4d0af775633b2d83f25eb5418", + "templateRevisionHash": "sha256:template-revision-v1:08ccf6456d923be05f428dbe07683c642a02dd5e76c8686cb098a7d59255d849", + "provenancePath": "/template-gallery/reviews/flux3_klein_base_fp8r512_multi_reference_edit.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:62903eedf7f1c0f450ef2679c0b5795ef13b55a1ac5109e97514d30bf68c66d1", + "outputPath": "/template-gallery/flux3_klein_base_fp8r512_multi_reference_edit.png", + "thumbnailPath": "/template-gallery/flux3_klein_base_fp8r512_multi_reference_edit.png", + "beforePath": "/template-gallery/inputs/flux3_klein_base_fp8r512_multi_reference_edit.before.png", + "beforeMediaHash": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", + "afterPath": "/template-gallery/flux3_klein_base_fp8r512_multi_reference_edit.png", + "mediaHash": "sha256:decoded-rgba:ff4596af670899337dcef8856f5878ede20494b7b5ccc4b5f1085efb44ce6c23", + "mediaType": "image", + "verificationTimestamp": "2026-10-31T15:47:49.981Z", + "qualityReviewPath": "/template-gallery/reviews/flux3_klein_base_fp8r512_multi_reference_edit.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:d6d86e1562aed8c3015b6aca1a28bb6ed4be7ccaa1f059f3438c7bb07c7fe685", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "Codex (AI visual assessment); sourav-das (exact-file publication approval)", + "reviewedAt": "2026-10-31T14:59:34.114Z", + "width": 1024, + "height": 1024 + }, + { + "templateId": "flux3_klein_base_fp8r512_raw_coordinate_prompt", + "verificationStatus": "reviewed", + "promptSettingsHash": "ps_ab1f9435", + "templateLockHash": "tpl_e448c87f", + "modelRevision": "black-forest-labs/flux-3-image-klein-base@1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4", + "runtimeFingerprint": "sha256:stable-runtime-v1:d6393f9274337dffc2f9e7989dcfadebff77da4f76e3a7d777c0be0451656304", + "graphHash": "sha256:canonical-graph-v1:543a86b82b6008f1d0bc603cd8bd96e03a91e4f3508e19ec64c6d3bf70aed3ad", + "proofLockHash": "sha256:live-proof-lock-v1:3a82ac7d035aedf413226a29fd51e103d81b229d7c69f18b6f847a878d4627f4", + "backendSourceFingerprint": "sha256:backend-source-v1:4d72b49b1ee7b56357d67d75ce284a9355f2393d6cf8d51f18468d72fa6619de", + "backendContractFingerprint": "sha256:backend-contract-v1:43291ed17b126e3978d9989697e3558530502669e6675a7c5885c7aaebf5adcd", + "modelCommit": "1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4", + "modelSetHash": "sha256:model-set-v1:df7eadeee009e34cd9b0e8e6d38d469d3282aabd897b9e5ffbc60ac99bc6c397", + "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "templateRevisionHash": "sha256:template-revision-v1:8ba10cb07cc645a6b12a1e5416b12a0ab3d2821786e12e108ec7709b8632014f", + "provenancePath": "/template-gallery/reviews/flux3_klein_base_fp8r512_raw_coordinate_prompt.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:f77114ee54351c29edb8805227ce9d9f7389f11fcfc565bd33a352e3752b2235", + "outputPath": "/template-gallery/flux3_klein_base_fp8r512_raw_coordinate_prompt.webp", + "thumbnailPath": "/template-gallery/flux3_klein_base_fp8r512_raw_coordinate_prompt.webp", + "mediaHash": "sha256:decoded-rgba:08207798258b9624a3ae25047d2224d79223adc8e1e592bd3776a2c35ccf82ba", + "mediaType": "image", + "verificationTimestamp": "2026-10-31T15:47:50.901Z", + "qualityReviewPath": "/template-gallery/reviews/flux3_klein_base_fp8r512_raw_coordinate_prompt.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:0d0c0f95bd088d15b72f3b0d1b76ff9637dd977480c0175323c7244260a3b08e", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "Codex (AI visual assessment); sourav-das (exact-file publication approval)", + "reviewedAt": "2026-10-31T14:59:34.116Z", + "width": 512, + "height": 512 + }, + { + "templateId": "flux3_klein_base_fp8r512_single_reference_edit", + "verificationStatus": "reviewed", + "promptSettingsHash": "ps_718b791c", + "templateLockHash": "tpl_02dc7e3c", + "templateInputContractHash": "tic_3e369509", + "modelRevision": "black-forest-labs/flux-3-image-klein-base@1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4", + "runtimeFingerprint": "sha256:stable-runtime-v1:d6393f9274337dffc2f9e7989dcfadebff77da4f76e3a7d777c0be0451656304", + "graphHash": "sha256:canonical-graph-v1:46c03604a6e5629c4f0d03e675696ba161a8120e5a169e234c78ce1560d33633", + "proofLockHash": "sha256:live-proof-lock-v1:f8601a3f75e552d7a1691814806415e7f64426d9019101643b25bd3ab60e5ff9", + "backendSourceFingerprint": "sha256:backend-source-v1:4d72b49b1ee7b56357d67d75ce284a9355f2393d6cf8d51f18468d72fa6619de", + "backendContractFingerprint": "sha256:backend-contract-v1:2b23f1e12c9d7c00c9fdf513899c224daed3b605465939103d6d93ea75e8b841", + "modelCommit": "1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4", + "modelSetHash": "sha256:model-set-v1:df7eadeee009e34cd9b0e8e6d38d469d3282aabd897b9e5ffbc60ac99bc6c397", + "inputArtifactsHash": "sha256:input-artifacts-v1:9302fd651d097d6dabfe7b4b9d2182fa51ec1a09c1dcc7cdf3ecbf0657d445f3", + "templateRevisionHash": "sha256:template-revision-v1:3148a21f8816f5e8b14dfd12531b7505751f3c0653920f19494d6db8219980a0", + "provenancePath": "/template-gallery/reviews/flux3_klein_base_fp8r512_single_reference_edit.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:abc0a45d5004113314a7d9e260978b41d94a89d76d92fd34f56a48d76564674b", + "outputPath": "/template-gallery/flux3_klein_base_fp8r512_single_reference_edit.webp", + "thumbnailPath": "/template-gallery/flux3_klein_base_fp8r512_single_reference_edit.webp", + "beforePath": "/template-gallery/inputs/flux3_klein_base_fp8r512_single_reference_edit.before.png", + "beforeMediaHash": "sha256:bytes:d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24", + "afterPath": "/template-gallery/flux3_klein_base_fp8r512_single_reference_edit.webp", + "mediaHash": "sha256:decoded-rgba:3335c0bd42c0a2f0dfce32562ce039ef660eae5b22bd4fb6ef376ce57b9f78e1", + "mediaType": "image", + "verificationTimestamp": "2026-10-31T15:47:48.962Z", + "qualityReviewPath": "/template-gallery/reviews/flux3_klein_base_fp8r512_single_reference_edit.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:e4ae9a6db7dcc801c5aceebfd9c632c4ece8e534f7554c8f2f92116e59ddbc1f", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "Codex (AI visual assessment); sourav-das (exact-file publication approval)", + "reviewedAt": "2026-10-31T14:59:34.113Z", + "width": 512, + "height": 512 + }, + { + "templateId": "flux3_klein_base_fp8r512_text_to_image", + "verificationStatus": "reviewed", + "promptSettingsHash": "ps_ec02848c", + "templateLockHash": "tpl_80ddfc95", + "modelRevision": "black-forest-labs/flux-3-image-klein-base@1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4", + "runtimeFingerprint": "sha256:stable-runtime-v1:d6393f9274337dffc2f9e7989dcfadebff77da4f76e3a7d777c0be0451656304", + "graphHash": "sha256:canonical-graph-v1:62f45624654a43a6950b74f777e9040520d6df49b7d3b25dbff2ba5573181ee2", + "proofLockHash": "sha256:live-proof-lock-v1:8ab3e0f7c33257271c96fdbaaf4a366112d955989b6bdd9289b1a2a7308f4fa1", + "backendSourceFingerprint": "sha256:backend-source-v1:42faf1330d661102d912e79bea517de856edea4e6b6aa08ae93617a1111e166f", + "backendContractFingerprint": "sha256:backend-contract-v1:43291ed17b126e3978d9989697e3558530502669e6675a7c5885c7aaebf5adcd", + "modelCommit": "1469d27cfb9bb1bd81d3a93f5a023b39dbf136e4", + "modelSetHash": "sha256:model-set-v1:df7eadeee009e34cd9b0e8e6d38d469d3282aabd897b9e5ffbc60ac99bc6c397", + "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "templateRevisionHash": "sha256:template-revision-v1:d5a9e2fe9e72b28b8b49c6dcd4d373edb42f345f5d8a1189e1dcb7dbb91ca68c", + "provenancePath": "/template-gallery/reviews/flux3_klein_base_fp8r512_text_to_image.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:f1ca318fb3163b82173ef940ba79d07b55814f53156dec253657fc672978fe7a", + "outputPath": "/template-gallery/flux3_klein_base_fp8r512_text_to_image.webp", + "thumbnailPath": "/template-gallery/flux3_klein_base_fp8r512_text_to_image.webp", + "mediaHash": "sha256:decoded-rgba:cf56f56f7f748e06aff01e9d679a219f077b94cfdffdf6e1da393680992a9d16", + "mediaType": "image", + "verificationTimestamp": "2026-10-31T15:47:48.035Z", + "qualityReviewPath": "/template-gallery/reviews/flux3_klein_base_fp8r512_text_to_image.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:ad271574862b778f7a68c361c8b0d1f145c4ff8f8eaec4578fd68b27b3b1f462", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "Codex (AI visual assessment); sourav-das (exact-file publication approval)", + "reviewedAt": "2026-10-31T14:59:34.113Z", + "width": 512, + "height": 512 + }, + { + "templateId": "flux3_klein_fp8r512_lora_style", + "verificationStatus": "reviewed", + "promptSettingsHash": "ps_dbab2ce1", + "templateLockHash": "tpl_9edd5f24", + "modelRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68 | kocabiyik/nsc7-style-lora@9b998d3bdc3b4aeb2113ab4e8cbd9fe2ebfa1cae", + "runtimeFingerprint": "sha256:stable-runtime-v1:d6393f9274337dffc2f9e7989dcfadebff77da4f76e3a7d777c0be0451656304", + "graphHash": "sha256:canonical-graph-v1:d49dde4bdd41a1bb8dc9207e74fe9fce862a13a2332ae1a4654e7ba0dc0518fb", + "proofLockHash": "sha256:live-proof-lock-v1:84a3a34bb7e6756333eda023e6ad9396386a4863168b41cd549471765f513a14", + "backendSourceFingerprint": "sha256:backend-source-v1:059ac079cf29b42460d0951d43c6dac8bec785cba77ef7867d68c9439cf00eab", + "backendContractFingerprint": "sha256:backend-contract-v1:1b1be7967668d37dddf49d09ec1dc92a223b1a649332196f287eacdbb9583da7", + "modelCommit": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68 | kocabiyik/nsc7-style-lora@9b998d3bdc3b4aeb2113ab4e8cbd9fe2ebfa1cae", + "modelSetHash": "sha256:model-set-v1:d971be4822c85403bb49c54176afea87088883f6ad55abe2f461c2999a127255", + "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "templateRevisionHash": "sha256:template-revision-v1:ea8aa121ed4133b2eb948586d12277a44ba266e86fa30ef7d2a0f4fa1e93d0bc", + "provenancePath": "/template-gallery/reviews/flux3_klein_fp8r512_lora_style.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:753f34b72dbcefbf1969ba8f6151169967a39c25c2daad30e96a677f9463820d", + "outputPath": "/template-gallery/flux3_klein_fp8r512_lora_style.webp", + "thumbnailPath": "/template-gallery/flux3_klein_fp8r512_lora_style.webp", + "mediaHash": "sha256:decoded-rgba:f794cdcbb0051301c8f5e206c2a61fb79b7713736ffca809f564c4eea1f30960", + "mediaType": "image", + "verificationTimestamp": "2026-10-31T15:47:47.085Z", + "qualityReviewPath": "/template-gallery/reviews/flux3_klein_fp8r512_lora_style.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:1738d685506c32285ec01c26bcf2eef51d0108b581b15fe32505581b66fe1cc0", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "Codex (AI visual assessment); sourav-das (exact-file publication approval)", + "reviewedAt": "2026-10-31T14:59:34.112Z", + "width": 512, + "height": 512 + }, + { + "templateId": "flux3_klein_fp8r512_multi_reference_edit", + "verificationStatus": "reviewed", + "promptSettingsHash": "ps_4376a79b", + "templateLockHash": "tpl_5b102c44", + "templateInputContractHash": "tic_b7a3a619", + "modelRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "runtimeFingerprint": "sha256:stable-runtime-v1:d6393f9274337dffc2f9e7989dcfadebff77da4f76e3a7d777c0be0451656304", + "graphHash": "sha256:canonical-graph-v1:d98db2b980983b0cc27c07f37b760576bb77531810daff126afc7dfecefe89bc", + "proofLockHash": "sha256:live-proof-lock-v1:b29503e2fd21e2e760714ae13e3b304a1669af7ba3b5f3ac5039636257a02ed3", + "backendSourceFingerprint": "sha256:backend-source-v1:42faf1330d661102d912e79bea517de856edea4e6b6aa08ae93617a1111e166f", + "backendContractFingerprint": "sha256:backend-contract-v1:a32dd459f697cfe85b9c7773f0f01a77ae18fd27401311a05466d6cb457e0062", + "modelCommit": "8454017f9ebaada30c998fccd9f67a80c7580f68", + "modelSetHash": "sha256:model-set-v1:1b505267984a07c91ab451f02b5b2f66bfbe38e7e3f4a8b55c1f105720f56719", + "inputArtifactsHash": "sha256:input-artifacts-v1:1921feafaf51c572a1490bc5d1e947cd0be520b4d0af775633b2d83f25eb5418", + "templateRevisionHash": "sha256:template-revision-v1:66daed8d72cfbe5ccd459f091b84fd0be24ccf99e7f348cda71100db4622b1b5", + "provenancePath": "/template-gallery/reviews/flux3_klein_fp8r512_multi_reference_edit.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:b5a12528e163e68fdf61c66add53322215e5fdd1d9bf22ee6c8e09bb2fafe7d0", + "outputPath": "/template-gallery/flux3_klein_fp8r512_multi_reference_edit.png", + "thumbnailPath": "/template-gallery/flux3_klein_fp8r512_multi_reference_edit.png", + "beforePath": "/template-gallery/inputs/flux3_klein_fp8r512_multi_reference_edit.before.png", + "beforeMediaHash": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", + "afterPath": "/template-gallery/flux3_klein_fp8r512_multi_reference_edit.png", + "mediaHash": "sha256:decoded-rgba:796220d0d5f53b8a21dbc38b6d4342fe00026e6225b81991de01378a99ef05fb", + "mediaType": "image", + "verificationTimestamp": "2026-10-31T15:47:45.226Z", + "qualityReviewPath": "/template-gallery/reviews/flux3_klein_fp8r512_multi_reference_edit.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:6f312e426f927d8e28e9afb9a943403b1cd36bd5ee2344a6c51552391a2e663f", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "Codex (AI visual assessment); sourav-das (exact-file publication approval)", + "reviewedAt": "2026-10-31T14:59:34.111Z", "width": 1024, "height": 1024 }, + { + "templateId": "flux3_klein_fp8r512_raw_coordinate_prompt", + "verificationStatus": "reviewed", + "promptSettingsHash": "ps_d26e7119", + "templateLockHash": "tpl_5e87db80", + "modelRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "runtimeFingerprint": "sha256:stable-runtime-v1:d6393f9274337dffc2f9e7989dcfadebff77da4f76e3a7d777c0be0451656304", + "graphHash": "sha256:canonical-graph-v1:81143968fa75d8238220ea4dca03d6a0e42580160f87aba6a755ad42a096e9b5", + "proofLockHash": "sha256:live-proof-lock-v1:ca26dcd57defc1da1c4c72f2b36aac04f774f3c93f037a14f2ddb48c26724500", + "backendSourceFingerprint": "sha256:backend-source-v1:4d72b49b1ee7b56357d67d75ce284a9355f2393d6cf8d51f18468d72fa6619de", + "backendContractFingerprint": "sha256:backend-contract-v1:171b4bddb5bee4bbe062a67e7de8a43ec8662469019a456279553a8cfc5168ef", + "modelCommit": "8454017f9ebaada30c998fccd9f67a80c7580f68", + "modelSetHash": "sha256:model-set-v1:1b505267984a07c91ab451f02b5b2f66bfbe38e7e3f4a8b55c1f105720f56719", + "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "templateRevisionHash": "sha256:template-revision-v1:1cd5ea8ddf7601d5f54b4316a0e978e754251068f14b100a36b78792aa1ebeba", + "provenancePath": "/template-gallery/reviews/flux3_klein_fp8r512_raw_coordinate_prompt.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:47b2d254939d418af3e0ed2d69dcb265f7fdfd41fd8dbd8b518cf858dde40240", + "outputPath": "/template-gallery/flux3_klein_fp8r512_raw_coordinate_prompt.webp", + "thumbnailPath": "/template-gallery/flux3_klein_fp8r512_raw_coordinate_prompt.webp", + "mediaHash": "sha256:decoded-rgba:1889819e733db720d0274b1a1929aed582c9a5817a788ea7a5f7541e22a51e62", + "mediaType": "image", + "verificationTimestamp": "2026-10-31T15:47:46.136Z", + "qualityReviewPath": "/template-gallery/reviews/flux3_klein_fp8r512_raw_coordinate_prompt.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:e53dd58722d55c07e2aa3dbe775cfd70818f7736bbd4a2d94647a6ecd01764b6", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "Codex (AI visual assessment); sourav-das (exact-file publication approval)", + "reviewedAt": "2026-10-31T14:59:34.111Z", + "width": 512, + "height": 512 + }, + { + "templateId": "flux3_klein_fp8r512_single_reference_edit", + "verificationStatus": "reviewed", + "promptSettingsHash": "ps_6888cfda", + "templateLockHash": "tpl_4e407e4b", + "templateInputContractHash": "tic_2743e769", + "modelRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "runtimeFingerprint": "sha256:stable-runtime-v1:d6393f9274337dffc2f9e7989dcfadebff77da4f76e3a7d777c0be0451656304", + "graphHash": "sha256:canonical-graph-v1:6befaea1addf05446d1c420c997c5e641ac214a966a52f2d2760a087531b747b", + "proofLockHash": "sha256:live-proof-lock-v1:1b206e576d7860fd9b0a6913976132378de28eadc1ea5706197ef334ed16bcd9", + "backendSourceFingerprint": "sha256:backend-source-v1:4d72b49b1ee7b56357d67d75ce284a9355f2393d6cf8d51f18468d72fa6619de", + "backendContractFingerprint": "sha256:backend-contract-v1:17de0800c477f0e24beb595a6bb24fd3ea50ac87541a3bd758b28fe6dc62eb94", + "modelCommit": "8454017f9ebaada30c998fccd9f67a80c7580f68", + "modelSetHash": "sha256:model-set-v1:1b505267984a07c91ab451f02b5b2f66bfbe38e7e3f4a8b55c1f105720f56719", + "inputArtifactsHash": "sha256:input-artifacts-v1:57037390841778a8287e59fad00e4aad639227e97831be2c85d005267029c7d9", + "templateRevisionHash": "sha256:template-revision-v1:f0e217c6d64a3cbd45a6002fcec9c6412aed6cd82f444e29ea2a6c41caddb2bc", + "provenancePath": "/template-gallery/reviews/flux3_klein_fp8r512_single_reference_edit.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:eed9076df64ca183e1c9881c95fad3d6e5c7fd832689a963174c2201866537d8", + "outputPath": "/template-gallery/flux3_klein_fp8r512_single_reference_edit.webp", + "thumbnailPath": "/template-gallery/flux3_klein_fp8r512_single_reference_edit.webp", + "beforePath": "/template-gallery/inputs/flux3_klein_fp8r512_single_reference_edit.before.png", + "beforeMediaHash": "sha256:bytes:d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24", + "afterPath": "/template-gallery/flux3_klein_fp8r512_single_reference_edit.webp", + "mediaHash": "sha256:decoded-rgba:bb34822f6dd4fbe03a52d3e267b255ab255947981007d7a80102793cb14f277b", + "mediaType": "image", + "verificationTimestamp": "2026-10-31T15:47:44.205Z", + "qualityReviewPath": "/template-gallery/reviews/flux3_klein_fp8r512_single_reference_edit.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:c34b5b0b3487312c407979b673e7436c5b0805441841ee953805c1bbe5a77200", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "Codex (AI visual assessment); sourav-das (exact-file publication approval)", + "reviewedAt": "2026-10-31T14:59:34.109Z", + "width": 512, + "height": 512 + }, + { + "templateId": "flux3_klein_fp8r512_text_to_image", + "verificationStatus": "reviewed", + "promptSettingsHash": "ps_79b85e32", + "templateLockHash": "tpl_d374824c", + "modelRevision": "black-forest-labs/flux-3-image-klein@8454017f9ebaada30c998fccd9f67a80c7580f68", + "runtimeFingerprint": "sha256:stable-runtime-v1:d6393f9274337dffc2f9e7989dcfadebff77da4f76e3a7d777c0be0451656304", + "graphHash": "sha256:canonical-graph-v1:0912bf4cb4ecd6249bfd591f0880a974e4b7298f5e2f1d8b81603828652af6b5", + "proofLockHash": "sha256:live-proof-lock-v1:69cb0804c8a91ab3f1c61032163e24a70a9a8a85a710e6a468e46689e3e31664", + "backendSourceFingerprint": "sha256:backend-source-v1:a89d4290961bab3bb311b2e073b012eb5e165a2e8a4ae0fe4f46cdd04809c697", + "backendContractFingerprint": "sha256:backend-contract-v1:171b4bddb5bee4bbe062a67e7de8a43ec8662469019a456279553a8cfc5168ef", + "modelCommit": "8454017f9ebaada30c998fccd9f67a80c7580f68", + "modelSetHash": "sha256:model-set-v1:1b505267984a07c91ab451f02b5b2f66bfbe38e7e3f4a8b55c1f105720f56719", + "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "templateRevisionHash": "sha256:template-revision-v1:8b0b4ba9559b9d0171cfebf115ae58aec211915317bb283651af68a00a5aa7cf", + "provenancePath": "/template-gallery/reviews/flux3_klein_fp8r512_text_to_image.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:2e0e652dee228089343aaeb540ee83450392c82f7c101069821238b4d8136ffa", + "outputPath": "/template-gallery/flux3_klein_fp8r512_text_to_image.webp", + "thumbnailPath": "/template-gallery/flux3_klein_fp8r512_text_to_image.webp", + "mediaHash": "sha256:decoded-rgba:c8f68ce3a11ec1f3803c8f039bf8a40345b76bd66c6b31c8c593389cc03d1a55", + "mediaType": "image", + "verificationTimestamp": "2026-10-31T15:47:43.280Z", + "qualityReviewPath": "/template-gallery/reviews/flux3_klein_fp8r512_text_to_image.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:dfd3549d3a739a889d597a4a576d862cd40254b30d54d4cf814f46e843e2e383", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "Codex (AI visual assessment); sourav-das (exact-file publication approval)", + "reviewedAt": "2026-10-31T14:59:34.107Z", + "width": 512, + "height": 512 + }, { "templateId": "high_quality", "verificationStatus": "reviewed", "promptSettingsHash": "ps_e27fa94c", - "templateLockHash": "tpl_1329521a", + "templateLockHash": "tpl_bba65c55", "modelRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:5ab9c164eb3a470384434f0d39fcd23d68931f411be54edc16d8ac126a41d7df", - "proofLockHash": "sha256:live-proof-lock-v1:1e1e859d161b8397c5321904883339d98618095806a71eb43fa1525b17e8ac1a", - "backendSourceFingerprint": "sha256:backend-source-v1:abf44f6a4d030ec6f55964748eab40d9ae56d5f2912253b94354681a42bb2a48", - "backendContractFingerprint": "sha256:backend-contract-v1:24526f4bcaaa3589782f0d13d8f362ecfe8ea341d93d3bbf9603eac470f0dea1", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:86288958a02500321bc6adc4a0e7e9baff3566d27b882d0ef9f7a4027d75a69c", + "proofLockHash": "sha256:live-proof-lock-v1:f3ec0a24a70260082d04702565aa3843b7a71c4b7b5a8cda0f6eefd6e5a9f628", + "backendSourceFingerprint": "sha256:backend-source-v1:f2abf44f5ca8acadbff85dbe3a906c84454d653c1663e3cdd742180a0b1ad8c8", + "backendContractFingerprint": "sha256:backend-contract-v1:961cb20eb19be2cb1632d7ea6bf8925ffb67659db5a6784e9fa23e8175f6a9b2", "modelCommit": "25468b98e3276ca6700de15c6628e51b7de54a26", - "modelSetHash": "sha256:model-set-v1:dddafa76ef1be94e2cbdb6a9196b7dd12f19c56fd95ac9d9ef009a812230a3a5", + "templateRevisionHash": "sha256:template-revision-v1:7f4119909abaf6b2e670ed8c070b908db20ddeeb8e78ee6662621dd387f1ea6f", + "modelSetHash": "sha256:model-set-v1:e3dbf7535fe3c2a4c44462791f4acf7e65eb4a3d780d379802e78a4d7855900c", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:8e91bdfb82e4bf2ad5626a81f4d3bc95029e954a705c4f646198475cc3d8157f", "provenancePath": "/template-gallery/reviews/high_quality.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:ee552d56fd12e50e4686f30361ea81ddf35a7b1df3c1c9f19f29824495cea3dd", + "provenanceHash": "sha256:canonical-json:0c3e8d357adf60c2b31bf87fa99a1fd63b86e592dd538ff560992b1a4294c29f", "outputPath": "/template-gallery/high_quality.webp", "thumbnailPath": "/template-gallery/high_quality.webp", - "mediaHash": "sha256:decoded-rgba:3b6a55e8099a9f9e3b7199ee9be5da39e452e856217084999058d3c4334283d6", + "mediaHash": "sha256:decoded-rgba:074079e67d2a3f50a054714db95b1bb4da99338e8766358168fc1832c6bf9cbd", "mediaType": "image", - "verificationTimestamp": "2026-07-14T06:19:58.519Z", + "verificationTimestamp": "2026-11-09T19:19:50.842Z", "qualityReviewPath": "/template-gallery/reviews/high_quality.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:49d7da33a2456940f9f9d90ab6d7c8be461ed62a56977986437380c9a33c263a", + "qualityReviewHash": "sha256:canonical-json:a8983bf2d8632090f2cbff121d5c1d283b884f2d310c1b97fedd3316c6a947af", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T06:20:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-09T19:19:50.842Z", "width": 1024, "height": 1024 }, @@ -930,600 +1322,678 @@ "templateId": "low_vram", "verificationStatus": "reviewed", "promptSettingsHash": "ps_517a5135", - "templateLockHash": "tpl_228dbef2", + "templateLockHash": "tpl_21cc6d5d", "modelRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", - "runtimeFingerprint": "sha256:stable-runtime-v1:69176a2c48aa17b7e8d1a22ddb5e28515054580a405f9370f75695c79ce43426", - "graphHash": "sha256:canonical-graph-v1:4eea2b7b0d0783dda6532235eb2dea47721d78946ff6bef3b2ecbcd9d93322b1", - "proofLockHash": "sha256:live-proof-lock-v1:61ac2a6616fb4b6278e8c6c1b623aabe121cb30c5db92b35e2fb8a07cd4cbdc5", - "backendSourceFingerprint": "sha256:backend-source-v1:6f42a2f530647db914919dd0c601a9ef5034440edb1d51cc6ef73f28017516af", - "backendContractFingerprint": "sha256:backend-contract-v1:9ccccb7977b342906c7a45786e4bc86f6b5c0f83c321c297039e0160acbe9755", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:cd301927b30110ed47c9401878c5ba4ece47d397ad0f6bd1fa1b5dfc2f537550", + "proofLockHash": "sha256:live-proof-lock-v1:10c53aa6bd74c94441193202c7a487747ff64d44f9573b3b8f29c504073541ac", + "backendSourceFingerprint": "sha256:backend-source-v1:e73e8cabbb7f2d3f73284cfa513bbe7fa3164d487c6e606cf3b537630e3d6f70", + "backendContractFingerprint": "sha256:backend-contract-v1:961cb20eb19be2cb1632d7ea6bf8925ffb67659db5a6784e9fa23e8175f6a9b2", "modelCommit": "f332072aa78be7aecdf3ee76d5c247082da564a6", + "templateRevisionHash": "sha256:template-revision-v1:1c0c4d87697a9b3d9f3021e6bdc057cb4d0e3284264bf40430758748dd72bbdb", "modelSetHash": "sha256:model-set-v1:09839f362bbf3be38c280c4c3417b2735823b124d76c6f797f356e1ba3c8b1f8", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:6823feaa5bbb7a20aef5a7d6d6931441126c2449fa7a3c3b86d80e405dec67c1", "provenancePath": "/template-gallery/reviews/low_vram.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:6521c58b410cc08872cea0c93f6b9664ae9d62338b411d9f37038b2de5a07262", + "provenanceHash": "sha256:canonical-json:71c44a6e8135cb0661d48859b2dc5ce5647115f81d423e8e02a57d87396c1f7e", "outputPath": "/template-gallery/low_vram.webp", "thumbnailPath": "/template-gallery/low_vram.webp", - "mediaHash": "sha256:decoded-rgba:5e2c034a9fca00de167cc336159d4312fdd63b3d704401da7a2b7ec163e0a069", + "mediaHash": "sha256:decoded-rgba:15bc1ee63c3c3639f4fc9094eedd8644c89edf64b1b771173b541946d5b17371", "mediaType": "image", - "verificationTimestamp": "2026-07-13T17:51:06.087Z", + "verificationTimestamp": "2026-11-09T07:12:13.927142+00:00", "qualityReviewPath": "/template-gallery/reviews/low_vram.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:4059f42f3bd754d8b113b6a8b293287f497a22b6338a47151261cc04f7bf4f44", + "qualityReviewHash": "sha256:canonical-json:3b80527456063b32ba1eda4fa2b4ff7619f838815606ac1c43077202c722def7", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-13T17:18:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-09T07:12:13.927142+00:00", "width": 1024, "height": 1024 }, { "templateId": "ltx_video_animated_story", "verificationStatus": "reviewed", - "promptSettingsHash": "ps_3f5cde70", - "templateLockHash": "tpl_655a5396", + "templateLockHash": "tpl_60fd6802", "modelRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "runtimeFingerprint": "sha256:stable-runtime-v1:82d4fd031dfb97607d1a1919c782d4ee3fa2fec4c95a46e3778bf01625334ba3", - "graphHash": "sha256:canonical-graph-v1:2f8c16b377d988737e7e4545c63c8139211de601c31f81ad25e781a55ff2c21f", - "proofLockHash": "sha256:live-proof-lock-v1:f02e7ddfe53bec05fc9a3e6f03f9edfe75bd20442c4e266c7cab077f815a7d93", - "backendSourceFingerprint": "sha256:backend-source-v1:d87e3a14c747fafb3350a4678a7f24569a36482551153716cd8e3937618d1b73", - "backendContractFingerprint": "sha256:backend-contract-v1:fa9dfb78f1fb5beb8c86ce65046e9159b9a0118260d072c8e3c2dd6165f3db42", + "runtimeFingerprint": "sha256:stable-runtime-v1:5acd21894e0430d2571a8e032b78276c763f76c2b2481a9387aeea87fd945cba", + "graphHash": "sha256:canonical-graph-v1:713b5ab27dd7b5a599bf5a4f3fa43c8fd8ac977b5aa4ffd3b73b4f9c33156a18", + "proofLockHash": "sha256:live-proof-lock-v1:f410ed44f0c02a519dc50e65209cc2d34a65a4d0debcc68399e3ae34f29ee4e2", + "backendSourceFingerprint": "sha256:backend-source-v1:2987ca8c56730f0622cd8033c7e6ddc760bd35e0c5e50a1555ca3870a80cd141", + "backendContractFingerprint": "sha256:backend-contract-v1:1d856d855a75ec13be7d5dfdc2190b970bc1e288939ac8c9b9ab2c986a92b9f7", "modelCommit": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "modelSetHash": "sha256:model-set-v1:1cc6d211c3c1fba85273710c7b126e983e6fff648380f436ccf60c0bb0074059", + "templateRevisionHash": "sha256:template-revision-v1:e3c997dcc36ef02caf7a777f83a48b29c1a8f517e1b2b2082e68409260b37f4f", + "promptSettingsHash": "ps_3f5cde70", + "modelSetHash": "sha256:model-set-v1:a87169969451c44f6bc274a42f8f4d19c2d68e975280682b7e3e5d55c3357932", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:100b7a056ba3078664471e4e26ab241100ecd6d505696fb98c8fa339d75ffa05", "provenancePath": "/template-gallery/reviews/ltx_video_animated_story.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:0720b57d1bcec10eb47edb25f03748ccba816fbbdebee0adc9402ef26708abda", + "provenanceHash": "sha256:canonical-json:a55938aea3d87e10e9044beea12f5dd2c2d05bb695054959bd708c623efa97a1", "outputPath": "/template-gallery/ltx_video_animated_story.mp4", "thumbnailPath": "/template-gallery/ltx_video_animated_story.poster.png", - "mediaHash": "sha256:decoded-video-framemd5:35a5a1cbce9439d5d3a57d4b44a9806aa651287648c8e6a8534852f7f52240dd", + "mediaHash": "sha256:decoded-video-framemd5:22bb7ba4103679c550da340bd52b58dd607d403cc7d3ec8f390d8a91cae24889", "mediaType": "video", - "verificationTimestamp": "2026-07-24T07:30:40.578Z", + "verificationTimestamp": "2026-11-15T03:16:24.151Z", "qualityReviewPath": "/template-gallery/reviews/ltx_video_animated_story.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:ae8d77305ba9b3ca00e46dc5e33ef5fa5a8c54aa2e0bc1ec8b3e5f8275a80043", + "qualityReviewHash": "sha256:canonical-json:c5f18700e5cc20bc340f05249450bb8916797ce62aeea8fb8badbcfd0522ddc3", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex full-frame temporal, story-continuity, and card-size review", - "reviewedAt": "2026-07-24T07:36:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-15T03:16:24.151Z", + "supplementaryRecords": [ + "/template-gallery/history/ltx_video_animated_story.before-native-20261115/ltx_video_animated_story.mp4", + "/template-gallery/history/ltx_video_animated_story.before-native-20261115/ltx_video_animated_story.poster.png", + "/template-gallery/history/ltx_video_animated_story.before-native-20261115/ltx_video_animated_story.card-preview.mp4", + "/template-gallery/history/ltx_video_animated_story.before-native-20261115/reviews/ltx_video_animated_story.reviewed-provenance.json", + "/template-gallery/history/ltx_video_animated_story.before-native-20261115/reviews/ltx_video_animated_story.quality-review.json", + "/template-gallery/history/ltx_video_animated_story.before-native-20261115/entry-and-recipe.json", + "/template-gallery/recipes/ltx_video_animated_story.native-20261115.json" + ], "width": 1536, "height": 1024, "frames": 243, - "durationSeconds": 15.19, + "durationSeconds": 15.1875, "cardPreviewPath": "/template-gallery/ltx_video_animated_story.card-preview.mp4", - "cardPreviewSha256": "sha256:bytes:e73844b15d89acf4ee20fa7c9b3a374951016fabdd117f86cdf6c1b35b5c0d00" + "cardPreviewSha256": "sha256:bytes:54935c2d3e0db8f926e05f7aacc8bc025f2c1d589951533d5aa32aab1a5e6f1d" }, { "templateId": "ltx_video_image_to_video", "verificationStatus": "reviewed", "promptSettingsHash": "ps_14988ab4", - "templateLockHash": "tpl_acaea822", + "templateLockHash": "tpl_eb112978", "modelRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "runtimeFingerprint": "sha256:stable-runtime-v1:a1bb688020dc8225508ce1bdead3dcc2da0d27ce7ccfe0c83cca13e3c69ec606", - "graphHash": "sha256:canonical-graph-v1:828a14f208f79663e7bba4fba749798b7164542be1c22b0c31fb41f85a51837d", - "proofLockHash": "sha256:live-proof-lock-v1:4937c6bece04373997e9557cfb1713962d0ca188fdf6bab3ca34ce54d994ce83", - "backendSourceFingerprint": "sha256:backend-source-v1:d87e3a14c747fafb3350a4678a7f24569a36482551153716cd8e3937618d1b73", - "backendContractFingerprint": "sha256:backend-contract-v1:48f6d5be4095971a79de848c66ae8cdaa5e539a18d27d5ae8d6c22a6890ae029", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:cf49035b73e3c17338afc12c56012dd1dd898cd67fa9fb7e1f48a84497dea852", + "proofLockHash": "sha256:live-proof-lock-v1:d356bcd98ea6c4083b6c2c37fbdc1236c43bf4c625f05dd07d25fb9795456773", + "backendSourceFingerprint": "sha256:backend-source-v1:5d82dbf942b18dbbe381f4c3e77e831a511cf5f9393dd68a8e2264d75498de5c", + "backendContractFingerprint": "sha256:backend-contract-v1:8e3a70a41562869ab04f88b7a94972d5ef0503df8a9040a5a114334871956776", "modelCommit": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "modelSetHash": "sha256:model-set-v1:1cc6d211c3c1fba85273710c7b126e983e6fff648380f436ccf60c0bb0074059", - "inputArtifactsHash": "sha256:input-artifacts-v1:d421bb6c298e401592754a8f00103e6f0bdb7514e6e81e816fcad5e2cfa7d52b", - "templateRevisionHash": "sha256:template-revision-v1:742ea5d5c5f7d067a7c9579ae39b787ece7dc16338f3d548c7b516acdc7e5a14", + "templateRevisionHash": "sha256:template-revision-v1:76aaa1d405491197de8653b56164b12bd67636d944d74f22992c37fdcc09cf1f", + "modelSetHash": "sha256:model-set-v1:a87169969451c44f6bc274a42f8f4d19c2d68e975280682b7e3e5d55c3357932", + "inputArtifactsHash": "sha256:input-artifacts-v1:7b878f28b85acee55a8aea42580890b312f4ac83a53825ee5d2c05d785f92c57", "provenancePath": "/template-gallery/reviews/ltx_video_image_to_video.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:f03a8a806892412221354c10c85e4d82074b216e900055a9330f40c1dc8466be", + "provenanceHash": "sha256:canonical-json:208e73ef6d2720d5b276c48342de33ca7c536a0094e1ca8e6ad97744fb841df7", "outputPath": "/template-gallery/ltx_video_image_to_video.mp4", - "thumbnailPath": "/template-gallery/ltx_video_image_to_video.poster.png", - "beforePath": "/template-gallery/inputs/ltx_video_image_to_video.before.webp", - "beforeMediaHash": "sha256:bytes:930364ab2667e492e51b8a60664751d66f5ed3f2d580664832977e89bcfbbf26", - "afterPath": "/template-gallery/ltx_video_image_to_video.mp4", - "mediaHash": "sha256:decoded-video-framemd5:88471b8d51302bb4068e9a7770abffe75a13d721116f4601c25cd82f3efad06b", + "mediaHash": "sha256:decoded-video-framemd5:dd14c15466e693d853cfd7dbdd1ff37c24dd4f506bf21085bc6bff14ac58cb94", "mediaType": "video", - "verificationTimestamp": "2026-07-24T07:55:43.416Z", + "verificationTimestamp": "2026-11-10T00:19:14.147Z", "qualityReviewPath": "/template-gallery/reviews/ltx_video_image_to_video.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:818cffc5f846e522df7036b906edf514307a3efc2cffd7abc3549b3cc1cba470", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex exhaustive frame, source-fidelity, card-motion, and technical review", - "reviewedAt": "2026-07-24T07:54:15.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T10:00:44.504Z", "width": 1536, "height": 1024, "frames": 161, "durationSeconds": 10.06, + "thumbnailPath": "/template-gallery/ltx_video_image_to_video.poster.png", + "templateInputContractHash": "tic_f06e76cf", + "beforePath": "/template-gallery/inputs/ltx_video_image_to_video.before.webp", + "beforeMediaHash": "sha256:bytes:930364ab2667e492e51b8a60664751d66f5ed3f2d580664832977e89bcfbbf26", + "afterPath": "/template-gallery/ltx_video_image_to_video.mp4", "cardPreviewPath": "/template-gallery/ltx_video_image_to_video.card-preview.mp4", - "cardPreviewSha256": "sha256:bytes:e1065266a98cf1d2ef4679607aafaa9ba56e1f3eab98f1aa726a2ef0a3f85457", - "templateInputContractHash": "tic_f06e76cf" + "cardPreviewSha256": "sha256:bytes:2effe668f4ad43f9b4780400581d282aee66714d8450eb999787a1c29338aea0", + "qualityReviewHash": "sha256:canonical-json:ab664432e7ec498002b2effc1d02034dea53a1f0ee8bbd2e73003c9b1477c551" }, { "templateId": "ltx_video_long_showcase", "verificationStatus": "reviewed", - "promptSettingsHash": "ps_a72e271f", - "templateLockHash": "tpl_728d6899", + "templateLockHash": "tpl_16a81adb", "modelRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "runtimeFingerprint": "sha256:stable-runtime-v1:a1bb688020dc8225508ce1bdead3dcc2da0d27ce7ccfe0c83cca13e3c69ec606", - "graphHash": "sha256:canonical-graph-v1:785d51e2e769e55a04538bf11a78b19e41b313807d343b8c5dc34c27d6d480b0", - "proofLockHash": "sha256:live-proof-lock-v1:dccd1c8f863fa02ec542a24d96b7ddbc04fe5983d046d5f9a4e76033fd53328a", - "backendSourceFingerprint": "sha256:backend-source-v1:d87e3a14c747fafb3350a4678a7f24569a36482551153716cd8e3937618d1b73", - "backendContractFingerprint": "sha256:backend-contract-v1:1cc39790ca479d1b450e63e15bfda6244a8820d0a34d2df1d87571297dfde49b", + "runtimeFingerprint": "sha256:stable-runtime-v1:5acd21894e0430d2571a8e032b78276c763f76c2b2481a9387aeea87fd945cba", + "graphHash": "sha256:canonical-graph-v1:13a6850ca6a00ef8203cc4e7977df54f4f7088e7fbee59891268ddbc5203f2bb", + "proofLockHash": "sha256:live-proof-lock-v1:52e0389f29581f23604ba6199f672fc93829e4d8b7578bbb235b095348314072", + "backendSourceFingerprint": "sha256:backend-source-v1:2987ca8c56730f0622cd8033c7e6ddc760bd35e0c5e50a1555ca3870a80cd141", + "backendContractFingerprint": "sha256:backend-contract-v1:b1cc62ed77f55ce6ffc15e65dbad3c87d763d9ccebd484ab09b3816040f21b57", "modelCommit": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "modelSetHash": "sha256:model-set-v1:1cc6d211c3c1fba85273710c7b126e983e6fff648380f436ccf60c0bb0074059", - "inputArtifactsHash": "sha256:input-artifacts-v1:1c177e80859313d86513469832f9121c242b8b17ab71ec4cfe073f95fc050f3d", - "templateRevisionHash": "sha256:template-revision-v1:f5991a9181058e0d9fdaf5be4e730bee4a096f67b56091677d02687aa856bc4b", + "templateRevisionHash": "sha256:template-revision-v1:f5bd7f5a06f04b3d2929134956f21d3060e815e50251fc84f41a32ff5ca14031", + "promptSettingsHash": "ps_a72e271f", + "templateInputContractHash": "tic_d325b26a", + "modelSetHash": "sha256:model-set-v1:a87169969451c44f6bc274a42f8f4d19c2d68e975280682b7e3e5d55c3357932", + "inputArtifactsHash": "sha256:input-artifacts-v1:d5be2000925abdf77b4e7a3ffede54355e89721eb45bd5b3f08598796a67bebe", "provenancePath": "/template-gallery/reviews/ltx_video_long_showcase.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:ab1b72fb1eb2e3d1f29515be94f3930d0855825e40b1721bb0c3b60a5bf94e2b", + "provenanceHash": "sha256:canonical-json:c1e32964d62cd538bb947e36f3468350b2e92d818dbf0462305256030454675f", "outputPath": "/template-gallery/ltx_video_long_showcase.mp4", "thumbnailPath": "/template-gallery/ltx_video_long_showcase.poster.png", - "mediaHash": "sha256:decoded-video-framemd5:06e05c8a1c5844da639daa3aae323dc4c62f387f66bfbac37597165967dfbc44", + "mediaHash": "sha256:decoded-video-framemd5:f235b3d7fe5b92fbe41c7008aef73d809884b40b30400a9ba36390ba8c17001e", "mediaType": "video", - "verificationTimestamp": "2026-07-24T10:29:49.657Z", + "verificationTimestamp": "2026-11-15T03:16:24.151Z", "qualityReviewPath": "/template-gallery/reviews/ltx_video_long_showcase.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:93fe762d127e0c1e5c29d8479478d0b5553f617fd61fad9c1bce0a52965dc0c6", + "qualityReviewHash": "sha256:canonical-json:81c38d679427fd511ada6f5539c62c6c078d36643a0b89cfee9b8e1e2b690a07", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex complete-stream decode, full-timeline, boundary, card-preview, identity, motion, and technical review", - "reviewedAt": "2026-07-24T10:29:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-15T03:16:24.151Z", + "supplementaryRecords": [ + "/template-gallery/history/ltx_video_long_showcase.before-native-20261115/ltx_video_long_showcase.mp4", + "/template-gallery/history/ltx_video_long_showcase.before-native-20261115/ltx_video_long_showcase.poster.png", + "/template-gallery/history/ltx_video_long_showcase.before-native-20261115/ltx_video_long_showcase.card-preview.mp4", + "/template-gallery/history/ltx_video_long_showcase.before-native-20261115/reviews/ltx_video_long_showcase.reviewed-provenance.json", + "/template-gallery/history/ltx_video_long_showcase.before-native-20261115/reviews/ltx_video_long_showcase.quality-review.json", + "/template-gallery/history/ltx_video_long_showcase.before-native-20261115/entry-and-recipe.json", + "/template-gallery/recipes/ltx_video_long_showcase.native-20261115.json" + ], "width": 1536, "height": 1024, "frames": 486, - "durationSeconds": 30.38, + "durationSeconds": 30.375, "cardPreviewPath": "/template-gallery/ltx_video_long_showcase.card-preview.mp4", - "cardPreviewSha256": "sha256:bytes:c3868d87687b20cbe2df2187da05c0eb6ce7feeb3150b395ad29ed26b178e07d", - "templateInputContractHash": "tic_d325b26a" + "cardPreviewSha256": "sha256:bytes:0dc4052d30ff6e11c31ba7ee869d14570739462e01426b6830d9e62c8e5379c7" }, { "templateId": "ltx_video_multi_reference", "verificationStatus": "reviewed", "promptSettingsHash": "ps_0d1b8992", - "templateLockHash": "tpl_2f482422", + "templateLockHash": "tpl_0315b850", "modelRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "runtimeFingerprint": "sha256:stable-runtime-v1:a1bb688020dc8225508ce1bdead3dcc2da0d27ce7ccfe0c83cca13e3c69ec606", - "graphHash": "sha256:canonical-graph-v1:1197ff7438bf4d28243446b59a1b8aa89a7c081b88092c832520b574f047e141", - "proofLockHash": "sha256:live-proof-lock-v1:cde6f42ca844a1dbaf6b44661d4de6bacb913416a4ac3b6457444ec72c7abe17", - "backendSourceFingerprint": "sha256:backend-source-v1:d87e3a14c747fafb3350a4678a7f24569a36482551153716cd8e3937618d1b73", - "backendContractFingerprint": "sha256:backend-contract-v1:48f6d5be4095971a79de848c66ae8cdaa5e539a18d27d5ae8d6c22a6890ae029", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:89b5f9d31673888590d0c64b6522fafb4b1d0862c738e07ad0c0589df61f8ab2", + "proofLockHash": "sha256:live-proof-lock-v1:18dde8966f5a1a7993b10ca8d220ad7f333bad18a20cf44eff7ba91756311207", + "backendSourceFingerprint": "sha256:backend-source-v1:5d82dbf942b18dbbe381f4c3e77e831a511cf5f9393dd68a8e2264d75498de5c", + "backendContractFingerprint": "sha256:backend-contract-v1:8e3a70a41562869ab04f88b7a94972d5ef0503df8a9040a5a114334871956776", "modelCommit": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "modelSetHash": "sha256:model-set-v1:1cc6d211c3c1fba85273710c7b126e983e6fff648380f436ccf60c0bb0074059", - "inputArtifactsHash": "sha256:input-artifacts-v1:bb1ea1cde626dfc13864d03c9150f2cd360c80fcfd6658f13dc2094e9c4f9c17", - "templateRevisionHash": "sha256:template-revision-v1:a4cfcc261d8bc33f0a171ff9e4f0f8648d88d86ada9570bc487c76738f2dd3dd", + "templateRevisionHash": "sha256:template-revision-v1:e3b4b871d1effe98ffcc0ec6b1164cff99e888d54aa844caaa94b35cdeb4b161", + "modelSetHash": "sha256:model-set-v1:a87169969451c44f6bc274a42f8f4d19c2d68e975280682b7e3e5d55c3357932", + "inputArtifactsHash": "sha256:input-artifacts-v1:fb3324e5b7191b9dfddd3400359879918dfc441cdd8485c232d81448329a4ff2", "provenancePath": "/template-gallery/reviews/ltx_video_multi_reference.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:948c0accd75680456704899654d01cfabd669ae3c10f63442ba0dc62de806321", + "provenanceHash": "sha256:canonical-json:e3ea5b57ec24bfdaebba412ba84f6b128d72e7daf807b983bd3cff1fc741dfe0", "outputPath": "/template-gallery/ltx_video_multi_reference.mp4", - "thumbnailPath": "/template-gallery/ltx_video_multi_reference.poster.png", - "beforePath": "/template-gallery/inputs/ltx_video_multi_reference.before.webp", - "beforeMediaHash": "sha256:bytes:73123a5bb6e8c1367eced6a7fbee6b0e5500ecbabf769ba9d9c18fd10623e36e", - "afterPath": "/template-gallery/ltx_video_multi_reference.mp4", - "mediaHash": "sha256:decoded-video-framemd5:bc7ac155d4c04de916f3bda7319174320a47ea64952a473596c6975390b1fd6f", + "mediaHash": "sha256:decoded-video-framemd5:c704cb75b51c148a47b011b7db0d6daa0d1fd9cee7bd87f711573fc0c05e0875", "mediaType": "video", - "verificationTimestamp": "2026-07-24T08:37:21.856Z", + "verificationTimestamp": "2026-11-10T00:57:26.699Z", "qualityReviewPath": "/template-gallery/reviews/ltx_video_multi_reference.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:8ecf83f1a32335d9c1602b99d18cecbb8afa02a906986b6b7f913e925dc64384", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex exhaustive 81-frame two-keyframe, motion, geometry, card-size, and technical review", - "reviewedAt": "2026-07-24T08:33:32.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T10:00:44.504Z", "width": 1536, "height": 1024, "frames": 81, "durationSeconds": 5.06, + "thumbnailPath": "/template-gallery/ltx_video_multi_reference.poster.png", + "templateInputContractHash": "tic_a5d206a4", + "beforePath": "/template-gallery/inputs/ltx_video_multi_reference.before.webp", + "beforeMediaHash": "sha256:bytes:73123a5bb6e8c1367eced6a7fbee6b0e5500ecbabf769ba9d9c18fd10623e36e", + "afterPath": "/template-gallery/ltx_video_multi_reference.mp4", "cardPreviewPath": "/template-gallery/ltx_video_multi_reference.card-preview.mp4", - "cardPreviewSha256": "sha256:bytes:92ed6de4481e1b240dd74f510d6431eef70eb0c5cfcca6c420d73c6e22e5c3c9", - "templateInputContractHash": "tic_a5d206a4" + "cardPreviewSha256": "sha256:bytes:c88c7624b05258ec757e1f543b64f2b42aa94eb02333708c4e5231c902046e55", + "qualityReviewHash": "sha256:canonical-json:d415c5c1c2b24b6ab8e2ef395faef8e6f4bd27797dd3fe05ad50592ea7babaf0" }, { "templateId": "ltx_video_text_to_video", "verificationStatus": "reviewed", "promptSettingsHash": "ps_5caf17d9", - "templateLockHash": "tpl_752a18b7", + "templateLockHash": "tpl_cfd0a7df", "modelRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "runtimeFingerprint": "sha256:stable-runtime-v1:a1bb688020dc8225508ce1bdead3dcc2da0d27ce7ccfe0c83cca13e3c69ec606", - "graphHash": "sha256:canonical-graph-v1:867eca784e92de3e499141b8e2e70b54c0848d0467c85af1845ccc7ea4729b45", - "proofLockHash": "sha256:live-proof-lock-v1:f24ddf7276aee4240bc92457aeb6dc3e168cad5be1b87aa90bb454e6242e648b", - "backendSourceFingerprint": "sha256:backend-source-v1:d87e3a14c747fafb3350a4678a7f24569a36482551153716cd8e3937618d1b73", - "backendContractFingerprint": "sha256:backend-contract-v1:9dff53fa212ab8d334e33235639d9df0ce94a0254a2f63656ed16b3806f8575c", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:fd2afce16c5a5a05866a6f37104ae936e2629af13e3e7e377079858a91d5b4ea", + "proofLockHash": "sha256:live-proof-lock-v1:2078a71bd3a4d13484a7c31c491dfce5243cf608e9fc590bbf897f6b3c39e25b", + "backendSourceFingerprint": "sha256:backend-source-v1:5d82dbf942b18dbbe381f4c3e77e831a511cf5f9393dd68a8e2264d75498de5c", + "backendContractFingerprint": "sha256:backend-contract-v1:a57e4a2eec4108b085b14cd1cd0a8de2db5e823323b41f1fb9b32d32b0e40c18", "modelCommit": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "modelSetHash": "sha256:model-set-v1:1cc6d211c3c1fba85273710c7b126e983e6fff648380f436ccf60c0bb0074059", + "templateRevisionHash": "sha256:template-revision-v1:2e2f1cb3edd258dd3a18e3ee7a00f55d3858cec200c79889270a4befbc8d9cd1", + "modelSetHash": "sha256:model-set-v1:a87169969451c44f6bc274a42f8f4d19c2d68e975280682b7e3e5d55c3357932", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:a746d0767db65eb62bef85f10cf475d65e4370df1220d4bd448f289b94c23ddb", "provenancePath": "/template-gallery/reviews/ltx_video_text_to_video.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:66578659dc12cbaa900eb300025fc2b0ad4746108354a18bf38b407d6f6755be", + "provenanceHash": "sha256:canonical-json:09c71b8521b6137b96016a438e1b38023c7bbaad37c260a4495a4b764fb8cce3", "outputPath": "/template-gallery/ltx_video_text_to_video.mp4", - "thumbnailPath": "/template-gallery/ltx_video_text_to_video.poster.png", - "mediaHash": "sha256:decoded-video-framemd5:2862d03f9fc1e1fb6c2f250944fe51cef652e93e5ed6e0debe4b3af0c5c3ff21", + "mediaHash": "sha256:decoded-video-framemd5:39b558bb79286904c4165fcef45706461a5fffc35758bd748a8696c10678b806", "mediaType": "video", - "verificationTimestamp": "2026-07-24T11:41:49.322Z", + "verificationTimestamp": "2026-11-09T23:52:52.160Z", "qualityReviewPath": "/template-gallery/reviews/ltx_video_text_to_video.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:82f9965caf014fdce7c4e2e0a545ef2d0889f50ea1143c30ec230ec7b9a433e2", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex full-frame temporal, realism, and card-motion review", - "reviewedAt": "2026-07-24T11:39:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T10:00:44.504Z", "width": 1536, "height": 1024, "frames": 121, "durationSeconds": 5.04, + "thumbnailPath": "/template-gallery/ltx_video_text_to_video.poster.png", "cardPreviewPath": "/template-gallery/ltx_video_text_to_video.card-preview.mp4", - "cardPreviewSha256": "sha256:bytes:89be8cfd064fd3c81ab2310ed05d7d8660a875f78c132a7b8d01100d547a5ea7" + "cardPreviewSha256": "sha256:bytes:9b8defe3284dcc8bdb9e83485c93c73b65e8c5ade41afe5a383235b04d81b265", + "qualityReviewHash": "sha256:canonical-json:041b7fe33e7e06f28948b46f8872712f79f699daed932a38db2df608e0bb14f6" }, { "templateId": "ltx_video_video_to_video", "verificationStatus": "reviewed", - "promptSettingsHash": "ps_05475d58", - "templateLockHash": "tpl_c6afa640", + "templateLockHash": "tpl_caa4d69d", "modelRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "runtimeFingerprint": "sha256:stable-runtime-v1:a1bb688020dc8225508ce1bdead3dcc2da0d27ce7ccfe0c83cca13e3c69ec606", - "graphHash": "sha256:canonical-graph-v1:9f6a2cbe9ce87fb5e206a34565d03e4d3ee21c895667cd3b4e7b4898fde9bbe2", - "proofLockHash": "sha256:live-proof-lock-v1:94fb109ac66c7eed3dadf4f7ff5f69ba3a312c09d26458b756eee467c432e90c", - "backendSourceFingerprint": "sha256:backend-source-v1:d87e3a14c747fafb3350a4678a7f24569a36482551153716cd8e3937618d1b73", - "backendContractFingerprint": "sha256:backend-contract-v1:75eb096b2c035d7b265389f07f32d7c27af2b5ca8e5bf2737c2bb0ff03861008", + "runtimeFingerprint": "sha256:stable-runtime-v1:f7dfb201f8fce05c6fbc7d0bc9541f6d61eb5a7a8ff08bdca719a4d5648ea19a", + "graphHash": "sha256:canonical-graph-v1:525b6e7a9527fb15116da437dacb4785b9e10c216bd28a0749839f0a4989dba8", + "proofLockHash": "sha256:live-proof-lock-v1:b47b3ad2b0d2946fea86adc0507bbc983ceb4da4179da2a01adf157fce4941fb", + "backendSourceFingerprint": "sha256:backend-source-v1:498e4d94080c93f91614558aa7baee66d61ec8993b2153396bc2401660b855cb", + "backendContractFingerprint": "sha256:backend-contract-v1:8e1e75341f952f25599c8216f5c9253edf01c50b0a7285e09d77befa13475bb7", "modelCommit": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd | nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", - "modelSetHash": "sha256:model-set-v1:1cc6d211c3c1fba85273710c7b126e983e6fff648380f436ccf60c0bb0074059", - "inputArtifactsHash": "sha256:input-artifacts-v1:77614f935e4354a13f78a4156ba7112224fa65a36e67651f108ea117828b5a4b", - "templateRevisionHash": "sha256:template-revision-v1:26b2e6d071cd611a04522e6d328cb38a8da8f6eaf46ec09d92672cfdf8620bd1", + "templateRevisionHash": "sha256:template-revision-v1:1fda0016083b0f93e2fc9e71f2813274446aa811459b95ebc1583a2457a57968", + "promptSettingsHash": "ps_b5c924c9", + "templateInputContractHash": "tic_d9bfec8b", + "modelSetHash": "sha256:model-set-v1:a87169969451c44f6bc274a42f8f4d19c2d68e975280682b7e3e5d55c3357932", + "inputArtifactsHash": "sha256:input-artifacts-v1:fa925449f40268187a192ad9bf20cd5ca8b36add4fe5096b83cf7226f2ba00a6", "provenancePath": "/template-gallery/reviews/ltx_video_video_to_video.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:0a02f26880885892a9d90b0632cbccb9fc6104847335500307a768b2b4a7e992", + "provenanceHash": "sha256:canonical-json:0b43a319c4113a65bba62beaa4df10a1765c179a73340ab262065146a5f71d40", "outputPath": "/template-gallery/ltx_video_video_to_video.mp4", "thumbnailPath": "/template-gallery/ltx_video_video_to_video.poster.png", - "beforePath": "/template-gallery/inputs/ltx_video_video_to_video.before.mp4", - "beforeMediaHash": "sha256:bytes:496fde9e4410d1b1b0ea659fbf0b29d486537d56eefa43f61052a5c6d1808de8", - "beforeSourceMediaHash": "sha256:bytes:233d1b3a123fceb4f3b68d2d3a9f5b4129627073b8235fe7248ae6ebdeecb554", - "afterPath": "/template-gallery/ltx_video_video_to_video.mp4", - "mediaHash": "sha256:decoded-video-framemd5:cdf327e2cbfe0b70b27c08c63345f4944685018ba7ecca0aaeec9cbc8e0b46c0", + "mediaHash": "sha256:decoded-video-framemd5:c16fa26c251a6e0a6718e13854ea28aed8c4a3e704918517592c14c1244005fb", "mediaType": "video", - "verificationTimestamp": "2026-07-24T08:37:21.083Z", + "verificationTimestamp": "2026-11-13T17:44:33.633Z", "qualityReviewPath": "/template-gallery/reviews/ltx_video_video_to_video.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:e8eb2365544f4d2cc8a025a5340be1904195a397a1fc87c2b5cca850d58ddb26", + "qualityReviewHash": "sha256:canonical-json:22d41e38087f10fe4d4a5e39f8207641fbb353e6803e0d22a5d9c86f679ab0c7", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex exhaustive 81-frame source-comparison, motion, card-size, and technical review", - "reviewedAt": "2026-07-24T08:33:32.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-13T17:44:33.633Z", + "supplementaryRecords": [ + "/template-gallery/history/ltx_video_video_to_video.v1/ltx_video_video_to_video.mp4", + "/template-gallery/history/ltx_video_video_to_video.v1/ltx_video_video_to_video.poster.png", + "/template-gallery/history/ltx_video_video_to_video.v1/ltx_video_video_to_video.before.mp4", + "/template-gallery/history/ltx_video_video_to_video.v1/ltx_video_video_to_video.card-preview.mp4", + "/template-gallery/history/ltx_video_video_to_video.v1/ltx_video_video_to_video.reviewed-provenance.json", + "/template-gallery/history/ltx_video_video_to_video.v1/ltx_video_video_to_video.quality-review.json", + "/template-gallery/recipes/ltx_video_video_to_video.v1.json", + "/template-gallery/recipes/ltx_video_video_to_video.v2.json" + ], "width": 1536, "height": 1024, - "frames": 81, - "durationSeconds": 5.06, + "frames": 25, + "durationSeconds": 3.5714285714285716, "cardPreviewPath": "/template-gallery/ltx_video_video_to_video.card-preview.mp4", - "cardPreviewSha256": "sha256:bytes:2b50fa4dbb61316914b39c6ac0990e2f8b069186f7f4012ea5b5342b000b6ce3", - "templateInputContractHash": "tic_d9bfec8b" + "cardPreviewSha256": "sha256:bytes:f414aaca530e5c7cf7792647a2a0c0efce2792de518e776f9efc3632f0d99306", + "beforePath": "/template-gallery/inputs/ltx_video_video_to_video.before.mp4", + "beforeMediaHash": "sha256:bytes:496fde9e4410d1b1b0ea659fbf0b29d486537d56eefa43f61052a5c6d1808de8", + "beforeSourceMediaHash": "sha256:bytes:233d1b3a123fceb4f3b68d2d3a9f5b4129627073b8235fe7248ae6ebdeecb554", + "afterPath": "/template-gallery/ltx_video_video_to_video.mp4" + }, + { + "templateId": "minimax_music3_chamber_pop", + "verificationStatus": "reviewed", + "templateLockHash": "tpl_1c64d9f9", + "modelRevision": "MiniMaxAI/MiniMax-Music3@fbdf52fbaaca799592917417eb05f1899f1255ec", + "runtimeFingerprint": "sha256:stable-runtime-v1:f7dfb201f8fce05c6fbc7d0bc9541f6d61eb5a7a8ff08bdca719a4d5648ea19a", + "graphHash": "sha256:canonical-graph-v1:377fdbac05b02252ff4e7e18becb4c3eaef66f539df8e8a7f2c7a441f43e2451", + "proofLockHash": "sha256:live-proof-lock-v1:bda79939528bd848bb97156e7cc3d67c6b372761b870d2fb9acce851638ef9e2", + "backendSourceFingerprint": "sha256:backend-source-v1:c58c00ef5acb623fad10211d025530eb31aebc1033d3ef6237b580ca675b257e", + "backendContractFingerprint": "sha256:backend-contract-v1:8481383d6d51ce5cd870722656bfd5f1d005973f636b3452683e9b24fb89d104", + "modelCommit": "fbdf52fbaaca799592917417eb05f1899f1255ec", + "templateRevisionHash": "sha256:template-revision-v1:5720132bd53f3a75b5969f76e0fa0e609701bd166a2975929b7992d7d7e0525a", + "promptSettingsHash": "ps_f64129e9", + "modelSetHash": "sha256:model-set-v1:f202362bfb804f34a2fa64aa6c901d26e713196c782033eae8c8ab784416fc59", + "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "provenancePath": "/template-gallery/reviews/minimax_music3_chamber_pop.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:d6bd89ceacb6f9cdd1d00c53083a134284df0a4cd6e29abd8b42ada03ad5d0cd", + "outputPath": "/template-gallery/minimax_music3_chamber_pop.wav", + "thumbnailPath": "/template-gallery/minimax_music3_chamber_pop.wav", + "mediaHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:45bf2daf0fe55ed3b382d3ae1a8773a9123098b23b1e0e64ef3d03fd4d6c17d1", + "mediaType": "audio", + "verificationTimestamp": "2026-11-13T17:44:33.633Z", + "qualityReviewPath": "/template-gallery/reviews/minimax_music3_chamber_pop.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:018ef1ff30300f432861a744cdd06e712515dec5f1ac8772ba144749fc9d3891", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-13T17:44:33.633Z", + "supplementaryRecords": [ + "/template-gallery/recipes/minimax_music3_chamber_pop.v2.json" + ], + "durationSeconds": 60.07004166666667, + "sampleRate": 44100 }, { "templateId": "qwen_character_angles", "verificationStatus": "reviewed", "promptSettingsHash": "ps_4a78ee74", - "templateLockHash": "tpl_2306005f", + "templateLockHash": "tpl_26c0bc0d", "modelRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:3afde13cbf690da269c37bf194cfc7eea3b99df92a96dbdd61d24880089ae5dc", - "proofLockHash": "sha256:live-proof-lock-v1:b934410e2ba2e315772886728f3f530f006f8643480ef84076f16a23acabfb04", - "backendSourceFingerprint": "sha256:backend-source-v1:faa0861373c8c9d5e0bfd4a8e8632fb583c5161183d3bae36d5a2afaaa2479a0", - "backendContractFingerprint": "sha256:backend-contract-v1:e5dcbeccb4b5c03ab988fbc1812ad8de3de74bcebcf415f50af5899ce05eb859", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:6412d5a22a5142cf38d12e22ddaa4c61ef32a62cd319d41c66b3b6a99c9ccf94", + "proofLockHash": "sha256:live-proof-lock-v1:1245e231b2d8f846068e23598e1d8598f3c1701742569bb70b631a5e684330a7", + "backendSourceFingerprint": "sha256:backend-source-v1:f2abf44f5ca8acadbff85dbe3a906c84454d653c1663e3cdd742180a0b1ad8c8", + "backendContractFingerprint": "sha256:backend-contract-v1:3386c14ee79c5080e1c1c587d314776f9c800e4e1f52864fd5484dbe9a5ad12c", "modelCommit": "ac7f9318f633fc4b5778c59367c8128225f1e3de", - "modelSetHash": "sha256:model-set-v1:ee364f4fabd582f32eba45df4a9985f0475f5818248cbeacefbaa947525a9905", - "inputArtifactsHash": "sha256:input-artifacts-v1:9df84d62e71bb4a1a28d3355a112c3229fc95ddaf21e9098c593563bffcb6e8a", - "templateRevisionHash": "sha256:template-revision-v1:c165f2081b91de26795a2a1f043c842cd96b35a863375e31ba0a8907ac1ae30f", + "templateRevisionHash": "sha256:template-revision-v1:ca4331f6124979bda0431c4de48b803afae76e179c1952b8345f296614e2bd5b", + "modelSetHash": "sha256:model-set-v1:cd66b00328613364e435d714899942201a2f270afee675312d82931af3a88b6a", + "inputArtifactsHash": "sha256:input-artifacts-v1:c737b5aefb722b4fde9756b4ec56bf5ebd91e259d56e7983c98c8ef4666c56c3", "provenancePath": "/template-gallery/reviews/qwen_character_angles.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:73305e49bf85df5d3a40b9f65f8827ee20e28ee52f24d76178c2d3475d9da08a", + "provenanceHash": "sha256:canonical-json:47f1486bbe2b2c9681dccb82d03bdd4ab1654623659c655bd33af18736288b1d", "outputPath": "/template-gallery/qwen_character_angles.webp", "thumbnailPath": "/template-gallery/qwen_character_angles.webp", - "beforePath": "/template-gallery/inputs/qwen_character_angles.before.webp", - "beforeMediaHash": "sha256:bytes:4b1b8d9e351abd437f2ffff90cc6a958160a87863ba4d8e85a0aa80a37e7a10e", - "afterPath": "/template-gallery/qwen_character_angles.webp", - "mediaHash": "sha256:decoded-rgba:53b25fff8003ee4d5f8c892df44ba051746819561b29a7d3d2fec0fe268b5cc5", + "mediaHash": "sha256:decoded-rgba:894f3af44019e35fbb623e037e66d1926b558f0f2092ec1daa4a558447505ec7", "mediaType": "image", - "verificationTimestamp": "2026-07-14T01:07:34.205Z", + "verificationTimestamp": "2026-11-09T21:39:25.958Z", "qualityReviewPath": "/template-gallery/reviews/qwen_character_angles.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:e218b4de71806c6d405637cf41fc3c534a2107d4afd228975c68532f1e902c89", + "qualityReviewHash": "sha256:canonical-json:e1c78b9954e8eded81e88fbb6956a1f0203143f04cce90255428fbc1d831fda6", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T01:06:30.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-09T21:39:25.958Z", "width": 1024, "height": 1024, - "templateInputContractHash": "tic_251425a7" + "templateInputContractHash": "tic_251425a7", + "beforePath": "/template-gallery/inputs/qwen_character_angles.before.webp", + "beforeMediaHash": "sha256:bytes:4b1b8d9e351abd437f2ffff90cc6a958160a87863ba4d8e85a0aa80a37e7a10e", + "afterPath": "/template-gallery/qwen_character_angles.webp" }, { "templateId": "qwen_control_image_layout", - "verificationStatus": "exact", + "verificationStatus": "reviewed", "promptSettingsHash": "ps_49bd9072", - "templateLockHash": "tpl_d10d4214", + "templateLockHash": "tpl_153f3a61", "modelRevision": "InstantX/Qwen-Image-ControlNet-Union@b13036f066d6dee7c20513e263d3d673055e9de8 | Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:a4248a582d7d36075ab2834ca3dd89894ad2e01d3218738f32b4c42b17d68368", - "proofLockHash": "sha256:live-proof-lock-v1:e8d64e0b90f6d6f7caf63c0be32890bb8f59573911fdfa6fcf28e2ddb6713c9a", - "backendSourceFingerprint": "sha256:backend-source-v1:f6b028c6d3d0ff542df863f8c782d1550ac3c12e94767f6eb8cd3f2719d3cdfd", - "backendContractFingerprint": "sha256:backend-contract-v1:d33ca3724d3669316090613df149915fa7004cc2ddbf9faaf802c81419c543f9", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:342fb38234da705c8bed83729bbf2fb514bbad4ccbffb3cac3572542e655e8d9", + "proofLockHash": "sha256:live-proof-lock-v1:826675717099cd5c0b7800dd30b6a3ce9caebdccc8dfb5a2fc7c13d37b337ed3", + "backendSourceFingerprint": "sha256:backend-source-v1:5d82dbf942b18dbbe381f4c3e77e831a511cf5f9393dd68a8e2264d75498de5c", + "backendContractFingerprint": "sha256:backend-contract-v1:b52f299bd8ad8d610c459eb01f998c0d7703762ce0026abbfa85d832d9368e0c", "modelCommit": "InstantX/Qwen-Image-ControlNet-Union@b13036f066d6dee7c20513e263d3d673055e9de8 | Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", - "modelSetHash": "sha256:model-set-v1:a2596ae76db6f898859b4ce528536d433b3df39db60f25055263a05fcec4f0a7", - "inputArtifactsHash": "sha256:input-artifacts-v1:c158615a82110b81e0471165b3030519077554585e4116c8548ae31469844c8c", - "templateRevisionHash": "sha256:template-revision-v1:0414a4ac2b5476358e9bce54283d733d284d5ee24abce424d36fb4c64ad396e8", - "provenancePath": "/template-gallery/reviews/qwen_control_image_layout.duplicate-provenance.json", - "provenanceHash": "sha256:canonical-json:4c3a9239b5df7e26bf4ab2ebfe94edded9688d24c558b8783ac5067fae6ae612", + "templateRevisionHash": "sha256:template-revision-v1:2872440128319823b2b4871c27840912cbcab33b6d01d915c16b9e477c42934a", + "modelSetHash": "sha256:model-set-v1:3996c048b789998a6e2de74f02e8e24b9b0bca936b6bb942878b6844fa4c8c3d", + "inputArtifactsHash": "sha256:input-artifacts-v1:b322d011f05e7c002ab5cebc52f252640c1a720785597713bb6e397b4e8e2beb", + "provenancePath": "/template-gallery/reviews/qwen_control_image_layout.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:b53df57a93955fd1e22e506508e64a9a8c8f996b195bb577fd10a17c7ef22b4b", "outputPath": "/template-gallery/qwen_control_image_layout.webp", - "thumbnailPath": "/template-gallery/qwen_control_image_layout.webp", - "beforePath": "/template-gallery/inputs/qwen_control_image_layout.before.png", - "beforeMediaHash": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", - "afterPath": "/template-gallery/qwen_control_image_layout.webp", - "mediaHash": "sha256:decoded-rgba:e13cb8ba796cc7891b4292515fa7df551288bfa3cbc7939e8cc9301d08b2a7c9", + "mediaHash": "sha256:decoded-rgba:04593a47356225b82dcd270041696d97e803392c981824c9565b3090935dec3a", "mediaType": "image", - "verificationTimestamp": "2026-07-14T10:50:16.868Z", + "verificationTimestamp": "2026-11-09T23:08:26.122Z", "qualityReviewPath": "/template-gallery/reviews/qwen_control_image_layout.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:b3293ea2178be09d0e7b67808ff44a2906cf6a0905f53df7270790421e8eb577", - "qualityReviewStatus": "approved_exact", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T10:50:00.000Z", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T10:00:44.504Z", "width": 768, "height": 768, - "templateInputContractHash": "tic_53179040" + "thumbnailPath": "/template-gallery/qwen_control_image_layout.webp", + "templateInputContractHash": "tic_53179040", + "beforePath": "/template-gallery/inputs/qwen_control_image_layout.before.png", + "beforeMediaHash": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", + "afterPath": "/template-gallery/qwen_control_image_layout.webp", + "qualityReviewHash": "sha256:canonical-json:9ae1b3b71b3667ad6fb5f1ce60e017e8e99f1defb9526beb7e59a6b299335dfa" }, { "templateId": "qwen_edit_plus_single_image", - "verificationStatus": "exact", + "verificationStatus": "reviewed", "promptSettingsHash": "ps_ba0b9011", - "templateLockHash": "tpl_d5649925", + "templateLockHash": "tpl_072979da", "modelRevision": "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "runtimeFingerprint": "sha256:stable-runtime-v1:69176a2c48aa17b7e8d1a22ddb5e28515054580a405f9370f75695c79ce43426", - "graphHash": "sha256:canonical-graph-v1:3a39a5b0632cb6859d87b456aa9575c5c0a7837856a255b3b7850f010a0e50c5", - "proofLockHash": "sha256:live-proof-lock-v1:f405133d32d556c8bafbd08975c46f25230ed27fcfa6e9d737a37ac132ab2414", - "backendSourceFingerprint": "sha256:backend-source-v1:6f42a2f530647db914919dd0c601a9ef5034440edb1d51cc6ef73f28017516af", - "backendContractFingerprint": "sha256:backend-contract-v1:e5dcbeccb4b5c03ab988fbc1812ad8de3de74bcebcf415f50af5899ce05eb859", + "runtimeFingerprint": "sha256:stable-runtime-v1:8a1af41246367db74e7fff88b61d57dac198d0f9b66a85dac42496e9e4868a0d", + "graphHash": "sha256:canonical-graph-v1:3d0ed7be05bfd8101393d23277bae1a60f362c51a44cebd4478d7370f3161964", + "proofLockHash": "sha256:live-proof-lock-v1:fa232ff4dfc2a20c37ad6db1ceba1374a59deaa0a8df13749c0a8090a142412b", + "backendSourceFingerprint": "sha256:backend-source-v1:4a8cafd35ad10dc97155574bef45e0234ff366818654ac0fa5b7e1c2c301f72c", + "backendContractFingerprint": "sha256:backend-contract-v1:4821b0f718de35e327ba8cefe3a9ec16f49f74a90ee23c8e05b05dfb0b5712ea", "modelCommit": "6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "modelSetHash": "sha256:model-set-v1:130038bbf9d12bd392c9bc216fd3141c35c1e0218d73766db17a7997fc7cee5d", - "inputArtifactsHash": "sha256:input-artifacts-v1:710080518e14e00aec9400ac997070af63693a026cdc123c50a7e1d0015e570d", - "templateRevisionHash": "sha256:template-revision-v1:d005d61aaa4ff88b057e04cc7c9c9de673455099f69f4c7d6f6d1374d2ee2e5d", - "provenancePath": "/template-gallery/reviews/qwen_edit_plus_single_image.duplicate-provenance.json", - "provenanceHash": "sha256:canonical-json:a6444775b28904b598589a33d2d5fab6e72fec93b0c6c324826f1de98b7b6104", + "templateRevisionHash": "sha256:template-revision-v1:e4cddc87c0116b0c0987b2b9183f8dc64e5ca30bfe44a3e3a2efdc45e165e566", + "modelSetHash": "sha256:model-set-v1:dae1c5f0984aae3da034b7e05175bdc10f2733ba5ee95b6ac5f93c924b348e2a", + "inputArtifactsHash": "sha256:input-artifacts-v1:a47a6dbf767224f8ba2a4d40dffb9a33ed25d3fc20480cac5d3a4c45e7a2af33", + "provenancePath": "/template-gallery/reviews/qwen_edit_plus_single_image.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:ee5428d09249653336c81709ee76f3cea5e1515683a105bba09c3cf4883a5d9b", "outputPath": "/template-gallery/qwen_edit_plus_single_image.webp", - "thumbnailPath": "/template-gallery/qwen_edit_plus_single_image.webp", - "beforePath": "/template-gallery/inputs/qwen_edit_plus_single_image.before.webp", - "beforeMediaHash": "sha256:bytes:e90e99e27cdd9b6ab7478a05199df2fdf7dce650d700ef2ceb55da7fb206b715", - "afterPath": "/template-gallery/qwen_edit_plus_single_image.webp", - "mediaHash": "sha256:decoded-rgba:4ceb80d575c331c7e17e40366808b5af1ab63ed0162eb61b2c260e075d5c4dde", + "mediaHash": "sha256:decoded-rgba:b0ad7b63ca27523f91952e5535e5df632eb9be1815faab6810a685e9be682d29", "mediaType": "image", - "verificationTimestamp": "2026-07-13T16:43:39.244Z", + "verificationTimestamp": "2026-10-07T10:28:38.489Z", "qualityReviewPath": "/template-gallery/reviews/qwen_edit_plus_single_image.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:45274522ebb3dd3d0cdd6f144ae7ce1015d90413a03fdb9c6ee14ac2cbf8d62d", - "qualityReviewStatus": "approved_exact", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-13T16:45:00.000Z", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T17:00:35.452Z", "width": 1024, "height": 1024, - "templateInputContractHash": "tic_3f66b6fa" + "thumbnailPath": "/template-gallery/qwen_edit_plus_single_image.webp", + "templateInputContractHash": "tic_3f66b6fa", + "beforePath": "/template-gallery/inputs/qwen_edit_plus_single_image.before.webp", + "beforeMediaHash": "sha256:bytes:e90e99e27cdd9b6ab7478a05199df2fdf7dce650d700ef2ceb55da7fb206b715", + "afterPath": "/template-gallery/qwen_edit_plus_single_image.webp", + "qualityReviewHash": "sha256:canonical-json:322979e0a53764044127db19d6983c018204e5dafdcdeda515b14ac3a64f01ef" }, { "templateId": "qwen_edit_strength_sweep", "verificationStatus": "reviewed", "promptSettingsHash": "ps_b3201523", - "templateLockHash": "tpl_d772e2b9", + "templateLockHash": "tpl_014805f3", "modelRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", - "runtimeFingerprint": "sha256:stable-runtime-v1:f151c87411b429ff3b4045806837ad9f4c11f805c7a97edc3111495c97c077e7", - "graphHash": "sha256:canonical-graph-v1:c6b58856c96e7c6baff52ac56a5a306f0c330919677bc3d6de74b3db26499506", - "proofLockHash": "sha256:live-proof-lock-v1:09c4367003c166e35623842f9b93e66c266b751899ebca244dd2a579bfbd14a4", - "backendSourceFingerprint": "sha256:backend-source-v1:5d5ccd159947d077cf24b84d3e76714d34713954ca51c059d794f7153e0b9a2d", - "backendContractFingerprint": "sha256:backend-contract-v1:d09e2111ea8c748c0072542ba479d46985d80e075a40afd543a20d101f70e0ac", + "runtimeFingerprint": "sha256:stable-runtime-v1:8a1af41246367db74e7fff88b61d57dac198d0f9b66a85dac42496e9e4868a0d", + "graphHash": "sha256:canonical-graph-v1:435c71df4640c91e918dde8ad836a951c9cc5b7c94031fdee10dd9b1638dcd06", + "proofLockHash": "sha256:live-proof-lock-v1:e009a26c781244820624abf9cc3ff78d81c2f5a06ea4345e394e1377a6f18845", + "backendSourceFingerprint": "sha256:backend-source-v1:4a8cafd35ad10dc97155574bef45e0234ff366818654ac0fa5b7e1c2c301f72c", + "backendContractFingerprint": "sha256:backend-contract-v1:9dcafe8d598f883e0f3ff7c5c179c9c4c428c72ee99badfbb7eb87226c8c3b34", "modelCommit": "ac7f9318f633fc4b5778c59367c8128225f1e3de", - "modelSetHash": "sha256:model-set-v1:595c2a9474849d814c8134476a10122cf35202457e792cc6278aa44f51c22d0b", - "inputArtifactsHash": "sha256:input-artifacts-v1:d525d43d2089736a78bd4f0716e01b4e3b0b9ce82b981c723c95ddb367dc34e4", - "templateRevisionHash": "sha256:template-revision-v1:05a85bb031ec769745050334af2d5d4462c649acfe50bcc7fd0de05d4a5be2bf", + "templateRevisionHash": "sha256:template-revision-v1:d3dfcd9144ed36ad611377fa4304713b51b861a7595061a2429bfb1dc734a16c", + "modelSetHash": "sha256:model-set-v1:cd66b00328613364e435d714899942201a2f270afee675312d82931af3a88b6a", + "inputArtifactsHash": "sha256:input-artifacts-v1:c6dddd717ac368d3d3192bbf0e93b97b41ff04891d71a388e3a0e8cc761261fc", "provenancePath": "/template-gallery/reviews/qwen_edit_strength_sweep.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:ead6a4d289747e5505d052bf55d0260ab0d54838e667bf887e207c7ddebbf999", + "provenanceHash": "sha256:canonical-json:9d93a08745b8c334e2cfc15ff3309996b098e4aeba74f2bd4859ad54d4c683b4", "outputPath": "/template-gallery/qwen_edit_strength_sweep.webp", - "thumbnailPath": "/template-gallery/qwen_edit_strength_sweep.webp", - "beforePath": "/template-gallery/inputs/qwen_edit_strength_sweep.before.webp", - "beforeMediaHash": "sha256:bytes:a6d165bd87e2c57ab8cf71fa15de9d8724fccf5782c16c34c25dc77934751676", - "afterPath": "/template-gallery/qwen_edit_strength_sweep.webp", - "mediaHash": "sha256:decoded-rgba:d89e36b4b1a4536f3d5e6de378f3c8544f66d8fd7d85de4d00461009d6fa5029", + "mediaHash": "sha256:decoded-rgba:46f771588b8cdaa1c4e5ddbc4faffe9a90b3493e411fdf59913d49b36faa9225", "mediaType": "image", - "verificationTimestamp": "2026-07-11T13:02:58.000Z", + "verificationTimestamp": "2026-10-07T10:09:00.549Z", "qualityReviewPath": "/template-gallery/reviews/qwen_edit_strength_sweep.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:39036fe3ab624505a563213d0ac9aac6b60df43296799d6ac39db9c10d2e7d75", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-11T13:02:09.6146330Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T17:00:35.452Z", "width": 1024, "height": 1024, - "templateInputContractHash": "tic_159891fd" + "thumbnailPath": "/template-gallery/qwen_edit_strength_sweep.webp", + "templateInputContractHash": "tic_159891fd", + "beforePath": "/template-gallery/inputs/qwen_edit_strength_sweep.before.webp", + "beforeMediaHash": "sha256:bytes:a6d165bd87e2c57ab8cf71fa15de9d8724fccf5782c16c34c25dc77934751676", + "afterPath": "/template-gallery/qwen_edit_strength_sweep.webp", + "qualityReviewHash": "sha256:canonical-json:e8b5c6871bacb08f8c3d2ad3da9182c5457714725c169fadbeebb32393b7f877" }, { "templateId": "qwen_inpaint_mask_draft", "verificationStatus": "reviewed", "promptSettingsHash": "ps_fcdf3931", - "templateLockHash": "tpl_c6b6307c", + "templateLockHash": "tpl_4cc1b92e", "modelRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:dd8a7353cb8a0e0944272e6e9db52aa98ec5da1ea6f7e65719e6abd0a9cbdb26", - "proofLockHash": "sha256:live-proof-lock-v1:312b93d9bdabcf3f17edc90d96409e2d64905567daf025cf02c1384c4e5e8266", - "backendSourceFingerprint": "sha256:backend-source-v1:eb832afc73df59d566bff4990d7f31420fadfe580857a01773d840e291c7ffb3", - "backendContractFingerprint": "sha256:backend-contract-v1:8e9d37213cbe211fd1425392866b7c503355e14438bf67419fecf52ef726a1a4", + "runtimeFingerprint": "sha256:stable-runtime-v1:400b9b2a748fb265ee1d64e592ce59e6629d7a1db69e67f5bec19a0719f689d6", + "graphHash": "sha256:canonical-graph-v1:3f7d27f6ba8e368f09210658045e590fae575dc863d808f046eb6d176ad67df3", + "proofLockHash": "sha256:live-proof-lock-v1:cac15fe4cc010585aa3fd40fe50656624fe4dc1b7a3f2f39b726b5b360e982df", + "backendSourceFingerprint": "sha256:backend-source-v1:b42ecb2bb1d7136527433bba088254bc0da42f94dce702d6849a72bfb3c8a730", + "backendContractFingerprint": "sha256:backend-contract-v1:3b9168d219ba137c103026de13f0f324e5b49babdbc879cfdfc2b9b2b406aaae", "modelCommit": "ac7f9318f633fc4b5778c59367c8128225f1e3de", - "modelSetHash": "sha256:model-set-v1:ee364f4fabd582f32eba45df4a9985f0475f5818248cbeacefbaa947525a9905", - "inputArtifactsHash": "sha256:input-artifacts-v1:d009369d740d2ce39743d3f6b4a50ef5ea755e0e0bff232246daa0151c97a69b", - "templateRevisionHash": "sha256:template-revision-v1:55f7272472f6e0f402ad49ccd4ec075462206af15da948b6c035c17248c6b8fb", + "templateRevisionHash": "sha256:template-revision-v1:b29940f351dacc6818e2faa32f4c23ad8c97f8db406b585e0350d56cfbd9b1d4", + "modelSetHash": "sha256:model-set-v1:cd66b00328613364e435d714899942201a2f270afee675312d82931af3a88b6a", + "inputArtifactsHash": "sha256:input-artifacts-v1:94b168be850ef68cec3e2ffb21e11df59e0551b4a72ef31e465f5f76e976d024", "provenancePath": "/template-gallery/reviews/qwen_inpaint_mask_draft.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:f9025dc87bb895a3856683acfeb61f1caa5d0ed46e2dd00e2e697f1c6efcc339", + "provenanceHash": "sha256:canonical-json:a76c9eedbb981bc6a89c93d41710962652e622d74671d6c956595800c75ec235", "outputPath": "/template-gallery/qwen_inpaint_mask_draft.webp", - "thumbnailPath": "/template-gallery/qwen_inpaint_mask_draft.webp", - "beforePath": "/template-gallery/inputs/qwen_inpaint_mask_draft.before.webp", - "beforeMediaHash": "sha256:bytes:a2f8ac6f5937d6e618b48ce9947153b8233ff7a82dcf67f28766d20b9917d730", - "afterPath": "/template-gallery/qwen_inpaint_mask_draft.webp", - "mediaHash": "sha256:decoded-rgba:9ea78395bd081424245015854b7d7f3f0bb26b843dc60cae0ab3de5d77fae180", + "mediaHash": "sha256:decoded-rgba:b9be5c19ddefbd02accf045ab93efcce09806c990cace7166e091392479feb77", "mediaType": "image", - "verificationTimestamp": "2026-07-14T20:11:48.754Z", + "verificationTimestamp": "2026-10-07T06:54:54.728Z", "qualityReviewPath": "/template-gallery/reviews/qwen_inpaint_mask_draft.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:eac2efaea84b552d39aebcf2eb587935d86562882d105a6c66e6c10ac9c84b84", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T20:11:06.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T10:00:44.504Z", "width": 1024, "height": 1024, - "templateInputContractHash": "tic_80703967" + "thumbnailPath": "/template-gallery/qwen_inpaint_mask_draft.webp", + "templateInputContractHash": "tic_80703967", + "beforePath": "/template-gallery/inputs/qwen_inpaint_mask_draft.before.webp", + "beforeMediaHash": "sha256:bytes:a2f8ac6f5937d6e618b48ce9947153b8233ff7a82dcf67f28766d20b9917d730", + "afterPath": "/template-gallery/qwen_inpaint_mask_draft.webp", + "qualityReviewHash": "sha256:canonical-json:1f198f53a7b30c68f1efacc10e15c12f46e44775797eb1880684e0dd9256f986" }, { "templateId": "qwen_inpaint_object_replace", "verificationStatus": "reviewed", "promptSettingsHash": "ps_55745f12", - "templateLockHash": "tpl_8485a36f", + "templateLockHash": "tpl_858853a1", "modelRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:181d514c63d6abee471ef76c165e1e77d7f9cc33cf03f32840b31875cf527619", - "proofLockHash": "sha256:live-proof-lock-v1:9a0ad93694e30ad5f7ca68883a39789048474537c44c8090e73e0d8f3c4b994c", - "backendSourceFingerprint": "sha256:backend-source-v1:f987c1564cf384443c43b36d8a47e39369043f37096fd4aea08182948c113f52", - "backendContractFingerprint": "sha256:backend-contract-v1:8abd3a833fc98c347bef995859d219a3bbd3beb45345f94f9ba1a027eee9fe0d", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:a599716ae84feb4ec9d19f79316626ab891fb9fc08718850e5274e2773f6f11c", + "proofLockHash": "sha256:live-proof-lock-v1:b52dd1210464d357b89743f10205e0bdb9726996a92f57e1cee36f93a2b67cfd", + "backendSourceFingerprint": "sha256:backend-source-v1:5d82dbf942b18dbbe381f4c3e77e831a511cf5f9393dd68a8e2264d75498de5c", + "backendContractFingerprint": "sha256:backend-contract-v1:c2b06228100f999c70f6e3525de8060704b3213b5c8f174f4a24aa7d271fb064", "modelCommit": "ac7f9318f633fc4b5778c59367c8128225f1e3de", - "modelSetHash": "sha256:model-set-v1:ee364f4fabd582f32eba45df4a9985f0475f5818248cbeacefbaa947525a9905", - "inputArtifactsHash": "sha256:input-artifacts-v1:3aac89941996280d4771b8fe6f63259cfecf1a29b6855b6dfb4948df18dc097d", - "templateRevisionHash": "sha256:template-revision-v1:226cbeb0edd2b80f4398099ca73835dfff60e594996948bccb09d5b2425981e5", + "templateRevisionHash": "sha256:template-revision-v1:7d44576189f7de8f4c72bb3479ee947f33cb16cc466f07e63fb915b5819ad6cd", + "modelSetHash": "sha256:model-set-v1:cd66b00328613364e435d714899942201a2f270afee675312d82931af3a88b6a", + "inputArtifactsHash": "sha256:input-artifacts-v1:09b203899eab24f7f4fd6053014512a82893a4050087c6740d22dc89a2b09073", "provenancePath": "/template-gallery/reviews/qwen_inpaint_object_replace.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:f74404c2d119455c2db4b6f35ae8df4cca2ba98162c355f5a08f8b521a0c7080", + "provenanceHash": "sha256:canonical-json:d9cf725a11c590e2cf80cec84968c4be8e0a6c898b00fae591d8fbae79b571fb", "outputPath": "/template-gallery/qwen_inpaint_object_replace.webp", - "thumbnailPath": "/template-gallery/qwen_inpaint_object_replace.webp", - "beforePath": "/template-gallery/inputs/qwen_inpaint_object_replace.before.webp", - "beforeMediaHash": "sha256:bytes:9f9f9685db5e9f8e1c162a0515151b03912c84777727b38682b65839db501ae6", - "afterPath": "/template-gallery/qwen_inpaint_object_replace.webp", - "mediaHash": "sha256:decoded-rgba:fab1e3e4e43f7b19ebebc032703a1f755f9b9eb31a7e90fed8eb509a340f7226", + "mediaHash": "sha256:decoded-rgba:84c585d25bab36cc539f78b452b6220aa5f93e5189d9433e6eb1d325c06c5f44", "mediaType": "image", - "verificationTimestamp": "2026-07-14T07:23:36.290Z", + "verificationTimestamp": "2026-11-10T10:30:09.269Z", "qualityReviewPath": "/template-gallery/reviews/qwen_inpaint_object_replace.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:2f297372fd2b17a2670bab58c8484e4d25e1b1755bd99401b54de882699527d3", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T07:24:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T17:00:35.452Z", "width": 1024, "height": 1024, - "templateInputContractHash": "tic_1ed624ad" + "thumbnailPath": "/template-gallery/qwen_inpaint_object_replace.webp", + "templateInputContractHash": "tic_1ed624ad", + "beforePath": "/template-gallery/inputs/qwen_inpaint_object_replace.before.webp", + "beforeMediaHash": "sha256:bytes:9f9f9685db5e9f8e1c162a0515151b03912c84777727b38682b65839db501ae6", + "afterPath": "/template-gallery/qwen_inpaint_object_replace.webp", + "qualityReviewHash": "sha256:canonical-json:7d334f4c0f154615ec9d2dbc0eb35f3c0f5baca56d3c685a798c595e1aa652bd" }, { "templateId": "qwen_layered_portrait", "verificationStatus": "reviewed", - "promptSettingsHash": "ps_dc656271", - "templateLockHash": "tpl_bdf8a140", + "templateLockHash": "tpl_a90f9afe", "modelRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:09fe0b91ca28ebaa587b7e88ac33cdfcbbc17e65abf526aeac19f98f7c645b2f", - "proofLockHash": "sha256:live-proof-lock-v1:da95801de05e37f41774f4047986f3357155adaacf7be774bfe15822951179c0", - "backendSourceFingerprint": "sha256:backend-source-v1:02d43b4e6dadcb7f834dc1c5879085723b3b0302be9305919431e50f9abc6748", - "backendContractFingerprint": "sha256:backend-contract-v1:e5dcbeccb4b5c03ab988fbc1812ad8de3de74bcebcf415f50af5899ce05eb859", + "runtimeFingerprint": "sha256:stable-runtime-v1:f7dfb201f8fce05c6fbc7d0bc9541f6d61eb5a7a8ff08bdca719a4d5648ea19a", + "graphHash": "sha256:canonical-graph-v1:08ada50d9980df1cecf4016925710675945e2de6c0d07cba61c8239528adc138", + "proofLockHash": "sha256:live-proof-lock-v1:f5e8d648a44966a9f660047f749c7b78aa5c473edc5f85a07031bed0504f3ae0", + "backendSourceFingerprint": "sha256:backend-source-v1:002b2f76328c3160e4487de5441fa37807dbdc41718fe9d726e148813da068e8", + "backendContractFingerprint": "sha256:backend-contract-v1:5ab87be46dc20d25d47cb245e3249a8982dec0837c05b67382b5d99a1e3d32d3", "modelCommit": "8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", - "modelSetHash": "sha256:model-set-v1:14d8daf4d86d1b5b0afd992084e54b2ce01a6c6ce91ec63d9608dc65bbe5a8db", - "inputArtifactsHash": "sha256:input-artifacts-v1:89f3990060193cdff3e9b87e35cfb51c4edb0584a68c321728cd3f3048571da2", - "templateRevisionHash": "sha256:template-revision-v1:7c5b3fcbb0d3a49fc71732a759e0a12b4b0608f85db6c0f99b5e706d90a04746", + "templateRevisionHash": "sha256:template-revision-v1:bd611a00849877aa56136f3992d1116b4012ff7ac4955ba424794bc4b9bde0cf", + "promptSettingsHash": "ps_dc656271", + "templateInputContractHash": "tic_421d7077", + "modelSetHash": "sha256:model-set-v1:fc3bae9d8372cf377669225df7480cf40ece81f30431443a8836e4346ebe3e26", + "inputArtifactsHash": "sha256:input-artifacts-v1:75d2f873d63bbe5c391e97df4313e66eaeccd5a0526110cddbbfa7541afe0c2c", "provenancePath": "/template-gallery/reviews/qwen_layered_portrait.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:6ff5d95c02ca9edcafab48717d63446ed93c2a4c563b10f5165097e9e0ffe5e6", - "outputPath": "/template-gallery/qwen_layered_portrait.webp", - "thumbnailPath": "/template-gallery/qwen_layered_portrait.webp", - "mediaHash": "sha256:decoded-rgba:daa5db9e2e5f04bb2fb2500004433c054335f54fc483d177962f7847e05a80d6", + "provenanceHash": "sha256:canonical-json:17e8aef447e0cdfdc3d5a3695703cc13b409a23269e406d76cbd64a1ab9e0b1e", + "outputPath": "/template-gallery/qwen_layered_portrait.png", + "thumbnailPath": "/template-gallery/qwen_layered_portrait.png", + "mediaHash": "sha256:decoded-rgba:1ca6d1822687412b8d702cdc761dc98b4aabaea6bd18930ee34b078daa0d119e", "mediaType": "image", - "verificationTimestamp": "2026-07-15T00:22:30.458Z", + "verificationTimestamp": "2026-11-12T09:31:16.171Z", "qualityReviewPath": "/template-gallery/reviews/qwen_layered_portrait.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:f3c669e2d8b6adeea2ec55216df100ab6022594c319939118cc9096f3f440852", + "qualityReviewHash": "sha256:canonical-json:d1a67aefd17ce9cb6ce19626661993be528ba1db0bc43049ce90358ab2073074", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex full-resolution visual and technical review", - "reviewedAt": "2026-07-15T00:22:00.000Z", + "reviewer": "maintainer (current user)", + "reviewedAt": "2026-11-12T03:46:07.677190+00:00", "width": 1536, "height": 1108, - "templateInputContractHash": "tic_421d7077" + "supplementaryRecords": [ + "/template-gallery/layers/qwen_layered_portrait.native-layer-00.webp", + "/template-gallery/layers/qwen_layered_portrait.native-layer-01.webp", + "/template-gallery/layers/qwen_layered_portrait.native-layer-02.webp", + "/template-gallery/layers/qwen_layered_portrait.preview-layer-00.png", + "/template-gallery/layers/qwen_layered_portrait.preview-layer-01.png", + "/template-gallery/layers/qwen_layered_portrait.preview-layer-02.png" + ], + "beforePath": "/template-gallery/inputs/qwen_layered_portrait.before.webp", + "beforeMediaHash": "sha256:bytes:965240cf250a9074a7adab394c76070674cf517bed42b6c4647112d17dec84de", + "afterPath": "/template-gallery/qwen_layered_portrait.png" }, { "templateId": "qwen_logo_texture", "verificationStatus": "reviewed", "promptSettingsHash": "ps_c332b3ef", - "templateLockHash": "tpl_73ff30cd", + "templateLockHash": "tpl_db892e99", "modelRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:130a0e1fdd504549f200530e077fcac20ba6b0bc9e407420c1a1982302e6a109", - "proofLockHash": "sha256:live-proof-lock-v1:df046a04c6b40ac50c0e1966f33c288f097d58145c8047e6afe07f6369a91841", - "backendSourceFingerprint": "sha256:backend-source-v1:6c594ad479a576d92616df88fd05a0ba589890228378d785c5fb7aca3f235719", - "backendContractFingerprint": "sha256:backend-contract-v1:c7deb20dde1f079d61d108d50287348de33a94920dcc728c11887e987f02445d", + "runtimeFingerprint": "sha256:stable-runtime-v1:b124653c52ca8adb470bfa9f53bae4acb19fbee7a48278d1b2283914b534682c", + "graphHash": "sha256:canonical-graph-v1:9f4d00940dd061562bc8c2c5a3cb2069d2184a6644aec4fe0c28b0c08fc1a4c8", + "proofLockHash": "sha256:live-proof-lock-v1:d992537473c24e4758343c5673b32d7f077579ce0c5dd018840ab62f415478d4", + "backendSourceFingerprint": "sha256:backend-source-v1:b42ecb2bb1d7136527433bba088254bc0da42f94dce702d6849a72bfb3c8a730", + "backendContractFingerprint": "sha256:backend-contract-v1:0fd550431cc0c19e94976b558c1cb3406f7006f6d87dc6bab86dcd100c0a2aee", "modelCommit": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "modelSetHash": "sha256:model-set-v1:17c315b5d6d53c90b928f6fab22efe305568dcea7458f66fc28773e8dc212f22", - "inputArtifactsHash": "sha256:input-artifacts-v1:12c80183113505767501db6297facad611a8bcd9946397845a3caecbb3c8c2c0", - "templateRevisionHash": "sha256:template-revision-v1:ea27b722c9f56439c498d56790bfcaada9d3ae93b08a7d073589af8e58ad4b9c", + "templateRevisionHash": "sha256:template-revision-v1:59a4aeb8fcd6df4a05caa63a5694dea3f8553eff17a39952521edb42ec61a4ae", + "modelSetHash": "sha256:model-set-v1:e09af3b409345d16bf793174b4cd003c763fdfd20931624c4d30dd8b15c17fed", + "inputArtifactsHash": "sha256:input-artifacts-v1:a5105bd88724de9db06af083720b72a85f5dbac7ab74f52ec27d6b15cfd35d86", "provenancePath": "/template-gallery/reviews/qwen_logo_texture.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:334a945016acd42c4becc653ca28cbbf15f85c5273eb934937d5658a66451b56", + "provenanceHash": "sha256:canonical-json:886d758d5daaba75fb02dea1494188e2d35c0466e0eb7c38df256e0a19a84599", "outputPath": "/template-gallery/qwen_logo_texture.webp", - "thumbnailPath": "/template-gallery/qwen_logo_texture.webp", - "beforePath": "/template-gallery/inputs/qwen_logo_texture.before.webp", - "beforeMediaHash": "sha256:bytes:124415536a8071baccf8821232ad79a0a8ceec30ae62617c91a8d7a0b59d0a8c", - "afterPath": "/template-gallery/qwen_logo_texture.webp", - "mediaHash": "sha256:decoded-rgba:56ab3e1586baa67d8bcb2bb15864c37f819f8d23f5b8d8fdffc1963b64271ac5", + "mediaHash": "sha256:decoded-rgba:b27911e262f920b0d33a0b2d64fbe643b9575945867065ed561ffa645f6519c5", "mediaType": "image", - "verificationTimestamp": "2026-07-14T18:39:13.104Z", + "verificationTimestamp": "2026-10-07T03:19:36.064Z", "qualityReviewPath": "/template-gallery/reviews/qwen_logo_texture.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:01c672090114b02ea5d78f93cf9a7dcb08b7635e1011ae0edf9db36921df43fc", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T18:39:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T17:00:35.452Z", "width": 1024, "height": 1024, - "templateInputContractHash": "tic_e5ec5587" + "thumbnailPath": "/template-gallery/qwen_logo_texture.webp", + "templateInputContractHash": "tic_e5ec5587", + "beforePath": "/template-gallery/inputs/qwen_logo_texture.before.webp", + "beforeMediaHash": "sha256:bytes:124415536a8071baccf8821232ad79a0a8ceec30ae62617c91a8d7a0b59d0a8c", + "afterPath": "/template-gallery/qwen_logo_texture.webp", + "qualityReviewHash": "sha256:canonical-json:538de3071ae3103ed9d7b3b367c64d15aa29aa36311c0bd84dcb4b598001ad2b" }, { "templateId": "qwen_low_vram_poster_layout", "verificationStatus": "reviewed", "promptSettingsHash": "ps_124204d1", - "templateLockHash": "tpl_80dbaf09", + "templateLockHash": "tpl_90866018", "modelRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:922accf026fad2aaf5febef752be4df9f60d8d06e2a97d39c3e0697b86bb5025", - "proofLockHash": "sha256:live-proof-lock-v1:f9144fcd07af4b3805564d5c8e7b21ab697412db838850ac40e0e3ceb5d971c4", - "backendSourceFingerprint": "sha256:backend-source-v1:abf44f6a4d030ec6f55964748eab40d9ae56d5f2912253b94354681a42bb2a48", - "backendContractFingerprint": "sha256:backend-contract-v1:24526f4bcaaa3589782f0d13d8f362ecfe8ea341d93d3bbf9603eac470f0dea1", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:bdd0fc940c45125afa3d722c23e86da3a3ba3fdcbf72826e472e27b49a224e1e", + "proofLockHash": "sha256:live-proof-lock-v1:84bc5b57a823ba51869794b6030356ec1d23e53a8e17709410869d7879abba25", + "backendSourceFingerprint": "sha256:backend-source-v1:f2abf44f5ca8acadbff85dbe3a906c84454d653c1663e3cdd742180a0b1ad8c8", + "backendContractFingerprint": "sha256:backend-contract-v1:961cb20eb19be2cb1632d7ea6bf8925ffb67659db5a6784e9fa23e8175f6a9b2", "modelCommit": "25468b98e3276ca6700de15c6628e51b7de54a26", - "modelSetHash": "sha256:model-set-v1:dddafa76ef1be94e2cbdb6a9196b7dd12f19c56fd95ac9d9ef009a812230a3a5", + "templateRevisionHash": "sha256:template-revision-v1:9f35ec9e26294b82b3def9df25da94ad9ebbe41d9f48377a0acbeb20d0368e71", + "modelSetHash": "sha256:model-set-v1:e3dbf7535fe3c2a4c44462791f4acf7e65eb4a3d780d379802e78a4d7855900c", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:8ff510067636c188d80c75d6ab8313beee64d980e9c8079bfae5c3a836f724f2", "provenancePath": "/template-gallery/reviews/qwen_low_vram_poster_layout.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:5298ed51e74fb00660c3e9707e193dd72dc25638dce56ac847ed3e3c8b6e57e3", + "provenanceHash": "sha256:canonical-json:4f3c8b3546a5195c96cbbe07505a28dbf7c60fecd945e98205b854e1beed1788", "outputPath": "/template-gallery/qwen_low_vram_poster_layout.webp", "thumbnailPath": "/template-gallery/qwen_low_vram_poster_layout.webp", - "mediaHash": "sha256:decoded-rgba:f0db06180a431348c1f1f1f24a5a1453cac316f769e4f5eec58ccb33145a3da3", + "mediaHash": "sha256:decoded-rgba:e62cff028e04b4f657860e4bf797f3557806f5f942083b20e8cabebacea05af0", "mediaType": "image", - "verificationTimestamp": "2026-07-14T06:22:23.574Z", + "verificationTimestamp": "2026-11-09T18:41:11.191Z", "qualityReviewPath": "/template-gallery/reviews/qwen_low_vram_poster_layout.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:ffd98ae24b5040150400801350da0ea14d6a4350c0cf139dacdda0cbcc44d593", + "qualityReviewHash": "sha256:canonical-json:3a365bb639498c3be6d7be00c1fedd9d3210c965925a26d57c251e6b2d0d17d5", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T06:23:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-09T18:41:11.191Z", "width": 768, "height": 1024 }, { "templateId": "qwen_low_vram_product_concept", + "verificationStatus": "reviewed", "promptSettingsHash": "ps_2eeea545", - "templateLockHash": "tpl_7ca06b6f", - "modelRevision": "unsloth/Qwen-Image-2512-unsloth-bnb-4bit@f50b8c24fe21e9265509b15113b7cca82d0a4443", - "runtimeFingerprint": "sha256:stable-runtime-v1:f151c87411b429ff3b4045806837ad9f4c11f805c7a97edc3111495c97c077e7", - "graphHash": "sha256:canonical-graph-v1:e9bfab5b9adad6dddcd1df3847bc47ec29cfc963d5d0b73b072c9f289466af93", - "proofLockHash": "sha256:live-proof-lock-v1:bc052774cd44153201d5060bbe21e1f733397d311308d22ff889ad75b7f29236", - "backendSourceFingerprint": "sha256:backend-source-v1:fe9b1284cdb2626b860263633d61ede3bb75c21431207fd29d662703ebf24d7f", - "backendContractFingerprint": "sha256:backend-contract-v1:c8cd3954102677d2228e9783d53ac17d15efd965ef9ccdf0e36cc6601c93b7ba", - "modelCommit": "f50b8c24fe21e9265509b15113b7cca82d0a4443", - "templateRevisionHash": "sha256:template-revision-v1:60b8851d2e31887896c6abec85ec91c0b9180eee7a19b0513697049a53112790", - "provenancePath": "/template-gallery/reviews/qwen_low_vram_product_concept.duplicate-provenance.json", - "provenanceHash": "sha256:canonical-json:582f0dba0ed50a66000b90a440faadc9452881f43454eadf503c9f3dabf98605", + "templateLockHash": "tpl_717d0012", + "modelRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:f92979aace60962613e98903bbdceff1c93adb9943cbb4ed7cbd83c5896715cb", + "proofLockHash": "sha256:live-proof-lock-v1:754769f159078a7f4bfb1cf132b536350edfe5181b6c2ca921dbc93ed0c5ee53", + "backendSourceFingerprint": "sha256:backend-source-v1:f2abf44f5ca8acadbff85dbe3a906c84454d653c1663e3cdd742180a0b1ad8c8", + "backendContractFingerprint": "sha256:backend-contract-v1:961cb20eb19be2cb1632d7ea6bf8925ffb67659db5a6784e9fa23e8175f6a9b2", + "modelCommit": "25468b98e3276ca6700de15c6628e51b7de54a26", + "templateRevisionHash": "sha256:template-revision-v1:22e32c1d93b1aaaf187800d893c502b1041ea3ac9d1c659398efbd88c62c68d0", + "modelSetHash": "sha256:model-set-v1:e3dbf7535fe3c2a4c44462791f4acf7e65eb4a3d780d379802e78a4d7855900c", + "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "provenancePath": "/template-gallery/reviews/qwen_low_vram_product_concept.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:996f41b544b6800fa1cc3d7a47d06e72c690bc934c8af38406a29ddd2bb097d7", "outputPath": "/template-gallery/qwen_low_vram_product_concept.webp", "thumbnailPath": "/template-gallery/qwen_low_vram_product_concept.webp", - "mediaHash": "sha256:decoded-rgba:58dc65c707135280d7325c485938cb838d6f374905e903b54032183905f891c9", + "mediaHash": "sha256:decoded-rgba:bbf125c78c0ac3b150e28cbe520af08a7098ec951dfbcc4072c7d3bf4a474854", "mediaType": "image", - "verificationTimestamp": "2026-07-10T09:16:41.233Z", + "verificationTimestamp": "2026-11-09T18:32:53.842Z", "qualityReviewPath": "/template-gallery/reviews/qwen_low_vram_product_concept.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:88525512eac8b858e9df23c00b88bf29d40ff3aeddec85b7b91c56617f5c3c66", - "qualityReviewStatus": "approved_exact", - "reviewer": "Codex visual review", - "reviewedAt": "2026-07-10T09:15:00.000Z", + "qualityReviewHash": "sha256:canonical-json:63fe9bf938951cd614e60ceab3eea97968a9eb4036e1b6e8b692cb5bee763dd9", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-09T18:32:53.842Z", "width": 1024, "height": 768 }, { "templateId": "qwen_low_vram_text_rendering", + "verificationStatus": "reviewed", "promptSettingsHash": "ps_c32e6c86", - "templateLockHash": "tpl_36ea6ada", - "modelRevision": "unsloth/Qwen-Image-2512-unsloth-bnb-4bit@f50b8c24fe21e9265509b15113b7cca82d0a4443", - "runtimeFingerprint": "sha256:stable-runtime-v1:f151c87411b429ff3b4045806837ad9f4c11f805c7a97edc3111495c97c077e7", - "graphHash": "sha256:canonical-graph-v1:6639c69a8f6f3f10f94e3346ec5b5ef7a79e68632d3c84110c8e5cba08786d54", - "proofLockHash": "sha256:live-proof-lock-v1:252a14547bb806caff6c9ac1513cecd557dcbc41c45c21add8a858ce3814046d", - "backendSourceFingerprint": "sha256:backend-source-v1:fe9b1284cdb2626b860263633d61ede3bb75c21431207fd29d662703ebf24d7f", - "backendContractFingerprint": "sha256:backend-contract-v1:c8cd3954102677d2228e9783d53ac17d15efd965ef9ccdf0e36cc6601c93b7ba", - "modelCommit": "f50b8c24fe21e9265509b15113b7cca82d0a4443", - "templateRevisionHash": "sha256:template-revision-v1:8a6d968f60e768c38730d5d3a6153bc54ed8aa193e773ca14cf53305df392c07", - "provenancePath": "/template-gallery/reviews/qwen_low_vram_text_rendering.duplicate-provenance.json", - "provenanceHash": "sha256:canonical-json:c7c4ef402090dfda185df7d6d797cd9f6c26b128f851dc053f2a6fc047207751", + "templateLockHash": "tpl_af5619dd", + "modelRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:d710fc29d1c6ef56f4714207ce0ebb2b8ed2d1f1115ea2d21f610ba88173b942", + "proofLockHash": "sha256:live-proof-lock-v1:c18d567897c00921850ce02310ced02a015a4c7f1e717c77f3893f73f63ce5c5", + "backendSourceFingerprint": "sha256:backend-source-v1:f2abf44f5ca8acadbff85dbe3a906c84454d653c1663e3cdd742180a0b1ad8c8", + "backendContractFingerprint": "sha256:backend-contract-v1:961cb20eb19be2cb1632d7ea6bf8925ffb67659db5a6784e9fa23e8175f6a9b2", + "modelCommit": "25468b98e3276ca6700de15c6628e51b7de54a26", + "templateRevisionHash": "sha256:template-revision-v1:244404f4f57c52eabc308a3bd4cd65d9dc2aef45b70a16550697ca7bb67f76ec", + "modelSetHash": "sha256:model-set-v1:e3dbf7535fe3c2a4c44462791f4acf7e65eb4a3d780d379802e78a4d7855900c", + "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "provenancePath": "/template-gallery/reviews/qwen_low_vram_text_rendering.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:ccde1c193a012e6f7568d21fb63cda3290c17578d056d33da5edb8b8f0209f84", "outputPath": "/template-gallery/qwen_low_vram_text_rendering.webp", "thumbnailPath": "/template-gallery/qwen_low_vram_text_rendering.webp", - "mediaHash": "sha256:decoded-rgba:f1f4365c53d4c26e249bf41bddc3cfa2905adb446e540d774ceb20a4dd6b5f98", + "mediaHash": "sha256:decoded-rgba:b56724dc1db0b9e22655634747cf7171cc15839603a5142ea759d2c16ce4655f", "mediaType": "image", - "verificationTimestamp": "2026-07-10T09:29:19.238Z", + "verificationTimestamp": "2026-11-09T18:32:53.842Z", "qualityReviewPath": "/template-gallery/reviews/qwen_low_vram_text_rendering.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:b2f66d5003470f93b0c460af8a22b6dced823fa26d2935d439be38e1f4f744d1", - "qualityReviewStatus": "approved_exact", - "reviewer": "Codex visual review", - "reviewedAt": "2026-07-10T09:28:30.000Z", + "qualityReviewHash": "sha256:canonical-json:fb5f92fc9e757570dd581d812923da5628d332051a46c02f908d08e5e54476d6", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-09T18:32:53.842Z", "width": 1024, "height": 1024 }, @@ -1531,165 +2001,165 @@ "templateId": "qwen_multi_reference_product", "verificationStatus": "reviewed", "promptSettingsHash": "ps_accf618d", - "templateLockHash": "tpl_f17d9d93", + "templateLockHash": "tpl_90a6d763", "modelRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:bd24cf2f3a5a5785d2da46a7ebcae4142f69e506249dde447bc715f2998db4bf", - "proofLockHash": "sha256:live-proof-lock-v1:d521be0fc22018b84e7ab04946a01de0465a67f9279405bc7bab09237c55ac1c", - "backendSourceFingerprint": "sha256:backend-source-v1:6c594ad479a576d92616df88fd05a0ba589890228378d785c5fb7aca3f235719", - "backendContractFingerprint": "sha256:backend-contract-v1:c7deb20dde1f079d61d108d50287348de33a94920dcc728c11887e987f02445d", + "runtimeFingerprint": "sha256:stable-runtime-v1:b124653c52ca8adb470bfa9f53bae4acb19fbee7a48278d1b2283914b534682c", + "graphHash": "sha256:canonical-graph-v1:7389f0335db13ec9a6408b89d2b7f9ed42a44897772f6f033da582b761fa18bd", + "proofLockHash": "sha256:live-proof-lock-v1:5140c6b6911fe966817989ba9703a78309c95bb8e0cd79b1f88de3e67abc71cd", + "backendSourceFingerprint": "sha256:backend-source-v1:b42ecb2bb1d7136527433bba088254bc0da42f94dce702d6849a72bfb3c8a730", + "backendContractFingerprint": "sha256:backend-contract-v1:c25b1dcf06c7ab6fd74433df9a4660f6c22179d00ecfea8fcd94c2c125b43ee9", "modelCommit": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "modelSetHash": "sha256:model-set-v1:17c315b5d6d53c90b928f6fab22efe305568dcea7458f66fc28773e8dc212f22", - "inputArtifactsHash": "sha256:input-artifacts-v1:0f379affe5ab9ee1d10bbccec25abe31cca6abfc6f3b60d4d8816b85ef2acffe", - "templateRevisionHash": "sha256:template-revision-v1:db4dc38879d9a8ddd51ce21cb3c2037f2f75459fafb375a3cb3d7d71b3f7d397", + "templateRevisionHash": "sha256:template-revision-v1:a63423a23a078005dcfd0ccd5c6c570ca9444c35bc409baf17fd822853b48d67", + "modelSetHash": "sha256:model-set-v1:e09af3b409345d16bf793174b4cd003c763fdfd20931624c4d30dd8b15c17fed", + "inputArtifactsHash": "sha256:input-artifacts-v1:5afb829cf8349587f7582ca9c4400d6ff6d568043bef697d2a21c8ab49fc408a", "provenancePath": "/template-gallery/reviews/qwen_multi_reference_product.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:eb9eaa0de36f3bf8c5886cafe4873012d63394491e9fc41a4b6c9568b20987dc", + "provenanceHash": "sha256:canonical-json:b31b6151d480202370e288ba766b400752839c9eb6577436f3b1a620712076e5", "outputPath": "/template-gallery/qwen_multi_reference_product.webp", - "thumbnailPath": "/template-gallery/qwen_multi_reference_product.webp", - "beforePath": "/template-gallery/inputs/qwen_multi_reference_product.before.webp", - "beforeMediaHash": "sha256:bytes:47e56fd165fd2610f34e952191d74e061269b9703ae9fd7f571491f38ce4992c", - "afterPath": "/template-gallery/qwen_multi_reference_product.webp", - "mediaHash": "sha256:decoded-rgba:dd96508b187e455e9df604855ea740315088953fa3e2fe9b006ba43d6cfde978", + "mediaHash": "sha256:decoded-rgba:9e57f877bcd1beaa1e7a70236d8c339995e80418344c01670b4c967c86b31c6d", "mediaType": "image", - "verificationTimestamp": "2026-07-14T18:16:39.570Z", + "verificationTimestamp": "2026-10-07T03:22:45.726Z", "qualityReviewPath": "/template-gallery/reviews/qwen_multi_reference_product.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:8d53d6a9c677a20da08229ecdd0219c0301ee25d0e0a4822d36f19ff7bfccffa", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T18:16:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T17:00:35.452Z", "width": 1024, "height": 1024, - "templateInputContractHash": "tic_f078b0f5" + "thumbnailPath": "/template-gallery/qwen_multi_reference_product.webp", + "templateInputContractHash": "tic_f078b0f5", + "beforePath": "/template-gallery/inputs/qwen_multi_reference_product.before.webp", + "beforeMediaHash": "sha256:bytes:47e56fd165fd2610f34e952191d74e061269b9703ae9fd7f571491f38ce4992c", + "afterPath": "/template-gallery/qwen_multi_reference_product.webp", + "qualityReviewHash": "sha256:canonical-json:947128e71ee6de12049bf01340f8b6a4b50ffa2c1e8bd59894f66225e95b6551" }, { "templateId": "qwen_outpaint_aspect_template", "verificationStatus": "reviewed", "promptSettingsHash": "ps_133d5e34", - "templateLockHash": "tpl_221f7f83", + "templateLockHash": "tpl_f809c060", "modelRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:c69e07901b2b0f2f2ce05830b1bea1aee77aa8148faf7723655ef48c391e2a89", - "proofLockHash": "sha256:live-proof-lock-v1:33d8847960c06974dcacde9778820d52112313c94a0e0783e5d518c7dbddb69a", - "backendSourceFingerprint": "sha256:backend-source-v1:f987c1564cf384443c43b36d8a47e39369043f37096fd4aea08182948c113f52", - "backendContractFingerprint": "sha256:backend-contract-v1:397884b90aaf0749ca1a6b08456e1a282d6fe70037e76eb87472ddc61c595829", + "runtimeFingerprint": "sha256:stable-runtime-v1:400b9b2a748fb265ee1d64e592ce59e6629d7a1db69e67f5bec19a0719f689d6", + "graphHash": "sha256:canonical-graph-v1:5769150264bb7d8d7f85ae7483ae1b8eb7fd170c5569a3234b209aa6dede45b6", + "proofLockHash": "sha256:live-proof-lock-v1:1277b681a39b809495dc789170a6adff490481763ac2751625f2404e5383c8ff", + "backendSourceFingerprint": "sha256:backend-source-v1:b42ecb2bb1d7136527433bba088254bc0da42f94dce702d6849a72bfb3c8a730", + "backendContractFingerprint": "sha256:backend-contract-v1:04264bf628fdb5c81f828b2475c2382250cb491d1f80595ed7b1570d41e1099b", "modelCommit": "ac7f9318f633fc4b5778c59367c8128225f1e3de", - "modelSetHash": "sha256:model-set-v1:ee364f4fabd582f32eba45df4a9985f0475f5818248cbeacefbaa947525a9905", - "inputArtifactsHash": "sha256:input-artifacts-v1:052666e0a89d4ba0966d71ff730a2be81063350c1be696f4b8f7a30166b0a120", - "templateRevisionHash": "sha256:template-revision-v1:2a971226d208f52df6931e542fa4e9fcbe8b9d5169f132f119417546a6fb5136", + "templateRevisionHash": "sha256:template-revision-v1:a4e44b245e952591fa7b46c45f4178b872647b2f188ff67e6ead8855fcf903fe", + "modelSetHash": "sha256:model-set-v1:cd66b00328613364e435d714899942201a2f270afee675312d82931af3a88b6a", + "inputArtifactsHash": "sha256:input-artifacts-v1:6561b918b7886f2ecfc79792a9f94b7b2e4de97553c7ddadb990b05e015a7376", "provenancePath": "/template-gallery/reviews/qwen_outpaint_aspect_template.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:78cfa7a750786054ba2f8eb541f39c1574c3e9ed18d407c6e5f5dd9eeb423819", + "provenanceHash": "sha256:canonical-json:f35c396982b3fc552c6278c829b7624cfac0c411ae4171d20d828a4fa804b903", "outputPath": "/template-gallery/qwen_outpaint_aspect_template.webp", "thumbnailPath": "/template-gallery/qwen_outpaint_aspect_template.webp", - "beforePath": "/template-gallery/inputs/qwen_outpaint_aspect_template.before.webp", - "beforeMediaHash": "sha256:bytes:d898e00f3be4b28e237f71acf8024ad3715a657e1fcf3aeaf57279468dff7a76", - "afterPath": "/template-gallery/qwen_outpaint_aspect_template.webp", - "mediaHash": "sha256:decoded-rgba:9083fe264a12a400c90670e40fe1b4badf110282671449b0c9cac90177c09bd9", + "mediaHash": "sha256:decoded-rgba:b9a292d0775f828c690c4bd27806085d8fa1e9b1991e560d5a7e03e9a9a18ea8", "mediaType": "image", - "verificationTimestamp": "2026-07-14T07:38:07.153Z", + "verificationTimestamp": "2026-11-10T08:34:46.954Z", "qualityReviewPath": "/template-gallery/reviews/qwen_outpaint_aspect_template.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:f79ff0cde8f0805607f4d679dd21f860eeadf576a746be8c434fa0a9d08e45e3", + "qualityReviewHash": "sha256:canonical-json:c1bbed1973f2c21612e63fc69969ef4e79ff9732c76c4db0d187fb6acdb1a53e", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T07:38:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T08:34:46.954Z", "width": 1344, "height": 768, - "templateInputContractHash": "tic_906c30a5" + "templateInputContractHash": "tic_906c30a5", + "beforePath": "/template-gallery/inputs/qwen_outpaint_aspect_template.before.webp", + "beforeMediaHash": "sha256:bytes:d898e00f3be4b28e237f71acf8024ad3715a657e1fcf3aeaf57279468dff7a76", + "afterPath": "/template-gallery/qwen_outpaint_aspect_template.webp" }, { "templateId": "qwen_outpaint_draft", "verificationStatus": "reviewed", "promptSettingsHash": "ps_5c20fd6c", - "templateLockHash": "tpl_989c42ef", + "templateLockHash": "tpl_d08a7294", "modelRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:75f4be542716aec4c4935b579e7a66d4cfa753100e3c2e4a9dbe74a54ec94dcf", - "proofLockHash": "sha256:live-proof-lock-v1:087a010b3998e88893dd6d5afac5a9f418bfe30f90febe83a9f6f3b6f53dbf63", - "backendSourceFingerprint": "sha256:backend-source-v1:f336a37bd67df68df0dc93adcd613f6e3b0f9994558d348129131bd1c71d1623", - "backendContractFingerprint": "sha256:backend-contract-v1:397884b90aaf0749ca1a6b08456e1a282d6fe70037e76eb87472ddc61c595829", + "runtimeFingerprint": "sha256:stable-runtime-v1:400b9b2a748fb265ee1d64e592ce59e6629d7a1db69e67f5bec19a0719f689d6", + "graphHash": "sha256:canonical-graph-v1:ccad0f1435c22d7662e4db5de903bce97e8b7448b239218cc67b63c9e2d4dd69", + "proofLockHash": "sha256:live-proof-lock-v1:161d4b03b9f30db98e79cfc2b9f8d087d8bd396ac65dbf7023cda01c724b71cc", + "backendSourceFingerprint": "sha256:backend-source-v1:b42ecb2bb1d7136527433bba088254bc0da42f94dce702d6849a72bfb3c8a730", + "backendContractFingerprint": "sha256:backend-contract-v1:04264bf628fdb5c81f828b2475c2382250cb491d1f80595ed7b1570d41e1099b", "modelCommit": "ac7f9318f633fc4b5778c59367c8128225f1e3de", - "modelSetHash": "sha256:model-set-v1:ee364f4fabd582f32eba45df4a9985f0475f5818248cbeacefbaa947525a9905", - "inputArtifactsHash": "sha256:input-artifacts-v1:63cb6efe60d66822f1b1869b36aafa9367cfb366bd7a800779b96ac664f0b6e8", - "templateRevisionHash": "sha256:template-revision-v1:ecc1d8269347263fd2a0019ec8230a8dec31d07081984ab01d31d3eb8e5654a8", + "templateRevisionHash": "sha256:template-revision-v1:65d842d0304f8b82c4e57bd13429d13553b841b5238b24b08d15787cae2a0b94", + "modelSetHash": "sha256:model-set-v1:cd66b00328613364e435d714899942201a2f270afee675312d82931af3a88b6a", + "inputArtifactsHash": "sha256:input-artifacts-v1:2d55071dceb2a64b8e63fd5f80ea455e4e882f218f54f51af327c1bcdd76b941", "provenancePath": "/template-gallery/reviews/qwen_outpaint_draft.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:f2e4f5733ca4c0a7189264faf32c3911e01b020e368f5b0fc9e6900847c792af", + "provenanceHash": "sha256:canonical-json:76e3f93e0c5f8f16a362536c58f642683f83483064789e052b3ea93c194af36c", "outputPath": "/template-gallery/qwen_outpaint_draft.webp", "thumbnailPath": "/template-gallery/qwen_outpaint_draft.webp", - "beforePath": "/template-gallery/inputs/qwen_outpaint_draft.before.webp", - "beforeMediaHash": "sha256:bytes:862e292caa1759156fffde5cfccda8b97ec622514258f81986188cf63a836ea9", - "afterPath": "/template-gallery/qwen_outpaint_draft.webp", - "mediaHash": "sha256:decoded-rgba:8ea95e60e902f07a2566c8792ef2ed08adb876a4d910b323276574f4640b78d0", + "mediaHash": "sha256:decoded-rgba:660d8082c9bd2231612183309ee0e266244ef200c7f545bb7e716ee1b2d4884e", "mediaType": "image", - "verificationTimestamp": "2026-07-14T20:23:58.405Z", + "verificationTimestamp": "2026-11-10T08:34:46.954Z", "qualityReviewPath": "/template-gallery/reviews/qwen_outpaint_draft.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:eaf0dbfbd9de5577907ceea6aed1f63bb121f19614cc9deff7913e3df85382bd", + "qualityReviewHash": "sha256:canonical-json:6d72ec715d7cf7b7c54eaea83c77ec04f47c2b5e1e494ea07411b1f0bee3968c", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T20:22:57.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T08:34:46.954Z", "width": 1344, "height": 768, - "templateInputContractHash": "tic_eee434f8" + "templateInputContractHash": "tic_eee434f8", + "beforePath": "/template-gallery/inputs/qwen_outpaint_draft.before.webp", + "beforeMediaHash": "sha256:bytes:862e292caa1759156fffde5cfccda8b97ec622514258f81986188cf63a836ea9", + "afterPath": "/template-gallery/qwen_outpaint_draft.webp" }, { "templateId": "qwen_packaging_dieline", - "verificationStatus": "exact", + "verificationStatus": "reviewed", "promptSettingsHash": "ps_38277178", - "templateLockHash": "tpl_cd6490e2", + "templateLockHash": "tpl_fb88821d", "modelRevision": "InstantX/Qwen-Image-ControlNet-Union@b13036f066d6dee7c20513e263d3d673055e9de8 | Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:fb0c0632c8300c1e813340fec2c93d0741fe56e3900d713d58b7c4c061d8e096", - "proofLockHash": "sha256:live-proof-lock-v1:9ca09405fd4d5a981e0e1ceec6d989a73e39644247b9423353800ce6cabf51ea", - "backendSourceFingerprint": "sha256:backend-source-v1:f6b028c6d3d0ff542df863f8c782d1550ac3c12e94767f6eb8cd3f2719d3cdfd", - "backendContractFingerprint": "sha256:backend-contract-v1:d33ca3724d3669316090613df149915fa7004cc2ddbf9faaf802c81419c543f9", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:82790fb15ad1a33f6eefa24a7f15684b4f4c19602335b3e5aa7d75e72422c32c", + "proofLockHash": "sha256:live-proof-lock-v1:a8b738a51e3e26e40bf618cea3c902b9f35c7b1f3a199ec735e61fdbe61feee2", + "backendSourceFingerprint": "sha256:backend-source-v1:5d82dbf942b18dbbe381f4c3e77e831a511cf5f9393dd68a8e2264d75498de5c", + "backendContractFingerprint": "sha256:backend-contract-v1:b52f299bd8ad8d610c459eb01f998c0d7703762ce0026abbfa85d832d9368e0c", "modelCommit": "InstantX/Qwen-Image-ControlNet-Union@b13036f066d6dee7c20513e263d3d673055e9de8 | Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", - "modelSetHash": "sha256:model-set-v1:a2596ae76db6f898859b4ce528536d433b3df39db60f25055263a05fcec4f0a7", - "inputArtifactsHash": "sha256:input-artifacts-v1:c158615a82110b81e0471165b3030519077554585e4116c8548ae31469844c8c", - "templateRevisionHash": "sha256:template-revision-v1:975040a57a9b78f17528fbc7ee1f14cfc29e17816626c9ae869c70bc63e54cb3", - "provenancePath": "/template-gallery/reviews/qwen_packaging_dieline.duplicate-provenance.json", - "provenanceHash": "sha256:canonical-json:e8855c42f0fc6b5aa2a394b1d88e32e397dfccf9bec9a4fc453c142e6dd7070f", + "templateRevisionHash": "sha256:template-revision-v1:39a46bf502552687fd2d27a61497f375fa061a6850a5d80718db65201adcc824", + "modelSetHash": "sha256:model-set-v1:3996c048b789998a6e2de74f02e8e24b9b0bca936b6bb942878b6844fa4c8c3d", + "inputArtifactsHash": "sha256:input-artifacts-v1:7c3237a4938efe57f74b5e2078619d76d2afd0955ad93e9aad2613b67515f1e1", + "provenancePath": "/template-gallery/reviews/qwen_packaging_dieline.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:fd76268f280380010c8d9df906f6178bbd6421a26e12d959ccf4597fe3ae7ba7", "outputPath": "/template-gallery/qwen_packaging_dieline.webp", - "thumbnailPath": "/template-gallery/qwen_packaging_dieline.webp", - "beforePath": "/template-gallery/inputs/qwen_packaging_dieline.before.png", - "beforeMediaHash": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", - "afterPath": "/template-gallery/qwen_packaging_dieline.webp", - "mediaHash": "sha256:decoded-rgba:661498cee3331193602508a2f5a8e284bf2e3a0bbb7bac0ec5c5b9529e32afcf", + "mediaHash": "sha256:decoded-rgba:48d501f7205ca2c22b37313a3c440ee61833eeaccfea98ff88f467fd4c7990ae", "mediaType": "image", - "verificationTimestamp": "2026-07-14T11:04:34.200Z", + "verificationTimestamp": "2026-11-09T23:26:10.331Z", "qualityReviewPath": "/template-gallery/reviews/qwen_packaging_dieline.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:1f72fbedf760e67751bd069c421bf3ca8cb879d0eaec4ee8029dcd7d60ccd558", - "qualityReviewStatus": "approved_exact", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T11:04:00.000Z", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T10:00:44.504Z", "width": 768, "height": 768, - "templateInputContractHash": "tic_ba7e70fa" + "thumbnailPath": "/template-gallery/qwen_packaging_dieline.webp", + "templateInputContractHash": "tic_ba7e70fa", + "beforePath": "/template-gallery/inputs/qwen_packaging_dieline.before.png", + "beforeMediaHash": "sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67", + "afterPath": "/template-gallery/qwen_packaging_dieline.webp", + "qualityReviewHash": "sha256:canonical-json:e6347a1bae1a5e0d4768607b7156a5c6232889b0fe4c886826ae5d47ee8b987f" }, { "templateId": "qwen_poster_logo_text", "verificationStatus": "reviewed", "promptSettingsHash": "ps_a66ba460", - "templateLockHash": "tpl_aa2101b3", + "templateLockHash": "tpl_2e74584a", "modelRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:07a13e5ef2d7858bb1b3ff9d6cc87b9c8ce91a9bcb5eba9852cf14a9f6a76d4c", - "proofLockHash": "sha256:live-proof-lock-v1:0df3cf8e1d785add77d0d832f07110af33d69aa008b53594fdfd590b762dd4ee", - "backendSourceFingerprint": "sha256:backend-source-v1:abf44f6a4d030ec6f55964748eab40d9ae56d5f2912253b94354681a42bb2a48", - "backendContractFingerprint": "sha256:backend-contract-v1:24526f4bcaaa3589782f0d13d8f362ecfe8ea341d93d3bbf9603eac470f0dea1", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:5b43c4c6669209d4e1f7a14ce6f2e6aa247cc0cce76c810354b28bb9ebc1490b", + "proofLockHash": "sha256:live-proof-lock-v1:4dea46a31e70c0daf517c7a8435e05e296d3e2a622ed590e7905d2bb9b8086d4", + "backendSourceFingerprint": "sha256:backend-source-v1:f2abf44f5ca8acadbff85dbe3a906c84454d653c1663e3cdd742180a0b1ad8c8", + "backendContractFingerprint": "sha256:backend-contract-v1:961cb20eb19be2cb1632d7ea6bf8925ffb67659db5a6784e9fa23e8175f6a9b2", "modelCommit": "25468b98e3276ca6700de15c6628e51b7de54a26", - "modelSetHash": "sha256:model-set-v1:dddafa76ef1be94e2cbdb6a9196b7dd12f19c56fd95ac9d9ef009a812230a3a5", + "templateRevisionHash": "sha256:template-revision-v1:692601cbd9b48828cba5d98525f8e5913a8374281452303c7eb0f0436ca78337", + "modelSetHash": "sha256:model-set-v1:e3dbf7535fe3c2a4c44462791f4acf7e65eb4a3d780d379802e78a4d7855900c", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:7ae6384dbd26805e80cd021eb32868c943f404e51dff706a467cb3325454d89c", "provenancePath": "/template-gallery/reviews/qwen_poster_logo_text.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:999fd4639aa16f73885857abffb3ec2caab4a4be41bd2e764f3fa7dac510c624", + "provenanceHash": "sha256:canonical-json:344f70280708c1cc2052062dfed977a9097361c610b83580a0c009c9d344dd1b", "outputPath": "/template-gallery/qwen_poster_logo_text.webp", "thumbnailPath": "/template-gallery/qwen_poster_logo_text.webp", - "mediaHash": "sha256:decoded-rgba:8e082d631279b83944377dddd43594af4276dde2fc0b57058e4991f7a6cddd2a", + "mediaHash": "sha256:decoded-rgba:5ad2a272573c10fb6e72a2c13da603f05238618e46015ffd23dd1beb6a635f90", "mediaType": "image", - "verificationTimestamp": "2026-07-14T06:19:54.714Z", + "verificationTimestamp": "2026-11-09T17:54:44.293Z", "qualityReviewPath": "/template-gallery/reviews/qwen_poster_logo_text.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:91a729c25621005b10a47579e08d8d7bb0cfce47d2405003c7f19d7c76a6c2ef", + "qualityReviewHash": "sha256:canonical-json:b6ac3bc3f87b38f830f472c703c22239f96f4659b7e58bc594401f83d87c7a56", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T06:20:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-09T17:54:44.293Z", "width": 768, "height": 1344 }, @@ -1697,62 +2167,63 @@ "templateId": "qwen_product_ad_composite", "verificationStatus": "reviewed", "promptSettingsHash": "ps_95804e0d", - "templateLockHash": "tpl_a1cfb351", + "templateLockHash": "tpl_09710b5b", "modelRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:e90638d2eca4101500805d44e31b956774fee5ace456d36dd8fb8dbd1e931413", - "proofLockHash": "sha256:live-proof-lock-v1:11abda2cfcf297f33a13f7daafd8048e3b9a8a99c9c24a4ec950295fe0146201", - "backendSourceFingerprint": "sha256:backend-source-v1:40bf55175d19825b1a4e12485ca395f1889473ac25aa724af45effa914f438ed", - "backendContractFingerprint": "sha256:backend-contract-v1:c7deb20dde1f079d61d108d50287348de33a94920dcc728c11887e987f02445d", + "runtimeFingerprint": "sha256:stable-runtime-v1:b124653c52ca8adb470bfa9f53bae4acb19fbee7a48278d1b2283914b534682c", + "graphHash": "sha256:canonical-graph-v1:04a4c9c5c968e88fbd6f53495d90f44590c6b51963aa9e98456c414a44cc2c0a", + "proofLockHash": "sha256:live-proof-lock-v1:d1c4a17384829a37edcd35a14a5fd9597cfcaa0a3bba3cb03b1fe1355eaceca4", + "backendSourceFingerprint": "sha256:backend-source-v1:b42ecb2bb1d7136527433bba088254bc0da42f94dce702d6849a72bfb3c8a730", + "backendContractFingerprint": "sha256:backend-contract-v1:0fd550431cc0c19e94976b558c1cb3406f7006f6d87dc6bab86dcd100c0a2aee", "modelCommit": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "modelSetHash": "sha256:model-set-v1:17c315b5d6d53c90b928f6fab22efe305568dcea7458f66fc28773e8dc212f22", - "inputArtifactsHash": "sha256:input-artifacts-v1:82f220c63c846b546beaa9d5ba380a1bbf941606515e6fd2f9e375b75c021a1f", - "templateRevisionHash": "sha256:template-revision-v1:3758585369cc0a9a07dbe9f501a9336349090bd1381bf6e24fa7080f695eda85", + "templateRevisionHash": "sha256:template-revision-v1:86576a99641080f975dd59fd212694aaf3ea6c5ec329df6ca8d4508167112216", + "modelSetHash": "sha256:model-set-v1:e09af3b409345d16bf793174b4cd003c763fdfd20931624c4d30dd8b15c17fed", + "inputArtifactsHash": "sha256:input-artifacts-v1:d19dc962d050197476046da0bcee4519dfaf4187ddf863d9adc1096bf2011db8", "provenancePath": "/template-gallery/reviews/qwen_product_ad_composite.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:d781c4d92d1681c4d908eff3a16fcbb57f6286ea36888004e7da89886a3601d5", + "provenanceHash": "sha256:canonical-json:585755a4475507c358989ece2aa020b3e35699ec02a714cf23006bc0fd76dfba", "outputPath": "/template-gallery/qwen_product_ad_composite.webp", - "thumbnailPath": "/template-gallery/qwen_product_ad_composite.webp", - "beforePath": "/template-gallery/inputs/qwen_product_ad_composite.before.webp", - "beforeMediaHash": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", - "afterPath": "/template-gallery/qwen_product_ad_composite.webp", - "mediaHash": "sha256:decoded-rgba:c7795d3f1b9c225fc4fd38e9e946d0dddb6efb0b627069f47804a68c0f34095d", + "mediaHash": "sha256:decoded-rgba:6e44c3e410a7e878e5c0b20b4a59f0fa71564e7419144ba6c0689c50130f15c2", "mediaType": "image", - "verificationTimestamp": "2026-07-15T23:00:14.965Z", + "verificationTimestamp": "2026-10-07T03:16:37.079Z", "qualityReviewPath": "/template-gallery/reviews/qwen_product_ad_composite.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:8c4d976d260d90101fe61aeb85baecc3173f621e15e37e580a5580577541eb85", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-16T04:28:00.000+05:30", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T17:00:35.452Z", "width": 1024, "height": 1024, - "templateInputContractHash": "tic_51540eb3" + "thumbnailPath": "/template-gallery/qwen_product_ad_composite.webp", + "templateInputContractHash": "tic_51540eb3", + "beforePath": "/template-gallery/inputs/qwen_product_ad_composite.before.webp", + "beforeMediaHash": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", + "afterPath": "/template-gallery/qwen_product_ad_composite.webp", + "qualityReviewHash": "sha256:canonical-json:52f8875ca223a20e913d6df8acb232e50d436db9f16a842b5d4c4b37b5ceded2" }, { "templateId": "qwen_product_mockup", + "verificationStatus": "reviewed", "promptSettingsHash": "ps_e36f0f52", - "templateLockHash": "tpl_3e6b01d1", - "modelRevision": "unsloth/Qwen-Image-2512-unsloth-bnb-4bit@f50b8c24fe21e9265509b15113b7cca82d0a4443", - "runtimeFingerprint": "sha256:stable-runtime-v1:f151c87411b429ff3b4045806837ad9f4c11f805c7a97edc3111495c97c077e7", - "graphHash": "sha256:canonical-graph-v1:473078788d6dc59d7767ac5b518b107d27d4f908e0f7f81e728750b4cd7d7f62", - "proofLockHash": "sha256:live-proof-lock-v1:17b300ce84723f767754da8cc392282cb1449249f6b6e6408b1ff5135816e426", - "backendSourceFingerprint": "sha256:backend-source-v1:1a5cd33510acc57f6343f81aed99ebfc030eace0f45c12a28dd06288d4708829", - "backendContractFingerprint": "sha256:backend-contract-v1:c8cd3954102677d2228e9783d53ac17d15efd965ef9ccdf0e36cc6601c93b7ba", - "modelCommit": "f50b8c24fe21e9265509b15113b7cca82d0a4443", - "modelSetHash": "sha256:model-set-v1:234b853531abfa715b3cffad1ae35ae84db5eb7559db178138a0d11d8b16b5ae", + "templateLockHash": "tpl_9d93fc68", + "modelRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:f0aed9fb4a8c50fa355ada866e63889e04305f81bf924a27242171d77f885c6d", + "proofLockHash": "sha256:live-proof-lock-v1:f083d99c1220e40f32048f71e41d5fa377f448b71ff6a0db8871e3a0148bff17", + "backendSourceFingerprint": "sha256:backend-source-v1:f2abf44f5ca8acadbff85dbe3a906c84454d653c1663e3cdd742180a0b1ad8c8", + "backendContractFingerprint": "sha256:backend-contract-v1:961cb20eb19be2cb1632d7ea6bf8925ffb67659db5a6784e9fa23e8175f6a9b2", + "modelCommit": "25468b98e3276ca6700de15c6628e51b7de54a26", + "templateRevisionHash": "sha256:template-revision-v1:31e5098fbaf84447fc608c1a84594435f5062620fe5019c13ead5425dbeb32fd", + "modelSetHash": "sha256:model-set-v1:e3dbf7535fe3c2a4c44462791f4acf7e65eb4a3d780d379802e78a4d7855900c", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:0f631bc19f2fd9bfa355da029dfaf4ed4f043c1f1a3b82b2942caf7db312317d", - "provenancePath": "/template-gallery/reviews/qwen_product_mockup.duplicate-provenance.json", - "provenanceHash": "sha256:canonical-json:ace49a7547ddbbdb1b18b18e40f49780c48e7812118359d4e650ce1e40f2b89f", + "provenancePath": "/template-gallery/reviews/qwen_product_mockup.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:328f3641b1a455f6db19d625f252e0f840164e43e41741a622c168dbe388d576", "outputPath": "/template-gallery/qwen_product_mockup.webp", "thumbnailPath": "/template-gallery/qwen_product_mockup.webp", - "mediaHash": "sha256:decoded-rgba:22f8fc98619fde3cf908be35385888be7aa3fe90a7838e740d537a82ce95e414", + "mediaHash": "sha256:decoded-rgba:ad796c2592d0a9e2c34469b3c1bd09358ab48c4c4573476d554046878164ba67", "mediaType": "image", - "verificationTimestamp": "2026-07-10T18:09:14.895Z", + "verificationTimestamp": "2026-11-09T17:54:44.293Z", "qualityReviewPath": "/template-gallery/reviews/qwen_product_mockup.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:bfb0b0cbecd178b9f757d71d45b88dde7effd2f33263ee28bd2828024e9b9208", - "qualityReviewStatus": "approved_exact", - "reviewer": "Codex visual review", - "reviewedAt": "2026-07-10T18:07:59.752Z", + "qualityReviewHash": "sha256:canonical-json:8e6532231c1222983ab909f64ddc8b27bd571f6cc1b1e9620a3534ab406f0101", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-09T17:54:44.293Z", "width": 1024, "height": 1024 }, @@ -1760,62 +2231,63 @@ "templateId": "qwen_product_relight", "verificationStatus": "reviewed", "promptSettingsHash": "ps_11310482", - "templateLockHash": "tpl_b089cd60", + "templateLockHash": "tpl_3f651424", "modelRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:be3c2268c585c4f89b91ae2c16bc3e46989dd0f577b7585d46b40da41f67b0dd", - "proofLockHash": "sha256:live-proof-lock-v1:3ee0f0221440fd0848d7691abfd73bcc570edd325f3ced0b10caa0c777ef9dc9", - "backendSourceFingerprint": "sha256:backend-source-v1:3ec105fba29573215392fe08213cec918bad0a2de181fe39224a32e573cc4d78", - "backendContractFingerprint": "sha256:backend-contract-v1:c7deb20dde1f079d61d108d50287348de33a94920dcc728c11887e987f02445d", + "runtimeFingerprint": "sha256:stable-runtime-v1:b124653c52ca8adb470bfa9f53bae4acb19fbee7a48278d1b2283914b534682c", + "graphHash": "sha256:canonical-graph-v1:a488da713103c42460ad9a31a3af5ec44001f0c19acffad5a6f1e1f51e6f7a3d", + "proofLockHash": "sha256:live-proof-lock-v1:9d3922a3ddd954a87020120e5879b015ca8c2655af882d33b7638d47a6c423c5", + "backendSourceFingerprint": "sha256:backend-source-v1:b42ecb2bb1d7136527433bba088254bc0da42f94dce702d6849a72bfb3c8a730", + "backendContractFingerprint": "sha256:backend-contract-v1:c25b1dcf06c7ab6fd74433df9a4660f6c22179d00ecfea8fcd94c2c125b43ee9", "modelCommit": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "modelSetHash": "sha256:model-set-v1:17c315b5d6d53c90b928f6fab22efe305568dcea7458f66fc28773e8dc212f22", - "inputArtifactsHash": "sha256:input-artifacts-v1:674f69c041435c34a6052c2b71175eecfddc854c316cecd729c38ee0d70349d9", - "templateRevisionHash": "sha256:template-revision-v1:0684bb08aa6246011123ca92d686d0e1b0e42b801cb1dd201c7693c9c4e57d53", + "templateRevisionHash": "sha256:template-revision-v1:bb76a4a1526f192b4ce30a25b7cf7908766171fb1d6ac2c4b55073b1d23b3eb5", + "modelSetHash": "sha256:model-set-v1:e09af3b409345d16bf793174b4cd003c763fdfd20931624c4d30dd8b15c17fed", + "inputArtifactsHash": "sha256:input-artifacts-v1:58de9194e70bc204ec43189546150e09a6a3b863105cd6060c9ec61243fa51d9", "provenancePath": "/template-gallery/reviews/qwen_product_relight.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:b325007dec4e7931f4a6f2588ee54a15d258d8af5e779b0e77b64829f1aadf53", + "provenanceHash": "sha256:canonical-json:148d93c016ef37ace308533d1cee94a99da0224fad2f436a55cbf2bf7550e5d5", "outputPath": "/template-gallery/qwen_product_relight.webp", - "thumbnailPath": "/template-gallery/qwen_product_relight.webp", - "beforePath": "/template-gallery/inputs/qwen_product_relight.before.webp", - "beforeMediaHash": "sha256:bytes:f791a809c0df307cd7dafa8c54ae86bbe4c53d73afdacb2183ff8cdbeac994c2", - "afterPath": "/template-gallery/qwen_product_relight.webp", - "mediaHash": "sha256:decoded-rgba:35175a2cfd0c8b3c3851e3d953e787b9a4ba01425a9d7820db61379ddcd5e4fc", + "mediaHash": "sha256:decoded-rgba:8bdc1a2f5cceb5a3edcbb650d82d05109919e24449814369cdad167a906ab82b", "mediaType": "image", - "verificationTimestamp": "2026-07-14T16:00:07.581Z", + "verificationTimestamp": "2026-10-07T03:13:30.178Z", "qualityReviewPath": "/template-gallery/reviews/qwen_product_relight.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:ecc1e712d0e9fe78901982331eac7550fe9417828dc4abe03973b2fedb9175c8", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T16:00:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T17:00:35.452Z", "width": 1024, "height": 1024, - "templateInputContractHash": "tic_db4d8bbd" + "thumbnailPath": "/template-gallery/qwen_product_relight.webp", + "templateInputContractHash": "tic_db4d8bbd", + "beforePath": "/template-gallery/inputs/qwen_product_relight.before.webp", + "beforeMediaHash": "sha256:bytes:f791a809c0df307cd7dafa8c54ae86bbe4c53d73afdacb2183ff8cdbeac994c2", + "afterPath": "/template-gallery/qwen_product_relight.webp", + "qualityReviewHash": "sha256:canonical-json:6e4bd82d81235df26156de4f7e9492fe4ecf8b0c9af0ae1824086a3bd1c887c9" }, { "templateId": "qwen_text_rendering", + "verificationStatus": "reviewed", "promptSettingsHash": "ps_708dbbaf", - "templateLockHash": "tpl_0ffdab23", - "modelRevision": "unsloth/Qwen-Image-2512-unsloth-bnb-4bit@f50b8c24fe21e9265509b15113b7cca82d0a4443", - "runtimeFingerprint": "sha256:stable-runtime-v1:f151c87411b429ff3b4045806837ad9f4c11f805c7a97edc3111495c97c077e7", - "graphHash": "sha256:canonical-graph-v1:d18b95c590e2c41178da1aa645fdb6a421d71db7d100d481a833818a144b0ca3", - "proofLockHash": "sha256:live-proof-lock-v1:f776a55dc7957ebad524ad78b7d01121174a661aa5d01c5c74844963dde30e11", - "backendSourceFingerprint": "sha256:backend-source-v1:1a5cd33510acc57f6343f81aed99ebfc030eace0f45c12a28dd06288d4708829", - "backendContractFingerprint": "sha256:backend-contract-v1:c8cd3954102677d2228e9783d53ac17d15efd965ef9ccdf0e36cc6601c93b7ba", - "modelCommit": "f50b8c24fe21e9265509b15113b7cca82d0a4443", - "modelSetHash": "sha256:model-set-v1:234b853531abfa715b3cffad1ae35ae84db5eb7559db178138a0d11d8b16b5ae", + "templateLockHash": "tpl_e846c970", + "modelRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:66bf36ccb0e6a08ff9f93d2d57d00523dba02c23381e05127114b2ebe724caf7", + "proofLockHash": "sha256:live-proof-lock-v1:04ed557cd81ed35be80497f5c33883115ca4b3e0d42feefe961b1b0f09734029", + "backendSourceFingerprint": "sha256:backend-source-v1:f2abf44f5ca8acadbff85dbe3a906c84454d653c1663e3cdd742180a0b1ad8c8", + "backendContractFingerprint": "sha256:backend-contract-v1:961cb20eb19be2cb1632d7ea6bf8925ffb67659db5a6784e9fa23e8175f6a9b2", + "modelCommit": "25468b98e3276ca6700de15c6628e51b7de54a26", + "templateRevisionHash": "sha256:template-revision-v1:5493795590c8b54e5f2b94bfe078d03799af0772c1eeaddb1f67efc5fddd451f", + "modelSetHash": "sha256:model-set-v1:e3dbf7535fe3c2a4c44462791f4acf7e65eb4a3d780d379802e78a4d7855900c", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:8ce38bfcdc3b921482aa5e73b388f673233a0397f15d198f9af91309fc0453b9", - "provenancePath": "/template-gallery/reviews/qwen_text_rendering.duplicate-provenance.json", - "provenanceHash": "sha256:canonical-json:c6af711b512abc5214bf4128cdc8444c0d9c0852cbf3b6625c685eb8076ad938", + "provenancePath": "/template-gallery/reviews/qwen_text_rendering.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:f1e177d851b4befd4642ca07b4c5766e33fb6adcb0d38bb39270e2435689519a", "outputPath": "/template-gallery/qwen_text_rendering.webp", "thumbnailPath": "/template-gallery/qwen_text_rendering.webp", - "mediaHash": "sha256:decoded-rgba:ba9589aa3f98b09ac2b99d456ae854742f1985f99b98c5980f4ef0e75cea8372", + "mediaHash": "sha256:decoded-rgba:720a98c25975594fc8b377ac5dd21088040cecc254a1211b14d2c59a3ed6bce1", "mediaType": "image", - "verificationTimestamp": "2026-07-10T18:09:14.258Z", + "verificationTimestamp": "2026-11-09T16:57:32.656Z", "qualityReviewPath": "/template-gallery/reviews/qwen_text_rendering.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:9edc4c9864123bdf4badfb690415b286b869f78b7b803a47da1e8e011af1a81c", - "qualityReviewStatus": "approved_exact", - "reviewer": "Codex visual review", - "reviewedAt": "2026-07-10T18:07:59.752Z", + "qualityReviewHash": "sha256:canonical-json:959acfc542c991ce09513e1486e708fbe57c9227624ef19d464f06fa5ec4a42f", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-09T16:57:32.656Z", "width": 1024, "height": 1024 }, @@ -1823,102 +2295,102 @@ "templateId": "qwen_tile_extract", "verificationStatus": "reviewed", "promptSettingsHash": "ps_ea19fe34", - "templateLockHash": "tpl_a7bde12d", + "templateLockHash": "tpl_a266a20b", "modelRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:346a094666a8bffbf355a02e0484d4e8b911d4f71b0f24a0da4c8e7343323f97", - "proofLockHash": "sha256:live-proof-lock-v1:d356abad1e6d5c9c7cb05a7aa564e29f2fbe500a66749ff58c079266394cfde1", - "backendSourceFingerprint": "sha256:backend-source-v1:faa0861373c8c9d5e0bfd4a8e8632fb583c5161183d3bae36d5a2afaaa2479a0", - "backendContractFingerprint": "sha256:backend-contract-v1:e5dcbeccb4b5c03ab988fbc1812ad8de3de74bcebcf415f50af5899ce05eb859", + "runtimeFingerprint": "sha256:stable-runtime-v1:cb3b389c55cd75a485e3a9a9dbd3796e75aec5624fc17213b62cdc852c2a64a0", + "graphHash": "sha256:canonical-graph-v1:fd61bb26ceadcfc18554ce1f677b13e8f53d131a4cc6019e36061d0bdd766950", + "proofLockHash": "sha256:live-proof-lock-v1:b335bc8e7a09ff8bae1f3d109678ff43812b4e6de10c27ac38c866b0e513b9ff", + "backendSourceFingerprint": "sha256:backend-source-v1:bc56bdc71056b8d16a2a3f54a610b95b4adae83d3084ee665bf31235b8526132", + "backendContractFingerprint": "sha256:backend-contract-v1:76a97f0d684cea1c54b1f6744ee3323fa4777cbae3cc455cc2c6c280a9dca684", "modelCommit": "ac7f9318f633fc4b5778c59367c8128225f1e3de", - "modelSetHash": "sha256:model-set-v1:ee364f4fabd582f32eba45df4a9985f0475f5818248cbeacefbaa947525a9905", - "inputArtifactsHash": "sha256:input-artifacts-v1:bc3fa1ec7b0d6c1fa51eb4d0305c7e319d4cd676eac472324bdd25802ed0475f", - "templateRevisionHash": "sha256:template-revision-v1:2710cd2eea27ba7b38f4816761665344a1b43cd95eb2726e70115b927e04528e", + "templateRevisionHash": "sha256:template-revision-v1:ef802e14a0d4e8e1528442775ea88690eac8af4370565e6edb3fc98dcce784f5", + "modelSetHash": "sha256:model-set-v1:cd66b00328613364e435d714899942201a2f270afee675312d82931af3a88b6a", + "inputArtifactsHash": "sha256:input-artifacts-v1:638ed3a36099b64d3765ee5256fb08917cfc1314363f8ef20a724a7b38910f1d", "provenancePath": "/template-gallery/reviews/qwen_tile_extract.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:54ac0370a3a06e3365e1842070f98765ec086c6d229758219461753369ea4d12", + "provenanceHash": "sha256:canonical-json:70922ea8e499c94faa75cc2ebda04b5b694cc232f054c7d57cf7f4a4e0d789ca", "outputPath": "/template-gallery/qwen_tile_extract.webp", - "thumbnailPath": "/template-gallery/qwen_tile_extract.webp", - "beforePath": "/template-gallery/inputs/qwen_tile_extract.before.webp", - "beforeMediaHash": "sha256:bytes:6224e9ee47765858f2ec0c33679140d020cf3ad6e4fa2fa4557ef50f811aef0e", - "afterPath": "/template-gallery/qwen_tile_extract.webp", - "mediaHash": "sha256:decoded-rgba:76b9a798839b05d095905ed05d501570a35373afe418cfcb15a0b29dfc893fd8", + "mediaHash": "sha256:decoded-rgba:710e1e68bc51c4371b6ccb8a24f93c0809139fe2a6314f6a9a9d61b6a2d527b6", "mediaType": "image", - "verificationTimestamp": "2026-07-14T01:35:32.558Z", + "verificationTimestamp": "2026-10-07T01:24:19.416Z", "qualityReviewPath": "/template-gallery/reviews/qwen_tile_extract.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:982cfacb21487b15322a439a86cd26c0f1b8333f26f17aa6f718bdb5d365f181", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T01:35:45.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T17:00:35.452Z", "width": 1344, "height": 768, - "templateInputContractHash": "tic_319e3ec4" + "thumbnailPath": "/template-gallery/qwen_tile_extract.webp", + "templateInputContractHash": "tic_319e3ec4", + "beforePath": "/template-gallery/inputs/qwen_tile_extract.before.webp", + "beforeMediaHash": "sha256:bytes:6224e9ee47765858f2ec0c33679140d020cf3ad6e4fa2fa4557ef50f811aef0e", + "afterPath": "/template-gallery/qwen_tile_extract.webp", + "qualityReviewHash": "sha256:canonical-json:3b1ddecb76ed8bbbec72b0d8daaf270fc3980e2bfd43f4ce2648201e60d3e2a1" }, { "templateId": "qwen_upscale_finish", "verificationStatus": "reviewed", "promptSettingsHash": "ps_f83336de", - "templateLockHash": "tpl_c4f81030", + "templateLockHash": "tpl_7843f2e3", "modelRevision": "amd/realesrgan-x4plus@bda69abcaf525425b371622349e975245ae090c2 | Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:bd85fcd355156179a87d4cd12689d710354ab936a2e5a8dfa4cb245b1738b4fe", - "proofLockHash": "sha256:live-proof-lock-v1:24a56ce3e440b3158664dd14e03445291d623370cdf113f390b1838853fa37cd", - "backendSourceFingerprint": "sha256:backend-source-v1:bc2b4151d1717e531f3408cfb5203a4bc175b678f12660f3f1f365b72f16cc3c", - "backendContractFingerprint": "sha256:backend-contract-v1:8c7bc4395d2b50cf88babc8c7209c3f4080cc92594b9c317d4493591a1292087", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:0a51dc3ea619f7c9a3165ece757057dc04653147248fe3ff6acca18d6a750efd", + "proofLockHash": "sha256:live-proof-lock-v1:db745997fe9b9525d312c94c4d82f1dbd4df99ac0025f98b7f9661745ce91f14", + "backendSourceFingerprint": "sha256:backend-source-v1:f2abf44f5ca8acadbff85dbe3a906c84454d653c1663e3cdd742180a0b1ad8c8", + "backendContractFingerprint": "sha256:backend-contract-v1:18144d81a2b1dc7abd26641f7a920db60357380556827017a1c8739530e474ba", "modelCommit": "amd/realesrgan-x4plus@bda69abcaf525425b371622349e975245ae090c2 | Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", - "modelSetHash": "sha256:model-set-v1:9e06f59d32c9b5ba65d88bb3b68a0f53c380ef08a995ffdf84d2e18130a0b11d", - "inputArtifactsHash": "sha256:input-artifacts-v1:80dbce5bedd36237cd4b48482a68ab66b1b2bada60c74514c4ec0864764531b4", - "templateRevisionHash": "sha256:template-revision-v1:e7607409c065af78ff3e0a68565ed2f18d19ecf9d4aa22491370869e48fa91b5", + "templateRevisionHash": "sha256:template-revision-v1:894edfca4ccba545f46e09cd18a4f9ec63bbbb3d5538221ca29cbf11bda9ef5d", + "modelSetHash": "sha256:model-set-v1:e34c96f624c5523f86c292f8579045b35fa94938d2eafd82b7d06397ab74ef6c", + "inputArtifactsHash": "sha256:input-artifacts-v1:9861e7dfa10115fc39e315cf46e4d085411c3863986cc73c161577ff277167fd", "provenancePath": "/template-gallery/reviews/qwen_upscale_finish.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:232fd102a0b868e407f1a70504c539d59d27fa690633437fbfa6eeba3c01459b", + "provenanceHash": "sha256:canonical-json:f673af085caae2f8918361117b40014ec65af213aa62258fb5d6d326de6538b7", "outputPath": "/template-gallery/qwen_upscale_finish.webp", "thumbnailPath": "/template-gallery/qwen_upscale_finish.webp", - "beforePath": "/template-gallery/inputs/qwen_upscale_finish.before.webp", - "beforeMediaHash": "sha256:bytes:d13a97a9003a7c53e5220010a56e402e4a987cfdfef0c53b7204295dcfa2fefb", - "afterPath": "/template-gallery/qwen_upscale_finish.webp", - "mediaHash": "sha256:decoded-rgba:5fa8e80fb1d1d0c181e435b5ae8fd62a11997cb578dadfaf24a304690a4eef6b", + "mediaHash": "sha256:decoded-rgba:14df3a0c31238821f4f1c21503ed012bd11eec1f794f12ce4164dba737c0a4ce", "mediaType": "image", - "verificationTimestamp": "2026-07-13T22:51:45.069Z", + "verificationTimestamp": "2026-11-09T20:40:04.389Z", "qualityReviewPath": "/template-gallery/reviews/qwen_upscale_finish.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:803ed345600a938adb626e7bc39db85713fc58d6ac8f0b9cec31c925276bfd4b", + "qualityReviewHash": "sha256:canonical-json:4c751e7ce3fc6df6080ea2028b4c4914f8b69c2317c12d696f911b613a8456ec", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-13T22:50:48.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-09T20:40:04.389Z", "width": 2048, - "height": 2048 + "height": 2048, + "beforePath": "/template-gallery/inputs/qwen_upscale_finish.before.webp", + "beforeMediaHash": "sha256:bytes:a36d3e25a44989896f0add83aec1a0eaec297e353ab754d13e1eab1a336acadf", + "afterPath": "/template-gallery/qwen_upscale_finish.webp" }, { "templateId": "reference_fusion", "verificationStatus": "reviewed", "promptSettingsHash": "ps_d420606a", - "templateLockHash": "tpl_60c2bf07", + "templateLockHash": "tpl_31d162b1", "modelRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "runtimeFingerprint": "sha256:stable-runtime-v1:e760b5286bd9d74f90e86d7d3efce3be23e2332107982f7244cb7f3cc92219c8", - "graphHash": "sha256:canonical-graph-v1:846b4fbf647033db967edff30c61a8936bac2cc6a56b01e8ca01f37f08f30914", - "proofLockHash": "sha256:live-proof-lock-v1:d675e143b58fb2f0660b4599b7ce8f6802e5fcfc27a57bfb67dd361f0f9db9c2", - "backendSourceFingerprint": "sha256:backend-source-v1:3ec105fba29573215392fe08213cec918bad0a2de181fe39224a32e573cc4d78", - "backendContractFingerprint": "sha256:backend-contract-v1:c7deb20dde1f079d61d108d50287348de33a94920dcc728c11887e987f02445d", + "runtimeFingerprint": "sha256:stable-runtime-v1:5c61022abc0bb28824b5d21b769c7bdaeeed32630840c744c38a765a36e0bda1", + "graphHash": "sha256:canonical-graph-v1:c481cfe1d2dda7f51bccbec78191a2d5ae4908936ce6e90eb9f17336066d6b13", + "proofLockHash": "sha256:live-proof-lock-v1:114f0fed7c064243aebfde952be7f590810b1a8a678d271947af74cad47b6f99", + "backendSourceFingerprint": "sha256:backend-source-v1:5e3fcb9d5e7bd28201b74510a953afd65f3b9d4f52a495ddbf56437241bb7da2", + "backendContractFingerprint": "sha256:backend-contract-v1:c25b1dcf06c7ab6fd74433df9a4660f6c22179d00ecfea8fcd94c2c125b43ee9", "modelCommit": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", - "modelSetHash": "sha256:model-set-v1:17c315b5d6d53c90b928f6fab22efe305568dcea7458f66fc28773e8dc212f22", - "inputArtifactsHash": "sha256:input-artifacts-v1:9670ddef022945a8c25008d8dfe9918370357c97de9d95e0fac6167986e346f1", - "templateRevisionHash": "sha256:template-revision-v1:e6773608d143d8b19f6467d9eeb498924b66039b81e02a30afb00fe3e52ee89e", + "templateRevisionHash": "sha256:template-revision-v1:e63fb767e8d052d362476b1470230cb574b96837189e7b9561fb5e33d1b8f793", + "modelSetHash": "sha256:model-set-v1:e09af3b409345d16bf793174b4cd003c763fdfd20931624c4d30dd8b15c17fed", + "inputArtifactsHash": "sha256:input-artifacts-v1:6f8b00604a74dc55681da60f5fcb482eb8eb77ca60065e45860248d7d3ae9e91", "provenancePath": "/template-gallery/reviews/reference_fusion.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:5dfadc82f0e3dd8bcecccb7c35f0621db0f08e6cacf2dea85ec56719ced03148", + "provenanceHash": "sha256:canonical-json:ff4ece15d835e59b7d19fdb9f274e445af40a2df2f5c6755e4d468f135d5bbe8", "outputPath": "/template-gallery/reference_fusion.webp", - "thumbnailPath": "/template-gallery/reference_fusion.webp", - "beforePath": "/template-gallery/inputs/reference_fusion.before.webp", - "beforeMediaHash": "sha256:bytes:283b1cfb32b15fe6b31a29dce1f2b96026c1ad0826bf3f24aebebf4b6f9a4f07", - "afterPath": "/template-gallery/reference_fusion.webp", - "mediaHash": "sha256:decoded-rgba:0c1ac6afd24ca529b98bda9d5709dddab870a0c3fde0feed59ac06fb5b10d7ff", + "mediaHash": "sha256:decoded-rgba:ee7059231f0e934b649b03f2947d808e1f331534909b59dd102d0f5ef4e90674", "mediaType": "image", - "verificationTimestamp": "2026-07-14T16:31:19.499Z", + "verificationTimestamp": "2026-10-06T22:33:41.618Z", "qualityReviewPath": "/template-gallery/reviews/reference_fusion.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:6849aa92ad4cce66a58526f7ea23fccc1311c734d9cd78072d0889913d7887ab", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-14T16:31:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-10T17:00:35.452Z", "width": 1024, "height": 1024, - "templateInputContractHash": "tic_457d4adc" + "thumbnailPath": "/template-gallery/reference_fusion.webp", + "templateInputContractHash": "tic_457d4adc", + "beforePath": "/template-gallery/inputs/reference_fusion.before.webp", + "beforeMediaHash": "sha256:bytes:283b1cfb32b15fe6b31a29dce1f2b96026c1ad0826bf3f24aebebf4b6f9a4f07", + "afterPath": "/template-gallery/reference_fusion.webp", + "qualityReviewHash": "sha256:canonical-json:35b01dfecc4154ad5865707d9ee16298a9b07c9a99fb3f3a15b5d8a3d76304f4" }, { "templateId": "wan_22_ti2v_5b_seed_vault", @@ -1959,219 +2431,306 @@ { "templateId": "wan_vace_cinematic_text_to_video", "verificationStatus": "reviewed", - "promptSettingsHash": "ps_18f1f262", - "templateLockHash": "tpl_cb4677fd", + "templateLockHash": "tpl_8f8c7c78", "modelRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", - "runtimeFingerprint": "sha256:stable-runtime-v1:a1bb688020dc8225508ce1bdead3dcc2da0d27ce7ccfe0c83cca13e3c69ec606", - "graphHash": "sha256:canonical-graph-v1:a466721d29cd00348b3bdf6a9390c6271083e80ca1ac4c9806870fe476aec829", - "proofLockHash": "sha256:live-proof-lock-v1:16e5613bb167680cbf210a410d6f21bd143a568f689e61abd9fb2d89728e6785", - "backendSourceFingerprint": "sha256:backend-source-v1:d87e3a14c747fafb3350a4678a7f24569a36482551153716cd8e3937618d1b73", - "backendContractFingerprint": "sha256:backend-contract-v1:9dff53fa212ab8d334e33235639d9df0ce94a0254a2f63656ed16b3806f8575c", + "runtimeFingerprint": "sha256:stable-runtime-v1:5acd21894e0430d2571a8e032b78276c763f76c2b2481a9387aeea87fd945cba", + "graphHash": "sha256:canonical-graph-v1:0bdf33cb4d41dc7b1d5f0c94e8d51df1ce887aca44367ba9667b1ecc8a04b14a", + "proofLockHash": "sha256:live-proof-lock-v1:c20da90e22b38a7f208b59e946dd00cda01d6711440326ec2a921a727e95afd3", + "backendSourceFingerprint": "sha256:backend-source-v1:2987ca8c56730f0622cd8033c7e6ddc760bd35e0c5e50a1555ca3870a80cd141", + "backendContractFingerprint": "sha256:backend-contract-v1:95efe9d3a6e783f7329c33f3d4138e788864f35cfbc7617b558fd59a5455b8f4", "modelCommit": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", - "modelSetHash": "sha256:model-set-v1:9686e62f8f9fa106a020e96c9962b9a37913930c2dc5ba7c50fcf77b1fa4f877", + "templateRevisionHash": "sha256:template-revision-v1:8889cc2d00dfb70498b045a3212bce6c3d1504098652ba673adb563c6a69fab8", + "promptSettingsHash": "ps_18f1f262", + "modelSetHash": "sha256:model-set-v1:04694ef93717159a4f42801de5646c620f1ee2c6139991b07c9a0b0647073ffb", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:adcd1e7c18a026d47d86c691a95162f8f360ffab5052a9386f124ec82c104b72", "provenancePath": "/template-gallery/reviews/wan_vace_cinematic_text_to_video.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:d4cfa90299ef2bdaaa3adab8a058d46ef237d1075d87011e72be2e820e0bc267", + "provenanceHash": "sha256:canonical-json:5fa2db3751b8d646d1a18968f5fce7cd3c8f076132ad671cc6932861278e601e", "outputPath": "/template-gallery/wan_vace_cinematic_text_to_video.mp4", "thumbnailPath": "/template-gallery/wan_vace_cinematic_text_to_video.poster.png", - "mediaHash": "sha256:decoded-video-framemd5:90c748daac6a792f840a5c86ccc75a98787f775a04b0cd91a2c744b00c725784", + "mediaHash": "sha256:decoded-video-framemd5:6af9cc03bcdddcefc032525a1b7d25908c757cb63255083e1e52452754ab3089", "mediaType": "video", - "verificationTimestamp": "2026-07-24T07:29:06.768Z", + "verificationTimestamp": "2026-11-15T03:16:24.151Z", "qualityReviewPath": "/template-gallery/reviews/wan_vace_cinematic_text_to_video.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:107eaab6e25c33120e9cd8bfe0c2e9239ba57b8a76de480af1fd67822c3dc635", + "qualityReviewHash": "sha256:canonical-json:37893e6bfe808fbadb147207c9250742e57761efe6ee6d70b59ff730bd982fd4", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex full-frame temporal, realism, and card-size review", - "reviewedAt": "2026-07-24T07:30:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-15T03:16:24.151Z", + "supplementaryRecords": [ + "/template-gallery/history/wan_vace_cinematic_text_to_video.before-native-20261115/wan_vace_cinematic_text_to_video.mp4", + "/template-gallery/history/wan_vace_cinematic_text_to_video.before-native-20261115/wan_vace_cinematic_text_to_video.poster.png", + "/template-gallery/history/wan_vace_cinematic_text_to_video.before-native-20261115/wan_vace_cinematic_text_to_video.card-preview.mp4", + "/template-gallery/history/wan_vace_cinematic_text_to_video.before-native-20261115/reviews/wan_vace_cinematic_text_to_video.reviewed-provenance.json", + "/template-gallery/history/wan_vace_cinematic_text_to_video.before-native-20261115/reviews/wan_vace_cinematic_text_to_video.quality-review.json", + "/template-gallery/history/wan_vace_cinematic_text_to_video.before-native-20261115/entry-and-recipe.json", + "/template-gallery/recipes/wan_vace_cinematic_text_to_video.native-20261115.json" + ], "width": 1664, "height": 960, "frames": 81, - "durationSeconds": 5.06, + "durationSeconds": 5.0625, "cardPreviewPath": "/template-gallery/wan_vace_cinematic_text_to_video.card-preview.mp4", - "cardPreviewSha256": "sha256:bytes:58c230e968510c26bc2ea6131e64791a057d31ee3e3bd0fe6d7a062b0545b356" + "cardPreviewSha256": "sha256:bytes:2293ea940f855c1defa2616d27da0aeb1362c429b1c0de1fc5a97d035c367620" }, { "templateId": "wan_vace_grayscale_control", "verificationStatus": "reviewed", - "promptSettingsHash": "ps_aadef002", - "templateLockHash": "tpl_cffe66bc", + "templateLockHash": "tpl_88a1775e", "modelRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", - "runtimeFingerprint": "sha256:stable-runtime-v1:a1bb688020dc8225508ce1bdead3dcc2da0d27ce7ccfe0c83cca13e3c69ec606", - "graphHash": "sha256:canonical-graph-v1:ab9b9123da0c6bc16173b6589c07d1210655a3b5da1ce375bbaae52f9bb61099", - "proofLockHash": "sha256:live-proof-lock-v1:f4847c14cd57101778a23a2b65bf56f72137bab82dd6f0bc4ea1481d74f0564c", - "backendSourceFingerprint": "sha256:backend-source-v1:1ad8fa4d63938bb178034bbd5362849e8f43027364efeec13f44778fe39e6bcd", - "backendContractFingerprint": "sha256:backend-contract-v1:75eb096b2c035d7b265389f07f32d7c27af2b5ca8e5bf2737c2bb0ff03861008", + "runtimeFingerprint": "sha256:stable-runtime-v1:5acd21894e0430d2571a8e032b78276c763f76c2b2481a9387aeea87fd945cba", + "graphHash": "sha256:canonical-graph-v1:327e75c080d1b45186672422b145174c35cb9a861dfcefc33288cb1e022e989b", + "proofLockHash": "sha256:live-proof-lock-v1:84d33029da6557a07b14fde25d776b33b82675974828e617b7c3792039e39b14", + "backendSourceFingerprint": "sha256:backend-source-v1:2987ca8c56730f0622cd8033c7e6ddc760bd35e0c5e50a1555ca3870a80cd141", + "backendContractFingerprint": "sha256:backend-contract-v1:b01014495fc42938d6b341716ed33795dcf7d7bb59763335dd646350f5e7a83f", "modelCommit": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "templateRevisionHash": "sha256:template-revision-v1:6d73446e4be386eb9ca3a194984e3f23088946aad1ed7003f5dc67daa8c49864", + "promptSettingsHash": "ps_aadef002", + "templateInputContractHash": "tic_f649979c", "modelSetHash": "sha256:model-set-v1:2f29895d65a3be6a321bdd5abde7a5409dd1ca407b2c8e89f6a259207ef2b118", - "inputArtifactsHash": "sha256:input-artifacts-v1:d2873186557ad5d6f55e9e530852d481584aecad4869a3a42d15f72901a721a6", - "templateRevisionHash": "sha256:template-revision-v1:a73170d75530e02646f0e813b06268736f854de3fe65a8a86abeef58b0a9bfe0", + "inputArtifactsHash": "sha256:input-artifacts-v1:6f43759dc315b522a28cc41061961949aaa0c081b0e9ae5818e355d192f66535", "provenancePath": "/template-gallery/reviews/wan_vace_grayscale_control.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:41a5225604f8cbe7421149b7067c64edbe2f5eb1553401dceead71cf0416e220", + "provenanceHash": "sha256:canonical-json:21fab88a41a3f487f17a324c7705d0ea5a20114e17c21608b6020c1f899b46e5", "outputPath": "/template-gallery/wan_vace_grayscale_control.mp4", "thumbnailPath": "/template-gallery/wan_vace_grayscale_control.poster.png", - "beforePath": "/template-gallery/inputs/wan_vace_grayscale_control.before.mp4", - "beforeMediaHash": "sha256:bytes:748b164fd91bc2eed97f7c1d1125a04496a056f29cc016d7cc0da3734c2303b7", - "beforeSourceMediaHash": "sha256:bytes:e0f19676addbba6fe954711c235878ef43495e8066b84ed70b5c240a8512b026", - "afterPath": "/template-gallery/wan_vace_grayscale_control.mp4", - "mediaHash": "sha256:decoded-video-framemd5:8fd3de4a87dd383d04908842fc441bc87842d69e25ea188042d0ae6bc6f18a51", + "mediaHash": "sha256:decoded-video-framemd5:a4d2a9436aab3f936167a39e1ea3b9aab41c66d94f269397784d2fe577978157", "mediaType": "video", - "verificationTimestamp": "2026-07-22T14:03:46.269Z", + "verificationTimestamp": "2026-11-15T03:16:24.151Z", "qualityReviewPath": "/template-gallery/reviews/wan_vace_grayscale_control.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:d916e0af5a2768cba3a8aec3ee15d614a4159d3ab08c5bcfb53743af6a8bffa5", + "qualityReviewHash": "sha256:canonical-json:14e44ce84f568ef803fe499ed3b99b60f4cc60935bddf86b8d1082897f1abe54", "qualityReviewStatus": "approved_reviewed", - "reviewer": "User approval ('these looks good') with Codex full-playback, control-source, motion, and technical review", - "reviewedAt": "2026-07-22T19:30:51+05:30", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-15T03:16:24.151Z", + "supplementaryRecords": [ + "/template-gallery/history/wan_vace_grayscale_control.before-native-20261115/wan_vace_grayscale_control.mp4", + "/template-gallery/history/wan_vace_grayscale_control.before-native-20261115/wan_vace_grayscale_control.poster.png", + "/template-gallery/history/wan_vace_grayscale_control.before-native-20261115/inputs/wan_vace_grayscale_control.before.mp4", + "/template-gallery/history/wan_vace_grayscale_control.before-native-20261115/wan_vace_grayscale_control.card-preview.mp4", + "/template-gallery/history/wan_vace_grayscale_control.before-native-20261115/reviews/wan_vace_grayscale_control.reviewed-provenance.json", + "/template-gallery/history/wan_vace_grayscale_control.before-native-20261115/reviews/wan_vace_grayscale_control.quality-review.json", + "/template-gallery/history/wan_vace_grayscale_control.before-native-20261115/entry-and-recipe.json", + "/template-gallery/recipes/wan_vace_grayscale_control.native-20261115.json" + ], "width": 1664, "height": 960, "frames": 81, - "durationSeconds": 5.06, + "durationSeconds": 5.0625, "cardPreviewPath": "/template-gallery/wan_vace_grayscale_control.card-preview.mp4", - "cardPreviewSha256": "sha256:bytes:1ca73ab55f51fbe4eb08d4de5a2fa0c1c9654cf77909f2626aab0414a35f5985", - "templateInputContractHash": "tic_f649979c" + "cardPreviewSha256": "sha256:bytes:9304d9a3047069720679a6035132b364bca408a6328b373a7386afa86bd9bf12", + "beforePath": "/template-gallery/inputs/wan_vace_grayscale_control.before.mp4", + "beforeMediaHash": "sha256:bytes:748b164fd91bc2eed97f7c1d1125a04496a056f29cc016d7cc0da3734c2303b7", + "beforeSourceMediaHash": "sha256:bytes:e0f19676addbba6fe954711c235878ef43495e8066b84ed70b5c240a8512b026", + "afterPath": "/template-gallery/wan_vace_grayscale_control.mp4" }, { "templateId": "wan_vace_outpaint_reframe", "verificationStatus": "reviewed", - "promptSettingsHash": "ps_416c333c", - "templateLockHash": "tpl_5def3404", - "templateInputContractHash": "tic_b1b0ade3", + "templateLockHash": "tpl_3f657366", "modelRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", - "runtimeFingerprint": "sha256:stable-runtime-v1:a1bb688020dc8225508ce1bdead3dcc2da0d27ce7ccfe0c83cca13e3c69ec606", - "graphHash": "sha256:canonical-graph-v1:e9205c1394a6d3931cd430aa1dcda3fbb98820dcb742b48c90616837157252e2", - "proofLockHash": "sha256:live-proof-lock-v1:70c7a746d5bde0a0d1d94b740cff54f78a955e86e000b366211c99e7030ea72a", - "backendSourceFingerprint": "sha256:backend-source-v1:1ad8fa4d63938bb178034bbd5362849e8f43027364efeec13f44778fe39e6bcd", - "backendContractFingerprint": "sha256:backend-contract-v1:2b3db3b72ef7f0b68693aa2bf74a07b9cada7bf3b1b866a512040528e4149ca3", + "runtimeFingerprint": "sha256:stable-runtime-v1:5acd21894e0430d2571a8e032b78276c763f76c2b2481a9387aeea87fd945cba", + "graphHash": "sha256:canonical-graph-v1:51dab0ee496adabae920a99cdf8576f9b8ca94ae7b188baed3263f9ab2a94e6e", + "proofLockHash": "sha256:live-proof-lock-v1:0526a64b976874d9869d3a569a6468aedbc78762b6dbf1c8400db357bd83d7c0", + "backendSourceFingerprint": "sha256:backend-source-v1:2987ca8c56730f0622cd8033c7e6ddc760bd35e0c5e50a1555ca3870a80cd141", + "backendContractFingerprint": "sha256:backend-contract-v1:8619725073930ea8e5133f89e075d396a2cdd5f39603220403b32a62de2e8cd9", "modelCommit": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "templateRevisionHash": "sha256:template-revision-v1:f82b8b934f78a7c0b984635c78427b840c82adc0f0aed4632bedce825eecaf7e", + "promptSettingsHash": "ps_416c333c", + "templateInputContractHash": "tic_b1b0ade3", "modelSetHash": "sha256:model-set-v1:2f29895d65a3be6a321bdd5abde7a5409dd1ca407b2c8e89f6a259207ef2b118", - "inputArtifactsHash": "sha256:input-artifacts-v1:a59d1211d9767520fe42a6c934f44b4d8d5261b1d951c3cdb53ef949a3497668", - "templateRevisionHash": "sha256:template-revision-v1:e326824fd3ba5f090a0624f3560eff4cd0f763f881a5842aafd7398930c0d12a", + "inputArtifactsHash": "sha256:input-artifacts-v1:be8cdbb68db94918b5b20cc289f7c0c872c2c206470e5f8ae3d15fcda32cecad", "provenancePath": "/template-gallery/reviews/wan_vace_outpaint_reframe.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:a1875b35974a9c1b6c6ef7eba17876f0ac9a198c11226bef33cf53f8f1a97691", + "provenanceHash": "sha256:canonical-json:dacfa6710e299947764956bfd087902d80095ebda5fb4323adf3d2a4ea49a0cd", "outputPath": "/template-gallery/wan_vace_outpaint_reframe.mp4", "thumbnailPath": "/template-gallery/wan_vace_outpaint_reframe.poster.png", - "beforePath": "/template-gallery/inputs/wan_vace_outpaint_reframe.before.mp4", - "beforeMediaHash": "sha256:bytes:a8f28e04d03c9a6a2ba0b3ba4bf7db08f6ec99c45d962877cbc91aad5f3ad318", - "beforeSourceMediaHash": "sha256:bytes:101d50449cc4d74257e88e87fb750363bfe538c58b601b340fb3ce9031c2ed03", - "afterPath": "/template-gallery/wan_vace_outpaint_reframe.mp4", - "mediaHash": "sha256:decoded-video-framemd5:9fbb3cfc03a3605a93b617e3b4c0538e583963fb17e876fa6cff21395f4c5544", + "mediaHash": "sha256:decoded-video-framemd5:857665950f36974777e354165a27ed04c5d234ef0e9544fde194adc5e5b1ec3a", "mediaType": "video", - "verificationTimestamp": "2026-07-22T13:06:52.925Z", + "verificationTimestamp": "2026-11-15T03:16:24.151Z", "qualityReviewPath": "/template-gallery/reviews/wan_vace_outpaint_reframe.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:7586e08a9de3d8accb77f1b6da0f01a6b7fd0a7f96430df201a03c21a32b6aa2", + "qualityReviewHash": "sha256:canonical-json:c9d81964a5223a93c169002a0f53ccac99099f1731db8a2d5ec4c70f33a271e5", "qualityReviewStatus": "approved_reviewed", - "reviewer": "User approval ('looks decent') with Codex full-frame, source-comparison, motion, and technical review", - "reviewedAt": "2026-07-22T18:35:00+05:30", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-15T03:16:24.151Z", + "supplementaryRecords": [ + "/template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/wan_vace_outpaint_reframe.mp4", + "/template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/wan_vace_outpaint_reframe.poster.png", + "/template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/inputs/wan_vace_outpaint_reframe.before.mp4", + "/template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/wan_vace_outpaint_reframe.card-preview.mp4", + "/template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/reviews/wan_vace_outpaint_reframe.reviewed-provenance.json", + "/template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/reviews/wan_vace_outpaint_reframe.quality-review.json", + "/template-gallery/history/wan_vace_outpaint_reframe.before-native-20261115/entry-and-recipe.json", + "/template-gallery/recipes/wan_vace_outpaint_reframe.native-20261115.json" + ], "width": 1664, "height": 960, "frames": 81, - "durationSeconds": 5.06, + "durationSeconds": 5.0625, "cardPreviewPath": "/template-gallery/wan_vace_outpaint_reframe.card-preview.mp4", - "cardPreviewSha256": "sha256:bytes:37c1f4b3a9787c6c6dac081ed3cabd2a42d2d0a9c2db10f1ac33a7a98e1ecea2" + "cardPreviewSha256": "sha256:bytes:d66c6566b92c98fd7dba24d9fbe34ada9dfd3e49ffc153d290b9b447b9e21232", + "beforePath": "/template-gallery/inputs/wan_vace_outpaint_reframe.before.mp4", + "beforeMediaHash": "sha256:bytes:a8f28e04d03c9a6a2ba0b3ba4bf7db08f6ec99c45d962877cbc91aad5f3ad318", + "beforeSourceMediaHash": "sha256:bytes:101d50449cc4d74257e88e87fb750363bfe538c58b601b340fb3ce9031c2ed03", + "afterPath": "/template-gallery/wan_vace_outpaint_reframe.mp4" }, { "templateId": "wan_vace_video_color_grade", "verificationStatus": "reviewed", - "promptSettingsHash": "ps_d0bb5ec5", - "templateLockHash": "tpl_40c9c988", + "templateLockHash": "tpl_27e9870c", "modelRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", - "runtimeFingerprint": "sha256:stable-runtime-v1:a1bb688020dc8225508ce1bdead3dcc2da0d27ce7ccfe0c83cca13e3c69ec606", - "graphHash": "sha256:canonical-graph-v1:80f9d09f6ce8aa57facf363eb4bfa549acd67055a81487020ef1e2c2627780b6", - "proofLockHash": "sha256:live-proof-lock-v1:86e6b1c8e85e90203eda68d9fd0601d3752463590b7b36502005eeec33be696c", - "backendSourceFingerprint": "sha256:backend-source-v1:3648bb6fecf4ceddc78e01f4b6e5bef563516556b24ec3fcdc9839c06c9035f3", - "backendContractFingerprint": "sha256:backend-contract-v1:75eb096b2c035d7b265389f07f32d7c27af2b5ca8e5bf2737c2bb0ff03861008", + "runtimeFingerprint": "sha256:stable-runtime-v1:5acd21894e0430d2571a8e032b78276c763f76c2b2481a9387aeea87fd945cba", + "graphHash": "sha256:canonical-graph-v1:b3e89344943c85f65a414527d101becf136e150ae6481bd114875ecd6d793082", + "proofLockHash": "sha256:live-proof-lock-v1:5681b7e9483fabb4463bba7e8e0864cd0fa6a3fd47d372fb3d28dc22162e9b68", + "backendSourceFingerprint": "sha256:backend-source-v1:2987ca8c56730f0622cd8033c7e6ddc760bd35e0c5e50a1555ca3870a80cd141", + "backendContractFingerprint": "sha256:backend-contract-v1:c0d1c25067c4028d0978a8fe300dc30a14a505e1fffa858d0a2a59970e2e0f8a", "modelCommit": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", - "modelSetHash": "sha256:model-set-v1:9686e62f8f9fa106a020e96c9962b9a37913930c2dc5ba7c50fcf77b1fa4f877", - "inputArtifactsHash": "sha256:input-artifacts-v1:bad4c6aa4138583a8d20e9917eef1d38b04d21e8b88af4924052d5fcb26d8b00", - "templateRevisionHash": "sha256:template-revision-v1:b5e763f6d9a5dc9a4bb03fb27bf7b9a23240825ca184d11ec3e571d92b5baa23", + "templateRevisionHash": "sha256:template-revision-v1:555f67671dcbde2e7970295b5096f62c44642a1048c7e2582a7d62786746922c", + "promptSettingsHash": "ps_d0bb5ec5", + "templateInputContractHash": "tic_0162a7c5", + "modelSetHash": "sha256:model-set-v1:04694ef93717159a4f42801de5646c620f1ee2c6139991b07c9a0b0647073ffb", + "inputArtifactsHash": "sha256:input-artifacts-v1:5930d83c16c17c6700c72cf04d493565f95f0f7662ef9e9669d88eba0cebee25", "provenancePath": "/template-gallery/reviews/wan_vace_video_color_grade.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:ec8b93956b8b8dee2102af2d28ad8566d9110bcc35f6354a112be9c593d31af0", + "provenanceHash": "sha256:canonical-json:afe0be4d1f08fb46bf4d4464e5326603dc1b482b12ddda0f6901f4df5fd893e7", "outputPath": "/template-gallery/wan_vace_video_color_grade.mp4", "thumbnailPath": "/template-gallery/wan_vace_video_color_grade.poster.png", - "beforePath": "/template-gallery/inputs/wan_vace_video_color_grade.before.mp4", - "beforeMediaHash": "sha256:bytes:934b4494442c732bfc27f3de1e1a8e99adf0eb96572bd6405f1a9c72da148289", - "beforeSourceMediaHash": "sha256:bytes:d86b921f1be36360b5b660b8a5b9d0e9165e888be8a06fe2d8f362e87de40429", - "afterPath": "/template-gallery/wan_vace_video_color_grade.mp4", - "mediaHash": "sha256:decoded-video-framemd5:8ebc6d043792cd6e73f040c49ca2a3891556e55a24f5a800171a7a63fde3bc03", + "mediaHash": "sha256:decoded-video-framemd5:043ed6e4bea6ca3d0d4e65266ee9cbbf760d6d39563c5e7ca407cf1e76415bde", "mediaType": "video", - "verificationTimestamp": "2026-07-24T07:29:15.481Z", + "verificationTimestamp": "2026-11-15T03:16:24.151Z", "qualityReviewPath": "/template-gallery/reviews/wan_vace_video_color_grade.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:70c4bf561ef46715550b71dbe7afed930aaaadf26890b1696066df37da2136e9", + "qualityReviewHash": "sha256:canonical-json:c1b251cbdd70593b9d9927f1e59d38c79c6d7c9977008b636fdf8e6c1bf11190", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex source-comparison, full-frame temporal, and card-size review", - "reviewedAt": "2026-07-24T07:32:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-15T03:16:24.151Z", + "supplementaryRecords": [ + "/template-gallery/history/wan_vace_video_color_grade.before-native-20261115/wan_vace_video_color_grade.mp4", + "/template-gallery/history/wan_vace_video_color_grade.before-native-20261115/wan_vace_video_color_grade.poster.png", + "/template-gallery/history/wan_vace_video_color_grade.before-native-20261115/inputs/wan_vace_video_color_grade.before.mp4", + "/template-gallery/history/wan_vace_video_color_grade.before-native-20261115/wan_vace_video_color_grade.card-preview.mp4", + "/template-gallery/history/wan_vace_video_color_grade.before-native-20261115/reviews/wan_vace_video_color_grade.reviewed-provenance.json", + "/template-gallery/history/wan_vace_video_color_grade.before-native-20261115/reviews/wan_vace_video_color_grade.quality-review.json", + "/template-gallery/history/wan_vace_video_color_grade.before-native-20261115/entry-and-recipe.json", + "/template-gallery/recipes/wan_vace_video_color_grade.native-20261115.json" + ], "width": 1664, "height": 960, "frames": 81, - "durationSeconds": 5.06, + "durationSeconds": 5.0625, "cardPreviewPath": "/template-gallery/wan_vace_video_color_grade.card-preview.mp4", - "cardPreviewSha256": "sha256:bytes:aaa8905d5b7e2b1c0cd8b7d7bf62d334db0ec6a8d2a943f73bc82f17026fa9bd", - "templateInputContractHash": "tic_0162a7c5" + "cardPreviewSha256": "sha256:bytes:9d86c293d91ea1f693901bffbafb1bc60899b577a01431a59fa9c0633b64f07a", + "beforePath": "/template-gallery/inputs/wan_vace_video_color_grade.before.mp4", + "beforeMediaHash": "sha256:bytes:934b4494442c732bfc27f3de1e1a8e99adf0eb96572bd6405f1a9c72da148289", + "beforeSourceMediaHash": "sha256:bytes:d86b921f1be36360b5b660b8a5b9d0e9165e888be8a06fe2d8f362e87de40429", + "afterPath": "/template-gallery/wan_vace_video_color_grade.mp4" }, { "templateId": "wan_vace_video_to_video", "verificationStatus": "reviewed", - "promptSettingsHash": "ps_2c67b5c6", - "templateLockHash": "tpl_14b256b3", + "templateLockHash": "tpl_304d1db9", "modelRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", - "runtimeFingerprint": "sha256:stable-runtime-v1:a1bb688020dc8225508ce1bdead3dcc2da0d27ce7ccfe0c83cca13e3c69ec606", - "graphHash": "sha256:canonical-graph-v1:55af48f8a4a59cb2898b65ac059c575cedd59ab5cb1408356611c4ae14ad271c", - "proofLockHash": "sha256:live-proof-lock-v1:7cd9e5652d6b6efb21da937ee1c853951d3cbfab2e14ac28f0cb6f9765b25abd", - "backendSourceFingerprint": "sha256:backend-source-v1:1ad8fa4d63938bb178034bbd5362849e8f43027364efeec13f44778fe39e6bcd", - "backendContractFingerprint": "sha256:backend-contract-v1:75eb096b2c035d7b265389f07f32d7c27af2b5ca8e5bf2737c2bb0ff03861008", + "runtimeFingerprint": "sha256:stable-runtime-v1:5acd21894e0430d2571a8e032b78276c763f76c2b2481a9387aeea87fd945cba", + "graphHash": "sha256:canonical-graph-v1:928210f3b4883a31c07b17ef4ee4af95795ef4f804bb96ef7fb41e75d18dfba0", + "proofLockHash": "sha256:live-proof-lock-v1:5ea96545228f07b11f24b656793b87006e1b2e75533f88c0c3bb693aba181b4f", + "backendSourceFingerprint": "sha256:backend-source-v1:2987ca8c56730f0622cd8033c7e6ddc760bd35e0c5e50a1555ca3870a80cd141", + "backendContractFingerprint": "sha256:backend-contract-v1:c0d1c25067c4028d0978a8fe300dc30a14a505e1fffa858d0a2a59970e2e0f8a", "modelCommit": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", - "modelSetHash": "sha256:model-set-v1:9686e62f8f9fa106a020e96c9962b9a37913930c2dc5ba7c50fcf77b1fa4f877", - "inputArtifactsHash": "sha256:input-artifacts-v1:9c2958566b12af971079a29fa8d91b4324ea253c6e40401cdf3c78d334abc4e7", - "templateRevisionHash": "sha256:template-revision-v1:de08a0c7a496485eb0a73b58e1c35eaa24a32e9a949a6e77034722f5c83e2405", + "templateRevisionHash": "sha256:template-revision-v1:0edfe4068bf645538a15cab5bcfe5eb1496bf927a487bd3cbd298549ef107ca5", + "promptSettingsHash": "ps_2c67b5c6", + "templateInputContractHash": "tic_38f22e60", + "modelSetHash": "sha256:model-set-v1:04694ef93717159a4f42801de5646c620f1ee2c6139991b07c9a0b0647073ffb", + "inputArtifactsHash": "sha256:input-artifacts-v1:0671cd63a6f2cf70868a967ef106691a82dce6f7ad07d69bd5f3f40e5b600143", "provenancePath": "/template-gallery/reviews/wan_vace_video_to_video.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:162c70bde9b72cfa80c18ca4d34f7f05a026679f993824d5086398ed33eea086", + "provenanceHash": "sha256:canonical-json:9ff04cfacfd2623849326d6a4907f6d55d777e48932be1b60c02fd7c5bbaab93", "outputPath": "/template-gallery/wan_vace_video_to_video.mp4", "thumbnailPath": "/template-gallery/wan_vace_video_to_video.poster.png", - "beforePath": "/template-gallery/inputs/wan_vace_video_to_video.before.mp4", - "beforeMediaHash": "sha256:bytes:1f5cd051f787fc878bed50d3c26cce840abe00c942d32e49492e544ac2f88cff", - "beforeSourceMediaHash": "sha256:bytes:218d83e0706fec201097582a6e5e00dc79f2d7d1ecb0badba2214c5ecaae1866", - "afterPath": "/template-gallery/wan_vace_video_to_video.mp4", - "mediaHash": "sha256:decoded-video-framemd5:5f0a74fd29a158ee33680760b20036b166952f2824ee474be9fe94d27b77b8ad", + "mediaHash": "sha256:decoded-video-framemd5:ac449a3be1540289da06478873e24f4ee2271728f59c1596797dd467705f7326", "mediaType": "video", - "verificationTimestamp": "2026-07-22T14:03:11.619Z", + "verificationTimestamp": "2026-11-15T03:16:24.151Z", "qualityReviewPath": "/template-gallery/reviews/wan_vace_video_to_video.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:8c6aa2adb343c3fa49e0536fbb6b1bf5f1f3d74d87515ac6ae7f25c43007a07d", + "qualityReviewHash": "sha256:canonical-json:43e1e3e735e04361270774b747177b58ef3939eceacb34919ca42c8605aecaea", "qualityReviewStatus": "approved_reviewed", - "reviewer": "User approval ('these looks good') with Codex full-playback, source-comparison, motion, and technical review", - "reviewedAt": "2026-07-22T19:30:51+05:30", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-15T03:16:24.151Z", + "supplementaryRecords": [ + "/template-gallery/history/wan_vace_video_to_video.before-native-20261115/wan_vace_video_to_video.mp4", + "/template-gallery/history/wan_vace_video_to_video.before-native-20261115/wan_vace_video_to_video.poster.png", + "/template-gallery/history/wan_vace_video_to_video.before-native-20261115/inputs/wan_vace_video_to_video.before.mp4", + "/template-gallery/history/wan_vace_video_to_video.before-native-20261115/wan_vace_video_to_video.card-preview.mp4", + "/template-gallery/history/wan_vace_video_to_video.before-native-20261115/reviews/wan_vace_video_to_video.reviewed-provenance.json", + "/template-gallery/history/wan_vace_video_to_video.before-native-20261115/reviews/wan_vace_video_to_video.quality-review.json", + "/template-gallery/history/wan_vace_video_to_video.before-native-20261115/entry-and-recipe.json", + "/template-gallery/recipes/wan_vace_video_to_video.native-20261115.json" + ], "width": 1664, "height": 960, "frames": 81, - "durationSeconds": 5.06, + "durationSeconds": 5.0625, "cardPreviewPath": "/template-gallery/wan_vace_video_to_video.card-preview.mp4", - "cardPreviewSha256": "sha256:bytes:7c0738aa477caae0852e7f4fad7fcfb36e9281dd1dbdc0ca091477876d38a074", - "templateInputContractHash": "tic_38f22e60" + "cardPreviewSha256": "sha256:bytes:1770ee434817acf2ebb504499b2201622b8d5a7597d0104b21f53f34e7151cb9", + "beforePath": "/template-gallery/inputs/wan_vace_video_to_video.before.mp4", + "beforeMediaHash": "sha256:bytes:1f5cd051f787fc878bed50d3c26cce840abe00c942d32e49492e544ac2f88cff", + "beforeSourceMediaHash": "sha256:bytes:218d83e0706fec201097582a6e5e00dc79f2d7d1ecb0badba2214c5ecaae1866", + "afterPath": "/template-gallery/wan_vace_video_to_video.mp4" + }, + { + "templateId": "wan_video_long_showcase", + "verificationStatus": "reviewed", + "templateLockHash": "tpl_06da8709", + "modelRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", + "runtimeFingerprint": "sha256:stable-runtime-v1:f7dfb201f8fce05c6fbc7d0bc9541f6d61eb5a7a8ff08bdca719a4d5648ea19a", + "graphHash": "sha256:canonical-graph-v1:687e6dc0fa43609083ca4be9963ec1d7465dcf242a95df15a608273cfb91ef6d", + "proofLockHash": "sha256:live-proof-lock-v1:44a972a5507829f34f234acbd75054cb19d385a4daf4a6e5124ebda091ca16a2", + "backendSourceFingerprint": "sha256:backend-source-v1:a4adaa00aa2609ffedfffbb31a68077aa2dabcf9fe028396660afdce1d3cb2a6", + "backendContractFingerprint": "sha256:backend-contract-v1:6b6aca705e4a4ac1392b8115a09df8e499fd3dda7e49e164ff0ff0cfc525c19e", + "modelCommit": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094 | Wan-AI/Wan2.1-T2V-1.3B-Diffusers@0fad780a534b6463e45facd96134c9f345acfa5b", + "templateRevisionHash": "sha256:template-revision-v1:cb507817b4f1f8d9b01265d40a65bff8c77459a054bf2267d3c710753822fd14", + "promptSettingsHash": "ps_b2825ba0", + "modelSetHash": "sha256:model-set-v1:04694ef93717159a4f42801de5646c620f1ee2c6139991b07c9a0b0647073ffb", + "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "provenancePath": "/template-gallery/reviews/wan_video_long_showcase.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:ca1623b25c8b80303b5458d940af2f2f9f6ebaaba6e39356e8f4ceed675d2e91", + "outputPath": "/template-gallery/wan_video_long_showcase.mp4", + "thumbnailPath": "/template-gallery/wan_video_long_showcase.poster.png", + "mediaHash": "sha256:decoded-video-framemd5:49a41fffc0f97e485742a5fdae0afe9533f2a322bb3b23e1aa7b8c2feced483e", + "mediaType": "video", + "verificationTimestamp": "2026-11-13T17:44:33.633Z", + "qualityReviewPath": "/template-gallery/reviews/wan_video_long_showcase.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:68680c977b6c6438cedb3f479fbfeaae8ab29348edc5745252dab399898adbaf", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-13T17:44:33.633Z", + "supplementaryRecords": [ + "/template-gallery/recipes/wan_video_long_showcase.v2.json" + ], + "width": 1664, + "height": 960, + "frames": 405, + "durationSeconds": 25.3125, + "cardPreviewPath": "/template-gallery/wan_video_long_showcase.card-preview.mp4", + "cardPreviewSha256": "sha256:bytes:b22af0bdf2f24727378d08ce00bd3700091c3595d99c5a9774d3ea4a01d790ce" }, { "templateId": "z_image_cinematic_contact_sheet", - "promptSettingsHash": "ps_4d895f84", - "templateLockHash": "tpl_2f93ef4b", + "promptSettingsHash": "ps_b1ca2b43", + "templateLockHash": "tpl_44b603f1", "modelRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", - "runtimeFingerprint": "sha256:stable-runtime-v1:f151c87411b429ff3b4045806837ad9f4c11f805c7a97edc3111495c97c077e7", - "graphHash": "sha256:canonical-graph-v1:cfd32a6e686a3c1335170cd3eb33d37bf87165f1b5c992df29c956e4b02472d5", - "proofLockHash": "sha256:live-proof-lock-v1:d26c32fef455057cb892a27a8ec989d3cc4dfd5f2fa9c65ee347c1b697ec12fb", - "backendSourceFingerprint": "sha256:backend-source-v1:1a5cd33510acc57f6343f81aed99ebfc030eace0f45c12a28dd06288d4708829", - "backendContractFingerprint": "sha256:backend-contract-v1:c5469fd532f0781003b105ead0f89737cf40b6ee46553a6aa7a99d6d3662f064", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:3532a8d17473918518a6c39096b677073cf61b0c7c5bacfbe6c89384a66f4109", + "proofLockHash": "sha256:live-proof-lock-v1:e1f15bad685268edc7145a159e0aef55153a4eb3b7f39e3219119c3cc1260db2", + "backendSourceFingerprint": "sha256:backend-source-v1:e73e8cabbb7f2d3f73284cfa513bbe7fa3164d487c6e606cf3b537630e3d6f70", + "backendContractFingerprint": "sha256:backend-contract-v1:961cb20eb19be2cb1632d7ea6bf8925ffb67659db5a6784e9fa23e8175f6a9b2", "modelCommit": "f332072aa78be7aecdf3ee76d5c247082da564a6", - "modelSetHash": "sha256:model-set-v1:e77e0a81a3ae63a90119d48d1eca37948eb840c7b29eed6bc12ef674fba10738", + "templateRevisionHash": "sha256:template-revision-v1:012e4977bd0a27de7acb96dfd6fd8f1071c8e7b7cdb9c9ffacce47ea1cf6fb10", + "modelSetHash": "sha256:model-set-v1:09839f362bbf3be38c280c4c3417b2735823b124d76c6f797f356e1ba3c8b1f8", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:22d63794c6a4bdac3d728b5963910c9326ddec038f36b5ffcfdf89c2dca7fd28", - "provenancePath": "/template-gallery/reviews/z_image_cinematic_contact_sheet.duplicate-provenance.json", - "provenanceHash": "sha256:canonical-json:cb388f60212dea5fe7b8fae639e53529338e65f05dfacc96a97d4542cc114488", + "provenancePath": "/template-gallery/reviews/z_image_cinematic_contact_sheet.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:73f718fd7673b7277a96b461d22dbc4f06031801dca18338adbec760bcb70975", "outputPath": "/template-gallery/z_image_cinematic_contact_sheet.webp", "thumbnailPath": "/template-gallery/z_image_cinematic_contact_sheet.webp", - "mediaHash": "sha256:decoded-rgba:7da641aa2af3893cd8997be8b87a88dfd614608e7ba92e96c1ad02e8aa8af638", + "mediaHash": "sha256:decoded-rgba:66ba3a9790c826427b2e1e83bf0cf7323ffe26ba374d6f40af1007e93dc02089", "mediaType": "image", - "verificationTimestamp": "2026-07-10T17:39:57.802Z", + "verificationTimestamp": "2026-11-08T20:34:02.779007+00:00", "qualityReviewPath": "/template-gallery/reviews/z_image_cinematic_contact_sheet.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:e333dff1932776567995208feec9d5f13ef890b9a89a4710f6c0d09a54db9043", - "qualityReviewStatus": "approved_exact", - "reviewer": "Codex visual review", - "reviewedAt": "2026-07-10T17:38:46.400Z", + "qualityReviewHash": "sha256:canonical-json:0516bbedbdfeeb11504f4c8e677495c66f00457f247395c4a7f17381e9b33f56", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-08T20:34:02.779007+00:00", + "verificationStatus": "reviewed", "width": 1344, "height": 768 }, @@ -2179,121 +2738,4304 @@ "templateId": "z_image_lora_style", "verificationStatus": "reviewed", "promptSettingsHash": "ps_5a8bff8c", - "templateLockHash": "tpl_4d3dfe10", + "templateLockHash": "tpl_eed3fd53", "modelRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 | youknownothing/v1-realism-v1-adapter-ZIT-lora@fd6d52d1199ad47f73c18db58339ad01ef766fa7", - "runtimeFingerprint": "sha256:stable-runtime-v1:63040a4327d52e83952a6e3236e25f2b45026f345548e67b8de1b077986ba4cb", - "graphHash": "sha256:canonical-graph-v1:3355891022186dea283b685f182f1aa1aebe5fa0e1623bbdd70501c60ceecbce", - "proofLockHash": "sha256:live-proof-lock-v1:47a0c25bc07caf63cf0f4e6d8cbbb8e73ebf3784036a5573ab9b8724f886cabb", - "backendSourceFingerprint": "sha256:backend-source-v1:7babb225c74d9690368ceb79aac6094d8af7841f60a833afb8f8b2d48cfbef73", - "backendContractFingerprint": "sha256:backend-contract-v1:98a8937624b75332b29fb7df907a4db84a1bbdd6ed8ae5ee36b50e95a1f6883a", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:f2f2b1248c46a4eb3820f6311becb11239b706e6eb45fd7104d6f13326ff4b92", + "proofLockHash": "sha256:live-proof-lock-v1:7bc47419aa997aadc81c2458608260ee365197e79a473dafaa869ab724f39149", + "backendSourceFingerprint": "sha256:backend-source-v1:8ee77c4c519e09c6ecefe5de49dde9fcc869fee3ac894e81d7d1a10c2ac5d7bc", + "backendContractFingerprint": "sha256:backend-contract-v1:220b7a37fef611350e95cefe30f23ff6ed14ef42c92e5d14b9d3ebe5ec7258b2", "modelCommit": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6 | youknownothing/v1-realism-v1-adapter-ZIT-lora@fd6d52d1199ad47f73c18db58339ad01ef766fa7", + "templateRevisionHash": "sha256:template-revision-v1:001294e6c8708769706c3b4ec941c07d4ae4d766a120177f86d0f58db83048f8", "modelSetHash": "sha256:model-set-v1:d538b7ec5e55f545c0d0400f899b3f01acbb682ad84b5e96ddb4ab901ac7ffa5", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:f4cb04bba9e43d1f6d89191218ba17797e04ae27c1aec27fea8c792f23147b82", "provenancePath": "/template-gallery/reviews/z_image_lora_style.reviewed-provenance.json", - "provenanceHash": "sha256:canonical-json:7eaa169f9579133cd41a93a4088c7fc5dbcde2c18f7846006413437109fc40c1", + "provenanceHash": "sha256:canonical-json:1089fb07d8c257948b002555579d2994da89d8a6d94f00f1fd95c2cbbbf16274", "outputPath": "/template-gallery/z_image_lora_style.webp", "thumbnailPath": "/template-gallery/z_image_lora_style.webp", - "mediaHash": "sha256:decoded-rgba:2f40355292d57e548d20320195471e4a6237c1df3bbf3420ff3bd805a0ee54b1", + "mediaHash": "sha256:decoded-rgba:b4728bc2254e93b751aee40d6df61d56b5fca24c61bee23358b9e36baee9813e", "mediaType": "image", - "verificationTimestamp": "2026-07-28T01:35:23.589Z", + "verificationTimestamp": "2026-11-09T07:12:13.927142+00:00", "qualityReviewPath": "/template-gallery/reviews/z_image_lora_style.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:9ef2bb26872bd06898b4cdd3c5bfb5211b050a1368afa51f562a151753d84c98", + "qualityReviewHash": "sha256:canonical-json:c92b4f0265efb1d5cc392eb9acb6d1970c350687447810c9bf00486529e305b4", "qualityReviewStatus": "approved_reviewed", - "reviewer": "Codex visual and technical review", - "reviewedAt": "2026-07-28T06:00:00.000Z", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-09T07:12:13.927142+00:00", "width": 1024, "height": 1024 }, { "templateId": "z_image_poster", - "verificationStatus": "exact", + "verificationStatus": "reviewed", "promptSettingsHash": "ps_64f668f4", - "templateLockHash": "tpl_e1ad2e38", + "templateLockHash": "tpl_cb6b1e99", "modelRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", - "runtimeFingerprint": "sha256:stable-runtime-v1:44da7de4a4af37673082dfd0b7cafd88f0228bd0d5ff2760f67b99c29bb388ce", - "graphHash": "sha256:canonical-graph-v1:e7f8a1526e0fc619ba7853b163344aa2eca0585078226c29107dd5b4c29d973b", - "proofLockHash": "sha256:live-proof-lock-v1:6b585db6fe75f55daa2a9b9f354fbba4ab70087e921ee1810181c0c1be7a2b66", - "backendSourceFingerprint": "sha256:backend-source-v1:366e2f1fb430e915abf4fd55c00c055e9f513704a7eca05a488ebef50142107c", - "backendContractFingerprint": "sha256:backend-contract-v1:f46faf0d8975fcbf347736666468971c318e26b328f0f992d676380ec7091e5f", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:3a8b2abeee51156ac0ba3286b31e4b5c6a6425f62e0c9c83079189493f179eba", + "proofLockHash": "sha256:live-proof-lock-v1:193dc5bdd688643e9bc02af0c54f7f43cc025d43c762d72b23e78cae2123e085", + "backendSourceFingerprint": "sha256:backend-source-v1:e73e8cabbb7f2d3f73284cfa513bbe7fa3164d487c6e606cf3b537630e3d6f70", + "backendContractFingerprint": "sha256:backend-contract-v1:961cb20eb19be2cb1632d7ea6bf8925ffb67659db5a6784e9fa23e8175f6a9b2", "modelCommit": "f332072aa78be7aecdf3ee76d5c247082da564a6", + "templateRevisionHash": "sha256:template-revision-v1:a65f6307e042a72656c1a0f7246f376d10d69e4959bc8640302848236f236b40", "modelSetHash": "sha256:model-set-v1:09839f362bbf3be38c280c4c3417b2735823b124d76c6f797f356e1ba3c8b1f8", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:c8ab5f51da023f649c45591ed20174b9bda5d14d5bac60cd90ceca9111f56fd8", - "provenancePath": "/template-gallery/reviews/z_image_poster.duplicate-provenance.json", - "provenanceHash": "sha256:canonical-json:835fbc78ccbee53601ccbaa73a961eb6d25d2126c174d6165a129883f4b117b3", + "provenancePath": "/template-gallery/reviews/z_image_poster.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:b70c56fbe117b86d9962da8b4b6134e41c95881b56bb06482c043cb65f6834c0", "outputPath": "/template-gallery/z_image_poster.webp", "thumbnailPath": "/template-gallery/z_image_poster.webp", - "mediaHash": "sha256:decoded-rgba:56037a33632744352c7f0396c151d1150314432a49b87c78e0b373d1acddb728", + "mediaHash": "sha256:decoded-rgba:2855bce589c08af61dae39760cc1d6d06101e429423a0ec8896b3ed97fb8c3d2", "mediaType": "image", - "verificationTimestamp": "2026-07-18T13:09:58.765Z", + "verificationTimestamp": "2026-11-09T07:12:13.927142+00:00", "qualityReviewPath": "/template-gallery/reviews/z_image_poster.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:c642474bbfdc18f0623cb43694119254137380ff1af7c0ef40577fb009cdbba8", - "qualityReviewStatus": "approved_exact", - "reviewer": "Codex full-resolution typography, material, lighting, and composition review", - "reviewedAt": "2026-07-18T13:04:00.000Z", + "qualityReviewHash": "sha256:canonical-json:a772c18181190011af07189fb40b73f70a63a426cd273da39bdc1af66e5631b2", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-09T07:12:13.927142+00:00", "width": 768, "height": 1344 }, { "templateId": "z_image_product_mockup", - "verificationStatus": "exact", + "verificationStatus": "reviewed", "promptSettingsHash": "ps_de549c3a", - "templateLockHash": "tpl_b033358c", + "templateLockHash": "tpl_e831e3ef", "modelRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", - "runtimeFingerprint": "sha256:stable-runtime-v1:44da7de4a4af37673082dfd0b7cafd88f0228bd0d5ff2760f67b99c29bb388ce", - "graphHash": "sha256:canonical-graph-v1:ec2474c88ea4d21126d9f2145897202b45247a5a075c3814f0675b41a1549b08", - "proofLockHash": "sha256:live-proof-lock-v1:611c19d4163f51ce17497ed6983c4d2951a978d2be2cd683bdd1612b8b429e18", - "backendSourceFingerprint": "sha256:backend-source-v1:366e2f1fb430e915abf4fd55c00c055e9f513704a7eca05a488ebef50142107c", - "backendContractFingerprint": "sha256:backend-contract-v1:f46faf0d8975fcbf347736666468971c318e26b328f0f992d676380ec7091e5f", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:65474d3ff6db33771dc49cf89486f3f75c3583cf6d8ce11535c4fbc4e9fadb98", + "proofLockHash": "sha256:live-proof-lock-v1:26adb1ef711bbeca5326a356b303acfb01c75a34f80666df157cca972ef8d789", + "backendSourceFingerprint": "sha256:backend-source-v1:e73e8cabbb7f2d3f73284cfa513bbe7fa3164d487c6e606cf3b537630e3d6f70", + "backendContractFingerprint": "sha256:backend-contract-v1:961cb20eb19be2cb1632d7ea6bf8925ffb67659db5a6784e9fa23e8175f6a9b2", "modelCommit": "f332072aa78be7aecdf3ee76d5c247082da564a6", + "templateRevisionHash": "sha256:template-revision-v1:38c0ffeecfa45d7dbf576743ec01675b8f03fc516e73dee9ce694eb28c79cce1", "modelSetHash": "sha256:model-set-v1:09839f362bbf3be38c280c4c3417b2735823b124d76c6f797f356e1ba3c8b1f8", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:333d20ea0864d4ed09afd6305540ed7ceef9b0c727c6cd6b6b4469820086912d", - "provenancePath": "/template-gallery/reviews/z_image_product_mockup.duplicate-provenance.json", - "provenanceHash": "sha256:canonical-json:f9bf237b7201d398f00f9830ae6d85ebf7cca960cb7c67ded835742438ab8ba2", + "provenancePath": "/template-gallery/reviews/z_image_product_mockup.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:01d496ec2f384288a84b38a7e3bf76ee0fe6d4f3584b9a1feef9aadb58654060", "outputPath": "/template-gallery/z_image_product_mockup.webp", "thumbnailPath": "/template-gallery/z_image_product_mockup.webp", - "mediaHash": "sha256:decoded-rgba:548adfb27380809bb92ca364bf12edd60a5e208eb2fa44765d6a68dd92dfdbba", + "mediaHash": "sha256:decoded-rgba:ed8cef267a8a5a666a15f17a94f9d9ba8dc81a12d2071cc3d24e8dab3d8c6c09", "mediaType": "image", - "verificationTimestamp": "2026-07-18T13:09:24.494Z", + "verificationTimestamp": "2026-11-09T07:12:13.927142+00:00", "qualityReviewPath": "/template-gallery/reviews/z_image_product_mockup.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:198f2ddb2186aaa2d8b3878919ee49ed4b68f0efc5a97cb79d9a61fc8f1bcdac", - "qualityReviewStatus": "approved_exact", - "reviewer": "Codex full-resolution product, material, lighting, and composition review", - "reviewedAt": "2026-07-18T13:04:00.000Z", + "qualityReviewHash": "sha256:canonical-json:99132b278b90aa0ce4b771edd722b421755faa8be7a032d4ee11b0cffaba5d36", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-09T07:12:13.927142+00:00", "width": 1024, "height": 1024 }, { "templateId": "z_image_quick_concept", - "verificationStatus": "exact", + "verificationStatus": "reviewed", "promptSettingsHash": "ps_deb9c712", - "templateLockHash": "tpl_a1a0cb57", + "templateLockHash": "tpl_de6c4faa", "modelRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", - "runtimeFingerprint": "sha256:stable-runtime-v1:44da7de4a4af37673082dfd0b7cafd88f0228bd0d5ff2760f67b99c29bb388ce", - "graphHash": "sha256:canonical-graph-v1:0fd70f0977c03c85657e66d04143031b93d191698c526c8e4e83f564f0d3d3ac", - "proofLockHash": "sha256:live-proof-lock-v1:10a17f0271aaa7109f8e8a9ec485a939304ab1b9ce6e05d3740bf4cc13459e7f", - "backendSourceFingerprint": "sha256:backend-source-v1:366e2f1fb430e915abf4fd55c00c055e9f513704a7eca05a488ebef50142107c", - "backendContractFingerprint": "sha256:backend-contract-v1:f46faf0d8975fcbf347736666468971c318e26b328f0f992d676380ec7091e5f", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2df766916fa781b410ca3f7d735f58fffc52f017315015703967f784a95609b", + "graphHash": "sha256:canonical-graph-v1:e71faa9d9207674b7f28717278244ab28957cb2541aed354faf9deff675e58d2", + "proofLockHash": "sha256:live-proof-lock-v1:04527050b5c866aa5a897f9b52b11216dcbfade2ba2100ab819cc4174e4794c1", + "backendSourceFingerprint": "sha256:backend-source-v1:f2abf44f5ca8acadbff85dbe3a906c84454d653c1663e3cdd742180a0b1ad8c8", + "backendContractFingerprint": "sha256:backend-contract-v1:961cb20eb19be2cb1632d7ea6bf8925ffb67659db5a6784e9fa23e8175f6a9b2", "modelCommit": "f332072aa78be7aecdf3ee76d5c247082da564a6", + "templateRevisionHash": "sha256:template-revision-v1:f047f79af4909a40958f295d3eaae40f35c24f9ba030c91ca9387ae78fcd7a1f", "modelSetHash": "sha256:model-set-v1:09839f362bbf3be38c280c4c3417b2735823b124d76c6f797f356e1ba3c8b1f8", "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", - "templateRevisionHash": "sha256:template-revision-v1:d6ddd71801839663c5491b18d41449435f12b48f339e72dfc0cdab8a15b6055b", - "provenancePath": "/template-gallery/reviews/z_image_quick_concept.duplicate-provenance.json", - "provenanceHash": "sha256:canonical-json:b31372ccaafbe892cfba14f5dc7cba122036f1ac5a2dd7597285c2bbc042d917", + "provenancePath": "/template-gallery/reviews/z_image_quick_concept.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:8bbc9899fb393d536e97e172132528e4180bb53007704c430f4f150261bac835", "outputPath": "/template-gallery/z_image_quick_concept.webp", "thumbnailPath": "/template-gallery/z_image_quick_concept.webp", - "mediaHash": "sha256:decoded-rgba:0106ab75f5dc501fd472d000c50654ab7213124b23305a2e7fddc5f05cca7f81", + "mediaHash": "sha256:decoded-rgba:8c0e06eb70e5692cff02b576177a87353c1ab65f2143973217caa24cbe7be062", "mediaType": "image", - "verificationTimestamp": "2026-07-18T13:15:01.728Z", + "verificationTimestamp": "2026-11-09T07:12:13.927142+00:00", "qualityReviewPath": "/template-gallery/reviews/z_image_quick_concept.quality-review.json", - "qualityReviewHash": "sha256:canonical-json:b5f98b7de814395ebd92e207602e448b17031ee809e30554733a9bd06b220e9b", - "qualityReviewStatus": "approved_exact", - "reviewer": "Codex full-resolution object, material, lighting, and composition review", - "reviewedAt": "2026-07-18T13:15:00.000Z", + "qualityReviewHash": "sha256:canonical-json:5143963a6538ab21434dac94e5d26f25be047186b605a623804b700dbf6ce0d9", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "SOURAV DAS", + "reviewedAt": "2026-11-09T07:12:13.927142+00:00", + "width": 1024, + "height": 1024 + }, + { + "templateId": "marigold_depth_synthetic_ramp", + "verificationStatus": "reviewed", + "promptSettingsHash": "ps_d0a17851", + "templateLockHash": "tpl_611e9ad6", + "modelRevision": "prs-eth/marigold-depth-lcm-v1-0@04a73502f7fd8fc5e59947b9df3b2266d71d6849", + "runtimeFingerprint": "sha256:stable-runtime-v1:ebd189f7f86f8999eb093b2a1fa0e1fe00e10547441978bc77e5c043faef0c39", + "graphHash": "sha256:canonical-graph-v1:ee35e710ecaf34a8a57d93fbefeea28b6a3795027ea8a3a872178501e852e06a", + "proofLockHash": "sha256:retained-template-association-v1:47b50a5a96940877dad71a45070d8be5d600714e0da976a025685b2c85a49bb2", + "backendSourceFingerprint": "sha256:backend-source-v1:8dd9a4d61d2c9c484e4167e38e7360d6b64a37d278e49771630e428189f5448b", + "backendContractFingerprint": "sha256:backend-contract-v1:d159675b024e7b008f6347cf9655169efaa55dc928ddd7e17aae1fab5ca6fb29", + "modelCommit": "04a73502f7fd8fc5e59947b9df3b2266d71d6849", + "templateRevisionHash": "4e43813ae0e4b664e4982545884644ec097eb0cc25e8f13ff549ac24c2f49ce1", + "provenancePath": "/template-gallery/reviews/marigold_depth_synthetic_ramp.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:e7d064f5b00bc0863632fb58b77902965f82854473e77c670a90875d59da5778", + "outputPath": "/template-gallery/marigold_depth_synthetic_ramp.webp", + "thumbnailPath": "/template-gallery/marigold_depth_synthetic_ramp.webp", + "mediaHash": "sha256:decoded-rgba:3ebd414a831aa7a59ea44ff860dff6d3f5faaaa903beac955a439c070328965b", + "mediaType": "image", + "verificationTimestamp": "2026-11-19T07:35:33.324Z", + "qualityReviewPath": "/template-gallery/reviews/marigold_depth_synthetic_ramp.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:41dae2dd93674967f86e9a5a7f743b1069b929efc5f6352b8504a1ffd17f4f79", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-19T13:32:10.468Z", + "beforePath": "/template-gallery/inputs/marigold_depth_synthetic_ramp.before.png", + "afterPath": "/template-gallery/marigold_depth_synthetic_ramp.webp", + "beforeMediaHash": "sha256:bytes:626815c78eaad46cad849732d1598b45b91700ce046c1ee3f4e2444db80aa32a", + "width": 64, + "height": 48 + }, + { + "templateId": "smollm2_rain_gauge", + "verificationStatus": "reviewed", + "promptSettingsHash": "ps_fe288802", + "templateLockHash": "tpl_a845a534", + "modelRevision": "HuggingFaceTB/SmolLM2-135M-Instruct@12fd25f77366fa6b3b4b768ec3050bf629380bac", + "runtimeFingerprint": "sha256:stable-runtime-v1:c3f958d708dd3ee72efdde2c6e7d222930e7589d4126c060673aad8aac924e35", + "graphHash": "sha256:canonical-graph-v1:285625f017e8de78e065d8fc32c9ce71ed9561b008cd5fa0e23ce9cda3dabefe", + "proofLockHash": "sha256:retained-template-association-v1:d98670f8315ee0c24bbcd76ccdf23137b75b49e64f60044650f5fd1cf4e83812", + "backendSourceFingerprint": "sha256:backend-source-v1:8dd9a4d61d2c9c484e4167e38e7360d6b64a37d278e49771630e428189f5448b", + "backendContractFingerprint": "sha256:backend-contract-v1:cb7aeec701fb0aba61ab0c4fdffd3efbbde9f359f0b22b127d29c83cd44c1d00", + "modelCommit": "12fd25f77366fa6b3b4b768ec3050bf629380bac", + "templateRevisionHash": "aab7cfcf15db94d4e3d1415e963cabc0cf7e6a4baafd243d4095539b1004545b", + "provenancePath": "/template-gallery/reviews/smollm2_rain_gauge.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:24092593d167efcd75bfe4570757dc9d70369c787a2fd0b110cd6c3571674f12", + "outputPath": "/template-gallery/smollm2_rain_gauge.json", + "thumbnailPath": "/template-gallery/smollm2_rain_gauge.json", + "mediaHash": "sha256:canonical-json:eded0eaac3bca300c0f7e7f8148788a54896e3124c2c7771daadf1395c8a7654", + "mediaType": "json", + "verificationTimestamp": "2026-11-19T07:50:15.253Z", + "qualityReviewPath": "/template-gallery/reviews/smollm2_rain_gauge.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:5ebd26412d8fac540666a597955d7e9afd43b8ba4cbdb58bc18adbad43be03fc", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-19T13:32:10.468Z" + }, + { + "templateId": "spandrel_x2_synthetic_gradient", + "verificationStatus": "reviewed", + "promptSettingsHash": "ps_e7556958", + "templateLockHash": "tpl_43c3b587", + "modelRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "runtimeFingerprint": "sha256:stable-runtime-v1:d1ce1bcfa35a3946d562bf90a663deadedaa79939c2c06cb9ac24c07f822dcc9", + "graphHash": "sha256:canonical-graph-v1:700b85c678b691dee3c8ad1e2ea6d4cc0017d1b12d47704e45e913e17f929451", + "proofLockHash": "sha256:retained-template-association-v1:8776b06a18e1b61c737fc9ee80ca907088853705131c457e78bbaf3140ae9dff", + "backendSourceFingerprint": "sha256:backend-source-v1:fd16f3acc76e08525b28215b603104d281e8ab26169b03076a112edbb7d100bb", + "backendContractFingerprint": "sha256:backend-contract-v1:bb13de17797e5bf1f3427f45b91f253013f7f0e590749710332783f28d251566", + "modelCommit": "42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "templateRevisionHash": "8de95b8b13a0636a37a7db672fbced2199e00e6719517c282f68f685bc5fd482", + "provenancePath": "/template-gallery/reviews/spandrel_x2_synthetic_gradient.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:c8e7a35440a517ff338c5faf58faf30571aa63b70152791edd01aa6557159d34", + "outputPath": "/template-gallery/spandrel_x2_synthetic_gradient.webp", + "thumbnailPath": "/template-gallery/spandrel_x2_synthetic_gradient.webp", + "mediaHash": "sha256:decoded-rgba:a292be547bc61295a658f09621a5a88cc0654008f0318147fef8a19faefa4cf0", + "mediaType": "image", + "verificationTimestamp": "2026-11-19T06:05:44.894Z", + "qualityReviewPath": "/template-gallery/reviews/spandrel_x2_synthetic_gradient.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:2951773a705fb79cadec86b280732b29921682e3bb9c97f1279acaee8b653e6f", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-19T18:08:33.393Z", + "beforePath": "/template-gallery/inputs/spandrel_x2_synthetic_gradient.before.png", + "afterPath": "/template-gallery/spandrel_x2_synthetic_gradient.webp", + "beforeMediaHash": "sha256:bytes:626815c78eaad46cad849732d1598b45b91700ce046c1ee3f4e2444db80aa32a", + "width": 128, + "height": 96 + }, + { + "templateId": "minimax_h3_image_old_town_cat", + "modelRevision": "MiniMaxAI/MiniMax-H3-Image@492fd8c4eca666f1085f57e30738c1e0d86b3439", + "templateLockHash": "tpl_6899b3b2", + "promptSettingsHash": "ps_f2030306", + "verificationStatus": "reviewed", + "graphHash": "sha256:canonical-graph-v1:90a99664972df28b447a871b2c180c266199f137944bf55d680c6ae9f281e8de", + "proofLockHash": "sha256:live-proof-lock-v1:b8b45ff63a5aa0b3f0e38714496fae710c0bb9d4acc811ab2a0afb8c049febd1", + "runtimeFingerprint": "sha256:stable-runtime-v1:e40a5952c842b037c3f2f293b9ad3292fd07e22cb791c60aadeb6afa420fdd24", + "backendSourceFingerprint": "sha256:backend-source-v1:002b2f76328c3160e4487de5441fa37807dbdc41718fe9d726e148813da068e8", + "backendContractFingerprint": "sha256:backend-contract-v1:8bae9eb12c4b7b61efc7fe7ea1c27be93f6cf4ffe2b17b9af695e9b0c6c495ff", + "modelCommit": "492fd8c4eca666f1085f57e30738c1e0d86b3439", + "modelSetHash": "sha256:model-set-v1:57ebfdd2342b7b2d42b3e4279633a38854eba1386c4e93aaa58c5c69543869f5", + "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "templateRevisionHash": "sha256:template-revision-v1:976c532eafd4ca7428ce3a59547619ad72ca0972855de1b3e4cc72c625032ef3", + "outputPath": "/template-gallery/showcases/h3-old-town-human-cat.webp", + "thumbnailPath": "/template-gallery/showcases/h3-old-town-human-cat.webp", + "mediaHash": "sha256:decoded-rgba:b499e978db7492bf2b863198bb1cc5143bc1934b6f2c2e4817c10f3f4832963a", + "mediaType": "image", + "width": 2048, + "height": 2048, + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-19T19:57:14.488Z", + "provenancePath": "/template-gallery/reviews/minimax_h3_image_old_town_cat.reviewed-provenance.json", + "provenanceHash": "sha256:canonical-json:b47d8e7bfdb37430658137dc9abe5321bfb5ccbc0856c289e1926847ded9000c", + "qualityReviewPath": "/template-gallery/reviews/minimax_h3_image_old_town_cat.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:f4b06e2e7e96ae7b9f476ca9d3a03ae3d799c54c3f07ed0a421ce4e662234a31", + "qualityReviewStatus": "approved_reviewed", + "verificationTimestamp": "2026-11-19T19:57:14.488Z" + }, + { + "templateId": "whisper_tiny_blue_cup_transcription", + "promptSettingsHash": "ps_254ff664", + "templateLockHash": "tpl_e533ed76", + "modelRevision": "openai/whisper-tiny@169d4a4341b33bc18d8881c4b69c2e104e1cc0af", + "runtimeFingerprint": "sha256:stable-runtime-v1:c413b61da4bb7d2d8fabbbacf42924d44e77161c68840f7c69de196e9b3815aa", + "graphHash": "sha256:canonical-graph-v1:b377ff0dee17374428c2deb83531bdee0b21eac105ea6e81fe705a41c4f98adb", + "proofLockHash": "sha256:retained-template-association-v1:ef75e5724204721987f43988a7ddbb9bdc79fb4c378bdca0af141d7ce5bdf834", + "backendSourceFingerprint": "sha256:backend-source-v1:674f8959f84e6b26f6ff04d8c7cdd2af9d9a5f4e438a325ecd4c042ecda9eeab", + "backendContractFingerprint": "sha256:backend-contract-v1:a54ff5dae2f71449c7a5b7cbb9f3db0277594d7e5117f892ecc21d4ce676f98f", + "modelCommit": "169d4a4341b33bc18d8881c4b69c2e104e1cc0af", + "templateRevisionHash": "f9e6bd0b708cc08d7068555be9f4094f68cc9aa6115639792339f50b38c2e35c", + "provenancePath": "/template-gallery/reviews/whisper_tiny_blue_cup_transcription.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:5ee8b9b7cd968d1e6998da556e58470eb449c3eae6ac9990cfeea8392b05fed6", + "outputPath": "/template-gallery/whisper_tiny_blue_cup_transcription.json", + "thumbnailPath": "/template-gallery/whisper_tiny_blue_cup_transcription.json", + "mediaHash": "sha256:canonical-json:ba0b1938f2962321a2b801c83cdfb42de6908a828303214ba1313116da5319fe", + "mediaType": "json", + "verificationTimestamp": "2026-11-20T15:39:15.190Z", + "qualityReviewPath": "/template-gallery/reviews/whisper_tiny_blue_cup_transcription.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:fccc92077f2c5e4e806b3b42136a169473886d965ca54e6bec82b619fb3ed3cc", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-20T19:22:56.000Z" + }, + { + "templateId": "lcm_dawn_alpine_lake", + "promptSettingsHash": "ps_614c9651", + "templateLockHash": "tpl_03de02cb", + "modelRevision": "SimianLuo/LCM_Dreamshaper_v7@a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5", + "runtimeFingerprint": "sha256:stable-runtime-v1:81c1e564602a0aaa60ba319af5a6d2fb21b9dc5a5489335a5f6cba911340bb29", + "graphHash": "sha256:canonical-graph-v1:80fc803df0e8e4fe9a90c302a88cadda57fb613ac3e67857f88fcb24ee7f0a8b", + "proofLockHash": "sha256:retained-template-association-v1:7fad851ee65290902ce375bd68b91871c4de372086de5d93d4d42a1eb3476ab9", + "backendSourceFingerprint": "sha256:backend-source-v1:56db5ad14d640c084f94cafa1e746939ebff60ac39d214f5d413dca61b94df66", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "modelCommit": "a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5", + "templateRevisionHash": "79ee258770b00a581d8e006b743cacd78ad992739353bcfcd724a920eb41fc8e", + "provenancePath": "/template-gallery/reviews/lcm_dawn_alpine_lake.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:1bd4c43b13def542b4564976dcb1503f4acc441c68295e55c819545f2e6f8ffc", + "outputPath": "/template-gallery/lcm_dawn_alpine_lake.webp", + "thumbnailPath": "/template-gallery/lcm_dawn_alpine_lake.webp", + "mediaHash": "sha256:decoded-rgba:cd79df39332538af601357f0652d2a0590e6b4cfbd64eb9aa5cd1f3b96086afb", + "mediaType": "image", + "verificationTimestamp": "2026-11-20T16:22:50.650Z", + "qualityReviewPath": "/template-gallery/reviews/lcm_dawn_alpine_lake.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:77136e34ecfe60b3886db742ff05fb9f81bb39903650eac3dc27ba903fbae2e0", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-20T19:22:56.000Z", + "beforePath": "/template-gallery/inputs/lcm_dawn_alpine_lake.before.webp", + "beforeMediaHash": "sha256:bytes:25fe06d8e93645bc6ff29928556a0cd654aa6d70178d435268b3d17e9188feaa", + "afterPath": "/template-gallery/lcm_dawn_alpine_lake.webp", + "width": 512, + "height": 512 + }, + { + "templateId": "sana_sprint_monochrome_tiger", + "promptSettingsHash": "ps_6cb5dccc", + "templateLockHash": "tpl_8be9c59d", + "modelRevision": "Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers@aa76e7f4f4928f378716b6716a2130fba3caf5b1", + "runtimeFingerprint": "sha256:stable-runtime-v1:86cbd0c11653c4c599d5eb3c2559aa63a0a7ec8c205bc89d37bc67cb82e285fe", + "graphHash": "sha256:canonical-graph-v1:e69d5c8fa5e75c1387b8dae436e44c580d3b1eb31267946c26b98049e2f7132c", + "proofLockHash": "sha256:retained-template-association-v1:c750198e9b68ec712a04f992e93451f1e8023185f9992b63475b88f3aec2aeaa", + "backendSourceFingerprint": "sha256:backend-source-v1:51be643787f3d45e45bed24df176137979ee0c8983fd86521cc2bcf45ad568ec", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "modelCommit": "aa76e7f4f4928f378716b6716a2130fba3caf5b1", + "templateRevisionHash": "7f1ac6b38c8f3fcc701921fe7f500b4717c4f1bfdf5cc2f059e934972923296b", + "provenancePath": "/template-gallery/reviews/sana_sprint_monochrome_tiger.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:edecb4d3879face43fcf6d23512307b1a078a688caa5f4d579dc6e2ce0e3afa2", + "outputPath": "/template-gallery/sana_sprint_monochrome_tiger.webp", + "thumbnailPath": "/template-gallery/sana_sprint_monochrome_tiger.webp", + "mediaHash": "sha256:decoded-rgba:abe5eb7eab08a9f78453c9aedbbb336af94d9c633efc4a5abb30eea5b8221a4f", + "mediaType": "image", + "verificationTimestamp": "2026-11-20T16:56:35.946Z", + "qualityReviewPath": "/template-gallery/reviews/sana_sprint_monochrome_tiger.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:56f0a406162e07665a67c1d4126b437a328690dc3be104de4eead7888a37b647", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-20T21:03:32.000Z", + "beforePath": "/template-gallery/inputs/sana_sprint_monochrome_tiger.before.webp", + "beforeMediaHash": "sha256:bytes:a99616590d7d8586a51a25bbe9e36b309f705bc80f2abaab04ac84f1e0d948e4", + "afterPath": "/template-gallery/sana_sprint_monochrome_tiger.webp", "width": 1024, "height": 1024 + }, + { + "templateId": "wav2vec2_station_announcement", + "promptSettingsHash": "ps_583a0762", + "templateLockHash": "tpl_51e4cb19", + "modelRevision": "facebook/wav2vec2-base-960h@22aad52d435eb6dbaf354bdad9b0da84ce7d6156", + "runtimeFingerprint": "sha256:stable-runtime-v1:51bd86273b54d35996cab8f90c9884f84513a199813ecd2dc36f7fb3ab1999f9", + "graphHash": "sha256:canonical-graph-v1:36c5afc09d6f5f3be0cf44ba472bc514313464e2c61616a1c934a254f137c1c1", + "proofLockHash": "sha256:retained-template-association-v1:744bc0abced124474f03240e240b1a820d646757eea3ddccad260b38f33d2261", + "backendSourceFingerprint": "sha256:backend-source-v1:98ee8d4a895829905e82d8fefeea42b93e55c96252a5456561eada6ffef3c764", + "backendContractFingerprint": "sha256:backend-contract-v1:0a28031ff08ae7b2858c04f373cdb65b75ee0a0bf66ba3ccec2a65ee033cdca9", + "modelCommit": "22aad52d435eb6dbaf354bdad9b0da84ce7d6156", + "templateRevisionHash": "fc0cb2cf3751967eb0ab2910d5b17fd0796bdf047cfc48871e5266346d925e37", + "provenancePath": "/template-gallery/reviews/wav2vec2_station_announcement.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:d4173d1919726f061fc4c2be89f510f5be75ed176662a579117d434b107ede02", + "outputPath": "/template-gallery/wav2vec2_station_announcement.json", + "thumbnailPath": "/template-gallery/wav2vec2_station_announcement.json", + "mediaHash": "sha256:canonical-json:782f1411a9387b269ccb02331e7b0d916be891a557459e650680afdf53634425", + "mediaType": "json", + "verificationTimestamp": "2026-11-21T03:22:14.027Z", + "qualityReviewPath": "/template-gallery/reviews/wav2vec2_station_announcement.quality-review.json", + "qualityReviewHash": "sha256:canonical-json:25491a0413f46367afc2a7f2bd139809327c90bef1def36728feca3e3f71353d", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-21T06:49:19.885Z" + }, + { + "templateId": "alpine_lake_in_oils", + "templateLockHash": "tpl_0816c26c", + "promptSettingsHash": "ps_9f1fefe2", + "modelRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "runtimeFingerprint": "sha256:stable-runtime-v1:615884f86efe6130396deadeb3748520462cbc6518b11525dd860f7c89bd2e06", + "graphHash": "sha256:canonical-graph-v1:e5a47286938233b67cc7bec938b43449fdbf4dd46a028f200cce4471158267e2", + "proofLockHash": "sha256:retained-template-association-v1:a653bf93cc3dd88ae7ffd1225ad636dcb31c403d897cd94bb233f3cfeba50c4a", + "backendSourceFingerprint": "sha256:backend-source-v1:3227569ff822090d00a80a3a88213d76d5ca43092d2918cec2494962457865a5", + "backendContractFingerprint": "sha256:backend-contract-v1:bd364fcd29020d51bb61f5f9bf320cf0bf562e718c645c21ffac8ed5a47b740d", + "modelCommit": "451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "templateRevisionHash": "81ebe61010abc66045694e149989c24310c3a181d46fab2b644ac0a0bafffcae", + "provenancePath": "/template-gallery/reviews/alpine_lake_in_oils.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:0a868caa1ef51006ccd51cff1916df9ba32b8985f1a0e6dedf017a328f724da5", + "outputPath": "/template-gallery/alpine_lake_in_oils.webp", + "thumbnailPath": "/template-gallery/alpine_lake_in_oils.webp", + "mediaHash": "sha256:decoded-rgba:28630f60ee9aa276630384ab6978b1bb3cac87231e44d175821516f8b71f6e90", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T18:29:34.403Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:922924843f50e743a76f20be1564dd8fe6641ad5678437e5b922f778d2a77b40", + "qualityReviewPath": "/template-gallery/reviews/alpine_lake_in_oils.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "beforePath": "/template-gallery/inputs/alpine_lake_in_oils.before.png", + "beforeMediaHash": "sha256:bytes:88290a96bc8d52f11f2d1e3c0c0e04c2027661816e54b57d7d4739d731ca1e75", + "afterPath": "/template-gallery/alpine_lake_in_oils.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/alpine_lake_in_oils.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/alpine_lake_in_oils.original-provenance.json" + }, + { + "templateId": "bookshop_at_blue_hour", + "templateLockHash": "tpl_14707aaf", + "promptSettingsHash": "ps_cf9a00e5", + "modelRevision": "baidu/ERNIE-Image-Turbo@bc68c81e2a1730a394d5fc9fae70713dee940140", + "runtimeFingerprint": "sha256:stable-runtime-v1:7bd1c3e58b5f9f51b038ccd48941de7a6759375ffde295a9c222ef5dafb43c56", + "graphHash": "sha256:canonical-graph-v1:f12eab7de9d1be025dee6d2466013865b35a67d145813a1faf68c1e4d0ff034c", + "proofLockHash": "sha256:retained-template-association-v1:808a32050500d247221d8799030cd8f152915c6f4243cd672f5719d1944fea04", + "backendSourceFingerprint": "sha256:backend-source-v1:371fd754663a95b1b06900df9a838042048466464b4bd5cfa7033c1b6eebe0e3", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "bc68c81e2a1730a394d5fc9fae70713dee940140", + "templateRevisionHash": "160e77d5c28132522b0cbf5f3102b812a4e8be9eff09f321db0c5853905cab5e", + "provenancePath": "/template-gallery/reviews/bookshop_at_blue_hour.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:18ee342fd9ecd21c60eb0af65683179f3b82a8f170bf31bb0d6b8f303d976cf7", + "outputPath": "/template-gallery/bookshop_at_blue_hour.webp", + "thumbnailPath": "/template-gallery/bookshop_at_blue_hour.webp", + "mediaHash": "sha256:decoded-rgba:2b3824950a21cddf861f4f4c005ebecbdfd19f4489f51c176570d169f3896665", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T14:48:46.445Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:e6346915598b15ac960f1ceba6da47eb24f05a145c6b79ceedf6ee1c67ca36a3", + "qualityReviewPath": "/template-gallery/reviews/bookshop_at_blue_hour.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/bookshop_at_blue_hour.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/bookshop_at_blue_hour.original-provenance.json" + }, + { + "templateId": "flowers_after_rain", + "templateLockHash": "tpl_3ba52cb2", + "promptSettingsHash": "ps_1e317563", + "modelRevision": "ATH-MaaS/Ovis-Image-7B@41be1c5821a92c970d63d7eb595a2fd3fe32b22e", + "runtimeFingerprint": "sha256:stable-runtime-v1:1e62f6df68904ea5b6fee68f381b6fd41e7e992b95810ae4f63e834f1f9157b1", + "graphHash": "sha256:canonical-graph-v1:12380dcafddc7153ecd5f02ced0b95c58031228dc7825e3914f22dae90489999", + "proofLockHash": "sha256:retained-template-association-v1:bf0f0326102196a56c140aa6f2146db8214ed34363c0c82c8dfa75474717d93d", + "backendSourceFingerprint": "sha256:backend-source-v1:43f2ed10792fc6167b963166287cf7d5a0429afa26029e6455b0418e2123be86", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "41be1c5821a92c970d63d7eb595a2fd3fe32b22e", + "templateRevisionHash": "a113786c4f56e30b9f8c024d9e71abd7e84419b59bafe097bee8cd40b7074687", + "provenancePath": "/template-gallery/reviews/flowers_after_rain.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:341216f07cdd54c33f396e8148a51497f78a0ee6a1a9ea73385fc4ba91ba0916", + "outputPath": "/template-gallery/flowers_after_rain.webp", + "thumbnailPath": "/template-gallery/flowers_after_rain.webp", + "mediaHash": "sha256:decoded-rgba:0df26d9ad6ba4c98f3150881ca40e871c0935ed6faf56bc556a363e0c0e4a9c9", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T23:44:54.021Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:4016b026d26cca0d1305c99246b53af97696172b0ab65221ab8987f982dff93c", + "qualityReviewPath": "/template-gallery/reviews/flowers_after_rain.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/flowers_after_rain.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/flowers_after_rain.original-provenance.json" + }, + { + "templateId": "forest_ferns", + "templateLockHash": "tpl_be9fadb4", + "promptSettingsHash": "ps_975f83ff", + "modelRevision": "zai-org/GLM-Image@2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4", + "runtimeFingerprint": "sha256:stable-runtime-v1:9a2e3ebfcb4726c4fcaacf213b020cce77b44d0c018e2108fcab689a7f7c7f79", + "graphHash": "sha256:canonical-graph-v1:ff052e8de129d2eef0f849f457336a1dfce83bd0b7443e1dc5802d0608e0781e", + "proofLockHash": "sha256:retained-template-association-v1:80b7fef0813c50d9c8263e98228658fd2687d55486c10e2fd46d2d56814e9fc1", + "backendSourceFingerprint": "sha256:backend-source-v1:43f2ed10792fc6167b963166287cf7d5a0429afa26029e6455b0418e2123be86", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4", + "templateRevisionHash": "6a6e34ea5e9b0dec925e0ce13a0422fc00c65754f867c44e3105bfdb9d03c305", + "provenancePath": "/template-gallery/reviews/forest_ferns.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:98104927b8280bcd4d6daed609f1028edbe91a963a3adb1a65bb0d76e49f8d50", + "outputPath": "/template-gallery/forest_ferns.webp", + "thumbnailPath": "/template-gallery/forest_ferns.webp", + "mediaHash": "sha256:decoded-rgba:22330df53c3861884025cc0c6faba5155aed75dc1bdbaa747d1011cf27262b52", + "mediaType": "image", + "verificationTimestamp": "2026-11-24T02:51:19.434Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:5634d68bad7c5d67140b8c87a3c56805660d111108f295528503317bd4dddb72", + "qualityReviewPath": "/template-gallery/reviews/forest_ferns.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/forest_ferns.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/forest_ferns.original-provenance.json" + }, + { + "templateId": "ochre_paper_pavilion", + "templateLockHash": "tpl_f93a2d5c", + "promptSettingsHash": "ps_f36e5dd5", + "modelRevision": "zai-org/CogView3-Plus-3B@5d70e40732ac0efac98524c51a7fa9c82707f1e5", + "runtimeFingerprint": "sha256:stable-runtime-v1:e3b8486eaafc5e672034487de12bec1dabb21ae630eaf41784ca0f655bcdc4e0", + "graphHash": "sha256:canonical-graph-v1:063bf00e554a6d90e9fab896c09f23b976d423fc4c82da89c7471ac21a81eb57", + "proofLockHash": "sha256:retained-template-association-v1:a4820e2df4178fa7605b08a43059ad741b00d81705ee3c07fe24c58caceb3674", + "backendSourceFingerprint": "sha256:backend-source-v1:272116bf77447dfb20b0899666ae417b68401993dd97ca438db63d91ff79cab6", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "5d70e40732ac0efac98524c51a7fa9c82707f1e5", + "templateRevisionHash": "b5e4c8446f01030c05a206290d9ed0c1e5035cd3110f0fb6a9e6e3c416ad5177", + "provenancePath": "/template-gallery/reviews/ochre_paper_pavilion.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:c234e5af255ecb51adaf5d0b0a038340508d2b2e638558557d84073642878856", + "outputPath": "/template-gallery/ochre_paper_pavilion.webp", + "thumbnailPath": "/template-gallery/ochre_paper_pavilion.webp", + "mediaHash": "sha256:decoded-rgba:fe55a20b8bb775c5a3f4b7132bd60406ef00182470fee330f44e8eba63646c25", + "mediaType": "image", + "verificationTimestamp": "2026-11-24T05:30:35.733Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:2ee7583a81353807e8fd312db5a206e1fea1ce0397f12b5aba7f2b08645e0542", + "qualityReviewPath": "/template-gallery/reviews/ochre_paper_pavilion.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/ochre_paper_pavilion.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/ochre_paper_pavilion.original-provenance.json" + }, + { + "templateId": "quiet_current", + "templateLockHash": "tpl_57a6868c", + "promptSettingsHash": "ps_5d56d1da", + "modelRevision": "zai-org/CogView4-6B@63a52b7f6dace7033380cd6da14d0915eab3e6b5", + "runtimeFingerprint": "sha256:stable-runtime-v1:2a8a0b94ac14e05ae48429d257aac6579ca5a176504d1256b7bd7079dc16411d", + "graphHash": "sha256:canonical-graph-v1:0870e1b5d6c05b496e120e383bc7c13c4fe1705efc5d918466900b9e906288d8", + "proofLockHash": "sha256:retained-template-association-v1:3f134f053faa0c89a09258393281aeed9325e81e89e8f55ac0ff3321dd139396", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "63a52b7f6dace7033380cd6da14d0915eab3e6b5", + "templateRevisionHash": "c3c7aada8d0fc7bec8c4067c9c88fbb03d5210ee9f6412d1d5984b21879ab886", + "provenancePath": "/template-gallery/reviews/quiet_current.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:d5f0b598ea263ab18ef4cec204cf97ea52b4dfc784ea647add919d3db1c1686d", + "outputPath": "/template-gallery/quiet_current.webp", + "thumbnailPath": "/template-gallery/quiet_current.webp", + "mediaHash": "sha256:decoded-rgba:e76e55029f92ff7abf2f969442e49ce126435278842462d0a6c9a2643b55ba18", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T17:21:03.387Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:e941ad7c194422653d460ede32292114dfbf52de8ad97b51064eafb6a2a8a324", + "qualityReviewPath": "/template-gallery/reviews/quiet_current.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/quiet_current.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/quiet_current.original-provenance.json" + }, + { + "templateId": "persimmon_glaze", + "templateLockHash": "tpl_ef8db2a5", + "promptSettingsHash": "ps_8a0e2f0d", + "modelRevision": "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829", + "runtimeFingerprint": "sha256:stable-runtime-v1:e9ad13c92f750baba3e20eefadc375ccb45ad01723f1c260f84db3fc5926ef3c", + "graphHash": "sha256:canonical-graph-v1:52c3114e98debe02d6e7a297276e67887d782628952ddb20ae88c499d7c6a356", + "proofLockHash": "sha256:retained-template-association-v1:b5b6ab9c63bf7b293403adf3d6792f18f536be26ba213cb97d6e614a658bff24", + "backendSourceFingerprint": "sha256:backend-source-v1:057b165c6ef6225461649a47077562dffad098a2d37d639a13bf0e73088d79ab", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "28f3af7689de15f3883d5863059a2fca0aa9b829", + "templateRevisionHash": "ddf39e419212cba10df50f7b27b3fae22d57a0cbfc574164bcad08975fa2545b", + "provenancePath": "/template-gallery/reviews/persimmon_glaze.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:bdb682a3810febe632b067087be54daa601c90b49fe210d0981d275d4e3f14f4", + "outputPath": "/template-gallery/persimmon_glaze.webp", + "thumbnailPath": "/template-gallery/persimmon_glaze.webp", + "mediaHash": "sha256:decoded-rgba:d0c3ce4a778aeee953862f14f119875e6f9dd68429fb8d706be56dd03239336f", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T14:38:24.904Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:8a2131e75c152cf33a2f7b9009db66d276828bd83a98a08fcaace74fd3c4fce1", + "qualityReviewPath": "/template-gallery/reviews/persimmon_glaze.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/persimmon_glaze.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/persimmon_glaze.original-provenance.json" + }, + { + "templateId": "porcelain_on_slate_linen", + "templateLockHash": "tpl_5536c9a7", + "promptSettingsHash": "ps_38a31bbe", + "modelRevision": "SimianLuo/LCM_Dreamshaper_v7@a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5", + "runtimeFingerprint": "sha256:stable-runtime-v1:bd4a092870107a6eace89ea49ffdcae69e5bdeb4a02c321236a11c96b1305775", + "graphHash": "sha256:canonical-graph-v1:a27f2318675f32fa007ed44f64cc42f78c58f05c896bdba16bcf71cec4383ea5", + "proofLockHash": "sha256:retained-template-association-v1:1b491cd3badf36dbb2109c09741d77cfe29abdbfb3677e45f4be805b7cb9eaf2", + "backendSourceFingerprint": "sha256:backend-source-v1:fe1a57b8e352eb66a1a26ebbff5865aaafcf5d55326c4bbcbaf2132ec75f54a8", + "backendContractFingerprint": "sha256:backend-contract-v1:5429892d782af9dbc60b8c6b2762de25748a8da025a4965bb7d6e641908e47ba", + "modelCommit": "a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5", + "templateRevisionHash": "fe33d74a4694ab6b3d34f483d56575c0c66a5948d424a62c04538c0dd608253a", + "provenancePath": "/template-gallery/reviews/porcelain_on_slate_linen.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:bf685df209e2bd4659e0672357c97faa0cc861119e5b777d938adc2aa80c9f4b", + "outputPath": "/template-gallery/porcelain_on_slate_linen.webp", + "thumbnailPath": "/template-gallery/porcelain_on_slate_linen.webp", + "mediaHash": "sha256:decoded-rgba:b2f9076f89d8b8bd8f99f181ea0a79ac50ada5fb95ba17bdaac312d52c0d7a54", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T15:33:09.403Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:4817097a0790d4e63e9116c9c862e1710ad4c12f16b83ed0c99611cb5da40ff3", + "qualityReviewPath": "/template-gallery/reviews/porcelain_on_slate_linen.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "width": 512, + "height": 512, + "approvedOriginalReviewPath": "/template-gallery/reviews/porcelain_on_slate_linen.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/porcelain_on_slate_linen.original-provenance.json" + }, + { + "templateId": "salt_marsh_from_above", + "templateLockHash": "tpl_a23dcce5", + "promptSettingsHash": "ps_97c53e0a", + "modelRevision": "fal/AuraFlow-v0.3@2cd8588f04c886002be4571697d84654a50e3af3", + "runtimeFingerprint": "sha256:stable-runtime-v1:a3650d9c5b6c2816c3117efdc4930118a1e4eec4df0fbc8d760a0cbb4013bdc6", + "graphHash": "sha256:canonical-graph-v1:956816a0ebe49ffead5c8c8759c3db2becf2d5a46196fba7696e978d0d55b15b", + "proofLockHash": "sha256:retained-template-association-v1:c96e2b95a8014ebb6f19a1d3277f88fc9ec42e5c8345c0a7f563afef492e9aa6", + "backendSourceFingerprint": "sha256:backend-source-v1:7c2e1b7de13f4da1e785e92f41a91f96b0029f79607915780ddb97aaff6a8d29", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "2cd8588f04c886002be4571697d84654a50e3af3", + "templateRevisionHash": "b09d5bf8c1d2efa3ae62881840125aa474500d658ba7538031dedeaeb79d52d4", + "provenancePath": "/template-gallery/reviews/salt_marsh_from_above.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:2c09961fbf32f239b64d2fe9afcfc1b28389add503738d1883001856c383ee11", + "outputPath": "/template-gallery/salt_marsh_from_above.webp", + "thumbnailPath": "/template-gallery/salt_marsh_from_above.webp", + "mediaHash": "sha256:decoded-rgba:386be6b3777b423696e50a41079040f9011a36e7116de09eac4c0c00117c767c", + "mediaType": "image", + "verificationTimestamp": "2026-11-24T01:53:00.229Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:c0bf0bf579af4f8d0975bb9405b1e02adfcd21ec56a32bc1b688ba8169c8b292", + "qualityReviewPath": "/template-gallery/reviews/salt_marsh_from_above.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "width": 1536, + "height": 768, + "approvedOriginalReviewPath": "/template-gallery/reviews/salt_marsh_from_above.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/salt_marsh_from_above.original-provenance.json" + }, + { + "templateId": "cobalt_jug_and_lemons", + "templateLockHash": "tpl_61d186ae", + "promptSettingsHash": "ps_82f89ed0", + "modelRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "runtimeFingerprint": "sha256:stable-runtime-v1:51bd86273b54d35996cab8f90c9884f84513a199813ecd2dc36f7fb3ab1999f9", + "graphHash": "sha256:canonical-graph-v1:27fe077b35b48bbd8edc6589655a5ed7a3788139a0a0ab82b14cf3f0ae839b19", + "proofLockHash": "sha256:retained-template-association-v1:8dd18521f34daca6ed0117dd4fa3648c141e037e047270fe83986269662eb46f", + "backendSourceFingerprint": "sha256:backend-source-v1:98ee8d4a895829905e82d8fefeea42b93e55c96252a5456561eada6ffef3c764", + "backendContractFingerprint": "sha256:backend-contract-v1:5429892d782af9dbc60b8c6b2762de25748a8da025a4965bb7d6e641908e47ba", + "modelCommit": "451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "templateRevisionHash": "1c4b2351129fdb61f6ea79abfb8c699ff4db82db0c97e1dc92e9eeeb36a34d12", + "provenancePath": "/template-gallery/reviews/cobalt_jug_and_lemons.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:1218cfc78acb88a604b60adc6244effdfb9f4a56c449eebe7ec4fdebe783cc67", + "outputPath": "/template-gallery/cobalt_jug_and_lemons.webp", + "thumbnailPath": "/template-gallery/cobalt_jug_and_lemons.webp", + "mediaHash": "sha256:decoded-rgba:eef440f7340d1f08ecbb3b93e6c0fc905dd97610ca343bc9ca83503fcd63f653", + "mediaType": "image", + "verificationTimestamp": "2026-11-21T03:31:28.279Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:6623a29f2727e7f4a59b4c7589c229013fe6430b6c29ce58a9d974a7846bcf4c", + "qualityReviewPath": "/template-gallery/reviews/cobalt_jug_and_lemons.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "width": 512, + "height": 512, + "approvedOriginalReviewPath": "/template-gallery/reviews/cobalt_jug_and_lemons.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/cobalt_jug_and_lemons.original-provenance.json" + }, + { + "templateId": "copper_hour_dunes", + "templateLockHash": "tpl_3f17401c", + "promptSettingsHash": "ps_6998df3e", + "modelRevision": "Photoroom/prx-512-t2i-sft@2996423bc26e8eaca48774fac1797484214dfea0", + "runtimeFingerprint": "sha256:stable-runtime-v1:4cc3a80f237c1fe057204c7f6236bfc03e94fbeeaf01fc146f79e3e7e88a51e3", + "graphHash": "sha256:canonical-graph-v1:3d2853278333f4c6760e366ae0347794b14b3937ac62422b5f84d6effcd10495", + "proofLockHash": "sha256:retained-template-association-v1:78abe5d6ea961d9dd0220f7b94358e1ec46963cbd3d2919b52392a821d1ed887", + "backendSourceFingerprint": "sha256:backend-source-v1:95899090708469a60e137d3b59a1a8c2c02cc673a1af5f82720f6b5f7393c258", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "2996423bc26e8eaca48774fac1797484214dfea0", + "templateRevisionHash": "4a188876a65d35df1c87da93c5fcae162f3bc8b20934a61fe70e4580b5090249", + "provenancePath": "/template-gallery/reviews/copper_hour_dunes.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:ef38c88346d9574e6456d443286503b5b54ef5a9b36d44745dd061d26f40404b", + "outputPath": "/template-gallery/copper_hour_dunes.webp", + "thumbnailPath": "/template-gallery/copper_hour_dunes.webp", + "mediaHash": "sha256:decoded-rgba:a4375e56e13bd87625d5b2117074169e68d5f2bd18768965b0a21cccb55df2f2", + "mediaType": "image", + "verificationTimestamp": "2026-11-21T08:05:20.189Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:30eb3491a71f17f58358b99108288851eb3f33b64fe8404edca03d2aec6de14c", + "qualityReviewPath": "/template-gallery/reviews/copper_hour_dunes.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "width": 512, + "height": 512, + "approvedOriginalReviewPath": "/template-gallery/reviews/copper_hour_dunes.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/copper_hour_dunes.original-provenance.json" + }, + { + "templateId": "glasshouse_rain", + "templateLockHash": "tpl_a4b61426", + "promptSettingsHash": "ps_fc327a42", + "modelRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "runtimeFingerprint": "sha256:stable-runtime-v1:6d658e5ec1d43cbff0b70c907f430b90a11eff235db24349b51ebb1c8882ba1e", + "graphHash": "sha256:canonical-graph-v1:8cca9a4269d1339b835a8fba2a380913be348c06c3a628b212a3a17ef2377bb1", + "proofLockHash": "sha256:retained-template-association-v1:4b4d543576e48e1929bdc479c3f76880d53b6a83bc308c7b13071adb1a87e1c4", + "backendSourceFingerprint": "sha256:backend-source-v1:95899090708469a60e137d3b59a1a8c2c02cc673a1af5f82720f6b5f7393c258", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "462165984030d82259a11f4367a4eed129e94a7b", + "templateRevisionHash": "4d32a1778d7cad756e05f14f09de559b9b065f3675b2aef6a289c5299cbd2c24", + "provenancePath": "/template-gallery/reviews/glasshouse_rain.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:9af8a9cb81d35a8ba4ea741af1d9a791b9aa68350d81ec0a804ee861b1d41b86", + "outputPath": "/template-gallery/glasshouse_rain.webp", + "thumbnailPath": "/template-gallery/glasshouse_rain.webp", + "mediaHash": "sha256:decoded-rgba:361acd028382a71fa49c9b68d88bfd49121645dd75dcaceae37389d618ee89b1", + "mediaType": "image", + "verificationTimestamp": "2026-11-21T08:21:05.869Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:50ced83fcffffb7f38148d97b39de5f514685a786feb4730f83836167bdcfd0a", + "qualityReviewPath": "/template-gallery/reviews/glasshouse_rain.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/glasshouse_rain.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/glasshouse_rain.original-provenance.json" + }, + { + "templateId": "pomegranate_on_blue_linen", + "templateLockHash": "tpl_5dba74f8", + "promptSettingsHash": "ps_2f4c6afa", + "modelRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "runtimeFingerprint": "sha256:stable-runtime-v1:8887f1f01530446b2646d4276425cd3f8f5e72dad15e5b1b6240a8abeb375f0e", + "graphHash": "sha256:canonical-graph-v1:f471ecd5a18b997bf9dc6b61a72cf7e98e0988f9309ef3432ec635838f97c409", + "proofLockHash": "sha256:retained-template-association-v1:1a4965c3a28498af15033e70da53eab447cc6eaaa1ad8f00eab35e1de4e89589", + "backendSourceFingerprint": "sha256:backend-source-v1:1f2f7e00ce4a500ba52d5b729f43d4321af6f931125a3f266f307cf80038c12e", + "backendContractFingerprint": "sha256:backend-contract-v1:5429892d782af9dbc60b8c6b2762de25748a8da025a4965bb7d6e641908e47ba", + "modelCommit": "451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "templateRevisionHash": "6642ac1831a788b83981383c33b7ce019692d58fd2b23f3bff9d95e3a59ec27b", + "provenancePath": "/template-gallery/reviews/pomegranate_on_blue_linen.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:701dcadc877ce90c1353e2b7e185e1c1b772fa2b066ad14a84f65ebd76f66dbf", + "outputPath": "/template-gallery/pomegranate_on_blue_linen.webp", + "thumbnailPath": "/template-gallery/pomegranate_on_blue_linen.webp", + "mediaHash": "sha256:decoded-rgba:124f6827b3d0bb3262a1d64577e7e510477fd610a1979008a04b7677bde3ee63", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T14:15:52.979Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:dae3b9fab87965232727681ec76dc4457635fcbd8714a82536cad4ad5c206f03", + "qualityReviewPath": "/template-gallery/reviews/pomegranate_on_blue_linen.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "width": 512, + "height": 512, + "approvedOriginalReviewPath": "/template-gallery/reviews/pomegranate_on_blue_linen.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/pomegranate_on_blue_linen.original-provenance.json" + }, + { + "templateId": "canal_lantern_in_warm_light", + "templateLockHash": "tpl_c72697e6", + "promptSettingsHash": "ps_d411e860", + "modelRevision": "Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers@aa76e7f4f4928f378716b6716a2130fba3caf5b1", + "runtimeFingerprint": "sha256:stable-runtime-v1:eebb12b6ce7eb5e22033d091074a268ba41e4003e21f9fad5d4c102518f45a48", + "graphHash": "sha256:canonical-graph-v1:374726f7f4d26de27f216171d570f84ef9365397555d083767b89eacc2415338", + "proofLockHash": "sha256:retained-template-association-v1:5be78085d2d542827af8d170932db0758d617d99fbf23cdea0806a28517b9065", + "backendSourceFingerprint": "sha256:backend-source-v1:057b165c6ef6225461649a47077562dffad098a2d37d639a13bf0e73088d79ab", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "aa76e7f4f4928f378716b6716a2130fba3caf5b1", + "templateRevisionHash": "0724f395ee3219d2cf878ea1ef914692d9808e83236c4d972322e062dd15b380", + "provenancePath": "/template-gallery/reviews/canal_lantern_in_warm_light.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:1bc239c010c4f26b803b580e9848a165d684905a36857aae5882437dad87872a", + "outputPath": "/template-gallery/canal_lantern_in_warm_light.webp", + "thumbnailPath": "/template-gallery/canal_lantern_in_warm_light.webp", + "mediaHash": "sha256:decoded-rgba:e7e5163453bdd3deba5033146b0625fdd7bdb235b7ab346b3d38ba7f20647d31", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T14:19:48.529Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:d2c7828d1611fe165889fae9ddb182f2ccf95940d7cfb96c570b75b27bd2e512", + "qualityReviewPath": "/template-gallery/reviews/canal_lantern_in_warm_light.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/canal_lantern_in_warm_light.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/canal_lantern_in_warm_light.original-provenance.json" + }, + { + "templateId": "the_glasshouse_seed_tray", + "templateLockHash": "tpl_9fd062df", + "promptSettingsHash": "ps_c51df98f", + "modelRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "runtimeFingerprint": "sha256:stable-runtime-v1:2197c7fd7cfda34fc39e3aca3b80eb2cb45a758a5da6714486fa911843fc8417", + "graphHash": "sha256:canonical-graph-v1:084cbe824fed25ab44a940b2319aa37299f80d3fc2e06efb5848d701162902d9", + "proofLockHash": "sha256:retained-template-association-v1:2239ee3de2dc68391338efe94044b54003b400ffca482657052a07ee25c00cf6", + "backendSourceFingerprint": "sha256:backend-source-v1:057b165c6ef6225461649a47077562dffad098a2d37d639a13bf0e73088d79ab", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "462165984030d82259a11f4367a4eed129e94a7b", + "templateRevisionHash": "f30bccf14d658fa6222cec9c7458ec74fec76940dc1dac07ed87e19d93b3738c", + "provenancePath": "/template-gallery/reviews/the_glasshouse_seed_tray.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:0d0142748fc26dee745ac95785029695fbf63469bc8948a71b8643c209462438", + "outputPath": "/template-gallery/the_glasshouse_seed_tray.webp", + "thumbnailPath": "/template-gallery/the_glasshouse_seed_tray.webp", + "mediaHash": "sha256:decoded-rgba:42461a6eb4eb2d6f793504c9a22f38f535472ec314a31a57f8097c8865d0eec8", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T14:16:46.399Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:a34b8617891c22a29e8dde55355d082743b837323940218f5444e0b330c549e0", + "qualityReviewPath": "/template-gallery/reviews/the_glasshouse_seed_tray.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/the_glasshouse_seed_tray.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/the_glasshouse_seed_tray.original-provenance.json" + }, + { + "templateId": "quiet_kiln_at_daybreak", + "templateLockHash": "tpl_c722e490", + "promptSettingsHash": "ps_b971c379", + "modelRevision": "NucleusAI/Nucleus-Image@5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa", + "runtimeFingerprint": "sha256:stable-runtime-v1:cdcff048aa4782c7313f176a2c65936090e32fe7e61ddd1ed154136f66dfc9c2", + "graphHash": "sha256:canonical-graph-v1:ee3d46849aebf382a67208a5f3c2ee4461deb6bfdab6af3506dfbb5abb6dfec1", + "proofLockHash": "sha256:retained-template-association-v1:4c080e373f3754dba05ca7da6f56965de1fdc504386cf8dc3d51081ec4635881", + "backendSourceFingerprint": "sha256:backend-source-v1:258d554494a8e31795e6c04f21e6ab998a6225773194b12546c45d68b690887e", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa", + "templateRevisionHash": "82918f24aaddf420da3c1213ac69779af2bf962cd2af50b33814f1eefdf14a3b", + "provenancePath": "/template-gallery/reviews/quiet_kiln_at_daybreak.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:5d0bcf5b8c471374874d5369574666b5d2e8bcb3830728cc406bbb3ec31e4389", + "outputPath": "/template-gallery/quiet_kiln_at_daybreak.webp", + "thumbnailPath": "/template-gallery/quiet_kiln_at_daybreak.webp", + "mediaHash": "sha256:decoded-rgba:ca068453fb7c90bfc12ca67c056cddffbfa3490bc39f1415d5f9f412bf5ac5a4", + "mediaType": "image", + "verificationTimestamp": "2026-11-24T02:35:25.266Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:31c840d72c3da15e1cdf7b2da293f70763e9906162b5b63df893b3bfbc6a13ee", + "qualityReviewPath": "/template-gallery/reviews/quiet_kiln_at_daybreak.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/quiet_kiln_at_daybreak.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/quiet_kiln_at_daybreak.original-provenance.json" + }, + { + "templateId": "restoring_the_studio_backdrop", + "templateLockHash": "tpl_cab1d671", + "promptSettingsHash": "ps_b010f09b", + "modelRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "runtimeFingerprint": "sha256:stable-runtime-v1:eff380a9cf20ea04d6d66a075e51c8dc133b219275ad1bca5e8eeea6efd12ac9", + "graphHash": "sha256:canonical-graph-v1:d46308269e83807cfb33229dc47a0720e765872ff093ae7006857bb9fe382051", + "proofLockHash": "sha256:retained-template-association-v1:54736cba5af85b0a0e4ef0eeffc059fda52b08268ab02daf0b32e1e85c4dfdfa", + "backendSourceFingerprint": "sha256:backend-source-v1:1f2f7e00ce4a500ba52d5b729f43d4321af6f931125a3f266f307cf80038c12e", + "backendContractFingerprint": "sha256:backend-contract-v1:61201b43ea68d3fd347fbc374e292b5839be28f908b473bcb69f5ec1f8b87736", + "modelCommit": "451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "templateRevisionHash": "26d6762e118bc9217762cc4abeec7817586ee58fb80ef09bc3c98e32a2789472", + "provenancePath": "/template-gallery/reviews/restoring_the_studio_backdrop.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:1ade11b207b41f29e320239d8686285c2cac80473de608ae0f1bfe849c42fd7d", + "outputPath": "/template-gallery/restoring_the_studio_backdrop.webp", + "thumbnailPath": "/template-gallery/restoring_the_studio_backdrop.webp", + "mediaHash": "sha256:decoded-rgba:85243454c34c3567069f952d068bc5b3e48ca7b87597aef858e1f92291296578", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T14:17:31.827Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:baefa28302075a9422d66ef14238918fb00e21d7e890bee7478d6bea00050e3c", + "qualityReviewPath": "/template-gallery/reviews/restoring_the_studio_backdrop.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "beforePath": "/template-gallery/inputs/restoring_the_studio_backdrop.before.png", + "beforeMediaHash": "sha256:bytes:d143c4922ad498b9bd436d06df424bbff50baf023b93735b53ee401e19e4cbf1", + "afterPath": "/template-gallery/restoring_the_studio_backdrop.webp", + "width": 512, + "height": 512, + "approvedOriginalReviewPath": "/template-gallery/reviews/restoring_the_studio_backdrop.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/restoring_the_studio_backdrop.original-provenance.json", + "approvedMaskPath": "/template-gallery/inputs/restoring_the_studio_backdrop.mask.png" + }, + { + "templateId": "janus_reykjavik_travel_note", + "templateLockHash": "tpl_ffabdfb5", + "promptSettingsHash": "ps_2eede069", + "modelRevision": "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e", + "runtimeFingerprint": "sha256:stable-runtime-v1:d8c8f37f96fe7bcc5037b76897f1e38b1de4443883ae58982e572682750f56b7", + "graphHash": "sha256:canonical-graph-v1:eb58163449468a297887a396fb270e73104cbf0a537b7a4c30a17561087d94eb", + "proofLockHash": "sha256:retained-template-association-v1:0861e8eeee2dd4788c8b3760986067673ef03017244a4fe65e701d056e10485c", + "backendSourceFingerprint": "sha256:backend-source-v1:b82eb33180a6e16431bc47381c6012c002e18b3a41b45635bef663c50f735ec3", + "backendContractFingerprint": "sha256:backend-contract-v1:bc2a2aeb1bb1fa7a545e1a1f139cc5651e1326b320efefc80afcb0e2a476433a", + "modelCommit": "1655280bb75959cc1cb85529a2a8b26e7016072e", + "templateRevisionHash": "cd73585863835d186d076de2bc4f37c36c11138376bdd2939af45290ff2c37af", + "provenancePath": "/template-gallery/reviews/janus_reykjavik_travel_note.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:3afbda8766bd968d7a027597bee510c979f3cb259888b4edd30ccbfdb3010c42", + "outputPath": "/template-gallery/janus_reykjavik_travel_note.json", + "thumbnailPath": "/template-gallery/janus_reykjavik_travel_note.json", + "mediaHash": "sha256:canonical-json:ee32c7b9e7d512c8369de75fc9dcf8b890921784cce40a4f3ed175b1ad880a89", + "mediaType": "json", + "verificationTimestamp": "2026-11-23T17:39:26.972Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:bb002c9e22bef57b15e6d1e33103a5d191988b82a332ee5df19d97a0a067c34e", + "qualityReviewPath": "/template-gallery/reviews/janus_reykjavik_travel_note.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "approvedOriginalReviewPath": "/template-gallery/reviews/janus_reykjavik_travel_note.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/janus_reykjavik_travel_note.original-provenance.json" + }, + { + "templateId": "janus_red_triangle_caption", + "templateLockHash": "tpl_a56db7ab", + "promptSettingsHash": "ps_28ae7860", + "modelRevision": "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e", + "runtimeFingerprint": "sha256:stable-runtime-v1:4e270d24c1b4cbcf5b0e3225b5bf8cd5c72ac24405bffc726bd8b8ccf476aed3", + "graphHash": "sha256:canonical-graph-v1:92d1160e0d3e06871c8b32b01497360e199c3a0c5bb1e69d68f81a6c651f795f", + "proofLockHash": "sha256:retained-template-association-v1:c8a5ac56ccef4aa0e6e1c20a81d48d8607d7ab0e1f618ee987bef5f2156bac7f", + "backendSourceFingerprint": "sha256:backend-source-v1:fe1a57b8e352eb66a1a26ebbff5865aaafcf5d55326c4bbcbaf2132ec75f54a8", + "backendContractFingerprint": "sha256:backend-contract-v1:d9a9f3b4b638533dd92574871ffd7944f91a74b3004a161c77b2451fd99b1a36", + "modelCommit": "1655280bb75959cc1cb85529a2a8b26e7016072e", + "templateRevisionHash": "44e68d77baa00812c4b9888835013887d523bfe990c11caec96ac426c8ca87b3", + "provenancePath": "/template-gallery/reviews/janus_red_triangle_caption.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:a46761be16b97568f88233567f93081a26655ca25231fd672351438def552611", + "outputPath": "/template-gallery/janus_red_triangle_caption.json", + "thumbnailPath": "/template-gallery/janus_red_triangle_caption.json", + "mediaHash": "sha256:canonical-json:fd4d7721901f286e007837f419b904ea959c61dc4ba63f50d5a4d454a4e8ef21", + "mediaType": "json", + "verificationTimestamp": "2026-11-23T15:41:11.401Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:35e0b67a3ab682b5cd8b01d3260d98ef36d0a6c7a519d92f1bcb52f068ce0e83", + "qualityReviewPath": "/template-gallery/reviews/janus_red_triangle_caption.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "approvedOriginalReviewPath": "/template-gallery/reviews/janus_red_triangle_caption.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/janus_red_triangle_caption.original-provenance.json" + }, + { + "templateId": "janus_red_enamel_teapot", + "templateLockHash": "tpl_ac9c0bc5", + "promptSettingsHash": "ps_4a949eaa", + "modelRevision": "deepseek-community/Janus-Pro-1B@1655280bb75959cc1cb85529a2a8b26e7016072e", + "runtimeFingerprint": "sha256:stable-runtime-v1:d4f3136ca8c66faf48a50bb85a1fdfd1017d867fdf0c97c6f483a765f189db7e", + "graphHash": "sha256:canonical-graph-v1:fc935fef4353febb86244c65ae189e7da6bee8ad266dc6ca0d8f88b7497c4eb1", + "proofLockHash": "sha256:retained-template-association-v1:8203a09289e433bf455d76bf2b1e0f25de7da91b783ade3bd48607cc9a44add8", + "backendSourceFingerprint": "sha256:backend-source-v1:693cbe0ad6ddc5d1796f10269726b6d92a067c5ed14ea4458614797eb25c9a7c", + "backendContractFingerprint": "sha256:backend-contract-v1:eea189de4cdfe09f5055e14ff414c28400c1abd2f1f6c7d8094855c12adeefde", + "modelCommit": "1655280bb75959cc1cb85529a2a8b26e7016072e", + "templateRevisionHash": "335f3fbf1907201be05d98148bff1fb7dc68d540750b71f33812769ddfa55879", + "provenancePath": "/template-gallery/reviews/janus_red_enamel_teapot.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:3f6a7c55db2d8451540de526a6de00d255e2efc144cf45d36484ed7ea6afd662", + "outputPath": "/template-gallery/janus_red_enamel_teapot.webp", + "thumbnailPath": "/template-gallery/janus_red_enamel_teapot.webp", + "mediaHash": "sha256:decoded-rgba:450db3fcdb61d8e231cb366f52f0b7057dfc7b0704129545331163b11ff76877", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T15:46:06.879Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:e402768b481a454d36fcbf83bb5a223c5aacc0a3d5827f79fd89cbf8e24f3223", + "qualityReviewPath": "/template-gallery/reviews/janus_red_enamel_teapot.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "width": 384, + "height": 384, + "approvedOriginalReviewPath": "/template-gallery/reviews/janus_red_enamel_teapot.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/janus_red_enamel_teapot.original-provenance.json" + }, + { + "templateId": "lumina_opal_pendant_in_limestone", + "templateLockHash": "tpl_f24a6ace", + "promptSettingsHash": "ps_a3742a3f", + "modelRevision": "Alpha-VLLM/Lumina-Next-SFT-diffusers@0ee5ec90043acf5cb41fe96274af36eb7fad8d95", + "runtimeFingerprint": "sha256:stable-runtime-v1:95700292a2f22cd3123319ba6f53fcb69bbc62b2abf81f6f64180c8c16274cbc", + "graphHash": "sha256:canonical-graph-v1:029c04a5a3e933bb710937287da6cab94ef80b85a2b57c93e3002a3b6334d62f", + "proofLockHash": "sha256:retained-template-association-v1:7630abdd2bdf2938c6a13aea16a04f21ed86d65b662cbfe00edca63315af455e", + "backendSourceFingerprint": "sha256:backend-source-v1:4e964e7de84962b7d4f70d35de6904394561f9a9314ea2bd7e435a03a55af5b6", + "backendContractFingerprint": "sha256:backend-contract-v1:5429892d782af9dbc60b8c6b2762de25748a8da025a4965bb7d6e641908e47ba", + "modelCommit": "0ee5ec90043acf5cb41fe96274af36eb7fad8d95", + "templateRevisionHash": "4545f92379bc42dd213572033b19a7d37bfd24a3cf8c5eb90fb510c2e2c4c1e7", + "provenancePath": "/template-gallery/reviews/lumina_opal_pendant_in_limestone.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:2c407c2ee24ca830ed7e7613316a92010bd112a85c4f7f0306fea6b0b2c8ee17", + "outputPath": "/template-gallery/lumina_opal_pendant_in_limestone.webp", + "thumbnailPath": "/template-gallery/lumina_opal_pendant_in_limestone.webp", + "mediaHash": "sha256:decoded-rgba:16611a99ff281d6ed596144aebfd591e066d18b879aaffc392b0029e66dce471", + "mediaType": "image", + "verificationTimestamp": "2026-11-24T16:28:31.695Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:ca067bd85f363317365aa4e30c4c9559ee2e1bfe4520386b9f1e81b78de9ed85", + "qualityReviewPath": "/template-gallery/reviews/lumina_opal_pendant_in_limestone.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T18:48:44Z", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/lumina_opal_pendant_in_limestone.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/lumina_opal_pendant_in_limestone.original-provenance.json" + }, + { + "templateId": "ddim_cifar10_preview", + "templateLockHash": "tpl_48bbabb3", + "promptSettingsHash": "ps_b456b1ed", + "modelRevision": "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80", + "runtimeFingerprint": "sha256:stable-runtime-v1:b7a5d9a9152704cb3aea775d25419a594559cf8b034fe482dd77fa9a989bdd05", + "graphHash": "sha256:canonical-graph-v1:ef9521d37a186e6b6539068596033f2b921370e3cf3ca8a031f3feaae8716434", + "proofLockHash": "sha256:retained-template-association-v1:7d3a998d22fbff0579a6110649004ebdc4b956b55e5bc3bd3c747c5d3db524cb", + "backendSourceFingerprint": "sha256:backend-source-v1:7073247d40471c857faf3c52f186d17923fbdf3c44234232a8c6f8b9db925663", + "backendContractFingerprint": "sha256:backend-contract-v1:53144518f3a56e4644f06618acdc61a3e6c4f8dbacbca96e7d2e9912d699836b", + "modelCommit": "267b167dc01f0e4e61923ea244e8b988f84deb80", + "templateRevisionHash": "1f41b7d2d7bccb216f46b9ce174a9d4246f0348584e208baeeaa4af92c172c9f", + "provenancePath": "/template-gallery/reviews/ddim_cifar10_preview.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:813802e3004e9ba14b2582a5f343ff737c2346795c9b83fc82de850d54538f0d", + "outputPath": "/template-gallery/ddim_cifar10_preview.webp", + "thumbnailPath": "/template-gallery/ddim_cifar10_preview.webp", + "mediaHash": "sha256:decoded-rgba:1eb33c017bdf3821ac9cefedc516901400d1b26e188fa49d460b9b24d81e4f97", + "mediaType": "image", + "verificationTimestamp": "2026-11-14T06:55:56.039Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:02de4a39ffb67d8118e028e15439a5dc1554f34c75fbd3b50bf92d1f0287c2b2", + "qualityReviewPath": "/template-gallery/reviews/ddim_cifar10_preview.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T19:53:04.808Z", + "width": 32, + "height": 32, + "approvedOriginalReviewPath": "/template-gallery/reviews/ddim_cifar10_preview.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/ddim_cifar10_preview.original-provenance.json" + }, + { + "templateId": "sdxl_clear_cobalt_backdrop", + "templateLockHash": "tpl_72c55f1d", + "promptSettingsHash": "ps_fdf2b4ba", + "modelRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "runtimeFingerprint": "sha256:stable-runtime-v1:e58252b333ab8e28e89181aaa2a7be1ae7b982a6aec611d3bcd616aca7e8b784", + "graphHash": "sha256:canonical-graph-v1:46f00547faa02a687a12eafda44d9c94802a76505143f4a95124b6bd44eabfda", + "proofLockHash": "sha256:retained-template-association-v1:905441188fb96f7dadce2caac6554d2a060efc43bc98aa0a1e735992510acef7", + "backendSourceFingerprint": "sha256:backend-source-v1:a7a074387d21c2a016af41b7de9d090fd6377b8efe388047bc50201779908464", + "backendContractFingerprint": "sha256:backend-contract-v1:61201b43ea68d3fd347fbc374e292b5839be28f908b473bcb69f5ec1f8b87736", + "modelCommit": "462165984030d82259a11f4367a4eed129e94a7b", + "templateRevisionHash": "5ac53251bbc44c8b3eb62ab06fba702e275ebc7340348f36fb20a055d36b3573", + "provenancePath": "/template-gallery/reviews/sdxl_clear_cobalt_backdrop.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:2514269fce7a1235446e09c28596d04c802351f2d061b6df39ed409bb01ae496", + "outputPath": "/template-gallery/sdxl_clear_cobalt_backdrop.webp", + "thumbnailPath": "/template-gallery/sdxl_clear_cobalt_backdrop.webp", + "mediaHash": "sha256:decoded-rgba:a9988cc89f4cbaffe1568391196573f3679944cb593e89c0fa55a234d9955ddd", + "mediaType": "image", + "verificationTimestamp": "2026-11-24T12:07:41.410Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:18badc1f2d07f814b0b81d1f53b97c8ed0909f55525218a24aa0c85ea066f595", + "qualityReviewPath": "/template-gallery/reviews/sdxl_clear_cobalt_backdrop.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T19:53:04.808Z", + "beforePath": "/template-gallery/inputs/sdxl_clear_cobalt_backdrop.before.png", + "beforeMediaHash": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "afterPath": "/template-gallery/sdxl_clear_cobalt_backdrop.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/sdxl_clear_cobalt_backdrop.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sdxl_clear_cobalt_backdrop.original-provenance.json", + "approvedMaskPath": "/template-gallery/inputs/sdxl_clear_cobalt_backdrop.mask.png" + }, + { + "templateId": "sdxl_turbo_orange_caps", + "templateLockHash": "tpl_53f34630", + "promptSettingsHash": "ps_4787eff9", + "modelRevision": "stabilityai/sdxl-turbo@71153311d3dbb46851df1931d3ca6e939de83304", + "runtimeFingerprint": "sha256:stable-runtime-v1:a759e2219c208a2db7ca8ea48eb1d3854ce2372e264a687267eab92f2fccecaf", + "graphHash": "sha256:canonical-graph-v1:40e7ee74d823ffc46f9e096c7cba50ec7f825e36627159674e1e621c33bbe0d3", + "proofLockHash": "sha256:retained-template-association-v1:bbdf288353cf4925d20a8039627c9e329266f89e9142f119da06e9c76497efda", + "backendSourceFingerprint": "sha256:backend-source-v1:057b165c6ef6225461649a47077562dffad098a2d37d639a13bf0e73088d79ab", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "71153311d3dbb46851df1931d3ca6e939de83304", + "templateRevisionHash": "a8bae14e8dc50c3969cba99c45be96d5ffbbca1fa12824640f5c3360bcc4427c", + "provenancePath": "/template-gallery/reviews/sdxl_turbo_orange_caps.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:6d34abd1da7fd74d4fc4f53d29ae5ea6a303dff6b70079e12891cac1e40ea46c", + "outputPath": "/template-gallery/sdxl_turbo_orange_caps.webp", + "thumbnailPath": "/template-gallery/sdxl_turbo_orange_caps.webp", + "mediaHash": "sha256:decoded-rgba:6367020d93affc49805bb6f02fb1da64ff8bc77d0abc2d22f59f29f23d7f4908", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T14:40:52.201Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:369b57f52271926dde53251f6f7c9812c849dbe85d401b4b841d6e39547821fc", + "qualityReviewPath": "/template-gallery/reviews/sdxl_turbo_orange_caps.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T19:53:04.808Z", + "width": 512, + "height": 512, + "approvedOriginalReviewPath": "/template-gallery/reviews/sdxl_turbo_orange_caps.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sdxl_turbo_orange_caps.original-provenance.json" + }, + { + "templateId": "whisper_small_an_open_door", + "templateLockHash": "tpl_169ef95b", + "promptSettingsHash": "ps_c6fb7372", + "modelRevision": "openai/whisper-small@973afd24965f72e36ca33b3055d56a652f456b4d", + "runtimeFingerprint": "sha256:stable-runtime-v1:daad92c13097d7f0d0d0e83bdff4d6a09ce064abfe313264832b8779235ea3cb", + "graphHash": "sha256:canonical-graph-v1:69e261c29aa777da002dada801f01091436e8f116780f1ac7271ce23a3da425c", + "proofLockHash": "sha256:retained-template-association-v1:fdeb350238b682dea2f7eaf900b187c054e35672f626c885691741be0ff946d5", + "backendSourceFingerprint": "sha256:backend-source-v1:3227569ff822090d00a80a3a88213d76d5ca43092d2918cec2494962457865a5", + "backendContractFingerprint": "sha256:backend-contract-v1:89ce835969abfae21cb4c27992f38f895d98a9cebbce248d62123a5a8aa1fc28", + "modelCommit": "973afd24965f72e36ca33b3055d56a652f456b4d", + "templateRevisionHash": "cfc95f86cf49288a5b851e7e042558b50bcd091f1a69cfabdf961cb204fde1ac", + "provenancePath": "/template-gallery/reviews/whisper_small_an_open_door.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:ea3ecb614eeaeabaf08959f78b1c681bf286853aa5950a656cc12065f89d7d7f", + "outputPath": "/template-gallery/whisper_small_an_open_door.json", + "thumbnailPath": "/template-gallery/whisper_small_an_open_door.json", + "mediaHash": "sha256:canonical-json:3d36babba4ea9d8167136819afcb79d50d55fc647a773ed81d2bdd71835a973f", + "mediaType": "json", + "verificationTimestamp": "2026-11-23T18:16:55.558Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:d05317c4c2c905fbe757e83cd40b269353546ade5868f630165eeff347f48fee", + "qualityReviewPath": "/template-gallery/reviews/whisper_small_an_open_door.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T19:53:04.808Z", + "approvedOriginalReviewPath": "/template-gallery/reviews/whisper_small_an_open_door.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/whisper_small_an_open_door.original-provenance.json" + }, + { + "templateId": "smolvlm_red_triangle", + "templateLockHash": "tpl_0912c789", + "promptSettingsHash": "ps_b91c5c35", + "modelRevision": "HuggingFaceTB/SmolVLM-256M-Instruct@7e3e67edbbed1bf9888184d9df282b700a323964", + "runtimeFingerprint": "sha256:stable-runtime-v1:a05139e82bba496d6cc49c9755bf063098d45e62d5cf71ed2a1285028db9ce08", + "graphHash": "sha256:canonical-graph-v1:619f187da77a6fda72f90354dcb1768036d2f46b8418f51d674ceac1942c31a6", + "proofLockHash": "sha256:retained-template-association-v1:6557dbdb9a58ea0dc3a92ba6d9c86c3e91a0d59047e14eb61520b8e811285526", + "backendSourceFingerprint": "sha256:backend-source-v1:12feeb1b7586129e38f183c3c391555c88004534d762ea8676efe9dc334540d9", + "backendContractFingerprint": "sha256:backend-contract-v1:5dcc04106f1021d0ef9128d360e91a97236cc538ea7426b994967a459307a4fc", + "modelCommit": "7e3e67edbbed1bf9888184d9df282b700a323964", + "templateRevisionHash": "7c5cc75ca115a437ec6a7ebab59030ef5c5ea14c74735bae5ca78dff427fb0e2", + "provenancePath": "/template-gallery/reviews/smolvlm_red_triangle.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:7b0a6dc6926475432e75632d39b3bc87365dd13887363f6ae71ffbd94ec42d8c", + "outputPath": "/template-gallery/smolvlm_red_triangle.json", + "thumbnailPath": "/template-gallery/smolvlm_red_triangle.json", + "mediaHash": "sha256:canonical-json:17a1f7a82c7f157016203bb8b4d82e264cf4b530f00179517113308ed571b4a5", + "mediaType": "json", + "verificationTimestamp": "2026-11-23T18:58:19.689Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:717781763c0ca20cc7e55772bae2298bea8b59e583101bbb89a84cb01618d960", + "qualityReviewPath": "/template-gallery/reviews/smolvlm_red_triangle.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T19:53:04.808Z", + "approvedOriginalReviewPath": "/template-gallery/reviews/smolvlm_red_triangle.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/smolvlm_red_triangle.original-provenance.json" + }, + { + "templateId": "kandinsky3_ginkgo_on_slate", + "templateLockHash": "tpl_44580a03", + "promptSettingsHash": "ps_bf341b46", + "modelRevision": "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "runtimeFingerprint": "sha256:stable-runtime-v1:cf55f746a3e0c81464ecb685882bce49fcd7f28b7b7d419b1e71af9d3fb533c5", + "graphHash": "sha256:canonical-graph-v1:2d805bf9c48d49b9e4c2778136f8c528d8ff82a7f7753ba7a99021cc439b5b3c", + "proofLockHash": "sha256:retained-template-association-v1:bae161c761c98c151641cb6205477fd818b6fc94dd07a13a2af874471cf22e21", + "backendSourceFingerprint": "sha256:backend-source-v1:175112f2430928958bd90dc5ae78b50ce0a54403e42e28cfc68096945d05fbe6", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "templateRevisionHash": "5870090e6b4d12c32d72566b6038e9bcc8bf8d063492a28ecbeb65275d77c8e9", + "provenancePath": "/template-gallery/reviews/kandinsky3_ginkgo_on_slate.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:c3a38ac1954d413d4f74b9e4b64642dd4d5374e2120db48e246f5d9989ed31d8", + "outputPath": "/template-gallery/kandinsky3_ginkgo_on_slate.webp", + "thumbnailPath": "/template-gallery/kandinsky3_ginkgo_on_slate.webp", + "mediaHash": "sha256:decoded-rgba:16c9705a80a00678ee42c0030f0697328b96986574adadd17a253b6c4ded1290", + "mediaType": "image", + "verificationTimestamp": "2026-11-24T01:18:22.804Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:b1c52fc64b8b47a7a3be4f49abae6fbb80cac4f2c2740c565c0e7ca7df1cb679", + "qualityReviewPath": "/template-gallery/reviews/kandinsky3_ginkgo_on_slate.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-24T19:53:04.808Z", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/kandinsky3_ginkgo_on_slate.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/kandinsky3_ginkgo_on_slate.original-provenance.json" + }, + { + "templateId": "chroma_terracotta_and_blue", + "templateLockHash": "tpl_9dbc94cc", + "promptSettingsHash": "ps_aaaac429", + "modelRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "runtimeFingerprint": "sha256:stable-runtime-v1:de99e7b1729318c3e5b2dde98b51e5feb07ae329310f9b2da76831df1410cae7", + "graphHash": "sha256:canonical-graph-v1:bf170489052eadc150ad0e4149344312741328c5e4e859fb1473be81c3fe63ea", + "proofLockHash": "sha256:retained-template-association-v1:49ead075de62a42b900c916952869c1cafd5bea8a9d2f897dfc4ce4828ac871b", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "templateRevisionHash": "5221fc5d744cbdcf1aa29d1fa9b27cddc0fcbd75983c24061e6218d41621617d", + "provenancePath": "/template-gallery/reviews/chroma_terracotta_and_blue.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:6a7f7bda704386fa339685e429c7acf0efb497bdeccbe4018f42a502ab64b319", + "outputPath": "/template-gallery/chroma_terracotta_and_blue.webp", + "thumbnailPath": "/template-gallery/chroma_terracotta_and_blue.webp", + "mediaHash": "sha256:decoded-rgba:8cc5be85de6e2375d3a3083f620ca37e041bb5e0a453f9f0ccfbc45ae8588af4", + "mediaType": "image", + "verificationTimestamp": "2026-11-24T22:50:29.995Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:dddea0a69b1a3e9400e38878f61519e3f872f4deb11783e1d294070cb49ecb9d", + "qualityReviewPath": "/template-gallery/reviews/chroma_terracotta_and_blue.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/chroma_terracotta_and_blue.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/chroma_terracotta_and_blue.original-provenance.json" + }, + { + "templateId": "lumina2_larch_on_glacial_pond", + "templateLockHash": "tpl_0c2048ce", + "promptSettingsHash": "ps_e264186c", + "modelRevision": "Alpha-VLLM/Lumina-Image-2.0@53504abd8178b30685b6c4c7a4cd181ff78b73e9", + "runtimeFingerprint": "sha256:stable-runtime-v1:7a3c7e5a198ec52ba992f2445f4149d995c742a327b23a4cf87c008327592509", + "graphHash": "sha256:canonical-graph-v1:b58ba817732e34d2c40f61f7bb7dbdebf32c6f2a2bbb21dcdbb237004edc4cc3", + "proofLockHash": "sha256:retained-template-association-v1:57020c7c3d4fcd4d435d9cb933d57ebf1a573cea01606d98433d925e31cb9b33", + "backendSourceFingerprint": "sha256:backend-source-v1:057b165c6ef6225461649a47077562dffad098a2d37d639a13bf0e73088d79ab", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "53504abd8178b30685b6c4c7a4cd181ff78b73e9", + "templateRevisionHash": "c1fecc495b278628b9539fb84079b73b70db420165a7e151def065731920853e", + "provenancePath": "/template-gallery/reviews/lumina2_larch_on_glacial_pond.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:2e32a83fcd44af4cb3ccc489e98b044362dc126c2644bf735ae18135a48d9d09", + "outputPath": "/template-gallery/lumina2_larch_on_glacial_pond.webp", + "thumbnailPath": "/template-gallery/lumina2_larch_on_glacial_pond.webp", + "mediaHash": "sha256:decoded-rgba:d0fc52b8f929fd2f3dc284ed3148f1a82896e1565684edd31b73174ffda6da39", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T14:40:20.880Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:491b992512b0d889fe57d2838d2a4ef479c7be6103e5f2d30d776902ef363278", + "qualityReviewPath": "/template-gallery/reviews/lumina2_larch_on_glacial_pond.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/lumina2_larch_on_glacial_pond.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/lumina2_larch_on_glacial_pond.original-provenance.json" + }, + { + "templateId": "hunyuan_dit_coastal_lighthouse", + "templateLockHash": "tpl_ad3b4f77", + "promptSettingsHash": "ps_f38e8fdc", + "modelRevision": "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "runtimeFingerprint": "sha256:stable-runtime-v1:9123e0c95ac5f92f2c5c682cdba420461dfa9c219e93ba54a29a76610d457859", + "graphHash": "sha256:canonical-graph-v1:4d26fca7d33aec5e119da74520c47fd96fa41f9de0b92a3afca76505fb5722aa", + "proofLockHash": "sha256:retained-template-association-v1:3b810694c954132935a48f68c4e3b49ce4e21661d3fb5d31c59e4b4ad05ab740", + "backendSourceFingerprint": "sha256:backend-source-v1:371fd754663a95b1b06900df9a838042048466464b4bd5cfa7033c1b6eebe0e3", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "templateRevisionHash": "59e80838a60338b27351f10a7cc8478dbe1ae81e04d5d7718ee37aa556585788", + "provenancePath": "/template-gallery/reviews/hunyuan_dit_coastal_lighthouse.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:5fd1917f647dbc4a7f731165d805e2d91e8876cb344ad31066a5142083f97158", + "outputPath": "/template-gallery/hunyuan_dit_coastal_lighthouse.webp", + "thumbnailPath": "/template-gallery/hunyuan_dit_coastal_lighthouse.webp", + "mediaHash": "sha256:decoded-rgba:6325bec292a535249787cca0c6186665111cb01ea206e4fdc0849e41d6b2b4a4", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T15:09:01.447Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:0af573e292bdd7a6d10ddcdaa11d1cb2c75100766aa50d571a320ce5869284f6", + "qualityReviewPath": "/template-gallery/reviews/hunyuan_dit_coastal_lighthouse.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/hunyuan_dit_coastal_lighthouse.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/hunyuan_dit_coastal_lighthouse.original-provenance.json" + }, + { + "templateId": "omnigen_tulips_after_rain", + "templateLockHash": "tpl_0c5c4bcd", + "promptSettingsHash": "ps_4e4eb7da", + "modelRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "runtimeFingerprint": "sha256:stable-runtime-v1:09a3ae16efba82e9a5726ef33d1eecc1d2c2b85ea03c3fd58abacd7a7fee4a08", + "graphHash": "sha256:canonical-graph-v1:38376f1ad21e5c153fb96860a4e566847ff916716637ffd2061dfae350577c93", + "proofLockHash": "sha256:retained-template-association-v1:f435713c96664f012ed048026354f9aadeaaf5769516589eee27120e34f465b8", + "backendSourceFingerprint": "sha256:backend-source-v1:371fd754663a95b1b06900df9a838042048466464b4bd5cfa7033c1b6eebe0e3", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "016e2f61d12a98303f6bbdf122687694d7984268", + "templateRevisionHash": "e3ceb2dc096775601a6e65b7ab61f5ccc64658d2a69586f3c6a13f2efe1a973c", + "provenancePath": "/template-gallery/reviews/omnigen_tulips_after_rain.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:973be5d1628a0550593f15d6ad2dc723e343a84add6ec95609642169c4b97a16", + "outputPath": "/template-gallery/omnigen_tulips_after_rain.webp", + "thumbnailPath": "/template-gallery/omnigen_tulips_after_rain.webp", + "mediaHash": "sha256:decoded-rgba:54479e1bf9c402bc25f28fd124e5e696f5ffa329edcacfd455c2c95ef24755a6", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T15:17:38.630Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:392558e282b7093accde6ac5dba1bbac494dacfb9f111e32cf5b994cb7bd7eae", + "qualityReviewPath": "/template-gallery/reviews/omnigen_tulips_after_rain.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/omnigen_tulips_after_rain.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/omnigen_tulips_after_rain.original-provenance.json" + }, + { + "templateId": "hunyuan_pag_burgundy_knight", + "templateLockHash": "tpl_00d848b4", + "promptSettingsHash": "ps_60e8ca60", + "modelRevision": "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "runtimeFingerprint": "sha256:stable-runtime-v1:f4367d6b32e698264987811d666e7e3383675266f635faab07cbdcf7bd8812aa", + "graphHash": "sha256:canonical-graph-v1:9ff7bd0050b5c50405728a76530205fcdc54531b7b017cc66e3b821b52413dcd", + "proofLockHash": "sha256:retained-template-association-v1:fd76e7117e715faf4f097f881ce80b04f86b35d8fc4019b54df24d040403aa9e", + "backendSourceFingerprint": "sha256:backend-source-v1:371fd754663a95b1b06900df9a838042048466464b4bd5cfa7033c1b6eebe0e3", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "templateRevisionHash": "ff4d1b75e172f8fdb8a45199626ed40a07fe634669e03d1591091a10c176edfe", + "provenancePath": "/template-gallery/reviews/hunyuan_pag_burgundy_knight.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:bfe43512edfae7d033ecddd5d9b29f63f67a631dce808c7b4b0a1262484b129f", + "outputPath": "/template-gallery/hunyuan_pag_burgundy_knight.webp", + "thumbnailPath": "/template-gallery/hunyuan_pag_burgundy_knight.webp", + "mediaHash": "sha256:decoded-rgba:e4c2f799943a927f9fd6344c30a95b14b4b6bc444dbd5d39d59dd5ed893eb478", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T15:11:08.624Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:3fe4ad823f2901e00fa3d6b61df704c778b04e36ac540ec9e3077f9e9f4b20d6", + "qualityReviewPath": "/template-gallery/reviews/hunyuan_pag_burgundy_knight.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/hunyuan_pag_burgundy_knight.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/hunyuan_pag_burgundy_knight.original-provenance.json" + }, + { + "templateId": "chroma_restored_cobalt_backdrop", + "templateLockHash": "tpl_8c282bf7", + "promptSettingsHash": "ps_747e9429", + "modelRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "runtimeFingerprint": "sha256:stable-runtime-v1:db748f346e99d9a1c02061feb881ea118dd4498ad796742685a56de041f6aa2b", + "graphHash": "sha256:canonical-graph-v1:d3bfd6322b7b1bd0f34b9faa9f444ebefae32fc43c368d37169f6ebfbc6c53cf", + "proofLockHash": "sha256:retained-template-association-v1:63180318272b33812b5afe58b3aefc0628912089f9e951092a4a18f0d2c152fc", + "backendSourceFingerprint": "sha256:backend-source-v1:43f2ed10792fc6167b963166287cf7d5a0429afa26029e6455b0418e2123be86", + "backendContractFingerprint": "sha256:backend-contract-v1:e7a7aa3acbdedd686fa7e7a9d4bcc39c1709ba1fec38f047d63ff83558a85c18", + "modelCommit": "0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "templateRevisionHash": "d3c99f24317aaf93b0f25f2681bdc56f456d69554e47a522c0c04487602149f2", + "provenancePath": "/template-gallery/reviews/chroma_restored_cobalt_backdrop.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:e747f54405c34df06ce0f82265ee19703272027ed1d6766a2e2999cbe3cded96", + "outputPath": "/template-gallery/chroma_restored_cobalt_backdrop.webp", + "thumbnailPath": "/template-gallery/chroma_restored_cobalt_backdrop.webp", + "mediaHash": "sha256:decoded-rgba:9894171a0c49533cc95f4dbe009fd3377e0ae8b79a1a4901ba6014d33d0136ff", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T22:32:10.177Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:962eb4e5b53641646657ce9b20922ffd1d03a957b784982eb552f402ebe19fcc", + "qualityReviewPath": "/template-gallery/reviews/chroma_restored_cobalt_backdrop.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "beforePath": "/template-gallery/inputs/chroma_restored_cobalt_backdrop.before.png", + "beforeMediaHash": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "afterPath": "/template-gallery/chroma_restored_cobalt_backdrop.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/chroma_restored_cobalt_backdrop.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/chroma_restored_cobalt_backdrop.original-provenance.json", + "approvedMaskPath": "/template-gallery/inputs/chroma_restored_cobalt_backdrop.mask.png" + }, + { + "templateId": "sdxl_pix2pix_pale_amber_glass", + "templateLockHash": "tpl_5a852750", + "promptSettingsHash": "ps_de1bb4fa", + "modelRevision": "diffusers/sdxl-instructpix2pix-768@06653d47f8d22f2c2205a5884d6a24c5e76d2ca7", + "runtimeFingerprint": "sha256:stable-runtime-v1:7ce3ae206bcbdbc025f3dc0bb48603911a18cc1162d5a389191ae58cbd690ab5", + "graphHash": "sha256:canonical-graph-v1:be363defe20343a8ad3dda9b464344a590c931b6908d5f2eb8ee4d1ba4974f95", + "proofLockHash": "sha256:retained-template-association-v1:e946a038dfc18edfc4d3677839274ead38d8cade15ebebdf82f0d3699c1a35c2", + "backendSourceFingerprint": "sha256:backend-source-v1:55da4a68212923ee8a67e70754f46193288e210bce08ab4ae8c06834a7a76995", + "backendContractFingerprint": "sha256:backend-contract-v1:bd364fcd29020d51bb61f5f9bf320cf0bf562e718c645c21ffac8ed5a47b740d", + "modelCommit": "06653d47f8d22f2c2205a5884d6a24c5e76d2ca7", + "templateRevisionHash": "897fb59d568ceba3ef8d85cf1141f79002522b111dbc6ffa67ad51a9acf88495", + "provenancePath": "/template-gallery/reviews/sdxl_pix2pix_pale_amber_glass.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:c2af4572994949928bea47bc298f81e6997a95b9b3e95f8feb051be3f653b5b4", + "outputPath": "/template-gallery/sdxl_pix2pix_pale_amber_glass.webp", + "thumbnailPath": "/template-gallery/sdxl_pix2pix_pale_amber_glass.webp", + "mediaHash": "sha256:decoded-rgba:1e53cd15d12494f5bb6b9fb5488bfe3a921ddfba66dfed0f5b63932ee8886102", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T16:05:26.964Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:1aaf9bda79eacf471498f41ec3a32197ede11cb5700257b91f5763f11ba94e90", + "qualityReviewPath": "/template-gallery/reviews/sdxl_pix2pix_pale_amber_glass.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "beforePath": "/template-gallery/inputs/sdxl_pix2pix_pale_amber_glass.before.png", + "beforeMediaHash": "sha256:bytes:ebaca95f96d1573e4292ffc65c78eb0dcf8ff9cc8b5a7e11ec81face61b160fb", + "afterPath": "/template-gallery/sdxl_pix2pix_pale_amber_glass.webp", + "width": 768, + "height": 768, + "approvedOriginalReviewPath": "/template-gallery/reviews/sdxl_pix2pix_pale_amber_glass.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sdxl_pix2pix_pale_amber_glass.original-provenance.json" + }, + { + "templateId": "sd15_pag_mountain_lake_watercolor", + "templateLockHash": "tpl_055d66e3", + "promptSettingsHash": "ps_70c72f9b", + "modelRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "runtimeFingerprint": "sha256:stable-runtime-v1:91208e09df6c28f94ad8539df9cc773500070f139616c2834a883b59bb559c86", + "graphHash": "sha256:canonical-graph-v1:48cd547df20763361808da8567bee1e81d2f5656cf700b06ca1d7032e05c9a12", + "proofLockHash": "sha256:retained-template-association-v1:b2cacdb87f7e5ddaf40d4789c810a3208951bc0c599879346cd2e4c9bab02be3", + "backendSourceFingerprint": "sha256:backend-source-v1:3b073e3f6f5e9489e06116f277ee4a9e878b8f0c6258efc93c60be9a04513cb5", + "backendContractFingerprint": "sha256:backend-contract-v1:bd364fcd29020d51bb61f5f9bf320cf0bf562e718c645c21ffac8ed5a47b740d", + "modelCommit": "451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "templateRevisionHash": "6de709bbcfb3ed6e061541584be28f5b7ed05e1170dcdaa69e2deb4fee822154", + "provenancePath": "/template-gallery/reviews/sd15_pag_mountain_lake_watercolor.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:a64dfb3b47d4361c5e1c1cb54410fecf077db21b87ca633de0645c8b13b1b03a", + "outputPath": "/template-gallery/sd15_pag_mountain_lake_watercolor.webp", + "thumbnailPath": "/template-gallery/sd15_pag_mountain_lake_watercolor.webp", + "mediaHash": "sha256:decoded-rgba:803b524315482455a356d1a921934e41b98fe65895c5a60b49201d54145e2218", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T20:28:31.760Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:523d8f16ac81029766ba00dd0a912b57131f818180ec35b4807d047835fbb583", + "qualityReviewPath": "/template-gallery/reviews/sd15_pag_mountain_lake_watercolor.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "beforePath": "/template-gallery/inputs/sd15_pag_mountain_lake_watercolor.before.png", + "beforeMediaHash": "sha256:bytes:88290a96bc8d52f11f2d1e3c0c0e04c2027661816e54b57d7d4739d731ca1e75", + "afterPath": "/template-gallery/sd15_pag_mountain_lake_watercolor.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/sd15_pag_mountain_lake_watercolor.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sd15_pag_mountain_lake_watercolor.original-provenance.json" + }, + { + "templateId": "sd15_pag_cobalt_studio_repair", + "templateLockHash": "tpl_7552fcab", + "promptSettingsHash": "ps_fbb3534b", + "modelRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "runtimeFingerprint": "sha256:stable-runtime-v1:973fbcf464fe27f216b59ffdcd9e2b908ca4999ba712f6be281205cae16f8125", + "graphHash": "sha256:canonical-graph-v1:0236cd78852886d49d629776dae568ae589c27dfc4f499868ba2f40d4fd4867c", + "proofLockHash": "sha256:retained-template-association-v1:d70ab987bd434f3a4cdadb691c523f1a9b44959d8dd1b25a61a1f3e1972e989a", + "backendSourceFingerprint": "sha256:backend-source-v1:1f2f7e00ce4a500ba52d5b729f43d4321af6f931125a3f266f307cf80038c12e", + "backendContractFingerprint": "sha256:backend-contract-v1:61201b43ea68d3fd347fbc374e292b5839be28f908b473bcb69f5ec1f8b87736", + "modelCommit": "451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "templateRevisionHash": "8373d87ab42e130142a163e3c60733f3f2511b7a77ffad1d9129607bcfba2562", + "provenancePath": "/template-gallery/reviews/sd15_pag_cobalt_studio_repair.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:68a6c311f61f832632c2c4ec9890ef8cbb969b63063ccf26449a0a26c185c7eb", + "outputPath": "/template-gallery/sd15_pag_cobalt_studio_repair.webp", + "thumbnailPath": "/template-gallery/sd15_pag_cobalt_studio_repair.webp", + "mediaHash": "sha256:decoded-rgba:953e38f5a72b85f3e534669713b8dc60ac5c6ab9ecfff280da627726b8cdff4d", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T14:32:05.292Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:41b27641ac904049d0c4eb11ada98f9ea3a70825247a2e96eada58ba784f2cd9", + "qualityReviewPath": "/template-gallery/reviews/sd15_pag_cobalt_studio_repair.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "beforePath": "/template-gallery/inputs/sd15_pag_cobalt_studio_repair.before.png", + "beforeMediaHash": "sha256:bytes:d143c4922ad498b9bd436d06df424bbff50baf023b93735b53ee401e19e4cbf1", + "afterPath": "/template-gallery/sd15_pag_cobalt_studio_repair.webp", + "width": 512, + "height": 512, + "approvedOriginalReviewPath": "/template-gallery/reviews/sd15_pag_cobalt_studio_repair.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sd15_pag_cobalt_studio_repair.original-provenance.json", + "approvedMaskPath": "/template-gallery/inputs/sd15_pag_cobalt_studio_repair.mask.png" + }, + { + "templateId": "zimage_golden_amber_glass", + "templateLockHash": "tpl_279a009e", + "promptSettingsHash": "ps_41cfc342", + "modelRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "runtimeFingerprint": "sha256:stable-runtime-v1:8be5fe75290e4f9aca107516a6332e06e126e04d5cb65e79be5d748d583774f9", + "graphHash": "sha256:canonical-graph-v1:09397eba135ea69f8c88d29c6eb65297ece35dc10e039c9c5573165503f8488f", + "proofLockHash": "sha256:retained-template-association-v1:8db327cf11ed6e59bdb664e01ed74a9acec6c1a1c5756a2a5ccec310b73a98c6", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "modelCommit": "f332072aa78be7aecdf3ee76d5c247082da564a6", + "templateRevisionHash": "303a0b1b64a2e1234aeca85941a07eea2157707c8436442a5cf00aedd68c6d97", + "provenancePath": "/template-gallery/reviews/zimage_golden_amber_glass.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:7604bb9c908c746ca5f8e1e57387d04ddd1c97682a3d2300d6548540ea4ce6f6", + "outputPath": "/template-gallery/zimage_golden_amber_glass.webp", + "thumbnailPath": "/template-gallery/zimage_golden_amber_glass.webp", + "mediaHash": "sha256:decoded-rgba:10589b67ffff19022a7b7fb7c1f21990550c49ce602cd328ae75157d64809131", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T17:46:24.489Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:a50da603aa85f882e37963b58856e67a15919c3553f8f3d2973fd26e0220d194", + "qualityReviewPath": "/template-gallery/reviews/zimage_golden_amber_glass.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "beforePath": "/template-gallery/inputs/zimage_golden_amber_glass.before.png", + "beforeMediaHash": "sha256:bytes:ebaca95f96d1573e4292ffc65c78eb0dcf8ff9cc8b5a7e11ec81face61b160fb", + "afterPath": "/template-gallery/zimage_golden_amber_glass.webp", + "width": 640, + "height": 640, + "approvedOriginalReviewPath": "/template-gallery/reviews/zimage_golden_amber_glass.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/zimage_golden_amber_glass.original-provenance.json" + }, + { + "templateId": "sdxl_control_inpaint_warm_plaster", + "templateLockHash": "tpl_ad048189", + "promptSettingsHash": "ps_a9571e3b", + "modelRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2642af585975d6b55b551bcdfb8606edb2fab4b37a05875aa3a8024270b6eab", + "graphHash": "sha256:canonical-graph-v1:188e60e1e4b295563d9e227a6a5f4b6e856781519579dbe9bc830d6ded6b0807", + "proofLockHash": "sha256:retained-template-association-v1:5e1c56cefd48fd88ae1b398ef7949bd7002d79c2af6667606c653b0cb828b4a0", + "backendSourceFingerprint": "sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290", + "backendContractFingerprint": "sha256:backend-contract-v1:7271d6dfcd46a677217edf40c568c3f5e9ae300200f76976e0cf18fd9b9f2508", + "modelCommit": "462165984030d82259a11f4367a4eed129e94a7b", + "templateRevisionHash": "7d840698c480d52e5a864d50fcdbe6528680a9d0453e5dc501d76ac89c0991ef", + "provenancePath": "/template-gallery/reviews/sdxl_control_inpaint_warm_plaster.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:9b70a358386df15083aee9ef803e88f3631c9a8548de65611ddb687a9d6a78dc", + "outputPath": "/template-gallery/sdxl_control_inpaint_warm_plaster.webp", + "thumbnailPath": "/template-gallery/sdxl_control_inpaint_warm_plaster.webp", + "mediaHash": "sha256:decoded-rgba:e73fb6bfcae102b88072ef31980ce64e2eeed0847a41c96d525d2056447c7be1", + "mediaType": "image", + "verificationTimestamp": "2026-11-25T00:04:32.014Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:81075d8e69c0ba4991fd938c1c317414d12a397e9fecb8f2a5c33c65ef50ce7e", + "qualityReviewPath": "/template-gallery/reviews/sdxl_control_inpaint_warm_plaster.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "beforePath": "/template-gallery/inputs/sdxl_control_inpaint_warm_plaster.before.png", + "beforeMediaHash": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "afterPath": "/template-gallery/sdxl_control_inpaint_warm_plaster.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/sdxl_control_inpaint_warm_plaster.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sdxl_control_inpaint_warm_plaster.original-provenance.json", + "approvedGuidePath": "/template-gallery/inputs/sdxl_control_inpaint_warm_plaster.guide.png", + "approvedMaskPath": "/template-gallery/inputs/sdxl_control_inpaint_warm_plaster.mask.png" + }, + { + "templateId": "sd15_canny_guided_green_glass", + "templateLockHash": "tpl_1ec33e6c", + "promptSettingsHash": "ps_2fb986e2", + "modelRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "runtimeFingerprint": "sha256:stable-runtime-v1:bd1025f02831f13a9f263105243bc75fd051326e5bbd4fa133196f90b6edfb6d", + "graphHash": "sha256:canonical-graph-v1:b0e98f0bb1e20a8d46f1ac67a426e6b0a55fcd817c51b6f60a79d97ab92d6514", + "proofLockHash": "sha256:retained-template-association-v1:7a686b3000b03f0e84107d4da632846c0048d4c4cb15f1ea85d4812ae12baccb", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:ad16452bc59ad56fa75df0e9f2f3b913f28233c906d4e37c4518fbc978d47953", + "modelCommit": "451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "templateRevisionHash": "783d03619e47df52cf8b17262e42d07bdaacf9165314c26bce9dc3fc9478e55d", + "provenancePath": "/template-gallery/reviews/sd15_canny_guided_green_glass.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:ae277eed9d332b5e1ee0d030e1b209db75aed2c8351738c85af6c0a194ddf09d", + "outputPath": "/template-gallery/sd15_canny_guided_green_glass.webp", + "thumbnailPath": "/template-gallery/sd15_canny_guided_green_glass.webp", + "mediaHash": "sha256:decoded-rgba:f7f9a1a64d4f1bd7a556c8033829f6e4c059e4410d5f1d821ba5556833b24091", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T16:04:58.708Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:1e1ad8884d15359c921c35ee6e11e31309ccc250195a4b88fef234122d9efc3b", + "qualityReviewPath": "/template-gallery/reviews/sd15_canny_guided_green_glass.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "beforePath": "/template-gallery/inputs/sd15_canny_guided_green_glass.before.png", + "beforeMediaHash": "sha256:bytes:6d47a2f07006b98f9e5cfc8ee925914c4dbfa39fd38b0b61770be56d12ed04e8", + "afterPath": "/template-gallery/sd15_canny_guided_green_glass.webp", + "width": 512, + "height": 512, + "approvedOriginalReviewPath": "/template-gallery/reviews/sd15_canny_guided_green_glass.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sd15_canny_guided_green_glass.original-provenance.json" + }, + { + "templateId": "hunyuan_dit_green_glass_study", + "templateLockHash": "tpl_ad56a37f", + "promptSettingsHash": "ps_6990e9b6", + "modelRevision": "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled@ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "runtimeFingerprint": "sha256:stable-runtime-v1:0e62e64f80848060ae33b531002c0117801a950a466bb77b6a93e0902b71902e", + "graphHash": "sha256:canonical-graph-v1:20f676957f2cca0389d876c1b462e6b947e7d366154f125dd19c262027b9cbbb", + "proofLockHash": "sha256:retained-template-association-v1:9eb0b5c00dd7e04c82d675a6abbd3af47b5cf2e108071e5f55747c5950cef7f4", + "backendSourceFingerprint": "sha256:backend-source-v1:1aae04a8ad2e66aeb3eaacc065f2e111280bd8a64e7e6cb95cc927fed95d6b39", + "backendContractFingerprint": "sha256:backend-contract-v1:ad16452bc59ad56fa75df0e9f2f3b913f28233c906d4e37c4518fbc978d47953", + "modelCommit": "ba991d1546d8c50936c4c16398ed0a87b9b99fb1", + "templateRevisionHash": "a132dd6cd433bd0595f962173926edd930ea38cbf44d175d5499234f600d21f2", + "provenancePath": "/template-gallery/reviews/hunyuan_dit_green_glass_study.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:a570dcd023997ecf6cd0f13327a835ef5f0eac1b23d8d7dcd16e055bde2d81d6", + "outputPath": "/template-gallery/hunyuan_dit_green_glass_study.webp", + "thumbnailPath": "/template-gallery/hunyuan_dit_green_glass_study.webp", + "mediaHash": "sha256:decoded-rgba:d6e68cd181fca6d24e221180fd9f0264dc0a2a13092b2fffb2c17a85ee8f7f71", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T17:50:53.075Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:3f81ff350647db04f75e6de647d5520d7a3eeeeca73233b961db30aba3be3e3b", + "qualityReviewPath": "/template-gallery/reviews/hunyuan_dit_green_glass_study.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "beforePath": "/template-gallery/inputs/hunyuan_dit_green_glass_study.before.png", + "beforeMediaHash": "sha256:bytes:6bd07628a37c087178e9de58a98c6c5879468163f1a2376a581511a42503e2e2", + "afterPath": "/template-gallery/hunyuan_dit_green_glass_study.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/hunyuan_dit_green_glass_study.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/hunyuan_dit_green_glass_study.original-provenance.json" + }, + { + "templateId": "qwen_control_winter_cabin_blue_hour", + "templateLockHash": "tpl_c38a2571", + "promptSettingsHash": "ps_508a465e", + "modelRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "runtimeFingerprint": "sha256:stable-runtime-v1:4f5b990cf13ecbe3ef1949647650f781cae99bbea6d5e74465683c8a5a3d2d80", + "graphHash": "sha256:canonical-graph-v1:9f21216fd545a1b8d30b5bec044f217749bedecfc1f7377237b944abf9a7bb7d", + "proofLockHash": "sha256:retained-template-association-v1:08ac2c7535761cc145bcd94b6263ab81a35cda20d0727759006ae8b29ca46028", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:311f615e2b52ae3247c353b495df7708d560006e6909191e1e104b1e24b04587", + "modelCommit": "25468b98e3276ca6700de15c6628e51b7de54a26", + "templateRevisionHash": "eb65cb98a365c056f3a2a7bd5d44515bb16f518f7ec00797a496fe90a25ce07d", + "provenancePath": "/template-gallery/reviews/qwen_control_winter_cabin_blue_hour.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:406513941cf63351105fe9dc510ba0dc21a54a2fa40e2b34e536a8e09145ef02", + "outputPath": "/template-gallery/qwen_control_winter_cabin_blue_hour.webp", + "thumbnailPath": "/template-gallery/qwen_control_winter_cabin_blue_hour.webp", + "mediaHash": "sha256:decoded-rgba:ceea23bd2b450591834a7b5be76af1ced1679f7848c982c636592ef78e63f8a0", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T22:16:34.633Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:be6b954a2e19b39fff61842dba3927e7e8a797642e911faaee05d79d8b9660af", + "qualityReviewPath": "/template-gallery/reviews/qwen_control_winter_cabin_blue_hour.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "beforePath": "/template-gallery/inputs/qwen_control_winter_cabin_blue_hour.before.png", + "beforeMediaHash": "sha256:bytes:ca250462efc77625134ebe305b2ee67281a1dcf8919e45299c648f0fdacf919a", + "afterPath": "/template-gallery/qwen_control_winter_cabin_blue_hour.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/qwen_control_winter_cabin_blue_hour.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/qwen_control_winter_cabin_blue_hour.original-provenance.json" + }, + { + "templateId": "sd15_pag_canny_guided_glass", + "templateLockHash": "tpl_dff4bb5e", + "promptSettingsHash": "ps_d149242b", + "modelRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2f61cbcfdd0e4a914c56edbd1ee5dc4755c0330d0a9a89dd385bca51ce52edf", + "graphHash": "sha256:canonical-graph-v1:cc03628ea649924bfeca24fd9e93c8aa47c28b4805a0b308fb4adeb9fbb5c0b2", + "proofLockHash": "sha256:retained-template-association-v1:876c2861b696ab82d4fb4cee53bd4a0986d3d1723a3574ae4b3cd79e1dced7cc", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:ad16452bc59ad56fa75df0e9f2f3b913f28233c906d4e37c4518fbc978d47953", + "modelCommit": "451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "templateRevisionHash": "23fc8dfe4150096c38d946116a9839a314a7581d52c9397e9d8e1ad42716624c", + "provenancePath": "/template-gallery/reviews/sd15_pag_canny_guided_glass.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:d6d2ebb0a65c8d872aac5b766b7c926115c5bd48d022ec6c77bd4aabc4ea22bf", + "outputPath": "/template-gallery/sd15_pag_canny_guided_glass.webp", + "thumbnailPath": "/template-gallery/sd15_pag_canny_guided_glass.webp", + "mediaHash": "sha256:decoded-rgba:b30b191a17869884f6b50173c339fe8d01e9f0f98055afe16a22008856a19404", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T16:06:50.173Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:b9b66570d64f750900b7104ec2c3ba0f1482f153325dfb36ef5202a27954bd32", + "qualityReviewPath": "/template-gallery/reviews/sd15_pag_canny_guided_glass.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "beforePath": "/template-gallery/inputs/sd15_pag_canny_guided_glass.before.png", + "beforeMediaHash": "sha256:bytes:6d47a2f07006b98f9e5cfc8ee925914c4dbfa39fd38b0b61770be56d12ed04e8", + "afterPath": "/template-gallery/sd15_pag_canny_guided_glass.webp", + "width": 512, + "height": 512, + "approvedOriginalReviewPath": "/template-gallery/reviews/sd15_pag_canny_guided_glass.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sd15_pag_canny_guided_glass.original-provenance.json" + }, + { + "templateId": "sdxl_controlnet_glass_study_on_slate", + "templateLockHash": "tpl_45e1f06a", + "promptSettingsHash": "ps_e42996a8", + "modelRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "runtimeFingerprint": "sha256:stable-runtime-v1:a945b1156373a4e8789a3fe285c2f1ba810c1bbacd3821cedd5b74200c656d77", + "graphHash": "sha256:canonical-graph-v1:cd4d26987f6eb195f91493d431e659db42ef4a531b29e26d7eedb08799769c16", + "proofLockHash": "sha256:retained-template-association-v1:719e7444749a4b2381b3b3a64d53548715418751fb3654e1bd25974beeb6c5ac", + "backendSourceFingerprint": "sha256:backend-source-v1:371fd754663a95b1b06900df9a838042048466464b4bd5cfa7033c1b6eebe0e3", + "backendContractFingerprint": "sha256:backend-contract-v1:ad16452bc59ad56fa75df0e9f2f3b913f28233c906d4e37c4518fbc978d47953", + "modelCommit": "462165984030d82259a11f4367a4eed129e94a7b", + "templateRevisionHash": "3075b68d97eea65616a9a8fe2519154041e24ced2cd916b395c4849d26c31b71", + "provenancePath": "/template-gallery/reviews/sdxl_controlnet_glass_study_on_slate.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:3e808701efc1a97ad0069a3bf4d553ba92c6558adc59a2049c90808817d1c676", + "outputPath": "/template-gallery/sdxl_controlnet_glass_study_on_slate.webp", + "thumbnailPath": "/template-gallery/sdxl_controlnet_glass_study_on_slate.webp", + "mediaHash": "sha256:decoded-rgba:5d224cc9ac8943cdcc0b9666e4a896871c7a6e5b7ed4222fb5cf6bd0a2c81e86", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T15:20:10.146Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:a571e7342086952b667754480728049ee756412b2339dfeb71fedc1d8a76c446", + "qualityReviewPath": "/template-gallery/reviews/sdxl_controlnet_glass_study_on_slate.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "beforePath": "/template-gallery/inputs/sdxl_controlnet_glass_study_on_slate.before.png", + "beforeMediaHash": "sha256:bytes:6bd07628a37c087178e9de58a98c6c5879468163f1a2376a581511a42503e2e2", + "afterPath": "/template-gallery/sdxl_controlnet_glass_study_on_slate.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/sdxl_controlnet_glass_study_on_slate.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sdxl_controlnet_glass_study_on_slate.original-provenance.json" + }, + { + "templateId": "sdxl_canny_adapter_glass_study", + "templateLockHash": "tpl_768c7bb4", + "promptSettingsHash": "ps_63d6342f", + "modelRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "runtimeFingerprint": "sha256:stable-runtime-v1:d35491fc9269528a91b826327a3cdbbd33824ffb96d9277e7b1f595a70c669d5", + "graphHash": "sha256:canonical-graph-v1:9012c51eebe966a595a2fc5b93f9645e23a2fd6cc194e28ae0218f87b2495565", + "proofLockHash": "sha256:retained-template-association-v1:fd92c79f7979fa6023fc8c51ed54dbc485138fbb654c28723173bc9d6975d99c", + "backendSourceFingerprint": "sha256:backend-source-v1:371fd754663a95b1b06900df9a838042048466464b4bd5cfa7033c1b6eebe0e3", + "backendContractFingerprint": "sha256:backend-contract-v1:ad16452bc59ad56fa75df0e9f2f3b913f28233c906d4e37c4518fbc978d47953", + "modelCommit": "462165984030d82259a11f4367a4eed129e94a7b", + "templateRevisionHash": "eef6570d0a2241aa0a9ff68b200c59591fc6497f43885fba151138ae56517968", + "provenancePath": "/template-gallery/reviews/sdxl_canny_adapter_glass_study.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:ee74ff8962a5094b3d5029239edd5846a1f10a9396abd4a9c7dec003a6d4a2f8", + "outputPath": "/template-gallery/sdxl_canny_adapter_glass_study.webp", + "thumbnailPath": "/template-gallery/sdxl_canny_adapter_glass_study.webp", + "mediaHash": "sha256:decoded-rgba:ba751b7fc6550a54a7466675a7aeb17d1a47cc5d47756d3bb6076c8f4ad60c09", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T14:45:54.554Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:e4d495991ff5ec680b46fe1a10e40dd31cd717a91f1ac832cf2f15f881e2da1f", + "qualityReviewPath": "/template-gallery/reviews/sdxl_canny_adapter_glass_study.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "beforePath": "/template-gallery/inputs/sdxl_canny_adapter_glass_study.before.png", + "beforeMediaHash": "sha256:bytes:6bd07628a37c087178e9de58a98c6c5879468163f1a2376a581511a42503e2e2", + "afterPath": "/template-gallery/sdxl_canny_adapter_glass_study.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/sdxl_canny_adapter_glass_study.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sdxl_canny_adapter_glass_study.original-provenance.json" + }, + { + "templateId": "longcat_last_tram_at_dusk", + "templateLockHash": "tpl_e6bfed44", + "promptSettingsHash": "ps_11aa3e00", + "modelRevision": "ruixiangma/LongCat-AudioDiT-1B-Diffusers@f4c063ea37f262ba5e6129ebd80095a6d6a9de4d", + "runtimeFingerprint": "sha256:stable-runtime-v1:880a46e4923ce13be6f24b148b864a2d7abbfcb7aa6cf894905f3fff79fabaf9", + "graphHash": "sha256:canonical-graph-v1:2d149a078f6469b473a083b6116ef47452ae4ccc8a1ca0fc7b0ea416f5257515", + "proofLockHash": "sha256:retained-template-association-v1:95ffea69c60d414a0bd23077ca61f5ddd50586f06b4808e4b8dac121ebd75e85", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:9ddcba2a3da4634780919a6872ed9a6586f7a765f16243cee9763b776d02b356", + "modelCommit": "f4c063ea37f262ba5e6129ebd80095a6d6a9de4d", + "templateRevisionHash": "9d0f7b50afd87f366ecf6c0d66352d87dd2bdf0b4ae9a50f818619d6254d6b92", + "provenancePath": "/template-gallery/reviews/longcat_last_tram_at_dusk.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:1842dacf80fa8b0d1fb3e355e7f07ea6c8c9c01d9d75cb7406537b6c66b6409a", + "outputPath": "/template-gallery/longcat_last_tram_at_dusk.wav", + "thumbnailPath": "/template-gallery/longcat_last_tram_at_dusk.wav", + "mediaHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:776d0f13f0503cb46377d0121e83c0a871b5de2344a97c8de2cfd87abcd93040", + "mediaType": "audio", + "verificationTimestamp": "2026-11-24T22:39:17.259Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:c3329564cd8b05d18e1b3e91a3656290b0a0b1c735eee45082b78b1098ea8e41", + "qualityReviewPath": "/template-gallery/reviews/longcat_last_tram_at_dusk.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "approvedOriginalReviewPath": "/template-gallery/reviews/longcat_last_tram_at_dusk.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/longcat_last_tram_at_dusk.original-provenance.json" + }, + { + "templateId": "qwen_layered_sunset_and_peaks", + "templateLockHash": "tpl_831d4207", + "promptSettingsHash": "ps_9236bec4", + "modelRevision": "Qwen/Qwen-Image-Layered@8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "runtimeFingerprint": "sha256:stable-runtime-v1:4ce7875bb2c87a85c7d597c5a3128bef36a1516ba9c40de1b222fd864cdbc4ed", + "graphHash": "sha256:canonical-graph-v1:25bb2ac3d10b3d0f539204d2c4d3181764f192882a9c8442efb5ce54b7d8de43", + "proofLockHash": "sha256:retained-template-association-v1:2d3503c2a33256e8c75f62ada660bac72093a6697145ef60e53ca6650ceec78b", + "backendSourceFingerprint": "sha256:backend-source-v1:ce7ac712b4620d0e8efb35022a558a551e2d4ae6ef20b844744c4d674527b0b3", + "backendContractFingerprint": "sha256:backend-contract-v1:7661a86f3aebb5f170346fc6078e665e006b56b7ff5bc4810db8692adf607dac", + "modelCommit": "8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf", + "templateRevisionHash": "4ee3847d935f7b245f5c9d9e156da8fe5d97dcb382ad890c59163e573a6c73c9", + "provenancePath": "/template-gallery/reviews/qwen_layered_sunset_and_peaks.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:347496445e8609e7bbfd320b76750e94ff39dc105b8778f8e87de1bd96a787db", + "outputPath": "/template-gallery/qwen_layered_sunset_and_peaks.png", + "thumbnailPath": "/template-gallery/qwen_layered_sunset_and_peaks.png", + "mediaHash": "sha256:decoded-rgba:2d26a3448b81171cd9e5cf6ee3686c0bb53a84680f5cc1ac7b992b58b1a56c05", + "mediaType": "image", + "verificationTimestamp": "2026-11-24T23:35:50.453Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:a982010025cf6033321f04353c456cac70a351439015e4068757ef9a976f2063", + "qualityReviewPath": "/template-gallery/reviews/qwen_layered_sunset_and_peaks.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "width": 960, + "height": 710, + "approvedOriginalReviewPath": "/template-gallery/reviews/qwen_layered_sunset_and_peaks.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/qwen_layered_sunset_and_peaks.original-provenance.json", + "approvedSourcePath": "/template-gallery/inputs/qwen_layered_sunset_and_peaks.source.png", + "approvedLayer1Path": "/template-gallery/layers/qwen_layered_sunset_and_peaks.layer-1.webp", + "approvedLayer2Path": "/template-gallery/layers/qwen_layered_sunset_and_peaks.layer-2.webp", + "approvedLayer3Path": "/template-gallery/layers/qwen_layered_sunset_and_peaks.layer-3.webp", + "approvedLayer4Path": "/template-gallery/layers/qwen_layered_sunset_and_peaks.layer-4.webp" + }, + { + "templateId": "wan_a14b_cloudbreak_over_the_ridges", + "templateLockHash": "tpl_80961b58", + "promptSettingsHash": "ps_ca81bdb8", + "modelRevision": "Wan-AI/Wan2.2-T2V-A14B-Diffusers@5be7df9619b54f4e2667b2755bc6a756675b5cd7", + "runtimeFingerprint": "sha256:stable-runtime-v1:4d41adc4d8b1fb3a9aed04a4e324121bd1a145d1051955a1493df3b5c6687bde", + "graphHash": "sha256:canonical-graph-v1:6921f430025f6a760f54a790517b949fc5d03c880f3c9e61eac12ae547b23cf2", + "proofLockHash": "sha256:retained-template-association-v1:83f1f7f44b331f402ed89821a589fe6092572b59d99b42ce2a8dbcb4667b81e4", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:40a4eb8d6275c83725f57c4d3499b8d12c00f8cf6caffc2d07006e74d24ab820", + "modelCommit": "5be7df9619b54f4e2667b2755bc6a756675b5cd7", + "templateRevisionHash": "2fe28c05a3adcb92031d2e5a369cf6be41990463644f08e5440bb998b32bc1fd", + "provenancePath": "/template-gallery/reviews/wan_a14b_cloudbreak_over_the_ridges.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:dc8a585212362451b0f133a2bee954a72a98b67c6cc30e943784ef7aba732984", + "outputPath": "/template-gallery/wan_a14b_cloudbreak_over_the_ridges.mp4", + "thumbnailPath": "/template-gallery/wan_a14b_cloudbreak_over_the_ridges.mp4", + "mediaHash": "sha256:decoded-video-framemd5:d99f2ce3a2ec3fc41fd45765e04c93ca9b8c0263d5972a086693a782fa7a3d54", + "mediaType": "video", + "verificationTimestamp": "2026-11-24T23:06:15.432Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:4441313beafa72c149d5dd05d05c4ebe7ed2b63204f4a8b00492ef8e06e43c1d", + "qualityReviewPath": "/template-gallery/reviews/wan_a14b_cloudbreak_over_the_ridges.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "width": 768, + "height": 512, + "frames": 81, + "durationSeconds": 3.375, + "posterPath": "/template-gallery/posters/wan_a14b_cloudbreak_over_the_ridges.png", + "approvedOriginalReviewPath": "/template-gallery/reviews/wan_a14b_cloudbreak_over_the_ridges.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/wan_a14b_cloudbreak_over_the_ridges.original-provenance.json" + }, + { + "templateId": "cogvideox_mossy_mountain_stream", + "templateLockHash": "tpl_089d3aae", + "promptSettingsHash": "ps_f986f95b", + "modelRevision": "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "runtimeFingerprint": "sha256:stable-runtime-v1:d6cb223bdc90f3d3195a6656078578d8395f7a760be93b426b891f61b48b3439", + "graphHash": "sha256:canonical-graph-v1:798aaa4c7c2501de15aca025081efa81d009df7977fd0fe6fb71c17f5895c105", + "proofLockHash": "sha256:retained-template-association-v1:22ad0b3b4dbe71a301f3d29a740c9347ecb874b9b229a95cd5384c6acc486abf", + "backendSourceFingerprint": "sha256:backend-source-v1:70bc1ff7fe61307be52cfda86b38c6400f2156cbc8240a489b62ff19a93d58dc", + "backendContractFingerprint": "sha256:backend-contract-v1:40a4eb8d6275c83725f57c4d3499b8d12c00f8cf6caffc2d07006e74d24ab820", + "modelCommit": "1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "templateRevisionHash": "c77c843d9555524c9f9ce04c53af16c2ee6570d7ff9b72d90fba98fd1fc3d9cc", + "provenancePath": "/template-gallery/reviews/cogvideox_mossy_mountain_stream.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:55c2d13b75ce4c5820f3ba96067987f8923004690bc87790bf5d003b8eb3c4c3", + "outputPath": "/template-gallery/cogvideox_mossy_mountain_stream.mp4", + "thumbnailPath": "/template-gallery/cogvideox_mossy_mountain_stream.mp4", + "mediaHash": "sha256:decoded-video-framemd5:2f769ade82cbcd96481ecdc245befa8059b0f913dc215763efce775753322111", + "mediaType": "video", + "verificationTimestamp": "2026-11-24T04:17:26.141Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:81a093f8bf994c1036b778b7e9e81a10bb18da72d4117d54b351ec0ef72acd3b", + "qualityReviewPath": "/template-gallery/reviews/cogvideox_mossy_mountain_stream.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "width": 720, + "height": 480, + "frames": 25, + "durationSeconds": 3.125, + "approvedOriginalReviewPath": "/template-gallery/reviews/cogvideox_mossy_mountain_stream.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/cogvideox_mossy_mountain_stream.original-provenance.json" + }, + { + "templateId": "wan_flf_blue_hour_at_the_tram_shelter", + "templateLockHash": "tpl_de5816ae", + "promptSettingsHash": "ps_b86813d0", + "modelRevision": "Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers@17c30769b1e0b5dcaa1799b117bf20a9c31f59d7", + "runtimeFingerprint": "sha256:stable-runtime-v1:4d41adc4d8b1fb3a9aed04a4e324121bd1a145d1051955a1493df3b5c6687bde", + "graphHash": "sha256:canonical-graph-v1:f3e6600531ca93b1b326cbfa5e3b0b853b4015ccb5c163302c003b81bc4897a6", + "proofLockHash": "sha256:retained-template-association-v1:bf8553368111f2d8ee23720f357b856fe5adc17f23a92256a962a3a333f39055", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:288f2abd0b142ec1f2081bf6d3dbf71ba988833662040e7e81688c4524cf0516", + "modelCommit": "17c30769b1e0b5dcaa1799b117bf20a9c31f59d7", + "templateRevisionHash": "719322718cef9254b24004759f2eac08a4302ea27c86cbe538782207d29389f6", + "provenancePath": "/template-gallery/reviews/wan_flf_blue_hour_at_the_tram_shelter.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:1a882b47f451da32ae40f722d5d48125aace11057e979e897a5773f3f1a52344", + "outputPath": "/template-gallery/wan_flf_blue_hour_at_the_tram_shelter.mp4", + "thumbnailPath": "/template-gallery/wan_flf_blue_hour_at_the_tram_shelter.mp4", + "mediaHash": "sha256:decoded-video-framemd5:17db687780a14782084a7d32b484d87c00074ebe1043de65fd6ce046b4f23918", + "mediaType": "video", + "verificationTimestamp": "2026-11-24T21:03:04.380Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:2bc814697e3ad5ce22846e92490ef14691157f1b7a2d2c84fc867d60f3ae2e44", + "qualityReviewPath": "/template-gallery/reviews/wan_flf_blue_hour_at_the_tram_shelter.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "width": 768, + "height": 512, + "frames": 81, + "durationSeconds": 3.375, + "approvedSourcePath": "/template-gallery/inputs/wan_flf_blue_hour_at_the_tram_shelter.first.png", + "approvedClosingFramePath": "/template-gallery/inputs/wan_flf_blue_hour_at_the_tram_shelter.last.png", + "approvedOriginalReviewPath": "/template-gallery/reviews/wan_flf_blue_hour_at_the_tram_shelter.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/wan_flf_blue_hour_at_the_tram_shelter.original-provenance.json" + }, + { + "templateId": "cogvideox_red_tram_model_railway", + "templateLockHash": "tpl_aca915d8", + "promptSettingsHash": "ps_44a08b73", + "modelRevision": "zai-org/CogVideoX-2b@1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "runtimeFingerprint": "sha256:stable-runtime-v1:a3fa2eec739aa0a83e3b3e009cdd8c2cc81665a11e53ad8c6363311f69a4a46d", + "graphHash": "sha256:canonical-graph-v1:9536733d2657f50f2530e066706a283d282c5dbd7989f70e563942b748489f2d", + "proofLockHash": "sha256:retained-template-association-v1:8f2c3a9fcddc6ae7687afc040b54c7974b06450e2c4c57c7634b0d0c0bdeef05", + "backendSourceFingerprint": "sha256:backend-source-v1:43f2ed10792fc6167b963166287cf7d5a0429afa26029e6455b0418e2123be86", + "backendContractFingerprint": "sha256:backend-contract-v1:33b2d430a6b544125220ee6627441eb2121c00e6cfb3aa7c2d54b08b7b2f1f09", + "modelCommit": "1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01", + "templateRevisionHash": "d74131d9a94ae6422f0824a9948e9ee157fb765058f8d45e515fda25a93c25c6", + "provenancePath": "/template-gallery/reviews/cogvideox_red_tram_model_railway.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:6f0d333914202c04f412ce9f5fa36e1d440f0f97ac2daf53fe0a604bf784d2f4", + "outputPath": "/template-gallery/cogvideox_red_tram_model_railway.mp4", + "thumbnailPath": "/template-gallery/cogvideox_red_tram_model_railway.mp4", + "mediaHash": "sha256:decoded-video-framemd5:a7b338af1009ea404ed9dfac3c907b8e04e25d78fb69c1ceb602ef0ab646b7cd", + "mediaType": "video", + "verificationTimestamp": "2026-11-24T02:42:22.051Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:7f6006ce9d0fff95b25b292b42e396719d38b91c7225430a11329aca2d6248c2", + "qualityReviewPath": "/template-gallery/reviews/cogvideox_red_tram_model_railway.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T05:51:53.933Z", + "beforePath": "/template-gallery/inputs/cogvideox_red_tram_model_railway.before.mp4", + "beforeMediaHash": "sha256:bytes:0737fe1e6b127fd4f5f66043b8911e5c7e380e60d50eab7e6bc9ba62e830b9dd", + "beforeSourceMediaHash": "sha256:bytes:0737fe1e6b127fd4f5f66043b8911e5c7e380e60d50eab7e6bc9ba62e830b9dd", + "afterPath": "/template-gallery/cogvideox_red_tram_model_railway.mp4", + "width": 720, + "height": 480, + "frames": 25, + "durationSeconds": 3.125, + "approvedOriginalReviewPath": "/template-gallery/reviews/cogvideox_red_tram_model_railway.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/cogvideox_red_tram_model_railway.original-provenance.json" + }, + { + "templateId": "sana_tidal_pool_on_black_basalt", + "templateLockHash": "tpl_2e1869d7", + "promptSettingsHash": "ps_91375aee", + "modelRevision": "Efficient-Large-Model/Sana_600M_1024px_diffusers@28f3af7689de15f3883d5863059a2fca0aa9b829", + "runtimeFingerprint": "sha256:stable-runtime-v1:de99e7b1729318c3e5b2dde98b51e5feb07ae329310f9b2da76831df1410cae7", + "graphHash": "sha256:canonical-graph-v1:4c0dd2f1d20300d93bac5d00a84eb057a7ffc5c64cafe9d4727a38d6852b7aab", + "proofLockHash": "sha256:retained-template-association-v1:5e15a6d770818c8a1339816bd3e1c93c03b0469068843cc5c8b46119ec622f6a", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "28f3af7689de15f3883d5863059a2fca0aa9b829", + "templateRevisionHash": "31c6fda19fe62a7282c50fe665069354989947ef1454ac63a1384637792d09c6", + "provenancePath": "/template-gallery/reviews/sana_tidal_pool_on_black_basalt.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:de2a4c7a51c41ddd6c186a18c714a1cf80859ce8339d372288f6237fb2e6f35a", + "outputPath": "/template-gallery/sana_tidal_pool_on_black_basalt.webp", + "thumbnailPath": "/template-gallery/sana_tidal_pool_on_black_basalt.webp", + "mediaHash": "sha256:decoded-rgba:1ae69e7748e42b0ef990ed4bcaa646e08c064443bb1251698fde42b1f345f831", + "mediaType": "image", + "verificationTimestamp": "2026-11-24T21:35:49.709Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:81f553cb4e0bc643e1685fe646e9ea7d019ee42d55accd5bde9bb80f9e9ba40d", + "qualityReviewPath": "/template-gallery/reviews/sana_tidal_pool_on_black_basalt.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/sana_tidal_pool_on_black_basalt.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sana_tidal_pool_on_black_basalt.original-provenance.json" + }, + { + "templateId": "joyimage_herbarium_rainy_porthole", + "templateLockHash": "tpl_9e12c4ef", + "promptSettingsHash": "ps_83f27e49", + "modelRevision": "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c", + "runtimeFingerprint": "sha256:stable-runtime-v1:de99e7b1729318c3e5b2dde98b51e5feb07ae329310f9b2da76831df1410cae7", + "graphHash": "sha256:canonical-graph-v1:764bcfbc5d06837477b63647a4723da8dfce96675828d2f038909bed22b155fd", + "proofLockHash": "sha256:retained-template-association-v1:9a37ae0338d16096b5048b2a5e701c9cbca7a759079df14aced51e1ce7f1a3a5", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "4b41fb25d961f37668750178ccbb380da326201c", + "templateRevisionHash": "5e0a8441e6f6998745a1b9c9a8244aa5d8e4e8591be5277396f519f41adf7ad4", + "provenancePath": "/template-gallery/reviews/joyimage_herbarium_rainy_porthole.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:6de90413c4d90f0d82b2332b48b3df904169710ce2855f3ad24f674327024566", + "outputPath": "/template-gallery/joyimage_herbarium_rainy_porthole.webp", + "thumbnailPath": "/template-gallery/joyimage_herbarium_rainy_porthole.webp", + "mediaHash": "sha256:decoded-rgba:b7f60e56e90f55c1a496a6c571ea18b68c3c42976ab35b8b2d193638306715fa", + "mediaType": "image", + "verificationTimestamp": "2026-11-25T04:23:00.358Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:33cbf2406dbc2de8d9d88c412538de063d124448e4d3e6b0328fd3571859bc77", + "qualityReviewPath": "/template-gallery/reviews/joyimage_herbarium_rainy_porthole.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/joyimage_herbarium_rainy_porthole.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/joyimage_herbarium_rainy_porthole.original-provenance.json" + }, + { + "templateId": "longcat_florist_end_of_lane", + "templateLockHash": "tpl_22334457", + "promptSettingsHash": "ps_cbbee99d", + "modelRevision": "meituan-longcat/LongCat-Image@d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8", + "runtimeFingerprint": "sha256:stable-runtime-v1:de99e7b1729318c3e5b2dde98b51e5feb07ae329310f9b2da76831df1410cae7", + "graphHash": "sha256:canonical-graph-v1:b412040d8f6595ffa0093fa82dce6f4993cf6d8db99730610e859ae8badab868", + "proofLockHash": "sha256:retained-template-association-v1:158e9782b718ec5c056b471522edf6086ccb8b3aa954894b0266747a7f9caba9", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "d2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8", + "templateRevisionHash": "b90a1a05613457abec04653497adf621e361d94bfc399db6cbd94f093a69421f", + "provenancePath": "/template-gallery/reviews/longcat_florist_end_of_lane.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:fd26a43c5d78748291b4a7d34651efec23b681f26370d603afb1594bfaf6455e", + "outputPath": "/template-gallery/longcat_florist_end_of_lane.webp", + "thumbnailPath": "/template-gallery/longcat_florist_end_of_lane.webp", + "mediaHash": "sha256:decoded-rgba:1c89f33e7d89275041001545c64f394efc9fd6deaa3c9e7e2d4ee7162e635ce1", + "mediaType": "image", + "verificationTimestamp": "2026-11-25T04:36:30.280Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:8a2e42ffe6e6f29c5a89c5d5cf4860e7bccbd47a3b394cccb6de1e74617f6821", + "qualityReviewPath": "/template-gallery/reviews/longcat_florist_end_of_lane.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/longcat_florist_end_of_lane.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/longcat_florist_end_of_lane.original-provenance.json" + }, + { + "templateId": "kandinsky3_smoked_glass_on_limestone", + "templateLockHash": "tpl_1223236b", + "promptSettingsHash": "ps_d94df476", + "modelRevision": "kandinsky-community/kandinsky-3@bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "runtimeFingerprint": "sha256:stable-runtime-v1:23c530c26adc3d75893644906dbad799a8f964739e2cbb5538d522a6135e9e82", + "graphHash": "sha256:canonical-graph-v1:afdbaf12db152f0df94876cdcf5ffc96e5ba2ccbabc71331981e05f9259ae8be", + "proofLockHash": "sha256:retained-template-association-v1:b75c7d8106b451211c6f16b6261633884cd0f66f186e37dcf51e59f030eaa801", + "backendSourceFingerprint": "sha256:backend-source-v1:175112f2430928958bd90dc5ae78b50ce0a54403e42e28cfc68096945d05fbe6", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "modelCommit": "bf79e6c219da8a94abb50235fdc4567eb8fb4632", + "templateRevisionHash": "196588c637d27503fb83fdcd1b294e9b3e7cad61436214751f92a1c6aaeb7361", + "provenancePath": "/template-gallery/reviews/kandinsky3_smoked_glass_on_limestone.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:91cb953e5fd879a601a3f097288c2987e4049b6b63c8d02ef098bfb79336f6b8", + "outputPath": "/template-gallery/kandinsky3_smoked_glass_on_limestone.webp", + "thumbnailPath": "/template-gallery/kandinsky3_smoked_glass_on_limestone.webp", + "mediaHash": "sha256:decoded-rgba:4f3c91a23235ecc34602400098a1bd93b6c214fb63f4c06e25a91d3794687515", + "mediaType": "image", + "verificationTimestamp": "2026-11-24T16:10:32.320Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:b20193cbe8ad4c80d0d3fa6aa139c349894bc7e783734fd32710c734057410ba", + "qualityReviewPath": "/template-gallery/reviews/kandinsky3_smoked_glass_on_limestone.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/kandinsky3_smoked_glass_on_limestone.before.png", + "beforeMediaHash": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "afterPath": "/template-gallery/kandinsky3_smoked_glass_on_limestone.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/kandinsky3_smoked_glass_on_limestone.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/kandinsky3_smoked_glass_on_limestone.original-provenance.json" + }, + { + "templateId": "longcat_clear_glass_at_the_bookshop", + "templateLockHash": "tpl_cae3d7ea", + "promptSettingsHash": "ps_1052bdee", + "modelRevision": "meituan-longcat/LongCat-Image-Edit@7b54ef423aa7854be7861600024be5c56ab7875a", + "runtimeFingerprint": "sha256:stable-runtime-v1:09299da9928e8a806b807da3711f9008e79b20b15e939dc6e3448811565b1db1", + "graphHash": "sha256:canonical-graph-v1:9eb6f51ba74d17909236f695506b2b08feb1855e4c217a6d79b70f30543380c5", + "proofLockHash": "sha256:retained-template-association-v1:b2f4cfecc339abd61ec0671f0a5e295f57c4359871a9c94923d3eaae0cba9386", + "backendSourceFingerprint": "sha256:backend-source-v1:43f2ed10792fc6167b963166287cf7d5a0429afa26029e6455b0418e2123be86", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "modelCommit": "7b54ef423aa7854be7861600024be5c56ab7875a", + "templateRevisionHash": "057e11900f267163730bdb1009b1be2118ab05c6d94815d4bf4e5af86da75fbe", + "provenancePath": "/template-gallery/reviews/longcat_clear_glass_at_the_bookshop.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:76845cb101ea201150ef82b9820b8c4a9273f07fcaf85ab476208707863930ac", + "outputPath": "/template-gallery/longcat_clear_glass_at_the_bookshop.webp", + "thumbnailPath": "/template-gallery/longcat_clear_glass_at_the_bookshop.webp", + "mediaHash": "sha256:decoded-rgba:3a17fb1c00700226f728e5083bd3faf3ed020037e3843df373ae21cd21fa1203", + "mediaType": "image", + "verificationTimestamp": "2026-11-24T01:37:17.476Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:073263bd1639666277122b5106ec10c21d28d380bb7ff5433061f50222112fdf", + "qualityReviewPath": "/template-gallery/reviews/longcat_clear_glass_at_the_bookshop.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/longcat_clear_glass_at_the_bookshop.before.webp", + "beforeMediaHash": "sha256:bytes:ff045be510a0e88cbab69bbe8c3794dd26bd19036bdec26a63a5b6ea5a11bc66", + "afterPath": "/template-gallery/longcat_clear_glass_at_the_bookshop.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/longcat_clear_glass_at_the_bookshop.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/longcat_clear_glass_at_the_bookshop.original-provenance.json" + }, + { + "templateId": "qwen_2511_pale_amber_on_limestone", + "templateLockHash": "tpl_46b7f4fe", + "promptSettingsHash": "ps_5dd80333", + "modelRevision": "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "runtimeFingerprint": "sha256:stable-runtime-v1:b4f7ac42e91d1017298bdaaf84898cb4920620d09413be1e5114f89f0b4ba8a6", + "graphHash": "sha256:canonical-graph-v1:487c0e08495ef2eb93b734132375a8ad84ae45d6941454325daa94b03d1e5205", + "proofLockHash": "sha256:retained-template-association-v1:3a879d17a38700eb8b1421ea22252722e5dba02535ea16655111e65f393b0271", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "modelCommit": "6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "templateRevisionHash": "196d20bc8bec725ddcc2674124e4815e019d3b054284f444add226044ed195e5", + "provenancePath": "/template-gallery/reviews/qwen_2511_pale_amber_on_limestone.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:6ccd42b3d31a4a7ce2c74746fbba86e240c1753ca732535700ee0ccc395501ef", + "outputPath": "/template-gallery/qwen_2511_pale_amber_on_limestone.webp", + "thumbnailPath": "/template-gallery/qwen_2511_pale_amber_on_limestone.webp", + "mediaHash": "sha256:decoded-rgba:586793ea06566035d41c61425f00e5973d0a09bc543ea2ab012d3372b3d3d6a8", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T18:58:07.960Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:0c3557091b038900f33498cc641f10c0ab1b65f4a29f89f2e69542c9f81f89ec", + "qualityReviewPath": "/template-gallery/reviews/qwen_2511_pale_amber_on_limestone.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/qwen_2511_pale_amber_on_limestone.before.png", + "beforeMediaHash": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "afterPath": "/template-gallery/qwen_2511_pale_amber_on_limestone.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/qwen_2511_pale_amber_on_limestone.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/qwen_2511_pale_amber_on_limestone.original-provenance.json" + }, + { + "templateId": "qwen_cobalt_on_charcoal_slate", + "templateLockHash": "tpl_3acb8169", + "promptSettingsHash": "ps_94f59a29", + "modelRevision": "Qwen/Qwen-Image-Edit@ac7f9318f633fc4b5778c59367c8128225f1e3de", + "runtimeFingerprint": "sha256:stable-runtime-v1:bb89a9c621046bbcbfa9115275c6bf2e9d6594b9bf53c57885e51db2ec8f0fff", + "graphHash": "sha256:canonical-graph-v1:289e7be3760372b115a67ff25d933895d02e06659182553071b50baebf039160", + "proofLockHash": "sha256:retained-template-association-v1:4d87f88ecac26848165a85ea1c079b32c3fdf39538b2cd76af0a6d5f7cc70252", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "modelCommit": "ac7f9318f633fc4b5778c59367c8128225f1e3de", + "templateRevisionHash": "335c41c4fab432f8ee590dc902ae7d63de98f46464642e1533a3479d339348df", + "provenancePath": "/template-gallery/reviews/qwen_cobalt_on_charcoal_slate.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:3cae98c4ad01e19432bf41924dddbbc2465455b760019ae7f9d8e54a7dce4318", + "outputPath": "/template-gallery/qwen_cobalt_on_charcoal_slate.webp", + "thumbnailPath": "/template-gallery/qwen_cobalt_on_charcoal_slate.webp", + "mediaHash": "sha256:decoded-rgba:c655a712b696cbc10cf8b8a019a9f4a252d3f23d8443a922ec082fa79a391844", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T21:05:09.116Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:d10391c4def9be43d1c23aa9415f09d0a75fe08167decb0354bb7aa0b59df3a4", + "qualityReviewPath": "/template-gallery/reviews/qwen_cobalt_on_charcoal_slate.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/qwen_cobalt_on_charcoal_slate.before.png", + "beforeMediaHash": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "afterPath": "/template-gallery/qwen_cobalt_on_charcoal_slate.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/qwen_cobalt_on_charcoal_slate.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/qwen_cobalt_on_charcoal_slate.original-provenance.json" + }, + { + "templateId": "joy_plus_lavender_on_limestone", + "templateLockHash": "tpl_5fc91f78", + "promptSettingsHash": "ps_5dff34eb", + "modelRevision": "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "runtimeFingerprint": "sha256:stable-runtime-v1:72817a55bd6287e5eb6b44a7e6b57ede1f5df18540aa3b9df74a75ec2253a912", + "graphHash": "sha256:canonical-graph-v1:1f09b68538b0723b1bea8f991a74c94eebbfffd3db4ecf3be5fdee198c7db694", + "proofLockHash": "sha256:retained-template-association-v1:209f8ae6d365d455d56a4356b01ee0416999816467fba730c7fc3f85bed5ae5e", + "backendSourceFingerprint": "sha256:backend-source-v1:d275bc94517015b221a9a8b5aea7572ec68c491060855c7895526e1ba640796d", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "modelCommit": "c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "templateRevisionHash": "448dbfb62c1255097be44eff481ff2c89ff04c31415faa5fe86f22a72a71fe4f", + "provenancePath": "/template-gallery/reviews/joy_plus_lavender_on_limestone.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:966b971f3be8c3919cfdafa6cadbe230294a8f8a96ec1121ef25db16bd4891ce", + "outputPath": "/template-gallery/joy_plus_lavender_on_limestone.webp", + "thumbnailPath": "/template-gallery/joy_plus_lavender_on_limestone.webp", + "mediaHash": "sha256:decoded-rgba:3e7d208ea83a0e64b2219f8dc79e15949e831a279084a38b77ec4b86e82acb3b", + "mediaType": "image", + "verificationTimestamp": "2026-11-24T04:13:54.287Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:bc52b4543f8f29bdff96e1a815028b1bdd6db3143b566a997614517413955b0a", + "qualityReviewPath": "/template-gallery/reviews/joy_plus_lavender_on_limestone.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/joy_plus_lavender_on_limestone.before.png", + "beforeMediaHash": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "afterPath": "/template-gallery/joy_plus_lavender_on_limestone.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/joy_plus_lavender_on_limestone.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/joy_plus_lavender_on_limestone.original-provenance.json" + }, + { + "templateId": "omnigen_cobalt_against_soft_apricot", + "templateLockHash": "tpl_843ac3b0", + "promptSettingsHash": "ps_5ed41c97", + "modelRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "runtimeFingerprint": "sha256:stable-runtime-v1:de99e7b1729318c3e5b2dde98b51e5feb07ae329310f9b2da76831df1410cae7", + "graphHash": "sha256:canonical-graph-v1:6603d5410b5cd5b8b8fee5d4c54f0fa27be81a6e0989fa470a07fa94f1ac7e0a", + "proofLockHash": "sha256:retained-template-association-v1:9d7cd58492177356cc467a3aae5a9e0131c1c7ef70c02d5caac07ec9d651b805", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "modelCommit": "016e2f61d12a98303f6bbdf122687694d7984268", + "templateRevisionHash": "932ee2726d371c73f19521cf7e50806fb86a95394047d6207a5cee3007e57f00", + "provenancePath": "/template-gallery/reviews/omnigen_cobalt_against_soft_apricot.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:8a62b99be196b227aadc83c30d17fda95773e47f3b25e16764754f9f01875e29", + "outputPath": "/template-gallery/omnigen_cobalt_against_soft_apricot.webp", + "thumbnailPath": "/template-gallery/omnigen_cobalt_against_soft_apricot.webp", + "mediaHash": "sha256:decoded-rgba:eae6a55a86a2ea12612f845d9e95158dbeee60b9a735a6b5b2ba3f2cf2c41f40", + "mediaType": "image", + "verificationTimestamp": "2026-11-25T02:43:28.002Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:36592cbd9bd4143d41ed230ead20b9aee1acff35c9d503f35cb465d3fc569cce", + "qualityReviewPath": "/template-gallery/reviews/omnigen_cobalt_against_soft_apricot.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/omnigen_cobalt_against_soft_apricot.before.png", + "beforeMediaHash": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "afterPath": "/template-gallery/omnigen_cobalt_against_soft_apricot.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/omnigen_cobalt_against_soft_apricot.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/omnigen_cobalt_against_soft_apricot.original-provenance.json" + }, + { + "templateId": "flux_klein_alpine_lake_panorama", + "templateLockHash": "tpl_044f3f0c", + "promptSettingsHash": "ps_21d55461", + "modelRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "runtimeFingerprint": "sha256:stable-runtime-v1:68373e32096bddb5698b4ba7e98ffad928aa0c82a73b4199795ebb05cc45ecc6", + "graphHash": "sha256:canonical-graph-v1:2989815bea79d34490a6f78257eac8c818445145dbd6adaceb2b5ad86a6fcf4a", + "proofLockHash": "sha256:retained-template-association-v1:ffaf5f17796236720c19f5d02cdcb7989c2bb2b058effdd29cc2dd1592574964", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:06f986600338dc08fb5d1e639bfad55384f5b15ca0c97c2aeb7ed42a8c245594", + "modelCommit": "e7b7dc27f91deacad38e78976d1f2b499d76a294", + "templateRevisionHash": "f90f8a8162586ea0e94260bb3b332de2885bb642d0776a0a104b3495a593cc6d", + "provenancePath": "/template-gallery/reviews/flux_klein_alpine_lake_panorama.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:9a89ac469a4015d30e99c27de6ea9faff9be67610f5ad0ac3c592af5ed1eea27", + "outputPath": "/template-gallery/flux_klein_alpine_lake_panorama.webp", + "thumbnailPath": "/template-gallery/flux_klein_alpine_lake_panorama.webp", + "mediaHash": "sha256:decoded-rgba:6c5b5383c328ec744a440296d811a4f3c1c49470319ba9093cee2a12364c9ea1", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T21:08:09.132Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:303762606e606e0746284c5a396dbf6eca4ca94e658936e33804dcce7b019c93", + "qualityReviewPath": "/template-gallery/reviews/flux_klein_alpine_lake_panorama.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/flux_klein_alpine_lake_panorama.before.png", + "beforeMediaHash": "sha256:bytes:50270382b4b730b87f79b775accaeeb81f3ff8885cd3d2cea94830206fbc181b", + "afterPath": "/template-gallery/flux_klein_alpine_lake_panorama.webp", + "width": 1344, + "height": 768, + "approvedOriginalReviewPath": "/template-gallery/reviews/flux_klein_alpine_lake_panorama.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/flux_klein_alpine_lake_panorama.original-provenance.json" + }, + { + "templateId": "zimage_rocky_glacial_shores", + "templateLockHash": "tpl_c88fe575", + "promptSettingsHash": "ps_6b582e00", + "modelRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "runtimeFingerprint": "sha256:stable-runtime-v1:eedc99a4c3b763613ba8b59b8567915152fa71aea3b24edc4c6168b8769551d2", + "graphHash": "sha256:canonical-graph-v1:f7b725ec789f566f496f4afe4414288f55289d3180b2722f47f855b0cf2c2a39", + "proofLockHash": "sha256:retained-template-association-v1:dfb4afb6161542ae2520be79838bce585d2cac138e0acb0afaac389a67f5c7b4", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:06f986600338dc08fb5d1e639bfad55384f5b15ca0c97c2aeb7ed42a8c245594", + "modelCommit": "f332072aa78be7aecdf3ee76d5c247082da564a6", + "templateRevisionHash": "67bc5216f976bce75a6793c5eb33181b777828c34fb7e0573d31073d2ad42bc9", + "provenancePath": "/template-gallery/reviews/zimage_rocky_glacial_shores.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:c9c0033619e279d6eaeaf125753800ea9bf1545931a162d42b165f1f2889aa03", + "outputPath": "/template-gallery/zimage_rocky_glacial_shores.webp", + "thumbnailPath": "/template-gallery/zimage_rocky_glacial_shores.webp", + "mediaHash": "sha256:decoded-rgba:8b384157a9e6f44ef941216d17dd54e53ffb20a242727ec36d0ad7bf5cbf4be3", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T20:16:17.605Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:b1d91e2e19bc68f5cb1633b8b3116d686eaed5ba8833090e1ae077d76649cc1d", + "qualityReviewPath": "/template-gallery/reviews/zimage_rocky_glacial_shores.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/zimage_rocky_glacial_shores.before.png", + "beforeMediaHash": "sha256:bytes:50270382b4b730b87f79b775accaeeb81f3ff8885cd3d2cea94830206fbc181b", + "afterPath": "/template-gallery/zimage_rocky_glacial_shores.webp", + "width": 1344, + "height": 768, + "approvedOriginalReviewPath": "/template-gallery/reviews/zimage_rocky_glacial_shores.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/zimage_rocky_glacial_shores.original-provenance.json" + }, + { + "templateId": "qwen_bookshop_gouache", + "templateLockHash": "tpl_bb0efb52", + "promptSettingsHash": "ps_f2c73a20", + "modelRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "runtimeFingerprint": "sha256:stable-runtime-v1:de99e7b1729318c3e5b2dde98b51e5feb07ae329310f9b2da76831df1410cae7", + "graphHash": "sha256:canonical-graph-v1:7c05a757728207dbd039194383498c67578647f594c51042bd041297584d99c5", + "proofLockHash": "sha256:retained-template-association-v1:598a0e97c2455c0fd838f615a9647b9602065d049670a06a803bf1e2183eddf2", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "modelCommit": "25468b98e3276ca6700de15c6628e51b7de54a26", + "templateRevisionHash": "3163da25258525f8cb2c8a71b64a89e5445424ed1ad0a8b44b7321aafceb8175", + "provenancePath": "/template-gallery/reviews/qwen_bookshop_gouache.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:7944a03f5e15d47853275a8a773fa670b23fe5aa358fce8109aca8f44fa22e35", + "outputPath": "/template-gallery/qwen_bookshop_gouache.webp", + "thumbnailPath": "/template-gallery/qwen_bookshop_gouache.webp", + "mediaHash": "sha256:decoded-rgba:852b2c40951fb9c027fc86987c2f0fa4946bc16ebc1dd67d42c533d89a29b776", + "mediaType": "image", + "verificationTimestamp": "2026-11-25T03:40:38.530Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:82618a6f05227b9bbf45ee54f273ed2ceb85aae779eb13e0e21daa87b5685f7c", + "qualityReviewPath": "/template-gallery/reviews/qwen_bookshop_gouache.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/qwen_bookshop_gouache.before.webp", + "beforeMediaHash": "sha256:bytes:ff045be510a0e88cbab69bbe8c3794dd26bd19036bdec26a63a5b6ea5a11bc66", + "afterPath": "/template-gallery/qwen_bookshop_gouache.webp", + "width": 1328, + "height": 1328, + "approvedOriginalReviewPath": "/template-gallery/reviews/qwen_bookshop_gouache.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/qwen_bookshop_gouache.original-provenance.json" + }, + { + "templateId": "kontext_wide_water_alpine_ridge", + "templateLockHash": "tpl_1b8d91bd", + "promptSettingsHash": "ps_781a8232", + "modelRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "runtimeFingerprint": "sha256:stable-runtime-v1:48985e1ca14efd9017e24dce955551b44aa18242fd37011a5bc77bba96edba59", + "graphHash": "sha256:canonical-graph-v1:991400ad01692ea30254b9cacabc637b1f13b2156533cc4ccd05d1bd2df9a53c", + "proofLockHash": "sha256:retained-template-association-v1:9d08cad6453783a399115e800927ba2530b853a73de6871bb21c23e5f5ad71d0", + "backendSourceFingerprint": "sha256:backend-source-v1:272116bf77447dfb20b0899666ae417b68401993dd97ca438db63d91ff79cab6", + "backendContractFingerprint": "sha256:backend-contract-v1:06f986600338dc08fb5d1e639bfad55384f5b15ca0c97c2aeb7ed42a8c245594", + "modelCommit": "24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "templateRevisionHash": "8ae90dc2b352689446effd182c4ad144c4e555d5b76fa3adbdb77fa4b767d119", + "provenancePath": "/template-gallery/reviews/kontext_wide_water_alpine_ridge.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:7dc6ce3e7e4e2cf17d30f6153babdf23366479868b69a1cde5d5df89bcfd82f2", + "outputPath": "/template-gallery/kontext_wide_water_alpine_ridge.webp", + "thumbnailPath": "/template-gallery/kontext_wide_water_alpine_ridge.webp", + "mediaHash": "sha256:decoded-rgba:82bd1a22a1119fb3d5a4c84fceed93f5017a6d5e601280d8f766c8e88d114c4e", + "mediaType": "image", + "verificationTimestamp": "2026-11-24T04:27:52.558Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:a6d526245add42b534bc44924a136c91e8a67b90787de8c225ced841d17e284e", + "qualityReviewPath": "/template-gallery/reviews/kontext_wide_water_alpine_ridge.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/kontext_wide_water_alpine_ridge.before.png", + "beforeMediaHash": "sha256:bytes:50270382b4b730b87f79b775accaeeb81f3ff8885cd3d2cea94830206fbc181b", + "afterPath": "/template-gallery/kontext_wide_water_alpine_ridge.webp", + "width": 1344, + "height": 768, + "approvedOriginalReviewPath": "/template-gallery/reviews/kontext_wide_water_alpine_ridge.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/kontext_wide_water_alpine_ridge.original-provenance.json" + }, + { + "templateId": "chroma_alpine_block_print", + "templateLockHash": "tpl_cda267e7", + "promptSettingsHash": "ps_b12d1fc3", + "modelRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "runtimeFingerprint": "sha256:stable-runtime-v1:de99e7b1729318c3e5b2dde98b51e5feb07ae329310f9b2da76831df1410cae7", + "graphHash": "sha256:canonical-graph-v1:3f23ca4ba74ed0ec547deb55013ac0d0335dba063505c3721c4aa6447caf31b6", + "proofLockHash": "sha256:retained-template-association-v1:daa61c8276f8152d0eeb14c0bb982b760968dd13d9c58ca334d22bebf235a34c", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "modelCommit": "0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "templateRevisionHash": "fbe83f016a250a5749f63a2b3eaa8e9806fc0d0c4b4f849a91a6f2094425dcb0", + "provenancePath": "/template-gallery/reviews/chroma_alpine_block_print.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:5597dc8e3b9755333dfd0554e74b3c5d765ed31a3fbcb0d1dee717952d8f6d61", + "outputPath": "/template-gallery/chroma_alpine_block_print.webp", + "thumbnailPath": "/template-gallery/chroma_alpine_block_print.webp", + "mediaHash": "sha256:decoded-rgba:19de67ceadb3aeb6d9a18a36b3ed47438409f15727da349c7d4d0988eece272b", + "mediaType": "image", + "verificationTimestamp": "2026-11-25T03:58:25.751Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:29cdc4900e8335a94be15fcd0e8957c949c660f3b3f0032a73ea79474cb9f9f6", + "qualityReviewPath": "/template-gallery/reviews/chroma_alpine_block_print.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/chroma_alpine_block_print.before.png", + "beforeMediaHash": "sha256:bytes:88290a96bc8d52f11f2d1e3c0c0e04c2027661816e54b57d7d4739d731ca1e75", + "afterPath": "/template-gallery/chroma_alpine_block_print.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/chroma_alpine_block_print.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/chroma_alpine_block_print.original-provenance.json" + }, + { + "templateId": "joyimage_base_cobalt_paper_band", + "templateLockHash": "tpl_ef76cf20", + "promptSettingsHash": "ps_5d13f8f9", + "modelRevision": "jdopensource/JoyAI-Image-Edit-Diffusers@4b41fb25d961f37668750178ccbb380da326201c", + "runtimeFingerprint": "sha256:stable-runtime-v1:eb827b0ec37117a097e5aa9ebc1d0f92d03fedaef405389b27d8ed13b4d1bd6f", + "graphHash": "sha256:canonical-graph-v1:f888affd299d0162c7dc01ff45d61ef3d3476ed7625141d8f6d2b4d8c4e6cdf7", + "proofLockHash": "sha256:retained-template-association-v1:99134954ce43676e13c6f8734f3ec9e1d99ac2e9ff769abe90c27ac0d53d499f", + "backendSourceFingerprint": "sha256:backend-source-v1:585997dc1146ec6effb20c260272babc01713ecdea4f78a0872c12ef2568ef83", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "modelCommit": "4b41fb25d961f37668750178ccbb380da326201c", + "templateRevisionHash": "895ec1f44e28507344c4bdabd3a3c07c3fe985d5b0fc0b5373f91ec8ad1f92d0", + "provenancePath": "/template-gallery/reviews/joyimage_base_cobalt_paper_band.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:bff2a0c125d46a241d6b512d3a18b0fdedde716cff427f9eb517f8ec42f719a8", + "outputPath": "/template-gallery/joyimage_base_cobalt_paper_band.webp", + "thumbnailPath": "/template-gallery/joyimage_base_cobalt_paper_band.webp", + "mediaHash": "sha256:decoded-rgba:afc30d4a73891c476c70e89d9a01cac8cc35d658edf143ae5ce4dadfe45b0506", + "mediaType": "image", + "verificationTimestamp": "2026-11-24T12:15:48.363Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:ccdddedff8d15d9ca38e8ea36a3263a33ee308228cdb3ca8243391ffe452eb63", + "qualityReviewPath": "/template-gallery/reviews/joyimage_base_cobalt_paper_band.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/joyimage_base_cobalt_paper_band.before.png", + "beforeMediaHash": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "afterPath": "/template-gallery/joyimage_base_cobalt_paper_band.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/joyimage_base_cobalt_paper_band.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/joyimage_base_cobalt_paper_band.original-provenance.json" + }, + { + "templateId": "sdxl_blue_glass_on_linen", + "templateLockHash": "tpl_bc28f7ef", + "promptSettingsHash": "ps_1be10bde", + "modelRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2642af585975d6b55b551bcdfb8606edb2fab4b37a05875aa3a8024270b6eab", + "graphHash": "sha256:canonical-graph-v1:b2fb94a00ca2033f808f3824262500fbad51b761bfa8e7b93079350f26a961ae", + "proofLockHash": "sha256:retained-template-association-v1:b200b8345243f183c2c5e6046f8155b03b16bbfff6ef991a31ba5e187dbc0f9d", + "backendSourceFingerprint": "sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290", + "backendContractFingerprint": "sha256:backend-contract-v1:bd364fcd29020d51bb61f5f9bf320cf0bf562e718c645c21ffac8ed5a47b740d", + "modelCommit": "462165984030d82259a11f4367a4eed129e94a7b", + "templateRevisionHash": "c54124fc0e1c94b88c70853b0102ad94e7cbbe4d5761528d8c699f2ecd0d6be2", + "provenancePath": "/template-gallery/reviews/sdxl_blue_glass_on_linen.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:cac7bb44e52b3df4485d968796b8837922e6b8a63ef972afe0934771b03d808b", + "outputPath": "/template-gallery/sdxl_blue_glass_on_linen.webp", + "thumbnailPath": "/template-gallery/sdxl_blue_glass_on_linen.webp", + "mediaHash": "sha256:decoded-rgba:085d7b56fe985a2a3345b721e46b041723e55abde9c57ba4e511b8e28301bf01", + "mediaType": "image", + "verificationTimestamp": "2026-11-25T04:29:19.529Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:92e4bfed4c7ff0db1961231e48978e9c8607b59a0f7a4156cae21a9f8e137dd4", + "qualityReviewPath": "/template-gallery/reviews/sdxl_blue_glass_on_linen.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/sdxl_blue_glass_on_linen.before.png", + "beforeMediaHash": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "afterPath": "/template-gallery/sdxl_blue_glass_on_linen.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/sdxl_blue_glass_on_linen.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sdxl_blue_glass_on_linen.original-provenance.json" + }, + { + "templateId": "qwen_2512_cobalt_backdrop_repair", + "templateLockHash": "tpl_05825928", + "promptSettingsHash": "ps_499eb957", + "modelRevision": "Qwen/Qwen-Image-2512@25468b98e3276ca6700de15c6628e51b7de54a26", + "runtimeFingerprint": "sha256:stable-runtime-v1:f526854e6a90147cead402f27c3a110ea4a529b709bd10a855bc0bd6d5028c5d", + "graphHash": "sha256:canonical-graph-v1:5480e0491b621010f2530b034c25a8457f3a3be63b1bb20359b39ab68356be7a", + "proofLockHash": "sha256:retained-template-association-v1:776ba84e142544ffcb27bf0d52c47ccffda7c86de38574291ccfc4b4edb32c0e", + "backendSourceFingerprint": "sha256:backend-source-v1:43f2ed10792fc6167b963166287cf7d5a0429afa26029e6455b0418e2123be86", + "backendContractFingerprint": "sha256:backend-contract-v1:e7a7aa3acbdedd686fa7e7a9d4bcc39c1709ba1fec38f047d63ff83558a85c18", + "modelCommit": "25468b98e3276ca6700de15c6628e51b7de54a26", + "templateRevisionHash": "9448d9e6aed3bf64c4ada3bf63c282f7cbc03c8e6a5ade076450af1d21a9b800", + "provenancePath": "/template-gallery/reviews/qwen_2512_cobalt_backdrop_repair.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:33bb2b05f7ffa5af28e0a588e6db3dd4d15b47254b5d40dd8a9237036fe2701e", + "outputPath": "/template-gallery/qwen_2512_cobalt_backdrop_repair.webp", + "thumbnailPath": "/template-gallery/qwen_2512_cobalt_backdrop_repair.webp", + "mediaHash": "sha256:decoded-rgba:49bbf6165a11e0967fad933ed4826ecfe6bca46e1173291513c945ffa621a266", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T23:28:40.451Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:f1b9ddad7ec09aca95ee6e0201cc3e35ba8b3163e20b280e2807aaaff2e2b219", + "qualityReviewPath": "/template-gallery/reviews/qwen_2512_cobalt_backdrop_repair.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/qwen_2512_cobalt_backdrop_repair.before.png", + "beforeMediaHash": "sha256:bytes:f5db354dc97ea11898d868898c5cc8ef454bb75ffe098b00bb2f06bc89f85885", + "afterPath": "/template-gallery/qwen_2512_cobalt_backdrop_repair.webp", + "width": 1328, + "height": 1328, + "approvedOriginalReviewPath": "/template-gallery/reviews/qwen_2512_cobalt_backdrop_repair.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/qwen_2512_cobalt_backdrop_repair.original-provenance.json", + "approvedMaskPath": "/template-gallery/inputs/qwen_2512_cobalt_backdrop_repair.mask.png" + }, + { + "templateId": "flux1_dev_limestone_studio_scratch_repair", + "templateLockHash": "tpl_eaa910f1", + "promptSettingsHash": "ps_c7610cad", + "modelRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "runtimeFingerprint": "sha256:stable-runtime-v1:b7914900095fea47e498858679857a6fab69ea8775126a1d1aedbf5a20584e83", + "graphHash": "sha256:canonical-graph-v1:3ca6c83955149d17954a830a5e2f1200d06bedfae40b693d620157b1606184b5", + "proofLockHash": "sha256:retained-template-association-v1:d46563ab96a3903f2f77ebb8efc1847d400619e1f160de2aa9089624581f0263", + "backendSourceFingerprint": "sha256:backend-source-v1:43f2ed10792fc6167b963166287cf7d5a0429afa26029e6455b0418e2123be86", + "backendContractFingerprint": "sha256:backend-contract-v1:e7a7aa3acbdedd686fa7e7a9d4bcc39c1709ba1fec38f047d63ff83558a85c18", + "modelCommit": "3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "templateRevisionHash": "fe963e2fc85d8c21f11d606e545a9dcf5d63e5b2abad4b30900cdb64e5a25d36", + "provenancePath": "/template-gallery/reviews/flux1_dev_limestone_studio_scratch_repair.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:35f7e8e524aa152d2a18f714ff80c41027d705bfb2ff5c43049a9d05dafad577", + "outputPath": "/template-gallery/flux1_dev_limestone_studio_scratch_repair.webp", + "thumbnailPath": "/template-gallery/flux1_dev_limestone_studio_scratch_repair.webp", + "mediaHash": "sha256:decoded-rgba:5b021541d89d099bd7fd3c5ab2bf5555c78af20e8ec8c4dbbe18879325c709df", + "mediaType": "image", + "verificationTimestamp": "2026-11-24T02:02:57.362Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:1e60639d4723b16ed10a1e0d12e842c922182a215a25527f13189e090da7012f", + "qualityReviewPath": "/template-gallery/reviews/flux1_dev_limestone_studio_scratch_repair.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/flux1_dev_limestone_studio_scratch_repair.before.png", + "beforeMediaHash": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "afterPath": "/template-gallery/flux1_dev_limestone_studio_scratch_repair.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/flux1_dev_limestone_studio_scratch_repair.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/flux1_dev_limestone_studio_scratch_repair.original-provenance.json", + "approvedMaskPath": "/template-gallery/inputs/flux1_dev_limestone_studio_scratch_repair.mask.png" + }, + { + "templateId": "zimage_seamless_cobalt_backdrop", + "templateLockHash": "tpl_fc6e804a", + "promptSettingsHash": "ps_06840c42", + "modelRevision": "Tongyi-MAI/Z-Image-Turbo@f332072aa78be7aecdf3ee76d5c247082da564a6", + "runtimeFingerprint": "sha256:stable-runtime-v1:874b422e75064031270ac2a5ce0526a30cc96205f7b95dd886a72b7b5cba5240", + "graphHash": "sha256:canonical-graph-v1:262959c3db75dc58cc10c7ba5efafd540dac6a33ad4bd095cfe264ec83ad5dde", + "proofLockHash": "sha256:retained-template-association-v1:4f6f478c006a765fd0c199a4a9acf2437eb116a681170b9839bf8cca73734760", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:e7a7aa3acbdedd686fa7e7a9d4bcc39c1709ba1fec38f047d63ff83558a85c18", + "modelCommit": "f332072aa78be7aecdf3ee76d5c247082da564a6", + "templateRevisionHash": "2a72cfcaddfa6e69098ca7feceef620a98bc50441abfa93f509c0a18711de478", + "provenancePath": "/template-gallery/reviews/zimage_seamless_cobalt_backdrop.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:f8e01efe196000b248a22e5fad8b9ab5bf1f7115b6efc4298923ef5a412787f0", + "outputPath": "/template-gallery/zimage_seamless_cobalt_backdrop.webp", + "thumbnailPath": "/template-gallery/zimage_seamless_cobalt_backdrop.webp", + "mediaHash": "sha256:decoded-rgba:346751415bc7eff0c44a6a582c8b5ee43ecc0d102abe13b171f5374f9f54c5d6", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T18:07:24.639Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:c4d91e49871db98da5a51a6c7de4fcd3cb16766b910f0f3f7909162aad8d1c47", + "qualityReviewPath": "/template-gallery/reviews/zimage_seamless_cobalt_backdrop.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/zimage_seamless_cobalt_backdrop.before.png", + "beforeMediaHash": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "afterPath": "/template-gallery/zimage_seamless_cobalt_backdrop.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/zimage_seamless_cobalt_backdrop.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/zimage_seamless_cobalt_backdrop.original-provenance.json", + "approvedMaskPath": "/template-gallery/inputs/zimage_seamless_cobalt_backdrop.mask.png" + }, + { + "templateId": "sdxl_pag_cobalt_wall", + "templateLockHash": "tpl_ceafa1fa", + "promptSettingsHash": "ps_52a8b07a", + "modelRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2642af585975d6b55b551bcdfb8606edb2fab4b37a05875aa3a8024270b6eab", + "graphHash": "sha256:canonical-graph-v1:9a0b6bef1c8170f91b03876c7b3b0de283e4e5494f6349f2e52759470dd7922b", + "proofLockHash": "sha256:retained-template-association-v1:2065ecc9793ffc7471df85e721cc798431f6fdedfa6328eb20e1df3b22772dff", + "backendSourceFingerprint": "sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290", + "backendContractFingerprint": "sha256:backend-contract-v1:61201b43ea68d3fd347fbc374e292b5839be28f908b473bcb69f5ec1f8b87736", + "modelCommit": "462165984030d82259a11f4367a4eed129e94a7b", + "templateRevisionHash": "b95bd1828ace6db13d5ea54c01f8e9449bfcd73552ae371dcb52ce1838ecad8d", + "provenancePath": "/template-gallery/reviews/sdxl_pag_cobalt_wall.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:c9dba7ea8a3129ccf7c4787a317ed5a26b3c719fff1f9e5f3d34f094b9d23708", + "outputPath": "/template-gallery/sdxl_pag_cobalt_wall.webp", + "thumbnailPath": "/template-gallery/sdxl_pag_cobalt_wall.webp", + "mediaHash": "sha256:decoded-rgba:0c7dbc42854f3796761b9260a0a08fa2223d03c1ae1e8b41560cdc391cb9bbdb", + "mediaType": "image", + "verificationTimestamp": "2026-11-25T03:24:43.819Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:29152a071c9df88b96bbfa5ffb1ce28c0ed0cbd73ff26237251df712c12d3f1f", + "qualityReviewPath": "/template-gallery/reviews/sdxl_pag_cobalt_wall.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/sdxl_pag_cobalt_wall.before.png", + "beforeMediaHash": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "afterPath": "/template-gallery/sdxl_pag_cobalt_wall.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/sdxl_pag_cobalt_wall.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sdxl_pag_cobalt_wall.original-provenance.json", + "approvedMaskPath": "/template-gallery/inputs/sdxl_pag_cobalt_wall.mask.png" + }, + { + "templateId": "flux_klein_open_glacial_lake", + "templateLockHash": "tpl_23b2c7db", + "promptSettingsHash": "ps_cafe7c6f", + "modelRevision": "black-forest-labs/FLUX.2-klein-4B@e7b7dc27f91deacad38e78976d1f2b499d76a294", + "runtimeFingerprint": "sha256:stable-runtime-v1:a03f4352dda750ce42446ce3a3520acec08e1209f852b2af1629521522b5a0d2", + "graphHash": "sha256:canonical-graph-v1:e243008b76ef57a46997f5a6b9e12c84dd7dee5ae863392b8a1a6116869a6e9a", + "proofLockHash": "sha256:retained-template-association-v1:9d625f93f1f814584f1488d27003f9d26d08da115e749baba1e7c4e2c92b50d7", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:e7a7aa3acbdedd686fa7e7a9d4bcc39c1709ba1fec38f047d63ff83558a85c18", + "modelCommit": "e7b7dc27f91deacad38e78976d1f2b499d76a294", + "templateRevisionHash": "e100c45ec42735d37c8eb9c6d442d29822234c41d050ba311b178e38ee14baa5", + "provenancePath": "/template-gallery/reviews/flux_klein_open_glacial_lake.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:3a2017b05e05a29ecb8346b8ffe13ea6a4514442db5f2caf3938c1b678f7dad3", + "outputPath": "/template-gallery/flux_klein_open_glacial_lake.webp", + "thumbnailPath": "/template-gallery/flux_klein_open_glacial_lake.webp", + "mediaHash": "sha256:decoded-rgba:1d1c77e4080bc57bed08e88f9debc6d9157320b274c25bdfc0163885ebe03b02", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T17:09:43.722Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:dd0b02fa68b57a72495d294cff85dabfd3fae85aec93dd5535deb5f81c613bd4", + "qualityReviewPath": "/template-gallery/reviews/flux_klein_open_glacial_lake.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/flux_klein_open_glacial_lake.before.png", + "beforeMediaHash": "sha256:bytes:88290a96bc8d52f11f2d1e3c0c0e04c2027661816e54b57d7d4739d731ca1e75", + "afterPath": "/template-gallery/flux_klein_open_glacial_lake.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/flux_klein_open_glacial_lake.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/flux_klein_open_glacial_lake.original-provenance.json", + "approvedMaskPath": "/template-gallery/inputs/flux_klein_open_glacial_lake.mask.png" + }, + { + "templateId": "sd15_control_cobalt_handmade_paper", + "templateLockHash": "tpl_764eeb73", + "promptSettingsHash": "ps_45a62571", + "modelRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "runtimeFingerprint": "sha256:stable-runtime-v1:ca59c951b7d774013751aa640d99281a0fadaf6a61a7213c2c922347324d00f3", + "graphHash": "sha256:canonical-graph-v1:eba7a5b4abc12764de5075d2119130189e161241038b4bcf1f0dce0acb70f176", + "proofLockHash": "sha256:retained-template-association-v1:93ea923744bf6c9994dd9fd55b3505e0c238abf9600fdd956e99aac032d08b51", + "backendSourceFingerprint": "sha256:backend-source-v1:3227569ff822090d00a80a3a88213d76d5ca43092d2918cec2494962457865a5", + "backendContractFingerprint": "sha256:backend-contract-v1:b5b17d569852e051bdac1d2b3e08b4753392cadd39a1277f893bdf34f19490c5", + "modelCommit": "451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "templateRevisionHash": "fee63ff957b7394a6472d76a9f662abd1d86193d12ee6c0ab2cf6c77cf1e2b50", + "provenancePath": "/template-gallery/reviews/sd15_control_cobalt_handmade_paper.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:dec51f3aa96b6e363b0a17887676f94ecbf3b4fc2aef1f28a8619a60ab533fb9", + "outputPath": "/template-gallery/sd15_control_cobalt_handmade_paper.webp", + "thumbnailPath": "/template-gallery/sd15_control_cobalt_handmade_paper.webp", + "mediaHash": "sha256:decoded-rgba:e0cac92fbe261afe7f803864aa7d499592f96b38470a522deb842b4e8c72602d", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T18:36:20.247Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:92f97f5e6a9f13697b96467e24700935f702e0709ae57af825f9372314ced341", + "qualityReviewPath": "/template-gallery/reviews/sd15_control_cobalt_handmade_paper.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/sd15_control_cobalt_handmade_paper.before.png", + "beforeMediaHash": "sha256:bytes:d143c4922ad498b9bd436d06df424bbff50baf023b93735b53ee401e19e4cbf1", + "afterPath": "/template-gallery/sd15_control_cobalt_handmade_paper.webp", + "width": 512, + "height": 512, + "approvedOriginalReviewPath": "/template-gallery/reviews/sd15_control_cobalt_handmade_paper.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sd15_control_cobalt_handmade_paper.original-provenance.json", + "approvedGuidePath": "/template-gallery/inputs/sd15_control_cobalt_handmade_paper.guide.png" + }, + { + "templateId": "sd15_control_cobalt_studio_wall_repair", + "templateLockHash": "tpl_8b4c43db", + "promptSettingsHash": "ps_e2e07bdd", + "modelRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "runtimeFingerprint": "sha256:stable-runtime-v1:77bd0cb9b34be74c8e88b27d3a23ab2a074d38df742974da20ad7d536a82a002", + "graphHash": "sha256:canonical-graph-v1:0d2aba098bb0cecaaf59dc601a54f637849a0918166655f546313f69e29aa5ad", + "proofLockHash": "sha256:retained-template-association-v1:3cdcce1039117a8c90c408c114be93d2f82726fcfff1a950519aa9467689a5ac", + "backendSourceFingerprint": "sha256:backend-source-v1:fe1a57b8e352eb66a1a26ebbff5865aaafcf5d55326c4bbcbaf2132ec75f54a8", + "backendContractFingerprint": "sha256:backend-contract-v1:7271d6dfcd46a677217edf40c568c3f5e9ae300200f76976e0cf18fd9b9f2508", + "modelCommit": "451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "templateRevisionHash": "871cffe6c8b434f4d3afa1f65009582862b565313d180b56d5a61eedd5fd1aa8", + "provenancePath": "/template-gallery/reviews/sd15_control_cobalt_studio_wall_repair.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:6046d8640f709cba238d6134f78e9cfe7fce749ceaa0ba4d1fd758fdc569ff63", + "outputPath": "/template-gallery/sd15_control_cobalt_studio_wall_repair.webp", + "thumbnailPath": "/template-gallery/sd15_control_cobalt_studio_wall_repair.webp", + "mediaHash": "sha256:decoded-rgba:e21c0e2217f64a2a30b12b180a6cf16beceb882c5c82333a6e4398851e5e0f0f", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T15:27:55.645Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:0d2da86484e48de3ea031098c5a4e00cf1735a26bc3358a89ff482722fa6f892", + "qualityReviewPath": "/template-gallery/reviews/sd15_control_cobalt_studio_wall_repair.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/sd15_control_cobalt_studio_wall_repair.before.png", + "beforeMediaHash": "sha256:bytes:d143c4922ad498b9bd436d06df424bbff50baf023b93735b53ee401e19e4cbf1", + "afterPath": "/template-gallery/sd15_control_cobalt_studio_wall_repair.webp", + "width": 512, + "height": 512, + "approvedOriginalReviewPath": "/template-gallery/reviews/sd15_control_cobalt_studio_wall_repair.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sd15_control_cobalt_studio_wall_repair.original-provenance.json", + "approvedGuidePath": "/template-gallery/inputs/sd15_control_cobalt_studio_wall_repair.guide.png", + "approvedMaskPath": "/template-gallery/inputs/sd15_control_cobalt_studio_wall_repair.mask.png" + }, + { + "templateId": "sd15_pag_control_wall_repair", + "templateLockHash": "tpl_59e3f364", + "promptSettingsHash": "ps_79b65484", + "modelRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "runtimeFingerprint": "sha256:stable-runtime-v1:123466003e16827a0dfd551ae93d58995169b9a2df62f676a1892d2b23fdf3ae", + "graphHash": "sha256:canonical-graph-v1:b69353e3e634e8d228cf19a84c525efa3b227384920e592d2e7729d428622881", + "proofLockHash": "sha256:retained-template-association-v1:85bea9d3bb910cddea21fe9195729060e24a8ac67ece98f2f69929ba04ab054f", + "backendSourceFingerprint": "sha256:backend-source-v1:fe1a57b8e352eb66a1a26ebbff5865aaafcf5d55326c4bbcbaf2132ec75f54a8", + "backendContractFingerprint": "sha256:backend-contract-v1:7271d6dfcd46a677217edf40c568c3f5e9ae300200f76976e0cf18fd9b9f2508", + "modelCommit": "451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "templateRevisionHash": "155adb3c21e9aacbf62ac042d0e2d3b5ba9987331edd79dcff446b6053438a98", + "provenancePath": "/template-gallery/reviews/sd15_pag_control_wall_repair.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:8ac6a03a9480005cec49f8957b6abd5f0cfb300eee0228e94415c7c0ea1f380c", + "outputPath": "/template-gallery/sd15_pag_control_wall_repair.webp", + "thumbnailPath": "/template-gallery/sd15_pag_control_wall_repair.webp", + "mediaHash": "sha256:decoded-rgba:595389e2f928029239fdf335758e56e7dde20d9dcd37b117bdb9b05126a917ad", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T15:28:49.418Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:3a5b6fc916a2750fa6f4f438dfc316d90860cd3da715ecfe1e168829c88278dd", + "qualityReviewPath": "/template-gallery/reviews/sd15_pag_control_wall_repair.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/sd15_pag_control_wall_repair.before.png", + "beforeMediaHash": "sha256:bytes:d143c4922ad498b9bd436d06df424bbff50baf023b93735b53ee401e19e4cbf1", + "afterPath": "/template-gallery/sd15_pag_control_wall_repair.webp", + "width": 512, + "height": 512, + "approvedOriginalReviewPath": "/template-gallery/reviews/sd15_pag_control_wall_repair.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sd15_pag_control_wall_repair.original-provenance.json", + "approvedGuidePath": "/template-gallery/inputs/sd15_pag_control_wall_repair.guide.png", + "approvedMaskPath": "/template-gallery/inputs/sd15_pag_control_wall_repair.mask.png" + }, + { + "templateId": "sdxl_pag_snow_cabin", + "templateLockHash": "tpl_50666a60", + "promptSettingsHash": "ps_109abbf3", + "modelRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "runtimeFingerprint": "sha256:stable-runtime-v1:0bbad726140f719e28efb3bd524589277c1ff4de18e2e42875a94bd877d43708", + "graphHash": "sha256:canonical-graph-v1:24f301293a57d60503933f0cd2a278f6ee932db5617a339310d0a25c36eaa175", + "proofLockHash": "sha256:retained-template-association-v1:708e01ec5e440bb36bd1e634948567d4013e1ff236367f290af37f81a4265ee4", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:ad16452bc59ad56fa75df0e9f2f3b913f28233c906d4e37c4518fbc978d47953", + "modelCommit": "462165984030d82259a11f4367a4eed129e94a7b", + "templateRevisionHash": "1c302242a6a0e304537b15c53c8cb94dcffae8955039b0cbf3759331122864e1", + "provenancePath": "/template-gallery/reviews/sdxl_pag_snow_cabin.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:3df8f0931ff9196096b671f7128fe5a813bd5761da6e9d19df311f108636c1ab", + "outputPath": "/template-gallery/sdxl_pag_snow_cabin.webp", + "thumbnailPath": "/template-gallery/sdxl_pag_snow_cabin.webp", + "mediaHash": "sha256:decoded-rgba:6b0d095a4d2bb23e15727d777670be26b8af346a553959af5a1979f0a43d02b0", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T20:11:04.963Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:bf974b01a868d0437036451fa223212fec2247a0acb22745cb9ba52dfb5368cf", + "qualityReviewPath": "/template-gallery/reviews/sdxl_pag_snow_cabin.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/sdxl_pag_snow_cabin.before.png", + "beforeMediaHash": "sha256:bytes:ca250462efc77625134ebe305b2ee67281a1dcf8919e45299c648f0fdacf919a", + "afterPath": "/template-gallery/sdxl_pag_snow_cabin.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/sdxl_pag_snow_cabin.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sdxl_pag_snow_cabin.original-provenance.json" + }, + { + "templateId": "flux_canny_clean_backdrop", + "templateLockHash": "tpl_c1982b94", + "promptSettingsHash": "ps_491e886d", + "modelRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "runtimeFingerprint": "sha256:stable-runtime-v1:ab1eb4d6c1174fb4f4b67c73b994e46a7f31b02746da61cd3cdfed9bc6d9aa3d", + "graphHash": "sha256:canonical-graph-v1:567248f43a620bfcfb34690914d010f2aba19a147e132f1ada00aeba9fcde561", + "proofLockHash": "sha256:retained-template-association-v1:a542bb49f8875f81571e98230023b9c7196aa23570667f051d66bff824639ed2", + "backendSourceFingerprint": "sha256:backend-source-v1:585997dc1146ec6effb20c260272babc01713ecdea4f78a0872c12ef2568ef83", + "backendContractFingerprint": "sha256:backend-contract-v1:d6613341ff1a983e0a3c6d3c8f0efef39c5c1ec3e109197f6466cfd72a3f6f6e", + "modelCommit": "27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "templateRevisionHash": "ddec004faf0dea8ab0683f015a22350f6086d28d6b41ecc57f2c0abf81ca1755", + "provenancePath": "/template-gallery/reviews/flux_canny_clean_backdrop.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:0a185446e43213c29b93fc2012fd2d44b13491b281d446a688b0efce1af38408", + "outputPath": "/template-gallery/flux_canny_clean_backdrop.webp", + "thumbnailPath": "/template-gallery/flux_canny_clean_backdrop.webp", + "mediaHash": "sha256:decoded-rgba:c537273ac1c469f73878e1148c21345b082444c08669594edfdcf86f2db8fc69", + "mediaType": "image", + "verificationTimestamp": "2026-11-24T14:06:06.057Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:4876994441f9fcee730eb6cce19e02dc0cc23ae4a3adc87e7743752ee79e678b", + "qualityReviewPath": "/template-gallery/reviews/flux_canny_clean_backdrop.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/flux_canny_clean_backdrop.before.png", + "beforeMediaHash": "sha256:bytes:e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87", + "afterPath": "/template-gallery/flux_canny_clean_backdrop.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/flux_canny_clean_backdrop.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/flux_canny_clean_backdrop.original-provenance.json", + "approvedGuidePath": "/template-gallery/inputs/flux_canny_clean_backdrop.guide.png", + "approvedMaskPath": "/template-gallery/inputs/flux_canny_clean_backdrop.mask.png" + }, + { + "templateId": "flux_depth_marine_bow_repair", + "templateLockHash": "tpl_d739eca3", + "promptSettingsHash": "ps_e637018a", + "modelRevision": "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "runtimeFingerprint": "sha256:stable-runtime-v1:05f50837d817ace549d94de69362af536134a1823e41e570c34fe3083ba1a039", + "graphHash": "sha256:canonical-graph-v1:ffd5894d66a9372f95715d365e9698c48b72b1422aebad4d1a0f14932b2f03bd", + "proofLockHash": "sha256:retained-template-association-v1:102a8c963411353cb08d95c83ce4cddc11bc5e3afde34ae876648ecdfcca2f86", + "backendSourceFingerprint": "sha256:backend-source-v1:585997dc1146ec6effb20c260272babc01713ecdea4f78a0872c12ef2568ef83", + "backendContractFingerprint": "sha256:backend-contract-v1:d6613341ff1a983e0a3c6d3c8f0efef39c5c1ec3e109197f6466cfd72a3f6f6e", + "modelCommit": "fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "templateRevisionHash": "c36171bcdbd3076f271fb33743708207b8aeb0f4bfb68be30f7ee7a0239b0869", + "provenancePath": "/template-gallery/reviews/flux_depth_marine_bow_repair.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:54b39d76bdd56efe6602b172f05d99379388030ad22daa0c723e6c2d2e5e7b1c", + "outputPath": "/template-gallery/flux_depth_marine_bow_repair.webp", + "thumbnailPath": "/template-gallery/flux_depth_marine_bow_repair.webp", + "mediaHash": "sha256:decoded-rgba:d3c15ee2e8898c292fb14523c132516fae6c1cc163bccb64a0b91998278b9bd2", + "mediaType": "image", + "verificationTimestamp": "2026-11-24T14:25:47.349Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:3e497d5ca27ee71d4958bbe519c4b1919bb4f8f898796fa8218c71ff23c3bcf3", + "qualityReviewPath": "/template-gallery/reviews/flux_depth_marine_bow_repair.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/flux_depth_marine_bow_repair.before.webp", + "beforeMediaHash": "sha256:bytes:c3d52c29b6a8cae80d2feffb8a978cded8b34509abd09216f665ab3af13f189e", + "afterPath": "/template-gallery/flux_depth_marine_bow_repair.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/flux_depth_marine_bow_repair.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/flux_depth_marine_bow_repair.original-provenance.json", + "approvedGuidePath": "/template-gallery/inputs/flux_depth_marine_bow_repair.guide.png", + "approvedMaskPath": "/template-gallery/inputs/flux_depth_marine_bow_repair.mask.png" + }, + { + "templateId": "sdxl_control_golden_boathouse", + "templateLockHash": "tpl_249a8d5d", + "promptSettingsHash": "ps_97318fec", + "modelRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2642af585975d6b55b551bcdfb8606edb2fab4b37a05875aa3a8024270b6eab", + "graphHash": "sha256:canonical-graph-v1:6d79e032074b89f72078418c91345d440f5e348f2890a177b8c33c801b0d385f", + "proofLockHash": "sha256:retained-template-association-v1:c4b1867566c0f755a4b3ec0a4c02c98d263b16b3ed6d532b997192256ce66390", + "backendSourceFingerprint": "sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290", + "backendContractFingerprint": "sha256:backend-contract-v1:b5b17d569852e051bdac1d2b3e08b4753392cadd39a1277f893bdf34f19490c5", + "modelCommit": "462165984030d82259a11f4367a4eed129e94a7b", + "templateRevisionHash": "94724166ff9512b26bca310deb3e9d2a16f88116cc157e42694d1a459bfc06cd", + "provenancePath": "/template-gallery/reviews/sdxl_control_golden_boathouse.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:7df85c309b6b7ef4a637ba38326caf5bd239c1027a56ac732005fb47077c8f59", + "outputPath": "/template-gallery/sdxl_control_golden_boathouse.webp", + "thumbnailPath": "/template-gallery/sdxl_control_golden_boathouse.webp", + "mediaHash": "sha256:decoded-rgba:b56fae04919f1f910296af866c6c76dbce9aab94d8e34c1b5043819e33bbaab3", + "mediaType": "image", + "verificationTimestamp": "2026-11-25T04:34:53.900Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:f7b8eacdb6bee35c03faf7b213b6716a2a585340d892285da8f53bb2af5c4681", + "qualityReviewPath": "/template-gallery/reviews/sdxl_control_golden_boathouse.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/sdxl_control_golden_boathouse.before.png", + "beforeMediaHash": "sha256:bytes:e1d9736125cad717896f0c7d5274a6373676559f250d76cedcc8f8aae9379ec6", + "afterPath": "/template-gallery/sdxl_control_golden_boathouse.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/sdxl_control_golden_boathouse.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sdxl_control_golden_boathouse.original-provenance.json", + "approvedGuidePath": "/template-gallery/inputs/sdxl_control_golden_boathouse.guide.png" + }, + { + "templateId": "qwen_2511_terracotta_material_transfer", + "templateLockHash": "tpl_5f771a9f", + "promptSettingsHash": "ps_4e83ee4e", + "modelRevision": "Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "runtimeFingerprint": "sha256:stable-runtime-v1:1aa169f604d929518e4774fe3ff943979a21f2d3b7724f6e81782e94d10a8ed1", + "graphHash": "sha256:canonical-graph-v1:c0d621c2ba7c54d24a8a3a3e3a584bba49979cf3f26ec2fcf30bf335fc15f4fc", + "proofLockHash": "sha256:retained-template-association-v1:e2bf330812904727eab1dffb5520822f0d6c3945b7d59da80b327effc7c3b7ff", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "modelCommit": "6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "templateRevisionHash": "46a74671317b1b01f4ee5c7531e4d9fa32b8ba386bc9ba3321632f0168515b13", + "provenancePath": "/template-gallery/reviews/qwen_2511_terracotta_material_transfer.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:025effaec888409dcf8e47c546c952c46ae7a009923b0c771e4165ba93aa2200", + "outputPath": "/template-gallery/qwen_2511_terracotta_material_transfer.webp", + "thumbnailPath": "/template-gallery/qwen_2511_terracotta_material_transfer.webp", + "mediaHash": "sha256:decoded-rgba:9267078498cd820c114171d61d8edd9c9abf8f3a4a23d491c663f14f931c6e7d", + "mediaType": "image", + "verificationTimestamp": "2026-11-23T20:47:31.989Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:2f499ba63b214e622476d885cadafed28dfa3876660c4e0191c0b86e7ec7fd3b", + "qualityReviewPath": "/template-gallery/reviews/qwen_2511_terracotta_material_transfer.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/qwen_2511_terracotta_material_transfer.before.png", + "beforeMediaHash": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "afterPath": "/template-gallery/qwen_2511_terracotta_material_transfer.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/qwen_2511_terracotta_material_transfer.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/qwen_2511_terracotta_material_transfer.original-provenance.json", + "approvedSecondaryReferencePath": "/template-gallery/inputs/qwen_2511_terracotta_material_transfer.reference-2.png" + }, + { + "templateId": "joy_plus_terracotta_on_limestone", + "templateLockHash": "tpl_871e0927", + "promptSettingsHash": "ps_79969b6a", + "modelRevision": "jdopensource/JoyAI-Image-Edit-Plus-Diffusers@c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "runtimeFingerprint": "sha256:stable-runtime-v1:b3164537803a4f2c7646077d7f4002a2ddd581e4bf75a6155f1ac71d45724038", + "graphHash": "sha256:canonical-graph-v1:45c63449a5f682f068eaaad12a3cb73dbae46dad5924c18609cbba30d8937f8f", + "proofLockHash": "sha256:retained-template-association-v1:17707ceedea9ea9275e0cfe01c2e7e68d86e5e2bb2c8de418609de274e62e43b", + "backendSourceFingerprint": "sha256:backend-source-v1:585997dc1146ec6effb20c260272babc01713ecdea4f78a0872c12ef2568ef83", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "modelCommit": "c2686460c7b64d8aa11bc4d0da423fb316b33f9e", + "templateRevisionHash": "2250434e38d29a0c2d27808d6f713bf75965dc3f5ade4a033a11d194ecd687b9", + "provenancePath": "/template-gallery/reviews/joy_plus_terracotta_on_limestone.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:4a5032adb1b890b3f3969471dbf6879f1a6aa6efb22251451980efa9c4f21a0d", + "outputPath": "/template-gallery/joy_plus_terracotta_on_limestone.webp", + "thumbnailPath": "/template-gallery/joy_plus_terracotta_on_limestone.webp", + "mediaHash": "sha256:decoded-rgba:0946eeac2f43ba5d1f4c97ef53826ef4c4764a7e41021e915195420d60dbe157", + "mediaType": "image", + "verificationTimestamp": "2026-11-24T05:23:27.411Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:6dbbd0dc64a21ced4d35ec6c75e427a137333d5bb0ec87212865428d851cb7d5", + "qualityReviewPath": "/template-gallery/reviews/joy_plus_terracotta_on_limestone.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/joy_plus_terracotta_on_limestone.before.png", + "beforeMediaHash": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "afterPath": "/template-gallery/joy_plus_terracotta_on_limestone.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/joy_plus_terracotta_on_limestone.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/joy_plus_terracotta_on_limestone.original-provenance.json", + "approvedSecondaryReferencePath": "/template-gallery/inputs/joy_plus_terracotta_on_limestone.reference-2.png" + }, + { + "templateId": "omnigen_red_enamel_folded_linen", + "templateLockHash": "tpl_70aa866a", + "promptSettingsHash": "ps_cb1c21de", + "modelRevision": "Shitao/OmniGen-v1-diffusers@016e2f61d12a98303f6bbdf122687694d7984268", + "runtimeFingerprint": "sha256:stable-runtime-v1:de99e7b1729318c3e5b2dde98b51e5feb07ae329310f9b2da76831df1410cae7", + "graphHash": "sha256:canonical-graph-v1:4d2c6321c55423646e3776f57b41f32a0b7da6ab3d3b74daa49bc81fd17f9793", + "proofLockHash": "sha256:retained-template-association-v1:07d12b8b545b4d6325fde5b0245261d64aca72d4ef18376aca6d18313e2804e6", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "modelCommit": "016e2f61d12a98303f6bbdf122687694d7984268", + "templateRevisionHash": "595a3209f4bfb41d4930f0368e75bab6a19602ad0eae4d44dc535efd0a059652", + "provenancePath": "/template-gallery/reviews/omnigen_red_enamel_folded_linen.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:ff4d5e97a03bd20be2fabd88130e00c2e61493ec3ec7a133e5c1d29c3fb4a0fa", + "outputPath": "/template-gallery/omnigen_red_enamel_folded_linen.webp", + "thumbnailPath": "/template-gallery/omnigen_red_enamel_folded_linen.webp", + "mediaHash": "sha256:decoded-rgba:bb20f33f0366c9b8f1b9b7ccaf62225b9d42c5a7f191586fb7eec98ccfc52494", + "mediaType": "image", + "verificationTimestamp": "2026-11-25T05:12:08.254Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:75731a1ced2a0521870719bf063dae330cebb1c88dcba611e8f1d919b822ee07", + "qualityReviewPath": "/template-gallery/reviews/omnigen_red_enamel_folded_linen.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/omnigen_red_enamel_folded_linen.before.png", + "beforeMediaHash": "sha256:bytes:4077a18ad81b7fb6a1e7285777cac6241f6c0109a680945487b81e8561f30d8c", + "afterPath": "/template-gallery/omnigen_red_enamel_folded_linen.webp", + "width": 1024, + "height": 1024, + "approvedOriginalReviewPath": "/template-gallery/reviews/omnigen_red_enamel_folded_linen.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/omnigen_red_enamel_folded_linen.original-provenance.json", + "approvedSecondaryReferencePath": "/template-gallery/inputs/omnigen_red_enamel_folded_linen.reference-2.png" + }, + { + "templateId": "mochi_surf_over_dark_pebbles", + "templateLockHash": "tpl_851777f5", + "promptSettingsHash": "ps_0a0165a8", + "modelRevision": "genmo/mochi-1-preview@14be5fcea23095ed330cb214647916a451e38b6e", + "runtimeFingerprint": "sha256:stable-runtime-v1:4d41adc4d8b1fb3a9aed04a4e324121bd1a145d1051955a1493df3b5c6687bde", + "graphHash": "sha256:canonical-graph-v1:bf2b044a50f9b1e7b1813fa51ec77f1e6c1fa910e6aa6236ae7b783eaed6832e", + "proofLockHash": "sha256:retained-template-association-v1:cfbc7334be1ad009a7e90410ff0459d8e8fca979ea4dc388888a8b2b9449c805", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:40a4eb8d6275c83725f57c4d3499b8d12c00f8cf6caffc2d07006e74d24ab820", + "modelCommit": "14be5fcea23095ed330cb214647916a451e38b6e", + "templateRevisionHash": "c0a8a85ce8101d4ffcf0a8ab34a46b49b41d38e667a896e8b51f5016bb536b62", + "provenancePath": "/template-gallery/reviews/mochi_surf_over_dark_pebbles.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:176304777985a3ce5dcb396c5b8f26710b568e1d65e7f049a2292823d95e9465", + "outputPath": "/template-gallery/mochi_surf_over_dark_pebbles.mp4", + "thumbnailPath": "/template-gallery/mochi_surf_over_dark_pebbles.mp4", + "mediaHash": "sha256:decoded-video-framemd5:6b0045ad0e286cc6db73ef1bc377e922071458ccf4bbd497793f18bf2873455f", + "mediaType": "video", + "verificationTimestamp": "2026-11-25T02:21:21.989Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:24ada45024b75c500fe3217bef19efb3647634a2734823ad16752defa44ffdf5", + "qualityReviewPath": "/template-gallery/reviews/mochi_surf_over_dark_pebbles.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "width": 848, + "height": 480, + "frames": 31, + "durationSeconds": 1.0333333333333334, + "approvedOriginalReviewPath": "/template-gallery/reviews/mochi_surf_over_dark_pebbles.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/mochi_surf_over_dark_pebbles.original-provenance.json" + }, + { + "templateId": "animatediff_ivory_balloon_blue_mountains", + "templateLockHash": "tpl_bef14c2c", + "promptSettingsHash": "ps_ecae0ab9", + "modelRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "runtimeFingerprint": "sha256:stable-runtime-v1:b2beaee17de004c2e5d8a34ee2303548fee606ddf285df40a5e6928c4c0ee362", + "graphHash": "sha256:canonical-graph-v1:c3a0bd75af7f0ef791bda2a2658df375640199d9d8d1be6f589f94900e923bf1", + "proofLockHash": "sha256:retained-template-association-v1:1fe5fd6037d63da473ec8ef9f77dcb5302c47c6fcc856dc92f58d20fee67a0a7", + "backendSourceFingerprint": "sha256:backend-source-v1:a107f0838ce3b1be98034123eb3bf3393928a09c5ad7e3c133687d5a7c58be57", + "backendContractFingerprint": "sha256:backend-contract-v1:03dea74157ff4e06596b9bd35e605c820dfee2fa4b4bac1772cbd948108d8ffd", + "modelCommit": "451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "templateRevisionHash": "4b4d081ecba0edc45452b914be1e511106c370500951c08bac57264a08abf8c8", + "provenancePath": "/template-gallery/reviews/animatediff_ivory_balloon_blue_mountains.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:e88ef633a80bfb653fd0e48d7bc48e3b8f50e805851dd3d5592ea79e99ba1526", + "outputPath": "/template-gallery/animatediff_ivory_balloon_blue_mountains.mp4", + "thumbnailPath": "/template-gallery/animatediff_ivory_balloon_blue_mountains.mp4", + "mediaHash": "sha256:decoded-video-framemd5:05a11003f908f21a029be1600215f1affdbdf86742069adc0b92f1e627ba8bb7", + "mediaType": "video", + "verificationTimestamp": "2026-11-24T07:09:23.646Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:8529c0614ec09f29120f313ea70b09827651ad4bc9b6506fee909875e13b2961", + "qualityReviewPath": "/template-gallery/reviews/animatediff_ivory_balloon_blue_mountains.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "width": 512, + "height": 512, + "frames": 16, + "durationSeconds": 2, + "approvedGuidePath": "/template-gallery/inputs/animatediff_ivory_balloon_blue_mountains.guide.mp4", + "approvedOriginalReviewPath": "/template-gallery/reviews/animatediff_ivory_balloon_blue_mountains.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/animatediff_ivory_balloon_blue_mountains.original-provenance.json" + }, + { + "templateId": "animatediff_red_tram_through_snow", + "templateLockHash": "tpl_713b29bb", + "promptSettingsHash": "ps_3c45e0a7", + "modelRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "runtimeFingerprint": "sha256:stable-runtime-v1:30c18be5da0b8ec32331e1c9f425397d5cc26152ac71e8eff9f9138e53ba018b", + "graphHash": "sha256:canonical-graph-v1:def788f2dd1441b8d6f37e453ce30da5f5fe0f35711fadbb4d3240d2db95f177", + "proofLockHash": "sha256:retained-template-association-v1:9757d2ad2719fb8ae4dd56a8d5d861e98344e8472e6731dd3dbb81f5645f2b12", + "backendSourceFingerprint": "sha256:backend-source-v1:b4a707d462a5f13dae1660c1665ed5195f45ed4ffbfcd7d80de879cd881aea86", + "backendContractFingerprint": "sha256:backend-contract-v1:d12f2497d460e249e197c1eb12b40f2cfd70311a95e91a943f37a1ffffbcd157", + "modelCommit": "451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "templateRevisionHash": "95bf2ea59940c6b96e479bc726ca727255822c37d0dc4ed19b4d3b37622520e7", + "provenancePath": "/template-gallery/reviews/animatediff_red_tram_through_snow.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:dc64643505cff6358b9f48af2001a1124dc327beb8c7877f8e29567e5bd3ffb2", + "outputPath": "/template-gallery/animatediff_red_tram_through_snow.mp4", + "thumbnailPath": "/template-gallery/animatediff_red_tram_through_snow.mp4", + "mediaHash": "sha256:decoded-video-framemd5:f0417dc3e13df149862f647940240ca5dde51bb3e65764584ed3352fa0517086", + "mediaType": "video", + "verificationTimestamp": "2026-11-23T21:59:42.414Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:7ae412f37f57e96a6d566f5656af2f6878ee659d6275d0d7b248995dccf0ef6b", + "qualityReviewPath": "/template-gallery/reviews/animatediff_red_tram_through_snow.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/animatediff_red_tram_through_snow.before.mp4", + "beforeMediaHash": "sha256:bytes:88b69acee9f0c3572a98e49b23ad0e853dc86e1d15074fca99b47f690dde900f", + "beforeSourceMediaHash": "sha256:bytes:88b69acee9f0c3572a98e49b23ad0e853dc86e1d15074fca99b47f690dde900f", + "afterPath": "/template-gallery/animatediff_red_tram_through_snow.mp4", + "width": 512, + "height": 512, + "frames": 16, + "durationSeconds": 2, + "approvedGuidePath": "/template-gallery/inputs/animatediff_red_tram_through_snow.guide.mp4", + "approvedOriginalReviewPath": "/template-gallery/reviews/animatediff_red_tram_through_snow.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/animatediff_red_tram_through_snow.original-provenance.json" + }, + { + "templateId": "sana_i2v_blue_hour_above_rice_terraces", + "templateLockHash": "tpl_d3be4bd4", + "promptSettingsHash": "ps_8dea3f0f", + "modelRevision": "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1", + "runtimeFingerprint": "sha256:stable-runtime-v1:4d41adc4d8b1fb3a9aed04a4e324121bd1a145d1051955a1493df3b5c6687bde", + "graphHash": "sha256:canonical-graph-v1:c807f3241ff651858fcd5bd5b6cd96e798c6a65332c1e59fbdb05d4fa588421b", + "proofLockHash": "sha256:retained-template-association-v1:428c390c8bab1a29950043ed0dd00d03fb00821c6f993d392b1026a88600ce1d", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:d68ff3c7d7b2d190e68d6f148834ae971638c23a9d31086a3848874658f37da2", + "modelCommit": "db5f398b13ca086d09a50ce156c20527773841b1", + "templateRevisionHash": "e6ce9b989e565a3504ccb21781d8522fd3bd3d17715c008ae315b068f7773b1c", + "provenancePath": "/template-gallery/reviews/sana_i2v_blue_hour_above_rice_terraces.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:1b15f842f9b37805aeb6e7c32dda990f2e3d78d41bf07730080b2fd03a9aed61", + "outputPath": "/template-gallery/sana_i2v_blue_hour_above_rice_terraces.mp4", + "thumbnailPath": "/template-gallery/sana_i2v_blue_hour_above_rice_terraces.mp4", + "mediaHash": "sha256:decoded-video-framemd5:d64fa64bcd0f0b94e58bc0010368d01d9d6839bef2c4ed0b8684c656dce5d6f8", + "mediaType": "video", + "verificationTimestamp": "2026-11-25T01:58:17.904Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:59e5d790b9525a2705f5274e56d3c7c3baa3a58b74328057a1d532128303d976", + "qualityReviewPath": "/template-gallery/reviews/sana_i2v_blue_hour_above_rice_terraces.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "width": 832, + "height": 480, + "frames": 81, + "durationSeconds": 5.0625, + "approvedSourcePath": "/template-gallery/inputs/sana_i2v_blue_hour_above_rice_terraces.first.png", + "approvedOriginalReviewPath": "/template-gallery/reviews/sana_i2v_blue_hour_above_rice_terraces.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sana_i2v_blue_hour_above_rice_terraces.original-provenance.json" + }, + { + "templateId": "sana_video_water_terraces_before_sunrise", + "templateLockHash": "tpl_77d9ebc0", + "promptSettingsHash": "ps_85fe160f", + "modelRevision": "Efficient-Large-Model/SANA-Video_2B_480p_diffusers@db5f398b13ca086d09a50ce156c20527773841b1", + "runtimeFingerprint": "sha256:stable-runtime-v1:4d41adc4d8b1fb3a9aed04a4e324121bd1a145d1051955a1493df3b5c6687bde", + "graphHash": "sha256:canonical-graph-v1:266ff690c34b346935cb27b4e1d26771657ca26bab6094c2b061ba634801bb65", + "proofLockHash": "sha256:retained-template-association-v1:c36bd8ec5147f2ac94a56c0e96a8f378eb49065a9b7f940739d7255af898c474", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:40a4eb8d6275c83725f57c4d3499b8d12c00f8cf6caffc2d07006e74d24ab820", + "modelCommit": "db5f398b13ca086d09a50ce156c20527773841b1", + "templateRevisionHash": "e5d7bb4cd5fa1b68f4840fc0746bea2aa963c1d8183be0985a66b0789be9f1d1", + "provenancePath": "/template-gallery/reviews/sana_video_water_terraces_before_sunrise.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:db1b23b2dc22e3881bad7b10ee1c5139fa1234d370480330cc1a620c94c2bc92", + "outputPath": "/template-gallery/sana_video_water_terraces_before_sunrise.mp4", + "thumbnailPath": "/template-gallery/sana_video_water_terraces_before_sunrise.mp4", + "mediaHash": "sha256:decoded-video-framemd5:185d95f26e0af4716cdefa36748788445bcd8264230c05835348b02ab540cdd9", + "mediaType": "video", + "verificationTimestamp": "2026-11-25T01:39:27.365Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:8a3bf325743a126326dac855e3b4712b6cadc4d3d3ac5ba69e85d744fb0ce3a8", + "qualityReviewPath": "/template-gallery/reviews/sana_video_water_terraces_before_sunrise.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "width": 832, + "height": 480, + "frames": 81, + "durationSeconds": 5.0625, + "approvedOriginalReviewPath": "/template-gallery/reviews/sana_video_water_terraces_before_sunrise.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sana_video_water_terraces_before_sunrise.original-provenance.json" + }, + { + "templateId": "animatediff_red_tram_in_watercolor", + "templateLockHash": "tpl_37c948d9", + "promptSettingsHash": "ps_c4dd153c", + "modelRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "runtimeFingerprint": "sha256:stable-runtime-v1:9b8553a1d8409e2fa46e82bbc4f07746be58d117cfae67471a49dba446e8fcca", + "graphHash": "sha256:canonical-graph-v1:9d80fa0a57f924fae58e094e400e4309f79e3050b6e90de2c5c177c0d2d1358f", + "proofLockHash": "sha256:retained-template-association-v1:86c71473e0f5ace712749dc76e4bfde1fff65e23ebf71aed1d884993a2a07d49", + "backendSourceFingerprint": "sha256:backend-source-v1:2beaa95aae8558e64cf99f056b011d00c0653dc7d03987cd67c8ed7e774c770e", + "backendContractFingerprint": "sha256:backend-contract-v1:e1bf29e107307b73ad8153eff36b54b42bdf5622243915dbdd7c94e069726538", + "modelCommit": "451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "templateRevisionHash": "79480aa4c678fa413f77fa4c1c063f243438f1e6bd4573f90fc7f45c01e6af45", + "provenancePath": "/template-gallery/reviews/animatediff_red_tram_in_watercolor.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:1859637212ed57d8b70f504373bd5572f7f49b91e21bed757513bcac1a76e1c1", + "outputPath": "/template-gallery/animatediff_red_tram_in_watercolor.mp4", + "thumbnailPath": "/template-gallery/animatediff_red_tram_in_watercolor.mp4", + "mediaHash": "sha256:decoded-video-framemd5:9dd89c4abb2362ef5cbfb3e99f25956d5773f8e31ba996cf3b6b872eb1c822b5", + "mediaType": "video", + "verificationTimestamp": "2026-11-23T23:28:15.943Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:b9ebd0f8244eeed20bd436eb9c49d85f6dbecb03e19f28c32236f7dc5eff657a", + "qualityReviewPath": "/template-gallery/reviews/animatediff_red_tram_in_watercolor.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/animatediff_red_tram_in_watercolor.before.mp4", + "beforeMediaHash": "sha256:bytes:88b69acee9f0c3572a98e49b23ad0e853dc86e1d15074fca99b47f690dde900f", + "beforeSourceMediaHash": "sha256:bytes:88b69acee9f0c3572a98e49b23ad0e853dc86e1d15074fca99b47f690dde900f", + "afterPath": "/template-gallery/animatediff_red_tram_in_watercolor.mp4", + "width": 512, + "height": 512, + "frames": 16, + "durationSeconds": 2, + "approvedOriginalReviewPath": "/template-gallery/reviews/animatediff_red_tram_in_watercolor.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/animatediff_red_tram_in_watercolor.original-provenance.json" + }, + { + "templateId": "allegro_basalt_shore_at_dawn", + "templateLockHash": "tpl_c1f652c2", + "promptSettingsHash": "ps_96a78038", + "modelRevision": "rhymes-ai/Allegro@c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6", + "runtimeFingerprint": "sha256:stable-runtime-v1:4d41adc4d8b1fb3a9aed04a4e324121bd1a145d1051955a1493df3b5c6687bde", + "graphHash": "sha256:canonical-graph-v1:0e0211e72f2b7ecea3abd2ac10ad362852db2995d4a975bc4d064ea6d89dadb6", + "proofLockHash": "sha256:retained-template-association-v1:8b36fdb74ccf1829f3e123a4e007b047514f55a26c8d241b0c18338fa48bb722", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:40a4eb8d6275c83725f57c4d3499b8d12c00f8cf6caffc2d07006e74d24ab820", + "modelCommit": "c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6", + "templateRevisionHash": "5e7fa20679a68bf73600bf9fcb2bb07fffed7e65d5b01c2cd6276b3d98e8a86d", + "provenancePath": "/template-gallery/reviews/allegro_basalt_shore_at_dawn.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:d54a3b74c22c0185af99d7de272051d7ecf0d17f56db315dc2f5f6a8a43a767f", + "outputPath": "/template-gallery/allegro_basalt_shore_at_dawn.mp4", + "thumbnailPath": "/template-gallery/allegro_basalt_shore_at_dawn.mp4", + "mediaHash": "sha256:decoded-video-framemd5:bef30898b727459dc0eae415a758067bdc9d5eb3bcc82edfcf329d8c8f9c3e47", + "mediaType": "video", + "verificationTimestamp": "2026-11-25T01:26:09.329Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:1ad96fe117ee3985be29104589d1ea11f1ab30b046c4d5a69b4a656e08904b6d", + "qualityReviewPath": "/template-gallery/reviews/allegro_basalt_shore_at_dawn.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "width": 1280, + "height": 720, + "frames": 88, + "durationSeconds": 5.866666666666666, + "approvedOriginalReviewPath": "/template-gallery/reviews/allegro_basalt_shore_at_dawn.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/allegro_basalt_shore_at_dawn.original-provenance.json" + }, + { + "templateId": "animatediff_candlelight_behind_amber_glass", + "templateLockHash": "tpl_6605d595", + "promptSettingsHash": "ps_67c4ef8e", + "modelRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2642af585975d6b55b551bcdfb8606edb2fab4b37a05875aa3a8024270b6eab", + "graphHash": "sha256:canonical-graph-v1:9387c155d24de33e4d9a5a8115a6baa2818a35613f828908c0d46be3c0ab5c44", + "proofLockHash": "sha256:retained-template-association-v1:e38f1c7b0255e84427390209a8af4d591e693f0a782723c049aab2a8ac6ef47b", + "backendSourceFingerprint": "sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290", + "backendContractFingerprint": "sha256:backend-contract-v1:32e6e74ce3a29d61ae997904d9d4a77259db5c3bd819dbfc15d312482a356f92", + "modelCommit": "451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "templateRevisionHash": "fc3355bbe64d94141436cda1cb7c173be5490cfeeeebacd8609ceee18d5e2109", + "provenancePath": "/template-gallery/reviews/animatediff_candlelight_behind_amber_glass.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:c41186927a4da4cc0598aef7f91a9c60d34cc964952a0e707d43a6277d657e04", + "outputPath": "/template-gallery/animatediff_candlelight_behind_amber_glass.mp4", + "thumbnailPath": "/template-gallery/animatediff_candlelight_behind_amber_glass.mp4", + "mediaHash": "sha256:decoded-video-framemd5:f91e08ce60a94b436a144a59fbbd02faf83ea8a9375d1230524e06ceff4357b3", + "mediaType": "video", + "verificationTimestamp": "2026-11-25T02:54:46.523Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:5a7c440dc7ba85dd765454f4a47da1cffe90564dda961b9ad370475570df01b1", + "qualityReviewPath": "/template-gallery/reviews/animatediff_candlelight_behind_amber_glass.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "width": 512, + "height": 512, + "frames": 16, + "durationSeconds": 2, + "approvedOriginalReviewPath": "/template-gallery/reviews/animatediff_candlelight_behind_amber_glass.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/animatediff_candlelight_behind_amber_glass.original-provenance.json" + }, + { + "templateId": "wan_vace_amber_rings_after_rain", + "templateLockHash": "tpl_f7056e34", + "promptSettingsHash": "ps_2a047df0", + "modelRevision": "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "runtimeFingerprint": "sha256:stable-runtime-v1:4d41adc4d8b1fb3a9aed04a4e324121bd1a145d1051955a1493df3b5c6687bde", + "graphHash": "sha256:canonical-graph-v1:3eb2a114a3997bf20ad212143012e33fcc59e35c7aebb7a78ad5c04793c5de09", + "proofLockHash": "sha256:retained-template-association-v1:17995cd18ad08dbf7fd92c17e7ffa707fcd0b29a5893e2763880b54b0ee2fa3b", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:bf402b162817edb94494bd54801f5b411be4220f43a3e56c4715b1c9128e023b", + "modelCommit": "ec4d2cb062b548996b179d493fdd05340de702a1", + "templateRevisionHash": "520b484950dcf0432791f4a00d6ad8c5de4c785849563aefa07d467f36d679d9", + "provenancePath": "/template-gallery/reviews/wan_vace_amber_rings_after_rain.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:e400743acf573f5d5c8cef75bd631d15affa8ea3c05d058118fdf3144441e20b", + "outputPath": "/template-gallery/wan_vace_amber_rings_after_rain.mp4", + "thumbnailPath": "/template-gallery/wan_vace_amber_rings_after_rain.mp4", + "mediaHash": "sha256:decoded-video-framemd5:cb3f42f9bb872efd1a813197d5705b9407b50fbd278a318159a48554de8bb5cb", + "mediaType": "video", + "verificationTimestamp": "2026-11-25T02:44:38.768Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:cd187bb5e4c9a4e97e9bf190d3e02242053630cb9f7fc51d4d6fc948ca2db5de", + "qualityReviewPath": "/template-gallery/reviews/wan_vace_amber_rings_after_rain.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "width": 1664, + "height": 960, + "frames": 81, + "durationSeconds": 5.0625, + "approvedOriginalReviewPath": "/template-gallery/reviews/wan_vace_amber_rings_after_rain.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/wan_vace_amber_rings_after_rain.original-provenance.json" + }, + { + "templateId": "wan_a14b_wind_across_pond", + "templateLockHash": "tpl_642b4403", + "promptSettingsHash": "ps_f883a531", + "modelRevision": "Wan-AI/Wan2.2-I2V-A14B-Diffusers@596658fd9ca6b7b71d5057529bbf319ecbc61d74", + "runtimeFingerprint": "sha256:stable-runtime-v1:4ce7875bb2c87a85c7d597c5a3128bef36a1516ba9c40de1b222fd864cdbc4ed", + "graphHash": "sha256:canonical-graph-v1:0fe1766aff910661f5d55d4bc72abc0a25bd85157b4b9f29e347c67fcb679140", + "proofLockHash": "sha256:retained-template-association-v1:a9e4efea21d584b5286dc75d41d8c537d2027d86326baa703ea95f1b793e1313", + "backendSourceFingerprint": "sha256:backend-source-v1:ce7ac712b4620d0e8efb35022a558a551e2d4ae6ef20b844744c4d674527b0b3", + "backendContractFingerprint": "sha256:backend-contract-v1:d68ff3c7d7b2d190e68d6f148834ae971638c23a9d31086a3848874658f37da2", + "modelCommit": "596658fd9ca6b7b71d5057529bbf319ecbc61d74", + "templateRevisionHash": "fd7249fa8e87be9636e616bb278c88abbabc8920e4b093fc896f58b8a8d5dadd", + "provenancePath": "/template-gallery/reviews/wan_a14b_wind_across_pond.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:8f324e127af7f32f1d3f45714360206035612b5c81f9b63465e7dac0be628174", + "outputPath": "/template-gallery/wan_a14b_wind_across_pond.mp4", + "thumbnailPath": "/template-gallery/wan_a14b_wind_across_pond.mp4", + "mediaHash": "sha256:decoded-video-framemd5:25c5ff976264fa7e9c693bd203b597a9170e3311b7ca9ef1570029fb77b46a45", + "mediaType": "video", + "verificationTimestamp": "2026-11-24T23:54:28.989Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:a5b9c205ddc6e9fc789665187b8035ebd086f9bb4a6774c9a529347695851bd0", + "qualityReviewPath": "/template-gallery/reviews/wan_a14b_wind_across_pond.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "width": 768, + "height": 512, + "frames": 81, + "durationSeconds": 5.0625, + "approvedSourcePath": "/template-gallery/inputs/wan_a14b_wind_across_pond.first.png", + "approvedOriginalReviewPath": "/template-gallery/reviews/wan_a14b_wind_across_pond.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/wan_a14b_wind_across_pond.original-provenance.json" + }, + { + "templateId": "wan_ti2v_subway_musician", + "templateLockHash": "tpl_97316ddd", + "promptSettingsHash": "ps_007b6d08", + "modelRevision": "Wan-AI/Wan2.2-TI2V-5B-Diffusers@b8fff7315c768468a5333511427288870b2e9635", + "runtimeFingerprint": "sha256:stable-runtime-v1:d256b021b495a5fee0efa20922d52d0c46c17996d45ae7386dea47cfbc87d7b6", + "graphHash": "sha256:canonical-graph-v1:dc5a3915f6767104be7c308fc55384b2abc349a8881e585d48df140b68ee2591", + "proofLockHash": "sha256:retained-template-association-v1:88a054fd37de882b12a8322b4c10b647d4f65a538c86e2bf7502c0ba143c9030", + "decodedAudioHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:e009f96b1f91e9d456f86b3c5c75df2df9b10903351ced289eced2fbada0b5d1", + "audiovisualMediaHash": "sha256:decoded-av-v1:c52125c3dcb49b9500b9bd5a52cbbb36b48b77d7483c91ab7b6e665189105d6a", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:5d062bef6bee536bcebcfc45356a33037785e3101631cffd94461b2f2de4a91b", + "modelCommit": "b8fff7315c768468a5333511427288870b2e9635", + "templateRevisionHash": "3d639a689fee74a2857de70668d5d6e7939ee25a62025fb84d4435c2b149b183", + "provenancePath": "/template-gallery/reviews/wan_ti2v_subway_musician.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:24de67e8f2b0c8debc28c5b4fdc5a5a05c077465bb56861156368c64843bdca6", + "outputPath": "/template-gallery/wan_ti2v_subway_musician.mp4", + "thumbnailPath": "/template-gallery/wan_ti2v_subway_musician.mp4", + "mediaHash": "sha256:decoded-video-framemd5:66be2fda542fce90978be2667115eec0849c1b4502e998f86ec3924ae2ddd54e", + "mediaType": "video", + "verificationTimestamp": "2026-11-25T05:16:20.887Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:58bb2236fb97659ccf02c3e1628e94e2a428ed1f3c1b552f1975574973e9c71e", + "qualityReviewPath": "/template-gallery/reviews/wan_ti2v_subway_musician.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "width": 1280, + "height": 704, + "frames": 121, + "durationSeconds": 5.041666666666667, + "posterPath": "/template-gallery/posters/wan_ti2v_subway_musician.webp", + "approvedOriginalReviewPath": "/template-gallery/reviews/wan_ti2v_subway_musician.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/wan_ti2v_subway_musician.original-provenance.json" + }, + { + "templateId": "spandrel_tram_shelter_video_2x", + "templateLockHash": "tpl_d84cebd5", + "promptSettingsHash": "ps_a113ad7a", + "modelRevision": "nateraw/real-esrgan@42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "runtimeFingerprint": "sha256:stable-runtime-v1:893191687983e7924c2fba40019635ce142147c92b891d083bb78df2e97ead7b", + "graphHash": "sha256:canonical-graph-v1:ee3276b1993ebb2ab0d6228468f6b3233d73daf72c758a7f2f93d48f3513837e", + "proofLockHash": "sha256:retained-template-association-v1:4bad84208c432bedf2a065716ad5a6ff3399a3bc2a63be49bbd8905a521b865f", + "backendSourceFingerprint": "sha256:backend-source-v1:8dbad61815340f9a36c0966f227c6aaf8149350329cad36c73928ecb2df4698c", + "backendContractFingerprint": "sha256:backend-contract-v1:7e5cfc2be4665b078b5cda7e27b3c34bd3805652ca16146e86692677ab089da7", + "modelCommit": "42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094", + "templateRevisionHash": "7bbb69fe91f85685502578e96bbcdc6c6bfe1bcf44210a0bcb1315e003605ce6", + "provenancePath": "/template-gallery/reviews/spandrel_tram_shelter_video_2x.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:49651de33cdc5a2ab2f5230332414c70bffebc02cae557dcb9535a2252dcc657", + "outputPath": "/template-gallery/spandrel_tram_shelter_video_2x.mp4", + "thumbnailPath": "/template-gallery/spandrel_tram_shelter_video_2x.mp4", + "mediaHash": "sha256:decoded-video-framemd5:cb31cd0903f5e394e21f0ac8bd6373e0e67fb0a93a3191fef43e628bec0f17ed", + "mediaType": "video", + "verificationTimestamp": "2026-11-24T21:49:57.417Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:94c79b27eec3683df386af744bdb3b7ae6de2325b217e77be9196a0e4bc1618a", + "qualityReviewPath": "/template-gallery/reviews/spandrel_tram_shelter_video_2x.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T07:18:34.900Z", + "beforePath": "/template-gallery/inputs/spandrel_tram_shelter_video_2x.before.mp4", + "beforeMediaHash": "sha256:bytes:5c24b2b67f893f48e4dbf0d893e0aa4308852592f30f8179b44298cca4ce197e", + "beforeSourceMediaHash": "sha256:bytes:5c24b2b67f893f48e4dbf0d893e0aa4308852592f30f8179b44298cca4ce197e", + "afterPath": "/template-gallery/spandrel_tram_shelter_video_2x.mp4", + "width": 1024, + "height": 576, + "frames": 54, + "durationSeconds": 3.375, + "posterPath": "/template-gallery/posters/spandrel_tram_shelter_video_2x.webp", + "approvedOriginalReviewPath": "/template-gallery/reviews/spandrel_tram_shelter_video_2x.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/spandrel_tram_shelter_video_2x.original-provenance.json" + }, + { + "templateId": "wan_animate_glasshouse_keeper", + "templateLockHash": "tpl_ed4e5a82", + "promptSettingsHash": "ps_ebb62f19", + "modelRevision": "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "runtimeFingerprint": "sha256:stable-runtime-v1:4d41adc4d8b1fb3a9aed04a4e324121bd1a145d1051955a1493df3b5c6687bde", + "graphHash": "sha256:canonical-graph-v1:120c2a963fb5ba4565a577eb4c1730b48d3d52d63f7610b6369c04ebf74af3e5", + "proofLockHash": "sha256:retained-template-association-v1:5db90fd5f26d5cad31205ac520860ae8b530c472fdf0cfe1219336b064fdb0ac", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:6b262add8ba2463e96d9d3a9b0e92cd5a745badc3e8a985bc4ff1ac29483a2bd", + "modelCommit": "6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "templateRevisionHash": "c709baafb5f990b9f9ca029bfc04ad15d0006f2c84c85759f6a18d68a0cc565d", + "provenancePath": "/template-gallery/reviews/wan_animate_glasshouse_keeper.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:6ed9d6c3c8ff58b782242105152e147312f03adac01685ca322c5468e0a24cf5", + "outputPath": "/template-gallery/wan_animate_glasshouse_keeper.mp4", + "thumbnailPath": "/template-gallery/wan_animate_glasshouse_keeper.mp4", + "mediaHash": "sha256:decoded-video-framemd5:d42abea6c6794761464962bf376e12862babe8407c7dc9277e07fe496909557c", + "mediaType": "video", + "verificationTimestamp": "2026-11-25T11:54:29.880Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:1ee1de225fe114268e0805ba39b20238a41e082c96db990a1adef25e5e401186", + "qualityReviewPath": "/template-gallery/reviews/wan_animate_glasshouse_keeper.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T12:01:12.606Z", + "width": 768, + "height": 512, + "frames": 81, + "durationSeconds": 3.375, + "approvedSourcePath": "/template-gallery/inputs/wan_animate_glasshouse_keeper.first.png", + "approvedFaceVideoPath": "/template-gallery/inputs/wan_animate_glasshouse_keeper.face.mp4", + "approvedPoseVideoPath": "/template-gallery/inputs/wan_animate_glasshouse_keeper.pose.mp4", + "approvedBackgroundVideoPath": "/template-gallery/inputs/wan_animate_glasshouse_keeper.background.mp4", + "approvedMaskVideoPath": "/template-gallery/inputs/wan_animate_glasshouse_keeper.mask.mp4", + "approvedOriginalReviewPath": "/template-gallery/reviews/wan_animate_glasshouse_keeper.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/wan_animate_glasshouse_keeper.original-provenance.json" + }, + { + "templateId": "flux2_dev_text_to_image", + "templateLockHash": "tpl_8165c349", + "promptSettingsHash": "ps_0a263706", + "modelRevision": "black-forest-labs/FLUX.2-dev@26afe3a78bb242c0a8bb181dcc8937bb16e5c66c", + "runtimeFingerprint": "sha256:stable-runtime-v1:7983c8eb77a5d5691ed404deb9e90ada79d26f9ad1ed5e388a5a1b645e4e8bdc", + "modelSetHash": "sha256:model-set-v1:42b83dbe123cacc7631e70641b6032734b5f9d0b9c08df6b08c276011d5fea46", + "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "graphHash": "sha256:canonical-graph-v1:9fef1dd853b5d5191ad0565b415768503d77c692b852b706c7a18ae64b60eebe", + "proofLockHash": "sha256:live-proof-lock-v1:3131fa31ccd76b29fda0281be8eb603ded5a07f797ec8ec514dff1d61ca10af6", + "templateRevisionHash": "sha256:template-revision-v1:321575e38dab03117f0097796200d14906545144925763c4aab32542c888b81b", + "backendSourceFingerprint": "sha256:backend-source-v1:11cad67cf676cdfd8b2521d985505f695b71aabe60f4bebed82d300ee350769f", + "backendContractFingerprint": "sha256:backend-contract-v1:473f6c7626d31c8fbd85131301d1209de7ef41080328a3bfd53fd8fe0cb8c618", + "modelCommit": "26afe3a78bb242c0a8bb181dcc8937bb16e5c66c", + "outputPath": "/template-gallery/flux2_dev_text_to_image.webp", + "thumbnailPath": "/template-gallery/flux2_dev_text_to_image.webp", + "mediaType": "image", + "width": 1024, + "height": 1024, + "mediaHash": "sha256:decoded-rgba:cf850723e9b2856d7d5a8882f3320a8cba7750cbb72b30c1947e63d2afd59df0", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "verificationTimestamp": "2026-11-25T14:05:28.369Z", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T15:10:00.323Z", + "provenancePath": "/template-gallery/reviews/flux2_dev_text_to_image.reviewed-provenance.json", + "qualityReviewPath": "/template-gallery/reviews/flux2_dev_text_to_image.quality-review.json", + "provenanceHash": "sha256:canonical-json:29e83fb8b24b12076eee7b310980459f66c78890e63713157efbc680e364adef", + "qualityReviewHash": "sha256:canonical-json:4d5ae8d6a32c4f726dc61ad1c4fd9c5134050dde2f2b2013f574cb626c7db477", + "approvedOriginalReviewPath": "/template-gallery/reviews/flux2_dev_text_to_image.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/flux2_dev_text_to_image.original-provenance.json" + }, + { + "templateId": "cosmos3_super_text_to_image", + "templateLockHash": "tpl_465869d5", + "promptSettingsHash": "ps_6cdafb83", + "modelRevision": "nvidia/Cosmos-Guardrail1@d6d4bfa899a71454a700907664f3e88f503950cf | nvidia/Cosmos3-Super-Text2Image@daf3d374804be4c512c2135568a7cb95d4341d79 | Qwen/Qwen3Guard-Gen-0.6B@fada3b2f655b89601929198343c94cd2f64d93cc", + "runtimeFingerprint": "sha256:stable-runtime-v1:05afe2ca78d692eb7c17f22a86297f97ab0e9501bcbc0725588e99ee6c659c67", + "modelSetHash": "sha256:model-set-v1:9927d2d2987da9c8455c58ffb81cd2e1164727ff7b65eafcf3811baded8afa9a", + "inputArtifactsHash": "sha256:input-artifacts-v1:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "graphHash": "sha256:canonical-graph-v1:d08b374fc745f68ba68a3f7043ef31be28fda17b73fff1703303d171ca523399", + "proofLockHash": "sha256:live-proof-lock-v1:e1970ed08c251dadda6ab92f87bf6427e59cd3c034fa16e5787b1dec200abfd5", + "templateRevisionHash": "sha256:template-revision-v1:80f901d3d68897bff5a94797e1864652383a14fdf2367412d9bc79c8ac739618", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:646e1c5f6f1ad8f5cf142c5934145da6a4d0f12758a27c56a8e06ed3afdb3214", + "modelCommit": "nvidia/Cosmos-Guardrail1@d6d4bfa899a71454a700907664f3e88f503950cf | nvidia/Cosmos3-Super-Text2Image@daf3d374804be4c512c2135568a7cb95d4341d79 | Qwen/Qwen3Guard-Gen-0.6B@fada3b2f655b89601929198343c94cd2f64d93cc", + "outputPath": "/template-gallery/cosmos3_super_text_to_image.webp", + "thumbnailPath": "/template-gallery/cosmos3_super_text_to_image.webp", + "mediaType": "image", + "width": 1024, + "height": 1024, + "mediaHash": "sha256:decoded-rgba:f4b22cd622739c6c5e4922d7f0309b077b90092d0e7b54ab4a7cc0498c8af547", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "verificationTimestamp": "2026-11-25T14:51:04.000Z", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T15:10:00.323Z", + "provenancePath": "/template-gallery/reviews/cosmos3_super_text_to_image.reviewed-provenance.json", + "qualityReviewPath": "/template-gallery/reviews/cosmos3_super_text_to_image.quality-review.json", + "provenanceHash": "sha256:canonical-json:f925dcb0bc961dc050fec169a002d7706560a730ffd2aa5996628d6340593769", + "qualityReviewHash": "sha256:canonical-json:21d433d4f298ec4799fe8c07b7ed23bd249225fee5040f61c86b24c44b8de9a8", + "approvedOriginalReviewPath": "/template-gallery/reviews/cosmos3_super_text_to_image.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/cosmos3_super_text_to_image.original-provenance.json" + }, + { + "templateId": "animatediff_pag_snowmelt_over_river_stones", + "templateLockHash": "tpl_71c3b95f", + "promptSettingsHash": "ps_b7b30a2a", + "modelRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2642af585975d6b55b551bcdfb8606edb2fab4b37a05875aa3a8024270b6eab", + "graphHash": "sha256:canonical-graph-v1:23e63b2c8f8206eeaef3e3745b623c351e586aa733cdaa01f278f1e3409e732c", + "proofLockHash": "sha256:retained-template-association-v1:c0c935aa0610a64caa005b4e5b683fcaa32801b1f7bc3c96351a3b00f70485a3", + "backendSourceFingerprint": "sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290", + "backendContractFingerprint": "sha256:backend-contract-v1:32e6e74ce3a29d61ae997904d9d4a77259db5c3bd819dbfc15d312482a356f92", + "modelCommit": "451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "templateRevisionHash": "43087167a4f17c0d0306e72d14750b647cb25811d30726ff3ef5cb57eb37ac4e", + "provenancePath": "/template-gallery/reviews/animatediff_pag_snowmelt_over_river_stones.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:8d51752bd6fe9ea523695c6d6496f242cee15e5ed6f8c3de606e4db30635f72d", + "outputPath": "/template-gallery/animatediff_pag_snowmelt_over_river_stones.mp4", + "thumbnailPath": "/template-gallery/animatediff_pag_snowmelt_over_river_stones.mp4", + "mediaType": "video", + "mediaHash": "sha256:decoded-video-framemd5:61700e3d6bb71ec4fb4fa5b07ba7ca7998b13ae69d212bb4e3aee7627ec19fe3", + "width": 512, + "height": 512, + "verificationTimestamp": "2026-11-25T01:07:13.647Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:390bc435ed5e08e23f5d0781bec999739d440a8ecb540f374d9d55ad9d652119", + "qualityReviewPath": "/template-gallery/reviews/animatediff_pag_snowmelt_over_river_stones.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T15:10:00.323Z", + "frames": 16, + "durationSeconds": 2, + "approvedOriginalReviewPath": "/template-gallery/reviews/animatediff_pag_snowmelt_over_river_stones.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/animatediff_pag_snowmelt_over_river_stones.original-provenance.json" + }, + { + "templateId": "ltx2_surf_below_the_breakwater", + "templateLockHash": "tpl_d1c61711", + "promptSettingsHash": "ps_c0f28184", + "modelRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "runtimeFingerprint": "sha256:stable-runtime-v1:d256b021b495a5fee0efa20922d52d0c46c17996d45ae7386dea47cfbc87d7b6", + "graphHash": "sha256:canonical-graph-v1:b59a7ddbfe865b3d21d1aaa5a7a3dee9277b4b96ecd4e5dcad4f86fa4518d7b0", + "proofLockHash": "sha256:retained-template-association-v1:918cd5e93e27b8694b6f1d0d5f33270b4edc21504f2f6bb6002f28198901bc6e", + "decodedAudioHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:9d6619acbf99b8080688e8120fc9f137eeb46ee7c41a4459be02f379d3a32e88", + "audiovisualMediaHash": "sha256:decoded-av-v1:1bc3d1a510373c480d3df61801d4c4a1b4b11b73d21eaae8507e88da8c403417", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:1fb68b35c4981d6b87ef267a551fb572e72163972539ed955bb17cf7cf3a8bb8", + "modelCommit": "47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "templateRevisionHash": "0a58a9b6f8ac6a0308cf5e137d09d9412579d9ec92133231858ced4d45e4a01e", + "provenancePath": "/template-gallery/reviews/ltx2_surf_below_the_breakwater.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:7392fada12867d63a7daedb3ece76a67bfc40ecafb14199f54644a3cda24a655", + "outputPath": "/template-gallery/ltx2_surf_below_the_breakwater.mp4", + "thumbnailPath": "/template-gallery/ltx2_surf_below_the_breakwater.mp4", + "mediaType": "video", + "mediaHash": "sha256:decoded-video-framemd5:a5c8d38e43c977c9400a6892d46462c1abff6bf0f24b4d7c0671ce7394e21690", + "width": 768, + "height": 512, + "verificationTimestamp": "2026-11-25T07:14:50.574Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:d1ff4edbeaf572a9125de427e62914e3f8346964f0c17ff1e35f1b51fd3a51c7", + "qualityReviewPath": "/template-gallery/reviews/ltx2_surf_below_the_breakwater.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T15:10:00.323Z", + "frames": 121, + "durationSeconds": 5.041666666666667, + "approvedOriginalReviewPath": "/template-gallery/reviews/ltx2_surf_below_the_breakwater.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/ltx2_surf_below_the_breakwater.original-provenance.json" + }, + { + "templateId": "ltx2_kiln_at_first_light", + "templateLockHash": "tpl_36ff17c8", + "promptSettingsHash": "ps_e97cbf70", + "modelRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "runtimeFingerprint": "sha256:stable-runtime-v1:d256b021b495a5fee0efa20922d52d0c46c17996d45ae7386dea47cfbc87d7b6", + "graphHash": "sha256:canonical-graph-v1:7301039ea45039f64b122f548aa716f25eb7185cd976f0f0a0b6638c9cb16dfa", + "proofLockHash": "sha256:retained-template-association-v1:2f18132a77dd0cf6dbac9b5ca5bf0bc57125370af3718ea7eada57e8748fe8ff", + "decodedAudioHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:7bb57ec4aff7452aea9fee35b43fae9b57e8edbcd0cb144ab035d33c27490973", + "audiovisualMediaHash": "sha256:decoded-av-v1:5ae14b166a7346fc941eb5645a9dd5ef7ffbca423fd6c23eaba6e4001c048e4c", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:1fb68b35c4981d6b87ef267a551fb572e72163972539ed955bb17cf7cf3a8bb8", + "modelCommit": "47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "templateRevisionHash": "172e79d27a5e6add55ba522752c17fddb4fb44998d3ff152056befa619c4f5a7", + "provenancePath": "/template-gallery/reviews/ltx2_kiln_at_first_light.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:0e518dfdaae87b63738b6601a56b9301437997ff14bc66dbe91f5978b40545c9", + "outputPath": "/template-gallery/ltx2_kiln_at_first_light.mp4", + "thumbnailPath": "/template-gallery/ltx2_kiln_at_first_light.mp4", + "mediaType": "video", + "mediaHash": "sha256:decoded-video-framemd5:7d87de6dfe09b97c48929d2f8df334cab42e88a10ab9bd948688c3674aa4f2a6", + "width": 768, + "height": 512, + "verificationTimestamp": "2026-11-25T07:04:49.368Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:5430c8d16086671618f7cdc64592e9a00a511ef56393dbcc5ad658c9a00749c9", + "qualityReviewPath": "/template-gallery/reviews/ltx2_kiln_at_first_light.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T15:10:00.323Z", + "frames": 81, + "durationSeconds": 3.375, + "approvedOriginalReviewPath": "/template-gallery/reviews/ltx2_kiln_at_first_light.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/ltx2_kiln_at_first_light.original-provenance.json" + }, + { + "templateId": "ltx2_glasshouse_drip", + "templateLockHash": "tpl_f369615f", + "promptSettingsHash": "ps_7cadd917", + "modelRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "runtimeFingerprint": "sha256:stable-runtime-v1:d256b021b495a5fee0efa20922d52d0c46c17996d45ae7386dea47cfbc87d7b6", + "graphHash": "sha256:canonical-graph-v1:dd5427ed763a352409689fbf23e57249d830e5ddf7c4ec23c34b4a219d1d9c47", + "proofLockHash": "sha256:retained-template-association-v1:7a719fde470457d05cb21f0f3896ad71c3e2050e3fefc096e384bcf78244e7b1", + "decodedAudioHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:063c9c43207ba134f653115cf18ea57610dba0239517d7962d4da31b7d3b183f", + "audiovisualMediaHash": "sha256:decoded-av-v1:26d362cc4f4b7193b066d0ee05a1ad2c7f83acfc722509d1de5332aa6b1cff52", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:6d7fd83982e125093037e64b34a0ff2d70c1cccfb304c1cee11b6dca3e3974fc", + "modelCommit": "47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "templateRevisionHash": "8e9c88d288257a9ccf86964d32b68646882ceaf3c65b4cae91af6d89eea4e1cb", + "provenancePath": "/template-gallery/reviews/ltx2_glasshouse_drip.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:d716284875c8027ea4691a7cef263afd35e78e0272dc8ba3bac21acab76a6200", + "outputPath": "/template-gallery/ltx2_glasshouse_drip.mp4", + "thumbnailPath": "/template-gallery/ltx2_glasshouse_drip.mp4", + "mediaType": "video", + "mediaHash": "sha256:decoded-video-framemd5:0202731e7b280ca08f3ca7254aa274ff882754b258bcb08b5a707abdd2c4e9e9", + "width": 768, + "height": 512, + "verificationTimestamp": "2026-11-25T06:23:53.855Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:c9e1107a12c4d7bc922a99d8e552ea222341f70b161e07ab418c714e83e2623c", + "qualityReviewPath": "/template-gallery/reviews/ltx2_glasshouse_drip.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T15:10:00.323Z", + "frames": 81, + "durationSeconds": 3.375, + "approvedOriginalReviewPath": "/template-gallery/reviews/ltx2_glasshouse_drip.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/ltx2_glasshouse_drip.original-provenance.json", + "approvedSourcePath": "/template-gallery/inputs/ltx2_glasshouse_drip.first.png" + }, + { + "templateId": "wan_animate_signal_through_the_rain", + "templateLockHash": "tpl_28a23eb2", + "promptSettingsHash": "ps_9bf912f3", + "modelRevision": "Wan-AI/Wan2.2-Animate-14B-Diffusers@6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "runtimeFingerprint": "sha256:stable-runtime-v1:4d41adc4d8b1fb3a9aed04a4e324121bd1a145d1051955a1493df3b5c6687bde", + "graphHash": "sha256:canonical-graph-v1:916a843dde25e718457b5621fd1bfa9201300d322cf480133154b0722aa62209", + "proofLockHash": "sha256:retained-template-association-v1:1a3cb2dbc98cd0f3df601bdc21f73a19da144f763f12b8083720aeae48e60261", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:2d72ad297f1912c832a1a945e929a03af0e9de5efe3359a8759aae18db4bc2b5", + "modelCommit": "6f4df10861c758af86ac3c979aacc1bf5c03eff0", + "templateRevisionHash": "3dd570d231c6fb4075f50264809e570747f00ed8f85d367ee494c7d7cd5fe4bf", + "provenancePath": "/template-gallery/reviews/wan_animate_signal_through_the_rain.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:86f942c89dceff3da99962ce790b72b47a092e3ae29a16a04c474a878523b17a", + "outputPath": "/template-gallery/wan_animate_signal_through_the_rain.mp4", + "thumbnailPath": "/template-gallery/wan_animate_signal_through_the_rain.mp4", + "mediaType": "video", + "mediaHash": "sha256:decoded-video-framemd5:635a3e8019bae9545c5e39e25d4500e1c3efd4ac622326f39f451d6e10929897", + "width": 768, + "height": 512, + "verificationTimestamp": "2026-11-25T09:03:45.693Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:5165bc5dd5bdf62932f8742157c9b1270b423c434def62e87b531d7ee169bdc5", + "qualityReviewPath": "/template-gallery/reviews/wan_animate_signal_through_the_rain.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T15:10:00.323Z", + "frames": 81, + "durationSeconds": 3.375, + "approvedOriginalReviewPath": "/template-gallery/reviews/wan_animate_signal_through_the_rain.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/wan_animate_signal_through_the_rain.original-provenance.json", + "approvedSourcePath": "/template-gallery/inputs/wan_animate_signal_through_the_rain.first.png", + "approvedFaceVideoPath": "/template-gallery/inputs/wan_animate_signal_through_the_rain.face.mp4", + "approvedPoseVideoPath": "/template-gallery/inputs/wan_animate_signal_through_the_rain.pose.mp4" + }, + { + "templateId": "latte_water_folding_over_slate", + "templateLockHash": "tpl_65b5cee5", + "promptSettingsHash": "ps_83921a2b", + "modelRevision": "maxin-cn/Latte-1@0653024365272f061fc44d1078134df22842b687", + "runtimeFingerprint": "sha256:stable-runtime-v1:4d41adc4d8b1fb3a9aed04a4e324121bd1a145d1051955a1493df3b5c6687bde", + "graphHash": "sha256:canonical-graph-v1:602be3cfda32fd79e4700a8ee3b17bafdac7c0f8661ccc6dcdf516a418110461", + "proofLockHash": "sha256:retained-template-association-v1:990463a33acca38a8f03c9c7fb457debdd337bdd55e6881af200eae9ad60b19c", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:40a4eb8d6275c83725f57c4d3499b8d12c00f8cf6caffc2d07006e74d24ab820", + "modelCommit": "0653024365272f061fc44d1078134df22842b687", + "templateRevisionHash": "663502fcbb5c79310582bf01e0dab2dfba6abadfa43d044f834b8ab10d5bb145", + "provenancePath": "/template-gallery/reviews/latte_water_folding_over_slate.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:d630fde6f0d2b6592e768eeafbe3749f0ce0f4162348191a4c6c76dd7d69149f", + "outputPath": "/template-gallery/latte_water_folding_over_slate.mp4", + "thumbnailPath": "/template-gallery/latte_water_folding_over_slate.mp4", + "mediaType": "video", + "mediaHash": "sha256:decoded-video-framemd5:dfab2305306297c4afd517a72bd2487f527381fb4e28d68db0ebfdfce6a83a68", + "width": 512, + "height": 512, + "verificationTimestamp": "2026-11-25T09:10:38.298Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:b43a6c7a44ce366bc530d368a7aa565d704c0818e34c872907ccb04f9793e1b7", + "qualityReviewPath": "/template-gallery/reviews/latte_water_folding_over_slate.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T15:10:00.323Z", + "frames": 16, + "durationSeconds": 2, + "approvedOriginalReviewPath": "/template-gallery/reviews/latte_water_folding_over_slate.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/latte_water_folding_over_slate.original-provenance.json" + }, + { + "templateId": "chroma_copper_medallion_outpaint", + "templateLockHash": "tpl_9d214139", + "promptSettingsHash": "ps_2aa6587e", + "modelRevision": "lodestones/Chroma1-HD@0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "runtimeFingerprint": "sha256:stable-runtime-v1:3ea42dd25e331aa0b0ef69781d270fd2bd6bcf4d5b65aab0c16891d77ba094f6", + "graphHash": "sha256:canonical-graph-v1:6b4352e7c6d634521c5ffef10a8d4f9d6ccdcb8e3c2a1c58f9a629afc551cfed", + "proofLockHash": "sha256:retained-template-association-v1:1ffd31f32818f0594537075be45da6c52f18b5cffc572a790d6e3f72d927f4d0", + "backendSourceFingerprint": "sha256:backend-source-v1:ee86f26ee410419fae168f4380029a01d302ec0fd0607308d9b1e40ae2ace7f7", + "backendContractFingerprint": "sha256:backend-contract-v1:06f986600338dc08fb5d1e639bfad55384f5b15ca0c97c2aeb7ed42a8c245594", + "modelCommit": "0e0c60ece1e82b17cb7f77342d765ba5024c40c0", + "templateRevisionHash": "9fecd969c5c6398a2e8194ac8ab7aac9b905267b88bf96f9062cecc16fee7223", + "provenancePath": "/template-gallery/reviews/chroma_copper_medallion_outpaint.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:99806a19fd53479e998eff9325859730dc93aae97595a57d63978190c4cf139d", + "outputPath": "/template-gallery/chroma_copper_medallion_outpaint.webp", + "thumbnailPath": "/template-gallery/chroma_copper_medallion_outpaint.webp", + "mediaType": "image", + "mediaHash": "sha256:decoded-rgba:3b46dd7f31a2b7c0891ac67f84fc24dfe9a8e7dba590b95df9670535484cf408", + "width": 1024, + "height": 768, + "verificationTimestamp": "2026-11-25T09:41:42.540Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:7f74bba1d11de8c5b9e6ea52031be8d8faeb1be19cd968aa1c77e3f39d0cee0f", + "qualityReviewPath": "/template-gallery/reviews/chroma_copper_medallion_outpaint.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T15:10:00.323Z", + "beforePath": "/template-gallery/inputs/chroma_copper_medallion_outpaint.before.png", + "beforeMediaHash": "sha256:bytes:a8aaf9be57bc6bab356c5c1f9b76a1458e7e85e9daf6681e7e38a28fc28e1535", + "afterPath": "/template-gallery/chroma_copper_medallion_outpaint.webp", + "approvedOriginalReviewPath": "/template-gallery/reviews/chroma_copper_medallion_outpaint.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/chroma_copper_medallion_outpaint.original-provenance.json" + }, + { + "templateId": "ltx2_enamel_teapot_window_light", + "templateLockHash": "tpl_6cc90a68", + "promptSettingsHash": "ps_9ed12354", + "modelRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "runtimeFingerprint": "sha256:stable-runtime-v1:d256b021b495a5fee0efa20922d52d0c46c17996d45ae7386dea47cfbc87d7b6", + "graphHash": "sha256:canonical-graph-v1:88e46ced175df74ba7e8788d085e7543203a02f3518f6fc0296f370f7dcf1a40", + "proofLockHash": "sha256:retained-template-association-v1:245d8b451be9e0992271d1d04cceae7361d3f0894dd5ad53b56fffe6e77c7a6b", + "decodedAudioHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:6fd9511a2f7e7f00e79a613e2b152805a8c9fe0457a014237225cd05cd12d693", + "audiovisualMediaHash": "sha256:decoded-av-v1:34b8aedf9a7bd6b31ee0ca9fbcbb3743fbe145fab844612a9534283086194f4e", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:6d7fd83982e125093037e64b34a0ff2d70c1cccfb304c1cee11b6dca3e3974fc", + "modelCommit": "47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "templateRevisionHash": "8c01a644d54c04e3ebb653cba32cdf1b14a18c7167e52ef95fdc392aad28599a", + "provenancePath": "/template-gallery/reviews/ltx2_enamel_teapot_window_light.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:31deada7f59dc635ace085305a1ee30cbb1befe552d49cbcb463d528be957db5", + "outputPath": "/template-gallery/ltx2_enamel_teapot_window_light.mp4", + "thumbnailPath": "/template-gallery/ltx2_enamel_teapot_window_light.mp4", + "mediaType": "video", + "mediaHash": "sha256:decoded-video-framemd5:3bb1e7671bc3f2987747293caf6d5be3df1db21d63e882851791ccc42586e935", + "width": 768, + "height": 512, + "verificationTimestamp": "2026-11-25T06:28:14.109Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:64d5773a24193457cd424bebe502c511a1ac949c19856813cbac9b6cb10ec3d0", + "qualityReviewPath": "/template-gallery/reviews/ltx2_enamel_teapot_window_light.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T15:10:00.323Z", + "frames": 81, + "durationSeconds": 3.375, + "approvedOriginalReviewPath": "/template-gallery/reviews/ltx2_enamel_teapot_window_light.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/ltx2_enamel_teapot_window_light.original-provenance.json", + "approvedSourcePath": "/template-gallery/inputs/ltx2_enamel_teapot_window_light.first.png" + }, + { + "templateId": "ltx2_moss_and_basalt", + "templateLockHash": "tpl_b6f15221", + "promptSettingsHash": "ps_637d1d2f", + "modelRevision": "Lightricks/LTX-2@47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "runtimeFingerprint": "sha256:stable-runtime-v1:d256b021b495a5fee0efa20922d52d0c46c17996d45ae7386dea47cfbc87d7b6", + "graphHash": "sha256:canonical-graph-v1:b5dfe89e55b083b29e1afa57472019ae9b3a123628162b94d3659c58f8d53af8", + "proofLockHash": "sha256:retained-template-association-v1:b7977f8023b21c562adea22d6cdc08e2cb22c9781057df3505ab159b5ad84559", + "decodedAudioHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:dd43f3167c8123ee97751684f6e7d449e9267efd942742c509a51de3cbd25d7f", + "audiovisualMediaHash": "sha256:decoded-av-v1:57b13cae786772fc226cce38638e3546a12c74671b4fef06111c05673fbbd9bb", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:3870812099f899fad7df7ffddf6dd37dd0241e7628d9b40d6fc51acb693b5086", + "modelCommit": "47da56e2ad66ce4125a9922b4a8826bf407f9d0a", + "templateRevisionHash": "680ec55c2e867aab22c21e907eb3ab183c6639af4cd8ba877e6bcec732a5ce1a", + "provenancePath": "/template-gallery/reviews/ltx2_moss_and_basalt.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:358738e0772db8c9641fc5ce1f9605bfe9c45204ccd8b5cd7c70fb8510d0c886", + "outputPath": "/template-gallery/ltx2_moss_and_basalt.mp4", + "thumbnailPath": "/template-gallery/ltx2_moss_and_basalt.mp4", + "mediaType": "video", + "mediaHash": "sha256:decoded-video-framemd5:0a9383604f7a30fb9accc55d3babae89a67ecedb807d36586ec14f8a5dce054e", + "width": 768, + "height": 512, + "verificationTimestamp": "2026-11-25T10:51:51.234Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:f7ec1c7f9075c5b3845dbba2fbde16cdf3d1a776b957548eb010b6324b470d85", + "qualityReviewPath": "/template-gallery/reviews/ltx2_moss_and_basalt.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T15:10:00.323Z", + "beforePath": "/template-gallery/inputs/ltx2_moss_and_basalt.before.mp4", + "beforeMediaHash": "sha256:bytes:3b5e40ac2bf76236d1f901a7a2522addd7c4a1b2701bd89a33c1506b1523bc38", + "afterPath": "/template-gallery/ltx2_moss_and_basalt.mp4", + "beforeSourceMediaHash": "sha256:bytes:3b5e40ac2bf76236d1f901a7a2522addd7c4a1b2701bd89a33c1506b1523bc38", + "frames": 81, + "durationSeconds": 3.375, + "approvedOriginalReviewPath": "/template-gallery/reviews/ltx2_moss_and_basalt.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/ltx2_moss_and_basalt.original-provenance.json" + }, + { + "templateId": "sdxl_pag_lighthouse_in_graphite", + "templateLockHash": "tpl_23c07813", + "promptSettingsHash": "ps_91059256", + "modelRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2642af585975d6b55b551bcdfb8606edb2fab4b37a05875aa3a8024270b6eab", + "graphHash": "sha256:canonical-graph-v1:44c2801331dfd7f8d54f9f8dd240bc901d7d4e855d8244accbdf111b04696361", + "proofLockHash": "sha256:retained-template-association-v1:fb1948c1eb6aac3a979d541442e7496745b216aacad66c25b1b8db951240d7dc", + "backendSourceFingerprint": "sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290", + "backendContractFingerprint": "sha256:backend-contract-v1:bd364fcd29020d51bb61f5f9bf320cf0bf562e718c645c21ffac8ed5a47b740d", + "modelCommit": "462165984030d82259a11f4367a4eed129e94a7b", + "templateRevisionHash": "6eb3e04961a9389794619d6ae2342a296287039deb1d08715a785409b279cba3", + "provenancePath": "/template-gallery/reviews/sdxl_pag_lighthouse_in_graphite.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:2810dc5bd8acf4ca93b6abe2715f0edf99aef30ccfb978da9ef7eb3e6b9ff3ba", + "outputPath": "/template-gallery/sdxl_pag_lighthouse_in_graphite.webp", + "thumbnailPath": "/template-gallery/sdxl_pag_lighthouse_in_graphite.webp", + "mediaType": "image", + "mediaHash": "sha256:decoded-rgba:67424f62c256b2f3298973786541a778838ee10674f5cb38c35c4f5c0c51b1db", + "width": 1024, + "height": 1024, + "verificationTimestamp": "2026-11-25T11:05:22.328Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:e9291d0e31b2436e00dfea18e2053cdd3098c5484eb6983d0555216f3d987036", + "qualityReviewPath": "/template-gallery/reviews/sdxl_pag_lighthouse_in_graphite.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T15:10:00.323Z", + "beforePath": "/template-gallery/inputs/sdxl_pag_lighthouse_in_graphite.before.png", + "beforeMediaHash": "sha256:bytes:4cbc984b44c398b6e92b4350513d3543139e9dffe01a38857845c8a7698272c8", + "afterPath": "/template-gallery/sdxl_pag_lighthouse_in_graphite.webp", + "approvedOriginalReviewPath": "/template-gallery/reviews/sdxl_pag_lighthouse_in_graphite.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sdxl_pag_lighthouse_in_graphite.original-provenance.json" + }, + { + "templateId": "flux_dev_forest_green_teapot", + "templateLockHash": "tpl_266f6def", + "promptSettingsHash": "ps_75d3d1bb", + "modelRevision": "black-forest-labs/FLUX.1-dev@3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "runtimeFingerprint": "sha256:stable-runtime-v1:8b8cb002c7d19d09c3e88b516872a3c78688f9250d1f0f44e4ee03d42c576401", + "graphHash": "sha256:canonical-graph-v1:234b1d91dd85fbdb63119e93334c45509d81ec63cf35ff7c2917989a02facfb7", + "proofLockHash": "sha256:retained-template-association-v1:fb1d73bd82c1411631c0492962fed4a48a76dd8ae6039333152a405552f8cb79", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194", + "modelCommit": "3de623fc3c33e44ffbe2bad470d0f45bccf2eb21", + "templateRevisionHash": "733622609f54510a405766166f8b6a2e00eabffc71dccbe5d780eddf18aa63cd", + "provenancePath": "/template-gallery/reviews/flux_dev_forest_green_teapot.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:09b97ac42d6c9011cc8e694261a37bed183a32e0f0b2cfec48ccd21e751eb8da", + "outputPath": "/template-gallery/flux_dev_forest_green_teapot.webp", + "thumbnailPath": "/template-gallery/flux_dev_forest_green_teapot.webp", + "mediaType": "image", + "mediaHash": "sha256:decoded-rgba:b9556935be8ee9f3114c3f45edd4c1ea9940219107c51e930efe396799045e5d", + "width": 1024, + "height": 1024, + "verificationTimestamp": "2026-11-25T12:54:58.483Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:fe39ad126d39577961b978369fc4877769ac87d552414be170ca44bf7a9c0885", + "qualityReviewPath": "/template-gallery/reviews/flux_dev_forest_green_teapot.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T15:10:00.323Z", + "beforePath": "/template-gallery/inputs/flux_dev_forest_green_teapot.before.webp", + "beforeMediaHash": "sha256:bytes:443062a26e22e3542e284f50d0274b7c70b881b3cce76568eb8eb22ce4c396d6", + "afterPath": "/template-gallery/flux_dev_forest_green_teapot.webp", + "approvedOriginalReviewPath": "/template-gallery/reviews/flux_dev_forest_green_teapot.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/flux_dev_forest_green_teapot.original-provenance.json" + }, + { + "templateId": "animatelcm_sunlit_surf", + "templateLockHash": "tpl_d58d08a0", + "promptSettingsHash": "ps_edc78e93", + "modelRevision": "stable-diffusion-v1-5/stable-diffusion-v1-5@451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2642af585975d6b55b551bcdfb8606edb2fab4b37a05875aa3a8024270b6eab", + "graphHash": "sha256:canonical-graph-v1:1ca2a40982413d74048c1a056d99e663a004ffca73f8982ba51b12e3821de692", + "proofLockHash": "sha256:retained-template-association-v1:e110d953bad0c70532b1bf3c51b4f0a4db7200b53d41f6a5bc6875203e429d30", + "backendSourceFingerprint": "sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290", + "backendContractFingerprint": "sha256:backend-contract-v1:32e6e74ce3a29d61ae997904d9d4a77259db5c3bd819dbfc15d312482a356f92", + "modelCommit": "451f4fe16113bff5a5d2269ed5ad43b0592e9a14", + "templateRevisionHash": "8eb9c374cf4d54c48fc6dab608b1cd5a20acde2948f3e56d0bace61f48f946eb", + "provenancePath": "/template-gallery/reviews/animatelcm_sunlit_surf.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:91e279f29be6567007b9dedf5a78309ceaf374664b727f9b7de1e234e1abe607", + "outputPath": "/template-gallery/animatelcm_sunlit_surf.mp4", + "thumbnailPath": "/template-gallery/animatelcm_sunlit_surf.mp4", + "mediaType": "video", + "mediaHash": "sha256:decoded-video-framemd5:e0232a96ea0212443e496a823b3184de12670389914109a87bf67f52b3de0a5e", + "width": 512, + "height": 512, + "verificationTimestamp": "2026-11-25T13:49:21.637Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:72546fd5f5b9ecfb256453f97715429d1901d0be8ca45d06a721c5470cfd6566", + "qualityReviewPath": "/template-gallery/reviews/animatelcm_sunlit_surf.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T15:10:00.323Z", + "frames": 16, + "durationSeconds": 2, + "approvedOriginalReviewPath": "/template-gallery/reviews/animatelcm_sunlit_surf.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/animatelcm_sunlit_surf.original-provenance.json" + }, + { + "templateId": "flux_kontext_bookshop_clear_glass", + "templateLockHash": "tpl_66d098da", + "promptSettingsHash": "ps_b8e8c482", + "modelRevision": "black-forest-labs/FLUX.1-Kontext-dev@24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "runtimeFingerprint": "sha256:stable-runtime-v1:8b8cb002c7d19d09c3e88b516872a3c78688f9250d1f0f44e4ee03d42c576401", + "graphHash": "sha256:canonical-graph-v1:a9cc4b1c398fd96d027e5f13d281eedc73357ae004f2d6c46e8ecac4dd401b5b", + "proofLockHash": "sha256:retained-template-association-v1:8e7fe3f69fcdde83f94bdb2cd7b3e3365862d2a1a50040dded6da504ed4d466c", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:e7a7aa3acbdedd686fa7e7a9d4bcc39c1709ba1fec38f047d63ff83558a85c18", + "modelCommit": "24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d", + "templateRevisionHash": "e0b3aa2e3ac0aaf75006ed8110ff7420862ccaef4e03da53db5626f12fc278b6", + "provenancePath": "/template-gallery/reviews/flux_kontext_bookshop_clear_glass.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:c0e45e0292e1b2f06d1e332196354b8df282e6083bc804432a6904c0e2a30986", + "outputPath": "/template-gallery/flux_kontext_bookshop_clear_glass.webp", + "thumbnailPath": "/template-gallery/flux_kontext_bookshop_clear_glass.webp", + "mediaType": "image", + "mediaHash": "sha256:decoded-rgba:65b1379696e4e4a14ed1a2a284ad42ee4b06a741923f5eeb45bd0102056f2a11", + "width": 1024, + "height": 1024, + "verificationTimestamp": "2026-11-25T14:08:32.311Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:629e115eb69bcaa7c3a2ab0663a718d678326366189e02d888f4f6919eee2e8b", + "qualityReviewPath": "/template-gallery/reviews/flux_kontext_bookshop_clear_glass.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T15:10:00.323Z", + "beforePath": "/template-gallery/inputs/flux_kontext_bookshop_clear_glass.before.webp", + "beforeMediaHash": "sha256:bytes:ff045be510a0e88cbab69bbe8c3794dd26bd19036bdec26a63a5b6ea5a11bc66", + "afterPath": "/template-gallery/flux_kontext_bookshop_clear_glass.webp", + "approvedOriginalReviewPath": "/template-gallery/reviews/flux_kontext_bookshop_clear_glass.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/flux_kontext_bookshop_clear_glass.original-provenance.json", + "approvedMaskPath": "/template-gallery/inputs/flux_kontext_bookshop_clear_glass.mask.png" + }, + { + "templateId": "sdxl_pag_two_tier_cobalt_glass", + "templateLockHash": "tpl_4a341313", + "promptSettingsHash": "ps_32f2125d", + "modelRevision": "stabilityai/stable-diffusion-xl-base-1.0@462165984030d82259a11f4367a4eed129e94a7b", + "runtimeFingerprint": "sha256:stable-runtime-v1:8b8cb002c7d19d09c3e88b516872a3c78688f9250d1f0f44e4ee03d42c576401", + "graphHash": "sha256:canonical-graph-v1:42c0dca0bd5a735551bed85d826240aecd5691b1a0ac0762470363013b07d1a6", + "proofLockHash": "sha256:retained-template-association-v1:b4c114da344ad5388f27e6fc713ee053a6a32a8bc86dd40946fd4b7abd4e93cd", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:2640de4cce56db16229ada283eb8ff2c49cd39d7f015dd1e08ae601b9c9eac8a", + "modelCommit": "462165984030d82259a11f4367a4eed129e94a7b", + "templateRevisionHash": "09f0d98df7f8807fd95a733b904b52dde05fd41d82f68c31369c3ff7c434120b", + "provenancePath": "/template-gallery/reviews/sdxl_pag_two_tier_cobalt_glass.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:57a8f6a782abd1548d02bf061e624f65a04d5e5be2f0031ca15e2e2ad737dcb4", + "outputPath": "/template-gallery/sdxl_pag_two_tier_cobalt_glass.webp", + "thumbnailPath": "/template-gallery/sdxl_pag_two_tier_cobalt_glass.webp", + "mediaType": "image", + "mediaHash": "sha256:decoded-rgba:1822899e90f7155bcd778940df1799679306382fc68a6d3bf1e5521e5d80c696", + "width": 1024, + "height": 1024, + "verificationTimestamp": "2026-11-25T14:39:45.774Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:1f89cfd67080ae4a111e6d7262e41c45464d53c1c353de134864c8f5d3c0aa87", + "qualityReviewPath": "/template-gallery/reviews/sdxl_pag_two_tier_cobalt_glass.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T15:10:00.323Z", + "beforePath": "/template-gallery/inputs/sdxl_pag_two_tier_cobalt_glass.before.png", + "beforeMediaHash": "sha256:bytes:ff30b36f685b657db6de0cb59dff37601e147123ba19b9c42a32fc1060bd323e", + "afterPath": "/template-gallery/sdxl_pag_two_tier_cobalt_glass.webp", + "approvedOriginalReviewPath": "/template-gallery/reviews/sdxl_pag_two_tier_cobalt_glass.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/sdxl_pag_two_tier_cobalt_glass.original-provenance.json", + "approvedGuidePath": "/template-gallery/inputs/sdxl_pag_two_tier_cobalt_glass.guide.png" + }, + { + "templateId": "wan_vace_amber_glass_stabilized", + "templateLockHash": "tpl_6035cabd", + "promptSettingsHash": "ps_1cd79e28", + "modelRevision": "Wan-AI/Wan2.1-VACE-1.3B-diffusers@ec4d2cb062b548996b179d493fdd05340de702a1", + "runtimeFingerprint": "sha256:stable-runtime-v1:fa4b17845460bc78e1186b428ef9b3f53a5dcac8053c54fcf8a41cdad917552f", + "graphHash": "sha256:canonical-graph-v1:5b7ac5d2442e6c92e28ee9bff7e02847c3de46dc2570e5d7eb779583f186fc0c", + "proofLockHash": "sha256:retained-template-association-v1:1d75c8e6f41302773097064fca37bf0f457e83e61b5ae0053871f00a075a8733", + "backendSourceFingerprint": "sha256:backend-source-v1:438519cbac050bb30e69d86506f4510f260d790899896038d9707a5edd488e95", + "backendContractFingerprint": "sha256:backend-contract-v1:5a281b9ce038d5cd332f93df5f1a29c485cf04edd0b8b809b2921217daeb7010", + "modelCommit": "ec4d2cb062b548996b179d493fdd05340de702a1", + "templateRevisionHash": "0a03ac711cd90be44c4f79f9d39ce3afa4e0cad264bdfc24294d625ce551181d", + "provenancePath": "/template-gallery/reviews/wan_vace_amber_glass_stabilized.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:63483b5e8a32e021b2318f9b2765679b44d8423df3df0a817e06995bc7a8ed24", + "outputPath": "/template-gallery/wan_vace_amber_glass_stabilized.mp4", + "thumbnailPath": "/template-gallery/wan_vace_amber_glass_stabilized.mp4", + "mediaType": "video", + "mediaHash": "sha256:decoded-video-framemd5:19fea526934abe015732f233692f3575a9027bad1252326f7dbea48368204092", + "width": 1664, + "height": 960, + "verificationTimestamp": "2026-11-17T04:47:18.627Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:4933d3ff862e2fada194bcb7ee5d6a0ca06b4f4d21810b8719c77801fbf58f8e", + "qualityReviewPath": "/template-gallery/reviews/wan_vace_amber_glass_stabilized.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T15:10:00.323Z", + "frames": 161, + "durationSeconds": 10.0625, + "approvedOriginalReviewPath": "/template-gallery/reviews/wan_vace_amber_glass_stabilized.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/wan_vace_amber_glass_stabilized.original-provenance.json", + "approvedSourcePath": "/template-gallery/inputs/wan_vace_amber_glass_stabilized.before.mp4", + "approvedMaskPath": "/template-gallery/inputs/wan_vace_amber_glass_stabilized.mask.mp4", + "approvedReferenceImagePath": "/template-gallery/inputs/wan_vace_amber_glass_stabilized.reference.png" + }, + { + "templateId": "ltx_long_wind_and_tide_at_the_headland", + "templateLockHash": "tpl_3bb28fd4", + "promptSettingsHash": "ps_75d6a3e5", + "modelRevision": "Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "runtimeFingerprint": "sha256:stable-runtime-v1:d256b021b495a5fee0efa20922d52d0c46c17996d45ae7386dea47cfbc87d7b6", + "graphHash": "sha256:canonical-graph-v1:cdee10882c28fd4417274cbcd16101f9b7a2d144cf8ab828ab261ff6b660e673", + "proofLockHash": "sha256:retained-template-association-v1:f6c9fa6e78f715d221684ab689797418c3b4056c8571311e125cf7393a417d28", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:d68ff3c7d7b2d190e68d6f148834ae971638c23a9d31086a3848874658f37da2", + "modelCommit": "7c64400e1861cc0d7b98d570a1926d5408ec60cd", + "templateRevisionHash": "73e9ef351cbe53f541789d49ac53118ad61dbc234b40f1c516bd982f9e621153", + "provenancePath": "/template-gallery/reviews/ltx_long_wind_and_tide_at_the_headland.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:ba767407427783cb65aadd18b220b6226259048d02fbb8140fe1bb07c8597781", + "outputPath": "/template-gallery/ltx_long_wind_and_tide_at_the_headland.mp4", + "thumbnailPath": "/template-gallery/ltx_long_wind_and_tide_at_the_headland.mp4", + "mediaType": "video", + "mediaHash": "sha256:decoded-video-framemd5:eaf29d941d16d4ff5c7b9f254db3b00454d7dc3ea68c0310ed1c8122d347fa7b", + "width": 768, + "height": 512, + "verificationTimestamp": "2026-11-25T11:16:56.343Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:af6d2cc9e7fd9de9bf51456806f42763b564e25ecc98cc435945a9ec9d2dda26", + "qualityReviewPath": "/template-gallery/reviews/ltx_long_wind_and_tide_at_the_headland.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T15:10:00.323Z", + "frames": 129, + "durationSeconds": 5.375, + "approvedOriginalReviewPath": "/template-gallery/reviews/ltx_long_wind_and_tide_at_the_headland.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/ltx_long_wind_and_tide_at_the_headland.original-provenance.json", + "approvedSourcePath": "/template-gallery/inputs/ltx_long_wind_and_tide_at_the_headland.first.png" + }, + { + "templateId": "audioldm2_wind_through_high_pines", + "templateLockHash": "tpl_576af977", + "promptSettingsHash": "ps_0a65234d", + "modelRevision": "cvssp/audioldm2@c8e7e189d324425c05c4c2f81214041ef4107983", + "runtimeFingerprint": "sha256:stable-runtime-v1:c2642af585975d6b55b551bcdfb8606edb2fab4b37a05875aa3a8024270b6eab", + "graphHash": "sha256:canonical-graph-v1:3b4e9f186c35a687114a08eef220f841aba92feaae4d515ce9c6b15252750cd5", + "proofLockHash": "sha256:retained-template-association-v1:9fe2a7c19f04a2244c3d179c189b17fd220e5672949822021a4edc2dc320e0e4", + "backendSourceFingerprint": "sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290", + "backendContractFingerprint": "sha256:backend-contract-v1:9ddcba2a3da4634780919a6872ed9a6586f7a765f16243cee9763b776d02b356", + "modelCommit": "c8e7e189d324425c05c4c2f81214041ef4107983", + "templateRevisionHash": "1e95e96945a61ebe10ce15747c762aacbb9cc86520b8cf826aa9a4b91b7f9edd", + "provenancePath": "/template-gallery/reviews/audioldm2_wind_through_high_pines.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:e4ab0b1a51d37ecc4b48b8d840921f7c1bce58591f6b33c54197c707d3e2f4fb", + "outputPath": "/template-gallery/audioldm2_wind_through_high_pines.wav", + "thumbnailPath": "/template-gallery/audioldm2_wind_through_high_pines.wav", + "mediaHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:363d8b6b0568ebc840eac064135a3cb3646ab297d0769f54bd493972d8a87b46", + "mediaType": "audio", + "verificationTimestamp": "2026-11-25T00:34:07.462Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:e886270ebc722c98053c76b1e83bfb88608444912f47933e7e0c46d38e7bb5d0", + "qualityReviewPath": "/template-gallery/reviews/audioldm2_wind_through_high_pines.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T16:50:04.589Z", + "approvedOriginalReviewPath": "/template-gallery/reviews/audioldm2_wind_through_high_pines.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/audioldm2_wind_through_high_pines.original-provenance.json" + }, + { + "templateId": "stable_audio_glass_roof_rain", + "templateLockHash": "tpl_f2ac2522", + "promptSettingsHash": "ps_0b1b4dfd", + "modelRevision": "stabilityai/stable-audio-open-1.0@f21265c1e2710b3bd2386596943f0007f55f802e", + "runtimeFingerprint": "sha256:stable-runtime-v1:8d8c8fb193ad602274792b780b94bf16f2a1475c861e5717fa60255bd7fb2282", + "graphHash": "sha256:canonical-graph-v1:292049221515a4d709fe400c1d7a75b33e01aa98b2946392761d627fd68f1303", + "proofLockHash": "sha256:retained-template-association-v1:9d7a88e0a4db8439ec65c5f67ec1af983ab835cc9754df6f6caf1af6690cae50", + "backendSourceFingerprint": "sha256:backend-source-v1:bf8ee3b3df08410b5f041279f84ca3b9e0bbb7248f0e73fbe4c0ecb718727b6c", + "backendContractFingerprint": "sha256:backend-contract-v1:92104623eb3205adaa23cccc593a604da25d7f696e79cd9b947b553b92da39f0", + "modelCommit": "f21265c1e2710b3bd2386596943f0007f55f802e", + "templateRevisionHash": "98b2b306a1e1b6198b80157de33d35a146532b246d2bdd4effb1bbc10415014f", + "provenancePath": "/template-gallery/reviews/stable_audio_glass_roof_rain.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:ac5f2d0c38fedb5520e536a56abbba856e2dfb811ff7bac1504b51ba3210e128", + "outputPath": "/template-gallery/stable_audio_glass_roof_rain.wav", + "thumbnailPath": "/template-gallery/stable_audio_glass_roof_rain.wav", + "mediaType": "audio", + "mediaHash": "sha256:decoded-audio-pcm-s16le-48000-stereo:a0505ae775f33020c47c9872754278ace1199ffe996a5d5f1e73501d0b02b0df", + "verificationTimestamp": "2026-11-25T17:07:08.451Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:c942063902da57443200f4cd07d41e65ef2c1ee069f252e8e80da99557637b81", + "qualityReviewPath": "/template-gallery/reviews/stable_audio_glass_roof_rain.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T17:24:25.603Z", + "approvedOriginalReviewPath": "/template-gallery/reviews/stable_audio_glass_roof_rain.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/stable_audio_glass_roof_rain.original-provenance.json" + }, + { + "templateId": "stable_video_lighthouse_headland", + "templateLockHash": "tpl_bbc20719", + "promptSettingsHash": "ps_a6c010a4", + "modelRevision": "stabilityai/stable-video-diffusion-img2vid-xt-1-1@043843887ccd51926e3efed36270444a838e7861", + "runtimeFingerprint": "sha256:stable-runtime-v1:d256b021b495a5fee0efa20922d52d0c46c17996d45ae7386dea47cfbc87d7b6", + "graphHash": "sha256:canonical-graph-v1:938d04de55523ebc54353d3af5de6fff1cd17296559fa89132795f846a628df2", + "proofLockHash": "sha256:retained-template-association-v1:8c6af70bcbd584cfcb83d9910dde8469067d7aa083eed8a6d2d94a9fbf1a1124", + "backendSourceFingerprint": "sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7", + "backendContractFingerprint": "sha256:backend-contract-v1:d68ff3c7d7b2d190e68d6f148834ae971638c23a9d31086a3848874658f37da2", + "modelCommit": "043843887ccd51926e3efed36270444a838e7861", + "templateRevisionHash": "0ca724757ea5c4d3ddcb75957d99e5c8c25994915ebcb1610565e329e2542bd4", + "provenancePath": "/template-gallery/reviews/stable_video_lighthouse_headland.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:140c8cd84947e67410c51ecd25a431f5e85ff7cd4150552aa1246f9695da7626", + "outputPath": "/template-gallery/stable_video_lighthouse_headland.mp4", + "thumbnailPath": "/template-gallery/stable_video_lighthouse_headland.mp4", + "mediaType": "video", + "mediaHash": "sha256:decoded-video-framemd5:755825bae43c3bd17043cdefd195c74358054d5855177e40d691190cd1acb8e8", + "width": 1024, + "height": 576, + "verificationTimestamp": "2026-11-25T17:02:44.883Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:cd2d9f9051fa8f99ac7c390ee74a638005ccd8b59e55400bee7deee4f7647d91", + "qualityReviewPath": "/template-gallery/reviews/stable_video_lighthouse_headland.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-25T17:24:25.603Z", + "frames": 25, + "durationSeconds": 3.5714285714285716, + "approvedOriginalReviewPath": "/template-gallery/reviews/stable_video_lighthouse_headland.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/stable_video_lighthouse_headland.original-provenance.json", + "approvedSourcePath": "/template-gallery/inputs/stable_video_lighthouse_headland.first.png", + "posterPath": "/template-gallery/stable_video_lighthouse_headland.poster.png" + }, + { + "templateId": "flux_canny_black_ink_cube", + "templateLockHash": "tpl_35d15309", + "promptSettingsHash": "ps_62bb6180", + "modelRevision": "black-forest-labs/FLUX.1-Canny-dev@27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "runtimeFingerprint": "sha256:stable-runtime-v1:7573ce2b0c90ae7f161aa306220190f47898e51a3e38fd9db0af3077a38884d3", + "graphHash": "sha256:canonical-graph-v1:67b6ea243b95dcc3bd650ffad71d1138f4cc7d1d57e243a755d53acc3ed87fa4", + "proofLockHash": "sha256:retained-template-association-v1:1a15eee171a662869c987c9dbeb7b0af21b6c195059d079366f78294fb22c068", + "backendSourceFingerprint": "sha256:backend-source-v1:73c0d5622c9c305eb2c13478fbac4ca9ea09c71689c74d38679fa6af592c8964", + "backendContractFingerprint": "sha256:backend-contract-v1:a726a4911d942b352bd2cf362667a5c67d7868af60789bf1ecd73896ddd05a43", + "modelCommit": "27c3d8bdc17509b47cf4fd9ba25ab1c7508a69a2", + "templateRevisionHash": "31fd14f25aae5426b9b42550ef75f26b26e4847703460e6076bcefea1d9c8cc6", + "provenancePath": "/template-gallery/reviews/flux_canny_black_ink_cube.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:918367c0169b542d2e3592cf767aa099e4786bd51debce63ef0e183232dbdfa0", + "outputPath": "/template-gallery/flux_canny_black_ink_cube.webp", + "thumbnailPath": "/template-gallery/flux_canny_black_ink_cube.webp", + "beforePath": "/template-gallery/inputs/joy_plus_lavender_on_limestone.before.png", + "beforeMediaHash": "sha256:bytes:0a41a9c56b98945e60c96ef796660c35b2cab7bf0b36d5e84ab0d97ef97f0a5a", + "afterPath": "/template-gallery/flux_canny_black_ink_cube.webp", + "mediaType": "image", + "mediaHash": "sha256:decoded-rgba:c1240774142958050f06f218b1f9ab504c648379187f43873e594730c65c0f54", + "width": 1024, + "height": 1024, + "verificationTimestamp": "2026-11-25T18:59:54.565Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:1c7bb383ec2c8aa861fd1e1589def3ee8c0b0ceed39a39b150f6fa8c5f3be231", + "qualityReviewPath": "/template-gallery/reviews/flux_canny_black_ink_cube.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26T03:07:23.8072053Z", + "approvedOriginalReviewPath": "/template-gallery/reviews/flux_canny_black_ink_cube.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/flux_canny_black_ink_cube.original-provenance.json", + "approvedGuidePath": "/template-gallery/inputs/flux_canny_black_ink_cube.guide.png" + }, + { + "templateId": "flux_depth_marine_teal_bow_edit", + "templateLockHash": "tpl_9c2a8470", + "promptSettingsHash": "ps_fdc2afcb", + "modelRevision": "black-forest-labs/FLUX.1-Depth-dev@fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "runtimeFingerprint": "sha256:stable-runtime-v1:7573ce2b0c90ae7f161aa306220190f47898e51a3e38fd9db0af3077a38884d3", + "graphHash": "sha256:canonical-graph-v1:fb0d8ae61d4bde3d097d3dfb64fe2f8d3d91e03c30fc36d89cf96ab650313a0d", + "proofLockHash": "sha256:retained-template-association-v1:93348542ecf67d74a3b359d1a9fa34846a64342cdcebed98f7d9de2000daed47", + "backendSourceFingerprint": "sha256:backend-source-v1:73c0d5622c9c305eb2c13478fbac4ca9ea09c71689c74d38679fa6af592c8964", + "backendContractFingerprint": "sha256:backend-contract-v1:a726a4911d942b352bd2cf362667a5c67d7868af60789bf1ecd73896ddd05a43", + "modelCommit": "fb5e9b1bae41b8c8adcea4ea2a87b74dd298f07a", + "templateRevisionHash": "4495ab72ea261fbec0dbbe7796bbb1927c5acf5a39dcd6cc28ae13496c76c019", + "provenancePath": "/template-gallery/reviews/flux_depth_marine_teal_bow_edit.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:9b281b3be7cc9c3766bede173451fafcaf60fdfd069951abe732df91f87b3b3f", + "outputPath": "/template-gallery/flux_depth_marine_teal_bow_edit.webp", + "thumbnailPath": "/template-gallery/flux_depth_marine_teal_bow_edit.webp", + "beforePath": "/template-gallery/inputs/flux_depth_marine_bow_repair.before.webp", + "beforeMediaHash": "sha256:bytes:c3d52c29b6a8cae80d2feffb8a978cded8b34509abd09216f665ab3af13f189e", + "afterPath": "/template-gallery/flux_depth_marine_teal_bow_edit.webp", + "mediaType": "image", + "mediaHash": "sha256:decoded-rgba:6dbbeaf1bbd636f57f8e5327bacfa3ce8e8ba2e3df8165d3eda60491170dd10e", + "width": 1024, + "height": 1024, + "verificationTimestamp": "2026-11-25T18:56:57.629Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:f004f4d4730e781efc398441b406435596a9f7ce9b794658fcee05af8d9b56b5", + "qualityReviewPath": "/template-gallery/reviews/flux_depth_marine_teal_bow_edit.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26T03:07:23.8072053Z", + "approvedOriginalReviewPath": "/template-gallery/reviews/flux_depth_marine_teal_bow_edit.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/flux_depth_marine_teal_bow_edit.original-provenance.json", + "approvedGuidePath": "/template-gallery/inputs/flux_depth_marine_bow_repair.guide.png" + }, + { + "templateId": "pixart_sigma_terracotta_herbs", + "templateLockHash": "tpl_a325d457", + "promptSettingsHash": "ps_7d930751", + "modelRevision": "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207", + "runtimeFingerprint": "sha256:stable-runtime-v1:c54745b69d492872f845cedc4b219cd19194e7da9f1dbd670ef7167a43cff990", + "graphHash": "sha256:canonical-graph-v1:45bdf2a38647f2c0aaa52206922a4a32a60e4253a3d6cf9185f7007125d367f4", + "proofLockHash": "sha256:retained-template-association-v1:47961d4965466eff547a42011ba54be4579c842fe280fd4fae5d95fc08109dc2", + "backendSourceFingerprint": "sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "e102b3591cc82e97071b8b4cb90d834d0c487207", + "templateRevisionHash": "480e216355d747c12b2bb430d60fb8b3f6e774775d7976d5ffcf2fc108af82ee", + "provenancePath": "/template-gallery/reviews/pixart_sigma_terracotta_herbs.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:6cd2e2cf4df1944551c87630e26d60f6c1b10000af448d8b0a5650949209bb6a", + "outputPath": "/template-gallery/pixart_sigma_terracotta_herbs.webp", + "thumbnailPath": "/template-gallery/pixart_sigma_terracotta_herbs.webp", + "mediaType": "image", + "mediaHash": "sha256:decoded-rgba:b9f65c4d0d53ac5abe38088e7642b4039a74e6a66fea786cd686526eaa7c9985", + "width": 1024, + "height": 1024, + "verificationTimestamp": "2026-11-23T17:15:12.387Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:981c9a772f6e656b9f1cdb6c666ff4b46357af4c7f4be7931bc9e94857f9c607", + "qualityReviewPath": "/template-gallery/reviews/pixart_sigma_terracotta_herbs.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26T04:41:05.3021754Z", + "approvedOriginalReviewPath": "/template-gallery/reviews/pixart_sigma_terracotta_herbs.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/pixart_sigma_terracotta_herbs.original-provenance.json" + }, + { + "templateId": "pixart_sigma_pag_pink_mascot", + "templateLockHash": "tpl_723f7b31", + "promptSettingsHash": "ps_13489954", + "modelRevision": "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS@e102b3591cc82e97071b8b4cb90d834d0c487207", + "runtimeFingerprint": "sha256:stable-runtime-v1:5846f66250f07c2b7d11a0a97a7094c854b69be56a1aa7f50b772f52b4aeaef9", + "graphHash": "sha256:canonical-graph-v1:202b5ad2b76097f3e45033e55153e9077e4110164e5878672526eeb72d986b57", + "proofLockHash": "sha256:retained-template-association-v1:1f56050648103d43831f252a2f6da9dc5cd497efc208e4d419693d7186217e91", + "backendSourceFingerprint": "sha256:backend-source-v1:8dd9a4d61d2c9c484e4167e38e7360d6b64a37d278e49771630e428189f5448b", + "backendContractFingerprint": "sha256:backend-contract-v1:300f2fb801e65ef8a0355d217f3f89e59d11e38f976af5a86ba41212d30216fd", + "modelCommit": "e102b3591cc82e97071b8b4cb90d834d0c487207", + "templateRevisionHash": "f1f33d46c694c535230dc9b15fd3c021ad4b4b9a9a70d99a5596c01c3a5f2025", + "provenancePath": "/template-gallery/reviews/pixart_sigma_pag_pink_mascot.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:b2f69995be4346b1c9d202163716ffd7cf736abb36f2579a64abfc38e00d099c", + "outputPath": "/template-gallery/pixart_sigma_pag_pink_mascot.webp", + "thumbnailPath": "/template-gallery/pixart_sigma_pag_pink_mascot.webp", + "mediaType": "image", + "mediaHash": "sha256:decoded-rgba:3a320ea84a7b8a6778aff7b8ef228400cd5d4d81d94ca9d00571737713ae4a91", + "width": 1024, + "height": 1024, + "verificationTimestamp": "2026-11-19T06:29:39.928Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:82270c83a110b560d1537b5d57f360cd7259c8a787a95675e3dbb9dadf3d0b9c", + "qualityReviewPath": "/template-gallery/reviews/pixart_sigma_pag_pink_mascot.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26T04:41:05.3021754Z", + "approvedOriginalReviewPath": "/template-gallery/reviews/pixart_sigma_pag_pink_mascot.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/pixart_sigma_pag_pink_mascot.original-provenance.json" + }, + { + "templateId": "ddpm_cifar32_technical_preview", + "templateLockHash": "tpl_9d22bacd", + "promptSettingsHash": "ps_e4c5ee1c", + "modelRevision": "google/ddpm-cifar10-32@267b167dc01f0e4e61923ea244e8b988f84deb80", + "runtimeFingerprint": "sha256:stable-runtime-v1:2299351aea101504d371caff5eb79babf14d1e0a953469eac7c879c8e756b1ff", + "graphHash": "sha256:canonical-graph-v1:4fc0c90a6cd5807a3e07843afc9b41d2464390cd6d445b418d0cc48ce964ecc7", + "proofLockHash": "sha256:retained-template-association-v1:aa127c3c544525a1b5863c292f34e8572fae149f317cb2f2200128cdc38aecf6", + "backendSourceFingerprint": "sha256:backend-source-v1:8dd9a4d61d2c9c484e4167e38e7360d6b64a37d278e49771630e428189f5448b", + "backendContractFingerprint": "sha256:backend-contract-v1:d16a0d75259eb0a1deadd48385d2f456ee5d7ed8e4c42ec8c27a53a0f95c079c", + "modelCommit": "267b167dc01f0e4e61923ea244e8b988f84deb80", + "templateRevisionHash": "ea0657f083a38e463cf3e03212cb1080bf03a810f8feb162a0f80176cf48b34e", + "provenancePath": "/template-gallery/reviews/ddpm_cifar32_technical_preview.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:a11fc71fedb15a25fc042b49419c5f3492ee6d3047b5d40a7a021b1fb1918901", + "outputPath": "/template-gallery/ddpm_cifar32_technical_preview.webp", + "thumbnailPath": "/template-gallery/ddpm_cifar32_technical_preview.webp", + "mediaType": "image", + "mediaHash": "sha256:decoded-rgba:69bd8190ed63733707be55fb98262d3df3cf81aca3264c1b98f2c04591412383", + "width": 32, + "height": 32, + "verificationTimestamp": "2026-11-19T07:41:28.161Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:4a5abab5f7452e4d0677710245633118d422eab4ffbf00ac5f438f94ee8965de", + "qualityReviewPath": "/template-gallery/reviews/ddpm_cifar32_technical_preview.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26T04:41:05.3021754Z", + "approvedOriginalReviewPath": "/template-gallery/reviews/ddpm_cifar32_technical_preview.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/ddpm_cifar32_technical_preview.original-provenance.json" + }, + { + "templateId": "consistency_64_technical_preview", + "templateLockHash": "tpl_2aa7d54b", + "promptSettingsHash": "ps_b171853c", + "modelRevision": "openai/diffusers-cd_imagenet64_l2@5f462e4403fc37b72ec6004e806c71805db22387", + "runtimeFingerprint": "sha256:stable-runtime-v1:fcd519a076f179f1f945a92f3356ed201598deea69f2b09b06d1f7cb5ede375c", + "graphHash": "sha256:canonical-graph-v1:6912051646a49f18b61e7f98fdf9665059818faaac3ca3d29c796b32941ee479", + "proofLockHash": "sha256:retained-template-association-v1:0f3998226b8778d125ba96d147d96ea332cafd1d48ee62ee349fec72104c5be3", + "backendSourceFingerprint": "sha256:backend-source-v1:8dd9a4d61d2c9c484e4167e38e7360d6b64a37d278e49771630e428189f5448b", + "backendContractFingerprint": "sha256:backend-contract-v1:fd79d9695a0390dba3364bad57ac4ea2ccbb5cef673189181f756368701ea1e4", + "modelCommit": "5f462e4403fc37b72ec6004e806c71805db22387", + "templateRevisionHash": "7c73b72123f3a2fc2e3bdef6594d378cfdb16bf862bab5aa0c230cde93e52bfb", + "provenancePath": "/template-gallery/reviews/consistency_64_technical_preview.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:58d0355f1346e6642cc2c87a5c5a2d944aee0dbb8d22fa0931397019dc0205f1", + "outputPath": "/template-gallery/consistency_64_technical_preview.webp", + "thumbnailPath": "/template-gallery/consistency_64_technical_preview.webp", + "mediaType": "image", + "mediaHash": "sha256:decoded-rgba:c893e92c2c9b82cb3a29e33717a668107593e72150961fb9cb9f3a3ff94ce4d8", + "width": 64, + "height": 64, + "verificationTimestamp": "2026-11-19T07:34:55.386Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:1fc2507112926e32263a2bc059b7c5cdeedd7f1f2c223ddba6528558b232b76d", + "qualityReviewPath": "/template-gallery/reviews/consistency_64_technical_preview.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26T04:41:05.3021754Z", + "approvedOriginalReviewPath": "/template-gallery/reviews/consistency_64_technical_preview.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/consistency_64_technical_preview.original-provenance.json" + }, + { + "templateId": "shap_e_traffic_cone_turntable", + "templateLockHash": "tpl_60ef5b65", + "promptSettingsHash": "ps_7ddd815e", + "modelRevision": "openai/shap-e@7bd337afdea1c17842e1c3cc45c4e268356dba40", + "runtimeFingerprint": "sha256:stable-runtime-v1:b8dfba6a04e4333b7e052f20401a6251d5888b17b614e5e3990ebb197d2688ad", + "graphHash": "sha256:canonical-graph-v1:eb319f05ba885a4c4e8c35fd06126484d519a95c1fd8078d85cd95574d6c8d08", + "proofLockHash": "sha256:retained-template-association-v1:020283db4826df6f57378376b908622440f4be455d48062d76e56c7a2b0c797a", + "backendSourceFingerprint": "sha256:backend-source-v1:3486a8950b4b134157b022faf89983af60c5e274d4ec3ed9fedd44b2ee1459ab", + "backendContractFingerprint": "sha256:backend-contract-v1:9378c60e00d05964ea18fe541c5454ee2aedc97ad016658f5dcffe4ac46bd326", + "modelCommit": "7bd337afdea1c17842e1c3cc45c4e268356dba40", + "templateRevisionHash": "fa62bcb8142d0e8e3cf7816cc648ca33ae32dfcfebb83d455c52e14f662a8ff2", + "provenancePath": "/template-gallery/reviews/shap_e_traffic_cone_turntable.retained-template-provenance.json", + "provenanceHash": "sha256:canonical-json:301e053c368349852124c7c1384e53b57d3c51010da07a643fb47d91d6f84a57", + "outputPath": "/template-gallery/shap_e_traffic_cone_turntable.mp4", + "thumbnailPath": "/template-gallery/shap_e_traffic_cone_turntable.mp4", + "mediaType": "video", + "mediaHash": "sha256:decoded-video-framemd5:6e783af38b0869b2a3fe55a7bee43d8c140ef19826fa1e18a3dc4d8dbaee5bf2", + "width": 256, + "height": 256, + "frames": 20, + "durationSeconds": 1.6666666666666667, + "verificationTimestamp": "2026-11-26T12:31:34.910Z", + "verificationStatus": "reviewed", + "qualityReviewStatus": "approved_reviewed", + "qualityReviewHash": "sha256:canonical-json:f8968f774dacf906b6f0bce8f8e035a4b12a51ee15cc11aed31f9bf40a4298e9", + "qualityReviewPath": "/template-gallery/reviews/shap_e_traffic_cone_turntable.quality-review.json", + "reviewer": "MoDiff workspace maintainer", + "reviewedAt": "2026-11-26T12:41:27.430Z", + "posterPath": "/template-gallery/shap_e_traffic_cone_turntable.poster.webp", + "approvedOriginalReviewPath": "/template-gallery/reviews/shap_e_traffic_cone_turntable.original-review.json", + "approvedOriginalProvenancePath": "/template-gallery/reviews/shap_e_traffic_cone_turntable.original-provenance.json" } ] } diff --git a/public/template-gallery/runtime-inputs/default-input-bindings.json b/public/template-gallery/runtime-inputs/default-input-bindings.json index bd8b0346..f667ab7f 100644 --- a/public/template-gallery/runtime-inputs/default-input-bindings.json +++ b/public/template-gallery/runtime-inputs/default-input-bindings.json @@ -53,6 +53,7 @@ "id": "ace_step_audio_variation-source-audio", "label": "Reviewed source audio", "mediaType": "audio", + "previewPath": "/template-gallery/inputs/ace_step_audio_variation.before.wav", "runtimePath": "/template-gallery/runtime-inputs/assets/e07d05a658d361b6d28af62bcccfaeba9254507467dae1c5839efd546fed96a7.wav", "runtimeSha256": "sha256:bytes:e07d05a658d361b6d28af62bcccfaeba9254507467dae1c5839efd546fed96a7", "fileName": "ace_step_audio_variation.source_audio.wav" @@ -60,6 +61,98 @@ ] } ], + "ace_step_lyric_music_video": [ + { + "id": "ace_step_lyric_music_video-reference-images-defaults", + "label": "Reviewed reference images", + "mediaType": "image", + "origin": "template", + "requiredAt": "workflow_start", + "field": "referenceImages", + "defaultAssets": [ + { + "id": "ace_step_lyric_music_video-reference-image-1", + "label": "Reviewed reference image 1", + "mediaType": "image", + "runtimePath": "/template-gallery/runtime-inputs/assets/424477289e9872767f3d880913cbe89a55fd765a4c7a78cc05e16543d57f5da9.webp", + "runtimeSha256": "sha256:bytes:424477289e9872767f3d880913cbe89a55fd765a4c7a78cc05e16543d57f5da9", + "fileName": "ace_step_lyric_music_video.reference_image_1.webp" + }, + { + "id": "ace_step_lyric_music_video-reference-image-2", + "label": "Reviewed reference image 2", + "mediaType": "image", + "runtimePath": "/template-gallery/runtime-inputs/assets/3c77210d30a5954105564bbf3025322eb5b3cfb839717185eed8f4f3bac12c3c.webp", + "runtimeSha256": "sha256:bytes:3c77210d30a5954105564bbf3025322eb5b3cfb839717185eed8f4f3bac12c3c", + "fileName": "ace_step_lyric_music_video.reference_image_2.webp" + }, + { + "id": "ace_step_lyric_music_video-reference-image-3", + "label": "Reviewed reference image 3", + "mediaType": "image", + "runtimePath": "/template-gallery/runtime-inputs/assets/923228d65b793a2c9b4007d067309ba38aa1384a5692f5e89ceadb20e53655e7.png", + "runtimeSha256": "sha256:bytes:923228d65b793a2c9b4007d067309ba38aa1384a5692f5e89ceadb20e53655e7", + "fileName": "ace_step_lyric_music_video.reference_image_3.png" + }, + { + "id": "ace_step_lyric_music_video-reference-image-4", + "label": "Reviewed reference image 4", + "mediaType": "image", + "runtimePath": "/template-gallery/runtime-inputs/assets/e7445aefeb2c248ff76caa56c1da1a29129ac57994b4d62fcb8cb0bcfe6a0734.png", + "runtimeSha256": "sha256:bytes:e7445aefeb2c248ff76caa56c1da1a29129ac57994b4d62fcb8cb0bcfe6a0734", + "fileName": "ace_step_lyric_music_video.reference_image_4.png" + }, + { + "id": "ace_step_lyric_music_video-reference-image-5", + "label": "Reviewed reference image 5", + "mediaType": "image", + "runtimePath": "/template-gallery/runtime-inputs/assets/0ea2dd6fd5c75c7b49e5677c3ff74666b6e8b3d3cf7f62ba1ad416253a76f63b.webp", + "runtimeSha256": "sha256:bytes:0ea2dd6fd5c75c7b49e5677c3ff74666b6e8b3d3cf7f62ba1ad416253a76f63b", + "fileName": "ace_step_lyric_music_video.reference_image_5.webp" + }, + { + "id": "ace_step_lyric_music_video-reference-image-6", + "label": "Reviewed reference image 6", + "mediaType": "image", + "runtimePath": "/template-gallery/runtime-inputs/assets/0ea2dd6fd5c75c7b49e5677c3ff74666b6e8b3d3cf7f62ba1ad416253a76f63b.webp", + "runtimeSha256": "sha256:bytes:0ea2dd6fd5c75c7b49e5677c3ff74666b6e8b3d3cf7f62ba1ad416253a76f63b", + "fileName": "ace_step_lyric_music_video.reference_image_6.webp" + }, + { + "id": "ace_step_lyric_music_video-reference-image-7", + "label": "Reviewed reference image 7", + "mediaType": "image", + "runtimePath": "/template-gallery/runtime-inputs/assets/4fcc47b98431770a667597cca11ca0d7de82dd340ab999e4c5057a07fc46c6e6.webp", + "runtimeSha256": "sha256:bytes:4fcc47b98431770a667597cca11ca0d7de82dd340ab999e4c5057a07fc46c6e6", + "fileName": "ace_step_lyric_music_video.reference_image_7.webp" + }, + { + "id": "ace_step_lyric_music_video-reference-image-8", + "label": "Reviewed reference image 8", + "mediaType": "image", + "runtimePath": "/template-gallery/runtime-inputs/assets/fcca725348f3a6ffbb0f4db657c52e16216dbe6735305fbcc5e164f1fee49ab4.webp", + "runtimeSha256": "sha256:bytes:fcca725348f3a6ffbb0f4db657c52e16216dbe6735305fbcc5e164f1fee49ab4", + "fileName": "ace_step_lyric_music_video.reference_image_8.webp" + }, + { + "id": "ace_step_lyric_music_video-reference-image-9", + "label": "Reviewed reference image 9", + "mediaType": "image", + "runtimePath": "/template-gallery/runtime-inputs/assets/f92394469d782bfcc9e00fdda22a9aff3ce0f0cfd9c3258ef9ff0a7ed2b2b89b.png", + "runtimeSha256": "sha256:bytes:f92394469d782bfcc9e00fdda22a9aff3ce0f0cfd9c3258ef9ff0a7ed2b2b89b", + "fileName": "ace_step_lyric_music_video.reference_image_9.png" + }, + { + "id": "ace_step_lyric_music_video-reference-image-10", + "label": "Reviewed reference image 10", + "mediaType": "image", + "runtimePath": "/template-gallery/runtime-inputs/assets/379cdf80a147cdbe84ccad4b97daec4a734c0a274761da9900e658a09ca48d28.webp", + "runtimeSha256": "sha256:bytes:379cdf80a147cdbe84ccad4b97daec4a734c0a274761da9900e658a09ca48d28", + "fileName": "ace_step_lyric_music_video.reference_image_10.webp" + } + ] + } + ], "character_edit": [ { "id": "character_edit-reference-images-defaults", @@ -274,8 +367,8 @@ ], "flux_kontext_multi_reference": [ { - "id": "flux_kontext_multi_reference-reference-images-defaults", - "label": "Reviewed reference images", + "id": "flux-kontext-material-preservation-v2-inputs", + "label": "Source bottle and material-only reference", "mediaType": "image", "origin": "template", "requiredAt": "workflow_start", @@ -283,7 +376,7 @@ "defaultAssets": [ { "id": "flux_kontext_multi_reference-reference-image-1", - "label": "Reviewed reference image 1", + "label": "Approved source bottle", "mediaType": "image", "previewPath": "/template-gallery/inputs/flux_kontext_multi_reference.before.webp", "runtimePath": "/template-gallery/runtime-inputs/assets/a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b.webp", @@ -291,12 +384,12 @@ "fileName": "flux_kontext_multi_reference.reference_image_1.webp" }, { - "id": "flux_kontext_multi_reference-reference-image-2", - "label": "Reviewed reference image 2", + "id": "flux-kontext-cobalt-material-only-v2", + "label": "Cobalt surface colour and texture strip", "mediaType": "image", - "runtimePath": "/template-gallery/runtime-inputs/assets/9f421cdc0fa80b3aae368bd3b20a8f6f05942ec461f88541f01aec5390468897.webp", - "runtimeSha256": "sha256:bytes:9f421cdc0fa80b3aae368bd3b20a8f6f05942ec461f88541f01aec5390468897", - "fileName": "flux_kontext_multi_reference.reference_image_2.webp" + "runtimePath": "/template-gallery/runtime-inputs/assets/70c74691e2bcd7cdb352b7e64e5af5a1a7f01d77112d32a8edadc0060a95ef34.png", + "runtimeSha256": "sha256:bytes:70c74691e2bcd7cdb352b7e64e5af5a1a7f01d77112d32a8edadc0060a95ef34", + "fileName": "flux_kontext_multi_reference.material_strip_v2.png" } ] } @@ -657,6 +750,7 @@ "id": "qwen_layered_portrait-reference-image-1", "label": "Reviewed reference image 1", "mediaType": "image", + "previewPath": "/template-gallery/inputs/qwen_layered_portrait.before.webp", "runtimePath": "/template-gallery/runtime-inputs/assets/965240cf250a9074a7adab394c76070674cf517bed42b6c4647112d17dec84de.webp", "runtimeSha256": "sha256:bytes:965240cf250a9074a7adab394c76070674cf517bed42b6c4647112d17dec84de", "fileName": "qwen_layered_portrait.reference_image_1.webp" diff --git a/run-dev.ps1 b/run-dev.ps1 index ff14cf57..af1a8764 100644 --- a/run-dev.ps1 +++ b/run-dev.ps1 @@ -165,7 +165,6 @@ if (Test-PortInUse -Port $BackendPort) { $backendCommand = @" `$Host.UI.RawUI.WindowTitle = 'MoDiff Backend' Set-Location -LiteralPath '$backendPathEscaped' -`$env:PYTORCH_CUDA_ALLOC_CONF = if (`$env:PYTORCH_CUDA_ALLOC_CONF) { `$env:PYTORCH_CUDA_ALLOC_CONF } else { 'expandable_segments:True' } if (Test-Path -LiteralPath '.\.venv\Scripts\python.exe') { & '.\.venv\Scripts\python.exe' main.py } else { diff --git a/scripts/adapter-chain-links.test.mjs b/scripts/adapter-chain-links.test.mjs new file mode 100644 index 00000000..39b57226 --- /dev/null +++ b/scripts/adapter-chain-links.test.mjs @@ -0,0 +1,426 @@ +import assert from 'node:assert/strict'; +import { after, before, beforeEach, test } from 'node:test'; +import { createServer } from 'vite'; + +let server, flowStore, nodesStore, studioStore, bridge, controlled, chain; +const originalFetch = globalThis.fetch; +before(async () => { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, value), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { + dispatchEvent: () => true, + location: { origin: 'http://127.0.0.1:5191' }, + localStorage: globalThis.localStorage, + requestAnimationFrame: (callback) => setTimeout(() => callback(Date.now()), 0), + cancelAnimationFrame: clearTimeout, + setTimeout, + }; + server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { noDiscovery: true }, + server: { middlewareMode: true, hmr: false, watch: null }, + appType: 'custom', + }); + flowStore = (await server.ssrLoadModule('/src/stores/useFlowStore.ts')).useFlowStore; + nodesStore = (await server.ssrLoadModule('/src/stores/useNodeStore.ts')).useNodesStore; + studioStore = (await server.ssrLoadModule('/src/stores/useStudioStore.ts')).useStudioStore; + bridge = await server.ssrLoadModule('/src/studio/graphBridge.ts'); + controlled = await server.ssrLoadModule('/src/studio/controlledWorkflows.ts'); + chain = await server.ssrLoadModule('/src/studio/adapterChainLinks.ts'); + globalThis.fetch = async (url, options) => { + assert.equal(new URL(url).pathname, '/cache'); + assert.equal(options.method, 'DELETE'); + return new Response(JSON.stringify({ error: false, nodes: JSON.parse(options.body).nodes }), { + status: 200, + headers: { 'Content-Type': 'application/json' }, + }); + }; +}); +after(async () => { + globalThis.fetch = originalFetch; + await server?.close(); +}); + +function nativeFixture() { + const input = (type) => ({ type, display: 'input' }); + const output = (type) => ({ type, display: 'output' }); + const make = (id, role, module, action, params) => ({ + id, + type: 'custom', + position: { x: 0, y: 0 }, + data: { + type: 'custom', + module, + action, + label: action, + category: 'Test', + studioOwned: true, + studioRole: role, + params, + }, + }); + const nodes = [ + make('models', 'models', 'modules.ModularDiffusers', 'ModelsLoader', { + model_type: { type: 'string', value: 'QwenImageModularPipeline' }, + repo_id: { type: 'string', value: '' }, + lora_list: input('custom_lora'), + text_encoders: output('TextEncoders'), + unet_out: output('DenoiseModel'), + vae_out: output('VAE'), + scheduler: output('Scheduler'), + }), + make('prompt', 'prompt', 'modules.ModularDiffusers', 'EncodePrompt', { + text_encoders: input('TextEncoders'), + prompt: { type: 'text', value: 'authored prompt' }, + embeddings: output('TextEmbeddings'), + }), + make('denoise', 'denoise', 'modules.ModularDiffusers', 'Denoise', { + unet: input('DenoiseModel'), + scheduler: input('Scheduler'), + embeddings: input('TextEmbeddings'), + latents: output('Latents'), + }), + make('decode', 'decode', 'modules.ModularDiffusers', 'DecodeLatents', { + vae: input('VAE'), + latents: input('Latents'), + images: output('image'), + }), + make('preview', 'preview', 'modules.Image', 'Preview', { image: input('image') }), + ]; + const connect = (source, sourceHandle, target, targetHandle) => ({ + id: `${source}.${sourceHandle}-${target}.${targetHandle}`, + source, + sourceHandle, + target, + targetHandle, + type: 'default', + }); + const edges = [ + connect('models', 'text_encoders', 'prompt', 'text_encoders'), + connect('models', 'unet_out', 'denoise', 'unet'), + connect('models', 'scheduler', 'denoise', 'scheduler'), + connect('models', 'vae_out', 'decode', 'vae'), + connect('prompt', 'embeddings', 'denoise', 'embeddings'), + connect('denoise', 'latents', 'decode', 'latents'), + connect('decode', 'images', 'preview', 'image'), + ]; + const form = { + ...studioStore.getState().form, + modelType: 'QwenImageModularPipeline', + mode: 'text_to_image', + resourceMode: 'expert', + quantizationMode: 'none', + prompt: 'authored prompt', + }; + const binding = { + modelType: form.modelType, + mode: form.mode, + nodes: Object.fromEntries(nodes.map((node) => [node.data.studioRole, node.id])), + managedNodeIds: nodes.map((node) => node.id), + managedEdgeIds: edges.map((edge) => edge.id), + fingerprint: `${form.mode}:${form.modelType}:${form.resourceMode}:${form.quantizationMode}`, + createdAt: 1, + updatedAt: 1, + }; + const lora = make('lora-definition', 'loraAdapter', 'modules.ModularDiffusers', 'Lora', { + previous_loras: input('custom_lora'), + lora: output('custom_lora'), + model: { type: 'string', value: '' }, + scale: { type: 'float', value: 1 }, + adapter_name: { type: 'string', value: '' }, + }); + nodesStore.setState({ + nodesRegistry: Object.fromEntries( + [...nodes, lora].map((node) => [ + `${node.data.module}.${node.data.action}`, + { ...node.data, studioOwned: undefined, studioRole: undefined }, + ]), + ), + studioModelCapabilities: [], + studioModelCapabilitiesAuthoritative: false, + studioExecutionSpecInvalid: false, + }); + flowStore.setState({ + nodes, + edges, + historyPast: [], + historyFuture: [], + historyTransaction: null, + viewport: { x: 0, y: 0, zoom: 1 }, + }); + studioStore.setState({ + form, + graphBinding: binding, + graphFinalization: null, + workflowTabs: [], + activeWorkflowTabId: null, + autoResourcePlan: null, + autoFieldOverrides: {}, + }); + assert.equal(bridge.syncStudioGraphDefinition(form), true); + assert.equal(bridge.getStudioGraphRunBlockingMessage(form), null); + return form; +} +beforeEach(() => nativeFixture()); + +const settings = { + adapterName: 'one', + scale: 0.6, + additionalAdapters: [ + { adapterName: 'two', scale: 0.9 }, + { adapterName: 'three', scale: 1.1 }, + ], +}; +const options = { graphPrepared: true, notify: false }; +const adapterNodes = () => + flowStore + .getState() + .nodes.filter((node) => node.data.studioRole?.startsWith('loraAdapter')) + .sort( + (a, b) => + (a.data.studioRole === 'loraAdapter' ? 0 : Number(a.data.studioRole.split(':')[1])) - + (b.data.studioRole === 'loraAdapter' ? 0 : Number(b.data.studioRole.split(':')[1])), + ); + +// Undo refreshes visual edge styles and derived handle connection flags. Compare +// the authored nodes, values, positions and typed wires independently of those. +const authoredGraph = () => ({ + nodes: flowStore.getState().nodes.map((node) => ({ + ...node, + data: { + ...node.data, + params: Object.fromEntries( + Object.entries(node.data.params).map(([key, param]) => { + const { isConnected: _connected, ...authored } = param; + return [key, authored]; + }), + ), + }, + })), + edges: flowStore.getState().edges.map(({ id, source, sourceHandle, target, targetHandle, type }) => ({ + id, + source, + sourceHandle, + target, + targetHandle, + type, + })), +}); + +const expectNativeChain = (adapters) => { + const links = flowStore.getState().edges.filter((edge) => adapters.some((node) => node.id === edge.source)); + assert.deepEqual( + links.map(({ source, sourceHandle, target, targetHandle }) => [source, sourceHandle, target, targetHandle]), + adapters.map((adapter, index) => [ + adapter.id, + 'lora', + adapters[index + 1]?.id ?? 'models', + index < adapters.length - 1 ? 'previous_loras' : 'lora_list', + ]), + ); +}; + +test('legacy native multi-LoRA authors the complete ordered descriptor chain and seals it atomically', async () => { + const form = studioStore.getState().form; + const before = structuredClone(authoredGraph()); + await controlled.addLoraWorkflowBlock(form, settings, options); + const adapters = adapterNodes(); + assert.equal(adapters.length, 3); + assert.deepEqual( + adapters.map((node) => node.data.params.adapter_name.value), + ['one', 'two', 'three'], + ); + assert.deepEqual( + adapters.map((node) => node.data.params.scale.value), + [0.6, 0.9, 1.1], + ); + expectNativeChain(adapters); + assert.equal(bridge.getStudioGraphRunBlockingMessage(form), null); + assert.equal(studioStore.getState().graphBinding.finalizationProof.schemaVersion, 3); + assert.equal(flowStore.getState().historyPast.length, 1); + flowStore.getState().undo(); + assert.deepEqual(authoredGraph(), before); +}); + +test('native replacement removes stale adapters and bypass links without changing creative fields', async () => { + const form = studioStore.getState().form; + await controlled.addLoraWorkflowBlock(form, settings, options); + const previous = adapterNodes(); + const creativeNodes = structuredClone( + authoredGraph().nodes.filter((node) => !node.data.studioRole.startsWith('loraAdapter')), + ); + await controlled.addLoraWorkflowBlock(form, { adapterName: 'replacement', scale: 0.4 }, options); + const adapters = adapterNodes(); + assert.equal(adapters.length, 1); + assert.equal(adapters[0].id, previous[0].id); + assert.equal(adapters[0].data.params.adapter_name.value, 'replacement'); + expectNativeChain(adapters); + assert.equal( + flowStore + .getState() + .edges.some((edge) => previous.slice(1).some((node) => node.id === edge.source || node.id === edge.target)), + false, + ); + assert.deepEqual( + authoredGraph().nodes.filter((node) => !node.data.studioRole.startsWith('loraAdapter')), + creativeNodes, + ); + assert.equal(bridge.getStudioGraphRunBlockingMessage(form), null); + assert.equal(flowStore.getState().historyPast.length, 2); + flowStore.getState().undo(); + expectNativeChain(adapterNodes()); + assert.equal(adapterNodes().length, 3); +}); + +test('eight native adapters are sealed and a ninth is rejected without graph or history changes', async () => { + const form = studioStore.getState().form; + const eight = { + adapterName: 'one', + additionalAdapters: Array.from({ length: 7 }, (_, index) => ({ adapterName: `adapter-${index + 2}`, scale: 0.5 })), + }; + await controlled.addLoraWorkflowBlock(form, eight, options); + assert.equal(adapterNodes().length, 8); + expectNativeChain(adapterNodes()); + assert.equal(bridge.getStudioGraphRunBlockingMessage(form), null); + const before = structuredClone(authoredGraph()); + const proof = structuredClone(studioStore.getState().graphBinding.finalizationProof); + await assert.rejects( + controlled.addLoraWorkflowBlock( + form, + { + ...eight, + additionalAdapters: [...eight.additionalAdapters, { adapterName: 'ninth' }], + }, + options, + ), + /at most 8 adapters/, + ); + assert.deepEqual(authoredGraph(), before); + assert.deepEqual(studioStore.getState().graphBinding.finalizationProof, proof); + assert.equal(flowStore.getState().historyPast.length, 1); +}); + +test('missing typed previous_loras input rolls back the entire native authoring transaction', async () => { + const form = studioStore.getState().form; + const registry = structuredClone(nodesStore.getState().nodesRegistry); + delete registry['modules.ModularDiffusers.Lora'].params.previous_loras; + nodesStore.setState({ nodesRegistry: registry }); + const before = structuredClone(authoredGraph()); + const proof = structuredClone(studioStore.getState().graphBinding.finalizationProof); + await assert.rejects(controlled.addLoraWorkflowBlock(form, settings, options), /connection could not be completed/); + assert.deepEqual(authoredGraph(), before); + assert.deepEqual(studioStore.getState().graphBinding.finalizationProof, proof); + assert.equal(flowStore.getState().historyPast.length, 0); + assert.equal(flowStore.getState().historyTransaction, null); +}); + +test('a shared owned adapter branch is preserved when legacy controlled editing is unavailable', async () => { + const form = studioStore.getState().form; + await controlled.addLoraWorkflowBlock(form, settings, options); + const foreign = { + id: 'other-loader', + type: 'custom', + position: { x: 800, y: 0 }, + data: { + module: 'modules.ModularDiffusers', + action: 'ModelsLoader', + params: { + lora_list: { type: 'custom_lora', display: 'input' }, + }, + }, + }; + flowStore.setState({ + nodes: [...flowStore.getState().nodes, foreign], + edges: [ + ...flowStore.getState().edges, + { + id: 'shared-adapter-output', + source: adapterNodes()[0].id, + sourceHandle: 'lora', + target: foreign.id, + targetHandle: 'lora_list', + type: 'default', + }, + ], + }); + const before = structuredClone(authoredGraph()); + await assert.rejects(controlled.addLoraWorkflowBlock(form, { adapterName: 'replacement' }, options)); + assert.deepEqual(authoredGraph(), before); + assert.equal(flowStore.getState().historyPast.length, 1); +}); + +test('pure ordered links handle native descriptors, external prefixes and pipeline bypasses without mutation', () => { + const native = { + adapterIds: ['a', 'b', 'c'], + inputHandles: ['previous_loras'], + outputHandles: ['lora'], + target: { nodeId: 'loader', handles: ['lora_list', 'loras'] }, + }; + const original = structuredClone(native); + assert.deepEqual(chain.orderedAdapterChainLinks(native), [ + { source: 'a', sourceHandles: ['lora'], target: 'b', targetHandles: ['previous_loras'] }, + { source: 'b', sourceHandles: ['lora'], target: 'c', targetHandles: ['previous_loras'] }, + { source: 'c', sourceHandles: ['lora'], target: 'loader', targetHandles: ['lora_list', 'loras'] }, + ]); + assert.deepEqual(native, original); + const prefix = chain.orderedAdapterChainLinks({ ...native, source: { nodeId: 'shared-prefix', handles: ['lora'] } }); + assert.deepEqual(prefix[0], { + source: 'shared-prefix', + sourceHandles: ['lora'], + target: 'a', + targetHandles: ['previous_loras'], + }); + assert.deepEqual(chain.orderedAdapterChainLinks({ ...native, adapterIds: [] }), []); + const pipeline = { + adapterIds: [], + inputHandles: ['pipeline'], + outputHandles: ['output'], + source: { nodeId: 'owner', handles: ['pipeline'] }, + target: { nodeId: 'consumer', handles: ['pipeline'] }, + }; + assert.deepEqual(chain.orderedAdapterChainLinks(pipeline), [ + { source: 'owner', sourceHandles: ['pipeline'], target: 'consumer', targetHandles: ['pipeline'] }, + ]); + assert.equal(chain.orderedAdapterChainLinks({ ...pipeline, adapterIds: ['a', 'b', 'c'] }).length, 4); + assert.throws(() => chain.orderedAdapterChainLinks({ ...native, adapterIds: ['a', 'a'] }), /distinct adapters/); + assert.throws( + () => + chain.orderedAdapterChainLinks({ ...native, adapterIds: Array.from({ length: 9 }, (_, index) => `${index}`) }), + /at most 8/, + ); +}); + +test('an explicit reviewed chain bound permits 32 links without widening the legacy eight-adapter default', () => { + const options = { + adapterIds: Array.from({ length: 32 }, (_, index) => `adapter-${index}`), + inputHandles: ['previous_loras'], + outputHandles: ['lora'], + target: { nodeId: 'loader', handles: ['lora_list'] }, + }; + const original = structuredClone(options); + const links = chain.orderedAdapterChainLinks({ ...options, maxOwnedAdapters: 32 }); + assert.equal(links.length, 32); + assert.equal(links[0].source, 'adapter-0'); + assert.equal(links[31].target, 'loader'); + assert.deepEqual(options, original); + assert.throws(() => chain.orderedAdapterChainLinks(options), /at most 8/); + assert.throws( + () => + chain.orderedAdapterChainLinks({ + ...options, + adapterIds: [...options.adapterIds, 'adapter-32'], + maxOwnedAdapters: 32, + }), + /at most 32/, + ); + for (const maxOwnedAdapters of [0, 33, -1, 1.5, NaN, Infinity, '32', null]) + assert.throws( + () => chain.orderedAdapterChainLinks({ ...options, adapterIds: ['only'], maxOwnedAdapters }), + /bound/, + ); +}); diff --git a/scripts/ancillary-execution-scope.test.mjs b/scripts/ancillary-execution-scope.test.mjs new file mode 100644 index 00000000..2df69212 --- /dev/null +++ b/scripts/ancillary-execution-scope.test.mjs @@ -0,0 +1,666 @@ +import assert from 'node:assert/strict'; +import { readFileSync, mkdtempSync, rmSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import path from 'node:path'; +import { before, after, test } from 'node:test'; +import { createServer } from 'vite'; +const ROOT = process.cwd(); +const cache = mkdtempSync(path.join(tmpdir(), 'modiff-ancillary-scope-')); +const fixture = JSON.parse(readFileSync(path.join(ROOT, 'tests/fixtures/ancillary-authoring.v1.json'), 'utf8')); +const fp32Fixture = JSON.parse( + readFileSync(path.join(ROOT, 'tests/fixtures/ancillary-fp32-t2i-authoring.v1.json'), 'utf8'), +); +let server, select, exporter, hashes, runtime, schema, definitions, selectedStarter, previousWindow; +before(async () => { + previousWindow = globalThis.window; + globalThis.window = { + location: { origin: 'http://127.0.0.1:5191', hostname: '127.0.0.1', protocol: 'http:', port: '5191' }, + }; + server = await createServer({ + root: ROOT, + configFile: false, + cacheDir: cache, + logLevel: 'silent', + appType: 'custom', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + }); + ({ selectAncillaryExecutionScope: select } = await server.ssrLoadModule('/src/workflow/ancillaryExecutionScope.ts')); + definitions = await server.ssrLoadModule('/src/workflow/ancillaryExecutionScope.ts'); + const actual = JSON.parse(readFileSync('tests/fixtures/ancillary-starter.v1.json', 'utf8')); + const { parseOperationStarter } = await server.ssrLoadModule('/src/workflow/operationStarterRequest.ts'); + selectedStarter = parseOperationStarter( + actual.response, + actual.selection.pipelineClass, + actual.selection.task, + actual.operationContracts, + actual.selection, + ); + exporter = await server.ssrLoadModule('/src/stores/flowGraphExport.ts'); + hashes = await server.ssrLoadModule('/src/studio/stableHash.ts'); + runtime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); + schema = await server.ssrLoadModule('/src/studio/blockSchemaV2.ts'); +}); +after(async () => { + await server?.close(); + rmSync(cache, { recursive: true, force: true }); + if (previousWindow === undefined) delete globalThis.window; + else globalThis.window = previousWindow; +}); +function setup(index = 0, document = fixture) { + const row = document.parents[index], + parent = JSON.parse(row.rawParentJson), + contract = parent.ancillaryOperations[0], + registry = structuredClone(row.registry); + const binding = { + contractId: contract.id, + contentHash: contract.contentHash, + parent: { ...contract.parent, authoringContentHash: parent.contentHash }, + parentRoleNodes: Object.fromEntries(parent.roles.map(([role]) => [role, `main-${role}`])), + roleNodes: Object.fromEntries(contract.roles.map(([role]) => [role, `aux-${role}`])), + }; + const nodes = [ + ...parent.roles.map((role) => [binding.parentRoleNodes, role]), + ...contract.roles.map((role) => [binding.roleNodes, role]), + ].map(([map, [role, key, x, y]]) => ({ + id: map[role], + type: 'custom', + position: { x, y }, + data: structuredClone(registry[key]), + })); + // Finite synthetic topology over actual registry declarations, not a loaded model. + // Use explicit internally consistent CPU/Off controls; no GPU authority is mocked. + for (const node of nodes) { + if (node.data.params.offload_mode) node.data.params.offload_mode.value = 'none'; + if (node.data.params.auto_offload) node.data.params.auto_offload.value = false; + } + const byId = (id) => nodes.find((node) => node.id === id); + const owner = byId(binding.parentRoleNodes[contract.bindings.owner.role]), + request = byId(binding.roleNodes[contract.bindings.request.role]); + owner.data.params[contract.bindings.owner.promptField].value = 'Authored raw prompt\nunchanged.'; + owner.data.params[contract.bindings.owner.layoutField].value = null; + request.data.params[contract.bindings.request.promptField].value = + owner.data.params[contract.bindings.owner.promptField].value; + request.data.params[contract.bindings.request.layoutField].value = null; + for (const [role, field, value] of contract.initialValues) + byId(binding.roleNodes[role]).data.params[field].value = value; + owner.data.operationAuthoring = { ancillaryBindings: [binding] }; + const edge = ([a, b, c, d], map, index) => ({ + id: `edge-${index}`, + source: map[a], + sourceHandle: b, + target: map[c], + targetHandle: d, + }); + const edges = [ + ...parent.edges.map((row, i) => edge(row, binding.parentRoleNodes, i)), + ...contract.edges.map((row, i) => edge(row, binding.roleNodes, parent.edges.length + i)), + ]; + const reference = contract.bindings.owner.referenceSource; + if (reference) + edges.push({ + id: 'shared-reference', + source: binding.parentRoleNodes[reference.role], + sourceHandle: reference.field, + target: request.id, + targetHandle: contract.bindings.request.imagesField, + }); + const target = { + nodeId: binding.roleNodes[contract.bindings.output.role], + outputField: contract.bindings.output.field, + }; + return { + nodes, + edges, + parent, + contract, + binding, + owner, + request, + registry, + target, + parents: [{ recipe: parent, selection: row.selection }], + kind: 'workflow', + }; +} +const ids = (values) => values.slice().sort(); +const run = (flow, kind = 'workflow') => + select({ ...flow, kind, target: kind === 'explicit_preview' ? flow.target : undefined }); +const api = (flow, targets) => + exporter.buildApiGraphExport({ + nodes: flow.nodes, + edges: flow.edges, + sid: 'unit', + ...(targets ? { targetNodeIds: targets } : {}), + randomizeSeeds: false, + setParam() { + throw Error('No seed mutations'); + }, + }); +for (let index = 0; index < 4; index++) { + test(`actual declaration ${index + 1} selects ordinary parent and exclusive Preview ancestry`, () => { + const f = setup(index), + before = JSON.stringify(f); + const ordinary = run(f), + preview = run(f, 'explicit_preview'); + assert.deepEqual(ids(ordinary.nodeIds), ids(Object.values(f.binding.parentRoleNodes))); + const reference = f.contract.bindings.owner.referenceSource; + assert.deepEqual( + ids(preview.nodeIds), + ids([...Object.values(f.binding.roleNodes), ...(reference ? [f.binding.parentRoleNodes[reference.role]] : [])]), + ); + assert.equal(ordinary.purpose.target, null); + assert.deepEqual(preview.purpose.target, f.target); + assert.deepEqual(Object.keys(api(f, ordinary.targetNodeIds).nodes).sort(), ids(ordinary.nodeIds)); + assert.deepEqual(Object.keys(api(f, preview.targetNodeIds).nodes).sort(), ids(preview.nodeIds)); + assert.equal(JSON.stringify(f), before); + }); +} +test('actual FP32 T2I declaration selects only its provider Preview and preserves the ordinary image route', () => { + const f = setup(0, fp32Fixture), + before = JSON.stringify(f), + runtime = f.contract.verification.runtimeInputs, + request = f.contract.verification.requestInputs; + assert.equal(f.parent.id, 'flux3-klein:text-to-image:prompt-preview-fp32-authoring:v1'); + assert.equal(f.contract.bindings.owner.referenceSource, null); + assert.equal(f.parent.roles.length, 5); + assert.equal(f.nodes.length, 7); + assert.equal(f.edges.length, 8); + const selected = (role, field) => + f.contract.initialValues.find(([actualRole, actualField]) => actualRole === role && actualField === field)?.[2]; + assert.equal(selected(runtime.role, runtime.dtypeField), 'float32'); + assert.equal(selected(runtime.role, runtime.deviceField), 'cuda:0'); + assert.equal(selected(runtime.role, runtime.quantizationField), 'none'); + assert.equal(selected(request.role, request.maxInputTokensField), 4096); + const ordinary = run(f), + preview = run(f, 'explicit_preview'); + assert.deepEqual(ids(ordinary.nodeIds), ids(Object.values(f.binding.parentRoleNodes))); + assert.deepEqual(ids(preview.nodeIds), ids(Object.values(f.binding.roleNodes))); + assert.deepEqual(Object.keys(api(f, ordinary.targetNodeIds).nodes).sort(), ids(ordinary.nodeIds)); + const previewApi = api(f, preview.targetNodeIds); + assert.deepEqual(Object.keys(previewApi.nodes).sort(), ids(preview.nodeIds)); + const images = previewApi.nodes[f.request.id].params[f.contract.bindings.request.imagesField]; + assert.equal(images?.sourceId, undefined); + assert.equal(images?.value ?? null, null); + assert.equal(JSON.stringify(f), before); +}); + +for (const [name, field, value] of [ + ['dtype', 'dtypeField', 'bfloat16'], + ['device', 'deviceField', 'cpu'], + ['quantization', 'quantizationField', 'bnb_4bit'], +]) + test(`actual FP32 T2I Preview refuses a changed ${name} literal`, () => { + const f = setup(0, fp32Fixture), + runtime = f.contract.verification.runtimeInputs, + provider = f.nodes.find((node) => node.id === f.binding.roleNodes[runtime.role]); + provider.data.params[runtime[field]].value = value; + assert.throws(() => run(f, 'explicit_preview'), /declared input selection changed/u); + assert.deepEqual(ids(run(f).nodeIds), ids(Object.values(f.binding.parentRoleNodes))); + }); + +test('actual FP32 T2I Preview refuses a changed input-token bound', () => { + const f = setup(0, fp32Fixture), + request = f.contract.verification.requestInputs; + f.request.data.params[request.maxInputTokensField].value = 32768; + assert.throws(() => run(f, 'explicit_preview'), /declared input selection changed/u); +}); + +test('current legacy T2I declaration retains its NF4 recipe and refuses FP32 substitution', () => { + const f = setup(0, { + parents: [{ ...fp32Fixture.currentLegacyParent, registry: fp32Fixture.parents[0].registry }], + }), + runtime = f.contract.verification.runtimeInputs, + provider = f.nodes.find((node) => node.id === f.binding.roleNodes[runtime.role]); + assert.equal(f.parent.id, 'flux3-klein:text-to-image:prompt-preview-authoring:v1'); + assert.equal(provider.data.params[runtime.dtypeField].value, 'bfloat16'); + assert.equal(provider.data.params[runtime.quantizationField].value, 'bnb_4bit'); + assert.deepEqual(ids(run(f, 'explicit_preview').nodeIds), ids(Object.values(f.binding.roleNodes))); + provider.data.params[runtime.dtypeField].value = 'float32'; + provider.data.params[runtime.quantizationField].value = 'none'; + assert.throws(() => run(f, 'explicit_preview'), /declared input selection changed/u); +}); + +test('unclaimed graphs retain the original all-sinks export and leaf target semantics', () => { + const f = setup(); + delete f.owner.data.operationAuthoring; + const ordinary = run(f); + assert.equal(ordinary.purpose, undefined); + assert.equal(ordinary.targetNodeIds, undefined); + assert.deepEqual(ids(ordinary.nodeIds), Object.keys(api(f).nodes).sort()); + const selected = exporter.selectFlowGraphExecutionScope({ ...f, targetNodeId: f.target.nodeId }); + assert.deepEqual(ids(selected.nodes.map((n) => n.id)), ids(Object.values(f.binding.roleNodes))); + assert.throws(() => run(f, 'explicit_preview')); +}); +test('ordinary scope keeps unrelated sinks/shared source and does not require an optional draft to be ready', () => { + const f = setup(1), + unrelated = structuredClone(f.nodes[0]); + unrelated.id = 'unrelated'; + f.nodes.push(unrelated); + f.request.data.params[f.contract.bindings.request.promptField].value = 'unfinished different prompt'; + f.request.data.params[f.contract.initialValues[0][1]].value = 'standard'; + assert.ok(run(f).nodeIds.includes('unrelated')); + assert.throws(() => run(f, 'explicit_preview'), /authored input|input selection/u); +}); +for (const [name, change] of [ + [ + 'null claim', + (f) => { + f.owner.data.operationAuthoring.ancillaryBindings = null; + }, + ], + [ + 'stale child', + (f) => { + f.binding.contentHash = 'studio-ancillary-v1-00000000'; + }, + ], + [ + 'stale final parent', + (f) => { + f.binding.parent.authoringContentHash = 'studio-authoring-v1-00000000'; + }, + ], + [ + 'stale base', + (f) => { + f.binding.parent.baseSpecContentHash = 'studio-spec-v1-00000000'; + }, + ], + [ + 'missing role', + (f) => { + delete f.binding.roleNodes[Object.keys(f.binding.roleNodes)[0]]; + }, + ], + [ + 'foreign role', + (f) => { + f.binding.roleNodes.foreign = 'foreign'; + }, + ], + [ + 'wrong native action', + (f) => { + f.request.data.action = 'Foreign'; + }, + ], + [ + 'foreign holder', + (f) => { + const h = f.owner.data.operationAuthoring; + delete f.owner.data.operationAuthoring; + f.nodes[0].data.operationAuthoring = h; + }, + ], + [ + 'missing parent edge', + (f) => { + f.edges.shift(); + }, + ], + [ + 'missing child edge', + (f) => { + const i = f.edges.findIndex((e) => Object.values(f.binding.roleNodes).includes(e.source)); + f.edges.splice(i, 1); + }, + ], + [ + 'duplicate child edge', + (f) => { + const e = f.edges.find((e) => Object.values(f.binding.roleNodes).includes(e.source)); + f.edges.push({ ...e, id: 'duplicate' }); + }, + ], + [ + 'foreign child output', + (f) => { + f.edges.push({ + id: 'foreign', + source: f.target.nodeId, + sourceHandle: f.target.outputField, + target: f.owner.id, + targetHandle: f.contract.bindings.owner.promptField, + }); + }, + ], + [ + 'registered output type changed', + (f) => { + f.registry[`${f.request.data.module}.${f.request.data.action}`].params[f.target.outputField].type = 'object'; + }, + ], + [ + 'registered provider wire changed', + (f) => { + const e = f.contract.edges[0]; + const n = f.nodes.find((n) => n.id === f.binding.roleNodes[e[0]]); + f.registry[`${n.data.module}.${n.data.action}`].params[e[1]].type = 'foreign'; + }, + ], +]) + test(`scope refuses ${name}`, () => { + const f = setup(); + change(f); + assert.throws(() => run(f)); + }); +for (const [name, change] of [ + [ + 'missing target', + (f) => { + f.target = undefined; + }, + ], + [ + 'foreign target', + (f) => { + f.target = { ...f.target, nodeId: f.owner.id }; + }, + ], + [ + 'different output field', + (f) => { + f.target.outputField = 'result'; + }, + ], + [ + 'disabled role', + (f) => { + f.request.data.uiState = { disabled: true }; + }, + ], + [ + 'changed prompt', + (f) => { + f.request.data.params[f.contract.bindings.request.promptField].value = 'changed'; + }, + ], + [ + 'changed layout', + (f) => { + f.request.data.params[f.contract.bindings.request.layoutField].value = {}; + }, + ], + [ + 'changed initial selection', + (f) => { + const [role, field] = f.contract.initialValues[0]; + f.nodes.find((n) => n.id === f.binding.roleNodes[role]).data.params[field].value = 'standard'; + }, + ], + [ + 'connected authored prompt', + (f) => { + f.edges.push({ + id: 'external-prompt', + source: f.nodes[0].id, + sourceHandle: 'output', + target: f.owner.id, + targetHandle: f.contract.bindings.owner.promptField, + }); + }, + ], + [ + 'text-only injected media', + (f) => { + f.request.data.params[f.contract.bindings.request.imagesField].value = 'unbound.png'; + }, + ], +]) + test(`Preview refuses ${name}`, () => { + const f = setup(); + change(f); + assert.throws(() => run(f, 'explicit_preview')); + }); +test('no current declaration and duplicate claims refuse rather than downgrade', () => { + const f = setup(); + f.parents = []; + assert.throws(() => run(f)); + const g = setup(); + g.owner.data.operationAuthoring.ancillaryBindings.push(structuredClone(g.binding)); + assert.throws(() => run(g)); +}); +test('child role vocabulary is declaration-selected, not provider/proposal frontend behavior', () => { + const f = setup(), + rename = new Map(f.contract.roles.map(([role], i) => [role, `optional_${i}`])); + const c = f.contract; + c.roles.forEach((row) => { + row[0] = rename.get(row[0]); + }); + c.edges.forEach((row) => { + row[0] = rename.get(row[0]); + row[2] = rename.get(row[2]); + }); + c.initialValues.forEach((row) => { + row[0] = rename.get(row[0]); + }); + c.bindings.request.role = rename.get(c.bindings.request.role); + c.bindings.output.role = rename.get(c.bindings.output.role); + f.binding.roleNodes = Object.fromEntries( + Object.entries(f.binding.roleNodes).map(([role, id]) => [rename.get(role), id]), + ); + delete c.contentHash; + c.contentHash = `studio-ancillary-v1-${hashes.hashString(hashes.stableStringify(c))}`; + delete f.parent.contentHash; + f.parent.contentHash = `studio-authoring-v1-${hashes.hashString(hashes.stableStringify(f.parent))}`; + f.binding.contentHash = c.contentHash; + f.binding.parent.authoringContentHash = f.parent.contentHash; + assert.equal(run(f, 'explicit_preview').purpose.kind, 'explicit_preview'); +}); +test('real V2 effective leaves remap both maps and retain the same Preview closure after save/reinsert', () => { + const f = setup(1); + const graph = { + nodes: f.nodes.map((n) => ({ nodeId: n.id, nodeType: 'custom', data: n.data })), + edges: f.edges.map((e) => ({ + edgeId: e.id, + sourceNodeId: e.source, + sourcePortId: e.sourceHandle, + targetNodeId: e.target, + targetPortId: e.targetHandle, + })), + executionOrder: f.nodes.map((n) => n.id), + }; + graph.graphHash = schema.blockGraphHashV2(graph); + const definition = { + schemaVersion: 2, + definitionId: 'user:ancillary-source-fixture', + displayName: 'Optional operation fixture', + source: { kind: 'user' }, + graph, + boundary: { mode: 'explicit', inputs: [], outputs: [] }, + controls: [], + suggestedInputs: [], + previews: [], + ownership: { kind: 'user', definitionMutable: true }, + }; + definition.contentHash = schema.blockDefinitionContentHashV2(definition); + const instance = schema.createBlockInstanceV2(definition, { + instanceId: 'scope-block', + position: { x: 0, y: 0 }, + size: { width: 640, height: 480 }, + }); + const root = runtime.createBlockRootNodeV2(JSON.parse(JSON.stringify(instance))); + const effective = runtime.expandBlockGraphV2ForExecution([root], []); + const holder = effective.nodes.find((n) => n.data.operationAuthoring?.ancillaryBindings); + const b = holder.data.operationAuthoring.ancillaryBindings[0]; + assert.ok(Object.values(b.parentRoleNodes).every((id) => effective.nodes.some((n) => n.id === id))); + assert.ok(Object.values(b.roleNodes).every((id) => effective.nodes.some((n) => n.id === id))); + const target = { nodeId: b.roleNodes[f.contract.bindings.output.role], outputField: f.target.outputField }; + const result = select({ ...f, ...effective, target, kind: 'explicit_preview' }); + assert.deepEqual( + ids(result.nodeIds), + ids([...Object.values(b.roleNodes), b.parentRoleNodes[f.contract.bindings.owner.referenceSource.role]]), + ); + assert.deepEqual(root.data.blockInstanceV2, instance); +}); + +test('Preview refuses real loop ancestry while ordinary container ancestry remains valid', () => { + const f = setup(); + f.nodes.push({ id: 'iteration', type: 'loop', position: { x: 0, y: 0 }, data: { type: 'loop', params: {} } }); + f.request.parentId = 'iteration'; + assert.throws(() => run(f, 'explicit_preview'), /loop body/u); + f.nodes.find((n) => n.id === 'iteration').data.type = 'group'; + assert.doesNotThrow(() => run(f, 'explicit_preview')); +}); + +function withoutGenericParentFields(f) { + delete f.target; + const key = `${f.owner.data.module}.${f.owner.data.action}`; + for (const field of [f.contract.bindings.owner.promptField, f.contract.bindings.owner.layoutField]) + delete f.registry[key].params[field]; + return f; +} +test('fresh selected parent definitions cover wrapper inputs absent from generic registry without granting child fields', () => { + const f = withoutGenericParentFields(setup()); + assert.throws(() => select(f), /registered/iu); + const token = definitions.captureCurrentAncillaryParentDefinition(selectedStarter, f.binding, () => {}); + f.parents[0].definition = token; + assert.deepEqual(select(f).nodeIds.sort(), Object.values(f.binding.parentRoleNodes).sort()); + delete f.registry[`${f.request.data.module}.${f.request.data.action}`].params[ + f.contract.bindings.request.promptField + ]; + assert.throws(() => select(f), /registered/iu); +}); +test('saved or cloned definition contexts cannot replace a fresh selected response; explicit renewal recovers', () => { + const f = withoutGenericParentFields(setup()); + const token = definitions.captureCurrentAncillaryParentDefinition(selectedStarter, f.binding, () => {}); + for (const imported of [{}, structuredClone(token), JSON.parse(JSON.stringify(token))]) { + f.parents[0].definition = imported; + assert.throws(() => select(f), /context/iu); + } + f.parents[0].definition = definitions.captureCurrentAncillaryParentDefinition(selectedStarter, f.binding, () => {}); + assert.ok(select(f).nodeIds.length); +}); +test('current selected definition is bound to document epoch and exact parent instance role map', () => { + const f = withoutGenericParentFields(setup()); + let stale = false; + const token = definitions.captureCurrentAncillaryParentDefinition(selectedStarter, f.binding, () => { + if (stale) throw new Error('stale current document'); + }); + f.parents[0].definition = token; + stale = true; + assert.throws(() => select(f), /stale current document/iu); + stale = false; + const other = setup(); + other.binding.parentRoleNodes = Object.fromEntries( + Object.entries(other.binding.parentRoleNodes).map(([role, id]) => [role, `other-${id}`]), + ); + assert.throws(() => definitions.remapCurrentAncillaryParentDefinition(token, other.binding, f.binding), /remap/iu); + const changed = structuredClone(f.binding); + changed.parentRoleNodes.prompt = 'foreign-instance'; + f.binding.parentRoleNodes = changed.parentRoleNodes; + assert.throws(() => select(f), /context/iu); +}); +for (const [name, mutate] of [ + [ + 'pipeline', + (s) => { + s.pipelineClass = 'OtherPipeline'; + }, + ], + [ + 'task', + (s) => { + s.task = 'other_task'; + }, + ], + [ + 'recipe digest', + (s) => { + s.authoring.contentHash = 'studio-authoring-v1-00000000'; + }, + ], + [ + 'operation selector', + (s) => { + s.nodes[0].operation.task = 'other_task'; + }, + ], + [ + 'registered node identity', + (s) => { + s.nodes[0].node.action = 'Other'; + }, + ], +]) + test(`selected parent definition rejects wrong ${name}`, () => { + const f = setup(), + wrong = structuredClone(selectedStarter); + mutate(wrong); + assert.throws( + () => definitions.captureCurrentAncillaryParentDefinition(wrong, f.binding, () => {}), + /Invalid|differ|hash/iu, + ); + }); +test('native effective-leaf ID remapping preserves a fresh definition but refuses collisions', () => { + const f = withoutGenericParentFields(setup()), + original = structuredClone(f.binding); + const token = definitions.captureCurrentAncillaryParentDefinition(selectedStarter, original, () => {}); + const next = structuredClone(original); + next.parentRoleNodes = Object.fromEntries( + Object.entries(original.parentRoleNodes).map(([role, id]) => [role, `unpacked-${id}`]), + ); + const bad = structuredClone(next); + bad.parentRoleNodes.prompt = bad.parentRoleNodes.models; + assert.throws(() => definitions.remapCurrentAncillaryParentDefinition(token, original, bad), /collid/iu); + const remapped = definitions.remapCurrentAncillaryParentDefinition(token, original, next); + const ids = new Map( + Object.keys(original.parentRoleNodes).map((role) => [original.parentRoleNodes[role], next.parentRoleNodes[role]]), + ); + for (const node of f.nodes) node.id = ids.get(node.id) ?? node.id; + for (const edge of f.edges) { + edge.source = ids.get(edge.source) ?? edge.source; + edge.target = ids.get(edge.target) ?? edge.target; + } + f.binding.parentRoleNodes = next.parentRoleNodes; + f.parents[0].definition = remapped; + assert.deepEqual(select(f).nodeIds.sort(), Object.values(next.parentRoleNodes).sort()); +}); + +for (const [name, change] of [ + [ + 'profile', + (binding) => { + binding.parent.executionProfileId = 'wrong:profile'; + }, + ], + [ + 'spec digest', + (binding) => { + binding.parent.baseSpecContentHash = 'studio-spec-v1-00000000'; + }, + ], + [ + 'role vocabulary', + (binding) => { + delete binding.parentRoleNodes.prompt; + binding.parentRoleNodes.other = 'main-prompt'; + }, + ], + [ + 'colliding roles', + (binding) => { + binding.parentRoleNodes.prompt = binding.parentRoleNodes.models; + }, + ], +]) + test(`selected parent definition rejects wrong bound ${name}`, () => { + const f = setup(), + binding = structuredClone(f.binding); + change(binding); + assert.throws( + () => definitions.captureCurrentAncillaryParentDefinition(selectedStarter, binding, () => {}), + /Invalid|differ|collid|role/iu, + ); + }); +test('selected parent output direction cannot authorize an authored input', () => { + const f = withoutGenericParentFields(setup()), + wrong = structuredClone(selectedStarter); + const ownerKey = `${f.owner.data.module}.${f.owner.data.action}`; + wrong.nodes.find(({ operation }) => operation.nodeKey === ownerKey).node.params[ + f.contract.bindings.owner.promptField + ].display = 'output'; + f.parents[0].definition = definitions.captureCurrentAncillaryParentDefinition(wrong, f.binding, () => {}); + assert.throws(() => select(f), /registered/iu); +}); diff --git a/scripts/ancillary-operations.test.mjs b/scripts/ancillary-operations.test.mjs new file mode 100644 index 00000000..a69c466f --- /dev/null +++ b/scripts/ancillary-operations.test.mjs @@ -0,0 +1,432 @@ +import assert from 'node:assert/strict'; +import { readFileSync, mkdtempSync, rmSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import path from 'node:path'; +import { before, after, test } from 'node:test'; +import { createServer } from 'vite'; + +const ROOT = process.cwd(); +const cache = mkdtempSync(path.join(tmpdir(), 'modiff-ancillary-operations-')); +const fixture = JSON.parse(readFileSync(path.join(ROOT, 'tests/fixtures/ancillary-authoring.v1.json'), 'utf8')); +let server, api, parse, hashes, remap; +before(async () => { + server = await createServer({ + root: ROOT, + configFile: false, + cacheDir: cache, + logLevel: 'silent', + appType: 'custom', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + }); + api = await server.ssrLoadModule('/src/studio/ancillaryOperations.ts'); + ({ parseOperationAuthoringRecipe: parse } = await server.ssrLoadModule('/src/studio/operationAuthoringRecipe.ts')); + hashes = await server.ssrLoadModule('/src/studio/stableHash.ts'); + ({ remapOperationAuthoring: remap } = await server.ssrLoadModule('/src/workflow/operationSharedInputs.ts')); +}); +after(async () => { + await server?.close(); + rmSync(cache, { recursive: true, force: true }); +}); +const raw = (index = 0) => JSON.parse(fixture.parents[index].rawParentJson); +const authoredConstraint = JSON.parse( + readFileSync('tests/fixtures/authored-layout-constraint.v1.json', 'utf8'), +).contract; +function rehash(parent) { + for (const child of parent.ancillaryOperations ?? []) { + delete child.contentHash; + child.contentHash = `studio-ancillary-v1-${hashes.hashString(hashes.stableStringify(child))}`; + } + delete parent.contentHash; + parent.contentHash = `studio-authoring-v1-${hashes.hashString(hashes.stableStringify(parent))}`; + return parent; +} +function binding() { + const parent = raw(), + child = parent.ancillaryOperations[0]; + return { + contractId: child.id, + contentHash: child.contentHash, + parent: { ...child.parent, authoringContentHash: parent.contentHash }, + parentRoleNodes: Object.fromEntries(parent.roles.map(([role]) => [role, `main:${role}`])), + roleNodes: Object.fromEntries(child.roles.map(([role]) => [role, `aux:${role}`])), + }; +} +test('a constrained ancillary requires its hash-covered source contract and exact native operation', () => { + const captured = JSON.parse( + readFileSync('tests/fixtures/evaluation-prompt-enhancement-alternatives.v1.json', 'utf8'), + ); + const starter = captured.starters.find( + (row) => row.task === 'text_to_image' && row.authoring.ancillaryOperations[0].layoutPolicy, + ); + const parent = structuredClone(starter.authoring); + const child = parent.ancillaryOperations[0]; + child.layoutPolicy = authoredConstraint.layoutPolicy; + child.authoredLayoutConstraint = structuredClone(authoredConstraint); + child.initialValues.find( + ([role, field]) => + role === child.verification.requestInputs.role && field === child.verification.requestInputs.operationField, + )[2] = authoredConstraint.operation; + rehash(parent); + const context = { ...child.parent, parentRoles: parent.roles.map(([role]) => role) }; + assert.deepEqual(api.parseAncillaryOperations(parent.ancillaryOperations, context), parent.ancillaryOperations); + for (const mutate of [ + (item) => { + delete item.authoredLayoutConstraint; + }, + (item) => { + item.layoutPolicy = 'append-details-preserve-layout-v1'; + }, + (item) => { + item.authoredLayoutConstraint.revision = 'a'.repeat(40); + }, + (item) => { + item.authoredLayoutConstraint.transformersVersion = '0.0.0'; + }, + (item) => { + item.initialValues.find( + ([role, field]) => + role === item.verification.requestInputs.role && field === item.verification.requestInputs.operationField, + )[2] = 'enhance_prompt'; + }, + (item) => { + item.authoredLayoutConstraint.extra = true; + }, + ]) { + const changed = structuredClone(parent); + mutate(changed.ancillaryOperations[0]); + rehash(changed); + assert.throws(() => api.parseAncillaryOperations(changed.ancillaryOperations, context)); + } +}); + +test('constraint metadata stays bounded and cannot execute accessors or widen token/deadline scope', async () => { + const { parseAuthoredLayoutConstraint } = await server.ssrLoadModule('/src/studio/promptEnhancementConstraints.ts'); + assert.deepEqual(parseAuthoredLayoutConstraint(authoredConstraint), authoredConstraint); + for (const mutate of [ + (item) => { + item.limits.lookup_seconds = 3; + }, + (item) => { + item.limits.max_new_tokens = 3585; + }, + (item) => { + item.deadlineSeconds = 1801; + }, + (item) => { + item.preparationRamBytes = 268435457; + }, + (item) => { + delete item.sourcePreTokenizerSha256; + }, + (item) => { + item.effectivePreTokenizerSha256 = false; + }, + (item) => { + item.reservedAddedTokenIds[0] = 0; + }, + (item) => { + item.effectiveEosTokenIds[0] = 1; + }, + (item) => { + item.artifacts[0].path = '../tokenizer.json'; + }, + (item) => { + item.artifacts[0].byteSize = true; + }, + (item) => { + Object.defineProperty(item, 'limits', { enumerable: true, get: () => assert.fail('No getter may execute') }); + }, + (item) => { + Object.defineProperty(item.artifacts, '0', { enumerable: true, get: () => assert.fail('No getter may execute') }); + }, + ]) { + const bad = structuredClone(authoredConstraint); + mutate(bad); + assert.throws(() => parseAuthoredLayoutConstraint(bad), /constraint contract/); + } +}); +for (const [index, row] of fixture.parents.entries()) { + test(`actual captured parent ${index + 1} retains exact optional child/hash`, () => + assert.deepEqual(parse(raw(index), row.selection), raw(index))); + test(`absent child ${index + 1} retains the historical parent hash domain`, () => { + const parent = raw(index); + delete parent.ancillaryOperations; + rehash(parent); + assert.deepEqual(parse(parent, row.selection), parent); + assert.equal(Object.hasOwn(parse(parent, row.selection), 'ancillaryOperations'), false); + }); +} +for (const [name, mutate] of [ + [ + 'null claim', + (p) => { + p.ancillaryOperations = null; + }, + ], + [ + 'empty claim', + (p) => { + p.ancillaryOperations = []; + }, + ], + [ + 'too many children', + (p) => { + p.ancillaryOperations = Array(5).fill(p.ancillaryOperations[0]); + }, + ], + [ + 'unknown child key', + (p) => { + p.ancillaryOperations[0].extra = true; + }, + ], + [ + 'wrong parent task', + (p) => { + p.ancillaryOperations[0].parent.task = 'foreign'; + }, + ], + [ + 'wrong base identity', + (p) => { + p.ancillaryOperations[0].parent.baseSpecContentHash = 'studio-spec-v1-00000000'; + }, + ], + [ + 'unsupported purpose', + (p) => { + p.ancillaryOperations[0].executionPurpose = 'workflow'; + }, + ], + [ + 'source authority', + (p) => { + p.ancillaryOperations[0].sourceRegions = true; + }, + ], + [ + 'duplicate roles', + (p) => { + p.ancillaryOperations[0].roles.push(p.ancillaryOperations[0].roles[0]); + }, + ], + [ + 'foreign bound role', + (p) => { + p.ancillaryOperations[0].bindings.request.role = 'foreign'; + }, + ], + [ + 'identity initial value', + (p) => { + const c = p.ancillaryOperations[0]; + c.initialValues.push([c.roles[0][0], 'revision', 'a'.repeat(40)]); + }, + ], + [ + 'adapter digest', + (p) => { + p.ancillaryOperations[0].adapter.declarationSha256 = 'a'.repeat(64); + }, + ], + [ + 'cyclic edge', + (p) => { + const c = p.ancillaryOperations[0], + e = c.edges[0]; + c.edges.push([e[2], 'cycle', e[0], 'cycle']); + }, + ], + [ + 'duplicate input target', + (p) => { + const c = p.ancillaryOperations[0]; + c.edges.push(c.edges[0]); + }, + ], + [ + 'nonfinite position', + (p) => { + p.ancillaryOperations[0].roles[0][2] = Infinity; + }, + ], + [ + 'unpaired Unicode', + (p) => { + p.ancillaryOperations[0].initialValues[0][2] = '\ud800'; + }, + ], +]) + test(`closed metadata refuses ${name}`, () => { + const p = raw(); + mutate(p); + rehash(p); + assert.throws(() => parse(p, fixture.parents[0].selection)); + }); +test('stale child and parent hashes each refuse independently', () => { + const p = raw(); + p.ancillaryOperations[0].contentHash = 'studio-ancillary-v1-00000000'; + assert.throws(() => parse(p, fixture.parents[0].selection)); + const q = raw(); + q.contentHash = 'studio-authoring-v1-00000000'; + assert.throws(() => parse(q, fixture.parents[0].selection)); +}); +test('multiline nonidentity initial values remain exact finite JSON', () => { + const p = raw(), + c = p.ancillaryOperations[0]; + c.initialValues.push([c.roles[0][0], 'note', 'line one\nline two\tunchanged']); + rehash(p); + assert.deepEqual(parse(p, fixture.parents[0].selection), p); +}); +test('claims with accessors, symbols, inherited or hidden properties fail without executing code', () => { + for (const decorate of [ + (p) => + Object.defineProperty(p, 'ancillaryOperations', { + get() { + throw Error('getter executed'); + }, + enumerable: true, + }), + (p) => { + const value = p.ancillaryOperations; + delete p.ancillaryOperations; + Object.setPrototypeOf(p, { ancillaryOperations: value }); + }, + (p) => Object.defineProperty(p, 'ancillaryOperations', { value: p.ancillaryOperations, enumerable: false }), + (p) => { + p.ancillaryOperations[0][Symbol('foreign')] = true; + }, + ]) { + const p = raw(); + decorate(p); + assert.throws(() => parse(p, fixture.parents[0].selection)); + } +}); +test('both maps and archived draft hints remap through the existing graph ID function', () => { + const b = binding(), + hint = { schemaVersion: 1, ancillaryBindings: [b], customLabel: 'retained' }; + const value = { + ...hint, + inactiveDrafts: [ + { + nodes: [{ id: 'saved', parentId: 'container', data: { operationAuthoring: hint } }], + edges: [{ source: 'saved', target: 'peer' }], + }, + ], + }; + const result = remap(value, (id) => `copy/${id}`); + for (const map of ['parentRoleNodes', 'roleNodes']) { + const expected = Object.fromEntries(Object.entries(b[map]).map(([role, id]) => [role, `copy/${id}`])); + assert.deepEqual(result.ancillaryBindings[0][map], expected); + assert.deepEqual(result.inactiveDrafts[0].nodes[0].data.operationAuthoring.ancillaryBindings[0][map], expected); + } + assert.equal(result.customLabel, 'retained'); + assert.equal(result.inactiveDrafts[0].nodes[0].id, 'copy/saved'); + assert.deepEqual(value.ancillaryBindings[0], b); +}); +for (const [name, mutate] of [ + ['null', () => null], + ['empty', () => []], + ['duplicate contracts', (b) => [b, b]], + [ + 'colliding maps', + (b) => { + b.roleNodes[Object.keys(b.roleNodes)[0]] = Object.values(b.parentRoleNodes)[0]; + return [b]; + }, + ], + ['foreign field', (b) => [{ ...b, unknown: true }]], + ['malformed hash', (b) => [{ ...b, contentHash: 'bad' }]], + [ + 'oversized native identity', + (b) => { + b.roleNodes[Object.keys(b.roleNodes)[0]] = 'x'.repeat(513); + return [b]; + }, + ], +]) + test(`instance claim refuses ${name}`, () => + assert.throws(() => remap({ ancillaryBindings: mutate(binding()) }, (id) => id))); +test('malformed inherited/accessor binding claims cannot downgrade to legacy hints', () => { + const inherited = Object.create({ ancillaryBindings: [binding()] }); + assert.throws(() => api.ancillaryBindingsFromHint(inherited)); + assert.throws(() => + api.ancillaryBindingsFromHint( + Object.defineProperty({}, 'ancillaryBindings', { + enumerable: true, + get() { + throw Error('getter executed'); + }, + }), + ), + ); +}); +test('remapping collisions are refused; legacy hints without a claim stay unchanged', () => { + assert.throws(() => remap({ ancillaryBindings: [binding()] }, () => 'collision')); + const old = { + schemaVersion: 1, + defaults: { prompt: 'raw' }, + retained: [], + sharedInputs: [{ field: 'seed', loaderId: 'source', groupId: 'g', name: 'seed' }], + }; + assert.deepEqual( + remap(old, (id) => `copy/${id}`), + { ...old, sharedInputs: [{ ...old.sharedInputs[0], loaderId: 'copy/source' }] }, + ); +}); + +test('accessor array claims never execute and malformed array hints cannot downgrade', () => { + const parent = raw(), + children = parent.ancillaryOperations; + Object.defineProperty(children, '0', { + enumerable: true, + get() { + throw Error('getter executed'); + }, + }); + assert.throws(() => parse(parent, fixture.parents[0].selection), /data array members/u); + const hint = []; + hint.ancillaryBindings = [binding()]; + assert.throws(() => remap(hint, (id) => id), /object hint/u); +}); + +test('saved workflow hints do not eagerly load declaration or enhancement planners', async () => { + const boundary = await createServer({ + root: ROOT, + configFile: false, + logLevel: 'silent', + appType: 'custom', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + }); + try { + await boundary.ssrLoadModule('/src/workflow/operationAuthoringHint.ts'); + await boundary.ssrLoadModule('/src/workflow/operationSharedInputs.ts'); + const evaluated = [...boundary.moduleGraph.idToModuleMap.values()] + .filter((module) => module.ssrModule) + .map((module) => module.id?.replaceAll('\\', '/')); + for (const deferred of ['ancillaryOperations.ts', 'promptEnhancementAuthoring.ts']) { + assert.equal( + evaluated.some((id) => id?.endsWith(`/src/studio/${deferred}`)), + false, + deferred, + ); + } + const bindings = await boundary.ssrLoadModule('/src/studio/ancillaryBindings.ts'); + const declaration = await boundary.ssrLoadModule('/src/studio/ancillaryOperations.ts'); + for (const key of ['parseAncillaryBindings', 'ancillaryBindingsFromHint', 'invalidAncillary']) + assert.equal(declaration[key], bindings[key], `shared implementation: ${key}`); + const parent = await boundary.ssrLoadModule('/src/studio/promptEnhancementParent.ts'); + const planner = await boundary.ssrLoadModule('/src/studio/promptEnhancementAuthoring.ts'); + for (const key of [ + 'parsePromptEnhancementParent', + 'promptEnhancementParentFromHint', + 'remapPromptEnhancementParent', + ]) + assert.equal(planner[key], parent[key], `shared implementation: ${key}`); + } finally { + await boundary.close(); + } +}); diff --git a/scripts/ancillary-run-coordinator.test.mjs b/scripts/ancillary-run-coordinator.test.mjs new file mode 100644 index 00000000..25cc75b7 --- /dev/null +++ b/scripts/ancillary-run-coordinator.test.mjs @@ -0,0 +1,535 @@ +import assert from 'node:assert/strict'; +import { readFileSync, mkdtempSync, rmSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import path from 'node:path'; +import { before, after, beforeEach, test } from 'node:test'; +import { createServer } from 'vite'; + +const ROOT = process.cwd(); +const fixture = JSON.parse(readFileSync(path.join(ROOT, 'tests/fixtures/ancillary-authoring.v1.json'), 'utf8')); +const actual = JSON.parse(readFileSync(path.join(ROOT, 'tests/fixtures/ancillary-starter.v1.json'), 'utf8')); +const cache = mkdtempSync(path.join(tmpdir(), 'modiff-ancillary-coordinator-')); +let server, + flow, + studio, + nodesStore, + coordinator, + scopes, + transport, + preparation, + runtime, + schema, + originalFetch, + sent, + metadata, + reply; +before(async () => { + const storage = new Map(); + globalThis.localStorage = { + clear: () => storage.clear(), + getItem: (key) => storage.get(key) ?? null, + key: (index) => [...storage.keys()][index] ?? null, + get length() { + return storage.size; + }, + removeItem: (key) => storage.delete(key), + setItem: (key, value) => storage.set(key, String(value)), + }; + globalThis.window = { dispatchEvent: () => true, localStorage, location: { origin: 'http://127.0.0.1:5191' } }; + originalFetch = globalThis.fetch; + globalThis.fetch = async () => { + throw new Error('Network forbidden during module loading'); + }; + server = await createServer({ + root: ROOT, + cacheDir: cache, + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + ({ useFlowStore: flow } = await server.ssrLoadModule('/src/stores/useFlowStore.ts')); + ({ useStudioStore: studio } = await server.ssrLoadModule('/src/stores/useStudioStore.ts')); + ({ useNodesStore: nodesStore } = await server.ssrLoadModule('/src/stores/useNodeStore.ts')); + ({ coordinateGraphRun: coordinator } = await server.ssrLoadModule('/src/studio/runCoordinator.ts')); + scopes = await server.ssrLoadModule('/src/workflow/prepareExecutionScope.ts'); + transport = await server.ssrLoadModule('/src/utils/runGraph.ts'); + preparation = await server.ssrLoadModule('/src/studio/runPreparation.ts'); + runtime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); + schema = await server.ssrLoadModule('/src/studio/blockSchemaV2.ts'); +}); +beforeEach(() => { + studio.setState({ + form: { ...studio.getState().form, resourceMode: 'expert' }, + activeWorkflowTabId: 'source-unit-tab', + workflowCanvasHydrated: true, + workflowCanvasEpoch: 0, + workflowFormEpoch: 0, + activeTemplateId: null, + graphBinding: null, + workflowTabs: [], + currentRunContext: null, + outputs: [], + runContextsByClientRunId: {}, + runContextsByTaskId: {}, + }); + sent = []; + metadata = []; + reply = structuredClone(actual.response); + globalThis.fetch = async (url, init) => { + const endpoint = new URL(String(url)).pathname; + const body = JSON.parse(init.body); + if (endpoint === '/operations/starter') { + metadata.push(body); + assert.deepEqual({ ...body, repository: undefined }, { ...actual.selection, repository: undefined }); + if (body.repository) assert.equal(body.repository, actual.response.nodes[0].node.params.repo_id.value.value); + return new Response(JSON.stringify(reply), { status: 200, headers: { 'Content-Type': 'application/json' } }); + } + assert.equal(endpoint, '/graph', 'No server or external model traffic is permitted.'); + sent.push(body); + return new Response( + JSON.stringify({ + error: false, + message: 'Synthetic transport receipt only', + sid: 'unit', + task_id: `unit-task-${sent.length}`, + }), + { status: 200, headers: { 'Content-Type': 'application/json' } }, + ); + }; +}); +after(async () => { + globalThis.fetch = originalFetch; + await server?.close(); + delete globalThis.window; + delete globalThis.localStorage; + rmSync(cache, { recursive: true, force: true }); +}); +function setup(claim = true) { + const row = fixture.parents[0], + parent = JSON.parse(row.rawParentJson), + child = parent.ancillaryOperations[0]; + assert.deepEqual( + parent, + actual.response.authoring, + 'Actual source-produced starter and parent recipe must stay paired.', + ); + const binding = { + contractId: child.id, + contentHash: child.contentHash, + parent: { ...child.parent, authoringContentHash: parent.contentHash }, + parentRoleNodes: Object.fromEntries(parent.roles.map(([r]) => [r, `main-${r}`])), + roleNodes: Object.fromEntries(child.roles.map(([r]) => [r, `aux-${r}`])), + }; + const registry = { + ...structuredClone(row.registry), + ...Object.fromEntries( + actual.response.nodes.map(({ operation, node }) => [operation.nodeKey, structuredClone(node)]), + ), + }; + const nodes = [ + ...parent.roles.map((r) => [binding.parentRoleNodes, r]), + ...child.roles.map((r) => [binding.roleNodes, r]), + ].map(([map, [r, key, x, y]]) => ({ + id: map[r], + type: 'custom', + position: { x, y }, + data: structuredClone(registry[key]), + })); + for (const node of nodes) { + if (node.data.params.offload_mode) node.data.params.offload_mode.value = 'none'; + if (node.data.params.auto_offload) node.data.params.auto_offload.value = false; + } + if (claim) + nodes.find((n) => n.id === binding.parentRoleNodes[child.bindings.owner.role]).data.operationAuthoring = { + ancillaryBindings: [binding], + }; + const edges = [ + ...parent.edges.map((r) => [binding.parentRoleNodes, r]), + ...child.edges.map((r) => [binding.roleNodes, r]), + ].map(([map, [a, b, c, d]], index) => ({ + id: `e-${index}`, + source: map[a], + sourceHandle: b, + target: map[c], + targetHandle: d, + })); + for (const [role, name, value] of child.initialValues) + nodes.find((n) => n.id === binding.roleNodes[role]).data.params[name].value = structuredClone(value); + flow.setState({ nodes, edges }); + nodesStore.setState({ nodesRegistry: registry, operationContracts: actual.operationContracts }); + return { nodes, edges, parent, child, binding, target: binding.roleNodes[child.bindings.output.role] }; +} +test('claimed synchronous export refuses without a current declaration witness', () => { + setup(); + assert.throws(() => flow.getState().exportGraph('unit', undefined, { randomizeSeeds: false }), /scope|declaration/iu); + assert.equal(metadata.length, 0); +}); +test('runtime resource updates preserve ancillary claims without requesting execution authority', async () => { + const f = setup(); + const auto = await server.ssrLoadModule('/src/studio/workflowAutoExecutionV2.ts'); + const nodeId = f.binding.parentRoleNodes.models; + flow.getState().setParam(nodeId, 'device', 'cuda:0'); + const before = flow.getState().toObject(); + const historyLength = flow.getState().historyPast.length; + auto.applyRuntimeWorkflowAutoSettingsV2([ + { nodeId, field: 'offload_mode', previousValue: 'none', value: 'model_cpu' }, + { nodeId, field: 'auto_offload', previousValue: false, value: true }, + ]); + assert.equal(flow.getState().nodes.find((node) => node.id === nodeId).data.params.offload_mode.value, 'model_cpu'); + assert.throws( + () => + auto.applyRuntimeWorkflowAutoSettingsV2([ + { nodeId, field: 'offload_mode', previousValue: 'none', value: 'group_disk' }, + ]), + /newer workflow edits/u, + ); + assert.equal(metadata.length, 0); + assert.equal(sent.length, 0); + assert.equal(flow.getState().historyPast.length, historyLength + 1); + flow.getState().undo(); + const loader = flow.getState().nodes.find((node) => node.id === nodeId); + assert.equal(loader.data.params.offload_mode.value, 'none'); + assert.equal(loader.data.params.auto_offload.value, false); + assert.deepEqual( + flow.getState().nodes.map((node) => node.data.operationAuthoring), + before.nodes.map((node) => node.data.operationAuthoring), + ); + assert.throws(() => flow.getState().exportGraph('unit', undefined, { randomizeSeeds: false }), /scope|declaration/iu); +}); +test('actual coordinator ordinary submission excludes only declared branch and preserves durable document', async () => { + const f = setup(), + before = JSON.stringify(flow.getState().toObject()); + const result = await coordinator({ sid: 'unit' }); + assert.equal(JSON.stringify(flow.getState().toObject()), before); + assert.deepEqual(Object.keys(result.submittedGraph.nodes).sort(), Object.values(f.binding.parentRoleNodes).sort()); + assert.equal(result.submittedGraph.runtimeHints.executionPurpose.kind, 'workflow'); + assert.equal(result.submittedGraph.runtimeHints.resourceMode, 'expert'); + assert.equal(studio.getState().form.resourceMode, 'expert'); + assert.equal(metadata.length, 2); + assert.equal(sent.length, 1); +}); +test('queued claimed run uses the same declared ordinary scope', async () => { + const f = setup(), + result = await coordinator({ sid: 'unit', deferCanvasOwnership: true }); + assert.deepEqual(Object.keys(result.submittedGraph.nodes).sort(), Object.values(f.binding.parentRoleNodes).sort()); +}); +test('Preview is selected from actual declared output and does not run image owner', async () => { + const f = setup(); + const owner = f.nodes.find((node) => node.id === f.binding.parentRoleNodes[f.child.bindings.owner.role]); + const request = f.nodes.find((node) => node.id === f.binding.roleNodes[f.child.bindings.request.role]); + for (const [a, b] of [ + [f.child.bindings.owner.promptField, f.child.bindings.request.promptField], + [f.child.bindings.owner.layoutField, f.child.bindings.request.layoutField], + ]) + request.data.params[b].value = owner.data.params[a].value ?? owner.data.params[a].default ?? null; + const result = await coordinator({ + sid: 'unit', + previewTarget: { nodeId: f.target, outputField: f.child.bindings.output.field }, + }); + assert.deepEqual(Object.keys(result.submittedGraph.nodes).sort(), Object.values(f.binding.roleNodes).sort()); + assert.equal(result.submittedGraph.runtimeHints.executionPurpose.kind, 'explicit_preview'); + assert.equal(result.submittedGraph.runtimeHints.resourceMode, 'expert'); + assert.equal(studio.getState().form.resourceMode, 'expert'); +}); +for (const change of ['loops-empty', 'loops-foreign', 'purpose-kind', 'purpose-absent']) + test(`prepared graph cannot replace claimed ${change}`, async () => { + const f = setup(), + scope = await scopes.prepareExecutionScope(); + const prepared = flow.getState().exportGraph('unit', undefined, { executionScope: scope, randomizeSeeds: false }); + if (change === 'loops-empty') prepared.loops = []; + if (change === 'loops-foreign') prepared.loops = [{ id: 'foreign', bodyNodeIds: [f.target] }]; + if (change === 'purpose-kind') + prepared.runtimeHints.executionPurpose = { ...prepared.runtimeHints.executionPurpose, kind: 'explicit_preview' }; + if (change === 'purpose-absent') delete prepared.runtimeHints.executionPurpose; + await assert.rejects( + coordinator({ sid: 'unit', executionScope: scope, preparedGraph: prepared }), + /scope|loop|purpose/iu, + ); + assert.equal(sent.length, 0); + }); +test('unavailable private endpoint refuses before seeds, preparation, history or dispatch', async () => { + setup(); + const before = JSON.stringify(flow.getState().toObject()); + globalThis.fetch = async () => + new Response(JSON.stringify({ error: 'Unavailable private execution profile' }), { + status: 400, + headers: { 'Content-Type': 'application/json' }, + }); + await assert.rejects(coordinator({ sid: 'unit' }), /Unavailable|400|request/iu); + assert.equal(JSON.stringify(flow.getState().toObject()), before); + assert.equal(sent.length, 0); +}); +test('metadata cannot be used after a concurrent authored edit', async () => { + const f = setup(), + original = globalThis.fetch; + globalThis.fetch = async (...args) => { + const result = await original(...args); + flow + .getState() + .setParam( + f.binding.parentRoleNodes[f.child.bindings.owner.role], + f.child.bindings.owner.promptField, + 'new authored caption', + ); + return result; + }; + await assert.rejects(coordinator({ sid: 'unit' }), /changed/iu); + assert.equal(sent.length, 0); +}); +test('metadata cannot be used after a tab or resource-mode epoch changes', async () => { + setup(); + const original = globalThis.fetch; + globalThis.fetch = async (...args) => { + const result = await original(...args); + studio.setState({ workflowFormEpoch: 1 }); + return result; + }; + await assert.rejects(coordinator({ sid: 'unit' }), /changed/iu); + assert.equal(sent.length, 0); +}); +test('a changed selected registry cannot adopt an in-flight declaration response', async () => { + setup(); + const original = globalThis.fetch; + globalThis.fetch = async (...args) => { + const result = await original(...args); + const registry = structuredClone(nodesStore.getState().nodesRegistry); + registry[actual.response.nodes[0].operation.nodeKey].params.revision.label = 'new metadata'; + nodesStore.setState({ nodesRegistry: registry }); + return result; + }; + await assert.rejects(coordinator({ sid: 'unit' }), /metadata changed/iu); + assert.equal(sent.length, 0); +}); +test('serialized witness and stale literal revision refuse', async () => { + const f = setup(), + scope = await scopes.prepareExecutionScope(); + assert.throws( + () => flow.getState().exportGraph('unit', undefined, { executionScope: JSON.parse(JSON.stringify(scope)) }), + /scope/iu, + ); + const model = f.nodes.find((node) => node.id === f.binding.parentRoleNodes.models); + model.data.params.revision.value = '1'.repeat(40); + await assert.rejects(scopes.prepareExecutionScope(), /revision/iu); + assert.equal(sent.length, 0); +}); +test('node target cannot silently convert an image substage or child into Preview', async () => { + const f = setup(); + await assert.rejects( + coordinator({ sid: 'unit', targetNodeId: f.target }), + /Preview|parent|scope|executable output/iu, + ); + await assert.rejects(coordinator({ sid: 'unit', targetNodeId: f.binding.parentRoleNodes.models }), /parent|scope/iu); + assert.equal(sent.length, 0); +}); +test('forged low-level claimed API graph needs the same witness', async () => { + const f = setup(); + await assert.rejects( + transport.runGraph('unit', undefined, { + sid: 'unit', + nodes: {}, + paths: [], + runtimeHints: { executionPurpose: { schemaVersion: 1, kind: 'workflow', bindings: [f.binding], target: null } }, + }), + /scope/iu, + ); +}); +test('unclaimed all-sinks, explicit leaf and Queue retain old export behavior without metadata', async () => { + const f = setup(false); + const all = await coordinator({ sid: 'unit' }); + assert.deepEqual(Object.keys(all.submittedGraph.nodes).sort(), f.nodes.map((n) => n.id).sort()); + const leaf = await coordinator({ sid: 'unit', targetNodeId: f.target }); + assert.deepEqual(Object.keys(leaf.submittedGraph.nodes).sort(), Object.values(f.binding.roleNodes).sort()); + const queue = await coordinator({ sid: 'unit', deferCanvasOwnership: true }); + assert.deepEqual(Object.keys(queue.submittedGraph.nodes).sort(), f.nodes.map((n) => n.id).sort()); + assert.equal(metadata.length, 0); +}); +test('run-input identity includes claimed loops/purpose but leaves old graph hash domain unchanged', async () => { + setup(); + const scope = await scopes.prepareExecutionScope(); + const graph = flow.getState().exportGraph('unit', undefined, { executionScope: scope, randomizeSeeds: false }); + const hash = preparation.getStudioRunInputHash(studio.getState().form, graph); + assert.notEqual(hash, preparation.getStudioRunInputHash(studio.getState().form, { ...graph, loops: [] })); + const old = { ...graph, runtimeHints: undefined }; + assert.equal( + preparation.getStudioRunInputHash(studio.getState().form, old), + preparation.getStudioRunInputHash(studio.getState().form, { ...old, loops: [] }), + ); +}); + +test('actual native Block leaves keep both remapped role maps across ordinary Block Run and portable reinsertion', async () => { + const f = setup(); + const graph = { + nodes: f.nodes.map((n) => ({ nodeId: n.id, nodeType: 'custom', data: n.data })), + edges: f.edges.map((e) => ({ + edgeId: e.id, + sourceNodeId: e.source, + sourcePortId: e.sourceHandle, + targetNodeId: e.target, + targetPortId: e.targetHandle, + })), + executionOrder: f.nodes.map((n) => n.id), + }; + graph.graphHash = schema.blockGraphHashV2(graph); + const definition = { + schemaVersion: 2, + definitionId: 'user:ancillary-coordinator-fixture', + displayName: 'Optional operation fixture', + source: { kind: 'user' }, + graph, + boundary: { mode: 'explicit', inputs: [], outputs: [] }, + controls: [], + suggestedInputs: [], + previews: [], + ownership: { kind: 'user', definitionMutable: true }, + }; + definition.contentHash = schema.blockDefinitionContentHashV2(definition); + const instance = schema.createBlockInstanceV2(definition, { + instanceId: 'scope-block', + position: { x: 0, y: 0 }, + size: { width: 640, height: 480 }, + }); + const root = runtime.createBlockRootNodeV2(JSON.parse(JSON.stringify(instance))); + flow.setState({ nodes: [root], edges: [] }); + const before = JSON.stringify(flow.getState().toObject()); + const result = await coordinator({ sid: 'unit', targetNodeId: root.id }); + assert.deepEqual( + Object.keys(result.submittedGraph.nodes).sort(), + Object.values(f.binding.parentRoleNodes) + .map((id) => runtime.blockProjectionNodeIdV2(root.id, id)) + .sort(), + ); + assert.equal(JSON.stringify(flow.getState().toObject()), before); + const saved = JSON.parse(JSON.stringify(flow.getState().toObject())); + flow.setState(saved); + const repeated = await coordinator({ sid: 'unit' }); + assert.deepEqual(repeated.submittedGraph.nodes, result.submittedGraph.nodes); + assert.deepEqual( + repeated.submittedGraph.runtimeHints.executionPurpose, + result.submittedGraph.runtimeHints.executionPurpose, + ); +}); + +test('ordinary scope retains an unrelated sink and real lowered loop plan with exact purpose', async () => { + const f = setup(); + const loop = { + id: 'loop-container', + type: 'loop', + position: { x: 0, y: 0 }, + data: { type: 'loop', module: '', action: '', params: { iterations: { value: 2 }, max_iterations: { value: 4 } } }, + }; + const index = { + id: 'loop-index', + type: 'custom', + parentId: loop.id, + position: { x: 0, y: 0 }, + data: { + module: 'modules.WorkflowControl', + action: 'LoopIndex', + type: 'custom', + params: { index: { display: 'output' }, index_value: { value: 0 }, iteration_count: { value: 1 } }, + }, + }; + const result = { + id: 'loop-result', + type: 'custom', + parentId: loop.id, + position: { x: 0, y: 0 }, + data: { + module: 'modules.WorkflowControl', + action: 'LoopResult', + type: 'custom', + params: { + value_input: { display: 'input' }, + stop_input: { display: 'input', value: false }, + value: { display: 'output' }, + collection: { display: 'output' }, + }, + }, + }; + f.nodes.push(loop, index, result); + f.edges.push({ + id: 'loop-edge', + source: index.id, + sourceHandle: 'index', + target: result.id, + targetHandle: 'value_input', + }); + flow.setState({ nodes: f.nodes, edges: f.edges }); + const run = await coordinator({ sid: 'unit' }); + assert.deepEqual(run.submittedGraph.loops[0].bodyNodeIds.sort(), [index.id, result.id].sort()); + assert.equal(run.submittedGraph.loops[0].iterations, 2); + assert.equal(run.submittedGraph.runtimeHints.executionPurpose.kind, 'workflow'); + assert.ok(!Object.keys(run.submittedGraph.nodes).includes(f.target)); + assert.ok(Object.values(f.binding.parentRoleNodes).every((id) => run.submittedGraph.nodes[id])); +}); + +test('claimed workflow Auto receives exact purpose and retains it without switching Expert', async () => { + setup(); + studio.setState({ form: { ...studio.getState().form, resourceMode: 'auto' } }); + const original = globalThis.fetch, + plans = []; + globalThis.fetch = async (url, init) => { + if (new URL(String(url)).pathname !== '/auto_resource/workflow') return original(url, init); + const body = JSON.parse(init.body); + plans.push(body); + return new Response( + JSON.stringify({ + schemaVersion: 1, + graphHash: `sha256:workflow-auto-v1:${'1'.repeat(64)}`, + plannedGraphHash: `sha256:workflow-auto-v1:${'2'.repeat(64)}`, + canAutoRun: true, + issues: [], + message: 'Synthetic planner transport only; no runtime qualification.', + patches: [], + loaders: [], + requirements: {}, + available: {}, + sharedMemory: false, + }), + { status: 200, headers: { 'Content-Type': 'application/json' } }, + ); + }; + const result = await coordinator({ sid: 'unit' }); + assert.equal(plans.length, 1); + assert.deepEqual(plans[0].graph.runtimeHints.executionPurpose, result.submittedGraph.runtimeHints.executionPurpose); + assert.equal(studio.getState().form.resourceMode, 'auto'); + assert.ok(result.submittedGraph.runtimeHints.workflowAutoPlan); +}); + +test('Auto refusal cannot become an Expert submission or erase the purpose', async () => { + setup(); + studio.setState({ form: { ...studio.getState().form, resourceMode: 'auto' } }); + const original = globalThis.fetch; + globalThis.fetch = async (url, init) => + new URL(String(url)).pathname === '/auto_resource/workflow' + ? new Response(JSON.stringify({ error: 'No reviewed recipe for optional operation' }), { + status: 400, + headers: { 'Content-Type': 'application/json' }, + }) + : original(url, init); + await assert.rejects(coordinator({ sid: 'unit' }), /reviewed recipe/iu); + assert.equal(sent.length, 0); + assert.equal(studio.getState().form.resourceMode, 'auto'); +}); + +test('normal selected starter fields remain current without generic registry wrapper fields after portable reload', async () => { + const f = setup(); + const key = f.parent.roles.find(([role]) => role === f.child.bindings.owner.role)[1]; + const nextRegistry = structuredClone(nodesStore.getState().nodesRegistry); + delete nextRegistry[key].params[f.child.bindings.owner.promptField]; + delete nextRegistry[key].params[f.child.bindings.owner.layoutField]; + nodesStore.setState({ nodesRegistry: nextRegistry }); + const portable = JSON.parse(JSON.stringify(flow.getState().toObject())); + flow.setState(portable); + assert.throws(() => flow.getState().exportGraph('unit'), /scope|declaration/iu); + const result = await coordinator({ sid: 'unit' }); + assert.equal(result.submittedGraph.runtimeHints.resourceMode, 'expert'); + assert.deepEqual(Object.keys(result.submittedGraph.nodes).sort(), Object.values(f.binding.parentRoleNodes).sort()); + assert.deepEqual( + nodesStore.getState().nodesRegistry, + nextRegistry, + 'Selected schema is never merged into the global registry.', + ); +}); diff --git a/scripts/applied-adapter-provenance.mjs b/scripts/applied-adapter-provenance.mjs new file mode 100644 index 00000000..9362a413 --- /dev/null +++ b/scripts/applied-adapter-provenance.mjs @@ -0,0 +1,324 @@ +// Optional native observations, never style, hardware or publication approval. +import assert from 'node:assert/strict'; +import { canonicalJsonHash } from './canonical-json.mjs'; + +const same = (left, right, label) => assert.equal(canonicalJsonHash(left), canonicalJsonHash(right), label); +const keys = (value, expected) => { + assert.ok(value && typeof value === 'object' && !Array.isArray(value), 'Adapter evidence must be an object.'); + assert.deepEqual(Object.keys(value).sort(), [...expected].sort(), 'Unknown or missing adapter evidence fields.'); +}; +const text = (value, maximum) => + typeof value === 'string' && + value.length > 0 && + [...value].length <= maximum && + value === value.trim() && + !/[\u0000-\u001f]/u.test(value); +const sha = (value) => typeof value === 'string' && /^[a-f0-9]{64}$/u.test(value); + +/** The stable artifact projection is shared by native state and resource evidence. */ +export function validateAppliedAdapterItems(adapters) { + assert.ok(Array.isArray(adapters) && adapters.length <= 32); + const names = new Set(); + for (const item of adapters) { + keys(item, ['adapterName', 'scale', 'descriptorSha256', 'artifact', 'scheduler']); + assert.ok( + text(item.adapterName, 128) && + /^[A-Za-z0-9_-][A-Za-z0-9_.-]*$/u.test(item.adapterName) && + !names.has(item.adapterName), + 'Adapter names must be bounded identifiers and unique.', + ); + names.add(item.adapterName); + assert.ok(typeof item.scale === 'number' && Number.isFinite(item.scale) && item.scale >= -20 && item.scale <= 20); + assert.ok(sha(item.descriptorSha256)); + const artifact = item.artifact; + keys(artifact, [ + 'source', + 'weightName', + 'sha256', + ...(artifact?.source === 'hub' ? ['repository', 'revision'] : []), + ]); + assert.ok(artifact.source === 'hub' || artifact.source === 'local'); + assert.ok( + text(artifact.weightName, 256) && + !/[\\:]/u.test(artifact.weightName) && + artifact.weightName.endsWith('.safetensors') && + artifact.weightName.split('/').length <= 64 && + artifact.weightName.split('/').every((part) => part && part !== '.' && part !== '..'), + ); + assert.ok(sha(artifact.sha256)); + if (artifact.source === 'hub') { + assert.ok( + text(artifact.repository, 256) && + artifact.repository.split('/').length === 2 && + artifact.repository.split('/').every((part) => part.length <= 96 && /^\w(?:[\w.-]*\w)?$/u.test(part)) && + !artifact.repository.includes('--') && + !artifact.repository.includes('..') && + !artifact.repository.endsWith('.git'), + ); + assert.match(artifact.revision, /^[a-f0-9]{40}$/u); + } + if (item.scheduler !== null) { + keys(item.scheduler, ['className', 'configSha256']); + assert.ok(text(item.scheduler.className, 128) && /^[A-Za-z_][A-Za-z0-9_]*$/u.test(item.scheduler.className)); + assert.match(item.scheduler.configSha256, /^sha256:[a-f0-9]{64}$/u); + } + } + assert.ok(Buffer.byteLength(JSON.stringify({ adapters }), 'utf8') <= 32_768); + return adapters; +} + +export function validateAppliedAdapterSection(section) { + assert.equal(section?.schemaVersion, 1); + if (section.status !== 'complete') { + keys(section, ['schemaVersion', 'status', 'reason']); + assert.ok( + typeof section.reason === 'string' && + (section.status === 'truncated' + ? section.reason === 'record-size-limit' + : section.status === 'unavailable' && + ['unobserved-application', 'owner-invalidated', 'unsupported-owner', 'unsupported-projection'].includes( + section.reason, + )), + 'Unknown adapter availability state.', + ); + return section; + } + keys(section, ['schemaVersion', 'status', 'source', 'applicationId', 'observation', 'adapters', 'stateSha256']); + assert.equal(section.source, 'backend-adapter-application'); + assert.match(section.applicationId, /^[a-f0-9]{32}$/u); + assert.ok(['activated', 'reused'].includes(section.observation)); + validateAppliedAdapterItems(section.adapters); + assert.equal( + section.stateSha256, + `sha256:applied-adapters-v1:${canonicalJsonHash({ adapters: section.adapters })}`, + 'Applied adapter state digest differs.', + ); + return section; +} + +const literal = (node, name) => { + const parameter = node.params?.[name]; + assert.ok( + parameter && Object.hasOwn(parameter, 'value') && !parameter.sourceId && !parameter.sourceKey, + `Adapter control is not an exact literal: ${name}.`, + ); + return parameter.value; +}; + +function scaleLiteral(node) { + const value = literal(node, 'scale'); + // Historical numeric controls submit decimal text. Match the backend's + // finite float semantics only here; keep the graph and its identity unchanged. + const decimal = + typeof value === 'string' && value.length <= 64 && /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/u.test(value); + assert.ok(typeof value === 'number' || decimal, 'Adapter scale must be numeric or bounded decimal text.'); + const number = Number(value); + assert.ok(Number.isFinite(number) && number >= -20 && number <= 20, 'Adapter scale is outside its finite bounds.'); + return number; +} + +function orderedChain(graph, owner) { + const byId = new Map(graph.nodes.map((node) => [node.key, node])); + const executed = new Set(graph.paths.flat()); + const source = owner.params?.lora_list; + if (!source?.sourceId) { + assert.ok( + !source || source.value == null || (Array.isArray(source.value) && source.value.length === 0), + 'Opaque adapter list is unsupported.', + ); + return []; + } + assert.equal(source.sourceKey, 'lora'); + assert.ok(!Object.hasOwn(source, 'value') || source.value === undefined); + const chain = []; + let id = source.sourceId; + while (id) { + assert.ok(chain.length < 32 && !chain.some((node) => node.key === id), 'Adapter chain is cyclic or oversized.'); + const node = byId.get(id); + assert.ok( + node && executed.has(id) && node.module === 'modules.ModularDiffusers' && node.action === 'Lora', + 'Adapter source is not an executed native Lora node.', + ); + chain.push(node); + const previous = node.params?.previous_loras; + if (previous?.sourceId) { + assert.equal(previous.sourceKey, 'lora'); + assert.ok(!Object.hasOwn(previous, 'value') || previous.value === undefined); + id = previous.sourceId; + } else { + assert.ok(!previous || previous.value == null, 'Opaque predecessor is unsupported.'); + id = null; + } + } + return chain.reverse(); +} + +function verifyOwnerOrder(graph, owner, application, models, strict) { + // Optional observations authenticate native state without newly imposing a + // literal Hub-chain requirement on ordinary historical qualification paths. + if (!strict) return; + const chain = orderedChain(graph, owner); + if (application.status !== 'complete') { + assert.ok(!strict, 'Applied adapter order is unavailable.'); + return; + } + assert.equal(application.adapters.length, chain.length, 'Applied adapter count differs from the executed chain.'); + const chainKeys = [...chain.map((node) => node.key), owner.key]; + assert.ok( + graph.paths.some((path) => + chainKeys.every( + (key, index) => path.includes(key) && (index === 0 || path.indexOf(chainKeys[index - 1]) < path.indexOf(key)), + ), + ), + 'Adapter producers were not executed before their owner.', + ); + for (let index = 0; index < chain.length; index++) { + const node = chain[index], + applied = application.adapters[index]; + const name = literal(node, 'adapter_name'); + assert.ok(text(name, 128), 'Generated adapter names need a separate original-name join.'); + assert.equal(applied.adapterName, name, 'Applied adapter order/name differs.'); + assert.equal(applied.scale, scaleLiteral(node), 'Applied adapter scale differs.'); + const selected = literal(node, 'model'); + assert.ok(selected?.source === 'hub', 'Applied artifact proof currently requires a pinned Hub adapter.'); + same( + applied.artifact, + { + source: 'hub', + repository: selected.value, + revision: literal(node, 'revision'), + weightName: literal(node, 'weight_name'), + sha256: literal(node, 'expected_sha256'), + }, + 'Applied adapter artifact differs.', + ); + assert.ok( + models.some( + (item) => + item.repoId === applied.artifact.repository && + item.selectedRevision === applied.artifact.revision && + item.modelRevision === `${item.repoId}@${item.selectedRevision}`, + ), + 'Applied adapter is missing its installed immutable model observation.', + ); + const schedulerClass = literal(node, 'scheduler_class'); + if (schedulerClass === '') assert.equal(applied.scheduler, null, 'An unrequested adapter scheduler was applied.'); + else { + assert.equal(applied.scheduler?.className, schedulerClass); + assert.ok(!strict, 'Explicit scheduler normalization is outside the initial applied-order proof scope.'); + } + } +} + +export function validateAppliedAdapterProof(provenance, { required = false } = {}) { + const proof = provenance?.adapterApplications; + if (proof === undefined) { + assert.equal(provenance?.adapterApplicationsHash, undefined, 'Adapter proof hash has no observation.'); + assert.ok(!required, 'Original applied adapter order evidence is required.'); + return null; + } + keys(proof, ['schemaVersion', 'source', 'taskId', 'attemptIndex', 'outputNodeKey', 'truncated', 'owners']); + assert.equal(proof.schemaVersion, 1); + assert.equal(proof.source, 'backend-execution'); + assert.equal(proof.taskId, provenance.taskId); + assert.ok( + typeof proof.taskId === 'string' && + proof.taskId.length > 0 && + Number.isSafeInteger(proof.attemptIndex) && + proof.attemptIndex >= 0, + ); + assert.ok(typeof proof.truncated === 'boolean' && Array.isArray(proof.owners) && proof.owners.length <= 256); + assert.equal( + provenance.adapterApplicationsHash, + `sha256:adapter-applications-v1:${canonicalJsonHash(proof)}`, + 'Adapter proof digest differs.', + ); + const graph = provenance.graph.canonicalGraph; + const executed = new Set(graph.paths.flat()); + assert.ok(executed.has(proof.outputNodeKey), 'Adapter proof output was not executed.'); + const nodes = new Map(graph.nodes.map((node) => [node.key, node])); + const ancestors = new Set(); + const pending = [proof.outputNodeKey]; + while (pending.length) { + const key = pending.pop(); + if (ancestors.has(key)) continue; + assert.ok(nodes.has(key) && ancestors.size < 256, 'Adapter output ancestry is missing or oversized.'); + ancestors.add(key); + for (const parameter of Object.values(nodes.get(key).params ?? {})) { + if (parameter.sourceId) pending.push(parameter.sourceId); + } + } + const expectedOwners = graph.nodes.filter( + (node) => executed.has(node.key) && node.module === 'modules.ModularDiffusers' && node.action === 'ModelsLoader', + ); + const seen = new Set(); + for (const item of proof.owners) { + keys(item, ['nodeKey', 'application']); + const owner = expectedOwners.find((node) => node.key === item.nodeKey); + assert.ok( + owner && ancestors.has(item.nodeKey) && !seen.has(item.nodeKey), + 'Applied adapter owner is missing, detached or duplicated.', + ); + seen.add(item.nodeKey); + validateAppliedAdapterSection(item.application); + verifyOwnerOrder(graph, owner, item.application, provenance.models.items, required); + } + if (required) { + assert.equal(proof.truncated, false, 'Applied adapter ancestry is incomplete.'); + assert.ok( + expectedOwners.length > 0 && proof.owners.length === expectedOwners.length, + 'Applied adapter owners are incomplete.', + ); + } + return proof; +} + +export function createAppliedAdapterProof({ apiGraph, canonicalGraph, executedOutput, executionReceipt, taskId }) { + const consumed = executedOutput?.resolvedExecutionInputs; + if ( + consumed?.appliedAdaptersStatus === undefined && + !consumed?.nodes?.some((row) => row.appliedAdapters !== undefined) + ) + return null; + assert.equal(consumed.schemaVersion, 1, 'Applied adapter native receipt version is unsupported.'); + assert.equal(consumed.source, 'backend-execution'); + assert.equal(consumed.taskId, taskId); + assert.equal(executedOutput.taskId, taskId); + assert.equal(executionReceipt?.task_id, taskId, 'Applied adapter evidence requires the original task identity.'); + assert.equal(executionReceipt.status, 'completed'); + assert.equal(consumed.attemptIndex, executionReceipt.attempt_index); + assert.equal(consumed.attemptIndex, executedOutput.attemptIndex); + assert.equal(consumed.nodeId, executedOutput.nodeId); + same(apiGraph, executedOutput.apiGraphSnapshot, 'Applied adapter graph differs from the original output snapshot.'); + keys(consumed.appliedAdaptersStatus, ['schemaVersion', 'truncated']); + assert.equal(consumed.appliedAdaptersStatus.schemaVersion, 1); + assert.equal(typeof consumed.appliedAdaptersStatus.truncated, 'boolean'); + assert.equal(typeof consumed.truncated, 'boolean'); + assert.ok(Array.isArray(consumed.nodes) && consumed.nodes.length <= 256 && Array.isArray(consumed.uncapturedNodeIds)); + // Canonicalization preserves executed path order. Match that existing order; + // never rewrite the native receipt or manufacture an input/output graph. + const ids = [...new Set(apiGraph.paths.flat())]; + const canonicalIds = [...new Set(canonicalGraph.paths.flat())]; + assert.equal(ids.length, canonicalIds.length); + const idMap = new Map(ids.map((id, index) => [id, canonicalIds[index]])); + const owners = consumed.nodes + .filter((row) => row.appliedAdapters !== undefined) + .map((row) => { + assert.equal(row.module, 'modules.ModularDiffusers'); + assert.equal(row.action, 'ModelsLoader'); + assert.equal(apiGraph.nodes[row.nodeId]?.module, row.module); + assert.equal(apiGraph.nodes[row.nodeId]?.action, row.action); + assert.ok(idMap.has(row.nodeId), 'Adapter owner is outside executed ancestry.'); + return { nodeKey: idMap.get(row.nodeId), application: validateAppliedAdapterSection(row.appliedAdapters) }; + }); + const proof = { + schemaVersion: 1, + source: 'backend-execution', + taskId, + attemptIndex: consumed.attemptIndex, + outputNodeKey: idMap.get(consumed.nodeId), + truncated: consumed.truncated || consumed.uncapturedNodeIds.length > 0 || consumed.appliedAdaptersStatus.truncated, + owners, + }; + return { proof, hash: `sha256:adapter-applications-v1:${canonicalJsonHash(proof)}` }; +} diff --git a/scripts/audio-authoring.test.mjs b/scripts/audio-authoring.test.mjs new file mode 100644 index 00000000..a4cbb695 --- /dev/null +++ b/scripts/audio-authoring.test.mjs @@ -0,0 +1,1165 @@ +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; +import { captureAudioSchemaFixture } from './audio-schema-fixture.mjs'; +import { canonicalGraphIdentity } from './live-proof-provenance.mjs'; +import path from 'node:path'; +import { after, before, test } from 'node:test'; +import { fileURLToPath } from 'node:url'; +import { createServer } from 'vite'; + +const here = path.dirname(fileURLToPath(import.meta.url)); +const root = process.cwd(); +let fixture; +let server, + nodes, + contracts, + catalog, + authoring, + starters, + groups, + adapters, + policies, + templates, + builder, + exactness, + defaults, + authority, + projection, + presentation, + exporter, + requiredInputs; +before(async () => { + fixture = captureAudioSchemaFixture(); + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, value), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { dispatchEvent: () => true, location: { origin: 'http://127.0.0.1:5191' }, localStorage }; + server = await createServer({ + root, + configFile: false, + logLevel: 'silent', + cacheDir: path.join(here, 'vite-cache', 'authority'), + optimizeDeps: { noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + nodes = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); + contracts = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + catalog = await server.ssrLoadModule('/src/workflow/operationCatalog.ts'); + authoring = await server.ssrLoadModule('/src/workflow/operationAuthoring.ts'); + starters = await server.ssrLoadModule('/src/workflow/operationStarterRequest.ts'); + groups = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + adapters = await server.ssrLoadModule('/src/workflow/modelSetupAdapters.ts'); + policies = await server.ssrLoadModule('/src/studio/optionalRuntimes.ts'); + ({ STUDIO_TEMPLATES: templates } = await server.ssrLoadModule('/src/studio/templates.ts')); + builder = await server.ssrLoadModule('/src/studio/templateOperationWorkflow.ts'); + exactness = await server.ssrLoadModule('/src/studio/templateExactness.ts'); + ({ DEFAULT_STUDIO_FORM: defaults } = await server.ssrLoadModule('/src/studio/modelProfiles.ts')); + projection = await server.ssrLoadModule('/src/workflow/visualOperationGroupProjection.ts'); + presentation = await server.ssrLoadModule('/src/workflow/encodingNodePresentation.ts'); + exporter = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + requiredInputs = await server.ssrLoadModule('/src/studio/requiredGraphInputs.ts'); + const publicPayload = fixture.publicPayload; + const parsed = nodes.parseStudioModelCapabilities(publicPayload); + const operationContracts = contracts.parseOperationContracts( + publicPayload.operationContracts, + publicPayload.operationContractSchemaVersion, + ); + authority = { + nodesRegistry: fixture.registry, + studioModelCapabilities: parsed.capabilities, + studioModelCapabilitiesAuthoritative: true, + studioExecutionSpecInvalid: false, + operationContracts, + pipelineSupport: catalog.parsePipelineSupport( + publicPayload.pipelineSupport, + publicPayload.pipelineSupportSchemaVersion, + operationContracts, + ), + discoveryRequests: { nodes: { status: 'success' }, capabilities: { status: 'success' } }, + }; +}); +after(async () => server?.close()); + +test('fresh lyric composite keeps its branch brief and authored attention through save and reopen', async () => { + const lifecycle = await server.ssrLoadModule('/src/studio/templateWorkflow.ts'); + const studioModule = await server.ssrLoadModule('/src/stores/useStudioStore.ts'); + const studio = studioModule.useStudioStore; + const flow = exporter.useFlowStore; + const registry = nodes.useNodesStore; + const previous = [studio.getState(), flow.getState(), registry.getState()]; + const originalFetch = globalThis.fetch; + try { + const template = templates.find((item) => item.id === 'ace_step_lyric_music_video'); + const originalTemplate = structuredClone(template); + assert.ok(template.executionSelection, 'fresh composites need the ordinary backend-owned audio recipe'); + const row = fixture.recipes.find((item) => item.id === 'ace:ACE-Step:text_to_audio'); + const historicalSpec = structuredClone(row.spec); + const tabId = studio.getState().createWorkflowTab(template.label, undefined, 'template', template.id); + studio.getState().applyTemplate(template); + studio.getState().updateForm({ device: 'cpu:0', offloadMode: 'none', autoOffload: false }); + registry.setState(authority); + globalThis.fetch = async (url, init) => { + assert.match(String(url), /operations\/starter/); + const selection = JSON.parse(init.body); + const selected = [row, fixture.secondaryVideo].find( + (item) => item.starter.pipelineClass === selection.pipelineClass && item.starter.task === selection.task, + ); + assert.ok(selected, `Unexpected secondary recipe: ${JSON.stringify(selection)}`); + return Response.json(selected.starter); + }; + const form = structuredClone(studio.getState().form); + assert.notEqual(form.prompt, template.workflowBlockSettings.lyricVideo.audio.prompt); + await lifecycle.createTemplateOperationWorkflow(template, form, studioModule.captureWorkflowOperationContext()); + const flat = groups.unpackVisualOperationGroups(flow.getState().toObject()).graph; + assert.equal(flow.getState().nodes.filter((node) => /^Shot \d+ · /u.test(node.data.label ?? '')).length, 9); + assert.equal(studio.getState().graphBinding, null); + const generator = flat.nodes.find( + (node) => node.data.module === 'modules.DiffusersAudio' && node.data.action === 'Generate', + ); + const field = (node, name) => node.data.params[name].value ?? node.data.params[name].default; + const brief = template.workflowBlockSettings.lyricVideo; + assert.equal(field(generator, 'prompt'), brief.audio.prompt); + assert.equal(field(generator, 'bpm'), 96); + assert.equal(field(generator, 'lyrics'), brief.audio.lyrics); + assert.equal(field(generator, 'audio_duration'), 45); + assert.deepEqual(field(generator, 'seed'), { value: brief.audio.seed, isRandom: false }); + for (const recipe of flat.nodes.filter((node) => node.data.action === 'DiffusersExecutionRecipe')) + assert.equal(field(recipe, 'attention_backend'), 'auto'); + const exported = Object.values( + flow.getState().exportGraph('lyric-stages', undefined, { randomizeSeeds: false }).nodes, + ); + assert.ok(!exported.some((node) => ['GenerateSequence', 'GenerateShotJob', 'BuildShotJobs'].includes(node.action))); + const shots = exported.filter((node) => node.module === 'modules.DiffusersVideo' && node.action === 'Denoise'); + assert.equal(shots.length, 9); + for (const shot of shots) { + assert.equal(shot.params.num_frames.value, 81); + assert.equal(shot.params.width.value, 768); + assert.equal(shot.params.height.value, 512); + } + assert.equal( + exported.find((node) => node.module === 'modules.Video' && node.action === 'Concatenate').params + .transition_seconds.value, + 0, + ); + assert.equal( + exported.find((node) => node.module === 'modules.Video' && node.action === 'Trim').params.end.value, + 720, + ); + assert.equal( + field( + flat.nodes.find((node) => node.data.action === 'LyricOverlay'), + 'lrc', + ), + brief.lrc, + ); + assert.equal( + field( + flat.nodes.find((node) => node.data.action === 'LyricOverlay'), + 'enabled', + ), + false, + ); + assert.ok(flat.edges.some((edge) => edge.source === generator.id && edge.targetHandle === 'audio')); + // Ordinary node edits, rather than the advisory root form, remain authoritative. + flow.getState().setParam(generator.id, 'prompt', 'An explicitly edited soundtrack brief'); + const audioRecipe = flat.nodes.find((node) => node.data.studioRole === 'diffusersRecipe'); + assert.ok(audioRecipe); + flow.getState().setParam(audioRecipe.id, 'attention_backend', '_native_math'); + studio.getState().saveActiveWorkflowTab(true); + const expected = flow.getState().exportGraph('lyric-save', undefined, { randomizeSeeds: false }); + const saved = structuredClone(studio.getState().workflowTabs.find((tab) => tab.id === tabId)); + assert.equal(saved.snapshot.studioGraphBinding, null); + studio.setState({ workflowTabs: [], activeWorkflowTabId: tabId }); + studio.getState().mergeBackendWorkflow({ ...saved, revision: 1 }); + studio.getState().hydrateActiveWorkflowCanvas(); + assert.deepEqual(flow.getState().exportGraph('lyric-save', undefined, { randomizeSeeds: false }), expected); + assert.equal(studio.getState().graphBinding, null); + assert.deepEqual(template, originalTemplate); + assert.deepEqual(row.spec, historicalSpec, 'historical managed specification is never rewritten'); + assert.ok( + row.spec.bindings.some( + ([role, name, source]) => role === 'diffusersRecipe' && name === 'attention_backend' && source === 'nativeMath', + ), + ); + } finally { + globalThis.fetch = originalFetch; + studio.setState(previous[0], true); + flow.setState(previous[1], true); + registry.setState(previous[2], true); + } +}); + +function actualStarter(row) { + return starters.parseOperationStarter( + row.starter, + row.starter.pipelineClass, + row.starter.task, + authority.operationContracts, + { + executionProfileId: row.spec?.executionProfileId, + ...(row.starter.authoring ? { authoringRecipeId: row.starter.authoring.id } : {}), + }, + ); +} +function setup(row) { + const graph = groups.groupNewOperationGraph(authoring.createOperationStarter(actualStarter(row), { x: 0, y: 0 })); + const root = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'setup'); + return { graph, root, chain: adapters.modelSetupAdapterChain(graph, root.id) }; +} +function pinned() { + return { + adapter_path: { source: 'hub', value: 'ACE-Step/ACE-Step-v1.5-chinese-new-year-LoRA' }, + revision: 'cb829a12775740c830a6d49795f16913065dc492', + weight_name: 'adapter_model.safetensors', + expected_sha256: '78650245c79cbfda7169eae34eb2ccb5f5e639b31a99da0a153a5bbd74194b0d', + adapter_name: 'chinese_new_year', + scale: 0.355, + replace_existing: true, + }; +} + +test('actual published audio policy parses without changing its false broad flag or image-only boundary', () => { + const capability = authority.studioModelCapabilities.find((item) => item.modelType === 'AceStepAudioPipeline'); + assert.equal(capability.supportsLora, false); + const profile = capability.executionProfiles.find((item) => item.id === 'ace-step-audio:direct'); + const actual = policies.parseAdapterAuthoringPolicy( + profile.adapterAuthoring, + profile.modes, + profile.repository_revisions, + profile, + ); + assert.equal(actual.mediaKind, 'audio'); + assert.equal(actual.maxOwnedAdapters, 1); + assert.equal(actual.repositoryRevisions.length, 2); + assert.ok( + actual.repositoryRevisions.every((pair) => + profile.repository_revisions.some((item) => item.repo === pair.repo && item.revision === pair.revision), + ), + ); + assert.ok(profile.repository_revisions.some((pair) => pair.repo === 'ACE-Step/acestep-v15-xl-base-diffusers')); + assert.ok(!actual.repositoryRevisions.some((pair) => pair.repo === 'ACE-Step/acestep-v15-xl-base-diffusers')); + assert.throws(() => + policies.parseImageAdapterAuthoringPolicy(actual, profile.modes, profile.repository_revisions, profile), + ); + for (const mutate of [ + (policy) => { + policy.maxOwnedAdapters = 2; + }, + (policy) => { + policy.maxOwnedAdapters = '1'; + }, + (policy) => { + policy.mediaKind = 'image'; + }, + (policy) => { + policy.mediaKind = ['image']; + }, + (policy) => { + policy.mediaKind = ['audio']; + }, + (policy) => { + policy.mediaKind = {}; + }, + (policy) => { + policy.mediaKind = true; + }, + (policy) => { + policy.adapterNodeKey = 'modules.DiffusersImage.LoadAdapter'; + }, + (policy) => { + policy.tasks = ['text_to_image']; + }, + (policy) => { + policy.repositoryRevisions[0].revision = 'main'; + }, + (policy) => { + policy.extra = true; + }, + (policy) => { + policy.repositoryRevisions.push({ ...policy.repositoryRevisions[0] }); + }, + ]) { + const bad = structuredClone(actual); + mutate(bad); + assert.throws(() => + policies.parseAdapterAuthoringPolicy(bad, profile.modes, profile.repository_revisions, profile), + ); + } + for (const context of [ + undefined, + { ...profile, loader_module: 'modules.DiffusersImage' }, + { ...profile, loader_action: 'ModelsLoader' }, + { ...profile, execution_path: 'direct-diffusers-image' }, + ]) + assert.throws(() => + policies.parseAdapterAuthoringPolicy(actual, profile.modes, profile.repository_revisions, context), + ); +}); + +test('the native audio setup hides only its empty image adapter section', async () => { + const row = fixture.recipes.find((item) => item.id === 'minimax:text_to_audio'); + const { graph, root, chain } = setup(row); + const original = structuredClone(graph); + assert.equal(chain.native, true); + assert.equal(adapters.showModelSetupAdapterControls(chain), false); + assert.match(adapters.modelSetupAdapterAddUnavailable(chain, authority), /no reviewed inline LoRA editing/); + assert.deepEqual(graph, original); + + const { createNodeFromRegistry } = await server.ssrLoadModule('/src/workflow/nodeFactory.ts'); + const adapter = createNodeFromRegistry('modules.ModularDiffusers.Lora', fixture.registry, { x: 200, y: 0 }); + const input = root.data.blockInstanceV2.effectiveInterface.boundary.inputs.find( + (port) => port.binding.fieldOrPortId === 'lora_list', + ); + assert.ok(adapter && input); + const connected = { + ...graph, + nodes: [...graph.nodes, adapter], + edges: [ + ...graph.edges, + { id: 'external-adapter', source: adapter.id, sourceHandle: 'lora', target: root.id, targetHandle: input.portId }, + ], + }; + const saved = structuredClone(connected); + const preserved = adapters.modelSetupAdapterChain(connected, root.id); + assert.deepEqual(preserved.prefix, { source: adapter.id, sourceHandle: 'lora' }); + assert.equal(adapters.showModelSetupAdapterControls(preserved), true); + assert.match(adapters.modelSetupAdapterEditUnavailable(preserved, authority), /no reviewed inline LoRA editing/); + assert.deepEqual(connected, saved); +}); + +test('actual selected audio tasks and both own repositories authorize one populated row and safe recovery', async (t) => { + for (const row of fixture.recipes.filter( + (item) => item.starter.pipelineClass === 'AceStepPipeline' && item.id !== 'ace:ACE-Step-Base:audio_variation', + )) + await t.test(row.id, () => { + const { graph, root, chain } = setup(row); + assert.equal(adapters.showModelSetupAdapterControls(chain), true); + assert.equal(adapters.modelSetupAdapterAddUnavailable(chain, authority), null); + const next = adapters.planModelSetupAdapterEdit( + graph, + root.id, + { kind: 'add', values: pinned(), registry: authority.nodesRegistry }, + authority, + ); + const added = adapters.modelSetupAdapterChain(next, root.id); + assert.equal(added.adapters.length, 1); + assert.equal(added.adapters[0].data.module, 'modules.DiffusersAudio'); + assert.equal(added.adapters[0].data.params.scale.value, 0.355); + assert.equal(adapters.modelSetupAdapterEditUnavailable(added, authority), null); + assert.match(adapters.modelSetupAdapterAddUnavailable(added, authority), /at most 1/); + const before = structuredClone(next); + assert.throws( + () => + adapters.planModelSetupAdapterEdit( + next, + root.id, + { kind: 'add', values: pinned(), registry: authority.nodesRegistry }, + authority, + ), + /at most 1/, + ); + assert.deepEqual(next, before); + const withdrawn = structuredClone(authority); + delete withdrawn.studioModelCapabilities.find((item) => item.modelType === 'AceStepAudioPipeline') + .executionProfiles[0].adapterAuthoring; + assert.match(adapters.modelSetupAdapterEditUnavailable(added, withdrawn), /no reviewed/); + const removed = adapters.planModelSetupAdapterEdit( + next, + root.id, + { kind: 'remove', nodeId: added.adapters[0].id }, + withdrawn, + ); + const restored = adapters.modelSetupAdapterChain(removed, root.id); + assert.equal(restored.adapters.length, 0); + assert.equal(restored.tail.length, 1); + const edge = restored.unpacked.graph.edges.find( + (edge) => edge.source === restored.owner.id && edge.sourceHandle === 'pipeline', + ); + assert.equal(edge.target, restored.tail[0].target); + }); +}); + +test('the Base source-cover starter does not inherit the Turbo adapter-authoring grant', () => { + const row = fixture.recipes.find((item) => item.id === 'ace:ACE-Step-Base:audio_variation'); + const { graph, root, chain } = setup(row); + assert.equal(typeof adapters.modelSetupAdapterAddUnavailable(chain, authority), 'string'); + const before = structuredClone(graph); + assert.throws(() => + adapters.planModelSetupAdapterEdit( + graph, + root.id, + { kind: 'add', values: pinned(), registry: authority.nodesRegistry }, + authority, + ), + ); + assert.deepEqual(graph, before); +}); + +test('audio Add refuses stale, connected, foreign, ambiguous or withdrawn selected authority unchanged', () => { + const row = fixture.recipes.find((item) => item.id === 'ace:Runware:text_to_audio'); + for (const mutate of [ + ({ chain }) => { + chain.owner.data.params.revision.value = 'a'.repeat(40); + }, + ({ chain }) => { + chain.owner.data.params.model_id.value = { source: 'hub', value: 'foreign/model' }; + }, + ({ chain }) => { + chain.owner.data.params.mode.value = 'audio_repaint'; + }, + ({ chain }) => { + chain.owner.data.params.pipeline.signal.value.repository = 'ACE-Step/acestep-v15-xl-turbo-diffusers'; + }, + ({ chain }) => { + chain.owner.data.params.pipeline.signal.value = ''; + }, + ({ chain }) => { + chain.unpacked.graph.edges.push({ + id: 'connected-mode', + source: 'unknown', + sourceHandle: 'value', + target: chain.owner.id, + targetHandle: 'mode', + }); + }, + ({ current }) => { + current.studioModelCapabilitiesAuthoritative = false; + }, + ({ current }) => { + current.discoveryRequests.nodes.status = 'loading'; + }, + ({ current }) => { + current.nodesRegistry['modules.DiffusersAudio.LoadAdapter'].params.pipeline.onSignal.target = 'foreign'; + }, + ({ current }) => { + delete current.nodesRegistry['modules.DiffusersAudio.LoadAdapter'].params.pipeline.onSignal; + }, + ({ current }) => { + current.nodesRegistry['modules.DiffusersAudio.LoadAdapter'].params.pipeline.signalCompatibility.required = false; + }, + ({ current }) => { + current.nodesRegistry['modules.DiffusersAudio.LoadAdapter'].params.output.signal.origin = 'foreign'; + }, + ({ current }) => { + current.nodesRegistry['modules.DiffusersAudio.LoadAdapter'].params.output.signal.direction = 'input'; + }, + ({ current }) => { + current.operationContracts.push( + structuredClone( + current.operationContracts.find( + (op) => + op.pipelineClass === 'AceStepPipeline' && op.task === 'text_to_audio' && op.decomposition === 'loader', + ), + ), + ); + }, + ({ current }) => { + const cap = current.studioModelCapabilities.find((item) => item.modelType === 'AceStepAudioPipeline'); + cap.executionProfiles.push(structuredClone(cap.executionProfiles[0])); + }, + ({ current }) => { + delete current.studioModelCapabilities.find((item) => item.modelType === 'AceStepAudioPipeline') + .executionProfiles[0].adapterAuthoring; + }, + ]) { + const { graph, root, chain } = setup(row); + const current = structuredClone(authority); + mutate({ graph, root, chain, current }); + const before = structuredClone(graph); + assert.equal(typeof adapters.modelSetupAdapterAddUnavailable(chain, current), 'string'); + assert.deepEqual(graph, before); + } +}); + +test('all seven actual curated audio factories preserve original creative settings and selected model pins', () => { + const audio = templates.filter( + (item) => item.executionSelection && item.example?.mediaType === 'audio' && !item.outputKinds?.includes('video'), + ); + assert.equal(audio.length, 7); + for (const template of audio) { + const selection = template.executionSelection; + const repository = + template.modelArtifact?.source === 'hub' + ? template.modelArtifact.value + : template.workflowBlockSettings?.lora?.baseModel?.value; + const row = fixture.recipes.find( + (item) => + item.starter.pipelineClass === selection.pipelineClass && + item.starter.task === selection.task && + (!repository || + item.starter.nodes.find((item) => item.operation.decomposition === 'loader').node.params.model_id?.value + ?.value === repository), + ); + assert.ok(row, template.id); + const capability = authority.studioModelCapabilities.find((item) => item.modelType === template.modelType); + const spec = capability.studioExecutionSpecs.find((item) => item.mode === template.mode); + const form = { + ...defaults, + ...exactness.getTemplateLockedSettings(template), + device: 'cpu:0', + offloadMode: 'none', + autoOffload: false, + sourceAudio: 'source.wav', + referenceAudio: 'reference.wav', + }; + const graph = builder.createTemplateOperationGraph( + template, + form, + actualStarter(row), + fixture.registry, + spec, + capability, + authority, + ); + const flat = groups.unpackVisualOperationGroups(graph).graph; + const owner = flat.nodes.find((node) => node.data.operationAuthoring?.operation.decomposition === 'loader'); + assert.equal( + owner.data.params.revision.value, + template.modelArtifact?.revision ?? + (repository + ? 'be23effe449c5957947f3020fd63bee23c64abe4' + : selection.pipelineClass === 'AceStepPipeline' + ? '200ba991ae448051e14b0183157e35c2d27c9fb0' + : template.example.modelRevision), + ); + const generator = flat.nodes.find( + (node) => node.data.action === 'Generate' || node.data.action === 'WorkflowSemanticGeneration', + ); + const prompt = generator.data.params.prompt; + assert.equal(prompt.value, form.prompt, template.id); + if (selection.pipelineClass === 'AceStepPipeline') { + const recipe = flat.nodes.find((node) => node.data.action === 'DiffusersExecutionRecipe'); + assert.equal(recipe.data.params.attention_backend.value, form.attentionBackend ?? 'auto'); + assert.deepEqual(generator.data.params.seed.value, { value: form.seed, isRandom: false }); + assert.equal( + flat.nodes.filter((node) => node.data.action === 'LoadAdapter').length, + template.workflowBlocks?.includes('lora') ? 1 : 0, + ); + assert.ok(!flat.nodes.some((node) => ['EncodeInputs', 'Denoise', 'DecodeLatents'].includes(node.data.action))); + } else { + const generation = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'generate'); + assert.ok(presentation.isFocusedStageNode(generation?.data.blockInstanceV2), template.id); + assert.equal(graph.nodes.filter((node) => groups.visualOperationGroup(node) === 'output').length, 1); + } + } +}); + +test('the accepted Base cover refuses a same-class Turbo starter', () => { + const template = templates.find((item) => item.id === 'ace_step_audio_variation'); + const row = fixture.recipes.find((item) => item.id === 'ace:ACE-Step:audio_variation'); + const capability = authority.studioModelCapabilities.find((item) => item.modelType === template.modelType); + const spec = capability.studioExecutionSpecs.find((item) => item.mode === template.mode); + const form = { + ...defaults, + ...exactness.getTemplateLockedSettings(template), + device: 'cpu:0', + offloadMode: 'none', + autoOffload: false, + }; + assert.throws( + () => + builder.createTemplateOperationGraph( + template, + form, + actualStarter(row), + fixture.registry, + spec, + capability, + authority, + ), + /different immutable template model artifact/, + ); +}); + +function actualGraph(row) { + const graph = authoring.createOperationStarter(structuredClone(row.starter), { x: 0, y: 0 }); + // The metadata interpreter publishes CPU, while starter placement defaults may + // target an accelerator. Select the genuine NONE CPU controls explicitly for + // this authoring-only export comparison, before recording either graph. + for (const node of graph.nodes) { + if ( + node.data.params.device && + String(node.data.params.device.value ?? node.data.params.device.default).startsWith('cpu') + ) { + if (node.data.params.offload_mode) node.data.params.offload_mode.value = 'none'; + if (node.data.params.auto_offload) node.data.params.auto_offload.value = false; + } + } + const definition = structuredClone(fixture.registry['modules.Audio.Export']); + graph.nodes.push({ id: 'audio-export', type: 'custom', position: { x: 1800, y: 0 }, data: definition }); + const source = graph.nodes.filter( + (node) => + node.id !== 'audio-export' && + Object.values(node.data.params).some((field) => field.display === 'output' && field.type === 'audio'), + ); + assert.equal(source.length, 1, 'actual starter has one declared final audio producer'); + const port = Object.entries(source[0].data.params).find( + ([, field]) => field.display === 'output' && field.type === 'audio', + )[0]; + graph.edges.push({ + id: 'audio-export-wire', + source: source[0].id, + sourceHandle: port, + target: 'audio-export', + targetHandle: 'audio', + }); + return graph; +} + +function api(graph) { + const exported = exporter.useFlowStore + .getState() + .exportGraph('audio-contract', undefined, { sourceGraph: graph, randomizeSeeds: false }); + const names = new Map(Object.entries(exported.nodes).map(([id, node]) => [id, `${node.module}.${node.action}`])); + assert.equal(new Set(names.values()).size, names.size, 'this bounded fixture has unique action identities'); + const normalize = (value) => { + if (Array.isArray(value)) return value.map(normalize); + if (value && typeof value === 'object') + return Object.fromEntries( + Object.entries(value).map(([key, item]) => [ + key, + key === 'sourceId' ? (names.get(item) ?? item) : normalize(item), + ]), + ); + return value; + }; + return { + nodes: Object.fromEntries( + [...names].map(([id, name]) => [name, normalize(exported.nodes[id])]).sort(([a], [b]) => a.localeCompare(b)), + ), + paths: exported.paths + .map((route) => route.map((id) => names.get(id) ?? id)) + .sort((a, b) => JSON.stringify(a).localeCompare(JSON.stringify(b))), + }; +} + +test('actual audio families group only their real execution stages', async (t) => { + for (const row of fixture.recipes) + await t.test(row.id, () => { + const original = actualGraph(row); + const before = structuredClone(original); + const grouped = groups.groupNewOperationGraph(original); + const setup = grouped.nodes.filter((node) => groups.visualOperationGroup(node) === 'setup'); + const output = grouped.nodes.filter((node) => groups.visualOperationGroup(node) === 'output'); + const native = row.starter.pipelineClass === 'MiniMaxMusic3ModularPipeline'; + assert.equal(setup.length, 1); + assert.equal(output.length, 1); + assert.equal(output[0].data.label, 'Audio Output'); + assert.equal(output[0].data.blockInstanceV2.previewStates[0].binding.mediaType, 'audio'); + assert.ok(!grouped.nodes.some((node) => groups.visualOperationGroup(node) === 'guidance')); + assert.ok(!grouped.nodes.some((node) => groups.visualOperationGroup(node) === 'inputs')); + if (native) { + assert.deepEqual( + setup[0].data.blockInstanceV2.effectiveGraph.nodes.map((node) => node.data.action), + ['ModelsLoader'], + 'The real native loader is the shared Model Setup; it gains no synthetic encoding operation.', + ); + assert.equal(output[0].data.label, 'Audio Output'); + assert.deepEqual( + projection.visualStagePresentation('output', projection.visualOperationGroupMedia(output[0])), + { label: 'Audio Output', name: 'audio output' }, + ); + const instance = output[0].data.blockInstanceV2; + assert.deepEqual( + instance.effectiveGraph.nodes.map((node) => node.data.action), + ['Export'], + ); + assert.equal(instance.previewStates.length, 1); + assert.equal(instance.previewStates[0].binding.mediaType, 'audio'); + assert.equal(instance.previewStates[0].binding.outputPortId, 'preview'); + const generation = grouped.nodes.find((node) => groups.visualOperationGroup(node) === 'generate'); + assert.ok(presentation.isFocusedStageNode(generation?.data.blockInstanceV2)); + assert.deepEqual( + generation.data.blockInstanceV2.effectiveGraph.nodes.map((node) => node.data.action), + ['WorkflowDenoise', 'WorkflowDecodeAudio'], + ); + assert.equal(grouped.nodes.length, 4, 'real loader, semantic generation, Generate and Audio Output'); + } else + assert.equal( + grouped.nodes.length, + original.nodes.length, + 'integrated Generate and single-node output stage preserve the original node count', + ); + assert.deepEqual(original, before, 'presentation must not mutate the creator graph'); + assert.deepEqual( + api(grouped), + api(original), + 'ordinary exported graph and creative/media controls are preserved', + ); + assert.deepEqual(api(groups.unpackVisualOperationGroups(grouped).graph), api(original)); + }); +}); + +test('canonical Music 3 example saves the ordinary Generate stage with the original executable identity', async () => { + const { workflowSnapshotFromGraph } = await server.ssrLoadModule('/src/studio/workflowInference.ts'); + const { exampleWorkflowSnapshotFromGraph } = await server.ssrLoadModule('/src/studio/exampleWorkflow.ts'); + const backend = process.env.MODIFF_BACKEND_DIR || path.resolve('../MoDiff'); + const source = JSON.parse( + readFileSync(path.join(backend, 'data/graphs/studio/mini-max-music3-modular-pipeline/text-to-audio.json'), 'utf8'), + ); + const original = workflowSnapshotFromGraph(source, 'default', defaults); + const opened = exampleWorkflowSnapshotFromGraph(source, 'default', defaults); + const generation = opened.nodes.find((node) => groups.visualOperationGroup(node) === 'generate'); + assert.ok(presentation.isFocusedStageNode(generation?.data.blockInstanceV2)); + const identity = (sourceGraph) => + canonicalGraphIdentity( + exporter.useFlowStore.getState().exportGraph('audio-example', undefined, { + sourceGraph, + randomizeSeeds: false, + }), + ); + assert.deepEqual(identity(opened), identity(original)); + const restored = workflowSnapshotFromGraph(JSON.parse(JSON.stringify(opened)), 'default', defaults); + const restoredGeneration = restored.nodes.find((node) => groups.visualOperationGroup(node) === 'generate'); + assert.ok(presentation.isFocusedStageNode(restoredGeneration?.data.blockInstanceV2)); + assert.deepEqual(identity(restored), identity(original)); +}); + +test('actual native audio output refuses an unrelated sink or missing preview binding', () => { + const row = fixture.recipes.find((item) => item.starter.pipelineClass === 'MiniMaxMusic3ModularPipeline'); + for (const mutate of [ + (sink) => { + sink.data.module = 'modules.Unreviewed'; + }, + (sink) => { + sink.data.params.preview.display = 'ui_image'; + }, + (sink) => { + sink.data.params.preview.dataSource = 'unrelated'; + }, + (sink) => { + sink.data.params.file.type = 'image'; + }, + ]) { + const original = actualGraph(row); + mutate(original.nodes.find((node) => node.id === 'audio-export')); + const before = structuredClone(original); + const grouped = groups.groupNewOperationGraph(original); + assert.ok(!grouped.nodes.some((node) => groups.visualOperationGroup(node) === 'output')); + assert.deepEqual(original, before); + } +}); + +test('audio output preview identity, custom title and current values survive explicit regrouping', () => { + const row = fixture.recipes.find((item) => item.starter.pipelineClass === 'MiniMaxMusic3ModularPipeline'); + const original = actualGraph(row); + const sink = original.nodes.find((node) => node.id === 'audio-export'); + sink.data.params.sample_rate.value = 44100; + sink.data.params.preview.value = '@data/outputs/own-task.wav'; + const grouped = groups.groupNewOperationGraph(original); + const root = grouped.nodes.find((node) => groups.visualOperationGroup(node) === 'output'); + const flat = groups.unpackVisualOperationGroups(grouped); + const restored = groups.restoreVisualOperationGroups(flat.graph, flat); + assert.deepEqual(api(restored), api(grouped)); + assert.equal(root.data.blockInstanceV2.previewStates[0].binding.mediaType, 'audio'); + assert.equal(projection.visualStagePresentation('output', null).label, 'Image Output'); +}); + +function factory(template, current = authority) { + const selection = template.executionSelection; + const repository = template.workflowBlockSettings?.lora?.baseModel?.value; + const row = fixture.recipes.find( + (item) => + item.starter.pipelineClass === selection.pipelineClass && + item.starter.task === selection.task && + (!repository || + item.starter.nodes.find((item) => item.operation.decomposition === 'loader').node.params.model_id?.value + ?.value === repository), + ); + const capability = current.studioModelCapabilities.find((item) => item.modelType === template.modelType); + const spec = capability.studioExecutionSpecs.find((item) => item.mode === template.mode); + const form = { + ...defaults, + ...exactness.getTemplateLockedSettings(template), + device: 'cpu:0', + offloadMode: 'none', + autoOffload: false, + sourceAudio: 'source.wav', + referenceAudio: 'reference.wav', + }; + return builder.createTemplateOperationGraph( + template, + form, + actualStarter(row), + fixture.registry, + spec, + capability, + current, + ); +} + +test('audio replacement is atomic at capacity and rejects malformed populated selections', () => { + const { graph, root } = setup(fixture.recipes.find((item) => item.id === 'ace:Runware:text_to_audio')); + const populated = adapters.planModelSetupAdapterEdit( + graph, + root.id, + { kind: 'add', values: pinned(), registry: authority.nodesRegistry }, + authority, + ); + const chain = adapters.modelSetupAdapterChain(populated, root.id); + const original = structuredClone(populated); + const replaced = adapters.planModelSetupAdapterEdit( + populated, + root.id, + { + kind: 'replace', + nodeId: chain.adapters[0].id, + values: { ...pinned(), adapter_name: 'replacement', scale: 0.625 }, + registry: authority.nodesRegistry, + }, + authority, + ); + const replacement = adapters.modelSetupAdapterChain(replaced, root.id); + assert.equal(replacement.adapters.length, 1); + assert.equal(replacement.adapters[0].id, chain.adapters[0].id); + assert.equal(replacement.adapters[0].data.params.adapter_name.value, 'replacement'); + assert.equal(replacement.adapters[0].data.params.scale.value, 0.625); + const endpoints = (graph) => + graph.edges.map(({ source, sourceHandle, target, targetHandle }) => ({ + source, + sourceHandle, + target, + targetHandle, + })); + assert.deepEqual(endpoints(replacement.unpacked.graph), endpoints(chain.unpacked.graph)); + assert.deepEqual(populated, original); + for (const mutate of [ + (value) => { + value.adapter_path.source = ['hub']; + }, + (value) => { + value.adapter_path.source = {}; + }, + (value) => { + value.adapter_path.source = true; + }, + (value) => { + value.revision = 'main'; + }, + (value) => { + value.expected_sha256 = ''; + }, + (value) => { + value.weight_name = '../adapter.safetensors'; + }, + ]) { + const values = pinned(); + mutate(values); + assert.throws(() => + adapters.planModelSetupAdapterEdit( + populated, + root.id, + { kind: 'replace', nodeId: chain.adapters[0].id, values, registry: authority.nodesRegistry }, + authority, + ), + ); + assert.deepEqual(populated, original); + } +}); + +test('audio policy rejects non-data own fields before reading a getter', () => { + const profile = authority.studioModelCapabilities.find((item) => item.modelType === 'AceStepAudioPipeline') + .executionProfiles[0]; + let calls = 0; + const getter = structuredClone(profile.adapterAuthoring); + Object.defineProperty(getter, 'mediaKind', { + enumerable: true, + get() { + calls++; + return 'audio'; + }, + }); + const symbol = structuredClone(profile.adapterAuthoring); + symbol[Symbol('foreign')] = true; + const hidden = structuredClone(profile.adapterAuthoring); + Object.defineProperty(hidden, 'extra', { value: true }); + for (const policy of [getter, symbol, hidden]) + assert.throws(() => + policies.parseAdapterAuthoringPolicy(policy, profile.modes, profile.repository_revisions, profile), + ); + assert.equal(calls, 0); +}); + +test('a restrictive actual policy map refuses both manual Add and populated template insertion', () => { + const current = structuredClone(authority); + current.studioModelCapabilities.find( + (item) => item.modelType === 'AceStepAudioPipeline', + ).executionProfiles[0].adapterAuthoring.requiredControls = { offload_mode: 'group_disk' }; + const { graph, root, chain } = setup(fixture.recipes.find((item) => item.id === 'ace:Runware:text_to_audio')); + const before = structuredClone(graph); + assert.equal(typeof adapters.modelSetupAdapterAddUnavailable(chain, current), 'string'); + assert.throws(() => + adapters.planModelSetupAdapterEdit( + graph, + root.id, + { kind: 'add', values: pinned(), registry: current.nodesRegistry }, + current, + ), + ); + assert.deepEqual(graph, before); + assert.throws(() => + factory( + templates.find((item) => item.id === 'ace_step_chinese_new_year_lora'), + current, + ), + ); +}); + +test('user-supplied blank audio adapter remains a required-input draft while tampered curated weights refuse', () => { + const draft = structuredClone(templates.find((item) => item.id === 'ace_step_custom_lora')); + draft.workflowBlockSettings.lora.model = { source: 'local', value: '' }; + const graph = factory(draft); + const flat = groups.unpackVisualOperationGroups(graph).graph; + const adapter = flat.nodes.find((node) => node.data.action === 'LoadAdapter'); + assert.deepEqual(adapter.data.params.adapter_path.value, { source: 'local', value: '' }); + const issues = requiredInputs.inspectRequiredGraphInputs(graph.nodes, flat, fixture.registry); + assert.ok( + issues.some( + (issue) => issue.blocking && issue.code === 'required_graph_input_missing' && /LoRA/.test(issue.message), + ), + ); + const curated = templates.find((item) => item.id === 'ace_step_chinese_new_year_lora'); + assert.equal(curated.workflowBlockSettings.lora.model.byteSize, 88130280); + for (const mutate of [ + (lora) => { + lora.model.revision = 'main'; + }, + (lora) => { + lora.model.sha256 = ''; + }, + (lora) => { + lora.weightName = '../adapter.safetensors'; + }, + (lora) => { + lora.model.source = ['hub']; + }, + ]) { + const bad = structuredClone(curated); + mutate(bad.workflowBlockSettings.lora); + assert.throws(() => factory(bad)); + } +}); + +test('audio output wording survives removed or mixed previews and custom titles', () => { + const original = actualGraph(fixture.recipes.find((item) => item.id === 'minimax:text_to_audio')); + const grouped = groups.groupNewOperationGraph(original); + const output = grouped.nodes.find((node) => groups.visualOperationGroup(node) === 'output'); + output.data.label = 'My rendered song'; + const instance = output.data.blockInstanceV2; + instance.definitionSnapshot.previews = []; + instance.previewStates = []; + assert.equal(projection.visualOperationGroupMedia(output), 'audio'); + assert.deepEqual(projection.visualStagePresentation('output', projection.visualOperationGroupMedia(output)), { + label: 'Audio Output', + name: 'audio output', + }); + instance.definitionSnapshot.previews.push({ + nodeId: 'custom-preview', + outputPortId: 'image', + mediaType: 'image', + label: 'Artwork', + }); + assert.equal(projection.visualOperationGroupMedia(output), 'audio'); + assert.equal(output.data.label, 'My rendered song'); +}); + +test('required model selectors distinguish blank drafts, populated values, declared connections and optional absence', () => { + const registered = { + type: 'custom', + module: 'modules.Future', + action: 'SelectModel', + label: 'Model', + category: 'Test', + params: { model: { label: 'Model', display: 'modelselect', type: 'string', required: true } }, + }; + const node = { id: 'model', type: 'custom', position: { x: 0, y: 0 }, data: structuredClone(registered) }; + const registry = { 'modules.Future.SelectModel': registered }; + const graph = { nodes: [node], edges: [] }; + const inspect = () => requiredInputs.inspectRequiredGraphInputs(graph.nodes, graph, registry); + for (const value of [ + '', + ' ', + { source: 'local', value: '' }, + { source: 'hub', value: '' }, + { source: 'local', value: ' ' }, + ]) { + node.data.params.model.value = value; + assert.equal(inspect().length, 1); + } + for (const value of ['path/to/weights', { source: 'local', value: 'path/to/weights' }]) { + node.data.params.model.value = value; + assert.deepEqual(inspect(), []); + } + delete node.data.params.model.value; + const source = { + id: 'text', + type: 'custom', + position: { x: 0, y: 0 }, + data: { ...registered, action: 'Text', params: { text: { type: 'string', display: 'output' } } }, + }; + graph.nodes.push(source); + graph.edges.push({ + id: 'model-input', + source: source.id, + sourceHandle: 'text', + target: node.id, + targetHandle: 'model', + }); + assert.deepEqual(inspect(), []); + source.data.params.text.type = 'image'; + assert.equal(inspect().length, 1); + graph.edges = []; + registered.params.model.required = false; + assert.deepEqual(inspect(), []); +}); + +test('audio Replace preserves a custom row and a connected unchanged strength', () => { + const { graph, root } = setup(fixture.recipes.find((item) => item.id === 'ace:Runware:text_to_audio')); + const populated = adapters.planModelSetupAdapterEdit( + graph, + root.id, + { kind: 'add', values: pinned(), registry: authority.nodesRegistry }, + authority, + ); + const chain = adapters.modelSetupAdapterChain(populated, root.id); + const row = chain.adapters[0]; + row.data.label = 'My audio style'; + row.data.style = { width: 432 }; + row.data.uiState = { collapsed: true }; + chain.unpacked.graph.nodes.push({ + id: 'strength-source', + type: 'custom', + position: { x: 0, y: 700 }, + data: { + type: 'custom', + module: 'modules.Future', + action: 'Strength', + category: 'Test', + label: 'Strength', + params: { value: { type: 'float', display: 'output', value: 0.355 } }, + }, + }); + chain.unpacked.graph.edges.push({ + id: 'strength-edge', + source: 'strength-source', + sourceHandle: 'value', + target: row.id, + targetHandle: 'scale', + }); + const presented = groups.restoreVisualOperationGroups(chain.unpacked.graph, chain.unpacked); + const before = structuredClone(presented); + const current = adapters.modelSetupAdapterChain(presented, root.id); + const replaced = adapters.planModelSetupAdapterEdit( + presented, + root.id, + { + kind: 'replace', + nodeId: current.adapters[0].id, + values: { ...pinned(), adapter_name: 'new_name' }, + registry: authority.nodesRegistry, + }, + authority, + ); + const after = adapters.modelSetupAdapterChain(replaced, root.id); + assert.equal(after.adapters[0].data.label, 'My audio style'); + assert.deepEqual(after.adapters[0].data.style, current.adapters[0].data.style); + assert.deepEqual(after.adapters[0].data.uiState, current.adapters[0].data.uiState); + assert.equal(after.adapters[0].data.params.scale.value, 0.355); + assert.ok( + after.unpacked.graph.edges.some( + (edge) => + edge.source === 'strength-source' && edge.target === after.adapters[0].id && edge.targetHandle === 'scale', + ), + ); + assert.throws(() => + adapters.planModelSetupAdapterEdit( + presented, + root.id, + { + kind: 'replace', + nodeId: current.adapters[0].id, + values: { ...pinned(), scale: 0.5 }, + registry: authority.nodesRegistry, + }, + authority, + ), + ); + assert.deepEqual(presented, before); +}); + +test('ordinary audio template hydration retains provenance and real stages without managed recovery', async (t) => { + const studio = (await server.ssrLoadModule('/src/stores/useStudioStore.ts')).useStudioStore; + const flow = exporter.useFlowStore; + for (const id of ['ace_step_text_to_audio', 'minimax_music3_chamber_pop']) + await t.test(id, () => { + const previous = [studio.getState(), flow.getState()]; + try { + const template = templates.find((item) => item.id === id); + assert.ok(template, id); + const selection = template.executionSelection; + const row = fixture.recipes.find( + (item) => item.starter.pipelineClass === selection.pipelineClass && item.starter.task === selection.task, + ); + const capability = authority.studioModelCapabilities.find((item) => item.modelType === template.modelType); + const spec = capability.studioExecutionSpecs.find((item) => item.mode === template.mode); + const form = { + ...defaults, + ...exactness.getTemplateLockedSettings(template), + mode: template.mode, + modelType: template.modelType, + device: 'cpu:0', + offloadMode: 'none', + autoOffload: false, + }; + const graph = builder.createTemplateOperationGraph( + template, + form, + actualStarter(row), + fixture.registry, + spec, + capability, + authority, + ); + flow.getState().replaceGraph(graph); + const persistedGraph = flow.getState().toObject(); + const expectedApi = api(persistedGraph); + const tabId = `restored-${id}`; + const record = { + id: tabId, + title: template.label, + source: 'template', + sourceLabel: id, + revision: 1, + snapshot: { + ...persistedGraph, + // A stale Creator form is advisory for this ordinary saved graph. + studioForm: { ...form, device: 'cuda:0', offloadMode: 'model_cpu', autoOffload: true }, + selectedMode: template.mode, + activeTemplateId: id, + studioGraphBinding: null, + sourceOutputId: null, + }, + }; + studio.setState({ workflowTabs: [], activeWorkflowTabId: tabId, workflowCanvasHydrated: true }); + studio.getState().mergeBackendWorkflow(record); + assert.equal(studio.getState().graphBinding, null); + assert.equal(studio.getState().activeTemplateId, id); + const restored = studio.getState().workflowTabs.find((tab) => tab.id === tabId); + assert.equal(restored.source, 'template'); + assert.equal(restored.sourceLabel, id); + assert.deepEqual( + JSON.parse(JSON.stringify(flow.getState().nodes)), + JSON.parse(JSON.stringify(persistedGraph.nodes)), + 'persisted graph metadata and ownership survive the real JSON transport', + ); + assert.deepEqual(api(flow.getState().toObject()), expectedApi); + } finally { + studio.setState(previous[0]); + flow.setState(previous[1]); + } + }); +}); diff --git a/scripts/audio-schema-fixture.mjs b/scripts/audio-schema-fixture.mjs new file mode 100644 index 00000000..36349d4f --- /dev/null +++ b/scripts/audio-schema-fixture.mjs @@ -0,0 +1,79 @@ +import { execFileSync } from 'node:child_process'; +import path from 'node:path'; + +/** Actual registry/starter publication only: no executable node construction. */ +export function captureAudioSchemaFixture() { + const backend = process.env.MODIFF_BACKEND_DIR || path.resolve('../MoDiff'); + const python = + process.env.MODIFF_BACKEND_PYTHON || + path.join(backend, '.venv', process.platform === 'win32' ? 'Scripts/python.exe' : 'bin/python'); + const selections = ['ACE-Step', 'Runware'].flatMap((repository) => + ['text_to_audio', 'audio_variation', 'audio_continuation', 'audio_repaint'].map((task) => ({ + id: `ace:${repository}:${task}`, + selection: { + schemaVersion: 1, + pipelineClass: 'AceStepPipeline', + task, + executionProfileId: 'ace-step-audio:direct', + repository: + repository === 'ACE-Step' ? 'ACE-Step/acestep-v15-xl-turbo-diffusers' : 'Runware/acestep-v15-turbo-diffusers', + bindingSpec: { modelType: 'AceStepAudioPipeline', mode: task }, + authoringRecipeId: 'generic-audio-recipe:v1', + }, + })), + ); + selections.push({ + id: 'ace:ACE-Step-Base:audio_variation', + selection: { + schemaVersion: 1, + pipelineClass: 'AceStepPipeline', + task: 'audio_variation', + executionProfileId: 'ace-step-audio:direct', + repository: 'ACE-Step/acestep-v15-xl-base-diffusers', + bindingSpec: { modelType: 'AceStepAudioPipeline', mode: 'audio_variation' }, + authoringRecipeId: 'generic-audio-recipe:v1', + }, + }); + selections.push({ + id: 'minimax:text_to_audio', + selection: { + schemaVersion: 1, + pipelineClass: 'MiniMaxMusic3ModularPipeline', + task: 'text_to_audio', + executionProfileId: 'minimax-music3:official-modular-workflow', + bindingSpec: { modelType: 'MiniMaxMusic3ModularPipeline', mode: 'text_to_audio' }, + }, + }); + for (const pipelineClass of ['StableAudioPipeline', 'LongCatAudioDiTPipeline', 'AudioLDM2Pipeline']) + selections.push({ id: `${pipelineClass}:text_to_audio`, selection: { pipelineClass, task: 'text_to_audio' } }); + selections.push({ + id: 'lyric-video-secondary', + selection: { + pipelineClass: 'LTXConditionPipeline', + task: 'image_to_video', + executionProfileId: 'ltx-video:direct', + bindingSpec: { modelType: 'LTXVideoPipeline', mode: 'image_to_video' }, + authoringRecipeId: 'generic-video-stages:v1', + }, + }); + const fixture = JSON.parse( + execFileSync(python, [path.resolve('scripts/template-operation-fixtures.py')], { + cwd: backend, + encoding: 'utf8', + maxBuffer: 64 * 1024 * 1024, + timeout: 120_000, + env: { + ...process.env, + MODIFF_BACKEND_DIR: backend, + CUDA_VISIBLE_DEVICES: '', + HF_HUB_OFFLINE: '1', + TRANSFORMERS_OFFLINE: '1', + PYTHONDONTWRITEBYTECODE: '1', + }, + input: JSON.stringify(selections), + }), + ); + fixture.secondaryVideo = fixture.recipes.find((row) => row.id === 'lyric-video-secondary'); + fixture.recipes = fixture.recipes.filter((row) => row !== fixture.secondaryVideo); + return fixture; +} diff --git a/scripts/backend-installer-contract.mjs b/scripts/backend-installer-contract.mjs index 6a9e64e5..ce677959 100644 --- a/scripts/backend-installer-contract.mjs +++ b/scripts/backend-installer-contract.mjs @@ -19,15 +19,13 @@ function readJson(path, label) { } } -function assertUvIsInstallerManaged(pyproject, path) { +function assertUvProjectManaged(pyproject, path) { const header = /^\[tool\.uv\]\s*$/m.exec(pyproject); const afterHeader = header ? pyproject.slice(header.index + header[0].length) : ''; const nextSection = /^\[[^\]]+\]\s*$/m.exec(afterHeader); const section = afterHeader.slice(0, nextSection?.index ?? afterHeader.length); - if (!section || !/^\s*managed\s*=\s*false\s*(?:#.*)?$/m.test(section)) { - throw new Error( - `${path} must declare [tool.uv] managed = false because accelerator profile installers own the environment.`, - ); + if (/^\s*managed\s*=\s*false\s*(?:#.*)?$/m.test(section)) { + throw new Error(`${path} must allow native uv project management.`); } } @@ -47,7 +45,8 @@ function safeRequirementsPath(backendRoot, value, profileId) { export function buildBackendInstallerPackageSet(backendRoot) { const pyprojectPath = join(backendRoot, 'pyproject.toml'); const pyproject = readFileSync(requiredFile(pyprojectPath, 'Backend pyproject'), 'utf8'); - assertUvIsInstallerManaged(pyproject, pyprojectPath); + assertUvProjectManaged(pyproject, pyprojectPath); + const uvLockPath = requiredFile(join(backendRoot, 'uv.lock'), 'Backend uv lock'); const manifestRelativePath = 'modiff/compatibility/accelerators.v1.json'; const manifestPath = join(backendRoot, manifestRelativePath); @@ -84,8 +83,10 @@ export function buildBackendInstallerPackageSet(backendRoot) { return { id: 'backend-installer-profiles', - installStrategy: 'installer-owned-profile-requirements', - uvProjectManaged: false, + installStrategy: 'native-uv-with-specialized-accelerator-profiles', + uvProjectManaged: true, + uvLockPath: 'uv.lock', + uvLockSha256: sha256File(uvLockPath), pyprojectPath: 'pyproject.toml', pyprojectSha256: sha256File(pyprojectPath), runtimeManifestPath: manifestRelativePath, diff --git a/scripts/backend-installer-contract.test.mjs b/scripts/backend-installer-contract.test.mjs index 7f9302cc..f5d33db4 100644 --- a/scripts/backend-installer-contract.test.mjs +++ b/scripts/backend-installer-contract.test.mjs @@ -5,12 +5,14 @@ import { join } from 'node:path'; import { test } from 'node:test'; import { buildBackendInstallerPackageSet } from './backend-installer-contract.mjs'; +import './development-installer-launchers.test.mjs'; -function fixture({ managed = false, requirements = 'torch==2.8.0\n' } = {}) { +function fixture({ managed = true, requirements = 'torch==2.8.0\n' } = {}) { const root = mkdtempSync(join(tmpdir(), 'modiff-installer-contract-')); mkdirSync(join(root, 'modiff', 'compatibility'), { recursive: true }); mkdirSync(join(root, 'requirements', 'profiles'), { recursive: true }); writeFileSync(join(root, 'pyproject.toml'), `[project]\nname = "modiff"\n\n[tool.uv]\nmanaged = ${managed}\n`); + writeFileSync(join(root, 'uv.lock'), 'version = 1\nrevision = 1\n'); writeFileSync( join(root, 'modiff', 'compatibility', 'accelerators.v1.json'), `${JSON.stringify({ @@ -33,12 +35,59 @@ function fixture({ managed = false, requirements = 'torch==2.8.0\n' } = {}) { return root; } -test('package identity follows the installer-owned manifest and profile requirements without uv.lock', () => { +function reviewedSetupSourceContract(readme, workflow) { + const sections = Array.from( + readme.matchAll(/^application source pair is:\r?\n\r?\n([\s\S]*?)\r?\n\r?\nCI backend contract:/gmu), + (match) => match[1], + ); + assert.equal(sections.length, 1, 'README must declare one reviewed application source table'); + const [header, separator, ...rows] = sections[0].split(/\r?\n/u); + assert.match(header, /^\|\s*Repository\s*\|\s*Application source before final packaging\s*\|$/u); + assert.match(separator, /^\|[ :\-]+\|[ :\-]+\|$/u); + assert.equal(rows.length, 2, 'Reviewed application source table must contain exactly two rows'); + const pairs = rows.map((row) => { + const match = /^\|\s*(MoDiff(?:-client)?)\s*\|\s*`([a-f0-9]{40})`\s*\|$/u.exec(row); + assert.ok(match, 'Each application source row must name its repository and a full immutable commit'); + return [match[1], match[2]]; + }); + assert.deepEqual( + pairs.map(([repository]) => repository).sort(), + ['MoDiff', 'MoDiff-client'], + 'Reviewed application source repositories must be unique and complete', + ); + const ciPins = Array.from(readme.matchAll(/^CI backend contract: `([^`\r\n]+)`\.[ \t]*\r?$/gmu), (match) => match[1]); + assert.equal(ciPins.length, 1, 'README must declare exactly one CI backend contract pin'); + assert.match(ciPins[0], /^[a-f0-9]{40}$/u, 'The declared CI backend contract must be an immutable commit'); + const checkouts = Array.from(workflow.matchAll(/^([ \t]+)repository: sdevil7th\/MoDiff[ \t]*\r?$/gmu)); + assert.equal(checkouts.length, 2, 'Both CI jobs must check out the reviewed backend repository'); + const backendRefs = checkouts.map((checkout) => { + const fields = []; + const followingLines = workflow + .slice(checkout.index + checkout[0].length) + .split(/\r?\n/u) + .slice(1); + for (const line of followingLines) { + if (!line.trim()) continue; + const indentation = /^[ \t]*/u.exec(line)[0].length; + if (indentation < checkout[1].length) break; + if (line.trimStart().startsWith('ref:')) fields.push(line.trim()); + } + assert.equal(fields.length, 1, 'Each backend checkout must declare exactly one ref'); + const match = /^ref: ([a-f0-9]{40})$/u.exec(fields[0]); + assert.ok(match, 'Each CI backend ref must be a full immutable commit'); + return match[1]; + }); + assert.deepEqual(backendRefs, [ciPins[0], ciPins[0]], 'Both CI jobs must match the documented CI backend contract'); + return { applicationSource: Object.fromEntries(pairs), ciBackendCommit: ciPins[0] }; +} + +test('package identity binds the native uv lock and specialized profile requirements', () => { const root = fixture(); try { const first = buildBackendInstallerPackageSet(root); assert.equal(first.id, 'backend-installer-profiles'); - assert.equal(first.uvProjectManaged, false); + assert.equal(first.uvProjectManaged, true); + assert.match(first.uvLockSha256, /^sha256:[a-f0-9]{64}$/); assert.equal(first.runtimeManifestRevision, 'test-runtime-contract'); assert.match(first.runtimeManifestSha256, /^sha256:[a-f0-9]{64}$/); assert.match(first.runtimeProfiles.cpu.requirementsSha256, /^sha256:[a-f0-9]{64}$/); @@ -46,21 +95,27 @@ test('package identity follows the installer-owned manifest and profile requirem writeFileSync(join(root, 'requirements', 'profiles', 'cpu.txt'), 'torch==2.8.1\n'); const changed = buildBackendInstallerPackageSet(root); assert.notEqual(changed.runtimeProfiles.cpu.requirementsSha256, first.runtimeProfiles.cpu.requirementsSha256); + writeFileSync(join(root, 'uv.lock'), 'version = 1\nrevision = 2\n'); + assert.notEqual(buildBackendInstallerPackageSet(root).uvLockSha256, first.uvLockSha256); } finally { rmSync(root, { recursive: true, force: true }); } }); -test('package contract rejects uv project management and missing profile inputs', () => { - const managedRoot = fixture({ managed: true }); +test('package contract rejects unmanaged projects and missing profile or lock inputs', () => { + const managedRoot = fixture({ managed: false }); const missingRoot = fixture(); + const missingLockRoot = fixture(); try { - assert.throws(() => buildBackendInstallerPackageSet(managedRoot), /managed = false/); + assert.throws(() => buildBackendInstallerPackageSet(managedRoot), /native uv project management/); rmSync(join(missingRoot, 'requirements', 'profiles', 'cpu.txt')); assert.throws(() => buildBackendInstallerPackageSet(missingRoot), /requirements is missing/); + rmSync(join(missingLockRoot, 'uv.lock')); + assert.throws(() => buildBackendInstallerPackageSet(missingLockRoot), /uv lock is missing/); } finally { rmSync(managedRoot, { recursive: true, force: true }); rmSync(missingRoot, { recursive: true, force: true }); + rmSync(missingLockRoot, { recursive: true, force: true }); } }); @@ -75,7 +130,8 @@ test('development installers avoid duplicate client builds and install backend t assert.match(powershell, /-BackendOnly/); assert.match(powershell, /pip install --python \$python -r \$testRequirements/); assert.match(powershell, /requirements\\test\.txt/); - assert.match(powershell, /& npm\.cmd ci\s+if \(\$LASTEXITCODE -ne 0\)/); + assert.match(shell, /npm ci --include=dev/); + assert.match(powershell, /& npm\.cmd ci --include=dev\s+if \(\$LASTEXITCODE -ne 0\)/); }); test('development launchers fail closed and keep live E2E shell-neutral', () => { @@ -112,15 +168,14 @@ test('README follows the paired install and development launcher contract', () = assert.ok(installStart > quickStart, 'Developer quick start must precede launcher installation'); const quick = readme.slice(quickStart, installStart); for (const command of [ - 'git clone https://github.com/sdevil7th/MoDiff.git MoDiff', - 'git clone https://github.com/sdevil7th/MoDiff-client.git MoDiff-client', + 'git clone --branch fix-ui-ux-issues https://github.com/sdevil7th/MoDiff.git MoDiff', + 'git clone --branch fix-ui-ux-issues https://github.com/sdevil7th/MoDiff-client.git MoDiff-client', 'cd MoDiff', - 'uv run --no-project --no-sync --python 3.12 -m modiff.dev plan --accelerator cpu --backend-only --json', - 'uv run --no-project --no-sync --python 3.12 -m modiff.dev setup --accelerator cpu --backend-only --non-interactive', - 'uv run --no-project --no-sync --python 3.12 -m modiff.dev check --json --check-port 8088 --fail-on-error', - 'uv run --no-project --no-sync --python 3.12 -m modiff.dev run', + 'uv sync --locked --extra cpu', + 'uv run --locked --extra cpu python -m modiff.preflight --json --check-port 8088 --fail-on-error', + 'uv run --locked --extra cpu python main.py', 'cd MoDiff-client', - 'npm ci', + 'npm ci --include=dev', 'npm run dev', ]) { assert.ok(quick.split('\n').includes(command), `Quick start is missing command: ${command}`); @@ -132,9 +187,12 @@ test('README follows the paired install and development launcher contract', () = assert.ok(developmentEnd > developmentStart); const development = readme.slice(developmentStart, developmentEnd); - assert.match(readme, /git clone https:\/\/github\.com\/sdevil7th\/MoDiff\.git MoDiff/); - assert.match(readme, /git clone https:\/\/github\.com\/sdevil7th\/MoDiff-client\.git MoDiff-client/); - assert.match(readme, /https:\/\/github\.com\/sdevil7th\/MoDiff#install-and-run/); + assert.match(readme, /git clone --branch fix-ui-ux-issues https:\/\/github\.com\/sdevil7th\/MoDiff\.git MoDiff/); + assert.match( + readme, + /git clone --branch fix-ui-ux-issues https:\/\/github\.com\/sdevil7th\/MoDiff-client\.git MoDiff-client/, + ); + assert.match(readme, /https:\/\/github\.com\/sdevil7th\/MoDiff\/tree\/fix-ui-ux-issues#install-and-run/); assert.match(development, /\.\/install-dev\.sh --accelerator auto/); assert.match(development, /\.\/run-dev\.sh/); assert.match(development, /\.\\install-dev\.ps1 -BackendPath \.\.\\MoDiff -Accelerator auto/); @@ -150,3 +208,85 @@ test('README follows the paired install and development launcher contract', () = assert.doesNotThrow(() => readFileSync(new URL(path, root)), `README link target does not exist: ${target}`); } }); + +test('current setup guides select the published candidate and identify its reviewed application pair', () => { + const clientRoot = new URL('..', import.meta.url); + const guides = [ + new URL('README.md', clientRoot), + new URL('CONTRIBUTING.md', clientRoot), + new URL('docs/windows-support.md', clientRoot), + ]; + for (const guide of guides) { + const text = readFileSync(guide, 'utf8'); + assert.doesNotMatch( + text, + /codex\/windows-delivery-20261026/, + `${guide.pathname} still advertises the superseded setup branch`, + ); + assert.match(text, /fix-ui-ux-issues/, `${guide.pathname} must identify the current candidate`); + } + const readme = readFileSync(guides[0], 'utf8'); + const workflow = readFileSync(new URL('.github/workflows/ci.yml', clientRoot), 'utf8'); + reviewedSetupSourceContract(readme, workflow); + assert.match(readme, /interim Windows candidate/i); + assert.match(readme, /not.*(?:release|released).*`main`/); +}); + +test('reviewed setup source contract keeps application revisions separate from the exact CI backend pin', () => { + const root = new URL('..', import.meta.url); + const readme = readFileSync(new URL('README.md', root), 'utf8'); + const workflow = readFileSync(new URL('.github/workflows/ci.yml', root), 'utf8'); + const first = reviewedSetupSourceContract(readme, workflow); + const nextBackend = 'a'.repeat(40); + const nextClient = 'b'.repeat(40); + const changed = readme + .replace(first.applicationSource.MoDiff, nextBackend) + .replace(first.applicationSource['MoDiff-client'], nextClient); + assert.deepEqual(reviewedSetupSourceContract(changed, workflow), { + applicationSource: { MoDiff: nextBackend, 'MoDiff-client': nextClient }, + ciBackendCommit: first.ciBackendCommit, + }); +}); + +test('reviewed setup source contract rejects missing duplicate mutable and drifting source declarations', () => { + const root = new URL('..', import.meta.url); + const readme = readFileSync(new URL('README.md', root), 'utf8'); + const workflow = readFileSync(new URL('.github/workflows/ci.yml', root), 'utf8'); + const contract = reviewedSetupSourceContract(readme, workflow); + const backendRow = readme.split('\n').find((line) => /^\| MoDiff\s+\|/u.test(line)); + const clientRow = readme.split('\n').find((line) => /^\| MoDiff-client\s+\|/u.test(line)); + const ciLine = `CI backend contract: \`${contract.ciBackendCommit}\`.`; + const mutations = { + 'missing backend row': [readme.replace(`${backendRow}\n`, ''), workflow], + 'missing client row': [readme.replace(`${clientRow}\n`, ''), workflow], + 'duplicate backend row': [readme.replace(clientRow, backendRow), workflow], + 'duplicate client row': [readme.replace(backendRow, clientRow), workflow], + 'unknown application repository': [readme.replace(backendRow, backendRow.replace('MoDiff', 'Other')), workflow], + 'mutable backend source': [readme.replace(contract.applicationSource.MoDiff, 'fix-ui-ux-issues'), workflow], + 'short client source': [readme.replace(contract.applicationSource['MoDiff-client'], '1234567'), workflow], + 'hash prefix with suffix': [ + readme.replace(contract.applicationSource.MoDiff, `${contract.applicationSource.MoDiff}0`), + workflow, + ], + 'missing CI declaration': [readme.replace(ciLine, ''), workflow], + 'duplicate CI declaration': [readme.replace(ciLine, `${ciLine}\n${ciLine}`), workflow], + 'mutable CI declaration': [readme.replace(ciLine, 'CI backend contract: `fix-ui-ux-issues`.'), workflow], + 'one drifting CI job': [readme, workflow.replace(`ref: ${contract.ciBackendCommit}`, `ref: ${'c'.repeat(40)}`)], + 'both drifting CI jobs': [ + readme, + workflow.replaceAll(`ref: ${contract.ciBackendCommit}`, `ref: ${'c'.repeat(40)}`), + ], + 'mutable CI job': [readme, workflow.replace(`ref: ${contract.ciBackendCommit}`, 'ref: fix-ui-ux-issues')], + 'missing CI ref': [readme, workflow.replace(`ref: ${contract.ciBackendCommit}`, '# removed backend ref')], + 'duplicate CI ref': [ + readme, + workflow.replace( + `ref: ${contract.ciBackendCommit}`, + `ref: ${contract.ciBackendCommit}\n ref: ${contract.ciBackendCommit}`, + ), + ], + 'missing backend checkout': [readme, workflow.replace('repository: sdevil7th/MoDiff', 'repository: other/MoDiff')], + }; + for (const [label, [changedReadme, changedWorkflow]] of Object.entries(mutations)) + assert.throws(() => reviewedSetupSourceContract(changedReadme, changedWorkflow), undefined, label); +}); diff --git a/scripts/backend-node-registry.mjs b/scripts/backend-node-registry.mjs index 9f3c4921..92d9efe8 100644 --- a/scripts/backend-node-registry.mjs +++ b/scripts/backend-node-registry.mjs @@ -153,7 +153,14 @@ export function readBundledBackendNodeRegistry(backendRoot) { for (const moduleEntry of modules) { const moduleRoot = join(modulesRoot, moduleEntry.name); const initPath = join(moduleRoot, '__init__.py'); - if (!existsSync(initPath)) throw new Error(`Bundled backend module has no __init__.py: ${moduleRoot}`); + if (!existsSync(initPath)) { + // A checkout can retain empty module directories or bytecode after the + // source was removed. Runtime discovery registers no nodes from them. + // Any other content is an incomplete module and must still fail closed. + const contents = readdirSync(moduleRoot, { withFileTypes: true }); + if (contents.every((entry) => entry.isDirectory() && entry.name === '__pycache__')) continue; + throw new Error(`Bundled backend module has no __init__.py: ${moduleRoot}`); + } const initSource = readFileSync(initPath, 'utf8'); const actions = new Set(precomputedModuleMapKeys(initSource, initPath)); for (const stem of moduleParseStems(initSource, initPath)) { diff --git a/scripts/backend-node-registry.test.mjs b/scripts/backend-node-registry.test.mjs index d03c6452..3551789f 100644 --- a/scripts/backend-node-registry.test.mjs +++ b/scripts/backend-node-registry.test.mjs @@ -73,3 +73,40 @@ test('unresolvable precomputed backend registries fail closed', () => { rmSync(root, { recursive: true, force: true }); } }); + +test('removed modules with only residual bytecode do not block the bundled registry', () => { + const root = mkdtempSync(join(tmpdir(), 'modiff-backend-registry-')); + try { + moduleFixture(root, 'Direct', 'from .main import *\n', { + 'main.py': 'class Load(NodeBase):\n pass\n', + }); + mkdirSync(join(root, 'modules', 'Empty'), { recursive: true }); + const cache = join(root, 'modules', 'Removed', '__pycache__'); + mkdirSync(cache, { recursive: true }); + writeFileSync(join(cache, '__init__.cpython-312.pyc'), 'not executable source'); + assert.deepEqual([...readBundledBackendNodeRegistry(root)], ['modules.Direct.Load']); + + writeFileSync(join(root, 'modules', 'Removed', 'main.py'), 'class Hidden(NodeBase):\n pass\n'); + assert.throws(() => readBundledBackendNodeRegistry(root), /has no __init__\.py/); + } finally { + rmSync(root, { recursive: true, force: true }); + } +}); + +test('non-cache files and directories without an initializer still fail closed', () => { + for (const name of ['notes.txt', 'nested']) { + const root = mkdtempSync(join(tmpdir(), 'modiff-backend-registry-')); + try { + moduleFixture(root, 'Direct', 'from .main import *\n', { + 'main.py': 'class Load(NodeBase):\n pass\n', + }); + const moduleRoot = join(root, 'modules', 'Incomplete'); + mkdirSync(moduleRoot); + if (name === 'nested') mkdirSync(join(moduleRoot, name)); + else writeFileSync(join(moduleRoot, name), 'source may be missing'); + assert.throws(() => readBundledBackendNodeRegistry(root), /has no __init__\.py/); + } finally { + rmSync(root, { recursive: true, force: true }); + } + } +}); diff --git a/scripts/backend-proxy-lifecycle.test.mjs b/scripts/backend-proxy-lifecycle.test.mjs new file mode 100644 index 00000000..9fe56e6f --- /dev/null +++ b/scripts/backend-proxy-lifecycle.test.mjs @@ -0,0 +1,185 @@ +import assert from 'node:assert/strict'; +import { after, before, test } from 'node:test'; +import { EventEmitter } from 'node:events'; +import { createHash } from 'node:crypto'; +import { createServer as createHttpServer, request } from 'node:http'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { createLogger, createServer } from 'vite'; +import { chromium } from 'playwright'; + +const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); +let loader; +let lifecycleModule; + +before(async () => { + loader = await createServer({ + root: ROOT, + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + lifecycleModule = await loader.ssrLoadModule('/scripts/backend-proxy-lifecycle.ts'); +}); +after(async () => { + await loader?.close(); +}); + +test('only known errors owned by a disconnected browser bypass the proxy error logger', () => { + const lifecycle = lifecycleModule.backendProxyLifecycle(); + const errors = []; + const config = { logger: { error: (message) => errors.push(message) } }; + lifecycle.plugin.configResolved(config); + const proxy = new EventEmitter(); + lifecycle.configure(proxy); + const socket = new EventEmitter(); + const outgoing = new EventEmitter(); + proxy.emit('proxyReqWs', outgoing, new EventEmitter(), socket); + const upstreamFailure = Object.assign(new Error('upstream failed'), { code: 'ECONNRESET' }); + proxy.emit('error', upstreamFailure, {}, socket); + config.logger.error('upstream failed', { error: upstreamFailure }); + assert.deepEqual(errors, ['upstream failed']); + socket.emit('end'); + for (const code of ['ECONNRESET', 'ECONNABORTED', 'EPIPE']) { + const expected = Object.assign(new Error('browser left'), { code }); + outgoing.emit('error', expected); + config.logger.error('browser left', { error: expected }); + } + const unrelated = Object.assign(new Error('refused'), { code: 'ECONNREFUSED' }); + proxy.emit('error', unrelated, {}, socket); + config.logger.error('refused', { error: unrelated }); + config.logger.error('another error with similar text', { error: new Error('ECONNRESET') }); + assert.deepEqual(errors, ['upstream failed', 'refused', 'another error with similar text']); +}); + +async function openSocket(port) { + return new Promise((resolve, reject) => { + const client = request({ + hostname: '127.0.0.1', + port, + path: '/ws?sid=isolated-probe', + headers: { + Connection: 'Upgrade', + Upgrade: 'websocket', + 'Sec-WebSocket-Version': '13', + 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==', + }, + }); + client.on('error', reject); + client.on('upgrade', (_response, socket) => { + socket.on('error', () => {}); + resolve(socket); + }); + client.end(); + }); +} + +test('real websocket proxy treats browser reset as teardown and reports an upstream reset', async () => { + const backend = createHttpServer(); + const backendSockets = new Set(); + backend.on('upgrade', (incoming, socket) => { + backendSockets.add(socket); + socket.on('close', () => backendSockets.delete(socket)); + socket.on('error', () => {}); + const accept = createHash('sha1') + .update(incoming.headers['sec-websocket-key'] + '258EAFA5-E914-47DA-95CA-C5AB0DC85B11') + .digest('base64'); + socket.write( + `HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: ${accept}\r\n\r\n`, + ); + const payload = JSON.stringify({ task_id: 'retained-task', status: 'running' }); + socket.write(Buffer.concat([Buffer.from([0x81, Buffer.byteLength(payload)]), Buffer.from(payload)])); + }); + await new Promise((resolve) => backend.listen(0, '127.0.0.1', resolve)); + const lifecycle = lifecycleModule.backendProxyLifecycle(); + const errors = []; + const logger = createLogger('silent'); + logger.error = (message) => errors.push(message); + const frontend = await createServer({ + root: ROOT, + configFile: false, + customLogger: logger, + plugins: [ + lifecycle.plugin, + { + name: 'isolated-browser-socket-probe', + configureServer(server) { + server.middlewares.use((incoming, response, next) => { + if (incoming.url !== '/socket-probe') return next(); + response.setHeader('Content-Type', 'text/html'); + response.end(`

connecting

`); + }); + }, + }, + ], + optimizeDeps: { entries: [], noDiscovery: true }, + server: { + host: '127.0.0.1', + port: 0, + watch: null, + hmr: false, + proxy: { + '/ws': { target: `http://127.0.0.1:${backend.address().port}`, ws: true, configure: lifecycle.configure }, + }, + }, + appType: 'custom', + }); + const clients = []; + try { + await frontend.listen(); + const port = frontend.httpServer.address().port; + for (let attempt = 0; attempt < 3; attempt += 1) { + const browser = await openSocket(port); + clients.push(browser); + browser.resetAndDestroy(); + await new Promise((resolve) => setTimeout(resolve, 20)); + } + assert.deepEqual(errors, [], 'browser resets must not emit proxy stack traces'); + const browser = await openSocket(port); + clients.push(browser); + const upstream = [...backendSockets].at(-1); + assert.ok(upstream); + upstream.resetAndDestroy(); + await new Promise((resolve) => setTimeout(resolve, 30)); + assert.ok( + errors.some((message) => message.includes('ws proxy error')), + 'an upstream reset while the browser is connected must remain visible', + ); + errors.length = 0; + const browserProcess = await chromium.launch({ headless: true }); + try { + const page = await browserProcess.newPage(); + for (let refresh = 0; refresh < 3; refresh += 1) { + await page.goto(`http://127.0.0.1:${port}/socket-probe`); + await page.waitForFunction( + () => + document.querySelector('#connection').textContent === 'connected' && + document.querySelector('#task').textContent === 'retained-task:running', + ); + } + await page.close(); + await new Promise((resolve) => setTimeout(resolve, 30)); + assert.deepEqual( + errors, + [], + 'browser refresh and close must preserve handshake/task delivery without proxy stack traces', + ); + } finally { + await browserProcess.close(); + } + } finally { + for (const client of clients) client.destroy(); + for (const socket of backendSockets) socket.destroy(); + await frontend.close(); + await new Promise((resolve) => backend.close(resolve)); + } +}); diff --git a/scripts/backend-proxy-lifecycle.ts b/scripts/backend-proxy-lifecycle.ts new file mode 100644 index 00000000..6d89cc83 --- /dev/null +++ b/scripts/backend-proxy-lifecycle.ts @@ -0,0 +1,56 @@ +import type { Plugin, ProxyOptions } from 'vite'; +import type { Socket } from 'node:net'; + +/** Classify errors only after the browser's own proxied socket has closed. */ +export function backendProxyLifecycle() { + const expectedErrors = new WeakSet(); + const clients = new WeakMap(); + const expectedCodes = new Set(['ECONNRESET', 'ECONNABORTED', 'EPIPE']); + const classify = (error: Error, client: { closed: boolean }) => { + const code = 'code' in error ? error.code : undefined; + if (client.closed && typeof code === 'string' && expectedCodes.has(code)) expectedErrors.add(error); + }; + + const configure: NonNullable = (proxy) => { + proxy.on('proxyReqWs', (request, incoming, socket) => { + const client = { closed: false }; + clients.set(socket, client); + socket.once('end', () => { + client.closed = true; + }); + socket.once('close', () => { + client.closed = true; + }); + // Vite adds its diagnostic listener after this callback. Retain the + // error's ownership so its logger can distinguish navigation from an + // upstream reset while the browser remains connected. + const clientError = (error: Error) => { + client.closed = true; + classify(error, client); + }; + incoming.prependListener('error', clientError); + socket.prependListener('error', clientError); + request.on('error', (error) => classify(error, client)); + request.on('upgrade', (_response, upstream) => { + upstream.prependListener('error', (error) => classify(error, client)); + }); + }); + proxy.on('error', (error, _incoming, response) => { + const client = clients.get(response as Socket); + if (client) classify(error, client); + }); + }; + + const plugin: Plugin = { + name: 'modiff-backend-proxy-lifecycle', + apply: 'serve', + configResolved(config) { + const reportError = config.logger.error.bind(config.logger); + config.logger.error = (message, options) => { + if (options?.error instanceof Error && expectedErrors.has(options.error)) return; + reportError(message, options); + }; + }, + }; + return { configure, plugin }; +} diff --git a/scripts/block-container-interface-v1.test.mjs b/scripts/block-container-interface-v1.test.mjs index 1785982e..ca7c3f21 100644 --- a/scripts/block-container-interface-v1.test.mjs +++ b/scripts/block-container-interface-v1.test.mjs @@ -10,7 +10,16 @@ const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); let schema; let server; let fixture, previewFixture; -let runtime, editing, surfaces, persistence, flowStore, drops, connections, interfaceEditing, previewOptions; +let runtime, + editing, + surfaces, + persistence, + flowStore, + drops, + connections, + interfaceEditing, + previewOptions, + fieldActions; before(async () => { const storage = new Map(); @@ -47,6 +56,7 @@ before(async () => { connections = await server.ssrLoadModule('/src/studio/blockControlConnectionsV2.ts'); interfaceEditing = await server.ssrLoadModule('/src/studio/blockInterfaceEditingV2.ts'); previewOptions = await server.ssrLoadModule('/src/studio/blockPreviewOptionsV2.ts'); + fieldActions = await server.ssrLoadModule('/src/studio/visualStageFieldActions.ts'); fixture = JSON.parse( await readFile(path.join(ROOT, '../MoDiff/tests/fixtures/block_container_interface_v1.json'), 'utf8'), ); @@ -89,6 +99,140 @@ function handle(node, direction, fieldId) { ); } +test('a visual executable container keeps native callback fields behind its local aliases', () => { + const definition = structuredClone(fixture); + definition.source.provider = 'modiff.visual-stages.regression.v1'; + const stage = definition.graph.nodes[0]; + stage.data.module = 'modules.Test'; + stage.data.action = 'Denoise'; + stage.data.params.width = { type: 'int', value: 768 }; + stage.containerInterface.controls = [ + { controlId: 'width', label: 'Width', valueType: 'int', binding: { nodeId: 'stage', fieldId: 'width' }, order: 0 }, + ]; + const current = runtime.setBlockPresentationV2(instance(rehash(definition)), { expanded: true }); + const graph = runtime.materializeBlockProjectionV2(runtime.createBlockRootNodeV2(current)); + const visible = graph.nodes.find((node) => node.data.blockProjectionNodeId === 'stage'); + const fieldKey = Object.keys(visible.data.params).find((key) => key.startsWith('block-local-control:')); + const sources = fieldActions.visualStageFieldSources(graph.nodes, { + nodeId: visible.id, + fieldKey, + module: visible.data.module, + action: visible.data.action, + }); + assert.equal(sources?.[0].fieldKey, 'width'); + assert.equal(sources?.[0].param.value, 768); + assert.equal(sources?.[0].node.data.action, 'Denoise'); +}); + +for (const display of ['input', 'output']) { + test(`an ordinary user Block native ${display} is not recursively treated as another interface`, () => { + const definition = structuredClone(fixture); + const native = definition.graph.nodes.find((node) => node.nodeId === 'generate'); + native.data.params.media = { type: 'image', display }; + const current = runtime.setBlockPresentationV2(instance(rehash(definition)), { + expanded: true, + collapsedContainerNodeIds: [], + }); + const graph = runtime.materializeBlockProjectionV2(runtime.createBlockRootNodeV2(current)); + const visible = graph.nodes.find((node) => node.data.blockProjectionNodeId === 'generate'); + assert.ok(visible && !visible.data.blockProjectionContainer); + const before = structuredClone(current); + // Native callbacks already use the direct owner. The visual-interface + // resolver must terminate here instead of following this same socket again. + assert.equal( + fieldActions.visualStageFieldSources(graph.nodes, { + nodeId: visible.id, + fieldKey: 'media', + module: visible.data.module, + action: visible.data.action, + }), + null, + ); + assert.deepEqual(current, before); + }); +} + +test('a cyclic projected container socket fails closed without overflowing or rewriting its Block', () => { + const definition = structuredClone(fixture); + const semantic = definition.graph.nodes.find((node) => node.nodeId === 'stage'); + semantic.data.module = 'modules.Test'; + semantic.data.action = 'Container'; + semantic.data.params.media = { type: 'image', display: 'input' }; + const current = runtime.setBlockPresentationV2(instance(rehash(definition)), { + expanded: true, + collapsedContainerNodeIds: [], + }); + const graph = runtime.materializeBlockProjectionV2(runtime.createBlockRootNodeV2(current)); + const visible = graph.nodes.find((node) => node.data.blockProjectionNodeId === 'stage'); + // A stale/untrusted projection claims that its socket maps back to itself. + visible.data.module = 'modules.Test'; + visible.data.action = 'Container'; + visible.data.params.media = { type: 'image', display: 'input' }; + const before = structuredClone(current); + assert.equal( + fieldActions.visualStageFieldSources(graph.nodes, { + nodeId: visible.id, + fieldKey: 'media', + module: visible.data.module, + action: visible.data.action, + }), + null, + ); + assert.deepEqual(current, before); +}); + +for (const nested of [false, true]) { + test(`visual stage local field actions resolve the original native owner${nested ? ' after nesting' : ''}`, () => { + const definition = structuredClone(fixture); + definition.source.provider = 'modiff.visual-stages.regression.v1'; + let current = instance(rehash(definition)); + if (nested) { + const fragment = current; + current = schema.createBlockInstanceV2(rehash(definition), { + instanceId: 'outer-visual-stage', + position: { x: 0, y: 0 }, + size: { width: 400, height: 320 }, + expanded: true, + }); + const get = loadStore(current); + drops.insertNodeAtBlockTargetV2(runtime.createBlockRootNodeV2(fragment), get().nodes[0], get(), (node) => + get().addNode(node), + ); + current = get().nodes.find((node) => node.id === current.instanceId).data.blockInstanceV2; + } + current = runtime.setBlockPresentationV2(current, { expanded: true, collapsedContainerNodeIds: [] }); + const before = structuredClone(current); + const graph = runtime.materializeBlockProjectionV2(runtime.createBlockRootNodeV2(current)); + const container = graph.nodes.find( + (node) => + node.data.blockProjectionContainer && + (!nested || + current.effectiveGraph.nodes.find((member) => member.nodeId === node.data.blockProjectionNodeId) + ?.parentNodeId) && + Object.values(node.data.params).some((param) => param.fieldOptions?.blockContainerControlV1), + ); + assert.ok(container); + const [fieldKey, param] = Object.entries(container.data.params).find( + ([, param]) => param.fieldOptions?.blockContainerControlV1, + ); + const binding = connections.blockControlBindingV2(container, fieldKey, param, graph.nodes).control.binding; + const props = { nodeId: container.id, fieldKey, module: container.data.module, action: container.data.action }; + const sources = fieldActions.visualStageFieldSources(graph.nodes, props); + assert.ok(sources?.length, 'a projected local control must route to its declared native field'); + assert.equal(sources[0].node.id, runtime.blockProjectionNodeIdV2(current.instanceId, binding.nodeId)); + assert.equal(sources[0].fieldKey, binding.fieldId); + assert.equal(sources[0].node.data.module, 'modules.Test'); + assert.equal(sources[0].node.data.action, 'Generate'); + assert.equal(sources[0].param.value, 'a detailed greenhouse'); + assert.equal(fieldActions.visualStageFieldSources(graph.nodes, { ...props, action: 'StaleAction' }), null); + const ownerId = param.fieldOptions.blockContainerControlV1.ownerId; + param.fieldOptions.blockContainerControlV1.ownerId = 'unrelated-owner'; + assert.equal(fieldActions.visualStageFieldSources(graph.nodes, props), null); + param.fieldOptions.blockContainerControlV1.ownerId = ownerId; + assert.deepEqual(current, before, 'resolving a callback does not rewrite persisted values or execution'); + }); +} + test('configuring a container changes only its declaration and not root ports, parameters or sibling nodes', () => { const current = instance(); const draft = structuredClone(local(current)); @@ -407,6 +551,105 @@ test('connected control hints include public drivers and partial mirror targets assert.equal(schema.blockInstanceValueV2(current, 'prompt'), 'saved fallback'); }); +test('runtime availability follows declared root and nested consumers without changing choices or authority', async () => { + const options = await server.ssrLoadModule('/src/studio/runtimeOptions.ts'); + const descriptor = (value, ready) => ({ + schemaVersion: 1, + value, + label: value, + compatibility: ready ? 'compatible' : 'incompatible', + availability: ready ? 'installed' : 'unavailable', + installationState: ready ? 'installed' : 'unavailable', + }); + for (const [savedReady, liveReady] of [ + [false, true], + [true, false], + ]) { + const definition = structuredClone(publicPromptFixture().definitionSnapshot); + const supplier = definition.graph.nodes.find((node) => node.nodeId === 'generate'); + const saved = [descriptor('saved fallback', true), descriptor('reviewed-format', savedReady)]; + supplier.data.params.prompt.options = saved; + const current = instance(rehash(definition)); + const before = JSON.stringify(current); + const projection = project( + runtime.setBlockPresentationV2(current, { expanded: true, collapsedContainerNodeIds: ['stage'] }), + ); + const owner = projection.nodes.find((node) => node.id === current.instanceId); + const registry = { + [`${supplier.data.module}.${supplier.data.action}`]: { + params: { + prompt: { + options: [ + descriptor('saved fallback', true), + descriptor('reviewed-format', liveReady), + descriptor('not-authored', true), + ], + }, + }, + }, + }; + const rootParam = runtime.blockControlParamsV2(current).prompt; + const stage = projection.nodes.find((node) => node.data.blockProjectionNodeId === 'stage'); + const local = Object.entries(stage.data.params).find(([, param]) => param.fieldOptions?.blockContainerControlV1); + for (const [node, key, param] of [ + [owner, 'prompt', rootParam], + [stage, ...local], + ]) { + const shown = options.blockRuntimeOptionPresentation(param.options, key, param, node, owner, registry); + const entries = options.runtimeOptionEntries(shown); + assert.deepEqual( + entries.map((entry) => entry.value), + ['saved fallback', 'reviewed-format'], + ); + assert.equal(entries.find((entry) => entry.value === 'reviewed-format').disabled, !liveReady); + } + const forged = structuredClone(rootParam); + forged.fieldOptions.blockBindingV2.ownerId = 'another-owner'; + assert.equal(options.blockRuntimeOptionPresentation(saved, 'prompt', forged, owner, owner, registry), null); + const dynamic = structuredClone(registry); + dynamic[`${supplier.data.module}.${supplier.data.action}`].params.prompt.optionsSource = {}; + assert.equal(options.blockRuntimeOptionPresentation(saved, 'prompt', rootParam, owner, owner, dynamic), saved); + assert.equal(JSON.stringify(current), before); + } + const definition = structuredClone(publicPromptFixture().definitionSnapshot); + const supplier = definition.graph.nodes.find((node) => node.nodeId === 'generate'); + supplier.data.params.prompt.options = [descriptor('saved fallback', true), descriptor('reviewed-format', false)]; + const second = structuredClone(supplier); + second.nodeId = 'generate2'; + second.data.action = 'AnotherDeclaredConsumer'; + second.modularDiffusers.placementPath = ['stage', 'generate2']; + second.modularDiffusers.runtimeRole = 'generate2'; + definition.graph.nodes.push(second); + definition.graph.executionOrder.push(second.nodeId); + definition.controls[0].mirrorBindings = [{ nodeId: 'generate2', fieldId: 'prompt' }]; + const current = instance(rehash(definition)); + const owner = runtime.createBlockRootNodeV2(current); + const param = runtime.blockControlParamsV2(current).prompt; + const registry = Object.fromEntries( + [supplier, second].map((node, index) => [ + `${node.data.module}.${node.data.action}`, + { + params: { + prompt: { options: [descriptor('saved fallback', true), descriptor('reviewed-format', index === 0)] }, + }, + }, + ]), + ); + const shown = options.blockRuntimeOptionPresentation(param.options, 'prompt', param, owner, owner, registry); + assert.equal( + options.runtimeOptionEntries(shown).find((entry) => entry.value === 'reviewed-format').disabled, + true, + 'One incompatible mirror must prevent enabling the shared choice.', + ); + registry[`${second.data.module}.${second.data.action}`].params.prompt = { type: 'string' }; + const freeMirror = options.blockRuntimeOptionPresentation(param.options, 'prompt', param, owner, owner, registry); + assert.equal( + options.runtimeOptionEntries(freeMirror).find((entry) => entry.value === 'reviewed-format').disabled, + false, + 'An unrestricted string mirror accepts the primary consumer choices.', + ); +}); + test('internal and public driver conflicts reject atomically in both insertion directions', () => { for (const internalFirst of [false, true]) { const current = publicPromptFixture(); @@ -1564,6 +1807,116 @@ test('root Run includes every local branch even without a preview and never runs } }); +test('disabled Block leaves survive projection, persistence and whole-workflow export', () => { + const baseline = instance(previewFixture); + const graph = structuredClone(baseline.effectiveGraph); + graph.nodes.find((n) => n.nodeId === 'caption').data.uiState = { + disabled: true, + errorMessage: 'Transient runtime error', + encodingSummaries: { image: { graphHash: 'old-run', value: 'transient' } }, + }; + graph.nodes.find((n) => n.nodeId === 'sibling').data.uiState = { + disabled: false, + validationMessage: 'Transient validation', + }; + const current = runtime.replaceBlockEffectiveGraphV2(baseline, graph); + const before = structuredClone(current); + const root = runtime.createBlockRootNodeV2( + runtime.setBlockPresentationV2(current, { expanded: true, collapsedContainerNodeIds: [] }), + ); + for (const view of [ + runtime.blockOperationGraphV2(current), + runtime.materializeBlockProjectionV2(root), + runtime.expandBlockGraphV2ForExecution([root], []), + ]) { + assert.deepEqual(view.nodes.find((n) => n.data.blockProjectionNodeId === 'caption').data.uiState, { + disabled: true, + }); + assert.deepEqual(view.nodes.find((n) => n.data.blockProjectionNodeId === 'sibling').data.uiState, { + disabled: false, + }); + } + const enabledExport = loadStore(baseline)().exportGraph('disabled-leaf'); + const disabledId = runtime.blockProjectionNodeIdV2(current.instanceId, 'caption'); + delete enabledExport.nodes[disabledId]; + enabledExport.paths = enabledExport.paths.filter((p) => !p.includes(disabledId)); + const get = loadStore(current); + const expected = ['generate', 'sibling'].map((id) => runtime.blockProjectionNodeIdV2(current.instanceId, id)); + const exported = get().exportGraph('disabled-leaf'); + assert.deepEqual(exported, enabledExport, 'only the disabled leaf is omitted from the exact API graph'); + assert.deepEqual(Object.keys(exported.nodes).sort(), expected.sort()); + assert.deepEqual(exported.paths.map((p) => [...p]).sort(), expected.map((id) => [id]).sort()); + const saved = JSON.parse(JSON.stringify(get().toObject())); + get().replaceGraph(saved); + assert.deepEqual(get().exportGraph('disabled-leaf'), exported); + assert.deepEqual( + get().nodes.find((n) => n.id === current.instanceId).data.blockInstanceV2.definitionSnapshot, + baseline.definitionSnapshot, + ); + assert.deepEqual(current, before, 'projection must not rewrite disabled or transient saved data'); +}); + +test('required image readiness uses directly disabled Block leaves and disabled ancestors', async () => { + const { inspectBlockMediaInputsV2 } = await server.ssrLoadModule('/src/studio/blockMediaReadinessV2.ts'); + const baseline = instance(previewFixture); + const graph = structuredClone(baseline.effectiveGraph); + const leaf = graph.nodes.find((n) => n.nodeId === 'caption'); + Object.assign(leaf.data, { + module: 'modules.ModularDiffusers', + action: 'ImageEncode', + label: 'Encode Image', + operationAuthoring: { + schemaVersion: 1, + defaults: {}, + retained: [], + operation: { + pipelineClass: 'ExamplePipeline', + task: 'image_to_image', + operationId: 'diffusion.encode_image', + nodeKey: 'modules.ModularDiffusers.ImageEncode', + nodeType: 'custom', + blockName: 'ImageEncode', + decomposition: 'block', + support: 'declared', + workflowId: null, + binding: { pipelineClass: 'ExamplePipeline', values: {} }, + ports: [ + { + name: 'image', + semanticName: 'image', + direction: 'input', + roles: ['value'], + types: ['image'], + required: true, + hidden: false, + semantics: { kind: 'media', scope: null, state: null, owner: 'none', members: [] }, + }, + ], + }, + }, + }); + leaf.data.params.image = { type: 'image', display: 'input' }; + const inspect = () => { + const current = runtime.replaceBlockEffectiveGraphV2(baseline, graph); + const before = structuredClone(current); + const root = runtime.createBlockRootNodeV2(current); + const issues = inspectBlockMediaInputsV2([root], runtime.expandBlockGraphV2ForExecution([root], [])); + assert.deepEqual(current, before); + assert.deepEqual(current.definitionSnapshot, baseline.definitionSnapshot); + return issues; + }; + assert.deepEqual( + inspect().map((issue) => issue.message), + ['Encode Image needs image before running.'], + ); + leaf.data.uiState = { disabled: true }; + assert.deepEqual(inspect(), [], 'retained unmatched image stage must not block text-to-image'); + leaf.data.uiState.disabled = false; + assert.equal(inspect().length, 1, 're-enabling the image stage restores required-media validation'); + graph.nodes.find((n) => n.nodeId === 'stage').data.uiState = { disabled: true }; + assert.deepEqual(inspect(), [], 'an enabled leaf still inherits its disabled ancestor'); +}); + test('nested Run excludes disabled children and explains an entirely disabled subtree', () => { const definition = structuredClone(previewFixture); definition.graph.nodes.find((n) => n.nodeId === 'caption').data.uiState = { disabled: true }; diff --git a/scripts/block-media-readiness-v2.test.mjs b/scripts/block-media-readiness-v2.test.mjs index 124eceff..4f2ed564 100644 --- a/scripts/block-media-readiness-v2.test.mjs +++ b/scripts/block-media-readiness-v2.test.mjs @@ -360,6 +360,38 @@ test('connected built-in loaders need files only when supplying declared require } }); +test('required files name their Source Image and Mask while preserving custom names and targets', async () => { + const { inspectRequiredGraphInputs } = await server.ssrLoadModule('/src/studio/requiredGraphInputs.ts'); + for (const [role, caption] of [ + ['loadImage', 'Source Image'], + ['loadMask', 'Mask'], + ]) { + const f = fixture('', { required: false }); + f.instance.effectiveGraph.nodes = [{ nodeId: 'loadMask' }]; + Object.assign(f.leaf.data, { label: 'Load Image', studioRole: role }); + Object.assign(f.leaf.data.params.file, { required: true, label: 'file' }); + const checks = [ + [(visible) => inspectRequiredGraphInputs(visible, f.graph, {}), 'needs file before running.'], + [(visible) => inspect(visible, f.graph), 'needs a file before running.'], + ]; + const before = structuredClone(f); + for (const [check, message] of checks) { + const [visible] = check([...f.roots, f.leaf]); + assert.equal(visible.message, caption + ' ' + message); + assert.equal(visible.nodeId, f.leaf.id); + assert.equal(visible.fieldId, 'file'); + const [collapsed] = check(f.roots); + assert.equal(collapsed.message, visible.message); + assert.equal(collapsed.nodeId, f.root.id); + assert.equal(collapsed.fieldId, undefined); + } + assert.deepEqual(f, before); + f.leaf.data.label = 'My studio reference'; + for (const [check, message] of checks) + assert.equal(check([...f.roots, f.leaf])[0].message, 'My studio reference ' + message); + } +}); + test('required model inputs use current registry contracts inside collapsed Blocks', async () => { const { inspectRequiredGraphInputs } = await server.ssrLoadModule('/src/studio/requiredGraphInputs.ts'); const { roots, graph, leaf, instance } = fixture(''); @@ -376,7 +408,14 @@ test('required model inputs use current registry contracts inside collapsed Bloc assert.equal(missing.length, 1); assert.equal(missing[0].blocking, true); assert.equal(missing[0].nodeId, 'root'); - const source = { id: 'loader', data: { params: { models: { type: 'models', display: 'output' } } } }; + const source = { + id: 'loader', + data: { + module: 'modules.Test', + action: 'Load', + params: { models: { type: 'models', display: 'output' } }, + }, + }; graph.nodes.push(source); graph.edges.push({ id: 'wire', source: source.id, sourceHandle: 'models', target: leaf.id, targetHandle: 'models' }); assert.deepEqual(inspectRequiredGraphInputs(roots, graph, registry), []); @@ -388,3 +427,106 @@ test('required model inputs use current registry contracts inside collapsed Bloc assert.deepEqual(inspectRequiredGraphInputs(roots, { nodes: [leaf], edges: [] }, registry), []); } }); + +test('structural stage file aliases do not mask valid nested loaders or duplicate their missing-input errors', async () => { + const { inspectRequiredGraphInputs } = await server.ssrLoadModule('/src/studio/requiredGraphInputs.ts'); + for (const kind of ['image', 'audio', 'video']) { + const f = fixture([`@data/${kind}/first`, `@data/${kind}/second`]); + f.instance.effectiveGraph.nodes = [{ nodeId: 'loadMask' }]; + const container = { + id: 'stage-container', + data: { + type: 'group', + module: '', + action: 'stage-container', + label: `${kind} input`, + params: { + 'load:file': { display: 'filebrowser', type: 'str', value: [], required: true }, + }, + }, + }; + f.graph.nodes.push(container); + const before = structuredClone(f); + assert.deepEqual(inspectRequiredGraphInputs(f.roots, f.graph, {}), [], kind); + assert.deepEqual(f, before, 'Readiness must not repair containers or rewrite selected files.'); + f.leaf.data.params.file.value = []; + const missing = inspectRequiredGraphInputs(f.roots, f.graph, {}); + assert.equal(missing.length, 1, kind); + assert.equal(missing[0].nodeId, 'root'); + assert(missing[0].id.startsWith(`required-input:${f.leaf.id}:`)); + container.data.params.file_out = { display: 'output', type: 'str' }; + f.graph.edges.push({ source: container.id, sourceHandle: 'file_out', target: f.leaf.id, targetHandle: 'file' }); + assert.equal( + inspectRequiredGraphInputs(f.roots, f.graph, {}).length, + 1, + 'A structural alias cannot supply a real file.', + ); + f.leaf.data.uiState = { disabled: true }; + assert.deepEqual(inspectRequiredGraphInputs(f.roots, f.graph, {}), [], kind); + } +}); + +test('selected backend block contracts own required inputs; authored hints and computed selectors do not', async () => { + const { inspectRequiredGraphInputs } = await server.ssrLoadModule('/src/studio/requiredGraphInputs.ts'); + const key = 'modules.ModularDiffusers.WorkflowImageEncode'; + const registry = { + [key]: { + params: { + image: { type: 'image', display: 'input', required: true }, + state_in: { type: 'modular_workflow_state', display: 'input', required: true }, + }, + }, + }; + const node = { + id: 'encode', + data: { + module: 'modules.ModularDiffusers', + action: 'WorkflowImageEncode', + params: { + pipeline_class: { value: 'SelectedPipeline' }, + workflow_id: { value: 'image_conditioned' }, + block_path: { value: 'vae_encoder' }, + image: { ...registry[key].params.image, required: false }, + state_in: { ...registry[key].params.state_in, value: 'sealed state' }, + }, + }, + }; + const operation = { + nodeKey: key, + pipelineClass: 'SelectedPipeline', + decomposition: 'block', + binding: { + pipelineClass: 'SelectedPipeline', + values: { + pipeline_class: 'SelectedPipeline', + workflow_id: 'image_conditioned', + block_path: 'vae_encoder', + }, + }, + ports: [{ name: 'state_in', direction: 'input', required: true, hidden: false, types: ['modular_workflow_state'] }], + }; + const graph = { nodes: [node], edges: [] }; + const issues = (operations = [operation]) => inspectRequiredGraphInputs([node], graph, registry, operations); + assert.deepEqual(issues(), [], 'a prepared-state encoder must not require a nonexistent direct image socket'); + assert.deepEqual(issues([operation, structuredClone(operation)]), [], 'identical declarations across tasks agree'); + node.data.params.state_in.value = undefined; + assert.deepEqual( + issues().map((i) => i.id), + ['required-input:encode:state_in'], + ); + node.data.params.state_in.value = 'sealed state'; + const direct = structuredClone(operation); + direct.ports.push({ name: 'image', direction: 'input', required: true, hidden: false, types: ['image'] }); + assert.equal(issues([direct]).length, 1, 'direct-image encoders remain required'); + assert.equal(issues([operation, direct]).length, 1, 'conflicting declarations fall back conservatively'); + node.data.operationAuthoring = { operation }; + assert.equal(issues([]).length, 1, 'saved operation hints cannot override the backend registry'); + for (const field of ['pipeline_class', 'workflow_id', 'block_path']) { + node.data.params[field].isConnected = true; + assert.equal(issues().length, 1, `computed ${field} is not a literal selection`); + delete node.data.params[field].isConnected; + graph.edges = [{ source: 'computed', target: node.id, targetHandle: field }]; + assert.equal(issues().length, 1); + graph.edges = []; + } +}); diff --git a/scripts/block-renderer-v2.test.mjs b/scripts/block-renderer-v2.test.mjs index b1a4ace4..1116215d 100644 --- a/scripts/block-renderer-v2.test.mjs +++ b/scripts/block-renderer-v2.test.mjs @@ -35,9 +35,16 @@ before(async () => { removeItem: (key) => storage.delete(key), setItem: (key, value) => storage.set(key, String(value)), }; + const sessionValuesForPage = new Map(); + globalThis.sessionStorage = { + getItem: (key) => sessionValuesForPage.get(key) ?? null, + setItem: (key, value) => sessionValuesForPage.set(key, String(value)), + removeItem: (key) => sessionValuesForPage.delete(key), + }; globalThis.window = { dispatchEvent: () => true, localStorage: globalThis.localStorage, + sessionStorage: globalThis.sessionStorage, location: { origin: 'http://127.0.0.1:5191' }, }; server = await createServer({ @@ -68,6 +75,7 @@ after(async () => { await server?.close(); delete globalThis.window; delete globalThis.localStorage; + delete globalThis.sessionStorage; }); beforeEach(() => { @@ -1526,9 +1534,14 @@ test('automatic projected-node measurements preserve Redo while explicit resizin const values = structuredClone( before.nodes.find((node) => node.id === instance.instanceId).data.blockInstanceV2.values, ); - flow.setNodeSize(child.id, 520, 720, { history: false }); + flow.setNodeSize(child.id, 520, 720, { history: false, sizeMode: 'compact' }); assert.equal(flowStore.useFlowStore.getState().historyFuture, before.historyFuture); assert.equal(flowStore.useFlowStore.getState().historyPast, before.historyPast); + assert.equal( + flowStore.useFlowStore.getState().nodes.find((node) => node.id === instance.instanceId).data.blockInstanceV2 + .presentation.internalLayout[child.data.blockProjectionNodeId].sizeMode, + 'compact', + ); flow.redo(); flow.ensureBlockProjectionV2(instance.instanceId); const resized = flowStore.useFlowStore.getState().nodes.find((node) => node.id === child.id); @@ -1539,7 +1552,201 @@ test('automatic projected-node measurements preserve Redo while explicit resizin values, ); const source = fs.readFileSync(path.join(ROOT, 'src/components/ProjectedBlockNodeV2.tsx'), 'utf8'); - assert.match(source, /setNodeSize\(node\.id, current\.width \?\? 280, minimumHeight, \{ history: false \}\)/u); + assert.match( + source, + /setNodeSize\(node\.id, current\.width \?\? 280, minimumHeight, \{ history: false, sizeMode: 'compact' \}\)/u, + ); +}); + +for (const requested of [ + { width: 371, height: 312 }, + { width: 900, height: 900 }, +]) { + test(`nested compact resize survives legacy footprint detection, history and reload (${requested.width}x${requested.height})`, async () => { + // Mocked hierarchy with the exact compact and child geometry recorded by + // the native Qwen Core Denoise Step failure. No private workflow is needed. + const parentId = 'container:denoise'; + const targetId = 'container:denoise/text2image'; + const candidate = definition(); + candidate.graph.nodes[0].modularDiffusers = modularMetadata( + 'generate', + ['denoise', 'text2image', 'input'], + ['denoise', 'text2image'], + ); + candidate.graph.nodes.unshift( + { + nodeId: parentId, + nodeType: 'group', + data: { type: 'group', label: 'Auto Denoise', params: {} }, + modularDiffusers: modularMetadata(parentId, ['denoise'], undefined, 'conditional'), + }, + { + nodeId: targetId, + nodeType: 'group', + data: { type: 'group', label: 'Core Denoise', params: {} }, + modularDiffusers: modularMetadata(targetId, ['denoise', 'text2image'], ['denoise'], 'sequential'), + }, + ); + candidate.graph.executionOrder = [parentId, targetId, 'generate']; + candidate.graph.graphHash = schema.blockGraphHashV2(candidate.graph); + candidate.contentHash = schema.blockDefinitionContentHashV2(candidate); + const original = runtime.setBlockPresentationV2( + schema.createBlockInstanceV2(candidate, { + instanceId: 'recorded-compact-resize', + position: { x: 180, y: 120 }, + size: { width: 360, height: 325 }, + internalLayoutMode: 'hierarchical', + collapsedContainerNodeIds: [targetId], + internalLayout: { + [parentId]: { x: 1218, y: 104, width: 340, height: 277 }, + [targetId]: { x: 63.01389391066368, y: 131.2850956484163, width: 340, height: 277 }, + generate: { x: 28, y: 76, width: 340, height: 132 }, + }, + }), + { expanded: true }, + ); + const projection = runtime.materializeBlockProjectionV2(runtime.createBlockRootNodeV2(original)); + flowStore.useFlowStore.setState({ nodes: projection.nodes, edges: projection.edges }); + const flow = flowStore.useFlowStore.getState(); + const target = projection.nodes.find((node) => node.data.blockProjectionNodeId === targetId); + const readInstance = () => + flowStore.useFlowStore.getState().nodes.find((node) => node.id === original.instanceId).data.blockInstanceV2; + const assertSize = () => { + const resized = flowStore.useFlowStore.getState().nodes.find((node) => node.id === target.id); + assert.equal(resized.width, requested.width); + assert.equal(resized.height, requested.height); + }; + const assertAncestorsContain = () => { + const nodes = flowStore.useFlowStore.getState().nodes; + let child = nodes.find((node) => node.id === target.id); + for (let depth = 0; depth < 2; depth++) { + const parent = nodes.find((node) => node.id === child.parentId); + assert.ok(parent, 'both the immediate container and root are present'); + assert.ok(child.position.x + child.width <= parent.width, 'ancestor contains child width'); + assert.ok(child.position.y + child.height <= parent.height, 'ancestor contains child height'); + child = parent; + } + }; + + // Automatic DOM measurement must not relabel the recorded legacy footprint. + flow.setNodeSize(target.id, 340, 277, { history: false }); + assert.deepEqual(readInstance().presentation.internalLayout, original.presentation.internalLayout); + assert.equal(flowStore.useFlowStore.getState().nodes.find((node) => node.id === target.id).height, 176); + + flow.beginHistoryTransaction('Resize Modular Diffusers block'); + flow.setNodeSize(target.id, requested.width, requested.height, { sizeMode: 'compact' }); + flow.commitHistoryTransaction(); + assertSize(); + assertAncestorsContain(); + const resizedInstance = structuredClone(readInstance()); + assert.deepEqual(resizedInstance.presentation.internalLayout[targetId], { + ...original.presentation.internalLayout[targetId], + ...requested, + sizeMode: 'compact', + }); + assert.deepEqual(resizedInstance.effectiveGraph, original.effectiveGraph); + assert.deepEqual(resizedInstance.definitionSnapshot, original.definitionSnapshot); + assert.deepEqual(resizedInstance.values, original.values); + assert.deepEqual(resizedInstance.authorities, original.authorities); + + flow.undo(); + assert.deepEqual(readInstance().presentation.internalLayout, original.presentation.internalLayout); + flow.redo(); + flow.ensureBlockProjectionV2(original.instanceId); + assertSize(); + + const reloaded = schema.normalizeBlockInstanceV2(JSON.parse(JSON.stringify(readInstance()))); + const restored = runtime.materializeBlockProjectionV2(runtime.createBlockRootNodeV2(reloaded)); + flowStore.useFlowStore.setState({ nodes: restored.nodes, edges: restored.edges }); + assertSize(); + await flow.onNodesChange([{ id: target.id, type: 'position', position: { x: 90, y: 160 }, dragging: false }]); + assert.equal(readInstance().presentation.internalLayout[targetId].sizeMode, 'compact'); + flow.ensureBlockProjectionV2(original.instanceId); + assertSize(); + // Moving an expanded frame must not replace the manually sized compact + // card with its derived child envelope before the next collapse. + flow.toggleBlockContainerExpandedV2(original.instanceId, targetId); + const beforeDrag = structuredClone(readInstance()); + // Synthetic DOM measurement using the exact expanded envelope retained + // from the native follow-up. The workflow's drag-stop callback runs after + // React Flow's final position event; exercising only the latter missed it. + flowStore.useFlowStore.setState((state) => ({ + nodes: state.nodes.map((node) => + node.id === target.id ? { ...node, measured: { width: 2276, height: 873 } } : node, + ), + })); + flow.beginHistoryTransaction('Move nested Block'); + await flow.onNodesChange([{ id: target.id, type: 'position', position: { x: 110, y: 180 }, dragging: false }]); + flow.persistBlockCanvasPresentationV2(target.id); + flow.commitHistoryTransaction(); + const afterDrag = structuredClone(readInstance()); + assert.deepEqual(afterDrag.presentation.internalLayout[targetId], { + ...beforeDrag.presentation.internalLayout[targetId], + x: 110, + y: 180, + }); + assertAncestorsContain(); + flow.undo(); + assert.deepEqual(readInstance(), beforeDrag); + flow.redo(); + assert.deepEqual(readInstance(), afterDrag); + flow.toggleBlockContainerExpandedV2(original.instanceId, targetId); + assertSize(); + assertAncestorsContain(); + const afterCollapse = schema.normalizeBlockInstanceV2(JSON.parse(JSON.stringify(readInstance()))); + const reprojected = runtime.materializeBlockProjectionV2(runtime.createBlockRootNodeV2(afterCollapse)); + flowStore.useFlowStore.setState({ nodes: reprojected.nodes, edges: reprojected.edges }); + assertSize(); + assertAncestorsContain(); + // A later measurement must not discard the explicit compact-size identity. + flow.setNodeSize(target.id, requested.width, requested.height + 1, { history: false }); + assert.equal(readInstance().presentation.internalLayout[targetId].sizeMode, 'compact'); + assert.equal( + flowStore.useFlowStore.getState().nodes.find((node) => node.id === target.id).height, + requested.height + 1, + ); + }); +} + +test('drag-stop keeps measured sizing for unmarked legacy containers and collapsed compact cards', () => { + for (const marked of [false, true]) { + const root = nestedModularRoot(); + const instance = root.data.blockInstanceV2; + const prepared = runtime.setBlockPresentationV2(instance, { + collapsedContainerNodeIds: marked ? ['denoise'] : [], + internalLayout: { + denoise: { ...instance.presentation.internalLayout.denoise, ...(marked ? { sizeMode: 'compact' } : {}) }, + }, + }); + const projection = runtime.materializeBlockProjectionV2(runtime.createBlockRootNodeV2(prepared)); + const child = projection.nodes.find((node) => node.data.blockProjectionNodeId === 'denoise'); + flowStore.useFlowStore.setState({ + nodes: projection.nodes.map((node) => + node.id === child.id ? { ...node, measured: { width: 510, height: 330 } } : node, + ), + edges: projection.edges, + }); + flowStore.useFlowStore.getState().persistBlockCanvasPresentationV2(child.id); + const saved = flowStore.useFlowStore.getState().nodes.find((node) => node.id === root.id).data.blockInstanceV2; + assert.equal(saved.presentation.internalLayout.denoise.width, 510); + assert.equal(saved.presentation.internalLayout.denoise.height, 330); + assert.equal(saved.presentation.internalLayout.denoise.sizeMode, marked ? 'compact' : undefined); + } +}); + +test('manual projected resize marks an unchanged compact size without marking automatic measurements', () => { + const root = nestedModularRoot(); + const projection = runtime.materializeBlockProjectionV2(root); + flowStore.useFlowStore.setState({ nodes: projection.nodes, edges: projection.edges }); + const child = projection.nodes.find((node) => node.data.blockProjectionNodeId === 'generate'); + const flow = flowStore.useFlowStore.getState(); + flow.setNodeSize(child.id, child.width, child.height, { history: false }); + const currentLayout = () => + flowStore.useFlowStore.getState().nodes.find((node) => node.id === root.id).data.blockInstanceV2.presentation + .internalLayout[child.data.blockProjectionNodeId]; + assert.equal(currentLayout().sizeMode, undefined); + flow.setNodeSize(child.id, child.width, child.height, { sizeMode: 'compact' }); + assert.equal(currentLayout().sizeMode, 'compact'); }); test('both composite generations use one shared frame and V2 stays on the block renderer', () => { @@ -1590,7 +1797,7 @@ test('both composite generations use one shared frame and V2 stays on the block 'utf8', ); assert.match(saveDialogSource, /Save as new \{noun\}/); - assert.match(saveDialogSource, /isFocusedStageNode\(instance\) \? 'node' : 'Block'/); + assert.match(saveDialogSource, /const noun = 'Block'/); assert.match(v2Source, /headerRef\.current\?\.offsetHeight/); assert.match(v2Source, /connectorRef\.current\?\.offsetHeight/); assert.match(v2Source, /headerHeight \+ connectorHeight \+ 96 \+ 4/); @@ -2124,3 +2331,155 @@ test('connectable scalar controls retain inline editors and literal false, zero assert.equal(controls.prompt.value, ''); assert.deepEqual(node, before); }); + +test('declared Block source fields preserve offload labels and alias-targeted edits', async () => { + const { createElement, Children, isValidElement } = await import('react'); + const { renderToStaticMarkup } = await import('react-dom/server'); + const { default: SelectField } = await server.ssrLoadModule('/src/fields/SelectField.tsx'); + const { ModiffSelect } = await server.ssrLoadModule('/src/ui/index.ts'); + const options = ['auto_cpu', 'none', 'model_cpu', 'sequential_cpu', 'group_cpu', 'group_disk']; + const check = (fieldKey, param, sourceKey = 'offload_mode') => { + const before = structuredClone(param); + const edits = []; + for (const [value, label] of [ + ['group_disk', 'SSD group offload'], + ['auto_cpu', 'RAM/CPU model offload'], + ]) { + let select; + const props = { + nodeId: 'offload-view', + fieldKey, + label: 'Offload Mode', + display: 'select', + value, + default: 'none', + options: param.options, + fieldOptions: param.fieldOptions, + disabled: false, + hidden: false, + style: {}, + dataType: 'string', + fieldType: 'select', + module: 'modiff.blocks', + action: 'BlockV2', + updateStore: (...args) => edits.push(args), + }; + const visit = (element) => { + if (!isValidElement(element)) return; + if (element.type === ModiffSelect) select = element; + Children.forEach(element.props.children, visit); + }; + function Render() { + const view = SelectField(props); + visit(view); + return view; + } + const markup = renderToStaticMarkup(createElement(Render)); + assert.ok(select, 'the actual field renders the shared select'); + if (sourceKey === 'offload_mode') { + assert.ok(markup.includes(label), `${fieldKey} renders ${label}`); + assert.deepEqual( + select.props.options.map(({ value }) => value), + options.slice(1), + ); + assert.equal(select.props.options.find(({ value }) => value === 'group_disk').label, 'SSD group offload'); + } else { + assert.ok(markup.includes(value), 'an unrelated selector keeps its declared labels'); + assert.deepEqual( + select.props.options.map(({ value }) => value), + options, + ); + } + select.props.onValueChange('group_disk'); + assert.deepEqual(edits.at(-1), [fieldKey, 'group_disk'], 'edits retain the exact canvas alias and raw value'); + } + assert.deepEqual(param, before, 'rendering does not normalize or mutate the graph field'); + }; + for (const [module, action] of [ + ['modules.ModularDiffusers', 'ModelsLoader'], + ['modules.DiffusersImage', 'LoadPipeline'], + ['modules.DiffusersAudio', 'LoadPipeline'], + ]) { + const migrated = schema.migrateUserBlockDefinitionV1({ + id: 'offload-rendering', + name: 'Offload rendering', + version: 1, + nodes: [ + { + id: 'loader', + type: 'custom', + position: { x: 0, y: 0 }, + data: { + type: 'custom', + module, + action, + label: 'Loader', + params: { + offload_mode: { type: 'string', options, value: 'group_disk' }, + }, + }, + }, + ], + edges: [], + inputs: [], + outputs: [], + exposedParams: [ + { + id: 'placement-choice', + kind: 'graph-param', + label: 'Offload Mode', + nodeId: 'loader', + paramKey: 'offload_mode', + }, + ], + createdAt: 1, + updatedAt: 2, + }); + const graph = structuredClone(migrated.graph); + graph.nodes.unshift({ + nodeId: 'stage', + nodeType: 'group', + data: { type: 'group', label: 'Stage', params: {} }, + modularDiffusers: modularMetadata('stage', ['stage'], undefined, 'sequential'), + }); + graph.nodes.find(({ nodeId }) => nodeId === 'loader').modularDiffusers = modularMetadata( + 'loader', + ['stage', 'loader'], + ['stage'], + ); + graph.executionOrder = ['stage', 'loader']; + graph.graphHash = schema.blockGraphHashV2(graph); + const definition = { ...migrated, graph }; + definition.contentHash = schema.blockDefinitionContentHashV2(definition); + const current = schema.createBlockInstanceV2(definition, { + instanceId: 'offload-root', + position: { x: 0, y: 0 }, + size: { width: 500, height: 500 }, + }); + const before = structuredClone(current); + const root = runtime.blockControlParamsV2(current); + check('placement-choice', root['placement-choice']); + const projected = runtime.materializeBlockProjectionV2( + runtime.createBlockRootNodeV2(runtime.setBlockPresentationV2(current, { expanded: true })), + ); + const stage = projected.nodes.find(({ data }) => data.blockProjectionNodeId === 'stage'); + const alias = Object.entries(stage.data.params).find( + ([, field]) => field.fieldOptions?.blockBindingV2?.fieldOrPortId === 'offload_mode', + ); + assert.ok(alias, 'a collapsed intermediate container exposes the real control alias'); + assert.notEqual(alias[0], 'offload_mode'); + check(...alias); + assert.deepEqual(current, before, 'all instance values, source declarations and execution graph remain unchanged'); + } + check('offload_mode', { options }); + check( + 'different-setting', + { options, fieldOptions: { blockBindingV2: { schemaVersion: 2, fieldOrPortId: 'different-setting' } } }, + 'different-setting', + ); + check( + 'different-setting', + { options, fieldOptions: { blockBindingV2: { schemaVersion: 1, fieldOrPortId: 'offload_mode' } } }, + 'different-setting', + ); +}); diff --git a/scripts/block-runtime-v2.test.mjs b/scripts/block-runtime-v2.test.mjs index cd0c4ce2..292576af 100644 --- a/scripts/block-runtime-v2.test.mjs +++ b/scripts/block-runtime-v2.test.mjs @@ -514,6 +514,125 @@ function instance(id = 'instance-a', values = { prompt: '', steps: 0 }) { }); } +function composedTextPreviewFixture(id, value) { + const leaf = { + id: 'text', + selected: true, + type: 'custom', + position: { x: 0, y: 0 }, + data: { + type: 'custom', + module: 'modules.Primitive', + action: 'Text', + params: { + text: { type: 'str', display: 'textarea', value: 'creator text' }, + output: { type: 'str', display: 'output' }, + preview: { type: 'text', display: 'ui_text', dataSource: 'output', hidden: true }, + }, + }, + }; + const definition = schema.migrateUserBlockDefinitionV1({ + id: `definition-${id}`, + name: id, + version: 1, + nodes: [leaf], + edges: [], + inputs: [{ id: 'text-input', label: 'Input', type: 'str', nodeId: leaf.id, paramKey: 'text' }], + outputs: [{ id: 'text-output', label: 'Output', type: 'str', nodeId: leaf.id, paramKey: 'output' }], + exposedParams: [{ id: 'message', kind: 'graph-param', label: 'Message', nodeId: leaf.id, paramKey: 'text' }], + createdAt: 1, + updatedAt: 1, + }); + const root = runtime.createBlockRootNodeV2( + schema.createBlockInstanceV2(definition, { + instanceId: id, + position: { x: 0, y: 0 }, + size: { width: 300, height: 300 }, + values: { message: value }, + }), + ); + root.selected = true; + return { root, leaf }; +} + +for (const count of [2, 3]) { + test(`composing ${count} connected Blocks keeps all child previews with one outer primary`, async () => { + const creation = await server.ssrLoadModule('/src/studio/userBlockCreationV2.ts'); + const roots = Array.from( + { length: count }, + (_, index) => composedTextPreviewFixture(`sibling-${index}`, `edited text ${index}`).root, + ); + const graph = { + nodes: roots, + edges: roots.slice(1).map((root, index) => ({ + id: `wire-${index}`, + source: roots[index].id, + sourceHandle: 'text-output', + target: root.id, + targetHandle: 'text-input', + })), + }; + const before = structuredClone(graph); + const draft = creation.createUserBlockDraftV2(graph, []); + assert.equal(draft.ok, true); + const prepared = creation.prepareUserBlockCreationV2(draft, draft.block); + const parent = prepared.graph.nodes.find((node) => node.data.blockInstanceV2).data.blockInstanceV2; + assert.equal(parent.definitionSnapshot.previews.length, count); + assert.equal(parent.definitionSnapshot.previews.filter((preview) => preview.primary).length, 1); + assert.match(parent.definitionSnapshot.previews.find((preview) => preview.primary).nodeId, /sibling-0/); + const local = parent.definitionSnapshot.graph.nodes.filter((node) => node.containerInterface); + assert.equal(local.length, count); + for (const node of local) + assert.equal(node.containerInterface.previews.filter((preview) => preview.primary).length, 1); + const execution = runtime.expandBlockGraphV2ForExecution(prepared.graph.nodes, prepared.graph.edges); + const leaves = execution.nodes.filter((node) => node.data.action === 'Text'); + assert.equal(leaves.length, count); + assert.equal(execution.edges.length, count - 1); + for (const [index, node] of leaves.entries()) assert.equal(node.data.params.text.value, `edited text ${index}`); + for (const edge of execution.edges) { + assert.equal(edge.sourceHandle, 'output'); + assert.equal(edge.targetHandle, 'text'); + } + assert.deepEqual(graph, before, 'composition must preserve input graph and immutable child snapshots'); + }); +} + +test('composing an ordinary preview with a nested Block preserves the outer primary and child interface', async () => { + const creation = await server.ssrLoadModule('/src/studio/userBlockCreationV2.ts'); + const { root, leaf } = composedTextPreviewFixture('nested-text', 'nested edit'); + leaf.id = 'outer-text'; + leaf.data.params.text.value = 'outer edit'; + const graph = { + nodes: [leaf, root], + edges: [{ id: 'outer-wire', source: leaf.id, sourceHandle: 'output', target: root.id, targetHandle: 'text-input' }], + }; + const before = structuredClone(graph); + const draft = creation.createUserBlockDraftV2(graph, []); + assert.equal(draft.ok, true); + const prepared = creation.prepareUserBlockCreationV2(draft, draft.block); + const definition = prepared.definition; + assert.equal(definition.previews.length, 2); + assert.deepEqual( + definition.previews.filter((preview) => preview.primary).map((preview) => preview.nodeId), + ['outer-text'], + ); + assert.equal( + definition.graph.nodes.find((node) => node.containerInterface).containerInterface.previews[0].primary, + true, + ); + const execution = runtime.expandBlockGraphV2ForExecution(prepared.graph.nodes, prepared.graph.edges); + const leaves = execution.nodes.filter((node) => node.data.action === 'Text'); + assert.equal(leaves.length, 2); + assert.equal(execution.edges.length, 1); + const outer = leaves.find((node) => node.data.params.text.value === 'outer edit'); + const nested = leaves.find((node) => node.data.params.text.value === 'nested edit'); + assert.ok(outer); + assert.ok(nested); + assert.equal(execution.edges[0].source, outer.id); + assert.equal(execution.edges[0].target, nested.id); + assert.deepEqual(graph, before); +}); + test('outside LoRA connects to an undeclared internal input and survives collapse, persistence and explicit moves', async () => { const crossing = await server.ssrLoadModule('/src/studio/blockCrossingConnectionsV2.ts'); const persistence = await server.ssrLoadModule('/src/studio/blockDefinitionPersistenceV2.ts'); @@ -2229,6 +2348,280 @@ test('saved Block previews resolve exact retained media without changing graph o assert.equal(reopened.nodes[0].data.blockInstanceV2.previewStates[0].mediaReference, output.url); }); +test('V2 preview source resolves generated fields to the current ordered image collection', async () => { + const users = await server.ssrLoadModule('/src/studio/userBlocks.ts'); + const artifacts = await server.ssrLoadModule('/src/utils/imageArtifacts.ts'); + const current = runtime.setBlockPreviewStateV2( + instance('collection-preview'), + { nodeId: 'preview', outputPortId: 'images' }, + { mediaReference: '/file?file=@data/current-item-0.webp', taskId: 'current-task', status: 'complete' }, + ); + const before = structuredClone(current); + const view = runtime.blockPreviewViewsV2(current)[0]; + const params = view.params[view.previewId]; + const source = users.userBlockPreviewSource(current.instanceId, view.previewId, params.fieldOptions); + const canonical = { nodeId: runtime.blockProjectionNodeIdV2(current.instanceId, 'preview'), fieldKey: 'images' }; + assert.deepEqual(source, canonical); + const output = { + id: 'current-output', + taskId: 'current-task', + mediaItems: [0, 1].map((index) => ({ index, url: `/file?file=@data/current-item-${index}.webp` })), + }; + const key = studioStore.studioPreviewSlotKey(canonical.nodeId, canonical.fieldKey, 'current-workflow'); + const slots = { [key]: { status: 'ready', currentOutputId: output.id } }; + const selected = slots[studioStore.studioPreviewSlotKey(source.nodeId, source.fieldKey, 'current-workflow')]; + assert.equal(selected.currentOutputId, output.id); + assert.deepEqual( + artifacts + .normalizeImageArtifacts({ + value: output.mediaItems.map(({ url }) => url), + artifacts: output.mediaItems, + dataType: 'url', + mimeType: 'image/webp', + }) + .map(({ index }) => index), + [0, 1], + ); + assert.equal(params.value, '/file?file=@data/current-item-0.webp'); + assert.deepEqual(current, before); +}); + +test('V2 preview source retains canonical ownership for nested containers and every media binding', async () => { + const users = await server.ssrLoadModule('/src/studio/userBlocks.ts'); + const ownerId = 'owned-block'; + const nestedId = runtime.blockProjectionNodeIdV2(ownerId, 'nested-container'); + for (const mediaType of ['image', 'video', 'audio', 'text', 'file']) { + const binding = { schemaVersion: 2, ownerId, nodeId: 'preview', outputPortId: 'output', mediaType }; + const options = { blockPreviewBindingV2: binding }; + const before = structuredClone(options); + const expected = { nodeId: runtime.blockProjectionNodeIdV2(ownerId, 'preview'), fieldKey: 'output' }; + assert.deepEqual(users.userBlockPreviewSource(ownerId, 'generated-field', options), expected); + assert.deepEqual(users.userBlockPreviewSource(nestedId, 'generated-field', options), expected); + assert.deepEqual(options, before); + } + const leaf = runtime.blockProjectionNodeIdV2(ownerId, 'preview'); + assert.deepEqual(users.userBlockPreviewSource(leaf, 'output'), { nodeId: leaf, fieldKey: 'output' }); +}); + +test('V2 preview source preserves private-style fields admitted by the actual Block schema', async () => { + const users = await server.ssrLoadModule('/src/studio/userBlocks.ts'); + const declared = definition(); + const preview = declared.graph.nodes.find(({ nodeId }) => nodeId === 'preview'); + preview.data.params._images = preview.data.params.images; + declared.graph.graphHash = schema.blockGraphHashV2(declared.graph); + declared.previews[0].outputPortId = '_images'; + declared.contentHash = schema.blockDefinitionContentHashV2(declared); + const current = schema.createBlockInstanceV2(declared, { + instanceId: 'private-field-preview', + position: { x: 0, y: 0 }, + size: { width: 400, height: 420 }, + values: { prompt: 'unchanged', steps: 16 }, + }); + const view = runtime.blockPreviewViewsV2(current)[0]; + assert.deepEqual( + users.userBlockPreviewSource(current.instanceId, view.previewId, view.params[view.previewId].fieldOptions), + { nodeId: runtime.blockProjectionNodeIdV2(current.instanceId, 'preview'), fieldKey: '_images' }, + ); +}); + +test('V2 preview source rejects malformed and foreign ownership while preserving legacy fallback', async () => { + const users = await server.ssrLoadModule('/src/studio/userBlocks.ts'); + const valid = { schemaVersion: 2, ownerId: 'owner', nodeId: 'preview', outputPortId: 'images', mediaType: 'image' }; + for (const binding of [ + null, + [], + { ...valid, schemaVersion: '2' }, + { ...valid, ownerId: 'foreign-owner' }, + { ...valid, ownerId: '' }, + { ...valid, nodeId: 'x'.repeat(385) }, + { ...valid, outputPortId: [] }, + { ...valid, outputPortId: '1images' }, + { ...valid, mediaType: 'unknown' }, + ]) { + assert.deepEqual(users.userBlockPreviewSource('owner', 'generated-field', { blockPreviewBindingV2: binding }), { + nodeId: 'owner', + fieldKey: 'generated-field', + }); + } + for (const caller of ['foreign-owner', 'block-v2-node:5:owner:4:wrong', 'block-v2-node:50:owner:7:preview']) { + assert.deepEqual(users.userBlockPreviewSource(caller, 'generated-field', { blockPreviewBindingV2: valid }), { + nodeId: caller, + fieldKey: 'generated-field', + }); + } + assert.deepEqual( + users.userBlockPreviewSource('legacy-owner', 'generated-field', { + userBlockSourceNodeId: 'preview', + userBlockSourceFieldKey: 'images', + }), + { nodeId: 'legacy-owner__preview', fieldKey: 'images' }, + ); +}); + +test('retained Block text stays text and only an exact current slot advances its task', async () => { + const { withDurableBlockPreviewsV2 } = await server.ssrLoadModule('/src/studio/blockPreviewPersistenceV2.ts'); + const users = await server.ssrLoadModule('/src/studio/userBlocks.ts'); + const creation = await server.ssrLoadModule('/src/studio/userBlockCreationV2.ts'); + const leaf = { + id: 'text-leaf', + selected: true, + position: { x: 0, y: 0 }, + type: 'custom', + data: { + label: 'Text', + module: 'modules.Primitive', + action: 'Text', + type: 'Text', + params: { + text: { type: 'str', display: 'textarea', value: 'Original text' }, + output: { type: 'str', display: 'output' }, + preview: { type: 'text', display: 'ui_text', dataSource: 'output', hidden: true }, + }, + }, + }; + const draft = users.createUserBlockFromSelection({ nodes: [leaf], edges: [] }, 'Text Block'); + const prepared = creation.prepareUserBlockCreationV2(draft, draft.block); + const root = prepared.graph.nodes.find((node) => node.data.blockInstanceV2); + const binding = root.data.blockInstanceV2.previewStates[0].binding; + const original = runtime.setBlockPreviewStateV2(root.data.blockInstanceV2, binding, { + taskId: 'text-task', + mediaReference: 'Original text', + status: 'complete', + }); + const nodes = [runtime.createBlockRootNodeV2(original)]; + const output = { + id: 'text-output', + taskId: 'text-task', + displayType: 'text', + nodeId: runtime.blockProjectionNodeIdV2(root.id, binding.nodeId), + fieldKey: binding.outputPortId, + value: ['Original text'], + url: '/file?file=retained.txt', + backendMediaPath: '@data/retained.txt', + mediaItems: [{ value: ['Original text'], url: '/file?file=retained.txt', backendPath: '@data/retained.txt' }], + }; + assert.equal(withDurableBlockPreviewsV2(nodes, [output]), nodes); + const broken = [ + { + ...nodes[0], + data: { + ...nodes[0].data, + blockInstanceV2: { + ...original, + previewStates: original.previewStates.map((preview) => ({ ...preview, mediaReference: output.url })), + }, + }, + }, + ]; + assert.equal( + withDurableBlockPreviewsV2(broken, [output])[0].data.blockInstanceV2.previewStates[0].mediaReference, + 'Original text', + ); + assert.equal(withDurableBlockPreviewsV2(broken, [{ ...output, fieldKey: 'other' }]), broken); + const newer = { ...output, id: 'new-text', taskId: 'new-task', value: ['Edited text', 'Second text'] }; + const slot = { + workflowTabId: 'text-workflow', + nodeId: output.nodeId, + fieldKey: output.fieldKey, + status: 'ready', + currentOutputId: newer.id, + }; + const current = { workflowTabId: 'text-workflow', previewSlots: { slot } }; + const refreshed = withDurableBlockPreviewsV2(nodes, [newer, output], current); + assert.equal(refreshed[0].data.blockInstanceV2.previewStates[0].mediaReference, 'Edited text'); + assert.equal(refreshed[0].data.blockInstanceV2.previewStates[0].taskId, 'new-task'); + assert.equal(withDurableBlockPreviewsV2(nodes, [newer], { ...current, workflowTabId: 'other' }), nodes); + assert.equal(withDurableBlockPreviewsV2(nodes, [newer]), nodes); +}); + +test('newly created Blocks expose editable text but exclude output preview controls', async () => { + const users = await server.ssrLoadModule('/src/studio/userBlocks.ts'); + const leaf = { + id: 'text-leaf', + selected: true, + position: { x: 0, y: 0 }, + type: 'custom', + data: { + label: 'Text', + module: 'modules.Primitive', + action: 'Text', + type: 'Text', + params: { + text: { type: 'str', display: 'textarea', value: 'Editable text' }, + output: { type: 'str', display: 'output' }, + preview: { type: 'text', display: 'ui_text', dataSource: 'output', value: 'Old preview' }, + }, + }, + }; + const draft = users.createUserBlockFromSelection({ nodes: [leaf], edges: [] }, 'Text Block'); + assert.equal(draft.ok, true); + assert.deepEqual( + draft.block.exposedParams.map((param) => param.paramKey), + ['text'], + ); + assert.ok(Object.values(draft.blockNode.data.params).some((param) => param.display === 'ui_text')); + assert.equal(leaf.data.params.preview.value, 'Old preview'); +}); + +test('V2 preview source restores legacy exposed preview controls without rewriting their contract', async () => { + const users = await server.ssrLoadModule('/src/studio/userBlocks.ts'); + const creation = await server.ssrLoadModule('/src/studio/userBlockCreationV2.ts'); + const leaf = { + id: 'legacy-text', + selected: true, + position: { x: 0, y: 0 }, + type: 'custom', + data: { + label: 'Text', + module: 'modules.Primitive', + action: 'Text', + type: 'Text', + params: { + text: { type: 'str', display: 'textarea', value: 'Text input' }, + output: { type: 'str', display: 'output' }, + preview: { + type: 'text', + display: 'ui_text', + dataSource: 'output', + value: 'Old preview', + artifacts: [{ url: 'Old preview', taskId: 'old-task' }], + }, + }, + }, + }; + const draft = users.createUserBlockFromSelection({ nodes: [leaf], edges: [] }, 'Legacy Text'); + draft.block.exposedParams.push({ + id: 'legacy-preview-control', + kind: 'graph-param', + label: 'Preview', + nodeId: leaf.id, + paramKey: 'preview', + }); + const prepared = creation.prepareUserBlockCreationV2(draft, draft.block); + const root = prepared.graph.nodes.find((node) => node.data.blockInstanceV2); + const original = root.data.blockInstanceV2; + const changed = runtime.setBlockPreviewStateV2(original, original.previewStates[0].binding, { + taskId: 'new-task', + mediaReference: 'Current preview', + status: 'complete', + }); + const controls = runtime.blockControlParamsV2(changed); + const [controlId, control] = Object.entries(controls).find(([, param]) => param.display === 'ui_text'); + const binding = changed.previewStates[0].binding; + assert.deepEqual(users.userBlockPreviewSource(changed.instanceId, controlId, control.fieldOptions), { + nodeId: runtime.blockProjectionNodeIdV2(changed.instanceId, binding.nodeId), + fieldKey: binding.outputPortId, + }); + assert.equal(control.fieldOptions.blockBindingV2.direction, 'control'); + for (const editable of Object.values(controls).filter((param) => param.display !== 'ui_text')) + assert.equal(editable.fieldOptions?.blockPreviewBindingV2, undefined); + assert.equal(control.value, 'Current preview'); + assert.deepEqual(control.artifacts, []); + assert.deepEqual(changed.definitionSnapshot, original.definitionSnapshot); + assert.deepEqual(changed.effectiveGraph, original.effectiveGraph); + assert.deepEqual(changed.values, original.values); +}); + test('preview updates remain instance-local run state and preserve semantic authority', () => { const current = instance('preview-instance', { prompt: 'preview prompt', steps: 8 }); const authorized = schema.normalizeBlockInstanceV2({ @@ -2868,3 +3261,123 @@ test('missing required model inputs remain submission blockers in Custom memory studioStore.useStudioStore.setState(original); } }); + +function actionCompatibilityInstanceV2(mirroredAction) { + const base = definition(); + const generate = base.graph.nodes.find((node) => node.nodeId === 'generate'); + generate.data.params.prompt.signalCompatibility = { required: true, action: '$node' }; + generate.data.params.images.signalCompatibility = { required: true, action: '$node' }; + if (mirroredAction) { + const mirror = structuredClone(generate); + mirror.nodeId = 'nested-stage:generate'; + mirror.data.action = mirroredAction; + base.graph.nodes.push(mirror); + base.graph.executionOrder.push(mirror.nodeId); + base.boundary.inputs[0].mirrorBindings = [{ nodeId: mirror.nodeId, fieldOrPortId: 'prompt' }]; + } + base.graph.graphHash = schema.blockGraphHashV2(base.graph); + base.contentHash = schema.blockDefinitionContentHashV2(base); + return schema.createBlockInstanceV2(base, { + instanceId: 'action-compatibility', + position: { x: 0, y: 0 }, + size: { width: 400, height: 300 }, + }); +} + +test('Block ports preserve their exact bound action compatibility in both directions', async () => { + const matching = await server.ssrLoadModule('/src/workflow/nodeConnectionMatching.ts'); + const current = actionCompatibilityInstanceV2(); + const before = JSON.stringify(current); + const root = runtime.createBlockRootNodeV2(current); + const producer = { + module: 'custom.Source', + action: 'Load', + type: 'custom', + params: { + output: { + type: 'string', + display: 'output', + signal: { + value: { mode: 'text_to_image', connectionActions: { Generate: ['text_to_image'] } }, + }, + }, + }, + }; + assert.equal(matching.nodeConnectionSemanticsAreCompatible(producer, 'output', root.data, 'prompt'), true); + const target = { + module: 'custom.Target', + action: 'Preview', + type: 'custom', + params: { + input: { + type: 'list[image]', + display: 'input', + signal: { + value: { mode: 'text_to_image', actions: { Generate: ['text_to_image'] } }, + }, + }, + }, + }; + assert.equal(matching.nodeConnectionSemanticsAreCompatible(root.data, 'images', target, 'input'), true); + const ports = runtime.blockConnectorParamsV2(current); + assert.deepEqual(ports.inputs.prompt.signalCompatibility, { required: true, action: 'Generate' }); + assert.deepEqual(ports.outputs.images.signalCompatibility, { required: true, action: 'Generate' }); + assert.equal(JSON.stringify(current), before, 'projection cannot rewrite the immutable leaf contract'); + for (const signal of [ + undefined, + { value: { mode: 'foreign', actions: { Generate: ['text_to_image'] } } }, + { value: { mode: 'text_to_image', actions: { Foreign: ['text_to_image'] } } }, + { value: { mode: 'text_to_image', actions: {} } }, + ]) { + const wrong = structuredClone(producer); + wrong.params.output.signal = signal; + assert.equal(matching.nodeConnectionSemanticsAreCompatible(wrong, 'output', root.data, 'prompt'), false); + } +}); + +test('Block action-bound mirrors require every bound action and reject unknown bindings', async () => { + assert.equal( + runtime.blockConnectorParamsV2(actionCompatibilityInstanceV2('Generate')).inputs.prompt.signalCompatibility.action, + 'Generate', + ); + const root = runtime.createBlockRootNodeV2(actionCompatibilityInstanceV2('DifferentAction')); + const matching = await server.ssrLoadModule('/src/workflow/nodeConnectionMatching.ts'); + const accepts = (actions) => + matching.nodeConnectionSemanticsAreCompatible( + { + module: 'custom.Source', + action: 'Load', + type: 'custom', + params: { output: { display: 'output', type: 'string', signal: { value: { mode: 'edit', actions } } } }, + }, + 'output', + root.data, + 'prompt', + ); + assert.equal(accepts({ Generate: ['edit'] }), false); + assert.equal(accepts({ DifferentAction: ['edit'] }), false); + assert.equal(accepts({ Generate: ['edit'], DifferentAction: ['other'] }), false); + assert.equal(accepts({ Generate: ['edit'], DifferentAction: ['edit'] }), true); + const missing = actionCompatibilityInstanceV2(); + missing.effectiveInterface.boundary.inputs[0].binding.nodeId = 'foreign:missing'; + missing.effectiveInterface.effectiveInterfaceHash = schema.blockInterfaceHashV2(missing.effectiveInterface); + missing.customization.state = 'structure_changed'; + assert.throws(() => runtime.blockConnectorParamsV2(missing), /unknown|missing/u); +}); + +test('Block literal action and native role/value signal declarations retain their exact semantics', () => { + const current = actionCompatibilityInstanceV2(); + const generate = current.effectiveGraph.nodes.find((node) => node.nodeId === 'generate'); + const contract = { + required: true, + action: 'FixedAction', + role: ['denoiser', 'encoder'], + values: { selected: ['own'] }, + }; + generate.data.params.prompt.signalCompatibility = contract; + current.effectiveGraph.graphHash = schema.blockGraphHashV2(current.effectiveGraph); + current.customization.effectiveGraphHash = current.effectiveGraph.graphHash; + current.customization.state = 'structure_changed'; + current.authorities = []; + assert.deepEqual(runtime.blockConnectorParamsV2(current).inputs.prompt.signalCompatibility, contract); +}); diff --git a/scripts/block-schema-v2.test.mjs b/scripts/block-schema-v2.test.mjs index 45ee45ff..e1ce7aa3 100644 --- a/scripts/block-schema-v2.test.mjs +++ b/scripts/block-schema-v2.test.mjs @@ -8,6 +8,7 @@ const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); const COMMIT = 'a'.repeat(40); let schema; +let compatibility; let server; before(async () => { @@ -20,6 +21,20 @@ before(async () => { appType: 'custom', }); schema = await server.ssrLoadModule('/src/studio/blockSchemaV2.ts'); + compatibility = await server.ssrLoadModule('/src/studio/blockValueTypeCompatibilityV2.ts'); +}); + +test('finite ordinary union sockets retain alternatives without flattening collection types', () => { + for (const [publicType, runtime, expected] of [ + ['video|str|image', ['video', 'str', 'image'], true], + ['video|str|image', 'video', true], + ['video_asset|video|str', 'video_asset', true], + ['video|str', 'string', true], + ['video|str', 'audio', false], + ['list[video|image]', 'image', false], + ['video|opaque', 'audio', true], + ]) + assert.equal(compatibility.blockValueTypesAreCompatibleV2(publicType, runtime), expected); }); after(async () => { @@ -202,6 +217,28 @@ test('V2 bindings preserve exact private-style backend field ids', () => { assert.equal(parsed.controls[0].binding.fieldId, '_auto_resize'); }); +test('native spawned fields survive Block boundaries and edges without widening public ids', () => { + for (const field of ['item>>>shot-2', 'item>>>_0-a']) { + const fixture = definition('user'); + fixture.graph.nodes[1].data.params[field] = { type: 'string', default: 'starter prompt' }; + fixture.boundary.inputs[0].binding.fieldOrPortId = field; + fixture.controls[0].binding.fieldId = field; + fixture.graph.edges[0].targetPortId = field; + fixture.graph.graphHash = schema.blockGraphHashV2(fixture.graph); + fixture.contentHash = schema.blockDefinitionContentHashV2(fixture); + assert.equal(schema.normalizeBlockDefinitionV2(fixture).boundary.inputs[0].binding.fieldOrPortId, field); + fixture.boundary.inputs[0].portId = field; + fixture.contentHash = schema.blockDefinitionContentHashV2(fixture); + assert.throws(() => schema.normalizeBlockDefinitionV2(fixture), /portId/); + } + for (const field of ['item>', 'item>>x', 'item>>>', 'item>>>>x', 'item>>>x>>>y']) { + const fixture = definition('user'); + fixture.boundary.inputs[0].binding.fieldOrPortId = field; + fixture.contentHash = schema.blockDefinitionContentHashV2(fixture); + assert.throws(() => schema.normalizeBlockDefinitionV2(fixture), /fieldOrPortId/); + } +}); + test('client hashes match the backend BlockDefinitionV2 parity fixture', () => { // Keep this semantic payload aligned with block_definition_v2() and the // asserted hashes in MoDiff/tests/test_studio_blocks.py. The fixed strings @@ -454,6 +491,27 @@ test('presentation is hash-independent and inserted instances do not share value assert.equal(parsed.effectiveGraph.graphHash, fixture.graph.graphHash); }); +test('compact internal sizes round-trip as presentation only and reject unknown size modes', () => { + const original = schema.createBlockInstanceV2(definition(), { + instanceId: 'compact-layout', + position: { x: 0, y: 0 }, + size: { width: 340, height: 360 }, + internalLayout: { generate: { x: 28, y: 76, width: 371, height: 312 } }, + }); + assert.deepEqual(schema.normalizeBlockInstanceV2(JSON.parse(JSON.stringify(original))), original); + const compact = structuredClone(original); + compact.presentation.internalLayout.generate.sizeMode = 'compact'; + assert.deepEqual(schema.normalizeBlockInstanceV2(JSON.parse(JSON.stringify(compact))), compact); + assert.deepEqual(compact.effectiveGraph, original.effectiveGraph); + assert.deepEqual(compact.definitionSnapshot, original.definitionSnapshot); + assert.deepEqual(compact.authorities, original.authorities); + for (const invalid of [null, false, 1, '', 'expanded', {}, ['compact']]) { + const broken = structuredClone(compact); + broken.presentation.internalLayout.generate.sizeMode = invalid; + assert.throws(() => schema.normalizeBlockInstanceV2(broken), /sizeMode.*compact/u); + } +}); + test('explicit empty values survive round-trip and do not fall back to defaults', () => { for (const [suffix, value] of [ ['empty', ''], diff --git a/scripts/bounded-browser-process.test.mjs b/scripts/bounded-browser-process.test.mjs index 0a5e08d8..795404de 100644 --- a/scripts/bounded-browser-process.test.mjs +++ b/scripts/bounded-browser-process.test.mjs @@ -42,7 +42,9 @@ test( let stat; do { stat = await readFile(`/proc/${pid}/stat`, 'utf8').catch((error) => { - if (error.code === 'ENOENT') return ''; + // /proc may disappear before open (ENOENT) or after open, before + // read (ESRCH), when Linux finishes reaping the killed process. + if (error.code === 'ENOENT' || error.code === 'ESRCH') return ''; throw error; }); if (!stat || /\) Z /.test(stat)) break; diff --git a/scripts/builtin-data-qualification.mjs b/scripts/builtin-data-qualification.mjs new file mode 100644 index 00000000..b93d4f86 --- /dev/null +++ b/scripts/builtin-data-qualification.mjs @@ -0,0 +1,343 @@ +// Closed deterministic proof path for the three input-free data workflows. +// This shares the existing canonical recorder, queue and file boundaries. It +// does not admit models, file inputs, runtime hints or inferred field accounting. +import assert from 'node:assert/strict'; +import { dirname } from 'node:path'; +import { readFileSync, realpathSync, lstatSync } from 'node:fs'; +import { + canonicalWorkflowContract, + exportCanonicalWorkflowGraphs, + readCanonicalEvidenceFile, +} from './release-contract-core.mjs'; +import { + backendSourceEvidence, + canonicalGraphIdentity, + normalizeBackendRuntime, + sha256Value, + selectBackendRuntimeFingerprintEvidence, + stableStringify, +} from './live-proof-provenance.mjs'; +import { createHash } from 'node:crypto'; + +const same = (a, b, message) => assert.equal(stableStringify(a), stableStringify(b), message); +const MODES = new Set(['data_conversion', 'graph_utility', 'text_select']); +const hash = (bytes) => createHash('sha256').update(bytes).digest('hex'); + +export function builtinDataQualificationTarget(manifest, graph, authoring) { + const canonical = canonicalWorkflowContract(manifest, graph); + assert.equal(manifest.modelType, 'BuiltinDataOperation'); + assert.ok(MODES.has(manifest.mode), 'Unsupported deterministic task.'); + assert.equal(manifest.id, `BuiltinDataOperation:${manifest.mode}`); + assert.ok(manifest.sourceTemplateId?.startsWith('task-template:')); + same(manifest.requiredArtifacts, ['builtin://modiff/data-operations/v1'], 'Builtin artifact identity differs.'); + assert.equal(authoring.canonicalWorkflowId, manifest.id); + assert.equal(authoring.modelType, manifest.modelType); + assert.equal(authoring.mode, manifest.mode); + assert.equal(authoring.id, `template-authoring:${manifest.id}`); + same(authoring.canonicalGraph, { path: manifest.graphPath, sha256: manifest.graphHash }); + assert.equal(authoring.defaultsPlan.sourceGraphSha256, manifest.graphHash); + same(authoring.artifactPlan.requiredArtifacts, manifest.requiredArtifacts); + same(authoring.artifactPlan.componentRequirements, []); + same(authoring.inputPlan.items, [], 'File-backed utility evidence is unsupported.'); + assert.equal(authoring.outputPlan.minimumAssetCount, 1); + same(authoring.outputPlan.mediaKinds, ['json']); + const source = authoring.promptPlan.prompt; + assert.ok(typeof source === 'string' && source.length && Buffer.byteLength(source) <= 16384); + const boundGraph = structuredClone(graph); + const actions = new Map(); + for (const node of boundGraph.nodes) { + const identity = `${node.data.module}.${node.data.action}`; + assert.ok( + ['modules.Text.ProcessText', 'modules.Primitive.DataViewer', 'modules.Primitive.ExportData'].includes(identity), + 'Undeclared executable node in deterministic workflow.', + ); + assert.ok(!actions.has(node.data.action), 'Repeated deterministic node.'); + actions.set(node.data.action, node.id); + assert.ok( + Object.values(node.data.params).every((p) => p.display !== 'filebrowser'), + 'File-backed utility evidence is unsupported.', + ); + } + assert.equal(boundGraph.nodes.length, 3); + const processor = boundGraph.nodes.find((node) => node.id === actions.get('ProcessText')); + assert.equal(processor.data.params.source.value, '', 'Canonical source must remain an unbound input.'); + // Only the source input is supplied from the versioned authoring brief. No + // selector, export control, topology or canonical source file is rewritten. + processor.data.params.source.value = source; + return { + workflowId: manifest.id, + sourceTemplateId: manifest.sourceTemplateId, + authoringId: authoring.id, + authoringHash: sha256Value('canonical-workflow-authoring-v1', authoring), + canonicalWorkflowHash: canonical.graphHash, + modelType: manifest.modelType, + task: manifest.mode, + boundGraph, + roles: Object.fromEntries(actions), + inputBinding: { nodeId: processor.id, field: 'source', source: 'authoring.promptPlan.prompt', value: source }, + }; +} + +export function validateBuiltinDataExecution({ + target, + expectedApiGraph, + submittedApiGraph, + acceptedGraph, + run, + messages, + sourceBefore, + sourceAfter, + sourceInventory, + exportedBytes, + durableOutputs, +}) { + for (const api of [expectedApiGraph, submittedApiGraph, acceptedGraph.graph]) { + same(Object.keys(api).sort(), ['nodes', 'paths', 'sid'], 'Unreviewed graph authority or execution envelope.'); + } + const identity = canonicalGraphIdentity(expectedApiGraph); + same(canonicalGraphIdentity(submittedApiGraph), identity, 'Submitted canonical bindings differ.'); + same(acceptedGraph.graph, submittedApiGraph, 'Queue accepted a different graph.'); + const task = run.task; + assert.equal(task.status, 'completed'); + assert.equal(task.attempt_index, 0, 'Retry/fallback deterministic evidence is unsupported.'); + assert.ok(typeof task.task_id === 'string' && task.task_id.length > 0); + assert.equal(acceptedGraph.taskId, task.task_id); + assert.equal(task.sid, submittedApiGraph.sid); + assert.equal(task.resourceCandidateId, null); + assert.ok( + selectBackendRuntimeFingerprintEvidence([task.runtimeFingerprint]), + 'Structured runtime evidence is missing.', + ); + assert.ok(!task.runtimeHints || Object.keys(task.runtimeHints).length === 0); + assert.ok(Number.isFinite(task.started_at) && task.completed_at >= task.started_at); + const measurement = task.runtimeMeasurement; + assert.equal(measurement.backend, 'cpu'); + assert.equal(measurement.device, 'cpu:0'); + assert.equal(measurement.peakMeasurementVersion, 2); + assert.ok(Number.isFinite(measurement.elapsedSeconds) && measurement.elapsedSeconds >= 0); + assert.ok(Number.isSafeInteger(measurement.processRssBytes) && measurement.processRssBytes > 0); + assert.equal(sourceBefore.identity.fingerprint, sourceInventory.fingerprint); + assert.equal(sourceAfter.identity.fingerprint, sourceInventory.fingerprint); + const source = backendSourceEvidence({ + before: sourceInventory, + after: sourceInventory, + runtimeFingerprint: task.runtimeFingerprint, + }); + same(source.blockers, [], 'Source inventory does not match the executing process.'); + // Before/after bodies are original observations; the separately retained full + // inventory is recovered by its exact native fingerprint, not relabelled as a + // pre-run file listing. + for (const observation of [sourceBefore.identity, sourceAfter.identity]) { + assert.equal(observation.schemaVersion, 1); + assert.equal(observation.claim, 'process_start_backend_source_identity'); + assert.equal(observation.gitCommit, source.attestation.gitCommit); + assert.equal(observation.fileCount, source.attestation.fileCount); + } + assert.ok(Date.parse(sourceBefore.identity.capturedAt) <= task.started_at * 1000); + assert.ok(Date.parse(sourceAfter.identity.capturedAt) >= task.completed_at * 1000); + assert.ok(Array.isArray(messages) && messages.length > 0 && messages.length <= 512); + assert.ok( + messages.every((frame) => frame.task_id === task.task_id), + 'Unrelated task frame.', + ); + assert.ok(!messages.some((frame) => ['task_failed', 'resource_retry'].includes(frame.type))); + const completed = messages.filter((frame) => frame.type === 'graph_completed'); + assert.equal(completed.length, 1); + same(completed[0].runtimeFingerprint, task.runtimeFingerprint); + same(completed[0].runtimeMeasurement, measurement); + assert.ok(completed[0].runtimeHints == null, 'Runtime hints are unsupported.'); + same(completed[0].resourceRetryHistory, []); + const executed = messages.filter((frame) => frame.type === 'executed'); + same(executed.map((frame) => frame.node).sort(), Object.keys(expectedApiGraph.nodes).sort()); + for (const frame of executed) { + assert.equal(frame.status, 'succeeded', 'Cached execution is not a fresh deterministic proof.'); + assert.equal(frame.attempt_index, 0); + const node = expectedApiGraph.nodes[frame.node]; + assert.equal(frame.name, `${node.module}.${node.action}`); + } + const p = Object.fromEntries( + Object.entries(expectedApiGraph.nodes[target.roles.ProcessText].params) + .filter(([, field]) => Object.hasOwn(field, 'value')) + .map(([key, field]) => [key, field.value]), + ); + same( + p, + { + alternate_source: 'No alternate branch was selected.', + condition: true, + ignore_empty_lines: false, + index: 0, + operation: target.task, + pipeline_class: 'BuiltinDataOperationV1', + selection_mode: 'error', + source: target.inputBinding.value, + strip_line: true, + target_type: 'json', + }, + 'Unreviewed deterministic controls.', + ); + const expected = + target.task === 'data_conversion' + ? JSON.parse(p.source) + : target.task === 'text_select' + ? p.source.split(/\r?\n/u)[0].trim() + : p.source; + same(JSON.parse(exportedBytes.toString('utf8')), expected, 'Exported result differs from independent oracle.'); + const previews = messages.filter((frame) => frame.type === 'update_value'); + same(previews.map((frame) => frame.node).sort(), [target.roles.DataViewer, target.roles.ExportData].sort()); + assert.equal(run.outputs.length, 2); + assert.equal(durableOutputs.length, 2); + for (const frame of previews) { + assert.equal(frame.attempt_index, 0); + assert.equal(frame.key, 'preview'); + assert.equal(frame.backend_persisted, true); + assert.equal(frame.runtimeFingerprint, task.runtimeFingerprint.fingerprint); + assert.equal(frame.value.length, 1); + const value = frame.value[0]; + if (frame.node === target.roles.ExportData) { + assert.ok( + exportedBytes.equals(Buffer.from(`${value}\n`, 'utf8')), + 'Physical export differs from native export preview.', + ); + } + same( + target.task === 'data_conversion' || frame.node === target.roles.ExportData ? JSON.parse(value) : value, + expected, + 'Delivered preview differs from deterministic result.', + ); + const outputs = run.outputs.filter((output) => output.id === frame.output_id && output.nodeId === frame.node); + assert.equal(outputs.length, 1); + const output = outputs[0]; + assert.equal(output.taskId, task.task_id); + assert.equal(output.attemptIndex, 0); + same(output.value, frame.value); + assert.equal(output.mediaItems.length, 1); + const item = output.mediaItems[0]; + const retained = durableOutputs.filter((row) => row.nodeId === frame.node); + assert.equal(retained.length, 1); + assert.equal(retained[0].backendPath, item.backendPath); + assert.equal(item.taskId, task.task_id); + assert.equal(item.attemptIndex, 0); + assert.equal(item.byteSize, retained[0].bytes.length); + assert.equal(item.mediaHash, `sha256:bytes:${hash(retained[0].bytes)}`); + same(JSON.parse(retained[0].bytes.toString('utf8')), frame.value, 'Durable preview bytes differ.'); + const consumed = frame.resolved_execution_inputs; + assert.equal(consumed.source, 'backend-execution'); + assert.equal(consumed.taskId, task.task_id); + assert.equal(consumed.attemptIndex, 0); + assert.equal(consumed.nodeId, frame.node); + assert.equal(consumed.truncated, false); + same(consumed.uncapturedNodeIds, []); + same(output.resolvedExecutionInputs, consumed); + const ancestorIds = [ + target.roles.ProcessText, + target.roles.DataViewer, + ...(frame.node === target.roles.ExportData ? [target.roles.ExportData] : []), + ].sort(); + same(consumed.nodes.map((row) => row.nodeId).sort(), ancestorIds); + for (const row of consumed.nodes) { + const node = expectedApiGraph.nodes[row.nodeId]; + assert.equal(row.module, node.module); + assert.equal(row.action, node.action); + same(row.omittedFields, {}); + same( + row.fields, + row.nodeId === target.roles.ProcessText + ? { pipeline_class: { value: 'BuiltinDataOperationV1', source: 'literal' } } + : {}, + ); + } + } + const { boundGraph: _graph, roles: _roles, ...contract } = target; + return { + schemaVersion: 1, + format: 'modiff.canonical-workflow-run-receipt.v1', + proofKind: 'real_backend_deterministic_data', + ...contract, + taskId: task.task_id, + capturedAt: new Date(task.completed_at * 1000).toISOString(), + graphHash: identity.hash, + runtimeFingerprint: normalizeBackendRuntime(task.runtimeFingerprint).lockFingerprint, + backendSourceFingerprint: sourceInventory.fingerprint, + outputHash: `sha256:bytes:${hash(exportedBytes)}`, + executionDurationSeconds: measurement.elapsedSeconds, + peakMemoryBytes: measurement.processRssBytes, + modelSet: [], + resourceCandidateId: null, + deterministicCorrectness: 'verified_exact_result', + observationLimits: { + fullConsumedFieldAccounting: false, + browserInteraction: false, + sourceInventoryRecoveredByNativeFingerprint: true, + }, + qualificationClaims: { + publicTemplate: false, + qualityApproved: false, + rightsApproved: false, + hardwareQualified: false, + modelResourceQualified: false, + }, + }; +} + +export async function readBuiltinDataEvidence({ clientRoot, manifest, graph, authoring, evidencePath }) { + const target = builtinDataQualificationTarget(manifest, graph, authoring); + const stat = lstatSync(evidencePath); + assert.ok(stat.isFile() && !stat.isSymbolicLink() && stat.size <= 65536); + const descriptorBytes = readFileSync(evidencePath); + const evidence = JSON.parse(descriptorBytes.toString('utf8')); + assert.equal(evidence.schemaVersion, 1); + assert.equal(evidence.format, 'modiff.canonical-builtin-data-evidence.v1'); + assert.equal(evidence.workflowId, manifest.id); + same( + Object.keys(evidence).sort(), + [ + 'schemaVersion', + 'format', + 'workflowId', + 'submittedApiGraph', + 'acceptedGraph', + 'runDetail', + 'messages', + 'sourceBefore', + 'sourceAfter', + 'sourceInventory', + 'exportedData', + 'durableOutputs', + ].sort(), + 'Unreviewed deterministic evidence fields.', + ); + assert.ok(Array.isArray(evidence.durableOutputs) && evidence.durableOutputs.length === 2); + const root = realpathSync(dirname(evidencePath)); + const retainedFiles = []; + const read = (ref) => { + const result = readCanonicalEvidenceFile(root, ref, 16 * 1024 * 1024); + retainedFiles.push({ ...ref, absolutePath: result.file }); + return result.bytes; + }; + const json = (ref) => JSON.parse(read(ref).toString('utf8')); + const [expectedApiGraph] = await exportCanonicalWorkflowGraphs(clientRoot, [target.boundGraph]); + const receipt = validateBuiltinDataExecution({ + target, + expectedApiGraph, + submittedApiGraph: json(evidence.submittedApiGraph), + acceptedGraph: json(evidence.acceptedGraph), + run: json(evidence.runDetail), + messages: json(evidence.messages), + sourceBefore: json(evidence.sourceBefore), + sourceAfter: json(evidence.sourceAfter), + sourceInventory: json(evidence.sourceInventory), + exportedBytes: read(evidence.exportedData), + durableOutputs: evidence.durableOutputs.map((row) => ({ ...row, bytes: read(row.file) })), + }); + for (const ref of retainedFiles) readCanonicalEvidenceFile(root, ref, 16 * 1024 * 1024); + assert.ok(readFileSync(evidencePath).equals(descriptorBytes)); + return { + receipt, + provenance: { format: 'modiff.deterministic-data-proof.v1', receipt }, + evidence, + descriptorBytes, + retainedFiles, + evidenceRoot: root, + }; +} diff --git a/scripts/builtin-media-qualification.mjs b/scripts/builtin-media-qualification.mjs new file mode 100644 index 00000000..db6d0ac7 --- /dev/null +++ b/scripts/builtin-media-qualification.mjs @@ -0,0 +1,453 @@ +// Deterministic fixture qualification through the existing recorder/executor. +// Original packets and media remain immutable. No model or public asset grant. +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { readFileSync, lstatSync, realpathSync } from 'node:fs'; +import { dirname, join } from 'node:path'; +import { spawnSync } from 'node:child_process'; +import { createServer } from 'vite'; +import { + canonicalWorkflowContract, + exportCanonicalWorkflowGraphs, + readCanonicalEvidenceFile, +} from './release-contract-core.mjs'; +import { + canonicalGraphIdentity, + backendSourceEvidence, + normalizeBackendRuntime, + selectBackendRuntimeFingerprintEvidence, + sha256Value, + stableStringify, +} from './live-proof-provenance.mjs'; + +const same = (a, b, message) => assert.equal(stableStringify(a), stableStringify(b), message); +const hash = (bytes) => createHash('sha256').update(bytes).digest('hex'); +const TYPES = { + BuiltinImageOperation: ['ImageOperations', 'ProcessImage', 'Image', 'Preview', 'image-operations'], + BuiltinAudioOperation: ['Audio', 'ProcessAudio', 'Audio', 'Export', 'audio-operations'], + BuiltinVideoOperation: ['Video', 'ProcessVideo', null, null, 'video-operations'], +}; +let parserPromise; +async function parser(clientRoot) { + parserPromise ??= (async () => { + const server = await createServer({ + root: clientRoot, + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, hmr: false, watch: null }, + appType: 'custom', + }); + try { + return await server.ssrLoadModule('/src/studio/builtinMediaEvidence.ts'); + } finally { + await server.close(); + } + })(); + return parserPromise; +} + +export function builtinMediaTarget(manifest, graph, authoring, inputs, variant, exercises) { + const canonical = canonicalWorkflowContract(manifest, graph), + type = TYPES[manifest.modelType]; + assert.ok(type && Object.hasOwn(exercises, manifest.mode), 'Unsupported media qualification task.'); + assert.equal(manifest.id, `${manifest.modelType}:${manifest.mode}`); + assert.ok(manifest.sourceTemplateId.startsWith('task-template:')); + same(manifest.requiredArtifacts, [`builtin://modiff/${type[4]}/v1`]); + assert.equal(authoring.canonicalWorkflowId, manifest.id); + assert.equal(authoring.modelType, manifest.modelType); + assert.equal(authoring.mode, manifest.mode); + same(authoring.canonicalGraph, { path: manifest.graphPath, sha256: manifest.graphHash }); + assert.equal(authoring.defaultsPlan.sourceGraphSha256, manifest.graphHash); + same(authoring.artifactPlan.requiredArtifacts, manifest.requiredArtifacts); + same(authoring.artifactPlan.componentRequirements, []); + assert.ok(['baseline', 'exercise'].includes(variant)); + const boundGraph = structuredClone(graph), + primary = boundGraph.nodes.filter((n) => n.data.module === `modules.${type[0]}` && n.data.action === type[1]); + assert.equal(primary.length, 1); + assert.ok(Array.isArray(inputs) && inputs.length > 0 && inputs.length <= 3); + const fileFields = boundGraph.nodes.flatMap((n) => + Object.entries(n.data.params) + .filter(([, v]) => v.display === 'filebrowser') + .map(([field]) => `${n.id}.${field}`), + ); + same(inputs.map((v) => `${v.nodeId}.${v.field}`).sort(), fileFields.sort(), 'Complete root input bindings required.'); + for (const binding of inputs) { + assert.ok(Array.isArray(binding.values) && binding.values.length > 0 && binding.values.length <= 2); + const node = boundGraph.nodes.find((n) => n.id === binding.nodeId), + parameter = node.data.params[binding.field]; + const empty = parameter.value ?? parameter.default; + assert.ok(empty === '' || (Array.isArray(empty) && empty.length === 0), 'Canonical input is not unbound.'); + for (const value of binding.values) { + assert.match(value.sourceValue, /^@data\/[\w./-]+$/u); + assert.ok(value.sourceValue.split('/').every((part) => part && part !== '.' && part !== '..')); + } + assert.ok(parameter.fieldOptions?.multiple || binding.values.length === 1); + parameter.value = parameter.fieldOptions?.multiple + ? binding.values.map((v) => v.sourceValue) + : binding.values[0].sourceValue; + } + const allowed = new Set([ + `modules.${type[0]}.${type[1]}`, + 'modules.Image.Load', + 'modules.Image.Preview', + 'modules.Audio.Load', + 'modules.Audio.Export', + 'modules.Video.Export', + ]); + assert.ok( + boundGraph.nodes.every((n) => allowed.has(`${n.data.module}.${n.data.action}`)), + 'Undeclared executable node.', + ); + if (variant === 'exercise') + for (const [name, value] of Object.entries(exercises[manifest.mode])) { + assert.ok(Object.hasOwn(primary[0].data.params, name), 'Exercise field is not declared.'); + primary[0].data.params[name].value = value; + } + if (variant === 'exercise' && manifest.mode === 'frame_interpolation') + boundGraph.nodes.find((n) => n.data.action === 'Export').data.params.fps.value = + exercises.frame_interpolation.interpolation_fps; + return { + workflowId: manifest.id, + sourceTemplateId: manifest.sourceTemplateId, + authoringId: authoring.id, + authoringHash: sha256Value('canonical-workflow-authoring-v1', authoring), + canonicalWorkflowHash: canonical.graphHash, + modelType: manifest.modelType, + task: manifest.mode, + boundGraph, + processorId: primary[0].id, + }; +} + +export function validateMediaLifecycle({ expectedApi, submittedApi, accepted, run, messages, before, after }) { + for (const api of [expectedApi, submittedApi, accepted.graph]) + same(Object.keys(api).sort(), ['nodes', 'paths', 'sid'], 'Unreviewed execution authority.'); + same( + canonicalGraphIdentity(expectedApi), + canonicalGraphIdentity(submittedApi), + 'Submitted graph/defaults/bindings differ.', + ); + same(accepted.graph, submittedApi, 'Accepted queue graph differs.'); + const task = run.task; + assert.equal(task.status, 'completed'); + assert.equal(task.attempt_index, 0); + assert.equal(task.resourceCandidateId, null); + assert.equal(accepted.taskId, task.task_id); + assert.equal(task.sid, submittedApi.sid); + assert.ok(!task.runtimeHints || Object.keys(task.runtimeHints).length === 0); + assert.ok( + Number.isFinite(task.started_at) && Number.isFinite(task.completed_at) && task.completed_at >= task.started_at, + ); + const source = backendSourceEvidence({ + before: before.identity, + after: after.identity, + runtimeFingerprint: task.runtimeFingerprint, + }); + assert.ok( + selectBackendRuntimeFingerprintEvidence([task.runtimeFingerprint]), + 'Structured actual runtime is missing.', + ); + same(source.blockers, [], 'Source does not match the native process.'); + assert.ok( + Date.parse(before.identity.capturedAt) <= task.started_at * 1000 && + Date.parse(after.identity.capturedAt) >= task.completed_at * 1000, + ); + assert.ok(Array.isArray(messages) && messages.length <= 512 && messages.every((m) => m.task_id === task.task_id)); + const done = messages.filter((m) => m.type === 'graph_completed'); + assert.equal(done.length, 1); + same(done[0].runtimeFingerprint, task.runtimeFingerprint); + same(done[0].runtimeMeasurement, task.runtimeMeasurement); + same(done[0].resourceRetryHistory, []); + assert.ok(done[0].runtimeHints == null); + const executed = messages.filter((m) => m.type === 'executed'); + same(executed.map((m) => m.node).sort(), Object.keys(expectedApi.nodes).sort()); + for (const frame of executed) { + const node = expectedApi.nodes[frame.node]; + assert.equal(frame.name, `${node.module}.${node.action}`); + assert.equal(frame.status, 'succeeded', 'Cached result is not a fresh proof.'); + assert.equal(frame.attempt_index, 0); + } + const m = task.runtimeMeasurement; + assert.equal(m.backend, 'cpu'); + assert.equal(m.device, 'cpu:0'); + assert.equal(m.peakMeasurementVersion, 2); + assert.ok( + Number.isFinite(m.elapsedSeconds) && + m.elapsedSeconds >= 0 && + Number.isSafeInteger(m.processRssBytes) && + m.processRssBytes > 0, + ); + return { task, source: source.identity, graphHash: canonicalGraphIdentity(expectedApi).hash }; +} + +export async function readBuiltinMediaEvidence({ clientRoot, manifest, graph, authoring, evidencePath }) { + const stat = lstatSync(evidencePath); + assert.ok(stat.isFile() && !stat.isSymbolicLink() && stat.size <= 65536); + const descriptorBytes = readFileSync(evidencePath), + evidence = JSON.parse(descriptorBytes.toString('utf8')); + assert.equal(evidence.schemaVersion, 1); + assert.equal(evidence.format, 'modiff.canonical-builtin-media-evidence.v1'); + assert.equal(evidence.workflowId, manifest.id); + same(Object.keys(evidence).sort(), ['schemaVersion', 'format', 'workflowId', 'runs'].sort()); + assert.ok(Array.isArray(evidence.runs) && evidence.runs.length === 2); + same( + evidence.runs.map((r) => r.variant), + ['baseline', 'exercise'], + ); + const root = realpathSync(dirname(evidencePath)), + retainedFiles = []; + const read = (ref) => { + const result = readCanonicalEvidenceFile(root, ref, 64 * 1024 * 1024); + retainedFiles.push({ ...ref, absolutePath: result.file }); + return result; + }; + const json = (ref) => JSON.parse(read(ref).bytes.toString('utf8')); + const exercises = JSON.parse( + readFileSync(join(clientRoot, 'config/builtin-media-qualification.v1.json'), 'utf8'), + ).exercises; + const targets = evidence.runs.map((r) => + builtinMediaTarget(manifest, graph, authoring, r.inputs, r.variant, exercises), + ); + const apis = await exportCanonicalWorkflowGraphs( + clientRoot, + targets.map((t) => t.boundGraph), + ); + const { parseBuiltinMediaEvidence, BUILTIN_MEDIA_EVIDENCE_SCOPES } = await parser(clientRoot); + const executions = []; + for (const [index, record] of evidence.runs.entries()) { + const target = targets[index], + expectedApi = apis[index], + submittedApi = json(record.submittedApi), + accepted = json(record.acceptedGraph), + run = json(record.runDetail), + messages = json(record.messages); + const lifecycle = validateMediaLifecycle({ + expectedApi, + submittedApi, + accepted, + run, + messages, + before: json(record.sourceBefore), + after: json(record.sourceAfter), + }); + const terminalIds = Object.keys(expectedApi.nodes).filter((id) => + Object.values(expectedApi.nodes).every((n) => Object.values(n.params).every((p) => p.sourceId !== id)), + ); + assert.equal(terminalIds.length, 1); + const terminalId = terminalIds[0]; + const outputs = run.outputs.filter((o) => o.nodeId === terminalId); + assert.equal(outputs.length, 1); + const output = outputs[0], + frames = messages.filter((m) => m.type === 'update_value' && m.node === terminalId && m.output_id === output.id); + assert.equal(frames.length, 1); + assert.equal(frames[0].backend_persisted, true); + assert.equal(output.taskId, lifecycle.task.task_id); + assert.equal(output.attemptIndex, 0); + same(frames[0].resolved_execution_inputs, output.resolvedExecutionInputs); + const consumed = output.resolvedExecutionInputs; + assert.equal(consumed.source, 'backend-execution'); + assert.equal(consumed.taskId, lifecycle.task.task_id); + assert.equal(consumed.nodeId, terminalId); + assert.equal(consumed.attemptIndex, 0); + same(consumed.uncapturedNodeIds, []); + assert.equal(consumed.truncated, false); + same(consumed.mediaEvidenceStatus, { schemaVersion: 1, truncated: false }); + same(consumed.nodes.map((n) => n.nodeId).sort(), Object.keys(expectedApi.nodes).sort()); + const media = new Map(), + nodeControls = {}; + for (const node of consumed.nodes) { + const submitted = expectedApi.nodes[node.nodeId]; + assert.equal(node.module, submitted.module); + assert.equal(node.action, submitted.action); + const scope = `${node.module.replace(/^modules\./u, '')}.${node.action}`, + observed = parseBuiltinMediaEvidence(node.mediaEvidence, scope); + assert.equal(observed?.status, 'complete', `Missing complete native media capture: ${node.nodeId}`); + const names = new Set(BUILTIN_MEDIA_EVIDENCE_SCOPES[scope].controls.split(/\s+/u).filter(Boolean)); + const expectedControls = Object.fromEntries( + Object.entries(submitted.params) + .filter(([k, p]) => names.has(k) && Object.hasOwn(p, 'value')) + .map(([k, p]) => [k, p.value]), + ); + same(observed.controls, expectedControls, 'Normalized native controls differ.'); + nodeControls[node.nodeId] = observed.controls; + media.set(node.nodeId, observed); + } + for (const [id, node] of Object.entries(expectedApi.nodes)) + for (const [port, param] of Object.entries(node.params)) + if (param.sourceId) { + const targetMedia = media.get(id), + producer = media.get(param.sourceId); + same( + targetMedia.inputs[port], + producer.outputs[param.sourceKey], + `Consumed ordered media differs across ${id}.${port}`, + ); + } + const oracleInputs = []; + for (const binding of record.inputs) { + const native = media.get(binding.nodeId).files[binding.field]; + assert.equal(native.length, binding.values.length); + const values = binding.values.map((row, i) => { + const physical = read(row.file); + const { sourceValue } = native[i]; + assert.equal(Array.isArray(sourceValue) ? sourceValue[0] : sourceValue, row.sourceValue); + assert.equal(native[i].sha256, row.file.sha256); + assert.equal(native[i].byteSize, row.file.bytes); + assert.ok(native[i].converted !== true); + if (media.get(binding.nodeId).inputs[binding.field]) + same( + media.get(binding.nodeId).inputs[binding.field][i], + { kind: 'file', sha256: row.file.sha256, byteSize: row.file.bytes }, + 'Snapshot consumption differs from original source bytes.', + ); + return { path: physical.file }; + }); + oracleInputs.push({ nodeId: binding.nodeId, field: binding.field, values }); + } + assert.equal(record.durableOutputs.length, output.mediaItems.length); + const durable = record.durableOutputs.map((row, i) => { + const item = output.mediaItems[i], + physical = read(row.file); + assert.equal(row.backendPath, item.backendPath); + assert.equal(item.taskId, lifecycle.task.task_id); + assert.equal(item.attemptIndex, 0); + assert.equal(item.mediaHash, `sha256:bytes:${row.file.sha256}`); + assert.equal(item.byteSize, row.file.bytes); + if (expectedApi.nodes[terminalId].module === 'modules.Image') { + const nativeUrl = new URL(output.provenance.mediaItems[i].url, 'http://127.0.0.1'); + assert.equal(nativeUrl.pathname, `/cache/${terminalId}/output/${i}`); + assert.equal(nativeUrl.searchParams.get('format'), 'WEBP'); + assert.equal(nativeUrl.searchParams.get('quality'), '100'); + } + if (media.get(terminalId).outputs.file) + same(media.get(terminalId).outputs.file[i], { + kind: 'file', + sha256: row.file.sha256, + byteSize: row.file.bytes, + }); + return { path: physical.file }; + }); + const raw = record.rawOutputs.map((row, i) => { + assert.equal(row.nodeId, terminalId); + assert.equal(row.field, 'output'); + assert.equal(row.index, i); + return { path: read(row.file).file }; + }); + const primary = expectedApi.nodes[target.processorId], + isImage = manifest.modelType === 'BuiltinImageOperation', + isAudio = manifest.modelType === 'BuiltinAudioOperation'; + const primarySource = primary.params[isImage ? 'image' : isAudio ? 'source' : 'videos']?.sourceId; + const oracle = { + mode: manifest.mode, + modelType: manifest.modelType, + controls: nodeControls[target.processorId], + nodeControls, + inputs: oracleInputs, + durableOutputs: durable, + rawOutputs: raw, + primarySource, + referenceSource: primary.params.reference?.sourceId, + maskSource: primary.params.mask?.sourceId, + exportControls: nodeControls[terminalId], + }; + if (record.intermediate) { + const physical = read(record.intermediate); + const native = media.get(target.processorId).outputs.video; + same(native, [{ kind: 'file', sha256: record.intermediate.sha256, byteSize: record.intermediate.bytes }]); + oracle.intermediate = { path: physical.file }; + } else + assert.ok( + isImage || isAudio || manifest.mode === 'video_frame_extract', + 'Native intermediate output is missing.', + ); + const python = + process.env.MODIFF_BACKEND_PYTHON || + process.env.MODIFF_PYTHON || + join(clientRoot, '../MoDiff/.venv', process.platform === 'win32' ? 'Scripts/python.exe' : 'bin/python'); + const checked = spawnSync(python, ['-X', 'utf8', '-B', join(clientRoot, 'scripts/verify-builtin-media.py')], { + input: JSON.stringify(oracle), + encoding: 'utf8', + timeout: 60000, + maxBuffer: 2 * 1024 * 1024, + }); + assert.equal(checked.status, 0, `Independent ${manifest.mode}/${record.variant} check failed: ${checked.stderr}`); + const result = JSON.parse(checked.stdout); + assert.equal(result.status, 'passed'); + for (const [nodeId, identities] of Object.entries(result.rootDecoded)) + same( + media.get(nodeId).outputs[isImage ? 'image' : 'audio'], + identities, + 'Decoded roots differ from actual loaded bytes.', + ); + if (result.processedImages) { + same(media.get(target.processorId).outputs[isImage ? 'output' : 'images'], result.processedImages); + same(media.get(terminalId).outputs.output, result.processedImages); + } + if (result.processedAudio) same(media.get(target.processorId).outputs.output, [result.processedAudio]); + executions.push({ + variant: record.variant, + taskId: lifecycle.task.task_id, + graphHash: lifecycle.graphHash, + capturedAt: new Date(lifecycle.task.completed_at * 1000).toISOString(), + backendSourceFingerprint: lifecycle.source.fingerprint, + runtimeFingerprint: normalizeBackendRuntime(lifecycle.task.runtimeFingerprint).lockFingerprint, + executionDurationSeconds: lifecycle.task.runtimeMeasurement.elapsedSeconds, + peakMemoryBytes: lifecycle.task.runtimeMeasurement.processRssBytes, + outputHashes: record.durableOutputs.map((row) => `sha256:bytes:${row.file.sha256}`), + correctness: result, + }); + } + for (const ref of retainedFiles) readCanonicalEvidenceFile(root, ref, 64 * 1024 * 1024); + assert.ok(readFileSync(evidencePath).equals(descriptorBytes)); + const target = targets[0], + last = executions.at(-1); + const receipt = { + schemaVersion: 1, + format: 'modiff.canonical-workflow-run-receipt.v1', + proofKind: 'real_backend_deterministic_media', + workflowId: manifest.id, + sourceTemplateId: manifest.sourceTemplateId, + authoringId: authoring.id, + authoringHash: target.authoringHash, + canonicalWorkflowHash: target.canonicalWorkflowHash, + modelType: manifest.modelType, + task: manifest.mode, + taskId: executions[0].taskId, + capturedAt: last.capturedAt, + graphHash: executions[0].graphHash, + modelSet: [], + resourceCandidateId: null, + runtimeFingerprint: executions[0].runtimeFingerprint, + backendSourceFingerprint: executions[0].backendSourceFingerprint, + outputHash: sha256Value( + 'builtin-media-output-collection-v1', + executions.map((e) => e.outputHashes), + ), + executionDurationSeconds: executions.reduce((n, e) => n + e.executionDurationSeconds, 0), + peakMemoryBytes: Math.max(...executions.map((e) => e.peakMemoryBytes)), + canonicalDefaultsExecuted: true, + deterministicCorrectness: 'verified_media_contract', + executions, + observationLimits: { + fullConsumedFieldAccounting: false, + browserInteraction: false, + physicalPlatformQualification: false, + }, + qualificationClaims: { + publicTemplate: false, + qualityApproved: false, + rightsApproved: false, + hardwareQualified: false, + modelResourceQualified: false, + }, + }; + return { + receipt, + provenance: { format: 'modiff.deterministic-media-proof.v1', receipt }, + evidence, + descriptorBytes, + retainedFiles, + evidenceRoot: root, + }; +} diff --git a/scripts/builtin-media-qualification.test.mjs b/scripts/builtin-media-qualification.test.mjs new file mode 100644 index 00000000..16aa5819 --- /dev/null +++ b/scripts/builtin-media-qualification.test.mjs @@ -0,0 +1,231 @@ +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; +import { join, resolve } from 'node:path'; +import test from 'node:test'; +import { builtinMediaTarget, validateMediaLifecycle } from './builtin-media-qualification.mjs'; +import { canonicalJsonHash } from './canonical-json.mjs'; +import { sha256Value } from './live-proof-provenance.mjs'; +import { canonicalWorkflowAuthoringContract } from './release-contract-core.mjs'; + +const backend = resolve(process.env.MODIFF_BACKEND_DIR || '../MoDiff'); +const json = (path) => JSON.parse(readFileSync(path, 'utf8')); +const manifest = json(join(backend, 'data/workflow-library-manifest.json')).workflows; +const authorings = json(join(backend, 'data/template-authoring-specs.v1.json')).specifications; +const exercises = json(resolve('config/builtin-media-qualification.v1.json')).exercises; +function fixture(mode = 'image_crop') { + const row = manifest.find((r) => r.mode === mode && r.modelType.startsWith('Builtin')); + const graph = json(join(backend, 'data/graphs', row.graphPath)), + authoring = authorings.find((r) => r.canonicalWorkflowId === row.id); + const inputs = graph.nodes.flatMap((node) => + Object.entries(node.data.params) + .filter(([, p]) => p.display === 'filebrowser') + .map(([field, p]) => ({ + nodeId: node.id, + field, + values: Array.from( + { + length: + p.fieldOptions?.multiple && + ['mask_composite', 'image_stitch', 'video_stitch', 'video_tile'].includes(mode) + ? 2 + : 1, + }, + (_, i) => ({ sourceValue: `@data/fixtures/${node.id}-${i}.bin` }), + ), + })), + ); + return { row, graph, authoring, inputs }; +} +test('all 17 model-free media recipes preserve canonical defaults and bind only declared inputs and explicit exercises', () => { + assert.equal(Object.keys(exercises).length, 17); + for (const mode of Object.keys(exercises)) { + const f = fixture(mode), + original = JSON.stringify(f.graph); + assert.throws( + () => canonicalWorkflowAuthoringContract(f.row, f.graph, f.authoring), + /builtin qualification is unsupported/, + ); + const baseline = builtinMediaTarget(f.row, f.graph, f.authoring, f.inputs, 'baseline', exercises); + const edited = builtinMediaTarget(f.row, f.graph, f.authoring, f.inputs, 'exercise', exercises); + assert.equal(baseline.modelType, f.row.modelType); + assert.equal(baseline.canonicalWorkflowHash, edited.canonicalWorkflowHash); + const primary = edited.boundGraph.nodes.find((n) => n.id === edited.processorId); + for (const [field, value] of Object.entries(exercises[mode])) assert.equal(primary.data.params[field].value, value); + assert.equal(JSON.stringify(f.graph), original, 'Authoritative workflow defaults were changed'); + } +}); +test('media admission rejects missing roots, traversal, model substitutions and stale source identity', () => { + for (const change of [ + (f) => { + f.inputs = []; + }, + (f) => { + f.inputs[0].values[0].sourceValue = '@data/../private.png'; + }, + (f) => { + f.row.modelType = 'UnreviewedModel'; + }, + (f) => { + f.authoring.canonicalGraph.sha256 = 'stale'; + }, + (f) => { + f.row.requiredArtifacts = ['example/weights']; + }, + (f) => { + f.inputs.push(structuredClone(f.inputs[0])); + }, + ]) { + const f = structuredClone(fixture()); + change(f); + assert.throws(() => builtinMediaTarget(f.row, f.graph, f.authoring, f.inputs, 'baseline', exercises)); + } + const f = fixture(); + f.graph.nodes[0].data.module = 'custom.Unreviewed'; + f.row.graphHash = canonicalJsonHash(f.graph); + f.authoring.canonicalGraph.sha256 = f.row.graphHash; + f.authoring.defaultsPlan.sourceGraphSha256 = f.row.graphHash; + assert.throws( + () => builtinMediaTarget(f.row, f.graph, f.authoring, f.inputs, 'baseline', exercises), + /Undeclared|equal|length/, + ); +}); +function lifecycle() { + const source = { gitCommit: 'd'.repeat(40), files: [{ path: 'main.py', sha256: 'c'.repeat(64) }] }; + source.fingerprint = sha256Value('backend-source-v1', source); + const start = Date.parse('2026-11-15T00:00:01Z') / 1000; + const claim = { + schemaVersion: 1, + claim: 'process_start_backend_source_identity', + gitCommit: source.gitCommit, + fingerprint: source.fingerprint, + fileCount: 1, + capturedAt: '2026-11-15T00:00:00Z', + }; + const api = { + sid: 'synthetic-session', + nodes: { op: { module: 'modules.Video', action: 'ProcessVideo', params: { fps: { value: 24 } } } }, + paths: [['op']], + }; + const runtime = { + fingerprint: 'sha256:synthetic-runtime', + packages: { torch: '2.14.1', python: '3.12.11' }, + torch: { version: '2.14.1', cuda_available: false }, + work_dir: '/synthetic/work', + data_dir: '/synthetic/data', + backendSource: claim, + }; + const measurement = { + backend: 'cpu', + device: 'cpu:0', + peakMeasurementVersion: 2, + elapsedSeconds: 0.1, + processRssBytes: 4096, + }; + const task = { + task_id: 'synthetic-media', + sid: api.sid, + status: 'completed', + attempt_index: 0, + resourceCandidateId: null, + started_at: start, + completed_at: start + 0.1, + runtimeFingerprint: runtime, + runtimeMeasurement: measurement, + }; + return { + expectedApi: structuredClone(api), + submittedApi: structuredClone(api), + accepted: { taskId: task.task_id, graph: structuredClone(api) }, + run: { task }, + before: { identity: { ...source, capturedAt: '2026-11-15T00:00:00Z' } }, + after: { identity: { ...source, capturedAt: '2026-11-15T00:00:02Z' } }, + messages: [ + { + type: 'executed', + task_id: task.task_id, + node: 'op', + name: 'modules.Video.ProcessVideo', + status: 'succeeded', + attempt_index: 0, + }, + { + type: 'graph_completed', + task_id: task.task_id, + runtimeFingerprint: runtime, + runtimeMeasurement: measurement, + runtimeHints: null, + resourceRetryHistory: [], + }, + ], + }; +} +test('the media lifecycle requires the exact fresh queue graph, task, completion, source and measurement', async (t) => { + assert.equal(validateMediaLifecycle(lifecycle()).task.status, 'completed'); + for (const [name, change] of [ + [ + 'graph drift', + (f) => { + f.submittedApi.nodes.op.params.fps.value = 30; + }, + ], + [ + 'extra authority', + (f) => { + f.accepted.graph.servicePackage = {}; + }, + ], + [ + 'fallback', + (f) => { + f.run.task.attempt_index = 1; + }, + ], + [ + 'unrelated accepted task', + (f) => { + f.accepted.taskId = 'other'; + }, + ], + [ + 'cached result', + (f) => { + f.messages[0].status = 'cached'; + }, + ], + [ + 'missing node', + (f) => { + f.messages.shift(); + }, + ], + [ + 'source drift', + (f) => { + f.after.identity.fingerprint = 'changed'; + }, + ], + [ + 'incomplete memory', + (f) => { + delete f.run.task.runtimeMeasurement.processRssBytes; + }, + ], + [ + 'unrelated frame', + (f) => { + f.messages[0].task_id = 'other'; + }, + ], + [ + 'Auto substitution', + (f) => { + f.run.task.resourceCandidateId = 'unreviewed'; + }, + ], + ]) + await t.test(name, () => { + const f = structuredClone(lifecycle()); + change(f); + assert.throws(() => validateMediaLifecycle(f)); + }); +}); diff --git a/scripts/bundle-budget.mjs b/scripts/bundle-budget.mjs index 9251a263..0b18a776 100644 --- a/scripts/bundle-budget.mjs +++ b/scripts/bundle-budget.mjs @@ -1,3 +1,372 @@ +// The 21 approved retained recipes add 11568/11563 startup gzip bytes. +// The measured largest chunk is 540863 bytes and startup totals 719345. +// Keep existing headroom, startup membership, and both deferred ceilings. +// Saved workflow compatibility measures 514731/693216 startup gzip bytes. +// Account for the measured 1204/1206-byte additions over 513527/692010. +// Existing startup headroom, deferred caps, and loading boundaries stay fixed. +// Plain text-to-image accounting measures 513527/692010/352904 largest, +// startup and deferred gzip bytes, compared with 513421/691907/353157 in +// the previous packaged bundle measured on the same host. The startup limits +// include only the measured 106/103-byte increases and retain 5/2-byte headroom. +// Deferred limits and loading boundaries retain their existing budgets. +// Exact source-stage model review changes only the lazy OperationModelPicker +// after import URL normalization. Deferred gzip grows 347 bytes (352868 to +// 353215). Preserve the 89-byte headroom, startup bytes, chunk memberships +// and individual 64 KiB cap. +// Observed model labels, terminal progress, and Retry Decode measure +// 513420/691906/352868 largest/startup/deferred gzip bytes. Add 397/396/1244 +// bytes over 513023/691510/351624. Preserve prior headroom, four startup +// chunks, 93 deferred chunks and the 64 KiB per-chunk cap. +// Graph-derived model display and workflow share metadata measure +// 513023/691510/351624 largest/startup/deferred gzip bytes. Add the measured +// 398/402/278 bytes over 512625/691108/351346. Preserve prior headroom, four +// startup chunks, 93 deferred chunks and the 64 KiB per-chunk cap. +// Ordinary stage cards, storyboard compatibility and the lazy implementation +// dialog measure 512625/691108/351346 largest/startup/deferred gzip bytes. +// Add the measured 673/669/652 bytes over 511952/690439/350694, preserving +// prior headroom. Four startup chunks and the 64 KiB deferred chunk cap stay +// fixed. The shared StageImplementationDialog is the 93rd deferred chunk. +// Extending the same repair to encoders and preserving changed-task binding +// censuses adds 364 deferred gzip bytes (350330 -> 350694). Keep the same 89-byte +// headroom, startup ceilings, loading memberships and per-chunk ceiling. +// Typed shared-input grouping and undoable saved-stage repair add 418 deferred +// gzip bytes (349912 -> 350330). Retain the previous 89-byte headroom, four +// startup/92 deferred memberships, startup caps and 64 KiB per-chunk cap. +// Native legacy setup/caption field preservation, pure Block movement planning, +// workflow-scoped preview history and approved MiniMax showcase curation measure +// 507642/686129/349717 largest/startup/deferred gzip bytes, versus the preceding +// 507641/686124/349257 checkpoint. Keep both startup caps and the independent +// 64 KiB deferred chunk cap unchanged; add only the measured 460 deferred bytes, +// retaining 103 bytes of deferred headroom. Same 96 JS assets/four startup paths, +// dependency set, compiler and minifier. The pure reducer replaces the prior +// browser-store dependency in self-contained Block creation; no second executor. +// Final whole-task import parity and historical creator compatibility measure +// 507641/686124/349257 largest/startup/deferred gzip. The existing measured +// allowance below still passes, with 66/66/103 bytes of headroom; no extra cap +// increase is needed. Dependencies, memberships and individual chunk cap stay. +// Fresh Example stage adoption, exact legacy Generate boundaries, measured +// layout and bounded input previews measure largest/startup/deferred gzip +// 507459/685944/349238 versus the packaged 506948/685436/346612 baseline. +// Add exactly 511/508/2626 bytes and retain 248/246/122 bytes of headroom. +// There are 96 JS assets (four startup, 92 deferred): exampleWorkflow and +// storyboardShotPresentation are lazy additions; operationScope is folded into +// the authoring dependency graph. Dependencies and build/minifier rules are +// unchanged. Keep the independent 65536-byte deferred chunk ceiling unchanged. +// Optional strict native media-evidence persistence measures largest/startup/ +// deferred gzip 506948/685436/346612 versus 505922/684410/346546. Add exactly +// 1026/1026/66 bytes, preserving 248/246/122 bytes of headroom. Only +// studio-templates.js differs after import URL normalization; all 95 names, +// four startup/91 deferred memberships, dependency/build rules and the separate +// 65536-byte deferred chunk cap remain unchanged. +// Accepted two-wheel Redux controls, generic encoding presets and the recovered +// nine-image / ten-slot Moonflower defaults measure largest/startup/deferred gzip +// 505922/684410/346546 versus 505304/683793/346215. Add only the measured +// 618/617/331 bytes, retaining 248/246/122 bytes of headroom. After versioned +// import-URL normalization only studio-templates and operation-authoring-tools +// differ. All 95 JS names, four startup/91 deferred memberships, dependencies, +// loading/minifier rules and the independent 65536-byte deferred chunk cap stay +// unchanged. No validator or runtime limit is relaxed. +// The accepted Kontext preservation prompt, exact input metadata and new +// immutable Gallery descriptor measure largest/startup gzip 501249/679735 +// versus 500718/679207. Only studio-templates.js differs after import-URL +// normalization. Add exactly 531/528 bytes, preserving 9/13-byte headroom. +// All 94 JS names, four startup/90 deferred memberships, dependencies, loading +// and minifier rules remain unchanged; deferred gzip decreases by 197 bytes. +// Both deferred ceilings, including the independent 64 KiB chunk cap, stay fixed. +// Node-local audio dispatch history plus the approved retained Schnell asset +// measure largest/startup/deferred gzip 498243/676733/336133 over the closed +// 38-template build's 498146/676633/336052. Add only the measured 97/100/81 +// bytes, preserving 12/15/63-byte headroom. Only studio-templates.js and the +// immutable asset descriptor differ after import-URL normalization. All119 +// assets, four startup/90 deferred memberships, dependencies, loading/minifier +// rules and the independent64KiB deferred chunk cap remain unchanged. +// Keeping selected-node actions clear of activity measures largest/startup/ +// deferred gzip 498158/676645/336106 over 498142/676630/335787. Allow only the +// measured 16/15/319 bytes, retaining prior 0/3/9-byte headroom. Only the existing +// studio-templates and SelectionToolbar assets change after URL normalization; +// all119 assets/four startup/90 deferred memberships, dependencies, loading and +// minifier rules and the independent64KiB deferred chunk cap stay fixed. +// Folding Session activity measures largest/startup/deferred gzip +// 498142/676630/335787 over 498028/676515/335743. Only studio-templates.js +// changes after import-URL normalization. Add only the measured 114/115 startup +// bytes, retaining prior headroom; both deferred limits,119 assets/four startup/90 +// deferred memberships, dependencies, minifier and loading boundaries stay fixed. +// Direct stage editing and Block/Python guidance measure largest/startup/deferred +// gzip 498028/676515/335743 over 497985/676473/335647. Add only the measured +// 43/42/96 bytes, retaining prior headroom. The five normalized changes are +// CustomExtensionsPanel, EncodingNode, NodeList, block-composition-tools and +// studio-templates. All119 assets, four startup/90 deferred memberships, +// dependencies, minifier/loading rules and the independent64KiB cap stay fixed. +// Visible model-change conflicts measure largest/startup/deferred gzip +// 497985/676473/335647 over 497981/676468/335619. Only the deferred +// OperationModelPicker changes after immutable import-URL normalization; all119 +// assets and four startup/90 deferred memberships stay exact. Allow only the +// measured four-byte largest-chunk import fingerprint growth. Aggregate startup, +// deferred, 64 KiB chunk, dependency, minifier and loading limits stay unchanged. +// Selected workflow setup measures largest/startup/deferred gzip +// 497978/676464/335501 over 497685/676173/331955: add only 293/291/3546 bytes, +// retaining 3/12/199 bytes of headroom. All119 assets,94 JS and four startup/ +// 90 deferred memberships stay exact. Shared-export alias churn is not a new +// dependency or loading boundary; the independent 64 KiB chunk cap is unchanged. +// Scoped Run recovery adds measured largest/startup/deferred gzip bytes +// 894/896/1556 over 496791/675277/330399, retaining 3/12/199-byte headroom. +// Exact setting/runtime focus and semantic document ownership keep the same +// 119 assets and four startup/90 deferred memberships. Dependencies, minifier, +// loading boundaries, model guards and the independent 64 KiB chunk cap stay fixed. +// Declared output readiness measures largest/startup/deferred gzip +// 496790/675278/330510 against 9760's 496684/675171/330491. Only +// studio-templates.js changes after immutable URL normalization; all119 assets, +// 94 JavaScript names and four startup/90 deferred memberships remain exact. +// Add only measured106/107 startup bytes, retaining4/11 bytes of headroom. +// Deferred caps, dependencies, minifier, loading rules and model guards stay fixed. +// Generator-first import summaries measure largest/startup/deferred gzip +// 496684/675171/330491 against E129's 496585/675069/330324. Only +// studio-templates.js changes after immutable import-URL normalization; all +// 94 JavaScript names and four startup/90 deferred memberships remain exact. +// Add only the measured 99/102 startup bytes, retaining 4/11-byte headroom. +// Both deferred caps, dependencies, minifier and loading rules stay unchanged. +// Fresh lyric composites share their actual node/edge construction with managed +// recipes. Largest/startup/deferred gzip is 496585/675069/330324 against the +// accepted D77 496579/675066/329724. Keep both startup limits and the 64 KiB +// deferred chunk limit unchanged; add only the measured 600 deferred bytes, +// retaining 274 bytes of deferred headroom. All 94 JavaScript names and their +// four startup/90 deferred memberships, dependencies and loading rules stay fixed. +// Versioned primary-model summaries add 82/83 compressed startup bytes over +// 496485/674972; deferred gzip falls from 329730 to 329712. Only studio-templates.js +// changes after immutable import-URL normalization, with all 94 JavaScript names, +// four startup/90 deferred assets and dependency/loading rules unchanged. Add only +// the measured cost, retaining 22/25-byte headroom and both deferred caps. +// The accepted rear-view contact-sheet prompt and corrected four-panel description +// measure largest/startup/deferred gzip 496485/674972/329730 versus the packaged +// D59 build's 496250/674736/329640. Only studio-templates.js changes after immutable +// import-URL normalization; the other 89 template contracts and all 94 JavaScript +// asset names are exact. Add only measured startup growth 235/236 bytes, retaining +// 22/25-byte headroom and both deferred caps. No dependency or loading-rule change. +// Scoped audio creative receipts measure largest/startup/deferred gzip +// 496254/674742/329707 versus the accepted 496215/674704/329829. +// Add the measured 39/38 startup bytes, retaining 18/19-byte headroom and +// both deferred caps. Only studio-templates.js changes after immutable import +// URL normalization; all 4 startup/90 deferred assets and build rules remain. +// Shared managed input previews measure largest/startup/deferred gzip +// 496215/674704/329829 versus 496087/674572/329587. Only studio-templates.js +// changes after cache-version normalization; all 90 deferred assets differ +// only in their versioned imports. Add the measured 128/132/242 bytes, keeping +// prior 18/19/169-byte headroom, four startup assets and the 64 KiB chunk cap. +// No dependency, loading-boundary, minifier or model/runtime change. +// Required literal media-file readiness adds 103/102 startup gzip bytes over +// 495984/674470; deferred gzip falls from 329666 to 329587. Retain 18/19 bytes +// headroom, the same 4 startup/90 deferred assets and both deferred caps. No new +// dependency, module-loading rule or minifier change. +// Generic conditional input requirements measure largest/startup/deferred gzip +// 495984/674470/329666 versus accepted 495868/674357/329734. Add only measured +// startup growth 116/113 bytes, retaining 18/19 bytes of headroom. The same four +// startup and 90 deferred asset names, dependencies and loading boundaries stay +// fixed. Both deferred caps and module-identity checks remain unchanged. +// Pika saved-model preservation and joined video/audio drafts measure largest/ +// startup/deferred gzip 495868/674357/329734 against 495666/674155/329445. +// Add only measured startup growth of 202/202 bytes, retaining 18/19 bytes of +// headroom and both deferred caps. Only studio-templates.js and the deferred +// DeveloperWorkflowLauncher.js change after URL-version normalization. The same +// four startup and 90 deferred assets, dependencies and chunk rules remain. +// Shared normal template routing adds video to the exact selected creator. +// Largest/startup/deferred gzip measure 495666/674155/329445 against the accepted +// 495646/674134/329538. Add measured startup growth of 20/21 bytes, retaining 18/19 bytes +// of headroom and both deferred caps. Four startup and 90 deferred assets retain +// membership; dependencies, chunk rules, minification and identity checks stay fixed. +// Finite task artifact inventories share parsing across legacy and generic +// model surfaces. Compared with client 9bc8fa7, largest/startup/deferred gzip +// measures 495646/674134/329538 versus 495384/673867/329241. Add only measured +// feature growth 262/267/297, preserving 18/19/218 bytes of prior headroom. +// Four startup and 90 deferred asset names retain membership. Dependencies, +// chunk rules, minification and module identity checks remain unchanged. +// Required media loaders in fresh video drafts measure largest/startup/deferred +// gzip 494816/673303/329249 versus 494806/673290/329066. Add only measured +// startup growth 10/13, retaining 8/11 bytes of headroom. Both deferred caps +// remain fixed; only DeveloperWorkflowLauncher.js changes after URL-version +// normalization. The same 94 asset names and build rules retain membership. +// Versioned video task observations measure largest/startup/deferred gzip +// 494806/673290/329066 versus 494749/673238/329380. Add measured startup +// growth 57/52, retaining 8/11 bytes of headroom and both deferred caps. +// All 94 JavaScript asset names retain membership; only studio-templates.js +// changes after URL-version normalization. Dependency and build rules stay fixed. +// Generic video stages, strict ownership metadata and retained template finishing +// measure largest/startup/deferred gzip 494749/673238/329380 against the accepted +// 494455/672941/328233. Add only measured growth 294/297/1147, preserving 8/11/79 +// bytes of headroom. The same four startup and 90 deferred assets retain their +// loading membership. Dependencies, chunk rules, minifier, identity validation +// and the independent 65536-byte deferred chunk cap remain unchanged. +// Recorded-pin historical examples and the explicit portrait-v3 recipe measure +// largest/startup/deferred gzip 494455/672941/328233 versus the accepted +// 494259/672742/328069. Add measured startup growth 196/199, retaining 8/11 +// bytes of headroom. The same four startup and 90 deferred assets retain their +// loading membership. Both deferred caps, dependencies and identity gates stay fixed. +// Versioned FLUX3 prompts, scoped image receipts and ordinary protected-PNG +// authoring measure largest/startup/deferred gzip 494259/672742/328069 versus +// accepted 493208/671695/327026. Add only measured growth 1051/1047/1043, +// preserving 8/11/243 bytes of headroom. Four startup assets are unchanged; +// deferred assets grow 89 -> 90 with the template-authoring facade. No new +// dependency or eager loading boundary; the 65536-byte deferred chunk cap, +// minifier, graph/media/identity validators and all other checks stay fixed. +// Save/read hydration ownership measures largest/startup/deferred gzip +// 493208/671695/327026 versus the accepted 493170/671659/327133. +// Add only measured aggregate startup growth 38/36, preserving 8/11 bytes +// of headroom. The same four startup and 89 deferred assets retain membership; +// all deferred bodies match after versioned URL normalization. Dependencies, +// minifier, loading boundaries, validators and both deferred caps stay fixed. +// Custom recipe preservation and page-lifecycle retry cancellation measure +// largest/startup/deferred gzip 491521/670008/326977 versus the accepted +// 491457/669945/327044. Add only measured startup growth 64/63, preserving +// 8/11 bytes of headroom. The same four startup and 89 deferred assets retain +// membership; all deferred bodies match after versioned URL normalization. +// Dependencies, minifier, loading boundaries and both deferred caps stay fixed. +// Passive saved-form preservation and authoritative service-cache status measure +// largest/startup/deferred gzip 491457/669945/327044 versus the accepted +// 490814/669295/326710. Add only aggregate growth 643/650/334, preserving +// 8/11/225 bytes of headroom. All 89 deferred bodies match after normalizing +// versioned URLs; the same four startup and 89 deferred assets retain membership. +// Dependencies, chunk rules, minifier, validators and 65536-byte chunk cap stay fixed. +// Windows Block sizing/disabled-stage/label/default/readiness fixes and the +// reviewed Vite 8.1.4 -> 8.1.6 security update measure largest/startup/deferred +// gzip 490814/669295/326710 versus accepted 490492/668797/326749. Add only +// measured aggregate startup growth 322/498, preserving 8/11-byte headroom. +// The same four startup and 89 deferred assets retain their loading membership; +// chunk rules, minifier settings, validators and both deferred caps stay fixed. +// Bounded native field-accounting/applied-adapter parsing and explicit cache-release +// feedback measure largest/startup/deferred gzip 490492/668797/326749 versus +// accepted 488472/666779/326783. Add only measured startup growth 2020/2018, +// preserving 8/11 bytes of headroom. Dependencies, startup membership, minifier, +// loading boundaries and both deferred ceilings remain unchanged. +// Explicit declared Experimental discovery measures largest/startup/deferred gzip +// 488406/666710/326605 versus accepted 488399/666704/326318. Add only the +// measured 287-byte deferred growth, retaining 152 bytes of aggregate headroom. +// Existing startup and chunk caps, dependencies and loading boundaries stay fixed. +// Pinned NASA/Monet planning definitions measure largest/startup/deferred gzip +// 488399/666704/326318 versus 488210/666514/326348. Add only measured +// 189/190-byte startup growth, preserving 15/17-byte headroom and all deferred caps. +// Legacy schema-one advisory-hint compatibility measures largest/startup/ +// deferred gzip 488210/666514/326348 versus 488155/666461/326431. +// Add only measured startup growth 55/53 bytes, retaining 15/17 bytes of +// headroom. Deferred caps, dependencies, minifier and loading boundaries stay fixed. +// Exact immutable default-weight-format validation measures largest/startup/ +// deferred gzip 488155/666461/326431 versus accepted 488073/666379/326387. +// Add only measured feature growth 82/82/44 bytes, retaining 15/17/39 bytes +// of headroom. Dependencies, minifier, loading boundaries, validators and the +// independent 65536-byte deferred chunk cap remain unchanged. +// Exact cache observations, exclusive-owner enhancement removal, same-artifact +// layout preservation and semantic crossing checks measure largest/startup/ +// deferred gzip 488073/666379/326387 versus 487800/666105/324323. +// Add only measured 273/274/2064 bytes, retaining 15/17/39 bytes of headroom. +// Dependencies, minifier, startup graph and validators remain unchanged; +// the independent 65536-byte deferred chunk cap also remains fixed. +// Explicit artifact-format preservation and ten blocked FP8r planning recipes +// measure largest/startup/deferred gzip 487800/666105/324323, versus the accepted +// 480984/659291/323388 baseline. Add only the measured 6816/6814/935 aggregate +// growth, retaining 15/17/39 bytes of headroom. Dependencies, minifier, loading +// boundaries, validators and the independent 65536-byte chunk limit stay fixed. +// Mandatory source/effective pre-tokenizer identities add the final strict +// consumer checks. The final build measures deferred gzip 323388 versus +// 323285 (+103); retain 39 bytes of aggregate headroom at 323427. Startup +// measures 659291/480984 below its existing caps. No dependency, minifier, +// loading-boundary, validator or individual deferred chunk cap changes. +// Generic public recipe/provider discovery and the strict authored-layout PUP +// consumer measure largest/startup/deferred gzip 480976/659280/323285 bytes, +// versus 479207/657512/321188 at the accepted prior feature checkpoint. +// Add the measured aggregate growth 1769/1768/2097, retaining 23/28/39 bytes +// of headroom. Dependencies, minifier, loading boundaries, validation and the +// independent 65536-byte deferred chunk limit are unchanged. +// Declared raw/layout PUP selection adds bounded alternative parsing, exact-parent +// rebinding and deferred controls. Measured deferred gzip grows 319433 -> 320994 +// (+1561 bytes across the deferred graph). Add only this measured growth +// to the aggregate cap, preserving 39 bytes of headroom at 321033. Startup/chunk +// caps, dependencies, minifier, lazy boundaries and validators remain unchanged. +// Normal evaluation discovery/Custom selection, declared PUP/LoRA authoring, +// default-seed consumption and current runtime-option presentation measure +// largest-startup/startup/deferred gzip bytes 479207/657512/319433 in the +// canonical Linux complete check. Allow 288/288/864 bytes over the prior caps, +// leaving 23/28/39 bytes of headroom. This is aggregate measured feature and +// correctness cost, not per-module attribution. Keep dependencies, minifier, +// loading boundaries, all validators and the 65536-byte deferred chunk cap fixed. +// Aggregate release feature/correctness cost versus the accepted COMPLETE baseline: +// deferred gzip 316833 -> 318426 (+1593). Raise 317015 to 318608, retaining +// 182 bytes of headroom. This is not per-module attribution or an immediate +// private-baseline measurement; startup/chunk caps and validators stay fixed. +// Lossless structured prompt enhancement preserves authored layout/source bindings +// and validates native ID mapping in deferred code. Measured deferred gzip grows +// from 316480 to 316833 bytes (+353). Add exactly that feature cost to the prior +// 316662-byte aggregate cap, preserving its 182-byte headroom at 317015 bytes. +// Startup, individual chunk caps, dependencies, minifier and lazy boundaries stay +// unchanged; the existing built assets require no rebuild for this sizing check. +// Selected Process Image input requirements share the current operation contract +// across readiness and graph recovery. The optimized build measures startup/ +// largest-startup/deferred gzip bytes 657234/478930/316398, versus the recorded +// accepted 656925/478620/316464. Allow 288 bytes in each startup cap, leaving +// 18/12 bytes of headroom; retain strict selector/port validation, dependencies, +// loading boundaries, minifier and both deferred caps unchanged. +// Owner-bound V2 preview lookup restores complete ordered media collections, +// including declared legacy preview controls. Startup/chunk/deferred gzip bytes +// measure 656925/478620/316464 versus 656739/478434/316484 before the fix. +// Allow 192 bytes for the 186-byte shared correctness increase in each startup +// cap, leaving 39/34 bytes. Keep strict binding validation, dependencies, loading +// boundaries, minifier and both deferred caps unchanged. +// Shared ancillary readiness resolves the exact current declaration before the +// synchronous collector inspects the scoped graph. Two consumers share one +// display witness; pending/stale/error handling preserves fresh Run authority. +// Measured startup/chunk/deferred gzip bytes are 656712/478407/316414 versus +// 656178/477874/316369. Add 512 bytes to the existing two startup caps only; +// dependencies, loading boundaries and both deferred caps remain unchanged. +// Explicit private evaluation authoring adds a bounded lazy parser and Custom +// memory guards. The first build measures startup/chunk/deferred gzip bytes +// 656188/477881/316459 versus 656112/477808/315072. Reserve 128/128/1536 +// additional bytes for the shared metadata and strict collision validation. +// Dependencies, lazy boundaries, minifier and the deferred chunk cap stay fixed. +// Final selected-parent field authority and owned Guidance presentation, plus +// source-region removal and runtime Auto resource-update corrections, measure +// startup/chunk/deferred gzip bytes 656112/477808/315072. Bound the completed +// feature and correctness changes by another 128/128/896 bytes over the prior +// caps 656004/477694/314230, leaving 20/14/54 bytes of measured headroom. +// Dependencies, lazy boundaries, chunk rules, minifier and the independent +// 65536-byte deferred chunk cap remain unchanged. +// Optional prompt enhancement, strict consumed-input/summary validation and the +// asynchronous exact execution scope measure startup/chunk/deferred gzip bytes +// 655940/477635/314107 versus the accepted 650884/472574/291190 baseline. +// Keep planner/declaration loading deferred: the async selector boundary removes +// 31722 eager bytes, and separate saved-hint codecs remove another 5555 bytes. +// Bound required feature growth at 5120/5120/23040 bytes over that baseline: +// caps 656004/477694/314230 leave 64/59/123 bytes in this measured build. +// Dependencies, chunk rules, minifier and the 65536-byte deferred chunk cap stay fixed. +// Generic structured layout/reference editing, exact selected block-field schemas +// and backend-owned format inventory measure startup/chunk/deferred +// 650884/472574/291190 gzip bytes versus MAIN 648784/470476/283943. +// The layout editor remains lazy (6540 bytes); Model Manager adds 602 lazy bytes. +// Shared strict schema/inventory validation and renewed route pins add 2100 startup +// bytes. Allow 2112 per startup cap and 7232 aggregate deferred bytes, leaving +// 28/34/42 bytes. Dependencies, Vite/minifier/loading boundaries and the independent +// 65536-byte deferred chunk cap remain unchanged. +// Declared-source offload labels measure startup/chunk/deferred 648784/470476/283943 +// gzip bytes. Add 64 bytes to each startup cap, leaving 16/20 bytes of margin. +// Dependencies, loading boundaries and both deferred caps remain unchanged. +// Ordinary graph recovery measures startup/chunk/deferred 648736/470427/283981 +// gzip bytes. Retain both startup caps; add 32 deferred bytes, leaving 19 bytes. +// Dependencies, loading boundaries and the individual deferred chunk cap stay fixed. +// Generic audio setup/output, current adapter authority and seven selected audio +// recipes measure startup/chunk/deferred 648723/470415/283916 gzip bytes. +// Allow 896/896/2368 bytes over the prior caps, leaving 13/17/52 bytes. +// Dependencies, minifier, loading boundaries and the 65536-byte chunk cap stay fixed. +// Block bound-action projection and declared-role validation measure startup/chunk/ +// deferred 647825/469517/281574 bytes (+117/+118/+76 from 647708/469399/281498). +// Add 64 bytes per cap: 647840/469536/281600, leaving 15/19/26 bytes of margin. +// Dependencies, loading boundaries, minifier and the 65536 deferred chunk cap stay fixed. +// The final six registered stage boundaries add 105 startup/chunk gzip bytes: +// 647708/469399 versus the initial coherent 647603/469294 measurement. +// Add 128 bytes to those two caps only: 647776/469472, leaving 68/73 bytes. +// Final deferred total is 281498; its 281536 aggregate and 65536 chunk caps stay fixed. +// Shared stage contracts and required-controls safety validation measure +// startup/largest-startup/deferred 647603/469294/281513 gzip bytes in the +// coherent build. Former caps 647072/468768/278976 miss by 531/526/2537 bytes. +// Allow only 576 startup/largest bytes and 2560 aggregate deferred bytes; +// new caps 647648/469344/281536 leave 45/50/23 bytes of measured headroom. +// Dependencies, minifier settings and loading boundaries stay unchanged; +// retain the independent 65536-byte limit for every deferred chunk. import { existsSync, readdirSync, readFileSync } from 'node:fs'; import { relative } from 'node:path'; import { gzipSync } from 'node:zlib'; @@ -30,7 +399,360 @@ const SOURCE_LICENSES = new URL('../public/THIRD_PARTY_LICENSES.txt', import.met // Required-input preflight, leaf-graph cycle checks and connectable scalar editors // add shared correctness logic: measured largest startup chunk 450.1 KiB. // Keep native creation deferred and bound the chunk at 450.25 KiB. -const MAX_STARTUP_CHUNK_GZIP_BYTES = 450 * 1024 + 256; +// Abortable backend probes, durable runtime status parsing, and regenerated +// route pins measure 461311 bytes here. Allow a bounded 512-byte increase; +// deferred chunk ceilings and the complete startup budget remain independent. +// Exact image-template execution selections add bounded shared recipe metadata. +// Native graph creation stays lazy: measured largest startup chunk is 462529 +// bytes. Allow 1280 bytes for the metadata, without new dependencies. +// Conditional component connector roles and exact dual-Guidance recipe metadata +// measure 463021 bytes. Allow 256 more bytes; native creation remains deferred. +// Verified supervisor origins, ordered health discovery and bounded legacy +// recovery share one control helper. Together with exact consumed-control +// visibility, the measured chunk is 463619 bytes (+567 from 463052). Allow +// 576 bytes; retain lazy authoring and the independent deferred-chunk ceiling. +// Owned metadata waiting and fresh-document hydration add 280 bytes to this +// shared startup chunk (463950 measured). Bound the necessary fix by 320 bytes. +// Combined Windows recovery, checkpoint, preview and complete-scope Auto fixes +// measure 464333 bytes after reusing normalized attention/progress/preview +// values. Bound their remaining combined cost with 512 bytes; no new imports. +// Two full-image recipe declarations and their reviewed terms add 1374 gzip +// bytes to the same startup chunk (465247 measured). Authoring stays deferred. +// Preserve both reviewed allowances: 464000 + 512 + 1536 = 466048 bytes. +// PNG encoding and pending-socket retirement add 255 startup gzip bytes over +// the 644101-byte paired baseline. Measured startup/chunk: 644356/466049. +// Allow 32 additional bytes here and below; deferred limits stay unchanged. +// Exact speech-control aliases and single-file media projection bring measured +// startup/chunk to 644443/466136 bytes. Bound this shared fix by 128 more bytes. +// Recorded legacy-field presence and exact controlled-route schema checks measure +// startup/chunk 644791/466487 bytes (+348/+351). Bound these shared corrections +// with 384 bytes; no dependencies, eager authoring imports or deferred caps change. +// Exact image task receipts, legacy ordinary-image recovery and collapsed cache +// ownership add 287 shared gzip bytes (startup/chunk 645078/466774 measured). +// Allow 384 more bytes; authoring stays deferred, with no dependency changes +// or increase to either deferred limit. +// Retaining the server cache view through restored graphs and retiring only +// acknowledged runtime leaves adds 738 startup gzip bytes (645816/467510). +// Bound this shared correctness path by 768 bytes; deferred caps stay fixed. +// Generic image stage/adapter metadata and ordered chain sharing add 375 gzip +// bytes over the paired 467559-byte chunk baseline (467934 measured). Reserve +// 384 bytes; graph creation and structural authoring remain deferred. +// Finite manual float precision and exact step increments measure startup/chunk/ +// deferred 646464/468158/278511 bytes versus the accepted 646417/468111/278510 +// (+47/+47/+1 bytes), while retaining existing padding when it preserves the value. +// Allow 64 bytes for startup and its largest chunk, with no dependency or loading changes. +// Shared strict CPU/CUDA loading-policy validation measures startup/chunk/deferred +// 646530/468224/278562 bytes versus the accepted numeric 646464/468158/278511 +// (+66/+66/+51). Sharing the predicate saves 20 startup bytes over the first +// candidate. Existing headroom plus 64 additional startup/chunk bytes leaves +// 30/32 bytes of margin; both deferred limits and lazy boundaries stay fixed. +// Selected-profile image adapter permission and bounded owned-chain editing +// measure startup/chunk/deferred 646923/468616/278913 bytes versus the accepted +// 646530/468224/278562 baseline (+393/+392/+351). Allow 384 startup/chunk bytes +// and 320 aggregate deferred bytes with existing headroom; dependencies, lazy +// boundaries, minifier settings and the 64 KiB per-deferred-chunk cap stay fixed. +// Authoritative image execution-mode bindings measure startup/chunk 647025/468717 +// gzip bytes versus the accepted 646923/468616 (+102/+101); deferred 278958 +// stays within its existing 278976 cap. Two semantics-preserving isolated +// candidates still miss startup/chunk limits (646985/468683 and 647014/468706). +// Retain the strict current-owner/parser checks and allow 128 startup/chunk +// bytes only; dependencies, lazy boundaries, minifier and deferred caps stay fixed. +// Acknowledged Save/Delete summaries keep the saved list current after closing a +// tab. Measured gzip grows 488406 -> 488472 (+66) for the largest startup chunk, +// 666710 -> 666779 (+69) for startup, and 326605 -> 326783 (+178) deferred. +// Add only those measured costs, preserving 8/11/152 bytes of existing headroom. +// Dependencies, startup membership, lazy boundaries and the 64 KiB chunk cap stay fixed. +// Authored-device import, immutable Install pins and page-owned checkpoints measure +// largest/startup/deferred gzip 493170/671659/327133 versus 491521/670008/326977. +// Allow only measured startup growth (+1649/+1651), retaining 8/11 bytes headroom. +// Four startup and 89 deferred assets, dependencies, loading rules and deferred caps stay fixed. +// Scoped video receipts and compatible adapter messaging measure 494870 bytes +// in the largest startup asset (+46 over the cap). Add 64 bytes, no dependencies. +// Expandable input preparation and generation, including order-preserving +// projection and shared pipeline validation. Measured largest/startup/deferred +// gzip changed from 498237/676723/336015 to 498592/677080/337273 bytes. +// Keep the four startup and 90 deferred modules and the 64 KiB per-chunk cap. +// Generic H3 image switching, exact source-route pins and shared stage sockets +// measure largest/startup/deferred gzip 498892/677379/337569, against the +// packaged 498595/677083/337306. Add only 297/296/263 measured feature bytes, +// retaining 15/22/148-byte headroom. Only studio-templates and operation-authoring +// differ after import-URL normalization; all 119 assets, four startup/90 deferred +// memberships, dependencies, loading/minifier rules and the 64 KiB cap stay fixed. +// Exact backend-selected block input requirements measure largest/startup gzip +// 499048/677534 against 498892/677379: add only 156/155 bytes, retaining 15/22 +// bytes of headroom. Deferred gzip decreases to 337464; both deferred ceilings +// stay fixed. Only studio-templates changes after import-URL normalization; +// all 119 assets, four startup/90 deferred memberships and dependencies stay fixed. +// The H3 human-and-cat template and its legacy form metadata measure +// 500712/679198/337468 largest/startup/deferred gzip, against 499048/677534/337464. +// Only studio-templates differs after import-URL normalization. Add the measured +// 1664/1664 startup bytes. One labeled editorial PNG brings the bundle to 120 +// assets; deferred limits, four startup/90 deferred memberships, dependencies, +// loading boundaries and the 64 KiB cap stay fixed. +// Final direct-control and compact-tray corrections measure +// 504492/682980/346033 largest/startup/deferred gzip bytes: the reviewed +// migration ceilings below still pass with 8/12/304 bytes of headroom. +// Compared with the shipped bundle, accessible workspace drawers, shared stage controls, +// task discovery and hardware reporting add 3,781 gzip bytes to the largest startup chunk. +// Four entry chunks and the existing 64 KiB limit on each deferred chunk are preserved. +// Content-sized stages, role-aware wiring and editing add the measured largest-chunk delta. 578843 to 582429 gzip bytes. +const MAX_STARTUP_CHUNK_GZIP_BYTES = + // Restore registered editors for old model callbacks. Measured 585645 to 585928. + 283 + + // Saved stock field order and action-specific control visibility, measured 585421 to 585645. + 224 + + // Preview resolves pixel and latent wires through the saved interface. Measured 584233 to 585421 with the original registered schema. + 1188 + + // Shared model role colors, field captions and chooser layout, measured 583348 to 584233. + 885 + + // Shared effective-control and wire-origin logic. Measured 582429 to 583348 gzip bytes. + 919 + + 3586 + + 3781 + + // The approved native Shap-E preview brings the largest chunk to 575069 gzip bytes. + 631 + + // SSD weight-loading validation adds 28 measured startup gzip bytes. + 28 + + // Four approved saved image recipes add 1280 gzip bytes, for 574410 total. + 1280 + + // The two approved FLUX control edits measure 573130 bytes. + 800 + + // The two retained Stability AI recipes and their attention setting measure 572330 bytes. + 806 + + // The retained AudioLDM2 recipe measures 571524 bytes. + 511 + + // Approved retained templates and their exact input bindings measure 571013 bytes. + 7624 + + // The retained Glasshouse Keeper recipe and motion bindings add 720 bytes (562669 to 563389). + 720 + + // The approved native video and 2× upscale catalog measures 562669 bytes. + 7523 + + // Guided and ordered-reference recipes with loader revision binding measure 555146 bytes. + 3298 + + // Eighteen saved edit, inpaint and outpaint recipes measure 551848 bytes. + 6227 + + // Retained Gallery expansion moves approval-only hashes to build-time metadata. + // The measured startup chunk is 545621 bytes. All lazy chunk limits stay fixed. + 1104 + + // Guided inpainting media evidence adds 54 gzip bytes (544463 to 544517). + 54 + + // Layer stack evidence adds 127 gzip bytes (544336 to 544463). + 127 + + // Native guide frame receipts add 300 gzip bytes (544036 to 544336). + 300 + + // Native video upscale history adds 79 gzip bytes to the existing startup chunk (543957 to 544036). + 79 + + // Six retained recipes and their exact authoring bindings add 3094 gzip bytes (540863 -> 543957). + 3094 + + // Direct image routing uses the exact Studio spec (529280 -> 529295 gzip bytes). + 15 + + // LTX long distilled sampling defaults add 57 bytes (529223 -> 529280 gzip bytes). + 57 + + // Model-selected outpaint geometry adds 17 bytes (529206 -> 529223 gzip bytes). + 17 + + // Preserve older whole-pipeline sockets across passive updates (529176 -> 529202 bytes). + 26 + + // Use the saved media roles on video input cards (529131 -> 529176 gzip bytes). + 45 + + // Preserve saved video controls and resolve caption stage names (+87 bytes). + 87 + + // Exact action lookup and shared discovery of compatible model bindings. + // Reviewed paired build: 529044 vs. 528834 bytes; preserve the four-byte margin. + 210 + + // Stage discovery, action search and compatible mode changes (524253 -> 528821 gzip bytes). + 4568 + + // Exact connected model summaries add 501 gzip bytes (523747 -> 524248). + 501 + + // Exact Inpaint input evidence and shared role labels add 65 gzip bytes. + 65 + + // Wav2Vec2 registration and role-aware node captions add 1113 bytes (522569 -> 523682). + 1113 + + // Generic stage cards and connected Model Setup controls add 435 gzip bytes + // (522134 -> 522569). Preserve the previous measured margin. + 435 + + // The pinned Qwen 2.1 Turbo terms add 125 gzip bytes (522009 -> 522134). + 125 + + // Saved attention receipts for five video routes add 267 measured bytes. + // Keep the previous 17-byte headroom and the existing chunk membership. + 267 + + // The approved Sana comparison adds 617 measured bytes and keeps 17 bytes of headroom. + 617 + + // The two approved retained templates add 1643 measured gzip bytes and keep 17 bytes of headroom. + 1643 + + // Preserve the measured 17-byte headroom with the new speech and edit receipt parsers. + 296 + + // Speech timestamp authoring and saved audio receipts measure 519191 bytes. + // Add 918 bytes over 518273 and retain the 17-byte headroom. + 918 + + // Node captions and context-aware controls add 926 gzip bytes (517347 -> 518273). + 926 + + // The shared stage connector labels add 428 gzip bytes (516919 -> 517347). + // Retain the 17-byte headroom and the same four startup chunks. + 428 + + // The retained Spandrel recipe adds 472 gzip bytes (516459 -> 516931). + // Keep five bytes of startup headroom and the two existing deferred limits. + 472 + + // Two retained Gallery recipes add 1688 gzip bytes (514771 -> 516459). + // Preserve five bytes of startup headroom and both deferred limits. + 1688 + + // Prediction-map readiness adds 40 gzip bytes (514731 -> 514771). + // Retain five bytes of headroom and the existing startup membership. + 40 + + 1204 + + 106 + + 397 + + 398 + + 673 + + // Native sampler/decoder grouping, AV receipt fields and LTX Full policy add + // 390 largest-chunk gzip bytes (511556 -> 511946); retain 12-byte headroom. + 390 + + // Explicit null telemetry resets add 35 gzip bytes (511521 -> 511556). + // Preserve the existing 12-byte headroom and every loading/chunk boundary. + 35 + + // Two exact Hunyuan 720p usage notices: 511385 -> 511521 (+136). + // Retain 12-byte headroom, the same startup paths and both deferred limits. + 136 + + // Native joint-video receipt parsing and shared task-field aliases measure + // 511334 -> 511385 gzip bytes (+51); retain the existing 12-byte headroom. + // Startup membership, dependencies, loading boundaries and deferred caps stay. + 51 + + // Native user-Block leaf termination and cycle-safe alias resolution: + // 511183 -> 511276 gzip (+93). Keep 70-byte headroom, the same 96 JS + // names/four startup paths, dependencies and both deferred ceilings. + 93 + + // Narrow acknowledged-document hydration comparison reuses the existing + // restore comparator: 510994 -> 511183 gzip bytes (+189). Preserve 70 bytes + // of headroom, all 96 JS names/four startup paths and both deferred caps. + 189 + + // Connected nested guidance, shared ordered storyboards and complete preview + // framing: 510619 -> 510994 gzip bytes (+375). Preserve 70 bytes of + // headroom, all 96 JS assets/four startup paths and both deferred caps. + 375 + + // Registry-owned inactive auxiliary references and accessible hidden-caption + // controls: v18 -> v23 510482 -> 510625 gzip bytes (+143). Retain 64 bytes + // of headroom, all 96 JS names/four startup paths and both deferred caps. + 143 + + // Scoped native signal refresh and first-frame measurement readiness: + // v16 -> v18 510207 -> 510482 gzip bytes (+275). Preserve the existing + // 64-byte headroom, memberships, dependencies and both deferred caps. + 275 + + // Dynamic model-contract controls, honest retained-number display and native + // metadata authoring/restore semantics: v11 -> v15 509483 -> 510202 bytes. Add + // the measured 719 bytes, retaining 69 bytes of headroom. Same 96 assets, four + // startup/92 deferred memberships, dependencies and build/minifier rules. + // Deferred gzip decreases to 349724; both deferred caps remain unchanged. + 719 + + // Shared numeric Undo, current-host option bindings and native callbacks for + // collapsed ordinary stages: measured v8 -> v11 507638 -> 509483 gzip bytes. + // Add only 1845 bytes, preserving 69 bytes of prior headroom. All 96 JS assets, + // four startup/92 deferred memberships, dependencies and loading/minifier + // rules remain fixed. Deferred total is 349784, within its existing cap; + // neither deferred ceiling is raised. + 1845 + + 511 + + 1026 + + 618 + + // Native profile-field parsing and prepared-seed preservation: 505518 -> + // 505546 gzip bytes. Preserve six-byte headroom, memberships, dependencies + // and loading/minifier rules; neither deferred ceiling changes. + 28 + + // Explicit historical selection metadata and lookup: 504983 -> 505518 gzip + // bytes. Preserve six-byte headroom; memberships and dependencies unchanged. + 535 + + // Accepted recipe metadata and strict short-source Gallery timing add exactly + // 424 gzip bytes (504559 -> 504983), retaining six bytes of headroom. After + // cache-URL normalization only studio-templates.js changes; all 95 JS assets, + // four startup/91 deferred memberships and loading/dependency rules stay fixed. + // Deferred gzip decreases by 72 bytes; both deferred ceilings stay unchanged. + 424 + + // Exact backend-selected bundle requiredness reuses the Block inspector. + // Measured 504492 -> 504557 bytes; retain the prior eight-byte headroom. + // The same four startup assets, dependencies and loading policy remain. + 65 + + // Measured visual-stage migration: exact old/new 501249/504491 bytes. + // Nine-scene recipe data, shared nested fields and scoped value bindings; + // retain the prior nine-byte headroom, dependencies and loading policy. + 3242 + + 531 + + 1664 + + 156 + + 297 + + 355 + + 97 + + 16 + + 43 + + 4 + + 293 + + 894 + + 106 + + 99 + + 82 + + 235 + + 39 + + 128 + + 103 + + 116 + + 202 + + 20 + + 262 + + // Source-specific hierarchy selection: 495136 -> 495384 gzip bytes. + // Retain 18 bytes of headroom, four startup assets and both deferred caps. + 248 + + // Explicit mixed-source collection validation: 494870 -> 495136 gzip bytes. + // Add its measured aggregate cost; retain 18 bytes of headroom and all deferred caps. + 266 + + 64 + + 10 + + 57 + + 294 + + 196 + + 1051 + + 38 + + 1649 + + 64 + + 643 + + 322 + + 2020 + + 66 + + 189 + + 55 + + 82 + + 273 + + 6816 + + 1769 + + 450 * 1024 + + 896 + + 768 + + 1280 + + 256 + + 576 + + 320 + + 512 + + 1536 + + 32 + + 128 + + 384 + + 384 + + 768 + + 384 + + 64 + + 64 + + 384 + + 128 + + 576 + + 128 + + 64 + + 64 + + 2112 + + 5086 + + 128 + + 128 + + 512 + + 192 + + 288 + + 288 + + 114 + + 11568; // Shared icons initialize in graph-vendor, avoiding an entry/lazy-panel cycle // that captured undefined tab icons and crashed cold production startup. The // Earlier startup measured 589.1 KiB. Shared Block crossing, explicit movement, @@ -87,7 +809,260 @@ const MAX_STARTUP_CHUNK_GZIP_BYTES = 450 * 1024 + 256; // bounded 128 bytes above the previous ceiling, not an unbounded budget reset. // The same authoring fixes measure 624.2 KiB startup with no new dependencies. // Allow 624.5 KiB; individual deferred-chunk ceilings stay fixed. -const MAX_STARTUP_GZIP_BYTES = 624 * 1024 + 512; +// The same changes measure 639616 startup bytes, 128 above the former bound. +// Allow 256 additional bytes without increasing deferred or total ceilings. +// The same image-template metadata measures 640835 startup bytes. Native graph +// authoring and controlled-workflow helpers load only when creation is requested. +// The validated connector and Guidance fixes measure 641325 startup bytes. +// Allow 384 additional bytes without new dependencies or eager authoring imports. +// The same supervisor/consumed-control fix measures 641927 startup bytes +// (+567 from 641360). Bound this shared correctness logic with 576 bytes; +// no new dependencies or eager template-creation imports. +// The same startup fix adds 277 bytes (642255 measured); deferred code falls +// by 115 bytes. Add 320 here without changing lazy boundaries or chunk limits. +// The same combined fixes measure 642639 startup bytes. Add the same bounded +// 512 bytes without changing code-splitting boundaries or dependencies. +// The same recipe metadata measures 643554 total startup bytes (+1378). +// Allocate 1536 bytes for this feature, preserving the existing four assets. +// Preserve both reviewed allowances: 642304 + 512 + 1536 = 644352 bytes. +// The same shared image metadata measures 646240 startup bytes, 373 above the +// paired 645867-byte baseline. Reserve the same bounded 384-byte allowance. +// Preserve the same bounded 64-byte numeric-field correction allowance. +// Preserve the separately measured 64-byte shared loading-policy allowance above. +// Preserve the measured 384-byte selected-image authoring allowance above. +// The same build measures 673359 aggregate startup bytes (+45 over the cap). +// Keep 19 bytes of headroom; deferred limits and loading boundaries stay fixed. +// The same build measures 757,520 total startup bytes, up from 753,545. +// The four startup chunks include shared selectors, stage geometry and editing controls. 757520 to 764464 gzip bytes. +const MAX_STARTUP_GZIP_BYTES = + // The same four startup chunks measure 767680 to 767960. + 280 + + // Same four startup chunks, measured 767455 to 767680. + 225 + + // Same four startup chunks, measured 766265 to 767455 gzip bytes. + 1190 + + // Same four startup chunks, measured 765381 to 766265. + 884 + + // Same four startup chunks, measured 764464 to 765381 gzip bytes. + 917 + + 6944 + + 3975 + + // The Shap-E preview and its Gallery descriptor add 634 bytes of startup JavaScript. + 634 + + // The same change adds 27 overall startup gzip bytes. + 27 + + // The four saved image recipes add 1281 gzip bytes, for 752896 total. + 1281 + + // The same build measures 751615 total startup gzip bytes. + 798 + + // The same build measures 750817 total startup gzip bytes. + 807 + + // The same recipe measures 750010 total startup gzip bytes. + 512 + + // The expanded catalogue measures 749498 total startup gzip bytes. + 7622 + + // The same change adds 721 bytes across the startup closure (741155 to 741876). + 721 + + // The same video catalog measures 741155 total startup bytes. + 7524 + + // Those ten recipes measure 733631 total startup bytes. + 3294 + + // The same source-bound recipes measure 730337 total startup bytes. + 6228 + + // The same approved recipes measure 724109 total startup bytes. + 1105 + + // The guide receipt scopes add 56 bytes across startup (722946 to 723002). + 56 + + // The layer stack evidence checks add 124 bytes across startup (722822 to 722946). + 124 + + // The guide receipt checks add 302 bytes across startup (722520 to 722822). + 302 + + // The same history contract adds 76 bytes across startup (722444 to 722520). + 76 + + // The same additions add 3099 aggregate startup gzip bytes (719345 -> 722444). + 3099 + + // The same route correction adds 16 startup bytes (707765 -> 707781 gzip bytes). + 16 + + // The same scoped profile defaults add 58 bytes across startup (707707 -> 707765). + 58 + + // The same change adds 12 startup bytes (707695 -> 707707 gzip bytes). + 12 + + // The same scoped compatibility fix adds 25 bytes across startup (707663 -> 707688). + 25 + + // The same input titles add 47 bytes across the startup closure. + 47 + + // The same saved-workflow corrections add 84 bytes across startup. + 84 + + // Paired build above: 707532 vs. 707322 bytes across the startup closure. + 210 + + // Stage discovery, action search and compatible mode changes (702737 -> 707310 gzip bytes). + 4573 + + // The same change adds 498 aggregate startup gzip bytes (702235 -> 702733). + 498 + + // The same changes add 68 aggregate startup gzip bytes. + 68 + + // The same changes add 1115 aggregate startup bytes (701052 -> 702167). + 1115 + + // Generic stage presentation adds 432 startup gzip bytes (700620 -> 701052). + 432 + + // The pinned Qwen 2.1 Turbo terms add 126 startup gzip bytes (700494 -> 700620). + 126 + + // The same receipt compatibility adds 271 measured startup bytes. + // Keep 20 bytes of headroom and the existing deferred limits. + 271 + + // Aggregate startup rises by 612 bytes. Deferred limits and chunk membership stay fixed. + 612 + + // The same build adds 1644 startup gzip bytes and keeps 20 bytes of headroom. + 1644 + + // The production startup total rose by 296 gzip bytes. Deferred limits are unchanged. + 296 + + // The speech changes measure 697677 bytes, 921 above 696756. + // Preserve the 20-byte headroom, chunk memberships, and deferred budgets. + 921 + + // The same node presentation pass adds 923 gzip bytes (695833 -> 696756). + 923 + + // Measured node interface presentation delta (695402 -> 695834). + 432 + + // The same Gallery build adds 479 startup gzip bytes (694940 -> 695419). + 479 + + // The same Gallery build adds 1683 startup gzip bytes (693257 -> 694940). + 1683 + + // Same build adds 41 startup gzip bytes (693216 -> 693257). + // Deferred gzip decreases by 57 bytes and retains both existing limits. + 41 + + 1206 + + 103 + + 396 + + 402 + + 669 + + // The paired change adds 389 startup gzip bytes (690042 -> 690431), preserving + // 11-byte headroom. Deferred limits, dependencies and build rules are unchanged. + 389 + + // The same phase-reset correction adds 33 startup bytes (690009 -> 690042). + // Preserve the existing 11-byte headroom; deferred limits stay unchanged. + 33 + + // Same measured build: 689872 -> 690009 (+137), retaining 11-byte headroom. + // Deferred gzip decreases to 349882; no dependency or loading-boundary change. + 137 + + // Same measured build: 689820 -> 689872 (+52), retaining 11-byte headroom. + // Four startup paths are unchanged; deferred gzip is 349947, below its cap. + 52 + + // Same build: 689669 -> 689763 (+94), preserving 68-byte headroom. + // Deferred total is 349628 and retains its existing aggregate ceiling. + 94 + + // Same build: 689480 -> 689669 startup gzip (+189), retaining 68 bytes of + // headroom. Deferred gzip is 349598, within its unchanged aggregate cap. + 189 + + // Same measured build: 689104 -> 689480 startup gzip (+376), keeping + // 68 bytes of headroom. Deferred gzip decreases to 349544 bytes; its + // aggregate and independent 64 KiB chunk ceilings remain unchanged. + 376 + + // Same v18 -> v23 build: 688967 -> 689112 (+145), retaining 60 bytes + // of headroom. Deferred gzip is 349917, below its unchanged allowance. + 145 + + // Same frozen v16 -> v18 build: 688694 -> 688967 (+273), retaining + // 60-byte headroom. Deferred total decreases to 349744 gzip bytes. + 273 + + // The same v11 -> v15 changes measure 687972 -> 688688 bytes; retain 66 + // bytes of headroom with the measured 716-byte increase. + 716 + + // Same source-bound controls/callback correction: 686124 -> 687972 (+1848). + // Preserve the prior 66-byte headroom and independent deferred limits. + 1848 + + 508 + + 1026 + + 617 + + // Same frozen build: aggregate startup 684004 -> 684033 gzip bytes. + // Add only the measured 29 bytes and preserve six bytes of headroom. + 29 + + // The same compact history index: 683468 -> 684004 gzip bytes. Preserve + // six-byte headroom and both deferred ceilings (deferred decreases by 10). + 536 + + // Same measured build: 683047 -> 683468. Keep six bytes of headroom. + 421 + + // Same readiness correction: 682980 -> 683041 bytes. Retain twelve bytes + // of headroom and both deferred limits; no startup membership change. + 61 + + // Same frozen build: 679735 -> 682979 across the same four startup assets. + 3244 + + 528 + + 1664 + + 155 + + 296 + + 357 + + 100 + + 15 + + 42 + + 291 + + 896 + + 107 + + 102 + + 83 + + 236 + + 38 + + 132 + + 102 + + 113 + + 202 + + 21 + + 267 + + // Same hierarchy feature: 673622 -> 673867 bytes; retain 19 bytes of headroom. + 245 + + // Same feature: 673359 -> 673622 gzip bytes, retaining 19 bytes of headroom. + // No dependency, minifier, startup membership or lazy-boundary change. + 263 + + 64 + + 13 + + 52 + + 297 + + 199 + + 1047 + + 36 + + 1651 + + 63 + + 650 + + 498 + + 2018 + + 69 + + 190 + + 53 + + 82 + + 274 + + 6814 + + 1768 + + 624 * 1024 + + 896 + + 768 + + 1280 + + 384 + + 576 + + 320 + + 512 + + 1536 + + 32 + + 128 + + 384 + + 384 + + 768 + + 384 + + 64 + + 64 + + 384 + + 128 + + 576 + + 128 + + 64 + + 64 + + 2112 + + 5092 + + 128 + + 128 + + 512 + + 192 + + 288 + + 288 + + 115 + + 11563; // Deferred surfaces are measured separately so code splitting cannot hide an // unbounded feature bundle. These ceilings leave room for the reviewed dialogs // and catalog tools while preventing either one oversized deferred chunk or @@ -177,7 +1152,190 @@ const MAX_DEFERRED_CHUNK_GZIP_BYTES = 64 * 1024; // 247.4 KiB measured; retain the independent 64 KiB per-chunk limit. // Deferred native Block creation and explicit-interface preservation measure // 248.1 KiB combined. Allow 512 bytes beyond the previous deferred ceiling. -const MAX_DEFERRED_GZIP_BYTES = 248 * 1024 + 512; +// Backend-defined image-template creation, exact parameter bindings and guarded +// atomic insertion measure 257611 deferred bytes. Bound this added feature at +// 3328 bytes above the previous aggregate; the 64 KiB chunk ceiling stays fixed. +// The exact recipe fixes measure 257819 aggregate bytes. Allow another 128 bytes +// while retaining the independent 64 KiB limit for every deferred chunk. +// Validated preservation of the two Z-Image default adapter names adds 263 +// compressed bytes (258082 total). Bound it with 256 additional bytes above +// the prior ceiling; startup, dependencies and individual chunk limits stay fixed. +// Exact consumed-control visibility measures 258292 aggregate bytes (+137 +// from 258155). Allow 128 additional bytes above the previous ceiling; +// retain the independent 64 KiB limit and all lazy authoring boundaries. +// Bounded runtime-discovery waiting, cancellation and owned device normalization +// stay in lazy template authoring. Measured aggregate is 258637 bytes (+345; +// 329 bytes in that helper). Allow 384 bytes above the former 258304-byte cap; +// startup, the 64 KiB per-chunk ceiling and loading boundaries stay unchanged. +// Reviewed guidance transfer, component-bundle authoring, optional stage +// controls and native masked recipes measure 267262 deferred bytes. Read-only +// visual projection keeps structural grouping out of startup. Exact archived +// runtime restoration and the native recipe checks add 1316 bytes to the last +// reviewed build. Bound these features and relocation at 8.5 KiB above the +// former aggregate cap; startup and both per-chunk caps stay fixed. +// Preserving one declared media source across new required inputs adds 746 +// deferred gzip bytes (267236 -> 267982 measured). Its role, source, literal +// and cycle guards stay in the existing lazy authoring chunk and reuse nanoid. +// Allow 768 bytes; startup, dependencies and both per-chunk caps stay fixed. +// Ordinary media-source labels add upstream repository/local context and +// visible branch ordinals without changing ports or attachment authority. +// Measured deferred aggregate is 268690 bytes (+588 from 268102); reuse the +// existing Block projection and cache immutable instances. Allow 640 bytes; +// startup, dependencies and both per-chunk ceilings remain unchanged. +// Combined Windows and Linux correctness fixes measure 268989 deferred bytes +// after shared media-driver/preview reuse. Add 256 bounded bytes; retain the +// independent 65536-byte deferred-chunk ceiling and existing dependencies. +// Bounded optional-runtime status retries, visible stale-progress errors and +// status-only recovery measure 269147 deferred gzip bytes (+457 from 268690). +// Allow 512 bytes for this correctness fix in the existing lazy workspace; +// startup, dependencies and both per-chunk ceilings remain unchanged. +// Preserve both reviewed allowances: 268800 + 256 + 512 = 269568 bytes. +// The combined build measures 269414 deferred bytes, 642643 startup bytes and +// a 464336-byte largest startup chunk; retain the existing startup ceilings. +// Declared text/JSON Gallery previews and raw-original downloads share the +// Previous text formatter/viewer and existing export path. Together with the +// Session JSON kind/null and Previous declared-family corrections, the measured +// build is 270329 deferred bytes (+915 from 269414). Allow only 1024 additional +// aggregate bytes; startup, +// dependencies and both per-chunk ceilings remain unchanged. +// Retrying non-JSON transient HTTP errors adds 14 bytes to the workspace chunk. +// The versioned aggregate measures 269341 bytes; allow 128 additional bytes +// for this correction, keeping startup, per-chunk and loading limits unchanged. +// Exact Custom recipe readiness and selection measure 271404 deferred bytes. +// Allocate 2048 bytes above the prior cap; the 64 KiB per-chunk limit stays fixed. +// The shared 512-byte polling allowance above is counted once. Preserve the +// separate Windows 256 + 1024 and incoming 128 + 2048 additions: +// 268800 + 512 + 256 + 1024 + 128 + 2048 = 272768 bytes. +// Owned image adapters, combined-stage controls and strict backend recipe +// validation measure 277158 deferred bytes versus the paired 272631 baseline. +// Sharing the already-lazy authoring planners saves 1450 bytes. Reserve only +// 4608 additional bytes for this feature; no dependencies, eager authoring, +// unsafe minifier rewrites or individual 64 KiB deferred limits are added. +// Exact selected-image adapter authority, safe unsupported-row recovery and +// typed direct-adapter/Cosmos output ownership add 1605 deferred gzip bytes to +// the 276849-byte image-stage checkpoint. The validator is shared and remains +// lazy. Measured aggregate is 278454; allow 1280 bytes above the previous cap +// (278656 total), with existing headroom covering the rest of this correction. +// Numeric precision measures 278511 deferred bytes, within the existing ceiling. +// Keep both aggregate and individual deferred limits unchanged. +// The selected-image authoring feature above uses 320 additional aggregate bytes; +// the independently bounded 64 KiB deferred chunks and loading checks stay fixed. +// Sealed selector normalization and reviewed catalog pins measure deferred gzip +// 320994 -> 321188 bytes (+194). Add only that measured aggregate cost to the +// 321033-byte cap, preserving 39 bytes of headroom at 321227. Startup caps, the +// 65536-byte deferred chunk cap, dependencies and loading boundaries stay fixed. +// Approved showcases add exactly 960 compressed bytes to the deferred browser. +// The 94 JavaScript names and four startup/90 deferred memberships are unchanged; +// only TemplateBrowserDialog has functional residue after build-URL normalization. +// Startup code differs only in the three verified Dataset descriptor values. +// Retain both startup caps, the independent 64 KiB chunk cap and prior headroom. +// Template previews, Gallery and setup stay deferred. Their aggregate moves from +// 357,530 to 361,671 bytes, including the shared workflow-file picker. +// The template feature, panel layouts and conditional controls are loaded with their existing surfaces. 361671 to 367446 gzip bytes. +const MAX_DEFERRED_GZIP_BYTES = + // File pickers, playable media alternatives and role-specific help load on demand. + // Deferred gzip measured 372668 to 376689 bytes; startup fell by 438 bytes. + 4021 + + // Contextual help for saved and ungrouped previews. Measured 372145 to 372504 gzip bytes. + 359 + + // Open-on-demand node help, inspector and Gallery changes, measured 368441 to 372145. + 3704 + + // The port picker and stage controls stay lazy. Measured 367446 to 368441 gzip bytes. + 995 + + 5775 + + 4141 + + // The native turntable comparison adds 129 bytes and keeps 41 bytes of headroom. + 129 + + // Stage discovery, action search and compatible mode changes (355589 -> 357408 gzip bytes). + 1819 + + // Applicable conditioning controls add 646 deferred gzip bytes (355104 -> 355750). + 646 + + // Bound media input receipts and stage captions add 173 deferred gzip bytes. + 173 + + // Initial media preview spacing and workflow labels add 148 deferred bytes (354889 -> 355037). + 148 + + // The stage and inspector changes add 504 deferred gzip bytes (354385 -> 354889). + 504 + + // Catalog, adapter, guidance and selection controls add 234 gzip bytes (353986 -> 354220). + // The four startup and 93 deferred chunks retain their exact membership. + 234 + + // Shared media sockets and restored activity disclosure add 604 gzip bytes + // (353382 -> 353986), with the same chunk membership and startup limits. + 604 + + // Catalog qualifiers and custom node categories add 300 gzip bytes + // (353082 -> 353382), with the same 93 deferred chunks and 64 KiB chunk cap. + 300 + + 347 + + 1244 + + 278 + + 652 + + 364 + + 418 + + // Planning-only template creation guards add 181 gzip bytes versus tested v15 + // (349724 -> 349905). Keep startup caps and the independent 64 KiB chunk cap; + // preserve the prior 96-byte deferred headroom. No dependencies/build-rule changes. + 181 + + 460 + + 2626 + + 66 + + 331 + + // Actual stage/sequence/composite authoring and secondary model resolution: + // 338225 -> 345885 gzip bytes. One new templateSecondaryStages lazy chunk + // makes 91 deferred assets; retain prior headroom and the independent 64 KiB + // per-chunk cap. No runtime dependency, minifier or accelerator change. + 7660 + + 960 + + 263 + + 1258 + + 81 + + 319 + + 96 + + 3546 + + 1556 + + 242 + + 297 + + 1147 + + 1043 + + 334 + + 178 + + 287 + + 44 + + 2064 + + 935 + + 103 + + 2097 + + 248 * 1024 + + 32 + + 2368 + + 512 + + 3328 + + 128 + + 256 + + 128 + + 384 + + 8704 + + 768 + + 640 + + 256 + + 512 + + 1024 + + 128 + + 2048 + + 4608 + + 1280 + + 320 + + 2560 + + 64 + + 7232 + + 22998 + + 896 + + 1536 + + 353 + + 1593 + + 864 + + 1561 + + 194 + + 600; const STATIC_MODULE_REFERENCE = /\b(?:import(?=\s|["'{*])(?!\s*\()|export(?=\s|["'{*]))[^;]*?["'](\.\/[^"'?]+\.js)(?:\?v=[0-9a-f]{16})?["']/g; diff --git a/scripts/canonical-image-accounting.test.mjs b/scripts/canonical-image-accounting.test.mjs new file mode 100644 index 00000000..a1a3979f --- /dev/null +++ b/scripts/canonical-image-accounting.test.mjs @@ -0,0 +1,740 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { readFileSync } from 'node:fs'; +import { dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { before, test } from 'node:test'; +import { protocolFactoryArguments } from './canonical-provenance-fixtures.mjs'; +import { directImagePromptRuntimeHintAccounting } from './canonical-runtime-hints.mjs'; +import { + canonicalAccountingExecutionPlan, + createRunProvenance, + directImagePromptAccountingExecutionPlan, + directImagePromptRoutes, + stableStringify, +} from './live-proof-provenance.mjs'; +import { exportCanonicalWorkflowGraphs, readCanonicalWorkflowEvidence } from './release-contract-core.mjs'; + +const clientRoot = fileURLToPath(new URL('../', import.meta.url)); +const backendRoot = fileURLToPath(new URL('../../MoDiff/', import.meta.url)); +const dreamLiteMobileDefaults = process.env.MODIFF_DREAMLITE_MOBILE_DEFAULTS_EVIDENCE; +test( + 'the retained DreamLite Mobile default validates the original blank prompt without claiming full accounting', + { + skip: !dreamLiteMobileDefaults, + }, + async () => { + const workflowId = 'DreamLiteMobilePipeline:text_to_image'; + const { receipt, evidence } = await readCanonicalWorkflowEvidence({ + clientRoot, + backendRoot, + workflowId, + evidencePath: dreamLiteMobileDefaults, + }); + assert.equal(receipt.proofKind, 'real_backend_weights'); + assert.equal(receipt.observationLimits.fullConsumedFieldAccounting, false); + assert.ok(Object.values(receipt.qualificationClaims).every((value) => value === false)); + const read = (ref) => JSON.parse(readFileSync(join(dirname(dreamLiteMobileDefaults), ref.path), 'utf8')); + const run = read(evidence.runDetail); + const output = run.outputs[0]; + const completed = read(evidence.graphCompleted); + const apiGraph = output.apiGraphSnapshot; + const consumed = output.resolvedExecutionInputs; + const expectedApiGraph = { sid: apiGraph.sid, nodes: apiGraph.nodes, paths: apiGraph.paths }; + const runtimeEvidence = { run, output, graphCompleted: completed }; + const args = { expectedApiGraph, apiGraph, consumed, target: receipt, runtimeEvidence }; + assert.equal(canonicalAccountingExecutionPlan(args).retainedGenerator, true); + run.task.runtimeFingerprint.backendSource.fingerprint = 'sha256:backend-source-v1:' + '0'.repeat(64); + assert.throws(() => canonicalAccountingExecutionPlan(args), /Retained image source differs/u); + }, +); + +const retainedProfiles = [ + { + modelType: 'DDPMPipeline', + graphPath: 'ddpm-pipeline/unconditional-image.json', + evidencePath: process.env.MODIFF_RETAINED_DDPM_EVIDENCE, + platform: 'Windows-11', + backend: 'cuda', + size: 32, + }, + { + modelType: 'ConsistencyModelPipeline', + graphPath: 'consistency-model-pipeline/unconditional-image.json', + evidencePath: process.env.MODIFF_RETAINED_CONSISTENCY_EVIDENCE, + platform: 'Linux-x86_64', + backend: 'rocm', + size: 64, + }, +]; +const emptyConditioning = { + control_guidance_start: null, + control_guidance_end: null, + conditioning_scale: null, + strength: null, +}; +const project = (kind, values, sourceNodeId, sourcePortId) => ({ + kind, + values, + sha256: createHash('sha256') + .update(`${kind}\n${stableStringify(values)}`) + .digest('hex'), + ...(sourceNodeId ? { source: 'connected', sourceNodeId, sourcePortId } : {}), +}); + +// The canonical input is the actual exporter output. The stage transport, +// runtime and accounting observations are synthetic and never registered. +let synthetic; +let syntheticPrx; +let syntheticSdxl; +let syntheticSd15Pag; +const syntheticRetained = new Map(); +before(async () => { + synthetic = await syntheticImageCase({ + modelType: 'PixArtSigmaPAGPipeline', + graphPath: 'pix-art-sigma-pag-pipeline/text-to-image.json', + size: 1024, + }); + syntheticPrx = await syntheticImageCase({ + modelType: 'PRXPipeline', + graphPath: 'prx-pipeline/text-to-image.json', + size: 512, + platform: 'Linux-x86_64', + backend: 'rocm', + }); + syntheticSdxl = await syntheticImageCase({ + modelType: 'StableDiffusionXLPipeline', + graphPath: 'stable-diffusion-xl-pipeline/text-to-image.json', + size: 1024, + platform: 'Linux-x86_64', + backend: 'rocm', + }); + syntheticSd15Pag = await syntheticImageCase({ + modelType: 'StableDiffusionPAGPipeline', + graphPath: 'stable-diffusion-pag-pipeline/text-to-image.json', + size: 512, + platform: 'Windows-11', + backend: 'cuda', + }); + for (const profile of retainedProfiles) syntheticRetained.set(profile.modelType, await syntheticImageCase(profile)); +}); + +async function syntheticImageCase({ modelType, graphPath, size, platform, backend }) { + const directPrx = modelType === 'PRXPipeline'; + const directSdxl = modelType === 'StableDiffusionXLPipeline'; + const directPag = modelType === 'StableDiffusionPAGPipeline'; + const directImage = directPrx || directSdxl || directPag; + const retained = platform !== undefined && !directImage; + const generateAction = retained ? 'UnconditionalGenerate' : 'Generate'; + const taskMode = retained ? 'unconditional_image' : 'text_to_image'; + const graph = JSON.parse(readFileSync(join(backendRoot, 'data/graphs/studio', graphPath), 'utf8')); + if (directImage) { + const generate = graph.nodes.find((node) => node.data.action === 'Generate'); + const prompt = { + StableDiffusionXLPipeline: 'A rain-soaked Victorian conservatory with a wet terracotta aisle and fern beds.', + StableDiffusionPAGPipeline: 'A weathered copper watering can on a rain-dark slate step.', + PRXPipeline: 'Editorial product photograph of a single silver compass.', + }; + generate.data.params.prompt.value = prompt[modelType]; + } + const [expected] = await exportCanonicalWorkflowGraphs(clientRoot, [graph]); + const form = { modelType, mode: taskMode, ...(retained ? { resourceMode: 'expert' } : {}) }; + const visualNodes = graph.nodes.filter( + (node) => node.data.action === 'Preview' || (directImage && node.data.action === 'Generate'), + ); + const ids = new Map(visualNodes.map((node) => [node.id, node.id])); + const staged = [['setup', (node) => node.data.action !== generateAction]]; + if (!directImage) staged.push(['generate', (node) => node.data.action === generateAction]); + for (const [id, pick] of staged) { + const leaves = graph.nodes.filter((node) => !ids.has(node.id) && pick(node)); + const nodes = leaves.map(({ id: nodeId, data }) => { + ids.set(nodeId, `block-v2-node:${id.length}:${id}:${nodeId.length}:${nodeId}`); + return { nodeId, data }; + }); + visualNodes.push({ + id, + data: { module: 'MoDiff', action: 'BlockV2', blockInstanceV2: { instanceId: id, effectiveGraph: { nodes } } }, + }); + } + const apiGraph = JSON.parse(JSON.stringify(expected)); + apiGraph.nodes = Object.fromEntries(Object.entries(apiGraph.nodes).map(([id, node]) => [ids.get(id), node])); + for (const node of Object.values(apiGraph.nodes)) + for (const param of Object.values(node.params)) if (param.sourceId) param.sourceId = ids.get(param.sourceId); + apiGraph.paths = apiGraph.paths.map((path) => path.map((id) => ids.get(id))); + const expectedApiGraph = structuredClone(apiGraph); + const nodeId = visualNodes.find((node) => node.data.action === 'Preview').id; + const base = protocolFactoryArguments(apiGraph); + if (platform) { + base.runtimeFingerprint.packages.platform = platform; + base.executionReceipt.runtimeMeasurement.backend = backend; + base.executionReceipt.runtimeMeasurement.device = 'cuda:0'; + } + const task = { + task_id: base.taskId, + sid: apiGraph.sid, + status: 'completed', + attempt_index: 0, + resourceCandidateId: null, + started_at: 100, + completed_at: 101, + runtimeFingerprint: base.runtimeFingerprint, + runtimeMeasurement: base.executionReceipt.runtimeMeasurement, + client_run_id: 'protocol-transport', + workflow_tab_id: 'protocol-staged', + workflow_canvas_epoch: 7, + }; + const snapshot = { nodes: visualNodes, edges: [], viewport: graph.viewport, studioForm: form }; + task.workflow_snapshot = snapshot; + const ordered = (item) => + Array.isArray(item) + ? item.map(ordered) + : item && typeof item === 'object' + ? Object.fromEntries( + Object.entries(item) + .sort(([a], [b]) => a.localeCompare(b)) + .map(([key, value]) => [key, ordered(value)]), + ) + : item; + const runInput = JSON.stringify(ordered({ form, nodes: apiGraph.nodes, paths: apiGraph.paths })); + let correlation = 0x811c9dc5; + for (const character of runInput) correlation = Math.imul(correlation ^ character.charCodeAt(0), 0x01000193); + task.run_input_hash = `run_${(correlation >>> 0).toString(16).padStart(8, '0')}`; + apiGraph.runtimeHints = { + clientRunId: task.client_run_id, + runInputHash: task.run_input_hash, + workflowTabId: task.workflow_tab_id, + workflowCanvasEpoch: task.workflow_canvas_epoch, + workflowSnapshot: snapshot, + }; + const consumed = { + schemaVersion: 1, + taskId: task.task_id, + attemptIndex: 0, + nodeId, + source: 'backend-execution', + truncated: false, + uncapturedNodeIds: [], + fieldAccountingStatus: { schemaVersion: 1, truncated: false }, + nodes: [], + }; + const legacy = (value) => ({ value, source: 'literal' }); + const inactive = { + PipelineQuantizationConfigV2: ['dtype', 'excluded_modules'], + DiffusersExecutionRecipe: [ + 'device_map_overrides', + 'layerwise_casting_components', + 'layerwise_storage_dtype', + 'layerwise_compute_dtype', + 'channels_last_components', + 'compile_components', + 'compile_backend', + 'compile_mode', + 'compile_fullgraph', + 'compile_dynamic', + 'cache_options', + 'cache_threshold', + ], + LoadPipeline: ['conditioning_model_id', 'conditioning_revision'], + Generate: [ + 'strength', + 'image_guidance_scale', + 'control_guidance_start', + 'control_guidance_end', + 'padding_mask_crop', + 'layers', + 'resolution', + 'cfg_normalize', + 'use_en_prompt', + ], + UnconditionalGenerate: ['eta', 'class_label'], + ...(directImage + ? { + Generate: [ + 'cfg_normalize', + 'control_guidance_end', + 'control_guidance_start', + 'image_guidance_scale', + 'layers', + ...(!directPrx ? ['max_sequence_length'] : []), + 'padding_mask_crop', + ...(!directPag ? ['pag_adaptive_scale', 'pag_scale'] : []), + 'resolution', + 'strength', + 'use_en_prompt', + ], + } + : {}), + Preview: ['device'], + }; + const replacedLoaderFields = { + auto_offload: 'offload_mode', + device: 'device', + offload_mode: 'offload_mode', + enable_vae_slicing: 'vae_slicing', + enable_vae_tiling: 'vae_tiling', + }; + const recipeParams = Object.values(apiGraph.nodes).find((node) => node.action === 'DiffusersExecutionRecipe').params; + const recipeValues = { schema_version: 1, quantization: 'none', device_map_strategy: 'none' }; + const none = { backend: 'none', disabled: true }; + const role = (action) => consumed.nodes.find((row) => row.action === action); + for (const [ownerId, node] of Object.entries(apiGraph.nodes)) { + const row = { + nodeId: ownerId, + module: node.module, + action: node.action, + fields: {}, + omittedFields: {}, + fieldAccounting: { + schemaVersion: 1, + fields: {}, + inputProjections: {}, + outputProjections: {}, + unaccountedFields: [], + omittedFields: {}, + complete: true, + }, + }; + for (const [key, param] of Object.entries(node.params)) { + if (!Object.hasOwn(param, 'value') || param.sourceId) continue; + const value = param.value?.source === 'hub' ? param.value.value : param.value; + let field = { ...legacy(value), disposition: 'consumed', inputValue: value }; + if (inactive[node.action].includes(key)) { + const reason = + node.action === 'Preview' + ? 'already-decoded-image' + : [generateAction, 'LoadPipeline'].includes(node.action) + ? 'adapter-inactive' + : 'feature-disabled'; + field = { ...field, disposition: 'inactive', reason }; + } else if (node.action === 'LoadPipeline' && Object.hasOwn(replacedLoaderFields, key)) { + const effective = recipeParams[replacedLoaderFields[key]].value; + field = { + ...field, + value: key === 'auto_offload' ? effective !== 'none' : effective, + disposition: 'superseded', + reason: 'connected-recipe', + }; + } else if ((retained || directPag) && node.action === 'LoadPipeline' && key === 'device_map') { + field = { ...field, value: 'cuda', disposition: 'superseded', reason: 'loader-normalization' }; + } else if (key === 'image_contract') { + field = { + source: 'literal', + disposition: 'metadata', + reason: 'presentation-contract', + sha256: project('image-contract-v1', value).sha256, + }; + } + row.fieldAccounting.fields[key] = field; + if ( + node.action === generateAction && + field.disposition === 'consumed' && + !key.startsWith('pag_') && + (!retained || key !== 'batch_size') + ) + row.fields[key] = legacy(value); + if (node.action === 'DiffusersExecutionRecipe' && key !== 'device_map_overrides') + recipeValues[key] = key.endsWith('_components') ? value.split(',').filter(Boolean) : value; + } + if (node.action === generateAction) { + row.fields.executed_task = legacy(taskMode); + if (!retained) for (const [key, value] of Object.entries(emptyConditioning)) row.fields[key] = legacy(value); + if (directSdxl || directPag) row.fields.max_sequence_length = legacy(null); + } + consumed.nodes.push(row); + } + const setup = role('LoadPipeline'); + const recipe = role('DiffusersExecutionRecipe'); + const quant = role('PipelineQuantizationConfigV2'); + setup.fieldAccounting.inputProjections.execution_recipe = project( + 'execution-recipe-v1', + recipeValues, + recipe.nodeId, + 'execution_recipe', + ); + recipe.fieldAccounting.outputProjections.execution_recipe = project('execution-recipe-v1', recipeValues); + recipe.fieldAccounting.inputProjections.quantization_config = project( + 'disabled-quantization-v1', + none, + quant.nodeId, + 'quantization_config', + ); + quant.fieldAccounting.outputProjections.quantization_config = project('disabled-quantization-v1', none); + const output = { + ...base.executedOutput, + id: 'protocol-image', + taskId: task.task_id, + attemptIndex: 0, + sid: task.sid, + nodeId, + fieldKey: 'preview', + clientRunId: task.client_run_id, + workflowTabId: task.workflow_tab_id, + runInputHash: task.run_input_hash, + apiGraphSnapshot: apiGraph, + graphSnapshot: snapshot, + formSnapshot: form, + resolvedExecutionInputs: consumed, + mediaItems: [{ ...base.executedOutput.mediaItems[0], width: size, height: size }], + }; + const run = { task, workflow_id: task.workflow_tab_id, workflow_snapshot: snapshot, outputs: [output] }; + const graphCompleted = { + type: 'graph_completed', + sid: task.sid, + task_id: task.task_id, + client_run_id: task.client_run_id, + run_input_hash: task.run_input_hash, + workflow_tab_id: task.workflow_tab_id, + workflow_canvas_epoch: task.workflow_canvas_epoch, + executionTime: 1, + runtimeFingerprint: task.runtimeFingerprint, + deterministicMode: null, + runtimeHints: { + ...structuredClone(apiGraph.runtimeHints), + controlledArtifacts: [], + loaderContract: ['modules.DiffusersImage.LoadPipeline'], + }, + runtimeBudget: { applied: false, reason: 'Runtime hints did not target a CUDA device.' }, + runtimeMeasurement: task.runtimeMeasurement, + runtimePreparation: null, + resourceRetryHistory: [], + }; + const target = { + workflowId: `${modelType}:${taskMode}`, + modelType, + task: taskMode, + modelSet: base.modelIdentities.map(({ repoId, selectedRevision }) => ({ repoId, revision: selectedRevision })), + }; + return { + ...base, + executedOutput: output, + executionReceipt: task, + canonicalAccountingProof: { expectedApiGraph, target, run, graphCompleted }, + }; +} + +const projection = (value, reader = canonicalAccountingExecutionPlan) => { + const { expectedApiGraph, target, run, graphCompleted } = value.canonicalAccountingProof; + return reader({ + expectedApiGraph, + target, + apiGraph: value.apiGraph, + consumed: value.executedOutput.resolvedExecutionInputs, + runtimeEvidence: { run, graphCompleted, output: value.executedOutput }, + }); +}; + +test('SDXL Base prompt variant accepts only its exact Linux pin and actual sequence accounting', () => { + const accepted = projection(syntheticSdxl, directImagePromptAccountingExecutionPlan); + assert.equal(accepted.plan.runtimeHintAccounting.policy, 'direct-image-prompt-runtime-hints-v1'); + assert.equal(accepted.plan.pipelineClass, 'StableDiffusionXLPipeline'); + assert.equal(accepted.plan.offloadMode, 'model_cpu'); + + const wrongPin = structuredClone(syntheticSdxl); + wrongPin.canonicalAccountingProof.target.modelSet[0].revision = 'e'.repeat(40); + assert.throws( + () => projection(wrongPin, directImagePromptAccountingExecutionPlan), + /Conditional image model is outside the reviewed accounting scope/u, + ); + const wrongLength = structuredClone(syntheticSdxl); + const generate = wrongLength.executedOutput.resolvedExecutionInputs.nodes.find((row) => row.action === 'Generate'); + generate.fields.max_sequence_length.value = 512; + assert.throws( + () => projection(wrongLength, directImagePromptAccountingExecutionPlan), + /Inactive legacy control was passed to the pipeline: max_sequence_length/u, + ); + const wrongDisposition = structuredClone(syntheticSdxl); + const field = wrongDisposition.executedOutput.resolvedExecutionInputs.nodes.find((row) => row.action === 'Generate') + .fieldAccounting.fields.max_sequence_length; + field.disposition = 'consumed'; + delete field.reason; + assert.throws(() => projection(wrongDisposition, directImagePromptAccountingExecutionPlan), /Wrong disposition/u); + const wrongDimensions = structuredClone(syntheticSdxl); + wrongDimensions.executedOutput.mediaItems[0].width = 512; + assert.throws( + () => projection(wrongDimensions, directImagePromptAccountingExecutionPlan), + /Native image dimensions differ/u, + ); + const turbo = structuredClone(syntheticSdxl); + turbo.canonicalAccountingProof.target.workflowId = 'StableDiffusionXLTurboPipeline:text_to_image'; + turbo.canonicalAccountingProof.target.modelType = 'StableDiffusionXLTurboPipeline'; + assert.throws( + () => projection(turbo, directImagePromptAccountingExecutionPlan), + /Conditional image model is outside the reviewed accounting scope/u, + ); +}); + +test('PRX prompt variant accepts the exact cached pin and complete scoped accounting', () => { + const before = structuredClone(syntheticPrx); + const accepted = projection(syntheticPrx, directImagePromptAccountingExecutionPlan); + assert.equal(accepted.plan.runtimeHintAccounting.policy, 'direct-image-prompt-runtime-hints-v1'); + assert.equal(accepted.plan.offloadMode, 'model_cpu'); + assert.deepEqual(syntheticPrx, before); + assert.throws(() => projection(syntheticPrx), /outside the reviewed scope/u); +}); + +test('PRX prompt variant rejects alternate model pins, sequence accounting and controls', () => { + const wrongOwner = structuredClone(syntheticPrx); + const snapshot = wrongOwner.apiGraph.runtimeHints.workflowSnapshot; + const generateNode = snapshot.nodes.find((node) => node.data.action === 'Generate'); + const setup = snapshot.nodes.find((node) => node.data.blockInstanceV2); + setup.data.blockInstanceV2.effectiveGraph.nodes.push({ nodeId: generateNode.id, data: generateNode.data }); + snapshot.nodes = snapshot.nodes.filter((node) => node.id !== generateNode.id); + assert.throws( + () => projection(wrongOwner, directImagePromptAccountingExecutionPlan), + /Model Setup member scope differs/u, + ); + const wrongPin = structuredClone(syntheticPrx); + wrongPin.canonicalAccountingProof.target.modelSet[0].revision = 'e'.repeat(40); + assert.throws( + () => projection(wrongPin, directImagePromptAccountingExecutionPlan), + /Conditional image model is outside the reviewed accounting scope/u, + ); + const misplacedLimit = structuredClone(syntheticPrx); + const generate = misplacedLimit.executedOutput.resolvedExecutionInputs.nodes.find((row) => row.action === 'Generate'); + const reported = generate.fieldAccounting.fields.max_sequence_length; + reported.disposition = 'inactive'; + reported.reason = 'adapter-inactive'; + delete generate.fields.max_sequence_length; + assert.throws(() => projection(misplacedLimit, directImagePromptAccountingExecutionPlan)); + const wrongValue = structuredClone(syntheticPrx); + const wrongGenerate = wrongValue.executedOutput.resolvedExecutionInputs.nodes.find( + (row) => row.action === 'Generate', + ); + wrongGenerate.fieldAccounting.fields.max_sequence_length.value = 224; + wrongGenerate.fields.max_sequence_length.value = 224; + assert.throws(() => projection(wrongValue, directImagePromptAccountingExecutionPlan)); + const incomplete = structuredClone(syntheticPrx); + const incompleteGenerate = incomplete.executedOutput.resolvedExecutionInputs.nodes.find( + (row) => row.action === 'Generate', + ); + delete incompleteGenerate.fieldAccounting.fields.cfg_normalize; + assert.throws(() => projection(incomplete, directImagePromptAccountingExecutionPlan)); +}); + +test('saved SD1.5 stage owners still require the original native completion evidence', () => { + const block = (actions) => ({ + data: { blockInstanceV2: { effectiveGraph: { nodes: actions.map((action) => ({ data: { action } })) } } }, + }); + const preview = { data: { action: 'Preview' } }; + const setup = block(['LoadPipeline', 'PipelineQuantizationConfigV2', 'DiffusersExecutionRecipe']); + const generate = block(['Generate']); + const verify = (modelType, nodes) => + directImagePromptRuntimeHintAccounting( + { + plan: { modelType }, + apiGraph: { runtimeHints: { workflowSnapshot: { nodes } } }, + }, + directImagePromptRoutes.find((profile) => profile.modelType === modelType), + ); + assert.throws(() => verify('StableDiffusionPipeline', [preview, setup, generate]), /original completion evidence/u); + assert.throws( + () => verify('StableDiffusionPipeline', [preview, setup, block(['Preview'])]), + /Saved direct image Generate member scope differs/u, + ); + assert.throws( + () => verify('StableDiffusionPipeline', [preview, setup, { data: { action: 'Generate' } }]), + /exact saved stage owners/u, + ); + assert.throws(() => verify('PRXPipeline', [preview, setup, generate]), /exact saved stage owners/u); + assert.throws(() => verify('SanaSprintPipeline', [preview, setup, generate]), /exact saved stage owners/u); + assert.throws( + () => verify('StableDiffusionXLControlNetPipeline', [preview, setup, generate]), + /outside reviewed scope/u, + ); +}); + +test('SD1.5 PAG prompt variant requires both locked PAG values in typed consumption evidence', () => { + const { plan } = projection(syntheticSd15Pag, directImagePromptAccountingExecutionPlan); + assert.equal(plan.runtimeHintAccounting.policy, 'direct-image-prompt-runtime-hints-v1'); + assert.equal(plan.offloadMode, 'none'); + const generate = (proof) => + proof.executedOutput.resolvedExecutionInputs.nodes.find((node) => node.action === 'Generate'); + assert.equal(generate(syntheticSd15Pag).fieldAccounting.fields.strength.disposition, 'inactive'); + const missingScalar = structuredClone(syntheticSd15Pag); + delete generate(missingScalar).fieldAccounting.fields.pag_adaptive_scale; + assert.throws(() => projection(missingScalar, directImagePromptAccountingExecutionPlan)); + const changedScalar = structuredClone(syntheticSd15Pag); + generate(changedScalar).fieldAccounting.fields.pag_scale.value = 4; + assert.throws(() => projection(changedScalar, directImagePromptAccountingExecutionPlan)); + const legacyScalar = structuredClone(syntheticSd15Pag); + generate(legacyScalar).fields.pag_scale = { value: 3, source: 'literal' }; + assert.throws(() => projection(legacyScalar, directImagePromptAccountingExecutionPlan), /legacy controls/u); +}); + +test('staged PixArt evidence derives a correlated Expert CPU-offload plan without altering the originals', () => { + const before = structuredClone(synthetic); + const result = projection(synthetic); + assert.equal(result.plan.runtimeHintAccounting.policy, 'canonical-pixart-sigma-pag-runtime-hints-v1'); + assert.equal(result.plan.runtimeHintAccounting.route, 'correlation-only'); + assert.equal(result.plan.offloadMode, 'model_cpu'); + assert.equal(result.plan.deviceMap, 'none'); + assert.equal(createRunProvenance(synthetic).graph.executionPlanHash, result.hash); + assert.deepEqual(synthetic, before); +}); + +test('staged PixArt evidence rejects missing, relabelled, or contradictory native controls and authorities', () => { + const cases = [ + [ + ({ fields }) => { + delete fields.pag_scale; + }, + /literal field set differs/, + ], + [ + ({ fields }) => { + fields.pag_adaptive_scale.value = 1; + }, + /Effective control differs/, + ], + [ + ({ fields }) => { + fields.seed.inputValue = 0; + }, + /Requested literal differs/, + ], + [ + ({ fields }) => { + fields.image_contract.sha256 = '0'.repeat(64); + }, + /Metadata contract hash differs/, + ], + [ + ({ fields }) => { + fields.layers.disposition = 'consumed'; + delete fields.layers.reason; + }, + /Wrong disposition/, + ], + [ + ({ row }) => { + row.fields.conditioning_scale.value = 1; + }, + /Inactive legacy control/, + ], + [ + ({ row }) => { + delete row.fieldAccounting; + }, + /accounting section keys/i, + ], + [ + ({ proof }) => { + delete proof.graphCompleted; + }, + /Original completion frame/, + ], + [ + ({ proof }) => { + proof.graphCompleted.run_input_hash = 'other'; + }, + /Completion run_input_hash/, + ], + [ + ({ proof }) => { + proof.target.modelSet[0].revision = '1'.repeat(40); + }, + /outside the reviewed accounting scope/, + ], + [ + ({ value }) => { + value.apiGraph.runtimeHints.source = 'studio'; + }, + /transport-only hints/, + ], + [ + ({ value }) => { + value.executedOutput.mediaItems[0].width = 768; + }, + /output width differs/, + ], + ]; + for (const [mutate, expected] of cases) { + const value = structuredClone(synthetic); + const row = value.executedOutput.resolvedExecutionInputs.nodes.find((entry) => entry.action === 'Generate'); + mutate({ value, row, fields: row.fieldAccounting.fields, proof: value.canonicalAccountingProof }); + assert.throws(() => projection(value), expected); + assert.throws(() => createRunProvenance(value), expected); + } +}); + +for (const { modelType, evidencePath } of retainedProfiles) { + test(`${modelType} joins the resident automatic-attention proof and rejects contradictory receipts`, () => { + const value = syntheticRetained.get(modelType); + const original = structuredClone(value); + const result = projection(value); + assert.equal(result.plan.runtimeHintAccounting.policy, 'canonical-retained-unconditional-runtime-hints-v1'); + assert.equal(result.plan.runtimeHintAccounting.route, 'correlation-only'); + assert.equal(result.plan.attentionBackend, 'auto'); + assert.equal(result.plan.offloadMode, 'none'); + assert.equal(result.plan.deviceMap, 'cuda'); + assert.equal(createRunProvenance(value).graph.executionPlanHash, result.hash); + assert.deepEqual(value, original); + for (const [mutate, message] of [ + [ + (candidate) => { + const generate = candidate.executedOutput.resolvedExecutionInputs.nodes.find( + (row) => row.action === 'UnconditionalGenerate', + ); + generate.fieldAccounting.fields.eta.disposition = 'consumed'; + delete generate.fieldAccounting.fields.eta.reason; + }, + /Wrong disposition/, + ], + [ + (candidate) => { + candidate.executionReceipt.runtimeFingerprint.packages.platform = 'Unreviewed-operating-system'; + }, + /Retained platform differs/, + ], + [ + (candidate) => { + candidate.executionReceipt.runtimeMeasurement.backend = 'cpu'; + }, + /Retained measurement backend differs/, + ], + [ + (candidate) => { + candidate.canonicalAccountingProof.target.modelSet[0].revision = '0'.repeat(40); + }, + /Retained unconditional model is outside the reviewed scope/, + ], + [ + (candidate) => { + candidate.executedOutput.mediaItems[0].height += 1; + }, + /Retained unconditional output height differs/, + ], + [ + (candidate) => { + delete candidate.canonicalAccountingProof.graphCompleted; + }, + /Original completion frame/, + ], + ]) { + const changed = structuredClone(value); + mutate(changed); + assert.throws(() => projection(changed), message); + assert.throws(() => createRunProvenance(changed), message); + } + }); + + test( + `${modelType} validates the retained original workflow, native task, and WebP`, + { skip: !evidencePath }, + async () => { + const workflowId = `${modelType}:unconditional_image`; + const original = readFileSync(evidencePath); + const { receipt, provenance } = await readCanonicalWorkflowEvidence({ + clientRoot, + backendRoot, + workflowId, + evidencePath, + }); + assert.equal(receipt.workflowId, workflowId); + assert.equal(receipt.proofKind, 'real_backend_weights'); + assert.ok(Object.values(receipt.qualificationClaims).every((claim) => claim === false)); + assert.equal(provenance.graph.executionPlan.attentionBackend, 'auto'); + assert.deepEqual(readFileSync(evidencePath), original); + }, + ); +} diff --git a/scripts/canonical-provenance-fixtures.mjs b/scripts/canonical-provenance-fixtures.mjs new file mode 100644 index 00000000..a3bb112b --- /dev/null +++ b/scripts/canonical-provenance-fixtures.mjs @@ -0,0 +1,575 @@ +// Protocol fixtures only: allocation, inference, runtime and media are mocked. +// Nothing produced here is native execution, hardware or release evidence. +import assert from 'node:assert/strict'; +import { spawnSync } from 'node:child_process'; +import { readFileSync } from 'node:fs'; +import { fileURLToPath } from 'node:url'; +import { createServer } from 'vite'; +import { sha256Value } from './live-proof-provenance.mjs'; +import { canonicalJsonHash } from './canonical-json.mjs'; + +const ROOT = fileURLToPath(new URL('../', import.meta.url)); +let ddim; +let applied; +export function actualAppliedAdapterFixtures() { + if (applied) return structuredClone(applied); + const backend = fileURLToPath(new URL('../../MoDiff/', import.meta.url)); + const python = + process.env.MODIFF_BACKEND_PYTHON || + `${backend}.venv/${process.platform === 'win32' ? 'Scripts/python.exe' : 'bin/python'}`; + const result = spawnSync( + python, + [ + '-B', + '-c', + String.raw` +import contextlib, io, json, sys +sys.path.insert(0, 'tests') +with contextlib.redirect_stdout(io.StringIO()): + from test_applied_adapter_provenance import actual_applied_adapter_fixture + values = {case: actual_applied_adapter_fixture(case) for case in ('activated', 'reused', 'empty', 'unavailable')} +print(json.dumps(values)) +`, + ], + { cwd: backend, encoding: 'utf8', maxBuffer: 2_000_000 }, + ); + assert.equal(result.status, 0, result.stderr); + applied = JSON.parse(result.stdout); + return structuredClone(applied); +} +export function mockedDdimAccountingFixture() { + if (ddim) return structuredClone(ddim); + const backend = fileURLToPath(new URL('../../MoDiff/', import.meta.url)); + const python = + process.env.MODIFF_BACKEND_PYTHON || + `${backend}.venv/${process.platform === 'win32' ? 'Scripts/python.exe' : 'bin/python'}`; + const result = spawnSync( + python, + [ + '-B', + '-c', + String.raw` +import importlib.util, json +from pathlib import Path +from pytest import MonkeyPatch +spec = importlib.util.spec_from_file_location('ddim_protocol', Path('tests/test_canonical_field_accounting.py')) +module = importlib.util.module_from_spec(spec) +spec.loader.exec_module(module) +with MonkeyPatch.context() as patch: + api = module.ddim_graph() + receipt, _, _, _ = module.run_ddim(patch, api) +graph = json.loads(Path('data/graphs/studio/ddim-pipeline/unconditional-image.json').read_text()) +print(json.dumps({'apiGraph': api, 'receipt': receipt, 'graph': graph})) +`, + ], + { cwd: backend, encoding: 'utf8', maxBuffer: 2_000_000 }, + ); + assert.equal(result.status, 0, result.stderr); + ddim = JSON.parse(result.stdout); + return structuredClone(ddim); +} + +export function protocolFactoryArguments(apiGraph, nodesPayload = {}) { + const pins = new Map(); + for (const node of Object.values(apiGraph.nodes)) { + for (const [key, parameter] of Object.entries(node.params)) { + if (parameter.value?.source === 'hub' && ['repo_id', 'model_id', 'model'].includes(key)) + pins.set(parameter.value.value, node.params.revision.value); + } + } + const source = { gitCommit: 'b'.repeat(40), files: [{ path: 'main.py', sha256: 'c'.repeat(64) }] }; + source.fingerprint = sha256Value('backend-source-v1', source); + const runtime = { + fingerprint: 'sha256:synthetic-protocol-runtime', + packages: { torch: 'synthetic-test-only' }, + torch: { version: 'synthetic-test-only' }, + work_dir: '/synthetic/work', + data_dir: '/synthetic/data', + backendSource: { + schemaVersion: 1, + claim: 'process_start_backend_source_identity', + gitCommit: source.gitCommit, + fingerprint: source.fingerprint, + fileCount: 1, + capturedAt: '2026-10-27T00:00:00.000Z', + }, + }; + return { + templateId: 'protocol-only', + lockedSettings: { seed: 42 }, + promptSettingsHash: 'protocol-settings', + catalogTemplateLockHash: 'protocol-catalog', + resolvedTemplateLockHash: 'protocol-resolved', + apiGraph, + nodesPayload, + modelIdentities: [...pins].map(([repoId, selectedRevision]) => ({ + repoId, + selectedRevision, + modelRevision: `${repoId}@${selectedRevision}`, + fingerprint: 'sha256:synthetic-protocol-model', + revisions: [], + })), + runtimeFingerprint: runtime, + backendSource: source, + outputAnalysis: { + analyses: [ + { + width: 32, + height: 32, + mediaType: 'image', + byteSize: 100, + encodedSha256: 'sha256:synthetic-encoded', + decodedSha256: 'sha256:synthetic-decoded', + }, + ], + }, + executedOutput: { mediaHash: 'sha256:bytes:synthetic', mediaItems: [{ mediaHash: 'sha256:bytes:synthetic' }] }, + executionReceipt: { runtimeMeasurement: { elapsedSeconds: 1, processRssBytes: 4096 } }, + taskId: 'protocol-only', + capturedAt: '1970-01-01T00:01:41.000Z', + }; +} + +export function canonicalHookCase() { + const { apiGraph, receipt } = mockedDdimAccountingFixture(); + const args = protocolFactoryArguments(apiGraph); + const loader = Object.values(apiGraph.nodes).find((node) => node.action === 'LoadPipeline'); + const target = { + modelType: 'DDIMPipeline', + task: 'unconditional_image', + modelSet: [{ repoId: loader.params.model_id.value.value, revision: loader.params.revision.value }], + }; + const task = { + task_id: receipt.taskId, + status: 'completed', + attempt_index: 0, + started_at: 100, + completed_at: 101, + runtimeFingerprint: args.runtimeFingerprint, + runtimeMeasurement: args.executionReceipt.runtimeMeasurement, + resourceCandidateId: null, + }; + const output = { + ...args.executedOutput, + id: 'protocol-output', + taskId: task.task_id, + attemptIndex: 0, + nodeId: receipt.nodeId, + fieldKey: 'preview', + workflowTabId: 'protocol-workflow', + clientRunId: 'protocol-run', + runInputHash: 'protocol-input', + apiGraphSnapshot: apiGraph, + resolvedExecutionInputs: receipt, + }; + return { + ...args, + taskId: task.task_id, + executedOutput: output, + executionReceipt: task, + canonicalAccountingProof: { + expectedApiGraph: structuredClone(apiGraph), + target, + run: { task, workflow_id: output.workflowTabId, outputs: [output] }, + }, + }; +} + +// Exercise the real serialized FE producers. The task, completion, runtime, +// allocation and media below remain synthetic protocol fixtures, not live proof. +export async function hintedCanonicalHookCase({ managed = true, memory = true, targetNode = false } = {}) { + const value = canonicalHookCase(); + const { graph } = mockedDdimAccountingFixture(); + const previousWindow = globalThis.window; + globalThis.window ??= { location: { origin: 'http://localhost' } }; + const server = await createServer({ + configFile: false, + root: ROOT, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, hmr: false, watch: null }, + appType: 'custom', + }); + try { + const [{ useStudioStore }, { useNodesStore }, preparation, profiles, inference] = await Promise.all([ + server.ssrLoadModule('/src/stores/useStudioStore.ts'), + server.ssrLoadModule('/src/stores/useNodeStore.ts'), + server.ssrLoadModule('/src/studio/runPreparation.ts'), + server.ssrLoadModule('/src/studio/modelProfiles.ts'), + server.ssrLoadModule('/src/studio/workflowInference.ts'), + ]); + const fallbackForm = { + ...profiles.DEFAULT_STUDIO_FORM, + modelType: 'DDIMPipeline', + mode: 'unconditional_image', + resourceMode: 'expert', + device: 'cuda:0', + dtype: 'float32', + quantizationMode: 'none', + offloadMode: 'none', + autoOffload: false, + randomSeed: false, + width: 32, + height: 32, + steps: 50, + guidanceScale: 0, + }; + const output = value.executedOutput; + const snapshot = inference.workflowSnapshotFromGraph(graph, 'default', fallbackForm); + // Ordinary imports initially select Auto. This bounded protocol case models + // the explicit Custom/Expert choice without changing any authored node, + // wire, model pin, sampling control or resident execution recipe. + const form = { ...snapshot.studioForm, resourceMode: 'expert' }; + snapshot.studioForm = form; + assert.ok(snapshot.studioGraphBinding, 'The ordinary canonical import is managed by the real adoption path.'); + useStudioStore.setState({ + form, + graphBinding: snapshot.studioGraphBinding, + activeTemplateId: null, + autoResourcePlan: null, + autoFieldOverrides: {}, + activeWorkflowTabId: output.workflowTabId, + workflowCanvasEpoch: 7, + workflowTabs: [{ id: output.workflowTabId, title: 'Protocol DDIM', snapshot }], + }); + useNodesStore.setState({ + studioModelCapabilities: [], + runtimeStatus: memory + ? { + packages: { + torch: { + cuda_available: true, + cuda_devices: [{ index: 0, memory_total_bytes: 16 * 1024 ** 3, memory_free_bytes: 12 * 1024 ** 3 }], + }, + }, + } + : null, + }); + const identity = { + clientRunId: output.clientRunId, + runInputHash: preparation.getStudioRunInputHash(form, value.apiGraph), + }; + value.apiGraph = JSON.parse( + JSON.stringify( + preparation.applyRunCorrelationHints( + managed ? preparation.applyStudioRuntimeHints(value.apiGraph, identity) : value.apiGraph, + identity, + { formSnapshot: form, ...(targetNode ? { targetNodeId: output.nodeId } : {}) }, + ), + ), + ); + output.apiGraphSnapshot = value.apiGraph; + output.runInputHash = identity.runInputHash; + output.formSnapshot = form; + output.graphSnapshot = { nodes: snapshot.nodes, edges: snapshot.edges, viewport: snapshot.viewport }; + output.sid = value.apiGraph.sid; + const task = value.executionReceipt; + Object.assign(task, { + sid: output.sid, + client_run_id: identity.clientRunId, + run_input_hash: identity.runInputHash, + workflow_tab_id: output.workflowTabId, + workflow_canvas_epoch: 7, + workflow_title: 'Protocol DDIM', + workflow_snapshot: snapshot, + ...(targetNode ? { node_id: output.nodeId } : {}), + }); + const run = value.canonicalAccountingProof.run; + Object.assign(run, { workflow_title: task.workflow_title, workflow_snapshot: snapshot }); + value.canonicalAccountingProof.graphCompleted = { + type: 'graph_completed', + sid: task.sid, + task_id: task.task_id, + client_run_id: task.client_run_id, + run_input_hash: task.run_input_hash, + workflow_tab_id: task.workflow_tab_id, + workflow_canvas_epoch: task.workflow_canvas_epoch, + ...(targetNode ? { node_id: output.nodeId } : {}), + executionTime: 1, + runtimeFingerprint: task.runtimeFingerprint, + deterministicMode: null, + runtimeHints: { + ...structuredClone(value.apiGraph.runtimeHints), + controlledArtifacts: [], + loaderContract: ['modules.DiffusersImage.LoadPipeline'], + }, + runtimeBudget: managed + ? { + applied: false, + reason: 'CUDA budget is advisory; reset PyTorch process memory fraction to full device.', + cuda_index: 0, + cuda_budget_policy: 'advisory', + fraction: 1, + model_repo: value.apiGraph.runtimeHints.modelRepo, + model_name: value.apiGraph.runtimeHints.modelName, + execution_path: null, + offload_mode: 'none', + } + : { applied: false, reason: 'Runtime hints did not target a CUDA device.' }, + runtimeMeasurement: task.runtimeMeasurement, + runtimePreparation: null, + resourceRetryHistory: [], + }; + return value; + } finally { + await server.close(); + if (previousWindow === undefined) delete globalThis.window; + else globalThis.window = previousWindow; + } +} + +export function appliedOrderCase() { + const literal = (value) => ({ value }); + const adapters = [0, 1].map((scale, index) => ({ + adapterName: `protocol_${index}`, + scale, + descriptorSha256: String(index + 1).repeat(64), + artifact: { + source: 'hub', + repository: `protocol/adapter-${index}`, + revision: 'a'.repeat(40), + weightName: 'adapter.safetensors', + sha256: String(index + 4).repeat(64), + }, + scheduler: null, + })); + const nodes = Object.fromEntries( + adapters.map((item, index) => [ + `adapter-${index}`, + { + module: 'modules.ModularDiffusers', + action: 'Lora', + params: { + model: literal({ source: 'hub', value: item.artifact.repository }), + revision: literal(item.artifact.revision), + weight_name: literal(item.artifact.weightName), + expected_sha256: literal(item.artifact.sha256), + adapter_name: literal(item.adapterName), + scale: literal(item.scale), + scheduler_class: literal(''), + scheduler_config: literal('{}'), + previous_loras: index === 0 ? { display: 'input' } : { sourceId: 'adapter-0', sourceKey: 'lora' }, + }, + }, + ]), + ); + nodes.loader = { + module: 'modules.ModularDiffusers', + action: 'ModelsLoader', + params: { + repo_id: literal({ source: 'hub', value: 'protocol/base' }), + revision: literal('b'.repeat(40)), + model_type: literal('ProtocolModularPipeline'), + dtype: literal('float32'), + lora_list: { sourceId: 'adapter-1', sourceKey: 'lora' }, + }, + }; + nodes.preview = { + module: 'modules.Image', + action: 'Preview', + params: { + image: { sourceId: 'loader', sourceKey: 'images' }, + preview: { display: 'ui_image', sourceKey: 'output' }, + }, + }; + const apiGraph = { + nodes, + paths: [['adapter-0', 'adapter-1', 'loader', 'preview']], + runtimeHints: { + modelType: 'ProtocolModularPipeline', + dtype: 'float32', + offloadMode: 'none', + quantizationMode: 'none', + }, + }; + const args = protocolFactoryArguments(apiGraph); + const application = { + schemaVersion: 1, + status: 'complete', + source: 'backend-adapter-application', + applicationId: 'a'.repeat(32), + observation: 'activated', + adapters, + stateSha256: `sha256:applied-adapters-v1:${canonicalJsonHash({ adapters })}`, + }; + args.executedOutput = { + ...args.executedOutput, + taskId: args.taskId, + attemptIndex: 0, + nodeId: 'preview', + apiGraphSnapshot: structuredClone(apiGraph), + resolvedExecutionInputs: { + schemaVersion: 1, + source: 'backend-execution', + taskId: args.taskId, + attemptIndex: 0, + nodeId: 'preview', + nodes: [ + { + nodeId: 'loader', + module: 'modules.ModularDiffusers', + action: 'ModelsLoader', + fields: {}, + omittedFields: {}, + appliedAdapters: application, + }, + ], + summary: {}, + ambiguousFields: [], + unavailableFields: [], + uncapturedNodeIds: [], + truncated: false, + appliedAdaptersStatus: { schemaVersion: 1, truncated: false }, + }, + }; + args.executionReceipt = { ...args.executionReceipt, task_id: args.taskId, status: 'completed', attempt_index: 0 }; + return args; +} + +// Reuse the actual ten creator fixtures and normal exporter, with rejecting +// networking and ephemeral state. Grouped/ordinary vectors exercise both paths. +export async function legacyCreatorFactoryCases() { + const prior = new Map( + ['window', 'localStorage', 'fetch'].map((key) => [key, Object.getOwnPropertyDescriptor(globalThis, key)]), + ); + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, String(value)), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { + location: { origin: 'http://127.0.0.1:5191' }, + localStorage: globalThis.localStorage, + dispatchEvent: () => true, + }; + globalThis.fetch = () => { + throw new Error('Protocol creator fixtures cannot access the network.'); + }; + let server; + try { + server = await createServer({ + root: ROOT, + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + // Only ephemeral ID allocation is deterministic; creator/export behavior + // and the resulting original graph inputs are not rewritten for the test. + ssr: { noExternal: ['nanoid'] }, + plugins: [ + { + name: 'protocol-fixture-ids', + enforce: 'pre', + resolveId: (id) => (id === 'nanoid' ? '\0protocol-fixture-ids' : null), + load: (id) => + id === '\0protocol-fixture-ids' + ? "let id = 0; export const nanoid = () => String(++id).padStart(12, '0');" + : null, + }, + ], + server: { middlewareMode: true, hmr: false, watch: null }, + appType: 'custom', + }); + const load = (name) => server.ssrLoadModule(`/src/${name}.ts`); + const [inputs, selection, operations, catalog, choices, requests, creator, flow, defaults, exactness, groups] = + await Promise.all( + [ + 'studio/templateInputs', + 'studio/templateModelSelection', + 'workflow/operationContracts', + 'workflow/operationCatalog', + 'workflow/workflowChoices', + 'workflow/operationStarterRequest', + 'studio/templateOperationWorkflow', + 'stores/useFlowStore', + 'studio/modelProfiles', + 'studio/templateExactness', + 'workflow/visualOperationGroupProjection', + ].map(load), + ); + const fixture = JSON.parse( + readFileSync(new URL('../tests/fixtures/public-flux3-template-creators.v1.json', import.meta.url), 'utf8'), + ); + const payload = fixture.capabilitiesPayload; + const contracts = operations.parseOperationContracts( + payload.operationContracts, + payload.operationContractSchemaVersion, + ); + const support = catalog.parsePipelineSupport( + payload.pipelineSupport, + payload.pipelineSupportSchemaVersion, + contracts, + ); + const descriptors = choices.parseWorkflowModelDescriptors(payload, support); + const cases = []; + // Golden byte vectors describe the original creator definitions. Current + // versioned cards have separate authoring tests and must not rewrite them. + const { cards } = JSON.parse( + readFileSync(new URL('../tests/fixtures/legacy-flux3-template-cards.v1.json', import.meta.url), 'utf8'), + ); + assert.equal(cards.length, 10); + for (const card of cards) { + const { capability } = selection.resolveTemplateModelSelection(card, payload.capabilities); + const binding = card.executionSelection; + const spec = capability.studioExecutionSpecs.find( + (item) => item.mode === card.mode && item.executionProfileId === binding.executionProfileId, + ); + const source = fixture.starters.find( + (item) => + item.pipelineClass === binding.pipelineClass && + item.task === binding.task && + item.authoring.id === binding.authoringRecipeId && + item.authoring.executionProfileIds.includes(binding.executionProfileId), + ); + const starter = requests.parseOperationStarter( + structuredClone(source), + binding.pipelineClass, + binding.task, + contracts, + { executionProfileId: binding.executionProfileId, authoringRecipeId: binding.authoringRecipeId }, + ); + const device = starter.nodes.find((item) => item.node.action === 'ModelsLoader').node.params.device.value; + const assets = inputs + .resolveTemplateInputs(card) + .templateDefaultBindings.flatMap((binding) => binding.defaultAssets); + const form = { + ...defaults.DEFAULT_STUDIO_FORM, + ...exactness.getTemplateLockedSettings(card), + mode: card.mode, + modelType: card.modelType, + device, + referenceImages: assets.map((asset, index) => `unit-managed-inputs/${card.id}/${index}-${asset.fileName}`), + }; + const grouped = creator.createTemplateOperationGraph( + card, + form, + starter, + structuredClone(fixture.registry), + spec, + capability, + { workflowModelDescriptors: descriptors }, + ); + for (const [kind, graph] of [ + ['grouped', grouped], + ['ordinary', groups.unpackVisualOperationGroups(grouped).graph], + ]) { + const api = flow.useFlowStore + .getState() + .exportGraph('protocol-legacy', undefined, { sourceGraph: graph, randomizeSeeds: false }); + api.runtimeHints = { + workflowSnapshot: { ...structuredClone(graph), studioForm: form, studioGraphBinding: null }, + }; + const args = protocolFactoryArguments(api, { nodes: fixture.registry }); + args.templateId = card.id; + cases.push({ id: `${card.id}:${kind}`, args }); + } + } + return cases; + } finally { + await server?.close(); + for (const [key, descriptor] of prior) { + if (descriptor) Object.defineProperty(globalThis, key, descriptor); + else delete globalThis[key]; + } + } +} diff --git a/scripts/canonical-runtime-hints.mjs b/scripts/canonical-runtime-hints.mjs new file mode 100644 index 00000000..1ca73c75 --- /dev/null +++ b/scripts/canonical-runtime-hints.mjs @@ -0,0 +1,486 @@ +import assert from 'node:assert/strict'; + +const transportKeys = ['clientRunId', 'runInputHash', 'workflowTabId', 'workflowCanvasEpoch', 'workflowSnapshot']; +const optionalTransportKeys = ['workflowTitle', 'nodeId']; +const managedKeys = `source device cudaIndex modelType mode modelRepo modelName resolvedModelRepo resolvedArtifact + modelDependencies dtype resourceMode resolvedResourceMode quantizationMode quantizedComponents autoOffload offloadMode + supportedOffloadModes resourcePlan autoFieldOverrides optimizationQualificationForm resourceRetryModes resourceRetryPlans + compatibilityStatus cudaBudgetPolicy enforceCudaBudget`.split(/\s+/u); +const memoryKeys = [ + 'cudaMemoryFreeBytes', + 'cudaMemoryTotalBytes', + 'requestedCudaReserveBytes', + 'requestedCudaBudgetBytes', +]; +const same = (actual, expected, label) => assert.deepEqual(actual, expected, label); +const record = (value) => value && typeof value === 'object' && !Array.isArray(value); +const exactKeys = (value, keys, label) => { + assert.ok(record(value), label); + same(Object.keys(value).sort(), [...keys].sort(), label); +}; +const boundedString = (value) => typeof value === 'string' && value.length > 0 && value.length <= 512; + +// canonicalGraphIdentity intentionally preserves its historical v1/v2 vectors; +// it is not a complete executable-envelope validator. In particular, loops and +// servicePackage affect backend execution outside nodes/paths. Close this +// initial accounting scope before comparing canonical identities, even for an +// unhinted graph. Empty loops match the backend's no-loop behavior. +export function assertCanonicalAccountingGraphEnvelope(apiGraph) { + const keys = new Set(['sid', 'nodes', 'paths', 'runtimeHints', 'loops']); + assert.ok( + record(apiGraph) && Object.keys(apiGraph).every((key) => keys.has(key)), + 'Unsupported canonical graph top-level execution authority.', + ); + assert.ok(boundedString(apiGraph.sid), 'Unsupported canonical graph session identity.'); + if (Object.hasOwn(apiGraph, 'loops')) + same(apiGraph.loops, [], 'Unsupported canonical graph loops; only an absent or empty loop list is accounted.'); +} + +// Preserve the existing importer while the same envelope is reused by image accounting. +export const assertCanonicalDdimGraphEnvelope = assertCanonicalAccountingGraphEnvelope; + +function assertSnapshotOwners(snapshot, apiGraph, expectedBlockCount) { + const owners = []; + const check = (id, data) => { + const node = apiGraph.nodes[id]; + assert.ok(node && data, 'Workflow snapshot owner is missing from execution.'); + assert.equal(data.module, node.module, 'Workflow snapshot module differs.'); + assert.equal(data.action, node.action, 'Workflow snapshot action differs.'); + owners.push(id); + }; + let blockCount = 0; + for (const node of snapshot.nodes) { + const block = node.data?.blockInstanceV2; + if (!block) { + check(node.id, node.data); + continue; + } + assert.ok(expectedBlockCount > 0, 'Block snapshot authority is outside ordinary DDIM scope.'); + assert.equal(node.data.module, 'MoDiff'); + assert.equal(node.data.action, 'BlockV2'); + assert.equal(block.instanceId, node.id, 'Workflow snapshot Block owner differs.'); + assert.ok(Array.isArray(block.effectiveGraph?.nodes), 'Workflow snapshot Block leaves are missing.'); + blockCount += 1; + for (const leaf of block.effectiveGraph.nodes) { + assert.ok( + boundedString(leaf.nodeId) && !leaf.data?.blockInstanceV2, + 'Unexpected nested Block snapshot authority.', + ); + const id = `block-v2-node:${node.id.length}:${node.id}:${leaf.nodeId.length}:${leaf.nodeId}`; + check(id, leaf.data); + } + } + assert.equal(blockCount, expectedBlockCount, 'Reviewed stage owners differ.'); + same(owners.sort(), Object.keys(apiGraph.nodes).sort(), 'Workflow snapshot owner scope differs.'); +} + +/** Closed policy for the existing ordinary five-node resident DDIM path only. + * The caller first validates every consumed field and producer projection. + * Completion is an original native frame, never a replacement GET task body. + */ +export function canonicalDdimRuntimeHintAccounting(args) { + const { plan } = args; + assert.equal(plan.dtype, 'float32', 'Hinted DDIM dtype variants need a separate accounting policy.'); + assert.equal( + plan.modelRepo, + 'google/ddpm-cifar10-32', + 'Hinted DDIM model variants need a separate accounting policy.', + ); + return canonicalRuntimeHintAccounting(args, 'unconditional_image', 'canonical-ddim-runtime-hints-v1'); +} + +// The reviewed PixArt route is a staged Expert graph with transport hints only. +export function canonicalPixArtSigmaPagRuntimeHintAccounting(args) { + return canonicalRuntimeHintAccounting(args, 'text_to_image', 'canonical-pixart-sigma-pag-runtime-hints-v1', 2); +} + +export function directImagePromptRuntimeHintAccounting(args, profile) { + assert.ok( + profile && args.plan.modelType === profile.modelType, + 'Direct image snapshot model is outside reviewed scope.', + ); + const savedGenerateBlock = profile.savedGenerateBlock === true; + const stageName = savedGenerateBlock ? 'Saved direct image' : 'Direct image'; + const expectedBlockCount = savedGenerateBlock ? 2 : 1; + const nodes = args.apiGraph.runtimeHints?.workflowSnapshot?.nodes; + assert.ok(Array.isArray(nodes), `Original ${stageName} workflow snapshot is missing.`); + const blocks = nodes.filter((node) => node.data?.blockInstanceV2); + assert.equal(blocks.length, expectedBlockCount, `${stageName} requires the exact saved stage owners.`); + const members = blocks + .map((node) => { + const leaves = node.data.blockInstanceV2.effectiveGraph?.nodes; + assert.ok(Array.isArray(leaves), `${stageName} stage members are missing.`); + return leaves.map((leaf) => leaf.data?.action).sort(); + }) + .sort((a, b) => b.length - a.length); + same( + members[0], + ['DiffusersExecutionRecipe', 'LoadPipeline', 'PipelineQuantizationConfigV2'], + `${stageName} Model Setup member scope differs.`, + ); + if (savedGenerateBlock) same(members[1], ['Generate'], 'Saved direct image Generate member scope differs.'); + same( + nodes + .filter((node) => !node.data?.blockInstanceV2) + .map((node) => node.data?.action) + .sort(), + savedGenerateBlock ? ['Preview'] : ['Generate', 'Preview'], + `${stageName} ordinary executable node scope differs.`, + ); + return canonicalRuntimeHintAccounting( + args, + 'text_to_image', + 'direct-image-prompt-runtime-hints-v1', + expectedBlockCount, + ); +} + +export function canonicalRetainedUnconditionalRuntimeHintAccounting(args) { + return canonicalRuntimeHintAccounting( + args, + 'unconditional_image', + 'canonical-retained-unconditional-runtime-hints-v1', + 2, + ); +} + +export function canonicalMarigoldPreviewRuntimeHintAccounting(args) { + return canonicalRuntimeHintAccounting(args, 'depth_estimation', 'canonical-marigold-preview-runtime-hints-v1', 2); +} + +function canonicalRuntimeHintAccounting( + { apiGraph, consumed, plan, runtimeEvidence, digest }, + taskMode, + policy, + expectedBlockCount = 0, +) { + const hints = apiGraph.runtimeHints; + assert.ok(record(runtimeEvidence), 'Declared runtime hints require original completion evidence.'); + const { run, output, graphCompleted: completed } = runtimeEvidence; + assert.ok(record(completed), 'Original completion frame is required for declared runtime hints.'); + const task = run?.task; + const managed = Object.hasOwn(hints, 'source'); + assert.ok( + expectedBlockCount === 0 || (!managed && !Object.hasOwn(hints, 'nodeId')), + 'Image accounting requires full-graph transport-only hints.', + ); + const optional = optionalTransportKeys.filter((key) => Object.hasOwn(hints, key)); + const memory = memoryKeys.filter((key) => Object.hasOwn(hints, key)); + exactKeys( + hints, + [...transportKeys, ...optional, ...(managed ? managedKeys : []), ...memory], + 'Unknown or incomplete canonical runtime hints.', + ); + assert.ok(JSON.stringify(hints).length <= 8 * 1024 * 1024, 'Canonical runtime hints exceed their bound.'); + assert.ok(managed || memory.length === 0, 'Transport-only hints cannot declare a CUDA budget.'); + for (const key of ['clientRunId', 'runInputHash', 'workflowTabId']) + assert.ok(boundedString(hints[key]), `Missing runtime correlation ${key}.`); + assert.ok( + Number.isSafeInteger(hints.workflowCanvasEpoch) && hints.workflowCanvasEpoch >= 0, + 'Invalid workflow canvas epoch.', + ); + assert.equal(task?.status, 'completed', 'Canonical hinted task is not completed.'); + assert.equal(task.attempt_index, 0, 'Canonical retries are outside the reviewed scope.'); + assert.ok(task.resourceCandidateId == null, 'Canonical Expert task retains an Auto candidate.'); + assert.ok( + !task.runtimeHints || Object.keys(task.runtimeHints).length === 0, + 'Canonical task contains unreviewed runtime hints.', + ); + assert.equal(output?.attemptIndex, 0, 'Canonical hinted output attempt differs.'); + assert.ok( + boundedString(output?.id) && boundedString(output?.nodeId) && boundedString(output?.fieldKey), + 'Canonical hinted output identity is missing.', + ); + assert.equal(output?.resolvedExecutionInputs?.attemptIndex, 0, 'Canonical hinted accounting attempt differs.'); + same(consumed, output.resolvedExecutionInputs, 'Canonical hinted consumed receipt differs from the original output.'); + assert.equal(output.nodeId, consumed.nodeId, 'Canonical hinted output owner differs from accounting.'); + assert.equal(output.taskId, task.task_id, 'Canonical hinted output belongs to another task.'); + assert.equal( + output.resolvedExecutionInputs.taskId, + task.task_id, + 'Canonical hinted accounting belongs to another task.', + ); + assert.equal(run.workflow_id, hints.workflowTabId, 'Canonical hinted run workflow differs.'); + const persisted = (run.outputs ?? []).filter((row) => row.id === output.id && row.taskId === task.task_id); + assert.equal(persisted.length, 1, 'Canonical hinted output is not unique in the original GET.'); + for (const key of [ + 'taskId', + 'attemptIndex', + 'clientRunId', + 'runInputHash', + 'workflowTabId', + 'formSnapshot', + 'graphSnapshot', + 'apiGraphSnapshot', + 'resolvedExecutionInputs', + 'mediaHash', + 'mediaItems', + 'nodeId', + 'fieldKey', + ]) { + assert.notEqual(output[key], undefined, `Original hinted output ${key} is missing.`); + same(output[key], persisted[0][key], `Original hinted output ${key} differs.`); + } + same(output.apiGraphSnapshot, apiGraph, 'Hinted submitted/output API graph differs.'); + const identityKeys = { + clientRunId: 'client_run_id', + runInputHash: 'run_input_hash', + workflowTabId: 'workflow_tab_id', + workflowCanvasEpoch: 'workflow_canvas_epoch', + }; + assert.ok(task.workflow_form_epoch == null, 'Unexpected raw task form epoch.'); + for (const [hint, wire] of Object.entries(identityKeys)) { + same(task[wire], hints[hint], `Raw task ${wire} differs from submitted hints.`); + same(completed?.[wire], hints[hint], `Completion ${wire} differs from submitted hints.`); + if (hint !== 'workflowCanvasEpoch') same(output[hint], hints[hint], `Output ${hint} differs from submitted hints.`); + } + exactKeys( + completed, + [ + 'type', + 'sid', + 'task_id', + ...Object.values(identityKeys), + ...(Object.hasOwn(hints, 'nodeId') ? ['node_id'] : []), + 'executionTime', + 'runtimeFingerprint', + 'deterministicMode', + 'runtimeHints', + 'runtimeBudget', + 'runtimeMeasurement', + 'runtimePreparation', + 'resourceRetryHistory', + ], + 'Original graph_completed frame shape differs.', + ); + assert.equal(completed.type, 'graph_completed'); + assert.equal(completed.task_id, task.task_id, 'Completion belongs to another task.'); + assert.ok(boundedString(completed.sid), 'Completion session is missing.'); + assert.equal(completed.sid, task.sid, 'Completion/raw task session differs.'); + if (apiGraph.sid !== undefined) assert.equal(completed.sid, apiGraph.sid, 'Submitted/completion session differs.'); + if (output.sid != null) assert.equal(completed.sid, output.sid, 'Output/completion session differs.'); + if (Object.hasOwn(hints, 'nodeId')) { + assert.equal(hints.nodeId, output.nodeId, 'Targeted runtime output owner differs.'); + assert.equal(task.node_id, hints.nodeId, 'Raw task target differs.'); + assert.equal(completed.node_id, hints.nodeId, 'Completion target differs.'); + } else assert.ok(task.node_id == null, 'Unexpected raw task target.'); + same(completed.resourceRetryHistory, [], 'Canonical completion contains retry history.'); + assert.ok( + record(completed.runtimeFingerprint) && record(completed.runtimeFingerprint.backendSource), + 'Structured completion runtime/source is missing.', + ); + same(completed.runtimeFingerprint, task.runtimeFingerprint, 'Completion/raw task runtime or source differs.'); + assert.ok(record(completed.runtimeMeasurement), 'Completion measurement is missing.'); + same(completed.runtimeMeasurement, task.runtimeMeasurement, 'Completion/raw task measurement differs.'); + assert.ok( + Number.isFinite(completed.executionTime) && completed.executionTime > 0, + 'Completion execution duration is missing.', + ); + assert.ok( + Number.isFinite(task.started_at) && Number.isFinite(task.completed_at) && task.completed_at >= task.started_at, + 'Original hinted task duration is missing.', + ); + assert.ok( + completed.executionTime <= task.completed_at - task.started_at + 1, + 'Completion duration exceeds the original task interval.', + ); + // This initial ordinary route does not add a deterministic receipt. A future + // route must join its native settings rather than treating them as transport. + assert.ok( + apiGraph.deterministicMode == null && completed.deterministicMode == null, + 'Hinted deterministic execution needs a separate accounting policy.', + ); + same( + completed.runtimePreparation ?? null, + task.runtimePreparation ?? null, + 'Completion/raw task preparation differs.', + ); + if (completed.runtimePreparation != null) { + assert.ok( + record(completed.runtimePreparation) && completed.runtimePreparation.resourceMode === 'expert', + 'Canonical runtime preparation is outside Expert scope.', + ); + for (const key of ['workflowAuto', 'mutationPreparation', 'policyPreparation']) + assert.ok( + !Object.hasOwn(completed.runtimePreparation, key), + 'Automatic or mutation preparation is outside canonical scope.', + ); + } + const snapshot = hints.workflowSnapshot; + assert.ok( + record(snapshot) && Array.isArray(snapshot.nodes) && Array.isArray(snapshot.edges), + 'Original workflow snapshot is missing.', + ); + assertSnapshotOwners(snapshot, apiGraph, expectedBlockCount); + same(snapshot.studioForm, output.formSnapshot, 'Submitted snapshot/output form differs.'); + assert.equal(output.formSnapshot?.modelType, plan.modelType, 'Original hinted form model differs.'); + assert.equal(output.formSnapshot?.mode, taskMode, 'Original hinted form task differs.'); + for (const key of ['nodes', 'edges', 'viewport']) + same(snapshot[key], output.graphSnapshot?.[key], `Submitted snapshot/output ${key} differs.`); + same(task.workflow_snapshot, snapshot, 'Raw task workflow snapshot differs.'); + same(run.workflow_snapshot, snapshot, 'Raw run workflow snapshot differs.'); + if (Object.hasOwn(hints, 'workflowTitle')) { + assert.ok( + typeof hints.workflowTitle === 'string' && + hints.workflowTitle.length > 0 && + hints.workflowTitle.length <= 256 && + hints.workflowTitle.trim() === hints.workflowTitle, + 'Workflow title would be coerced.', + ); + assert.equal(task.workflow_title, hints.workflowTitle, 'Raw task workflow title differs.'); + assert.equal(run.workflow_title, hints.workflowTitle, 'Raw run workflow title differs.'); + } else { + assert.ok(task.workflow_title == null && run.workflow_title == null, 'Unsubmitted workflow title is present.'); + } + // Check the actual FE correlation algorithm; this 32-bit value is a join, + // never a substitute for the SHA-bound originals and executed field receipt. + const ordered = (value) => + Array.isArray(value) + ? value.map(ordered) + : record(value) + ? Object.fromEntries( + Object.entries(value) + .sort(([a], [b]) => a.localeCompare(b)) + .map(([key, item]) => [key, ordered(item)]), + ) + : value; + const input = JSON.stringify( + ordered({ + form: output.formSnapshot, + nodes: apiGraph.nodes, + paths: apiGraph.paths, + deterministicMode: apiGraph.deterministicMode, + provenance: apiGraph.provenance, + }), + ); + let correlation = 0x811c9dc5; + for (let index = 0; index < input.length; index += 1) + correlation = Math.imul(correlation ^ input.charCodeAt(index), 0x01000193); + assert.equal( + hints.runInputHash, + `run_${(correlation >>> 0).toString(16).padStart(8, '0')}`, + 'Submitted run input hash differs from original form/graph.', + ); + same( + completed.runtimeHints, + { ...hints, controlledArtifacts: [], loaderContract: ['modules.DiffusersImage.LoadPipeline'] }, + 'Actual worker hints differ from the submitted accounting policy.', + ); + let budgetDecision = 'no-cuda-target'; + if (managed) { + const expected = { + source: 'studio', + device: plan.device, + modelType: plan.modelType, + mode: 'unconditional_image', + modelRepo: plan.modelRepo, + resolvedModelRepo: plan.modelRepo, + resolvedArtifact: plan.modelRepo, + modelDependencies: [], + dtype: plan.dtype, + resourceMode: 'expert', + resolvedResourceMode: 'expert', + quantizationMode: 'none', + quantizedComponents: [], + autoOffload: false, + offloadMode: 'none', + supportedOffloadModes: ['none', 'model_cpu'], + autoFieldOverrides: [], + resourceRetryModes: ['model_cpu'], + resourceRetryPlans: [], + compatibilityStatus: 'expert', + cudaBudgetPolicy: 'advisory', + enforceCudaBudget: false, + }; + for (const [key, item] of Object.entries(expected)) + same(hints[key], item, `Managed DDIM hint ${key} differs from executed controls.`); + assert.equal(hints.modelName, 'DDIM CIFAR-10 32x32', 'Managed DDIM profile variant is unsupported.'); + const match = /^cuda:(\d+)$/u.exec(plan.device); + assert.ok( + match && plan.modelRepo === 'google/ddpm-cifar10-32', + 'Managed DDIM device/model variant is unsupported.', + ); + assert.equal(hints.cudaIndex, Number(match[1])); + same( + hints.resourcePlan, + { + summary: `Expert: ${plan.dtype}, none, off`, + executionPath: null, + resolvedModelRepo: plan.modelRepo, + resolvedArtifact: plan.modelRepo, + dtype: plan.dtype, + quantizationMode: 'none', + quantizedComponents: [], + autoOffload: false, + offloadMode: 'none', + }, + 'Managed resource summary contradicts execution.', + ); + same( + hints.optimizationQualificationForm, + output.formSnapshot, + 'Optimization observation form differs from original output.', + ); + for (const [key, item] of Object.entries({ + modelType: plan.modelType, + mode: 'unconditional_image', + resourceMode: 'expert', + dtype: plan.dtype, + device: plan.device, + quantizationMode: 'none', + offloadMode: 'none', + autoOffload: false, + })) + same(output.formSnapshot[key], item, `Managed observation form ${key} differs.`); + // These counters remain advisory. When present, require the exact FE + // arithmetic and the actual successful server reset branch, not fraction1 + // alone (the failure branch also reports fraction1). + if (memory.length) { + assert.ok( + Object.hasOwn(hints, 'cudaMemoryTotalBytes') && + Object.hasOwn(hints, 'requestedCudaReserveBytes') && + Object.hasOwn(hints, 'requestedCudaBudgetBytes'), + 'Incomplete advisory memory counters.', + ); + for (const key of memory) + assert.ok(Number.isSafeInteger(hints[key]) && hints[key] >= 0, `Invalid advisory byte counter ${key}.`); + const total = hints.cudaMemoryTotalBytes; + const free = hints.cudaMemoryFreeBytes; + assert.ok(total > 0 && (free === undefined || free <= total), 'Invalid advisory memory total.'); + const reserve = Math.max(1024 ** 3, Math.floor(total * 0.1)); + const fromFree = free && reserve ? Math.max(0, free - reserve) : undefined; + const fromTotal = Math.max(0, total - reserve); + const budget = fromFree && fromTotal ? Math.min(fromFree, fromTotal) : (fromFree ?? fromTotal); + assert.equal(hints.requestedCudaReserveBytes, reserve); + assert.equal(hints.requestedCudaBudgetBytes, budget); + } + same( + completed.runtimeBudget, + { + applied: false, + reason: 'CUDA budget is advisory; reset PyTorch process memory fraction to full device.', + cuda_index: hints.cudaIndex, + cuda_budget_policy: 'advisory', + fraction: 1, + model_repo: hints.modelRepo, + model_name: hints.modelName, + execution_path: null, + offload_mode: 'none', + }, + 'Actual advisory CUDA budget reset is unproved or differs.', + ); + budgetDecision = 'advisory-reset-recorded'; + } else + same( + completed.runtimeBudget, + { applied: false, reason: 'Runtime hints did not target a CUDA device.' }, + 'Transport-only budget decision differs.', + ); + return { + policy, + route: managed ? 'studio-expert' : 'correlation-only', + budgetDecision, + submittedHintsHash: digest('canonical-runtime-hints-v1', hints), + graphCompletedHash: digest('canonical-graph-completed-v1', completed), + }; +} diff --git a/scripts/canonical-runtime-hints.test.mjs b/scripts/canonical-runtime-hints.test.mjs new file mode 100644 index 00000000..32f53ad5 --- /dev/null +++ b/scripts/canonical-runtime-hints.test.mjs @@ -0,0 +1,268 @@ +import assert from 'node:assert/strict'; +import { test } from 'node:test'; +import { canonicalHookCase, hintedCanonicalHookCase } from './canonical-provenance-fixtures.mjs'; +import { canonicalAccountingExecutionPlan, createRunProvenance } from './live-proof-provenance.mjs'; + +const accounting = (value, consumed = value.executedOutput.resolvedExecutionInputs) => + canonicalAccountingExecutionPlan({ + apiGraph: value.apiGraph, + expectedApiGraph: value.canonicalAccountingProof.expectedApiGraph, + consumed, + target: value.canonicalAccountingProof.target, + runtimeEvidence: { + run: value.canonicalAccountingProof.run, + output: value.executedOutput, + graphCompleted: value.canonicalAccountingProof.graphCompleted, + }, + }); + +test('DDIM accounting accepts the inactive empty profile selector and rejects stage grants or a consumed claim', async () => { + const value = await canonicalHookCase(); + const loader = value.executedOutput.resolvedExecutionInputs.nodes.find((row) => row.action === 'LoadPipeline'); + assert.equal(loader.fieldAccounting.fields.execution_profile_id.disposition, 'inactive'); + assert.doesNotThrow(() => accounting(value)); + const consumed = structuredClone(value.executedOutput.resolvedExecutionInputs); + const field = consumed.nodes.find((row) => row.action === 'LoadPipeline').fieldAccounting.fields.execution_profile_id; + field.disposition = 'consumed'; + delete field.reason; + assert.throws(() => accounting(value, consumed), /Wrong disposition/); + field.disposition = 'inactive'; + field.reason = 'adapter-inactive'; + field.value = 'unreviewed-stage-profile'; + assert.throws(() => accounting(value, consumed)); +}); + +test('real FE managed DDIM producer hints are accounted with original completion and GET authority', async () => { + const value = await hintedCanonicalHookCase(); + const before = JSON.stringify(value); + assert.equal(value.apiGraph.runtimeHints.source, 'studio'); + assert.deepEqual(value.apiGraph.runtimeHints.resourceRetryPlans, []); + assert.equal(value.executionReceipt.runtimeHints, undefined, 'GET does not expose runtimeHints'); + const result = accounting(value); + assert.equal(result.plan.device, 'cuda:0'); + assert.equal(result.plan.runtimeHintAccounting.policy, 'canonical-ddim-runtime-hints-v1'); + assert.equal(result.plan.runtimeHintAccounting.budgetDecision, 'advisory-reset-recorded'); + const provenance = createRunProvenance(value); + assert.equal(provenance.graph.executionPlanHash, result.hash); + assert.equal(JSON.stringify(value), before, 'original packages and receipts stay untouched'); +}); + +test('real FE correlation-only DDIM producer retains its exact no-CUDA budget decision', async () => { + const value = await hintedCanonicalHookCase({ managed: false, targetNode: true }); + assert.equal(accounting(value).plan.runtimeHintAccounting.budgetDecision, 'no-cuda-target'); + assert.doesNotThrow(() => createRunProvenance(value)); +}); + +test('actual managed producer without advisory counters retains the same strict execution and completion joins', async () => { + const value = await hintedCanonicalHookCase({ memory: false }); + assert.equal(value.apiGraph.runtimeHints.cudaMemoryTotalBytes, undefined); + assert.doesNotThrow(() => createRunProvenance(value)); +}); + +test('the ordinary DDIM accounting envelope rejects loops and unsupported top-level execution authority', async () => { + const original = await hintedCanonicalHookCase(); + const authorities = { + loops: [{ id: 'unreviewed-loop', bodyNodeIds: ['node-05'], resultNodeId: 'node-05', iterations: 2, maxRetries: 1 }], + servicePackage: { package: {}, values: {} }, + executionPurpose: { kind: 'preview' }, + workflowAutoPlan: { schemaVersion: 1, graphHash: 'unreviewed' }, + deterministicMode: { enabled: false, strict: false }, + provenance: { source: 'unreviewed-scope' }, + futureExecutionAuthority: {}, + }; + for (const [key, authority] of Object.entries(authorities)) { + const value = structuredClone(original); + value.apiGraph[key] = authority; + assert.equal(value.apiGraph, value.executedOutput.apiGraphSnapshot); + assert.equal(value.apiGraph, value.canonicalAccountingProof.run.outputs[0].apiGraphSnapshot); + const accepted = []; + for (const [route, validate] of [ + ['accounting', accounting], + ['factory', createRunProvenance], + ]) { + try { + validate(value); + accepted.push(route); + } catch (error) { + assert.match(error.message, /Unsupported canonical graph/); + } + } + assert.deepEqual(accepted, [], `${key} must not survive either graph/output join`); + } + const unhinted = canonicalHookCase(); + unhinted.apiGraph.loops = authorities.loops; + assert.throws(() => accounting(unhinted), /Unsupported canonical graph/); + assert.throws(() => createRunProvenance(unhinted), /Unsupported canonical graph/); + const unsupportedSource = structuredClone(original); + unsupportedSource.canonicalAccountingProof.expectedApiGraph.loops = authorities.loops; + assert.throws(() => accounting(unsupportedSource), /Unsupported canonical graph/); + assert.throws(() => createRunProvenance(unsupportedSource), /Unsupported canonical graph/); +}); + +test('the DDIM envelope permits only absent or explicitly empty loops without changing legacy proof bytes', async () => { + for (const value of [canonicalHookCase(), await hintedCanonicalHookCase()]) { + const before = createRunProvenance(value); + value.apiGraph.loops = []; + assert.deepEqual(createRunProvenance(value), before); + for (const malformed of [null, {}, '', false]) { + value.apiGraph.loops = malformed; + assert.throws(() => accounting(value), /Unsupported canonical graph/); + assert.throws(() => createRunProvenance(value), /Unsupported canonical graph/); + } + } +}); + +test('hinted canonical accounting and the shared factory fail closed on unsupported authority and broken joins', async () => { + const original = await hintedCanonicalHookCase(); + const frame = (value) => value.canonicalAccountingProof.graphCompleted; + const hints = (value) => value.apiGraph.runtimeHints; + const bothHints = (value, key, item) => { + hints(value)[key] = item; + frame(value).runtimeHints[key] = structuredClone(item); + }; + const changes = { + 'missing original completion': (value) => { + delete value.canonicalAccountingProof.graphCompleted; + }, + 'unknown submitted authority even if echoed': (value) => { + bothHints(value, 'futureAuthority', true); + }, + 'unknown workflow form epoch': (value) => { + bothHints(value, 'workflowFormEpoch', 7); + }, + 'execution purpose': (value) => { + bothHints(value, 'executionPurpose', { kind: 'preview' }); + }, + Auto: (value) => { + bothHints(value, 'resourceMode', 'auto'); + }, + 'Auto candidate': (value) => { + bothHints(value, 'autoResourceCandidateId', 'invented'); + }, + 'Auto task': (value) => { + value.executionReceipt.resourceCandidateId = 'invented'; + }, + 'invented GET hints': (value) => { + value.executionReceipt.runtimeHints = structuredClone(hints(value)); + }, + 'worker changed dtype': (value) => { + frame(value).runtimeHints.dtype = 'float16'; + }, + 'offload variant': (value) => { + bothHints(value, 'offloadMode', 'model_cpu'); + }, + 'quantization variant': (value) => { + bothHints(value, 'quantizationMode', 'fp8'); + }, + 'model dependency variant': (value) => { + bothHints(value, 'modelDependencies', [ + { id: 'other', repo: 'other/model', revision: 'a'.repeat(40), kind: 'vae' }, + ]); + }, + 'retry plan': (value) => { + bothHints(value, 'resourceRetryPlans', [{ offloadMode: 'model_cpu' }]); + }, + 'retry state': (value) => { + frame(value).runtimeHints.resourceRetryAttempt = 0; + }, + 'retry history': (value) => { + frame(value).resourceRetryHistory.push({ attempt: 1 }); + }, + 'raw task attempt': (value) => { + value.executionReceipt.attempt_index = 1; + }, + 'output attempt': (value) => { + value.executedOutput.attemptIndex = 1; + }, + 'accounting attempt': (value) => { + value.executedOutput.resolvedExecutionInputs.attemptIndex = 1; + }, + 'completion task': (value) => { + frame(value).task_id = 'another-task'; + }, + 'completion session': (value) => { + frame(value).sid = 'another-session'; + }, + 'completion client run': (value) => { + frame(value).client_run_id = 'another-run'; + }, + 'completion run input hash': (value) => { + frame(value).run_input_hash = 'run_other'; + }, + 'completion workflow': (value) => { + frame(value).workflow_tab_id = 'another-workflow'; + }, + 'completion epoch': (value) => { + frame(value).workflow_canvas_epoch += 1; + }, + 'unexpected raw task form epoch': (value) => { + value.executionReceipt.workflow_form_epoch = 7; + }, + 'persisted output attempt': (value) => { + value.canonicalAccountingProof.run.outputs[0] = { ...value.executedOutput, attemptIndex: 1 }; + }, + 'missing original output media hash': (value) => { + delete value.executedOutput.mediaHash; + }, + 'output owner differs from accounted Preview': (value) => { + value.executedOutput.nodeId = 'node-04'; + }, + 'fraction alone after failed reset': (value) => { + frame(value).runtimeBudget.reason = + 'CUDA budget is advisory; could not reset PyTorch process memory fraction: synthetic failure'; + }, + 'enforced budget': (value) => { + bothHints(value, 'cudaBudgetPolicy', 'enforced'); + }, + 'budget decision device': (value) => { + frame(value).runtimeBudget.cuda_index = 1; + }, + 'advisory counters arithmetic': (value) => { + bothHints(value, 'requestedCudaBudgetBytes', 1); + }, + 'runtime source identity': (value) => { + frame(value).runtimeFingerprint = structuredClone(frame(value).runtimeFingerprint); + frame(value).runtimeFingerprint.backendSource.gitCommit = 'd'.repeat(40); + }, + 'runtime measurement': (value) => { + frame(value).runtimeMeasurement = { ...frame(value).runtimeMeasurement, processRssBytes: 8192 }; + }, + 'controlled artifact': (value) => { + frame(value).runtimeHints.controlledArtifacts.push({ repo: 'other/model' }); + }, + 'loader contract': (value) => { + frame(value).runtimeHints.loaderContract = ['modules.Other.Loader']; + }, + 'resource summary': (value) => { + bothHints(value, 'resourcePlan', { ...hints(value).resourcePlan, offloadMode: 'model_cpu' }); + }, + 'observation form': (value) => { + bothHints(value, 'optimizationQualificationForm', { + ...value.executedOutput.formSnapshot, + mode: 'text_to_image', + }); + }, + 'workflow title coercion': (value) => { + bothHints(value, 'workflowTitle', ' Protocol DDIM '); + value.executionReceipt.workflow_title = value.canonicalAccountingProof.run.workflow_title = ' Protocol DDIM '; + }, + 'preparation Auto route': (value) => { + value.executionReceipt.runtimePreparation = frame(value).runtimePreparation = { + resourceMode: 'expert', + workflowAuto: {}, + }; + }, + 'extra completion attempt': (value) => { + frame(value).attempt_index = 0; + }, + }; + for (const [label, change] of Object.entries(changes)) { + const value = structuredClone(original); + change(value); + assert.throws(() => accounting(value), undefined, `${label}: independent accounting`); + assert.throws(() => createRunProvenance(value), undefined, `${label}: shared factory`); + } + const unrelated = structuredClone(original.executedOutput.resolvedExecutionInputs); + unrelated.taskId = 'another-task'; + assert.throws(() => accounting(original, unrelated), /consumed receipt differs/); +}); diff --git a/scripts/canonical-workflow-execution.mjs b/scripts/canonical-workflow-execution.mjs new file mode 100644 index 00000000..13bccd44 --- /dev/null +++ b/scripts/canonical-workflow-execution.mjs @@ -0,0 +1,33 @@ +/** Use Run's shared Block compiler, including effective-graph and boundary + * validation. Persisted graph bytes remain the canonical identity authority. */ +export async function loadCanonicalWorkflowExpander(moduleServer) { + const { expandBlockGraphV2ForExecution } = await moduleServer.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); + return (graph) => expandBlockGraphV2ForExecution(graph.nodes ?? [], graph.edges ?? []); +} + +export function canonicalExecutableWorkflowGraph(graph, expandBlocks) { + if (typeof expandBlocks !== 'function') throw new Error('Canonical export requires the shared Block compiler.'); + const snapshot = structuredClone(graph); + const executable = expandBlocks(snapshot); + const containers = new Set(executable.nodes.filter((node) => node.data.type === 'group').map((node) => node.id)); + for (const node of executable.nodes) { + if (containers.has(node.id) && node.data.uiState?.disabled) + throw new Error('Canonical export cannot flatten a disabled container.'); + } + if (executable.edges.some((edge) => containers.has(edge.source) || containers.has(edge.target))) + throw new Error('Canonical export contains an unresolved container boundary.'); + executable.nodes = executable.nodes.filter((node) => !containers.has(node.id)); + // These are compilation receipts for the removed canvas owner, not backend + // controls. A portable leaf graph must not claim a now-absent Block root. + for (const node of executable.nodes) { + if (containers.has(node.parentId)) delete node.parentId; + for (const key of Object.keys(node.data)) if (key.startsWith('blockProjection')) delete node.data[key]; + for (const field of Object.values(node.data.params ?? {})) { + if (field.fieldOptions) delete field.fieldOptions.blockBindingV2; + } + } + for (const edge of executable.edges) { + for (const key of Object.keys(edge.data ?? {})) if (key.startsWith('blockProjection')) delete edge.data[key]; + } + return { ...snapshot, ...executable }; +} diff --git a/scripts/canonical-workflow-execution.test.mjs b/scripts/canonical-workflow-execution.test.mjs new file mode 100644 index 00000000..1aef4c46 --- /dev/null +++ b/scripts/canonical-workflow-execution.test.mjs @@ -0,0 +1,107 @@ +import assert from 'node:assert/strict'; +import { test } from 'node:test'; +import { verifyNoDeadWorkflowNodes } from './workflow-library-dead-nodes.mjs'; +import { canonicalExecutableWorkflowGraph } from './canonical-workflow-execution.mjs'; + +test('a separately saved shot is a real output terminal, while disconnected or disabled branches remain invalid', () => { + const graph = { + nodes: [ + { id: 'generate', data: { module: 'modules.DiffusersVideo', action: 'Denoise' } }, + { id: 'save', data: { module: 'modules.Video', action: 'ExportAsset' } }, + { id: 'deliver', data: { module: 'modules.Video', action: 'Export' } }, + ], + edges: [ + { source: 'generate', target: 'save' }, + { source: 'generate', target: 'deliver' }, + ], + }; + verifyNoDeadWorkflowNodes({ id: 'saved-shots' }, graph); + const wrong = structuredClone(graph); + wrong.nodes[1].data.action = 'UnknownSideEffect'; + assert.throws(() => verifyNoDeadWorkflowNodes({ id: 'wrong' }, wrong), /outside every output/); + const disabled = structuredClone(graph); + disabled.nodes[1].data.uiState = { disabled: true }; + assert.throws(() => verifyNoDeadWorkflowNodes({ id: 'disabled' }, disabled), /disabled/); + assert.throws( + () => verifyNoDeadWorkflowNodes({ id: 'detached' }, { ...graph, edges: graph.edges.slice(1) }), + /isolated/, + ); +}); + +test('retained clip assembly is a real final output without permitting unknown or detached terminals', () => { + const graph = { + nodes: [ + { id: 'save-1', data: { module: 'modules.Video', action: 'ExportAsset' } }, + { id: 'save-2', data: { module: 'modules.Video', action: 'ExportAsset' } }, + { id: 'ordered', data: { module: 'modules.Primitive', action: 'ToList' } }, + { id: 'assemble', data: { module: 'modules.Video', action: 'ConcatenateAssets' } }, + ], + edges: [ + { source: 'save-1', target: 'ordered' }, + { source: 'save-2', target: 'ordered' }, + { source: 'ordered', target: 'assemble' }, + ], + }; + const before = structuredClone(graph); + assert.doesNotThrow(() => verifyNoDeadWorkflowNodes({ id: 'retained-six-shot-assembly' }, graph)); + assert.deepEqual(graph, before); + const unknown = structuredClone(graph); + unknown.nodes[3].data.action = 'UnknownConcatenate'; + assert.throws(() => verifyNoDeadWorkflowNodes({ id: 'unknown-terminal' }, unknown), /outside every output/); + const disabled = structuredClone(graph); + disabled.nodes[3].data.uiState = { disabled: true }; + assert.throws(() => verifyNoDeadWorkflowNodes({ id: 'disabled-assembly' }, disabled), /disabled/); + assert.throws( + () => verifyNoDeadWorkflowNodes({ id: 'detached-assembly' }, { ...graph, edges: graph.edges.slice(0, 2) }), + /isolated/, + ); +}); + +test('an explicit image save keeps its compositing branch reachable alongside a raw preview', () => { + const graph = { + nodes: [ + { id: 'generate', data: { module: 'modules.DiffusersImage', action: 'Generate' } }, + { id: 'preview', data: { module: 'modules.Image', action: 'Preview' } }, + { id: 'composite', data: { module: 'modules.ImageOperations', action: 'MaskComposite' } }, + { id: 'save', data: { module: 'modules.Image', action: 'Save' } }, + ], + edges: [ + { source: 'generate', target: 'preview' }, + { source: 'generate', target: 'composite' }, + { source: 'composite', target: 'save' }, + ], + }; + assert.doesNotThrow(() => verifyNoDeadWorkflowNodes({ id: 'protected-image-delivery' }, graph)); + const unknown = structuredClone(graph); + unknown.nodes[3].data.module = 'modules.Unreviewed'; + assert.throws(() => verifyNoDeadWorkflowNodes({ id: 'unreviewed-save' }, unknown), /outside every output/); + const disabled = structuredClone(graph); + disabled.nodes[3].data.uiState = { disabled: true }; + assert.throws(() => verifyNoDeadWorkflowNodes({ id: 'disabled-save' }, disabled), /disabled/); +}); + +test('canonical leaf publication rejects disabled or unresolved container boundaries and preserves ordinary loops', () => { + const group = { id: 'group', data: { type: 'group', uiState: { disabled: true } } }; + const loop = { id: 'loop', data: { type: 'loop' } }; + const leaf = { id: 'leaf', parentId: 'group', data: { type: 'custom', params: {} } }; + const identity = (g) => g; + assert.throws(() => canonicalExecutableWorkflowGraph({ nodes: [group, leaf], edges: [] }, identity), /disabled/); + delete group.data.uiState; + assert.throws( + () => + canonicalExecutableWorkflowGraph( + { nodes: [group, leaf], edges: [{ source: 'group', target: 'leaf' }] }, + identity, + ), + /unresolved/, + ); + const graph = { nodes: [group, loop, leaf], edges: [] }; + const before = structuredClone(graph); + const flat = canonicalExecutableWorkflowGraph(graph, identity); + assert.deepEqual( + flat.nodes.map((n) => n.id), + ['loop', 'leaf'], + ); + assert.equal(flat.nodes[1].parentId, undefined); + assert.deepEqual(graph, before); +}); diff --git a/scripts/compatibility-panel.test.mjs b/scripts/compatibility-panel.test.mjs new file mode 100644 index 00000000..5e1a09f1 --- /dev/null +++ b/scripts/compatibility-panel.test.mjs @@ -0,0 +1,73 @@ +import assert from 'node:assert/strict'; +import { after, before, test } from 'node:test'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import React from 'react'; +import { renderToStaticMarkup } from 'react-dom/server'; +import { createServer } from 'vite'; + +const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); +let server; +let Panel; +let studio; + +before(async () => { + globalThis.window = { location: { origin: 'http://127.0.0.1:5191' } }; + server = await createServer({ + root: ROOT, + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + Panel = (await server.ssrLoadModule('/src/components/CompatibilityPanel.tsx')).default; + studio = (await server.ssrLoadModule('/src/stores/useStudioStore.ts')).useStudioStore; + // SSR uses the store's initial snapshot. Render the explicitly configured + // fixture rather than hydration defaults; no browser/application store is changed. +}); +after(async () => { + await server?.close(); +}); + +const binding = { + mode: 'text_to_image', + modelType: 'ZImageModularPipeline', + nodes: {}, + managedNodeIds: [], + managedEdgeIds: [], + fingerprint: 'managed-resource-fixture', + createdAt: 1, + updatedAt: 1, + controlled: { contractIds: ['lora.diffusers-image.v1'] }, +}; + +for (const selected of [false, true]) { + test(`managed resources include a whole-workflow check with selected model ${selected}`, () => { + const candidate = { id: 'primary-recipe', modelRepo: 'test/model', proof: { status: 'live_proven' } }; + Object.assign(studio.getInitialState(), { + graphBinding: binding, + autoResourcePlan: selected + ? { + schemaVersion: 1, + candidates: [candidate], + selectedCandidate: candidate, + } + : null, + }); + const markup = renderToStaticMarkup(React.createElement(Panel)); + assert.equal(markup.includes('data-testid="workflow-resource-assessment"'), true); + assert.equal(markup.includes('data-testid="plan-workflow-auto"'), true); + assert.equal(markup.includes('Whole workflow'), true); + if (selected) { + assert.equal(markup.includes('Base recipe ran here'), true); + assert.equal(markup.includes('test/model'), true); + } + }); +} + +test('ordinary resources retain exactly one whole-workflow assessment', () => { + Object.assign(studio.getInitialState(), { graphBinding: null, autoResourcePlan: null }); + const markup = renderToStaticMarkup(React.createElement(Panel)); + assert.equal((markup.match(/data-testid="workflow-resource-assessment"/g) ?? []).length, 1); +}); diff --git a/scripts/conditional-input-requirements.test.mjs b/scripts/conditional-input-requirements.test.mjs new file mode 100644 index 00000000..33ded721 --- /dev/null +++ b/scripts/conditional-input-requirements.test.mjs @@ -0,0 +1,224 @@ +import assert from 'node:assert/strict'; +import { after, before, test } from 'node:test'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { readFileSync } from 'node:fs'; +import { createServer } from 'vite'; + +let server, fixer, readiness; +before(async () => { + server = await createServer({ + root: path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'), + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + fixer = await server.ssrLoadModule('/src/studio/graphFixer.ts'); + readiness = await server.ssrLoadModule('/src/studio/requiredGraphInputs.ts'); +}); +after(async () => { + await server?.close(); +}); + +function fixture(kind = 'image') { + const metadata = JSON.parse( + readFileSync(new URL('./fixtures/reference-input-requirements.json', import.meta.url), 'utf8'), + ); + const params = { + references_in: { display: 'input', type: 'ordered_media', required: false }, + reference_kind: { type: 'string', default: 'image', options: ['image', 'video', 'audio'] }, + references: { display: 'output', type: 'ordered_media' }, + }; + for (const type of ['image', 'video', 'audio']) + params[type] = { + display: 'input', + type, + ...metadata[type], + }; + const definition = { + type: 'custom', + module: 'modules.Test', + action: 'Assemble', + label: 'Ordered reference', + skipParamsCheck: true, + params, + }; + const helper = { id: 'ref', type: 'custom', position: { x: 0, y: 0 }, data: structuredClone(definition) }; + // The user's saved helper predates the registry correction. Inspection must + // use live requiredness without migrating the saved body or trusting this flag. + helper.data.skipParamsCheck = false; + for (const param of Object.values(helper.data.params)) { + delete param.required; + delete param.requiredWhen; + } + helper.data.params.reference_kind.value = kind; + const sink = { + id: 'out', + type: 'custom', + position: { x: 400, y: 0 }, + data: { + type: 'custom', + module: 'modules.Test', + action: 'Preview', + label: 'Preview', + params: { references: { display: 'input', type: 'ordered_media' } }, + }, + }; + const registry = { 'modules.Test.Assemble': definition }; + for (const type of ['image', 'video', 'audio']) + registry[`modules.Test.Load${type}`] = { + type: 'custom', + module: 'modules.Test', + action: `Load${type}`, + label: `Load ${type}`, + params: { value: { display: 'output', type } }, + }; + return { + nodes: [helper, sink], + edges: [{ id: 'result', source: 'ref', sourceHandle: 'references', target: 'out', targetHandle: 'references' }], + registry, + }; +} + +for (const kind of ['image', 'video', 'audio']) + test(`${kind} mode requires only the selected medium in saved graphs`, () => { + const context = fixture(kind); + const before = JSON.stringify(context.nodes); + const missing = fixer.buildGraphFixPlan(context).issues.filter((i) => i.kind === 'missing_input'); + assert.deepEqual( + missing.map((i) => i.targetHandle), + [kind], + ); + const required = readiness.inspectRequiredGraphInputs(context.nodes, context, context.registry); + assert.deepEqual( + required.map((i) => i.fieldId), + [kind], + ); + assert.equal(JSON.stringify(context.nodes), before, 'inspection must not migrate saved values/metadata'); + const source = { + id: 'media', + type: 'custom', + position: { x: -300, y: 0 }, + data: { + type: 'custom', + module: 'modules.Test', + action: 'Load', + label: 'Load media', + params: { value: { type: kind, display: 'output' } }, + }, + }; + context.nodes.push(source); + context.edges.push({ id: 'media', source: 'media', sourceHandle: 'value', target: 'ref', targetHandle: kind }); + assert.deepEqual(fixer.buildGraphFixPlan(context).issues, []); + assert.deepEqual(readiness.inspectRequiredGraphInputs(context.nodes, context, context.registry), []); + assert(!context.edges.some((e) => e.targetHandle === 'references_in'), 'first item needs no prior list'); + }); + +test('changing mode recomputes requirements without erasing existing wires or assuming a connected selector', () => { + const context = fixture('image'); + context.nodes[0].data.params.reference_kind.value = 'video'; + assert.deepEqual( + readiness.inspectRequiredGraphInputs(context.nodes, context, context.registry).map((i) => i.fieldId), + ['video'], + ); + context.nodes[0].data.params.reference_kind.isConnected = true; + assert.deepEqual(readiness.inspectRequiredGraphInputs(context.nodes, context, context.registry), []); + assert.deepEqual(fixer.buildGraphFixPlan(context).issues, []); +}); + +test('malformed conditional metadata does not suppress an unconditional required input', () => { + const context = fixture('image'); + context.registry['modules.Test.Assemble'].params.video.required = true; + context.registry['modules.Test.Assemble'].params.video.requiredWhen = { field: 99, equals: 'image' }; + assert.deepEqual( + readiness.inspectRequiredGraphInputs(context.nodes, context, context.registry).map((i) => i.fieldId), + ['image', 'video'], + ); +}); + +test('fresh optional-reference metadata still requires the selected medium despite skipParamsCheck', () => { + const context = fixture('image'); + context.nodes[0].data = structuredClone(context.registry['modules.Test.Assemble']); + assert.equal(context.nodes[0].data.skipParamsCheck, true); + assert.deepEqual( + fixer.buildGraphFixPlan(context).issues.map((i) => i.targetHandle), + ['image'], + ); + context.nodes[0].data.params.reference_kind.value = 'audio'; + assert.deepEqual( + readiness.inspectRequiredGraphInputs(context.nodes, context, context.registry).map((i) => i.fieldId), + ['audio'], + ); +}); + +test('a live schema without requiredness retains a saved explicit optional declaration', () => { + const context = fixture('image'); + context.nodes[0].data.params.audio.required = false; + delete context.registry['modules.Test.Assemble'].params.audio.required; + delete context.registry['modules.Test.Assemble'].params.audio.requiredWhen; + assert.deepEqual( + fixer.buildGraphFixPlan(context).issues.map((i) => i.targetHandle), + ['image'], + ); +}); + +test('a live schema without requiredness retains a saved explicit required declaration on a dynamic node', () => { + const context = fixture('image'); + context.nodes[0].data.skipParamsCheck = true; + context.nodes[0].data.params.video.required = true; + delete context.registry['modules.Test.Assemble'].params.video.required; + delete context.registry['modules.Test.Assemble'].params.video.requiredWhen; + assert.deepEqual( + fixer.buildGraphFixPlan(context).issues.map((i) => i.targetHandle), + ['image', 'video'], + ); +}); + +for (const medium of ['image', 'video', 'audio']) + test(`required ${medium} file editors block empty saved inputs without inventing a connection repair`, () => { + const definition = { + type: 'custom', + module: 'modules.Test', + action: 'LoadFile', + label: `Load ${medium}`, + params: { + file: { display: 'filebrowser', type: 'str', required: true }, + result: { display: 'output', type: medium }, + }, + }; + const node = { id: 'load', type: 'custom', position: { x: 0, y: 0 }, data: structuredClone(definition) }; + delete node.data.params.file.required; // old saved metadata must use the current declaration + const graph = { nodes: [node], edges: [] }, + registry = { 'modules.Test.LoadFile': definition }; + for (const value of [undefined, '', ' ', [], [''], ['a.png', ' '], false, 42, {}]) { + node.data.params.file.value = value; + const before = JSON.stringify(node); + const issues = readiness.inspectRequiredGraphInputs(graph.nodes, graph, registry); + assert.deepEqual( + issues.map((i) => i.fieldId), + ['file'], + ); + assert.match(issues[0].details, /Select/); + assert.equal(JSON.stringify(node), before); + } + for (const value of ['@data/inputs/source.png', ['a.png', 'b.png']]) { + node.data.params.file.value = value; + assert.deepEqual(readiness.inspectRequiredGraphInputs(graph.nodes, graph, registry), []); + } + node.data.params.file.value = ''; + definition.params.file.required = false; + assert.deepEqual(readiness.inspectRequiredGraphInputs(graph.nodes, graph, registry), []); + delete definition.params.file.required; + assert.deepEqual( + readiness.inspectRequiredGraphInputs(graph.nodes, graph, registry).map((i) => i.fieldId), + ['file'], + ); + definition.skipParamsCheck = true; + assert.deepEqual(readiness.inspectRequiredGraphInputs(graph.nodes, graph, registry), []); + definition.skipParamsCheck = false; + definition.params.file.required = true; + node.data.uiState = { disabled: true }; + assert.deepEqual(readiness.inspectRequiredGraphInputs(graph.nodes, graph, registry), []); + }); diff --git a/scripts/control-inpaint-evidence.mjs b/scripts/control-inpaint-evidence.mjs new file mode 100644 index 00000000..c3a3ca40 --- /dev/null +++ b/scripts/control-inpaint-evidence.mjs @@ -0,0 +1,359 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { readFileSync, realpathSync } from 'node:fs'; +import { dirname } from 'node:path'; +import { + backendContractIdentity, + backendSourceEvidence, + canonicalGraphIdentity, + normalizeBackendRuntime, + selectBackendRuntimeFingerprintEvidence, + selectInstalledModelIdentity, +} from './live-proof-provenance.mjs'; +import { verifyNativeCanny, verifyNativeLoadedImage } from './native-image-load-evidence.mjs'; +import { verifyRetainedPngUpload } from './private-image-edit-evidence.mjs'; +import { + validateNativeVariantOutput, + validateNativeVariantRun, + validateUnmodifiedExpertPreparation, +} from './native-variant-run-evidence.mjs'; +import { + canonicalWorkflowAuthoringContract, + exportCanonicalWorkflowGraphs, + readCanonicalEvidenceFile, +} from './release-contract-core.mjs'; +import { decodedMediaHash, technicalMediaErrors } from './template-gallery-harness.mjs'; + +const workflowId = 'StableDiffusionXLControlNetPipeline:control_inpaint'; +const pipelineClass = 'StableDiffusionXLControlNetInpaintPipeline'; +const format = 'modiff.private.native-control-inpaint.v1'; +const roles = ['guide', 'mask', 'source']; +const chain = [ + 'modules.Image.Load', + 'modules.ImageFilters.Canny', + 'modules.DiffusersRuntime.PipelineQuantizationConfigV2', + 'modules.DiffusersRuntime.DiffusersExecutionRecipe', + 'modules.DiffusersImage.LoadPipeline', + 'modules.Image.Load', + 'modules.Image.Load', + 'modules.DiffusersImage.ControlInpaint', + 'modules.Image.Preview', +]; +const sha256 = (bytes) => createHash('sha256').update(bytes).digest('hex'); +const literal = (value) => ({ value, source: 'literal' }); + +export function verifyConditioningModels({ + loader, + target, + pipelineClass, + componentClass, + conditioningKind = 'controlnet', + componentParameter = 'controlnet', + completed, + hints, + runtime, + observations, +}) { + const base = { repoId: loader.model_id.value.value, revision: loader.revision.value }; + const control = { repoId: loader.conditioning_model_id.value.value, revision: loader.conditioning_revision.value }; + assert.equal(loader.pipeline_class.value, pipelineClass); + assert.equal(loader.conditioning_kind.value, conditioningKind); + assert.equal(loader.model_id.value.source, 'hub'); + assert.equal(loader.conditioning_model_id.value.source, 'hub'); + assert.equal(target.modelSet.length, 2); + assert.ok(target.modelSet.some(({ repoId, revision }) => repoId === base.repoId && revision === base.revision)); + assert.ok(target.modelSet.some(({ repoId, revision }) => repoId === control.repoId && revision === control.revision)); + assert.notEqual(base.repoId, control.repoId); + const { controlledArtifacts, loaderContract, ...completionHints } = completed.runtimeHints; + assert.deepEqual(completionHints, hints); + assert.deepEqual(loaderContract, ['modules.DiffusersImage.LoadPipeline']); + assert.equal(controlledArtifacts.length, 1); + const [conditioning] = controlledArtifacts; + assert.equal(conditioning.schemaVersion, 1); + assert.equal(conditioning.kind, 'diffusers_conditioning_component'); + assert.equal(conditioning.module, 'modules.DiffusersImage'); + assert.equal(conditioning.action, 'LoadPipeline'); + assert.deepEqual(conditioning.artifact, { source: 'hub', repository: control.repoId, revision: control.revision }); + assert.equal(conditioning.conditioningKind, conditioningKind); + assert.equal(conditioning.componentClass, componentClass); + assert.equal(conditioning.componentParameter, componentParameter); + assert.equal(conditioning.pipelineClass, pipelineClass); + assert.equal(conditioning.safeSerializationRequired, true); + assert.match(conditioning.descriptorSha256, /^[a-f0-9]{64}$/u); + assert.equal(observations.length, 2); + for (const model of [base, control]) { + const matching = observations.filter((observation) => selectInstalledModelIdentity(observation, model.repoId)); + assert.equal(matching.length, 1); + const [observation] = matching; + assert.equal(observation.error, false); + assert.equal(observation.runtimeFingerprint, runtime.fingerprint); + assert.equal(observation.models.length, 1); + assert.equal(observation.models[0].complete, true); + assert.equal(observation.models[0].repairRequired, false); + assert.equal(selectInstalledModelIdentity(observation, model.repoId).selectedRevision, model.revision); + } + return control; +} + +function owners(api) { + assert.equal(api.paths.length, 1); + const [path] = api.paths; + assert.deepEqual([...path].sort(), Object.keys(api.nodes).sort()); + assert.deepEqual( + path.map((id) => `${api.nodes[id].module}.${api.nodes[id].action}`), + chain, + ); + const [guide, canny, , , loader, source, mask, sampler, preview] = path; + return { path, guide, canny, loader, source, mask, sampler, preview }; +} + +export function verifyControlInpaintMedia(api, output, inputs, owner = owners(api)) { + const receipt = output.resolvedExecutionInputs; + assert.equal(receipt.schemaVersion, 1); + assert.equal(receipt.source, 'backend-execution'); + assert.equal(receipt.taskId, output.taskId); + assert.equal(receipt.nodeId, owner.preview); + assert.equal(receipt.attemptIndex, 0); + assert.equal(receipt.truncated, false); + assert.deepEqual(receipt.mediaEvidenceStatus, { schemaVersion: 1, truncated: false }); + assert.deepEqual(receipt.unavailableFields, []); + assert.deepEqual(receipt.uncapturedNodeIds, []); + assert.deepEqual(receipt.nodes.map(({ nodeId }) => nodeId).sort(), [...owner.path].sort()); + const record = (id) => { + const row = receipt.nodes.find(({ nodeId }) => nodeId === id); + assert.equal(row.module, api.nodes[id].module); + assert.equal(row.action, api.nodes[id].action); + assert.deepEqual(row.omittedFields, {}); + assert.equal(row.mediaEvidence.status, 'complete'); + return row; + }; + const decoded = Object.fromEntries( + roles.map((role) => { + const id = owner[role]; + const { sourceFile, decodedImage } = verifyNativeLoadedImage( + api.nodes[id], + record(id), + role === 'mask' ? 'L' : 'RGB', + ); + assert.deepEqual(sourceFile, { + sourceValue: inputs[role].sourceValue, + sha256: inputs[role].file.sha256, + byteSize: inputs[role].file.bytes, + }); + return [role, decodedImage]; + }), + ); + const image = (role) => [{ kind: 'image', ...decoded[role] }]; + const edgeMap = verifyNativeCanny(api.nodes[owner.canny].params, record(owner.canny).mediaEvidence, decoded.guide); + + const sampler = record(owner.sampler); + const params = api.nodes[owner.sampler].params; + for (const field of [ + 'prompt', + 'negative_prompt', + 'output_type', + 'num_inference_steps', + 'width', + 'height', + 'strength', + 'guidance_scale', + 'conditioning_scale', + 'control_guidance_start', + 'control_guidance_end', + 'seed', + ]) { + assert.deepEqual(sampler.fields[field], literal(params[field].value), `Inpaint sampler control differs: ${field}.`); + } + assert.deepEqual(sampler.fields.executed_task, literal('control_inpaint')); + assert.deepEqual( + sampler.mediaEvidence.inputs, + { + image: image('source'), + mask_image: image('mask'), + control_image: edgeMap, + }, + 'Control Inpaint did not consume the selected source, mask and Canny output.', + ); + const composite = sampler.mediaEvidence.outputs.images; + assert.equal(composite.length, 1); + assert.deepEqual( + record(owner.preview).mediaEvidence.inputs, + { image: composite }, + 'Preview received a different image.', + ); + return decoded; +} + +export async function readControlInpaintEvidence({ clientRoot, manifest, graph, authoring, artifact, evidencePath }) { + assert.equal(manifest.id, workflowId); + const target = canonicalWorkflowAuthoringContract(manifest, graph, authoring, artifact); + const descriptorBytes = readFileSync(evidencePath); + const evidence = JSON.parse(descriptorBytes); + assert.equal(evidence.format, format); + assert.equal(evidence.schemaVersion, 1); + assert.equal(evidence.workflowId, workflowId); + const evidenceRoot = realpathSync(dirname(evidencePath)); + const retainedFiles = []; + const read = (ref) => { + const result = readCanonicalEvidenceFile(evidenceRoot, ref, 16 * 1024 * 1024); + retainedFiles.push({ ...ref, absolutePath: result.file }); + return result; + }; + const json = (ref) => JSON.parse(read(ref).bytes); + const creator = json(evidence.creatorPackage); + const outputPackage = json(evidence.outputPackage); + const run = json(evidence.runDetail); + const graphRequest = json(evidence.graphRequest); + const completed = json(evidence.graphCompleted); + const [expected, ...visual] = await exportCanonicalWorkflowGraphs(clientRoot, [ + graph, + creator.graph, + outputPackage.latestOutput.graphSnapshot, + run.workflow_snapshot, + ]); + const canonical = owners(expected); + const actual = owners(graphRequest); + assert.equal(canonicalGraphIdentity(expected).hash, evidence.originalGraphHash); + assert.deepEqual(Object.keys(evidence.inputs).sort(), roles); + for (const role of roles) { + const { sourceValue } = evidence.inputs[role]; + assert.match(sourceValue, /^@data\/images\/[\w-]{1,128}\.png$/u); + const field = expected.nodes[canonical[role]].params.file; + assert.deepEqual(field, { display: 'filebrowser', value: role === 'source' ? [] : '' }); + field.value = [sourceValue]; + } + assert.equal(new Set(roles.map((role) => evidence.inputs[role].file.sha256)).size, roles.length); + const prompt = graphRequest.nodes[actual.sampler].params.prompt.value; + assert.ok(typeof prompt === 'string' && prompt.length > 0 && prompt.length <= 4096 && prompt === prompt.trim()); + assert.ok(!/[\u0000-\u001f\u007f]/u.test(prompt)); + const promptSlot = expected.nodes[canonical.sampler].params.prompt; + assert.deepEqual(promptSlot, { display: 'textarea', value: '' }); + promptSlot.value = prompt; + const identity = canonicalGraphIdentity(expected); + for (const graphSource of [graphRequest, creator.apiGraph, ...visual]) { + assert.equal( + canonicalGraphIdentity(graphSource).hash, + identity.hash, + 'The inpaint graph differs outside its files and prompt.', + ); + } + const { task, output, hints } = validateNativeVariantRun({ + target, + outputNodeId: actual.preview, + displayType: 'image', + creator, + outputPackage, + run, + graphCompleted: completed, + graphRequest, + graphAcknowledgment: json(evidence.graphAcknowledgment), + validatePreparation: (value) => validateUnmodifiedExpertPreparation(value, pipelineClass), + }); + assert.deepEqual(hints.workflowSnapshot.studioForm, output.formSnapshot); + const decodedInputs = verifyControlInpaintMedia(graphRequest, output, evidence.inputs, actual); + for (const role of roles) { + const input = evidence.inputs[role]; + verifyRetainedPngUpload(json(input.upload), input, decodedInputs[role], read(input.file).bytes); + } + + const runtime = selectBackendRuntimeFingerprintEvidence([task.runtimeFingerprint]); + const control = verifyConditioningModels({ + loader: graphRequest.nodes[actual.loader].params, + target, + pipelineClass, + componentClass: 'ControlNetModel', + completed, + hints, + runtime, + observations: evidence.modelObservations.map(json), + }); + const source = backendSourceEvidence({ + before: json(evidence.backendSourceBefore).identity, + after: json(evidence.backendSourceAfter).identity, + runtimeFingerprint: task.runtimeFingerprint, + }); + assert.deepEqual(source.blockers, []); + const backendContract = backendContractIdentity(json(evidence.nodes), identity.canonicalGraph); + assert.ok(backendContract.fingerprint); + const measurement = task.runtimeMeasurement; + assert.match(runtime.packages.platform, /^Windows-/u); + assert.equal(measurement.backend, 'cuda'); + assert.equal(measurement.device, 'cuda:0'); + assert.equal(measurement.peakMeasurementVersion, 2); + assert.ok(measurement.elapsedSeconds > 0 && measurement.elapsedSeconds <= 7200); + assert.ok(measurement.peakAllocatedBytes > 0 && measurement.peakReservedBytes >= measurement.peakAllocatedBytes); + assert.equal(evidence.outputs.length, 1); + const [outputRef] = evidence.outputs; + const media = read(outputRef.file); + const item = validateNativeVariantOutput({ + output, + outputRef, + task, + bytes: media.bytes, + displayType: 'image', + contentType: 'image/webp', + }); + const decoded = await decodedMediaHash(media.file, 'image'); + assert.deepEqual(technicalMediaErrors(decoded, { width: item.width, height: item.height }), []); + for (const ref of retainedFiles) readCanonicalEvidenceFile(evidenceRoot, ref, 16 * 1024 * 1024); + assert.ok(readFileSync(evidencePath).equals(descriptorBytes)); + const receipt = { + schemaVersion: 1, + format: 'modiff.canonical-workflow-run-receipt.v1', + proofKind: 'real_backend_input_bound_model_variant', + ...target, + graphHash: identity.hash, + capturedAt: new Date(task.completed_at * 1000).toISOString(), + taskId: task.task_id, + outputId: output.id, + runtimeFingerprint: normalizeBackendRuntime(runtime).lockFingerprint, + backendSourceFingerprint: source.identity.fingerprint, + backendContractFingerprint: backendContract.fingerprint, + resourceCandidateId: null, + outputHash: item.mediaHash, + executionDurationSeconds: measurement.elapsedSeconds, + peakMemoryBytes: measurement.peakAllocatedBytes, + canonicalDefaultsExecuted: false, + inputBinding: { + nodeId: actual.source, + field: 'file', + sha256: evidence.inputs.source.file.sha256, + decodedImage: decodedInputs.source, + }, + maskBinding: { + nodeId: actual.mask, + field: 'file', + sha256: evidence.inputs.mask.file.sha256, + decodedImage: decodedInputs.mask, + }, + guideBinding: { + nodeId: actual.guide, + field: 'file', + sha256: evidence.inputs.guide.file.sha256, + decodedImage: decodedInputs.guide, + }, + conditioningModel: control, + promptBinding: { nodeId: actual.sampler, field: 'prompt', sha256: sha256(prompt) }, + decodedOutput: { hash: decoded.hash, width: decoded.width, height: decoded.height }, + observationLimits: { + fullConsumedFieldAccounting: false, + nativeCannyAndComposite: true, + physicalPlatformQualification: false, + }, + qualificationClaims: { + publicTemplate: false, + qualityApproved: false, + rightsApproved: false, + hardwareQualified: false, + modelResourceQualified: false, + }, + }; + return { + receipt, + descriptorBytes, + evidence, + evidenceRoot, + retainedFiles, + provenance: { format: 'modiff.input-bound-model-variant-proof.v1', receipt }, + }; +} diff --git a/scripts/control-inpaint-evidence.test.mjs b/scripts/control-inpaint-evidence.test.mjs new file mode 100644 index 00000000..2a99d3bb --- /dev/null +++ b/scripts/control-inpaint-evidence.test.mjs @@ -0,0 +1,54 @@ +import assert from 'node:assert/strict'; +import { dirname, join, resolve } from 'node:path'; +import test from 'node:test'; +import { fileURLToPath } from 'node:url'; +import { verifyControlInpaintMedia } from './control-inpaint-evidence.mjs'; +import { readCanonicalEvidenceFile, readCanonicalWorkflowEvidence } from './release-contract-core.mjs'; + +const clientRoot = fileURLToPath(new URL('..', import.meta.url)); +const backendRoot = resolve(process.env.MODIFF_BACKEND_DIR ?? join(clientRoot, '../MoDiff')); +const fixture = process.env.MODIFF_CONTROL_INPAINT_EVIDENCE; +const workflowId = 'StableDiffusionXLControlNetPipeline:control_inpaint'; + +test( + 'the retained controlled inpaint binds the three distinct image roles and the actual edge map', + { + skip: !fixture, + }, + async () => { + const { receipt, evidence } = await readCanonicalWorkflowEvidence({ + clientRoot, + backendRoot, + workflowId, + evidencePath: resolve(fixture), + }); + assert.equal(receipt.proofKind, 'real_backend_input_bound_model_variant'); + assert.equal(receipt.observationLimits.nativeCannyAndComposite, true); + const inputHashes = [receipt.inputBinding, receipt.maskBinding, receipt.guideBinding].map((input) => input.sha256); + assert.equal(new Set(inputHashes).size, 3); + assert.equal(receipt.modelSet.length, 2); + assert.equal(receipt.conditioningModel.repoId, 'diffusers/controlnet-canny-sdxl-1.0'); + const read = (reference) => JSON.parse(readCanonicalEvidenceFile(dirname(fixture), reference).bytes); + const graph = read(evidence.graphRequest); + const output = read(evidence.outputPackage).latestOutput; + const changed = structuredClone(output); + const row = (value, action) => value.resolvedExecutionInputs.nodes.find((item) => item.action === action); + const sampler = row(changed, 'ControlInpaint'); + sampler.mediaEvidence.inputs.control_image = sampler.mediaEvidence.inputs.image; + assert.throws(() => verifyControlInpaintMedia(graph, changed, evidence.inputs), /did not consume the selected/u); + + const changedPreview = structuredClone(output); + row(changedPreview, 'Preview').mediaEvidence.inputs.image = row( + changedPreview, + 'Canny', + ).mediaEvidence.outputs.output; + assert.throws( + () => verifyControlInpaintMedia(graph, changedPreview, evidence.inputs), + /Preview received a different image/u, + ); + + const changedSettings = structuredClone(output); + row(changedSettings, 'ControlInpaint').fields.conditioning_scale.value = 0; + assert.throws(() => verifyControlInpaintMedia(graph, changedSettings, evidence.inputs), /conditioning_scale/u); + }, +); diff --git a/scripts/controlled-execution-receipt.test.mjs b/scripts/controlled-execution-receipt.test.mjs new file mode 100644 index 00000000..00f55836 --- /dev/null +++ b/scripts/controlled-execution-receipt.test.mjs @@ -0,0 +1,59 @@ +import assert from 'node:assert/strict'; +import { after, before, test } from 'node:test'; +import { createServer } from 'vite'; + +let server, execution; +before(async () => { + server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, hmr: false, watch: null }, + appType: 'custom', + }); + execution = await server.ssrLoadModule('/src/studio/executionSpecs.ts'); +}); +after(async () => server?.close()); + +const spec = { + id: 'wan-t2v:v1', + contentHash: 'reviewed-hash', + mode: 'text_to_video', + roles: [['wanPipeline'], ['wanGenerate'], ['videoExport']], +}; +const capabilities = [{ modelType: 'WanPipeline', studioExecutionSpecs: [spec] }]; +function binding(contracts) { + return { + modelType: 'WanPipeline', + mode: 'text_to_video', + executionSpec: { schemaVersion: 1, id: spec.id, contentHash: spec.contentHash }, + nodes: { wanPipeline: 'loader', wanGenerate: 'single', videoExport: 'export' }, + ...(contracts ? { controlled: { contractIds: contracts } } : {}), + }; +} + +test('controlled video replacements do not attach a single-shot specification to a different executable graph', () => { + for (const contract of ['video-sequence.v1', 'quality-video.t2v.v1', 'quality-video.i2v.v1', 'lyric-video.v1']) { + const graph = { loader: {}, sequence: {}, export: {} }; + assert.equal(execution.studioExecutionSpecRuntimeReceipt(binding([contract]), capabilities, graph), undefined); + } +}); + +test('base graphs and controlled additions keep their exact reviewed specification receipt', () => { + const graph = { loader: {}, single: {}, export: {}, upscaler: {} }; + for (const contracts of [undefined, ['upscale.video.v1'], ['video-sequence.v1']]) { + assert.deepEqual(execution.studioExecutionSpecRuntimeReceipt(binding(contracts), capabilities, graph), { + schemaVersion: 1, + id: spec.id, + contentHash: spec.contentHash, + nodes: { wanPipeline: 'loader', wanGenerate: 'single', videoExport: 'export' }, + }); + } +}); + +test('unreviewed contracts and stale specification identities cannot drop the managed receipt', () => { + assert.ok(execution.studioExecutionSpecRuntimeReceipt(binding(['unknown']), capabilities, { loader: {} })); + const stale = binding(['video-sequence.v1']); + stale.executionSpec.contentHash = 'stale'; + assert.throws(() => execution.studioExecutionSpecRuntimeReceipt(stale, capabilities, { loader: {} }), /stale/); +}); diff --git a/scripts/development-installer-launchers.test.mjs b/scripts/development-installer-launchers.test.mjs new file mode 100644 index 00000000..7273c42a --- /dev/null +++ b/scripts/development-installer-launchers.test.mjs @@ -0,0 +1,184 @@ +import assert from 'node:assert/strict'; +import { spawnSync } from 'node:child_process'; +import { + chmodSync, + copyFileSync, + existsSync, + mkdirSync, + mkdtempSync, + readFileSync, + rmSync, + symlinkSync, + writeFileSync, +} from 'node:fs'; +import { tmpdir } from 'node:os'; +import { dirname, join, relative, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { test } from 'node:test'; + +const clientRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..'); +const backendRoot = resolve(clientRoot, '../MoDiff'); +const windows = process.platform === 'win32'; +const backendPython = + process.env.MODIFF_BACKEND_PYTHON || join(backendRoot, windows ? '.venv/Scripts/python.exe' : '.venv/bin/python'); +const powershell = join(process.env.SystemRoot || 'C:/Windows', 'System32/WindowsPowerShell/v1.0/powershell.exe'); + +function command(executable, args, options = {}) { + const result = spawnSync(executable, args, { encoding: 'utf8', timeout: 30_000, ...options }); + assert.ifError(result.error); + return result; +} + +function successful(executable, args, options) { + const result = command(executable, args, options); + assert.equal(result.status, 0, result.stdout + result.stderr); + return result.stdout.trim(); +} + +function executable(path, contents) { + writeFileSync(path, contents); + chmodSync(path, 0o755); +} + +function fixture(shell, scenario) { + const root = mkdtempSync(join(tmpdir(), 'modiff dev launcher ')); + const client = join(root, 'client checkout with spaces'); + const backend = join(root, 'backend checkout with spaces'); + const tools = join(root, 'operator tools with spaces'); + const calls = join(root, 'calls.txt'); + for (const path of [client, backend, tools, join(backend, 'modiff'), join(backend, 'requirements')]) + mkdirSync(path, { recursive: true }); + copyFileSync(join(clientRoot, `install-dev.${shell}`), join(client, `install-dev.${shell}`)); + copyFileSync(join(backendRoot, 'modiff/tool_locks.py'), join(backend, 'modiff/tool_locks.py')); + writeFileSync(join(backend, 'modiff/__init__.py'), ''); + writeFileSync(join(backend, 'requirements/test.txt'), ''); + writeFileSync( + join(backend, 'modiff/preflight.py'), + 'import os\nfrom pathlib import Path\nwith Path(os.environ["MODIFF_DEV_CALLS"]).open("a") as stream: stream.write("preflight\\n")\nprint("{\\"ready\\": true}")\n', + ); + successful(backendPython, ['-m', 'venv', '--without-pip', join(backend, '.venv')]); + const python = join(backend, windows ? '.venv/Scripts/python.exe' : '.venv/bin/python'); + const sitePackages = successful(python, ['-c', 'import site; print(site.getsitepackages()[0])']); + writeFileSync(join(sitePackages, 'modiff-fixture.pth'), backend + '\n'); + const env = { + ...process.env, + PATH: tools, + NODE_ENV: 'production', + MODIFF_DEV_CALLS: calls, + MODIFF_BACKEND_DIR: relative(root, backend), + UV_FIXTURE_EXIT: scenario === 'pip-error' ? '7' : '0', + UV_FIXTURE_VERSION: scenario === 'broken' ? 'broken' : '0.12.23', + }; + const installerExit = scenario === 'installer-error' ? 9 : 0; + const fallback = join(backend, '.modiff/tools/uv', windows ? 'uv.exe' : 'uv'); + mkdirSync(dirname(fallback), { recursive: true }); + if (shell === 'ps1') { + writeFileSync( + join(backend, 'install.ps1'), + `param([string]$Accelerator, [switch]$AllowExperimental, [switch]$Resume, [switch]$Repair, [switch]$BackendOnly)\nif (!$BackendOnly) { throw 'Expected backend-only installation.' }\nAdd-Content -LiteralPath $env:MODIFF_DEV_CALLS -Value installer\nSet-Location -LiteralPath $PSScriptRoot\nexit ${installerExit}\n`, + ); + writeFileSync(join(tools, 'npm.cmd'), '@echo off\necho npm %*>>"%MODIFF_DEV_CALLS%"\nexit /b 0\n'); + const uvSource = join(root, 'uv-fixture.cs'); + writeFileSync( + uvSource, + `using System; using System.IO; using System.Reflection;\npublic class UvFixture { public static int Main(string[] args) {\nstring executable = Assembly.GetEntryAssembly().Location;\nstring log = Environment.GetEnvironmentVariable("MODIFF_DEV_CALLS");\nif(args.Length == 1 && args[0] == "--version") { File.AppendAllText(log, "probe:" + executable + "\\n"); Console.WriteLine("uv " + Environment.GetEnvironmentVariable("UV_FIXTURE_VERSION")); return 0; }\nFile.AppendAllText(log, "uv:" + executable + "\\n" + String.Join("\\n", args) + "\\n");\nConsole.Error.WriteLine("native uv fixture progress"); return Int32.Parse(Environment.GetEnvironmentVariable("UV_FIXTURE_EXIT")); } }\n`, + ); + const compiled = join(root, 'uv.exe'); + const compileScript = join(root, 'compile-fixture.ps1'); + writeFileSync( + compileScript, + 'param([string]$Source, [string]$Output)\n$ErrorActionPreference = "Stop"\nAdd-Type -Path $Source -OutputAssembly $Output -OutputType ConsoleApplication\n', + ); + successful(powershell, ['-NoProfile', '-File', compileScript, '-Source', uvSource, '-Output', compiled]); + if (scenario !== 'missing' && scenario !== 'fallback') copyFileSync(compiled, join(tools, 'uv.exe')); + if (scenario === 'fallback' || scenario === 'broken') copyFileSync(compiled, fallback); + } else { + executable( + join(backend, 'install.sh'), + `#!/usr/bin/env bash\n[[ "$*" == *--backend-only* ]] || exit 4\nprintf 'installer\\n' >> "$MODIFF_DEV_CALLS"\nexit ${installerExit}\n`, + ); + executable(join(tools, 'npm'), '#!/bin/sh\nprintf "npm %s\\n" "$*" >> "$MODIFF_DEV_CALLS"\n'); + const uv = + '#!/bin/sh\nif [ "$1" = --version ]; then printf "probe:%s\\n" "$0" >> "$MODIFF_DEV_CALLS"; printf "uv %s\\n" "$UV_FIXTURE_VERSION"; exit 0; fi\nprintf "uv:%s\\n" "$0" >> "$MODIFF_DEV_CALLS"\nprintf "%s\\n" "$@" >> "$MODIFF_DEV_CALLS"\nprintf "native uv fixture progress\\n" >&2\nexit "$UV_FIXTURE_EXIT"\n'; + if (scenario !== 'missing' && scenario !== 'fallback') executable(join(tools, 'uv'), uv); + if (scenario === 'fallback' || scenario === 'broken') executable(fallback, uv); + // Keep PATH isolated from any real uv/npm, including in missing-tool cases. + for (const tool of ['bash', 'dirname', 'mkdir']) { + const source = ['/bin', '/usr/bin'].map((dir) => join(dir, tool)).find(existsSync); + assert.ok(source, `Required shell tool is unavailable: ${tool}`); + symlinkSync(source, join(tools, tool)); + } + } + return { root, client, backend, python, tools, calls, fallback, env }; +} + +for (const shell of ['ps1', 'sh']) { + for (const scenario of ['path', 'fallback', 'missing', 'broken', 'pip-error', 'installer-error']) { + test( + `${shell} development installer: ${scenario} uv respects the backend resolver and failure boundary`, + { skip: (shell === 'ps1') !== windows || !existsSync(backendPython) }, + () => { + const f = fixture(shell, scenario); + try { + const result = + shell === 'ps1' + ? command( + powershell, + [ + '-NoProfile', + '-ExecutionPolicy', + 'Bypass', + '-File', + join(f.client, 'install-dev.ps1'), + '-BackendPath', + relative(f.root, f.backend), + '-Accelerator', + 'cpu', + ], + { cwd: f.root, env: f.env }, + ) + : command('/bin/bash', [join(f.client, 'install-dev.sh'), '--accelerator', 'cpu'], { + cwd: f.root, + env: f.env, + }); + const calls = readFileSync(f.calls, 'utf8'); + const output = result.stdout + result.stderr; + if (scenario === 'missing' || scenario === 'broken') { + assert.notEqual(result.status, 0, output); + assert.match(output, scenario === 'missing' ? /Install uv.*add it to PATH/ : /did not report a uv version/); + assert.doesNotMatch(calls, /uv:|npm|preflight/); + if (scenario === 'broken') assert.doesNotMatch(calls, /probe:.*\.modiff/); + } else if (scenario === 'installer-error') { + assert.equal(result.status, 9, output); + assert.doesNotMatch(calls, /probe:|uv:|npm|preflight/); + } else { + const expectedUv = scenario === 'fallback' ? f.fallback : join(f.tools, windows ? 'uv.exe' : 'uv'); + assert.ok(calls.includes(`uv:${expectedUv}\n`), calls); + assert.ok( + calls.includes(`pip\ninstall\n--python\n${f.python}\n-r\n${join(f.backend, 'requirements/test.txt')}\n`), + calls, + ); + assert.equal(result.status, scenario === 'pip-error' ? 7 : 0, output); + if (scenario === 'pip-error') assert.doesNotMatch(calls, /npm|preflight/); + else { + assert.match(output, /Development environment is ready/); + assert.match(calls, /npm ci --include=dev\r?\npreflight/); + assert.deepEqual( + JSON.parse( + readFileSync(join(f.client, 'artifacts/dev-install-current/backend-preflight.json'), 'utf8').replace( + /^\uFEFF/, + '', + ), + ), + { ready: true }, + ); + } + } + } finally { + assert.equal(dirname(f.root), resolve(tmpdir()), 'Cleanup must stay inside the test temporary directory'); + rmSync(f.root, { recursive: true, force: true }); + } + }, + ); + } +} diff --git a/scripts/encoding-node-presentation.test.mjs b/scripts/encoding-node-presentation.test.mjs index b2e144a9..cc159ce0 100644 --- a/scripts/encoding-node-presentation.test.mjs +++ b/scripts/encoding-node-presentation.test.mjs @@ -23,21 +23,47 @@ after(async () => server?.close()); test('documentation sockets are presentation-only and connected/custom sockets survive', () => { const params = { - doc: { type: 'string', display: 'output', isConnected: false }, - connected_doc: { type: 'string', display: 'output', isConnected: true }, - custom: { type: 'string', display: 'output' }, + doc: { type: 'string', label: 'Doc' }, + wiredDoc: { type: 'string', label: 'My documentation', isConnected: true }, + route: { type: 'string' }, + optionalDoc: { type: 'str', label: 'Doc', fieldOptions: { encodingImplementationOutput: 'doc' } }, + requiredRoute: { type: 'route' }, + layers: { type: 'layers' }, + guidanceLayers: { type: 'layers' }, + custom: { type: 'string' }, + }; + const outputs = [ + ['doc', 'doc', 'text'], + ['wiredDoc', 'doc', 'guidance'], + ['route', 'route_state_out', 'text'], + ['layers', 'layers', 'text'], + ['guidanceLayers', 'layers', 'guidance'], + ['custom', 'custom', 'text'], + ].map(([portId, fieldOrPortId, nodeId]) => ({ portId, binding: { fieldOrPortId, nodeId } })); + const instance = { + effectiveGraph: { + nodes: [ + { nodeId: 'text', data: { label: 'Text Encoder' } }, + { nodeId: 'guidance', data: { operationAuthoring: { operation: { nodeType: 'guidance_layers' } } } }, + ], + }, + effectiveInterface: { + boundary: { + outputs, + inputs: [ + { portId: 'requiredRoute', binding: { fieldOrPortId: 'route_state_in', nodeId: 'text' }, required: true }, + ], + }, + }, }; - const ports = [ - { portId: 'doc', binding: { fieldOrPortId: 'doc' } }, - { portId: 'connected_doc', binding: { fieldOrPortId: 'doc' } }, - { portId: 'custom', binding: { fieldOrPortId: 'custom' } }, - ]; const before = structuredClone(params); - assert.deepEqual(Object.keys(presentation.encodingVisibleConnectors(params, ports)), [ - 'doc', - 'connected_doc', - 'custom', - ]); + const visible = presentation.encodingVisibleConnectors(params, instance); + assert.deepEqual(Object.keys(visible), ['wiredDoc', 'requiredRoute', 'layers', 'custom']); + assert.equal(visible.wiredDoc.label, 'My documentation'); + const advanced = presentation.encodingVisibleConnectors(params, instance, true); + assert.deepEqual(Object.keys(advanced), Object.keys(params)); + assert.equal(advanced.optionalDoc.label, 'Documentation · Image encoder'); + assert.equal(advanced.doc.label, 'Documentation · Text Encoder'); assert.deepEqual(params, before); }); @@ -69,7 +95,7 @@ test('custom implementation additions do not turn the generic encoder back into test('Guidance presentation excludes unrelated recipes and scopes to image/audio', () => { const instance = { - definitionSnapshot: { source: { provider: 'modiff.visual-stages.v1/guidance' } }, + definitionSnapshot: { source: { kind: 'user', provider: 'modiff.visual-stages.v1/guidance' } }, effectiveGraph: { nodes: [ { data: { operationAuthoring: { operation: { nodeType: 'guidance', task: 'text_to_image' } } } }, @@ -86,3 +112,74 @@ test('Guidance presentation excludes unrelated recipes and scopes to image/audio outside.effectiveGraph.nodes.forEach((n) => (n.data.operationAuthoring.operation.task = 'other_task')); assert.equal(presentation.isFocusedStageNode(outside), false); }); + +test('built-in stages use one ordinary node across modalities, including video encoding and generation', () => { + for (const kind of [ + 'assemble', + 'assembleExport', + 'setup', + 'inputs', + 'generate', + 'imageInput', + 'videoInput', + 'references', + 'mask', + 'composite', + 'output', + ]) { + const instance = { + definitionSnapshot: { + displayName: 'My stage', + source: { kind: 'user', provider: `modiff.visual-stages.v1/${kind}` }, + }, + effectiveGraph: { + nodes: [{ data: { operationAuthoring: { operation: { nodeType: 'text_encoder', task: 'image_to_video' } } } }], + }, + }; + assert.equal(presentation.isFocusedStageNode(instance), true); + assert.equal(presentation.isFocusedStageNode({ ...instance, effectiveGraph: { nodes: [] } }), false); + } + assert.equal( + presentation.isFocusedStageNode({ + definitionSnapshot: { source: { provider: 'user' } }, + effectiveGraph: { nodes: [{ data: {} }] }, + }), + false, + ); +}); + +test('a saved stage with an authored nested composition can still expand as a Block', () => { + const instance = { + definitionSnapshot: { source: { kind: 'user', provider: 'modiff.visual-stages.v1/generate' } }, + effectiveGraph: { + nodes: [ + { nodeId: 'sampler', data: {} }, + { nodeId: 'custom-wrapper', containerInterface: {}, data: {} }, + { nodeId: 'custom-transform', parentNodeId: 'custom-wrapper', data: {} }, + ], + }, + presentation: { expanded: true }, + }; + assert.equal(presentation.isFocusedStageNode(instance), false); + assert.equal( + presentation.isFocusedStageNode({ + ...instance, + effectiveGraph: { nodes: instance.effectiveGraph.nodes.slice(0, 1) }, + }), + true, + ); +}); + +test('GPU options use the physical runtime identity without changing the PyTorch key', async () => { + const { workflowDeviceLabel } = await server.ssrLoadModule('/src/studio/runtimeOptions.ts'); + const torch = { + cuda_devices: [ + { index: 0, name: 'Radeon 8060S', backend: 'hip' }, + { index: 1, name: 'NVIDIA A100', backend: 'cuda' }, + ], + }; + assert.equal(workflowDeviceLabel('cuda:0', 'cuda:0', torch), 'Radeon 8060S · ROCm (cuda:0)'); + assert.equal(workflowDeviceLabel('cuda:1', 'cuda:1', torch), 'NVIDIA A100 · CUDA (cuda:1)'); + assert.equal(workflowDeviceLabel('cuda:2', 'cuda:2', torch), 'cuda:2'); + assert.equal(workflowDeviceLabel('cpu', 'cpu', undefined), 'CPU'); +}); diff --git a/scripts/executed-native-media-resource.mjs b/scripts/executed-native-media-resource.mjs new file mode 100644 index 00000000..2ab196a5 --- /dev/null +++ b/scripts/executed-native-media-resource.mjs @@ -0,0 +1,870 @@ +// Maintainer provenance inspection only. Never executes, plans or admits a model. +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { canonicalJsonHash, stableJsonValue } from './canonical-json.mjs'; +import { assertFiniteObservedJson, workerGraphHash } from './observed-workflow-auto-resource.mjs'; + +export const OBSERVED_NATIVE_AUTO_VIDEO_SOURCE = 'observed-native-auto-video-stages-v1'; + +const same = (a, b) => assert.deepEqual(stableJsonValue(a), stableJsonValue(b)); +const kind = (n) => `${n.module}.${n.action}`; +const value = (n, key) => n.params?.[key]?.value; +const repo = (v) => (v?.source === 'hub' ? v.value : typeof v === 'string' ? v : null); +const standardScopes = new Set([ + ...['LoadPipeline', 'EncodeInputs', 'Denoise', 'DecodeLatents'].flatMap((a) => + ['modules.DiffusersImage', 'modules.DiffusersVideo'].map((m) => `${m}.${a}`), + ), + 'modules.DiffusersRuntime.PipelineQuantizationConfigV2', + 'modules.DiffusersRuntime.DiffusersExecutionRecipe', + 'modules.Image.Load', + 'modules.Image.Preview', + 'modules.Video.Load', + 'modules.Video.Export', + 'modules.Video.ExportAsset', + 'modules.Video.Concatenate', + 'modules.VideoConditioning.Normalize', + 'modules.VideoConditioning.Storyboard', + 'modules.VideoConditioning.ShotPrompt', + 'modules.VideoConditioning.ShotInputs', + 'modules.Primitive.ToList', + 'modules.Spandrel.Upscaler', +]); +const audiovisualScopes = new Set([ + ...standardScopes, + 'modules.DiffusersAudio.LoadPipeline', + 'modules.DiffusersAudio.Generate', + 'modules.Audio.FitDuration', + 'modules.Audio.Export', + 'modules.Video.Trim', + 'modules.Video.LyricOverlay', + 'modules.Video.ExportWithAudio', +]); +const nativeAutoScopes = new Set([ + ...[...standardScopes].filter((s) => !s.startsWith('modules.DiffusersImage.') && s !== 'modules.Image.Preview'), + 'modules.DiffusersVideo.Generate', + 'modules.Video.ConcatenateAssets', + 'modules.VideoConditioning.OutpaintCanvas', + 'modules.VideoConditioning.AlignMask', +]); +const reviewedNativeVideo = { + LTXConditionPipeline: ['Lightricks/LTX-Video-0.9.8-13B-distilled', '7c64400e1861cc0d7b98d570a1926d5408ec60cd'], + WanPipeline: ['Wan-AI/Wan2.1-T2V-1.3B-Diffusers', '0fad780a534b6463e45facd96134c9f345acfa5b'], + WanVideoToVideoPipeline: ['Wan-AI/Wan2.1-T2V-1.3B-Diffusers', '0fad780a534b6463e45facd96134c9f345acfa5b'], + WanVACEPipeline: ['Wan-AI/Wan2.1-VACE-1.3B-diffusers', 'ec4d2cb062b548996b179d493fdd05340de702a1'], +}; + +export function capturedNativeGraphSubmission(submission) { + assert.equal(submission?.method, 'POST'); + const url = new URL(submission.url); + same( + [url.protocol, url.hostname, url.pathname, url.search, url.hash, url.username, url.password], + ['http:', '127.0.0.1', '/graph', '', '', '', ''], + ); + assert.equal(submission.contentType?.split(';')[0].trim().toLowerCase(), 'application/json'); + assert.equal(typeof submission.body, 'string'); + const byteSize = Buffer.byteLength(submission.body, 'utf8'); + assert(byteSize > 0 && byteSize <= 16 * 1024 ** 2); + const api = JSON.parse(submission.body); + // A saved visual hierarchy is deeper than a resource plan. Bound this + // captured request separately; retain the stricter resource-plan checks. + const pending = [[api, 0]]; + let visited = 0; + while (pending.length) { + const [item, depth] = pending.pop(); + assert(depth <= 64 && ++visited <= 250000); + if (typeof item === 'number') assert(Number.isFinite(item)); + if (item && typeof item === 'object') { + assert(Object.keys(item).length <= 2048); + for (const value of Object.values(item)) pending.push([value, depth + 1]); + } + } + return { + api, + record: { + source: 'captured-native-graph-post-v1', + method: 'POST', + url: url.href, + contentType: submission.contentType, + body: submission.body, + byteSize, + sha256: 'sha256:bytes:' + createHash('sha256').update(submission.body, 'utf8').digest('hex'), + }, + }; +} + +function nativeVideoStructure(nodes, mode) { + const entries = Object.entries(nodes); + assert(entries.length >= 5 && entries.length <= 80); + for (const [, node] of entries) assert(nativeAutoScopes.has(kind(node))); + const single = (scope) => { + const rows = entries.filter(([, node]) => kind(node) === scope); + same(rows.length, 1); + return { id: rows[0][0], node: rows[0][1] }; + }; + const owner = single('modules.DiffusersVideo.LoadPipeline'); + const recipe = single('modules.DiffusersRuntime.DiffusersExecutionRecipe'); + const quant = single('modules.DiffusersRuntime.PipelineQuantizationConfigV2'); + const wire = (node, field, id, port) => + same([node.params[field]?.sourceId, node.params[field]?.sourceKey], [id, port]); + wire(owner.node, 'execution_recipe', recipe.id, 'execution_recipe'); + wire(recipe.node, 'quantization_config', quant.id, 'quantization_config'); + same(value(quant.node, 'backend'), 'none'); + same(value(quant.node, 'dtype'), 'bfloat16'); + const samplers = entries.filter(([, n]) => + ['modules.DiffusersVideo.Denoise', 'modules.DiffusersVideo.Generate'].includes(kind(n)), + ); + const decoders = entries.filter(([, n]) => kind(n) === 'modules.DiffusersVideo.DecodeLatents'); + assert(samplers.length >= 1 && samplers.length <= 9); + same(decoders.length, samplers.filter(([, n]) => n.action === 'Denoise').length); + for (const [id, node] of samplers) { + wire(node, 'pipeline', owner.id, 'pipeline'); + same(value(node, 'mode'), mode); + const encodingId = node.params.encoded_inputs?.sourceId, + encode = nodes[encodingId]; + same(kind(encode), 'modules.DiffusersVideo.EncodeInputs'); + wire(node, 'encoded_inputs', encodingId, 'encoded_inputs'); + wire(encode, 'pipeline', owner.id, 'pipeline'); + same(value(encode, 'mode'), mode); + if (value(owner.node, 'pipeline_class') === 'WanVideoToVideoPipeline') { + assert(['video_to_video', 'video_color_edit'].includes(mode)); + same(samplers.length, 1); + const normalizeId = encode.params.video?.sourceId, + normalize = nodes[normalizeId]; + same(kind(normalize), 'modules.VideoConditioning.Normalize'); + wire(encode, 'video', normalizeId, 'output'); + const sourceId = normalize.params.video?.sourceId; + same(kind(nodes[sourceId]), 'modules.Video.Load'); + wire(normalize, 'video', sourceId, 'video'); + } + if (node.action === 'Generate') { + same(value(owner.node, 'pipeline_class'), 'WanVACEPipeline'); + same(value(node, 'output_type'), 'pil'); + } else { + const matches = decoders.filter(([, n]) => n.params.latents?.sourceId === id); + same(matches.length, 1); + const decode = matches[0][1]; + wire(decode, 'pipeline', owner.id, 'pipeline'); + wire(decode, 'latents', id, 'latents_out'); + wire(decode, 'latent_binding', id, 'latent_binding'); + same(value(decode, 'output_type'), 'pil'); + } + } + same( + entries.filter(([, n]) => ['modules.Video.Export', 'modules.Video.ConcatenateAssets'].includes(kind(n))).length, + 1, + ); + return { owner, recipe }; +} + +function nativeVideoModels(nodes, models, owner) { + const repository = repo(value(owner, 'model_id')), + revision = value(owner, 'revision'); + same([repository, revision], reviewedNativeVideo[value(owner, 'pipeline_class')]); + const expected = new Map([[repository, revision]]); + for (const node of Object.values(nodes)) + if (kind(node) === 'modules.Spandrel.Upscaler') { + const artifact = value(node, 'model_id'); + for (const [key, wanted] of Object.entries({ + source: 'hub', + value: 'nateraw/real-esrgan/RealESRGAN_x2plus.pth', + revision: '42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094', + sha256: '49fafd45f8fd7aa8d31ab2a22d14d91b536c34494a5cfe31eb5d89c2fa266abb', + byteSize: 67061725, + })) + same(artifact?.[key], wanted); + expected.set('nateraw/real-esrgan', artifact.revision); + } + same(models.map((m) => m.repoId).sort(), [...expected.keys()].sort()); + for (const model of models) same(model.selectedRevision, expected.get(model.repoId)); +} +const audioScopes = new Set([ + 'modules.ModularDiffusers.ModelsLoader', + 'modules.ModularDiffusers.WorkflowSemanticGeneration', + 'modules.ModularDiffusers.WorkflowDenoise', + 'modules.ModularDiffusers.WorkflowDecodeAudio', + 'modules.Audio.Export', +]); + +function equalLiteral(actual, requested, field) { + if (field === 'negative_prompt' && requested === '' && actual === null) return; + if (requested?.source === 'hub') return same(actual, requested.value); + // Ordinary numeric widgets persist strings; compare only to a captured number. + if (typeof actual === 'number' && typeof requested === 'string' && /^-?\d+(?:\.\d+)?$/u.test(requested)) + return same(actual, Number(requested)); + return same(actual, requested); +} + +function inspect(api, context, modularAudio, modularImage = false, observedAuto = false) { + const { executionReceipt: task, executedOutput: output, taskId, modelIdentities, resolvedModelRepos } = context; + const hints = api.runtimeHints; + const snapshot = hints?.workflowSnapshot; + const resourceMode = observedAuto ? 'auto' : 'expert'; + const audiovisual = + !observedAuto && + !modularAudio && + !modularImage && + Object.values(api.nodes).some((node) => kind(node) === 'modules.DiffusersAudio.LoadPipeline') && + Object.values(api.nodes).some((node) => kind(node) === 'modules.DiffusersVideo.LoadPipeline'); + assert.equal(snapshot?.studioForm?.resourceMode, resourceMode); + assert.equal(task.status, 'completed'); + assert.equal(task.attempt_index, 0); + assert.equal(output.attemptIndex, 0); + assert.equal(task.task_id, taskId); + assert.equal(output.taskId, taskId); + assert.equal(task.resourceCandidateId ?? null, null); + // Older manual multi-owner tasks omitted preparation metadata. Their two + // loaders' native consumed controls are the authority; no Auto claim follows. + if (!audiovisual || task.runtimePreparation?.resourceMode !== undefined) + assert.equal(task.runtimePreparation?.resourceMode, resourceMode); + same(task.workflow_snapshot, snapshot); + let graphSubmission = null; + if (output.apiGraphSnapshot === undefined && observedAuto && context.nativeGraphSubmission) { + const submission = capturedNativeGraphSubmission(context.nativeGraphSubmission); + same(submission.api, api); + graphSubmission = submission.record; + } else same(output.apiGraphSnapshot, api); + same(output.formSnapshot, snapshot.studioForm); + for (const [key, a, b] of [ + ['sid', 'sid', 'sid'], + ['workflowTabId', 'workflow_tab_id', 'workflowTabId'], + ['clientRunId', 'client_run_id', 'clientRunId'], + ['runInputHash', 'run_input_hash', 'runInputHash'], + ]) { + const expected = key === 'sid' ? api.sid : hints[key]; + assert.equal(typeof expected, 'string'); + assert(expected.length > 0); + same(task[a], expected); + same(output[b], expected); + } + assert(!api.loops && !api.loopContexts); + const entries = Object.entries(api.nodes); + assert(entries.length >= 5 && entries.length <= 80); + assert(api.paths.length >= 1 && api.paths.length <= (audiovisual ? 11 : 10)); + same([...new Set(api.paths.flat())].sort(), entries.map(([id]) => id).sort()); + for (const order of api.paths) assert.equal(new Set(order).size, order.length); + const workflowImageScopes = new Set( + ['ModelsLoader', 'WorkflowTextEncode', 'WorkflowImageDenoise', 'WorkflowDecodeImage'] + .map((action) => `modules.ModularDiffusers.${action}`) + .concat('modules.Image.Preview'), + ); + const allowed = observedAuto + ? nativeAutoScopes + : modularAudio + ? audioScopes + : modularImage + ? workflowImageScopes + : audiovisual + ? audiovisualScopes + : new Set([...standardScopes, 'modules.Text.ProcessText']); + for (const [id, node] of entries) { + assert(allowed.has(kind(node)), kind(node)); + for (const p of Object.values(node.params)) { + if (p.sourceId) { + assert(api.nodes[p.sourceId]); + assert.equal(typeof p.sourceKey, 'string'); + assert(p.sourceKey.length > 0); + assert( + api.paths.some( + (order) => + order.includes(id) && order.includes(p.sourceId) && order.indexOf(p.sourceId) < order.indexOf(id), + ), + ); + } + } + } + const receipt = output.resolvedExecutionInputs; + assert.equal(receipt.schemaVersion, 1); + assert.equal(receipt.source, 'backend-execution'); + assert.equal(receipt.taskId, taskId); + assert.equal(receipt.nodeId, output.nodeId); + assert.equal(receipt.attemptIndex, 0); + assert.equal(receipt.truncated, false); + same(receipt.uncapturedNodeIds, []); + const captured = new Map(receipt.nodes.map((n) => [n.nodeId, n])); + assert.equal(captured.size, receipt.nodes.length); + const ancestors = new Set(); + const visit = (id) => { + if (ancestors.has(id)) return; + ancestors.add(id); + for (const p of Object.values(api.nodes[id].params)) if (p.sourceId) visit(p.sourceId); + }; + visit(output.nodeId); + same([...captured.keys()].sort(), [...ancestors].sort()); + for (const [id, node] of entries) { + if (ancestors.has(id)) continue; + // A multi-shot export also saves each completed source shot. These terminal + // siblings do not alter the assembled film's resource owner or ancestry. + assert( + ['modules.Video.Export', 'modules.Video.ExportAsset', ...(audiovisual ? ['modules.Audio.Export'] : [])].includes( + kind(node), + ), + ); + assert(Object.values(node.params).some((p) => p.sourceId && ancestors.has(p.sourceId))); + } + for (const [id, node] of entries) { + const row = captured.get(id); + if (!row) continue; + same([row.module, row.action], [node.module, node.action]); + for (const [field, observed] of Object.entries(row.fields)) { + const parameter = node.params[field]; + // Resource identity is narrower than complete field accounting. Inactive + // strength and upstream-capped text lengths retain their distinct requested + // and effective records; they must not be relabelled as consumed literals. + const resourceField = [ + 'repo_id', + 'model_id', + 'revision', + 'pipeline_class', + 'model_type', + 'dtype', + 'device', + 'auto_offload', + 'offload_mode', + 'backend', + 'weight_format', + 'weight_loading_mode', + 'trust_remote_code', + ].includes(field); + if (resourceField && parameter && Object.hasOwn(parameter, 'value') && !parameter.sourceId) { + assert.equal(observed.source, 'literal'); + equalLiteral(observed.value, parameter.value, field); + } + } + } + const single = (scope) => { + const rows = entries.filter(([, n]) => kind(n) === scope); + assert.equal(rows.length, 1, scope); + return { id: rows[0][0], node: rows[0][1] }; + }; + const requireCaptured = (role, fields) => { + for (const field of fields) { + const p = role.node.params[field]; + assert(p, field); + const observed = captured.get(role.id).fields[field]; + assert(observed && !Object.hasOwn(captured.get(role.id).omittedFields ?? {}, field), field); + if (p.sourceId) { + same(observed.source, 'connected'); + same(observed.sourceNodeId, p.sourceId); + same(observed.sourcePortId, p.sourceKey); + } else { + assert(Object.hasOwn(p, 'value'), field); + assert.equal(observed.source, 'literal'); + equalLiteral(observed.value, p.value, field); + } + } + }; + const wire = (consumer, field, producer, port) => + same( + { nodeId: consumer.node.params[field]?.sourceId, port: consumer.node.params[field]?.sourceKey }, + { nodeId: producer.id, port }, + ); + const owner = single( + modularAudio || modularImage + ? 'modules.ModularDiffusers.ModelsLoader' + : `${entries.some(([, n]) => n.module === 'modules.DiffusersVideo') ? 'modules.DiffusersVideo' : 'modules.DiffusersImage'}.LoadPipeline`, + ); + const ownerRepo = repo(value(owner.node, modularAudio || modularImage ? 'repo_id' : 'model_id')); + const revision = value(owner.node, 'revision'); + assert.match(ownerRepo, /^[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*$/u); + assert.match(revision, /^[a-f0-9]{40}$/u); + const pipelineClass = value(owner.node, modularAudio || modularImage ? 'model_type' : 'pipeline_class'); + assert.match(pipelineClass, /^[A-Za-z]\w*Pipeline$/u); + const jsonSuppliers = entries.filter(([, node]) => kind(node) === 'modules.Text.ProcessText'); + if (jsonSuppliers.length) { + same(jsonSuppliers.length, 1); + same(pipelineClass, 'FluxReduxPipeline'); + same(snapshot.studioForm.mode, 'multi_image_reference_edit'); + const supplier = jsonSuppliers[0][1]; + same(value(supplier, 'pipeline_class'), 'BuiltinDataOperationV1'); + same(value(supplier, 'operation'), 'data_conversion'); + same(value(supplier, 'target_type'), 'json'); + assert(typeof value(supplier, 'source') === 'string' && value(supplier, 'source').length <= 16384); + assert(!supplier.params.source.sourceId); + const weights = JSON.parse(value(supplier, 'source')); + assert(Array.isArray(weights) && weights.length > 0 && weights.length <= 32); + assert(weights.every((weight) => typeof weight === 'number' && Number.isFinite(weight))); + const encode = single('modules.DiffusersImage.EncodeInputs'); + for (const field of ['prompt_embeds_scale', 'pooled_prompt_embeds_scale']) { + wire(encode, field, { id: jsonSuppliers[0][0] }, 'output'); + requireCaptured(encode, [field]); + same(captured.get(encode.id).fields[field].value, weights); + } + } + same(receipt.graphTasks, [ + { loaderId: owner.id, pipelineClass, task: audiovisual ? 'image_to_video' : snapshot.studioForm.mode }, + ]); + requireCaptured(owner, [ + modularAudio || modularImage ? 'repo_id' : 'model_id', + 'revision', + modularAudio || modularImage ? 'model_type' : 'pipeline_class', + 'dtype', + 'device', + 'offload_mode', + 'auto_offload', + ]); + const primary = modelIdentities.find((m) => m.repoId === ownerRepo); + assert(primary); + same(primary.selectedRevision, revision); + const dependencyEvidence = context.modelDependencyEvidence; + const extraModels = modelIdentities.filter((m) => !resolvedModelRepos.includes(m.repoId)); + if (extraModels.length) { + // Some reviewed backend adapters load a separately pinned dependency that + // is not an editable graph loader. Require an explicit source-bound audit, + // rather than dropping it from the complete executed model set. + assert(dependencyEvidence); + same(dependencyEvidence.pipelineClass, pipelineClass); + same(dependencyEvidence.ownerRepoId, ownerRepo); + same(dependencyEvidence.backendSourceFingerprint, context.backendSource.fingerprint); + assert(dependencyEvidence.implementationFiles.length > 0); + for (const file of dependencyEvidence.implementationFiles) { + const source = context.backendSource.files.find((f) => f.path === file.path); + assert(source); + same(source.sha256, file.sha256); + } + same( + dependencyEvidence.models, + extraModels.map((m) => ({ repoId: m.repoId, revision: m.selectedRevision })), + ); + } else assert(!dependencyEvidence || dependencyEvidence.models.length === 0); + same( + modelIdentities + .filter((m) => !extraModels.includes(m)) + .map((m) => m.repoId) + .sort(), + [...resolvedModelRepos].sort(), + ); + for (const m of modelIdentities) { + assert.match(m.selectedRevision, /^[a-f0-9]{40}$/u); + same(m.modelRevision, `${m.repoId}@${m.selectedRevision}`); + assert(m.fingerprint); + } + assert.equal(value(owner.node, 'dtype'), 'bfloat16'); + let recipe = null; + let audioOwner = null; + const sourceVideoGeometry = []; + if (modularImage) { + same(snapshot.studioForm.mode, 'text_to_image'); + same(entries.length, 5); + same(value(owner.node, 'weight_format'), 'native'); + same(value(owner.node, 'weight_loading_mode'), 'cpu'); + same(value(owner.node, 'trust_remote_code'), false); + const quant = owner.node.params.quant_config; + assert(quant && !quant.sourceId && !quant.sourceKey); + assert(quant.value === undefined || quant.value === null); + same(captured.get(owner.id).fields.quant_config, { source: 'literal', value: null }); + assert(!Object.hasOwn(captured.get(owner.id).omittedFields ?? {}, 'quant_config')); + requireCaptured(owner, ['weight_loading_mode']); + for (const key of ['unet', 'vae', 'controlnet', 'lora_list', 'modiff_pipeline_identity']) { + const parameter = owner.node.params[key]; + assert(!parameter?.sourceId && !parameter?.sourceKey); + assert(parameter?.value === undefined || parameter?.value === null); + } + const encode = single('modules.ModularDiffusers.WorkflowTextEncode'); + const denoise = single('modules.ModularDiffusers.WorkflowImageDenoise'); + const decode = single('modules.ModularDiffusers.WorkflowDecodeImage'); + const preview = single('modules.Image.Preview'); + for (const role of [encode, denoise, decode]) { + requireCaptured(role, ['pipeline_class']); + same(value(role.node, 'pipeline_class'), pipelineClass); + wire(role, 'pipeline_components', owner, 'pipeline_components'); + same(value(role.node, 'workflow_id'), value(owner.node, 'workflow_id')); + } + same(value(owner.node, 'workflow_id'), 'text2image'); + requireCaptured(encode, ['prompt']); + requireCaptured(denoise, ['width', 'height', 'seed', 'min_generation_area']); + wire(denoise, 'state_in', encode, 'state_out'); + wire(decode, 'state_in', denoise, 'state_out'); + wire(preview, 'image', decode, 'images'); + same(output.nodeId, preview.id); + } else if (modularAudio) { + same(snapshot.studioForm.mode, 'text_to_audio'); + same(entries.length, 5); + same(value(owner.node, 'weight_format'), 'native'); + same(value(owner.node, 'weight_loading_mode'), 'cpu'); + same(value(owner.node, 'trust_remote_code'), false); + const semantic = single('modules.ModularDiffusers.WorkflowSemanticGeneration'); + const denoise = single('modules.ModularDiffusers.WorkflowDenoise'); + const decode = single('modules.ModularDiffusers.WorkflowDecodeAudio'); + const exported = single('modules.Audio.Export'); + for (const r of [semantic, denoise, decode]) { + same(value(r.node, 'pipeline_class'), pipelineClass); + wire(r, 'pipeline_components', owner, 'pipeline_components'); + } + requireCaptured(semantic, ['pipeline_class', 'prompt', 'audio_duration', 'seed']); + requireCaptured(denoise, ['pipeline_class', 'num_inference_steps']); + wire(denoise, 'state_in', semantic, 'state_out'); + wire(decode, 'state_in', denoise, 'state_out'); + wire(exported, 'audio', decode, 'audio'); + same(output.nodeId, exported.id); + } else { + recipe = audiovisual + ? { + id: owner.node.params.execution_recipe?.sourceId, + node: api.nodes[owner.node.params.execution_recipe?.sourceId], + } + : single('modules.DiffusersRuntime.DiffusersExecutionRecipe'); + assert(recipe.node && kind(recipe.node) === 'modules.DiffusersRuntime.DiffusersExecutionRecipe'); + const quant = audiovisual + ? { + id: recipe.node.params.quantization_config?.sourceId, + node: api.nodes[recipe.node.params.quantization_config?.sourceId], + } + : single('modules.DiffusersRuntime.PipelineQuantizationConfigV2'); + assert(quant.node && kind(quant.node) === 'modules.DiffusersRuntime.PipelineQuantizationConfigV2'); + wire(owner, 'execution_recipe', recipe, 'execution_recipe'); + wire(recipe, 'quantization_config', quant, 'quantization_config'); + same(value(quant.node, 'backend'), 'none'); + same(value(quant.node, 'dtype'), 'bfloat16'); + requireCaptured(quant, ['dtype']); + requireCaptured(recipe, ['offload_mode', 'device']); + same(value(recipe.node, 'offload_mode'), value(owner.node, 'offload_mode')); + same(value(recipe.node, 'device'), value(owner.node, 'device')); + const module = owner.node.module; + const denoisers = entries.filter(([, n]) => kind(n) === `${module}.Denoise`); + const renders = observedAuto ? entries.filter(([, n]) => kind(n) === `${module}.Generate`) : []; + assert(denoisers.length + renders.length >= 1 && denoisers.length + renders.length <= 9); + if (renders.length) { + same(pipelineClass, 'WanVACEPipeline'); + same(denoisers.length, 0); + same(renders.length, 1); + } + const decoders = entries.filter(([, n]) => kind(n) === `${module}.DecodeLatents`); + same(decoders.length, denoisers.length); + for (const [id, node] of [...denoisers, ...renders]) { + const denoise = { id, node }; + wire(denoise, 'pipeline', owner, 'pipeline'); + const encodeId = node.params.encoded_inputs?.sourceId; + assert.equal(kind(api.nodes[encodeId]), `${module}.EncodeInputs`); + const encode = { id: encodeId, node: api.nodes[encodeId] }; + wire(encode, 'pipeline', owner, 'pipeline'); + if (observedAuto) { + same(value(encode.node, 'mode'), snapshot.studioForm.mode); + same(captured.get(encode.id).fields.executed_task, { source: 'literal', value: snapshot.studioForm.mode }); + same(captured.get(denoise.id).fields.executed_task, { source: 'literal', value: snapshot.studioForm.mode }); + } + requireCaptured(denoise, ['width', 'height', 'num_inference_steps', 'guidance_scale', 'seed']); + if (Object.hasOwn(encode.node.params.prompt ?? {}, 'value')) requireCaptured(encode, ['prompt']); + if (renders.some(([key]) => key === id)) { + requireCaptured(denoise, ['output_type', 'num_frames']); + same(value(node, 'output_type'), 'pil'); + same(value(node, 'mode'), snapshot.studioForm.mode); + continue; + } + const latentPort = 'latents_out'; + const matches = decoders.filter( + ([, n]) => n.params.latents?.sourceId === id && n.params.latents?.sourceKey === latentPort, + ); + same(matches.length, 1); + wire({ id: matches[0][0], node: matches[0][1] }, 'pipeline', owner, 'pipeline'); + if (audiovisual) { + requireCaptured(denoise, ['num_frames']); + wire({ id: matches[0][0], node: matches[0][1] }, 'latent_binding', denoise, 'latent_binding'); + } + if (observedAuto) { + const decode = { id: matches[0][0], node: matches[0][1] }; + wire(decode, 'latent_binding', denoise, 'latent_binding'); + requireCaptured(decode, ['output_type']); + same(value(decode.node, 'output_type'), 'pil'); + if (pipelineClass === 'WanVideoToVideoPipeline') { + // The official call consumes source video, not the inactive form's + // num_frames. Bind the actual encoded length to its normalization. + requireCaptured(denoise, ['strength']); + const normalizeId = encode.node.params.video?.sourceId; + const normalize = { id: normalizeId, node: api.nodes[normalizeId] }; + assert(normalize.node); + requireCaptured(normalize, ['width', 'height', 'num_frames']); + const source = captured.get(encode.id).fields; + for (const field of ['video_source_frames', 'video_source_sha256']) { + same(source[field]?.source, 'connected'); + same([source[field].sourceNodeId, source[field].sourcePortId], [normalizeId, 'output']); + } + const frames = source.video_source_frames.value; + assert(Number.isSafeInteger(frames) && frames > 0 && frames <= 241 && (frames - 1) % 4 === 0); + same(frames, Number(value(normalize.node, 'num_frames'))); + assert.match(source.video_source_sha256.value, /^[a-f0-9]{64}$/u); + const dimensions = ['width', 'height'].map((field) => { + const dimension = captured.get(denoise.id).fields[field].value; + same(dimension, Number(value(normalize.node, field))); + return dimension; + }); + sourceVideoGeometry.push({ width: dimensions[0], height: dimensions[1], frames }); + } else requireCaptured(denoise, ['num_frames']); + same(value(node, 'mode'), snapshot.studioForm.mode); + same(captured.get(decode.id).fields.executed_task, { source: 'literal', value: snapshot.studioForm.mode }); + } + } + assert( + (observedAuto + ? ['modules.Video.Export', 'modules.Video.ConcatenateAssets'] + : ['modules.Image.Preview', 'modules.Video.Export', ...(audiovisual ? ['modules.Video.ExportWithAudio'] : [])] + ).includes(kind(api.nodes[output.nodeId])), + ); + } + if (audiovisual) { + same(snapshot.studioForm.mode, 'text_to_audio'); + same(pipelineClass, 'LTXConditionPipeline'); + same([ownerRepo, revision], reviewedNativeVideo.LTXConditionPipeline); + audioOwner = single('modules.DiffusersAudio.LoadPipeline'); + same(value(audioOwner.node, 'pipeline_class'), 'AceStepPipeline'); + same(repo(value(audioOwner.node, 'model_id')), 'ACE-Step/acestep-v15-xl-turbo-diffusers'); + same(value(audioOwner.node, 'revision'), '200ba991ae448051e14b0183157e35c2d27c9fb0'); + requireCaptured(audioOwner, [ + 'model_id', + 'pipeline_class', + 'revision', + 'dtype', + 'device', + 'auto_offload', + 'offload_mode', + ]); + for (const field of ['dtype', 'device', 'auto_offload', 'offload_mode']) + same(value(audioOwner.node, field), value(owner.node, field)); + const audioRecipe = { + id: audioOwner.node.params.execution_recipe?.sourceId, + node: api.nodes[audioOwner.node.params.execution_recipe?.sourceId], + }; + assert(audioRecipe.node && kind(audioRecipe.node) === 'modules.DiffusersRuntime.DiffusersExecutionRecipe'); + assert(audioRecipe.id !== recipe.id); + wire(audioOwner, 'execution_recipe', audioRecipe, 'execution_recipe'); + const audioQuant = { + id: audioRecipe.node.params.quantization_config?.sourceId, + node: api.nodes[audioRecipe.node.params.quantization_config?.sourceId], + }; + assert(audioQuant.node && kind(audioQuant.node) === 'modules.DiffusersRuntime.PipelineQuantizationConfigV2'); + wire(audioRecipe, 'quantization_config', audioQuant, 'quantization_config'); + same(value(audioQuant.node, 'backend'), 'none'); + same(value(audioQuant.node, 'dtype'), 'bfloat16'); + requireCaptured(audioRecipe, ['offload_mode', 'device']); + for (const field of ['offload_mode', 'device']) same(value(audioRecipe.node, field), value(audioOwner.node, field)); + const song = single('modules.DiffusersAudio.Generate'); + wire(song, 'pipeline', audioOwner, 'pipeline'); + requireCaptured(song, [ + 'prompt', + 'lyrics', + 'task_type', + 'audio_duration', + 'seed', + 'num_inference_steps', + 'guidance_scale', + 'shift', + 'bpm', + 'keyscale', + 'timesignature', + 'vocal_language', + ]); + const fit = single('modules.Audio.FitDuration'), + overlay = single('modules.Video.LyricOverlay'), + exported = single('modules.Video.ExportWithAudio'); + wire(fit, 'audio', song, 'audio'); + wire(exported, 'audio', fit, 'output'); + wire(exported, 'video', overlay, 'output'); + same(output.nodeId, exported.id); + requireCaptured(exported, ['fps']); + } + if (observedAuto) { + same(owner.node.module, 'modules.DiffusersVideo'); + nativeVideoStructure(api.nodes, snapshot.studioForm.mode); + nativeVideoModels(api.nodes, modelIdentities, owner.node); + same(hints.resourceMode, 'auto'); + same(hints.workflowAutoPlan.schemaVersion, 1); + same(hints.workflowAutoPlan.graphHash, workerGraphHash(api)); + const preparation = task.runtimePreparation; + const auto = preparation.workflowAuto; + assert(['dependency_order_retained_owners', 'dependency_order_release_owners'].includes(auto.strategy)); + if (auto.strategy === 'dependency_order_release_owners') { + const order = auto.schedule.executionOrder; + same([...order].sort(), entries.map(([id]) => id).sort()); + same(new Set(order).size, order.length); + for (const [id, node] of entries) + for (const p of Object.values(node.params)) + if (p.sourceId) assert(order.indexOf(p.sourceId) < order.indexOf(id)); + for (const release of auto.schedule.releases) { + same(order[release.afterIndex], release.afterNodeId); + for (const id of release.nodeIds) assert(api.nodes[id]); + } + } + assertFiniteObservedJson(preparation); + for (const field of ['reusedOwnerIds', 'preparedDataNodes', 'appliedUpdates', 'releases']) + assert(Array.isArray(auto[field])); + assert(auto.resolvedFields && typeof auto.resolvedFields === 'object'); + for (const role of [owner, recipe]) { + assert(auto.resolvedFields[role.id]); + for (const field of role === owner + ? ['revision', 'dtype', 'device', 'offload_mode', 'auto_offload', 'pipeline_class'] + : ['device', 'offload_mode']) { + same(auto.resolvedFields[role.id][field], value(role.node, field)); + } + } + assert(context.nativeAutoBindings); + for (const value of Object.values(context.nativeAutoBindings)) + assert(typeof value === 'string' && value.length > 0); + } + const proof = createHash('sha256') + .update(JSON.stringify(stableJsonValue({ taskId, receipt, apiNodes: api.nodes, apiPaths: api.paths }))) + .digest('hex'); + return { + source: observedAuto + ? OBSERVED_NATIVE_AUTO_VIDEO_SOURCE + : modularImage + ? 'executed-expert-modular-image-workflow-v1' + : audiovisual + ? 'executed-expert-audiovisual-graph-v1' + : modularAudio + ? 'executed-expert-modular-audio-graph-v1' + : 'executed-expert-standard-media-graph-v1', + modelType: audioOwner ? value(audioOwner.node, 'pipeline_class') : pipelineClass, + pipelineClass: audioOwner ? value(audioOwner.node, 'pipeline_class') : pipelineClass, + modelRepo: audioOwner ? repo(value(audioOwner.node, 'model_id')) : ownerRepo, + resolvedModelRepo: audioOwner ? repo(value(audioOwner.node, 'model_id')) : ownerRepo, + resolvedArtifact: audioOwner ? repo(value(audioOwner.node, 'model_id')) : ownerRepo, + dtype: value(owner.node, 'dtype'), + device: value(owner.node, 'device'), + autoOffload: value(owner.node, 'auto_offload'), + offloadMode: value(owner.node, 'offload_mode'), + resourceMode, + resolvedResourceMode: resourceMode, + quantizationMode: 'none', + quantizedComponents: [], + ...(recipe + ? { deviceMap: value(recipe.node, 'device_map') } + : { weightFormat: 'native', weightLoadingMode: 'cpu' }), + observation: { + taskId, + nodeCount: entries.length, + capturedInputsSHA256: proof, + fullFieldAccountingClaimed: false, + ...(dependencyEvidence ? { modelDependencyEvidence: dependencyEvidence } : {}), + ...(modularAudio ? { lyricsCaptureClaimed: false } : {}), + ...(modularImage ? { workflowSelectorCaptureClaimed: false, fixedSamplerCaptureClaimed: false } : {}), + ...(jsonSuppliers.length + ? { jsonSupplierControlsCaptured: false, referenceScaleConsumerValuesVerified: true } + : {}), + ...(audioOwner + ? { + audioGraphTaskCaptured: false, + fittingControlsCaptured: false, + preparationModeCaptured: task.runtimePreparation?.resourceMode !== undefined, + mediaResourceOwners: [owner, audioOwner].map((role) => ({ + nodeId: role.id, + pipelineClass: value(role.node, 'pipeline_class'), + repoId: repo(value(role.node, 'model_id')), + revision: value(role.node, 'revision'), + })), + } + : {}), + hardwareQualification: false, + ...(sourceVideoGeometry.length ? { sourceVideoGeometry } : {}), + ...(graphSubmission ? { outputApiGraphSnapshotCaptured: false, graphSubmission } : {}), + ...(observedAuto ? { bindings: context.nativeAutoBindings, runtimePreparation: task.runtimePreparation } : {}), + }, + }; +} + +export function inspectExecutedNativeMedia(api, context) { + const modularAudio = Object.values(api?.nodes ?? {}).some( + (n) => kind(n) === 'modules.ModularDiffusers.WorkflowSemanticGeneration', + ); + const modularImage = Object.values(api?.nodes ?? {}).some( + (n) => kind(n) === 'modules.ModularDiffusers.WorkflowImageDenoise', + ); + return inspect(api, context, modularAudio, modularImage); +} + +export function executedNativeMediaPlan(api, context) { + try { + return inspectExecutedNativeMedia(api, context); + } catch { + return null; + } +} + +export function observedNativeAutoVideoPlan(api, context) { + try { + return inspectObservedNativeAutoVideo(api, context); + } catch { + return null; + } +} + +export function inspectObservedNativeAutoVideo(api, context) { + return inspect(api, context, false, false, true); +} + +export function observedNativeAutoVideoResourceId(plan) { + if ( + plan?.source !== OBSERVED_NATIVE_AUTO_VIDEO_SOURCE || + plan.resourceMode !== 'auto' || + !plan.observation?.bindings || + !plan.observation?.runtimePreparation + ) + return null; + return `observed-native-auto-video-v1:${canonicalJsonHash(plan)}`; +} + +export function observedNativeAutoVideoProofMatches(plan, provenance, submissionContext = {}) { + try { + assert(observedNativeAutoVideoResourceId(plan)); + same(plan.observation.bindings, { + canonicalGraphHash: provenance.graph.hash, + modelSetHash: provenance.models.hash, + inputArtifactsHash: provenance.inputs.hash, + backendSourceFingerprint: provenance.runtime.backendSource.fingerprint, + }); + const graph = provenance.graph.canonicalGraph; + if (plan.observation.graphSubmission) { + same(plan.observation.outputApiGraphSnapshotCaptured, false); + same(capturedNativeGraphSubmission(plan.observation.graphSubmission).record, plan.observation.graphSubmission); + same(submissionContext.submittedGraphIdentity?.hash, provenance.graph.hash); + same(submissionContext.submittedGraphIdentity?.canonicalGraph, graph); + } else assert(plan.observation.outputApiGraphSnapshotCaptured === undefined); + same(provenance.graph.hash, 'sha256:canonical-graph-v1:' + canonicalJsonHash(graph)); + const nodes = Object.fromEntries(graph.nodes.map((n) => [n.key, n])); + const { owner, recipe } = nativeVideoStructure(nodes, provenance.template.lockedSettings.mode); + nativeVideoModels(nodes, provenance.models.items, owner.node); + if (value(owner.node, 'pipeline_class') === 'WanVideoToVideoPipeline') { + const normalize = graph.nodes.filter((n) => kind(n) === 'modules.VideoConditioning.Normalize'); + same(normalize.length, 1); + same(plan.observation.sourceVideoGeometry, [ + { + width: Number(value(normalize[0], 'width')), + height: Number(value(normalize[0], 'height')), + frames: Number(value(normalize[0], 'num_frames')), + }, + ]); + } else assert(plan.observation.sourceVideoGeometry === undefined); + const repository = repo(value(owner.node, 'model_id')); + for (const [field, expected] of Object.entries({ + modelType: value(owner.node, 'pipeline_class'), + pipelineClass: value(owner.node, 'pipeline_class'), + modelRepo: repository, + resolvedModelRepo: repository, + resolvedArtifact: repository, + dtype: value(owner.node, 'dtype'), + device: value(owner.node, 'device'), + autoOffload: value(owner.node, 'auto_offload'), + offloadMode: value(owner.node, 'offload_mode'), + resourceMode: 'auto', + resolvedResourceMode: 'auto', + quantizationMode: 'none', + quantizedComponents: [], + deviceMap: value(recipe.node, 'device_map'), + })) + same(plan[field], expected); + same(plan.observation.taskId, provenance.taskId); + same(plan.observation.nodeCount, graph.nodes.length); + same(plan.observation.hardwareQualification, false); + same(plan.observation.fullFieldAccountingClaimed, false); + const preparation = plan.observation.runtimePreparation; + assertFiniteObservedJson(preparation); + same(preparation.resourceMode, 'auto'); + const candidates = Object.values(preparation.workflowAuto.resolvedFields).filter( + (r) => r.pipeline_class === plan.pipelineClass && repo(r.model_id) === repository, + ); + same(candidates.length, 1); + for (const field of ['revision', 'dtype', 'device', 'auto_offload', 'offload_mode', 'pipeline_class']) + same(candidates[0][field], value(owner.node, field)); + return true; + } catch { + return false; + } +} diff --git a/scripts/executed-native-media-resource.test.mjs b/scripts/executed-native-media-resource.test.mjs new file mode 100644 index 00000000..1a66e8e9 --- /dev/null +++ b/scripts/executed-native-media-resource.test.mjs @@ -0,0 +1,1014 @@ +import assert from 'node:assert/strict'; +import { test } from 'node:test'; +import { + capturedNativeGraphSubmission, + executedNativeMediaPlan, + observedNativeAutoVideoPlan, + observedNativeAutoVideoResourceId, + observedNativeAutoVideoProofMatches, +} from './executed-native-media-resource.mjs'; +import { + executionPlanIdentity, + executionReceiptIdentity, + canonicalGraphIdentity, + modelSetIdentity, +} from './live-proof-provenance.mjs'; +import { workerGraphHash } from './observed-workflow-auto-resource.mjs'; +import { canonicalJsonHash } from './canonical-json.mjs'; + +test('native Auto can bind a missing client graph snapshot to the exact captured graph POST', () => { + const { api, context } = nativeAutoFixture('WanVideoToVideoPipeline', 'video_color_edit'); + api.runtimeHints.workflowSnapshot.savedHierarchy = Array.from({ length: 24 }).reduce((v) => ({ child: v }), {}); + delete context.executedOutput.apiGraphSnapshot; + assert.equal(observedNativeAutoVideoPlan(api, context), null); + context.nativeGraphSubmission = { + method: 'POST', + url: 'http://127.0.0.1:8278/graph', + contentType: 'application/json', + body: JSON.stringify(api), + }; + const before = JSON.stringify(context); + const plan = observedNativeAutoVideoPlan(api, context); + assert(plan); + assert.equal(plan.observation.outputApiGraphSnapshotCaptured, false); + assert.equal(plan.observation.graphSubmission.body, context.nativeGraphSubmission.body); + assert.equal(JSON.stringify(context), before); + assert.equal(executionPlanIdentity(api, context).plan.source, plan.source); + const provenance = { + taskId: context.taskId, + template: { lockedSettings: { mode: 'video_color_edit' } }, + graph: canonicalGraphIdentity(api), + models: { hash: context.nativeAutoBindings.modelSetHash, items: context.modelIdentities }, + inputs: { hash: context.nativeAutoBindings.inputArtifactsHash }, + runtime: { backendSource: context.backendSource }, + }; + const submittedGraphIdentity = canonicalGraphIdentity(api); + assert.equal(observedNativeAutoVideoProofMatches(plan, provenance), false); + assert(observedNativeAutoVideoProofMatches(plan, provenance, { submittedGraphIdentity })); + const alteredPlan = structuredClone(plan); + const alteredApi = JSON.parse(alteredPlan.observation.graphSubmission.body); + alteredApi.nodes.denoise.params.seed.value++; + alteredPlan.observation.graphSubmission = capturedNativeGraphSubmission({ + ...alteredPlan.observation.graphSubmission, + body: JSON.stringify(alteredApi), + }).record; + assert.equal( + observedNativeAutoVideoProofMatches(alteredPlan, provenance, { + submittedGraphIdentity: canonicalGraphIdentity(alteredApi), + }), + false, + ); + for (const change of [ + (s) => (s.method = 'GET'), + (s) => (s.url = 'https://example.com/graph'), + (s) => (s.contentType = 'text/plain'), + (s) => (s.body = '{'), + (s) => (s.body = JSON.stringify({ ...api, sid: 'another-session' })), + (s) => (s.body = JSON.stringify(Array.from({ length: 65 }).reduce((v) => [v], {}))), + (s) => (s.body = '{"value":1e999}'), + ]) { + const altered = structuredClone(context); + change(altered.nativeGraphSubmission); + assert.equal(observedNativeAutoVideoPlan(api, altered), null); + } + context.executedOutput.apiGraphSnapshot = { ...api, sid: 'contradictory-snapshot' }; + assert.equal(observedNativeAutoVideoPlan(api, context), null); +}); + +function workflowImageFixture() { + const state = fixture(true); + const { api, context } = state; + const literal = (value) => ({ value }); + api.runtimeHints.workflowSnapshot.studioForm.mode = 'text_to_image'; + const nodes = api.nodes; + nodes.owner.params.workflow_id = literal('text2image'); + nodes.owner.params.quant_config = { display: 'input' }; + nodes.semantic.action = 'WorkflowTextEncode'; + for (const key of ['lyrics', 'audio_duration', 'seed']) delete nodes.semantic.params[key]; + nodes.denoise.action = 'WorkflowImageDenoise'; + delete nodes.denoise.params.num_inference_steps; + Object.assign(nodes.denoise.params, { + width: literal(2048), + height: literal(2048), + seed: literal(12), + min_generation_area: literal(4194304), + }); + nodes.decode.action = 'WorkflowDecodeImage'; + for (const id of ['semantic', 'denoise', 'decode']) nodes[id].params.workflow_id = literal('text2image'); + nodes.output.module = 'modules.Image'; + nodes.output.action = 'Preview'; + nodes.output.params = { image: { sourceId: 'decode', sourceKey: 'images', display: 'input' } }; + const receipt = context.executedOutput.resolvedExecutionInputs; + receipt.graphTasks[0].task = 'text_to_image'; + receipt.nodes = api.paths[0].map((nodeId) => ({ + nodeId, + module: nodes[nodeId].module, + action: nodes[nodeId].action, + omittedFields: {}, + fields: Object.fromEntries( + Object.entries(nodes[nodeId].params) + .filter(([, p]) => Object.hasOwn(p, 'value')) + .map(([key, p]) => [key, { source: 'literal', value: p.value?.source === 'hub' ? p.value.value : p.value }]), + ), + })); + receipt.nodes.find((row) => row.nodeId === 'owner').fields.quant_config = { source: 'literal', value: null }; + return state; +} + +test('records native text-to-image workflow phases without inferring fixed sampler or selector capture', () => { + const { api, context } = workflowImageFixture(); + const plan = executedNativeMediaPlan(api, context); + assert.equal(plan?.source, 'executed-expert-modular-image-workflow-v1'); + assert.equal(plan.observation.fixedSamplerCaptureClaimed, false); + assert.equal(plan.observation.workflowSelectorCaptureClaimed, false); + assert.equal(plan.observation.fullFieldAccountingClaimed, false); +}); + +test('workflow image evidence rejects altered native controls, model state, phase wiring and task type', () => { + for (const mutate of [ + ({ api }) => { + api.nodes.owner.params.quant_config.value = { backend: 'bnb' }; + }, + ({ api }) => { + api.nodes.owner.params.unet = { value: 'borrowed' }; + }, + ({ api }) => { + api.nodes.decode.params.state_in.sourceKey = 'other'; + }, + ({ api }) => { + api.nodes.semantic.params.workflow_id.value = 'image_conditioned'; + }, + ({ api }) => { + api.runtimeHints.workflowSnapshot.studioForm.mode = 'edit_image'; + }, + ({ context }) => { + context.executedOutput.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'denoise').fields.seed.value++; + }, + ({ context }) => { + context.executedOutput.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'owner').fields.quant_config.value = + {}; + }, + ]) { + const state = workflowImageFixture(); + mutate(state); + assert.equal(executedNativeMediaPlan(state.api, state.context), null); + } +}); + +function fixture(modularAudio = false) { + const literal = (v) => ({ value: v }); + const wire = (sourceId, sourceKey) => ({ sourceId, sourceKey, display: 'input' }); + const node = (module, action, params) => ({ module, action, params }); + const scope = modularAudio ? 'modules.ModularDiffusers' : 'modules.DiffusersImage'; + const pipelineClass = modularAudio ? 'ExampleModularPipeline' : 'ExampleImagePipeline'; + const mode = modularAudio ? 'text_to_audio' : 'edit_image'; + const nodes = {}; + nodes.owner = node(scope, modularAudio ? 'ModelsLoader' : 'LoadPipeline', { + [modularAudio ? 'repo_id' : 'model_id']: literal({ source: 'hub', value: 'example/model' }), + revision: literal('a'.repeat(40)), + [modularAudio ? 'model_type' : 'pipeline_class']: literal(pipelineClass), + dtype: literal('bfloat16'), + device: literal('cuda:0'), + auto_offload: literal(true), + offload_mode: literal('model_cpu'), + ...(modularAudio + ? { weight_format: literal('native'), weight_loading_mode: literal('cpu'), trust_remote_code: literal(false) } + : { execution_recipe: wire('recipe', 'execution_recipe') }), + }); + if (modularAudio) { + nodes.semantic = node(scope, 'WorkflowSemanticGeneration', { + pipeline_components: wire('owner', 'pipeline_components'), + pipeline_class: literal(pipelineClass), + prompt: literal('Original song'), + lyrics: literal('Original lyrics'), + audio_duration: literal(60), + seed: literal(12), + }); + nodes.denoise = node(scope, 'WorkflowDenoise', { + pipeline_components: wire('owner', 'pipeline_components'), + pipeline_class: literal(pipelineClass), + state_in: wire('semantic', 'state_out'), + num_inference_steps: literal(30), + }); + nodes.decode = node(scope, 'WorkflowDecodeAudio', { + pipeline_components: wire('owner', 'pipeline_components'), + pipeline_class: literal(pipelineClass), + state_in: wire('denoise', 'state_out'), + }); + nodes.output = node('modules.Audio', 'Export', { audio: wire('decode', 'audio'), sample_rate: literal(44100) }); + } else { + nodes.quant = node('modules.DiffusersRuntime', 'PipelineQuantizationConfigV2', { + backend: literal('none'), + dtype: literal('bfloat16'), + }); + nodes.recipe = node('modules.DiffusersRuntime', 'DiffusersExecutionRecipe', { + quantization_config: wire('quant', 'quantization_config'), + device: literal('cuda:0'), + offload_mode: literal('model_cpu'), + device_map: literal('none'), + }); + nodes.encode = node(scope, 'EncodeInputs', { + pipeline: wire('owner', 'pipeline'), + prompt: literal('Original scene'), + }); + nodes.denoise = node(scope, 'Denoise', { + pipeline: wire('owner', 'pipeline'), + encoded_inputs: wire('encode', 'encoded_inputs'), + width: literal(1024), + height: literal(1024), + num_inference_steps: literal(28), + guidance_scale: literal(3.5), + seed: literal(12), + }); + nodes.decode = node(scope, 'DecodeLatents', { + pipeline: wire('owner', 'pipeline'), + latents: wire('denoise', 'latents_out'), + }); + nodes.output = node('modules.Image', 'Preview', { image: wire('decode', 'images') }); + } + const order = modularAudio + ? ['owner', 'semantic', 'denoise', 'decode', 'output'] + : ['quant', 'recipe', 'owner', 'encode', 'denoise', 'decode', 'output']; + const snapshot = { studioForm: { resourceMode: 'expert', mode }, nodes: [] }; + const api = { + sid: 'native', + nodes, + paths: [order], + runtimeHints: { + workflowSnapshot: snapshot, + workflowTabId: 'workflow', + clientRunId: 'client', + runInputHash: 'inputs', + }, + }; + const captured = order.map((nodeId) => ({ + nodeId, + module: nodes[nodeId].module, + action: nodes[nodeId].action, + omittedFields: {}, + fields: Object.fromEntries( + Object.entries(nodes[nodeId].params) + .filter(([key, p]) => Object.hasOwn(p, 'value') && !(modularAudio && key === 'lyrics')) + .map(([key, p]) => [key, { source: 'literal', value: p.value?.source === 'hub' ? p.value.value : p.value }]), + ), + })); + const output = { + nodeId: 'output', + taskId: 'task', + attemptIndex: 0, + sid: 'native', + workflowTabId: 'workflow', + clientRunId: 'client', + runInputHash: 'inputs', + apiGraphSnapshot: api, + formSnapshot: snapshot.studioForm, + resolvedExecutionInputs: { + schemaVersion: 1, + source: 'backend-execution', + taskId: 'task', + nodeId: 'output', + attemptIndex: 0, + truncated: false, + uncapturedNodeIds: [], + nodes: captured, + graphTasks: [{ loaderId: 'owner', pipelineClass, task: mode }], + }, + }; + const task = { + task_id: 'task', + status: 'completed', + attempt_index: 0, + sid: 'native', + workflow_tab_id: 'workflow', + client_run_id: 'client', + run_input_hash: 'inputs', + resourceCandidateId: null, + runtimePreparation: { resourceMode: 'expert' }, + workflow_snapshot: snapshot, + }; + const model = { + repoId: 'example/model', + selectedRevision: 'a'.repeat(40), + modelRevision: 'example/model@' + 'a'.repeat(40), + fingerprint: 'sha256:' + 'b'.repeat(64), + }; + return { + api, + context: { + taskId: 'task', + executionReceipt: task, + executedOutput: output, + modelIdentities: [model], + resolvedModelRepos: ['example/model'], + backendSource: { fingerprint: 'sha256:backend-source-v1:' + 'c'.repeat(64), files: [] }, + }, + }; +} + +function refreshCapturedFixture({ api, context }, connectedValues = {}) { + const receipt = context.executedOutput.resolvedExecutionInputs; + receipt.nodes = api.paths[0].map((nodeId) => ({ + nodeId, + module: api.nodes[nodeId].module, + action: api.nodes[nodeId].action, + omittedFields: {}, + fields: Object.fromEntries( + Object.entries(api.nodes[nodeId].params) + .filter(([, p]) => Object.hasOwn(p, 'value') || p.sourceId) + .map(([key, p]) => [ + key, + p.sourceId + ? { + source: 'connected', + sourceNodeId: p.sourceId, + sourcePortId: p.sourceKey, + value: connectedValues[key] ?? null, + } + : { source: 'literal', value: p.value?.source === 'hub' ? p.value.value : p.value }, + ]), + ), + })); +} + +function weightedReferenceFixture() { + const state = fixture(); + const { api, context } = state; + api.nodes.owner.params.pipeline_class.value = 'FluxReduxPipeline'; + api.runtimeHints.workflowSnapshot.studioForm.mode = 'multi_image_reference_edit'; + context.executedOutput.resolvedExecutionInputs.graphTasks[0] = { + loaderId: 'owner', + pipelineClass: 'FluxReduxPipeline', + task: 'multi_image_reference_edit', + }; + api.nodes.weights = { + module: 'modules.Text', + action: 'ProcessText', + params: { + pipeline_class: { value: 'BuiltinDataOperationV1' }, + operation: { value: 'data_conversion' }, + target_type: { value: 'json' }, + source: { value: '[0.8,0.2]' }, + }, + }; + for (const field of ['prompt_embeds_scale', 'pooled_prompt_embeds_scale']) + api.nodes.encode.params[field] = { sourceId: 'weights', sourceKey: 'output', display: 'input' }; + api.paths[0].splice(3, 0, 'weights'); + refreshCapturedFixture(state, { prompt_embeds_scale: [0.8, 0.2], pooled_prompt_embeds_scale: [0.8, 0.2] }); + return state; +} + +test('weighted reference evidence joins a deterministic JSON supplier to both observed scale arrays', () => { + const { api, context } = weightedReferenceFixture(); + assert(executedNativeMediaPlan(api, context)); +}); + +test('weighted reference evidence rejects changed JSON, missing consumers and executable suppliers', () => { + for (const mutate of [ + ({ api }) => { + api.nodes.weights.params.source.value = '[0.2,0.8]'; + }, + ({ api }) => { + api.nodes.weights.params.source.value = '[0.8,1e999]'; + }, + ({ api }) => { + api.nodes.weights.params.operation.value = 'select'; + }, + ({ api }) => { + api.nodes.encode.params.pooled_prompt_embeds_scale.sourceKey = 'other'; + }, + ({ context }) => { + delete context.executedOutput.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'encode').fields + .prompt_embeds_scale; + }, + ({ api }) => { + api.nodes.weights.module = 'custom.Unreviewed'; + }, + ]) { + const state = weightedReferenceFixture(); + mutate(state); + assert.equal(executedNativeMediaPlan(state.api, state.context), null); + } +}); + +function audiovisualFixture() { + const state = fixture(); + const { api, context } = state; + const lit = (value) => ({ value }); + const wire = (sourceId, sourceKey) => ({ sourceId, sourceKey, display: 'input' }); + const node = (module, action, params) => ({ module, action, params }); + for (const value of Object.values(api.nodes)) + if (value.module === 'modules.DiffusersImage') value.module = 'modules.DiffusersVideo'; + api.nodes.owner.params.pipeline_class = lit('LTXConditionPipeline'); + api.nodes.owner.params.model_id = lit({ source: 'hub', value: 'Lightricks/LTX-Video-0.9.8-13B-distilled' }); + api.nodes.owner.params.revision = lit('7c64400e1861cc0d7b98d570a1926d5408ec60cd'); + api.nodes.denoise.params.num_frames = lit(81); + api.nodes.decode.params.latent_binding = wire('denoise', 'latent_binding'); + api.nodes.audioOwner = node('modules.DiffusersAudio', 'LoadPipeline', { + model_id: lit({ source: 'hub', value: 'ACE-Step/acestep-v15-xl-turbo-diffusers' }), + revision: lit('200ba991ae448051e14b0183157e35c2d27c9fb0'), + pipeline_class: lit('AceStepPipeline'), + dtype: lit('bfloat16'), + device: lit('cuda:0'), + offload_mode: lit('model_cpu'), + auto_offload: lit(true), + execution_recipe: wire('audioRecipe', 'execution_recipe'), + }); + api.nodes.audioQuant = structuredClone(api.nodes.quant); + api.nodes.audioRecipe = structuredClone(api.nodes.recipe); + api.nodes.audioRecipe.params.quantization_config = wire('audioQuant', 'quantization_config'); + api.nodes.song = node('modules.DiffusersAudio', 'Generate', { + pipeline: wire('audioOwner', 'pipeline'), + prompt: lit('Original song'), + lyrics: lit('Original words'), + task_type: lit('text2music'), + audio_duration: lit(45), + seed: lit(12), + num_inference_steps: lit(8), + guidance_scale: lit(1), + shift: lit(3), + bpm: lit(96), + keyscale: lit('D major'), + timesignature: lit('4'), + vocal_language: lit('en'), + }); + api.nodes.fit = node('modules.Audio', 'FitDuration', { audio: wire('song', 'audio') }); + api.nodes.overlay = node('modules.Video', 'LyricOverlay', { + video: wire('decode', 'frames'), + enabled: lit(false), + lrc: lit(''), + fps: lit(16), + }); + api.nodes.output = node('modules.Video', 'ExportWithAudio', { + video: wire('overlay', 'output'), + audio: wire('fit', 'output'), + fps: lit(16), + }); + api.paths = [ + [ + 'quant', + 'recipe', + 'owner', + 'encode', + 'denoise', + 'decode', + 'audioQuant', + 'audioRecipe', + 'audioOwner', + 'song', + 'fit', + 'overlay', + 'output', + ], + ]; + api.runtimeHints.workflowSnapshot.studioForm.mode = 'text_to_audio'; + context.executedOutput.resolvedExecutionInputs.graphTasks = [ + { loaderId: 'owner', pipelineClass: 'LTXConditionPipeline', task: 'image_to_video' }, + ]; + context.modelIdentities = [ + { + ...context.modelIdentities[0], + repoId: 'Lightricks/LTX-Video-0.9.8-13B-distilled', + selectedRevision: '7c64400e1861cc0d7b98d570a1926d5408ec60cd', + modelRevision: 'Lightricks/LTX-Video-0.9.8-13B-distilled@7c64400e1861cc0d7b98d570a1926d5408ec60cd', + }, + { + ...context.modelIdentities[0], + repoId: 'ACE-Step/acestep-v15-xl-turbo-diffusers', + selectedRevision: '200ba991ae448051e14b0183157e35c2d27c9fb0', + modelRevision: 'ACE-Step/acestep-v15-xl-turbo-diffusers@200ba991ae448051e14b0183157e35c2d27c9fb0', + }, + ]; + context.resolvedModelRepos = context.modelIdentities.map((m) => m.repoId); + refreshCapturedFixture(state); + return state; +} + +test('audiovisual evidence binds both executed owners without inventing audio task or fitting-control captures', () => { + const { api, context } = audiovisualFixture(); + const plan = executedNativeMediaPlan(api, context); + assert.equal(plan?.source, 'executed-expert-audiovisual-graph-v1'); + assert.equal(plan.modelType, 'AceStepPipeline'); + assert.equal(plan.observation.mediaResourceOwners.length, 2); + assert.equal(plan.observation.audioGraphTaskCaptured, false); + assert.equal(plan.observation.fittingControlsCaptured, false); + assert.equal(plan.observation.fullFieldAccountingClaimed, false); + delete context.executionReceipt.runtimePreparation; + assert.equal(executedNativeMediaPlan(api, context).observation.preparationModeCaptured, false); + context.executionReceipt.runtimePreparation = { resourceMode: 'auto' }; + assert.equal(executedNativeMediaPlan(api, context), null); +}); + +test('audiovisual evidence rejects borrowed owners, altered native audio values, incomplete captures and detached outputs', () => { + for (const mutate of [ + ({ api }) => { + api.nodes.song.params.pipeline.sourceId = 'owner'; + }, + ({ api }) => { + api.nodes.audioOwner.params.execution_recipe.sourceId = 'recipe'; + }, + ({ api }) => { + api.nodes.output.params.audio.sourceId = 'song'; + }, + ({ context }) => { + context.executedOutput.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'song').fields.lyrics.value = + 'Changed'; + }, + ({ context }) => { + context.modelIdentities.pop(); + }, + ({ context }) => { + context.executedOutput.resolvedExecutionInputs.uncapturedNodeIds = ['song']; + }, + ({ api }) => { + api.nodes.audioOwner.params.revision.value = 'main'; + }, + ({ api }) => { + api.runtimeHints.workflowSnapshot.studioForm.resourceMode = 'auto'; + }, + ]) { + const state = audiovisualFixture(); + mutate(state); + assert.equal(executedNativeMediaPlan(state.api, state.context), null); + } +}); + +test('detached ordinary image and modular audio recover a native manual identity', () => { + for (const audio of [false, true]) { + const { api, context } = fixture(audio); + const plan = executedNativeMediaPlan(api, context); + assert(plan); + assert.equal(plan.dtype, 'bfloat16'); + assert.equal(plan.observation.fullFieldAccountingClaimed, false); + assert.equal(plan.observation.hardwareQualification, false); + if (audio) assert.equal(plan.observation.lyricsCaptureClaimed, false); + const recovered = executionPlanIdentity(api, context).plan; + assert.equal(recovered.source, plan.source); + } +}); +test('native evidence rejects altered task, pin, controls, paths and capture', () => { + const changes = [ + ({ context }) => { + context.executionReceipt.status = 'failed'; + }, + ({ context }) => { + context.executedOutput.sid = 'foreign'; + }, + ({ context }) => { + context.modelIdentities[0].selectedRevision = 'd'.repeat(40); + }, + ({ api }) => { + api.nodes.denoise.params.seed.value = 13; + }, + ({ api }) => { + api.nodes.denoise.params.encoded_inputs.sourceId = 'owner'; + }, + ({ api }) => { + api.paths[0].reverse(); + }, + ({ context }) => { + context.executedOutput.resolvedExecutionInputs.truncated = true; + }, + ({ context }) => { + context.executedOutput.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'denoise').fields.seed = undefined; + }, + ({ api }) => { + api.nodes.encode.action = 'RunArbitraryCode'; + }, + ({ context }) => { + context.modelIdentities.push({ ...context.modelIdentities[0], repoId: 'extra/model' }); + }, + ]; + for (const change of changes) { + const f = fixture(); + change(f); + assert.equal(executedNativeMediaPlan(f.api, f.context), null); + } +}); +test('hidden adapter dependencies require a matching source-bound declaration', () => { + const f = fixture(); + const extra = { + repoId: 'example/base', + selectedRevision: 'd'.repeat(40), + modelRevision: 'example/base@' + 'd'.repeat(40), + fingerprint: 'sha256:' + 'e'.repeat(64), + }; + f.context.modelIdentities.push(extra); + f.context.backendSource.files = [{ path: 'modules/Example/main.py', sha256: 'f'.repeat(64) }]; + f.context.modelDependencyEvidence = { + pipelineClass: 'ExampleImagePipeline', + ownerRepoId: 'example/model', + backendSourceFingerprint: f.context.backendSource.fingerprint, + implementationFiles: [...f.context.backendSource.files], + models: [{ repoId: extra.repoId, revision: extra.selectedRevision }], + }; + assert(executedNativeMediaPlan(f.api, f.context)); + f.context.modelDependencyEvidence.implementationFiles[0] = { + path: 'modules/Example/main.py', + sha256: '0'.repeat(64), + }; + assert.equal(executedNativeMediaPlan(f.api, f.context), null); +}); + +function nativeAutoFixture(pipelineClass, mode, shots = 1, assets = false) { + const state = fixture(); + const { api, context } = state; + const literal = (value) => ({ value }); + const wire = (sourceId, sourceKey) => ({ sourceId, sourceKey }); + const nodes = api.nodes; + const [repository, revision] = + pipelineClass === 'LTXConditionPipeline' + ? ['Lightricks/LTX-Video-0.9.8-13B-distilled', '7c64400e1861cc0d7b98d570a1926d5408ec60cd'] + : pipelineClass === 'WanVACEPipeline' + ? ['Wan-AI/Wan2.1-VACE-1.3B-diffusers', 'ec4d2cb062b548996b179d493fdd05340de702a1'] + : ['Wan-AI/Wan2.1-T2V-1.3B-Diffusers', '0fad780a534b6463e45facd96134c9f345acfa5b']; + for (const id of ['owner', 'encode', 'denoise', 'decode']) nodes[id].module = 'modules.DiffusersVideo'; + Object.assign(nodes.owner.params, { + model_id: literal({ source: 'hub', value: repository }), + revision: literal(revision), + pipeline_class: literal(pipelineClass), + }); + nodes.denoise.params.mode = literal(mode); + nodes.encode.params.mode = literal(mode); + nodes.denoise.params.num_frames = literal(81); + nodes.decode.params.output_type = literal('pil'); + nodes.decode.params.latent_binding = wire('denoise', 'latent_binding'); + if (pipelineClass === 'WanVideoToVideoPipeline') { + nodes.source = { module: 'modules.Video', action: 'Load', params: { file: literal('@data/videos/source.mp4') } }; + nodes.normalize = { + module: 'modules.VideoConditioning', + action: 'Normalize', + params: { + video: wire('source', 'video'), + width: nodes.denoise.params.width, + height: nodes.denoise.params.height, + num_frames: literal(81), + fit: literal('cover'), + }, + }; + nodes.encode.params.video = wire('normalize', 'output'); + nodes.denoise.params.strength = literal(0.2); + } + nodes.output.module = 'modules.Video'; + nodes.output.action = 'Export'; + nodes.output.params = { video: wire('decode', 'video_out') }; + let previous = 'decode', + port = 'video_out'; + if (pipelineClass === 'WanVACEPipeline') { + nodes.denoise.action = 'Generate'; + nodes.denoise.params.output_type = literal('pil'); + delete nodes.decode; + previous = 'denoise'; + } + if (shots > 1) { + const items = {}; + for (let index = 0; index < shots; index++) { + const id = index === 0 ? 'decode' : `decode${index}`; + if (index) { + nodes[`encode${index}`] = structuredClone(nodes.encode); + nodes[`denoise${index}`] = structuredClone(nodes.denoise); + nodes[`denoise${index}`].params.encoded_inputs.sourceId = `encode${index}`; + nodes[id] = structuredClone(nodes.decode); + nodes[id].params.latents.sourceId = `denoise${index}`; + nodes[id].params.latent_binding.sourceId = `denoise${index}`; + } + let sourceId = id, + sourceKey = 'video_out'; + if (assets) { + sourceId = `save${index}`; + sourceKey = 'asset'; + nodes[sourceId] = { module: 'modules.Video', action: 'ExportAsset', params: { video: wire(id, 'video_out') } }; + } + items[index ? `item>>>${index}` : 'item'] = wire(sourceId, sourceKey); + } + nodes.clips = { module: 'modules.Primitive', action: 'ToList', params: items }; + if (assets) { + nodes.output.action = 'ConcatenateAssets'; + nodes.output.params = { clips: wire('clips', 'list') }; + } else { + nodes.compose = { module: 'modules.Video', action: 'Concatenate', params: { clips: wire('clips', 'list') } }; + previous = 'compose'; + port = 'output'; + } + } + if (!assets) nodes.output.params.video = wire(previous, port); + const ordered = [], + seen = new Set(); + function visit(id) { + if (seen.has(id)) return; + seen.add(id); + for (const p of Object.values(nodes[id].params)) if (p.sourceId) visit(p.sourceId); + ordered.push(id); + } + visit('output'); + api.paths = [ordered]; + api.runtimeHints.workflowSnapshot.studioForm = { resourceMode: 'auto', mode }; + api.runtimeHints.resourceMode = 'auto'; + api.runtimeHints.workflowAutoPlan = { schemaVersion: 1, graphHash: workerGraphHash(api) }; + context.executionReceipt.runtimePreparation = { + resourceMode: 'auto', + performed: false, + residentRecipeReusable: false, + cleanup: null, + workflowAuto: { + strategy: 'dependency_order_retained_owners', + schedule: null, + cachePreparation: null, + reusedOwnerIds: [], + preparedDataNodes: [], + appliedUpdates: [], + releases: [], + resolvedFields: Object.fromEntries( + ['owner', 'recipe'].map((id) => [ + id, + Object.fromEntries( + Object.entries(nodes[id].params) + .filter(([, p]) => Object.hasOwn(p, 'value')) + .map(([key, p]) => [key, p.value]), + ), + ]), + ), + }, + }; + const receipt = context.executedOutput.resolvedExecutionInputs; + receipt.graphTasks = [{ loaderId: 'owner', pipelineClass, task: mode }]; + receipt.nodes = ordered.map((nodeId) => ({ + nodeId, + module: nodes[nodeId].module, + action: nodes[nodeId].action, + omittedFields: {}, + fields: Object.fromEntries( + Object.entries(nodes[nodeId].params).map(([key, p]) => [ + key, + p.sourceId + ? { source: 'connected', sourceNodeId: p.sourceId, sourcePortId: p.sourceKey, value: null } + : { source: 'literal', value: p.value?.source === 'hub' ? p.value.value : p.value }, + ]), + ), + })); + context.executedOutput.formSnapshot = api.runtimeHints.workflowSnapshot.studioForm; + for (const row of receipt.nodes) { + if (pipelineClass === 'WanVideoToVideoPipeline') { + if (row.action === 'Denoise') delete row.fields.num_frames; + if (row.action === 'Normalize') delete row.fields.fit; + if (row.action === 'EncodeInputs') { + row.fields.video_source_frames = { + source: 'connected', + sourceNodeId: 'normalize', + sourcePortId: 'output', + value: 81, + }; + row.fields.video_source_sha256 = { + source: 'connected', + sourceNodeId: 'normalize', + sourcePortId: 'output', + value: 'a'.repeat(64), + }; + } + } + if ( + row.module === 'modules.DiffusersVideo' && + ['EncodeInputs', 'Denoise', 'DecodeLatents', 'Generate'].includes(row.action) + ) { + delete row.fields.mode; + row.fields.executed_task = { source: 'literal', value: mode }; + } + } + context.modelIdentities = [ + { + ...context.modelIdentities[0], + repoId: repository, + selectedRevision: revision, + modelRevision: repository + '@' + revision, + }, + ]; + context.resolvedModelRepos = [repository]; + context.nativeAutoBindings = { + canonicalGraphHash: canonicalGraphIdentity(api).hash, + modelSetHash: modelSetIdentity(context.modelIdentities).hash, + inputArtifactsHash: 'empty-inputs', + backendSourceFingerprint: context.backendSource.fingerprint, + }; + return state; +} + +test('native Auto video observations cover shot films, Wan sampling and encoded VACE renders', () => { + for (const args of [ + ['LTXConditionPipeline', 'text_to_video', 3], + ['LTXConditionPipeline', 'image_to_video', 6, true], + ['WanPipeline', 'text_to_video'], + ['WanVACEPipeline', 'control_to_video'], + ['WanVACEPipeline', 'video_outpaint'], + ['WanVideoToVideoPipeline', 'video_color_edit'], + ['WanVideoToVideoPipeline', 'video_to_video'], + ]) { + const { api, context } = nativeAutoFixture(...args); + const before = JSON.stringify({ api, context }); + const plan = observedNativeAutoVideoPlan(api, context); + assert(plan, args.join(' / ')); + assert.equal(plan.resourceMode, 'auto'); + assert.equal(plan.observation.hardwareQualification, false); + assert.equal(plan.observation.fullFieldAccountingClaimed, false); + assert(observedNativeAutoVideoResourceId(plan)); + assert.equal(JSON.stringify({ api, context }), before); + const provenance = { + taskId: context.taskId, + template: { lockedSettings: { mode: api.runtimeHints.workflowSnapshot.studioForm.mode } }, + graph: { + hash: context.nativeAutoBindings.canonicalGraphHash, + canonicalGraph: canonicalGraphIdentity(api).canonicalGraph, + }, + models: { hash: context.nativeAutoBindings.modelSetHash, items: context.modelIdentities }, + inputs: { hash: 'empty-inputs' }, + runtime: { backendSource: context.backendSource }, + }; + assert(observedNativeAutoVideoProofMatches(plan, provenance)); + provenance.inputs.hash = 'changed'; + assert.equal(observedNativeAutoVideoProofMatches(plan, provenance), false); + const recovered = executionPlanIdentity(api, context).plan; + assert.equal(recovered.source, plan.source); + assert.equal( + executionReceiptIdentity(context.executionReceipt, recovered).resourceCandidateId, + observedNativeAutoVideoResourceId(recovered), + ); + } +}); + +test('Wan source-derived frame evidence rejects missing or contradictory consumed geometry', () => { + for (const change of [ + (s) => + delete s.context.executedOutput.resolvedExecutionInputs.nodes.find((n) => n.action === 'EncodeInputs').fields + .video_source_frames, + (s) => + (s.context.executedOutput.resolvedExecutionInputs.nodes.find( + (n) => n.action === 'EncodeInputs', + ).fields.video_source_frames.value = 77), + (s) => + (s.context.executedOutput.resolvedExecutionInputs.nodes.find( + (n) => n.action === 'EncodeInputs', + ).fields.video_source_sha256.sourcePortId = 'unrelated'), + (s) => + delete s.context.executedOutput.resolvedExecutionInputs.nodes.find((n) => n.action === 'Denoise').fields.strength, + ]) { + const state = nativeAutoFixture('WanVideoToVideoPipeline', 'video_to_video'); + change(state); + assert.equal(observedNativeAutoVideoPlan(state.api, state.context), null); + } +}); + +test('rehashed native video observations cannot substitute resource controls while preserving original graph bindings', () => { + const { api, context } = nativeAutoFixture('WanPipeline', 'text_to_video'); + const plan = observedNativeAutoVideoPlan(api, context); + const provenance = { + taskId: context.taskId, + template: { lockedSettings: { mode: 'text_to_video' } }, + graph: canonicalGraphIdentity(api), + models: modelSetIdentity(context.modelIdentities), + inputs: { hash: 'empty-inputs' }, + runtime: { backendSource: context.backendSource }, + }; + assert(observedNativeAutoVideoProofMatches(plan, provenance)); + for (const mutate of [ + (p) => { + p.dtype = 'float16'; + }, + (p) => { + p.device = 'cpu'; + }, + (p) => { + p.offloadMode = 'none'; + }, + (p) => { + p.modelRepo = 'other/model'; + }, + (p) => { + p.pipelineClass = 'OtherPipeline'; + }, + (p) => { + p.observation.hardwareQualification = true; + }, + (p) => { + p.observation.fullFieldAccountingClaimed = true; + }, + (p) => { + p.observation.runtimePreparation.resourceMode = 'expert'; + }, + ]) { + const changed = structuredClone(plan); + mutate(changed); + assert(observedNativeAutoVideoResourceId(changed)); + assert.equal(observedNativeAutoVideoProofMatches(changed, provenance), false); + } + const changed = structuredClone(plan), + edited = structuredClone(provenance); + const graph = edited.graph.canonicalGraph; + graph.nodes.find((n) => n.action === 'DecodeLatents').params.latent_binding.sourceId = graph.nodes.find( + (n) => n.action === 'LoadPipeline', + ).key; + edited.graph.hash = 'sha256:canonical-graph-v1:' + canonicalJsonHash(graph); + changed.observation.bindings.canonicalGraphHash = edited.graph.hash; + assert.equal(observedNativeAutoVideoProofMatches(changed, edited), false); +}); + +test('native Auto reader refuses stale hashes, borrowed bindings, missing captures and resource substitutions', () => { + for (const mutate of [ + ({ api }) => { + api.runtimeHints.workflowAutoPlan.graphHash = 'stale'; + }, + ({ api }) => { + api.nodes.decode.params.latent_binding.sourceId = 'owner'; + }, + ({ context }) => { + context.executionReceipt.runtimePreparation.workflowAuto.resolvedFields.owner.offload_mode = 'none'; + }, + ({ context }) => { + context.executedOutput.resolvedExecutionInputs.uncapturedNodeIds = ['encode']; + }, + ({ context }) => { + context.executedOutput.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'denoise').fields.seed.value++; + }, + ({ context }) => { + context.executionReceipt.runtimePreparation.resourceMode = 'expert'; + }, + ({ api }) => { + api.nodes.encode.action = 'Other'; + }, + ({ context }) => { + context.modelIdentities[0].selectedRevision = 'b'.repeat(40); + }, + ]) { + const state = nativeAutoFixture('WanPipeline', 'text_to_video'); + mutate(state); + if (state.api.runtimeHints.workflowAutoPlan.graphHash !== 'stale') + state.api.runtimeHints.workflowAutoPlan.graphHash = workerGraphHash(state.api); + assert.equal(observedNativeAutoVideoPlan(state.api, state.context), null); + } +}); + +test('native Auto joins the upscaler artifact and its immutable installed model instead of accepting an unrelated pin', () => { + const { api, context } = nativeAutoFixture('WanPipeline', 'text_to_video'); + const artifact = { + source: 'hub', + value: 'nateraw/real-esrgan/RealESRGAN_x2plus.pth', + revision: '42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094', + sha256: '49fafd45f8fd7aa8d31ab2a22d14d91b536c34494a5cfe31eb5d89c2fa266abb', + byteSize: 67061725, + }; + api.nodes.upscale = { + module: 'modules.Spandrel', + action: 'Upscaler', + params: { + image: { sourceId: 'decode', sourceKey: 'video_out' }, + model_id: { value: artifact }, + }, + }; + api.nodes.output.params.video = { sourceId: 'upscale', sourceKey: 'output' }; + api.paths[0].splice(-1, 0, 'upscale'); + context.executedOutput.resolvedExecutionInputs.nodes.push({ + nodeId: 'upscale', + module: 'modules.Spandrel', + action: 'Upscaler', + fields: { model_id: { source: 'literal', value: artifact.value } }, + omittedFields: {}, + }); + context.modelIdentities.push({ + repoId: 'nateraw/real-esrgan', + selectedRevision: artifact.revision, + modelRevision: 'nateraw/real-esrgan@' + artifact.revision, + fingerprint: 'sha256:' + 'f'.repeat(64), + }); + context.resolvedModelRepos.push('nateraw/real-esrgan'); + api.runtimeHints.workflowAutoPlan.graphHash = workerGraphHash(api); + assert(observedNativeAutoVideoPlan(api, context)); + const model = context.modelIdentities[1]; + model.selectedRevision = 'a'.repeat(40); + model.modelRevision = model.repoId + '@' + model.selectedRevision; + assert.equal(observedNativeAutoVideoPlan(api, context), null); + model.selectedRevision = artifact.revision; + model.modelRevision = model.repoId + '@' + artifact.revision; + artifact.sha256 = 'b'.repeat(64); + api.runtimeHints.workflowAutoPlan.graphHash = workerGraphHash(api); + assert.equal(observedNativeAutoVideoPlan(api, context), null); +}); + +test('native Auto observation preserves the real owner release schedule and refuses reordered dependencies', () => { + const { api, context } = nativeAutoFixture('LTXConditionPipeline', 'text_to_video', 3); + const auto = context.executionReceipt.runtimePreparation.workflowAuto; + auto.strategy = 'dependency_order_release_owners'; + auto.schedule = { + executionOrder: [...api.paths[0]], + owners: [{ ownerId: 'owner' }], + releases: [ + { + afterIndex: api.paths[0].indexOf('decode2'), + afterNodeId: 'decode2', + nodeIds: ['owner', 'encode', 'denoise', 'decode'], + retainOutputs: { decode: ['video_out'] }, + }, + ], + }; + const plan = observedNativeAutoVideoPlan(api, context); + assert(plan); + assert.deepEqual(plan.observation.runtimePreparation, context.executionReceipt.runtimePreparation); + auto.schedule.executionOrder.reverse(); + assert.equal(observedNativeAutoVideoPlan(api, context), null); +}); diff --git a/scripts/fixtures/historical-qwen-adapter-gallery.json b/scripts/fixtures/historical-qwen-adapter-gallery.json new file mode 100644 index 00000000..f36d3132 --- /dev/null +++ b/scripts/fixtures/historical-qwen-adapter-gallery.json @@ -0,0 +1,107 @@ +{ + "schemaVersion": 2, + "examples": [ + { + "templateId": "character_edit", + "verificationStatus": "reviewed", + "promptSettingsHash": "ps_3b2942a6", + "templateLockHash": "tpl_63c0197d", + "modelRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "graphHash": "sha256:canonical-graph-v1:82cd88279f3914706e0b41b87733af1367d85d3c77c94f2d3e8b14ba1bb13e36", + "modelCommit": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "provenanceHash": "sha256:canonical-json:268e028f39c1801fc4dd9be8aa9b14b3cdb72dc8de93e379948f6d6a1d6f0253", + "mediaHash": "sha256:decoded-rgba:16a941e8608c3a661e06ff9b3f06d444af5fb6238577e5803427e2be81df52a0", + "mediaType": "image", + "qualityReviewHash": "sha256:canonical-json:74529214897535a22ff67cb58286e56f3a1ed9b0e29de2678ef1da709b3f1583", + "qualityReviewStatus": "approved_reviewed", + "width": 1024, + "height": 1024, + "templateInputContractHash": "tic_0d8fab77" + }, + { + "templateId": "qwen_logo_texture", + "verificationStatus": "reviewed", + "promptSettingsHash": "ps_c332b3ef", + "templateLockHash": "tpl_73ff30cd", + "modelRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "graphHash": "sha256:canonical-graph-v1:130a0e1fdd504549f200530e077fcac20ba6b0bc9e407420c1a1982302e6a109", + "modelCommit": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "provenanceHash": "sha256:canonical-json:334a945016acd42c4becc653ca28cbbf15f85c5273eb934937d5658a66451b56", + "mediaHash": "sha256:decoded-rgba:56ab3e1586baa67d8bcb2bb15864c37f819f8d23f5b8d8fdffc1963b64271ac5", + "mediaType": "image", + "qualityReviewHash": "sha256:canonical-json:01c672090114b02ea5d78f93cf9a7dcb08b7635e1011ae0edf9db36921df43fc", + "qualityReviewStatus": "approved_reviewed", + "width": 1024, + "height": 1024, + "templateInputContractHash": "tic_e5ec5587" + }, + { + "templateId": "qwen_multi_reference_product", + "verificationStatus": "reviewed", + "promptSettingsHash": "ps_accf618d", + "templateLockHash": "tpl_f17d9d93", + "modelRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "graphHash": "sha256:canonical-graph-v1:bd24cf2f3a5a5785d2da46a7ebcae4142f69e506249dde447bc715f2998db4bf", + "modelCommit": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "provenanceHash": "sha256:canonical-json:eb9eaa0de36f3bf8c5886cafe4873012d63394491e9fc41a4b6c9568b20987dc", + "mediaHash": "sha256:decoded-rgba:dd96508b187e455e9df604855ea740315088953fa3e2fe9b006ba43d6cfde978", + "mediaType": "image", + "qualityReviewHash": "sha256:canonical-json:8d53d6a9c677a20da08229ecdd0219c0301ee25d0e0a4822d36f19ff7bfccffa", + "qualityReviewStatus": "approved_reviewed", + "width": 1024, + "height": 1024, + "templateInputContractHash": "tic_f078b0f5" + }, + { + "templateId": "qwen_product_ad_composite", + "verificationStatus": "reviewed", + "promptSettingsHash": "ps_95804e0d", + "templateLockHash": "tpl_a1cfb351", + "modelRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "graphHash": "sha256:canonical-graph-v1:e90638d2eca4101500805d44e31b956774fee5ace456d36dd8fb8dbd1e931413", + "modelCommit": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "provenanceHash": "sha256:canonical-json:d781c4d92d1681c4d908eff3a16fcbb57f6286ea36888004e7da89886a3601d5", + "mediaHash": "sha256:decoded-rgba:c7795d3f1b9c225fc4fd38e9e946d0dddb6efb0b627069f47804a68c0f34095d", + "mediaType": "image", + "qualityReviewHash": "sha256:canonical-json:8c4d976d260d90101fe61aeb85baecc3173f621e15e37e580a5580577541eb85", + "qualityReviewStatus": "approved_reviewed", + "width": 1024, + "height": 1024, + "templateInputContractHash": "tic_51540eb3" + }, + { + "templateId": "qwen_product_relight", + "verificationStatus": "reviewed", + "promptSettingsHash": "ps_11310482", + "templateLockHash": "tpl_b089cd60", + "modelRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "graphHash": "sha256:canonical-graph-v1:be3c2268c585c4f89b91ae2c16bc3e46989dd0f577b7585d46b40da41f67b0dd", + "modelCommit": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "provenanceHash": "sha256:canonical-json:b325007dec4e7931f4a6f2588ee54a15d258d8af5e779b0e77b64829f1aadf53", + "mediaHash": "sha256:decoded-rgba:35175a2cfd0c8b3c3851e3d953e787b9a4ba01425a9d7820db61379ddcd5e4fc", + "mediaType": "image", + "qualityReviewHash": "sha256:canonical-json:ecc1e712d0e9fe78901982331eac7550fe9417828dc4abe03973b2fedb9175c8", + "qualityReviewStatus": "approved_reviewed", + "width": 1024, + "height": 1024, + "templateInputContractHash": "tic_db4d8bbd" + }, + { + "templateId": "reference_fusion", + "verificationStatus": "reviewed", + "promptSettingsHash": "ps_d420606a", + "templateLockHash": "tpl_60c2bf07", + "modelRevision": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "graphHash": "sha256:canonical-graph-v1:846b4fbf647033db967edff30c61a8936bac2cc6a56b01e8ca01f37f08f30914", + "modelCommit": "lightx2v/Qwen-Image-Edit-2511-Lightning@d74eba145674fd7e31b949324e148e21e7118abd | Qwen/Qwen-Image-Edit-2511@6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9", + "provenanceHash": "sha256:canonical-json:5dfadc82f0e3dd8bcecccb7c35f0621db0f08e6cacf2dea85ec56719ced03148", + "mediaHash": "sha256:decoded-rgba:0c1ac6afd24ca529b98bda9d5709dddab870a0c3fde0feed59ac06fb5b10d7ff", + "mediaType": "image", + "qualityReviewHash": "sha256:canonical-json:6849aa92ad4cce66a58526f7ea23fccc1311c734d9cd78072d0889913d7887ab", + "qualityReviewStatus": "approved_reviewed", + "width": 1024, + "height": 1024, + "templateInputContractHash": "tic_457d4adc" + } + ] +} diff --git a/scripts/fixtures/reference-input-requirements.json b/scripts/fixtures/reference-input-requirements.json new file mode 100644 index 00000000..d6cd9a4e --- /dev/null +++ b/scripts/fixtures/reference-input-requirements.json @@ -0,0 +1,15 @@ +{ + "references_in": { "required": false }, + "image": { + "required": false, + "requiredWhen": { "field": "reference_kind", "equals": "image" } + }, + "video": { + "required": false, + "requiredWhen": { "field": "reference_kind", "equals": "video" } + }, + "audio": { + "required": false, + "requiredWhen": { "field": "reference_kind", "equals": "audio" } + } +} diff --git a/scripts/flow-graph-export.test.mjs b/scripts/flow-graph-export.test.mjs index 4cdbfaae..1e32ffe3 100644 --- a/scripts/flow-graph-export.test.mjs +++ b/scripts/flow-graph-export.test.mjs @@ -60,6 +60,33 @@ function exportSeed(value, setParam = () => {}) { return graph.nodes.generate.params.seed; } +test('optional stage inputs preserve old execution defaults and every explicit wire or nondefault', () => { + const source = { ...seedNode(5), id: 'supplier' }; + source.data.params = { result: { display: 'output', type: 'string' } }; + const stage = seedNode(6); + const settings = { hidden: true, default: 'word', value: 'word', fieldOptions: { omitInactiveDefault: true } }; + stage.data.params = { timing: settings, source: { display: 'input', fieldOptions: { omitInactiveDefault: true } } }; + const run = (edges = []) => + exportModule.buildApiGraphExport({ + nodes: [source, stage], + edges, + sid: 'test', + setParam() {}, + randomizeSeeds: false, + }).nodes.generate.params; + assert.deepEqual(run(), {}); + settings.value = 'none'; + assert.equal(run().timing.value, 'none'); + settings.value = 'word'; + settings.hidden = false; + assert.equal(run().timing.value, 'word'); + assert.equal( + run([{ id: 'wire', source: 'supplier', sourceHandle: 'result', target: 'generate', targetHandle: 'source' }]).source + .sourceId, + 'supplier', + ); +}); + function loopMember(id) { return { id, @@ -162,6 +189,62 @@ test('locked random-field seeds export without the random display marker', () => assert.equal('display' in seed, false); }); +test('Run exports untouched random-field defaults and preserves explicit zero seeds', () => { + const updates = []; + const cases = [ + { default: 0 }, + { default: { value: 0, isRandom: false } }, + { value: 0, default: { value: 91, isRandom: true } }, + { value: { value: 0, isRandom: false }, default: 91 }, + ]; + for (const stored of cases) { + const node = seedNode(undefined); + node.data.params.seed = { type: 'int', display: 'random', ...stored }; + const original = structuredClone(node); + for (const randomizeSeeds of [false, true]) { + const result = exportModule.buildApiGraphExport({ + nodes: [node], + edges: [], + sid: 'untouched-seed', + randomizeSeeds, + setParam: (...args) => updates.push(args), + }); + assert.equal(result.nodes.generate.params.seed.value, 0); + assert.equal('display' in result.nodes.generate.params.seed, false); + } + assert.deepEqual(node, original); + } + assert.deepEqual(updates, []); +}); + +test('untouched random defaults retain one shared managed seed on Run', () => { + const originalRandom = Math.random; + let calls = 0; + Math.random = () => (calls++ === 0 ? 0.25 : 0.75); + try { + const nodes = ['encode', 'denoise'].map((id) => { + const node = seedNode(undefined); + node.id = id; + node.data.studioOwned = true; + node.data.params.seed.default = { value: 0, isRandom: true }; + return node; + }); + const updates = []; + const result = exportModule.buildApiGraphExport({ + nodes, + edges: [], + sid: 'default-shared-seed', + setParam: (...args) => updates.push(args), + }); + assert.equal(result.nodes.encode.params.seed.value, 1_073_741_824); + assert.equal(result.nodes.denoise.params.seed.value, 1_073_741_824); + assert.equal(calls, 1); + assert.equal(updates.length, 2); + } finally { + Math.random = originalRandom; + } +}); + test('random-on-export seeds retain random behavior and metadata', () => { const originalRandom = Math.random; const updates = []; diff --git a/scripts/flow-graph-mutations.test.mjs b/scripts/flow-graph-mutations.test.mjs index fafa763c..196975a1 100644 --- a/scripts/flow-graph-mutations.test.mjs +++ b/scripts/flow-graph-mutations.test.mjs @@ -1,4 +1,5 @@ import assert from 'node:assert/strict'; +import { readFile } from 'node:fs/promises'; import { after, before, beforeEach, test } from 'node:test'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; @@ -27,9 +28,16 @@ before(async () => { removeItem: (key) => storage.delete(key), setItem: (key, value) => storage.set(key, String(value)), }; + const sessionValues = new Map(); + globalThis.sessionStorage = { + getItem: (key) => sessionValues.get(key) ?? null, + setItem: (key, value) => sessionValues.set(key, String(value)), + removeItem: (key) => sessionValues.delete(key), + }; globalThis.window = { dispatchEvent: () => true, localStorage: globalThis.localStorage, + sessionStorage: globalThis.sessionStorage, location: { origin: 'http://127.0.0.1:5191' }, }; server = await createServer({ @@ -63,6 +71,7 @@ beforeEach(() => { edges: [], viewport: { x: 0, y: 0, zoom: 1 }, lastExecutionTime: 0, + runtimeCachedNodeIds: null, historyPast: [], historyFuture: [], historyTransaction: null, @@ -101,6 +110,268 @@ function cacheRequests() { return requests.filter((request) => request.url.endsWith('/cache') && request.init.method === 'DELETE'); } +for (const method of ['updateCacheStatus', 'resetStatus']) { + test(`${method} retains a real cache snapshot received before the durable graph is restored`, () => { + const fixture = blockV2DeletionFixture('restore-cache-owner'); + const root = fixture.nodes.find((item) => item.id === fixture.rootId); + const collapsed = { + ...root, + data: { + ...root.data, + isCached: false, + blockInstanceV2: blockRuntimeModule.setBlockPresentationV2(root.data.blockInstanceV2, { expanded: false }), + }, + }; + const restored = { nodes: [collapsed], edges: [], viewport: { x: 0, y: 0, zoom: 1 } }; + const received = [fixture.generateId]; + flowStoreModule.useFlowStore.getState()[method](received); + received.length = 0; + flowStoreModule.useFlowStore.getState().replaceGraph(structuredClone(restored)); + assert.equal(flowStoreModule.useFlowStore.getState().nodes[0].data.isCached, true); + flowStoreModule.useFlowStore.getState().replaceGraph(structuredClone(restored)); + assert.equal(flowStoreModule.useFlowStore.getState().nodes[0].data.isCached, true); + flowStoreModule.useFlowStore.getState()[method]([]); + flowStoreModule.useFlowStore.getState().replaceGraph(structuredClone(restored)); + assert.equal( + flowStoreModule.useFlowStore.getState().nodes[0].data.isCached, + false, + 'empty server snapshot retires prior cache state', + ); + flowStoreModule.useFlowStore.getState()[method]([fixture.generateId]); + flowStoreModule.useFlowStore.getState().replaceGraph(structuredClone(restored)); + flowStoreModule.useFlowStore.getState().setNodeCached(fixture.generateId, false); + flowStoreModule.useFlowStore.getState().replaceGraph(structuredClone(restored)); + assert.equal( + flowStoreModule.useFlowStore.getState().nodes[0].data.isCached, + false, + 'acknowledged leaf release must survive restoration', + ); + assert.equal( + flowStoreModule.useFlowStore.getState().toObject().runtimeCachedNodeIds, + undefined, + 'cache snapshot is never workflow authority', + ); + const persisted = JSON.parse(globalThis.sessionStorage.getItem('modiff.flow')); + assert.equal( + persisted.state.runtimeCachedNodeIds, + undefined, + 'server cache IDs are not written to persistent storage', + ); + }); + + test(`${method} maps a cached hidden V2 leaf to its exact collapsed owner on reconnect`, () => { + const fixture = blockV2DeletionFixture('cache-owner-exact'); + const root = fixture.nodes.find((item) => item.id === fixture.rootId); + const collapsed = { + ...root, + data: { + ...root.data, + isCached: false, + blockInstanceV2: blockRuntimeModule.setBlockPresentationV2(root.data.blockInstanceV2, { expanded: false }), + }, + }; + flowStoreModule.useFlowStore.setState({ nodes: [collapsed], edges: [], lastExecutionTime: 12 }); + flowStoreModule.useFlowStore.getState()[method]([fixture.generateId]); + assert.equal(flowStoreModule.useFlowStore.getState().nodes[0].data.isCached, true); + const cachedRoot = flowStoreModule.useFlowStore.getState().nodes[0]; + flowStoreModule.useFlowStore.getState()[method]([fixture.generateId]); + assert.equal(flowStoreModule.useFlowStore.getState().nodes[0], cachedRoot, 'same snapshot preserves node identity'); + flowStoreModule.useFlowStore + .getState() + [method]([ + blockRuntimeModule.blockProjectionNodeIdV2(`${fixture.rootId}-foreign`, 'generate'), + blockRuntimeModule.blockProjectionNodeIdV2(fixture.rootId, 'removed-stage'), + blockRuntimeModule.blockProjectionNodeIdV2(fixture.rootId, 'unknown-inner::generate'), + ]); + assert.equal( + flowStoreModule.useFlowStore.getState().nodes[0].data.isCached, + false, + 'prefix resemblance grants no cache state', + ); + }); + + test(`${method} keeps expanded cached leaves separate from their root`, () => { + const fixture = blockV2DeletionFixture('expanded-cache-owner'); + flowStoreModule.useFlowStore.setState({ nodes: fixture.nodes, edges: fixture.edges }); + flowStoreModule.useFlowStore.getState()[method]([fixture.generateId]); + const nodes = flowStoreModule.useFlowStore.getState().nodes; + assert.equal(Boolean(nodes.find((item) => item.id === fixture.rootId).data.isCached), false); + assert.equal(nodes.find((item) => item.id === fixture.generateId).data.isCached, true); + assert.equal(Boolean(nodes.find((item) => item.id === fixture.utilityId).data.isCached), false); + }); +} + +test('executed cache records retain the exact runtime leaf when its owner is expanded or restored', () => { + const fixture = blockV2DeletionFixture('executed-cache-leaf'); + const root = fixture.nodes.find((item) => item.id === fixture.rootId); + const collapsed = { + ...root, + data: { + ...root.data, + isCached: false, + blockInstanceV2: blockRuntimeModule.setBlockPresentationV2(root.data.blockInstanceV2, { expanded: false }), + }, + }; + flowStoreModule.useFlowStore.setState({ nodes: [collapsed], edges: [] }); + flowStoreModule.useFlowStore.getState().setNodeCached(fixture.rootId, true, undefined, undefined, fixture.generateId); + const durable = flowStoreModule.useFlowStore.getState().toObject(); + assert.equal(durable.runtimeCachedNodeIds, undefined); + flowStoreModule.useFlowStore.getState().replaceGraph({ nodes: fixture.nodes, edges: fixture.edges }); + const restored = flowStoreModule.useFlowStore.getState().nodes; + assert.equal(restored.find((item) => item.id === fixture.generateId).data.isCached, true); + assert.equal(Boolean(restored.find((item) => item.id === fixture.rootId).data.isCached), false); + assert.equal(Boolean(restored.find((item) => item.id === fixture.utilityId).data.isCached), false); + flowStoreModule.useFlowStore.getState().setNodeCached(fixture.utilityId, true); + flowStoreModule.useFlowStore.getState().setNodeCached(fixture.generateId, false); + flowStoreModule.useFlowStore.getState().replaceGraph({ nodes: fixture.nodes, edges: fixture.edges }); + assert.equal( + Boolean(flowStoreModule.useFlowStore.getState().nodes.find((item) => item.id === fixture.generateId).data.isCached), + false, + ); + assert.equal( + flowStoreModule.useFlowStore.getState().nodes.find((item) => item.id === fixture.utilityId).data.isCached, + true, + 'exact release retains an unrelated cached node', + ); +}); + +for (const mutation of ['minimum height', 'projection', 'control', 'presentation']) { + test(`a restored cached Block stays cached after ${mutation} reprojection`, () => { + const fixture = blockV2DeletionFixture(`rehydrated-cache-${mutation.replaceAll(' ', '-')}`); + const root = fixture.nodes.find((item) => item.id === fixture.rootId); + const collapsed = { + ...root, + data: { + ...root.data, + blockInstanceV2: blockRuntimeModule.setBlockPresentationV2(root.data.blockInstanceV2, { expanded: false }), + }, + }; + const graph = { nodes: [collapsed], edges: [] }; + const store = () => flowStoreModule.useFlowStore.getState(); + store().resetStatus([fixture.generateId]); + store().replaceGraph(graph); + assert.equal(store().nodes[0].data.isCached, true); + const apply = () => { + if (mutation === 'minimum height') store().ensureBlockMinimumHeightV2(fixture.rootId, 800); + if (mutation === 'projection') store().ensureBlockProjectionV2(fixture.rootId); + if (mutation === 'control') store().setBlockInstanceValueV2(fixture.rootId, 'prompt', 'edited prompt'); + if (mutation === 'presentation') + store().setBlockPresentationV2(fixture.rootId, { size: { width: 1000, height: 800 } }); + }; + apply(); + assert.equal(store().nodes.find((item) => item.id === fixture.rootId).data.isCached, true); + assert.deepEqual(store().runtimeCachedNodeIds, [fixture.generateId]); + store().setBlockPresentationV2(fixture.rootId, { expanded: true }); + assert.equal(Boolean(store().nodes.find((item) => item.id === fixture.rootId).data.isCached), false); + assert.equal(store().nodes.find((item) => item.id === fixture.generateId).data.isCached, true); + store().setNodeCached(fixture.generateId, false); + store().setBlockPresentationV2(fixture.rootId, { expanded: false }); + apply(); + assert.equal(Boolean(store().nodes.find((item) => item.id === fixture.rootId).data.isCached), false); + assert.deepEqual(store().runtimeCachedNodeIds, []); + assert.equal(store().toObject().nodes[0].data.isCached, undefined); + }); +} + +test('measured projected children retain unrelated cached leaves when their Block is rebuilt', () => { + const fixture = blockV2DeletionFixture('measured-cache-owner'); + const store = () => flowStoreModule.useFlowStore.getState(); + store().replaceGraph(fixture); + store().resetStatus([fixture.generateId]); + store().setNodeSize(fixture.utilityId, 282, 300, { history: false }); + assert.equal(store().nodes.find((item) => item.id === fixture.generateId).data.isCached, true); + assert.equal(Boolean(store().nodes.find((item) => item.id === fixture.utilityId).data.isCached), false); +}); + +test('internal edge removal and connection retain cached leaves when their owning Block is rebuilt', () => { + const fixture = blockV2DeletionFixture('rewired-cache-owner'); + const store = () => flowStoreModule.useFlowStore.getState(); + store().replaceGraph(fixture); + store().resetStatus([fixture.generateId]); + const internal = store().edges.find((item) => item.source === fixture.generateId); + assert.ok(internal); + store().onEdgesChange([{ id: internal.id, type: 'remove' }]); + assert.equal(store().nodes.find((item) => item.id === fixture.generateId).data.isCached, true); + assert.equal(Boolean(store().nodes.find((item) => item.id === fixture.utilityId).data.isCached), false); + store().onConnect({ + source: fixture.generateId, + sourceHandle: 'images', + target: fixture.utilityId, + targetHandle: 'images', + }); + assert.ok(store().edges.some((item) => item.source === fixture.generateId && item.target === fixture.utilityId)); + assert.equal(store().nodes.find((item) => item.id === fixture.generateId).data.isCached, true); + assert.deepEqual(store().runtimeCachedNodeIds, [fixture.generateId]); +}); + +test('saved built-in component outputs keep their wires as current consumer schemas arrive', () => { + const model = 'WanImage2VideoModularPipeline'; + const signal = { direction: 'output', origin: 'modiff_pipeline_identity', value: model }; + const output = { display: 'output', type: 'diffusers_auto_model', signal }; + const input = { display: 'input', type: output.type }; + const loader = node( + 'wan-loader', + { vae_out: output }, + { module: 'modules.ModularDiffusers', action: 'ModelsLoader' }, + ); + const consumer = node('encode-image', { vae: input }); + const saved = edge('saved-vae', loader.id, consumer.id, 'vae_out', 'vae'); + nodeStoreModule.useNodesStore.setState({ + nodesRegistry: { + 'modules.ModularDiffusers.ModelsLoader': { params: { vae_out: { ...output, connectionRole: 'vae' } } }, + }, + }); + const flow = () => flowStoreModule.useFlowStore.getState(); + const graph = { nodes: [loader, consumer], edges: [saved] }; + const requireVae = () => + flow().replaceNodeParams(consumer.id, { + vae: { ...input, signalCompatibility: { role: 'vae', required: true, values: { [model]: ['vae'] } } }, + }); + flow().replaceGraph(graph); + requireVae(); + assert.deepEqual( + flow().edges.map(({ id }) => id), + [saved.id], + ); + assert.deepEqual(flow().historyPast, []); + assert.deepEqual(loader.data.params.vae_out, output); + + for (const override of [ + { connectionRole: 'denoiser' }, + { connectionRoleSelector: { field: 'missing', values: { vae: 'vae' } } }, + { type: 'any' }, + { display: 'input' }, + ]) { + flow().replaceGraph({ + ...graph, + nodes: [ + { + ...loader, + data: { + ...loader.data, + params: { vae_out: { ...output, ...override } }, + }, + }, + consumer, + ], + }); + requireVae(); + assert.deepEqual(flow().edges, [], JSON.stringify(override)); + } + + nodeStoreModule.useNodesStore.setState({ + nodesRegistry: { + 'custom_nodes.OlderLoader': { params: { vae_out: { ...output, connectionRole: 'vae' } } }, + }, + }); + flow().replaceGraph({ + ...graph, + nodes: [{ ...loader, data: { ...loader.data, module: 'custom_nodes', action: 'OlderLoader' } }, consumer], + }); + requireVae(); + assert.deepEqual(flow().edges, []); +}); + test('connection mutations enforce signal-driven component compatibility', () => { const schedulerOutput = (modelType) => ({ scheduler: { @@ -491,6 +762,22 @@ test('graph replacement preserves dynamic visibility and required inputs even wh assert.equal(params.missing_identity.hidden, true); }); +test('an older ordinary graph restores fixed capabilities and adds new optional sockets from its registry', () => { + const signal = { direction: 'output', origin: 'pipeline_class', value: 'family', fixed: true }; + const model = { display: 'output', type: 'model' }; + const source = { display: 'input', type: 'video', fieldOptions: { omitInactiveDefault: true } }; + nodeStoreModule.useNodesStore.setState({ + nodesRegistry: { 'modules.Test.Edit': node('Edit', { model: { ...model, signal }, source }).data }, + }); + const store = flowStoreModule.useFlowStore.getState; + for (const oldModel of [model, { ...model, signal: { ...signal, value: 'old' } }]) { + store().replaceGraph({ nodes: [node('Edit', { model: oldModel })], edges: [] }); + const params = store().nodes[0].data.params; + assert.deepEqual(params.model.signal, signal); + assert.equal(params.source.type, 'video'); + } +}); + test('pre-registry graph replacement strips stored behavior and restores only the arriving live contract', () => { flowStoreModule.useFlowStore.getState().replaceGraph({ nodes: [ @@ -1065,6 +1352,31 @@ test('graph replacement clears removed hidden V2 runtimes but not a retained col ); }); +test('durable snapshots canonicalize status-only UI state while retaining explicit authored UI values', () => { + const { durableFlowNodeSnapshot, flowExecutionScopeSourceKey } = flowStoreModule; + const source = node('durable-ui-state', {}); + const key = flowExecutionScopeSourceKey([source], []); + for (const uiState of [{}, { validationSeverity: 'info', validationMessage: 'Running' }]) { + const changed = { ...source, data: { ...source.data, uiState } }; + assert.equal(durableFlowNodeSnapshot(changed).data.uiState, undefined); + assert.equal(flowExecutionScopeSourceKey([changed], []), key); + assert.deepEqual(changed.data.uiState, uiState, 'Snapshotting must not mutate the live status.'); + } + for (const [field, value] of Object.entries({ + collapsed: false, + blockExpanded: false, + blockCollapsedWidth: 0, + blockCollapsedHeight: 0, + clusterCollapsedWidth: 0, + clusterCollapsedHeight: 0, + disabled: false, + })) { + const changed = { ...source, data: { ...source.data, uiState: { [field]: value } } }; + assert.equal(durableFlowNodeSnapshot(changed).data.uiState[field], value); + assert.notEqual(flowExecutionScopeSourceKey([changed], []), key, `${field} is an authored setting.`); + } +}); + test('terminal cleanup is task-scoped and durable graph snapshots never retain execution state', () => { const completedTaskNode = node( 'completed-task-node', @@ -1126,7 +1438,7 @@ test('terminal cleanup is task-scoped and durable graph snapshots never retain e assert.equal(durableCleared.data.params.output.artifacts, undefined); assert.equal(durableCleared.data.params.output.signal.value, undefined); - const persisted = JSON.parse(globalThis.localStorage.getItem('modiff.flow')).state; + const persisted = JSON.parse(globalThis.sessionStorage.getItem('modiff.flow')).state; const persistedActive = persisted.nodes.find((item) => item.id === 'newer-task-node'); assert.equal(persistedActive.data.progress, undefined); assert.equal(persistedActive.data.activeTaskId, undefined); @@ -1180,7 +1492,7 @@ test('persisted flow hydration versions, strips behavior, and filters malformed onSignal: { action: 'value', target: 'persisted_target' }, }, }); - globalThis.localStorage.setItem( + globalThis.sessionStorage.setItem( 'modiff.flow', JSON.stringify({ version: 1, @@ -1565,11 +1877,52 @@ test('native creation retains deliberately renamed interfaces as explicit contra const prepared = prepareUserBlockCreationV2(draft, configured); assert.equal(prepared.definition.boundary.mode, 'explicit'); assert.equal(prepared.definition.boundary.outputs[0].label, 'Deliberately exposed model'); + // Legacy IDs beginning with '-' or '_' are deliberately remapped. Identify + // the returned root by its exact definition rather than a random draft ID. + const roots = prepared.graph.nodes.filter( + (n) => + n.data.blockInstanceV2?.definitionRef.definitionId === prepared.definition.definitionId && + n.data.blockInstanceV2.definitionRef.contentHash === prepared.definition.contentHash, + ); + assert.equal(roots.length, 1); + assert.equal(roots[0].data.blockInstanceV2.effectiveInterface.boundary.mode, 'explicit'); assert.equal( - prepared.graph.nodes.find((n) => n.data.blockInstanceV2 && n.id === draft.blockNode.id).data.blockInstanceV2 - .effectiveInterface.boundary.mode, - 'explicit', + roots[0].data.blockInstanceV2.effectiveInterface.boundary.outputs[0].label, + 'Deliberately exposed model', + ); +}); + +test('suggested new Block interface retains external wires, omits internal sockets, and survives save/reopen', async () => { + const creation = await server.ssrLoadModule('/src/studio/userBlockCreationV2.ts'); + const { draft } = await groupingFixture(false); + const suggested = creation.suggestNewBlockInterface(draft); + const block = { + ...draft.block, + inputs: draft.block.inputs.filter((p) => suggested.exposedInputIds.has(p.id)), + outputs: draft.block.outputs.filter((p) => suggested.exposedOutputIds.has(p.id)), + exposedParams: draft.block.exposedParams.filter((p) => suggested.exposedParamIds.has(p.id)), + }; + assert.ok(block.outputs.length < draft.block.outputs.length, 'the internally consumed model need not be exposed'); + assert.equal(block.outputs.length, 2); + const selfContained = creation.suggestNewBlockInterface({ ...draft, edges: [] }); + assert.ok( + ![...selfContained.exposedOutputIds].some( + (id) => draft.block.outputs.find((p) => p.id === id)?.paramKey === 'model', + ), + ); + assert.ok( + [...selfContained.exposedOutputIds].some( + (id) => draft.block.outputs.find((p) => p.id === id)?.paramKey === 'image', + ), + ); + const prepared = creation.prepareUserBlockCreationV2(draft, block); + const restored = blockSchemaModule.normalizeBlockDefinitionV2(JSON.parse(JSON.stringify(prepared.definition))); + assert.deepEqual( + restored.boundary.outputs.map((p) => p.portId), + block.outputs.map((p) => p.id), ); + assert.equal(restored.boundary.mode, 'explicit'); + assert.throws(() => creation.prepareUserBlockCreationV2(draft, { ...block, outputs: [] }), /externally connected/); }); test('cycle validation supports expanded internal reconnects without adding external projection edges', async () => { @@ -1601,3 +1954,59 @@ test('cycle validation supports expanded internal reconnects without adding exte ); assert.deepEqual({ nodes, edges }, before); }); + +test('operation hydration restores only declared missing hidden input sockets while preserving widgets and live actions', async () => { + const fixture = JSON.parse( + await readFile(new URL('../tests/fixtures/qwen-component-bundle-contract.v1.json', import.meta.url), 'utf8'), + ); + const { parseOperationContracts } = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + const operation = parseOperationContracts(fixture.contracts, 3).find( + (item) => item.nodeKey === 'modules.ModularDiffusers.DecodeLatents', + ); + const stored = node('decode', { + latents: { type: 'latents', display: 'input', required: true, onSignal: 'untrusted_saved_action' }, + }); + Object.assign(stored.data, { + module: 'modules.ModularDiffusers', + action: 'DecodeLatents', + operationAuthoring: { schemaVersion: 1, operation, defaults: {}, retained: [] }, + }); + const live = { + latents: { type: 'latents', display: 'input', hidden: true, onSignal: 'current_live_action' }, + pipeline_components: { type: 'diffusers_modular_pipeline_components', display: 'input', hidden: true }, + foreign_components: { type: 'diffusers_modular_pipeline_components', display: 'input', hidden: true }, + hidden_width: { type: 'int', display: 'number', hidden: true, default: 64 }, + hidden_mode: { type: 'string', display: 'select', hidden: true, default: 'native' }, + hidden_default: { type: 'float', hidden: true, default: 0.75 }, + preview: { display: 'ui_image', type: 'image', dataSource: 'file' }, + }; + nodeStoreModule.useNodesStore.setState({ + nodesRegistry: { [operation.nodeKey]: { ...stored.data, params: live } }, + }); + const before = structuredClone(stored); + flowStoreModule.useFlowStore.getState().replaceGraph({ nodes: [stored], edges: [] }); + const params = flowStoreModule.useFlowStore.getState().nodes[0].data.params; + assert.equal(params.foreign_components, undefined, 'an absent socket from another route must stay absent'); + for (const field of ['pipeline_components', 'hidden_width', 'hidden_mode', 'hidden_default', 'preview']) { + const hydrated = { ...params[field] }; + delete hydrated.isConnected; + assert.deepEqual(hydrated, live[field], field); + } + assert.equal(params.latents.required, true); + assert.equal(params.latents.onSignal, 'current_live_action'); + assert.deepEqual(stored, before, 'hydration must not mutate the saved document'); +}); + +test('missing hidden socket hydration preserves legacy behavior without a parsed operation hint', () => { + const missing = { type: 'components', display: 'input', hidden: true }; + const definition = node('legacy', { missing }); + nodeStoreModule.useNodesStore.setState({ nodesRegistry: { 'modules.Test.legacy': definition.data } }); + for (const hint of [undefined, { schemaVersion: 1, operation: { ports: [] }, defaults: {}, retained: [] }]) { + const stored = node('legacy', {}, { ...(hint ? { operationAuthoring: hint } : {}) }); + flowStoreModule.useFlowStore.getState().replaceGraph({ nodes: [stored], edges: [] }); + assert.deepEqual(flowStoreModule.useFlowStore.getState().nodes[0].data.params.missing, { + ...missing, + isConnected: false, + }); + } +}); diff --git a/scripts/flux3-public-template-planning.test.mjs b/scripts/flux3-public-template-planning.test.mjs new file mode 100644 index 00000000..b026aeb9 --- /dev/null +++ b/scripts/flux3-public-template-planning.test.mjs @@ -0,0 +1,827 @@ +import assert from 'node:assert/strict'; +import { readFile } from 'node:fs/promises'; +import { after, before, test } from 'node:test'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { createServer } from 'vite'; +import { executionPlanIdentity, executionReceiptIdentity } from './live-proof-provenance.mjs'; + +const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); +const originalGlobals = Object.fromEntries( + ['window', 'localStorage', 'fetch'].map((key) => [key, Object.getOwnPropertyDescriptor(globalThis, key)]), +); +let networkRequests = 0; +const variants = [ + ['flux3_klein_fp8r512', 'flux3-klein', 'Flux3DistilledModularPipeline', 16, 1], + ['flux3_klein_base_fp8r512', 'flux3-klein-base', 'Flux3ModularPipeline', 50, 3.5], +]; +const kinds = ['text_to_image', 'single_reference_edit', 'multi_reference_edit', 'raw_coordinate_prompt', 'lora_style']; +const ids = variants.flatMap(([prefix]) => kinds.map((kind) => `${prefix}_${kind}`)); +let server, templates, inputs, modelSelection, fixture; + +before(async () => { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, String(value)), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { + location: { origin: 'http://127.0.0.1:5191' }, + localStorage: globalThis.localStorage, + dispatchEvent: () => true, + }; + globalThis.fetch = async () => { + networkRequests += 1; + throw new Error('Planning contract units must not contact any backend or network.'); + }; + server = await createServer({ + root: ROOT, + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + templates = await server.ssrLoadModule('/src/studio/templates.ts'); + inputs = await server.ssrLoadModule('/src/studio/templateInputs.ts'); + modelSelection = await server.ssrLoadModule('/src/studio/templateModelSelection.ts'); + fixture = JSON.parse(await readFile(path.join(ROOT, 'tests/fixtures/public-flux3-missing-provider.v1.json'), 'utf8')); +}); +after(async () => { + try { + await server?.close(); + assert.equal(networkRequests, 0); + } finally { + for (const [key, descriptor] of Object.entries(originalGlobals)) { + if (descriptor) Object.defineProperty(globalThis, key, descriptor); + else delete globalThis[key]; + } + } +}); + +const card = (id) => templates.STUDIO_TEMPLATES.find((item) => item.id === id); + +test('ten reviewed recipes enter Experimental without inline execution or hardware qualification claims', () => { + assert.equal(new Set(ids).size, 10); + for (const id of ids) { + const value = card(id); + assert.ok(value, id); + assert.equal( + templates.PLANNING_STUDIO_TEMPLATES.some((item) => item.id === id), + false, + ); + assert.equal(value.difficulty, 'advanced'); + assert.equal(value.readinessPolicy, value.inputRequirements ? 'requires_input' : 'runnable'); + assert.equal(value.example.status, 'unverified'); + assert.equal(Object.hasOwn(value.example, 'blockReason'), false); + assert.ok(value.tags.includes('experimental')); + assert.match(value.example.notes, /does not qualify other prompts, placements or hardware/); + for (const key of ['outputPath', 'thumbnailPath', 'mediaHash', 'runtimeFingerprint', 'verificationTimestamp']) + assert.equal(Object.hasOwn(value.example, key), false, `${id}:${key}`); + assert.equal( + value.mediaSlots.every((slot) => !slot.path && !slot.posterPath), + true, + ); + } +}); + +test('published preview discovery keeps exact declared creator authority and rejects private or mutable replacements', async () => { + const browser = await server.ssrLoadModule('/src/studio/templateBrowser.ts'); + for (const id of ids) { + const template = card(id); + assert.equal(browser.hasDeclaredExperimentalCreator(template), true, id); + for (const replacement of [ + { ...template, executionSelection: { ...template.executionSelection, executionProfileId: 'private-fixture' } }, + { ...template, executionSelection: { ...template.executionSelection, authoringRecipeId: 'private-fixture' } }, + { ...template, executionSelection: { ...template.executionSelection, memoryPolicy: 'auto' } }, + { ...template, modelArtifact: { ...template.modelArtifact, revision: 'main' } }, + ]) { + assert.equal(browser.hasDeclaredExperimentalCreator(replacement), false, id); + } + } +}); + +test('each card resolves the real public profile and immutable artifact while stale or private identities refuse', () => { + const capabilities = fixture.capabilitiesPayload.capabilities; + assert.equal(fixture.activeProvider, null); + for (const id of ids) { + const value = card(id); + const selected = modelSelection.resolveTemplateModelSelection(value, capabilities); + assert.ok(selected, id); + assert.equal(selected.profile.public, true); + assert.match(selected.profile.id, /^flux3-klein(?:-base)?:official-provider:v1$/u); + assert.equal(value.executionSelection.memoryPolicy, 'custom_experimental'); + assert.equal(value.executionSelection.implementation, 'native_stages'); + assert.equal(value.modelArtifact.revision, selected.revision); + assert.equal(value.modelArtifact.value, selected.repository); + const staleRevision = { ...value, modelArtifact: { ...value.modelArtifact, revision: '0'.repeat(40) } }; + assert.equal(modelSelection.resolveTemplateModelSelection(staleRevision, capabilities), null); + const privateIdentity = { + ...value, + executionSelection: { ...value.executionSelection, executionProfileId: 'foreign-private-profile' }, + }; + assert.equal(modelSelection.resolveTemplateModelSelection(privateIdentity, capabilities), null); + assert.equal(selected.capability.templateEligible, false); + assert.equal(selected.capability.galleryEligible, false); + assert.equal(selected.capability.liveProof, false); + assert.deepEqual(selected.capability.qualifiedModes, []); + } +}); + +test('approved named source images bind ordinary one- and ordered two-reference edit contracts', () => { + const cobalt = 'sha256:bytes:d5ba3943d6c0a264860ba0cde18d87e2d9554a3f7328308f4d771e082a9e0c24'; + const dieline = 'sha256:bytes:b748201353f02543c2a48920bb514c2741366151df45bf6c4904aeb0f32f1a67'; + for (const [prefix] of variants) { + for (const [suffix, count] of [ + ['single_reference_edit', 1], + ['multi_reference_edit', 2], + ]) { + const value = card(`${prefix}_${suffix}`); + assert.deepEqual( + [value.mode, value.executionSelection.task, value.executionSelection.bindingSpec.mode], + ['edit_image', 'edit_image', 'edit_image'], + ); + assert.equal(value.inputRequirements.referenceImages, count); + const resolution = inputs.resolveTemplateInputs(value); + assert.deepEqual(resolution.missingLabels, []); + assert.deepEqual(resolution.downstreamBindings, []); + const binding = resolution.templateDefaultBindings.find((item) => item.field === 'referenceImages'); + assert.equal(binding.origin, 'template'); + assert.equal(binding.field, 'referenceImages'); + assert.equal(binding.defaultAssets.length, count); + assert.deepEqual( + binding.defaultAssets.map((asset) => asset.runtimeSha256), + [cobalt, dieline].slice(0, count), + ); + assert.deepEqual( + binding.defaultAssets.map((asset) => asset.runtimePath), + [ + '/template-gallery/inputs/flux2_klein_edit.before.png', + '/template-gallery/inputs/qwen_control_image_layout.before.png', + ].slice(0, count), + ); + assert.equal(new Set(binding.defaultAssets.map((asset) => asset.runtimeSha256)).size, count); + assert.match(value.prompt, /reference image 1/i); + if (count === 2) { + assert.match(value.example.notes, /no native Fill claim/); + const mask = resolution.templateDefaultBindings.find((item) => item.field === 'maskImage'); + assert.equal(mask.defaultAssets.length, 1); + assert.equal( + mask.defaultAssets[0].runtimeSha256, + 'sha256:bytes:d36162153e2009e0b2f3a711825d39e67c02ba3577971a444bd92eebe81169ac', + ); + assert.deepEqual(value.example.expectedOutput, { width: 1024, height: 1024 }); + } + } + } +}); + +test('the real per-task offers retain append default and explicit raw precision or constrained choices', () => { + for (const id of ids) { + const value = card(id); + const { profile } = modelSelection.resolveTemplateModelSelection(value, fixture.capabilitiesPayload.capabilities); + const selection = value.executionSelection; + const offer = profile.authoringRecipes.find((item) => item.task === value.mode); + assert.ok(offer, id); + assert.equal(selection.authoringRecipeId, offer.authoringRecipeId); + assert.match(offer.authoringRecipeId, /:prompt-preview-append-fp32:v1$/u); + assert.deepEqual( + offer.rawAuthoringRecipeChoices.map(({ label }) => label), + ['Raw wording: FP32', 'Raw wording: BF16 + NF4'], + ); + assert.deepEqual( + offer.rawAuthoringRecipeChoices.map(({ authoringRecipeId }) => authoringRecipeId), + [offer.authoringRecipeId.replace('append-fp32', 'fp32'), offer.authoringRecipeId.replace('append-fp32', 'nf4')], + ); + assert.deepEqual( + offer.layoutAuthoringRecipeChoices.map(({ label }) => label), + ['Append wording: preserve authored layout', 'Generate constrained table: FP32 (Expert)'], + ); + assert.equal(offer.layoutAuthoringRecipeChoices[0].authoringRecipeId, offer.authoringRecipeId); + assert.equal( + offer.layoutAuthoringRecipeChoices[1].authoringRecipeId, + offer.authoringRecipeId.replace('append-fp32', 'constrained-fp32'), + ); + } +}); + +test('locked diffusion recipes remain explicit and independent of optional PUP NF4', () => { + for (const [prefix, , , steps, guidance] of variants) { + for (const kind of kinds) { + const value = card(`${prefix}_${kind}`); + const locked = value.example.lockedSettings; + assert.deepEqual([locked.width, locked.height, locked.steps, locked.guidanceScale], [512, 512, steps, guidance]); + assert.deepEqual( + [locked.dtype, locked.quantizationMode, locked.resourceMode, locked.autoOffload, locked.offloadMode], + ['bfloat16', 'none', 'expert', false, 'none'], + ); + assert.equal(locked.randomSeed, false); + assert.equal(value.example.expectedOutput.width, kind === 'multi_reference_edit' ? 1024 : 512); + assert.equal(locked.weightFormat, 'fp8r'); + } + } +}); + +test('raw coordinate examples are complete prompt text without seeded layout or generated-table claims', () => { + for (const [prefix] of variants) { + const value = card(`${prefix}_raw_coordinate_prompt`); + const [caption, json] = value.prompt.split('\n'); + assert.equal(caption, 'A still life with .'); + assert.deepEqual(JSON.parse(json), [ + { id: 'apple_1', bbox: [250, 125, 750, 875], desc: 'A red apple, with a green leaf.' }, + ]); + assert.equal(Object.hasOwn(value.example.lockedSettings, 'layoutConditioning'), false); + assert.match(value.example.notes, /layout_conditioning field remains null/); + assert.match(value.example.notes, /PUP stays disabled/); + assert.match(value.example.notes, /not a seeded region-widget or generated-table template/); + } +}); + +test('selected NASA and Monet candidates bind exact adapters and prompts without promoting trial evidence', () => { + const candidates = [ + { + id: 'flux3_klein_fp8r512_lora_style', + repository: 'kocabiyik/nsc7-style-lora', + revision: '9b998d3bdc3b4aeb2113ab4e8cbd9fe2ebfa1cae', + sha256: 'ae6c417cb3bb8ee6f5272a8115d7720587319c6099fffa80f8d39bbbf307daf7', + byteSize: 160696320, + weightName: 'nsc7-style-lora.safetensors', + adapterName: 'nsc7', + scale: 0.75, + seed: 481205, + prompt: + 'One complete rotating ring habitat above Earth, seen from outside in three-quarter view. A single continuous white torus surrounds a plain central hub. Warm sunlight falls across the curved structure against deep blue space, with a small view of Earth below. Every hardware surface is blank and unmarked. One habitat fills a balanced square composition, without people, other spacecraft, plants, flowers, grass or stems. No writing, letters, numbers, labels, logos, emblems, watermarks, signatures, border or frame. nsc7 style', + }, + { + id: 'flux3_klein_base_fp8r512_lora_style', + repository: 'pjecuacion/flux3-klein-mnt-oil-monet-lora', + revision: '0d94b6a4601892499defd8c5d89c24f78e78043b', + sha256: 'a25e926d8e5fd0069ed5ee3db67be8ac191df4d713bc807e2abfe61a8f885047', + byteSize: 80381072, + weightName: 'mnt_oil_klein3.safetensors', + adapterName: 'mnt_oil', + scale: 0.65, + seed: 481405, + prompt: + 'mnt_oil, a full-bleed impressionist oil painting of a single red fox walking through sunlit meadow grass beside a quiet woodland pond. The fox has a clear natural silhouette, one head, one bushy tail and coherent legs. Loose broken brushstrokes and luminous green and gold reflections contrast with soft blue shadows. Grass, reeds, water and dappled foliage fill the entire square canvas from edge to edge. The lower corners are softly painted meadow grass and pond reflections, continuous with the rest of the scene. A simple peaceful composition, natural morning light, no people, no lettering, no frame.', + }, + ]; + for (const expected of candidates) { + const value = card(expected.id); + assert.equal(value.evidencePolicy, 'generated'); + assert.equal(value.inputRequirements?.loraAdapter, undefined); + assert.deepEqual(value.workflowBlocks, ['lora']); + assert.ok(value.requiredBackendCapabilities.includes('modules.ModularDiffusers.Lora')); + assert.deepEqual(value.executionSelection.loraPolicy, { defaultAdapterName: expected.adapterName }); + const lora = value.workflowBlockSettings.lora; + assert.deepEqual(lora.model, { + source: 'hub', + value: expected.repository, + revision: expected.revision, + sha256: expected.sha256, + byteSize: expected.byteSize, + license: 'FLUX Kommunity License v1.0', + }); + assert.deepEqual( + [lora.weightName, lora.adapterName, lora.scale, lora.additionalAdapters], + [expected.weightName, expected.adapterName, expected.scale, undefined], + ); + assert.equal(value.prompt, expected.prompt); + assert.equal(value.description, expected.prompt); + assert.equal(value.negativePrompt, ''); + assert.equal(value.example.lockedSeed, expected.seed); + assert.match(value.label, /LoRA Style:/); + assert.equal(value.example.status, 'unverified'); + assert.match(value.example.notes, /model_cpu.*autoOffload=true/); + assert.match(value.example.notes, /none.*autoOffload=false/); + assert.match(value.promptGuide.modelHints.join(' '), /FLUX Kommunity License/); + } +}); + +test('revised plain-radio recipes retain distinct tested seeds', () => { + assert.equal(card('flux3_klein_fp8r512_text_to_image').example.lockedSeed, 481402); + assert.equal(card('flux3_klein_base_fp8r512_text_to_image').example.lockedSeed, 481401); +}); + +// Complete source inputs are not native output, fit or publication proof. +test('all ten reviewed fixed-input recipes retain complete source authority without inline qualification', () => { + for (const id of ids) { + const value = card(id); + assert.deepEqual(inputs.resolveTemplateInputs(value).missingLabels, []); + assert.ok(value.prompt.trim()); + assert.equal(value.runtimeReuseKey.includes(':fp8r:'), true); + assert.equal(value.executionSelection.memoryPolicy, 'custom_experimental'); + } + for (const id of ids) { + const value = card(id); + assert.equal( + templates.PLANNING_STUDIO_TEMPLATES.some((item) => item.id === id), + false, + ); + assert.equal(value.readinessPolicy, value.inputRequirements ? 'requires_input' : 'runnable'); + assert.equal(value.example.status, 'unverified'); + assert.equal(Object.hasOwn(value.example, 'blockReason'), false); + assert.equal(Object.hasOwn(value.example, 'outputPath'), false); + assert.equal(Object.hasOwn(value.example, 'runtimeFingerprint'), false); + } +}); + +// This uses captured source metadata and mocked managed input paths only. It +// constructs ordinary graphs; it does not read media, execute or qualify models. +test('all ten reviewed cards create the unchanged ordinary FP8r task graphs', async () => { + const load = (name) => server.ssrLoadModule(`/src/${name}.ts`); + const [operations, catalog, choices, requests, creator, flow, defaults, exactness, visualGroups] = await Promise.all([ + load('workflow/operationContracts'), + load('workflow/operationCatalog'), + load('workflow/workflowChoices'), + load('workflow/operationStarterRequest'), + load('studio/templateOperationWorkflow'), + load('stores/useFlowStore'), + load('studio/modelProfiles'), + load('studio/templateExactness'), + load('workflow/visualOperationGroupProjection'), + ]); + const captured = JSON.parse( + await readFile(path.join(ROOT, 'tests/fixtures/public-flux3-template-creators.v1.json'), 'utf8'), + ); + const capturedBefore = structuredClone(captured); + assert.equal(captured.activeProvider, null); + assert.equal(captured.starters.length, 10); + for (const key of [ + 'modules.Image.Load', + 'modules.Image.Preview', + 'modules.ModularDiffusers.ImageEncode', + 'modules.ModularDiffusers.Lora', + ]) { + const leaf = captured.registry[key]; + assert.ok(leaf, key); + assert.equal(`${leaf.module}.${leaf.action}`, key); + } + const payload = captured.capabilitiesPayload; + const contracts = operations.parseOperationContracts( + payload.operationContracts, + payload.operationContractSchemaVersion, + ); + const support = catalog.parsePipelineSupport( + payload.pipelineSupport, + payload.pipelineSupportSchemaVersion, + contracts, + ); + const descriptors = choices.parseWorkflowModelDescriptors(payload, support); + const registry = structuredClone(captured.registry); + const utilities = JSON.parse( + await readFile(path.join(ROOT, 'tests/fixtures/template-image-composite-utilities.v1.json'), 'utf8'), + ); + Object.assign(registry, structuredClone(utilities.registry)); + const registryBefore = structuredClone(registry); + for (const id of ids) { + const value = card(id); + const cardBefore = structuredClone(value); + const selected = modelSelection.resolveTemplateModelSelection(value, payload.capabilities); + assert.ok(selected, id); + const { capability, repository, revision } = selected; + const selection = value.executionSelection; + const specs = capability.studioExecutionSpecs.filter( + (item) => item.mode === value.mode && item.executionProfileId === selection.executionProfileId, + ); + assert.equal(specs.length, 1, id); + const spec = specs[0]; + const sources = captured.starters.filter( + (item) => + item.pipelineClass === selection.pipelineClass && + item.task === selection.task && + item.authoring.id === selection.authoringRecipeId && + item.authoring.executionProfileIds.includes(selection.executionProfileId), + ); + assert.equal(sources.length, 1, `${id}: exact captured public per-task starter`); + const starter = requests.parseOperationStarter( + structuredClone(sources[0]), + selection.pipelineClass, + selection.task, + contracts, + { executionProfileId: selection.executionProfileId, authoringRecipeId: selection.authoringRecipeId }, + ); + const rawOwners = starter.nodes.filter( + (item) => item.node.module === 'modules.ModularDiffusers' && item.node.action === 'ModelsLoader', + ); + assert.equal(rawOwners.length, 1); + const device = rawOwners[0].node.params.device.value; + assert.equal(device, 'cpu:0', 'use the actual captured CPU fixture device, not a GPU claim'); + for (const [, key] of starter.authoring.roles) + assert.ok(value.requiredBackendCapabilities.includes(key), `${id}: declared creator role ${key}`); + const defaultBindings = inputs.resolveTemplateInputs(value).templateDefaultBindings; + const assets = defaultBindings + .filter((binding) => binding.field === 'referenceImages') + .flatMap((binding) => binding.defaultAssets); + const maskAsset = defaultBindings.find((binding) => binding.field === 'maskImage')?.defaultAssets[0]; + // These do not resolve or copy public assets: the real upload service would + // supply managed input paths after normal hash verification. + const references = assets.map((asset, index) => `unit-managed-inputs/${id}/${index}-${asset.fileName}`); + const form = { + ...defaults.DEFAULT_STUDIO_FORM, + ...exactness.getTemplateLockedSettings(value), + mode: value.mode, + modelType: value.modelType, + device, + referenceImages: references, + maskImage: maskAsset ? `unit-managed-inputs/${id}/${maskAsset.fileName}` : '', + }; + assert.equal(Object.hasOwn(form, 'modelRepo'), false, 'Normal creator form does not store the loader repository.'); + assert.deepEqual( + [form.weightFormat, form.dtype, form.quantizationMode, form.resourceMode], + ['fp8r', 'bfloat16', 'none', 'expert'], + ); + const grouped = creator.createTemplateOperationGraph(value, form, starter, registry, spec, capability, { + workflowModelDescriptors: descriptors, + }); + const graph = flow.expandFlowExecutionGraph(grouped.nodes, grouped.edges); + const nodeFor = (module, action) => { + const nodes = graph.nodes.filter((node) => node.data.module === module && node.data.action === action); + assert.equal(nodes.length, 1, `${id}: ${module}.${action}`); + return nodes[0]; + }; + const owner = nodeFor('modules.ModularDiffusers', 'ModelsLoader'); + const prompt = nodeFor('modules.ModularDiffusers', 'EncodePrompt'); + const denoise = nodeFor('modules.ModularDiffusers', 'Denoise'); + const preview = nodeFor('modules.Image', 'Preview'); + assert.deepEqual(owner.data.params.repo_id.value, { source: 'hub', value: repository }); + assert.deepEqual( + [ + owner.data.params.model_type.value, + owner.data.params.revision.value, + owner.data.params.weight_format.value, + owner.data.params.dtype.value, + owner.data.params.device.value, + ], + [selection.pipelineClass, revision, 'fp8r', 'bfloat16', device], + ); + assert.equal(owner.data.params.auto_offload.value, false); + assert.equal(owner.data.params.offload_mode.value, 'none'); + assert.equal( + graph.nodes.some((node) => node.data.action === 'QuantizationConfigNode'), + false, + `${id}: parent text-encoder quantization requires an explicitly authored derivative`, + ); + assert.equal( + graph.edges.some((edge) => edge.target === owner.id && edge.targetHandle === 'quant_config'), + false, + ); + assert.equal(prompt.data.params.prompt.value, value.prompt); + assert.equal(prompt.data.params.layout_conditioning.value ?? prompt.data.params.layout_conditioning.default, null); + assert.deepEqual( + [ + denoise.data.params.width.value, + denoise.data.params.height.value, + denoise.data.params.num_inference_steps.value, + ], + [512, 512, form.steps], + ); + const edge = (from, sourceHandle, to, targetHandle) => { + const matches = graph.edges.filter( + (item) => + item.source === from.id && + item.sourceHandle === sourceHandle && + item.target === to.id && + item.targetHandle === targetHandle, + ); + assert.equal( + matches.length, + 1, + `${id}: ${from.data.action}.${sourceHandle} -> ${to.data.action}.${targetHandle}`, + ); + }; + edge(nodeFor('modules.ModularDiffusers', 'DecodeLatents'), 'images', preview, 'image'); + if (value.workflowBlocks?.includes('lora')) { + const lora = nodeFor('modules.ModularDiffusers', 'Lora'); + const expected = value.workflowBlockSettings.lora; + assert.deepEqual(lora.data.params.model.value, { source: 'hub', value: expected.model.value }); + assert.deepEqual( + ['revision', 'expected_sha256', 'weight_name', 'adapter_name', 'scale'].map( + (field) => lora.data.params[field].value, + ), + [expected.model.revision, expected.model.sha256, expected.weightName, expected.adapterName, expected.scale], + ); + assert.notEqual(lora.data.params.revision.value, owner.data.params.revision.value); + edge(lora, 'lora', owner, 'lora_list'); + assert.equal( + graph.edges.some((item) => item.target === lora.id && item.targetHandle === 'previous_loras'), + false, + ); + } else { + assert.equal( + graph.nodes.some((node) => node.data.action === 'Lora'), + false, + ); + } + if (value.mode === 'edit_image') { + const encoder = nodeFor('modules.ModularDiffusers', 'ImageEncode'); + const imageWire = graph.edges.find((item) => item.target === encoder.id && item.targetHandle === 'image'); + const image = graph.nodes.find((item) => item.id === imageWire.source); + assert.equal(image.data.module, 'modules.Image'); + assert.equal(image.data.action, 'Load'); + assert.deepEqual(image.data.params.file.value, references, `${id}: preserve ordered references`); + assert.equal(references.length, value.inputRequirements.referenceImages); + edge(owner, 'vae_out', encoder, 'vae'); + edge(image, 'image', encoder, 'image'); + edge(encoder, 'image_cond_latents', denoise, 'image_cond_latents'); + edge(encoder, 'reference_binding', prompt, 'reference_binding'); + edge(encoder, 'reference_binding', denoise, 'reference_binding'); + } else { + assert.deepEqual(references, []); + assert.equal( + graph.nodes.some( + (node) => + node.data.action === 'ImageEncode' || (node.data.module === 'modules.Image' && node.data.action === 'Load'), + ), + false, + ); + assert.equal( + graph.edges.some((item) => item.target === denoise.id && item.targetHandle === 'image_cond_latents'), + false, + ); + } + if (value.modelType === 'Flux3ModularPipeline') { + const guider = nodeFor('modules.ModularDiffusers', 'Guider'); + assert.equal(guider.data.params.guidance_scale.value, 3.5); + edge(guider, 'guider_out', denoise, 'guider'); + } + if (id.endsWith('_multi_reference_edit')) { + const settings = { + backgroundReferenceIndex: 1, + foregroundSize: { width: 768, height: 768 }, + verticalPad: { width: 768, height: 1280 }, + horizontalPad: { width: 1024, height: 1280 }, + crop: { x: 0, y: value.modelType === 'Flux3ModularPipeline' ? 165 : 205, width: 1024, height: 1024 }, + maskChannel: 'luminance', + invertMask: false, + }; + const composedTemplate = { + ...value, + workflowBlocks: ['masked_composite'], + workflowBlockSettings: { maskedComposite: settings }, + }; + const composedForm = { ...form, maskImage: 'unit-managed-inputs/protected-photo-mask.png' }; + const compose = (template = composedTemplate, currentForm = composedForm, nodes = registry) => + creator.createTemplateOperationGraph(template, currentForm, starter, nodes, spec, capability, { + workflowModelDescriptors: descriptors, + }); + const groupedComposite = compose(); + assert.deepEqual( + groupedComposite.nodes.map((node) => node.data.label).sort(), + [ + 'Model Setup', + 'Reference Images', + 'Prepare Mask', + 'Encode Inputs', + 'Generate', + 'Composite', + 'Image Output', + ].sort(), + `${id}: protected packaging has exactly the seven selected stages`, + ); + const composed = flow.expandFlowExecutionGraph(groupedComposite.nodes, groupedComposite.edges); + const byAction = (module, action) => + composed.nodes.filter((node) => node.data.module === module && node.data.action === action); + assert.equal(byAction('modules.ModularDiffusers', 'ModelsLoader').length, 1); + const exported = flow.useFlowStore.getState().exportGraph('composite-source-unit', undefined, { + sourceGraph: groupedComposite, + randomizeSeeds: false, + }); + const baseline = flow.useFlowStore.getState().exportGraph('composite-baseline-unit', undefined, { + sourceGraph: grouped, + randomizeSeeds: false, + }); + const loaderCall = (api) => Object.values(api.nodes).find((node) => node.action === 'ModelsLoader').params; + assert.deepEqual( + loaderCall(exported), + loaderCall(baseline), + 'composition never changes the executable model recipe', + ); + assert.equal(byAction('modules.Image', 'Load').length, 3); + const masks = byAction('modules.Image', 'Load').filter( + (node) => JSON.stringify(node.data.params.file.value) === JSON.stringify([composedForm.maskImage]), + ); + assert.equal(masks.length, 1); + const backgrounds = byAction('modules.Image', 'Load').filter( + (node) => JSON.stringify(node.data.params.file.value) === JSON.stringify([references[1]]), + ); + assert.equal(backgrounds.length, 1, 'background is the second reference, preserving the generation input order'); + const resizes = byAction('modules.Image', 'Resize'); + assert.deepEqual( + resizes.map((node) => + ['width', 'height', 'method', 'interpolation', 'multiple_of'].map((k) => node.data.params[k].value), + ), + [ + [768, 768, 'stretch', 'lanczos', 1], + [768, 1280, 'pad', 'lanczos', 1], + [1024, 1280, 'pad', 'lanczos', 1], + ], + ); + const crops = byAction('modules.ImageOperations', 'CropImage'); + assert.equal(crops.length, 1); + assert.equal(crops[0].data.params.y.value, settings.crop.y); + const composites = byAction('modules.ImageOperations', 'MaskComposite'); + const saves = byAction('modules.Image', 'Save'); + assert.equal(composites.length, 1); + assert.equal(saves.length, 1); + assert.equal(saves[0].data.params.saved_images.fieldOptions.format, 'PNG'); + assert.equal(saves[0].data.studioRole, 'compositeOutput'); + assert.match(saves[0].data.params.filename.value, /\.png$/u); + for (const [source, output, target, input] of [ + [backgrounds[0], 'image', composites[0], 'background'], + [masks[0], 'image', composites[0], 'mask'], + [crops[0], 'output', composites[0], 'foreground'], + [composites[0], 'output', saves[0], 'image'], + ]) + assert.equal( + composed.edges.filter( + (e) => + e.source === source.id && e.sourceHandle === output && e.target === target.id && e.targetHandle === input, + ).length, + 1, + ); + assert.equal(Object.values(exported.nodes).filter((node) => node.action === 'MaskComposite').length, 1); + assert.equal(Object.values(exported.nodes).filter((node) => node.action === 'Save').length, 1); + assert.throws(() => compose(composedTemplate, { ...composedForm, maskImage: '' }), /protection mask/); + assert.throws(() => compose(composedTemplate, { ...composedForm, batchSize: 2 }), /one image per prompt/); + assert.throws( + () => + compose({ + ...composedTemplate, + workflowBlockSettings: { + maskedComposite: { ...settings, backgroundReferenceIndex: 2 }, + }, + }), + /existing ordered reference/, + ); + assert.throws( + () => + compose({ + ...composedTemplate, + workflowBlockSettings: { + maskedComposite: { ...settings, crop: { ...settings.crop, y: -1 } }, + }, + }), + /crop origin/, + ); + const lossyRegistry = structuredClone(registry); + delete lossyRegistry['modules.Image.Save'].params.saved_images.fieldOptions; + assert.throws(() => compose(composedTemplate, composedForm, lossyRegistry), /lossless Save Image/); + for (const key of Object.keys(utilities.registry)) { + const missing = structuredClone(registry); + delete missing[key]; + assert.throws(() => compose(composedTemplate, composedForm, missing), /backend registry is missing/); + } + } + assert.equal( + graph.nodes.some((node) => node.data.module === 'modules.HuggingFaceTransformers'), + false, + 'PUP starts disabled; graph authoring is not a provider execution', + ); + // Ordinary production Run adds correlation plus this durable snapshot, + // without a managed Studio resource plan. Use the real creator/exporter; + // these are CPU metadata fixtures, never native execution measurements. + const apiGraph = flow.useFlowStore.getState().exportGraph('native-expert-proof', undefined, { + sourceGraph: grouped, + randomizeSeeds: false, + }); + const proofGraph = { + ...apiGraph, + runtimeHints: { workflowSnapshot: { ...structuredClone(grouped), studioForm: form, studioGraphBinding: null } }, + }; + for (const hints of [{}, { resourceMode: 'expert' }]) { + const current = { ...proofGraph, runtimeHints: { ...proofGraph.runtimeHints, ...hints } }; + const plan = executionPlanIdentity(current).plan; + assert.equal(plan.source, 'executed-expert-modular-graph-v1', id); + assert.equal(plan.modelType, selection.pipelineClass); + assert.equal(plan.modelRepo, repository); + assert.equal(plan.modelRevision, revision); + assert.equal(plan.executionProfileId, selection.executionProfileId); + assert.equal(plan.authoringRecipeId, selection.authoringRecipeId); + assert.deepEqual( + [plan.dtype, plan.weightFormat, plan.quantizationMode, plan.device], + ['bfloat16', 'fp8r', 'none', device], + ); + assert.deepEqual([plan.autoOffload, plan.offloadMode, plan.weightLoadingMode], [false, 'none', 'cpu']); + assert.equal( + executionReceiptIdentity({}, plan).resourceCandidateId, + `manual-resource-v1:${selection.pipelineClass}|bfloat16|none|none`, + ); + assert.equal(executionReceiptIdentity({}, plan).peakMemoryBytes, null, 'No fabricated measurement.'); + const retainedRepo = structuredClone(current); + retainedRepo.runtimeHints.workflowSnapshot.studioForm.modelRepo = repository; + assert.deepEqual(executionPlanIdentity(retainedRepo).plan, plan, 'An optional matching repository stays valid.'); + } + const ordinary = visualGroups.unpackVisualOperationGroups(grouped).graph; + const ordinaryApi = flow.useFlowStore.getState().exportGraph('native-expert-proof-ordinary', undefined, { + sourceGraph: ordinary, + randomizeSeeds: false, + }); + ordinaryApi.runtimeHints = { workflowSnapshot: { ...ordinary, studioForm: form, studioGraphBinding: null } }; + assert.deepEqual( + executionPlanIdentity(ordinaryApi).plan, + executionPlanIdentity(proofGraph).plan, + 'Ordinary and grouped creator graphs prove the same loading recipe.', + ); + if (id === ids[0]) { + const loaderId = Object.keys(apiGraph.nodes).find((key) => apiGraph.nodes[key].action === 'ModelsLoader'); + const parentContext = (g) => + g.runtimeHints.workflowSnapshot.nodes + .flatMap((node) => node.data.blockInstanceV2?.effectiveGraph.nodes ?? [node]) + .find((node) => node.data.operationAuthoring?.ancillaryParent)?.data.operationAuthoring.ancillaryParent; + const mutations = [ + (g) => { + g.runtimeHints.workflowSnapshot.studioForm.dtype = 'float16'; + }, + (g) => { + g.runtimeHints.workflowSnapshot.studioForm.weightFormat = 'native'; + }, + (g) => { + g.runtimeHints.workflowSnapshot.studioForm.device = 'cuda:9'; + }, + (g) => { + g.runtimeHints.workflowSnapshot.studioForm.autoOffload = true; + }, + (g) => { + g.runtimeHints.workflowSnapshot.studioForm.modelType = 'OtherPipeline'; + }, + (g) => { + g.runtimeHints.workflowSnapshot.studioForm.modelRepo = 'Other/Model'; + }, + ...[null, '', 123, { source: 'hub', value: repository }].map((modelRepo) => (g) => { + g.runtimeHints.workflowSnapshot.studioForm.modelRepo = modelRepo; + }), + (g) => { + g.runtimeHints.workflowSnapshot.studioForm.trustRemoteCode = true; + }, + (g) => { + g.nodes[loaderId].params.repo_id.value = repository; + }, + (g) => { + g.nodes[loaderId].params.revision.value = 'main'; + }, + (g) => { + g.nodes[loaderId].params.trust_remote_code.value = true; + }, + (g) => { + g.nodes[loaderId].params.dtype.sourceId = 'foreign'; + }, + (g) => { + g.nodes[loaderId].params.quant_config.sourceId = 'foreign'; + }, + (g) => { + g.nodes[loaderId].params.unet.sourceId = 'foreign'; + }, + (g) => { + g.paths = g.paths.map((row) => row.filter((key) => key !== loaderId)); + }, + (g) => { + g.nodes.extra = structuredClone(g.nodes[loaderId]); + g.paths[0].push('extra'); + }, + (g) => { + g.runtimeHints.workflowSnapshot.nodes = []; + }, + (g) => { + g.runtimeHints.resourceMode = 'auto'; + }, + (g) => { + parentContext(g).parent.executionProfileId = 'foreign-profile'; + }, + (g) => { + delete parentContext(g).parent.authoringRecipeId; + }, + (g) => { + parentContext(g).parent.task = 'edit_image'; + }, + (g) => { + parentContext(g).parentRoleNodes.models = 'foreign'; + }, + (g) => { + parentContext(g).parentRoleNodes.prompt = 'foreign'; + }, + (g) => { + parentContext(g).parentRoleNodes.decode = parentContext(g).parentRoleNodes.denoise; + }, + (g) => { + g.nodes[Object.keys(g.nodes).find((key) => g.nodes[key].action === 'DecodeLatents')].params.vae.sourceId = + 'foreign'; + }, + ]; + for (const [index, mutate] of mutations.entries()) { + const changed = structuredClone(proofGraph); + mutate(changed); + assert.equal( + executionReceiptIdentity({}, executionPlanIdentity(changed).plan).resourceCandidateId, + null, + `native Expert mismatch ${index} must not recover a receipt identity`, + ); + } + } + assert.deepEqual(value, cardBefore); + assert.equal(value.example.status, 'unverified'); + } + assert.deepEqual(registry, registryBefore); + assert.deepEqual(captured, capturedBefore); +}); diff --git a/scripts/generate-ctc-catalog-insertion-fixture.py b/scripts/generate-ctc-catalog-insertion-fixture.py new file mode 100644 index 00000000..693ed855 --- /dev/null +++ b/scripts/generate-ctc-catalog-insertion-fixture.py @@ -0,0 +1,32 @@ +"""Regenerate the no-weight CTC insertion fixture from the paired backend.""" + +import argparse +import json +from pathlib import Path +import sys + +ROOT = Path(__file__).resolve().parents[1] +sys.path.insert(0, str(ROOT.parent / 'MoDiff')) + +from modiff.huggingface_node_library import reviewed_huggingface_node_library +from modiff.registered_block_v2_catalog import registered_block_v2_catalog_entry + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--output', type=Path, default=ROOT / 'tests/fixtures/ctc-catalog-insertion.v1.json') + args = parser.parse_args() + identity = 'transformers.composite:HuggingFaceCTCSpeechRecognitionModel:speech_to_text' + definition = next(row for row in reviewed_huggingface_node_library()['definitions'] if row['id'] == identity) + (admission,) = definition['executionAdmissions'] + entry = registered_block_v2_catalog_entry(identity, admission['id']) + assert entry and entry['catalogDefinitionContentHash'] == definition['contentHash'] + result = {'schemaVersion': 1, + 'generatedFrom': 'modiff.huggingface_node_library and modiff.registered_block_v2_catalog; static contract, no model execution', + 'catalogDefinition': definition, 'compiledEntry': entry} + args.output.write_text(json.dumps(result, indent=2, ensure_ascii=False) + '\n', encoding='utf-8') + print('Generated the CTC insertion fixture from the current paired contracts; no model execution.') + + +if __name__ == '__main__': + main() diff --git a/scripts/graph-fixer.test.mjs b/scripts/graph-fixer.test.mjs index ed65495b..284e47e9 100644 --- a/scripts/graph-fixer.test.mjs +++ b/scripts/graph-fixer.test.mjs @@ -294,6 +294,161 @@ test('Fix recognizes an internal connected output in collapsed, expanded and sav } }); +function splitImageBlock(expanded, boundary = false, nested = false) { + const source = definition('modules.Image', 'Load', 'Load Image', { + image: { display: 'output', type: 'image' }, + }); + const resize = node( + 'resize', + definition('modules.Image', 'Resize', 'Resize', { + image: { display: 'input', type: 'image', required: true }, + output: { display: 'output', type: 'image' }, + width: { type: 'int', value: 256 }, + height: { type: 'int', value: 256 }, + }), + ); + const base = structuredClone(blockV2Node().data.blockInstanceV2.definitionSnapshot); + const semantic = { + nodes: [ + { nodeId: 'load', nodeType: 'custom', data: source }, + { nodeId: 'preview', nodeType: 'custom', data: imagePreview, ...(nested ? { parentNodeId: 'inside' } : {}) }, + ...(boundary === 'mirror' ? [{ nodeId: 'second-preview', nodeType: 'custom', data: imagePreview }] : []), + ...(nested + ? [{ nodeId: 'inside', nodeType: 'group', data: { type: 'group', label: 'Inside', params: {} } }] + : []), + ], + edges: [], + executionOrder: ['load', 'preview', ...(boundary === 'mirror' ? ['second-preview'] : [])], + }; + base.graph = { ...semantic, graphHash: blockSchema.blockGraphHashV2(semantic) }; + base.boundary = { + mode: 'explicit', + inputs: boundary + ? [ + { + portId: 'result', + label: 'Result', + valueType: 'image', + required: true, + binding: { nodeId: 'preview', fieldOrPortId: 'image' }, + ...(boundary === 'mirror' + ? { mirrorBindings: [{ nodeId: 'second-preview', fieldOrPortId: 'image' }] } + : {}), + }, + ] + : [], + outputs: [ + { + portId: 'loaded', + label: 'Loaded image', + valueType: 'image', + required: false, + binding: { nodeId: 'load', fieldOrPortId: 'image' }, + }, + ], + }; + base.previews = []; + base.contentHash = blockSchema.blockDefinitionContentHashV2(base); + let instance = blockSchema.createBlockInstanceV2(base, { + instanceId: 'split-image', + position: { x: 0, y: 0 }, + size: { width: 360, height: 420 }, + }); + instance = blockRuntime.setBlockPresentationV2(instance, { + expanded, + collapsedContainerNodeIds: nested === 'collapsed' ? ['inside'] : [], + }); + const projection = blockRuntime.materializeBlockProjectionV2(blockRuntime.createBlockRootNodeV2(instance)); + return { + nodes: [...projection.nodes, resize], + edges: [ + ...projection.edges, + edge('to-resize', instance.instanceId, 'loaded', resize.id, 'image'), + edge( + 'to-preview', + resize.id, + 'output', + instance.instanceId, + boundary ? 'result' : 'block-crossing:input:preview:image', + ), + ], + registry: { 'modules.Image.Preview': imagePreview }, + }; +} + +test('Fix preserves the Load to outside Resize to inside Preview crossing route', () => { + for (const expanded of [true, false]) { + const context = JSON.parse(JSON.stringify(splitImageBlock(expanded))); + const before = structuredClone(context); + const plan = graphFixer.buildGraphFixPlan(context); + assert.equal( + plan.issues.some(({ kind }) => kind === 'missing_output' || kind === 'missing_input'), + false, + `The saved crossing route is already connected; expanded=${expanded}.`, + ); + assert.equal(plan.candidateCount, 0, 'Do not suggest bypassing the external Resize.'); + assert.deepEqual(context, before); + } +}); + +test('Fix resolves public, mirrored and nested output input bindings without changing saved graphs', () => { + for (const expanded of [false, true]) + for (const boundary of [false, true, 'mirror']) + for (const nested of [false, 'expanded', 'collapsed']) { + const context = JSON.parse(JSON.stringify(splitImageBlock(expanded, boundary, nested))); + const before = structuredClone(context); + const plan = graphFixer.buildGraphFixPlan(context); + assert.deepEqual(plan.issues, [], `expanded=${expanded}, boundary=${boundary}, nested=${nested}`); + assert.deepEqual(context, before); + } +}); + +test('Fix does not infer output connectivity from missing, invalid or unrelated Block crossings', () => { + for (const fault of [ + 'disconnected', + 'missing-source', + 'unknown-leaf', + 'unknown-field', + 'wrong-direction', + 'malformed-handle', + 'wrong-source-direction', + 'wrong-type', + 'disabled-source', + 'unrelated-block', + ]) { + const context = splitImageBlock(true); + const crossing = context.edges.find(({ id }) => id === 'to-preview'); + if (fault === 'disconnected') context.edges = context.edges.filter((item) => item !== crossing); + if (fault === 'missing-source') crossing.source = 'absent'; + if (fault === 'unknown-leaf') crossing.targetHandle = 'block-crossing:input:absent:image'; + if (fault === 'unknown-field') crossing.targetHandle = 'block-crossing:input:preview:absent'; + if (fault === 'wrong-direction') crossing.targetHandle = 'block-crossing:output:preview:image'; + if (fault === 'malformed-handle') crossing.targetHandle = 'block-crossing:input:%:image'; + if (fault === 'wrong-source-direction') crossing.sourceHandle = 'image'; + if (fault === 'wrong-type') context.nodes.find(({ id }) => id === 'resize').data.params.output.type = 'string'; + if (fault === 'disabled-source') context.nodes.find(({ id }) => id === 'resize').data.uiState = { disabled: true }; + if (fault === 'unrelated-block') { + const unrelated = blockV2Node('unrelated'); + context.nodes.push(unrelated); + crossing.target = unrelated.id; + crossing.targetHandle = 'reference'; + } + const before = structuredClone(context); + const plan = graphFixer.buildGraphFixPlan(context); + assert.equal( + plan.issues.some(({ kind }) => kind === 'missing_output'), + true, + fault, + ); + if (!['disconnected', 'disabled-source', 'unrelated-block'].includes(fault)) + assert.ok( + plan.issues.some(({ kind }) => kind === 'broken_link' || kind === 'type_mismatch'), + fault, + ); + assert.deepEqual(context, before); + } +}); + test('required inputs with explicit values or defaults do not receive spurious connection repairs', () => { const text = definition('modules.Test', 'Text', 'Text', { text: { display: 'output', type: 'string' } }); const target = definition('modules.Test', 'Generate', 'Generate', { diff --git a/scripts/graph-visible-output-readiness.test.mjs b/scripts/graph-visible-output-readiness.test.mjs new file mode 100644 index 00000000..22944e69 --- /dev/null +++ b/scripts/graph-visible-output-readiness.test.mjs @@ -0,0 +1,280 @@ +import assert from 'node:assert/strict'; +import { after, before, beforeEach, test } from 'node:test'; +import { createServer } from 'vite'; + +let server, flow, readiness, nodesStore; +before(async () => { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, String(value)), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { + localStorage, + sessionStorage: localStorage, + dispatchEvent: () => true, + location: { origin: 'http://127.0.0.1:5191' }, + }; + server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + ({ useFlowStore: flow } = await server.ssrLoadModule('/src/stores/useFlowStore.ts')); + readiness = await server.ssrLoadModule('/src/studio/runReadiness.ts'); + ({ useNodesStore: nodesStore } = await server.ssrLoadModule('/src/stores/useNodeStore.ts')); +}); +after(async () => server?.close()); +beforeEach(() => flow.getState().replaceGraph({ nodes: [], edges: [] })); + +function graph(display = 'ui_video', source = 'file') { + return { + nodes: [ + { + id: 'frames', + type: 'custom', + position: { x: 0, y: 0 }, + data: { + module: 'modules.Video', + action: 'Load', + label: 'Scene', + type: 'custom', + params: { + file: { display: 'filebrowser', type: 'str', value: ['@data/videos/scene.mp4'] }, + video: { display: 'output', type: 'video' }, + }, + }, + }, + { + id: 'film', + type: 'custom', + position: { x: 300, y: 0 }, + data: { + module: 'modules.Video', + action: 'ExportWithAudio', + label: 'Moonflower photographic film', + category: 'Video', + type: 'custom', + params: { + video: { display: 'input', type: 'video' }, + preview: { display, type: 'url', dataSource: source }, + file: { display: 'output', type: 'video' }, + }, + }, + }, + ], + edges: [{ id: 'frames-film', source: 'frames', sourceHandle: 'video', target: 'film', targetHandle: 'video' }], + }; +} + +function structuralIssues() { + return readiness + .collectRunReadinessIssues({ sid: 'unit-session', isConnected: true, includeStudio: false }) + .filter((issue) => ['graph_output_missing', 'graph_output_disconnected'].includes(issue.code)); +} + +test('a renamed video-with-audio exporter retains its declared visible output', () => { + const original = graph(); + flow.getState().replaceGraph(original); + const before = structuredClone(flow.getState().toObject()); + const inspection = readiness.inspectCurrentGraph(); + assert.deepEqual(inspection.connectedOutputNodeIds, ['film']); + assert.equal(inspection.outputPathCount, 1); + assert.deepEqual(structuralIssues(), []); + assert.deepEqual(flow.getState().toObject(), before, 'Readiness must not repair or relabel the saved graph.'); +}); + +test('declared media and text previews do not depend on a node label or action spelling', () => { + for (const display of ['ui_image', 'ui_video', 'ui_audio', 'ui_text', 'ui_imagecompare']) { + const current = graph(display); + current.nodes[1].data.module = 'modules.Utility'; + current.nodes[1].data.action = 'Bake'; + flow.getState().replaceGraph(current); + assert.deepEqual(readiness.inspectCurrentGraph().connectedOutputNodeIds, ['film'], display); + } +}); + +test('an input-backed widget or unknown preview source does not invent an output', () => { + for (const source of ['video', 'absent', '']) { + flow.getState().replaceGraph(graph('ui_video', source)); + assert.deepEqual(readiness.inspectCurrentGraph().outputNodeIds, [], source); + assert.equal(structuralIssues()[0]?.code, 'graph_output_missing'); + } + flow.getState().replaceGraph(graph('ui_label')); + assert.deepEqual(readiness.inspectCurrentGraph().outputNodeIds, []); +}); + +test('disabled and disconnected declared outputs still block Run', () => { + const disconnected = graph(); + disconnected.edges = []; + flow.getState().replaceGraph(disconnected); + assert.equal(structuralIssues()[0]?.code, 'graph_output_disconnected'); + const disabled = graph(); + disabled.nodes[1].data.uiState = { disabled: true }; + flow.getState().replaceGraph(disabled); + assert.equal(structuralIssues()[0]?.code, 'graph_output_missing'); +}); + +test('readiness excludes descendants of disabled containers just as API export does', () => { + const current = graph(); + current.nodes.forEach((node) => { + node.parentId = 'disabled-stage'; + }); + current.nodes.unshift({ + id: 'disabled-stage', + type: 'group', + position: { x: 0, y: 0 }, + data: { type: 'group', module: '', action: '', params: {}, uiState: { disabled: true } }, + }); + flow.getState().replaceGraph(current); + const before = structuredClone(flow.getState().toObject()); + const inspection = readiness.inspectCurrentGraph(); + assert.equal(inspection.enabledExecutableCount, 0); + assert.deepEqual(inspection.outputNodeIds, []); + assert.deepEqual(flow.getState().toObject(), before); +}); + +test('the graph names only an unambiguous owner with literal model selectors', () => { + const pipeline = 'ExampleVideoAudioPipeline'; + const loader = { + id: 'declared-owner', + type: 'custom', + position: { x: 0, y: 0 }, + data: { + type: 'custom', + module: 'modules.DiffusersVideo', + action: 'LoadPipeline', + label: 'Model Setup', + params: { + pipeline_class: { value: pipeline }, + model_id: { value: { source: 'hub', value: 'publisher/example' } }, + execution_profile_id: { value: 'example:direct' }, + }, + operationAuthoring: { + schemaVersion: 1, + operation: { + pipelineClass: pipeline, + task: 'text_to_video_with_audio', + workflowId: null, + binding: { pipelineClass: pipeline, values: {} }, + operationId: 'diffusion.load_models', + nodeKey: 'modules.DiffusersVideo.LoadPipeline', + nodeType: 'loader', + blockName: null, + decomposition: 'loader', + support: 'declared', + ports: [], + }, + defaults: {}, + retained: [], + }, + }, + }; + flow.getState().replaceGraph({ nodes: [loader], edges: [] }); + const before = structuredClone(flow.getState().toObject()); + const summary = readiness.inspectCurrentGraph(); + assert.equal(summary.declaredTask, 'text_to_video_with_audio'); + const declared = summary.declaredModel; + assert.deepEqual(declared, { + pipeline, + repo: 'publisher/example', + profileId: 'example:direct', + }); + assert.deepEqual(readiness.inspectWorkflowModel(before), declared); + assert.deepEqual(flow.getState().toObject(), before); + + const other = structuredClone(loader); + other.id = 'other-model-owner'; + flow.getState().replaceGraph({ nodes: [loader, other], edges: [] }); + const multiple = readiness.inspectCurrentGraph(); + assert.equal(multiple.modelRefs.length, 2, 'Separate owners can select the same repository.'); + assert.equal(multiple.declaredModel, undefined); + assert.deepEqual( + readiness.inspectWorkflowModel(before), + declared, + 'The inspected capture can outlive the active graph.', + ); + + const source = graph().nodes[0]; + flow.getState().replaceGraph({ + nodes: [source, loader], + edges: [ + { id: 'connected-model', source: source.id, sourceHandle: 'video', target: loader.id, targetHandle: 'model_id' }, + ], + }); + assert.equal( + readiness.inspectCurrentGraph().declaredModel, + undefined, + 'A connected selector can override its literal.', + ); + + const stale = structuredClone(loader); + stale.data.params.pipeline_class.value = 'DifferentPipeline'; + flow.getState().replaceGraph({ nodes: [stale], edges: [] }); + assert.equal( + readiness.inspectCurrentGraph().declaredModel, + undefined, + 'A stale hint cannot supply the runtime name.', + ); +}); + +test('a conflicting catalog label keeps the declared pipeline name', () => { + const model = { pipeline: 'ExamplePipeline', profileId: 'default:profile', repo: 'publisher/repo' }; + const known = { ...model, label: 'Example Model' }; + const unrelated = { ...known, repo: 'other/repo', label: 'Other Model' }; + assert.equal(readiness.declaredGraphModelLabel(model, [known, unrelated]), known.label); + assert.equal(readiness.declaredGraphModelLabel(model, [unrelated]), model.pipeline); + assert.equal( + readiness.declaredGraphModelLabel(model, [known, { ...known, label: 'Conflicting Model' }]), + model.pipeline, + ); +}); + +test('only registry-declared inactive model fields are omitted from setup references', () => { + const key = 'modules.TestLoader.Load'; + const previous = nodesStore.getState().nodesRegistry; + const node = { + id: 'loader', + type: 'custom', + position: { x: 0, y: 0 }, + data: { + module: 'modules.TestLoader', + action: 'Load', + params: { + model_id: { display: 'modelselect', hidden: true, value: { source: 'hub', value: 'publisher/base' } }, + auxiliary_model_id: { + display: 'modelselect', + hidden: true, + value: { source: 'hub', value: 'publisher/auxiliary' }, + fieldOptions: { modelReferenceInactiveWhenHidden: true }, + }, + }, + }, + }; + try { + nodesStore.setState({ nodesRegistry: { [key]: { params: { model_id: {}, auxiliary_model_id: {} } } } }); + assert.equal(readiness.collectNodeModelReferences(node).length, 2, 'Imported metadata cannot opt itself out.'); + nodesStore.setState({ + nodesRegistry: { + [key]: { + params: { model_id: {}, auxiliary_model_id: { fieldOptions: { modelReferenceInactiveWhenHidden: true } } }, + }, + }, + }); + const before = structuredClone(node); + assert.deepEqual( + readiness.collectNodeModelReferences(node).map((r) => r.value), + ['publisher/base'], + ); + assert.deepEqual(node, before, 'Inspection cannot clear retained model choices.'); + node.data.params.auxiliary_model_id.hidden = false; + assert.equal(readiness.collectNodeModelReferences(node).length, 2, 'An active auxiliary remains required.'); + delete node.data.params.auxiliary_model_id.hidden; + assert.equal(readiness.collectNodeModelReferences(node).length, 2, 'Unknown visibility remains conservative.'); + } finally { + nodesStore.setState({ nodesRegistry: previous }); + } +}); diff --git a/scripts/graph-visuals.test.mjs b/scripts/graph-visuals.test.mjs index a5acebec..ed799fef 100644 --- a/scripts/graph-visuals.test.mjs +++ b/scripts/graph-visuals.test.mjs @@ -1,3 +1,4 @@ +import { runInNewContext } from 'node:vm'; import assert from 'node:assert/strict'; import { after, before, beforeEach, test } from 'node:test'; import { EventEmitter } from 'node:events'; @@ -24,7 +25,10 @@ import { normalizePortableWorkflowDataReference, normalizePortableWorkflowFieldState, } from './workflow-library-contract.mjs'; -import { retainUnselectedCurrentWorkflowRecords } from './workflow-library-manifest-state.mjs'; +import { + compareCanonicalWorkflowRecordIds, + retainUnselectedCurrentWorkflowRecords, +} from './workflow-library-manifest-state.mjs'; const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); @@ -38,6 +42,7 @@ let graphLayout; let graphTypedHandle; let managedControlSync; let modelSelection; +let modelFieldInstall; let nodeFactory; let flowStoreModule; let nodesStoreModule; @@ -89,6 +94,7 @@ before(async () => { graphTypedHandle = await server.ssrLoadModule('/src/ui/GraphTypedHandle.tsx'); managedControlSync = await server.ssrLoadModule('/src/studio/managedControlSync.ts'); modelSelection = await server.ssrLoadModule('/src/studio/modelSelection.ts'); + modelFieldInstall = await server.ssrLoadModule('/src/utils/modelFieldInstall.ts'); nodeFactory = await server.ssrLoadModule('/src/workflow/nodeFactory.ts'); flowStoreModule = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); nodesStoreModule = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); @@ -145,6 +151,281 @@ function edge(id, source, target, sourceHandle = 'output', targetHandle = 'input return { id, source, target, sourceHandle, targetHandle, type: 'default' }; } +async function importedCanonicalRecipe(graphPath) { + const inference = await server.ssrLoadModule('/src/studio/workflowInference.ts'); + const canonical = JSON.parse(fs.readFileSync(path.resolve(ROOT, '../MoDiff/data/graphs', graphPath), 'utf8')); + const studio = studioStoreModule.useStudioStore; + const flow = flowStoreModule.useFlowStore; + const previousStudio = studio.getState(); + const previousFlow = flow.getState(); + const snapshot = inference.workflowSnapshotFromGraph(canonical, 'default', { + ...previousStudio.form, + device: 'cuda:0', + }); + flow.getState().replaceGraph(snapshot); + studio.setState({ + form: snapshot.studioForm, + selectedMode: snapshot.selectedMode, + graphBinding: snapshot.studioGraphBinding, + autoResourcePlan: null, + }); + return { + studio, + flow, + recipe: flow.getState().nodes.find((node) => node.data.studioRole === 'diffusersRecipe'), + restore() { + studio.setState(previousStudio); + flow.setState(previousFlow); + }, + }; +} + +function graphOwnedRecipeValues(recipe) { + return Object.fromEntries( + Object.entries(recipe.data.params) + .filter( + ([key, field]) => + !['device', 'offload_mode'].includes(key) && + (Object.hasOwn(field, 'value') || Object.hasOwn(field, 'default')), + ) + .map(([key, field]) => [key, field.value ?? field.default]), + ); +} + +test('switching only memory to Custom preserves authored Diffusers recipe controls', async () => { + const fixture = await importedCanonicalRecipe('studio/ddim-pipeline/unconditional-image.json'); + try { + const authored = graphOwnedRecipeValues(fixture.recipe); + assert.equal(authored.attention_backend, '_native_math'); + assert.equal(authored.vae_slicing, false); + assert.equal(authored.vae_tiling, false); + // The top-bar memory handler changes the form, then calls this same synchronization. + fixture.studio.getState().updateForm({ resourceMode: 'expert' }); + assert.equal(graphBridge.syncStudioGraphValues(fixture.studio.getState().form), true); + assert.deepEqual( + graphOwnedRecipeValues(fixture.flow.getState().nodes.find((node) => node.id === fixture.recipe.id)), + authored, + 'choosing Custom must retain authored recipe controls which have no corresponding form edit', + ); + } finally { + fixture.restore(); + } +}); + +for (const [kind, graphPath] of [ + ['image', 'studio/ddim-pipeline/unconditional-image.json'], + ['audio', 'studio/stable-audio-pipeline/text-to-audio.json'], + ['video', 'studio/cog-video-x-pipeline/text-to-video.json'], +]) { + test(`Custom reconciliation preserves ${kind} recipe controls and synchronizes explicit form values`, async () => { + const fixture = await importedCanonicalRecipe(graphPath); + try { + for (const [key, value] of Object.entries({ + device_map: 'manual', + attention_backend: '_native_math', + attention_components: 'unet', + vae_slicing: false, + vae_tiling: false, + regional_compile: true, + compile_components: 'unet', + compile_backend: 'eager', + compile_mode: 'reduce-overhead', + compile_fullgraph: true, + compile_dynamic: true, + denoiser_cache: 'first_block', + cache_threshold: 0.2, + layerwise_casting: true, + layerwise_casting_components: 'unet', + layerwise_storage_dtype: 'float8_e5m2', + layerwise_compute_dtype: 'float32', + channels_last: true, + channels_last_components: 'unet', + })) { + assert.ok(fixture.recipe.data.params[key], `${kind}: real recipe field ${key}`); + fixture.flow.getState().setParam(fixture.recipe.id, key, value); + } + const authored = graphOwnedRecipeValues( + fixture.flow.getState().nodes.find((node) => node.id === fixture.recipe.id), + ); + fixture.studio.getState().updateForm({ resourceMode: 'expert', device: 'cpu:0', offloadMode: 'none' }); + assert.equal(graphBridge.syncStudioGraphValues(fixture.studio.getState().form), true); + const current = fixture.flow.getState().nodes.find((node) => node.id === fixture.recipe.id); + assert.deepEqual(graphOwnedRecipeValues(current), authored); + assert.equal(current.data.params.device.value, 'cpu:0'); + assert.equal(current.data.params.offload_mode.value, 'none'); + + fixture.studio.getState().updateForm({ device: 'cuda:0', autoOffload: true, offloadMode: 'model_cpu' }); + assert.equal(graphBridge.syncStudioGraphValues(fixture.studio.getState().form), true); + const offloaded = fixture.flow.getState().nodes.find((node) => node.id === fixture.recipe.id); + assert.deepEqual(graphOwnedRecipeValues(offloaded), authored); + assert.equal(offloaded.data.params.device.value, 'cuda:0'); + assert.equal(offloaded.data.params.offload_mode.value, 'model_cpu'); + + fixture.studio.getState().updateForm({ attentionBackend: 'auto' }); + assert.equal(graphBridge.syncStudioGraphValues(fixture.studio.getState().form), true); + assert.deepEqual( + graphOwnedRecipeValues(fixture.flow.getState().nodes.find((node) => node.id === fixture.recipe.id)), + { ...authored, attention_backend: 'auto' }, + ); + } finally { + fixture.restore(); + } + }); +} + +for (const [kind, graphPath] of [ + ['image', 'studio/stable-diffusion-pipeline/text-to-image.json'], + ['audio', 'studio/stable-audio-pipeline/text-to-audio.json'], + ['video', 'studio/cog-video-x-pipeline/text-to-video.json'], +]) { + for (const resourceMode of ['auto', 'expert']) { + test(`new ${resourceMode} ${kind} graph initializes recipe defaults before later Custom edits`, async () => { + const fixture = await importedCanonicalRecipe(graphPath); + const nodeStore = nodesStoreModule.useNodesStore; + const previousNodes = nodeStore.getState(); + const previousFetch = globalThis.fetch; + const previousWebSocket = globalThis.WebSocket; + try { + const registry = Object.fromEntries( + fixture.flow + .getState() + .nodes.map((node) => [`${node.data.module}.${node.data.action}`, structuredClone(node.data)]), + ); + const loader = Object.values(registry).find((item) => item.action === 'LoadPipeline'); + const generator = Object.values(registry).find((item) => + ['Generate', 'UnconditionalGenerate'].includes(item.action), + ); + const contractAction = `update_${kind}_contract`; + // Portable graphs omit executable field actions. Supply the same small + // declarative contract fixture used by the graph materialization tests. + loader.params.pipeline_class.onChange = contractAction; + generator.params.pipeline.onSignal = contractAction; + if (kind === 'video') generator.params.mode.onChange = contractAction; + if (kind === 'image') generator.params.prompt = { type: 'string', value: '' }; + nodeStore.setState({ + nodesRegistry: registry, + studioModelCapabilities: [ + { + modelType: fixture.studio.getState().form.modelType, + executionProfiles: [ + { + modes: [fixture.studio.getState().form.mode], + execution_path: `direct-diffusers-${kind}`, + }, + ], + }, + ], + studioExecutionSpecInvalid: false, + }); + fixture.flow.setState({ nodes: [], edges: [] }); + const form = { ...fixture.studio.getState().form, resourceMode, attentionBackend: undefined }; + fixture.studio.setState({ form, graphBinding: null, graphFinalization: null, autoResourcePlan: null }); + globalThis.fetch = async (_input, init) => { + const payload = JSON.parse(String(init?.body)); + assert.equal(payload.fn, contractAction, 'only the isolated fixture contract may be called'); + const flow = fixture.flow.getState(); + const current = flow.nodes.find((item) => item.id === payload.node); + if (current.data.action === 'LoadPipeline') { + flow.setParam( + payload.node, + 'pipeline', + { + direction: 'output', + value: { + pipelineClass: current.data.params.pipeline_class.value, + mode: form.mode, + modes: [form.mode], + taskType: generator.params.task_type?.value, + }, + }, + 'signal', + ); + } else { + const contract = flow.getParam(payload.node, 'pipeline', 'signal')?.value; + flow.setParam(payload.node, `${kind}_contract`, contract); + if (kind === 'audio') flow.setParam(payload.node, 'task_type', contract.taskType); + } + return new Response(JSON.stringify({ error: false, nodes: [] }), { + status: 200, + headers: { 'Content-Type': 'application/json' }, + }); + }; + globalThis.WebSocket = undefined; + await graphBridge.createOrUpdateStudioGraph(form); + const recipe = fixture.flow.getState().nodes.find((node) => node.data.studioRole === 'diffusersRecipe'); + assert.ok(recipe); + assert.notEqual(recipe.id, fixture.recipe.id, 'the initialization path must create a new owner'); + const initialized = graphOwnedRecipeValues(recipe); + assert.equal(initialized.device_map, 'none'); + assert.equal(initialized.attention_backend, 'auto'); + assert.equal(initialized.attention_components, ''); + assert.equal(initialized.vae_slicing, true); + const needsVideoTiling = + resourceMode !== 'expert' || + form.offloadMode !== 'none' || + form.width * form.height * form.numFrames > 40_000_000; + assert.equal(initialized.vae_tiling, kind === 'video' ? needsVideoTiling : true); + assert.equal(initialized.regional_compile, false); + assert.equal(initialized.denoiser_cache, 'none'); + assert.equal(initialized.layerwise_casting, false); + assert.equal(initialized.channels_last, false); + + fixture.flow.getState().setParam(recipe.id, 'vae_slicing', false); + fixture.studio.getState().updateForm({ resourceMode: 'expert' }); + assert.equal(graphBridge.syncStudioGraphValues(fixture.studio.getState().form), true); + assert.equal( + fixture.flow.getState().nodes.find((node) => node.id === recipe.id).data.params.vae_slicing.value, + false, + 'subsequent Custom reconciliation must retain the newly authored value', + ); + } finally { + globalThis.fetch = previousFetch; + globalThis.WebSocket = previousWebSocket; + nodeStore.setState(previousNodes); + fixture.restore(); + } + }); + } +} + +test('Auto recipe candidate retains precedence over a stale Custom attention form value', async () => { + const fixture = await importedCanonicalRecipe('studio/ddim-pipeline/unconditional-image.json'); + try { + const form = { ...fixture.studio.getState().form, resourceMode: 'auto', attentionBackend: 'auto' }; + const binding = fixture.studio.getState().graphBinding; + const loader = fixture.flow.getState().nodes.find((item) => item.id === binding.nodes.diffusersImagePipeline); + const candidate = { + id: 'recipe-attention-regression', + executionProfileId: 'ddim:direct', + modelType: form.modelType, + mode: form.mode, + loaderModule: loader.data.module, + loaderAction: loader.data.action, + executionPath: 'direct-diffusers-image', + pipelineClass: loader.data.params.pipeline_class.value, + modelRepo: 'google/ddpm-cifar10-32', + modelDependencies: [], + attentionBackend: '_native_flash', + regionalCompile: true, + denoiserCache: 'first_block', + layerwiseCasting: true, + channelsLast: true, + }; + const plan = { schemaVersion: 2, selectedCandidate: candidate, candidates: [structuredClone(candidate)] }; + fixture.studio.setState({ form, autoResourcePlan: plan, autoFieldOverrides: {} }); + assert.equal(studioStoreModule.currentAutoResourcePlanTarget(plan, form, binding), false); + assert.equal(graphBridge.syncStudioGraphValues(form), true); + const recipe = fixture.flow.getState().nodes.find((item) => item.id === fixture.recipe.id); + assert.equal(recipe.data.params.attention_backend.value, candidate.attentionBackend); + assert.equal(recipe.data.params.regional_compile.value, true); + assert.equal(recipe.data.params.denoiser_cache.value, 'first_block'); + assert.equal(recipe.data.params.layerwise_casting.value, true); + assert.equal(recipe.data.params.channels_last.value, true); + } finally { + fixture.restore(); + } +}); + function managedNode(id, role, extras = {}) { const base = node(id, extras.x ?? 0, extras.y ?? 0, { params: extras.params ?? {} }); return { @@ -596,6 +877,481 @@ test('union connections resolve their exact payload and decorate stroke plus arr assert.match(normalizedGradient, new RegExp(connectionTypes.connectionColor('video'), 'i')); }); +test('custom node help uses authored purpose and port descriptions, and describes older bare interfaces', async () => { + const { default: Help } = await server.ssrLoadModule('/src/components/NodeHelpContent.tsx'); + const authorNode = node('Mix', 0, 0, { + params: { + before: { + type: 'image', + display: 'input', + label: 'Foreground', + required: true, + description: 'The image to place over the background.', + }, + result: { type: 'image', display: 'output', label: 'Composite' }, + inactive: { type: 'image', display: 'input', label: 'Unused mask', hidden: true }, + }, + }); + authorNode.data.module = 'custom.Example'; + authorNode.data.description = 'Combine two with transparency.'; + const render = () => renderToStaticMarkup(createElement(Help, { node: authorNode })); + const authored = render(); + assert.match(authored, /Combine two <layers> with transparency/); + assert.match(authored, /Foreground · Required/); + assert.match(authored, /The image to place over the background/); + assert.match(authored, /Provides image/); + assert.doesNotMatch(authored, /Unused mask/); + delete authorNode.data.description; + assert.match(render(), /Takes Foreground and produces Composite/); +}); + +test('saved ACE audio edit starters put the prompt ahead of lyrics and sampler controls', async () => { + const { savedStockControlOrder } = await server.ssrLoadModule('/src/workflow/gatedNodeControls.ts'); + const keys = ['prompt', 'negative_prompt', 'lyrics', 'num_inference_steps']; + for (const kind of ['repaint', 'continuation', 'variation']) { + const graph = JSON.parse( + fs.readFileSync( + path.resolve(ROOT, '../MoDiff/data/graphs/studio/ace-step-audio-pipeline/audio-' + kind + '.json'), + 'utf8', + ), + ); + const { data } = graph.nodes.find((node) => node.data.action === 'Generate'); + const old = structuredClone(graph); + const registry = Object.fromEntries(keys.filter((key) => data.params[key]).map((key) => [key, data.params[key]])); + const ordered = Object.keys(savedStockControlOrder(data, data.params, registry)); + assert.ok(ordered.indexOf('prompt') < ordered.indexOf('lyrics'), kind); + assert.deepEqual(graph, old); + } +}); + +test('saved CogVideoX and Klein foreground the prompt and AudioLDM2 keeps both 16 kHz controls selectable', async () => { + const { savedStockControlOrder } = await server.ssrLoadModule('/src/workflow/gatedNodeControls.ts'); + const { graphNodeControlParams } = await server.ssrLoadModule('/src/studio/graphNodeControls.ts'); + const { nodeFieldDisplayLabel } = await server.ssrLoadModule('/src/workflow/nodePresentation.ts'); + const { runtimeOptionEntries, registeredRuntimeOptionPresentation } = await server.ssrLoadModule( + '/src/studio/runtimeOptions.ts', + ); + const saved = (name) => + JSON.parse(fs.readFileSync(path.resolve(ROOT, '../MoDiff/data/graphs/studio', name + '.json'), 'utf8')); + for (const [file, action, declared] of [ + [ + 'cog-video-x-pipeline/text-to-video', + 'Generate', + [ + 'prompt', + 'negative_prompt', + 'width', + 'height', + 'num_frames', + 'num_inference_steps', + 'guidance_scale', + 'output_type', + 'attention_kwargs_json', + 'callback_on_step_end_tensor_inputs', + ], + ], + [ + 'flux2-klein-inpaint-pipeline/inpaint', + 'Inpaint', + [ + 'prompt', + 'negative_prompt', + 'width', + 'height', + 'num_inference_steps', + 'guidance_scale', + 'output_type', + 'image', + 'mask_image', + ], + ], + ]) { + const graph = saved(file); + const node = graph.nodes.find((n) => n.data.action === action); + const original = JSON.stringify(graph); + const subset = Object.fromEntries(Object.entries(node.data.params).filter(([key]) => declared.includes(key))); + const registry = Object.fromEntries(declared.map((key) => [key, { ...subset[key] }])); + assert.notDeepEqual(Object.keys(subset), declared); + assert.deepEqual(Object.keys(savedStockControlOrder(node.data, subset, registry)), declared); + const inspector = graphNodeControlParams(node, graph.edges, undefined, graph.nodes); + const inspectorKeys = Object.keys(savedStockControlOrder(node.data, inspector, registry)); + const exposed = declared.filter((key) => Object.prototype.hasOwnProperty.call(inspector, key)); + assert.equal(exposed[0], 'prompt'); + assert.deepEqual( + inspectorKeys.filter((key) => declared.includes(key)), + exposed, + ); + for (const excluded of [ + { studioOwned: false }, + { module: 'custom.Example' }, + { blockProjectionOwnerId: 'parent' }, + { blockInstanceV2: {} }, + ]) { + assert.equal(savedStockControlOrder({ ...node.data, ...excluded }, subset, registry), subset); + } + const handwritten = { height: subset.height, prompt: subset.prompt, guidance_scale: subset.guidance_scale }; + assert.equal(savedStockControlOrder({ ...node.data, params: handwritten }, handwritten, registry), handwritten); + assert.equal(JSON.stringify(graph), original); + } + const graph = saved('audio-ldm2-pipeline/text-to-audio'); + const original = JSON.stringify(graph); + const audio = graph.nodes.filter((n) => + ['modules.Audio.Export', 'modules.DiffusersAudio.Generate'].includes(n.data.module + '.' + n.data.action), + ); + assert.equal(audio.length, 2); + for (const { data } of audio) { + const rate = data.params.sample_rate; + assert.equal(rate.value, 16000); + const entries = runtimeOptionEntries(registeredRuntimeOptionPresentation(rate.options, 'sample_rate', data.params)); + assert.equal(entries.find((e) => e.value === String(rate.value))?.label, '16 kHz'); + assert.equal(entries.find((e) => e.value === String(rate.value))?.disabled, false); + assert.equal( + entries.some((e) => e.value === '12345'), + false, + ); + if (data.action === 'Generate') { + for (const [key, title] of [ + ['stable_audio_steps', 'Steps'], + ['stable_audio_guidance', 'Guidance'], + ]) { + assert.equal(nodeFieldDisplayLabel('modules.DiffusersAudio.Generate', key, data.params[key].label), title); + assert.equal(nodeFieldDisplayLabel('modules.DiffusersAudio.Generate', key, 'My setting'), 'My setting'); + } + } + } + assert.equal(JSON.stringify(graph), original); +}); + +test('new fields added on import preserve the declared order of saved Video Trim and Whisper controls', async () => { + const { savedStockControlOrder } = await server.ssrLoadModule('/src/workflow/gatedNodeControls.ts'); + const { useFlowStore } = flowStoreModule; + const { useNodesStore } = nodesStoreModule; + const prior = useNodesStore.getState().nodesRegistry; + const graphState = useFlowStore.getState(); + try { + for (const [name, id, added, contract, ordered] of [ + [ + 'builtin-video-operation/video-trim', + 'node-02', + 'source', + { display: 'input', type: ['video', 'video_asset'], fieldOptions: { omitInactiveDefault: true } }, + ['operation', 'start_seconds', 'end_seconds'], + ], + [ + 'hugging-face-speech-recognition-model/speech-to-text', + 'node-03', + 'ctc_timestamps', + { type: 'string', default: 'word', hidden: true, fieldOptions: { omitInactiveDefault: true } }, + ['task', 'language', 'timestamps', 'chunk_length_seconds', 'stride_length_seconds'], + ], + ]) { + const filename = path.resolve(ROOT, '../MoDiff/data/graphs/studio', name + '.json'); + const graph = JSON.parse(fs.readFileSync(filename, 'utf8')); + const original = graph.nodes.find((n) => n.id === id); + assert.equal(original.data.params[added], undefined); + const registry = Object.fromEntries([ + ...ordered.map((key) => [key, original.data.params[key]]), + ...Object.entries(original.data.params).filter(([k]) => !ordered.includes(k)), + [added, contract], + ]); + const identity = original.data.module + '.' + original.data.action; + useNodesStore.setState({ nodesRegistry: { ...prior, [identity]: { ...original.data, params: registry } } }); + useFlowStore.getState().replaceGraph(graph); + const imported = useFlowStore.getState().nodes.find((n) => n.id === id); + assert.ok(imported.data.params[added]); + assert.equal(Object.keys(imported.data.params).at(-1), added); + const projected = savedStockControlOrder(imported.data, imported.data.params, registry); + assert.deepEqual( + Object.keys(projected).filter((k) => ordered.includes(k)), + ordered, + ); + assert.equal(projected[added], imported.data.params[added]); + const authored = { + ...Object.fromEntries([...ordered].reverse().map((k) => [k, projected[k]])), + [added]: contract, + }; + assert.equal(savedStockControlOrder({ ...imported.data, params: authored }, authored, registry), authored); + } + } finally { + useNodesStore.setState({ nodesRegistry: prior }); + useFlowStore.setState(graphState); + } +}); +test('restored FLUX edit keeps the prompt first after model switches, file export, Undo and cloning', async () => { + const { savedStockControlOrder } = await server.ssrLoadModule('/src/workflow/gatedNodeControls.ts'); + const { workflowSnapshotFromGraph } = await server.ssrLoadModule('/src/studio/workflowInference.ts'); + const { useFlowStore } = flowStoreModule; + const { useNodesStore } = nodesStoreModule; + const previousRegistry = useNodesStore.getState().nodesRegistry; + const previousFlow = useFlowStore.getState(); + const saved = JSON.parse( + fs.readFileSync(path.resolve(ROOT, '../MoDiff/data/graphs/studio/flux-dev-pipeline/edit-image.json'), 'utf8'), + ); + const old = saved.nodes.find((n) => n.data.action === 'Edit'); + const id = old.id; + const parent = 'use_guidance_scale_2', + child = 'guidance_scale_2'; + const controls = ['prompt', 'negative_prompt', 'guidance_scale', parent, child]; + const params = old.data.params; + const registry = Object.fromEntries([ + ...controls.slice(0, 3).map((k) => [k, params[k]]), + [parent, { type: 'bool', default: false, hidden: true }], + [child, { type: 'float', default: 3.5, display: 'slider', hidden: true }], + ...Object.entries(params).filter(([key]) => !controls.includes(key)), + ]); + const state = () => useFlowStore.getState(); + function check(data) { + const snapshot = JSON.stringify(data.params); + const projected = savedStockControlOrder(data, data.params, registry); + assert.deepEqual( + Object.keys(projected).filter((k) => controls.includes(k)), + controls, + ); + for (const key of controls) assert.equal(projected[key], data.params[key]); + assert.equal(JSON.stringify(data.params), snapshot); + } + const data = () => state().nodes.find((n) => n.id === id).data; + try { + useNodesStore.setState({ + nodesRegistry: { ...previousRegistry, 'modules.DiffusersImage.Edit': { ...old.data, params: registry } }, + }); + state().replaceGraph(saved); + assert.equal(data().params[parent], undefined); + for (const key of [parent, child]) { + state().setParam(id, key, false, 'hidden'); + state().setParam(id, key, registry[key].default, 'default'); + } + check(data()); + check(structuredClone(data())); + state().withHistory('Change secondary guidance', () => state().setParam(id, child, 5, 'value')); + assert.equal(data().params[child].value, 5); + state().undo(); + assert.equal(data().params[child].value ?? data().params[child].default, 3.5); + check(data()); + const portable = workflowSnapshotFromGraph(state().toObject(), 'default'); + state().replaceGraph(JSON.parse(JSON.stringify(portable))); + check(data()); + for (const authored of [ + [ + ['prompt', params.prompt], + ['guidance_scale', params.guidance_scale], + ['negative_prompt', params.negative_prompt], + ], + [...Object.entries(params), [child, data().params[child]], [parent, data().params[parent]]], + [...Object.entries(params), ['my_custom_dial', { type: 'float' }], [parent, data().params[parent]]], + ]) { + const ordered = Object.fromEntries(authored); + assert.equal(savedStockControlOrder({ ...data(), params: ordered }, ordered, registry), ordered); + } + } finally { + useNodesStore.setState({ nodesRegistry: previousRegistry }); + useFlowStore.setState(previousFlow); + } +}); + +test('saved image-only wires hide only unused Preview decoding controls on ordinary and grouped stages', async () => { + const { imagePreviewDecoderVisibility } = await server.ssrLoadModule('/src/workflow/imagePreviewControls.ts'); + const { groupNewOperationGraph, visualOperationGroup } = await server.ssrLoadModule( + '/src/workflow/visualOperationGroups.ts', + ); + const filename = path.resolve(ROOT, '../MoDiff/data/graphs/studio/flux-dev-pipeline/text-to-image.json'); + const saved = JSON.parse(fs.readFileSync(filename, 'utf8')); + for (const graph of [saved, groupNewOperationGraph(saved)]) { + const preview = graph.nodes.find((n) => n.data.action === 'Preview' || visualOperationGroup(n) === 'output'); + assert.ok(preview); + const instance = preview.data.blockInstanceV2; + const field = (key) => + instance + ? (instance.effectiveInterface.boundary.inputs.find((p) => p.binding.fieldOrPortId === key)?.portId ?? + instance.effectiveInterface.controls.find((c) => c.binding.fieldId === key)?.controlId) + : key; + const image = field('image'), + vae = field('vae'), + device = field('device'); + const driver = graph.edges.find((e) => e.target === preview.id && e.targetHandle === image); + assert.ok(driver); + const prior = JSON.stringify(graph); + const visibility = (nodes, edges) => imagePreviewDecoderVisibility(preview, nodes, edges); + const hidden = (nodes, edges) => + [...visibility(nodes, edges)] + .filter(([, visible]) => !visible) + .map(([key]) => key) + .sort(); + assert.deepEqual(hidden(graph.nodes, graph.edges), [device, vae].sort()); + const others = graph.edges.filter((e) => e !== driver); + assert.deepEqual(hidden(graph.nodes, others), []); + assert.equal(visibility(graph.nodes, others).get(device), true); + assert.deepEqual(hidden(graph.nodes, [...graph.edges, { ...driver, id: 'ambiguous' }]), []); + for (const type of ['latent', ['image', 'latent'], 'any']) { + const supplier = node('different-source', 0, 0, { params: { value: { type, display: 'output' } } }); + assert.deepEqual( + hidden([...graph.nodes, supplier], [...others, { ...driver, source: supplier.id, sourceHandle: 'value' }]), + [], + ); + } + const override = node('decoder', 0, 0, { params: { value: { type: 'pipeline', display: 'output' } } }); + const wired = { ...driver, source: override.id, sourceHandle: 'value', targetHandle: vae }; + const { blockCrossingHandleV2 } = await server.ssrLoadModule('/src/studio/blockCrossingConnectionsV2.ts'); + const deviceBinding = instance?.effectiveInterface.controls.find((c) => c.controlId === device)?.binding; + const connectedDevice = deviceBinding + ? blockCrossingHandleV2({ + nodeId: deviceBinding.nodeId, + fieldOrPortId: deviceBinding.fieldId, + direction: 'input', + }) + : device; + assert.deepEqual(hidden([...graph.nodes, override], [...graph.edges, wired]), [device]); + assert.deepEqual( + hidden( + [...graph.nodes, override], + [...graph.edges, wired, { ...wired, id: 'device-driver', targetHandle: connectedDevice }], + ), + [], + ); + if (!instance) { + const stale = structuredClone(preview); + stale.data.params.device.hidden = true; + const modified = graph.nodes.map((n) => (n.id === preview.id ? stale : n)); + assert.equal(imagePreviewDecoderVisibility(stale, modified, others).get(device), true); + const customCopy = { ...stale, data: { ...stale.data, module: 'custom.User' } }; + assert.equal(imagePreviewDecoderVisibility(customCopy, modified, graph.edges).size, 0); + } + assert.equal(JSON.stringify(graph), prior); + } + const { nodeFieldDisplayLabel, visualStageModeCaption, nodeHelpDescription } = await server.ssrLoadModule( + '/src/workflow/nodePresentation.ts', + ); + for (const family of ['Image', 'Video']) { + for (const [field, caption] of [ + ['width', 'Width'], + ['height', 'Height'], + ]) { + assert.equal(nodeFieldDisplayLabel('modules.' + family + '.Load', field, field), caption); + } + } + assert.equal(nodeFieldDisplayLabel('modules.Video.Load', 'frames', 'frames'), 'Frames'); + assert.equal(nodeFieldDisplayLabel('modules.Video.Load', 'frames', 'Source length'), 'Source length'); + assert.equal(nodeFieldDisplayLabel('custom.Video.Load', 'frames', 'frames'), 'frames'); + const original = { label: { display: 'ui_label', value: 'Load Image' } }; + assert.equal(visualStageModeCaption('Load Image', 'Media Input', original), undefined); + assert.equal( + visualStageModeCaption('Load Image', 'Media Input', { label: { ...original.label, hidden: true } }), + 'Load Image', + ); + assert.equal(nodeFieldDisplayLabel('modules.Image.Preview', 'export', 'export'), 'Image indices'); + assert.equal(nodeFieldDisplayLabel('modules.Image.Preview', 'export', 'My selection'), 'My selection'); + assert.equal(nodeFieldDisplayLabel('custom.Preview', 'export', 'export'), 'export'); + const oldDescription = saved.nodes.find((n) => n.data.action === 'Preview').data.params.export.description; + const current = 'Choose the images by zero-based index.'; + assert.equal(nodeHelpDescription('modules.Image.Preview', 'export', oldDescription, current), current); + assert.equal( + nodeHelpDescription('modules.Image.Preview', 'export', 'Second sheet only', current), + 'Second sheet only', + ); + assert.equal(nodeHelpDescription('custom.Preview', 'export', oldDescription, current), oldDescription); + assert.match( + nodeHelpDescription('modules.Image.Preview', 'export', oldDescription, oldDescription), + /separate positions with commas/, + ); + assert.match(nodeHelpDescription('modules.Image.Preview', 'vae'), /latent input/); + assert.match( + nodeHelpDescription('modules.Image.Preview', null, 'Preview an image', 'Preview an image'), + /full batch/, + ); + assert.equal(nodeHelpDescription('custom.Preview', 'vae'), undefined); + assert.equal( + nodeHelpDescription('modules.Image.Preview', 'vae', 'Use the archive decoder.'), + 'Use the archive decoder.', + ); +}); + +test('stock port help uses exact media and quantity meanings while custom roles remain author-defined', async () => { + const { nodeFieldDisplayLabel, nodeHelpDescription } = await server.ssrLoadModule( + '/src/workflow/nodePresentation.ts', + ); + assert.match(nodeHelpDescription('modules.ModularDiffusers.DynamicBlockNode', null), /Preview Custom Block Contract/); + for (const action of ['modules.Audio.Export', 'modules.Primitive.ExportData']) { + assert.equal(nodeFieldDisplayLabel(action, 'filename', 'File'), 'Output filename'); + assert.equal(nodeFieldDisplayLabel(action, 'file', 'File'), 'Saved file'); + assert.equal(nodeFieldDisplayLabel(action, 'file', 'Master recording'), 'Master recording'); + } + for (const action of [ + 'modules.HuggingFaceSpeech.LoadCTCSpeechRecognitionModel', + 'modules.HuggingFaceTransformers.LoadImageTextToTextModel', + 'modules.HuggingFaceTransformers.LoadDepthEstimationModel', + ]) { + assert.equal(nodeFieldDisplayLabel(action, 'model_id', 'Model'), 'Model checkpoint'); + assert.equal( + nodeFieldDisplayLabel(action, action.endsWith('LoadDepthEstimationModel') ? 'pipeline' : 'model', 'Model'), + 'Loaded model', + ); + } + const { builtinPortPurpose: purpose } = await server.ssrLoadModule('/src/workflow/nodePortHelp.ts'); + const id = 'modules.VideoConditioning.Normalize'; + assert.match(purpose('modules.Audio.Export', 'file', 'audio', 'output'), /path.*exported WAV/i); + assert.match(purpose('modules.Audio.Preview', 'file', 'audio', 'output'), /path.*playback/i); + assert.match(purpose('modules.Video.Export', 'file', 'video', 'output'), /path.*encoded video/i); + assert.match(purpose('modules.Video.MuxAudioAsset', 'asset', 'video_asset', 'output'), /metadata/i); + assert.match(purpose('modules.Image.Save', 'output', 'str', 'output'), /saved image files/i); + assert.match(purpose('modules.Audio.Load', 'audio', 'audio', 'output'), /samples/i); + assert.equal(purpose('custom.Audio.Export', 'file', 'audio', 'output'), undefined); + assert.match(purpose(id, 'mask', 'image', 'input'), /regions/); + assert.match(purpose(id, 'control_video', ['video', 'str'], 'input'), /motion/); + assert.match(purpose(id, 'height_out', 'int', 'output'), /height in pixels/); + assert.match(purpose(id, 'sample_rate', 'int', 'output'), /hertz/); + assert.match(purpose(id, 'state_out', 'modular_workflow_state', 'output'), /next operation/); + assert.match(purpose(id, 'prompt_embeds', 'tensor', 'input'), /Encoded text/); + assert.equal(purpose(id, 'width', 'object', 'input'), undefined); + assert.equal(purpose('custom.Draw', 'mask', 'image', 'input'), undefined); +}); + +test('model component roles color wires without changing payload identity', () => { + const model = 'diffusers_auto_model'; + const params = { + unet_out: { type: model }, + vae_out: { type: model }, + scheduler: { type: model }, + text_encoders: { type: 'diffusers_auto_models', connectionRole: 'text_encoders' }, + renamed: { type: model, fieldOptions: { blockBindingV2: { fieldOrPortId: 'vae_out' } } }, + component: { + type: model, + connectionRoleSelector: { field: 'kind', values: { encode: 'image_encoder', denoise: 'denoiser' } }, + }, + kind: { value: 'encode' }, + vae: { type: 'audio' }, + anyRole: { type: model, signalCompatibility: { role: ['vae', 'denoiser'] } }, + }; + const source = node('source', 0, 0, { params }); + const target = node('target', 0, 0, { params: { input: { type: 'any' } } }); + const roles = ['unet_out', 'vae_out', 'scheduler', 'text_encoders'].map((id) => + connectionTypes.handleComponentRole(source, id), + ); + assert.deepEqual(roles, ['denoiser', 'vae', 'scheduler', 'text_encoders']); + assert.equal(new Set(roles.map((r) => connectionTypes.portColor(model, r))).size, 4); + assert.equal(connectionTypes.handleComponentRole(source, 'renamed'), 'vae'); + assert.equal(connectionTypes.handleComponentRole(source, 'component'), 'image_encoder'); + assert.equal(connectionTypes.handleComponentRole(source, 'vae'), undefined); + assert.equal(connectionTypes.handleComponentRole(source, 'anyRole'), undefined); + const link = edge('model-link', 'source', 'target', 'component', 'input'); + const first = connectionTypes.decorateConnectionEdge(link, [source, target]); + assert.equal(first.data.connectionType, model); + assert.equal(first.style.stroke, connectionTypes.portColor(model, 'image_encoder')); + assert.equal(first.markerEnd.color, first.style.stroke); + assert.equal(connectionTypes.decorateConnectionEdge(first, [source, target]), first); + const changed = node('source', 0, 0, { params: { ...params, kind: { value: 'denoise' } } }); + const next = connectionTypes.decorateConnectionEdge(first, [changed, target]); + assert.equal(next.id, first.id); + assert.equal(next.data.connectionType, model); + assert.equal(next.style.stroke, connectionTypes.portColor(model, 'denoiser')); + assert.equal( + connectionTypes.handleComponentRole( + node('unknown', 0, 0, { params: { ...params, kind: { isConnected: true } } }), + 'component', + ), + undefined, + ); +}); + test('the resolved payload color reaches the rendered target socket, drag surface, edge, and arrow', () => { const nodes = [ node('source', 0, 0, { @@ -754,7 +1510,7 @@ test('graph fields and overlays use graph-safe controls without losing specializ assert.match(numberField, /onKeyDown=\{handleKeyDown\}/); assert.match(numberField, /document\.addEventListener\('mousemove', handleMouseMove\)/); assert.match(numberField, /document\.removeEventListener\('mouseup', handleMouseUp\)/); - assert.match(numberField, /updateStore\(fieldKey, nextValue\)/); + assert.match(numberField, /updateStore\(fieldKey, Number\(nextValue\)\)/); const fileField = fs.readFileSync(path.join(ROOT, 'src', 'fields', 'FileBrowserField.tsx'), 'utf8'); assert.match(fileField, / 0/); const workflow = fs.readFileSync(path.join(ROOT, 'src', 'components', 'Workflow.tsx'), 'utf8'); - assert.match(workflow, /connectionColor\(connectionDataType\)/); + assert.match(workflow, /connectionColor=\{connectionLineColor\}/); }); test('workflow dirty state uses an overlaid marker that never changes tab title width', () => { @@ -949,20 +1705,518 @@ test('cycles are collapsed into one rank and a loop is resized around locally ar assert.ok(byId.get('output').position.x >= byId.get('loop').position.x + byId.get('loop').width + 140); }); -test('measurement waiting requires two consecutive frames with identical dimensions', async () => { - let reads = 0; - const measuredNode = (width) => - node('measured', 0, 0, { - width, - height: 120, - }); - await graphLayout.waitForGraphNodeMeasurements(() => { - reads += 1; - const current = measuredNode(reads === 1 ? 200 : 240); - current.measured = { width: current.width, height: current.height }; - return [current]; - }); - assert.ok(reads >= 3, `expected a changed signature plus two stable frames, received ${reads} reads`); +test('measurement waiting requires two consecutive frames with identical dimensions', async () => { + let reads = 0; + const measuredNode = (width) => + node('measured', 0, 0, { + width, + height: 120, + }); + await graphLayout.waitForGraphNodeMeasurements(() => { + reads += 1; + const current = measuredNode(reads === 1 ? 200 : 240); + current.measured = { width: current.width, height: current.height }; + return [current]; + }); + assert.ok(reads >= 3, `expected a changed signature plus two stable frames, received ${reads} reads`); +}); + +test('text and nested file-path controls associate their labels with distinct inputs', async () => { + const { default: InputField } = await server.ssrLoadModule('/src/fields/InputField.tsx'); + const { default: FileBrowserField } = await server.ssrLoadModule('/src/fields/FileBrowserField.tsx'); + for (const Component of [InputField, FileBrowserField]) { + const markup = renderToStaticMarkup( + createElement( + ReactFlowProvider, + null, + createElement(Component, { + nodeId: 'source', + fieldKey: 'file', + label: 'Source video', + dataType: 'string', + value: '@data/videos/owned.mp4', + fieldOptions: { fileTypes: ['video'] }, + updateStore: () => {}, + }), + ), + ); + const labels = [...markup.matchAll(/]*for="([^"]+)"/gu)].map((m) => m[1]); + const inputs = markup.match(/]*>/gu) ?? []; + for (const input of inputs.filter((input) => !input.includes('type="file"'))) { + const id = input.match(/\bid="([^"]+)"/u)?.[1]; + assert.ok(id && labels.includes(id), Component.name + ': the visible input must have its own label.'); + } + const ids = inputs.map((input) => input.match(/\bid="([^"]+)"/u)?.[1]).filter(Boolean); + assert.equal(new Set(ids).size, ids.length, Component.name + ': hidden pickers cannot share visible input IDs.'); + } +}); + +test('a standalone file editor keeps its own source player when the canvas has no matching dedicated preview', async () => { + const { default: FileBrowserField } = await server.ssrLoadModule('/src/fields/FileBrowserField.tsx'); + for (const [kind, file] of [ + ['audio', 'selected.wav'], + ['video', 'selected.mp4'], + ]) { + const render = (sourcePreview) => + renderToStaticMarkup( + createElement( + ReactFlowProvider, + null, + createElement(FileBrowserField, { + nodeId: 'source', + module: 'custom.User', + action: 'Load', + fieldKey: 'file', + dataType: 'string', + value: file, + fieldOptions: { fileTypes: [kind] }, + sourcePreview, + updateStore: () => {}, + }), + ), + ); + assert.match(render(undefined), new RegExp('<' + kind + '\\b')); + assert.match(render(kind), /Drop to replace/); + assert.doesNotMatch(render(kind), new RegExp('<' + kind + '\\b')); + // A different completed result must remain playable alongside the current selection. + const initial = studioStoreModule.useStudioStore.getInitialState(); + const slot = studioStoreModule.studioPreviewSlotKey('source', 'preview', initial.activeWorkflowTabId); + const previousSlots = initial.previewSlots, + previousOutputs = initial.outputs; + try { + initial.previewSlots = { ...previousSlots, [slot]: { status: 'ready', currentOutputId: 'old-result' } }; + initial.outputs = [{ id: 'old-result', displayType: kind, value: ['https://example.test/previous-' + file] }]; + assert.match(render(kind), new RegExp('<' + kind + '\\b'), 'different retained result'); + initial.previewSlots[slot] = { status: 'pending' }; + assert.match(render(kind), new RegExp('<' + kind + '\\b'), 'no playable result yet'); + } finally { + initial.previewSlots = previousSlots; + initial.outputs = previousOutputs; + } + } +}); + +test('measurement waiting distinguishes real late bounds from an incomplete timeout', async () => { + const pending = node('late-controls', 0, 0); + let reads = 0; + assert.equal( + await graphLayout.waitForGraphNodeMeasurements(() => { + reads++; + return [{ ...pending, ...(reads >= 4 ? { measured: { width: 337, height: 541 } } : {}) }]; + }, 100), + true, + ); + assert.ok(reads >= 5, 'Read the actual bounds on two consecutive frames.'); + assert.equal( + await graphLayout.waitForGraphNodeMeasurements(() => [pending], 1), + false, + 'A timeout must not be treated as a successful measurement.', + ); +}); + +for (const label of ['', false, null, undefined]) { + test(`an intentionally blank visual label ${String(label)} still names the file-path input accessibly`, async () => { + const { default: InputField } = await server.ssrLoadModule('/src/fields/InputField.tsx'); + const markup = renderToStaticMarkup( + createElement(InputField, { + nodeId: 'source', + fieldKey: 'stage-node-source:file', + label, + dataType: 'string', + value: '@data/videos/owned.mp4', + updateStore: () => {}, + }), + ); + assert.ok( + markup.match(/]*aria-label="File"/u), + 'A blank caption must retain a readable accessible name.', + ); + }); +} + +test('measurement waiting starts its deadline on the first available browser frame', async () => { + const previousNow = Date.now; + const previousFrame = window.requestAnimationFrame; + let clock = 0; + let frames = 0; + let reads = 0; + Date.now = () => clock; + window.requestAnimationFrame = (callback) => + setTimeout(() => { + clock = frames++ === 0 ? 6_000 : clock + 1; + callback(clock); + }, 0); + try { + const pending = node('late-first-render', 0, 0); + const ready = await graphLayout.waitForGraphNodeMeasurements(() => { + reads++; + return [{ ...pending, ...(reads > 1 ? { measured: { width: 337, height: 541 } } : {}) }]; + }, 5_000); + assert.equal(ready, true, 'A busy initial render must allow ResizeObserver and two measured frames.'); + assert.equal(reads, 3); + } finally { + Date.now = previousNow; + window.requestAnimationFrame = previousFrame; + } +}); + +test('fresh layout waits for downloaded controls, stops on failure or a changed document, and bounds a stalled download', async () => { + const previousDocument = Object.getOwnPropertyDescriptor(globalThis, 'document'); + const previousFrame = window.requestAnimationFrame; + const previousNow = Date.now; + let frame = 0; + let releaseFrame = 6; + let failed = false; + const target = node('downloaded-controls', 0, 0); + target.measured = { width: 320, height: 240 }; + try { + Object.defineProperty(globalThis, 'document', { + configurable: true, + value: { + getElementById: () => ({ + querySelector: (selector) => (selector === '[data-node-load-error]' ? failed : frame < releaseFrame), + }), + }, + }); + Date.now = () => frame * 1000; + window.requestAnimationFrame = (callback) => { + frame++; + queueMicrotask(() => callback(Date.now())); + return frame; + }; + const wait = (isCurrent = () => true) => + graphLayout.waitForGraphNodeMeasurements(() => [target], 2000, { controlLoadTimeoutMs: 8000, isCurrent }); + assert.equal(await wait(), true); + assert.equal(frame, 7, 'Only real controls with two stable frames can complete fresh layout.'); + frame = 0; + releaseFrame = Infinity; + assert.equal(await wait(), false); + assert.equal(frame, 11); + frame = 0; + assert.equal(await wait(() => frame < 3), false); + assert.equal(frame, 3, 'A tab switch or authored edit cancels before application.'); + frame = 0; + failed = true; + assert.equal(await wait(), false); + assert.equal(frame, 1); + } finally { + window.requestAnimationFrame = previousFrame; + Date.now = previousNow; + if (previousDocument) Object.defineProperty(globalThis, 'document', previousDocument); + else delete globalThis.document; + } +}); + +test('fresh layout waits for the flow measurement to catch up with a mounted field', async () => { + const target = node('prompt-with-layout-editor', 0, 0); + target.measured = { width: 453, height: 479 }; + const previousDocument = Object.getOwnPropertyDescriptor(globalThis, 'document'); + const previousFrame = window.requestAnimationFrame; + let frame = 0; + try { + Object.defineProperty(globalThis, 'document', { + configurable: true, + value: { + getElementById: () => ({ + querySelector: () => null, + closest: () => ({ offsetWidth: 656, offsetHeight: 789 }), + }), + }, + }); + window.requestAnimationFrame = (callback) => { + if (++frame === 5) target.measured = { width: 656, height: 789 }; + queueMicrotask(() => callback(Date.now())); + return frame; + }; + assert.equal(await graphLayout.waitForGraphNodeMeasurements(() => [target]), true); + assert.ok(frame >= 6, 'the older size can look stable on several frames after the editor mounts'); + } finally { + window.requestAnimationFrame = previousFrame; + if (previousDocument) Object.defineProperty(globalThis, 'document', previousDocument); + else delete globalThis.document; + } +}); + +test('late fresh-workflow measurements preserve an intervening layout edit and leave a replacement tab alone', async () => { + const { settleExampleWorkflowCanvas } = await server.ssrLoadModule('/src/studio/exampleWorkflow.ts'); + const studio = studioStoreModule.useStudioStore; + const flow = flowStoreModule.useFlowStore; + studio.getState().ensureWorkflowTabs(); + flow.getState().replaceGraph({ nodes: [node('first', 130, 260), node('second', 600, 260)], edges: [] }); + const previousFrame = window.requestAnimationFrame; + try { + let nextFrame; + window.requestAnimationFrame = (callback) => { + nextFrame = callback; + return 1; + }; + const editing = settleExampleWorkflowCanvas(); + const finishEditing = nextFrame; + flow.getState().withHistory('Move second node', () => + flow.getState().replaceGraph({ + nodes: [node('first', 130, 260), node('second', 831, 733)], + edges: [], + }), + ); + finishEditing(); + assert.equal(await editing, true); + assert.deepEqual(flow.getState().nodes[1].position, { x: 831, y: 733 }); + const dragging = settleExampleWorkflowCanvas(); + const finishDragging = nextFrame; + nextFrame = null; + flow.getState().beginHistoryTransaction('Move node'); + try { + finishDragging(); + // An in-progress gesture must stop the measurement loop before it schedules another frame. + assert.equal(nextFrame, null); + assert.equal(await dragging, true); + assert.deepEqual(flow.getState().nodes[1].position, { x: 831, y: 733 }); + } finally { + flow.getState().commitHistoryTransaction(); + } + const switching = settleExampleWorkflowCanvas(); + const finishSwitching = nextFrame; + studio.getState().createWorkflowTab('Another document'); + flow.getState().replaceGraph({ nodes: [node('other', 345, 543)], edges: [] }); + finishSwitching(); + assert.equal(await switching, false); + assert.deepEqual( + flow.getState().nodes.map(({ id, position }) => ({ id, position })), + [{ id: 'other', position: { x: 345, y: 543 } }], + ); + } finally { + window.requestAnimationFrame = previousFrame; + } +}); + +test('measurement readiness excludes hidden and folded Block projection leaves', async () => { + const root = node('measured-root', 0, 0); + root.data.blockInstanceV2 = {}; + root.measured = { width: 400, height: 420 }; + const internal = node('folded-leaf', 0, 0); + internal.data.blockProjectionOwnerId = root.id; + const hidden = node('hidden-node', 0, 0); + hidden.hidden = true; + assert.equal( + await graphLayout.waitForGraphNodeMeasurements(() => [root, internal, hidden], 100), + true, + 'Only nodes owned by the ordinary layout need a live canvas measurement.', + ); +}); + +test('fresh canonical utility examples do not acquire inferred managed-template authority', async () => { + const { exampleWorkflowSnapshotFromGraph } = await server.ssrLoadModule('/src/studio/exampleWorkflow.ts'); + const { workflowSnapshotFromGraph } = await server.ssrLoadModule('/src/studio/workflowInference.ts'); + const graph = JSON.parse( + fs.readFileSync( + path.resolve(ROOT, '../MoDiff/data/graphs/studio/builtin-data-operation/data-conversion.json'), + 'utf8', + ), + ); + const original = structuredClone(graph); + const fallback = studioStoreModule.useStudioStore.getState().form; + assert.ok( + workflowSnapshotFromGraph(graph, 'default', fallback).studioGraphBinding, + 'The old inference path recognizes managed role labels without a current receipt.', + ); + const opened = exampleWorkflowSnapshotFromGraph(graph, 'default', fallback); + assert.equal( + opened.studioGraphBinding, + null, + 'A fresh canonical Example is a graph, not an accepted managed-template receipt.', + ); + const tabId = studioStoreModule.useStudioStore + .getState() + .createWorkflowTab('Native utility Example', opened, 'import', 'canonical-example'); + assert.equal( + studioStoreModule.useStudioStore.getState().graphBinding, + null, + 'Opening normalization must not recreate the inferred authority.', + ); + assert.equal( + studioStoreModule.useStudioStore.getState().workflowTabs.find((tab) => tab.id === tabId).snapshot + .studioGraphBinding, + null, + ); + assert.deepEqual(opened.nodes, workflowSnapshotFromGraph(graph, 'default', fallback).nodes); + assert.deepEqual(graph, original); +}); + +test('automatic form normalization reports a stale managed receipt without crashing or modifying its graph', async () => { + const { useStudioRunActions } = await server.ssrLoadModule('/src/studio/useStudioRunActions.ts'); + const { workflowSnapshotFromGraph } = await server.ssrLoadModule('/src/studio/workflowInference.ts'); + const studio = studioStoreModule.useStudioStore, + flow = flowStoreModule.useFlowStore, + metadata = nodesStoreModule.useNodesStore; + const oldStudio = studio.getState(), + oldFlow = flow.getState(), + oldMetadata = metadata.getState(); + try { + const graph = JSON.parse( + fs.readFileSync( + path.resolve(ROOT, '../MoDiff/data/graphs/studio/builtin-data-operation/data-conversion.json'), + 'utf8', + ), + ); + const opened = workflowSnapshotFromGraph(graph, 'default', { ...oldStudio.form, resourceMode: 'expert' }); + const spec = { + schemaVersion: 1, + canonicalizationVersion: 1, + id: 'test-data-spec', + modelType: 'BuiltinDataOperation', + mode: 'data_conversion', + executionProfileId: 'test-data-profile', + loaderModule: 'modules.Text', + loaderAction: 'ProcessText', + executionPath: 'builtin-data-operation', + pipelineClass: 'BuiltinDataOperationV1', + defaultRepo: 'builtin://modiff/data-operations/v1', + roles: [], + edges: [], + bindings: [], + autoFields: [], + actions: [], + contentHash: 'studio-spec-v1-12345678', + }; + metadata.setState({ + studioExecutionSpecInvalid: false, + studioModelCapabilities: [ + { + modelType: 'BuiltinDataOperation', + studioExecutionSpecSchemaVersion: 1, + studioExecutionSpecModes: ['data_conversion'], + studioExecutionSpecs: [spec], + }, + ], + }); + flow.setState({ nodes: opened.nodes, edges: opened.edges }); + studio.setState({ + form: opened.studioForm, + graphBinding: opened.studioGraphBinding, + graphFinalization: null, + lastError: null, + }); + const before = structuredClone(flow.getState().nodes); + let actions; + function Harness() { + actions = useStudioRunActions({ + isConnected: false, + missingInstallTarget: null, + installHfModel: async () => null, + setIsWorking: () => {}, + }); + return null; + } + renderToStaticMarkup(createElement(Harness)); + assert.doesNotThrow(() => actions.updateAndSync({ device: 'cpu:0' })); + assert.match(studio.getState().lastError, /execution specification receipt is stale/); + assert.equal(studio.getState().graphFinalization.status, 'error'); + assert.deepEqual(flow.getState().nodes, before, 'The rejected sync cannot rewrite executable inputs.'); + assert.throws( + () => graphBridge.syncStudioGraphValues(studio.getState().form), + /execution specification receipt is stale/, + 'The strict imperative guard remains in force.', + ); + } finally { + studio.setState(oldStudio); + flow.setState(oldFlow); + metadata.setState(oldMetadata); + } +}); + +test('fresh example layout follows its document while initial form settings settle', async () => { + const { settleExampleWorkflowCanvas } = await server.ssrLoadModule('/src/studio/exampleWorkflow.ts'); + const flow = flowStoreModule.useFlowStore; + const studio = studioStoreModule.useStudioStore; + const oldFlow = flow.getState(), + oldStudio = studio.getState(), + oldFrame = window.requestAnimationFrame; + try { + for (const change of ['form', 'canvas', 'tab']) { + const measured = node('fresh-layout', 72, 91); + measured.measured = { width: 337, height: 541 }; + flow.setState({ nodes: [measured], edges: [], layoutRevision: 0 }); + studio.setState({ activeWorkflowTabId: null, workflowCanvasEpoch: 0, workflowFormEpoch: 0 }); + let first = true; + window.requestAnimationFrame = (callback) => + setTimeout(() => { + if (first) { + first = false; + studio.setState( + change === 'form' + ? { workflowFormEpoch: 1 } + : change === 'canvas' + ? { workflowCanvasEpoch: 1 } + : { activeWorkflowTabId: 'another-document' }, + ); + } + callback(Date.now()); + }, 0); + assert.equal(await settleExampleWorkflowCanvas(), change === 'form', change); + assert.equal(flow.getState().layoutRevision, change === 'form' ? 1 : 0, change); + assert.deepEqual( + flow.getState().nodes[0].data.params, + measured.data.params, + 'Layout never edits execution inputs.', + ); + } + } finally { + window.requestAnimationFrame = oldFrame; + flow.setState(oldFlow); + studio.setState(oldStudio); + } +}); + +test('fresh paired image inputs have room for the first previews without changing their saved fields', async () => { + const { exampleWorkflowSnapshotFromGraph, settleExampleWorkflowCanvas } = await server.ssrLoadModule( + '/src/studio/exampleWorkflow.ts', + ); + const flow = flowStoreModule.useFlowStore; + const studio = studioStoreModule.useStudioStore; + const oldFlow = flow.getState(); + const oldStudio = studio.getState(); + const canonical = JSON.parse( + fs.readFileSync( + path.resolve( + process.env.MODIFF_BACKEND_DIR ?? path.join(ROOT, '../MoDiff'), + 'data/graphs/studio/stable-diffusion-pipeline/inpaint.json', + ), + 'utf8', + ), + ); + const original = structuredClone(canonical); + const opened = exampleWorkflowSnapshotFromGraph(canonical, 'default', oldStudio.form); + const nodes = opened.nodes.map((item) => ({ ...item, measured: { width: 400, height: 302 } })); + const sources = nodes.filter((item) => ['node-05', 'node-06'].includes(item.id)); + const initialLayout = graphLayout.arrangeGraphNodes(nodes, opened.edges); + const separation = (items) => + Math.abs(items.find(({ id }) => id === 'node-05').position.y - items.find(({ id }) => id === 'node-06').position.y); + try { + flow.setState({ nodes, edges: opened.edges, layoutRevision: 0 }); + studio.setState({ activeWorkflowTabId: null, workflowCanvasEpoch: 0, workflowFormEpoch: 0 }); + assert.equal(await settleExampleWorkflowCanvas(), true); + const laidOut = flow.getState().nodes; + assert.ok( + separation(laidOut) >= separation(initialLayout) + 200, + 'The blank image stack must have room for a decoded preview and its next file row.', + ); + for (const source of sources) { + const actual = laidOut.find(({ id }) => id === source.id); + assert.deepEqual(actual.data.params, source.data.params); + assert.deepEqual(actual.measured, source.measured); + } + assert.deepEqual(canonical, original); + assert.deepEqual(flow.getState().edges, opened.edges); + await flow.getState().arrangeGraph({ history: false }); + assert.equal( + separation(flow.getState().nodes), + separation(initialLayout), + 'Explicit Arrange stays based on the currently rendered sizes.', + ); + } finally { + flow.setState(oldFlow); + studio.setState(oldStudio); + } }); test('graph finalization wait preserves failures and reports a bounded timeout', async () => { @@ -2190,7 +3444,7 @@ test('backend execution specs materialize exact image, video, and audio recipes ['diffusersRecipe', 'vae_slicing', 'false'], ['diffusersRecipe', 'vae_tiling', 'false'], ['diffusersRecipe', 'regional_compile', 'false'], - ['diffusersRecipe', 'denoiser_cache', 'false'], + ['diffusersRecipe', 'denoiser_cache', 'denoiserCache'], ['diffusersRecipe', 'layerwise_casting', 'false'], ['diffusersRecipe', 'channels_last', 'false'], ['diffusersThreeDPipeline', 'model_id', 'artifact'], @@ -2654,7 +3908,12 @@ test('backend execution specs materialize exact image, video, and audio recipes ...capability(sdxlSpec), modes: ['text_to_image', 'edit_image', 'inpaint'], runnableModes: ['text_to_image', 'edit_image', 'inpaint'], - executionProfiles: [profile(sdxlSpec), profile(sdxlEditSpec), profile(sdxlInpaintSpec)], + executionProfiles: [ + profile(sdxlSpec), + profile(sdxlEditSpec), + profile(sdxlInpaintSpec), + { ...profile(sdxlSpec), id: `${sdxlSpec.executionProfileId}:alternate` }, + ], studioExecutionSpecModes: ['edit_image', 'inpaint', 'text_to_image'], studioExecutionSpecs: [sdxlSpec, sdxlEditSpec, sdxlInpaintSpec], revisionCandidates: [sdxlRevision], @@ -3565,8 +4824,8 @@ test('backend execution specs materialize exact image, video, and audio recipes const i2vGenerate = i2vNodes.find((item) => item.id === i2vBinding.nodes.wanGenerate).data.params; const i2vImage = i2vNodes.find((item) => item.id === i2vBinding.nodes.loadImage).data.params; assert.deepEqual(i2vQuantization.components.value, ['transformer', 'transformer_2']); - assert.equal(i2vRecipe.attention_backend.value, '_native_flash'); - assert.equal(i2vRecipe.attention_components.value, 'transformer,transformer_2'); + assert.equal(i2vRecipe.attention_backend.value, 'auto'); + assert.equal(i2vRecipe.attention_components.value, ''); assert.equal(i2vRecipe.vae_tiling.value, true); assert.equal(i2vPipeline.pipeline_class.value, 'WanImageToVideoPipeline'); assert.deepEqual(i2vPipeline.model_id.value, { @@ -3614,8 +4873,8 @@ test('backend execution specs materialize exact image, video, and audio recipes assert.equal(ti2vPipeline.revision.value, 'b8fff7315c768468a5333511427288870b2e9635'); assert.equal(ti2vPipeline.execution_profile_id.value, 'wan-22-ti2v-5b:direct'); const ti2vRecipe = ti2vNodes.find((item) => item.id === ti2vBinding.nodes.diffusersRecipe).data.params; - assert.equal(ti2vRecipe.attention_backend.value, '_native_flash'); - assert.equal(ti2vRecipe.attention_components.value, 'transformer'); + assert.equal(ti2vRecipe.attention_backend.value, 'auto'); + assert.equal(ti2vRecipe.attention_components.value, ''); assert.equal(ti2vRecipe.vae_tiling.value, true); const ti2vGenerate = ti2vNodes.find((item) => item.id === ti2vBinding.nodes.wanGenerate).data.params; assert.equal(ti2vGenerate.scheduler_flow_shift.value, 5); @@ -6414,10 +7673,8 @@ test('Auto canvas renders the exact workflow graph instead of a projected facade ); assert.match(workflowSource, /isUserBlockExpandedInstance\(\{ nodes, edges \}, node\.id\)/); assert.match(workflowSource, /huggingFaceClusterInstance\?\.presentation\.expanded === true/); - assert.equal( - [...workflowSource.matchAll(/fitView\([\s\S]*?\.finally\(\(\) => \{\s*setWorkflowFocusRequest\(null\);/g)].length, - 2, - ); + assert.match(workflowSource, /duration: 240 \}\)\.finally\(clearCurrentFocus\)/); + assert.match(workflowSource, /workflowFocusRequest === workflowFocusRequest\) setWorkflowFocusRequest\(null\)/); assert.match(workflowSource, /nodesDraggable[\s\S]*nodesConnectable[\s\S]*elementsSelectable/); assert.ok(runPreparation); assert.doesNotMatch(runPreparation, /createOrUpdateStudioGraph/); @@ -8364,7 +9621,7 @@ test('Studio exposes a distinct visible install action for its exact missing mod assert.match(runActionsSource, /const \[isInstallingMissingModel, setIsInstallingMissingModel\] = useState\(false\)/); assert.match(runActionsSource, /await installHfModel\(missingInstallTarget\.repo, sid/); assert.match(studioReadinessSource, /revision: exactCapabilityRevision/); - assert.match(studioReadinessSource, /files: capability\.downloadFiles/); + assert.match(studioReadinessSource, /files: selectedCapability\.downloadFiles/); assert.match(runActionsSource, /handleInstallMissingModel,[\s\S]*isInstallingMissingModel,/); assert.match(studioPanelSource, /data-testid="studio-install-missing-model"/); assert.match(studioPanelSource, /disabled=\{isWorking \|\| isInstallingMissingModel\}/); @@ -8590,6 +9847,663 @@ test('model selector applies only backend class and id filters to opaque install }); }); +function customModelFieldFixture(component = 'image_annotator') { + const field = `source__${component}__repo`; + const pinField = `source__${component}__revision`; + const repo = 'component-owner/reviewed-model'; + const revision = 'b'.repeat(40); + const owner = node('component-loader'); + owner.data.module = 'custom.ReviewedBlock'; + owner.data.action = 'LoadModels'; + owner.data.params = { + [field]: { display: 'modelselect', value: { source: 'hub', value: repo } }, + [pinField]: { type: 'string', value: revision }, + revision: { type: 'string', value: 'a'.repeat(40) }, + }; + flowStoreModule.useFlowStore.setState({ nodes: [owner], edges: [] }); + return { + owner, + repo, + revision, + field, + pinField, + props: { + nodeId: owner.id, + fieldKey: field, + module: owner.data.module, + action: owner.data.action, + }, + }; +} + +test('custom component Install forwards its own immutable sibling pin, not a base revision', async () => { + const fixture = customModelFieldFixture(); + const calls = []; + await modelFieldInstall.installModelField(fixture.props, fixture.repo, 'test-session', async (...args) => + calls.push(args), + ); + assert.deepEqual(calls, [[fixture.repo, 'test-session', { revision: fixture.revision }]]); +}); + +test('another cached revision cannot hide the custom component exact-pin Install action', () => { + const fixture = customModelFieldFixture(); + assert.equal( + modelFieldInstall.modelFieldIsInstalled(fixture.props, fixture.repo, [ + { + id: fixture.repo, + installed: true, + complete: true, + planned_revision: 'c'.repeat(40), + }, + ]), + false, + ); +}); + +test('custom component Install reads the current sibling and keeps independent components separate', async () => { + const fixture = customModelFieldFixture(); + const otherField = 'source__processor__repo'; + const otherRevision = 'd'.repeat(40); + flowStoreModule.useFlowStore.getState().setParam(fixture.owner.id, fixture.pinField, 'c'.repeat(40)); + const current = flowStoreModule.useFlowStore.getState().nodes[0]; + flowStoreModule.useFlowStore.setState({ + nodes: [ + { + ...current, + data: { + ...current.data, + params: { + ...current.data.params, + [otherField]: { display: 'modelselect', value: { source: 'hub', value: fixture.repo } }, + source__processor__revision: { value: otherRevision }, + }, + }, + }, + ], + }); + const before = structuredClone(flowStoreModule.useFlowStore.getState().nodes); + const calls = []; + const install = async (...args) => calls.push(args); + await modelFieldInstall.installModelField(fixture.props, fixture.repo, null, install); + await modelFieldInstall.installModelField({ ...fixture.props, fieldKey: otherField }, fixture.repo, null, install); + assert.deepEqual(calls, [ + [fixture.repo, null, { revision: 'c'.repeat(40) }], + [fixture.repo, null, { revision: otherRevision }], + ]); + assert.deepEqual( + flowStoreModule.useFlowStore.getState().nodes, + before, + 'install inspection must not rewrite authored sources', + ); +}); + +test('custom component Install rejects absent, mutable, malformed and default-only revision pins', () => { + for (const revisionParam of [ + undefined, + {}, + { value: '' }, + { value: 'main' }, + { value: 'A'.repeat(40) }, + { value: ` ${'a'.repeat(40)}` }, + { value: { value: 'a'.repeat(40) } }, + { value: 123 }, + { default: 'a'.repeat(40) }, + ]) { + const fixture = customModelFieldFixture(); + if (revisionParam === undefined) delete fixture.owner.data.params[fixture.pinField]; + else fixture.owner.data.params[fixture.pinField] = revisionParam; + let calls = 0; + assert.throws( + () => + modelFieldInstall.installModelField(fixture.props, fixture.repo, null, () => { + calls += 1; + }), + /exact lowercase 40-character revision/, + ); + assert.equal(calls, 0); + assert.equal( + modelFieldInstall.modelFieldIsInstalled(fixture.props, fixture.repo, [{ id: fixture.repo, installed: true }]), + false, + ); + } +}); + +test('custom component Install rejects connected or dynamically supplied pins even with a stored fallback', () => { + for (const supplied of [ + { isConnected: true }, + { sourceId: 'upstream' }, + { sourceKey: 'value' }, + { signal: { direction: 'input', value: 'a'.repeat(40) } }, + ]) { + const fixture = customModelFieldFixture(); + Object.assign(fixture.owner.data.params[fixture.pinField], supplied); + assert.throws( + () => + modelFieldInstall.installModelField(fixture.props, fixture.repo, null, () => assert.fail('must not install')), + /literal component repository and revision/, + ); + } + for (const field of ['source__image_annotator__repo', 'source__image_annotator__revision']) { + const fixture = customModelFieldFixture(); + flowStoreModule.useFlowStore.setState({ + edges: [edge('connected', 'value-node', fixture.owner.id, 'output', field)], + }); + assert.throws( + () => + modelFieldInstall.installModelField(fixture.props, fixture.repo, null, () => assert.fail('must not install')), + /literal component repository and revision/, + ); + } +}); + +test('custom component Install verifies pins through a real created V2 Block and its public/crossing connections', async () => { + const creation = await server.ssrLoadModule('/src/studio/userBlockCreationV2.ts'); + const runtime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); + for (const connected of [false, 'public', 'crossing', 'internal']) { + const fixture = customModelFieldFixture(); + fixture.owner.selected = true; + fixture.owner.data.params[fixture.field].type = 'string'; + const valueNode = node('value-node', 0, 0, { params: { output: { display: 'output', type: 'string' } } }); + valueNode.selected = true; + const draft = userBlocksModule.createUserBlockFromSelection( + { + nodes: connected === 'internal' ? [fixture.owner, valueNode] : [fixture.owner], + edges: + connected === 'internal' + ? [edge('internal-pin', valueNode.id, fixture.owner.id, 'output', fixture.pinField)] + : [], + }, + 'Pinned components', + ); + assert.equal(draft.ok, true); + const prepared = creation.prepareUserBlockCreationV2(draft, draft.block); + const root = prepared.graph.nodes.find((node) => node.data.blockInstanceV2); + let instance = root.data.blockInstanceV2; + const modelControl = instance.effectiveInterface.controls.find( + (control) => control.binding.fieldId === fixture.field, + ); + assert.ok(modelControl); + flowStoreModule.useFlowStore.setState(prepared.graph); + assert.throws( + () => + modelFieldInstall.installModelField( + { + nodeId: root.id, + module: root.data.module, + action: root.data.action, + fieldKey: modelControl.controlId, + }, + fixture.repo, + null, + () => assert.fail('must not install'), + ), + /Expand this Block/, + ); + const semanticId = instance.effectiveGraph.nodes.find( + (node) => node.data.module === fixture.owner.data.module, + ).nodeId; + instance = runtime.replaceBlockEffectiveInterfaceV2(instance, { + controls: instance.effectiveInterface.controls, + boundary: { + ...instance.effectiveInterface.boundary, + inputs: [ + { + portId: 'revision-in', + label: 'Revision', + valueType: 'string', + required: false, + binding: { nodeId: semanticId, fieldOrPortId: fixture.pinField }, + }, + ], + }, + }); + instance = runtime.setBlockPresentationV2(instance, { expanded: true }); + const graph = runtime.materializeBlockProjectionV2(runtime.createBlockRootNodeV2(instance)); + const projected = graph.nodes.find((node) => node.data.blockProjectionNodeId === semanticId); + assert.ok(projected.data.params[fixture.field]); + const visibleModelFields = Object.entries(projected.data.params).filter( + ([, field]) => field.display === 'modelselect' && !field.hidden, + ); + assert.equal( + visibleModelFields.length, + 1, + 'exercise the actual visible model control, not only a hidden backing field', + ); + if (connected && connected !== 'internal') { + graph.nodes.push(valueNode); + graph.edges.push( + edge( + 'outside-pin', + valueNode.id, + instance.instanceId, + 'output', + connected === 'public' ? 'revision-in' : `block-crossing:input:${semanticId}:${fixture.pinField}`, + ), + ); + } + flowStoreModule.useFlowStore.setState(graph); + const props = { ...fixture.props, nodeId: projected.id, fieldKey: visibleModelFields[0][0] }; + const calls = []; + if (connected) { + assert.throws( + () => modelFieldInstall.installModelField(props, fixture.repo, null, () => assert.fail('must not install')), + /literal component repository and revision/, + ); + } else { + await modelFieldInstall.installModelField(props, fixture.repo, null, async (...args) => calls.push(args)); + assert.deepEqual(calls, [[fixture.repo, null, { revision: fixture.revision }]]); + } + } +}); + +test('custom component Install rejects stale repository, owner and workflow controls', () => { + const fixture = customModelFieldFixture(); + assert.throws( + () => + modelFieldInstall.installModelField(fixture.props, 'other/repository', null, () => + assert.fail('must not install'), + ), + /component repository changed/, + ); + assert.throws( + () => + modelFieldInstall.installModelField({ ...fixture.props, module: 'custom.Other' }, fixture.repo, null, () => + assert.fail('must not install'), + ), + /model field changed/, + ); + const context = studioStoreModule.captureWorkflowOperationContext(); + studioStoreModule.useStudioStore.setState({ activeWorkflowTabId: 'different-workflow' }); + assert.throws( + () => + modelFieldInstall.installModelField({ ...fixture.props, workflowContext: context }, fixture.repo, null, () => + assert.fail('must not install'), + ), + /workflow changed/, + ); +}); + +test('custom component Install asks to expand a collapsed legacy control instead of guessing its pin', () => { + const fixture = customModelFieldFixture(); + fixture.owner.selected = true; + const draft = userBlocksModule.createUserBlockFromSelection( + { nodes: [fixture.owner], edges: [] }, + 'Legacy component', + ); + assert.equal(draft.ok, true); + const control = draft.block.exposedParams.find((item) => item.paramKey === fixture.field); + assert.ok(control); + flowStoreModule.useFlowStore.setState({ nodes: [draft.blockNode], edges: [] }); + assert.throws( + () => + modelFieldInstall.installModelField( + { ...fixture.props, nodeId: draft.blockNode.id, fieldKey: control.id }, + fixture.repo, + null, + () => assert.fail('must not install'), + ), + /Expand this Block/, + ); +}); + +test('nested legacy component controls require expansion rather than an unpinned fallback', () => { + const fixture = customModelFieldFixture(); + fixture.owner.selected = true; + const inner = userBlocksModule.createUserBlockFromSelection({ nodes: [fixture.owner], edges: [] }, 'Legacy inner'); + assert.equal(inner.ok, true); + inner.blockNode.selected = true; + const outer = userBlocksModule.createUserBlockFromSelection({ nodes: [inner.blockNode], edges: [] }, 'Legacy outer'); + assert.equal(outer.ok, true); + const control = outer.block.exposedParams.find( + (item) => item.display === 'modelselect' || outer.blockNode.data.params[item.id]?.display === 'modelselect', + ); + assert.ok(control); + flowStoreModule.useFlowStore.setState({ nodes: [outer.blockNode], edges: [] }); + const props = { + nodeId: outer.blockNode.id, + fieldKey: control.id, + module: outer.blockNode.data.module, + action: outer.blockNode.data.action, + }; + assert.throws( + () => modelFieldInstall.installModelField(props, fixture.repo, null, () => assert.fail('must not install')), + /Expand this Block/, + ); + assert.equal( + modelFieldInstall.modelFieldIsInstalled(props, fixture.repo, [{ id: fixture.repo, installed: true }]), + false, + ); +}); + +test('ordinary collapsed V2 model controls keep their catalog install and installed visibility', async () => { + const creation = await server.ssrLoadModule('/src/studio/userBlockCreationV2.ts'); + const owner = node('ordinary-model', 0, 0, { + params: { + model: { display: 'modelselect', type: 'string', value: { source: 'hub', value: 'owner/ordinary-model' } }, + }, + }); + owner.selected = true; + owner.data.module = 'custom.OrdinaryNode'; + owner.data.action = 'LoadOther'; + const draft = userBlocksModule.createUserBlockFromSelection({ nodes: [owner], edges: [] }, 'Ordinary model'); + assert.equal(draft.ok, true); + const graph = creation.prepareUserBlockCreationV2(draft, draft.block).graph; + const root = graph.nodes.find((node) => node.data.blockInstanceV2); + const control = root.data.blockInstanceV2.effectiveInterface.controls.find( + (item) => item.binding.fieldId === 'model', + ); + flowStoreModule.useFlowStore.setState(graph); + const props = { nodeId: root.id, module: root.data.module, action: root.data.action, fieldKey: control.controlId }; + const calls = []; + await modelFieldInstall.installModelField(props, 'owner/ordinary-model', null, async (...args) => calls.push(args)); + assert.deepEqual(calls, [['owner/ordinary-model', null]]); + assert.equal( + modelFieldInstall.modelFieldIsInstalled(props, 'owner/ordinary-model', [ + { id: 'owner/ordinary-model', installed: true }, + ]), + true, + ); + const originalBinding = structuredClone(control.binding); + const originalMirrors = control.mirrorBindings; + for (const malformed of [undefined, {}, { nodeId: '', fieldId: 'model' }]) { + control.binding = malformed; + assert.throws( + () => + modelFieldInstall.installModelField(props, 'owner/ordinary-model', null, () => assert.fail('must not install')), + /Expand this Block/, + ); + assert.equal( + modelFieldInstall.modelFieldIsInstalled(props, 'owner/ordinary-model', [ + { id: 'owner/ordinary-model', installed: true }, + ]), + false, + ); + } + control.binding = originalBinding; + control.mirrorBindings = {}; + assert.throws( + () => + modelFieldInstall.installModelField(props, 'owner/ordinary-model', null, () => assert.fail('must not install')), + /Expand this Block/, + ); + control.mirrorBindings = originalMirrors; +}); + +test('nested created V2 component model aliases cannot fall through to an unpinned install', async () => { + const creation = await server.ssrLoadModule('/src/studio/userBlockCreationV2.ts'); + const runtime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); + const fixture = customModelFieldFixture(); + fixture.owner.selected = true; + fixture.owner.data.params[fixture.field].type = 'string'; + const innerDraft = userBlocksModule.createUserBlockFromSelection( + { nodes: [fixture.owner], edges: [] }, + 'Inner components', + ); + assert.equal(innerDraft.ok, true); + const inner = creation + .prepareUserBlockCreationV2(innerDraft, innerDraft.block) + .graph.nodes.find((node) => node.data.blockInstanceV2); + inner.selected = true; + const outerDraft = userBlocksModule.createUserBlockFromSelection({ nodes: [inner], edges: [] }, 'Outer components'); + assert.equal(outerDraft.ok, true); + const outer = creation + .prepareUserBlockCreationV2(outerDraft, outerDraft.block) + .graph.nodes.find((node) => node.data.blockInstanceV2); + const instance = runtime.setBlockPresentationV2(outer.data.blockInstanceV2, { expanded: true }); + const graph = runtime.materializeBlockProjectionV2(runtime.createBlockRootNodeV2(instance)); + const aliases = graph.nodes.flatMap((node) => + Object.entries(node.data.params ?? {}) + .filter(([field, param]) => field.startsWith('block-') && param.display === 'modelselect' && !param.hidden) + .map(([field]) => ({ nodeId: node.id, module: node.data.module, action: node.data.action, fieldKey: field })), + ); + assert.ok(aliases.length, 'exercise a real visible projected container alias'); + flowStoreModule.useFlowStore.setState(graph); + for (const props of aliases) { + const calls = []; + assert.throws( + () => modelFieldInstall.installModelField(props, fixture.repo, null, (...args) => calls.push(args)), + /Expand this Block|component revision/, + ); + assert.deepEqual(calls, []); + assert.equal( + modelFieldInstall.modelFieldIsInstalled(props, fixture.repo, [{ id: fixture.repo, installed: true }]), + false, + ); + } +}); + +async function nestedModelControlFixture(owner, localSurface) { + const creation = await server.ssrLoadModule('/src/studio/userBlockCreationV2.ts'); + const runtime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); + owner.selected = true; + owner.data.params.test_input = { display: 'input', type: 'string' }; + const innerDraft = userBlocksModule.createUserBlockFromSelection({ nodes: [owner], edges: [] }, 'Inner model'); + assert.equal(innerDraft.ok, true); + const inner = creation + .prepareUserBlockCreationV2(innerDraft, innerDraft.block) + .graph.nodes.find((item) => item.data.blockInstanceV2); + let instance = inner.data.blockInstanceV2; + let containerId; + if (localSurface) { + inner.selected = true; + const sibling = node('composition-sibling', 300, 0, { params: { output: { display: 'output', type: 'string' } } }); + sibling.selected = true; + const input = instance.effectiveInterface.boundary.inputs.find( + (port) => port.binding.fieldOrPortId === 'test_input', + ); + assert.ok(input); + const outerDraft = creation.createUserBlockDraftV2( + { + nodes: [inner, sibling], + edges: [ + { + id: 'composition-wire', + source: sibling.id, + sourceHandle: 'output', + target: inner.id, + targetHandle: input.portId, + }, + ], + }, + [], + ); + assert.equal(outerDraft.ok, true, JSON.stringify(outerDraft)); + const outer = creation + .prepareUserBlockCreationV2(outerDraft, outerDraft.block) + .graph.nodes.find((item) => item.data.blockInstanceV2); + instance = outer.data.blockInstanceV2; + containerId = instance.effectiveGraph.nodes.find((item) => item.containerInterface)?.nodeId; + assert.ok(containerId, 'normal composition retains the embedded Block interface'); + } else { + // Use the same structural-edit functions as native graph edits; no fabricated Block hash or alias. + containerId = 'ordinary-container'; + instance = runtime.addBlockEffectiveGraphNodeV2(instance, { + nodeId: containerId, + nodeType: 'group', + data: { label: 'Nested group', params: {} }, + }); + instance = runtime.replaceBlockEffectiveGraphV2(instance, { + ...instance.effectiveGraph, + nodes: instance.effectiveGraph.nodes.map((item) => + item.nodeId === owner.id ? { ...item, parentNodeId: containerId } : item, + ), + }); + } + instance = runtime.setBlockPresentationV2(instance, { expanded: true, collapsedContainerNodeIds: [containerId] }); + const graph = runtime.materializeBlockProjectionV2(runtime.createBlockRootNodeV2(instance)); + const prefix = localSurface ? 'block-local-control:' : 'block-control:'; + const aliases = graph.nodes.flatMap((item) => + Object.entries(item.data.params ?? {}) + .filter(([field, param]) => field.startsWith(prefix) && param.display === 'modelselect' && !param.hidden) + .map(([field]) => ({ nodeId: item.id, module: item.data.module, action: item.data.action, fieldKey: field })), + ); + assert.ok(aliases.length, `normal projection creates visible ${prefix} aliases`); + flowStoreModule.useFlowStore.setState(graph); + return { graph, aliases }; +} + +for (const localSurface of [false, true]) { + test(`nested V2 ${localSurface ? 'local-container' : 'root-bound'} model aliases preserve ordinary catalog behavior`, async () => { + const owner = node('ordinary-nested-model', 0, 0, { + params: { + model: { display: 'modelselect', type: 'string', value: { source: 'hub', value: 'owner/ordinary-model' } }, + }, + }); + owner.data.module = 'custom.OrdinaryNode'; + owner.data.action = 'LoadOther'; + const { graph, aliases } = await nestedModelControlFixture(owner, localSurface); + const before = structuredClone(graph); + for (const props of aliases) { + const calls = []; + await modelFieldInstall.installModelField(props, 'owner/ordinary-model', null, async (...args) => + calls.push(args), + ); + assert.deepEqual(calls, [['owner/ordinary-model', null]]); + assert.equal( + modelFieldInstall.modelFieldIsInstalled(props, 'owner/ordinary-model', [ + { id: 'owner/ordinary-model', installed: true }, + ]), + true, + ); + } + assert.deepEqual(flowStoreModule.useFlowStore.getState().nodes, before.nodes); + }); + + test(`nested V2 ${localSurface ? 'local-container' : 'root-bound'} component aliases fail closed with malformed ownership`, async () => { + const fixture = customModelFieldFixture(); + fixture.owner.data.params[fixture.field].type = 'string'; + const { graph, aliases } = await nestedModelControlFixture(fixture.owner, localSurface); + for (const props of aliases) { + const calls = []; + assert.throws( + () => modelFieldInstall.installModelField(props, fixture.repo, null, (...args) => calls.push(args)), + /Expand this Block/, + ); + assert.deepEqual(calls, []); + assert.equal( + modelFieldInstall.modelFieldIsInstalled(props, fixture.repo, [{ id: fixture.repo, installed: true }]), + false, + ); + const param = graph.nodes.find((item) => item.id === props.nodeId).data.params[props.fieldKey]; + const meta = localSurface ? param.fieldOptions.blockContainerControlV1 : param.fieldOptions.blockBindingV2; + const ownerId = meta.ownerId; + meta.ownerId = 'wrong-instance'; + assert.throws( + () => modelFieldInstall.installModelField(props, fixture.repo, null, () => assert.fail('must not install')), + /Expand this Block/, + ); + meta.ownerId = ownerId; + const metadataKey = localSurface ? 'blockContainerControlV1' : 'blockBindingV2'; + delete param.fieldOptions[metadataKey]; + assert.throws( + () => modelFieldInstall.installModelField(props, fixture.repo, null, () => assert.fail('must not install')), + /Expand this Block/, + ); + param.fieldOptions[metadataKey] = meta; + } + const root = graph.nodes.find((item) => item.data.blockInstanceV2); + const container = root.data.blockInstanceV2.effectiveGraph.nodes.find((item) => item.nodeType === 'group'); + assert.ok(container); + container.parentNodeId = container.nodeId; + assert.throws( + () => modelFieldInstall.installModelField(aliases[0], fixture.repo, null, () => assert.fail('must not install')), + /Cyclic|Expand this Block/, + ); + assert.equal( + modelFieldInstall.modelFieldIsInstalled(aliases[0], fixture.repo, [{ id: fixture.repo, installed: true }]), + false, + ); + }); +} + +test('custom component Install rejects malformed Hub choices and stale custom-owner metadata', () => { + const fixture = customModelFieldFixture(); + for (const choice of [ + null, + 'owner/model', + { source: 'local', value: fixture.repo }, + { source: 'hub', value: null }, + ]) { + fixture.owner.data.params[fixture.field].value = choice; + assert.throws( + () => + modelFieldInstall.installModelField(fixture.props, fixture.repo, null, () => assert.fail('must not install')), + /component repository changed/, + ); + } + fixture.owner.data.params[fixture.field].value = { source: 'hub', value: fixture.repo }; + for (const module of [null, {}, 'custom.OtherOwner']) { + fixture.owner.data.module = module; + assert.throws( + () => + modelFieldInstall.installModelField(fixture.props, fixture.repo, null, () => assert.fail('must not install')), + /model field changed/, + ); + } +}); + +test('custom component cache visibility requires exact positive revision evidence', () => { + const fixture = customModelFieldFixture(); + for (const record of [ + { id: fixture.repo, installed: true }, + { id: fixture.repo, complete: true }, + { id: fixture.repo, planned_revision: fixture.revision }, + { id: fixture.repo, complete: false, installed: false, planned_revision: fixture.revision }, + { id: fixture.repo, installed: true, complete: true, repair_required: true, planned_revision: fixture.revision }, + ]) { + assert.equal(modelFieldInstall.modelFieldIsInstalled(fixture.props, fixture.repo, [record]), false); + } + assert.equal( + modelFieldInstall.modelFieldIsInstalled(fixture.props, fixture.repo, [ + { + id: fixture.repo, + installed: true, + complete: true, + planned_revision: fixture.revision, + }, + ]), + true, + ); + flowStoreModule.useFlowStore.getState().setParam(fixture.owner.id, fixture.pinField, 'c'.repeat(40)); + assert.equal( + modelFieldInstall.modelFieldIsInstalled(fixture.props, fixture.repo, [ + { + id: fixture.repo, + installed: true, + complete: true, + planned_revision: fixture.revision, + }, + ]), + false, + 'changing only the sibling revision must expose Install again', + ); +}); + +test('ordinary unpinned model fields retain their existing catalog install and cache behavior', async () => { + for (const [module, action, field] of [ + ['modules.DiffusersImage', 'LoadPipeline', 'model_id'], + ['custom.OrdinaryNode', 'LoadOther', 'model'], + ['modules.ModularDiffusers', 'AutoModelLoader', 'model_id'], + ]) { + const owner = node('ordinary-loader'); + Object.assign(owner.data, { + module, + action, + params: { [field]: { display: 'modelselect', value: { source: 'hub', value: 'owner/model' } } }, + }); + flowStoreModule.useFlowStore.setState({ nodes: [owner], edges: [] }); + const props = { nodeId: owner.id, fieldKey: field, module, action }; + const calls = []; + await modelFieldInstall.installModelField(props, 'owner/model', null, async (...args) => calls.push(args)); + assert.deepEqual(calls, [['owner/model', null]]); + assert.equal(modelFieldInstall.modelFieldIsInstalled(props, 'owner/model', [{ id: 'owner/model' }]), true); + assert.equal( + modelFieldInstall.modelFieldIsInstalled(props, 'owner/model', [{ id: 'owner/model', installed: false }]), + false, + ); + } +}); + test('model selector contains no client-owned model-family inference', () => { const selectionSource = fs.readFileSync(path.join(ROOT, 'src', 'studio', 'modelSelection.ts'), 'utf8'); const fieldSource = fs.readFileSync(path.join(ROOT, 'src', 'fields', 'ModelSelectField.tsx'), 'utf8'); @@ -8605,6 +10519,8 @@ test('model selector subscribes to discovered indexes and preserves the selected assert.doesNotMatch(source, /useNodesStore\.getState\(\)/); assert.match(source, /hfCache: state\.hfCache/); assert.match(source, /localModels: state\.localModels/); + assert.match(source, /await installModelField\(props, currentModelId, sid, installHfModel\)/); + assert.match(source, /modelFieldIsInstalled\(props, currentModelId, hfCache, fieldGraph\)/); const refreshBody = source.match(/const handleRefresh = async \(\) => \{[\s\S]*?\n \};/)?.[0] ?? ''; assert.doesNotMatch(refreshBody, /updateStore\([^,]+,\s*\{[^}]*value/); }); @@ -8993,11 +10909,11 @@ test('restoring a saved graph preserves its supplied positions until Arrange gra test('template creation arranges exactly once after finalization and measurement while its canvas is suspended', () => { const source = fs.readFileSync(path.join(ROOT, 'src', 'studio', 'templateWorkflow.ts'), 'utf8'); - const arrangeCalls = source.match(/\.arrangeGraph\(\{ history: false \}\)/g) ?? []; + const arrangeCalls = source.match(/\.arrangeGraph\(\{ history: false, fitNewNodeContents: true \}\)/g) ?? []; const finalizationIndex = source.indexOf('await waitForStudioGraphFinalization'); const timeoutFailureIndex = source.indexOf('No incomplete graph was kept'); const measurementIndex = source.indexOf('await waitForGraphNodeMeasurements'); - const arrangeIndex = source.indexOf('.arrangeGraph({ history: false })'); + const arrangeIndex = source.indexOf('.arrangeGraph({ history: false, fitNewNodeContents: true })'); const revealIndex = source.indexOf('setCanvasTransition(null)'); assert.equal(arrangeCalls.length, 1); @@ -9190,6 +11106,38 @@ test('targeted generation drops stale pairs and retains only current unselected assert.deepEqual(retainUnselectedCurrentWorkflowRecords(records, capabilities, null), []); }); +test('pair-only canonical publication preserves codepoint order and unselected record contents', () => { + const ids = [ + 'Cosmos3OmniModularPipeline:text_to_image', + 'LTX2Pipeline:text_to_video', + 'LatentConsistencyModelPipeline:text_to_image', + 'LongCatAudioDiTPipeline:text_to_audio', + 'PRXPipeline:text_to_image', + 'PixArtSigmaPipeline:text_to_image', + ]; + const records = ids.map((id) => { + const [modelType, mode] = id.split(':'); + return { id, modelType, mode, graphHash: `original-${id}`, runtimeQualificationStatus: 'unqualified' }; + }); + const capabilities = records.map(({ modelType, mode }) => ({ modelType, runnableModes: [mode] })); + const selected = { ...records[0], graphHash: 'reviewed-new-cosmos-graph' }; + const unselected = retainUnselectedCurrentWorkflowRecords( + records, + capabilities, + 'Cosmos3OmniModularPipeline|text_to_image', + ); + const published = [...unselected, selected].sort(compareCanonicalWorkflowRecordIds); + + assert.deepEqual( + published.map(({ id }) => id), + ids, + ); + assert.equal(published[0], selected); + assert.deepEqual(published.slice(1), records.slice(1)); + for (let index = 1; index < records.length; index++) assert.equal(published[index], records[index]); + assert.equal(compareCanonicalWorkflowRecordIds(selected, { ...selected }), 0); +}); + test('canonical workflow generation persists the final layout and library open does not rearrange it', () => { const generator = fs.readFileSync(path.join(ROOT, 'scripts', 'workflow-library-generator.mjs'), 'utf8'); const graphList = fs.readFileSync(path.join(ROOT, 'src', 'components', 'GraphList.tsx'), 'utf8'); @@ -9199,14 +11147,16 @@ test('canonical workflow generation persists the final layout and library open d const navigationIndex = generator.indexOf("currentPage.goto(FRONTEND_URL, { waitUntil: 'domcontentloaded' })"); const prepareIndex = generator.indexOf('prepareWorkflowGraphForExport'); const preCanonicalArrangeIndex = generator.indexOf('const arrangedBeforeCanonicalIds = await arrangeSnapshot(graph)'); - const canonicalizeIndex = generator.indexOf('canonicalizeGraphIds(arrangedBeforeCanonicalIds)'); + const canonicalizeIndex = generator.indexOf( + 'canonicalizeGraphIds(arrangedBeforeCanonicalIds, remapOperationAuthoring)', + ); const metadataIndex = generator.indexOf('addLayoutMetadata(repeated)'); assert.match(generator, /installEphemeralWorkflowStorage/); assert.match(generator, /listTaskTemplateSkeletons/); assert.match(generator, /refreshTaskTemplateContracts/); assert.match(generator, /applyTaskTemplateSkeleton/); assert.match(generator, /applyTemplate\(templateId, \{ resourceMode: 'expert' \}\)/); - assert.match(generator, /if \(!byPair\.has\(pair\)\)/); + assert.match(generator, /selectCanonicalWorkflowSources\(templates, taskTemplates, retainedTemplateIds\)/); assert.match(generator, /shouldRecycleWorkflowBrowser\(completedWorkflowsInSession, WORKFLOW_BROWSER_BATCH_SIZE\)/); assert.match(generator, /launchWorkflowBrowser\(\(\) => chromium\.launch\(browserLaunchOptions\)\)/); assert.match(generator, /if \(isWorkflowBrowserSessionError\(error\)\) throw error/); @@ -9229,6 +11179,54 @@ test('canonical workflow generation persists the final layout and library open d assert.match(verifier, /video-upscale graph is missing its exact reviewed artifact or route/); }); +test('canonical generation suppresses workspace checkpoints in both browser storage scopes', async () => { + let initialize; + await installEphemeralWorkflowStorage({ + addInitScript: async (script) => { + initialize = script; + }, + route: async () => {}, + }); + class MemoryStorage { + values = new Map(); + getItem(key) { + return this.values.get(key) ?? null; + } + setItem(key, value) { + this.values.set(key, String(value)); + } + removeItem(key) { + this.values.delete(key); + } + } + const shared = new MemoryStorage(); + const session = new MemoryStorage(); + const workspaceKeys = ['modiff.studio', 'modiff.flow']; + for (const target of [shared, session]) { + for (const key of workspaceKeys) target.setItem(key, 'previous test workspace'); + target.setItem('modiff.settings', 'preserved preferences'); + } + shared.setItem('studio', 'legacy recovery retained'); + shared.setItem('reactflow', 'legacy flow retained'); + runInNewContext(`(${initialize.toString()})()`, { + Storage: MemoryStorage, + localStorage: shared, + sessionStorage: session, + }); + for (const target of [shared, session]) { + for (const key of workspaceKeys) { + assert.equal(target.getItem(key), null, 'remove prior owned-test workspace bytes'); + target.setItem(key, 'generated graph must stay ephemeral'); + assert.equal(target.getItem(key), null, 'block generated workspace writes in both scopes'); + } + assert.equal(target.getItem('modiff.settings'), 'preserved preferences'); + target.setItem('modiff.settings', 'updated preferences'); + assert.equal(target.getItem('modiff.settings'), 'updated preferences'); + } + assert.equal(shared.getItem('studio'), 'legacy recovery retained'); + assert.equal(shared.getItem('reactflow'), 'legacy flow retained'); +}); + test('canonical generation isolates browser and backend workflow persistence', async () => { const initScripts = []; const routes = []; diff --git a/scripts/h3-image-template.test.mjs b/scripts/h3-image-template.test.mjs new file mode 100644 index 00000000..ba988a10 --- /dev/null +++ b/scripts/h3-image-template.test.mjs @@ -0,0 +1,131 @@ +import assert from 'node:assert/strict'; +import { execFileSync } from 'node:child_process'; +import { readFileSync } from 'node:fs'; +import path from 'node:path'; +import { test } from 'node:test'; +import { createServer } from 'vite'; + +test('the H3 template keeps its generic recipe and identifies its separately approved edit showcase', async () => { + const original = { window: globalThis.window, localStorage: globalThis.localStorage }; + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, value), + }; + globalThis.window = { location: { origin: 'http://127.0.0.1:5191' }, localStorage: globalThis.localStorage }; + const server = await createServer({ + configFile: false, + logLevel: 'silent', + appType: 'custom', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + }); + try { + const { STUDIO_TEMPLATES } = await server.ssrLoadModule('/src/studio/templates.ts'); + const template = STUDIO_TEMPLATES.find((item) => item.id === 'minimax_h3_image_old_town_cat'); + assert.ok(template, 'the requested reusable H3 scene template must exist'); + assert.match(template.prompt, /adult woman/i); + assert.match(template.prompt, /orange tabby cat/i); + assert.match(template.prompt, /old town/i); + assert.equal(template.example.status, 'unverified'); + assert.equal(template.tags.includes('experimental'), true); + assert.equal(template.executionSelection.memoryPolicy, 'custom_experimental'); + for (const field of ['outputPath', 'mediaHash', 'runtimeFingerprint']) + assert.equal(Object.hasOwn(template.example, field), false, field); + const exactness = await server.ssrLoadModule('/src/studio/templateExactness.ts'); + const card = exactness.getTemplateCardMedia(template, null); + assert.equal(card.thumbnailPath, '/assets/minimax-h3-old-town.card-poster.png'); + assert.equal(card.mediaPath, undefined, 'The fallback remains usable without a Gallery manifest.'); + const manifest = JSON.parse(readFileSync(new URL('../public/template-gallery/manifest.json', import.meta.url))); + const entry = exactness.findManifestEntry(template, manifest); + assert.ok(entry, 'The retained H3 review matches the current recipe.'); + assert.equal(entry.qualityReviewStatus, 'approved_reviewed'); + assert.equal(entry.outputPath, '/template-gallery/showcases/h3-old-town-human-cat.webp'); + assert.equal(exactness.getTemplateExampleUiState(template, {}, null, manifest).status, 'reviewed'); + const { getTemplateShowcase } = await server.ssrLoadModule('/src/studio/templateShowcases.ts'); + assert.match(getTemplateShowcase(template.id).mediaPath, /showcases\/h3-emerald-material-transfer\.webp/u); + assert.equal(exactness.getTemplateExampleUiState(template, {}, null, null).status, 'unverified'); + const browser = await server.ssrLoadModule('/src/studio/templateBrowser.ts'); + assert.equal(browser.hasDeclaredExperimentalCreator(template), true); + const quality = await server.ssrLoadModule('/src/studio/templateQuality.ts'); + assert.equal(quality.auditTemplateQuality(template).passed, true); + assert.equal(quality.getTemplateNegativePolicy(template).declarationId, 'minimax-h3-image-no-negative-input'); + assert.equal( + quality.getTemplateNegativePolicy({ + ...template, + executionSelection: { ...template.executionSelection, executionProfileId: 'unreviewed-profile' }, + }).requirement, + 'required', + ); + const backend = path.resolve('../MoDiff'); + const python = + process.env.MODIFF_BACKEND_PYTHON || + path.join(backend, '.venv', process.platform === 'win32' ? 'Scripts/python.exe' : 'bin/python'); + const script = path.resolve('scripts/template-operation-fixtures.py'); + const fixture = JSON.parse( + execFileSync( + process.platform === 'win32' ? python : path.join(backend, 'scripts/with-runtime-env.sh'), + process.platform === 'win32' ? [script, '--mock-cuda'] : [python, script, '--mock-cuda'], + { + cwd: backend, + encoding: 'utf8', + maxBuffer: 64 * 1024 * 1024, + input: JSON.stringify([{ id: template.id, selection: template.executionSelection }]), + stdio: ['pipe', 'pipe', 'pipe'], + }, + ), + ); + const row = fixture.recipes[0]; + const { DEFAULT_STUDIO_FORM, STUDIO_MODEL_PROFILES } = await server.ssrLoadModule('/src/studio/modelProfiles.ts'); + const form = { ...DEFAULT_STUDIO_FORM, ...exactness.getTemplateLockedSettings(template), device: 'cuda:0' }; + const { createTemplateOperationGraph } = await server.ssrLoadModule('/src/studio/templateOperationWorkflow.ts'); + const { unpackVisualOperationGroups } = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const { parseOperationStarter } = await server.ssrLoadModule('/src/workflow/operationStarterRequest.ts'); + const { parseOperationContracts } = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + const operations = parseOperationContracts(fixture.publicPayload.operationContracts, 3); + const starter = parseOperationStarter( + row.starter, + template.executionSelection.pipelineClass, + template.executionSelection.task, + operations, + template.executionSelection, + ); + const capability = fixture.capabilities.find((item) => item.modelType === template.modelType); + assert.ok(capability, 'use the actual published capability and its execution profile'); + const presentation = STUDIO_MODEL_PROFILES[template.modelType]; + assert.deepEqual(presentation.defaultSize, capability.defaultSize); + assert.equal(presentation.defaultDtype, capability.defaultDtype); + assert.deepEqual(presentation.offloadSupport.modes, capability.offloadSupport.modes); + assert.equal(presentation.offloadSupport.default, 'group_disk'); + assert.equal(presentation.autoEligible, false); + assert.equal(presentation.galleryEligible, false); + const graph = createTemplateOperationGraph(template, form, starter, fixture.registry, row.spec, capability); + const flat = unpackVisualOperationGroups(graph).graph; + const stage = (action) => flat.nodes.find((node) => node.data.action === action); + assert.deepEqual( + flat.nodes.map((node) => node.data.action).sort(), + ['ModelsLoader', 'Preview', 'WorkflowDecodeImage', 'WorkflowImageDenoise', 'WorkflowTextEncode'].sort(), + ); + assert.equal(stage('WorkflowTextEncode').data.params.prompt.value, template.prompt); + assert.deepEqual(stage('WorkflowImageDenoise').data.params.seed.value, { value: 11426, isRandom: false }); + assert.equal(stage('WorkflowImageDenoise').data.params.width.value, 2048); + assert.equal(stage('WorkflowImageDenoise').data.params.height.value, 2048); + assert.equal( + stage('WorkflowImageDenoise').data.params.min_generation_area.value ?? + stage('WorkflowImageDenoise').data.params.min_generation_area.default, + 4194304, + ); + for (const field of ['num_inference_steps', 'guidance_scale', 'strength']) + assert.equal(Object.hasOwn(stage('WorkflowImageDenoise').data.params, field), false); + assert.equal(stage('ModelsLoader').data.params.revision.value, '492fd8c4eca666f1085f57e30738c1e0d86b3439'); + assert.equal(stage('ModelsLoader').data.params.offload_mode.value, 'group_disk'); + assert.equal(capability.autoEligible, false); + assert.equal(capability.galleryEligible, false); + } finally { + await server.close(); + for (const [key, value] of Object.entries(original)) { + if (value === undefined) delete globalThis[key]; + else globalThis[key] = value; + } + } +}); diff --git a/scripts/hardware-execution-device.test.mjs b/scripts/hardware-execution-device.test.mjs new file mode 100644 index 00000000..69f8380e --- /dev/null +++ b/scripts/hardware-execution-device.test.mjs @@ -0,0 +1,63 @@ +import assert from 'node:assert/strict'; +import test from 'node:test'; +import { hardwareExecutionDevice } from './release-qualification-policy.mjs'; + +function evidence(profile, device, backend, devices = []) { + const family = String(device).split(':')[0]; + return [ + { runtime_profile: { installed: profile }, packages: { torch: { [`${family}_devices`]: devices } } }, + { execution: { measurement: { device, backend } } }, + ]; +} + +test('a CPU run on a CUDA host cannot qualify the NVIDIA profile', () => { + const args = evidence('nvidia-cuda', 'cpu', 'cpu'); + args[0].packages.torch.cuda_devices = [{ index: 0, name: 'NVIDIA GPU', backend: 'cuda' }]; + assert.throws(() => hardwareExecutionDevice(...args), /does not match/); +}); + +test('record the executed accelerator index, preserving captured metadata', () => { + const devices = [ + { index: 0, name: 'Unused GPU', backend: 'cuda' }, + { index: 1, name: 'Executed GPU', backend: 'cuda', total_memory: 1234 }, + ]; + const args = evidence('nvidia-cuda', 'cuda:1', 'cuda', devices); + const before = structuredClone(args); + assert.equal(hardwareExecutionDevice(...args), devices[1]); + assert.deepEqual(args, before); +}); + +for (const [profile, device, backend] of [ + ['amd-rocm-linux', 'cuda:0', 'rocm'], + ['amd-instinct-rocm-linux', 'cuda:0', 'rocm'], + ['amd-pytorch-windows', 'cuda:0', 'rocm'], + ['intel-xpu', 'xpu:0', 'xpu'], + ['apple-mps', 'mps', 'mps'], +]) { + test(`${profile} uses the actual measured backend`, () => { + const physical = { index: 0, name: 'Physical accelerator', backend }; + assert.equal(hardwareExecutionDevice(...evidence(profile, device, backend, [physical])), physical); + }); +} + +test('CPU qualification has CPU identity even if a host exposes a GPU', () => { + const args = evidence('cpu', 'cpu:0', 'cpu'); + args[0].packages.torch.cuda_devices = [{ index: 0, name: 'Unused GPU', backend: 'cuda' }]; + assert.equal(hardwareExecutionDevice(...args).name, 'cpu'); +}); + +for (const [label, args] of [ + ['missing measurement', [{ runtime_profile: { installed: 'nvidia-cuda' } }, {}]], + ['ROCm cannot establish NVIDIA', evidence('nvidia-cuda', 'cuda:0', 'rocm')], + ['CUDA cannot establish ROCm', evidence('amd-rocm-linux', 'cuda:0', 'cuda')], + ['missing executed index', evidence('nvidia-cuda', 'cuda:1', 'cuda', [{ index: 0, name: 'Other', backend: 'cuda' }])], + [ + 'contradictory physical backend', + evidence('nvidia-cuda', 'cuda:0', 'cuda', [{ index: 0, name: 'Other', backend: 'rocm' }]), + ], + ['unknown profile', evidence('guessed-gpu', 'cuda:0', 'cuda')], + ['malformed index', evidence('nvidia-cuda', 'cuda:-1', 'cuda')], + ['nonzero CPU index', evidence('cpu', 'cpu:1', 'cpu')], +]) { + test(`reject ${label}`, () => assert.throws(() => hardwareExecutionDevice(...args))); +} diff --git a/scripts/hardware-qualification-runtime.mjs b/scripts/hardware-qualification-runtime.mjs new file mode 100644 index 00000000..0ec308de --- /dev/null +++ b/scripts/hardware-qualification-runtime.mjs @@ -0,0 +1,42 @@ +import { backendSourceEvidence, normalizeBackendRuntime } from './live-proof-provenance.mjs'; + +export function assertHardwareRuntimeMatches(observed, health, provenance) { + const reported = typeof observed === 'string' ? observed : observed?.fingerprint; + if ( + Array.isArray(observed) || + typeof reported !== 'string' || + !reported.trim() || + typeof health?.runtime_fingerprint !== 'string' || + !health.runtime_fingerprint.trim() + ) + throw new Error('Gallery run or current backend is missing a runtime fingerprint.'); + + if (observed && typeof observed === 'object' && Object.hasOwn(observed, 'resourceFingerprint')) { + // Health reports the resource domain. Retain the separate execution domain + // and prove its source and normalized runtime; never substitute one hash. + if ( + typeof observed.resourceFingerprint !== 'string' || + !observed.resourceFingerprint.trim() || + health.runtime_fingerprint !== observed.resourceFingerprint + ) { + throw new Error('Current backend runtime does not match the completed gallery run.'); + } + if ( + provenance?.runtime?.reportedFingerprint !== reported || + normalizeBackendRuntime(observed, provenance?.runtime?.deterministic?.settings).lockFingerprint !== + provenance?.runtimeFingerprint + ) { + throw new Error('Gallery execution runtime does not match retained provenance.'); + } + const source = provenance?.runtime?.backendSource; + for (const runtimeFingerprint of [observed, { backendSource: health?.backend_source }]) { + const evidence = backendSourceEvidence({ before: source, after: source, runtimeFingerprint }); + if (evidence.blockers.length) + throw new Error(`Gallery hardware source does not match: ${evidence.blockers.join(' ')}`); + } + return; + } + if (health.runtime_fingerprint !== reported) { + throw new Error('Current backend runtime does not match the completed gallery run.'); + } +} diff --git a/scripts/hardware-qualification.mjs b/scripts/hardware-qualification.mjs index b06bc9c0..5fa1ef60 100644 --- a/scripts/hardware-qualification.mjs +++ b/scripts/hardware-qualification.mjs @@ -3,7 +3,9 @@ import { existsSync, readFileSync, writeFileSync } from 'node:fs'; import { dirname, join, relative, resolve } from 'node:path'; import { fileURLToPath } from 'node:url'; -import { captureQualificationStatus } from './release-qualification-policy.mjs'; +import { captureQualificationStatus, hardwareExecutionDevice } from './release-qualification-policy.mjs'; +import { assertHardwareRuntimeMatches } from './hardware-qualification-runtime.mjs'; +import { validateRunProvenance } from './live-proof-provenance.mjs'; const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url)); const CLIENT_ROOT = resolve(SCRIPT_DIR, '..'); @@ -52,13 +54,13 @@ async function readGalleryEvidence(path) { const response = await fetch(`${backendUrl}/health`, { signal: AbortSignal.timeout(5_000) }); if (!response.ok) throw new Error(`Backend health returned HTTP ${response.status}.`); const health = await response.json(); - if (output.terminalTask.runtimeFingerprint && health.runtime_fingerprint !== output.terminalTask.runtimeFingerprint) { - throw new Error('Current backend runtime does not match the completed gallery run.'); - } + const provenance = readJson(provenancePath); + if (output.terminalTask.task_id !== provenance.taskId) throw new Error('Hardware task and provenance IDs differ.'); + assertHardwareRuntimeMatches(output.terminalTask.runtimeFingerprint, health, provenance); return { status: { step: 'success' }, health, - provenance: readJson(provenancePath), + provenance, provenancePath, websocketEventsPath: output.evidence?.websocketEvents ? required(resolve(output.evidence.websocketEvents), 'Gallery websocket evidence') @@ -78,10 +80,18 @@ async function readQualificationEvidence() { const statusPath = required(join(ARTIFACT_ROOT, 'status.json'), 'Proof status'); const healthPath = required(join(ARTIFACT_ROOT, 'backend-health.json'), 'Backend health'); const provenancePath = required(join(ARTIFACT_ROOT, 'run-provenance.json'), 'Run provenance'); + const health = readJson(healthPath); + const provenance = readJson(provenancePath); + const original = readJson(required(join(ARTIFACT_ROOT, 'run-terminal.json'), 'Original completed task receipt')); + const task = original.task ?? original; + if (task.status !== 'completed' || task.task_id !== provenance.taskId) { + throw new Error('Retained hardware task is not the completed provenance owner.'); + } + assertHardwareRuntimeMatches(task.runtimeFingerprint, health, provenance); return { status: readJson(statusPath), - health: readJson(healthPath), - provenance: readJson(provenancePath), + health, + provenance, provenancePath, websocketEventsPath: existsSync(join(ARTIFACT_ROOT, 'websocket-events.json')) ? join(ARTIFACT_ROOT, 'websocket-events.json') @@ -106,7 +116,10 @@ function coldLoaderDurationSeconds(path) { } function coldLoadTarget(modelType, deviceName) { - if (modelType === 'AceStepAudioPipeline' && /(?:nvidia\s+geforce\s+)?rtx\s*4080/i.test(String(deviceName ?? ''))) { + if ( + ['AceStepAudioPipeline', 'AceStepPipeline'].includes(modelType) && + /(?:nvidia\s+geforce\s+)?rtx\s*4080/i.test(String(deviceName ?? '')) + ) { return { name: 'ACE-Step RTX 4080 cold pipeline load', maxSeconds: 120, @@ -121,18 +134,17 @@ if (status.step !== 'success') throw new Error(`Live proof is not complete; curr if (health.ready !== true || health.runtime_profile?.execution_ready !== true) { throw new Error('Live proof backend did not report an execution-ready managed profile.'); } -if (Number(provenance.schemaVersion) < 2 || (provenance.blockers ?? []).length > 0) { +if ( + Number(provenance.schemaVersion) < 2 || + (provenance.blockers ?? []).length > 0 || + validateRunProvenance(provenance).length > 0 +) { throw new Error('Live proof does not contain a complete v2 qualification receipt.'); } const profileId = health.runtime_profile.installed; const torch = health.packages?.torch ?? {}; -const measuredDevice = String(provenance.execution?.measurement?.device ?? ''); -const device = measuredDevice.startsWith('xpu') - ? (torch.xpu_devices?.[0] ?? {}) - : measuredDevice.startsWith('mps') - ? (torch.mps_devices?.[0] ?? {}) - : (torch.cuda_devices?.[0] ?? {}); +const device = hardwareExecutionDevice(health, provenance); const executionPlan = provenance.graph?.executionPlan ?? {}; const recipeHash = provenance.graph?.executionPlanHash ?? diff --git a/scripts/hardware-qualification.test.mjs b/scripts/hardware-qualification.test.mjs index 4bed08d1..cb05c8b5 100644 --- a/scripts/hardware-qualification.test.mjs +++ b/scripts/hardware-qualification.test.mjs @@ -1,142 +1,314 @@ import assert from 'node:assert/strict'; import { createServer } from 'node:http'; -import { mkdirSync, mkdtempSync, readFileSync, writeFileSync } from 'node:fs'; +import { existsSync, mkdirSync, mkdtempSync, readFileSync, writeFileSync } from 'node:fs'; import { tmpdir } from 'node:os'; import { dirname, join, resolve } from 'node:path'; import { spawn } from 'node:child_process'; import test from 'node:test'; +import { createRunProvenance, sha256Value } from './live-proof-provenance.mjs'; +import { protocolFactoryArguments } from './canonical-provenance-fixtures.mjs'; -const SCRIPT = resolve('scripts/hardware-qualification.mjs'); +const SCRIPT = resolve(process.env.MODIFF_HARDWARE_QUALIFIER_SCRIPT || 'scripts/hardware-qualification.mjs'); -test('completed RTX 4080 gallery evidence records the platform and enforces the ACE-Step cold-load target', async () => { - const root = mkdtempSync(join(tmpdir(), 'modiff-hardware-qualification-')); - const backend = join(root, 'backend'); - const artifact = join(root, 'gallery'); - const provenancePath = join(artifact, 'run.provenance.json'); - const websocketEventsPath = join(artifact, 'run.websocket-events.json'); - const reportPath = join(artifact, 'report.json'); - mkdirSync(dirname(join(backend, 'data', 'qualification', 'release', 'placeholder')), { - recursive: true, - }); - mkdirSync(artifact, { recursive: true }); +// Synthetic values in the actual retained /runs runtimeFingerprint shape. These +// exercise the recorder contract; they are never physical qualification evidence. +const sourceInventory = { gitCommit: 'a'.repeat(40), files: [{ path: 'main.py', sha256: 'b'.repeat(64) }] }; +sourceInventory.fingerprint = sha256Value('backend-source-v1', sourceInventory); +const sourceAttestation = { + schemaVersion: 1, + claim: 'process_start_backend_source_identity', + gitCommit: sourceInventory.gitCommit, + fingerprint: sourceInventory.fingerprint, + fileCount: 1, + capturedAt: '2026-07-28T00:00:00Z', +}; +const structuredFingerprint = { + fingerprint: 'runtime-1', + resourceFingerprint: 'resource-runtime-1', + packages: { torch: '2.9.1' }, + torch: { cuda_available: true }, + work_dir: 'unit-work', + data_dir: 'unit-data', + backendSource: sourceAttestation, + hardware: { peakAccountingVersion: 2 }, +}; - writeFileSync( - provenancePath, - JSON.stringify({ - schemaVersion: 2, - blockers: [], - taskId: 'task-1', - capturedAt: '2026-07-28T03:17:41.922Z', - runtimeFingerprint: 'stable-runtime', - modelRevision: 'model@1234567890123456789012345678901234567890', - mediaHash: 'sha256:decoded-rgba:test', - graph: { - executionPlan: { - modelType: 'AceStepAudioPipeline', - offloadMode: 'none', - quantizationMode: 'none', +for (const { + name, + fingerprint, + healthFingerprint = fingerprint?.resourceFingerprint ?? 'runtime-1', + measuredDevice = 'cuda:0', + measuredBackend = 'cuda', + retained = false, + missingTerminal = false, + terminalId = 'task-1', + modelType = 'AceStepAudioPipeline', + omitColdTiming = false, + coldSeconds = 91.25, + error, +} of [ + { name: 'legacy string', fingerprint: 'runtime-1' }, + { name: 'structured current task', fingerprint: structuredFingerprint }, + { + name: 'actual pipeline class retains the ACE cold-load target', + fingerprint: structuredFingerprint, + modelType: 'AceStepPipeline', + }, + { + name: 'actual pipeline class requires cold-load timing', + fingerprint: structuredFingerprint, + modelType: 'AceStepPipeline', + omitColdTiming: true, + error: /missing cold loader timing evidence/, + }, + { + name: 'actual pipeline class keeps the cold-load limit', + fingerprint: structuredFingerprint, + modelType: 'AceStepPipeline', + coldSeconds: 121, + error: /exceeded 120s/, + }, + { name: 'retained original completed task', fingerprint: structuredFingerprint, retained: true }, + { + name: 'retained status cannot replace original task', + fingerprint: structuredFingerprint, + retained: true, + missingTerminal: true, + error: /Original completed task receipt is missing/, + }, + { + name: 'retained task must own the provenance', + fingerprint: structuredFingerprint, + retained: true, + terminalId: 'other-task', + error: /not the completed provenance owner/, + }, + { + name: 'CPU evidence cannot qualify a GPU host', + fingerprint: structuredFingerprint, + measuredDevice: 'cpu', + measuredBackend: 'cpu', + error: /Executed device\/backend does not match/, + }, + { + name: 'executed GPU index cannot fall back to the first GPU', + fingerprint: structuredFingerprint, + measuredDevice: 'cuda:1', + error: /Executed accelerator is missing/, + }, + { name: 'different legacy runtime', fingerprint: 'runtime-2', error: /does not match/ }, + { + name: 'different structured runtime', + fingerprint: { ...structuredFingerprint, fingerprint: 'runtime-2' }, + healthFingerprint: 'different-resource-runtime', + error: /does not match/, + }, + { name: 'missing task runtime', fingerprint: undefined, error: /missing a runtime fingerprint/ }, + { name: 'null task runtime', fingerprint: null, error: /missing a runtime fingerprint/ }, + { name: 'empty task runtime', fingerprint: '', error: /missing a runtime fingerprint/ }, + { + name: 'resource hash cannot replace runtime hash', + fingerprint: { resourceFingerprint: 'runtime-1' }, + error: /missing a runtime fingerprint/, + }, + { name: 'non-string structured hash', fingerprint: { fingerprint: 123 }, error: /missing a runtime fingerprint/ }, + { name: 'array is not a structured runtime', fingerprint: ['runtime-1'], error: /missing a runtime fingerprint/ }, + { + name: 'missing health runtime', + fingerprint: structuredFingerprint, + healthFingerprint: null, + error: /missing a runtime fingerprint/, + }, +]) + test(`gallery hardware evidence: ${name}`, async () => { + const root = mkdtempSync(join(tmpdir(), 'modiff-hardware-qualification-')); + const backend = join(root, 'backend'); + const artifact = join(root, 'gallery'); + const provenancePath = join(artifact, 'run.provenance.json'); + const websocketEventsPath = join(artifact, 'run.websocket-events.json'); + const reportPath = join(artifact, 'report.json'); + const apiGraph = { + nodes: { + loader: { + module: 'modules.DiffusersAudio', + action: 'LoadPipeline', + params: { + model_id: { value: { source: 'hub', value: 'unit/model' } }, + revision: { value: '1'.repeat(40) }, + }, }, }, - execution: { - resourceCandidateId: 'example-native', - elapsedSeconds: 1.5, - peakMemoryBytes: 1024, + paths: [['loader']], + runtimeHints: { + modelType, + dtype: 'bfloat16', + offloadMode: 'none', + quantizationMode: 'none', }, - }), - ); - writeFileSync( - websocketEventsPath, - JSON.stringify({ - events: [ - { - type: 'executed', - name: 'modules.DiffusersAudio.LoadPipeline', - hasChanged: true, - executionTime: { last: 91.25 }, + }; + const args = protocolFactoryArguments(apiGraph); + Object.assign(args, { + backendSource: sourceInventory, + taskId: 'task-1', + capturedAt: '2026-07-28T03:17:41.922Z', + runtimeFingerprint: + typeof fingerprint?.fingerprint === 'string' && fingerprint?.backendSource + ? fingerprint + : { + ...structuredFingerprint, + fingerprint: typeof fingerprint === 'string' && fingerprint ? fingerprint : 'runtime-1', + }, + executionReceipt: { + runtimeHints: { autoResourceCandidateId: 'example-native' }, + runtimeMeasurement: { + device: measuredDevice, + backend: measuredBackend, + elapsedSeconds: 1.5, + peakAllocatedBytes: 1024, }, - ], - }), - ); + }, + }); + const provenance = createRunProvenance(args); + assert.deepEqual(provenance.blockers, []); + const stableRuntime = provenance.runtimeFingerprint; + mkdirSync(dirname(join(backend, 'data', 'qualification', 'release', 'placeholder')), { + recursive: true, + }); + mkdirSync(artifact, { recursive: true }); - const server = createServer((request, response) => { - if (request.url !== '/health') { - response.writeHead(404).end(); - return; - } - response.setHeader('content-type', 'application/json'); - response.end( + writeFileSync(provenancePath, JSON.stringify(provenance)); + writeFileSync( + websocketEventsPath, JSON.stringify({ - ready: true, - runtime_fingerprint: 'runtime-1', - runtime_profile: { - execution_ready: true, - installed: 'amd-rocm-linux', - support_tier: 'experimental', - manifest_revision: 'revision-1', - }, - python: { platform: 'linux', version: '3.12.1' }, - packages: { - torch: { - version: '2.9.1', - cuda_devices: [{ name: 'NVIDIA GeForce RTX 4080', total_memory: 16 * 1024 ** 3 }], - }, - }, + events: omitColdTiming + ? [] + : [ + { + type: 'executed', + name: 'modules.DiffusersAudio.LoadPipeline', + hasChanged: true, + executionTime: { last: coldSeconds }, + }, + ], }), ); - }); - await new Promise((resolveListen) => server.listen(0, '127.0.0.1', resolveListen)); - const address = server.address(); - writeFileSync( - reportPath, - JSON.stringify({ - server: `http://127.0.0.1:${address.port}`, - results: [ - { - outputs: [ - { - terminalTask: { status: 'completed', runtimeFingerprint: 'runtime-1' }, - evidence: { provenance: provenancePath, websocketEvents: websocketEventsPath }, + const server = createServer((request, response) => { + if (request.url !== '/health') { + response.writeHead(404).end(); + return; + } + response.setHeader('content-type', 'application/json'); + response.end( + JSON.stringify({ + ready: true, + runtime_fingerprint: healthFingerprint, + backend_source: sourceAttestation, + runtime_profile: { + execution_ready: true, + installed: 'nvidia-cuda', + support_tier: 'experimental', + manifest_revision: 'revision-1', + }, + python: { platform: 'linux', version: '3.12.1' }, + packages: { + torch: { + version: '2.9.1', + cuda_devices: [ + { index: 0, name: 'NVIDIA GeForce RTX 4080', backend: 'cuda', total_memory: 16 * 1024 ** 3 }, + ], }, - ], - }, - ], - }), - ); + }, + }), + ); + }); + await new Promise((resolveListen) => server.listen(0, '127.0.0.1', resolveListen)); + const address = server.address(); + if (retained) { + const health = await (await fetch(`http://127.0.0.1:${address.port}/health`)).json(); + writeFileSync(join(artifact, 'websocket-events.json'), readFileSync(websocketEventsPath)); + writeFileSync(join(artifact, 'backend-health.json'), JSON.stringify(health)); + writeFileSync(join(artifact, 'run-provenance.json'), JSON.stringify(provenance)); + writeFileSync(join(artifact, 'status.json'), JSON.stringify({ step: 'success' })); + if (!missingTerminal) + writeFileSync( + join(artifact, 'run-terminal.json'), + JSON.stringify({ + task: { + status: 'completed', + task_id: terminalId, + runtimeFingerprint: fingerprint, + }, + }), + ); + } - try { - const result = await new Promise((resolveRun) => { - const child = spawn(process.execPath, [SCRIPT], { - cwd: resolve('.'), - env: { - ...process.env, - MODIFF_BACKEND_DIR: backend, - MODIFF_GALLERY_REPORT: reportPath, - }, - }); - let stdout = ''; - let stderr = ''; - child.stdout.on('data', (chunk) => { - stdout += chunk; - }); - child.stderr.on('data', (chunk) => { - stderr += chunk; + writeFileSync( + reportPath, + JSON.stringify({ + server: `http://127.0.0.1:${address.port}`, + results: [ + { + outputs: [ + { + terminalTask: { status: 'completed', task_id: 'task-1', runtimeFingerprint: fingerprint }, + evidence: { provenance: provenancePath, websocketEvents: websocketEventsPath }, + }, + ], + }, + ], + }), + ); + const reportBefore = readFileSync(reportPath); + const provenanceBefore = readFileSync(provenancePath); + + try { + const result = await new Promise((resolveRun) => { + const child = spawn(process.execPath, [SCRIPT], { + cwd: resolve('.'), + env: { + ...process.env, + MODIFF_BACKEND_DIR: backend, + MODIFF_GALLERY_REPORT: retained ? '' : reportPath, + MODIFF_LIVE_PROOF_ARTIFACT: retained ? artifact : '', + }, + }); + let stdout = ''; + let stderr = ''; + child.stdout.on('data', (chunk) => { + stdout += chunk; + }); + child.stderr.on('data', (chunk) => { + stderr += chunk; + }); + child.on('close', (status) => resolveRun({ status, stdout, stderr })); }); - child.on('close', (status) => resolveRun({ status, stdout, stderr })); - }); - assert.equal(result.status, 0, result.stderr); - const receipt = JSON.parse( - readFileSync(join(backend, 'data', 'qualification', 'release', 'hardware-qualification.v1.json')), - ).receipts[0]; - assert.equal(receipt.profileId, 'amd-rocm-linux'); - assert.equal(receipt.supportTierAtCapture, 'experimental'); - assert.equal(receipt.status, 'observed'); - assert.equal(receipt.taskId, 'task-1'); - assert.equal(receipt.resourceCandidateId, 'example-native'); - assert.equal(receipt.coldLoaderDurationSeconds, 91.25); - assert.equal(receipt.performanceTarget.maxSeconds, 120); - assert.equal(receipt.performanceQualified, true); - } finally { - await new Promise((resolveClose) => server.close(resolveClose)); - } -}); + assert.deepEqual(readFileSync(reportPath), reportBefore, 'Preserve the complete task runtime object.'); + assert.deepEqual(readFileSync(provenancePath), provenanceBefore, 'Do not rewrite downstream provenance.'); + if (error) { + assert.notEqual(result.status, 0); + assert.match(result.stderr, error); + assert.equal( + existsSync(join(backend, 'data', 'qualification', 'release', 'hardware-qualification.v1.json')), + false, + ); + return; + } + assert.equal(result.status, 0, result.stderr); + const receipt = JSON.parse( + readFileSync(join(backend, 'data', 'qualification', 'release', 'hardware-qualification.v1.json')), + ).receipts[0]; + assert.equal(receipt.profileId, 'nvidia-cuda'); + assert.equal(receipt.supportTierAtCapture, 'experimental'); + assert.equal(receipt.status, 'observed'); + assert.equal(receipt.taskId, 'task-1'); + assert.equal(receipt.resourceCandidateId, 'example-native'); + assert.equal(receipt.runtimeFingerprint, stableRuntime, 'Retain the downstream provenance lock.'); + assert.equal(receipt.peakMemoryBytes, 1024); + assert.equal(receipt.coldLoaderDurationSeconds, 91.25); + assert.equal(receipt.performanceTarget.maxSeconds, 120); + assert.equal(receipt.performanceQualified, true); + } finally { + await new Promise((resolveClose) => server.close(resolveClose)); + } + }); diff --git a/scripts/hardware-runtime-identity.test.mjs b/scripts/hardware-runtime-identity.test.mjs new file mode 100644 index 00000000..3d255a67 --- /dev/null +++ b/scripts/hardware-runtime-identity.test.mjs @@ -0,0 +1,99 @@ +import assert from 'node:assert/strict'; +import test from 'node:test'; +import { assertHardwareRuntimeMatches } from './hardware-qualification-runtime.mjs'; +import { normalizeBackendRuntime, sha256Value } from './live-proof-provenance.mjs'; + +function fixture() { + const source = { gitCommit: 'a'.repeat(40), files: [{ path: 'main.py', sha256: 'b'.repeat(64) }] }; + source.fingerprint = sha256Value('backend-source-v1', source); + const attestation = { + schemaVersion: 1, + claim: 'process_start_backend_source_identity', + gitCommit: source.gitCommit, + fingerprint: source.fingerprint, + fileCount: 1, + capturedAt: '2026-11-03T00:00:00Z', + }; + const observed = { + fingerprint: 'sha256:execution', + resourceFingerprint: 'sha256:resource', + packages: { torch: 'synthetic' }, + torch: { cuda_available: true }, + work_dir: '/mock/work', + data_dir: '/mock/data', + backendSource: attestation, + }; + return [ + observed, + { runtime_fingerprint: observed.resourceFingerprint, backend_source: structuredClone(attestation) }, + { + runtimeFingerprint: normalizeBackendRuntime(observed).lockFingerprint, + runtime: { reportedFingerprint: observed.fingerprint, backendSource: source }, + }, + ]; +} + +test('health resource identity corroborates separate execution identity and exact source', () => { + const args = fixture(); + const before = structuredClone(args); + assert.notEqual(args[0].fingerprint, args[1].runtime_fingerprint); + assert.doesNotThrow(() => assertHardwareRuntimeMatches(...args)); + assert.deepEqual(args, before); +}); + +for (const [name, mutate] of [ + [ + 'a resource hash without execution identity', + ([runtime]) => { + delete runtime.fingerprint; + }, + ], + [ + 'the wrong health hash domain', + ([runtime, health]) => { + health.runtime_fingerprint = runtime.fingerprint; + }, + ], + [ + 'another execution with the same resource hash', + ([runtime]) => { + runtime.fingerprint = 'sha256:other-execution'; + }, + ], + [ + 'changed runtime contents behind matching string hashes', + ([runtime]) => { + runtime.packages.torch = 'other'; + }, + ], + [ + 'another worker source', + ([, health]) => { + health.backend_source.gitCommit = 'c'.repeat(40); + }, + ], + [ + 'missing worker source', + ([, health]) => { + delete health.backend_source; + }, + ], + [ + 'invalid source inventory', + ([, , proof]) => { + proof.runtime.backendSource.files[0].sha256 = 'd'.repeat(64); + }, + ], + [ + 'missing original execution binding', + ([, , proof]) => { + delete proof.runtime.reportedFingerprint; + }, + ], +]) { + test(`reject ${name}`, () => { + const args = fixture(); + mutate(args); + assert.throws(() => assertHardwareRuntimeMatches(...args)); + }); +} diff --git a/scripts/hugging-face-node-library.test.mjs b/scripts/hugging-face-node-library.test.mjs index 0d75969d..d691fcd8 100644 --- a/scripts/hugging-face-node-library.test.mjs +++ b/scripts/hugging-face-node-library.test.mjs @@ -85,16 +85,31 @@ test('one common catalog includes generic nodes, utilities and custom nodes with const entry = (module, action, extra = {}) => nodeCatalogModule.getNodeCatalogEntry({ module, action, label: action, category: 'Test', params: {}, ...extra }); const matches = nodeCatalogModule.nodeCatalogEntryMatchesView; - for (const action of ['ModelsLoader', 'EncodePrompt', 'Denoise', 'DecodeLatents', 'ImageEncode']) { + for (const action of ['ModelsLoader', 'ImageEncode']) { for (const view of ['common', 'advanced', 'experimental', 'all']) assert.equal(matches(entry('modules.ModularDiffusers', action), view), true, action); } - for (const action of ['ReviewedModularWorkflowStep', 'WorkflowKrea2Denoise', 'DynamicBlockNode']) { + for (const action of ['EncodePrompt', 'Denoise', 'DecodeLatents', 'Scheduler']) { + const item = entry('modules.ModularDiffusers', action); + assert.equal(matches(item, 'common'), false); + assert.equal(matches(item, 'common', true), true); + assert.equal(matches(item, 'advanced'), true); + } + for (const [module, action] of [ + ['modules.ImageOperations', 'ProcessImage'], + ['modules.Audio', 'ProcessAudio'], + ['modules.Video', 'ProcessVideo'], + ['modules.Text', 'ProcessText'], + ]) + assert.ok(matches(entry(module, action), 'common')); + for (const action of ['WorkflowKrea2Denoise', 'DynamicBlockNode']) { assert.equal(matches(entry('modules.ModularDiffusers', action), 'common'), false); assert.equal(matches(entry('modules.ModularDiffusers', action), 'experimental'), false); assert.equal(matches(entry('modules.ModularDiffusers', action), 'advanced'), true); assert.equal(matches(entry('modules.ModularDiffusers', action), 'all'), true); } + for (const view of ['common', 'advanced', 'experimental', 'all']) + assert.equal(matches(entry('modules.ModularDiffusers', 'ReviewedModularWorkflowStep'), view), false); for (const module of ['modules.Primitive', 'modules.Text', 'custom.my_nodes']) assert.equal(matches(entry(module, 'TextValue'), 'common'), true); assert.equal(matches(entry('modules.Image', 'Preview'), 'common'), true); @@ -104,7 +119,7 @@ test('one common catalog includes generic nodes, utilities and custom nodes with assert.equal(matches(entry('modules.Image', action, { type: 'group' }), 'common'), false); } for (const [module, actions] of [ - ['modules.ImageFilters', ['Canny', 'UnsharpMask', 'GuidedBlur', 'AdaptiveSharpening', 'GaussianBlur']], + ['modules.ImageFilters', ['Canny']], ['modules.Color', ['Invert']], ['modules.DiffusersImage', ['OutpaintCanvas']], ]) { @@ -114,6 +129,11 @@ test('one common catalog includes generic nodes, utilities and custom nodes with assert.equal(matches(entry(module, action, { type: 'group' }), 'common'), false); } } + for (const action of ['UnsharpMask', 'GuidedBlur', 'AdaptiveSharpening', 'GaussianBlur']) { + assert.equal(matches(entry('modules.ImageFilters', action), 'common'), false); + assert.ok(matches(entry('modules.ImageFilters', action), 'common', true)); + assert.ok(matches(entry('modules.ImageFilters', action), 'advanced')); + } assert.equal(matches(entry('modules.ImageFiltersExperimental', 'Canny'), 'common'), false); assert.equal(matches(entry('modules.DiffusersImage', 'UnreviewedInternal'), 'common'), false); for (const view of ['common', 'advanced', 'experimental', 'all']) @@ -197,10 +217,11 @@ test('runtime node search requires every keyword and preserves exact registry ke 'custom.registry.ImageLoader', 'legacy.Image.Open', 'picture', + 'disk image', ]) { assert.equal(nodeCatalogModule.nodeCatalogEntryMatchesSearch(entry, query), true, query); } - for (const query of ['image audio', 'disk image', 'missing', '---']) { + for (const query of ['image audio', 'disk audio', 'missing', '---']) { assert.equal(nodeCatalogModule.nodeCatalogEntryMatchesSearch(entry, query), false, query); } assert.equal(nodeCatalogModule.nodeCatalogEntryMatchesSearch(entry, ''), true); @@ -454,6 +475,18 @@ test('model capability discovery accepts only versioned app-owned built-in repos ); }); +test('required VAE tiling accepts only an explicit boolean in a model capability', () => { + const parse = (fields) => + nodeStoreModule.parseStudioModelCapabilities({ + schemaVersion: 2, + capabilities: [{ modelType: 'MochiPipeline', modes: ['text_to_video'], ...fields }], + }).capabilities[0]; + assert.equal(parse({}).requiresVaeTiling, undefined); + for (const value of [true, false]) assert.equal(parse({ requiresVaeTiling: value }).requiresVaeTiling, value); + for (const value of ['false', 1, null]) + assert.throws(() => parse({ requiresVaeTiling: value }), /Invalid model-capabilities response/u); +}); + test('model capability discovery remains bounded while admitting catalogs beyond the legacy 128-entry limit', () => { const capability = { modelType: 'BuiltinImageOperation', @@ -1299,10 +1332,10 @@ function payloadWithTransformersTextCluster() { stateKeys: [], components: [ { - name: 'optional_runtime', - type: `huggingface-transformers-peft-5.14.1-0.20.0@sha256:${'9'.repeat(64)}`, - creationMethod: 'explicit_app_setup', - reuseKey: ['optional_runtime'], + name: 'model_runtime', + type: 'modiff.base-model-runtime@sha256:111b6c7b46b8e674c8f5abf2c24b90494ab16c511064b9c3286704de5ba87d95', + creationMethod: 'base_installation', + reuseKey: ['model_runtime'], }, { name: 'model', @@ -1334,7 +1367,7 @@ function payloadWithTransformersTextCluster() { url: '', }, }, - contentHash: 'sha256:32f78d82f1912997b1eaaf43a749627d7ccd07b8805bd66e8abaf21b27c6385a', + contentHash: 'sha256:7df9c6510eb0a7d779a662a9907f318a1a08956d6a094681060e9a23ebb4aff1', }; body.providers = ['diffusers', 'transformers']; body.definitions.push(transformerDefinition); @@ -3465,6 +3498,52 @@ test('Transformers Blocks insert and materialize their exact generic task graph' assert.equal(transformersSection.entries[0].readiness, 'graph_qualified'); assert.equal(transformersSection.entries[0].readinessLabel, 'Graph qualified'); assert.equal(transformersSection.entries[0].insertable, true); + assert.deepEqual(definition.components[0], { + name: 'model_runtime', + type: 'modiff.base-model-runtime@sha256:111b6c7b46b8e674c8f5abf2c24b90494ab16c511064b9c3286704de5ba87d95', + creationMethod: 'base_installation', + reuseKey: ['model_runtime'], + }); + for (const [runtimeDigest, definitionHash] of [ + [ + 'sha256:cc7a00bd6942e5d4e95f6cc8a80efab42b1e26c9c4df9862568cd7b6af15f32c', + 'sha256:e982d1206b2cc0b6154de3e90bedcb8fb012cb9c010406f79c7fe49fd56c8e88', + ], + [ + 'sha256:cc281f8fbae5093d68b4dd963a8f80e32b1589991c8cda97a3ec0f26c9e700db', + 'sha256:ec00d85eae98ff645e1ead4726c55904a9360513b5e21bdc2473fa1a2720a310', + ], + [ + 'sha256:98449d8d9faca739ce5914f6c5ce25cf75b3fabde10c90a1c2818574f362adeb', + 'sha256:af0665a30de76d2a10de99d3fc64ede348efcde4620eb7972e6696673722ed33', + ], + ]) { + const historicalBaseBody = structuredClone(body); + const historicalBaseDefinition = historicalBaseBody.definitions.find( + (candidate) => candidate.id === rawDefinition.id, + ); + historicalBaseDefinition.components[0].type = `modiff.base-model-runtime@${runtimeDigest}`; + historicalBaseDefinition.contentHash = definitionHash; + const historicalBaseEntry = libraryCatalogModule + .buildHuggingFaceCatalogSections(libraryModule.parseHuggingFaceNodeLibrary(historicalBaseBody)) + .find((section) => section.id === 'transformers_cluster_nodes').entries[0]; + assert.equal(historicalBaseEntry.readiness, 'catalog_only', runtimeDigest); + assert.equal(historicalBaseEntry.insertable, false, runtimeDigest); + } + const staleBody = structuredClone(body); + const staleDefinition = staleBody.definitions.find((candidate) => candidate.id === rawDefinition.id); + staleDefinition.components[0] = { + name: 'optional_runtime', + type: `huggingface-transformers-peft-5.14.1-0.20.0@sha256:${'9'.repeat(64)}`, + creationMethod: 'explicit_app_setup', + reuseKey: ['optional_runtime'], + }; + staleDefinition.contentHash = 'sha256:32f78d82f1912997b1eaaf43a749627d7ccd07b8805bd66e8abaf21b27c6385a'; + const staleEntry = libraryCatalogModule + .buildHuggingFaceCatalogSections(libraryModule.parseHuggingFaceNodeLibrary(staleBody)) + .find((section) => section.id === 'transformers_cluster_nodes').entries[0]; + assert.equal(staleEntry.readiness, 'catalog_only'); + assert.equal(staleEntry.insertable, false); const root = clusterGraphModule.createHuggingFaceClusterNode( definition, diff --git a/scripts/hugging-face-runtime-contract.test.mjs b/scripts/hugging-face-runtime-contract.test.mjs index 8ad2fce1..81e1ebf9 100644 --- a/scripts/hugging-face-runtime-contract.test.mjs +++ b/scripts/hugging-face-runtime-contract.test.mjs @@ -29,7 +29,7 @@ test('compatibility UI keeps local actions and has no hosted inference path', () assert.doesNotMatch(websocketHandler, /Hugging Face remote inference/); }); -test('official Hugging Face runtimes remain backend-only and explicitly optional', () => { +test('core Hugging Face runtimes are installed in the backend and discovery never installs packages', () => { const packageManifest = JSON.parse(source('package.json')); const browserDependencies = { ...(packageManifest.dependencies ?? {}), @@ -40,8 +40,9 @@ test('official Hugging Face runtimes remain backend-only and explicitly optional const agentPolicy = source('AGENTS.md'); assert.match(agentPolicy, /official libraries maintained and published by Hugging Face/); - assert.match(agentPolicy, /Transformers is an optional backend runtime/); - assert.match(agentPolicy, /Browsing or opening a\s+template[\s\S]*must never install it/); + assert.match(agentPolicy, /Transformers and PEFT are required backend dependencies/); + assert.match(agentPolicy, /Browsing templates, discovery, and Auto planning must\s+never install packages/); + assert.match(agentPolicy, /base runtime without a separate install\/activate flow/); }); test('optional runtime actions stay generic, explicit, and backend-qualified', () => { @@ -64,20 +65,36 @@ test('optional runtime actions stay generic, explicit, and backend-qualified', ( assert.doesNotMatch(e2eHooks, /e2eOptionalRuntime(?:OverlayIsActive|IsSatisfied)/); }); -test('frontend workflow generation has no library-specific model driver', () => { +test('frontend workflow generation has no library-specific model driver', async () => { const controlledWorkflows = source('src/studio/controlledWorkflows.ts'); const controlledContracts = source('src/studio/controlledWorkflowContracts.ts'); + const operationWorkflows = source('src/studio/templateOperationWorkflow.ts'); assert.match(controlledContracts, /qualityVideoShots: 'modules\.WorkflowControl\.AuthorShotList'/); - assert.match( - controlledWorkflows, - /setParamIfPresent\(nodeId, \['revision'\], adapter\.model\.revision \?\? ''\)/, - 'generic adapter graph construction must forward and clear the backend-owned immutable revision field', - ); - assert.match( - controlledWorkflows, - /setParamIfPresent\(nodeId, \['expected_sha256'\], adapter\.model\.sha256 \?\? ''\)/, - 'generic adapter graph construction must forward and clear the backend-owned content digest field', - ); + assert.match(controlledWorkflows, /loraWorkflowFieldValues\(adapter, index\)/); + assert.match(operationWorkflows, /loraWorkflowFieldValues\(adapter, index\)/); + + const { createServer } = await import('vite'); + const server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + try { + const { loraWorkflowFieldValues } = await server.ssrLoadModule('/src/studio/controlledWorkflowValues.ts'); + const model = { source: 'hub', value: 'owner/adapter', revision: 'a'.repeat(40), sha256: 'b'.repeat(64) }; + const fields = (adapter) => + Object.fromEntries(loraWorkflowFieldValues({ model: adapter }, 0).map(({ fields, value }) => [fields[0], value])); + const pinned = fields(model); + assert.equal(pinned.revision, model.revision); + assert.equal(pinned.expected_sha256, model.sha256); + const unpinned = fields({ source: 'hub', value: 'owner/replacement' }); + assert.equal(unpinned.revision, '', 'replacement must clear the previous immutable revision'); + assert.equal(unpinned.expected_sha256, '', 'replacement must clear the previous content digest'); + } finally { + await server.close(); + } for (const path of [ 'src/studio/controlledWorkflows.ts', diff --git a/scripts/hugging-face-source-supplements.test.mjs b/scripts/hugging-face-source-supplements.test.mjs new file mode 100644 index 00000000..cb779720 --- /dev/null +++ b/scripts/hugging-face-source-supplements.test.mjs @@ -0,0 +1,221 @@ +import assert from 'node:assert/strict'; +import { before, after, test } from 'node:test'; +import { execFileSync } from 'node:child_process'; +import path from 'node:path'; +import { createServer } from 'vite'; + +let server, parser, conditionals, catalog, fixture; +before(async () => { + const backend = process.env.MODIFF_BACKEND_DIR || path.resolve('../MoDiff'); + const python = + process.env.MODIFF_BACKEND_PYTHON || + path.join(backend, '.venv', process.platform === 'win32' ? 'Scripts/python.exe' : 'bin/python'); + fixture = JSON.parse( + execFileSync( + python, + [ + '-B', + '-c', + ` +import json +from modiff.huggingface_node_library import build_huggingface_node_library +from modiff.modular_conditional_contracts import reviewed_modular_conditional_collection, reviewed_modular_conditional_snapshot +print(json.dumps({'mixed': build_huggingface_node_library(), 'legacy': build_huggingface_node_library(include_source_supplements=False), 'conditionals': reviewed_modular_conditional_collection(), 'legacyConditionals': reviewed_modular_conditional_snapshot()})) +`, + ], + { + cwd: backend, + encoding: 'utf8', + timeout: 60_000, + maxBuffer: 48 * 1024 ** 2, + env: { ...process.env, PYTHONDONTWRITEBYTECODE: '1', HF_HUB_OFFLINE: '1' }, + }, + ), + ); + server = await createServer({ + configFile: false, + logLevel: 'silent', + appType: 'custom', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + }); + parser = await server.ssrLoadModule('/src/studio/huggingFaceNodeLibrary.ts'); + conditionals = await server.ssrLoadModule('/src/studio/huggingFaceModularConditionals.ts'); + catalog = await server.ssrLoadModule('/src/studio/huggingFaceNodeCatalog.ts'); +}); +after(async () => { + await server?.close(); +}); + +test('actual mixed-source collection preserves all legacy definitions through the client parser', () => { + const mixed = parser.parseHuggingFaceNodeLibrary(fixture.mixed); + const legacy = parser.parseHuggingFaceNodeLibrary(fixture.legacy); + assert.equal(mixed.schemaVersion, 7); + assert.equal(legacy.schemaVersion, 6); + assert.equal(mixed.diffusersRevision, legacy.diffusersRevision); + assert.equal(mixed.sourceSupplements.length, 2); + const image = mixed.sourceSupplements.find( + (source) => source.runtimeProfileId === 'huggingface-diffusers-h3-image-875373a', + ); + assert.equal(image.libraryRevision, '875373ac7f5856071e345a3e394c74efccc6b9e6'); + const imageDefinitions = mixed.definitions.filter((definition) => image.definitionIds.includes(definition.id)); + assert.deepEqual(imageDefinitions.map((definition) => definition.workflowId).sort(), [ + 'image_conditioned', + 'text2image', + ]); + for (const definition of imageDefinitions) { + assert.equal(definition.integrationStatus, 'reviewed_modular_workflow_route'); + assert.equal(definition.pipelineClass, 'MiniMaxH3ImageModularPipeline'); + assert.equal(definition.executionAdmissions.length, 1); + assert.equal(definition.executionAdmissions[0].status, 'admitted'); + assert.equal(definition.executionAdmissions[0].executable, false); + } + for (const old of legacy.definitions) { + assert.deepEqual( + mixed.definitions.find((item) => item.id === old.id), + old, + old.id, + ); + } + const source = mixed.sourceSupplements[0]; + const added = mixed.definitions.filter((item) => source.definitionIds.includes(item.id)); + assert.equal(added.length, 3); + assert.ok(added.every((item) => item.libraryRevision === source.libraryRevision)); + assert.ok(added.every((item) => item.executionClaim === 'discovery_only')); + assert.ok(added.every((item) => item.schemaVersion === 6)); + assert.equal(Object.hasOwn(legacy, 'sourceSupplements'), false); +}); + +for (const mutation of [ + 'missing', + 'revision', + 'duplicate', + 'membership', + 'unknown', + 'runtime-format', + 'member-version', + 'legacy-envelope', +]) { + test(`mixed-source parsing rejects inconsistent ${mutation} metadata`, () => { + const value = structuredClone(fixture.mixed); + const source = value.sourceSupplements[0]; + if (mutation === 'missing') delete value.sourceSupplements; + else if (mutation === 'revision') source.libraryRevision = value.diffusersRevision; + else if (mutation === 'duplicate') value.sourceSupplements.push(structuredClone(source)); + else if (mutation === 'membership') source.definitionIds.push('diffusers.modular:UnknownPipeline:text2image'); + else if (mutation === 'unknown') source.runModels = true; + else if (mutation === 'runtime-format') source.runtimeProfileId = 'outside/profile'; + else if (mutation === 'member-version') value.definitions[0].schemaVersion = 7; + else { + value.schemaVersion = 6; + delete value.sourceSupplements; + } + assert.throws(() => parser.parseHuggingFaceNodeLibrary(value)); + }); +} + +test('mixed hierarchy selects the exact source while preserving every historical tree', () => { + const mixed = conditionals.parseHuggingFaceModularConditionalSnapshot(fixture.conditionals); + const legacy = conditionals.parseHuggingFaceModularConditionalSnapshot(fixture.legacyConditionals); + const { sourceSupplements, ...base } = mixed; + assert.deepEqual({ ...base, schemaVersion: 1 }, legacy); + const pika = fixture.mixed.sourceSupplements[0]; + const selected = conditionals.modularConditionalSnapshotForSource(mixed, pika.libraryRevision); + assert.equal(selected, sourceSupplements[0]); + assert.deepEqual( + selected.pipelines.map((item) => item.pipelineClass), + ['PikaH3FlexModularPipeline'], + ); + assert.equal(conditionals.modularConditionalSnapshotForSource(mixed, 'f'.repeat(40)), null); + assert.equal(conditionals.modularConditionalSnapshotForSource(legacy, pika.libraryRevision), null); + assert.equal(conditionals.modularConditionalSnapshotForSource(mixed, legacy.diffusersRevision), mixed); + const library = parser.parseHuggingFaceNodeLibrary(fixture.mixed); + const entries = catalog + .buildHuggingFaceCatalogSections(library, mixed) + .find((section) => section.id === 'modular_diffusers_block_nodes').entries; + const contexts = entries + .flatMap((entry) => entry.modularBlockContexts ?? [entry.modularBlockPlacement]) + .filter((context) => context.pipelineClass === selected.pipelines[0].pipelineClass); + assert.equal(contexts.length, 43); + assert.ok(contexts.every((context) => pika.definitionIds.includes(context.definitionId))); +}); + +test('same-name discovery variants are distinguishable without changing their reviewed contracts', async () => { + const audit = await server.ssrLoadModule('/src/studio/nodeLibraryAuditV2.ts'); + const library = parser.parseHuggingFaceNodeLibrary(fixture.mixed); + const snapshot = conditionals.parseHuggingFaceModularConditionalSnapshot(fixture.conditionals); + const expectedLabels = [ + 'Flux3 Set Timesteps · Flux3', + 'Flux3 Set Timesteps · Flux3 Distilled', + 'Helios Additional Inputs · Image To Video', + 'Helios Additional Inputs · Video To Video', + 'Qwen Image Additional Inputs · Edit', + 'Qwen Image Additional Inputs · Edit Inpaint', + 'Qwen Image Additional Inputs · Inpaint', + 'Wan Loop Denoiser · Wan', + 'Wan Loop Denoiser · Wan Image To Video', + ]; + for (const source of [undefined, snapshot]) { + const sections = catalog.buildHuggingFaceCatalogSections(library, source); + const blocks = sections.find(({ id }) => id === 'modular_diffusers_block_nodes').entries; + const collisions = audit + .auditNodeLibraryV2({}, sections) + .sections.flatMap((section) => section.sameLabelDifferentIdentities); + assert.deepEqual(collisions, []); + if (source) { + const labels = new Set(blocks.map(({ label }) => label)); + for (const label of expectedLabels) assert.ok(labels.has(label), label); + } + const placements = new Map( + source + ? [source, ...source.sourceSupplements].flatMap(({ pipelines }) => + pipelines.map(({ pipelineClass, placements }) => [pipelineClass, placements]), + ) + : library.definitions.map(({ id, blockPlacements }) => [id, blockPlacements]), + ); + for (const entry of blocks) { + for (const context of entry.modularBlockContexts) { + assert.ok( + placements.get(source ? context.pipelineClass : context.definitionId).includes(context.placement), + entry.id, + ); + assert.equal(entry.id, `modular-block:${context.placement.blockDefinitionId}`); + } + } + const results = catalog.filterHuggingFaceCatalogSections(sections, 'scheduler flow match euler'); + const schedulers = results.find(({ id }) => id === 'diffusers_component_nodes').entries; + assert.deepEqual( + schedulers.map(({ label }) => label), + [ + 'scheduler — Flow Match Euler Discrete Scheduler · From Configuration', + 'scheduler — Flow Match Euler Discrete Scheduler · From Pretrained', + ], + ); + const componentIds = new Set( + library.definitions.flatMap(({ components }) => + components.map( + ({ name, type, creationMethod, reuseKey }) => + `diffusers.component:${JSON.stringify([name, type, creationMethod, reuseKey])}`, + ), + ), + ); + for (const entry of schedulers) { + assert.equal(entry.insertable, false); + assert.ok(componentIds.has(entry.id)); + } + } +}); + +for (const mutation of ['missing', 'duplicate', 'base-revision', 'nested', 'unknown', 'pipeline-conflict', 'boolean']) { + test(`mixed hierarchy rejects ${mutation} source metadata`, () => { + const value = structuredClone(fixture.conditionals); + if (mutation === 'missing') delete value.sourceSupplements; + else if (mutation === 'duplicate') value.sourceSupplements.push(structuredClone(value.sourceSupplements[0])); + else if (mutation === 'base-revision') value.sourceSupplements[0].diffusersRevision = value.diffusersRevision; + else if (mutation === 'nested') value.sourceSupplements[0] = structuredClone(fixture.conditionals); + else if (mutation === 'unknown') value.sourceSupplements[0].execute = true; + else if (mutation === 'pipeline-conflict') value.sourceSupplements[0].pipelines = structuredClone(value.pipelines); + else value.schemaVersion = true; + assert.throws(() => conditionals.parseHuggingFaceModularConditionalSnapshot(value)); + }); +} diff --git a/scripts/image-edit-source-binding.mjs b/scripts/image-edit-source-binding.mjs new file mode 100644 index 00000000..83d937b4 --- /dev/null +++ b/scripts/image-edit-source-binding.mjs @@ -0,0 +1,126 @@ +// Private join for an unchanged RGB image on the direct Image.Load → Edit wire. +// The caller owns exact recipe, archived file, task and output authorization. +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { coerceResolvedExecutionInputs } from '../src/studio/resolvedExecutionInputs.ts'; +import { stableJsonValue } from './canonical-json.mjs'; +import { verifyNativeLoadedImage } from './native-image-load-evidence.mjs'; + +const literal = (value) => ({ value, source: 'literal' }); + +export function verifyImageEditSourceBinding({ submittedApi, receipt, outputIdentity, loadId, editId }) { + return verifyImageSourceBindings({ + submittedApi, + receipt, + outputIdentity, + consumerId: editId, + action: 'Edit', + task: 'edit_image', + ports: [{ input: 'image', loadId, mode: 'RGB', projectionKind: 'decoded-image-v1' }], + }).inputs.image; +} + +export function verifyImageInpaintSourceBinding({ + submittedApi, + receipt, + outputIdentity, + sourceId, + maskId, + inpaintId, + expectedOwner, +}) { + assert.notEqual(sourceId, maskId, 'Source and mask must be separate Image.Load nodes.'); + const { observed, inputs } = verifyImageSourceBindings({ + submittedApi, + receipt, + outputIdentity, + consumerId: inpaintId, + action: 'Inpaint', + task: 'inpaint', + ports: [ + { input: 'image', loadId: sourceId, mode: 'RGB', projectionKind: 'decoded-image-v1' }, + { input: 'mask_image', loadId: maskId, mode: 'L', projectionKind: 'decoded-mask-v1' }, + ], + }); + const pipeline = submittedApi.nodes[inpaintId].params.pipeline; + const ownerId = pipeline.sourceId; + assert.deepEqual(pipeline, { display: 'input', sourceId: ownerId, sourceKey: 'pipeline' }); + assert.ok(![sourceId, maskId, inpaintId].includes(ownerId)); + const owner = submittedApi.nodes[ownerId]; + assert.equal(owner?.module, 'modules.DiffusersImage'); + assert.equal(owner.action, 'LoadPipeline'); + const observedOwner = observed.nodes.find((row) => row.nodeId === ownerId); + assert.equal(observedOwner?.module, owner.module); + assert.equal(observedOwner.action, owner.action); + const { modelRepo: repo, modelRevision, loaderClass } = expectedOwner; + assert.deepEqual(owner.params.model_id.value, { source: 'hub', value: repo }); + assert.deepEqual(observedOwner.fields.model_id, literal(repo)); + for (const [field, value] of Object.entries({ + mode: 'inpaint', + pipeline_class: loaderClass, + revision: modelRevision, + })) { + assert.equal(owner.params[field].value, value, `Unexpected Inpaint loader ${field}.`); + assert.deepEqual(observedOwner.fields[field], literal(value), `Unexpected native Inpaint loader ${field}.`); + } + const { image: source, mask_image: mask } = inputs; + assert.notEqual(source.sourceFile.sourceValue, mask.sourceFile.sourceValue); + assert.notEqual(source.sourceFile.sha256, mask.sourceFile.sha256); + assert.deepEqual( + [source.decodedImage.width, source.decodedImage.height], + [mask.decodedImage.width, mask.decodedImage.height], + 'Inpaint source and mask must share their original geometry.', + ); + return { source, mask }; +} + +function verifyImageSourceBindings({ submittedApi, receipt, outputIdentity, consumerId, action, task, ports }) { + const consumer = submittedApi.nodes[consumerId]; + assert.equal(consumer?.module, 'modules.DiffusersImage'); + assert.equal(consumer.action, action); + for (const { input, loadId } of ports) { + assert.notEqual(loadId, consumerId, `Load and ${action} must be separate nodes.`); + assert.deepEqual( + consumer.params[input], + { display: 'input', sourceId: loadId, sourceKey: 'image' }, + `${action} must have the declared single Image.Load ${input} wire.`, + ); + } + const observed = coerceResolvedExecutionInputs(receipt, outputIdentity); + assert.ok(observed && !observed.truncated && observed.uncapturedNodeIds.length === 0, 'Incomplete native receipt.'); + assert.deepEqual(observed.mediaEvidenceStatus, { schemaVersion: 1, truncated: false }); + assert.deepEqual(observed.fieldAccountingStatus, { schemaVersion: 1, truncated: false }); + const target = observed.nodes.find((row) => row.nodeId === consumerId); + assert.equal(target?.module, consumer.module); + assert.equal(target.action, consumer.action); + assert.deepEqual(target.omittedFields, {}); + assert.deepEqual(target.fields.executed_task, literal(task)); + const accounting = target.fieldAccounting; + assert.equal(accounting?.complete, true, `${action} input accounting must be complete.`); + const inputs = Object.fromEntries( + ports.map(({ input, loadId, mode, projectionKind }) => [ + input, + verifyOneDecodedSource( + submittedApi.nodes[loadId], + observed.nodes.find((row) => row.nodeId === loadId), + accounting.inputProjections[input], + { loadId, mode, projectionKind, action }, + ), + ]), + ); + return { observed, inputs }; +} + +function verifyOneDecodedSource(load, loaded, projection, { loadId, mode, projectionKind, action }) { + const { sourceFile, decodedImage: decoded } = verifyNativeLoadedImage(load, loaded, mode); + assert.equal(projection.kind, projectionKind); + assert.equal(projection.source, 'connected'); + assert.equal(projection.sourceNodeId, loadId, `${action} recorded a different source node.`); + assert.equal(projection.sourcePortId, 'image', `${action} recorded a different source port.`); + assert.deepEqual(projection.values, decoded, `${action} input pixels or geometry differ from the decoded source.`); + const digest = createHash('sha256') + .update(`${projectionKind}\n${JSON.stringify(stableJsonValue(decoded))}`, 'ascii') + .digest('hex'); + assert.equal(projection.sha256, digest, `${action} image projection digest differs.`); + return { sourceFile, decodedImage: decoded }; +} diff --git a/scripts/image-edit-source-binding.test.mjs b/scripts/image-edit-source-binding.test.mjs new file mode 100644 index 00000000..0a0208fe --- /dev/null +++ b/scripts/image-edit-source-binding.test.mjs @@ -0,0 +1,249 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { readFileSync } from 'node:fs'; +import { before, after, test } from 'node:test'; +import { fileURLToPath } from 'node:url'; +import { createServer } from 'vite'; +import { stableJsonValue } from './canonical-json.mjs'; + +const fixture = JSON.parse( + readFileSync(new URL('../tests/fixtures/image-edit-source-binding.v1.json', import.meta.url), 'utf8'), +); +const decode = (sample) => sample.receipt.nodes.find((row) => row.nodeId === sample.loadId).mediaEvidence; +const accounting = (sample) => sample.receipt.nodes.find((row) => row.nodeId === sample.editId).fieldAccounting; +let server, verify, verifyInpaint; + +before(async () => { + server = await createServer({ + root: fileURLToPath(new URL('..', import.meta.url)), + configFile: false, + server: { middlewareMode: true, ws: false }, + }); + ({ verifyImageEditSourceBinding: verify, verifyImageInpaintSourceBinding: verifyInpaint } = + await server.ssrLoadModule('/scripts/image-edit-source-binding.mjs')); +}); + +after(async () => server?.close()); + +test('joins the actual same-size Load and Edit producer records', () => { + const supplied = structuredClone(fixture); + const { kind, ...decoded } = decode(fixture).outputs.image[0]; + assert.equal(kind, 'image'); + assert.deepEqual(verify(supplied), { sourceFile: decode(fixture).files.file[0], decodedImage: decoded }); + assert.deepEqual(supplied, fixture, 'The private check must preserve original receipts.'); +}); + +for (const [label, replace, error] of [ + [ + 'changed pixels with equal geometry and a valid new projection digest', + (sample) => { + const projection = accounting(sample).inputProjections.image; + projection.values.sha256 = 'b'.repeat(64); + projection.sha256 = createHash('sha256') + .update(`decoded-image-v1\n${JSON.stringify(stableJsonValue(projection.values))}`, 'ascii') + .digest('hex'); + }, + /pixels or geometry/u, + ], + [ + 'wrong projection digest', + (sample) => (accounting(sample).inputProjections.image.sha256 = 'b'.repeat(64)), + /projection digest/u, + ], + [ + 'changed projection geometry with the same byte count', + (sample) => { + const values = accounting(sample).inputProjections.image.values; + [values.width, values.height] = [values.height, values.width]; + }, + /pixels or geometry/u, + ], + [ + 'a graph wire that names the wrong producer port', + (sample) => (sample.submittedApi.nodes[sample.editId].params.image.sourceKey = 'mask'), + /declared single/u, + ], + [ + 'a native projection from another producer', + (sample) => (accounting(sample).inputProjections.image.sourceNodeId = 'wrong-load'), + /different source node/u, + ], + [ + 'a native projection from another port', + (sample) => (accounting(sample).inputProjections.image.sourcePortId = 'mask'), + /different source port/u, + ], + [ + 'multiple decoded images', + (sample) => decode(sample).outputs.image.push(decode(sample).outputs.image[0]), + /single native decoded image/u, + ], + ['multiple files', (sample) => decode(sample).files.file.push(decode(sample).files.file[0]), /single native file/u], + [ + 'a changed original file selection', + (sample) => (sample.submittedApi.nodes[sample.loadId].params.file.value = ['other.png']), + /declared selection/u, + ], + [ + 'an overridden source image', + (sample) => { + const edit = accounting(sample); + const { kind, values, sha256 } = edit.inputProjections.image; + edit.inputProjections.image = { kind, values, sha256, source: 'override' }; + edit.omittedFields = { image: 'unsupported-origin', overrides: 'unsupported-origin' }; + edit.complete = false; + }, + /must be complete/u, + ], + [ + 'an output from another attempt', + (sample) => (sample.outputIdentity.attemptIndex = 1), + /Incomplete native receipt/u, + ], +]) { + test(`rejects ${label}`, () => { + const modified = structuredClone(fixture); + replace(modified); + assert.throws(() => verify(modified), error); + }); +} + +const old = process.env.MODIFF_SD15_EDIT_PAIRED_RECEIPTS; +test('the earlier deliberate-resize producer trace cannot prove original pixels', { skip: !old }, () => { + const [deliberatelyResized] = JSON.parse(readFileSync(old, 'utf8')); + const modified = structuredClone(fixture); + const projection = structuredClone(deliberatelyResized.nodes[0].fieldAccounting.inputProjections.image); + projection.sourceNodeId = modified.loadId; + accounting(modified).inputProjections.image = projection; + assert.throws(() => verify(modified), /pixels or geometry/u); +}); + +function pairedInpaintFixture( + expectedOwner = { + modelRepo: 'stable-diffusion-v1-5/stable-diffusion-v1-5', + modelRevision: '451f4fe16113bff5a5d2269ed5ad43b0592e9a14', + loaderClass: 'StableDiffusionInpaintPipeline', + }, +) { + const value = structuredClone(fixture); + const { submittedApi, receipt, editId: inpaintId, loadId: sourceId } = value; + const maskId = 'mask'; + const target = submittedApi.nodes[inpaintId]; + target.action = 'Inpaint'; + target.params.mask_image = { display: 'input', sourceId: maskId, sourceKey: 'image' }; + const mask = (submittedApi.nodes[maskId] = structuredClone(submittedApi.nodes[sourceId])); + mask.params.file.value = ['@data/images/test-mask.png']; + const literal = (value) => ({ value, source: 'literal' }); + const observed = receipt.nodes.find((row) => row.nodeId === inpaintId); + observed.action = 'Inpaint'; + observed.fields.executed_task = literal('inpaint'); + receipt.summary.executedTask = 'inpaint'; + const loaded = structuredClone(receipt.nodes.find((row) => row.nodeId === sourceId)); + loaded.nodeId = maskId; + const [file] = loaded.mediaEvidence.files.file; + file.sourceValue = mask.params.file.value[0]; + file.sha256 = 'c'.repeat(64); + const [decoded] = loaded.mediaEvidence.outputs.image; + decoded.mode = 'L'; + decoded.byteSize = decoded.width * decoded.height; + decoded.sha256 = 'd'.repeat(64); + loaded.fields.source_modes = literal(['L']); + loaded.fields.source_hashes = literal([file.sha256]); + receipt.nodes.push(loaded); + receipt.ambiguousFields.push('imageSourceHashes', 'imageSourceModes'); + delete receipt.summary.imageSourceHashes; + delete receipt.summary.imageSourceModes; + const { kind: _kind, ...pixels } = decoded; + observed.fieldAccounting.inputProjections.mask_image = { + kind: 'decoded-mask-v1', + values: pixels, + sha256: createHash('sha256') + .update(`decoded-mask-v1\n${JSON.stringify(stableJsonValue(pixels))}`, 'ascii') + .digest('hex'), + source: 'connected', + sourceNodeId: maskId, + sourcePortId: 'image', + }; + const owner = 'model'; + target.params.pipeline = { display: 'input', sourceId: owner, sourceKey: 'pipeline' }; + const module = 'modules.DiffusersImage'; + const action = 'LoadPipeline'; + const { modelRepo, modelRevision, loaderClass } = expectedOwner; + const controls = { + model_id: modelRepo, + mode: 'inpaint', + pipeline_class: loaderClass, + revision: modelRevision, + }; + submittedApi.nodes[owner] = { + module, + action, + params: Object.fromEntries( + Object.entries(controls).map(([key, item]) => [ + key, + { value: key === 'model_id' ? { source: 'hub', value: item } : item }, + ]), + ), + }; + const ownerRecord = { + nodeId: owner, + module, + action, + fields: Object.fromEntries(Object.entries(controls).map(([key, item]) => [key, literal(item)])), + omittedFields: {}, + }; + receipt.nodes.push(ownerRecord); + Object.assign(receipt.summary, { + repo: modelRepo, + executionMode: controls.mode, + modelType: controls.pipeline_class, + revision: controls.revision, + }); + return { submittedApi, receipt, outputIdentity: value.outputIdentity, sourceId, maskId, inpaintId, expectedOwner }; +} + +test('direct SDXL Inpaint rejects an otherwise valid source and mask from an SD 1.5 recipe', () => { + const expectedOwner = { + modelRepo: 'stabilityai/stable-diffusion-xl-base-1.0', + modelRevision: '462165984030d82259a11f4367a4eed129e94a7b', + loaderClass: 'StableDiffusionXLInpaintPipeline', + }; + const sample = pairedInpaintFixture(expectedOwner); + assert.equal(verifyInpaint(sample).mask.decodedImage.mode, 'L'); + assert.throws(() => verifyInpaint({ ...pairedInpaintFixture(), expectedOwner })); +}); + +test('direct Inpaint independently joins the RGB source and grayscale mask to their actual call', () => { + const sample = pairedInpaintFixture(); + const original = structuredClone(sample); + const joined = verifyInpaint(sample); + assert.equal(joined.source.decodedImage.mode, 'RGB'); + assert.equal(joined.mask.decodedImage.mode, 'L'); + assert.equal(joined.mask.sourceFile.sourceValue, '@data/images/test-mask.png'); + assert.deepEqual(sample, original); +}); + +test('direct Inpaint rejects missing, swapped, rehashed or overridden mask evidence and a mismatched model pin', () => { + const inputProjections = (s) => s.receipt.nodes[0].fieldAccounting.inputProjections; + const mutate = [ + (s) => delete inputProjections(s).mask_image, + (s) => (s.submittedApi.nodes[s.inpaintId].params.mask_image.sourceId = s.sourceId), + (s) => (inputProjections(s).mask_image.sourceNodeId = s.sourceId), + (s) => (inputProjections(s).mask_image.kind = 'decoded-image-v1'), + (s) => (inputProjections(s).mask_image.source = 'override'), + (s) => { + const projection = inputProjections(s).mask_image; + projection.values.sha256 = 'e'.repeat(64); + projection.sha256 = createHash('sha256') + .update(`decoded-mask-v1\n${JSON.stringify(stableJsonValue(projection.values))}`, 'ascii') + .digest('hex'); + }, + (s) => (s.receipt.nodes.find((row) => row.nodeId === 'model').fields.revision.value = '0'.repeat(40)), + (s) => (s.outputIdentity.attemptIndex = 1), + ]; + for (const change of mutate) { + const sample = pairedInpaintFixture(); + change(sample); + assert.throws(() => verifyInpaint(sample)); + } +}); diff --git a/scripts/image-full-native-template-candidates.test.mjs b/scripts/image-full-native-template-candidates.test.mjs new file mode 100644 index 00000000..4a615d03 --- /dev/null +++ b/scripts/image-full-native-template-candidates.test.mjs @@ -0,0 +1,834 @@ +import assert from 'node:assert/strict'; +import { execFileSync } from 'node:child_process'; +import { readFile } from 'node:fs/promises'; +import path from 'node:path'; +import { after, before, test } from 'node:test'; +import { createServer } from 'vite'; +import { canonicalAuxiliaryTerminalBinding, verifyNoDeadWorkflowNodes } from './workflow-library-dead-nodes.mjs'; +import { + attachCanonicalAuxiliaryBinding, + parseCanonicalAuxiliarySources, +} from './workflow-library-auxiliary-sources.mjs'; + +const candidateIds = ['flux2_dev_text_to_image', 'cosmos3_super_text_to_image']; +const expected = { + flux2_dev_text_to_image: { + repo: 'black-forest-labs/FLUX.2-dev', + revision: '26afe3a78bb242c0a8bb181dcc8937bb16e5c66c', + pipeline: 'Flux2ModularPipeline', + profile: 'flux2:modular', + seed: 20260905, + actions: ['ModelsLoader', 'EncodePrompt', 'Denoise', 'DecodeLatents', 'Preview'], + }, + cosmos3_super_text_to_image: { + repo: 'nvidia/Cosmos3-Super-Text2Image', + revision: 'daf3d374804be4c512c2135568a7cb95d4341d79', + pipeline: 'Cosmos3OmniModularPipeline', + profile: 'cosmos3-super-text-to-image:official-modular-workflow', + seed: 1143, + actions: [ + 'ModelsLoader', + 'WorkflowCosmos3OmniTextEncode', + 'WorkflowCosmos3OmniDenoise', + 'WorkflowCosmos3OmniDecode', + 'Preview', + ], + }, +}; +let server, publicTemplates, candidates, builder, exactness, groups, operations, starterRequests, flowStore; +let defaults, fixture, backendCaption, backendCaptionBytes; +let readiness, usagePolicies, quality; +let historicalImageIds; +let approvedRetainedImageIds; +const backend = path.resolve('../MoDiff'); + +before(async () => { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, value), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { + location: { origin: 'http://127.0.0.1:5191' }, + localStorage: globalThis.localStorage, + dispatchEvent: () => true, + }; + server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + const module = await server.ssrLoadModule('/src/studio/templates.ts'); + publicTemplates = module.STUDIO_TEMPLATES; + const { APPROVED_RETAINED_BATCH } = await server.ssrLoadModule('/scripts/retained-gallery-recipes.ts'); + approvedRetainedImageIds = APPROVED_RETAINED_BATCH.filter( + ({ template }) => template.example.mediaType === 'image', + ).map(({ template }) => template.id); + const baseline = JSON.parse(await readFile('tests/fixtures/image-template-creator-contracts.v1.json', 'utf8')); + historicalImageIds = new Set(baseline.templates.map((row) => row.templateId)); + candidates = candidateIds.map((id) => module.STUDIO_TEMPLATES.find((item) => item.id === id)); + assert.ok(candidates.every(Boolean)); + builder = await server.ssrLoadModule('/src/studio/templateOperationWorkflow.ts'); + exactness = await server.ssrLoadModule('/src/studio/templateExactness.ts'); + readiness = await server.ssrLoadModule('/src/studio/templateReadiness.ts'); + usagePolicies = await server.ssrLoadModule('/src/studio/modelUsagePolicies.ts'); + quality = await server.ssrLoadModule('/src/studio/templateQuality.ts'); + groups = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + operations = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + starterRequests = await server.ssrLoadModule('/src/workflow/operationStarterRequest.ts'); + ({ useFlowStore: flowStore } = await server.ssrLoadModule('/src/stores/useFlowStore.ts')); + ({ DEFAULT_STUDIO_FORM: defaults } = await server.ssrLoadModule('/src/studio/modelProfiles.ts')); + const python = process.env.MODIFF_BACKEND_PYTHON; + assert.ok(python, 'Use the declared ordinary native CPU environment, not a managed optional overlay.'); + fixture = JSON.parse( + execFileSync(python, [path.resolve('scripts/template-operation-fixtures.py')], { + cwd: backend, + encoding: 'utf8', + maxBuffer: 64 * 1024 * 1024, + input: JSON.stringify(candidates.map((item) => ({ id: item.id, selection: item.executionSelection }))), + env: { ...process.env, PYTHONDONTWRITEBYTECODE: '1' }, + }), + ); + const deviceField = fixture.recipes[0].starter.nodes.find((item) => item.operation.decomposition === 'loader').node + .params.device; + const fixtureDevice = deviceField.value ?? deviceField.default; + assert.equal(typeof fixtureDevice, 'string', 'Use the native fixture device without inventing GPU availability.'); + defaults = { + ...defaults, + device: fixtureDevice, + ...(!fixtureDevice.startsWith('cuda') ? { autoOffload: false, offloadMode: 'none' } : {}), + }; + backendCaptionBytes = await readFile(path.join(backend, 'data/cosmos3-super-t2i-publisher-caption.v1.json')); + backendCaption = JSON.parse(backendCaptionBytes); +}); +after(async () => server?.close()); + +function build(template, options = {}) { + const row = structuredClone(fixture.recipes.find((item) => item.id === template.id)); + row.capability = structuredClone(fixture.capabilities.find((item) => item.modelType === template.modelType)); + if (options.historical) Object.assign(row, structuredClone(fixture.historicalCosmosImage)); + options.mutateRow?.(row); + const contracts = operations.parseOperationContracts( + options.historical ? row.operationContracts : fixture.publicPayload.operationContracts, + fixture.publicPayload.operationContractSchemaVersion, + ); + const starter = starterRequests.parseOperationStarter( + row.starter, + row.starter.pipelineClass, + row.starter.task, + contracts, + options.historical ? {} : template.executionSelection, + ); + const authored = { ...defaults, ...exactness.getTemplateLockedSettings(template) }; + const form = { + ...authored, + ...(!authored.device.startsWith('cuda') ? { autoOffload: false, offloadMode: 'none' } : {}), + ...options.form, + }; + const selectedTemplate = options.historical ? structuredClone(template) : template; + if (options.historical) delete selectedTemplate.executionSelection.authoringRecipeId; + const graph = builder.createTemplateOperationGraph( + selectedTemplate, + form, + starter, + fixture.registry, + row.spec, + row.capability, + ); + const flat = groups.unpackVisualOperationGroups(graph).graph; + const api = flowStore.getState().exportGraph('private-full-image-template-cpu', undefined, { + sourceGraph: graph, + randomizeSeeds: false, + }); + return { row, starter, form, graph, flat, api, nodes: Object.values(api.nodes) }; +} + +test('two experimental Custom recipes extend image coverage while preserving the historical 54 and publishing no proof', () => { + assert.equal( + publicTemplates.filter((item) => item.example?.mediaType === 'image' && historicalImageIds.has(item.id)).length, + 54, + ); + const imageTemplates = publicTemplates.filter((item) => item.example?.mediaType === 'image'); + const retainedEdits = ['lcm_dawn_alpine_lake', 'sana_sprint_monochrome_tiger']; + for (const id of retainedEdits) { + const template = imageTemplates.find((item) => item.id === id); + assert.equal(template?.example.status, 'unverified'); + assert.equal(template.readinessPolicy, 'requires_input'); + } + assert.equal( + imageTemplates.filter(({ id }) => !retainedEdits.includes(id) && !approvedRetainedImageIds.includes(id)).length, + 69, + ); + for (const id of approvedRetainedImageIds) + assert.ok( + imageTemplates.some((template) => template.id === id), + id, + ); + for (const template of candidates) { + assert.equal( + publicTemplates.some((item) => item.id === template.id), + true, + ); + assert.equal(template.example.status, 'unverified'); + assert.equal(template.difficulty, 'advanced'); + assert.equal(template.readinessPolicy, 'runnable'); + assert.equal(template.executionSelection.memoryPolicy, 'custom_experimental'); + assert.equal(template.example.blockReason, undefined); + for (const field of ['outputPath', 'mediaHash', 'runtimeFingerprint', 'verificationTimestamp']) + assert.equal(template.example[field], undefined); + const poster = `/assets/${template.id === 'flux2_dev_text_to_image' ? 'flux2-dev' : 'cosmos3-super'}.card-poster.png`; + assert.equal(template.example.thumbnailPath, poster); + const media = exactness.getTemplateCardMedia(template, null); + assert.equal(media.thumbnailPath, poster); + assert.equal(media.mediaPath, undefined, 'An editorial poster must not become generated output.'); + assert.equal(media.beforePath, undefined); + assert.equal(template.executionSelection.implementation, 'native_stages'); + assert.equal( + template.executionSelection.guidancePolicy, + undefined, + 'Do not copy FLUX.1 true-CFG policy into embedded guidance.', + ); + } +}); + +test('both candidates export ordinary native nodes, exact owners and the original 50-step BF16 recipe', async (t) => { + for (const template of candidates) + await t.test(template.id, () => { + const { nodes, flat, api, form } = build(template); + const recipe = expected[template.id]; + assert.deepEqual(nodes.map((node) => node.action).sort(), [...recipe.actions].sort()); + assert.equal( + nodes.some((node) => ['LoadPipeline', 'Generate', 'DiffusersExecutionRecipe', 'Guider'].includes(node.action)), + false, + ); + const owner = nodes.find((node) => node.action === 'ModelsLoader'); + assert.equal(owner.params.repo_id.value.value, recipe.repo); + assert.equal(owner.params.revision.value, recipe.revision); + assert.equal(owner.params.model_type.value, recipe.pipeline); + const declaredProfiles = fixture.capabilities.flatMap((capability) => capability.executionProfiles ?? []); + const profile = declaredProfiles.find((item) => item.id === recipe.profile); + assert.ok(profile, 'The exact backend execution profile must exist.'); + assert.equal(profile.pipeline_class, recipe.pipeline); + assert.equal(profile.default_repo, recipe.repo); + if (template.id === 'cosmos3_super_text_to_image') + assert.deepEqual(profile.optional_runtime_profiles, ['cosmos-guardrail-0.3.1']); + if (owner.params.execution_profile_id) assert.equal(owner.params.execution_profile_id.value, recipe.profile); + assert.equal(owner.params.dtype.value, 'bfloat16'); + assert.equal(form.quantizationMode, 'none'); + assert.equal(owner.params.quant_config.sourceId, undefined); + assert.equal(owner.params.quant_config.value, undefined); + assert.equal(owner.params.offload_mode.value, 'none'); + assert.equal(owner.params.auto_offload.value, false); + assert.equal(owner.params.trust_remote_code.value, false); + assert.equal(form.resourceMode, 'expert'); + assert.equal(form.randomSeed, false); + const denoise = nodes.find((node) => /Denoise$/u.test(node.action)); + assert.equal(denoise.params.num_inference_steps.value, 50); + assert.equal(denoise.params.guidance_scale.value, 4); + assert.equal(Number(denoise.params.seed.value), recipe.seed); + if (template.id === 'flux2_dev_text_to_image') { + const nativeDenoise = flat.nodes.find((node) => node.data.action === 'Denoise'); + const guidance = nativeDenoise.data.operationAuthoring.operation.ports.find( + (port) => port.name === 'guidance_scale' && port.direction === 'input', + ).semantics.control; + assert.equal(guidance.technique, 'embedded_distilled'); + assert.equal(guidance.compatibilityScope, 'diffusers.flux2.embedded.v1'); + assert.equal(form.maxSequenceLength, 512); + } + const imageDimensions = nodes.find( + (node) => node.params.width?.value !== undefined && node.params.height?.value !== undefined, + ); + assert.equal(imageDimensions.params.width.value, 1024); + assert.equal(imageDimensions.params.height.value, 1024); + assert.ok(flat.nodes.some((node) => operations.operationOwnsModel(node.data.operationAuthoring?.operation))); + assert.equal(Object.values(api.nodes).filter((node) => node.action === 'Preview').length, 1); + }); +}); + +test('Cosmos publisher text comes from the actual backend starter and all safety-stage dependencies remain intact', () => { + const template = candidates.find((item) => item.id === 'cosmos3_super_text_to_image'); + const { api, nodes, flat, row, starter } = build(template); + const prompt = nodes.find((node) => node.action === 'WorkflowCosmos3OmniTextEncode'); + const sourcePrompt = starter.nodes.find((item) => item.node.action === 'WorkflowCosmos3OmniTextEncode').node.params + .prompt; + assert.equal(prompt.params.prompt.value, sourcePrompt.value ?? sourcePrompt.default); + assert.deepEqual(JSON.parse(prompt.params.prompt.value), backendCaption); + assert.deepEqual(Buffer.from(prompt.params.prompt.value, 'utf8'), backendCaptionBytes); + const audit = quality.auditTemplateQuality(template, { prompt: prompt.params.prompt.value }); + assert.equal(audit.promptResolution, 'backend_default'); + assert.equal(audit.passed, true, JSON.stringify(audit.issues)); + assert.equal(template.prompt, '', 'Do not duplicate the publisher caption in frontend recipe data.'); + const promptNode = flat.nodes.find((node) => node.data.action === 'WorkflowCosmos3OmniTextEncode'); + assert.equal(promptNode.data.operationAuthoring.authored?.includes('prompt') ?? false, false); + assert.equal(prompt.params.num_frames.value, 1); + for (const node of nodes.filter((item) => item.module === 'modules.ModularDiffusers')) { + assert.equal(node.params.workflow_id.value, 'text2image'); + if (node.action !== 'ModelsLoader') assert.equal(node.params.pipeline_class.value, 'Cosmos3OmniModularPipeline'); + } + const roleIds = new Map( + row.spec.roles.map(([role, key]) => [ + role, + Object.entries(api.nodes).find(([, node]) => `${node.module}.${node.action}` === key)[0], + ]), + ); + let wires = 0; + for (const [source, output, target, input] of row.spec.edges) { + const param = api.nodes[roleIds.get(target)].params[input]; + assert.equal(param.sourceId, roleIds.get(source)); + assert.equal(param.sourceKey, output); + wires += 1; + } + assert.equal(wires, 6); + assert.equal(api.nodes[roleIds.get('preview')].params.image.sourceId, roleIds.get('decode')); + assert.equal(roleIds.has('afterDecode'), false); + assert.equal( + nodes.some((node) => node.action === 'WorkflowCosmos3OmniAfterDecode'), + false, + ); + assert.equal( + nodes.some((node) => node.action.includes('Distilled')), + false, + ); + assert.equal( + template.requiredBackendCapabilities.includes('modules.ModularDiffusers.WorkflowCosmos3OmniAfterDecode'), + false, + ); +}); + +test('FLUX.2 retains its full concrete product prompt and native blank-negative recipe', () => { + const template = candidates.find((item) => item.id === 'flux2_dev_text_to_image'); + const { nodes } = build(template); + const encoder = nodes.find((node) => node.action === 'EncodePrompt'); + assert.equal(Buffer.byteLength(template.prompt, 'utf8'), 478); + assert.equal(encoder.params.prompt.value, template.prompt); + assert.equal(template.negativePrompt, ''); + const audit = quality.auditTemplateQuality(template); + assert.equal(audit.negative.policy.declarationId, 'flux-native-conditioning'); + assert.equal(audit.passed, true, JSON.stringify(audit.issues)); +}); + +test('backend default is only initial provenance: authored text and later intentional clears export unchanged', () => { + const template = candidates.find((item) => item.id === 'cosmos3_super_text_to_image'); + const authored = 'An intentionally different complete image caption.'; + const { graph, flat, nodes } = build(template, { form: { prompt: authored } }); + const prompt = nodes.find((node) => node.action === 'WorkflowCosmos3OmniTextEncode'); + assert.equal(prompt.params.prompt.value, authored); + const promptNode = flat.nodes.find((node) => node.data.action === 'WorkflowCosmos3OmniTextEncode'); + assert.ok(promptNode.data.operationAuthoring.authored.includes('prompt')); + promptNode.data.params.prompt.value = ''; + // Normal saved graph/export does not reapply a fresh-template policy. + const api = flowStore + .getState() + .exportGraph('intentional-clear', undefined, { sourceGraph: flat, randomizeSeeds: false }); + assert.equal( + Object.values(api.nodes).find((node) => node.action === 'WorkflowCosmos3OmniTextEncode').params.prompt.value, + '', + ); + assert.equal(graph.nodes.length > 0, true); +}); + +test('backend-default preservation fails closed without an exact declared text binding and nonempty starter default', () => { + const template = candidates.find((item) => item.id === 'cosmos3_super_text_to_image'); + const badField = structuredClone(template); + badField.executionSelection.backendDefaultInputs = ['artifact']; + assert.throws(() => build(badField), /needs one declared text binding/u); + assert.throws( + () => + build(template, { + mutateRow: (row) => { + const item = row.starter.nodes.find((node) => node.node.action === 'WorkflowCosmos3OmniTextEncode'); + item.node.params.prompt.value = ''; + item.node.params.prompt.default = ''; + }, + }), + /is missing or already authored/u, + ); + assert.throws( + () => + build(template, { + mutateRow: (row) => row.starter.authoring.bindings.push(['prompt', 'negative_prompt', 'prompt']), + }), + /Invalid operation authoring recipe/u, + ); +}); + +test('an immutable fresh recipe rejects a same-class artifact/revision or missing exact public profile', () => { + const template = candidates.find((item) => item.id === 'cosmos3_super_text_to_image'); + for (const mutation of [ + (row) => { + row.starter.nodes.find((item) => item.node.action === 'ModelsLoader').node.params.repo_id.value = { + source: 'hub', + value: 'nvidia/Cosmos3-Nano', + }; + }, + (row) => { + row.starter.nodes.find((item) => item.node.action === 'ModelsLoader').node.params.revision.value = 'a'.repeat(40); + }, + (row) => { + row.capability.executionProfiles = row.capability.executionProfiles.filter( + (profile) => profile.id !== template.executionSelection.executionProfileId, + ); + }, + ]) + assert.throws(() => build(template, { mutateRow: mutation }), /different immutable template model artifact/u); + for (const mutate of [ + (recipe) => { + recipe.modelArtifact.value = 'nvidia/Cosmos3-Nano'; + }, + (recipe) => { + recipe.modelArtifact.revision = 'a'.repeat(40); + }, + ]) { + const other = structuredClone(template); + mutate(other); + assert.throws(() => build(other), /different immutable template model artifact/u); + } + const withoutMediaRevision = structuredClone(template); + delete withoutMediaRevision.example.modelRevision; + assert.ok(build(withoutMediaRevision).graph.nodes.length); + assert.throws( + () => + build(withoutMediaRevision, { + mutateRow: (row) => { + row.starter.nodes.find((item) => item.node.action === 'ModelsLoader').node.params.revision.value = 'a'.repeat( + 40, + ); + }, + }), + /different immutable template model artifact/u, + ); + withoutMediaRevision.modelArtifact.revision = 'main'; + assert.throws(() => build(withoutMediaRevision), /different immutable template model artifact/u); +}); + +function runnableCandidate(template) { + // A CPU fixture exercising separate Custom admission; it publishes no recipe or proof. + return { + ...structuredClone(template), + difficulty: 'advanced', + readinessPolicy: 'runnable', + example: { ...template.example, status: 'unverified' }, + }; +} + +function customContext(template) { + const capabilities = structuredClone(fixture.capabilities); + const capability = capabilities.find((item) => item.modelType === template.modelType); + const profile = capability.executionProfiles.find( + (item) => item.id === template.executionSelection.executionProfileId, + ); + const optionalId = profile.optional_runtime_profiles?.[0]; + profile.optionalRuntimeRequirement = { + schemaVersion: 1, + delivery: optionalId ? 'optional_overlay' : 'base', + requiredNow: Boolean(optionalId), + profileIds: optionalId ? [optionalId] : [], + executionProfileIds: [profile.id], + state: optionalId ? 'active' : 'base_satisfied', + reason: 'Exact CPU fixture runtime requirement.', + }; + const requirements = + capability.modeRequirements?.[template.mode]?.modelRequirements ?? capability.additionalRequirements ?? []; + const artifact = capability.artifactSelections?.find( + (item) => item.repo === template.modelArtifact.value && item.modes.includes(template.mode), + ); + const baseFiles = + artifact?.downloadFiles ?? + (capability.defaultRepo === template.modelArtifact.value ? capability.downloadFiles : undefined); + const hfCache = [ + { + id: template.modelArtifact.value, + complete: true, + installed: true, + planned_revision: template.modelArtifact.revision, + planned_files: baseFiles ?? [], + }, + ...requirements.map((item) => ({ + id: item.repo, + complete: true, + installed: true, + planned_revision: item.revision, + planned_files: item.downloadFiles ?? [], + })), + ]; + const digest = `sha256:${'a'.repeat(64)}`; + return { + form: { + ...defaults, + ...exactness.getTemplateLockedSettings(template), + mode: template.mode, + modelType: template.modelType, + }, + hfCache, + localModels: [], + modelCacheDiagnostics: { locations: [] }, + nodesRegistry: fixture.registry, + studioModelCapabilities: capabilities, + runtimeStatus: { + ready: true, + runtimeEnvironment: { profileVerified: true, executionReady: true }, + packages: Object.fromEntries( + ['torch', 'diffusers', 'transformers', 'peft'].map((name) => [name, { available: true }]), + ), + missing_required_packages: [], + }, + optionalRuntimeCatalog: optionalId + ? { + profiles: [ + { + id: optionalId, + specDigest: digest, + cutoverReady: true, + contractState: 'qualified', + overlayStatus: 'active', + }, + ], + processLoadStatus: 'active', + activeOptionalRuntimeSpecs: [{ profileId: optionalId, specDigest: digest }], + } + : null, + // A missing Auto proof is deliberately not an installation/runtime waiver. + autoResourcePlan: { + status: 'needs_setup', + readiness: 'expert_only', + issue: { category: 'device' }, + compatibility: { + state: 'expert_only', + severity: 'warning', + code: 'manual_only', + summary: 'Auto unqualified', + detail: 'No Auto fit has been qualified.', + source: 'backend_auto_planner', + }, + }, + }; +} + +test('explicit resolved Custom recipes check exact prerequisites without requiring or claiming an Auto fit', async (t) => { + for (const template of candidates) + await t.test(template.id, () => { + const recipe = runnableCandidate(template), + context = customContext(recipe); + const result = readiness.getTemplateReadiness(recipe, context); + assert.equal(result.status, 'ready'); + assert.equal(result.label, 'Custom · experimental'); + assert.equal(result.tone, 'warning'); + assert.equal(result.compatibility.source, 'backend_execution_profile'); + assert.equal(result.compatibility.code, 'custom_recipe_experimental'); + assert.match(result.summary, /hardware fit and output quality remain experimental/u); + assert.equal(result.issues.length, 0); + assert.deepEqual(result.modelInstallTargets, []); + assert.equal(readiness.getTemplateReadiness(template, context).status, 'ready'); + const blocked = { + ...structuredClone(template), + difficulty: 'blocked', + readinessPolicy: 'planning', + example: { ...template.example, status: 'blocked' }, + }; + assert.equal(readiness.getTemplateReadiness(blocked, context).status, 'planning'); + }); +}); + +test('Custom readiness rejects wrong same-family defaults and preserves exact install revision/files', () => { + const recipe = runnableCandidate(candidates.find((item) => item.id === 'cosmos3_super_text_to_image')); + const context = customContext(recipe); + context.hfCache = context.hfCache.filter((item) => item.id !== recipe.modelArtifact.value); + context.hfCache.push({ id: 'nvidia/Cosmos3-Nano', complete: true, installed: true }); + let result = readiness.getTemplateReadiness(recipe, context); + assert.equal(result.status, 'needs_model'); + assert.deepEqual(result.missingModelRepos, [recipe.modelArtifact.value]); + assert.equal(result.modelInstallTargets[0].revision, recipe.modelArtifact.revision); + assert.equal( + result.modelInstallTargets.some((item) => item.repoId === 'nvidia/Cosmos3-Nano'), + false, + ); + context.hfCache.push({ + id: `${recipe.modelArtifact.value}-other`, + complete: true, + installed: true, + planned_revision: recipe.modelArtifact.revision, + }); + assert.equal(readiness.getTemplateReadiness(recipe, context).status, 'needs_model'); + context.hfCache.push({ + id: recipe.modelArtifact.value, + complete: true, + installed: true, + planned_revision: 'b'.repeat(40), + }); + result = readiness.getTemplateReadiness(recipe, context); + assert.equal(result.modelInstallTargets[0].repair, true); + assert.equal(result.issues.find((item) => item.repoId === recipe.modelArtifact.value).category, 'model_integrity'); + context.hfCache[context.hfCache.length - 1] = { + id: recipe.modelArtifact.value, + complete: false, + installed: false, + planned_revision: recipe.modelArtifact.revision, + repair_required: true, + }; + result = readiness.getTemplateReadiness(recipe, context); + assert.equal(result.modelInstallTargets[0].repair, true); + assert.equal(result.modelInstallTargets[0].actionLabel, 'Repair'); +}); + +test('Custom readiness retains required safety artifacts and their exact reviewed selections', () => { + const recipe = runnableCandidate(candidates.find((item) => item.id === 'cosmos3_super_text_to_image')); + const context = customContext(recipe); + assert.ok(context.hfCache.length >= 2); + const safety = context.hfCache[1]; + const capability = context.studioModelCapabilities.find((item) => item.modelType === recipe.modelType); + const dependency = ( + capability.modeRequirements?.[recipe.mode]?.modelRequirements ?? capability.additionalRequirements + ).find((item) => item.repo === safety.id); + dependency.downloadFiles = ['README.md']; // Exercise the generic declared file contract in this CPU fixture. + safety.planned_files = [...dependency.downloadFiles]; + context.hfCache[1] = { ...safety, planned_revision: 'c'.repeat(40) }; + const result = readiness.getTemplateReadiness(recipe, context); + assert.equal(result.status, 'needs_model'); + assert.equal(result.modelInstallTargets.find((item) => item.repoId === safety.id).repair, true); + assert.equal(result.modelInstallTargets.find((item) => item.repoId === safety.id).revision, safety.planned_revision); + assert.deepEqual(result.modelInstallTargets.find((item) => item.repoId === safety.id).files, safety.planned_files); +}); + +test('recipe preflight reports installed and required component versions from the selected runtime', () => { + const recipe = runnableCandidate(candidates.find((item) => item.id === 'cosmos3_super_text_to_image')); + const context = customContext(recipe); + const profile = context.studioModelCapabilities + .find((item) => item.modelType === recipe.modelType) + .executionProfiles.find((item) => item.id === recipe.executionSelection.executionProfileId); + profile.optionalRuntimeRequirement.state = 'wrong_version'; + profile.optionalRuntimeRequirement.reason = 'optional_runtime_wrong_version'; + context.optionalRuntimeCatalog.profiles[0].packages = [ + { distribution: 'transformers', requiredVersion: '5.17.0', installedVersion: '5.13.0', status: 'wrong_version' }, + ]; + const result = readiness.getTemplateReadiness(recipe, context); + const issue = result.issues.find((item) => item.id === 'custom:optional-runtime'); + assert.equal(result.status, 'needs_backend'); + assert.match(issue.detail, /transformers requires 5\.17\.0.*5\.13\.0/); + assert.doesNotMatch(issue.detail, /wrong_version/); +}); + +test('Custom memory never waives broken base runtime, profile identity, optional activation, or required image inputs', () => { + const template = candidates.find((item) => item.id === 'cosmos3_super_text_to_image'); + for (const mutate of [ + (recipe, context) => { + context.runtimeStatus.runtimeEnvironment.profileVerified = false; + }, + (recipe, context) => { + context.runtimeStatus.runtimeEnvironment.executionReady = false; + }, + (recipe, context) => { + context.runtimeStatus.packages.transformers.available = false; + }, + (recipe, context) => { + context.runtimeStatus.packages.peft.available = false; + }, + (recipe, context) => { + context.runtimeStatus.missing_required_packages = ['transformers']; + }, + (recipe, context) => { + context.studioModelCapabilities = []; + }, + (recipe) => { + recipe.modelArtifact.value = 'nvidia/Cosmos3-Nano'; + }, + (recipe) => { + recipe.modelArtifact.revision = 'd'.repeat(40); + }, + (recipe, context) => { + context.optionalRuntimeCatalog = null; + }, + (recipe, context) => { + context.optionalRuntimeCatalog.processLoadStatus = 'restart_required'; + }, + (recipe, context) => { + context.optionalRuntimeCatalog.activeOptionalRuntimeSpecs[0].specDigest = 'wrong'; + }, + (recipe, context) => { + const capability = context.studioModelCapabilities.find((item) => item.modelType === recipe.modelType); + const profile = capability.executionProfiles.find( + (item) => item.id === recipe.executionSelection.executionProfileId, + ); + profile.optionalRuntimeRequirement.state = 'staged'; + }, + ]) { + const recipe = runnableCandidate(template), + context = customContext(recipe); + mutate(recipe, context); + const result = readiness.getTemplateReadiness(recipe, context); + assert.equal(result.status, 'needs_backend'); + assert.equal(result.decision.state, 'blocked'); + } + const recipe = runnableCandidate(template), + context = customContext(recipe); + context.form.resourceMode = 'auto'; + assert.equal(readiness.getTemplateReadiness(recipe, context).status, 'needs_setup'); + recipe.inputRequirements = { referenceImages: 1 }; + context.form.resourceMode = 'expert'; + assert.equal(readiness.getTemplateReadiness(recipe, context).status, 'needs_input'); +}); + +test('template terms identify the declared full checkpoint rather than a static family default', () => { + const template = structuredClone(candidates[0]); + const policy = Object.values(usagePolicies.MODEL_USAGE_POLICIES).find((item) => + item.repository.includes('FLUX.1-dev'), + ); + assert.ok(policy, 'Use an existing reviewed policy; do not invent terms for the private new candidates.'); + template.modelArtifact = { source: 'hub', value: policy.repository, revision: 'd'.repeat(40) }; + const selected = usagePolicies.templateUsagePolicies(template).find((item) => item.repository === policy.repository); + assert.equal(selected?.revision, template.modelArtifact.revision); + const cosmosPolicies = usagePolicies.templateUsagePolicies(candidates[1]); + assert.ok( + cosmosPolicies.some((item) => item.repository === 'nvidia/Cosmos-Guardrail1' && item.acknowledgementRequired), + ); +}); + +test('fresh Cosmos image graph has no auxiliary action stage or unused branch', async () => { + const template = candidates.find((item) => item.id === 'cosmos3_super_text_to_image'); + const built = build(template); + const workflow = { id: `${template.modelType}:${template.mode}`, modelType: template.modelType, mode: template.mode }; + verifyNoDeadWorkflowNodes(workflow, built.flat); + assert.deepEqual(built.row.spec.auxiliaryTerminalRoles, []); + assert.equal( + built.flat.nodes.some((node) => node.data.action === 'WorkflowCosmos3OmniAfterDecode'), + false, + ); + const graph = structuredClone(built.flat); + graph.nodes.push({ id: 'stray', data: { module: 'modules.Image', action: 'Load', params: {} } }); + assert.throws(() => verifyNoDeadWorkflowNodes(workflow, graph), /contains isolated nodes: stray/); +}); + +test('historical native Cosmos image workflows keep their declared auxiliary terminal and reject every unused branch', async (t) => { + const template = candidates.find((item) => item.id === 'cosmos3_super_text_to_image'); + const built = build(template, { historical: true }); + const workflow = { id: `${template.modelType}:${template.mode}`, modelType: template.modelType, mode: template.mode }; + const source = { + executionSpec: built.row.spec, + operationContracts: operations.parseOperationContracts( + built.row.operationContracts, + fixture.publicPayload.operationContractSchemaVersion, + ), + }; + assert.throws(() => verifyNoDeadWorkflowNodes(workflow, built.flat), /outside every output dependency path/); + workflow.auxiliaryTerminalBinding = canonicalAuxiliaryTerminalBinding(workflow, built.flat, source); + assert.equal(workflow.auxiliaryTerminalBinding.executionSpecId, built.row.spec.id); + assert.equal(workflow.auxiliaryTerminalBinding.executionSpecContentHash, built.row.spec.contentHash); + assert.equal(workflow.auxiliaryTerminalBinding.terminals.length, 1); + verifyNoDeadWorkflowNodes(workflow, built.flat, source); + assert.throws(() => verifyNoDeadWorkflowNodes(workflow, built.flat), /authoritative.*source contract/); + const byAction = (graph, action) => graph.nodes.find((node) => node.data.action === action); + const cases = { + 'missing mandatory post-processing': (graph) => { + graph.nodes = graph.nodes.filter((node) => node.data.action !== 'WorkflowCosmos3OmniAfterDecode'); + }, + 'missing SDK decode-state dependency': (graph) => { + const id = byAction(graph, 'WorkflowCosmos3OmniAfterDecode').id; + graph.edges = graph.edges.filter((edge) => edge.target !== id || edge.targetHandle !== 'state_in'); + }, + 'wrong model owner class': (graph) => { + byAction(graph, 'ModelsLoader').data.params.model_type.value = 'OtherModularPipeline'; + }, + 'wrong SDK stage': (graph) => { + byAction(graph, 'WorkflowCosmos3OmniAfterDecode').data.params.block_path.value = 'denoise'; + }, + 'wrong workflow context': (graph) => { + byAction(graph, 'WorkflowCosmos3OmniAfterDecode').data.params.workflow_id.value = 'text2video'; + }, + 'forged operation metadata': (graph) => { + byAction(graph, 'WorkflowCosmos3OmniAfterDecode').data.operationAuthoring.operation.operationId = + 'diffusion.denoise'; + }, + 'duplicate declared stage': (graph) => { + graph.nodes.push({ ...structuredClone(byAction(graph, 'WorkflowCosmos3OmniAfterDecode')), id: 'extra-stage' }); + }, + 'invented AfterDecode image port': (graph) => { + const preview = byAction(graph, 'Preview'); + const edge = graph.edges.find((row) => row.target === preview.id && row.targetHandle === 'image'); + edge.source = byAction(graph, 'WorkflowCosmos3OmniAfterDecode').id; + edge.sourceHandle = 'image'; + }, + 'extra dependency into auxiliary terminal': (graph) => { + graph.edges.push({ + id: 'extra-input', + source: byAction(graph, 'Preview').id, + sourceHandle: 'output', + target: byAction(graph, 'WorkflowCosmos3OmniAfterDecode').id, + targetHandle: 'action', + }); + }, + 'duplicate source for required SDK input': (graph) => { + const edge = graph.edges.find( + (row) => row.target === byAction(graph, 'WorkflowCosmos3OmniDenoise').id && row.targetHandle === 'state_in', + ); + graph.edges.push({ ...edge, id: 'duplicate-input' }); + }, + 'undeclared isolated branch': (graph) => { + graph.nodes.push({ id: 'stray', data: { module: 'modules.Image', action: 'Load', params: {} } }); + }, + 'disabled mandatory post-processing': (graph) => { + byAction(graph, 'WorkflowCosmos3OmniAfterDecode').data.uiState = { disabled: true }; + }, + }; + for (const [name, mutate] of Object.entries(cases)) + await t.test(name, () => { + const graph = structuredClone(built.flat); + mutate(graph); + assert.throws(() => verifyNoDeadWorkflowNodes(workflow, graph, source)); + }); + await t.test('forged manifest terminal, source identity and absent binding stay closed', () => { + const forged = structuredClone(workflow); + forged.auxiliaryTerminalBinding.terminals.push({ role: 'stray', nodeId: 'stray' }); + assert.throws(() => verifyNoDeadWorkflowNodes(forged, built.flat, source), /metadata differs/); + const wrongSource = structuredClone(source); + wrongSource.executionSpec.mode = 'text_to_video'; + assert.throws(() => verifyNoDeadWorkflowNodes(workflow, built.flat, wrongSource), /source contract/); + const changed = structuredClone(workflow); + changed.auxiliaryTerminalBinding.executionSpecContentHash = 'studio-spec-v1-ffffffff'; + assert.throws(() => verifyNoDeadWorkflowNodes(changed, built.flat, source), /metadata differs/); + }); + const flux = build(candidates.find((item) => item.id === 'flux2_dev_text_to_image')); + verifyNoDeadWorkflowNodes({ id: 'unchanged-full-flux' }, flux.flat); +}); + +test('canonical generator and verifier parse the same independent source before emitting an auxiliary binding', async () => { + const template = candidates.find((item) => item.id === 'cosmos3_super_text_to_image'); + const built = build(template, { historical: true }); + const historicalPayload = structuredClone(fixture.publicPayload); + const historicalCapability = historicalPayload.capabilities.find((item) => item.modelType === template.modelType); + historicalCapability.studioExecutionSpecs = historicalCapability.studioExecutionSpecs.map((spec) => + spec.id === built.row.spec.id ? structuredClone(built.row.spec) : spec, + ); + historicalPayload.operationContracts = historicalPayload.operationContracts.filter( + (operation) => !(operation.pipelineClass === 'Cosmos3OmniModularPipeline' && operation.task === 'text_to_image'), + ); + historicalPayload.operationContracts.push(...built.row.operationContracts); + const selected = [fixture.capabilities.find((item) => item.modelType === template.modelType)]; + const parsed = await parseCanonicalAuxiliarySources(historicalPayload, selected, server); + const source = parsed.sources.get(`${template.modelType}|${template.mode}`); + assert.ok(source); + assert.equal(parsed.sources.has('Flux2ModularPipeline|text_to_image'), false); + const workflow = { id: `${template.modelType}:${template.mode}`, modelType: template.modelType, mode: template.mode }; + attachCanonicalAuxiliaryBinding(workflow, built.graph, parsed); + assert.ok(workflow.auxiliaryTerminalBinding); + verifyNoDeadWorkflowNodes(workflow, parsed.unpackGraph(built.graph), source); + const changed = structuredClone(historicalPayload); + changed.capabilities.find((item) => item.modelType === template.modelType).studioExecutionSpecs[0].contentHash = + 'studio-spec-v1-ffffffff'; + await assert.rejects( + parseCanonicalAuxiliarySources(changed, selected, server), + /Invalid Studio execution specification/, + ); + const unrelated = await parseCanonicalAuxiliarySources( + fixture.publicPayload, + [{ modelType: 'Flux2ModularPipeline' }], + server, + ); + assert.equal(unrelated.sources.size, 0); + assert.equal(unrelated.unpackGraph(built.graph), built.graph); + const ordinary = { id: 'ordinary', modelType: 'Flux2ModularPipeline', mode: 'text_to_image' }; + const before = structuredClone(ordinary); + assert.equal(attachCanonicalAuxiliaryBinding(ordinary, built.graph, unrelated), ordinary); + assert.deepEqual(ordinary, before); +}); diff --git a/scripts/image-model-usage-policies.test.mjs b/scripts/image-model-usage-policies.test.mjs new file mode 100644 index 00000000..ac026942 --- /dev/null +++ b/scripts/image-model-usage-policies.test.mjs @@ -0,0 +1,156 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { readFile } from 'node:fs/promises'; +import { resolve } from 'node:path'; +import { after, before, test } from 'node:test'; +import { createServer } from 'vite'; + +let server, policies, profiles, templates, artifactCatalog, captionProvenance; +const backend = resolve(process.env.MODIFF_BACKEND_DIR || '../MoDiff'); + +before(async () => { + globalThis.localStorage = { getItem: () => null, setItem() {}, removeItem() {} }; + globalThis.window = { location: { origin: 'http://localhost' }, localStorage: globalThis.localStorage }; + server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + policies = await server.ssrLoadModule('/src/studio/modelUsagePolicies.ts'); + profiles = await server.ssrLoadModule('/src/studio/modelProfiles.ts'); + templates = await server.ssrLoadModule('/src/studio/templates.ts'); + artifactCatalog = JSON.parse(await readFile(resolve(backend, 'data/model-artifact-catalog.json'), 'utf8')); + captionProvenance = JSON.parse( + await readFile(resolve(backend, 'data/cosmos3-super-t2i-publisher-caption-provenance.v1.json'), 'utf8'), + ); +}); + +after(async () => server?.close()); + +test('Qwen Image 2.1 Turbo requires acknowledgement of its pinned public checkpoint', () => { + const repository = 'Qwen/Qwen-Image-2.1-Turbo'; + const entry = artifactCatalog.models.find(({ modelType }) => modelType === 'QwenImage21TurboPipeline'); + assert.equal(entry.baseRepo, repository); + assert.equal(entry.baseLicense, 'qwen-research'); + const [policy] = policies.acknowledgementRequiredForRepository(repository, entry.baseRevision); + assert.equal(policy.repository, repository); + assert.equal(policy.useScope, 'license_review_required'); + assert.equal(policy.access, 'public'); + assert.equal(policy.reviewedRevision, 'fc13ba1986fcb905854dc8de2f52eee395f49b5b'); + assert.equal(policy.reviewedRevision, entry.baseRevision); + assert.equal(policy.termsUrl, `https://huggingface.co/${repository}/blob/${entry.baseRevision}/LICENSE`); + assert.match(policy.shortSummary, /non-commercial research and evaluation/u); + assert.equal(policies.repositoryRequiresHuggingFaceGate(repository), false); + assert.deepEqual(policies.acknowledgementRequiredForRepository('Qwen/Qwen-Image-2.1'), []); + const key = policies.usagePolicyAcknowledgementKey([policy]); + assert.ok(key); + assert.notEqual(key, policies.usagePolicyAcknowledgementKey([{ ...policy, revision: 'a'.repeat(40) }])); +}); + +test('LTX-2.5 Full has separate revision-bound model terms and gated access', () => { + const repo = 'Lightricks/LTX-2.5-Diffusers'; + const policy = policies.usagePolicyForRepository(repo); + assert.equal(policy.reviewedRevision, '4791a1100e0cf97f7ed5c55c12dd71dce13f9dd3'); + assert.equal(policy.useScope, 'license_review_required'); + assert.equal(policy.acknowledgementRequired, true); + assert.equal(policy.access, 'huggingface_gated'); + assert.equal(policies.repositoryRequiresHuggingFaceGate(repo), true); + assert.match(policy.termsUrl, /c1b4675863c07c59c92e502446cccdaedbe5889c\/LICENSE-2_x$/); + const exact = policies.acknowledgementRequiredForRepository(repo, policy.reviewedRevision); + assert.equal(exact.length, 1); + assert.notEqual( + policies.usagePolicyAcknowledgementKey(exact), + policies.usagePolicyAcknowledgementKey([{ ...exact[0], revision: 'a'.repeat(40) }]), + ); +}); + +test('Hunyuan 720p acknowledgements bind each full checkpoint independently of the 480p recipes', () => { + for (const [repository, revision] of [ + ['hunyuanvideo-community/HunyuanVideo-1.5-Diffusers-720p_t2v', 'f4dbc4a1efa4ac8ea56680cdf79d9f455105e814'], + ['hunyuanvideo-community/HunyuanVideo-1.5-Diffusers-720p_i2v', 'dcf088ef4e420dd54bc25930ee810bb6613dfcb5'], + ]) { + const policy = policies.usagePolicyForRepository(repository); + assert.ok(policy); + assert.equal(policy.reviewedRevision, revision); + assert.equal(policy.acknowledgementRequired, true); + assert.equal(policy.useScope, 'license_review_required'); + assert.match(policy.shortSummary, /territory exclusions/); + assert.match(policy.shortSummary, /100M/); + assert.equal(policy.reviewedAt, '2026-11-17'); + const exact = policies.acknowledgementRequiredForRepository(repository, revision); + assert.equal(exact.length, 1); + assert.notEqual( + policies.usagePolicyAcknowledgementKey(exact), + policies.usagePolicyAcknowledgementKey([{ ...exact[0], revision: 'a'.repeat(40) }]), + ); + } +}); + +test('full FLUX2 dev terms are distinct from FLUX1 and bind to the reviewed artifact', () => { + const policy = policies.usagePolicyForRepository(profiles.FLUX2_DEV_REPO); + const pin = artifactCatalog.repositoryPins.find((item) => item.repo === profiles.FLUX2_DEV_REPO); + assert.equal(policy.reviewedRevision, pin.revision); + assert.equal(pin.license, 'flux-non-commercial-license'); + assert.equal(policy.acknowledgementRequired, true); + assert.equal(policy.useScope, 'license_review_required'); + assert.equal(policy.access, 'huggingface_gated'); + assert.match(policy.shortSummary, /v2\.1/); + assert.match(policy.shortSummary, /non-commercial, non-production/); + assert.match(policy.shortSummary, /filtering or manual review/); + assert.doesNotMatch(policy.shortSummary, /FLUX\.1/); + assert.equal(policy.termsUrl, `https://huggingface.co/${pin.repo}/blob/${pin.revision}/LICENSE.md`); + assert.notEqual(policy.id, policies.usagePolicyForRepository(profiles.FLUX_DEV_REPO).id); + assert.equal(policies.repositoryRequiresHuggingFaceGate(pin.repo), true); +}); + +test('Cosmos Super uses its public OpenMDW terms while mandatory Guardrail keeps separate gated terms', async () => { + const policy = policies.usagePolicyForRepository(profiles.COSMOS3_SUPER_T2I_REPO); + const pin = artifactCatalog.repositoryPins.find((item) => item.repo === policy.repository); + assert.equal(policy.reviewedRevision, pin.revision); + assert.equal(policy.reviewedRevision, captionProvenance.revision); + assert.equal(pin.license, 'openmdw-1.1'); + assert.equal(policy.termsUrl, captionProvenance.publisherLicenseUrl); + const license = await readFile(resolve(backend, captionProvenance.licenseFile)); + assert.equal(createHash('sha256').update(license).digest('hex'), captionProvenance.licenseFileSha256); + assert.equal(policy.access, 'public'); + assert.equal(policy.useScope, 'commercial_allowed'); + assert.equal(policy.acknowledgementRequired, true); + assert.equal(policies.repositoryRequiresHuggingFaceGate(pin.repo), false); + assert.match(policy.shortSummary, /license and applicable origin notices/); + assert.match(policy.shortSummary, /no output-use restrictions/); + const guardrail = policies.usagePolicyForRepository(profiles.COSMOS3_GUARDRAIL_REPO); + assert.equal(guardrail.access, 'huggingface_gated'); + assert.equal(guardrail.useScope, 'license_review_required'); + assert.notEqual(policy.id, guardrail.id); + assert.notEqual(policy.termsUrl, guardrail.termsUrl); +}); + +test('exact full-model template/install acknowledgements match and change on artifact or policy drift', () => { + for (const id of ['flux2_dev_text_to_image', 'cosmos3_super_text_to_image']) { + const template = templates.STUDIO_TEMPLATES.find((item) => item.id === id); + assert.ok(template); + assert.equal(template.example.status, 'unverified'); + assert.equal( + templates.STUDIO_TEMPLATES.some((item) => item.id === id), + true, + ); + const required = policies.acknowledgementRequiredForTemplate(template); + const base = required.find((item) => item.repository === template.modelArtifact.value); + assert.ok(base, 'Create must review the exact selected full model, not the static family default.'); + assert.equal(base.revision, template.modelArtifact.revision); + const install = policies.acknowledgementRequiredForRepository(base.repository, base.revision); + const key = policies.usagePolicyAcknowledgementKey([base]); + assert.equal(key, policies.usagePolicyAcknowledgementKey(install)); + assert.notEqual(key, policies.usagePolicyAcknowledgementKey([{ ...base, revision: 'f'.repeat(40) }])); + assert.notEqual(key, policies.usagePolicyAcknowledgementKey([{ ...base, policyVersion: 'changed' }])); + if (id === 'cosmos3_super_text_to_image') + assert.ok(required.some((item) => item.repository === profiles.COSMOS3_GUARDRAIL_REPO)); + } + assert.ok( + policies + .acknowledgementRequiredForModelRun({ modelType: 'Flux2ModularPipeline', mode: 'text_to_image' }) + .some((item) => item.repository === profiles.FLUX2_DEV_REPO), + ); +}); diff --git a/scripts/image-stage-groups.test.mjs b/scripts/image-stage-groups.test.mjs new file mode 100644 index 00000000..408e380e --- /dev/null +++ b/scripts/image-stage-groups.test.mjs @@ -0,0 +1,920 @@ +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; +import { canonicalGraphIdentity } from './live-proof-provenance.mjs'; +import path from 'node:path'; +import { after, before, test } from 'node:test'; +import { createServer } from 'vite'; + +let server, authoring, groups, guidance, shared, adapters, runtime; +before(async () => { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, value), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { + dispatchEvent: () => true, + location: { origin: 'http://127.0.0.1:5191' }, + localStorage: globalThis.localStorage, + }; + server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + authoring = await server.ssrLoadModule('/src/workflow/operationAuthoring.ts'); + groups = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + guidance = await server.ssrLoadModule('/src/workflow/guidanceNodeFields.ts'); + shared = await server.ssrLoadModule('/src/workflow/operationSharedInputs.ts'); + adapters = await server.ssrLoadModule('/src/workflow/modelSetupAdapters.ts'); + runtime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); +}); +after(async () => server?.close()); + +test('saved text generators expose sampling filters only when they can have an effect', async () => { + const { graphNodeControlParams } = await server.ssrLoadModule('/src/studio/graphNodeControls.ts'); + const sampleKeys = ['temperature', 'top_k', 'top_p']; + for (const [folder, filename, action] of [ + ['hugging-face-text-generation-model', 'text-generation', 'GenerateText'], + ['hugging-face-image-text-to-text-model', 'image-to-text', 'GenerateImageVideoText'], + ['hugging-face-any-to-any-model', 'text-generation', 'GenerateAnyToAny'], + ]) { + const graph = JSON.parse(readFileSync(path.resolve('../MoDiff/data/graphs/studio', folder, filename + '.json'))); + const generator = graph.nodes.find((node) => node.data.action === action); + const original = structuredClone(generator); + const keys = (node, edges = graph.edges) => + Object.keys(graphNodeControlParams(node, edges, undefined, graph.nodes)); + const off = keys(generator); + assert.ok(off.includes('do_sample') && off.includes('num_beams') && off.includes('repetition_penalty')); + assert.ok( + sampleKeys.every((key) => !off.includes(key)), + action, + ); + const sampling = structuredClone(generator); + sampling.data.params.do_sample.value = true; + const on = keys(sampling); + assert.ok(sampleKeys.every((key) => on.indexOf(key) > on.indexOf('do_sample'))); + const wire = (targetHandle) => ({ id: 'source', source: 'scalar', target: generator.id, targetHandle }); + assert.ok(sampleKeys.every((key) => keys(generator, [wire('do_sample')]).includes(key))); + assert.deepEqual( + sampleKeys.filter((key) => keys(generator, [wire('top_p')]).includes(key)), + ['top_p'], + ); + const custom = structuredClone(generator); + custom.data.module = 'custom.Authored'; + assert.ok(sampleKeys.every((key) => keys(custom).includes(key))); + assert.deepEqual(generator, original); + } +}); + +test('only the built-in raw guider and modular offload controls follow their literal activation switch', async () => { + const { orderedActiveNodeControls: entries } = await server.ssrLoadModule('/src/workflow/gatedNodeControls.ts'); + const guider = { + guider: { value: 'ClassifierFreeGuidance' }, + guidance_scale: { value: 7 }, + enabled: { value: false }, + result: { display: 'output' }, + }; + const id = 'modules.ModularDiffusers.Guider'; + const keys = (action, shown, full = shown, connected = false) => + entries(action, shown, full, connected).map(([key]) => key); + assert.deepEqual(keys(id, guider), ['enabled', 'result']); + assert.deepEqual(keys(id, { guidance_scale: guider.guidance_scale }, guider), []); + assert.deepEqual(keys(id, guider, guider, true), ['enabled', 'guider', 'guidance_scale', 'result']); + assert.deepEqual(keys(id, guider, { ...guider, enabled: { default: true } }), [ + 'enabled', + 'guider', + 'guidance_scale', + 'result', + ]); + assert.deepEqual(keys('custom.Other.Guider', guider), Object.keys(guider)); + const loader = { auto_offload: { value: false }, offload_mode: { value: 'group_cpu' }, device: { value: 'cpu' } }; + for (const key of ['modules.ModularDiffusers.ModelsLoader', 'modules.ModularDiffusers.AutoModelLoader']) { + assert.deepEqual(keys(key, loader), ['auto_offload', 'device']); + assert.deepEqual(keys(key, loader, loader, true), Object.keys(loader)); + assert.deepEqual( + keys(key, loader, { ...loader, auto_offload: { signal: 'flag', value: false } }), + Object.keys(loader), + ); + assert.equal(loader.offload_mode.value, 'group_cpu'); + } +}); + +test('show a disabled loader’s remembered offload choice when the selected adapter policy consumes it', async () => { + const { adapterConsumesOffloadMode, orderedActiveNodeControls } = await server.ssrLoadModule( + '/src/workflow/gatedNodeControls.ts', + ); + const params = { + repo_id: { value: { source: 'hub', value: 'studio/example' } }, + model_type: { value: 'Pipeline' }, + auto_offload: { value: false }, + offload_mode: { value: 'group_cpu' }, + }; + const policy = { + pipeline_class: 'Pipeline', + default_repo: 'studio/example', + adapterAuthoring: { requiredControls: { offload_mode: 'none' } }, + }; + const declared = { workflowModelDescriptors: [{ adapterAuthoringProfile: policy }], studioModelCapabilities: [] }; + assert.equal(adapterConsumesOffloadMode(params, declared), true); + assert.equal( + adapterConsumesOffloadMode(params, { + workflowModelDescriptors: [], + studioModelCapabilities: [{ executionProfiles: [policy] }], + }), + true, + ); + assert.equal(adapterConsumesOffloadMode({ ...params, model_type: { value: 'OtherPipeline' } }, declared), false); + assert.equal( + adapterConsumesOffloadMode({ ...params, repo_id: { value: { source: 'hub', value: 'studio/other' } } }, declared), + false, + ); + const keys = orderedActiveNodeControls('modules.ModularDiffusers.ModelsLoader', params, params, false, true).map( + ([key]) => key, + ); + assert.ok(keys.includes('offload_mode')); + assert.equal(params.offload_mode.value, 'group_cpu'); +}); + +test('execution cards show options for enabled compilation, cache and manual placement', async () => { + const { nodeControlSwitches, visibleGatedNodeControls } = await server.ssrLoadModule( + '/src/workflow/gatedNodeControls.ts', + ); + for (const action of ['DiffusersExecutionRecipe', 'ApplyPipelineRuntimeConfig']) { + const gates = nodeControlSwitches('modules.DiffusersRuntime.' + action); + const fields = { + compile_backend: { value: 'inductor' }, + regional_compile: { type: 'bool', value: false }, + cache_threshold: { value: 0.125 }, + cache_options: { display: 'textarea', value: '{"threshold":0.25}' }, + denoiser_cache: { type: 'string', value: 'none' }, + ...(action === 'DiffusersExecutionRecipe' && { + device_map_overrides: { display: 'textarea', value: '{"unet":0}' }, + device_map: { type: 'string', value: 'auto' }, + }), + }; + const saved = structuredClone(fields); + const visible = (connected = () => false) => + Object.keys(visibleGatedNodeControls(gates, fields, fields, connected)); + assert.deepEqual( + visible(), + Object.keys(fields).filter((key) => ['regional_compile', 'denoiser_cache', 'device_map'].includes(key)), + ); + assert.deepEqual(fields, saved); + assert.ok(visible((key) => key === 'cache_threshold').includes('cache_threshold')); + assert.ok(visible((key) => key === 'regional_compile').includes('compile_backend')); + fields.regional_compile.value = true; + fields.denoiser_cache.value = 'first_block'; + if (fields.device_map) fields.device_map.value = 'manual'; + for (const key of Object.keys(fields)) assert.ok(visible().includes(key), key); + assert.ok(visible().indexOf('regional_compile') < visible().indexOf('compile_backend')); + fields.denoiser_cache.value = 'none'; + fields.cache_options.value = '{unfinished'; + assert.ok(visible().includes('cache_options'), 'Invalid saved JSON remains accessible for correction'); + } +}); + +test('capability discovery retry belongs only to the reported image or audio capability remedy', () => { + for (const message of [ + 'The selected image model profile is unavailable or ambiguous. Refresh capabilities.', + 'Refresh current audio model capabilities before editing LoRA.', + 'Refresh model capabilities before adding LoRA.', + ]) + assert.equal(adapters.adapterCapabilitiesRefreshable(message), true); + for (const message of [ + null, + 'The selected image model does not support LoRA.', + 'Refresh the selected audio pipeline signal before editing LoRA.', + ]) + assert.equal(adapters.adapterCapabilitiesRefreshable(message), false); +}); + +test('whole-pipeline examples keep one-action generation on the ordinary node', () => { + const backend = path.resolve(process.env.MODIFF_BACKEND_DIR || '../MoDiff'); + const cases = [ + ['sana-sprint-pipeline/text-to-image', 'Generate'], + ['qwen-image-edit-pipeline/edit-image', 'Edit'], + ['stable-diffusion-pipeline/control-inpaint', 'ControlInpaint'], + ['wan-vace-pipeline/text-to-video', 'Generate'], + ['long-cat-audio-di-t-pipeline/text-to-audio', 'Generate'], + ]; + for (const [graphPath, action] of cases) { + const graph = JSON.parse(readFileSync(path.join(backend, 'data/graphs/studio', graphPath + '.json'), 'utf8')); + const before = structuredClone(graph); + const draft = groups.groupNewOperationGraph(graph); + const original = graph.nodes.find((node) => node.data.action === action); + const actual = draft.nodes.find((node) => node.id === original.id); + assert.ok(actual, graphPath + ' must show ' + action + ' directly'); + assert.equal(actual.data.blockInstanceV2, undefined); + assert.deepEqual(actual.data.params, original.data.params); + assert.ok(draft.nodes.some((node) => groups.visualOperationGroup(node) === 'setup')); + assert.deepEqual(graph, before); + } +}); + +test('bundled examples fold exclusively owned media preparation even when a processor consumes its result', async () => { + const backend = path.resolve(process.env.MODIFF_BACKEND_DIR || '../MoDiff', 'data/graphs'); + const { useFlowStore, normalizePersistedFlowState } = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + const exported = (sourceGraph) => + canonicalGraphIdentity( + useFlowStore.getState().exportGraph('stage-check', undefined, { sourceGraph, randomizeSeeds: false }), + ); + const cases = [ + ['studio/animate-diff-control-net-pipeline/control-to-video', 'videoInput', ['Load', 'Normalize']], + [ + 'studio/animate-diff-video-to-video-control-net-pipeline/control-video-to-video', + 'videoInput', + ['Load', 'Normalize'], + ], + ['studio/wan-vace-pipeline/video-inpaint', 'mask', ['AlignMask', 'Load']], + ...['flux3-distilled-modular-pipeline', 'flux3-modular-pipeline'].map((family) => [ + 'experimental/' + + family + + '/edit-image--flux3-klein-' + + (family.startsWith('flux3-distilled') ? '' : 'base-') + + 'fp8r512-multi-reference-edit', + 'composite', + ['Resize', 'Resize', 'Resize', 'CropImage', 'MaskComposite'], + ]), + ]; + for (const [file, kind, expected] of cases) { + const graph = JSON.parse(readFileSync(path.join(backend, file + '.json'), 'utf8')); + const before = structuredClone(graph); + const hasStage = (grouped) => + grouped.nodes.some( + (n) => + groups.visualOperationGroup(n) === kind && + JSON.stringify(n.data.blockInstanceV2.effectiveGraph.nodes.map((m) => m.data.action).sort()) === + JSON.stringify([...expected].sort()) && + (kind !== 'videoInput' || + n.data.blockInstanceV2.effectiveGraph.nodes.some((m) => m.data.studioRole === 'loadControlVideo')), + ); + const grouped = groups.groupNewOperationGraph(graph); + assert.ok(hasStage(grouped), file); + if ( + graph.nodes.some((n) => n.data.studioRole === 'loadControlVideo') && + graph.nodes.some((n) => n.data.studioRole === 'loadVideo') + ) { + const pickers = grouped.nodes + .filter((n) => groups.visualOperationGroup(n) === 'videoInput') + .flatMap((n) => n.data.blockInstanceV2.effectiveInterface.controls) + .filter((control) => control.binding.fieldId === 'file') + .map((control) => control.label); + assert.deepEqual(pickers.sort(), ['Control video', 'Source video']); + } + assert.deepEqual(exported(grouped), exported(graph), file); + assert.deepEqual(exported(normalizePersistedFlowState(structuredClone(grouped))), exported(graph), file); + assert.deepEqual(graph, before); + // A second consumer uses the unprepared input/foreground. Folding it would hide a real branch. + const member = graph.nodes.find((n) => + kind === 'composite' + ? n.data.action === 'CropImage' + : n.data.studioRole === (kind === 'mask' ? 'loadMaskVideo' : 'loadControlVideo'), + ); + const wire = graph.edges.find((e) => e.source === member.id); + const preview = structuredClone(graph.nodes.find((n) => n.id === wire.target)); + preview.id = 'independent-consumer'; + graph.nodes.push(preview); + graph.edges.push({ ...wire, id: 'extra-output-consumer', target: preview.id }); + assert.equal(hasStage(groups.groupNewOperationGraph(graph)), false, file); + } +}); + +function ordinaryImage({ task = 'text_to_image', withGuidance = true } = {}) { + const pipelineClass = 'FutureImagePipeline'; + const field = (type, display, value) => ({ type, display, ...(value === undefined ? {} : { value }) }); + const stage = (id, action, nodeType, params) => ({ + node: { type: 'custom', module: 'modules.Test', action, label: action, category: 'Test', params }, + operation: { + pipelineClass, + task, + operationId: `diffusion.${id}`, + nodeKey: `modules.Test.${action}`, + nodeType, + blockName: ['loader', 'guidance'].includes(nodeType) ? null : nodeType, + decomposition: nodeType === 'loader' ? 'loader' : nodeType === 'guidance' ? 'bundle' : 'block', + support: 'declared', + workflowId: task, + binding: { pipelineClass, values: {} }, + ports: Object.entries(params).map(([name, param]) => ({ + name, + semanticName: name, + direction: param.display === 'output' ? 'output' : 'input', + roles: ['value'], + types: [param.type], + required: false, + hidden: false, + semantics: { kind: 'value', scope: null, state: null, owner: 'none', members: [] }, + })), + }, + }); + const nodes = [ + stage('load_models', 'LoadModels', 'loader', { + models: field('models', 'output'), + lora_list: field('custom_lora', 'input'), + }), + stage('encode_prompt', 'EncodePrompt', 'text_encoder', { + models: field('models', 'input'), + prompt: field('string', 'textarea', 'An authored prompt'), + seed: field('int', 'number', 42), + guider: field('custom_guider', 'input'), + embeddings: field('embeddings', 'output'), + }), + stage('denoise', 'Denoise', 'denoise', { + models: field('models', 'input'), + embeddings: field('embeddings', 'input'), + guider: field('custom_guider', 'input'), + seed: field('int', 'number', 42), + latents: field('latents', 'output'), + }), + stage('decode_latents', 'DecodeLatents', 'decoder', { + models: field('models', 'input'), + latents: field('latents', 'input'), + images: field('image', 'output'), + }), + ]; + if (withGuidance) + nodes.push( + stage('guidance', 'Guider', 'guidance', { + enabled: { type: 'boolean', value: false }, + use_original_formulation: { type: 'boolean', value: true }, + guidance_scale: { type: 'float', display: 'slider', value: 4, min: 0, max: 20 }, + guider: { type: 'string', value: 'ClassifierFreeGuidance', onChange: 'updateNode' }, + guider_out: field('custom_guider', 'output'), + }), + ); + const edges = [ + ...['encode_prompt', 'denoise', 'decode_latents'].map((id) => ({ + source: 'diffusion.load_models', + sourceHandle: 'models', + target: `diffusion.${id}`, + targetHandle: 'models', + })), + { + source: 'diffusion.encode_prompt', + sourceHandle: 'embeddings', + target: 'diffusion.denoise', + targetHandle: 'embeddings', + }, + { + source: 'diffusion.denoise', + sourceHandle: 'latents', + target: 'diffusion.decode_latents', + targetHandle: 'latents', + }, + ...(withGuidance + ? ['encode_prompt', 'denoise'].map((id) => ({ + source: 'diffusion.guidance', + sourceHandle: 'guider_out', + target: `diffusion.${id}`, + targetHandle: 'guider', + })) + : []), + ]; + const graph = authoring.createOperationStarter( + { + pipelineClass, + task, + workflowId: task, + nodes, + edges, + requiredInputs: [], + upstreamBlocks: [], + sharedInputs: [ + { + name: 'seed', + members: [ + { operationId: 'diffusion.encode_prompt', field: 'seed' }, + { operationId: 'diffusion.denoise', field: 'seed' }, + ], + }, + ], + }, + { x: 0, y: 0 }, + ); + graph.nodes.push({ + id: 'preview-image', + type: 'custom', + position: { x: 1600, y: 0 }, + data: { + module: 'modules.Image', + action: 'Preview', + label: 'Preview Image', + category: 'Image', + params: { + image: field('image', 'input'), + preview: field('image', 'ui_image', '@data/outputs/retained.webp'), + }, + }, + }); + graph.edges.push({ + id: 'preview-wire', + source: graph.nodes.find((n) => n.data.action === 'DecodeLatents').id, + sourceHandle: 'images', + target: 'preview-image', + targetHandle: 'image', + }); + return graph; +} + +test('fresh native image presents four real stages and keeps guidance, preview and shared seeds', () => { + const ordinary = ordinaryImage(); + const before = structuredClone(ordinary); + const graph = groups.groupNewOperationGraph(ordinary); + assert.deepEqual(graph.nodes.map((n) => n.data.label).sort(), [ + 'Denoise', + 'Encode Inputs', + 'Image Output', + 'Model Setup', + ]); + assert.deepEqual(ordinary, before, 'creation cannot mutate its input graph'); + const flat = groups.unpackVisualOperationGroups(graph).graph; + assert.equal(flat.nodes.length, ordinary.nodes.length); + assert.equal(flat.edges.length, ordinary.edges.length); + const input = graph.nodes.find((n) => groups.visualOperationGroup(n) === 'inputs'); + assert.deepEqual( + guidance + .guidanceFields(input.data.blockInstanceV2) + .map((f) => f.field) + .sort(), + ['enabled', 'guidance_scale', 'guider', 'use_original_formulation'], + ); + assert.ok(input.data.blockInstanceV2.effectiveInterface.controls.some((c) => c.binding.fieldId === 'enabled')); + assert.equal( + guidance.guidanceFields(input.data.blockInstanceV2).find((f) => f.field === 'enabled').param.value, + false, + ); + const encoder = flat.nodes.find((n) => n.data.action === 'EncodePrompt'); + const owner = flat.nodes.find((n) => n.data.action === 'LoadModels'); + assert.equal(shared.sharedOperationInput(flat.nodes, flat.edges, encoder.id, 'seed').members.length, 2); + assert.equal(encoder.data.operationAuthoring.sharedInputs[0].loaderId, owner.id); + assert.equal( + flat.nodes.find((n) => n.data.action === 'Preview').data.params.preview.value, + '@data/outputs/retained.webp', + ); +}); + +test('guidance enable is first and toggling it preserves the authored hidden settings', () => { + const ordinary = ordinaryImage(); + const grouped = groups.groupNewOperationGraph(ordinary); + const instance = grouped.nodes.find((node) => groups.visualOperationGroup(node) === 'inputs').data.blockInstanceV2; + const before = structuredClone(instance); + assert.deepEqual( + guidance.visibleGuidanceFields(instance, new Set()).map((item) => item.field), + ['enabled'], + ); + assert.deepEqual(instance, before); + const activation = guidance.guidanceFields(instance).find((item) => item.field === 'enabled'); + const enabled = runtime.setBlockInstanceValueV2(instance, activation.id, true); + const visible = guidance.visibleGuidanceFields(enabled, new Set()); + assert.equal(visible[0].field, 'enabled'); + assert.equal(visible.find((item) => item.field === 'guidance_scale').param.value, 4); + assert.equal(visible.find((item) => item.field === 'use_original_formulation').param.value, true); + const disabled = runtime.setBlockInstanceValueV2(enabled, activation.id, false); + assert.deepEqual( + guidance.visibleGuidanceFields(disabled, new Set()).map((item) => item.field), + ['enabled'], + ); + assert.equal(disabled.effectiveGraph.graphHash, instance.effectiveGraph.graphHash); +}); + +test('unsupported guidance leaves no empty section; audio retains its existing separate presentation', () => { + const image = groups.groupNewOperationGraph(ordinaryImage({ withGuidance: false })); + assert.equal(image.nodes.length, 4); + const inputs = image.nodes.find((n) => groups.visualOperationGroup(n) === 'inputs'); + assert.deepEqual(guidance.guidanceFields(inputs.data.blockInstanceV2), []); + const audio = groups.groupNewOperationGraph(ordinaryImage({ task: 'text_to_audio' })); + assert.ok(audio.nodes.some((n) => groups.visualOperationGroup(n) === 'guidance')); + assert.ok(!audio.nodes.some((n) => ['setup', 'output'].includes(groups.visualOperationGroup(n)))); +}); + +test('combined presentation survives Guidance capability removal and return; legacy separate groups stay separate', () => { + const combined = groups.groupNewOperationGraph(ordinaryImage()); + const original = groups.unpackVisualOperationGroups(combined); + const guider = original.graph.nodes.find((node) => node.data.action === 'Guider'); + const without = { + nodes: original.graph.nodes.filter((node) => node.id !== guider.id), + edges: original.graph.edges.filter((edge) => edge.source !== guider.id && edge.target !== guider.id), + }; + const absent = groups.restoreVisualOperationGroups(without, original); + assert.equal( + guidance.guidanceFields( + absent.nodes.find((node) => groups.visualOperationGroup(node) === 'inputs').data.blockInstanceV2, + ).length, + 0, + ); + const projected = groups.unpackVisualOperationGroups(absent); + const returned = groups.restoreVisualOperationGroups( + { + nodes: [...projected.graph.nodes, guider], + edges: [...projected.graph.edges, ...original.graph.edges.filter((edge) => edge.source === guider.id)], + }, + projected, + ); + assert.equal(returned.nodes.length, 4); + assert.equal( + guidance.guidanceFields( + returned.nodes.find((node) => groups.visualOperationGroup(node) === 'inputs').data.blockInstanceV2, + ).length, + 4, + ); + const legacy = ordinaryImage(); + const owner = legacy.nodes.find((node) => node.data.action === 'LoadModels'); + const separate = groups.groupOperationStages(legacy, owner.id); + const roundtrip = groups.restoreVisualOperationGroups( + groups.unpackVisualOperationGroups(separate).graph, + groups.unpackVisualOperationGroups(separate), + ); + assert.ok(roundtrip.nodes.some((node) => groups.visualOperationGroup(node) === 'guidance')); + assert.equal( + guidance.guidanceFields( + roundtrip.nodes.find((node) => groups.visualOperationGroup(node) === 'inputs').data.blockInstanceV2, + ).length, + 0, + ); +}); + +test('explicit Combine retains Guidance values, sealed labels, removed controls and immutable old definitions', () => { + const ordinary = ordinaryImage(); + const owner = ordinary.nodes.find((node) => node.data.action === 'LoadModels'); + const graph = groups.groupOperationStages(ordinary, owner.id); + const guide = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'guidance'); + const instance = guide.data.blockInstanceV2; + const controls = instance.effectiveInterface.controls + .filter((control) => control.binding.fieldId !== 'use_original_formulation') + .map((control, order) => ({ + ...control, + order, + ...(control.binding.fieldId === 'enabled' ? { label: 'Authored activation', sealed: true } : {}), + })); + const customized = runtime.replaceBlockEffectiveInterfaceV2(instance, { + boundary: instance.effectiveInterface.boundary, + controls, + }); + graph.nodes = graph.nodes.map((node) => (node.id === guide.id ? runtime.createBlockRootNodeV2(customized) : node)); + const before = structuredClone(graph); + const combined = groups.combineOperationInputStages(graph, owner.id); + assert.deepEqual(graph, before); + assert.equal(combined.nodes.length, before.nodes.length - 1); + assert.ok(!combined.nodes.some((node) => groups.visualOperationGroup(node) === 'guidance')); + const input = combined.nodes.find((node) => groups.visualOperationGroup(node) === 'inputs'); + const enabled = input.data.blockInstanceV2.effectiveInterface.controls.find( + (control) => control.binding.fieldId === 'enabled', + ); + assert.equal(enabled.label, 'Authored activation'); + assert.equal(enabled.sealed, true); + assert.ok( + !input.data.blockInstanceV2.effectiveInterface.controls.some( + (control) => control.binding.fieldId === 'use_original_formulation', + ), + ); + assert.equal( + guidance.guidanceFields(input.data.blockInstanceV2).find((item) => item.field === 'enabled').param.value, + false, + ); + const flat = groups.unpackVisualOperationGroups(combined).graph; + assert.equal(flat.nodes.length, ordinary.nodes.length); + assert.equal(flat.edges.length, ordinary.edges.length); +}); + +function adapterRegistry(native = true) { + return { + [native ? 'modules.ModularDiffusers.Lora' : 'modules.DiffusersImage.LoadAdapter']: { + type: 'custom', + module: native ? 'modules.ModularDiffusers' : 'modules.DiffusersImage', + action: native ? 'Lora' : 'LoadAdapter', + label: 'LoRA', + category: 'Models', + params: { + model: { type: 'string', display: 'model', label: 'Adapter model' }, + scale: { type: 'float', display: 'slider', label: 'Adapter scale', default: 1, min: 0, max: 2, isInput: true }, + revision: { type: 'string', display: 'text' }, + expected_sha256: { type: 'string', display: 'text' }, + weight_name: { type: 'string', display: 'text' }, + ...(native + ? { + previous_loras: { type: 'custom_lora', display: 'input' }, + lora: { type: 'custom_lora', display: 'output' }, + } + : { + pipeline: { type: 'pipeline', display: 'input' }, + output: { type: 'pipeline', display: 'output' }, + replace_existing: { type: 'boolean', display: 'checkbox', default: true }, + }), + }, + }, + }; +} +const localAdapter = (value) => ({ model: { source: 'local', value }, scale: 0.75 }); +// These tests exercise graph preservation with a synthetic backend declaration; +// the independent authority suite uses actual selected backend image schemas. +function adapterImage() { + const graph = ordinaryImage(); + const owner = graph.nodes.find((node) => node.data.action === 'LoadModels'); + Object.assign(owner.data.params, { + model_type: { type: 'string', value: 'FutureImagePipeline' }, + pipeline_class: { type: 'string', value: 'FutureImagePipeline' }, + repo_id: { type: 'string', display: 'model', value: { source: 'hub', value: 'reviewed/image' } }, + model_id: { type: 'string', display: 'model', value: { source: 'hub', value: 'reviewed/image' } }, + revision: { type: 'string', value: 'a'.repeat(40) }, + execution_profile_id: { type: 'string', value: 'future-image:reviewed' }, + }); + return graph; +} +function planAdapterEdit(graph, rootId, edit) { + if (edit.kind === 'remove') return adapters.planModelSetupAdapterEdit(graph, rootId, edit); + const chain = adapters.modelSetupAdapterChain(graph, rootId); + const operation = chain.owner.data.operationAuthoring.operation; + const key = `${chain.owner.data.module}.${chain.owner.data.action}`; + const registry = { + ...Object.fromEntries(chain.adapters.map((node) => [`${node.data.module}.${node.data.action}`, node.data])), + ...edit.registry, + [key]: structuredClone(chain.owner.data), + }; + const authority = { + nodesRegistry: registry, + studioModelCapabilitiesAuthoritative: true, + studioExecutionSpecInvalid: false, + discoveryRequests: { nodes: { status: 'success' }, capabilities: { status: 'success' } }, + operationContracts: [operation], + pipelineSupport: [ + { + pipelineClass: operation.pipelineClass, + tasks: [ + { + task: operation.task, + operationIds: [operation.operationId], + executionProfileIds: ['future-image:reviewed'], + }, + ], + }, + ], + studioModelCapabilities: [ + { + modelType: operation.pipelineClass, + defaultRepo: 'reviewed/image', + supportsLora: true, + revisionCandidates: ['a'.repeat(40)], + executionProfiles: [ + { + id: 'future-image:reviewed', + pipeline_class: operation.pipelineClass, + model_type: operation.pipelineClass, + loader_module: chain.owner.data.module, + loader_action: chain.owner.data.action, + default_repo: 'reviewed/image', + repository_revisions: [{ repo: 'reviewed/image', revision: 'a'.repeat(40) }], + modes: ['text_to_image'], + }, + ], + }, + ], + }; + return adapters.planModelSetupAdapterEdit(graph, rootId, { ...edit, registry }, authority); +} + +test('adapter Add rejects blank/mutable Hub selections before insertion and uses declared sockets', () => { + const graph = groups.groupNewOperationGraph(adapterImage()); + const root = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'setup'); + const before = structuredClone(graph); + const registry = adapterRegistry(); + assert.throws(() => planAdapterEdit(graph, root.id, { kind: 'add', values: {}, registry }), /Select a Hub or local/); + assert.throws( + () => + planAdapterEdit(graph, root.id, { + kind: 'add', + values: { model: { source: 'hub', value: 'owner/lora' } }, + registry, + }), + /commit revision/, + ); + assert.throws( + () => + planAdapterEdit(graph, root.id, { + kind: 'add', + values: { + model: { source: 'hub', value: 'owner/lora' }, + revision: 'a'.repeat(40), + expected_sha256: 'b'.repeat(64), + weight_name: '../adapter.safetensors', + }, + registry, + }), + /contained/, + ); + const invalid = structuredClone(registry); + invalid['modules.ModularDiffusers.Lora'].params.lora.type = 'image'; + assert.throws( + () => + planAdapterEdit(graph, root.id, { + kind: 'add', + values: localAdapter('@models/lora/one.safetensors'), + registry: invalid, + }), + /compatible chain sockets/, + ); + assert.deepEqual(graph, before); +}); + +test('owned native adapters add, reorder and remove without losing scale wires or a shared external prefix', () => { + const ordinary = adapterImage(); + const owner = ordinary.nodes.find((node) => node.data.action === 'LoadModels'); + const registry = adapterRegistry(); + const prefix = { + id: 'shared-adapter', + type: 'custom', + position: { x: -400, y: 0 }, + data: structuredClone(registry['modules.ModularDiffusers.Lora']), + }; + prefix.data.params.model.value = { source: 'local', value: '@models/lora/shared.safetensors' }; + const sink = { + id: 'external-consumer', + type: 'custom', + position: { x: -400, y: 400 }, + data: { + module: 'modules.Test', + action: 'OtherConsumer', + params: { adapters: { type: 'custom_lora', display: 'input' } }, + }, + }; + ordinary.nodes.push(prefix, sink); + ordinary.edges.push( + { id: 'shared-owner', source: prefix.id, sourceHandle: 'lora', target: owner.id, targetHandle: 'lora_list' }, + { id: 'shared-other', source: prefix.id, sourceHandle: 'lora', target: sink.id, targetHandle: 'adapters' }, + ); + let graph = groups.groupNewOperationGraph(ordinary); + const root = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'setup'); + assert.ok( + graph.nodes.some((node) => node.id === prefix.id), + 'shared descriptors stay external', + ); + for (const path of ['one', 'two']) + graph = planAdapterEdit(graph, root.id, { + kind: 'add', + values: localAdapter(`@models/lora/${path}.safetensors`), + registry, + }); + const original = adapters.modelSetupAdapterChain(graph, root.id); + assert.equal(original.adapters.length, 2); + const scaleNode = { + id: 'scale-supplier', + type: 'custom', + position: { x: 0, y: 700 }, + data: { module: 'modules.Test', action: 'Scale', params: { value: { type: 'float', display: 'output' } } }, + }; + const flat = original.unpacked.graph; + flat.nodes.push(scaleNode); + flat.edges.push({ + id: 'scale-wire', + source: scaleNode.id, + sourceHandle: 'value', + target: original.adapters[0].id, + targetHandle: 'scale', + }); + graph = groups.restoreVisualOperationGroups(flat, original.unpacked); + graph = planAdapterEdit(graph, root.id, { + kind: 'move', + nodeId: original.adapters[1].id, + offset: -1, + }); + const reordered = adapters.modelSetupAdapterChain(graph, root.id); + assert.deepEqual( + reordered.adapters.map((node) => node.data.params.model.value.value), + ['@models/lora/two.safetensors', '@models/lora/one.safetensors'], + ); + assert.ok( + reordered.unpacked.graph.edges.some((edge) => edge.id === 'scale-wire' && edge.target === original.adapters[0].id), + ); + assert.ok(reordered.unpacked.graph.edges.some((edge) => edge.id === 'shared-other' && edge.source === prefix.id)); + const instance = graph.nodes.find((node) => node.id === root.id).data.blockInstanceV2; + const control = instance.effectiveInterface.controls.find( + (item) => item.binding.fieldId === 'model' && `${root.id}/${item.binding.nodeId}` === original.adapters[0].id, + ); + const sealed = runtime.replaceBlockEffectiveInterfaceV2(instance, { + boundary: instance.effectiveInterface.boundary, + controls: instance.effectiveInterface.controls.map((item) => (item === control ? { ...item, sealed: true } : item)), + }); + const sealedGraph = { + ...graph, + nodes: graph.nodes.map((node) => (node.id === root.id ? runtime.createBlockRootNodeV2(sealed) : node)), + }; + assert.throws( + () => planAdapterEdit(sealedGraph, root.id, { kind: 'remove', nodeId: original.adapters[0].id }), + /sealed/, + ); + for (const node of reordered.adapters) graph = planAdapterEdit(graph, root.id, { kind: 'remove', nodeId: node.id }); + const final = adapters.modelSetupAdapterChain(graph, root.id); + assert.equal(final.adapters.length, 0); + assert.equal(final.prefix.source, prefix.id); + assert.ok(final.unpacked.graph.edges.some((edge) => edge.id === 'shared-other')); + assert.ok(final.unpacked.graph.nodes.some((node) => node.id === scaleNode.id)); +}); + +test('whole-pipeline adapter chains use the same graph edits and reject replacement that would unload prior rows', () => { + const ordinary = adapterImage(); + const owner = ordinary.nodes.find((node) => node.data.action === 'LoadModels'); + delete owner.data.params.lora_list; + owner.data.params.pipeline = { type: 'pipeline', display: 'output' }; + const denoise = ordinary.nodes.find((node) => node.data.action === 'Denoise'); + denoise.data.params.pipeline = { type: 'pipeline', display: 'input' }; + ordinary.edges.push({ + id: 'direct-pipeline', + source: owner.id, + sourceHandle: 'pipeline', + target: denoise.id, + targetHandle: 'pipeline', + }); + let graph = groups.groupNewOperationGraph(ordinary); + const root = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'setup'); + const registry = adapterRegistry(false); + graph = planAdapterEdit(graph, root.id, { + kind: 'add', + values: localAdapter('@models/lora/one.safetensors'), + registry, + }); + assert.throws( + () => + planAdapterEdit(graph, root.id, { + kind: 'add', + values: localAdapter('@models/lora/two.safetensors'), + registry, + }), + /Only the first adapter/, + ); + graph = planAdapterEdit(graph, root.id, { + kind: 'add', + values: { ...localAdapter('@models/lora/two.safetensors'), replace_existing: false }, + registry, + }); + const chain = adapters.modelSetupAdapterChain(graph, root.id); + assert.equal(chain.adapters.length, 2); + assert.throws( + () => planAdapterEdit(graph, root.id, { kind: 'move', nodeId: chain.adapters[0].id, offset: 1 }), + /Only the first adapter/, + ); + for (const node of chain.adapters) graph = planAdapterEdit(graph, root.id, { kind: 'remove', nodeId: node.id }); + const final = adapters.modelSetupAdapterChain(graph, root.id); + assert.equal(final.adapters.length, 0); + assert.equal(final.prefix.source, final.owner.id); + assert.equal(final.tail[0].target, denoise.id); +}); + +test('backend-declared auxiliary guidance without an operation hint joins Inputs through its exclusive typed owner wires', () => { + const graph = ordinaryImage(), + guider = graph.nodes.find((node) => node.data.action === 'Guider'); + delete guider.data.operationAuthoring; + guider.data.studioRole = 'guider'; + const grouped = groups.groupNewOperationGraph(graph); + assert.equal(grouped.nodes.length, 4); + const inputs = grouped.nodes.find((node) => groups.visualOperationGroup(node) === 'inputs'); + assert.ok(inputs.data.blockInstanceV2.effectiveGraph.nodes.some((node) => node.data.studioRole === 'guider')); + assert.ok( + inputs.data.blockInstanceV2.effectiveInterface.controls.some( + (control) => control.binding.fieldId === 'guidance_scale', + ), + ); +}); +for (const [name, change] of [ + [ + 'missing typed output', + (graph, node) => { + delete node.data.params.guider_out; + }, + ], + [ + 'wrong output type', + (graph, node) => { + node.data.params.guider_out.type = 'string'; + }, + ], + [ + 'nested node', + (graph, node) => { + node.parentId = 'custom-parent'; + }, + ], + [ + 'shared foreign owner wire', + (graph, node) => { + graph.edges.push({ + id: 'foreign', + source: node.id, + sourceHandle: 'guider_out', + target: 'foreign-stage', + targetHandle: 'guider', + }); + }, + ], +]) + test(`auxiliary guidance is not adopted with ${name}`, () => { + const graph = ordinaryImage(), + guider = graph.nodes.find((node) => node.data.action === 'Guider'); + delete guider.data.operationAuthoring; + guider.data.studioRole = 'guider'; + change(graph, guider); + const grouped = groups.groupNewOperationGraph(graph); + assert.ok(grouped.nodes.some((node) => node.id === guider.id)); + }); diff --git a/scripts/input-bound-model-evidence.mjs b/scripts/input-bound-model-evidence.mjs new file mode 100644 index 00000000..98f955d2 --- /dev/null +++ b/scripts/input-bound-model-evidence.mjs @@ -0,0 +1,438 @@ +// The retained Spandrel x2 fixture fills the one file picker in the canonical graph. +// Its receipt attests a technical execution variant, without release or resource qualification. +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { lstatSync, readFileSync, realpathSync } from 'node:fs'; +import { dirname } from 'node:path'; +import { validateNativeVariantOutput, validateNativeVariantRun } from './native-variant-run-evidence.mjs'; +import { + canonicalWorkflowAuthoringContract, + exportCanonicalWorkflowGraphs, + readCanonicalEvidenceFile, +} from './release-contract-core.mjs'; +import { + backendSourceEvidence, + canonicalGraphIdentity, + normalizeBackendRuntime, + selectBackendRuntimeFingerprintEvidence, + selectInstalledModelIdentity, + stableStringify, +} from './live-proof-provenance.mjs'; + +export const INPUT_BOUND_MODEL_EVIDENCE_FORMAT = 'modiff.private.input-bound-model-smoke.v1'; +const WORKFLOW_ID = 'SpandrelImageUpscale:image_upscale'; +const PROOF_KIND = 'real_backend_input_bound_model_variant'; +const same = (a, b, message) => assert.equal(stableStringify(a), stableStringify(b), message); +const recordKeys = (row, keys, message) => same(Object.keys(row ?? {}).sort(), keys.sort(), message); +const sha256 = (value) => createHash('sha256').update(value).digest('hex'); +const MAX_MEDIA_BYTES = 16 * 1024 * 1024; + +function fileSlots(nodes) { + return Object.entries(nodes).flatMap(([id, node]) => + Object.entries(node.params ?? {}) + .filter(([, parameter]) => parameter.display === 'filebrowser') + .map(([field]) => ({ id, field })), + ); +} + +export function bindSpandrelInput(expected, binding, nodesPayload) { + assert.match(binding.sourceValue, /^[a-zA-Z0-9_-][\w.-]*\.png$/u); + assert.ok(binding.sourceValue.length <= 512, 'The input picker filename is too long.'); + const { nodes, paths } = expected; + const entries = Object.entries(nodes); + const [upscaleId] = + entries.find(([, node]) => node.module === 'modules.Spandrel' && node.action === 'Upscaler') ?? []; + const [previewId] = entries.find(([, node]) => node.module === 'modules.Image' && node.action === 'Preview') ?? []; + const loadId = binding.nodeId; + assert.ok(upscaleId && previewId && entries.length === 3, 'Unsupported input-bound Spandrel topology.'); + assert.equal(nodes[loadId]?.module, 'modules.Image'); + assert.equal(nodes[loadId].action, 'Load'); + assert.equal(binding.field, 'file'); + same(fileSlots(nodes), [{ id: loadId, field: 'file' }], 'A single declared image file picker is required.'); + same(nodes[loadId].params.file, { display: 'filebrowser', value: [] }, 'The canonical file input must be empty.'); + same(paths, [[loadId, upscaleId, previewId]], 'Expected one load, upscale and preview path.'); + same(nodes[upscaleId].params.image, { display: 'input', sourceId: loadId, sourceKey: 'image' }); + same(nodes[previewId].params.image, { display: 'input', sourceId: upscaleId, sourceKey: 'output' }); + const contracts = nodesPayload.nodes ?? nodesPayload; + const registry = Object.fromEntries( + entries.map(([id, { module, action }]) => { + const node = contracts[`${module}.${action}`]; + assert.equal(node?.module, module, 'Original backend node contract differs.'); + assert.equal(node?.action, action, 'Original backend node contract differs.'); + return [id, node]; + }), + ); + same(fileSlots(registry), [{ id: loadId, field: 'file' }], 'Original backend file input contract differs.'); + assert.equal(registry[loadId].params.file.fieldOptions?.multiple, true); + const api = structuredClone(expected); + api.nodes[loadId].params.file.value = [binding.sourceValue]; + return { api, loadId, upscaleId, previewId }; +} + +function compareBoundGraph(submitted, expected, hints) { + recordKeys(submitted, ['sid', 'nodes', 'paths', ...(hints ? ['runtimeHints'] : [])], 'Unreviewed graph envelope.'); + same(submitted.nodes, expected.nodes, 'Graph differs outside the single canonical image file binding.'); + same(submitted.paths, expected.paths, 'Graph paths differ from the canonical input-bound recipe.'); +} + +export function validateConsumedSpandrelInput({ bound, binding, output }) { + const consumed = output.resolvedExecutionInputs; + assert.equal(consumed.schemaVersion, 1); + assert.equal(consumed.source, 'backend-execution'); + assert.equal(consumed.taskId, output.taskId, 'Consumed source belongs to another task.'); + assert.equal(consumed.attemptIndex, 0, 'Consumed source belongs to another attempt.'); + assert.equal(consumed.nodeId, bound.previewId, 'Consumed receipt belongs to another output owner.'); + assert.equal(consumed.truncated, false); + same(consumed.uncapturedNodeIds, []); + same(consumed.ambiguousFields, []); + same(consumed.unavailableFields, []); + same(consumed.fieldAccountingStatus, { schemaVersion: 1, truncated: false }); + same(consumed.nodes.map((node) => node.nodeId).sort(), Object.keys(bound.api.nodes).sort()); + for (const row of consumed.nodes) { + const submitted = bound.api.nodes[row.nodeId]; + assert.equal(row.module, submitted.module); + assert.equal(row.action, submitted.action); + same(row.omittedFields, {}); + } + const load = consumed.nodes.find((node) => node.nodeId === bound.loadId).fields; + const upscale = consumed.nodes.find((node) => node.nodeId === bound.upscaleId).fields; + const preview = consumed.nodes.find((node) => node.nodeId === bound.previewId); + const literal = (value) => ({ value, source: 'literal' }); + const sourceHash = binding.file.sha256; + const width = load.source_widths?.value?.[0]; + const height = load.source_heights?.value?.[0]; + assert.ok([width, height].every((n) => Number.isSafeInteger(n) && n > 0 && n <= 2048)); + same( + load, + { + alpha_channel: literal(bound.api.nodes[bound.loadId].params.alpha_channel.value), + source_hashes: literal([sourceHash]), + source_widths: literal([width]), + source_heights: literal([height]), + source_modes: literal(['RGB']), + }, + 'Native Image.Load source byte identity or decoded metadata differs.', + ); + same( + upscale, + { + device: literal(bound.api.nodes[bound.upscaleId].params.device.value), + model_id: literal(bound.api.nodes[bound.upscaleId].params.model_id.value.value), + }, + 'Native Spandrel model or device differs.', + ); + const { device, export: previewExport } = bound.api.nodes[bound.previewId].params; + same(preview.fields, { device: literal(device.value) }); + same( + preview.fieldAccounting, + { + schemaVersion: 1, + fields: { + device: { + disposition: 'inactive', + inputValue: device.value, + value: device.value, + reason: 'already-decoded-image', + source: 'literal', + }, + export: { + disposition: 'consumed', + inputValue: previewExport.value, + value: previewExport.value, + source: 'literal', + }, + }, + inputProjections: {}, + outputProjections: {}, + unaccountedFields: [], + omittedFields: {}, + complete: true, + }, + 'Native terminal preview accounting differs.', + ); + return { width, height, sourceHash }; +} + +export function validateSpandrelArtifact({ + bound, + modelSet, + modelArtifact, + graphCompleted, + submissionHints, + observation, +}) { + const { module, action, params } = bound.api.nodes[bound.upscaleId]; + const model = params.model_id.value; + same(modelArtifact, model, 'Declared checkpoint metadata differs from canonical graph.'); + const [org, repository, weightName] = model.value.split('/'); + assert.equal(model.source, 'hub'); + assert.equal(weightName, 'RealESRGAN_x2plus.pth'); + assert.equal(model.value, `${org}/${repository}/${weightName}`); + assert( + (module === 'modules.Spandrel' && action === 'Upscaler' && params.downscale.value === 1) || + (module === 'modules.Video' && + action === 'UpscaleVideo' && + params.pipeline_class.value === 'SpandrelVideoUpscaleV1' && + params.operation.value === 'video_upscale'), + 'Unexpected controlled upscale action.', + ); + same(modelSet, [{ repoId: `${org}/${repository}`, revision: model.revision }]); + const completionHints = graphCompleted.runtimeHints; + recordKeys( + completionHints, + [...Object.keys(submissionHints), 'controlledArtifacts', 'loaderContract'], + 'Unreviewed native execution authority.', + ); + const { controlledArtifacts, loaderContract, ...nativeSubmissionHints } = completionHints; + same(nativeSubmissionHints, submissionHints, 'Completed graph metadata differs from the original submission.'); + same(loaderContract, []); + const receipt = { + schemaVersion: 1, + kind: 'spandrel_upscaler', + module, + action, + artifact: { + source: 'hub', + repository: `${org}/${repository}`, + revision: model.revision, + weightName, + sha256: model.sha256, + }, + }; + // Backend controlled artifacts use a bare SHA-256 of sorted compact JSON. + same( + controlledArtifacts, + [{ ...receipt, descriptorSha256: sha256(stableStringify(receipt)) }], + 'Native controlled checkpoint or descriptor digest differs.', + ); + assert.equal(observation.error, false); + assert.equal(observation.models.length, 1, 'Installed checkpoint observation is ambiguous.'); + const installed = selectInstalledModelIdentity(observation, receipt.artifact.repository); + assert.equal(installed?.selectedRevision, model.revision); + assert.equal(installed?.modelRevision, `${receipt.artifact.repository}@${model.revision}`); + assert.equal(observation.models[0].complete, true); + assert.equal(observation.models[0].size, model.byteSize); + assert.equal(observation.runtimeFingerprint, graphCompleted.runtimeFingerprint.fingerprint); + return { ...controlledArtifacts[0], byteSize: model.byteSize }; +} + +export function validateSpandrelDecodedMedia({ sourceBytes, outputBytes, sourceDecoded, outputDecoded, input, item }) { + assert.ok( + sourceBytes.length >= 33 && + sourceBytes.subarray(0, 8).equals(Buffer.from('89504e470d0a1a0a', 'hex')) && + sourceBytes.toString('ascii', 12, 16) === 'IHDR' && + sourceBytes[25] === 2, + 'Original source is not RGB PNG.', + ); + assert.ok( + outputBytes.length >= 20 && + outputBytes.toString('ascii', 0, 4) === 'RIFF' && + outputBytes.toString('ascii', 8, 12) === 'WEBP', + 'Original output is not WebP.', + ); + same([sourceDecoded.width, sourceDecoded.height], [input.width, input.height], 'Decoded source dimensions differ.'); + same( + [outputDecoded.width, outputDecoded.height], + [input.width * 2, input.height * 2], + 'Decoded output is not 2× the original input.', + ); + same([item.width, item.height], [outputDecoded.width, outputDecoded.height], 'Persisted output dimensions differ.'); + assert.ok( + outputDecoded.nearBlackRatio <= 0.995 && outputDecoded.lumaStdDev >= 0.75, + 'Original output is visually blank.', + ); +} + +export async function readInputBoundModelEvidence({ clientRoot, manifest, graph, authoring, artifact, evidencePath }) { + assert.equal(manifest.id, WORKFLOW_ID, 'Unsupported file-backed model workflow.'); + const target = canonicalWorkflowAuthoringContract(manifest, graph, authoring, artifact); + const stat = lstatSync(evidencePath); + assert.ok(stat.isFile() && !stat.isSymbolicLink() && stat.size > 0 && stat.size <= 65536); + const descriptorBytes = readFileSync(evidencePath); + const evidence = JSON.parse(descriptorBytes); + recordKeys( + evidence, + [ + 'schemaVersion', + 'format', + 'workflowId', + 'qualificationClaims', + 'creatorPackage', + 'outputPackage', + 'runDetail', + 'nodes', + 'backendSourceBefore', + 'backendSourceAfter', + 'graphCompleted', + 'modelObservations', + 'inputs', + 'modelArtifact', + 'outputs', + ...(evidence.graphRequest === undefined ? [] : ['graphRequest', 'graphAcknowledgment']), + ], + 'Unexpected input-bound evidence descriptor.', + ); + assert.equal(evidence.schemaVersion, 1); + assert.equal(evidence.format, INPUT_BOUND_MODEL_EVIDENCE_FORMAT); + assert.equal(evidence.workflowId, target.workflowId); + same(evidence.qualificationClaims, { releaseEligible: false, technicalVariant: true }); + assert.equal(evidence.inputs.length, 1); + assert.equal(evidence.modelObservations.length, 1); + assert.equal(evidence.outputs.length, 1); + const [binding] = evidence.inputs; + const [outputRef] = evidence.outputs; + recordKeys(binding, [ + 'nodeId', + 'field', + 'sourceValue', + 'file', + ...(binding.before === undefined ? [] : ['before', 'after']), + ]); + recordKeys(outputRef, ['backendPath', 'mediaType', 'file']); + const root = realpathSync(dirname(evidencePath)); + const retainedFiles = []; + const read = (ref, maximum) => { + const result = readCanonicalEvidenceFile(root, ref, maximum); + retainedFiles.push({ ...ref, absolutePath: result.file }); + return result; + }; + const json = (ref) => JSON.parse(read(ref).bytes); + const creator = json(evidence.creatorPackage); + const outputPackage = json(evidence.outputPackage); + const run = json(evidence.runDetail); + const graphCompleted = json(evidence.graphCompleted); + const [expectedApi, creatorApi, outputApi, nativeApi] = await exportCanonicalWorkflowGraphs(clientRoot, [ + graph, + creator.graph, + outputPackage.latestOutput.graphSnapshot, + run.workflow_snapshot, + ]); + const bound = bindSpandrelInput(expectedApi, binding, json(evidence.nodes)); + for (const api of [creatorApi, outputApi, nativeApi]) compareBoundGraph(api, bound.api, false); + compareBoundGraph(creator.apiGraph, bound.api, false); + compareBoundGraph(outputPackage.latestOutput.apiGraphSnapshot, bound.api, true); + const { task, output, hints } = validateNativeVariantRun({ + target, + outputNodeId: bound.previewId, + displayType: 'image', + creator, + outputPackage, + run, + graphCompleted, + ...(evidence.graphRequest !== undefined + ? { + graphRequest: json(evidence.graphRequest), + graphAcknowledgment: json(evidence.graphAcknowledgment), + } + : {}), + }); + const source = backendSourceEvidence({ + before: json(evidence.backendSourceBefore).identity, + after: json(evidence.backendSourceAfter).identity, + runtimeFingerprint: task.runtimeFingerprint, + }); + same(source.blockers, [], 'Backend source differs from the running process.'); + const runtime = selectBackendRuntimeFingerprintEvidence([task.runtimeFingerprint]); + assert.ok(runtime, 'Native runtime fingerprint is incomplete.'); + assert.match(task.runtimeFingerprint.packages.platform, /^Windows-/u); + const measurement = task.runtimeMeasurement; + assert.equal(measurement.backend, 'cuda'); + assert.equal(measurement.device, bound.api.nodes[bound.upscaleId].params.device.value); + assert.ok(task.runtimeFingerprint.torch.cuda_available); + assert.equal(measurement.peakMeasurementVersion, 2); + assert.ok(Number.isFinite(measurement.elapsedSeconds) && measurement.elapsedSeconds > 0); + assert.ok(Number.isSafeInteger(measurement.peakAllocatedBytes) && measurement.peakAllocatedBytes > 0); + const modelArtifact = validateSpandrelArtifact({ + bound, + modelSet: target.modelSet, + modelArtifact: evidence.modelArtifact, + graphCompleted, + submissionHints: hints, + observation: json(evidence.modelObservations[0]), + }); + const input = validateConsumedSpandrelInput({ bound, binding, output }); + const physicalInput = read(binding.file, MAX_MEDIA_BYTES); + if (binding.before !== undefined) + for (const ref of [binding.before, binding.after]) + assert.ok( + read(ref, MAX_MEDIA_BYTES).bytes.equals(physicalInput.bytes), + 'Server input observations differ from archived source bytes.', + ); + const physicalOutput = read(outputRef.file, MAX_MEDIA_BYTES); + const item = validateNativeVariantOutput({ + output, + outputRef, + task, + bytes: physicalOutput.bytes, + displayType: 'image', + contentType: 'image/webp', + }); + const nativeUrl = new URL(item.value, 'http://127.0.0.1'); + assert.equal(nativeUrl.origin, 'http://127.0.0.1'); + assert.equal(nativeUrl.pathname, `/cache/${bound.previewId}/output/0`); + assert.equal(nativeUrl.searchParams.get('format'), 'WEBP'); + assert.equal(nativeUrl.searchParams.get('quality'), '100'); + // Decode the retained media independently of native width/height claims. + const { decodedMediaHash } = await import('./template-gallery-harness.mjs'); + const sourceDecoded = await decodedMediaHash(physicalInput.file, 'image'); + const outputDecoded = await decodedMediaHash(physicalOutput.file, 'image'); + validateSpandrelDecodedMedia({ + sourceBytes: physicalInput.bytes, + outputBytes: physicalOutput.bytes, + sourceDecoded, + outputDecoded, + input, + item, + }); + for (const ref of retainedFiles) readCanonicalEvidenceFile(root, ref); + assert.ok(readFileSync(evidencePath).equals(descriptorBytes), 'Evidence descriptor changed during validation.'); + const receipt = { + schemaVersion: 1, + format: 'modiff.canonical-workflow-run-receipt.v1', + proofKind: PROOF_KIND, + workflowId: target.workflowId, + sourceTemplateId: target.sourceTemplateId, + authoringId: target.authoringId, + authoringHash: target.authoringHash, + canonicalWorkflowHash: target.canonicalWorkflowHash, + modelType: target.modelType, + task: target.task, + taskId: task.task_id, + capturedAt: new Date(task.completed_at * 1000).toISOString(), + graphHash: canonicalGraphIdentity(output.apiGraphSnapshot).hash, + modelSet: target.modelSet, + resourceCandidateId: null, + runtimeFingerprint: normalizeBackendRuntime(runtime).lockFingerprint, + backendSourceFingerprint: source.identity.fingerprint, + outputHash: item.mediaHash, + executionDurationSeconds: measurement.elapsedSeconds, + peakMemoryBytes: measurement.peakAllocatedBytes, + canonicalDefaultsExecuted: false, + inputBinding: { + nodeId: binding.nodeId, + field: binding.field, + serverReadsCompared: binding.before !== undefined, + sha256: input.sourceHash, + width: input.width, + height: input.height, + }, + modelArtifact, + decodedOutput: { hash: outputDecoded.hash, width: outputDecoded.width, height: outputDecoded.height }, + observationLimits: { fullConsumedFieldAccounting: false, physicalPlatformQualification: false }, + qualificationClaims: { + publicTemplate: false, + qualityApproved: false, + rightsApproved: false, + hardwareQualified: false, + modelResourceQualified: false, + }, + }; + return { + receipt, + provenance: { format: 'modiff.input-bound-model-variant-proof.v1', receipt }, + evidence, + descriptorBytes, + retainedFiles, + evidenceRoot: root, + }; +} diff --git a/scripts/input-bound-model-evidence.test.mjs b/scripts/input-bound-model-evidence.test.mjs new file mode 100644 index 00000000..e27df478 --- /dev/null +++ b/scripts/input-bound-model-evidence.test.mjs @@ -0,0 +1,343 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { cpSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { dirname, join, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import test from 'node:test'; +import { stableStringify } from './live-proof-provenance.mjs'; +import { readCanonicalWorkflowEvidence } from './release-contract-core.mjs'; +import { + bindSpandrelInput, + validateConsumedSpandrelInput, + validateSpandrelArtifact, + validateSpandrelDecodedMedia, +} from './input-bound-model-evidence.mjs'; + +const clientRoot = fileURLToPath(new URL('..', import.meta.url)); +const backendRoot = resolve(process.env.MODIFF_BACKEND_DIR || join(clientRoot, '../MoDiff')); +const workflowId = 'SpandrelImageUpscale:image_upscale'; +const digest = (value) => createHash('sha256').update(value).digest('hex'); +const literal = (value) => ({ source: 'literal', value }); + +function fixture() { + const modelArtifact = { + source: 'hub', + value: 'fixture/esrgan/RealESRGAN_x2plus.pth', + revision: 'a'.repeat(40), + sha256: 'b'.repeat(64), + byteSize: 512, + }; + const expected = { + sid: 'canonical-test', + paths: [['load', 'upscale', 'result']], + nodes: { + load: { + module: 'modules.Image', + action: 'Load', + params: { file: { display: 'filebrowser', value: [] }, alpha_channel: { value: 'ignore' } }, + }, + upscale: { + module: 'modules.Spandrel', + action: 'Upscaler', + params: { + model_id: { value: modelArtifact }, + device: { value: 'cuda:0' }, + downscale: { value: 1 }, + image: { display: 'input', sourceId: 'load', sourceKey: 'image' }, + }, + }, + result: { + module: 'modules.Image', + action: 'Preview', + params: { + device: { value: 'cuda:0' }, + export: { value: '0' }, + image: { display: 'input', sourceId: 'upscale', sourceKey: 'output' }, + }, + }, + }, + }; + const registry = Object.fromEntries( + Object.values(expected.nodes).map((node) => [`${node.module}.${node.action}`, structuredClone(node)]), + ); + registry['modules.Image.Load'].params.file.fieldOptions = { multiple: true }; + const binding = { nodeId: 'load', field: 'file', sourceValue: 'input.png', file: { sha256: 'c'.repeat(64) } }; + const bound = bindSpandrelInput(expected, binding, registry); + const nodeFields = { + load: { + alpha_channel: literal('ignore'), + source_hashes: literal([binding.file.sha256]), + source_widths: literal([64]), + source_heights: literal([48]), + source_modes: literal(['RGB']), + }, + upscale: { device: literal('cuda:0'), model_id: literal(modelArtifact.value) }, + result: { device: literal('cuda:0') }, + }; + const fieldAccounting = { + schemaVersion: 1, + fields: { + device: { + disposition: 'inactive', + inputValue: 'cuda:0', + value: 'cuda:0', + reason: 'already-decoded-image', + source: 'literal', + }, + export: { disposition: 'consumed', inputValue: '0', value: '0', source: 'literal' }, + }, + inputProjections: {}, + outputProjections: {}, + unaccountedFields: [], + omittedFields: {}, + complete: true, + }; + const output = { + taskId: 'test-task', + resolvedExecutionInputs: { + schemaVersion: 1, + source: 'backend-execution', + taskId: 'test-task', + attemptIndex: 0, + nodeId: 'result', + truncated: false, + uncapturedNodeIds: [], + ambiguousFields: [], + unavailableFields: [], + fieldAccountingStatus: { schemaVersion: 1, truncated: false }, + nodes: Object.entries(expected.nodes).map(([nodeId, { module, action }]) => ({ + nodeId, + module, + action, + fields: nodeFields[nodeId], + omittedFields: {}, + ...(nodeId === 'result' ? { fieldAccounting } : {}), + })), + }, + }; + const checkpoint = { + schemaVersion: 1, + kind: 'spandrel_upscaler', + module: 'modules.Spandrel', + action: 'Upscaler', + artifact: { + source: 'hub', + repository: 'fixture/esrgan', + revision: modelArtifact.revision, + weightName: 'RealESRGAN_x2plus.pth', + sha256: modelArtifact.sha256, + }, + }; + const submissionHints = { clientRunId: 'test-client-run' }; + const runtimeFingerprint = { fingerprint: 'test-runtime' }; + const graphCompleted = { + runtimeHints: { + ...submissionHints, + loaderContract: [], + controlledArtifacts: [{ ...checkpoint, descriptorSha256: digest(stableStringify(checkpoint)) }], + }, + runtimeFingerprint, + }; + const installed = { + repoId: 'fixture/esrgan', + installed: true, + complete: true, + modelRevision: `fixture/esrgan@${modelArtifact.revision}`, + selectedRevision: modelArtifact.revision, + size: modelArtifact.byteSize, + }; + const observation = { error: false, models: [installed], runtimeFingerprint: runtimeFingerprint.fingerprint }; + return { + expected, + registry, + output, + binding, + bound, + modelArtifact, + modelSet: [{ repoId: installed.repoId, revision: installed.selectedRevision }], + submissionHints, + graphCompleted, + observation, + }; +} + +test('binds one empty Image.Load port and preserves all other executable fields', () => { + const { expected, binding, registry, bound } = fixture(); + assert.deepEqual(expected.nodes.load.params.file.value, []); + assert.deepEqual(bound.api.nodes.load.params.file.value, [binding.sourceValue]); + const unbound = structuredClone(bound.api); + unbound.nodes.load.params.file.value = []; + assert.deepEqual(unbound, expected); + assert.throws(() => bindSpandrelInput(expected, { ...binding, sourceValue: '../escape.png' }, registry)); + assert.throws(() => bindSpandrelInput(expected, { ...binding, nodeId: 'upscale' }, registry)); + const extra = structuredClone(registry); + extra['modules.Image.Load'].params.other = { display: 'filebrowser' }; + assert.throws(() => bindSpandrelInput(expected, binding, extra), /file input contract/u); + expected.nodes.load.params.file.value = ['already-bound.png']; + assert.throws(() => bindSpandrelInput(expected, binding, registry), /must be empty/u); +}); + +test('rejects missing, changed, or unrelated native Image.Load source capture', () => { + const data = fixture(); + assert.deepEqual(validateConsumedSpandrelInput(data), { + width: 64, + height: 48, + sourceHash: data.binding.file.sha256, + }); + for (const [change, pattern] of [ + [ + (input) => { + input.taskId = 'another-task'; + }, + /another task/u, + ], + [ + (input) => { + input.attemptIndex = 1; + }, + /another attempt/u, + ], + [ + (input) => { + input.nodeId = 'load'; + }, + /output owner/u, + ], + [ + (input) => { + input.nodes[0].action = 'Upload'; + }, + /Load/u, + ], + [ + (input) => { + input.nodes[0].fields.source_hashes.value = ['d'.repeat(64)]; + }, + /source byte identity/u, + ], + [ + (input) => { + delete input.nodes[0].fields.source_hashes; + }, + /source byte identity/u, + ], + [ + (input) => { + input.nodes[2].fieldAccounting.complete = false; + }, + /preview accounting/u, + ], + ]) { + const changed = structuredClone(data); + change(changed.output.resolvedExecutionInputs); + assert.throws(() => validateConsumedSpandrelInput(changed), pattern); + } +}); + +test('rejects changed native model bytes, descriptor, action, and installed revision', () => { + const data = fixture(); + assert.equal(validateSpandrelArtifact(data).artifact.sha256, data.modelArtifact.sha256); + for (const change of [ + (model) => { + model.descriptorSha256 = 'd'.repeat(64); + }, + (model) => { + model.artifact.sha256 = 'd'.repeat(64); + }, + (model) => { + model.artifact.weightName = 'other.pth'; + }, + (model) => { + model.action = 'Preview'; + }, + ]) { + const changed = structuredClone(data); + change(changed.graphCompleted.runtimeHints.controlledArtifacts[0]); + assert.throws(() => validateSpandrelArtifact(changed), /checkpoint or descriptor/u); + } + data.observation.models[0].selectedRevision = 'd'.repeat(40); + assert.throws(() => validateSpandrelArtifact(data)); +}); + +test('requires original media formats and an independently decoded 2× result', () => { + const sourceBytes = Buffer.alloc(33); + Buffer.from('89504e470d0a1a0a', 'hex').copy(sourceBytes); + sourceBytes.write('IHDR', 12); + sourceBytes[25] = 2; + const outputBytes = Buffer.alloc(20); + outputBytes.write('RIFF', 0); + outputBytes.write('WEBP', 8); + const input = { width: 64, height: 48 }; + const item = { width: 128, height: 96 }; + const data = { + sourceBytes, + outputBytes, + input, + item, + sourceDecoded: input, + outputDecoded: { ...item, nearBlackRatio: 0, lumaStdDev: 10 }, + }; + validateSpandrelDecodedMedia(data); + assert.throws( + () => validateSpandrelDecodedMedia({ ...data, outputDecoded: { ...data.outputDecoded, width: 127 } }), + /not 2×/u, + ); + assert.throws(() => validateSpandrelDecodedMedia({ ...data, outputBytes: data.sourceBytes }), /not WebP/u); +}); + +const savedEvidence = process.env.MODIFF_INPUT_BOUND_MODEL_TEST_EVIDENCE; +test( + 'retained Windows Spandrel proof verifies through the release reader without a rerun', + { skip: !savedEvidence }, + async () => { + const args = { clientRoot, backendRoot, workflowId, evidencePath: resolve(savedEvidence) }; + const result = await readCanonicalWorkflowEvidence(args); + assert.equal(result.receipt.proofKind, 'real_backend_input_bound_model_variant'); + assert.equal(result.receipt.canonicalDefaultsExecuted, false); + assert.ok(Object.values(result.receipt.qualificationClaims).every((claim) => claim === false)); + const temp = mkdtempSync(join(tmpdir(), 'modiff-input-evidence-')); + try { + cpSync(dirname(args.evidencePath), temp, { recursive: true }); + const evidencePath = join(temp, 'evidence.json'); + const evidence = JSON.parse(readFileSync(evidencePath)); + const retainedRef = (path) => { + const bytes = readFileSync(join(temp, path)); + return { path, bytes: bytes.length, sha256: digest(bytes) }; + }; + evidence.graphRequest = retainedRef('graph-request.original.json'); + evidence.graphAcknowledgment = retainedRef('graph-acknowledgment.original.json'); + evidence.inputs[0].before = retainedRef('input-server-before.original.png'); + evidence.inputs[0].after = retainedRef('input-server-after.original.png'); + writeFileSync(evidencePath, JSON.stringify(evidence)); + const corroborated = await readCanonicalWorkflowEvidence({ ...args, evidencePath }); + assert.equal(corroborated.receipt.inputBinding.serverReadsCompared, true); + evidence.inputs[0].after = retainedRef('output-0.original.webp'); + writeFileSync(evidencePath, JSON.stringify(evidence)); + await assert.rejects( + () => readCanonicalWorkflowEvidence({ ...args, evidencePath }), + /Server input observations differ/u, + ); + evidence.inputs[0].after = retainedRef('input-server-after.original.png'); + writeFileSync(evidencePath, JSON.stringify(evidence)); + const inputPath = join(temp, evidence.inputs[0].file.path); + const bytes = Buffer.from(readFileSync(inputPath)); + bytes[bytes.length - 1] ^= 1; + writeFileSync(inputPath, bytes); + await assert.rejects( + () => readCanonicalWorkflowEvidence({ ...args, evidencePath }), + /Evidence file hash differs/u, + ); + evidence.inputs[0].file.sha256 = digest(bytes); + writeFileSync(evidencePath, JSON.stringify(evidence)); + await assert.rejects( + () => readCanonicalWorkflowEvidence({ ...args, evidencePath }), + /Native Image.Load source byte identity/u, + ); + } finally { + assert.equal(resolve(temp, '..'), resolve(tmpdir())); + assert.ok(temp.includes('modiff-input-evidence-')); + rmSync(temp, { recursive: true, force: true }); + } + }, +); diff --git a/scripts/large-av-starter.test.mjs b/scripts/large-av-starter.test.mjs new file mode 100644 index 00000000..612edc89 --- /dev/null +++ b/scripts/large-av-starter.test.mjs @@ -0,0 +1,68 @@ +import assert from 'node:assert/strict'; +import { execFileSync } from 'node:child_process'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { test } from 'node:test'; +import { createServer } from 'vite'; + +const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); +const backend = path.resolve(root, '../MoDiff'); +const python = + process.env.MODIFF_BACKEND_PYTHON || + path.join(backend, '.venv', process.platform === 'win32' ? 'Scripts/python.exe' : 'bin/python'); +const rows = JSON.parse( + execFileSync(python, [path.join(root, 'scripts/operation-starter-fixtures.py'), '--large-av'], { + cwd: backend, + encoding: 'utf8', + maxBuffer: 32 * 1024 * 1024, + }), +); +globalThis.window = { location: { origin: 'http://127.0.0.1:8088' } }; + +test('joint video starters select one declared render without hiding legacy operation authority', async () => { + const server = await createServer({ + root, + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + try { + const requests = await server.ssrLoadModule('/src/workflow/operationStarterRequest.ts'); + const operations = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + assert.equal(rows.length, 11); + for (const row of rows) { + const { testOperationContracts: rawContracts, ...payload } = row; + const contracts = operations.parseOperationContracts(rawContracts, 3); + const legacy = payload.pipelineClass.startsWith('LTX2'); + const action = legacy || payload.task.endsWith('_with_audio') ? 'GenerateVideoAudio' : 'Generate'; + assert.equal(contracts.filter((c) => c.decomposition === 'pipeline').length, legacy ? 2 : 1); + const parsed = requests.parseOperationStarter(payload, payload.pipelineClass, payload.task, contracts); + assert.deepEqual( + parsed.nodes.map((n) => n.node.action), + ['LoadPipeline', action], + ); + assert.equal(parsed.edges.length, 1); + for (const [index, mutate] of [ + (p) => p.nodes.pop(), + (p) => p.edges.splice(0), + (p) => { + p.edges[0].sourceHandle = 'resolved_artifact'; + }, + (p) => { + p.edges[0].targetHandle = 'reference_images'; + }, + ].entries()) { + const malformed = structuredClone(payload); + mutate(malformed); + assert.throws( + () => requests.parseOperationStarter(malformed, payload.pipelineClass, payload.task, contracts), + `${payload.pipelineClass}/${payload.task}: malformed mutation ${index}`, + ); + } + } + } finally { + await server.close(); + } +}); diff --git a/scripts/layer-decomposition-evidence.mjs b/scripts/layer-decomposition-evidence.mjs new file mode 100644 index 00000000..f6476f3f --- /dev/null +++ b/scripts/layer-decomposition-evidence.mjs @@ -0,0 +1,308 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { readFileSync, realpathSync } from 'node:fs'; +import { dirname } from 'node:path'; +import { + backendContractIdentity, + backendSourceEvidence, + canonicalGraphIdentity, + normalizeBackendRuntime, + selectBackendRuntimeFingerprintEvidence, + selectInstalledModelIdentity, + stableStringify, +} from './live-proof-provenance.mjs'; +import { verifyNativeLoadedImage } from './native-image-load-evidence.mjs'; +import { validateNativeVariantRun, validateUnmodifiedExpertPreparation } from './native-variant-run-evidence.mjs'; +import { + canonicalWorkflowAuthoringContract, + exportCanonicalWorkflowGraphs, + readCanonicalEvidenceFile, +} from './release-contract-core.mjs'; +import { decodedMediaHash } from './template-gallery-harness.mjs'; + +const workflowId = 'QwenImageLayeredPipeline:layer_decomposition'; +const repoId = 'Qwen/Qwen-Image-Layered'; +const revision = '8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf'; +const digest = (bytes) => createHash('sha256').update(bytes).digest('hex'); +const same = (a, b, message) => assert.equal(stableStringify(a), stableStringify(b), message); +const literal = (value) => ({ value, source: 'literal' }); +const chain = [ + 'modules.DiffusersRuntime.PipelineQuantizationConfigV2', + 'modules.DiffusersRuntime.DiffusersExecutionRecipe', + 'modules.DiffusersImage.LoadPipeline', + 'modules.Image.Load', + 'modules.DiffusersImage.LayerDecompose', + 'modules.Image.Preview', +]; + +function chainOwners(api) { + assert.equal(api.paths.length, 1); + const [path] = api.paths; + same([...path].sort(), Object.keys(api.nodes).sort(), 'The layer graph scope differs.'); + same( + path.map((id) => `${api.nodes[id].module}.${api.nodes[id].action}`), + chain, + 'Layer stage order differs.', + ); + return path; +} + +function verifyLayerInputs(output, api, path, input) { + const [, , loaderId, sourceId, splitId, previewId] = path; + const inputReceipt = output.resolvedExecutionInputs; + assert.equal(inputReceipt.schemaVersion, 1); + assert.equal(inputReceipt.source, 'backend-execution'); + assert.equal(inputReceipt.truncated, false); + assert.equal(inputReceipt.taskId, output.taskId); + assert.equal(inputReceipt.nodeId, previewId); + assert.equal(inputReceipt.attemptIndex, 0); + same(inputReceipt.mediaEvidenceStatus, { schemaVersion: 1, truncated: false }); + same(inputReceipt.uncapturedNodeIds, []); + same(inputReceipt.unavailableFields, []); + same(inputReceipt.nodes.map(({ nodeId }) => nodeId).sort(), [...path].sort()); + const record = (id) => { + const row = inputReceipt.nodes.find(({ nodeId }) => nodeId === id); + assert.equal(row.action, api.nodes[id].action); + assert.equal(row.module, api.nodes[id].module); + same(row.omittedFields, {}); + return row; + }; + const { sourceFile, decodedImage } = verifyNativeLoadedImage(api.nodes[sourceId], record(sourceId), 'RGBA'); + same( + [sourceFile.sourceValue, sourceFile.sha256, sourceFile.byteSize], + [input.sourceValue, input.file.sha256, input.file.bytes], + 'Loaded layer source differs.', + ); + const split = record(splitId); + const preview = record(previewId); + const loader = record(loaderId); + same(loader.fields.model_id, literal(repoId)); + same(loader.fields.revision, literal(revision)); + same(loader.fields.mode, literal('layer_decomposition')); + const params = api.nodes[splitId].params; + const expected = Object.fromEntries( + ['layers', 'resolution', 'cfg_normalize', 'use_en_prompt'].map((key) => [key, params[key].value]), + ); + same(split.mediaEvidence.controls, expected, 'Layer adapter controls differ from the submitted graph.'); + for (const field of [ + 'prompt', + 'negative_prompt', + 'num_inference_steps', + 'output_type', + 'max_sequence_length', + 'seed', + ]) + same(split.fields[field], literal(params[field].value), `Layer adapter control differs: ${field}`); + same(split.fields.true_cfg_scale, literal(params.guidance_scale.value)); + same(split.fields.executed_task, literal('layer_decomposition')); + const layers = split.mediaEvidence.outputs.images; + assert.equal(layers.length, expected.layers); + assert.equal(split.mediaEvidence.status, 'complete'); + assert.equal(preview.mediaEvidence.status, 'complete'); + same(split.mediaEvidence.inputs, { image: [{ kind: 'image', ...decodedImage }] }, 'Consumed layer source differs.'); + same(preview.mediaEvidence.inputs.image, layers, 'Layer order changed before export.'); + return { decodedImage, layers }; +} + +export async function readLayerDecompositionEvidence({ + clientRoot, + manifest, + graph, + authoring, + artifact, + evidencePath, +}) { + assert.equal(manifest.id, workflowId); + const target = canonicalWorkflowAuthoringContract(manifest, graph, authoring, artifact); + same(target.modelSet, [{ repoId, revision }]); + const descriptorBytes = readFileSync(evidencePath); + const evidence = JSON.parse(descriptorBytes); + assert.equal(evidence.format, 'modiff.private.native-layer-decomposition.v1'); + assert.equal(evidence.schemaVersion, 1); + const root = realpathSync(dirname(evidencePath)); + const retainedFiles = []; + const read = (ref) => { + const { bytes, file } = readCanonicalEvidenceFile(root, ref, 16 * 1024 * 1024); + retainedFiles.push({ ...ref, absolutePath: file }); + return { bytes, file }; + }; + const json = (ref) => JSON.parse(read(ref).bytes); + const creator = json(evidence.creatorPackage); + const outputPackage = json(evidence.outputPackage); + const run = json(evidence.runDetail); + const completed = json(evidence.graphCompleted); + const request = json(evidence.graphRequest); + const [expected, ...visual] = await exportCanonicalWorkflowGraphs(clientRoot, [ + graph, + creator.graph, + outputPackage.latestOutput.graphSnapshot, + run.workflow_snapshot, + ]); + assert.equal(canonicalGraphIdentity(expected).hash, evidence.originalGraphHash); + const expectedPath = chainOwners(expected); + const path = chainOwners(request); + const [, , , sourceId, splitId, previewId] = path; + const input = evidence.input; + assert.match(input.sourceValue, /^@data\/images\/[a-z0-9_-]{1,128}[.]png$/iu); + assert.equal(input.nodeId, sourceId); + const sourceSlot = expected.nodes[expectedPath[3]].params.file; + same(sourceSlot, { display: 'filebrowser', value: [] }); + sourceSlot.value = [input.sourceValue]; + const prompt = request.nodes[splitId].params.prompt.value; + assert.ok(typeof prompt === 'string' && prompt.length > 0 && prompt.length <= 4096 && prompt === prompt.trim()); + assert.ok(!/[\u0000-\u001f\u007f]/u.test(prompt)); + expected.nodes[expectedPath[4]].params.prompt.value = prompt; + const identity = canonicalGraphIdentity(expected); + for (const value of [request, creator.apiGraph, ...visual]) { + same(canonicalGraphIdentity(value), identity, 'The layer graph differs outside its source and authored prompt.'); + } + const { task, output, hints } = validateNativeVariantRun({ + target, + outputNodeId: previewId, + displayType: 'image_collection', + creator, + outputPackage, + run, + graphCompleted: completed, + graphRequest: request, + graphAcknowledgment: json(evidence.graphAcknowledgment), + validatePreparation: (value) => validateUnmodifiedExpertPreparation(value, target.modelType), + }); + same(hints.workflowSnapshot.studioForm, output.formSnapshot); + same(completed.runtimeHints, { + ...hints, + controlledArtifacts: [], + loaderContract: ['modules.DiffusersImage.LoadPipeline'], + }); + const { decodedImage, layers } = verifyLayerInputs(output, request, path, input); + const source = read(input.file); + assert.equal(source.bytes.subarray(0, 8).toString('hex'), '89504e470d0a1a0a'); + const upload = json(input.upload); + assert.equal(upload.error, false); + assert.equal(upload.path, input.sourceValue); + same( + [upload.media.sha256, upload.media.sizeBytes, upload.media.width, upload.media.height], + [digest(source.bytes), source.bytes.length, decodedImage.width, decodedImage.height], + ); + assert.equal(upload.media.frames, 1); + assert.equal(upload.media.mimeType, 'image/png'); + const runtimeSource = backendSourceEvidence({ + before: json(evidence.backendSourceBefore).identity, + after: json(evidence.backendSourceAfter).identity, + runtimeFingerprint: task.runtimeFingerprint, + }); + same(runtimeSource.blockers, []); + const backendContract = backendContractIdentity(json(evidence.nodes), identity.canonicalGraph); + assert.ok(backendContract.fingerprint); + const runtime = selectBackendRuntimeFingerprintEvidence([task.runtimeFingerprint]); + assert.match(runtime.packages.platform, /^Linux-/u); + assert.equal(evidence.modelObservations.length, 1); + const observation = json(evidence.modelObservations[0]); + assert.equal(observation.error, false); + assert.equal(observation.models.length, 1); + assert.equal(observation.models[0].complete, true); + assert.equal(observation.models[0].repairRequired, false); + assert.equal(observation.runtimeFingerprint, runtime.fingerprint); + const model = selectInstalledModelIdentity(observation, repoId); + assert.equal(model?.selectedRevision, revision); + assert.equal(model?.modelRevision, `${repoId}@${revision}`); + const measurement = task.runtimeMeasurement; + assert.equal(measurement.backend, 'rocm'); + assert.equal(measurement.device, 'cuda:0'); + assert.equal(measurement.peakMeasurementVersion, 2); + assert.ok(measurement.elapsedSeconds > 0 && measurement.elapsedSeconds <= 7200); + assert.ok(measurement.peakAllocatedBytes > 0); + const media = await verifyLayerCollection(output, evidence.outputs, layers, read); + assert.ok(readFileSync(evidencePath).equals(descriptorBytes)); + const receipt = { + schemaVersion: 1, + format: 'modiff.canonical-workflow-run-receipt.v1', + proofKind: 'real_backend_input_bound_model_variant', + ...target, + graphHash: identity.hash, + capturedAt: new Date(task.completed_at * 1000).toISOString(), + taskId: task.task_id, + outputId: output.id, + runtimeFingerprint: normalizeBackendRuntime(runtime).lockFingerprint, + backendSourceFingerprint: runtimeSource.identity.fingerprint, + backendContractFingerprint: backendContract.fingerprint, + resourceCandidateId: null, + outputHash: output.mediaCollectionHash, + executionDurationSeconds: measurement.elapsedSeconds, + peakMemoryBytes: measurement.peakAllocatedBytes, + canonicalDefaultsExecuted: false, + inputBinding: { nodeId: sourceId, field: 'file', sha256: input.file.sha256, decodedImage }, + promptBinding: { nodeId: splitId, field: 'prompt', sha256: digest(prompt) }, + decodedOutput: { kind: 'image_collection', items: media }, + observationLimits: { + fullConsumedFieldAccounting: false, + orderedLayerStack: true, + physicalPlatformQualification: false, + }, + qualificationClaims: { + publicTemplate: false, + qualityApproved: false, + rightsApproved: false, + hardwareQualified: false, + modelResourceQualified: false, + }, + }; + return { + receipt, + descriptorBytes, + evidence, + evidenceRoot: root, + retainedFiles, + provenance: { format: 'modiff.input-bound-model-variant-proof.v1', receipt }, + }; +} + +async function verifyLayerCollection(output, refs, layers, read) { + assert.equal(refs.length, layers.length); + assert.equal(output.mediaItems.length, layers.length); + const hashes = output.mediaItems.map(({ mediaHash }) => mediaHash); + assert.ok(hashes.every((hash) => /^sha256:bytes:[a-f0-9]{64}$/u.test(hash))); + // The backend uses Python's default JSON separator for this ordered list. + const serialized = `[${hashes.map((hash) => JSON.stringify(hash)).join(', ')}]`; + assert.equal(output.mediaHash, `sha256:collection:${digest(serialized)}`); + assert.equal(output.mediaCollectionHash, output.mediaHash); + const provenance = output.backendProvenance; + assert.equal(provenance.source, 'backend-record'); + assert.equal(provenance.backendExecutionId, output.taskId); + for (const field of [ + 'clientRunId', + 'runInputHash', + 'workflowTabId', + 'nodeId', + 'fieldKey', + 'attemptIndex', + 'mediaHash', + 'mediaCollectionHash', + 'mediaItems', + ]) + same(provenance[field], output[field]); + assert.equal(provenance.mediaPath, refs[0].backendPath); + const decoded = []; + for (const [index, ref] of refs.entries()) { + const item = output.mediaItems[index]; + const layer = layers[index]; + assert.equal(layer.mode, 'RGBA'); + assert.equal(ref.mediaType, 'image'); + assert.equal(item.index, index); + assert.equal(item.taskId, output.taskId); + assert.equal(item.clientRunId, output.clientRunId); + assert.equal(item.runInputHash, output.runInputHash); + assert.equal(item.attemptIndex, 0); + assert.equal(item.backendPath, ref.backendPath); + assert.equal(item.backendPath, `@data/studio/outputs/${output.id}_item_0${index}.webp`); + assert.equal(item.mediaHash, `sha256:bytes:${ref.file.sha256}`); + assert.equal(item.contentType, 'image/webp'); + const { bytes, file } = read(ref.file); + assert.equal(item.byteSize, bytes.length); + const { hash, width, height } = await decodedMediaHash(file, 'image'); + same([width, height], [layer.width, layer.height], 'Delivered layer geometry differs.'); + same([width, height], [item.width, item.height], 'Saved layer geometry differs.'); + decoded.push({ hash, width, height, encodedSha256: ref.file.sha256 }); + } + return decoded; +} diff --git a/scripts/layer-decomposition-evidence.test.mjs b/scripts/layer-decomposition-evidence.test.mjs new file mode 100644 index 00000000..62d54ebb --- /dev/null +++ b/scripts/layer-decomposition-evidence.test.mjs @@ -0,0 +1,72 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { dirname, join, resolve } from 'node:path'; +import test from 'node:test'; +import { fileURLToPath } from 'node:url'; +import { readCanonicalEvidenceFile, readCanonicalWorkflowEvidence } from './release-contract-core.mjs'; + +const clientRoot = fileURLToPath(new URL('..', import.meta.url)); +const backendRoot = resolve(process.env.MODIFF_BACKEND_DIR ?? join(clientRoot, '../MoDiff')); +const fixture = process.env.MODIFF_LAYER_DECOMPOSITION_EVIDENCE; +const workflowId = 'QwenImageLayeredPipeline:layer_decomposition'; + +test( + 'the retained layer run binds the exact source, generation controls and ordered layer stack', + { skip: !fixture }, + async () => { + const args = { clientRoot, backendRoot, workflowId, evidencePath: resolve(fixture) }; + const verified = await readCanonicalWorkflowEvidence(args); + assert.equal(verified.receipt.proofKind, 'real_backend_input_bound_model_variant'); + assert.equal(verified.receipt.observationLimits.orderedLayerStack, true); + assert.equal(verified.receipt.decodedOutput.items.length, 4); + assert.equal(new Set(verified.receipt.decodedOutput.items.map((item) => item.encodedSha256)).size, 4); + const staging = mkdtempSync(join(tmpdir(), 'modiff-layer-evidence-')); + try { + for (const ref of verified.retainedFiles) { + assert.match(ref.path, /^[a-z0-9._-]+$/iu); + writeFileSync(join(staging, ref.path), readCanonicalEvidenceFile(dirname(fixture), ref).bytes); + } + const changedPath = join(staging, 'changed.json'); + for (const [action, mutate, message] of [ + [ + 'LayerDecompose', + (media) => { + media.controls.cfg_normalize = !media.controls.cfg_normalize; + }, + /Layer adapter controls differ/u, + ], + [ + 'Preview', + (media) => { + media.inputs.image.reverse(); + }, + /Layer order changed before export/u, + ], + ]) { + const descriptor = structuredClone(verified.evidence); + const read = (ref) => JSON.parse(readFileSync(join(dirname(fixture), ref.path))); + const output = read(descriptor.outputPackage); + const run = read(descriptor.runDetail); + const fields = output.latestOutput.resolvedExecutionInputs; + mutate(fields.nodes.find((node) => node.action === action).mediaEvidence); + run.outputs[0].resolvedExecutionInputs = fields; + for (const [key, value] of [ + ['outputPackage', output], + ['runDetail', run], + ]) { + const ref = descriptor[key]; + const bytes = Buffer.from(JSON.stringify(value)); + ref.sha256 = createHash('sha256').update(bytes).digest('hex'); + ref.bytes = bytes.length; + writeFileSync(join(staging, ref.path), bytes); + } + writeFileSync(changedPath, JSON.stringify(descriptor)); + await assert.rejects(() => readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath }), message); + } + } finally { + rmSync(staging, { recursive: true, force: true }); + } + }, +); diff --git a/scripts/layout-conditioning.test.mjs b/scripts/layout-conditioning.test.mjs new file mode 100644 index 00000000..0dbc9e89 --- /dev/null +++ b/scripts/layout-conditioning.test.mjs @@ -0,0 +1,889 @@ +import assert from 'node:assert/strict'; +import { after, before, test } from 'node:test'; +import path from 'node:path'; +import fs from 'node:fs'; +import { fileURLToPath } from 'node:url'; +import React from 'react'; +import { renderToStaticMarkup } from 'react-dom/server'; +import { createServer } from 'vite'; + +const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); +let server; +let layout; +let fields; +let schema; +let runtime; +let flow; +let studio; +let inspector; +let exporter; +let referenceContext; + +before(async () => { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, String(value)), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { + localStorage: globalThis.localStorage, + dispatchEvent: () => true, + location: { origin: 'http://127.0.0.1:5191' }, + }; + server = await createServer({ + root: ROOT, + configFile: false, + cacheDir: path.join(ROOT, 'reviews/layout-conditioning-test-cache'), + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + layout = await server.ssrLoadModule('/src/studio/layoutConditioning.ts'); + fields = await server.ssrLoadModule('/src/fields/LayoutConditioningField.tsx'); + schema = await server.ssrLoadModule('/src/studio/blockSchemaV2.ts'); + runtime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); + flow = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + studio = await server.ssrLoadModule('/src/stores/useStudioStore.ts'); + inspector = await server.ssrLoadModule('/src/studio/graphNodeControls.ts'); + exporter = await server.ssrLoadModule('/src/stores/flowGraphExport.ts'); + referenceContext = await server.ssrLoadModule('/src/studio/layoutReferenceContext.ts'); +}); + +after(async () => { + await server?.close(); + delete globalThis.localStorage; + delete globalThis.window; +}); + +function region(overrides = {}) { + return { id: 'subject', description: ' A red fox 🦊\n', targetBox: [0.1, 0.2, 0.7, 0.9], ...overrides }; +} + +function value(regions = [region()]) { + return { schemaVersion: 1, coordinateSpace: 'normalized_xyxy', regions }; +} + +const support = { schemaVersion: 1, sourceRegions: false }; + +test('bound reference summaries have exact bounded data and never substitute for selected capability', () => { + const summary = { + schemaVersion: 1, + ownerFingerprint: 'sha256:' + 'a'.repeat(64), + bindingFingerprint: 'sha256:' + 'b'.repeat(64), + taskId: 'reference_task', + attemptIndex: 0, + runInputHash: 'run_1234abcd', + references: [{ referenceId: 'sha256:' + 'c'.repeat(64), sourceSize: [64, 48], processedSize: [64, 48] }], + }; + assert.deepEqual(layout.parseLayoutReferenceSummary(summary), summary); + for (const change of [ + { schemaVersion: true }, + { references: [] }, + { references: Array(11).fill(summary.references[0]) }, + { bindingFingerprint: ['sha256:' + 'b'.repeat(64)] }, + { taskId: null }, + { attemptIndex: true }, + { runInputHash: 'guessed' }, + { referenceCount: 1 }, + ]) + assert.throws(() => layout.parseLayoutReferenceSummary({ ...summary, ...change })); + for (const change of [ + { sourceSize: [0, 48] }, + { processedSize: [100000, 100000] }, + { referenceId: 'sha256:' + 'C'.repeat(64) }, + { index: 0 }, + ]) + assert.throws(() => + layout.parseLayoutReferenceSummary({ ...summary, references: [{ ...summary.references[0], ...change }] }), + ); + const selected = { schemaVersion: 2, sourceRegions: false, supportsBoundSourceRegions: true }; + assert.deepEqual(layout.parseLayoutConditioningSupport(selected), selected); + for (const value of [ + { ...selected, supportsBoundSourceRegions: false }, + { ...selected, schemaVersion: 1 }, + { ...selected, referenceCount: 1 }, + ]) + assert.throws(() => layout.parseLayoutConditioningSupport(value)); + const source = { + schemaVersion: 2, + coordinateSpace: 'normalized_xyxy', + regions: [ + { + id: 'subject', + action: 'remove', + description: 'Remove exact source', + targetBox: null, + source: { referenceIndex: 0, box: [0, 0, 1, 1], expectedReferenceId: summary.references[0].referenceId }, + }, + ], + }; + assert.throws(() => layout.validateLayoutConditioningSupport(source, selected), /unavailable/); + const bound = { schemaVersion: 2, sourceRegions: true, references: summary.references }; + layout.validateLayoutConditioningSupport(source, bound); + const changed = structuredClone(source); + changed.regions[0].source.expectedReferenceId = summary.bindingFingerprint; + assert.throws(() => layout.validateLayoutConditioningSupport(changed, bound), /rebind/); +}); + +test('incremental bound edits preserve only identical existing stale siblings while full-layout validation still refuses', () => { + const ids = ['a', 'b', 'c'].map((letter) => `sha256:${letter.repeat(64)}`); + const previous = { + schemaVersion: 2, + coordinateSpace: 'normalized_xyxy', + regions: ids.map((expectedReferenceId, referenceIndex) => + region({ + id: `source_${referenceIndex}`, + action: 'relocate', + source: { referenceIndex, expectedReferenceId, box: [0, 0, 1, 1] }, + }), + ), + }; + const current = { + schemaVersion: 2, + sourceRegions: true, + references: [ids[1], ids[2], ids[0]].map((referenceId) => ({ + referenceId, + sourceSize: [64, 48], + processedSize: [64, 48], + })), + }; + const before = structuredClone(previous); + const partial = structuredClone(previous); + partial.regions[0].source.referenceIndex = 2; + assert.deepEqual(layout.parseLayoutConditioningEdit(partial, previous, current), partial); + assert.deepEqual(previous, before, 'A permitted edit must not silently rebind or mutate the other saved regions.'); + assert.throws(() => layout.validateLayoutConditioningSupport(partial, current), /rebind/); + const reordered = { ...partial, regions: [partial.regions[2], partial.regions[0], partial.regions[1]] }; + assert.deepEqual(layout.parseLayoutConditioningEdit(reordered, partial, current), reordered); + assert.throws(() => layout.validateLayoutConditioningSupport(reordered, current), /rebind/); + const removed = { ...partial, regions: partial.regions.slice(0, 2) }; + assert.deepEqual(layout.parseLayoutConditioningEdit(removed, partial, current), removed); + assert.throws(() => layout.validateLayoutConditioningSupport(removed, current), /rebind/); + const repaired = structuredClone(removed); + repaired.regions[1].source.referenceIndex = 0; + assert.deepEqual(layout.parseLayoutConditioningEdit(repaired, removed, current), repaired); + layout.validateLayoutConditioningSupport(repaired, current); + const fewer = { ...current, references: [current.references[2]] }; + const stillUnbound = structuredClone(previous); + stillUnbound.regions[0].source.referenceIndex = 0; + assert.deepEqual(layout.parseLayoutConditioningEdit(stillUnbound, previous, fewer), stillUnbound); + assert.throws(() => layout.validateLayoutConditioningSupport(stillUnbound, fewer), /no longer bound/); + const onlyValid = { ...repaired, regions: [repaired.regions[0]] }; + assert.deepEqual(layout.parseLayoutConditioningEdit(onlyValid, removed, current), onlyValid); + layout.validateLayoutConditioningSupport(onlyValid, current); +}); + +test('incremental bound edits refuse changed or foreign stale data and retain global schema and capability boundaries', async (t) => { + const id = (letter) => `sha256:${letter.repeat(64)}`; + const previous = { + schemaVersion: 2, + coordinateSpace: 'normalized_xyxy', + regions: [ + region({ + id: 'first', + action: 'relocate', + source: { referenceIndex: 0, expectedReferenceId: id('a'), box: [0, 0, 1, 1] }, + }), + region({ + id: 'second', + action: 'remove', + targetBox: null, + source: { referenceIndex: 1, expectedReferenceId: id('b'), box: [0, 0, 1, 1] }, + }), + ], + }; + const current = { + schemaVersion: 2, + sourceRegions: true, + references: [id('b'), id('a')].map((referenceId) => ({ + referenceId, + sourceSize: [64, 48], + processedSize: [64, 48], + })), + }; + const partial = structuredClone(previous); + partial.regions[0].source.referenceIndex = 1; + for (const [name, change] of [ + [ + 'description', + (next) => { + next.regions[1].description += ' changed'; + }, + ], + [ + 'source box', + (next) => { + next.regions[1].source.box[0] = 0.1; + }, + ], + [ + 'foreign identity', + (next) => { + next.regions[1].source.expectedReferenceId = id('c'); + }, + ], + [ + 'renamed identity', + (next) => { + next.regions[1].id = 'unseen'; + }, + ], + [ + 'new stale sibling', + (next) => { + next.regions.push({ ...structuredClone(next.regions[1]), id: 'new' }); + }, + ], + [ + 'action', + (next) => { + next.regions[1].action = 'relocate'; + next.regions[1].targetBox = [0, 0, 1, 1]; + }, + ], + [ + 'unknown property', + (next) => { + next.extra = true; + }, + ], + [ + 'duplicate region ID', + (next) => { + next.regions[1].id = 'first'; + }, + ], + [ + 'schema', + (next) => { + next.schemaVersion = 3; + }, + ], + [ + 'region count', + (next) => { + next.regions = Array.from({ length: 33 }, (_, index) => ({ ...next.regions[1], id: `r${index}` })); + }, + ], + [ + 'total bytes', + (next) => { + next.regions = Array.from({ length: 20 }, (_, index) => ({ + ...next.regions[1], + id: `r${index}`, + description: 'x'.repeat(4096), + })); + }, + ], + ]) + await t.test(name, () => { + const next = structuredClone(partial); + change(next); + assert.throws(() => layout.parseLayoutConditioningEdit(next, previous, current), /Invalid layout/); + }); + for (const selected of [ + { schemaVersion: 2, sourceRegions: false, supportsBoundSourceRegions: true }, + { schemaVersion: 2, sourceRegions: false }, + { schemaVersion: 1, sourceRegions: true, referenceCount: 2 }, + ]) + assert.throws(() => layout.parseLayoutConditioningEdit(partial, previous, selected), /unavailable/); + const legacy = { + schemaVersion: 1, + coordinateSpace: 'normalized_xyxy', + regions: [region({ source: { referenceIndex: 1, box: [0, 0, 1, 1] } })], + }; + assert.throws(() => layout.parseLayoutConditioningEdit(legacy, legacy, current), /version two rebind/); + assert.throws(() => layout.parseLayoutConditioningEdit(partial, null, current), /rebind/); + assert.throws(() => layout.parseLayoutConditioningEdit(partial, { ...previous, extra: true }, current), /unknown/); + assert.equal(layout.parseLayoutConditioningEdit(null, previous, current), null); +}); + +test('ordinary and Block summaries bind durable source ancestry and task while excluding runtime signal payloads', () => { + const source = { + id: 'reference', + type: 'custom', + position: { x: 0, y: 0 }, + data: { + type: 'custom', + category: 'Fixture', + label: 'Reference', + module: 'modules.Test', + action: 'EncodeReference', + params: { + file: { + type: 'string', + display: 'text', + value: 'reference-a.png', + signal: { direction: 'input', origin: 'source-file', value: { runtimeModel: 'current-owner' } }, + }, + reference_binding: { type: 'reference_conditioning', display: 'output' }, + layout_reference_summary: { type: 'string', display: 'output', hidden: true }, + }, + }, + }; + const encode = { + id: 'prompt', + type: 'custom', + position: { x: 400, y: 0 }, + data: { + type: 'custom', + category: 'Fixture', + label: 'Prompt', + module: 'modules.Test', + action: 'EncodePrompt', + params: { + prompt: { type: 'string', value: 'Raw ' }, + layout: { type: 'layout_conditioning', display: 'layout', value: null }, + reference_binding: { type: 'reference_conditioning', display: 'input' }, + }, + }, + }; + const edges = [ + { + id: 'binding', + source: 'reference', + sourceHandle: 'reference_binding', + target: 'prompt', + targetHandle: 'reference_binding', + }, + ]; + const definition = schema.migrateUserBlockDefinitionV1({ + id: 'source-context', + name: 'Encode Inputs', + version: 1, + nodes: [source, encode], + edges, + inputs: [], + outputs: [], + exposedParams: [{ id: 'layout', kind: 'graph-param', label: 'Layout', nodeId: 'prompt', paramKey: 'layout' }], + createdAt: 1, + updatedAt: 1, + }); + const grouped = runtime.createBlockRootNodeV2( + schema.createBlockInstanceV2(definition, { + instanceId: 'group', + position: { x: 0, y: 0 }, + size: { width: 368, height: 480 }, + }), + ); + const visualGroups = ['modiff.visual-stages.v1/inputs', 'modiff.visual-stages.v2/inputs'].map((provider, index) => { + const base = { ...definition, source: { kind: 'user', provider } }; + const visualDefinition = schema.normalizeBlockDefinitionV2({ + ...base, + contentHash: schema.blockDefinitionContentHashV2(base), + }); + return runtime.createBlockRootNodeV2( + schema.createBlockInstanceV2(visualDefinition, { + instanceId: `visual-group-${index}`, + position: { x: 0, y: 0 }, + size: { width: 368, height: 480 }, + }), + ); + }); + const expanded = runtime.materializeBlockProjectionV2( + runtime.createBlockRootNodeV2(runtime.setBlockPresentationV2(grouped.data.blockInstanceV2, { expanded: true })), + ); + for (const graph of [ + { nodes: [source, encode], edges, nodeId: 'prompt' }, + { nodes: [grouped], edges: [], nodeId: 'group' }, + ...visualGroups.map((root) => ({ nodes: [root], edges: [], nodeId: root.id })), + { ...expanded, nodeId: runtime.blockProjectionNodeIdV2('group', 'prompt') }, + ]) { + const context = referenceContext.layoutReferenceContext(graph.nodes, graph.edges, graph.nodeId, 'layout'); + assert.ok(context); + assert.notEqual(context.summaryNodeId, context.nodeId, 'the normal cache belongs to the actual image supplier'); + assert.equal( + context.summaryNodeId, + flow + .expandFlowExecutionGraph(graph.nodes, graph.edges) + .nodes.find((node) => node.data.action === 'EncodeReference').id, + 'cache reads use the same actual supplier identity as Run, including visual stage Blocks', + ); + const summary = { + schemaVersion: 1, + ownerFingerprint: 'sha256:' + 'a'.repeat(64), + bindingFingerprint: 'sha256:' + 'b'.repeat(64), + taskId: 'actual-task', + attemptIndex: 0, + runInputHash: 'run_1234abcd', + references: [], + }; + const record = { + task: { task_id: 'actual-task', attempt_index: 0, run_input_hash: 'run_1234abcd' }, + workflow_id: 'tab', + workflow_snapshot: { nodes: graph.nodes, edges: graph.edges }, + }; + referenceContext.validateLayoutReferenceRun(record, summary, context, graph.nodeId, 'layout', 'tab'); + for (const change of [ + { workflow_id: 'foreign' }, + { task: { ...record.task, task_id: 'foreign' } }, + { task: { ...record.task, run_input_hash: 'run_00000000' } }, + { workflow_snapshot: { nodes: [], edges: [] } }, + ]) + assert.throws(() => + referenceContext.validateLayoutReferenceRun( + { ...record, ...change }, + summary, + context, + graph.nodeId, + 'layout', + 'tab', + ), + ); + } + const before = referenceContext.layoutReferenceContext([source, encode], edges, 'prompt', 'layout'); + assert.equal(referenceContext.layoutReferenceContext([grouped], [], 'group/unknown', 'layout'), null); + assert.equal( + referenceContext.layoutReferenceContext( + [grouped], + [], + runtime.blockProjectionNodeIdV2('group', 'unknown'), + 'layout', + ), + null, + ); + const forgedProjection = structuredClone(expanded); + forgedProjection.nodes.find( + (node) => node.id === runtime.blockProjectionNodeIdV2('group', 'prompt'), + ).data.blockProjectionNodeId = 'unknown'; + assert.equal( + referenceContext.layoutReferenceContext( + forgedProjection.nodes, + forgedProjection.edges, + runtime.blockProjectionNodeIdV2('group', 'prompt'), + 'layout', + ), + null, + ); + const changedPayload = structuredClone(source); + changedPayload.data.params.file.signal.value = { runtimeModel: 'refreshed-owner' }; + assert.equal( + referenceContext.layoutReferenceContext([changedPayload, encode], edges, 'prompt', 'layout').key, + before.key, + ); + const changedSignal = structuredClone(source); + changedSignal.data.params.file.signal.origin = 'different-source-declaration'; + assert.notEqual( + referenceContext.layoutReferenceContext([changedSignal, encode], edges, 'prompt', 'layout').key, + before.key, + ); + const afterPrompt = structuredClone(encode); + afterPrompt.data.params.prompt.value = 'Changed raw prompt'; + afterPrompt.data.params.layout.value = { schemaVersion: 2, coordinateSpace: 'normalized_xyxy', regions: [] }; + assert.equal( + referenceContext.layoutReferenceContext([source, afterPrompt], edges, 'prompt', 'layout').key, + before.key, + ); + const changedSource = structuredClone(source); + changedSource.data.params.file.value = 'reference-b.png'; + assert.notEqual( + referenceContext.layoutReferenceContext([changedSource, encode], edges, 'prompt', 'layout').key, + before.key, + ); + assert.equal( + referenceContext.layoutReferenceContext( + [source, encode], + [...edges, { ...edges[0], id: 'duplicate' }], + 'prompt', + 'layout', + ), + null, + ); + for (const alter of [ + (node) => { + delete node.data.params.layout_reference_summary; + }, + (node) => { + node.data.params.layout_reference_summary.type = 'reference_conditioning'; + }, + (node) => { + node.data.params.layout_reference_summary.display = 'input'; + }, + (node) => { + node.data.params.reference_binding.type = 'string'; + }, + ]) { + const missingDeclaration = structuredClone(source); + alter(missingDeclaration); + assert.equal( + referenceContext.layoutReferenceContext([missingDeclaration, encode], edges, 'prompt', 'layout'), + null, + ); + } +}); + +test('version two shared action grammar preserves removal and ten-reference drafts without granting source authority', async (t) => { + const fixture = JSON.parse(fs.readFileSync(path.join(ROOT, 'tests/fixtures/layout-conditioning.v2.json'), 'utf8')); + const currentSupport = layout.parseLayoutConditioningSupport({ schemaVersion: 2, sourceRegions: false }); + for (const item of fixture.valid) + await t.test(item.name, () => { + const parsed = layout.parseLayoutConditioning(item.layout); + assert.deepEqual(parsed, item.layout); + if (parsed.regions.some((region) => region.source)) + assert.throws(() => layout.validateLayoutConditioningSupport(parsed, currentSupport), /unavailable/); + else layout.validateLayoutConditioningSupport(parsed, currentSupport); + }); + for (const item of fixture.invalid) + await t.test(item.name, () => assert.throws(() => layout.parseLayoutConditioning(item.layout))); + const removal = structuredClone(fixture.valid[1].layout); + for (const index of [0, 7, 8, 9]) { + removal.regions[0].source.referenceIndex = index; + assert.deepEqual(layout.parseLayoutConditioning(removal), removal); + } + for (const invalid of [10, -1, true, '9']) { + removal.regions[0].source.referenceIndex = invalid; + assert.throws(() => layout.parseLayoutConditioning(removal)); + } + removal.regions[0].source.referenceIndex = 9; + for (const invalid of ['', 'sha256:' + 'A'.repeat(64), null, ['sha256:' + 'a'.repeat(64)]]) { + removal.regions[0].source.expectedReferenceId = invalid; + assert.throws(() => layout.parseLayoutConditioning(removal)); + } + assert.throws(() => + layout.parseLayoutConditioningSupport({ schemaVersion: 2, sourceRegions: true, referenceCount: 10 }), + ); +}); + +test('shared backend fixture agrees on generic draft validation, with source execution capability separate', async (t) => { + const fixture = JSON.parse(fs.readFileSync(path.join(ROOT, 'tests/fixtures/layout-conditioning.v1.json'), 'utf8')); + for (const item of fixture.valid) { + await t.test(item.name, () => { + const parsed = layout.parseLayoutConditioning(item.layout); + assert.deepEqual(parsed, item.layout); + if (item.referenceCount) { + assert.throws(() => layout.validateLayoutConditioningSupport(parsed, support), /unavailable/); + } else layout.validateLayoutConditioningSupport(parsed, support); + }); + } + for (const item of fixture.invalid) { + await t.test(item.name, () => assert.throws(() => layout.parseLayoutConditioning(item.layout))); + } +}); + +test('raw mode is only null; structured values preserve region order, description bytes and normalized coordinates', () => { + assert.equal(layout.parseLayoutConditioning(null), null); + const input = value([region(), region({ id: 'background', description: '背景', targetBox: [0, 0, 1, 1] })]); + const parsed = layout.parseLayoutConditioning(input); + assert.deepEqual(parsed, input); + parsed.regions[0].targetBox[0] = 0; + assert.equal(input.regions[0].targetBox[0], 0.1); + assert.deepEqual(layout.parseLayoutConditioning(value([])), value([])); +}); + +test('strict layout grammar refuses malformed JSON data without invoking getters', async (t) => { + let invoked = false; + const accessor = { ...value() }; + Object.defineProperty(accessor, 'regions', { + enumerable: true, + get() { + invoked = true; + return []; + }, + }); + const cases = [ + undefined, + '', + 'null', + [], + true, + 1, + { ...value(), schemaVersion: true }, + { ...value(), coordinateSpace: ['normalized_xyxy'] }, + { ...value(), mode: 'structured' }, + { ...value(), regions: undefined }, + Object.create(value()), + accessor, + Object.defineProperty(value(), 'regions', { enumerable: false, value: [] }), + Object.assign(value(), { [Symbol('extra')]: 1 }), + value(Array(1)), + value(Object.assign([region()], { extra: true })), + value([region({ source: null })]), + value([region({ source: undefined })]), + value([region({ unknown: 1 })]), + ]; + for (const [index, input] of cases.entries()) { + await t.test(String(index), () => assert.throws(() => layout.parseLayoutConditioning(input), /Invalid layout/)); + } + assert.equal(invoked, false); +}); + +test('IDs, Unicode text and box boundaries are validated without rewriting content', async (t) => { + for (const id of ['', '1subject', 'has space', 'é', 'ref_image_0', 'ref_image_100', 'a'.repeat(65), 'subject\n']) { + await t.test(`ID ${JSON.stringify(id)}`, () => + assert.throws(() => layout.parseLayoutConditioning(value([region({ id })]))), + ); + } + assert.throws(() => layout.parseLayoutConditioning(value([region(), region()])), /unique/); + for (const description of [ + '', + ' \t\n', + '\u0085', + '\u001c', + '\ud800', + '\udc00', + 'x\ud800y', + 'a'.repeat(4097), + '🦊'.repeat(4097), + ]) { + await t.test(`description ${description.length}`, () => + assert.throws(() => layout.parseLayoutConditioning(value([region({ description })]))), + ); + } + assert.equal( + layout.parseLayoutConditioning(value([region({ description: '🦊'.repeat(4096) })])).regions[0].description.length, + 8192, + ); + assert.equal( + layout.parseLayoutConditioning(value([region({ description: '\ufeff' })])).regions[0].description, + '\ufeff', + ); + for (const targetBox of [ + [0, 0, 0, 1], + [0, 1, 1, 0], + [0, 0, 1], + [0, 0, 1, 1, 1], + [-0.1, 0, 1, 1], + [0, 0, 1.1, 1], + [false, 0, 1, 1], + ['0', 0, 1, 1], + [NaN, 0, 1, 1], + [0, 0, Infinity, 1], + ]) { + await t.test(`box ${JSON.stringify(targetBox)}`, () => + assert.throws(() => layout.parseLayoutConditioning(value([region({ targetBox })]))), + ); + } +}); + +test('region count and total serialized UTF-8 byte cap are independent of JavaScript string length', () => { + const many = Array.from({ length: 32 }, (_, index) => region({ id: `r${index}`, description: 'x' })); + assert.equal(layout.parseLayoutConditioning(value(many)).regions.length, 32); + assert.throws(() => layout.parseLayoutConditioning(value([...many, region({ id: 'extra' })]))); + const unicode = value( + Array.from({ length: 8 }, (_, index) => region({ id: `r${index}`, description: '🦊'.repeat(2200) })), + ); + assert.ok(JSON.stringify(unicode).length < 65536); + assert.throws(() => layout.parseLayoutConditioning(unicode), /64 KiB/); + const base = value( + Array.from({ length: 15 }, (_, index) => + region({ id: `r${index}`, description: 'a'.repeat(4096), targetBox: [0, 0, 1, 1] }), + ), + ); + base.regions.push(region({ id: 'last', description: 'a', targetBox: [1e-7, 0, 1.0, 1.0] })); + const padding = 65536 - Buffer.byteLength(JSON.stringify(base)); + base.regions.at(-1).description += 'a'.repeat(padding); + assert.equal(Buffer.byteLength(JSON.stringify(base)), 65536); + assert.deepEqual(layout.parseLayoutConditioning(base), base); + base.regions.at(-1).description += 'a'; + assert.throws(() => layout.parseLayoutConditioning(base), /64 KiB/); +}); + +test('draft source regions need a strict declared capability and current reference count', () => { + const withSource = layout.parseLayoutConditioning( + value([region({ source: { referenceIndex: 1, box: [0, 0.1, 0.5, 1] } })]), + ); + assert.throws(() => layout.validateLayoutConditioningSupport(withSource, support), /unavailable/); + layout.validateLayoutConditioningSupport( + withSource, + layout.parseLayoutConditioningSupport({ schemaVersion: 1, sourceRegions: true, referenceCount: 2 }), + ); + assert.throws( + () => + layout.validateLayoutConditioningSupport(withSource, { + schemaVersion: 1, + sourceRegions: true, + referenceCount: 1, + }), + /no longer bound/, + ); + for (const input of [ + undefined, + {}, + { ...support, referenceCount: 0 }, + { ...support, sourceRegions: 'false' }, + { schemaVersion: 1, sourceRegions: true }, + { schemaVersion: 1, sourceRegions: true, referenceCount: 9 }, + ]) { + assert.throws(() => layout.parseLayoutConditioningSupport(input)); + } + for (const referenceIndex of [-1, 8, 0.5, false, '0']) { + assert.throws(() => + layout.parseLayoutConditioning(value([region({ source: { referenceIndex, box: [0, 0, 1, 1] } })])), + ); + } +}); + +function fieldProps(value, overrides = {}) { + return { + nodeId: 'encode', + fieldKey: 'layout_conditioning', + label: 'Layout', + display: 'layout', + disabled: false, + hidden: false, + style: {}, + value, + default: null, + options: [], + dataType: 'layout_conditioning', + fieldType: 'layout', + module: 'modules.Test', + action: 'EncodeInputs', + updateStore: () => assert.fail('Rendering must not mutate the graph.'), + fieldOptions: { layoutConditioning: support }, + ...overrides, + }; +} + +test('actual layout field renders raw mode, accessible ordered regions, errors and disabled controls', () => { + const raw = renderToStaticMarkup(React.createElement(fields.default, fieldProps(null))); + assert.match(raw, /Raw prompt/); + assert.doesNotMatch(raw, /Target region layout|Add region/); + const structured = renderToStaticMarkup(React.createElement(fields.default, fieldProps(value(), { disabled: true }))); + assert.equal( + renderToStaticMarkup( + React.createElement(fields.default, fieldProps(undefined, { default: value(), disabled: true })), + ), + structured, + 'An untouched structured default must render the same selected mode as its effective value.', + ); + assert.match(structured, /Target region layout/); + assert.match(structured, /Edit subject/); + assert.match(structured, /Remove subject/); + assert.match(structured, /disabled=""/); + assert.ok(structured.indexOf('Edit subject') < structured.indexOf('Add region')); + const unsupported = renderToStaticMarkup( + React.createElement(fields.default, fieldProps(value(), { fieldOptions: {} })), + ); + assert.match(unsupported, /role="alert"/); + assert.doesNotMatch(unsupported, /Add region/); + const row = renderToStaticMarkup( + React.createElement(fields.LayoutRegionEditor, { + region: region(), + support, + disabled: false, + onApply: () => {}, + onCancel: () => {}, + }), + ); + for (const label of [ + 'Region ID', + 'Region description', + 'Target box left', + 'Target box top', + 'Target box right', + 'Target box bottom', + 'Apply region', + 'Cancel', + ]) + assert.ok(row.includes(label)); + assert.doesNotMatch(row, /Source reference index/); + assert.match(row, /Source regions are unavailable/); +}); + +test('ordinary and grouped JSON layout values survive real control updates, Undo, persistence and API export without changing prompts', () => { + const originalFlow = flow.useFlowStore.getState(); + const originalStudio = studio.useStudioStore.getState(); + try { + const prompt = ' Original prompt\n[{"id": raw syntax remains raw}] '; + const definition = schema.migrateUserBlockDefinitionV1({ + id: 'layout-test', + name: 'Encode Inputs', + version: 1, + nodes: [ + { + id: 'encode', + type: 'custom', + position: { x: 0, y: 0 }, + data: { + type: 'custom', + module: 'modules.Test', + action: 'EncodeInputs', + label: 'Encode Inputs', + params: { + prompt: { type: 'string', display: 'textarea', value: prompt }, + layout_conditioning: { + type: 'layout_conditioning', + display: 'layout', + value: null, + default: null, + fieldOptions: { layoutConditioning: support }, + }, + embeddings: { type: 'embeddings', display: 'output' }, + }, + }, + }, + ], + edges: [], + inputs: [], + outputs: [], + exposedParams: [ + { id: 'layout', kind: 'graph-param', label: 'Layout', nodeId: 'encode', paramKey: 'layout_conditioning' }, + ], + createdAt: 1, + updatedAt: 2, + }); + const block = runtime.createBlockRootNodeV2( + schema.createBlockInstanceV2(definition, { + instanceId: 'layout-block', + position: { x: 100, y: 120 }, + size: { width: 420, height: 480 }, + }), + ); + const ordinary = { + id: 'ordinary-encode', + type: 'custom', + position: { x: 0, y: 0 }, + data: structuredClone(definition.graph.nodes[0].data), + }; + flow.useFlowStore.setState({ + nodes: [ordinary], + edges: [], + historyPast: [], + historyFuture: [], + historyTransaction: null, + }); + flow.useFlowStore.getState().setParam(ordinary.id, 'layout_conditioning', layout.parseLayoutConditioning(value())); + const ordinaryApi = exporter.buildApiGraphExport({ + nodes: flow.useFlowStore.getState().nodes, + edges: [], + sid: 'test', + setParam: () => {}, + }); + assert.deepEqual(ordinaryApi.nodes[ordinary.id].params.layout_conditioning.value, value()); + assert.equal(ordinaryApi.nodes[ordinary.id].params.prompt.value, prompt); + flow.useFlowStore.setState({ + nodes: [block], + edges: [], + historyPast: [], + historyFuture: [], + historyTransaction: null, + }); + studio.useStudioStore.setState({ activeWorkflowTabId: 'layout-workflow' }); + inspector.updateGraphNodeControl('layout-workflow', block.id, 'layout', layout.parseLayoutConditioning(value())); + let state = flow.useFlowStore.getState(); + assert.equal(state.historyPast.length, 1); + assert.deepEqual(inspector.graphNodeControlParams(state.nodes[0]).layout.value, value()); + const api = state.exportGraph('test', undefined, { randomizeSeeds: false }); + const leaf = Object.values(api.nodes)[0]; + assert.equal(leaf.params.prompt.value, prompt); + assert.deepEqual(leaf.params.layout_conditioning.value, value()); + state.undo(); + assert.equal(inspector.graphNodeControlParams(flow.useFlowStore.getState().nodes[0]).layout.value, null); + flow.useFlowStore.getState().redo(); + state = flow.useFlowStore.getState(); + const persisted = JSON.parse(JSON.stringify(runtime.canonicalizePersistedBlockGraphV2(state.nodes, state.edges))); + assert.deepEqual(inspector.graphNodeControlParams(persisted.nodes[0]).layout.value, value()); + const restored = state.exportGraph('test', undefined, { sourceGraph: persisted, randomizeSeeds: false }); + assert.deepEqual(restored, api); + inspector.updateGraphNodeControl('layout-workflow', block.id, 'layout', null); + const raw = flow.useFlowStore.getState().exportGraph('test', undefined, { randomizeSeeds: false }); + assert.equal(Object.values(raw.nodes)[0].params.prompt.value, prompt); + assert.equal(Object.values(raw.nodes)[0].params.layout_conditioning.value, null); + } finally { + flow.useFlowStore.setState(originalFlow, true); + studio.useStudioStore.setState(originalStudio, true); + } +}); diff --git a/scripts/live-proof-provenance.mjs b/scripts/live-proof-provenance.mjs index bb0f24e9..1f1b9228 100644 --- a/scripts/live-proof-provenance.mjs +++ b/scripts/live-proof-provenance.mjs @@ -1,9 +1,86 @@ +import assert from 'node:assert/strict'; import { createHash } from 'node:crypto'; import { spawnSync } from 'node:child_process'; -import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs'; +import { existsSync, readFileSync, readdirSync, realpathSync, statSync } from 'node:fs'; import path from 'node:path'; +import { canonicalJsonHash as observationJsonHash } from './canonical-json.mjs'; import { normalizeResourceRouteBinding, resourceRouteBindingHash } from './resource-route-binding.mjs'; +import { createAppliedAdapterProof, validateAppliedAdapterProof } from './applied-adapter-provenance.mjs'; +import { + assertCanonicalAccountingGraphEnvelope, + canonicalDdimRuntimeHintAccounting, + canonicalPixArtSigmaPagRuntimeHintAccounting, + canonicalRetainedUnconditionalRuntimeHintAccounting, + directImagePromptRuntimeHintAccounting, +} from './canonical-runtime-hints.mjs'; +import { + capturedNativeGraphSubmission, + executedNativeMediaPlan, + OBSERVED_NATIVE_AUTO_VIDEO_SOURCE, + observedNativeAutoVideoPlan, + observedNativeAutoVideoResourceId, + observedNativeAutoVideoProofMatches, +} from './executed-native-media-resource.mjs'; +import { + OBSERVED_WORKFLOW_AUTO_SOURCE, + OBSERVED_WORKFLOW_AUTO_LORA_SOURCE, + OBSERVED_WORKFLOW_AUTO_AUDIO_SOURCE, + OBSERVED_WORKFLOW_AUTO_IMAGE_SOURCE, + OBSERVED_WORKFLOW_AUTO_LEGACY_SOURCE, + isObservedWorkflowAutoSource, + observedWorkflowAutoLoraProofMatches, + observedWorkflowAutoAudioProofMatches, + observedWorkflowAutoImageProofMatches, + observedWorkflowAutoLegacyProofMatches, + observedWorkflowAutoTextGeometryProofMatches, + observedWorkflowAutoPlan, + observedWorkflowAutoResourceId, + workerGraphHash, +} from './observed-workflow-auto-resource.mjs'; +import { + OBSERVED_WORKFLOW_AUTO_VIDEO_SOURCE, + observedWorkflowAutoVideoPlan, + observedWorkflowAutoVideoProofMatches, + observedWorkflowAutoVideoResourceId, +} from './observed-workflow-auto-video-resource.mjs'; +import { + OBSERVED_WORKFLOW_AUTO_CONTROL_SOURCE, + observedWorkflowAutoControlPlan, + observedWorkflowAutoControlProofMatches, + observedWorkflowAutoControlResourceId, +} from './observed-workflow-auto-control-resource.mjs'; +import { + OBSERVED_WORKFLOW_AUTO_MASKED_IMAGE_SOURCE, + observedWorkflowAutoMaskedImagePlan, + observedWorkflowAutoMaskedImageProofMatches, + observedWorkflowAutoMaskedImageResourceId, +} from './observed-workflow-auto-masked-image-resource.mjs'; +import { + OBSERVED_RETAINED_EXPERT_TEXT_SOURCE, + observedRetainedExpertTextPlan, + observedRetainedExpertTextProofMatches, + observedRetainedExpertTextResourceId, +} from './retained-native-text-resource.mjs'; +import { + OBSERVED_RETAINED_DIRECT_IMAGE_SOURCE, + observedRetainedDirectImagePlan, + observedRetainedDirectImageProofMatches, + observedRetainedDirectImageResourceId, +} from './retained-native-direct-image-resource.mjs'; +import { + OBSERVED_RETAINED_MODULAR_IMAGE_SOURCE, + observedRetainedModularImagePlan, + observedRetainedModularImageProofMatches, + observedRetainedModularImageResourceId, +} from './retained-native-modular-image-resource.mjs'; +import { + OBSERVED_NATIVE_MODULAR_IMAGE_SOURCE, + observedNativeModularImagePlan, + observedNativeModularImageProofMatches, + observedNativeModularImageResourceId, +} from './observed-native-modular-image-resource.mjs'; +export { validateAppliedAdapterProof } from './applied-adapter-provenance.mjs'; export const LIVE_PROOF_PROVENANCE_SCHEMA_VERSION = 2; export const LIVE_PROOF_PROVENANCE_FORMAT = 'modiff.live-proof.provenance.v2'; @@ -115,6 +192,9 @@ export function liveProofLockHash(provenance) { deterministicFingerprint: provenance?.runtime?.deterministic?.fingerprint, outputCollectionHash: provenance?.output?.collectionHash, ...(provenance?.routeBindingHash ? { routeBindingHash: provenance.routeBindingHash } : {}), + ...(provenance?.adapterApplicationsHash !== undefined + ? { adapterApplicationsHash: provenance.adapterApplicationsHash } + : {}), }; return sha256Value('live-proof-lock-v1', proofLock); } @@ -430,7 +510,888 @@ export function executedExpertPlanFromGraph(apiGraph) { }); } -export function executionPlanIdentity(apiGraph) { +/** + * Ordinary modular Run has no managed Studio plan. Recover only the reviewed + * BF16/FP8r or freshly captured native BF16 CPU-loading Expert contract from its executed owner and durable + * authoring context. This records a recipe, never runtime or fit qualification. + */ +function executedModularExpertPlanFromGraph(apiGraph, executionContext) { + const snapshot = apiGraph?.runtimeHints?.workflowSnapshot; + const form = snapshot?.studioForm; + if ( + form?.resourceMode !== 'expert' || + form.dtype !== 'bfloat16' || + ![undefined, 'native', 'fp8r'].includes(form.weightFormat) || + form.quantizationMode !== 'none' || + form.trustRemoteCode !== false || + typeof form.autoOffload !== 'boolean' || + typeof form.offloadMode !== 'string' || + typeof form.device !== 'string' || + typeof form.modelType !== 'string' || + !Array.isArray(snapshot.nodes) + ) + return null; + + const entries = nodeEntries(apiGraph); + const byId = new Map(entries); + const executedIds = new Set((apiGraph?.paths ?? []).flat().map(String)); + const owners = entries.filter( + ([id, node]) => + executedIds.has(id) && node?.module === 'modules.ModularDiffusers' && node.action === 'ModelsLoader', + ); + if (owners.length !== 1) return null; + const [ownerId, owner] = owners[0]; + for (const field of [ + 'repo_id', + 'revision', + 'model_type', + 'dtype', + 'weight_format', + 'device', + 'offload_mode', + 'auto_offload', + 'weight_loading_mode', + 'trust_remote_code', + ]) { + if (owner.params?.[field]?.sourceId != null || owner.params?.[field]?.sourceKey != null) return null; + } + const repo = apiParamValue(owner, 'repo_id'); + const revision = apiParamValue(owner, 'revision'); + const weightFormat = apiParamValue(owner, 'weight_format'); + if ( + !repo || + typeof repo !== 'object' || + Array.isArray(repo) || + repo.source !== 'hub' || + typeof repo.value !== 'string' || + !repo.value || + // Normal template forms retain model type and controls; the immutable + // repository lives on the executed loader. A retained optional form + // repository must agree, but its absence cannot erase that actual owner. + (form.modelRepo !== undefined && repo.value !== form.modelRepo) || + typeof revision !== 'string' || + !/^[0-9a-f]{40}$/u.test(revision) || + (weightFormat === 'fp8r' && apiParamValue(owner, 'model_type') !== form.modelType) || + apiParamValue(owner, 'dtype') !== form.dtype || + !['native', 'fp8r'].includes(weightFormat) || + (weightFormat === 'fp8r' ? form.weightFormat !== 'fp8r' : ![undefined, 'native'].includes(form.weightFormat)) || + apiParamValue(owner, 'device') !== form.device || + apiParamValue(owner, 'offload_mode') !== form.offloadMode || + apiParamValue(owner, 'auto_offload') !== form.autoOffload || + apiParamValue(owner, 'weight_loading_mode') !== 'cpu' || + apiParamValue(owner, 'trust_remote_code') !== false + ) + return null; + // A borrowed component or a quantization node changes the loading contract. + for (const field of [ + 'quant_config', + 'unet', + 'vae', + 'controlnet', + 'text_encoders', + 'pipeline_components', + 'image_encoder', + ]) { + const param = owner.params?.[field]; + if (param?.sourceId != null || param?.sourceKey != null || apiParamValue(owner, field) != null) return null; + } + + if (weightFormat === 'native') { + // Keep historical chooser aliases in the original form. The captured concrete + // loader names this manual recipe; ordered adapters are verified separately. + if (!nativeExpertOwnerCaptureMatches(apiGraph, executionContext, ownerId, owner)) return null; + // Older ordinary native graphs need not retain an ancillary Studio profile. + // The completed native owner supplies this manual loading recipe; absent + // authoring/profile identifiers remain absent instead of being inferred. + return orderedValue({ + source: 'executed-expert-modular-graph-v1', + device: form.device, + modelType: apiParamValue(owner, 'model_type'), + modelRepo: repo.value, + resolvedModelRepo: repo.value, + resolvedArtifact: repo.value, + modelRevision: revision, + pipelineClass: apiParamValue(owner, 'model_type'), + dtype: form.dtype, + weightFormat, + weightLoadingMode: 'cpu', + resourceMode: 'expert', + resolvedResourceMode: 'expert', + quantizationMode: 'none', + quantizedComponents: [], + autoOffload: form.autoOffload, + offloadMode: form.offloadMode, + }); + } + + // Read active durable leaves only, not definition snapshots or projected UI + // duplicates. Local Block roles use semantic IDs; external roles already use + // exported IDs. This is the blockProjectionNodeIdV2 identity format, not a + // reconstruction of graph execution or socket expansion. + const leaves = []; + const visit = (nodes, localIds = null) => { + for (const node of nodes) { + const data = node?.data; + if (!data || data.blockProjectionOwnerId) continue; + if (data.blockInstanceV2) { + const instance = data.blockInstanceV2; + const children = instance.effectiveGraph?.nodes; + if (localIds || typeof instance.instanceId !== 'string' || !Array.isArray(children)) return false; + const ids = new Map( + children.map((child) => [ + child.nodeId, + `block-v2-node:${instance.instanceId.length}:${instance.instanceId}:${child.nodeId?.length}:${child.nodeId}`, + ]), + ); + if (ids.size !== children.length || children.some((child) => typeof child.nodeId !== 'string')) return false; + if (!visit(children, ids)) return false; + } else { + const context = data.operationAuthoring?.ancillaryParent; + const roles = context?.parentRoleNodes; + leaves.push({ + data, + id: localIds?.get(node.nodeId) ?? node.id, + roles: + roles && Object.fromEntries(Object.entries(roles).map(([role, id]) => [role, localIds?.get(id) ?? id])), + }); + } + } + return true; + }; + if (!visit(snapshot.nodes)) return null; + const contexts = leaves.filter( + ({ data, id, roles }) => + data.module === 'modules.ModularDiffusers' && + data.action === 'EncodePrompt' && + roles?.models === ownerId && + roles.prompt === id, + ); + if (contexts.length !== 1) return null; + const hint = contexts[0].data.operationAuthoring; + const context = hint.ancillaryParent; + const parent = context.parent; + const roles = contexts[0].roles; + if ( + context.schemaVersion !== 1 || + parent?.pipelineClass !== form.modelType || + parent.task !== form.mode || + hint.operation?.pipelineClass !== form.modelType || + hint.operation.task !== form.mode || + typeof parent.executionProfileId !== 'string' || + !parent.executionProfileId || + typeof parent.authoringRecipeId !== 'string' || + !parent.authoringRecipeId || + typeof parent.baseSpecId !== 'string' || + !parent.baseSpecId.startsWith(`${parent.executionProfileId}:`) || + !/^studio-spec-v1-[0-9a-f]{8}$/u.test(parent.baseSpecContentHash ?? '') || + !/^studio-authoring-v1-[0-9a-f]{8}$/u.test(parent.authoringContentHash ?? '') || + new Set(Object.values(roles)).size !== Object.values(roles).length + ) + return null; + for (const [role, action] of [ + ['prompt', 'EncodePrompt'], + ['denoise', 'Denoise'], + ['decode', 'DecodeLatents'], + ]) { + const node = byId.get(roles[role]); + if (!executedIds.has(roles[role]) || node?.module !== 'modules.ModularDiffusers' || node.action !== action) + return null; + } + for (const [role, field, sourceRole, sourceField] of [ + ['prompt', 'text_encoders', 'models', 'text_encoders'], + ['denoise', 'unet', 'models', 'unet_out'], + ['denoise', 'scheduler', 'models', 'scheduler'], + ['denoise', 'embeddings', 'prompt', 'embeddings'], + ['decode', 'vae', 'models', 'vae_out'], + ['decode', 'latents', 'denoise', 'latents'], + ]) { + const source = connectedParamSource(byId.get(roles[role]), field); + if (source?.nodeId !== roles[sourceRole] || source.field !== sourceField) return null; + } + return orderedValue({ + source: 'executed-expert-modular-graph-v1', + device: form.device, + modelType: form.modelType, + modelRepo: repo.value, + resolvedModelRepo: repo.value, + resolvedArtifact: repo.value, + modelRevision: revision, + pipelineClass: form.modelType, + executionProfileId: parent.executionProfileId, + authoringRecipeId: parent.authoringRecipeId, + dtype: form.dtype, + weightFormat, + weightLoadingMode: 'cpu', + resourceMode: 'expert', + resolvedResourceMode: 'expert', + quantizationMode: 'none', + quantizedComponents: [], + autoOffload: form.autoOffload, + offloadMode: form.offloadMode, + }); +} + +// Native Expert recovery needs the original completed task and fresh consumed +// owner, not an authored graph alone. Uncaptured optional controls stay in the +// immutable graph; this identity grants neither fit nor per-control telemetry. +function nativeExpertOwnerCaptureMatches(apiGraph, context, ownerId, owner) { + try { + const { executionReceipt: task, executedOutput: output, taskId, modelIdentities } = context ?? {}; + const hints = apiGraph.runtimeHints, + snapshot = hints.workflowSnapshot; + assert.equal(snapshot.studioForm.mode, 'text_to_image'); + assert.equal(task.status, 'completed'); + assert.equal(task.attempt_index, 0); + assert.equal(output.attemptIndex, 0); + assert.equal(task.resourceCandidateId, null); + assert.equal(task.runtimePreparation.resourceMode, 'expert'); + assert.equal(task.runtimePreparation.performed, false); + assert.equal(task.runtimePreparation.residentRecipeReusable, false); + assert.equal(task.runtimePreparation.cleanup, null); + assert.equal(typeof task.task_id, 'string'); + assert(task.task_id); + if (taskId !== undefined) assert.equal(taskId, task.task_id); + assert.equal(output.taskId, task.task_id); + for (const [key, taskKey, outputKey] of [ + ['sid', 'sid', 'sid'], + ['workflowTabId', 'workflow_tab_id', 'workflowTabId'], + ['clientRunId', 'client_run_id', 'clientRunId'], + ['runInputHash', 'run_input_hash', 'runInputHash'], + ]) { + const v = key === 'sid' ? apiGraph.sid : hints[key]; + assert(typeof v === 'string' && v.length > 0); + assert.equal(task[taskKey], v); + assert.equal(output[outputKey], v); + } + same(output.apiGraphSnapshot, apiGraph); + same(task.workflow_snapshot, snapshot); + same(output.formSnapshot, snapshot.studioForm); + const entries = nodeEntries(apiGraph), + ids = new Set(entries.map(([id]) => id)); + const guardedCosmos = apiParamValue(owner, 'model_type') === 'Cosmos3OmniModularPipeline'; + const stages = guardedCosmos + ? ['WorkflowCosmos3OmniTextEncode', 'WorkflowCosmos3OmniDenoise', 'WorkflowCosmos3OmniDecode'] + : ['EncodePrompt', 'Denoise', 'DecodeLatents']; + const scopedActions = ['ModelsLoader', ...stages, ...(guardedCosmos ? [] : ['Guider', 'Lora'])]; + same([...new Set(apiGraph.paths.flat())].sort(), [...ids].sort()); + const byScope = new Map(); + for (const [id, node] of entries) { + const kind = node.module + '.' + node.action; + assert( + scopedActions + .map((a) => 'modules.ModularDiffusers.' + a) + .concat('modules.Image.Preview', ...(guardedCosmos ? [] : ['modules.Spandrel.Upscaler'])) + .includes(kind), + ); + const list = byScope.get(kind) ?? []; + list.push({ id, node }); + byScope.set(kind, list); + for (const param of Object.values(node.params)) if (param.sourceId) assert(ids.has(param.sourceId)); + } + for (const action of ['ModelsLoader', ...stages]) + assert.equal(byScope.get('modules.ModularDiffusers.' + action)?.length, 1); + assert((byScope.get('modules.ModularDiffusers.Guider')?.length ?? 0) <= 1); + assert((byScope.get('modules.Spandrel.Upscaler')?.length ?? 0) <= 1); + const previews = byScope.get('modules.Image.Preview'); + assert(previews?.length >= 1 && previews.length <= 2); + const [encode, denoise, decode] = stages.map((stage) => byScope.get('modules.ModularDiffusers.' + stage)[0]); + const connections = guardedCosmos + ? [ + ...[encode, denoise, decode].map((stage) => [stage, 'pipeline_components', ownerId, 'pipeline_components']), + [denoise, 'state_in', encode.id, 'state_out'], + [decode, 'state_in', denoise.id, 'state_out'], + ] + : [ + [encode, 'text_encoders', ownerId, 'text_encoders'], + [denoise, 'unet', ownerId, 'unet_out'], + [denoise, 'scheduler', ownerId, 'scheduler'], + [denoise, 'embeddings', encode.id, 'embeddings'], + [decode, 'vae', ownerId, 'vae_out'], + [decode, 'latents', denoise.id, 'latents'], + ]; + for (const [role, field, producer, port] of connections) + same(connectedParamSource(role.node, field), { nodeId: producer, field: port }); + const guider = byScope.get('modules.ModularDiffusers.Guider')?.[0]; + if (guider) same(connectedParamSource(denoise.node, 'guider'), { nodeId: guider.id, field: 'guider_out' }); + const upscaler = byScope.get('modules.Spandrel.Upscaler')?.[0]; + if (upscaler) same(connectedParamSource(upscaler.node, 'image'), { nodeId: decode.id, field: 'images' }); + assert(previews.some((p) => p.id === output.nodeId)); + for (const p of previews) { + const expected = + p.id === output.nodeId && upscaler + ? { nodeId: upscaler.id, field: 'output' } + : { nodeId: decode.id, field: guardedCosmos ? 'image' : 'images' }; + same(connectedParamSource(p.node, 'image'), expected); + } + const receipt = output.resolvedExecutionInputs; + assert.equal(receipt.schemaVersion, 1); + assert.equal(receipt.source, 'backend-execution'); + assert.equal(receipt.taskId, task.task_id); + assert.equal(receipt.attemptIndex, 0); + assert.equal(receipt.nodeId, output.nodeId); + assert.equal(receipt.truncated, false); + same(receipt.uncapturedNodeIds, []); + const rows = new Map(receipt.nodes.map((row) => [row.nodeId, row])); + assert.equal(rows.size, receipt.nodes.length); + const capturedIds = entries + .filter(([id, node]) => node.module !== 'modules.Image' || node.action !== 'Preview' || id === output.nodeId) + .map(([id]) => id); + same([...rows.keys()].sort(), capturedIds.sort()); + for (const [id, row] of rows) { + assert.equal(row.module, apiGraph.nodes[id].module); + assert.equal(row.action, apiGraph.nodes[id].action); + } + same(receipt.graphTasks, [ + { loaderId: ownerId, pipelineClass: apiParamValue(owner, 'model_type'), task: 'text_to_image' }, + ]); + for (const key of [ + 'repo_id', + 'revision', + 'model_type', + 'dtype', + 'device', + 'offload_mode', + 'auto_offload', + 'weight_loading_mode', + 'attention_backend', + 'vae_slicing', + 'vae_tiling', + 'quant_config', + ]) { + const field = rows.get(ownerId).fields[key]; + assert.equal(field.source, 'literal'); + const expected = + key === 'repo_id' + ? apiParamValue(owner, key).value + : key === 'quant_config' && apiParamValue(owner, key) == null + ? null + : apiParamValue(owner, key); + same(field.value, expected, 'Native Expert consumed ' + key); + assert(!Object.hasOwn(rows.get(ownerId).omittedFields ?? {}, key)); + } + if (guardedCosmos) { + // Cosmos owns prompt and output safety in the connected component bundle. + // Only its exact guarded text-to-image profile can use this receipt path. + assert.equal(previews.length, 1); + same(apiGraph.paths, [[ownerId, encode.id, denoise.id, decode.id, previews[0].id]]); + const wiredFields = [...connections, [previews[0], 'image', decode.id, 'image']]; + for (const [id, node] of entries) { + same( + Object.keys(node.params) + .filter((key) => connectedParamSource(node, key)) + .sort(), + wiredFields + .filter(([stage]) => stage.id === id) + .map(([, field]) => field) + .sort(), + ); + } + same(apiParamValue(owner, 'reviewed_variant'), 'nvidia/Cosmos3-Super-Text2Image'); + same(apiParamValue(owner, 'workflow_id'), 'text2image'); + same( + modelSetIdentity(modelIdentities).items.map(({ repoId, selectedRevision }) => [repoId, selectedRevision]), + [ + ['nvidia/Cosmos-Guardrail1', 'd6d4bfa899a71454a700907664f3e88f503950cf'], + ['nvidia/Cosmos3-Super-Text2Image', 'daf3d374804be4c512c2135568a7cb95d4341d79'], + ['Qwen/Qwen3Guard-Gen-0.6B', 'fada3b2f655b89601929198343c94cd2f64d93cc'], + ], + ); + assert( + modelIdentities.every( + (model) => model.fingerprint && model.modelRevision === model.repoId + '@' + model.selectedRevision, + ), + ); + same(apiParamValue(owner, 'repo_id')?.value, 'nvidia/Cosmos3-Super-Text2Image'); + same(apiParamValue(owner, 'revision'), 'daf3d374804be4c512c2135568a7cb95d4341d79'); + for (const [stage, block] of [ + [encode, 'text_encoder'], + [denoise, 'denoise'], + [decode, 'decode'], + ]) { + same(apiParamValue(stage.node, 'pipeline_class'), 'Cosmos3OmniModularPipeline'); + same(apiParamValue(stage.node, 'workflow_id'), 'text2image'); + same(apiParamValue(stage.node, 'block_path'), block); + } + for (const [stage, fields] of [ + [encode, ['prompt', 'negative_prompt', 'width', 'height', 'num_frames', 'fps']], + [denoise, ['num_inference_steps', 'guidance_scale', 'seed']], + ]) { + for (const key of fields) { + same(rows.get(stage.id).fields[key], { source: 'literal', value: apiParamValue(stage.node, key) }); + assert(!Object.hasOwn(rows.get(stage.id).omittedFields ?? {}, key)); + } + } + assert.equal(apiParamValue(encode.node, 'num_frames'), 1); + return true; + } + if (upscaler) + for (const key of ['model_id', 'device']) { + const param = upscaler.node.params[key]; + assert(!param?.sourceId && !param?.sourceKey); + const raw = apiParamValue(upscaler.node, key), + field = rows.get(upscaler.id).fields[key]; + if (key === 'model_id' && raw && typeof raw === 'object') assert.equal(raw.source, 'hub'); + assert.equal(field.source, 'literal'); + same(field.value, key === 'model_id' && typeof raw === 'object' ? raw.value : raw); + assert(!Object.hasOwn(rows.get(upscaler.id).omittedFields ?? {}, key)); + } + const applied = createAppliedAdapterProof({ + apiGraph, + canonicalGraph: canonicalizeApiGraph(apiGraph), + executedOutput: output, + executionReceipt: task, + taskId: task.task_id, + }); + assert.equal(applied.proof.truncated, false); + assert.equal(applied.proof.owners.length, 1); + const application = applied.proof.owners[0].application; + assert.equal(application.status, 'complete'); + assert.equal(application.observation, 'activated'); + const adapterNodes = byScope.get('modules.ModularDiffusers.Lora') ?? []; + assert(adapterNodes.length <= 32); + assert.equal(application.adapters.length, adapterNodes.length); + assert(Array.isArray(modelIdentities)); + same(modelIdentities.map((m) => m.repoId).sort(), resolvedModelReposFromOutput(output).sort()); + for (const m of modelIdentities) { + assert.match(m.selectedRevision, /^[a-f0-9]{40}$/u); + assert.equal(m.modelRevision, m.repoId + '@' + m.selectedRevision); + assert(m.fingerprint); + } + const model = modelIdentities.find((m) => m.repoId === apiParamValue(owner, 'repo_id').value); + assert.equal(model.selectedRevision, apiParamValue(owner, 'revision')); + assert.match(apiParamValue(owner, 'model_type'), /^[A-Za-z]\w*ModularPipeline$/u); + validateAppliedAdapterProof( + { + taskId: task.task_id, + graph: { canonicalGraph: canonicalizeApiGraph(apiGraph) }, + models: { items: modelIdentities }, + adapterApplications: applied.proof, + adapterApplicationsHash: applied.hash, + }, + { required: true }, + ); + return true; + } catch { + return false; + } +} + +// Ordinary direct-audio graphs have no managed Studio binding. Record only +// their unique connected recipe. Expert records that authored structure; Auto +// additionally requires the native joins below. Neither grants fit qualification. +// Do not substitute stale form/model aliases for the loader. +function executedDirectAudioPlanFromGraph(apiGraph, resourceMode = 'expert') { + const form = apiGraph?.runtimeHints?.workflowSnapshot?.studioForm; + if ( + !['expert', 'auto'].includes(resourceMode) || + form?.resourceMode !== resourceMode || + form.quantizationMode !== 'none' + ) + return null; + const entries = nodeEntries(apiGraph); + const paths = apiGraph?.paths; + if ( + entries.some( + ([id, node]) => + !id || + !node || + typeof node !== 'object' || + Array.isArray(node) || + !node.params || + typeof node.params !== 'object' || + Array.isArray(node.params), + ) || + ![5, 6, 8].includes(entries.length) || + !Array.isArray(paths) || + paths.length !== 1 || + !Array.isArray(paths[0]) || + paths[0].length !== entries.length || + new Set(paths[0]).size !== entries.length || + entries.some(([id]) => !paths[0].includes(id)) + ) + return null; + const role = (module, action) => { + const matches = entries.filter(([, node]) => node.module === module && node.action === action); + return matches.length === 1 ? matches[0] : null; + }; + const loader = role('modules.DiffusersAudio', 'LoadPipeline'); + const generate = role('modules.DiffusersAudio', 'Generate'); + const recipe = role('modules.DiffusersRuntime', 'DiffusersExecutionRecipe'); + const quant = role('modules.DiffusersRuntime', 'PipelineQuantizationConfigV2'); + const output = role('modules.Audio', 'Export'); + if (!loader || !generate || !recipe || !quant || !output) return null; + const source = role('modules.Audio', 'Load'); + const match = role('modules.Audio', 'MatchLoudness'); + const join = role('modules.Audio', 'Join'); + const roles = [loader, generate, recipe, quant, output, source, match, join].filter(Boolean); + if (roles.length !== entries.length || Boolean(match) !== Boolean(join) || (join && !source)) return null; + const literal = (entry, field) => { + const param = entry?.[1]?.params?.[field]; + return param && !param.sourceId && !param.sourceKey ? apiParamValue(entry[1], field) : undefined; + }; + const repo = hubRepository(literal(loader, 'model_id')); + const revision = literal(loader, 'revision'); + const pipelineClass = literal(loader, 'pipeline_class'); + const mode = literal(loader, 'mode'); + const contract = literal(loader, 'audio_contract'); + if ( + !repo || + !/^[A-Za-z0-9][A-Za-z0-9._-]*\/[A-Za-z0-9][A-Za-z0-9._-]*$/u.test(repo) || + !/^[a-f0-9]{40}$/u.test(String(revision)) || + typeof pipelineClass !== 'string' || + !pipelineClass || + typeof mode !== 'string' || + !mode || + !contract || + Array.isArray(contract) || + contract.schemaVersion !== 1 || + contract.library !== 'diffusers' || + contract.mediaKind !== 'audio' || + contract.pipelineClass !== pipelineClass || + contract.repository !== repo || + contract.mode !== mode || + contract.referenceAudio !== 'forbidden' || + !Array.isArray(contract.actions?.Generate) || + !contract.actions.Generate.includes(mode) || + !['required', 'forbidden'].includes(contract.sourceAudio) || + (contract.sourceAudio === 'required') !== Boolean(source) || + stableStringify(literal(generate, 'audio_contract')) !== stableStringify(contract) + ) + return null; + const wires = new Map([ + [loader[0], { execution_recipe: [recipe[0], 'execution_recipe'] }], + [recipe[0], { quantization_config: [quant[0], 'quantization_config'] }], + [quant[0], {}], + [generate[0], { pipeline: [loader[0], 'pipeline'], ...(source ? { source_audio: [source[0], 'audio'] } : {}) }], + [output[0], { audio: join ? [join[0], 'output'] : [generate[0], 'audio'] }], + ...(source ? [[source[0], {}]] : []), + ...(match + ? [ + [match[0], { audio: [generate[0], 'audio'], reference: [source[0], 'audio'] }], + [join[0], { source: [source[0], 'audio'], continuation: [match[0], 'output'] }], + ] + : []), + ]); + const mediaValue = (value) => typeof value === 'string' && value.length <= 16_384; + for (const [id, node] of entries) { + const expected = wires.get(id); + if (!expected) return null; + const previewPort = id === output[0] ? 'file' : source && id === source[0] ? 'filename' : null; + for (const [key, param] of Object.entries(node.params ?? {})) { + const previewValue = param?.value; + // These native preview references survive Save/reopen; sourceKey names + // an output field here, not an additional graph connection. + const presentation = + key === 'preview' && + previewPort !== null && + param?.display === 'ui_audio' && + param.sourceKey === previewPort && + Object.keys(param).every((field) => ['display', 'sourceKey', 'value'].includes(field)) && + (previewValue == null || + mediaValue(previewValue) || + (Array.isArray(previewValue) && previewValue.length <= 16 && previewValue.every(mediaValue))); + if ((param?.sourceId || param?.sourceKey) && !Object.hasOwn(expected, key) && !presentation) return null; + } + for (const [field, [producer, port]] of Object.entries(expected)) { + const wire = connectedParamSource(node, field); + if (wire?.nodeId !== producer || wire.field !== port || paths[0].indexOf(producer) >= paths[0].indexOf(id)) + return null; + } + } + const dtype = literal(loader, 'dtype'); + const device = literal(loader, 'device'); + const autoOffload = literal(loader, 'auto_offload'); + const offloadMode = literal(loader, 'offload_mode'); + const deviceMap = literal(recipe, 'device_map'); + if ( + !['float32', 'float16', 'bfloat16'].includes(dtype) || + typeof device !== 'string' || + !device || + typeof autoOffload !== 'boolean' || + typeof offloadMode !== 'string' || + !offloadMode || + typeof deviceMap !== 'string' || + !deviceMap || + literal(quant, 'backend') !== 'none' || + literal(quant, 'dtype') !== dtype || + literal(recipe, 'device') !== device || + literal(recipe, 'offload_mode') !== offloadMode || + form.dtype !== dtype || + form.device !== device || + form.autoOffload !== autoOffload || + form.offloadMode !== offloadMode + ) + return null; + const extras = {}; + for (const [field, name, type] of [ + ['attention_backend', 'attentionBackend', 'string'], + ['regional_compile', 'regionalCompile', 'boolean'], + ['denoiser_cache', 'denoiserCache', 'string'], + ['channels_last', 'channelsLast', 'boolean'], + ['layerwise_casting', 'layerwiseCasting', 'boolean'], + ]) { + const value = literal(recipe, field); + if (typeof value !== type) return null; + extras[name] = value; + } + return orderedValue({ + ...(resourceMode === 'expert' ? { source: 'executed-expert-direct-audio-graph-v1' } : {}), + modelType: pipelineClass, + pipelineClass, + modelRepo: repo, + resolvedModelRepo: repo, + resolvedArtifact: repo, + modelRevision: revision, + task: mode, + dtype, + device, + deviceMap, + autoOffload, + offloadMode, + quantizationMode: 'none', + quantizedComponents: [], + resourceMode, + resolvedResourceMode: resourceMode, + ...extras, + }); +} + +// A retained whole-workflow audio run needs the same native joins as image Auto. +// Literal form values alone never supply this identity. Initial scope is one +// fresh unquantized Generate/Export owner, optionally with the ordinary joined +// continuation chain. Repaint, adapters, reuse, patches and other scopes stay held. +function observedWorkflowAutoAudioPlan( + apiGraph, + { executionReceipt: task, executedOutput: output, taskId, modelIdentities } = {}, +) { + try { + const base = executedDirectAudioPlanFromGraph(apiGraph, 'auto'); + assert(base && ['text_to_audio', 'audio_continuation'].includes(base.task)); + const hints = apiGraph.runtimeHints, + form = hints.workflowSnapshot.studioForm; + assert.equal(hints.resourceMode, 'auto'); + assert.equal(form.mode, base.task); + assert.equal(form.trustRemoteCode, false); + assert.equal(task.status, 'completed'); + assert.equal(task.attempt_index, 0); + assert.equal(task.resourceCandidateId ?? null, null); + assert.equal(output.attemptIndex, 0); + assert.equal(task.task_id, output.taskId); + if (taskId !== undefined) assert.equal(taskId, task.task_id); + for (const [key, taskKey, outputKey] of [ + ['sid', 'sid', 'sid'], + ['workflowTabId', 'workflow_tab_id', 'workflowTabId'], + ['clientRunId', 'client_run_id', 'clientRunId'], + ['runInputHash', 'run_input_hash', 'runInputHash'], + ]) { + const identity = key === 'sid' ? apiGraph.sid : hints[key]; + assert.equal(typeof identity, 'string'); + assert(identity.length > 0); + same(task[taskKey], identity, key); + same(output[outputKey], identity, key); + } + same(output.apiGraphSnapshot, apiGraph); + same(task.workflow_snapshot, hints.workflowSnapshot); + same(output.formSnapshot, form); + assert.equal(hints.workflowAutoPlan.schemaVersion, 1); + assert.equal(hints.workflowAutoPlan.graphHash, workerGraphHash(apiGraph)); + assert(!Object.hasOwn(apiGraph, 'loops')); + const entries = nodeEntries(apiGraph), + byScope = new Map(entries.map(([id, node]) => [node.module + '.' + node.action, { id, node }])); + assert.equal(byScope.size, entries.length); + assert.equal(entries.length, base.task === 'text_to_audio' ? 5 : 8); + const owner = byScope.get('modules.DiffusersAudio.LoadPipeline'), + generate = byScope.get('modules.DiffusersAudio.Generate'); + const recipe = byScope.get('modules.DiffusersRuntime.DiffusersExecutionRecipe'), + quant = byScope.get('modules.DiffusersRuntime.PipelineQuantizationConfigV2'); + const exported = byScope.get('modules.Audio.Export'); + assert.equal(output.nodeId, exported.id); + const captured = output.resolvedExecutionInputs; + assert.equal(captured.schemaVersion, 1); + assert.equal(captured.source, 'backend-execution'); + assert.equal(captured.taskId, task.task_id); + assert.equal(captured.attemptIndex, 0); + assert.equal(captured.nodeId, exported.id); + assert.equal(captured.truncated, false); + same(captured.uncapturedNodeIds, []); + const rows = new Map(captured.nodes.map((row) => [row.nodeId, row])); + assert.equal(rows.size, entries.length); + assert.equal(captured.nodes.length, entries.length); + for (const [id, node] of entries) { + assert.equal(rows.get(id).module, node.module); + assert.equal(rows.get(id).action, node.action); + } + assert.equal(modelIdentities?.length, 1); + assert.equal(modelIdentities[0].repoId, base.modelRepo); + assert.equal(modelIdentities[0].selectedRevision, base.modelRevision); + const prep = task.runtimePreparation; + assert.equal(prep.resourceMode, 'auto'); + const auto = prep.workflowAuto; + assert.equal(auto.strategy, 'dependency_order_retained_owners'); + assert.equal(auto.schedule, null); + assert.equal(auto.cachePreparation, null); + for (const field of ['reusedOwnerIds', 'preparedDataNodes', 'appliedUpdates', 'releases']) same(auto[field], []); + const allowed = new Map([ + [owner.id, new Set('model_id pipeline_class revision dtype device offload_mode auto_offload mode'.split(' '))], + [ + recipe.id, + new Set( + 'attention_backend regional_compile layerwise_casting channels_last device_map denoiser_cache max_memory device_map_overrides vae_slicing vae_tiling offload_mode device'.split( + ' ', + ), + ), + ], + [quant.id, new Set('backend component_overrides'.split(' '))], + [generate.id, new Set('num_inference_steps guidance_scale audio_duration'.split(' '))], + ]); + same(Object.keys(auto.resolvedFields).sort(), [...allowed.keys()].sort()); + const controls = []; + for (const [id, fields] of Object.entries(auto.resolvedFields)) { + same(Object.keys(fields).sort(), [...allowed.get(id)].sort()); + const node = apiGraph.nodes[id]; + for (const [key, observed] of Object.entries(fields)) { + assert(!node.params[key]?.sourceId && !node.params[key]?.sourceKey); + same(apiParamValue(node, key), observed); + const field = rows.get(id).fields[key]; + if (field) { + assert.equal(field.source, 'literal'); + // Continuation resolves the requested source-duration control plus + // its extension into the library's full target duration. Check that + // actual value below, rather than conflating admission and call data. + if (!(id === generate.id && key === 'audio_duration' && base.task === 'audio_continuation')) + same(field.value, key === 'model_id' ? base.modelRepo : observed); + } + } + controls.push({ scope: node.module + '.' + node.action, fields: structuredClone(fields) }); + } + controls.sort((a, b) => a.scope.localeCompare(b.scope)); + const native = (entry, key, expected) => { + const field = rows.get(entry.id).fields[key]; + assert.equal(field.source, 'literal'); + same(field.value, expected); + }; + if (base.task === 'audio_continuation') { + const source = byScope.get('modules.Audio.Load'); + const file = source.node.params.file; + assert(!file?.sourceId && !file?.sourceKey); + assert.equal(typeof file?.value, 'string'); + assert(file.value.length > 0 && file.value.length <= 16_384); + same(file.value, form.sourceAudio); + } + for (const key of [ + 'model_id', + 'pipeline_class', + 'revision', + 'dtype', + 'device', + 'auto_offload', + 'offload_mode', + 'enable_vae_tiling', + ]) + native(owner, key, key === 'model_id' ? base.modelRepo : apiParamValue(owner.node, key)); + for (const key of ['device', 'offload_mode', 'attention_backend', 'vae_slicing', 'vae_tiling']) + native(recipe, key, apiParamValue(recipe.node, key)); + native(quant, 'dtype', base.dtype); + assert.equal(base.attentionBackend, 'auto'); + for (const key of ['regional_compile', 'layerwise_casting', 'channels_last']) + assert.equal(apiParamValue(recipe.node, key), false); + assert.equal(apiParamValue(recipe.node, 'denoiser_cache'), 'none'); + for (const key of ['max_memory', 'device_map_overrides']) assert.equal(apiParamValue(recipe.node, key), '{}'); + assert.equal(apiParamValue(quant.node, 'component_overrides'), '{}'); + const duration = apiParamValue(generate.node, 'audio_duration'), + extension = base.task === 'audio_continuation' ? apiParamValue(generate.node, 'extension_duration') : null; + assert(Number.isFinite(duration) && duration > 0); + same(duration, form.audioDuration); + if (extension !== null) { + assert(Number.isFinite(extension) && extension > 0); + same(extension, form.extensionDuration); + assert.equal(apiParamValue(generate.node, 'return_continuation_tail'), true); + } + const effective = duration + (extension ?? 0); + for (const [key, formKey] of [ + ['prompt', 'prompt'], + ['lyrics', 'lyrics'], + ['vocal_language', 'vocalLanguage'], + ['num_inference_steps', 'steps'], + ['guidance_scale', 'guidanceScale'], + ['shift', 'shift'], + ['seed', 'seed'], + ['bpm', 'bpm'], + ['keyscale', 'keyscale'], + ['timesignature', 'timesignature'], + ]) { + const value = apiParamValue(generate.node, key); + same(value, form[formKey]); + native(generate, key, value); + } + native(generate, 'audio_duration', effective); + const sampleRate = apiParamValue(generate.node, 'sample_rate'); + assert(Number.isInteger(sampleRate) && sampleRate > 0); + native(generate, 'sample_rate', sampleRate); + native(exported, 'sample_rate', sampleRate); + const observation = { + schemaVersion: 1, + strategy: auto.strategy, + modelType: base.modelType, + repo: base.modelRepo, + revision: base.modelRevision, + task: base.task, + dtype: base.dtype, + device: base.device, + offloadMode: base.offloadMode, + autoOffload: base.autoOffload, + deviceMap: base.deviceMap, + attentionBackend: base.attentionBackend, + workload: { + requestedAudioDuration: duration, + effectiveAudioDuration: effective, + extensionDuration: extension, + steps: apiParamValue(generate.node, 'num_inference_steps'), + guidanceScale: apiParamValue(generate.node, 'guidance_scale'), + sampleRate, + }, + controls, + }; + const plan = { ...base, source: OBSERVED_WORKFLOW_AUTO_AUDIO_SOURCE, resourceObservation: observation }; + plan.observedResourceCandidateId = plan.source + ':' + observationJsonHash(observation); + assert(observedWorkflowAutoResourceId(plan)); + return plan; + } catch { + return null; + } +} + +function observedAdapterProofContext(apiGraph, context) { + try { + if ( + !Object.values(apiGraph.nodes).some( + (node) => node.module === 'modules.ModularDiffusers' && node.action === 'Lora', + ) + ) + return null; + const canonicalGraph = canonicalizeApiGraph(apiGraph); + const taskId = context?.taskId ?? context?.executionReceipt?.task_id; + const application = createAppliedAdapterProof({ + apiGraph, + canonicalGraph, + executedOutput: context?.executedOutput, + executionReceipt: context?.executionReceipt, + taskId, + }); + if (!application) return null; + return { + taskId, + graph: { canonicalGraph }, + models: modelSetIdentity(context?.modelIdentities ?? []), + adapterApplications: application.proof, + adapterApplicationsHash: application.hash, + }; + } catch { + return null; + } +} + +export function executionPlanIdentity(apiGraph, executionContext) { const runtimeHints = apiGraph?.runtimeHints ?? {}; const declaredPlan = Object.fromEntries( EXECUTION_PLAN_FIELDS.filter((field) => runtimeHints[field] !== undefined).map((field) => [ @@ -438,7 +1399,63 @@ export function executionPlanIdentity(apiGraph) { runtimeHints[field], ]), ); - const plan = Object.keys(declaredPlan).length > 0 ? declaredPlan : (executedExpertPlanFromGraph(apiGraph) ?? {}); + const fields = Object.keys(declaredPlan); + const expertOnly = fields.every( + (field) => ['resourceMode', 'resolvedResourceMode'].includes(field) && declaredPlan[field] === 'expert', + ); + const modularPlan = expertOnly ? executedModularExpertPlanFromGraph(apiGraph, executionContext) : null; + const nativeImagePlan = + executionContext?.retainedNativeEvidence === undefined + ? observedNativeModularImagePlan(apiGraph, executionContext) + : null; + const observedAutoPlan = + fields.length === 1 && declaredPlan.resourceMode === 'auto' + ? (observedWorkflowAutoPlan(apiGraph, { + ...executionContext, + adapterProofContext: observedAdapterProofContext(apiGraph, executionContext), + }) ?? + observedWorkflowAutoAudioPlan(apiGraph, executionContext) ?? + observedWorkflowAutoVideoPlan(apiGraph, executionContext) ?? + observedWorkflowAutoControlPlan(apiGraph, executionContext) ?? + observedWorkflowAutoMaskedImagePlan(apiGraph, executionContext) ?? + observedNativeAutoVideoPlan(apiGraph, { + ...executionContext, + resolvedModelRepos: resolvedModelReposFromOutput( + executionContext?.executedOutput, + executionContext?.nativeGraphSubmission ? apiGraph : undefined, + ), + nativeAutoBindings: { + canonicalGraphHash: canonicalGraphIdentity(apiGraph).hash, + modelSetHash: modelSetIdentity(executionContext?.modelIdentities ?? []).hash, + inputArtifactsHash: inputArtifactsIdentity(executionContext?.inputArtifacts ?? []).hash, + backendSourceFingerprint: executionContext?.backendSource?.fingerprint, + }, + })) + : null; + const retainedPlan = + executionContext?.retainedNativeEvidence === undefined + ? null + : Object.values(apiGraph?.nodes ?? {}).some( + (node) => node.module === 'modules.DiffusersImage' && node.action === 'LoadPipeline', + ) + ? observedRetainedDirectImagePlan(apiGraph, executionContext) + : (observedRetainedModularImagePlan(apiGraph, executionContext) ?? + observedRetainedExpertTextPlan(apiGraph, executionContext)); + const plan = + executionContext?.retainedNativeEvidence !== undefined + ? (retainedPlan ?? {}) + : (nativeImagePlan ?? + observedAutoPlan ?? + modularPlan ?? + (fields.length > 0 + ? declaredPlan + : (executedExpertPlanFromGraph(apiGraph) ?? + executedDirectAudioPlanFromGraph(apiGraph) ?? + executedNativeMediaPlan(apiGraph, { + ...executionContext, + resolvedModelRepos: resolvedModelReposFromOutput(executionContext?.executedOutput), + }) ?? + {}))); return { hash: sha256Value('execution-plan-v1', plan), plan: orderedValue(plan), @@ -455,7 +1472,16 @@ export function executionReceiptIdentity(executionReceipt, executionPlan) { measurement?.processRssBytes ?? null; const manualResourceCandidateId = - executionPlan?.modelType && executionPlan?.dtype + !isObservedWorkflowAutoSource(executionPlan?.source) && + executionPlan?.source !== OBSERVED_WORKFLOW_AUTO_VIDEO_SOURCE && + executionPlan?.source !== OBSERVED_NATIVE_AUTO_VIDEO_SOURCE && + executionPlan?.source !== OBSERVED_WORKFLOW_AUTO_MASKED_IMAGE_SOURCE && + executionPlan?.source !== OBSERVED_RETAINED_EXPERT_TEXT_SOURCE && + executionPlan?.source !== OBSERVED_RETAINED_DIRECT_IMAGE_SOURCE && + executionPlan?.source !== OBSERVED_RETAINED_MODULAR_IMAGE_SOURCE && + executionPlan?.source !== OBSERVED_NATIVE_MODULAR_IMAGE_SOURCE && + executionPlan?.modelType && + executionPlan?.dtype ? `manual-resource-v1:${[ executionPlan.modelType, executionPlan.dtype, @@ -465,7 +1491,18 @@ export function executionReceiptIdentity(executionReceipt, executionPlan) { : null; return { resourceCandidateId: - hints?.autoResourceCandidateId ?? executionPlan?.autoResourceCandidateId ?? manualResourceCandidateId, + hints?.autoResourceCandidateId ?? + executionPlan?.autoResourceCandidateId ?? + observedWorkflowAutoResourceId(executionPlan) ?? + observedWorkflowAutoVideoResourceId(executionPlan) ?? + observedNativeAutoVideoResourceId(executionPlan) ?? + observedWorkflowAutoControlResourceId(executionPlan) ?? + observedWorkflowAutoMaskedImageResourceId(executionPlan) ?? + observedRetainedExpertTextResourceId(executionPlan) ?? + observedRetainedDirectImageResourceId(executionPlan) ?? + observedRetainedModularImageResourceId(executionPlan) ?? + observedNativeModularImageResourceId(executionPlan) ?? + manualResourceCandidateId, elapsedSeconds: Number.isFinite(measurement?.elapsedSeconds) && measurement.elapsedSeconds >= 0 ? measurement.elapsedSeconds @@ -475,8 +1512,8 @@ export function executionReceiptIdentity(executionReceipt, executionPlan) { }; } -export function resolvedModelReposFromOutput(output) { - const graph = output?.apiGraphSnapshot; +export function resolvedModelReposFromOutput(output, capturedSubmissionGraph) { + const graph = output?.apiGraphSnapshot ?? capturedSubmissionGraph; const loaderRepos = nodeEntries(graph).flatMap(([, node]) => { const params = node?.params ?? {}; const action = String(node?.action ?? '').toLowerCase(); @@ -710,6 +1747,17 @@ function sourceFilesUnder(target) { } function gitCommit(root) { + const topLevel = spawnSync('git', ['rev-parse', '--show-toplevel'], { + cwd: root, + encoding: 'utf8', + windowsHide: true, + }); + if (topLevel.status !== 0 || !topLevel.stdout.trim()) return null; + try { + if (realpathSync(topLevel.stdout.trim()) !== realpathSync(root)) return null; + } catch { + return null; + } const result = spawnSync('git', ['rev-parse', 'HEAD'], { cwd: root, encoding: 'utf8', @@ -727,12 +1775,17 @@ export function backendSourceIdentity(backendRoot) { path.join(backendRoot, 'utils'), ]; const files = [...new Set(targets.flatMap(sourceFilesUnder))] - // This identity is also captured by the Python worker before imports. - // Use language-independent Unicode/code-point ordering rather than the - // host locale so both processes hash the same ordered file inventory. - .sort((left, right) => (left < right ? -1 : left > right ? 1 : 0)) + // The Python worker sorts POSIX paths before imports. Normalize separators + // before sorting: on Windows a backslash orders Image after ImageFilters. .map((file) => ({ - path: path.relative(backendRoot, file).replaceAll('\\', '/'), + file, + relativePath: path.relative(backendRoot, file).replaceAll('\\', '/'), + })) + .sort((left, right) => + left.relativePath < right.relativePath ? -1 : left.relativePath > right.relativePath ? 1 : 0, + ) + .map(({ file, relativePath }) => ({ + path: relativePath, sha256: createHash('sha256').update(readFileSync(file)).digest('hex'), })); const payload = { @@ -924,6 +1977,11 @@ function outputIdentity(outputAnalysis, executedOutput) { export function validateRunProvenance(provenance) { const blockers = []; + try { + validateAppliedAdapterProof(provenance); + } catch (error) { + blockers.push(`Applied adapter evidence is invalid: ${error.message}`); + } const required = [ ['template.resolvedTemplateLockHash', provenance?.template?.resolvedTemplateLockHash], ['template.revisionHash', provenance?.template?.revisionHash], @@ -987,6 +2045,138 @@ export function validateRunProvenance(provenance) { if (!provenance?.execution?.resourceCandidateId) { blockers.push('execution.resourceCandidateId is missing.'); } + if ( + provenance?.graph?.executionPlan?.source === OBSERVED_NATIVE_MODULAR_IMAGE_SOURCE && + (provenance.execution?.resourceCandidateId !== + observedNativeModularImageResourceId(provenance.graph.executionPlan) || + !observedNativeModularImageProofMatches(provenance.graph.executionPlan, provenance)) + ) { + blockers.push( + 'execution native image observation does not match its original graph/model/input/output/source bindings.', + ); + } + if ( + isObservedWorkflowAutoSource(provenance?.graph?.executionPlan?.source) && + (!observedWorkflowAutoResourceId(provenance.graph.executionPlan) || + provenance.execution?.resourceCandidateId !== observedWorkflowAutoResourceId(provenance.graph.executionPlan)) + ) { + blockers.push('execution.resourceCandidateId does not match the retained workflow Auto observation.'); + } + if ( + provenance?.graph?.executionPlan?.source === OBSERVED_WORKFLOW_AUTO_LORA_SOURCE && + !observedWorkflowAutoLoraProofMatches(provenance.graph.executionPlan, provenance) + ) { + blockers.push('execution LoRA resource observation does not match the original applied adapter proof.'); + } + if ( + provenance?.graph?.executionPlan?.source === OBSERVED_WORKFLOW_AUTO_AUDIO_SOURCE && + !observedWorkflowAutoAudioProofMatches(provenance.graph.executionPlan, provenance) + ) { + blockers.push('execution audio resource observation does not match the original graph/model/output proof.'); + } + if ( + provenance?.graph?.executionPlan?.source === OBSERVED_WORKFLOW_AUTO_LEGACY_SOURCE && + !observedWorkflowAutoLegacyProofMatches(provenance.graph.executionPlan, provenance) + ) { + blockers.push( + 'execution legacy resource observation does not match the original graph/source/contract/model/output proof.', + ); + } + if ( + [OBSERVED_WORKFLOW_AUTO_SOURCE, OBSERVED_WORKFLOW_AUTO_LORA_SOURCE].includes( + provenance?.graph?.executionPlan?.source, + ) && + (provenance.graph.executionPlan.resourceObservation?.decoderGeometryRoute !== undefined || + provenance.graph.canonicalGraph?.nodes?.some( + (node) => + node.module === 'modules.ModularDiffusers' && + node.action === 'DecodeLatents' && + ['width', 'height'].some((field) => node.params?.[field]?.sourceId || node.params?.[field]?.sourceKey), + )) && + !observedWorkflowAutoTextGeometryProofMatches(provenance.graph.executionPlan, provenance) + ) { + blockers.push( + 'execution text decoder geometry observation does not match the original connected graph/output proof.', + ); + } + if ( + provenance?.graph?.executionPlan?.source === OBSERVED_WORKFLOW_AUTO_CONTROL_SOURCE && + (provenance.execution?.resourceCandidateId !== + observedWorkflowAutoControlResourceId(provenance.graph.executionPlan) || + !observedWorkflowAutoControlProofMatches(provenance.graph.executionPlan, provenance)) + ) { + blockers.push( + 'execution control resource observation does not match the original graph/model/input/output proof.', + ); + } + if ( + provenance?.graph?.executionPlan?.source === OBSERVED_WORKFLOW_AUTO_MASKED_IMAGE_SOURCE && + (provenance.execution?.resourceCandidateId !== + observedWorkflowAutoMaskedImageResourceId(provenance.graph.executionPlan) || + !observedWorkflowAutoMaskedImageProofMatches(provenance.graph.executionPlan, provenance)) + ) { + blockers.push( + 'execution masked-image resource observation does not match the original graph/model/source/mask/output proof.', + ); + } + if ( + provenance?.graph?.executionPlan?.source === OBSERVED_WORKFLOW_AUTO_VIDEO_SOURCE && + (provenance.execution?.resourceCandidateId !== + observedWorkflowAutoVideoResourceId(provenance.graph.executionPlan) || + !observedWorkflowAutoVideoProofMatches(provenance.graph.executionPlan, provenance)) + ) { + blockers.push('execution video resource observation does not match the original graph/model/output proof.'); + } + if ( + provenance?.graph?.executionPlan?.source === OBSERVED_NATIVE_AUTO_VIDEO_SOURCE && + (provenance.execution?.resourceCandidateId !== + observedNativeAutoVideoResourceId(provenance.graph.executionPlan) || + !observedNativeAutoVideoProofMatches(provenance.graph.executionPlan, provenance, { + submittedGraphIdentity: provenance.graph.executionPlan.observation?.graphSubmission + ? canonicalGraphIdentity( + capturedNativeGraphSubmission(provenance.graph.executionPlan.observation.graphSubmission).api, + ) + : undefined, + })) + ) { + blockers.push('Native video Auto observation differs from its graph, models, inputs or backend source.'); + } + if ( + provenance?.graph?.executionPlan?.source === OBSERVED_RETAINED_DIRECT_IMAGE_SOURCE && + (provenance.execution?.resourceCandidateId !== + observedRetainedDirectImageResourceId(provenance.graph.executionPlan) || + !observedRetainedDirectImageProofMatches(provenance.graph.executionPlan, provenance)) + ) { + blockers.push( + 'execution retained direct-image observation does not match the original source/contract/graph/model/input/output bindings.', + ); + } + if ( + provenance?.graph?.executionPlan?.source === OBSERVED_RETAINED_MODULAR_IMAGE_SOURCE && + (provenance.execution?.resourceCandidateId !== + observedRetainedModularImageResourceId(provenance.graph.executionPlan) || + !observedRetainedModularImageProofMatches(provenance.graph.executionPlan, provenance)) + ) { + blockers.push( + 'execution retained modular-image observation does not match the original source/contract/graph/model/input/output bindings.', + ); + } + if ( + provenance?.graph?.executionPlan?.source === OBSERVED_RETAINED_EXPERT_TEXT_SOURCE && + (provenance.execution?.resourceCandidateId !== + observedRetainedExpertTextResourceId(provenance.graph.executionPlan) || + !observedRetainedExpertTextProofMatches(provenance.graph.executionPlan, provenance)) + ) { + blockers.push( + 'execution retained native text observation does not match the original source/contract/graph/model/output bindings.', + ); + } + if ( + provenance?.graph?.executionPlan?.source === OBSERVED_WORKFLOW_AUTO_IMAGE_SOURCE && + !observedWorkflowAutoImageProofMatches(provenance.graph.executionPlan, provenance) + ) { + blockers.push('execution image resource observation does not match the original graph/model/input/output proof.'); + } if (!Number.isFinite(provenance?.execution?.elapsedSeconds) || provenance.execution.elapsedSeconds < 0) { blockers.push('execution.elapsedSeconds is invalid.'); } @@ -1062,6 +2252,1460 @@ export function validateRunProvenance(provenance) { return blockers; } +const same = (actual, expected, label) => assert.equal(stableStringify(actual), stableStringify(expected), label); +const immutableRevision = (value) => typeof value === 'string' && /^[a-f0-9]{40,64}$/i.test(value); + +const pixArtSigmaPag = { + workflowId: 'PixArtSigmaPAGPipeline:text_to_image', + modelType: 'PixArtSigmaPAGPipeline', + modelSet: [ + { repoId: 'PixArt-alpha/PixArt-Sigma-XL-2-1024-MS', revision: 'e102b3591cc82e97071b8b4cb90d834d0c487207' }, + ], + active: + 'prompt negative_prompt seed width height num_inference_steps guidance_scale pag_scale pag_adaptive_scale max_sequence_length output_type'.split( + ' ', + ), + inactive: + 'cfg_normalize control_guidance_end control_guidance_start image_guidance_scale layers padding_mask_crop resolution strength use_en_prompt'.split( + ' ', + ), +}; +const plainImageActive = 'prompt seed width height num_inference_steps guidance_scale output_type'.split(' '); +const plainImageInactive = + 'image_guidance_scale pag_adaptive_scale pag_scale cfg_normalize control_guidance_end control_guidance_start layers padding_mask_crop resolution strength use_en_prompt'.split( + ' ', + ); +const plainImageLegacyNull = ['control_guidance_start', 'conditioning_scale', 'strength', 'control_guidance_end']; +const pagScalars = ['pag_scale', 'pag_adaptive_scale']; +const retainedDreamLiteMobileDefaults = { + workflowId: 'DreamLiteMobilePipeline:text_to_image', + modelType: 'DreamLiteMobilePipeline', + modelRepo: 'carlofkl/DreamLite-mobile', + modelRevision: '6695c3f4be230f0493fa5dbf78be3bc4d3bb2ab4', + retainedDefaultPrompt: '', + active: [...plainImageActive.filter((field) => field !== 'guidance_scale'), 'max_sequence_length'], + inactive: [...plainImageInactive, 'guidance_scale', 'negative_prompt'], + legacyNull: [...plainImageLegacyNull, 'guidance_scale', 'negative_prompt'], + savedGenerateBlock: true, + retainedObservationSource: + 'sha256:backend-source-v1:fd16f3acc76e08525b28215b603104d281e8ab26169b03076a112edbb7d100bb', + dtype: 'bfloat16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 4, + max_sequence_length: 200, + seed: 42, + }, +}; +export const directImagePromptRoutes = [ + { + format: 'modiff.private.dreamlite-base-prompt-variant.v1', + workflowId: 'DreamLitePipeline:text_to_image', + modelType: 'DreamLitePipeline', + modelRepo: 'carlofkl/DreamLite-base', + modelRevision: '751cb8dbb9072a8c8ffd8684e0f254b50f20531b', + active: [...plainImageActive, 'negative_prompt', 'max_sequence_length', 'image_guidance_scale'], + inactive: plainImageInactive.filter((field) => field !== 'image_guidance_scale'), + typedOnly: ['image_guidance_scale'], + legacyNull: plainImageLegacyNull, + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'bfloat16', + offload: 'model_cpu', + deviceMap: 'none', + replayedRuntimeContract: '8cbe038eeeb6d4a4c079783b8d7e4915d9f78faad9495cb8e354504c66925cf5', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 28, + guidance_scale: 3.5, + max_sequence_length: 200, + image_guidance_scale: 1.5, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.joyimage-base-prompt-variant.v1', + workflowId: 'JoyImageEditPipeline:text_to_image', + modelType: 'JoyImageEditPipeline', + modelRepo: 'jdopensource/JoyAI-Image-Edit-Diffusers', + modelRevision: '4b41fb25d961f37668750178ccbb380da326201c', + previousExpertFamily: 'ChromaImg2ImgPipeline', + sourceFingerprint: 'sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7', + active: [...plainImageActive, 'negative_prompt', 'max_sequence_length'], + inactive: plainImageInactive, + legacyNull: plainImageLegacyNull, + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'bfloat16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 40, + guidance_scale: 4, + max_sequence_length: 2048, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.longcat-image-florist-prompt-variant.v1', + workflowId: 'LongCatImagePipeline:text_to_image', + modelType: 'LongCatImagePipeline', + modelRepo: 'meituan-longcat/LongCat-Image', + modelRevision: 'd2ea50b79a930074c37b9b97ce45e3b2ea8cf4d8', + previousExpertFamily: 'JoyImageEditPipeline', + retainedObservationSource: + 'sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7', + active: [...plainImageActive, 'negative_prompt', 'max_sequence_length'], + inactive: plainImageInactive, + typedOnly: ['max_sequence_length'], + legacyNull: [...plainImageLegacyNull, 'max_sequence_length'], + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'bfloat16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 50, + guidance_scale: 4, + max_sequence_length: 512, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.pixart-sigma-text-to-image-prompt-variant.v1', + workflowId: 'PixArtSigmaPipeline:text_to_image', + modelType: 'PixArtSigmaPipeline', + modelRepo: 'PixArt-alpha/PixArt-Sigma-XL-2-1024-MS', + modelRevision: 'e102b3591cc82e97071b8b4cb90d834d0c487207', + active: [...plainImageActive, 'negative_prompt', 'max_sequence_length'], + inactive: plainImageInactive, + legacyNull: plainImageLegacyNull, + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'float32', + offload: 'model_cpu', + deviceMap: 'none', + replayedRuntimeContract: '8cbe038eeeb6d4a4c079783b8d7e4915d9f78faad9495cb8e354504c66925cf5', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 20, + guidance_scale: 4.5, + max_sequence_length: 300, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.lumina2-prompt-variant.v1', + workflowId: 'Lumina2Pipeline:text_to_image', + modelType: 'Lumina2Pipeline', + modelRepo: 'Alpha-VLLM/Lumina-Image-2.0', + modelRevision: '53504abd8178b30685b6c4c7a4cd181ff78b73e9', + retainedObservationSource: + 'sha256:backend-source-v1:057b165c6ef6225461649a47077562dffad098a2d37d639a13bf0e73088d79ab', + active: [...plainImageActive, 'negative_prompt', 'max_sequence_length'], + inactive: plainImageInactive, + legacyNull: plainImageLegacyNull, + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'bfloat16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 50, + guidance_scale: 4, + max_sequence_length: 256, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.hunyuan-dit-prompt-variant.v1', + workflowId: 'HunyuanDiTPipeline:text_to_image', + modelType: 'HunyuanDiTPipeline', + modelRepo: 'Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled', + modelRevision: 'ba991d1546d8c50936c4c16398ed0a87b9b99fb1', + retainedObservationSource: + 'sha256:backend-source-v1:371fd754663a95b1b06900df9a838042048466464b4bd5cfa7033c1b6eebe0e3', + active: [...plainImageActive, 'negative_prompt'], + inactive: [...plainImageInactive, 'max_sequence_length'], + legacyNull: [...plainImageLegacyNull, 'max_sequence_length'], + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'float16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 25, + guidance_scale: 5, + max_sequence_length: 256, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.hunyuan-dit-pag-prompt-variant.v1', + workflowId: 'HunyuanDiTPAGPipeline:text_to_image', + modelType: 'HunyuanDiTPAGPipeline', + modelRepo: 'Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled', + modelRevision: 'ba991d1546d8c50936c4c16398ed0a87b9b99fb1', + retainedObservationSource: + 'sha256:backend-source-v1:371fd754663a95b1b06900df9a838042048466464b4bd5cfa7033c1b6eebe0e3', + active: [...plainImageActive, 'negative_prompt', ...pagScalars], + inactive: [...plainImageInactive.filter((key) => !pagScalars.includes(key)), 'max_sequence_length'], + legacyNull: [...plainImageLegacyNull, 'max_sequence_length'], + typedOnly: pagScalars, + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'float16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 25, + guidance_scale: 5, + max_sequence_length: 256, + seed: 42, + negative_prompt: '', + pag_scale: 3, + pag_adaptive_scale: 0, + }, + }, + { + format: 'modiff.private.omnigen-prompt-variant.v1', + workflowId: 'OmniGenPipeline:text_to_image', + modelType: 'OmniGenPipeline', + modelRepo: 'Shitao/OmniGen-v1-diffusers', + modelRevision: '016e2f61d12a98303f6bbdf122687694d7984268', + retainedObservationSource: + 'sha256:backend-source-v1:371fd754663a95b1b06900df9a838042048466464b4bd5cfa7033c1b6eebe0e3', + active: plainImageActive, + inactive: [...plainImageInactive, 'negative_prompt', 'max_sequence_length'], + legacyNull: [...plainImageLegacyNull, 'negative_prompt', 'max_sequence_length'], + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'bfloat16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 50, + guidance_scale: 2.5, + max_sequence_length: 256, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.kandinsky3-cpu-prompt-variant.v1', + workflowId: 'Kandinsky3Pipeline:text_to_image', + modelType: 'Kandinsky3Pipeline', + modelRepo: 'kandinsky-community/kandinsky-3', + modelRevision: 'bf79e6c219da8a94abb50235fdc4567eb8fb4632', + active: [...plainImageActive, 'negative_prompt'], + inactive: [...plainImageInactive, 'max_sequence_length'], + legacyNull: [...plainImageLegacyNull, 'max_sequence_length'], + platform: /^Linux-/u, + backend: 'rocm', + executionDevice: 'cpu:0', + dtype: 'float32', + offload: 'none', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 25, + guidance_scale: 3, + max_sequence_length: 128, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.lumina-prompt-variant.v1', + workflowId: 'LuminaPipeline:text_to_image', + modelType: 'LuminaPipeline', + modelRepo: 'Alpha-VLLM/Lumina-Next-SFT-diffusers', + modelRevision: '0ee5ec90043acf5cb41fe96274af36eb7fad8d95', + active: [...plainImageActive, 'negative_prompt', 'max_sequence_length'], + inactive: plainImageInactive, + legacyNull: plainImageLegacyNull, + platform: /^Windows-/u, + backend: 'cuda', + dtype: 'bfloat16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 30, + guidance_scale: 4, + max_sequence_length: 256, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.sana-text-to-image-prompt-variant.v1', + workflowId: 'SanaPipeline:text_to_image', + modelType: 'SanaPipeline', + modelRepo: 'Efficient-Large-Model/Sana_600M_1024px_diffusers', + modelRevision: '28f3af7689de15f3883d5863059a2fca0aa9b829', + active: [...plainImageActive, 'negative_prompt', 'max_sequence_length'], + inactive: plainImageInactive, + legacyNull: plainImageLegacyNull, + platform: /^Linux-/u, + backend: 'rocm', + previousExpertFamily: 'AnimateDiffPipeline', + dtype: 'float16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 20, + guidance_scale: 4.5, + max_sequence_length: 300, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.sana-sprint-text-to-image-prompt-variant.v1', + workflowId: 'SanaSprintPipeline:text_to_image', + modelType: 'SanaSprintPipeline', + modelRepo: 'Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers', + modelRevision: 'aa76e7f4f4928f378716b6716a2130fba3caf5b1', + active: [...plainImageActive, 'max_sequence_length'], + inactive: [...plainImageInactive, 'negative_prompt'], + legacyNull: [...plainImageLegacyNull, 'negative_prompt'], + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'bfloat16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 2, + guidance_scale: 4.5, + max_sequence_length: 300, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.chroma-text-to-image-prompt-variant.v1', + workflowId: 'ChromaPipeline:text_to_image', + modelType: 'ChromaPipeline', + modelRepo: 'lodestones/Chroma1-HD', + modelRevision: '0e0c60ece1e82b17cb7f77342d765ba5024c40c0', + previousExpertFamily: 'ChromaPipeline', + active: [...plainImageActive, 'negative_prompt', 'max_sequence_length'], + inactive: plainImageInactive, + legacyNull: plainImageLegacyNull, + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'bfloat16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 40, + guidance_scale: 3, + max_sequence_length: 512, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.sdxl-pag-prompt-variant.v1', + workflowId: 'StableDiffusionXLPAGPipeline:text_to_image', + modelType: 'StableDiffusionXLPAGPipeline', + modelRepo: 'stabilityai/stable-diffusion-xl-base-1.0', + modelRevision: '462165984030d82259a11f4367a4eed129e94a7b', + active: [...plainImageActive, 'negative_prompt', ...pagScalars], + inactive: [...plainImageInactive.filter((field) => !pagScalars.includes(field)), 'max_sequence_length'], + legacyNull: [...plainImageLegacyNull, 'max_sequence_length'], + typedOnly: pagScalars, + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'float16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 50, + guidance_scale: 5, + max_sequence_length: 512, + seed: 42, + negative_prompt: '', + pag_scale: 3, + pag_adaptive_scale: 0, + }, + }, + { + format: 'modiff.private.sdxl-turbo-prompt-variant.v1', + workflowId: 'StableDiffusionXLTurboPipeline:text_to_image', + modelType: 'StableDiffusionXLTurboPipeline', + modelRepo: 'stabilityai/sdxl-turbo', + modelRevision: '71153311d3dbb46851df1931d3ca6e939de83304', + active: [...plainImageActive, 'negative_prompt'], + inactive: [...plainImageInactive, 'max_sequence_length'], + legacyNull: [...plainImageLegacyNull, 'max_sequence_length'], + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'float16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 512, + height: 512, + num_inference_steps: 1, + guidance_scale: 0, + max_sequence_length: 512, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.sana-pag-prompt-variant.v1', + workflowId: 'SanaPAGPipeline:text_to_image', + modelType: 'SanaPAGPipeline', + modelRepo: 'Efficient-Large-Model/Sana_600M_1024px_diffusers', + modelRevision: '28f3af7689de15f3883d5863059a2fca0aa9b829', + active: [...plainImageActive, 'negative_prompt', 'max_sequence_length', ...pagScalars], + inactive: plainImageInactive.filter((field) => !pagScalars.includes(field)), + legacyNull: plainImageLegacyNull, + typedOnly: pagScalars, + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'float16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 20, + guidance_scale: 4.5, + max_sequence_length: 300, + seed: 42, + negative_prompt: '', + pag_scale: 3, + pag_adaptive_scale: 0, + }, + }, + { + format: 'modiff.private.auraflow-prompt-variant.v1', + workflowId: 'AuraFlowPipeline:text_to_image', + modelType: 'AuraFlowPipeline', + modelRepo: 'fal/AuraFlow-v0.3', + modelRevision: '2cd8588f04c886002be4571697d84654a50e3af3', + active: [...plainImageActive, 'negative_prompt', 'max_sequence_length'], + inactive: plainImageInactive, + legacyNull: plainImageLegacyNull, + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'float16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1536, + height: 768, + num_inference_steps: 50, + guidance_scale: 3.5, + max_sequence_length: 256, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.lcm-text-to-image-prompt-variant.v1', + workflowId: 'LatentConsistencyModelPipeline:text_to_image', + modelType: 'LatentConsistencyModelPipeline', + modelRepo: 'SimianLuo/LCM_Dreamshaper_v7', + modelRevision: 'a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5', + active: plainImageActive, + inactive: [...plainImageInactive, 'negative_prompt', 'max_sequence_length'], + legacyNull: [...plainImageLegacyNull, 'negative_prompt', 'max_sequence_length'], + platform: /^Windows-/u, + backend: 'cuda', + dtype: 'float32', + offload: 'none', + deviceMap: 'cuda', + generation: { + width: 512, + height: 512, + num_inference_steps: 4, + guidance_scale: 8.5, + max_sequence_length: 512, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.ernie-image-prompt-variant.v1', + workflowId: 'ErnieImagePipeline:text_to_image', + modelType: 'ErnieImagePipeline', + modelRepo: 'baidu/ERNIE-Image-Turbo', + modelRevision: 'bc68c81e2a1730a394d5fc9fae70713dee940140', + active: [...plainImageActive, 'negative_prompt'], + inactive: [...plainImageInactive, 'max_sequence_length'], + legacyNull: [...plainImageLegacyNull, 'max_sequence_length'], + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'bfloat16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 8, + guidance_scale: 1, + max_sequence_length: 2048, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.ovis-image-prompt-variant.v1', + workflowId: 'OvisImagePipeline:text_to_image', + modelType: 'OvisImagePipeline', + modelRepo: 'ATH-MaaS/Ovis-Image-7B', + modelRevision: '41be1c5821a92c970d63d7eb595a2fd3fe32b22e', + active: [...plainImageActive, 'negative_prompt', 'max_sequence_length'], + inactive: plainImageInactive, + legacyNull: plainImageLegacyNull, + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'bfloat16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 50, + guidance_scale: 5, + max_sequence_length: 256, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.cogview3-prompt-variant.v1', + lateNativeSnapshot: true, + workflowId: 'CogView3PlusPipeline:text_to_image', + modelType: 'CogView3PlusPipeline', + modelRepo: 'zai-org/CogView3-Plus-3B', + modelRevision: '5d70e40732ac0efac98524c51a7fa9c82707f1e5', + active: [...plainImageActive, 'negative_prompt', 'max_sequence_length'], + inactive: plainImageInactive, + legacyNull: plainImageLegacyNull, + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'bfloat16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 50, + guidance_scale: 7, + max_sequence_length: 224, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.cogview4-prompt-variant.v1', + workflowId: 'CogView4Pipeline:text_to_image', + modelType: 'CogView4Pipeline', + modelRepo: 'zai-org/CogView4-6B', + modelRevision: '63a52b7f6dace7033380cd6da14d0915eab3e6b5', + active: [...plainImageActive, 'negative_prompt', 'max_sequence_length'], + inactive: plainImageInactive, + legacyNull: plainImageLegacyNull, + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'bfloat16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 50, + guidance_scale: 3.5, + max_sequence_length: 1024, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.nucleus-image-prompt-variant.v1', + workflowId: 'NucleusMoEImagePipeline:text_to_image', + modelType: 'NucleusMoEImagePipeline', + modelRepo: 'NucleusAI/Nucleus-Image', + modelRevision: '5e963db4fd0a65c7e4faf53ca2d4eca567c4dcfa', + active: [...plainImageActive, 'negative_prompt', 'max_sequence_length'], + inactive: plainImageInactive, + legacyNull: plainImageLegacyNull, + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'bfloat16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 50, + guidance_scale: 4, + max_sequence_length: 1024, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.glm-image-prompt-variant.v1', + workflowId: 'GlmImagePipeline:text_to_image', + modelType: 'GlmImagePipeline', + modelRepo: 'zai-org/GLM-Image', + modelRevision: '2c433cc0cbc293bde2ac8ca9624f279b5d23fcf4', + active: [...plainImageActive, 'max_sequence_length'], + inactive: [...plainImageInactive, 'negative_prompt'], + legacyNull: [...plainImageLegacyNull, 'negative_prompt'], + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'bfloat16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 50, + guidance_scale: 1.5, + max_sequence_length: 2048, + seed: 42, + }, + }, + { + format: 'modiff.private.prx-prompt-variant.v1', + workflowId: 'PRXPipeline:text_to_image', + modelType: 'PRXPipeline', + modelRepo: 'Photoroom/prx-512-t2i-sft', + modelRevision: '2996423bc26e8eaca48774fac1797484214dfea0', + active: [...plainImageActive, 'negative_prompt', 'max_sequence_length'], + inactive: plainImageInactive, + legacyNull: plainImageLegacyNull, + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'bfloat16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 512, + height: 512, + num_inference_steps: 28, + guidance_scale: 5, + max_sequence_length: 256, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.sd15-prompt-variant.v1', + savedGenerateBlock: true, + workflowId: 'StableDiffusionPipeline:text_to_image', + modelType: 'StableDiffusionPipeline', + modelRepo: 'stable-diffusion-v1-5/stable-diffusion-v1-5', + modelRevision: '451f4fe16113bff5a5d2269ed5ad43b0592e9a14', + active: [...plainImageActive, 'negative_prompt'], + inactive: [...plainImageInactive, 'max_sequence_length'], + legacyNull: [...plainImageLegacyNull, 'max_sequence_length'], + platform: /^Windows-/u, + backend: 'cuda', + dtype: 'float32', + offload: 'none', + deviceMap: 'cuda', + generation: { + width: 512, + height: 512, + num_inference_steps: 30, + guidance_scale: 7.5, + seed: 8319, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.sdxl-base-prompt-variant.v1', + workflowId: 'StableDiffusionXLPipeline:text_to_image', + modelType: 'StableDiffusionXLPipeline', + modelRepo: 'stabilityai/stable-diffusion-xl-base-1.0', + modelRevision: '462165984030d82259a11f4367a4eed129e94a7b', + active: [...plainImageActive, 'negative_prompt'], + inactive: [...plainImageInactive, 'max_sequence_length'], + legacyNull: [...plainImageLegacyNull, 'max_sequence_length'], + platform: /^Linux-/u, + backend: 'rocm', + dtype: 'bfloat16', + offload: 'model_cpu', + deviceMap: 'none', + generation: { + width: 1024, + height: 1024, + num_inference_steps: 30, + guidance_scale: 5, + max_sequence_length: 512, + seed: 42, + negative_prompt: '', + }, + }, + { + format: 'modiff.private.sd15-pag-prompt-variant.v1', + workflowId: 'StableDiffusionPAGPipeline:text_to_image', + modelType: 'StableDiffusionPAGPipeline', + modelRepo: 'stable-diffusion-v1-5/stable-diffusion-v1-5', + modelRevision: '451f4fe16113bff5a5d2269ed5ad43b0592e9a14', + active: [...plainImageActive, 'negative_prompt', ...pagScalars], + inactive: [...plainImageInactive.filter((key) => !pagScalars.includes(key)), 'max_sequence_length'], + legacyNull: [...plainImageLegacyNull, 'max_sequence_length'], + // These effective settings are present only in typed field accounting. + typedOnly: pagScalars, + platform: /^Windows-/u, + backend: 'cuda', + dtype: 'float32', + offload: 'none', + deviceMap: 'cuda', + generation: { + width: 512, + height: 512, + num_inference_steps: 30, + guidance_scale: 7.5, + seed: 42, + negative_prompt: '', + pag_scale: 3, + pag_adaptive_scale: 0, + }, + }, +]; +const retainedUnconditionalRecipes = { + DDPMPipeline: { + repoId: 'google/ddpm-cifar10-32', + revision: '267b167dc01f0e4e61923ea244e8b988f84deb80', + size: 32, + steps: 1000, + platform: /^Windows-/u, + backend: 'cuda', + }, + ConsistencyModelPipeline: { + repoId: 'openai/diffusers-cd_imagenet64_l2', + revision: '5f462e4403fc37b72ec6004e806c71805db22387', + size: 64, + steps: 1, + platform: /^Linux-/u, + backend: 'rocm', + }, +}; +// The older receipt includes unset conditioning kwargs, and omits PAG knobs. +const pixArtLegacyNullFields = ['control_guidance_start', 'conditioning_scale', 'strength', 'control_guidance_end']; +const pixArtLegacyFields = [ + ...pixArtSigmaPag.active.filter((key) => !['pag_scale', 'pag_adaptive_scale'].includes(key)), + 'executed_task', + ...pixArtLegacyNullFields, +]; + +const accountingFields = { + LoadPipeline: `model_id pipeline_class mode revision conditioning_kind conditioning_model_id conditioning_revision + dtype device quantization_mode quantized_components device_map auto_offload offload_mode enable_vae_slicing + enable_vae_tiling low_cpu_mem_usage`.split(/\s+/u), + PipelineQuantizationConfigV2: 'backend components dtype excluded_modules component_overrides'.split(' '), + DiffusersExecutionRecipe: `device_map max_memory device_map_overrides offload_mode device attention_backend + attention_components vae_slicing vae_tiling layerwise_casting layerwise_casting_components layerwise_storage_dtype + layerwise_compute_dtype channels_last channels_last_components regional_compile compile_components compile_backend + compile_mode compile_fullgraph compile_dynamic denoiser_cache cache_threshold cache_options`.split(/\s+/u), + UnconditionalGenerate: 'image_contract batch_size seed num_inference_steps eta class_label output_type'.split(' '), + Generate: ['image_contract', ...pixArtSigmaPag.active, ...pixArtSigmaPag.inactive], + Preview: ['device', 'export'], +}; +const accountingModules = { + LoadPipeline: 'modules.DiffusersImage', + UnconditionalGenerate: 'modules.DiffusersImage', + Generate: 'modules.DiffusersImage', + PipelineQuantizationConfigV2: 'modules.DiffusersRuntime', + DiffusersExecutionRecipe: 'modules.DiffusersRuntime', + Preview: 'modules.Image', +}; +const accountingScalar = (value) => + value === null || + typeof value === 'boolean' || + (typeof value === 'string' && value.length <= 16_384) || + (typeof value === 'number' && Number.isFinite(value) && Math.abs(value) <= Number.MAX_SAFE_INTEGER); +const accountingValue = (value) => + accountingScalar(value) || (Array.isArray(value) && value.length <= 16 && value.every(accountingScalar)); +function accountingKeys(value, keys, label) { + assert.ok(value && typeof value === 'object' && !Array.isArray(value), label); + same(Object.keys(value).sort(), [...keys].sort(), label); +} +// The backend hashes sorted ASCII JSON, separately from existing v1 hashes. +function accountingDigest(kind, value) { + const ordered = (item) => + Array.isArray(item) + ? item.map(ordered) + : item && typeof item === 'object' + ? Object.fromEntries( + Object.keys(item) + .sort() + .map((key) => [key, ordered(item[key])]), + ) + : item; + const ascii = JSON.stringify(ordered(value)).replace( + /[\u007f-\uffff]/g, + (character) => `\\u${character.charCodeAt(0).toString(16).padStart(4, '0')}`, + ); + return createHash('sha256').update(`${kind}\n${ascii}`, 'ascii').digest('hex'); +} + +/** Independent accounting join; not a provenance factory or release grant. + * Scope is the reviewed whole-pipeline canonical image creators. + * The optional shared-factory hook binds this join to the original task/output. + * Native acceptance remains separate; the default factory path stays unchanged. + */ +export function canonicalAccountingExecutionPlan({ expectedApiGraph, apiGraph, consumed, target, runtimeEvidence }) { + const retainedDefaults = + target.workflowId === retainedDreamLiteMobileDefaults.workflowId ? retainedDreamLiteMobileDefaults : undefined; + return imageAccountingExecutionPlan( + { expectedApiGraph, apiGraph, consumed, target, runtimeEvidence }, + retainedDefaults, + ); +} + +export function directImagePromptAccountingExecutionPlan(args) { + const profile = directImagePromptRoutes.find(({ workflowId }) => workflowId === args.target.workflowId); + assert.ok(profile, 'Direct image prompt accounting route is outside the reviewed scope.'); + return imageAccountingExecutionPlan(args, profile); +} + +function imageAccountingExecutionPlan( + { expectedApiGraph, apiGraph, consumed, target, runtimeEvidence }, + promptVariant, +) { + assertCanonicalAccountingGraphEnvelope(expectedApiGraph); + assertCanonicalAccountingGraphEnvelope(apiGraph); + same( + canonicalGraphIdentity(apiGraph), + canonicalGraphIdentity(expectedApiGraph), + 'Accounting graph is not the canonical export.', + ); + const isPixArt = target.modelType === pixArtSigmaPag.modelType; + const conditional = promptVariant ?? (isPixArt ? pixArtSigmaPag : null); + const legacyNullFields = promptVariant?.legacyNull ?? (isPixArt ? pixArtLegacyNullFields : []); + const retainedUnconditional = Object.hasOwn(retainedUnconditionalRecipes, target.modelType) + ? retainedUnconditionalRecipes[target.modelType] + : null; + assert.ok( + conditional || retainedUnconditional || target.modelType === 'DDIMPipeline', + 'Canonical accounting model is outside the reviewed scope.', + ); + assert.equal(target.task, conditional ? 'text_to_image' : 'unconditional_image'); + if (conditional) { + assert.equal(target.modelType, conditional.modelType); + assert.equal(target.workflowId, conditional.workflowId); + const modelSet = promptVariant + ? [{ repoId: promptVariant.modelRepo, revision: promptVariant.modelRevision }] + : conditional.modelSet; + same(target.modelSet, modelSet, 'Conditional image model is outside the reviewed accounting scope.'); + } + if (retainedUnconditional) { + const { repoId, revision } = retainedUnconditional; + assert.equal(target.workflowId, `${target.modelType}:unconditional_image`); + same(target.modelSet, [{ repoId, revision }], 'Retained unconditional model is outside the reviewed scope.'); + } + const generateAction = conditional ? 'Generate' : 'UnconditionalGenerate'; + const retainedGenerator = Boolean( + promptVariant?.retainedObservationSource && + consumed?.nodes?.find((row) => row.action === 'Generate')?.fieldAccounting === undefined, + ); + if (retainedGenerator) { + assert.equal( + promptVariant.retainedDefaultPrompt === undefined + ? runtimeEvidence?.sourceFingerprint + : runtimeEvidence?.run?.task?.runtimeFingerprint?.backendSource?.fingerprint, + promptVariant.retainedObservationSource, + 'Retained image source differs from the reviewed adapter.', + ); + same(consumed.ambiguousFields, ['device'], 'Unexpected ambiguity in retained image consumption.'); + same(consumed.unavailableFields, [], 'Required retained image controls are unavailable.'); + } + const generationFields = conditional + ? ['image_contract', ...conditional.active, ...conditional.inactive] + : accountingFields[generateAction]; + assert.equal(consumed?.schemaVersion, 1); + assert.equal(consumed.source, 'backend-execution'); + assert.equal(consumed.truncated, false); + same(consumed.uncapturedNodeIds, [], 'Accounting ancestry is incomplete.'); + same(consumed.fieldAccountingStatus, { schemaVersion: 1, truncated: false }, 'Accounting extension is incomplete.'); + assert.ok(Array.isArray(consumed.nodes) && consumed.nodes.length === 5, 'Exact five-node accounting is required.'); + assert.equal(new Set(consumed.nodes.map((row) => row.nodeId)).size, 5, 'Accounting owner identities are ambiguous.'); + same( + consumed.nodes.map((row) => row.nodeId).sort(), + Object.keys(apiGraph.nodes).sort(), + 'Accounting graph scope differs.', + ); + assert.ok(Array.isArray(apiGraph.paths) && apiGraph.paths.length === 1, 'One executed canonical path is required.'); + same([...apiGraph.paths[0]].sort(), Object.keys(apiGraph.nodes).sort(), 'Accounting contains an unexecuted owner.'); + const byAction = new Map(); + for (const row of consumed.nodes) { + const node = apiGraph.nodes[row.nodeId]; + assert.ok(Object.hasOwn(accountingFields, row.action), 'Unknown accounting action.'); + if (['Generate', 'UnconditionalGenerate'].includes(row.action)) + assert.equal(row.action, generateAction, 'Generation action is outside the reviewed accounting scope.'); + assert.equal(row.module, accountingModules[row.action], 'Unknown accounting module.'); + assert.equal(node.module, row.module); + assert.equal(node.action, row.action); + assert.ok(!byAction.has(row.action), 'Accounting owner is not unique.'); + byAction.set(row.action, { row, node }); + same(row.omittedFields, {}, 'Legacy consumed fields were omitted.'); + if (retainedGenerator && row.action === generateAction) { + accountingKeys( + row.fields, + [ + ...conditional.active.filter((key) => !conditional.typedOnly?.includes(key)), + 'executed_task', + ...legacyNullFields, + ], + 'Retained adapter controls are incomplete or unexpected.', + ); + for (const [key, item] of Object.entries(row.fields)) { + accountingKeys(item, ['value', 'source'], 'Retained control origin is incomplete.'); + assert.equal(item.source, 'literal'); + const expected = + key === 'executed_task' ? target.task : legacyNullFields.includes(key) ? null : node.params[key]?.value; + assert.notEqual(expected, undefined, 'Retained control is absent from the graph.'); + same(item.value, expected, `Retained adapter control differs: ${key}`); + } + continue; + } + const section = row.fieldAccounting; + accountingKeys( + section, + [ + 'schemaVersion', + 'fields', + 'inputProjections', + 'outputProjections', + 'unaccountedFields', + 'omittedFields', + 'complete', + ], + 'Unknown or missing accounting section keys.', + ); + assert.equal(section.schemaVersion, 1); + assert.equal(section.complete, true, 'Incomplete field accounting.'); + same(section.omittedFields, {}, 'Accounting fields were omitted.'); + same(section.unaccountedFields, [], 'Unaccounted graph fields remain.'); + assert.ok(JSON.stringify(section).length <= 65_536, 'Accounting section exceeds its bound.'); + const expectedFields = [ + ...(row.action === generateAction ? generationFields : accountingFields[row.action]), + ...(row.action === 'LoadPipeline' && Object.hasOwn(node.params, 'execution_profile_id') + ? ['execution_profile_id'] + : []), + ]; + accountingKeys(section.fields, expectedFields, 'Accounting literal field set differs.'); + for (const [key, field] of Object.entries(section.fields)) { + const parameter = node.params[key]; + assert.ok( + parameter && Object.hasOwn(parameter, 'value') && !parameter.sourceId && !parameter.sourceKey, + `Accounting literal origin differs: ${row.nodeId}.${key}`, + ); + assert.equal(field.source, 'literal', 'Connected or overridden scalar accounting is unsupported.'); + if (field.disposition === 'metadata') { + accountingKeys(field, ['disposition', 'source', 'reason', 'sha256'], 'Unexpected metadata fields.'); + assert.equal(key, 'image_contract'); + assert.equal(field.reason, 'presentation-contract'); + assert.equal( + field.sha256, + accountingDigest('image-contract-v1', parameter.value), + 'Metadata contract hash differs.', + ); + } else { + accountingKeys( + field, + ['disposition', 'inputValue', 'value', 'source', ...(field.disposition === 'consumed' ? [] : ['reason'])], + 'Unexpected accounted scalar fields.', + ); + assert.ok( + ['consumed', 'inactive', 'superseded'].includes(field.disposition), + 'Unknown accounting disposition.', + ); + assert.ok(accountingValue(field.inputValue) && accountingValue(field.value), 'Unbounded accounting scalar.'); + const requested = parameter.value?.source === 'hub' ? parameter.value.value : parameter.value; + same(field.inputValue, requested, `Requested literal differs: ${row.nodeId}.${key}`); + } + } + for (const [key, parameter] of Object.entries(node.params)) { + if (Object.hasOwn(parameter, 'value') && !parameter.sourceId) + assert.ok(Object.hasOwn(section.fields, key), `Unaccounted literal: ${row.nodeId}.${key}`); + } + for (const [key, field] of Object.entries(row.fields)) { + assert.equal(field.source, 'literal', 'Legacy scalar origin differs.'); + accountingKeys(field, ['value', 'source'], 'Legacy scalar has contradictory origin fields.'); + if (key === 'executed_task') { + assert.equal(row.action, generateAction); + assert.equal(field.value, target.task); + continue; + } + if (row.action === 'Generate' && legacyNullFields.includes(key)) { + assert.equal(field.value, null, `Inactive legacy control was passed to the pipeline: ${key}`); + continue; + } + const accounted = section.fields[key]; + assert.ok(accounted && accounted.disposition !== 'metadata', `Legacy scalar lacks accounting: ${key}`); + let expected = row.action === 'LoadPipeline' ? accounted.inputValue : accounted.value; + if (key === 'seed' && Number.isSafeInteger(expected) && typeof field.value === 'string') + expected = String(expected); + same(field.value, expected, `Legacy/new accounting contradicts: ${row.nodeId}.${key}`); + } + } + const owner = byAction.get('LoadPipeline'); + const recipe = byAction.get('DiffusersExecutionRecipe'); + const quant = byAction.get('PipelineQuantizationConfigV2'); + const generate = byAction.get(generateAction); + const preview = byAction.get('Preview'); + assert.ok(owner && recipe && quant && generate && preview, 'Canonical accounting roles are incomplete.'); + assert.equal(consumed.nodeId, preview.row.nodeId, 'Accounting output owner differs.'); + const fields = (entry) => entry.row.fieldAccounting.fields; + const value = (entry, key) => { + if (retainedGenerator && entry === generate) + return conditional.active.includes(key) && !conditional.typedOnly?.includes(key) + ? entry.row.fields[key].value + : entry.node.params[key]?.value; + return fields(entry)[key].value; + }; + const check = (entry, key, disposition, effective, reason) => { + const field = fields(entry)[key]; + assert.equal(field.disposition, disposition, `Wrong disposition: ${entry.row.nodeId}.${key}`); + assert.equal(field.reason, reason, `Wrong disposition reason: ${entry.row.nodeId}.${key}`); + same(field.value, effective, `Effective control differs: ${entry.row.nodeId}.${key}`); + }; + const wires = new Map([ + [owner.row.nodeId, { execution_recipe: [recipe, 'execution_recipe'] }], + [recipe.row.nodeId, { quantization_config: [quant, 'quantization_config'] }], + [generate.row.nodeId, { pipeline: [owner, 'pipeline'] }], + [preview.row.nodeId, { image: [generate, 'images'] }], + [quant.row.nodeId, {}], + ]); + for (const entry of byAction.values()) { + const expected = wires.get(entry.row.nodeId); + // The normal exporter also retains Preview's UI output selector. It has + // no source node and is never an execution input or producer connection. + for (const [key, parameter] of Object.entries(entry.node.params)) { + if (!parameter.sourceId && parameter.sourceKey) { + assert.equal(entry, preview, 'A dangling input port is not accounted.'); + assert.equal(key, 'preview'); + same(parameter, { display: 'ui_image', sourceKey: 'output' }, 'Unknown output selector.'); + } + } + const connected = Object.entries(entry.node.params).filter(([, parameter]) => parameter.sourceId); + same(connected.map(([key]) => key).sort(), Object.keys(expected).sort(), 'Unexpected connected runtime input.'); + for (const [key, [producer, port]] of Object.entries(expected)) { + const parameter = entry.node.params[key]; + assert.equal(parameter.sourceId, producer.row.nodeId, 'Connected producer differs.'); + assert.equal(parameter.sourceKey, port, 'Connected producer port differs.'); + assert.ok(!Object.hasOwn(parameter, 'value'), 'Connected input also declares a literal.'); + assert.ok( + apiGraph.paths[0].indexOf(producer.row.nodeId) < apiGraph.paths[0].indexOf(entry.row.nodeId), + 'Producer was not executed before its consumer.', + ); + } + } + const disabled = { backend: 'none', disabled: true }; + const recipeValues = { schema_version: 1, quantization: 'none', device_map_strategy: value(recipe, 'device_map') }; + const componentFields = new Set([ + 'attention_components', + 'layerwise_casting_components', + 'channels_last_components', + 'compile_components', + ]); + for (const key of accountingFields.DiffusersExecutionRecipe.filter((key) => key !== 'device_map_overrides')) { + const item = value(recipe, key); + if (componentFields.has(key)) { + assert.ok(typeof item === 'string' || (Array.isArray(item) && item.every((part) => typeof part === 'string'))); + recipeValues[key] = [ + ...new Set( + (Array.isArray(item) ? item : item.replaceAll('\n', ',').split(',')) + .map((part) => part.trim()) + .filter(Boolean), + ), + ]; + } else recipeValues[key] = item; + } + for (const key of ['max_memory', 'cache_options', 'device_map_overrides']) + assert.equal(value(recipe, key), '{}', 'Mapping or cache configuration is outside the bounded accounting scope.'); + assert.equal(value(recipe, 'device_map'), 'none', 'Split/manual placement is outside the bounded accounting scope.'); + assert.equal( + value(recipe, 'offload_mode'), + promptVariant?.offload ?? (isPixArt ? 'model_cpu' : 'none'), + 'Offload is outside the reviewed accounting scope.', + ); + const projection = (item, kind, values, producer) => { + accountingKeys( + item, + ['kind', 'values', 'sha256', ...(producer ? ['source', 'sourceNodeId', 'sourcePortId'] : [])], + 'Projection shape differs.', + ); + assert.equal(item.kind, kind); + same(item.values, values, 'Projection differs from actual producer controls.'); + assert.equal(item.sha256, accountingDigest(kind, values), 'Projection hash differs.'); + if (producer) { + assert.equal(item.source, 'connected'); + assert.equal(item.sourceNodeId, producer[0].row.nodeId); + assert.equal(item.sourcePortId, producer[1]); + } + }; + for (const entry of byAction.values()) { + if (retainedGenerator && entry === generate) continue; + const section = entry.row.fieldAccounting; + const inputPort = entry === owner ? 'execution_recipe' : entry === recipe ? 'quantization_config' : null; + const outputPort = entry === recipe ? 'execution_recipe' : entry === quant ? 'quantization_config' : null; + accountingKeys(section.inputProjections, inputPort ? [inputPort] : [], 'Unexpected input projections.'); + accountingKeys(section.outputProjections, outputPort ? [outputPort] : [], 'Unexpected output projections.'); + if (inputPort) + projection( + section.inputProjections[inputPort], + entry === owner ? 'execution-recipe-v1' : 'disabled-quantization-v1', + entry === owner ? recipeValues : disabled, + entry === owner ? [recipe, inputPort] : [quant, inputPort], + ); + if (outputPort) + projection( + section.outputProjections[outputPort], + entry === recipe ? 'execution-recipe-v1' : 'disabled-quantization-v1', + entry === recipe ? recipeValues : disabled, + ); + } + assert.equal(value(quant, 'backend'), 'none', 'Enabled quantization is unsupported.'); + for (const key of accountingFields.PipelineQuantizationConfigV2) + check( + quant, + key, + ['dtype', 'excluded_modules'].includes(key) ? 'inactive' : 'consumed', + fields(quant)[key].inputValue, + ['dtype', 'excluded_modules'].includes(key) ? 'feature-disabled' : undefined, + ); + const inactiveRecipe = new Set(['device_map_overrides']); + for (const [enabled, keys] of [ + [ + value(recipe, 'layerwise_casting'), + ['layerwise_casting_components', 'layerwise_storage_dtype', 'layerwise_compute_dtype'], + ], + [value(recipe, 'channels_last'), ['channels_last_components']], + [ + value(recipe, 'regional_compile'), + ['compile_components', 'compile_backend', 'compile_mode', 'compile_fullgraph', 'compile_dynamic'], + ], + [value(recipe, 'denoiser_cache') !== 'none', ['cache_threshold', 'cache_options']], + ]) + if (!enabled) for (const key of keys) inactiveRecipe.add(key); + for (const key of accountingFields.DiffusersExecutionRecipe) + check( + recipe, + key, + inactiveRecipe.has(key) ? 'inactive' : 'consumed', + fields(recipe)[key].inputValue, + inactiveRecipe.has(key) ? 'feature-disabled' : undefined, + ); + const superseded = { + device: 'device', + offload_mode: 'offload_mode', + auto_offload: 'offload_mode', + enable_vae_slicing: 'vae_slicing', + enable_vae_tiling: 'vae_tiling', + }; + for (const key of accountingFields.LoadPipeline) { + if (Object.hasOwn(superseded, key)) { + const effective = + key === 'auto_offload' ? value(recipe, 'offload_mode') !== 'none' : value(recipe, superseded[key]); + check(owner, key, 'superseded', effective, 'connected-recipe'); + } else if ( + key === 'device_map' && + value(recipe, 'offload_mode') === 'none' && + ['cuda', 'cuda:0'].includes(value(owner, 'device')) + ) { + assert.equal(fields(owner)[key].inputValue, 'none'); + check(owner, key, 'superseded', 'cuda', 'loader-normalization'); + } else if (['conditioning_model_id', 'conditioning_revision'].includes(key)) { + check(owner, key, 'inactive', fields(owner)[key].inputValue, 'adapter-inactive'); + } else check(owner, key, 'consumed', fields(owner)[key].inputValue); + } + assert.equal(value(owner, 'pipeline_class'), target.modelType); + assert.equal(value(owner, 'mode'), target.task); + assert.equal(value(owner, 'conditioning_kind'), 'none'); + if (Object.hasOwn(fields(owner), 'execution_profile_id')) { + assert.equal(value(owner, 'execution_profile_id'), '', 'Selected image stage routes need separate accounting.'); + check(owner, 'execution_profile_id', 'inactive', '', 'adapter-inactive'); + } + assert.equal(value(owner, 'quantization_mode'), 'none'); + same(value(owner, 'quantized_components'), [], 'Quantized components are unsupported.'); + assert.ok(immutableRevision(value(owner, 'revision')), 'Executed loader pin is unresolved.'); + same( + [{ repoId: value(owner, 'model_id'), revision: value(owner, 'revision') }], + target.modelSet, + 'Executed model set differs.', + ); + const inactive = new Set(conditional?.inactive ?? ['class_label', ...(retainedUnconditional ? ['eta'] : [])]); + for (const key of retainedGenerator ? [] : generationFields) { + if (key === 'image_contract') { + assert.equal(fields(generate)[key].disposition, 'metadata'); + continue; + } + const inputValue = fields(generate)[key].inputValue; + const effective = promptVariant && key === 'seed' ? Number(inputValue) : inputValue; + check( + generate, + key, + inactive.has(key) ? 'inactive' : 'consumed', + effective, + inactive.has(key) ? 'adapter-inactive' : undefined, + ); + } + assert.equal(value(generate, 'output_type'), 'pil', 'Only already-decoded output is accounted.'); + if (retainedUnconditional) { + const { size, steps, platform, backend } = retainedUnconditional; + accountingKeys( + generate.row.fields, + ['executed_task', 'num_inference_steps', 'output_type', 'seed'], + 'Retained unconditional controls are incomplete or unexpected.', + ); + assert.equal(generate.node.params.image_contract.value.pipelineClass, target.modelType); + assert.equal(generate.node.params.image_contract.value.mode, target.task); + assert.equal(value(generate, 'num_inference_steps'), steps); + assert.equal(value(generate, 'batch_size'), 1); + assert.equal(value(generate, 'seed'), 42); + assert.equal(value(generate, 'class_label'), -1); + assert.equal(value(generate, 'eta'), 0); + assert.equal(value(owner, 'dtype'), 'float32'); + assert.equal(value(owner, 'device'), 'cuda:0'); + assert.equal(value(owner, 'device_map'), 'cuda'); + assert.equal(recipeValues.attention_backend, 'auto', 'Retained unconditional attention differs.'); + same(recipeValues.attention_components, [], 'Unreviewed attention component selection.'); + for (const key of ['regional_compile', 'channels_last', 'layerwise_casting']) + assert.equal(recipeValues[key], false); + assert.equal(recipeValues.denoiser_cache, 'none'); + assert.ok( + apiGraph.runtimeHints && Object.keys(apiGraph.runtimeHints).length > 0, + 'Retained unconditional output requires original submission and completion evidence.', + ); + const { run, output } = runtimeEvidence ?? {}; + assert.match(run?.task?.runtimeFingerprint?.packages?.platform ?? '', platform, 'Retained platform differs.'); + assert.equal(run?.task?.runtimeMeasurement?.backend, backend, 'Retained measurement backend differs.'); + assert.equal(run?.task?.runtimeMeasurement?.device, 'cuda:0', 'Retained measurement device differs.'); + assert.equal(output?.formSnapshot?.resourceMode, 'expert', 'Retained run is outside Expert scope.'); + assert.equal(output?.fieldKey, 'preview', 'Retained unconditional output field differs.'); + assert.equal(output.mediaItems?.length, 1, 'Retained unconditional image is missing.'); + assert.equal(output.mediaItems[0].width, size, 'Retained unconditional output width differs.'); + assert.equal(output.mediaItems[0].height, size, 'Retained unconditional output height differs.'); + } + if (isPixArt) { + accountingKeys(generate.row.fields, pixArtLegacyFields, 'PixArt legacy controls are incomplete or unexpected.'); + const contract = generate.node.params.image_contract.value; + assert.equal(contract.pipelineClass, target.modelType, 'PixArt metadata model differs.'); + assert.equal(contract.mode, target.task, 'PixArt metadata task differs.'); + for (const field of ['pag_scale', 'pag_adaptive_scale']) + assert.equal(contract.fieldParams?.[field]?.hidden, false, 'PixArt PAG controls must be declared.'); + assert.equal(value(owner, 'dtype'), 'float32', 'PixArt dtype is outside the reviewed accounting scope.'); + assert.equal(value(owner, 'device'), 'cuda:0', 'PixArt device is outside the reviewed accounting scope.'); + assert.equal( + value(owner, 'device_map'), + 'none', + 'PixArt split placement is outside the reviewed accounting scope.', + ); + assert.equal(recipeValues.attention_backend, 'auto'); + for (const key of ['regional_compile', 'channels_last', 'layerwise_casting']) + assert.equal(recipeValues[key], false); + assert.equal(recipeValues.denoiser_cache, 'none'); + assert.ok( + apiGraph.runtimeHints && Object.keys(apiGraph.runtimeHints).length > 0, + 'PixArt requires original submission and completion evidence.', + ); + const output = runtimeEvidence?.output; + assert.equal(output?.fieldKey, 'preview', 'PixArt output field differs.'); + assert.equal(output.mediaItems?.length, 1, 'PixArt must retain its single generated image.'); + assert.equal(output.mediaItems[0].width, value(generate, 'width'), 'PixArt output width differs from generation.'); + assert.equal( + output.mediaItems[0].height, + value(generate, 'height'), + 'PixArt output height differs from generation.', + ); + } + if (promptVariant) { + const prompt = value(generate, 'prompt'); + if (promptVariant.retainedDefaultPrompt !== undefined) { + assert.ok(retainedGenerator, 'The historical default route requires its retained sampler record.'); + assert.equal(prompt, promptVariant.retainedDefaultPrompt, 'The retained default prompt differs.'); + } else { + assert.ok(typeof prompt === 'string' && prompt.trim(), 'Direct image accounting needs the authored prompt.'); + } + accountingKeys( + generate.row.fields, + [ + ...promptVariant.active.filter((key) => !promptVariant.typedOnly?.includes(key)), + 'executed_task', + ...legacyNullFields, + ], + 'Direct image legacy controls are incomplete or unexpected.', + ); + const contract = generate.node.params.image_contract.value; + assert.equal(contract.pipelineClass, target.modelType); + assert.equal(contract.mode, target.task); + for (const [key, expected] of Object.entries(promptVariant.generation)) + assert.equal(value(generate, key), expected, `Direct image ${key} is outside the reviewed accounting scope.`); + assert.ok(Number.isSafeInteger(value(generate, 'seed')) && value(generate, 'seed') >= 0); + assert.equal(value(owner, 'dtype'), promptVariant.dtype); + assert.equal(value(owner, 'device'), promptVariant.executionDevice ?? 'cuda:0'); + assert.equal(value(owner, 'device_map'), promptVariant.deviceMap); + assert.equal(recipeValues.attention_backend, 'auto'); + same(recipeValues.attention_components, [], 'Direct image attention component scope differs.'); + for (const key of ['regional_compile', 'channels_last', 'layerwise_casting']) + assert.equal(recipeValues[key], false); + assert.equal(recipeValues.denoiser_cache, 'none'); + assert.ok( + apiGraph.runtimeHints && Object.keys(apiGraph.runtimeHints).length > 0, + 'Direct image accounting requires original submission and completion evidence.', + ); + const { output } = runtimeEvidence ?? {}; + assert.equal(output?.fieldKey, 'preview'); + assert.equal(output.mediaItems?.length, 1); + same( + [output.mediaItems[0].width, output.mediaItems[0].height], + [value(generate, 'width'), value(generate, 'height')], + 'Native image dimensions differ from the dispatched recipe.', + ); + } + check(preview, 'device', 'inactive', fields(preview).device.inputValue, 'already-decoded-image'); + check(preview, 'export', 'consumed', fields(preview).export.inputValue); + const plan = { + source: 'executed-canonical-accounting-v1', + resourceMode: 'expert', + resolvedResourceMode: 'expert', + modelType: target.modelType, + pipelineClass: value(owner, 'pipeline_class'), + modelRepo: value(owner, 'model_id'), + resolvedModelRepo: value(owner, 'model_id'), + resolvedArtifact: value(owner, 'model_id'), + dtype: value(owner, 'dtype'), + device: value(owner, 'device'), + deviceMap: value(owner, 'device_map'), + autoOffload: value(owner, 'auto_offload'), + offloadMode: value(owner, 'offload_mode'), + quantizationMode: 'none', + quantizedComponents: [], + attentionBackend: recipeValues.attention_backend, + regionalCompile: recipeValues.regional_compile, + denoiserCache: recipeValues.denoiser_cache, + channelsLast: recipeValues.channels_last, + layerwiseCasting: recipeValues.layerwise_casting, + }; + if (apiGraph.runtimeHints && Object.keys(apiGraph.runtimeHints).length > 0) { + const accountHints = promptVariant + ? (args) => directImagePromptRuntimeHintAccounting(args, promptVariant) + : retainedUnconditional + ? canonicalRetainedUnconditionalRuntimeHintAccounting + : isPixArt + ? canonicalPixArtSigmaPagRuntimeHintAccounting + : canonicalDdimRuntimeHintAccounting; + plan.runtimeHintAccounting = accountHints({ + apiGraph, + consumed, + plan, + runtimeEvidence, + digest: sha256Value, + }); + } + return { + ownerId: owner.row.nodeId, + plan, + hash: sha256Value('execution-plan-v1', plan), + ...(retainedGenerator ? { retainedGenerator: true } : {}), + }; +} + +function canonicalAccountingProofPlan({ apiGraph, executedOutput, executionReceipt, taskId, proof }) { + accountingKeys( + proof, + ['expectedApiGraph', 'target', 'run', ...(Object.hasOwn(proof, 'graphCompleted') ? ['graphCompleted'] : [])], + 'Canonical proof accepts original evidence, not a supplied plan.', + ); + const { run, target, expectedApiGraph } = proof; + const task = run?.task; + assert.ok(typeof taskId === 'string' && taskId.length > 0, 'Canonical task identity is missing.'); + assert.equal(task?.task_id, taskId, 'Canonical proof belongs to another task.'); + assert.equal(task.status, 'completed', 'Canonical task is not completed.'); + assert.equal(task.attempt_index, 0, 'Canonical retries are outside the reviewed scope.'); + same(task, executionReceipt, 'Canonical raw task differs from the measured task.'); + assert.ok(task.resourceCandidateId == null, 'Canonical Expert task retains an Auto resource candidate.'); + assert.ok( + !task.runtimeHints || Object.keys(task.runtimeHints).length === 0, + 'Canonical task contains unreviewed runtime hints.', + ); + assert.ok( + executedOutput && typeof executedOutput.id === 'string' && executedOutput.id.length > 0, + 'Canonical output is missing.', + ); + assert.equal(executedOutput.taskId, taskId, 'Canonical output belongs to another task.'); + assert.equal(executedOutput.attemptIndex, 0, 'Canonical output attempt differs.'); + assert.ok(typeof executedOutput.workflowTabId === 'string' && executedOutput.workflowTabId.length > 0); + assert.equal(run.workflow_id, executedOutput.workflowTabId, 'Canonical output belongs to another workflow.'); + const persisted = (run.outputs ?? []).filter((item) => item.id === executedOutput.id && item.taskId === taskId); + assert.equal(persisted.length, 1, 'Canonical output is not uniquely present in the raw task.'); + for (const key of [ + 'taskId', + 'clientRunId', + 'runInputHash', + 'workflowTabId', + 'attemptIndex', + 'nodeId', + 'fieldKey', + 'apiGraphSnapshot', + 'resolvedExecutionInputs', + 'mediaHash', + 'mediaItems', + ]) { + assert.notEqual(executedOutput[key], undefined, `Canonical output is missing ${key}.`); + same(executedOutput[key], persisted[0][key], `Canonical original output ${key} differs.`); + } + same(apiGraph, executedOutput.apiGraphSnapshot, 'Canonical factory graph differs from the original output.'); + const consumed = executedOutput.resolvedExecutionInputs; + assert.equal(consumed?.taskId, taskId, 'Canonical consumed receipt belongs to another task.'); + assert.equal(consumed.attemptIndex, 0, 'Canonical consumed receipt attempt differs.'); + assert.equal(consumed.nodeId, executedOutput.nodeId, 'Canonical consumed receipt output owner differs.'); + return canonicalAccountingExecutionPlan({ + expectedApiGraph, + apiGraph, + consumed, + target, + runtimeEvidence: { run, output: executedOutput, graphCompleted: proof.graphCompleted }, + }); +} + export function createRunProvenance({ templateId, lockedSettings, @@ -1081,20 +3725,84 @@ export function createRunProvenance({ executionReceipt, taskId, expectedOutput, + canonicalAccountingProof, + retainedNativeEvidence, + videoNormalizationEvidence, + modelDependencyEvidence, + nativeGraphSubmission, capturedAt = new Date().toISOString(), }) { + assert.ok( + canonicalAccountingProof === undefined || retainedNativeEvidence === undefined, + 'Retained native records and canonical accounting proof must be reviewed separately.', + ); + assert.ok( + videoNormalizationEvidence === undefined || + (canonicalAccountingProof === undefined && retainedNativeEvidence === undefined), + 'Native video normalization evidence must be reviewed separately from retained or canonical accounting records.', + ); const rawRouteBinding = apiGraph?.provenance?.registeredBlockV2RouteBinding; const routeBinding = rawRouteBinding === undefined || rawRouteBinding === null ? null : normalizeResourceRouteBinding(rawRouteBinding); const routeBindingHash = routeBinding ? resourceRouteBindingHash(routeBinding) : null; const graph = canonicalGraphIdentity(apiGraph); - const executionPlan = executionPlanIdentity(apiGraph); + const adapterApplications = createAppliedAdapterProof({ + apiGraph, + canonicalGraph: graph.canonicalGraph, + executedOutput, + executionReceipt, + taskId, + }); + const executionPlan = + canonicalAccountingProof === undefined + ? executionPlanIdentity(apiGraph, { + executionReceipt, + executedOutput, + templateId, + taskId, + modelIdentities: modelIdentities?.length ? modelIdentities : [modelIdentity].filter(Boolean), + backendSource, + backendContract: backendContractIdentity(nodesPayload, graph.canonicalGraph), + retainedNativeEvidence, + videoNormalizationEvidence, + modelDependencyEvidence, + nativeGraphSubmission, + inputArtifacts, + }) + : canonicalAccountingProofPlan({ + apiGraph, + executedOutput, + executionReceipt, + taskId, + proof: canonicalAccountingProof, + }); const execution = executionReceiptIdentity(executionReceipt, executionPlan.plan); const runtime = normalizeBackendRuntime(runtimeFingerprint, deterministicMode); const backendSourceAttestation = processBackendSourceAttestation(runtimeFingerprint); const backendContract = backendContractIdentity(nodesPayload, graph.canonicalGraph); const deterministic = deterministicIdentity(deterministicMode); const modelSet = modelSetIdentity(modelIdentities?.length ? modelIdentities : [modelIdentity].filter(Boolean)); + if (canonicalAccountingProof !== undefined) { + same( + modelSet.items + .map((item) => ({ repoId: item.repoId, revision: item.selectedRevision })) + .sort((left, right) => left.repoId.localeCompare(right.repoId)), + canonicalAccountingProof.target.modelSet, + 'Canonical installed model identity differs from the executed model owner.', + ); + same(runtimeFingerprint, executionReceipt.runtimeFingerprint, 'Canonical runtime differs from the raw task.'); + assert.ok( + Number.isFinite(executionReceipt.started_at) && + Number.isFinite(executionReceipt.completed_at) && + executionReceipt.completed_at >= executionReceipt.started_at, + 'Canonical task duration is missing.', + ); + assert.equal( + capturedAt, + new Date(executionReceipt.completed_at * 1000).toISOString(), + 'Canonical completion time differs.', + ); + } const compatibilityModel = modelSet.count === 1 ? modelSet.items[0] @@ -1131,6 +3839,7 @@ export function createRunProvenance({ deterministicFingerprint: deterministic.fingerprint, outputCollectionHash: output.collectionHash, ...(routeBindingHash ? { routeBindingHash } : {}), + ...(adapterApplications ? { adapterApplicationsHash: adapterApplications.hash } : {}), }; const firstOutput = output.items[0] ?? {}; const provenance = { @@ -1160,6 +3869,9 @@ export function createRunProvenance({ sampleRate: firstOutput.sampleRate ?? null, channels: firstOutput.channels ?? null, ...(routeBinding ? { routeBinding, routeBindingHash } : {}), + ...(adapterApplications + ? { adapterApplications: adapterApplications.proof, adapterApplicationsHash: adapterApplications.hash } + : {}), template: { ...template, expectedOutput: diff --git a/scripts/live-qwen-proof.test.mjs b/scripts/live-qwen-proof.test.mjs index fddcdb4f..629686cb 100644 --- a/scripts/live-qwen-proof.test.mjs +++ b/scripts/live-qwen-proof.test.mjs @@ -1,6 +1,12 @@ +import { appliedOrderCase, canonicalHookCase, legacyCreatorFactoryCases } from './canonical-provenance-fixtures.mjs'; +import { canonicalJsonHash } from './canonical-json.mjs'; +import { validateAppliedAdapterSection } from './applied-adapter-provenance.mjs'; import assert from 'node:assert/strict'; +import { spawnSync } from 'node:child_process'; import { EventEmitter } from 'node:events'; -import { readFileSync } from 'node:fs'; +import { createHash } from 'node:crypto'; +import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; import { dirname, resolve } from 'node:path'; import { PassThrough } from 'node:stream'; import { test } from 'node:test'; @@ -15,6 +21,7 @@ import { } from './live-qwen-proof.mjs'; import { backendSourceEvidence, + backendSourceIdentity, canonicalGraphIdentity, compareRunProvenance, createRunProvenance, @@ -27,11 +34,348 @@ import { selectBackendRuntimeFingerprintEvidence, selectInstalledModelIdentity, sha256Value, + stableStringify, validateRunProvenance, + validateAppliedAdapterProof, } from './live-proof-provenance.mjs'; const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..'); +const cosmosNativeDir = process.env.MODIFF_SAVED_COSMOS_NATIVE_DIR; + +test( + 'retained Cosmos native proof requires the exact guarded component and state chain', + { skip: !cosmosNativeDir }, + () => { + const read = (file) => JSON.parse(readFileSync(resolve(cosmosNativeDir, file), 'utf8')); + const expected = read('template-provenance.verified.private.json'); + const run = read('run-detail.final.original.json'); + const executedOutput = read('output-package.final.original.json').latestOutput; + const modelIdentities = [ + 'nvidia/Cosmos3-Super-Text2Image', + 'nvidia/Cosmos-Guardrail1', + 'Qwen/Qwen3Guard-Gen-0.6B', + ].map((repo, index) => selectInstalledModelIdentity(read(`model-fingerprints-${index}.original.json`), repo)); + const args = { + templateId: expected.template.id, + lockedSettings: expected.template.lockedSettings, + promptSettingsHash: expected.template.promptSettingsHash, + catalogTemplateLockHash: expected.template.catalogTemplateLockHash, + resolvedTemplateLockHash: expected.template.resolvedTemplateLockHash, + expectedOutput: expected.template.expectedOutput, + apiGraph: read('graph-request.original.json'), + nodesPayload: read('nodes.original.json'), + modelIdentities, + runtimeFingerprint: run.task.runtimeFingerprint, + deterministicMode: executedOutput.apiGraphSnapshot.deterministicMode, + backendSource: expected.runtime.backendSource, + outputAnalysis: { analyses: expected.output.items }, + executedOutput, + executionReceipt: run.task, + taskId: run.task.task_id, + capturedAt: expected.capturedAt, + }; + const verified = createRunProvenance(args); + assert.deepEqual(verified.blockers, []); + assert.deepEqual(validateRunProvenance(verified), []); + assert.equal(verified.execution.resourceCandidateId, expected.execution.resourceCandidateId); + assert.equal(verified.mediaHash, expected.mediaHash); + + for (const mutate of [ + (caseArgs) => caseArgs.modelIdentities.splice(1, 1), + (caseArgs) => { + caseArgs.modelIdentities[1].selectedRevision = '0'.repeat(40); + }, + (caseArgs) => { + const decoder = Object.values(caseArgs.apiGraph.nodes).find( + (node) => node.action === 'WorkflowCosmos3OmniDecode', + ); + decoder.params.state_in.sourceId = decoder.params.pipeline_components.sourceId; + caseArgs.executedOutput.apiGraphSnapshot = structuredClone(caseArgs.apiGraph); + }, + (caseArgs) => { + const sampler = caseArgs.executedOutput.resolvedExecutionInputs.nodes.find( + (node) => node.action === 'WorkflowCosmos3OmniDenoise', + ); + sampler.fields.seed.value += 1; + }, + ]) { + const altered = structuredClone(args); + mutate(altered); + const rejected = createRunProvenance(altered); + assert.equal(rejected.execution.resourceCandidateId, null); + assert.ok(rejected.blockers.includes('execution.resourceCandidateId is missing.')); + } + }, +); + +test('optional native applied adapter proof locks exact order and distinguishes reuse without changing historical requirements', () => { + const args = appliedOrderCase(); + const before = JSON.stringify(args); + const proof = createRunProvenance(args); + assert.deepEqual(proof.blockers, []); + const application = validateAppliedAdapterProof(proof, { required: true }).owners[0].application; + assert.deepEqual( + application.adapters.map((item) => [item.adapterName, item.scale]), + [ + ['protocol_0', 0], + ['protocol_1', 1], + ], + ); + assert.equal(application.observation, 'activated'); + assert.equal(JSON.stringify(args), before); + args.executedOutput.resolvedExecutionInputs.nodes[0].appliedAdapters.observation = 'reused'; + const reused = createRunProvenance(args); + const observed = validateAppliedAdapterProof(reused, { required: true }).owners[0].application; + assert.equal(observed.applicationId, application.applicationId); + assert.equal(observed.stateSha256, application.stateSha256); + assert.equal(observed.observation, 'reused'); + assert.notEqual(reused.adapterApplicationsHash, proof.adapterApplicationsHash); + const historical = appliedOrderCase(); + delete historical.executedOutput.resolvedExecutionInputs; + const old = createRunProvenance(historical); + assert.deepEqual(old.blockers, []); + assert.equal(old.adapterApplications, undefined); + assert.equal(validateAppliedAdapterProof(old), null); + assert.throws( + () => validateAppliedAdapterProof(old, { required: true }), + /Original applied adapter order evidence is required/, + ); + const unavailable = appliedOrderCase(); + unavailable.executedOutput.resolvedExecutionInputs.nodes[0].appliedAdapters = { + schemaVersion: 1, + status: 'unavailable', + reason: 'unobserved-application', + }; + const incomplete = createRunProvenance(unavailable); + assert.deepEqual(incomplete.blockers, []); + assert.throws(() => validateAppliedAdapterProof(incomplete, { required: true }), /unavailable/); +}); + +test('strict applied adapter proof compares legacy decimal scale literals without rewriting original evidence', () => { + for (const [submitted, observed] of [ + ['1.5', 1.5], + ['0', 0], + ['-0.75', -0.75], + ['1e0', 1], + ]) { + const args = appliedOrderCase(); + args.apiGraph.nodes['adapter-0'].params.scale.value = submitted; + args.executedOutput.apiGraphSnapshot = structuredClone(args.apiGraph); + const application = args.executedOutput.resolvedExecutionInputs.nodes[0].appliedAdapters; + application.adapters[0].scale = observed; + application.stateSha256 = `sha256:applied-adapters-v1:${canonicalJsonHash({ adapters: application.adapters })}`; + const before = JSON.stringify(args); + const proof = createRunProvenance(args); + assert.deepEqual(proof.blockers, []); + assert.equal( + validateAppliedAdapterProof(proof, { required: true }).owners[0].application.adapters[0].scale, + observed, + ); + assert.equal(JSON.stringify(args), before); + assert.equal(args.apiGraph.nodes['adapter-0'].params.scale.value, submitted); + application.adapters[0].scale = observed + 0.25; + application.stateSha256 = `sha256:applied-adapters-v1:${canonicalJsonHash({ adapters: application.adapters })}`; + assert.throws(() => validateAppliedAdapterProof(createRunProvenance(args), { required: true }), /scale differs/); + } +}); + +test('strict applied adapter proof rejects ambiguous, nonfinite and coercible non-decimal scale controls', () => { + for (const submitted of [ + '', + ' ', + ' 0', + '0 ', + '0x0', + '0b0', + 'NaN', + 'Infinity', + '1e999', + '20.1', + '-20.1', + '0'.repeat(65), + false, + null, + [], + {}, + ]) { + const args = appliedOrderCase(); + args.apiGraph.nodes['adapter-0'].params.scale.value = submitted; + args.executedOutput.apiGraphSnapshot = structuredClone(args.apiGraph); + assert.throws( + () => validateAppliedAdapterProof(createRunProvenance(args), { required: true }), + undefined, + JSON.stringify(submitted), + ); + } + const args = appliedOrderCase(); + const application = args.executedOutput.resolvedExecutionInputs.nodes[0].appliedAdapters; + application.adapters[0].scale = '0'; + application.stateSha256 = `sha256:applied-adapters-v1:${canonicalJsonHash({ adapters: application.adapters })}`; + assert.throws(() => validateAppliedAdapterSection(application)); +}); + +test('applied adapter proof rejects valid-digest order, scale, artifact and owner forgeries', () => { + const mutations = { + order: (args, app) => { + app.adapters.reverse(); + }, + scale: (args, app) => { + app.adapters[0].scale = 1; + }, + artifact: (args, app) => { + app.adapters[0].artifact.sha256 = 'c'.repeat(64); + }, + revision: (args, app) => { + app.adapters[0].artifact.revision = 'c'.repeat(40); + }, + scheduler: (args, app) => { + app.adapters[0].scheduler = { className: 'Unknown', configSha256: `sha256:${'a'.repeat(64)}` }; + }, + owner: (args) => { + args.executedOutput.resolvedExecutionInputs.nodes[0].nodeId = 'adapter-0'; + }, + task: (args) => { + args.executionReceipt.task_id = 'other'; + }, + 'missing native version': (args) => { + delete args.executedOutput.resolvedExecutionInputs.schemaVersion; + }, + 'unknown native version': (args) => { + args.executedOutput.resolvedExecutionInputs.schemaVersion = 2; + }, + snapshot: (args) => { + args.executedOutput.apiGraphSnapshot.nodes['adapter-0'].params.scale.value = 0.5; + }, + attempt: (args) => { + args.executedOutput.attemptIndex = 1; + }, + model: (args) => { + args.modelIdentities[0].selectedRevision = 'c'.repeat(40); + }, + duplicate: (args, app) => { + app.adapters[1].adapterName = app.adapters[0].adapterName; + }, + unknown: (args, app) => { + app.path = '/private'; + }, + detached: (args) => { + args.apiGraph.nodes.loader.params.lora_list.sourceId = 'adapter-0'; + }, + unexecuted: (args) => { + args.apiGraph.paths[0] = ['loader', 'preview']; + }, + cycle: (args) => { + args.apiGraph.nodes['adapter-0'].params.previous_loras = { sourceId: 'adapter-1', sourceKey: 'lora' }; + }, + }; + for (const [label, mutate] of Object.entries(mutations)) { + const args = appliedOrderCase(); + const app = args.executedOutput.resolvedExecutionInputs.nodes[0].appliedAdapters; + mutate(args, app); + app.stateSha256 = `sha256:applied-adapters-v1:${canonicalJsonHash({ adapters: app.adapters })}`; + assert.throws( + () => { + const proof = createRunProvenance(args); + assert.deepEqual(proof.blockers, []); + validateAppliedAdapterProof(proof, { required: true }); + }, + undefined, + label, + ); + } + const forged = createRunProvenance(appliedOrderCase()); + forged.adapterApplications.owners[0].application.observation = 'reused'; + assert.ok(validateRunProvenance(forged).some((blocker) => /adapter/i.test(blocker))); +}); + +test('optional applied observations do not impose explicit order-case requirements on existing template proofs', () => { + const args = appliedOrderCase(); + // Existing generated adapter names are a supported loader behavior. The + // observation remains retainable; the new strict literal-order case is held. + args.apiGraph.nodes['adapter-0'].params.adapter_name.value = ''; + args.executedOutput.apiGraphSnapshot = structuredClone(args.apiGraph); + const proof = createRunProvenance(args); + assert.deepEqual(proof.blockers, []); + assert.ok(validateAppliedAdapterProof(proof)); + assert.throws(() => validateAppliedAdapterProof(proof, { required: true }), /Generated adapter names/); + const detached = appliedOrderCase(); + detached.apiGraph.nodes.preview.params.image = { value: 'unrelated' }; + detached.executedOutput.apiGraphSnapshot = structuredClone(detached.apiGraph); + assert.ok(createRunProvenance(detached).blockers.some((blocker) => /detached/.test(blocker))); +}); + +test('backend Git identity accepts only its exact repository and linked worktree', () => { + const temporary = mkdtempSync(resolve(tmpdir(), 'modiff-exact-git-root-')); + const repository = resolve(temporary, 'repository'); + const worktree = resolve(temporary, 'linked'); + const backend = resolve(ROOT, '../MoDiff'); + const python = + process.env.MODIFF_BACKEND_PYTHON || + resolve(backend, '.venv', process.platform === 'win32' ? 'Scripts/python.exe' : 'bin/python'); + let linked = false; + function git(...args) { + const result = spawnSync('git', ['-c', 'core.hooksPath=', ...args], { + cwd: repository, + encoding: 'utf8', + windowsHide: true, + }); + assert.equal(result.status, 0, result.stderr || result.error?.message); + return result.stdout.trim(); + } + function agreesWithWorker(root) { + const observed = spawnSync( + python, + [ + '-I', + '-B', + '-c', + 'import json,sys; sys.path.insert(0,sys.argv[1]); from modiff.backend_source_identity import backend_source_identity; print(json.dumps(backend_source_identity(sys.argv[2])))', + backend, + root, + ], + { encoding: 'utf8', windowsHide: true }, + ); + assert.equal(observed.status, 0, observed.stderr || observed.error?.message); + const worker = JSON.parse(observed.stdout); + const client = backendSourceIdentity(root); + assert.equal(worker.gitCommit, client.gitCommit); + assert.equal(worker.fingerprint, client.fingerprint); + return client; + } + try { + mkdirSync(repository); + writeFileSync(resolve(repository, 'main.py'), "print('identity')\n"); + writeFileSync(resolve(repository, 'pyproject.toml'), '[project]\nname = "identity"\n'); + git('init', '--template='); + git('add', 'main.py', 'pyproject.toml'); + git( + '-c', + 'user.name=MoDiff fixture', + '-c', + 'user.email=fixture@example.invalid', + 'commit', + '--no-gpg-sign', + '-m', + 'source fixture', + ); + const commit = git('rev-parse', 'HEAD'); + assert.equal(agreesWithWorker(repository).gitCommit, commit); + git('worktree', 'add', '--detach', worktree, 'HEAD'); + linked = true; + assert.equal(agreesWithWorker(worktree).gitCommit, commit); + const copied = resolve(repository, 'copied-backend'); + mkdirSync(copied); + for (const name of ['main.py', 'pyproject.toml']) + writeFileSync(resolve(copied, name), readFileSync(resolve(repository, name))); + assert.equal(agreesWithWorker(copied).gitCommit, null); + } finally { + if (linked) git('worktree', 'remove', '--force', worktree); + assert.equal(dirname(temporary), resolve(tmpdir())); + rmSync(temporary, { recursive: true, force: true }); + } +}); + test('execution identity ignores admission-proof status while locking the actual resource plan', () => { const graph = { runtimeHints: { @@ -87,6 +431,246 @@ test('retained Expert execution identity is recovered only from agreeing execute assert.deepEqual(executionPlanIdentity(ambiguous).plan, {}); }); +function directAudioExpertGraph(continuation = false) { + const graph = retainedExpertGraph(); + const contract = { + schemaVersion: 1, + library: 'diffusers', + mediaKind: 'audio', + pipelineClass: 'ExampleAudioPipeline', + repository: 'example/audio', + mode: continuation ? 'audio_continuation' : 'text_to_audio', + sourceAudio: continuation ? 'required' : 'forbidden', + referenceAudio: 'forbidden', + actions: { Generate: [continuation ? 'audio_continuation' : 'text_to_audio'] }, + }; + const loader = graph.nodes.loader; + loader.module = 'modules.DiffusersAudio'; + loader.params.model_id.value.value = contract.repository; + loader.params.pipeline_class.value = contract.pipelineClass; + loader.params.revision = { value: 'a'.repeat(40) }; + loader.params.mode = { value: contract.mode }; + loader.params.audio_contract = { value: structuredClone(contract) }; + delete loader.params.quantization_mode; + delete loader.params.quantized_components; + delete loader.params.device_map; + graph.runtimeHints.workflowSnapshot.studioGraphBinding = null; + graph.runtimeHints.workflowSnapshot.studioForm.modelType = 'DisplayAliasIsNotModelAuthority'; + graph.nodes.generate = { + module: 'modules.DiffusersAudio', + action: 'Generate', + params: { + pipeline: { sourceId: 'loader', sourceKey: 'pipeline' }, + audio_contract: { value: structuredClone(contract) }, + }, + }; + graph.nodes.export = { + module: 'modules.Audio', + action: 'Export', + params: { + audio: { sourceId: 'generate', sourceKey: 'audio' }, + preview: { display: 'ui_audio', sourceKey: 'file' }, + }, + }; + graph.paths[0].push('generate', 'export'); + if (continuation) { + graph.nodes.load = { module: 'modules.Audio', action: 'Load', params: { file: { value: ['@data/source.wav'] } } }; + graph.nodes.generate.params.source_audio = { sourceId: 'load', sourceKey: 'audio' }; + graph.nodes.match = { + module: 'modules.Audio', + action: 'MatchLoudness', + params: { + audio: { sourceId: 'generate', sourceKey: 'audio' }, + reference: { sourceId: 'load', sourceKey: 'audio' }, + }, + }; + graph.nodes.join = { + module: 'modules.Audio', + action: 'Join', + params: { + source: { sourceId: 'load', sourceKey: 'audio' }, + continuation: { sourceId: 'match', sourceKey: 'output' }, + }, + }; + graph.nodes.export.params.audio = { sourceId: 'join', sourceKey: 'output' }; + graph.paths[0] = ['load', 'quant', 'recipe', 'loader', 'generate', 'match', 'join', 'export']; + } + return graph; +} + +test('ordinary direct audio locks the actual connected recipe without a legacy binding or model alias', () => { + for (const continuation of [false, true]) { + const graph = directAudioExpertGraph(continuation); + const before = JSON.stringify(graph); + const plan = executionPlanIdentity(graph).plan; + assert.equal(plan.source, 'executed-expert-direct-audio-graph-v1'); + assert.equal(plan.modelType, 'ExampleAudioPipeline'); + assert.equal(plan.modelRepo, 'example/audio'); + assert.equal(plan.modelRevision, 'a'.repeat(40)); + assert.equal(plan.task, continuation ? 'audio_continuation' : 'text_to_audio'); + assert.equal(plan.resourceMode, 'expert'); + assert.equal(plan.dtype, 'bfloat16'); + assert.equal(plan.device, 'cuda:0'); + assert.equal(plan.qualified, undefined); + assert.equal(JSON.stringify(graph), before, 'do not manufacture hints or rewrite retained evidence'); + } +}); + +test('ordinary direct audio retains its recipe across native input and output preview restoration', () => { + for (const finishingChain of [false, true]) { + const graph = directAudioExpertGraph(true); + if (!finishingChain) { + delete graph.nodes.match; + delete graph.nodes.join; + graph.nodes.export.params.audio = { sourceId: 'generate', sourceKey: 'audio' }; + graph.paths[0] = ['load', 'quant', 'recipe', 'loader', 'generate', 'export']; + } + const originalPlan = executionPlanIdentity(graph).plan; + graph.nodes.load.params.preview = { display: 'ui_audio', sourceKey: 'filename' }; + const beforeGraph = canonicalGraphIdentity(graph).hash; + for (const value of [ + undefined, + null, + '', + '/file?file=%40data/audio/source.wav&t=42', + [], + ['/file?file=%40data/audio/source.wav&t=42'], + ]) { + const restored = structuredClone(graph); + if (value !== undefined) { + restored.nodes.load.params.preview.value = value; + restored.nodes.export.params.preview.value = value; + } + const original = JSON.stringify(restored); + const plan = executionPlanIdentity(restored).plan; + assert.deepEqual(plan, originalPlan); + assert.equal(plan.source, 'executed-expert-direct-audio-graph-v1'); + assert.equal(plan.modelRepo, originalPlan.modelRepo); + assert.equal(plan.task, 'audio_continuation'); + assert.equal(canonicalGraphIdentity(restored).hash, beforeGraph); + assert.equal(JSON.stringify(restored), original, 'retained presentation and source evidence are never rewritten'); + } + } +}); + +test('ordinary audio preview metadata cannot hide extra input wiring or malformed values', () => { + const changes = [ + (p) => { + p.sourceId = 'loader'; + }, + (p) => { + p.sourceKey = 'pipeline'; + }, + (p) => { + p.display = 'input'; + }, + (p) => { + p.other = true; + }, + (p) => { + p.value = { sourceId: 'loader', sourceKey: 'pipeline' }; + }, + (p) => { + p.value = [false]; + }, + (p) => { + p.value = Array(17).fill('/file?file=source.wav'); + }, + (p) => { + p.value = 'x'.repeat(16_385); + }, + ]; + for (const owner of ['load', 'export']) { + for (const change of changes) { + const graph = directAudioExpertGraph(true); + graph.nodes.load.params.preview = { display: 'ui_audio', sourceKey: 'filename' }; + change(graph.nodes[owner].params.preview); + assert.deepEqual(executionPlanIdentity(graph).plan, {}); + } + } +}); + +test('ordinary audio recipe recovery rejects ambiguous, disconnected and contradictory authority', () => { + const mutations = { + 'malformed owner': (g) => { + g.nodes.quant = null; + }, + 'non-Hub artifact': (g) => { + g.nodes.loader.params.model_id.value.value = '/tmp/model'; + g.nodes.loader.params.audio_contract.value.repository = '/tmp/model'; + g.nodes.generate.params.audio_contract.value.repository = '/tmp/model'; + }, + 'changed repository': (g) => { + g.nodes.loader.params.model_id.value.value = 'other/model'; + }, + 'mutable revision': (g) => { + g.nodes.loader.params.revision.value = 'main'; + }, + 'changed task': (g) => { + g.nodes.loader.params.mode.value = 'audio_repaint'; + }, + 'changed generate contract': (g) => { + g.nodes.generate.params.audio_contract.value.repository = 'other/model'; + }, + 'quantized branch': (g) => { + g.nodes.quant.params.backend.value = 'bitsandbytes_4bit'; + }, + 'missing recipe': (g) => { + g.nodes.loader.params.execution_recipe.sourceId = 'missing'; + }, + 'wrong producer port': (g) => { + g.nodes.generate.params.pipeline.sourceKey = 'other'; + }, + 'hidden connected control': (g) => { + g.nodes.generate.params.seed = { sourceId: 'quant', sourceKey: 'seed' }; + }, + 'forged preview wire': (g) => { + g.nodes.export.params.preview.sourceId = 'loader'; + }, + 'stale form dtype': (g) => { + g.runtimeHints.workflowSnapshot.studioForm.dtype = 'float16'; + }, + 'Auto request': (g) => { + g.runtimeHints.workflowSnapshot.studioForm.resourceMode = 'auto'; + }, + 'unsupported extra owner': (g) => { + g.nodes.other = structuredClone(g.nodes.loader); + g.paths[0].push('other'); + }, + 'unexecuted owner': (g) => { + g.paths[0].pop(); + }, + 'non-topological execution': (g) => { + g.paths[0].reverse(); + }, + 'missing source': (g) => { + delete g.nodes.generate.params.source_audio; + }, + 'disconnected loudness reference': (g) => { + g.nodes.match.params.reference.sourceId = 'generate'; + }, + 'wrong join ordering': (g) => { + g.nodes.join.params.source.sourceId = 'match'; + }, + }; + for (const [label, mutate] of Object.entries(mutations)) { + const graph = directAudioExpertGraph(true); + mutate(graph); + assert.deepEqual(executionPlanIdentity(graph).plan, {}, label); + } +}); + +test('source-backed direct audio without a finishing chain retains only its actual input dependency', () => { + const graph = directAudioExpertGraph(true); + delete graph.nodes.match; + delete graph.nodes.join; + graph.nodes.export.params.audio = { sourceId: 'generate', sourceKey: 'audio' }; + graph.paths[0] = ['load', 'quant', 'recipe', 'loader', 'generate', 'export']; + assert.equal(executionPlanIdentity(graph).plan.modelRepo, 'example/audio'); + delete graph.nodes.generate.params.source_audio; + assert.deepEqual(executionPlanIdentity(graph).plan, {}); +}); + test('default live Qwen proof requests the locked template without diagnostic overrides', () => { const config = resolveLiveProofConfig({}); @@ -149,6 +733,48 @@ test('live proof rejects missing or changing backend source identity', () => { assert.match(backendSourceDriftBlocker(stable, null), /could not be captured/); }); +test('backend source identity orders normalized paths before hashing shared directory prefixes', () => { + const root = mkdtempSync(resolve(tmpdir(), 'modiff-source-identity-')); + const sources = [ + ['main.py', "print('identity')\n"], + ['pyproject.toml', '[project]\nname = "identity"\n'], + ['modules/ImageFilters/main.py', 'FILTER = 1\n'], + ['modules/ImageOperations/main.py', 'OPERATION = 1\n'], + ['modules/Image/main.py', 'IMAGE = 1\n'], + ['modules/VideoColor/main.py', 'COLOR = 1\n'], + ['modules/VideoConditioning/main.py', 'CONDITIONING = 1\n'], + ['modules/Video/main.py', 'VIDEO = 1\n'], + ]; + try { + for (const [relativePath, contents] of sources) { + const target = resolve(root, relativePath); + mkdirSync(dirname(target), { recursive: true }); + writeFileSync(target, contents, 'utf8'); + } + const expectedFiles = [...sources] + .sort(([left], [right]) => (left < right ? -1 : left > right ? 1 : 0)) + .map(([relativePath, contents]) => ({ + path: relativePath, + sha256: createHash('sha256').update(contents).digest('hex'), + })); + const identity = backendSourceIdentity(root); + assert.equal(identity.gitCommit, null); + assert.deepEqual(identity.files, expectedFiles); + assert.equal( + identity.fingerprint, + sha256Value('backend-source-v1', { + files: expectedFiles, + gitCommit: null, + }), + ); + + writeFileSync(resolve(root, 'modules/Image/main.py'), 'IMAGE = 2\n', 'utf8'); + assert.notEqual(backendSourceIdentity(root).fingerprint, identity.fingerprint); + } finally { + rmSync(root, { recursive: true, force: true }); + } +}); + test('source evidence binds both filesystem snapshots to the executing worker startup claim', () => { const sourceFiles = [{ path: 'main.py', sha256: 'c'.repeat(64) }]; const source = { @@ -788,3 +1414,116 @@ test('qualification provenance rejects output dimensions that violate the templa ), ); }); + +test('canonical factory hook derives the actual DDIM owner without runtime hints', () => { + const args = canonicalHookCase(); + const before = JSON.stringify(args); + const proof = createRunProvenance(args); + assert.equal(proof.graph.executionPlan.source, 'executed-canonical-accounting-v1'); + assert.equal(proof.graph.executionPlan.modelType, 'DDIMPipeline'); + assert.equal(proof.graph.executionPlan.device, 'cuda:0'); + assert.equal(proof.graph.executionPlan.deviceMap, 'cuda'); + assert.equal(proof.execution.resourceCandidateId, 'manual-resource-v1:DDIMPipeline|float32|none|none'); + assert.equal(proof.taskId, args.executionReceipt.task_id); + assert.deepEqual(proof.blockers, []); + assert.equal(args.apiGraph.runtimeHints, undefined); + assert.equal(JSON.stringify(args), before); +}); + +test('canonical hook rejects detached task, output, accounting and model evidence', () => { + const mutations = { + 'wrong factory task': (args) => { + args.taskId = 'other'; + }, + 'wrong raw task': (args) => { + args.canonicalAccountingProof.run.task.task_id = 'other'; + }, + 'failed task': (args) => { + args.executionReceipt.status = 'failed'; + }, + retry: (args) => { + args.executionReceipt.attempt_index = 1; + }, + 'different measured task': (args) => { + args.executionReceipt = { ...args.executionReceipt, completed_at: 102 }; + }, + 'contradictory Expert candidate': (args) => { + args.executionReceipt.resourceCandidateId = 'auto-candidate'; + }, + 'invented task hints': (args) => { + args.executionReceipt.runtimeHints = { autoResourceCandidateId: 'invented' }; + }, + 'output task': (args) => { + args.executedOutput.taskId = 'other'; + }, + 'output attempt': (args) => { + args.executedOutput.attemptIndex = 1; + }, + 'wrong workflow': (args) => { + args.canonicalAccountingProof.run.workflow_id = 'other'; + }, + 'missing raw output': (args) => { + args.canonicalAccountingProof.run.outputs = []; + }, + 'duplicate raw output': (args) => { + args.canonicalAccountingProof.run.outputs.push(structuredClone(args.executedOutput)); + }, + 'detached output receipt': (args) => { + args.canonicalAccountingProof.run.outputs = [structuredClone(args.executedOutput)]; + args.executedOutput.resolvedExecutionInputs.nodes[0].fieldAccounting.complete = false; + }, + 'consumed task': (args) => { + args.executedOutput.resolvedExecutionInputs.taskId = 'other'; + }, + 'consumed attempt': (args) => { + args.executedOutput.resolvedExecutionInputs.attemptIndex = 1; + }, + 'consumed output owner': (args) => { + args.executedOutput.nodeId = 'node-04'; + }, + 'untrusted changed graph': (args) => { + args.canonicalAccountingProof.expectedApiGraph.nodes['node-04'].params.seed.value = 43; + }, + 'caller plan': (args) => { + args.canonicalAccountingProof.plan = { device: 'cpu:0' }; + }, + 'missing accounting': (args) => { + delete args.executedOutput.resolvedExecutionInputs.nodes[0].fieldAccounting; + }, + 'wrong effective control': (args) => { + args.executedOutput.resolvedExecutionInputs.nodes.find( + (row) => row.action === 'LoadPipeline', + ).fieldAccounting.fields.device.value = 'cpu:0'; + }, + 'wrong installed model': (args) => { + args.modelIdentities[0].selectedRevision = 'a'.repeat(40); + }, + 'different runtime': (args) => { + args.runtimeFingerprint = { ...args.runtimeFingerprint, fingerprint: 'other' }; + }, + 'missing duration': (args) => { + delete args.executionReceipt.completed_at; + }, + 'wrong completion time': (args) => { + args.capturedAt = '2026-10-27T00:00:00.000Z'; + }, + }; + for (const [label, mutate] of Object.entries(mutations)) { + const args = canonicalHookCase(); + mutate(args); + assert.throws(() => createRunProvenance(args), undefined, label); + } +}); + +test('default factory output remains byte identical for the ten historical grouped and ordinary FLUX3 creators', async () => { + const expected = JSON.parse( + readFileSync(new URL('../tests/fixtures/legacy-provenance-factory.v1.json', import.meta.url), 'utf8'), + ); + const observed = []; + for (const { id, args } of await legacyCreatorFactoryCases()) { + assert.equal(Object.hasOwn(args, 'canonicalAccountingProof'), false); + const bytes = Buffer.from(stableStringify(createRunProvenance(args))); + observed.push({ id, bytes: bytes.length, sha256: createHash('sha256').update(bytes).digest('hex') }); + } + assert.deepEqual(observed, expected.vectors); +}); diff --git a/scripts/marigold-preview-evidence.mjs b/scripts/marigold-preview-evidence.mjs new file mode 100644 index 00000000..0b85f392 --- /dev/null +++ b/scripts/marigold-preview-evidence.mjs @@ -0,0 +1,378 @@ +import assert from 'node:assert/strict'; +import { lstatSync, readFileSync, realpathSync } from 'node:fs'; +import { dirname } from 'node:path'; +import { + assertCanonicalAccountingGraphEnvelope, + canonicalMarigoldPreviewRuntimeHintAccounting, +} from './canonical-runtime-hints.mjs'; +import { + backendSourceEvidence, + canonicalGraphIdentity, + normalizeBackendRuntime, + selectBackendRuntimeFingerprintEvidence, + selectInstalledModelIdentity, + sha256Value, + stableStringify, +} from './live-proof-provenance.mjs'; +import { + validateNativeVariantOutput, + validateNativeVariantRun, + validateUnmodifiedExpertPreparation, +} from './native-variant-run-evidence.mjs'; +import { + canonicalWorkflowAuthoringContract, + exportCanonicalWorkflowGraphs, + readCanonicalEvidenceFile, +} from './release-contract-core.mjs'; + +const workflowId = 'MarigoldDepthPipeline:depth_estimation'; +const repoId = 'prs-eth/marigold-depth-lcm-v1-0'; +const revision = '04a73502f7fd8fc5e59947b9df3b2266d71d6849'; +const maxMediaBytes = 16 * 1024 * 1024; +const chain = [ + ['quantization', 'modules.DiffusersRuntime', 'PipelineQuantizationConfigV2'], + ['recipe', 'modules.DiffusersRuntime', 'DiffusersExecutionRecipe'], + ['loader', 'modules.DiffusersImage', 'LoadPipeline'], + ['source', 'modules.Image', 'Load'], + ['predict', 'modules.DiffusersImage', 'PredictMap'], + ['preview', 'modules.Image', 'Preview'], +]; +const same = (actual, expected, message) => assert.equal(stableStringify(actual), stableStringify(expected), message); +const keys = (record, expected, message) => same(Object.keys(record ?? {}).sort(), [...expected].sort(), message); +const literalFields = (values) => + Object.fromEntries(Object.entries(values).map(([key, value]) => [key, { value, source: 'literal' }])); + +function owners(api) { + assertCanonicalAccountingGraphEnvelope(api); + assert.equal(api.paths.length, 1, 'Marigold requires one executed graph path.'); + same([...api.paths[0]].sort(), Object.keys(api.nodes).sort(), 'Marigold graph path has extra or repeated owners.'); + assert.equal(api.paths[0].length, chain.length); + return Object.fromEntries( + chain.map(([role, module, action], i) => { + const id = api.paths[0][i]; + const node = api.nodes[id]; + keys(node, ['module', 'action', 'params'], 'Marigold graph node contains unknown authority.'); + assert.equal(node.module, module); + assert.equal(node.action, action); + return [role, { id, node }]; + }), + ); +} + +export function bindMarigoldSource(expectedApi, submittedApi, binding, nodesPayload) { + assert.match(binding.sourceValue, /^[A-Za-z0-9_-][\w.-]*\.png$/u); + assert.ok(binding.sourceValue.length <= 512, 'The Marigold image picker filename is too long.'); + const expected = owners(expectedApi); + const submitted = owners(submittedApi); + for (const role of [expected.source, submitted.source]) assert.equal(role.id, binding.nodeId); + assert.equal(binding.field, 'file'); + same(expected.source.node.params.file, { display: 'filebrowser', value: [] }, 'Canonical image picker is not empty.'); + const registry = nodesPayload.nodes ?? nodesPayload; + for (const { node } of Object.values(submitted)) { + const contract = registry[`${node.module}.${node.action}`]; + assert.equal(contract?.module, node.module); + assert.equal(contract.action, node.action); + same( + Object.entries(contract.params) + .filter(([, p]) => p.display === 'filebrowser') + .map(([name]) => name), + node === submitted.source.node ? ['file'] : [], + 'The Marigold route has an unbound file browser.', + ); + } + const bound = structuredClone(expectedApi); + bound.nodes[expected.source.id].params.file.value = [binding.sourceValue]; + const identity = canonicalGraphIdentity(bound); + same(canonicalGraphIdentity(submittedApi), identity, 'Marigold recipe differs outside the bound source PNG.'); + const { loader, predict, preview, recipe, source } = submitted; + for (const [to, field, from, port] of [ + [loader, 'execution_recipe', recipe, 'execution_recipe'], + [predict, 'pipeline', loader, 'pipeline'], + [predict, 'image', source, 'image'], + [preview, 'image', predict, 'preview_images'], + ]) { + same( + to.node.params[field], + { display: 'input', sourceId: from.id, sourceKey: port }, + 'Marigold preview wire differs.', + ); + } + same(loader.node.params.model_id.value, { source: 'hub', value: repoId }); + assert.equal(loader.node.params.revision.value, revision); + return { ...submitted, identity }; +} + +export function verifyMarigoldPreviewConsumed(bound, output, binding) { + const consumed = output.resolvedExecutionInputs; + assert.equal(consumed.schemaVersion, 1); + assert.equal(consumed.source, 'backend-execution'); + assert.equal(consumed.taskId, output.taskId); + assert.equal(consumed.attemptIndex, 0); + assert.equal(consumed.nodeId, bound.preview.id); + assert.equal(consumed.truncated, false); + same(consumed.uncapturedNodeIds, []); + same(consumed.unavailableFields, []); + // The accelerator and Preview CPU are intentionally different. Check each + // native node's value instead of resolving the ambiguous global summary. + same(consumed.ambiguousFields, ['device']); + same(consumed.fieldAccountingStatus, { schemaVersion: 1, truncated: false }); + same(consumed.graphTasks, [ + { loaderId: bound.loader.id, pipelineClass: 'MarigoldDepthPipeline', task: 'depth_estimation' }, + ]); + same(consumed.nodes.map((row) => row.nodeId).sort(), chain.map(([role]) => bound[role].id).sort()); + const recorded = {}; + for (const [role, module, action] of chain) { + const row = consumed.nodes.find((candidate) => candidate.nodeId === bound[role].id); + assert.equal(row.module, module); + assert.equal(row.action, action); + same(row.omittedFields, {}); + recorded[role] = row.fields; + } + same(recorded.quantization, literalFields({ dtype: 'float32' })); + same( + recorded.recipe, + literalFields({ + attention_backend: 'auto', + device: 'cuda:0', + offload_mode: 'none', + vae_slicing: true, + vae_tiling: true, + }), + ); + same( + recorded.loader, + literalFields({ + auto_offload: false, + device: 'cuda:0', + dtype: 'float32', + enable_vae_slicing: true, + enable_vae_tiling: true, + mode: 'depth_estimation', + model_id: repoId, + offload_mode: 'none', + pipeline_class: 'MarigoldDepthPipeline', + revision, + }), + 'Native Marigold model pin or loader controls differ.', + ); + const sha256 = binding.file.sha256; + const [width] = recorded.source.source_widths?.value ?? []; + const [height] = recorded.source.source_heights?.value ?? []; + assert.ok([width, height].every((n) => Number.isSafeInteger(n) && n > 0 && n <= 2048)); + same( + recorded.source, + literalFields({ + alpha_channel: 'ignore', + source_hashes: [sha256], + source_widths: [width], + source_heights: [height], + source_modes: ['RGB'], + }), + 'Native Marigold source byte identity or geometry differs.', + ); + same( + recorded.predict, + literalFields({ + num_inference_steps: 1, + processing_resolution: 768, + match_input_resolution: true, + output_type: 'np', + executed_task: 'depth_estimation', + seed: 42, + }), + 'Native Marigold prediction controls differ.', + ); + same(recorded.preview, literalFields({ device: 'cpu:0' })); + return { width, height, sha256 }; +} + +export async function readMarigoldPreviewEvidence({ clientRoot, manifest, graph, authoring, artifact, evidencePath }) { + assert.equal(manifest.id, workflowId); + const target = canonicalWorkflowAuthoringContract(manifest, graph, authoring, artifact); + same(target.modelSet, [{ repoId, revision }], 'The Marigold route has a different model pin.'); + const stat = lstatSync(evidencePath); + assert.ok(stat.isFile() && !stat.isSymbolicLink() && stat.size > 0 && stat.size <= 65_536); + const descriptorBytes = readFileSync(evidencePath); + const evidence = JSON.parse(descriptorBytes); + keys( + evidence, + [ + 'schemaVersion', + 'format', + 'workflowId', + 'qualificationClaims', + 'creatorPackage', + 'outputPackage', + 'runDetail', + 'nodes', + 'backendSourceBefore', + 'backendSourceAfter', + 'graphCompleted', + 'modelObservations', + 'inputs', + 'outputs', + ], + 'Unexpected Marigold preview evidence fields.', + ); + assert.equal(evidence.schemaVersion, 1); + assert.equal(evidence.format, 'modiff.private.input-bound-model-smoke.v1'); + assert.equal(evidence.workflowId, workflowId); + same(evidence.qualificationClaims, { releaseEligible: false, technicalVariant: true }); + for (const field of ['inputs', 'outputs', 'modelObservations']) + assert.ok( + Array.isArray(evidence[field]) && evidence[field].length === 1, + `Marigold evidence requires one ${field} entry.`, + ); + const [binding] = evidence.inputs; + const [outputRef] = evidence.outputs; + keys(binding, ['nodeId', 'field', 'sourceValue', 'file'], 'Unreviewed Marigold input binding fields.'); + keys(outputRef, ['backendPath', 'mediaType', 'file'], 'Unreviewed Marigold output binding fields.'); + const evidenceRoot = realpathSync(dirname(evidencePath)); + const retainedFiles = []; + const read = (ref, maximum) => { + const result = readCanonicalEvidenceFile(evidenceRoot, ref, maximum); + retainedFiles.push({ ...ref, absolutePath: result.file }); + return result; + }; + const json = (ref) => JSON.parse(read(ref).bytes); + const creator = json(evidence.creatorPackage); + const outputPackage = json(evidence.outputPackage); + const run = json(evidence.runDetail); + const graphCompleted = json(evidence.graphCompleted); + const { latestOutput } = outputPackage; + const apiGraph = latestOutput.apiGraphSnapshot; + const [expected, creatorApi, outputApi, nativeApi] = await exportCanonicalWorkflowGraphs(clientRoot, [ + graph, + creator.graph, + latestOutput.graphSnapshot, + run.workflow_snapshot, + ]); + const bound = bindMarigoldSource(expected, apiGraph, binding, json(evidence.nodes)); + for (const api of [creator.apiGraph, creatorApi, outputApi, nativeApi]) { + owners(api); + same( + canonicalGraphIdentity(api), + bound.identity, + 'Marigold creator or durable canvas differs from the bound graph.', + ); + } + const { task, output } = validateNativeVariantRun({ + target, + outputNodeId: bound.preview.id, + displayType: 'image', + creator, + outputPackage, + run, + graphCompleted, + validatePreparation: (preparation) => validateUnmodifiedExpertPreparation(preparation, target.modelType), + }); + const input = verifyMarigoldPreviewConsumed(bound, output, binding); + const hintAccounting = canonicalMarigoldPreviewRuntimeHintAccounting({ + apiGraph, + consumed: output.resolvedExecutionInputs, + plan: { modelType: target.modelType }, + runtimeEvidence: { run, output, graphCompleted }, + digest: sha256Value, + }); + const source = backendSourceEvidence({ + before: json(evidence.backendSourceBefore).identity, + after: json(evidence.backendSourceAfter).identity, + runtimeFingerprint: task.runtimeFingerprint, + }); + same(source.blockers, [], 'Marigold worker source differs from original observations.'); + const runtime = selectBackendRuntimeFingerprintEvidence([task.runtimeFingerprint]); + assert.ok(runtime, 'Native Marigold runtime fingerprint is incomplete.'); + assert.match(task.runtimeFingerprint.packages.platform, /^Windows-/u); + assert.equal(task.runtimeFingerprint.torch.cuda_available, true); + const measurement = task.runtimeMeasurement; + assert.equal(measurement.backend, 'cuda'); + assert.equal(measurement.device, 'cuda:0'); + assert.equal(measurement.peakMeasurementVersion, 2); + assert.ok(Number.isFinite(measurement.elapsedSeconds) && measurement.elapsedSeconds > 0); + assert.ok(Number.isSafeInteger(measurement.peakAllocatedBytes) && measurement.peakAllocatedBytes > 0); + const observation = json(evidence.modelObservations[0]); + assert.equal(observation.error, false); + assert.equal(observation.runtimeFingerprint, task.runtimeFingerprint.fingerprint); + assert.equal(observation.models.length, 1); + assert.equal(observation.models[0].complete, true); + const installed = selectInstalledModelIdentity(observation, repoId); + assert.equal(installed?.modelRevision, `${repoId}@${revision}`); + assert.equal(installed.selectedRevision, revision); + const inputFile = read(binding.file, maxMediaBytes); + const outputFile = read(outputRef.file, maxMediaBytes); + const item = validateNativeVariantOutput({ + output, + outputRef, + task, + bytes: outputFile.bytes, + displayType: 'image', + contentType: 'image/webp', + }); + const nativeUrl = new URL(item.value, 'http://127.0.0.1'); + assert.equal(nativeUrl.origin, 'http://127.0.0.1'); + assert.equal(nativeUrl.pathname, `/cache/${bound.preview.id}/output/0`); + assert.equal(nativeUrl.searchParams.get('format'), 'WEBP'); + assert.equal(nativeUrl.searchParams.get('quality'), '100'); + const { decodedMediaHash } = await import('./template-gallery-harness.mjs'); + const sourceDecoded = await decodedMediaHash(inputFile.file, 'image'); + const outputDecoded = await decodedMediaHash(outputFile.file, 'image'); + const dimensions = ({ width, height }) => [width, height]; + assert.ok( + inputFile.bytes.length >= 33 && + inputFile.bytes.subarray(0, 8).equals(Buffer.from('89504e470d0a1a0a', 'hex')) && + inputFile.bytes.toString('ascii', 12, 16) === 'IHDR' && + inputFile.bytes[25] === 2, + 'The archived source is not RGB PNG.', + ); + assert.ok( + outputFile.bytes.length >= 20 && + outputFile.bytes.toString('ascii', 0, 4) === 'RIFF' && + outputFile.bytes.toString('ascii', 8, 12) === 'WEBP', + 'The archived preview is not WebP.', + ); + same( + dimensions(sourceDecoded), + dimensions(input), + 'Decoded Marigold source geometry differs from the native receipt.', + ); + same(dimensions(outputDecoded), dimensions(input), 'The Marigold preview did not retain source size.'); + same(dimensions(item), dimensions(outputDecoded), 'Persisted Marigold preview geometry differs.'); + assert.ok(outputDecoded.lumaStdDev >= 0.75 && outputDecoded.nearBlackRatio <= 0.995, 'Marigold preview is blank.'); + for (const ref of retainedFiles) readCanonicalEvidenceFile(evidenceRoot, ref); + assert.ok( + readFileSync(evidencePath).equals(descriptorBytes), + 'Marigold evidence descriptor changed during validation.', + ); + const receipt = { + schemaVersion: 1, + format: 'modiff.canonical-workflow-run-receipt.v1', + proofKind: 'real_backend_input_bound_model_variant', + ...target, + taskId: task.task_id, + capturedAt: new Date(task.completed_at * 1000).toISOString(), + graphHash: bound.identity.hash, + resourceCandidateId: null, + runtimeFingerprint: normalizeBackendRuntime(runtime).lockFingerprint, + backendSourceFingerprint: source.identity.fingerprint, + outputHash: item.mediaHash, + executionDurationSeconds: measurement.elapsedSeconds, + peakMemoryBytes: measurement.peakAllocatedBytes, + canonicalDefaultsExecuted: false, + inputBinding: { nodeId: binding.nodeId, field: binding.field, ...input }, + decodedOutput: { hash: outputDecoded.hash, width: outputDecoded.width, height: outputDecoded.height }, + observationLimits: { + fullConsumedFieldAccounting: false, + numericDepthPrediction: false, + physicalPlatformQualification: false, + }, + qualificationClaims: { + publicTemplate: false, + qualityApproved: false, + rightsApproved: false, + hardwareQualified: false, + modelResourceQualified: false, + }, + }; + const provenance = { format: 'modiff.input-bound-model-variant-proof.v1', receipt, hintAccounting }; + return { receipt, provenance, evidence, descriptorBytes, retainedFiles, evidenceRoot }; +} diff --git a/scripts/marigold-preview-evidence.test.mjs b/scripts/marigold-preview-evidence.test.mjs new file mode 100644 index 00000000..d41931e6 --- /dev/null +++ b/scripts/marigold-preview-evidence.test.mjs @@ -0,0 +1,139 @@ +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { test } from 'node:test'; +import { bindMarigoldSource, verifyMarigoldPreviewConsumed } from './marigold-preview-evidence.mjs'; +import { exportCanonicalWorkflowGraphs, readCanonicalWorkflowEvidence } from './release-contract-core.mjs'; + +const clientRoot = fileURLToPath(new URL('../', import.meta.url)); +const backendRoot = fileURLToPath(new URL('../../MoDiff/', import.meta.url)); +const workflowId = 'MarigoldDepthPipeline:depth_estimation'; +const evidencePath = process.env.MODIFF_RETAINED_MARIGOLD_EVIDENCE; +const catalogPath = 'data/graphs/studio/marigold-depth-pipeline/depth-estimation.json'; + +async function fixture() { + const graph = JSON.parse(readFileSync(join(backendRoot, catalogPath))); + const [expected] = await exportCanonicalWorkflowGraphs(clientRoot, [graph]); + const submitted = structuredClone(expected); + const source = Object.entries(submitted.nodes).find(([, node]) => node.action === 'Load')[0]; + const binding = { nodeId: source, field: 'file', sourceValue: 'fixture.png', file: { sha256: 'a'.repeat(64) } }; + submitted.nodes[source].params.file.value = [binding.sourceValue]; + const registry = Object.fromEntries( + Object.entries(submitted.nodes).map(([id, node]) => [ + `${node.module}.${node.action}`, + { + module: node.module, + action: node.action, + params: id === source ? { file: { display: 'filebrowser' } } : {}, + }, + ]), + ); + return { expected, submitted, binding, registry }; +} + +test('Marigold qualifies only the current six-node preview chain and single declared image binding', async () => { + const { expected, submitted, binding, registry } = await fixture(); + const before = structuredClone([expected, submitted]); + const bound = bindMarigoldSource(expected, submitted, binding, registry); + assert.equal(bound.preview.node.params.image.sourceKey, 'preview_images'); + assert.deepEqual([expected, submitted], before); + assert.throws(() => bindMarigoldSource(expected, submitted, { ...binding, sourceValue: '../image.png' }, registry)); + const changed = structuredClone(submitted); + changed.nodes[bound.preview.id].params.image.sourceKey = 'prediction'; + assert.throws(() => bindMarigoldSource(expected, changed, binding, registry), /recipe differs/); + changed.nodes[bound.preview.id].params.image.sourceKey = 'preview_images'; + changed.nodes[bound.predict.id].params.num_inference_steps.value = 2; + assert.throws(() => bindMarigoldSource(expected, changed, binding, registry), /recipe differs/); + registry['modules.DiffusersImage.PredictMap'].params.second_file = { display: 'filebrowser' }; + assert.throws(() => bindMarigoldSource(expected, submitted, binding, registry), /unbound file browser/); +}); + +test('Marigold binds actual source bytes and observed depth controls to the rendered Preview owner', async () => { + const { expected, submitted, binding, registry } = await fixture(); + const bound = bindMarigoldSource(expected, submitted, binding, registry); + const controls = { + quantization: { dtype: 'float32' }, + recipe: { attention_backend: 'auto', device: 'cuda:0', offload_mode: 'none', vae_slicing: true, vae_tiling: true }, + loader: { + auto_offload: false, + device: 'cuda:0', + dtype: 'float32', + enable_vae_slicing: true, + enable_vae_tiling: true, + mode: 'depth_estimation', + model_id: 'prs-eth/marigold-depth-lcm-v1-0', + offload_mode: 'none', + pipeline_class: 'MarigoldDepthPipeline', + revision: '04a73502f7fd8fc5e59947b9df3b2266d71d6849', + }, + source: { + alpha_channel: 'ignore', + source_hashes: [binding.file.sha256], + source_widths: [64], + source_heights: [48], + source_modes: ['RGB'], + }, + predict: { + num_inference_steps: 1, + processing_resolution: 768, + match_input_resolution: true, + output_type: 'np', + executed_task: 'depth_estimation', + seed: 42, + }, + preview: { device: 'cpu:0' }, + }; + const output = { + taskId: 'synthetic', + resolvedExecutionInputs: { + schemaVersion: 1, + source: 'backend-execution', + taskId: 'synthetic', + attemptIndex: 0, + nodeId: bound.preview.id, + truncated: false, + fieldAccountingStatus: { schemaVersion: 1, truncated: false }, + uncapturedNodeIds: [], + unavailableFields: [], + ambiguousFields: ['device'], + graphTasks: [{ loaderId: bound.loader.id, pipelineClass: 'MarigoldDepthPipeline', task: 'depth_estimation' }], + nodes: Object.entries(controls).map(([role, fields]) => ({ + nodeId: bound[role].id, + module: bound[role].node.module, + action: bound[role].node.action, + omittedFields: {}, + fields: Object.fromEntries(Object.entries(fields).map(([key, value]) => [key, { value, source: 'literal' }])), + })), + }, + }; + assert.deepEqual(verifyMarigoldPreviewConsumed(bound, output, binding), { + width: 64, + height: 48, + sha256: binding.file.sha256, + }); + for (const [action, field, changed, message] of [ + ['Load', 'source_hashes', ['0'.repeat(64)], /source byte identity/], + ['LoadPipeline', 'revision', '0'.repeat(40), /model pin/], + ['PredictMap', 'processing_resolution', 512, /prediction controls/], + ]) { + const other = structuredClone(output); + other.resolvedExecutionInputs.nodes.find((node) => node.action === action).fields[field].value = changed; + assert.throws(() => verifyMarigoldPreviewConsumed(bound, other, binding), message); + } +}); + +test( + 'Marigold validates the retained original task and files as preview-only technical evidence', + { skip: !evidencePath }, + async () => { + const original = readFileSync(evidencePath); + const { receipt } = await readCanonicalWorkflowEvidence({ clientRoot, backendRoot, workflowId, evidencePath }); + assert.equal(receipt.proofKind, 'real_backend_input_bound_model_variant'); + assert.equal(receipt.canonicalDefaultsExecuted, false); + assert.equal(receipt.observationLimits.numericDepthPrediction, false); + assert.deepEqual([receipt.decodedOutput.width, receipt.decodedOutput.height], [64, 48]); + assert.ok(Object.values(receipt.qualificationClaims).every((claim) => claim === false)); + assert.deepEqual(readFileSync(evidencePath), original); + }, +); diff --git a/scripts/media-attachment.test.mjs b/scripts/media-attachment.test.mjs index 004ebbfa..aa11667b 100644 --- a/scripts/media-attachment.test.mjs +++ b/scripts/media-attachment.test.mjs @@ -5,7 +5,7 @@ import path from 'node:path'; import { readFileSync } from 'node:fs'; import { createServer } from 'vite'; -let server, attachment, authoring, starters; +let server, attachment, authoring, starters, blockRuntime, operationContracts; const root = process.cwd(); before(async () => { const storage = new Map(); @@ -28,6 +28,8 @@ before(async () => { }); attachment = await server.ssrLoadModule('/src/workflow/mediaAttachment.ts'); authoring = await server.ssrLoadModule('/src/workflow/operationAuthoring.ts'); + blockRuntime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); + operationContracts = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); const backend = path.resolve(root, '../MoDiff'); const python = process.env.MODIFF_BACKEND_PYTHON || @@ -45,6 +47,251 @@ before(async () => { }); after(async () => server?.close()); +// Explicit grouping regressions start from the historical separate Encoding +// and Guidance document, rather than applying today's fresh four-stage policy. +function legacyEncodingGroups(visual, graph) { + const owner = graph.nodes.find((node) => + operationContracts.operationOwnsModel(authoring.operationAuthoring(node)?.operation), + ); + assert.ok(owner); + return visual.groupOperationStages(graph, owner.id, ['inputs', 'guidance']); +} + +// Match BlockOwnerChoices' real Model Setup owner mapping. This reads effective +// controls without flattening or changing the graph being tested. +function visibleModelOwner(visual, graph) { + const setup = graph.nodes.find((node) => visual.visualOperationGroup(node) === 'setup'); + assert.ok(setup, 'a fresh native image branch has Model Setup'); + const owner = blockRuntime + .blockOperationGraphV2(setup.data.blockInstanceV2) + .nodes.find((node) => operationContracts.operationOwnsModel(authoring.operationAuthoring(node)?.operation)); + assert.ok(owner); + return { ...owner, id: visual.visualOperationOwnerId(graph, owner.data.blockProjectionNodeId, setup.id) }; +} + +test('media source labels distinguish same-pipeline repositories and same-repository branches without changing ports', async () => { + const { mediaAttachmentSources } = await server.ssrLoadModule('/src/workflow/mediaAttachmentSources.ts'); + const starter = starters.find((s) => s.pipelineClass === 'QwenImageModularPipeline' && s.task === 'text_to_image'); + const branches = ['Qwen/first', 'Qwen/second', 'Qwen/first'].map((repo) => { + const graph = authoring.createOperationStarter(starter, { x: 0, y: 0 }); + graph.nodes.find((n) => n.data.action === 'ModelsLoader').data.params.repo_id.value = { + source: 'hub', + value: repo, + }; + return graph; + }); + const graph = { nodes: branches.flatMap((g) => g.nodes), edges: branches.flatMap((g) => g.edges) }; + const decoders = graph.nodes.filter((n) => n.data.action === 'DecodeLatents'); + const before = structuredClone(graph); + const options = mediaAttachmentSources(graph.nodes, graph.edges, 'image'); + const images = options.filter((o) => decoders.some((n) => JSON.parse(o.value)[0] === n.id)); + assert.deepEqual( + images.map((o) => o.value), + decoders.map((n) => JSON.stringify([n.id, 'images'])), + ); + assert.deepEqual( + images.map((o) => o.label), + [ + 'Decode Latents · Images · Qwen/first · Branch 1', + 'Decode Latents · Images · Qwen/second', + 'Decode Latents · Images · Qwen/first · Branch 2', + ], + ); + assert.deepEqual(graph, before, 'display context never changes model identity, settings or graph'); +}); + +test('media labels follow current wires and model edits while retaining shared and cyclic sources', async () => { + const { mediaAttachmentSources } = await server.ssrLoadModule('/src/workflow/mediaAttachmentSources.ts'); + const starter = starters.find((s) => s.pipelineClass === 'QwenImageModularPipeline' && s.task === 'text_to_image'); + const graph = authoring.createOperationStarter(starter, { x: 0, y: 0 }); + const owner = graph.nodes.find((n) => n.data.action === 'ModelsLoader'); + const decoder = graph.nodes.find((n) => n.data.action === 'DecodeLatents'); + owner.data.params.repo_id.value = { source: 'local', value: '/models/shared' }; + const selected = JSON.stringify([decoder.id, 'images']); + const read = () => mediaAttachmentSources(graph.nodes, graph.edges, 'image'); + assert.equal(read().find((o) => o.value === selected).label, 'Decode Latents · Images · Local: /models/shared'); + owner.data.params.repo_id.value = 'org/updated'; + assert.equal(read().find((o) => o.value === selected).label, 'Decode Latents · Images · org/updated'); + graph.edges.push({ id: 'cycle-for-review', source: decoder.id, target: owner.id }); + assert.ok( + read().some((o) => o.value === selected), + 'cycle checks remain the actual attachment planner responsibility', + ); + graph.edges = graph.edges.filter((e) => e.source !== owner.id); + assert.equal(read().find((o) => o.value === selected).label, 'Decode Latents · Images'); + graph.nodes = graph.nodes.filter((n) => n.id !== decoder.id); + assert.ok(!read().some((o) => o.value === selected), 'removed ports cannot remain selectable'); +}); + +test('Block output labels resolve effective model controls and exact declared and crossing ports', async () => { + const { mediaAttachmentSources } = await server.ssrLoadModule('/src/workflow/mediaAttachmentSources.ts'); + const schema = await server.ssrLoadModule('/src/studio/blockSchemaV2.ts'); + const runtime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); + const crossing = await server.ssrLoadModule('/src/studio/blockCrossingConnectionsV2.ts'); + const starter = starters.find((s) => s.pipelineClass === 'QwenImageModularPipeline' && s.task === 'text_to_image'); + const graph = authoring.createOperationStarter(starter, { x: 0, y: 0 }); + const owner = graph.nodes.find((n) => n.data.action === 'ModelsLoader'); + owner.data.params.repo_id.value = { source: 'hub', value: 'org/original' }; + const decoder = graph.nodes.find((n) => n.data.action === 'DecodeLatents'); + const inner = { + nodes: graph.nodes.map((n) => ({ nodeId: n.id, nodeType: n.type, data: n.data })), + edges: graph.edges.map((e) => ({ + edgeId: e.id, + sourceNodeId: e.source, + sourcePortId: e.sourceHandle, + targetNodeId: e.target, + targetPortId: e.targetHandle, + })), + }; + const definition = { + schemaVersion: 2, + definitionId: 'user:source-label', + displayName: 'My image branch', + source: { kind: 'user' }, + graph: { ...inner, graphHash: schema.blockGraphHashV2(inner) }, + boundary: { + mode: 'explicit', + inputs: [], + outputs: [ + { + portId: 'rendered', + label: 'Result', + valueType: 'image', + required: false, + binding: { nodeId: decoder.id, fieldOrPortId: 'images' }, + }, + ], + }, + controls: [ + { + controlId: 'source-model', + label: 'Model', + binding: { nodeId: owner.id, fieldId: 'repo_id' }, + valueType: 'string', + order: 0, + }, + ], + suggestedInputs: [], + previews: [], + ownership: { kind: 'user', definitionMutable: true }, + }; + definition.contentHash = schema.blockDefinitionContentHashV2(definition); + const instance = schema.createBlockInstanceV2(definition, { + instanceId: 'source-label-block', + position: { x: 0, y: 0 }, + size: { width: 400, height: 500 }, + }); + const block = runtime.createBlockRootNodeV2(instance); + const before = structuredClone(block); + const handle = crossing.blockCrossingHandleV2({ direction: 'output', nodeId: decoder.id, fieldOrPortId: 'images' }); + const options = mediaAttachmentSources([block], [], 'image', { nodeId: block.id, handleId: handle }); + assert.deepEqual( + options.map((o) => o.value), + [JSON.stringify([block.id, 'rendered']), JSON.stringify([block.id, handle])], + ); + assert.ok(options.every((o) => o.label.startsWith('My image branch · ') && o.label.endsWith(' · org/original'))); + assert.deepEqual(block, before, 'Block definition, interface and values remain immutable'); + const changed = runtime.createBlockRootNodeV2( + runtime.setBlockInstanceValueV2(instance, 'source-model', { source: 'hub', value: 'org/edited' }), + ); + assert.ok(mediaAttachmentSources([changed], [], 'image').every((o) => o.label.endsWith(' · org/edited'))); + assert.ok( + mediaAttachmentSources([block], [], 'image').every((o) => o.label.endsWith(' · org/original')), + 'immutable-instance cache never retains another instance edit', + ); + const { useFlowStore } = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + const originalState = useFlowStore.getState(); + const originalFetch = globalThis.fetch; + let requests = 0; + globalThis.fetch = async () => { + requests++; + throw new Error('No network in imported-edge regression'); + }; + try { + const target = { + id: 'retained-input-target', + type: 'custom', + position: { x: 800, y: 0 }, + data: { + module: 'custom.Values', + action: 'Input', + label: 'Input', + params: { input: { type: 'str', display: 'input' } }, + }, + }; + const edge = { + id: 'retained-input-as-output', + source: block.id, + sourceHandle: crossing.blockCrossingHandleV2({ direction: 'input', nodeId: owner.id, fieldOrPortId: 'repo_id' }), + target: target.id, + targetHandle: 'input', + }; + useFlowStore.getState().replaceGraph({ nodes: [block, target], edges: [edge] }, { clearRemovedCache: false }); + const imported = useFlowStore.getState(); + assert.equal(imported.edges[0].id, edge.id, 'ordinary import retains the broken wire for explicit repair'); + let sources; + assert.doesNotThrow(() => { + sources = mediaAttachmentSources(imported.nodes, imported.edges, 'image'); + }, 'unresolved display context must not hide valid source choices'); + assert.deepEqual( + sources.map((o) => o.value), + [JSON.stringify([block.id, 'rendered'])], + ); + assert.throws( + () => crossing.blockConnectionTargetsV2(imported.nodes[0], edge.sourceHandle, 'output'), + /wrong direction/, + 'the original endpoint authority still rejects a wrong-direction wire', + ); + assert.throws( + () => + mediaAttachmentSources(imported.nodes, imported.edges, 'image', { + nodeId: block.id, + handleId: crossing.blockCrossingHandleV2({ + direction: 'output', + nodeId: owner.id, + fieldOrPortId: 'repo_id', + }), + }), + /missing or has changed direction/, + 'source enumeration must not swallow an invalid selected socket', + ); + assert.equal(requests, 0); + } finally { + useFlowStore.setState(originalState); + globalThis.fetch = originalFetch; + } +}); + +test('audio and custom source titles retain order, types, visibility and opaque selector safety', async () => { + const { mediaAttachmentSources } = await server.ssrLoadModule('/src/workflow/mediaAttachmentSources.ts'); + const data = (id, label, params) => ({ + id, + type: 'custom', + position: { x: 0, y: 0 }, + data: { module: 'custom.Media', action: 'Source', label, params }, + }); + const nodes = [ + data('a', 'My recording', { + clip: { type: ['audio', 'image'], display: 'output', label: 'Clip' }, + secret: { type: 'audio', display: 'output', hidden: true }, + stopped: { type: 'audio', display: 'output', disabled: true }, + }), + data('b', 'My recording', { clip: { type: 'audio', display: 'output', label: 'Clip' } }), + data('metadata', 'Metadata', { + repo_id: { display: 'modelselect', value: { source: 'hub', value: { token: 'never-stringify' } } }, + }), + ]; + const edges = [{ id: 'metadata', source: 'metadata', target: 'a' }]; + assert.deepEqual(mediaAttachmentSources(nodes, edges, 'audio'), [ + { value: JSON.stringify(['a', 'clip']), label: 'My recording · Clip · Branch 1' }, + { value: JSON.stringify(['b', 'clip']), label: 'My recording · Clip · Branch 2' }, + ]); + assert.deepEqual( + mediaAttachmentSources(nodes, edges, 'image').map((o) => o.value), + [JSON.stringify(['a', 'clip'])], + ); +}); + const registry = { 'modules.Image.Load': { type: 'custom', @@ -56,6 +303,343 @@ const registry = { }, }; +test('optional stage groups retain executable leaves, previews and exact mask geometry', async () => { + const visual = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const runtime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); + const starter = starters.find((s) => s.pipelineClass === 'FluxModularPipeline' && s.task === 'text_to_image'); + const graph = legacyEncodingGroups(visual, authoring.createOperationStarter(starter, { x: 0, y: 0 })); + const owner = graph.nodes.find((n) => n.data.action === 'ModelsLoader'); + const decoder = graph.nodes.find((n) => n.data.action === 'DecodeLatents'); + const image = decoder.data.operationAuthoring.operation.ports.find( + (p) => p.direction === 'output' && p.types.includes('image'), + ); + graph.nodes.push({ + id: 'preview', + type: 'custom', + position: { x: 1600, y: 0 }, + data: { + module: 'modules.Image', + action: 'Preview', + label: 'Preview Image', + params: { + image: { type: ['image', 'latent'], display: 'input' }, + preview: { type: 'url', display: 'ui_image', dataSource: 'output' }, + output: { type: 'image', display: 'output' }, + export: { type: 'str', display: 'text', value: '0' }, + }, + }, + }); + graph.edges.push({ + id: 'preview-edge', + source: decoder.id, + sourceHandle: image.name, + target: 'preview', + targetHandle: 'image', + }); + assert.deepEqual(visual.availableOperationStageGroups(graph, owner.id), ['generate', 'setup', 'output']); + const before = visual.unpackVisualOperationGroups(graph).graph; + const grouped = visual.groupOperationStages(graph, owner.id, ['output']); + const output = grouped.nodes.find((n) => visual.visualOperationGroup(n) === 'output'); + assert.equal(output.data.label, 'Image Output'); + assert.equal(output.data.blockInstanceV2.effectiveGraph.nodes.length, 2); + assert.deepEqual(output.data.blockInstanceV2.definitionSnapshot.previews, [ + { nodeId: 'stage-preview', outputPortId: 'preview', mediaType: 'image', primary: true }, + ]); + assert.equal(runtime.blockViewModelV2(output.data.blockInstanceV2).previewViews.length, 1); + const selected = runtime.expandBlockGraphV2ForExecution(grouped.nodes, grouped.edges, output.id); + assert.ok( + ['ModelsLoader', 'EncodePrompt', 'Denoise', 'DecodeLatents', 'Preview'].every((action) => + selected.nodes.some((node) => node.data.action === action), + ), + 'selected Image Output keeps the original upstream dependency closure', + ); + for (const original of graph.nodes.filter((node) => visual.visualOperationGroup(node))) + assert.deepEqual( + grouped.nodes.find((node) => node.id === original.id), + original, + 'other stage wrappers retain exact state', + ); + const separated = visual.unpackVisualOperationGroups(grouped).graph; + const signature = (g) => ({ + nodes: g.nodes + .map((n) => [ + n.data.module, + n.data.action, + Object.fromEntries(Object.entries(n.data.params).map(([key, p]) => [key, p.value ?? p.default])), + ]) + .sort(), + edges: g.edges + .map((e) => [ + g.nodes.find((n) => n.id === e.source).data.action, + e.sourceHandle, + g.nodes.find((n) => n.id === e.target).data.action, + e.targetHandle, + ]) + .sort(), + }); + assert.deepEqual(signature(separated), signature(before)); + assert.deepEqual(visual.availableOperationStageGroups(grouped, owner.id), ['setup']); + const completed = runtime.setBlockPreviewStateV2( + output.data.blockInstanceV2, + { nodeId: 'stage-preview', outputPortId: 'preview' }, + { + mediaReference: '/file/output.png', + taskId: 'preview-task', + status: 'complete', + }, + ); + const withPreview = { + ...grouped, + nodes: grouped.nodes.map((node) => (node.id === output.id ? runtime.createBlockRootNodeV2(completed) : node)), + }; + const projected = visual.unpackVisualOperationGroups(withPreview); + assert.equal( + projected.graph.nodes.find((node) => node.data.action === 'Preview').data.params.preview.value, + '/file/output.png', + ); + const restored = visual.restoreVisualOperationGroups(projected.graph, projected); + assert.deepEqual( + restored.nodes.find((node) => node.id === output.id).data.blockInstanceV2.previewStates, + completed.previewStates, + ); + const maskStarter = starters.find((s) => s.pipelineClass === 'FluxFillPipeline' && s.task === 'outpaint'); + assert.ok(maskStarter, 'use the backend declared whole-pipeline masked task'); + const maskGraph = authoring.createOperationStarter(maskStarter, { x: 0, y: 0 }); + const maskOwner = maskGraph.nodes.find((n) => n.data.operationAuthoring.operation.decomposition === 'loader'); + const consumer = maskGraph.nodes.find((n) => + n.data.operationAuthoring.operation.ports.some((p) => p.name === 'mask_image' && p.direction === 'input'), + ); + maskGraph.nodes.push( + { + id: 'source', + type: 'custom', + position: { x: -800, y: 0 }, + data: { + module: 'modules.Image', + action: 'Load', + label: 'Load Image', + params: { + file: { type: 'str', display: 'filebrowser', label: false, value: '/source.png' }, + image: { type: 'image', display: 'output' }, + }, + }, + }, + { + id: 'canvas', + type: 'custom', + position: { x: -400, y: 0 }, + data: { + module: 'modules.DiffusersImage', + action: 'OutpaintCanvas', + label: 'Outpaint Canvas', + params: { + image: { type: 'image', display: 'input' }, + width: { label: 'Canvas width', type: 'int', value: 1344 }, + height: { label: 'Canvas height', type: 'int', value: 768 }, + feather: { label: 'Mask feather', type: 'float', value: 8 }, + canvas: { type: 'image', display: 'output' }, + mask_image: { type: 'image', display: 'output' }, + width_out: { type: 'int', display: 'output' }, + height_out: { type: 'int', display: 'output' }, + }, + }, + }, + ); + for (const [source, sourceHandle, target, targetHandle] of [ + ['source', 'image', 'canvas', 'image'], + ['canvas', 'canvas', consumer.id, 'image'], + ['canvas', 'mask_image', consumer.id, 'mask_image'], + ['canvas', 'width_out', consumer.id, 'width'], + ['canvas', 'height_out', consumer.id, 'height'], + ]) + maskGraph.edges.push({ id: `${source}-${sourceHandle}`, source, sourceHandle, target, targetHandle }); + const mask = visual.groupOperationStages(maskGraph, maskOwner.id, ['mask']); + const maskRoot = mask.nodes.find((n) => visual.visualOperationGroup(n) === 'mask'); + assert.equal(maskRoot.data.label, 'Prepare Mask'); + assert.equal( + maskRoot.data.blockInstanceV2.effectiveInterface.controls.find((control) => control.binding.fieldId === 'file') + .label, + 'file', + 'the real Image.Load hidden field label receives a valid interface name', + ); + assert.deepEqual( + maskRoot.data.blockInstanceV2.effectiveInterface.controls + .filter((control) => ['width', 'height', 'feather'].includes(control.binding.fieldId)) + .map((control) => [control.binding.fieldId, control.label, control.defaultValue]), + [ + ['width', 'Canvas width', 1344], + ['height', 'Canvas height', 768], + ['feather', 'Mask feather', 8], + ], + 'registered utilities infer scalar editors from their types without a display declaration', + ); + assert.deepEqual(signature(visual.unpackVisualOperationGroups(mask).graph), signature(maskGraph)); + const wrong = structuredClone(maskGraph); + wrong.edges = wrong.edges.filter((e) => e.sourceHandle !== 'mask_image'); + assert.deepEqual(visual.availableOperationStageGroups(wrong, maskOwner.id), ['setup']); +}); + +test('Model Setup retains loader ownership, ordered descriptors, task adaptation and independent reuse', async () => { + const visual = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const runtime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); + const schema = await server.ssrLoadModule('/src/studio/blockSchemaV2.ts'); + const persistence = await server.ssrLoadModule('/src/studio/blockDefinitionPersistenceV2.ts'); + const starter = starters.find((s) => s.pipelineClass === 'FluxModularPipeline' && s.task === 'text_to_image'); + const graph = legacyEncodingGroups(visual, authoring.createOperationStarter(starter, { x: 0, y: 0 })); + const owner = graph.nodes.find((n) => n.data.action === 'ModelsLoader'); + for (const id of ['lora-a', 'lora-b']) + graph.nodes.push({ + id, + type: 'custom', + position: { x: -800, y: 0 }, + data: { + module: 'modules.ModularDiffusers', + action: 'Lora', + label: id, + params: { + model: { type: 'string', display: 'modelselect', value: { source: 'hub', value: id } }, + scale: { type: 'float', display: 'slider', value: id === 'lora-a' ? 0 : 0.4 }, + previous_loras: { type: 'custom_lora', display: 'input' }, + lora: { type: 'custom_lora', display: 'output' }, + }, + }, + }); + graph.edges.push( + { id: 'ordered', source: 'lora-a', sourceHandle: 'lora', target: 'lora-b', targetHandle: 'previous_loras' }, + { id: 'descriptors', source: 'lora-b', sourceHandle: 'lora', target: owner.id, targetHandle: 'lora_list' }, + ); + const grouped = visual.groupOperationStages(graph, owner.id, ['setup']); + const setup = grouped.nodes.find((n) => visual.visualOperationGroup(n) === 'setup'); + assert.equal(setup.data.label, 'Model Setup'); + assert.equal(setup.data.blockInstanceV2.effectiveGraph.nodes.length, 3); + assert.equal(setup.data.blockInstanceV2.effectiveGraph.edges.length, 2); + const semanticOwner = setup.data.blockInstanceV2.effectiveGraph.nodes.find( + (n) => n.data.action === 'ModelsLoader', + ).nodeId; + const ownerId = visual.visualOperationOwnerId(grouped, semanticOwner, setup.id); + assert.equal(ownerId, `${setup.id}/${semanticOwner}`); + const sealed = runtime.replaceBlockEffectiveInterfaceV2(setup.data.blockInstanceV2, { + boundary: setup.data.blockInstanceV2.effectiveInterface.boundary, + controls: setup.data.blockInstanceV2.effectiveInterface.controls.map((control) => + control.binding.nodeId === semanticOwner && control.binding.fieldId === 'repo_id' + ? { ...control, sealed: true } + : control, + ), + }); + const protectedGraph = { + ...grouped, + nodes: grouped.nodes.map((node) => (node.id === setup.id ? runtime.createBlockRootNodeV2(sealed) : node)), + }; + const replacement = structuredClone(starter); + replacement.nodes.find((node) => node.operation.decomposition === 'loader').node.params.repo_id.value = + 'example/different-model'; + const protectedBefore = structuredClone(protectedGraph); + assert.throws( + () => authoring.planOperationChange(protectedGraph, ownerId, replacement, { replaceModel: true }), + /sealed/, + ); + assert.deepEqual(protectedGraph, protectedBefore); + const target = starters.find((s) => s.pipelineClass === 'FluxModularPipeline' && s.task === 'image_to_image'); + const plan = authoring.planOperationChange(grouped, ownerId, target); + const flat = visual.unpackVisualOperationGroups(plan.graph).graph; + assert.ok( + flat.nodes.find((n) => n.data.action === 'ModelsLoader').data.operationAuthoring.operation.task === + 'image_to_image', + ); + assert.ok( + flat.nodes.some((n) => n.data.operationAuthoring?.operation.nodeType === 'vae_encoder'), + 'the complete connected branch adapts outside Model Setup', + ); + assert.equal(flat.nodes.filter((n) => n.data.action === 'Lora').length, 2); + assert.deepEqual( + plan.graph.nodes.find((n) => n.id === setup.id).data.blockInstanceV2.definitionSnapshot, + setup.data.blockInstanceV2.definitionSnapshot, + ); + const control = setup.data.blockInstanceV2.effectiveInterface.controls.find( + (c) => c.binding.nodeId === 'stage-lora-a' && c.binding.fieldId === 'scale', + ); + assert.equal(schema.blockInstanceValueV2(setup.data.blockInstanceV2, control.controlId), 0); + const changed = runtime.setBlockInstanceValueV2(setup.data.blockInstanceV2, control.controlId, 0.7); + const definition = persistence.reusableBlockDefinitionFromInstanceV2(changed, { + choice: 'new', + definitionId: 'my-setup', + displayName: 'My model setup', + }); + const instances = ['first', 'second'].map((instanceId) => + schema.createBlockInstanceV2(definition, { + instanceId, + position: { x: 0, y: 0 }, + size: { width: 400, height: 540 }, + }), + ); + assert.equal(schema.blockInstanceValueV2(instances[0], control.controlId), 0.7); + const edited = runtime.setBlockInstanceValueV2(instances[0], control.controlId, 0); + assert.equal(schema.blockInstanceValueV2(edited, control.controlId), 0); + assert.equal(schema.blockInstanceValueV2(instances[1], control.controlId), 0.7); + const shared = structuredClone(graph); + const other = { ...structuredClone(owner), id: 'other-model' }; + shared.nodes.push(other); + shared.edges.push({ + id: 'shared-descriptors', + source: 'lora-b', + sourceHandle: 'lora', + target: other.id, + targetHandle: 'lora_list', + }); + function checkSharedSuppliers(graph, ownedAdapterIds = []) { + const before = structuredClone(graph); + assert.ok(visual.availableOperationStageGroups(graph, owner.id).includes('setup')); + const grouped = visual.groupOperationStages(graph, owner.id, ['setup']); + const setup = grouped.nodes.find((node) => visual.visualOperationGroup(node) === 'setup'); + assert.deepEqual( + setup.data.blockInstanceV2.effectiveGraph.nodes.map((node) => node.data.action), + ['ModelsLoader', ...ownedAdapterIds.map(() => 'Lora')], + 'only the loader and its exclusive adapter suffix can be grouped', + ); + const external = graph.nodes.filter((node) => node.data.action === 'Lora' && !ownedAdapterIds.includes(node.id)); + for (const adapter of external) + assert.deepEqual( + grouped.nodes.find((node) => node.id === adapter.id), + adapter, + ); + const flat = visual.unpackVisualOperationGroups(grouped).graph; + const currentOwner = visibleModelOwner(visual, grouped); + const mappedId = (id) => { + if (id === owner.id) return currentOwner.id; + if (!ownedAdapterIds.includes(id)) return id; + const original = graph.nodes.find((node) => node.id === id); + const child = setup.data.blockInstanceV2.effectiveGraph.nodes.find( + (node) => node.data.action === 'Lora' && node.data.label === original.data.label, + ); + assert.ok(child, 'the owned adapter remains an actual setup leaf'); + assert.deepEqual(child.data.params, original.data.params, 'grouping retains every owned adapter setting'); + return `${setup.id}/${child.nodeId}`; + }; + for (const edge of graph.edges.filter((edge) => + graph.nodes.some((node) => node.data.action === 'Lora' && node.id === edge.source), + )) + assert.ok( + flat.edges.some( + (next) => + next.source === mappedId(edge.source) && + next.sourceHandle === edge.sourceHandle && + next.target === mappedId(edge.target) && + next.targetHandle === edge.targetHandle, + ), + 'each shared chain and consumer retains its exact supplier and ports', + ); + assert.deepEqual(graph, before, 'grouping does not mutate the shared source graph'); + } + checkSharedSuppliers(shared); + shared.edges = shared.edges.filter((edge) => edge.id !== 'shared-descriptors'); + shared.nodes.push({ ...structuredClone(shared.nodes.find((node) => node.id === 'lora-a')), id: 'lora-c' }); + shared.edges.push( + { id: 'shared-chain', source: 'lora-a', sourceHandle: 'lora', target: 'lora-c', targetHandle: 'previous_loras' }, + { id: 'other-chain-owner', source: 'lora-c', sourceHandle: 'lora', target: other.id, targetHandle: 'lora_list' }, + ); + checkSharedSuppliers(shared, ['lora-b']); +}); + test('removed dynamic Guidance controls stay hidden without resetting execution values', async () => { const visual = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); const runtime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); @@ -65,7 +649,7 @@ test('removed dynamic Guidance controls stay hidden without resetting execution (s) => s.pipelineClass === 'StableDiffusionXLModularPipeline' && s.task === 'text_to_image', ); const grouped = visual.groupNewOperationGraph(authoring.createOperationStarter(starter, { x: 0, y: 0 })); - const root = grouped.nodes.find((n) => visual.visualOperationGroup(n) === 'guidance'); + const root = grouped.nodes.find((n) => visual.visualOperationGroup(n) === 'inputs'); const unpacked = visual.unpackVisualOperationGroups(grouped, new Set([root.id])); const stage = unpacked.graph.nodes.find((n) => n.data.action === 'Guider'); stage.data.params.dynamic_scale = { type: 'float', display: 'number', label: 'Dynamic Scale', default: 2.8 }; @@ -169,6 +753,62 @@ test('removed dynamic Guidance controls stay hidden without resetting execution } }); +test('all built-in image task drafts connect their declared source and mask roles', async () => { + const { createWorkflowDraft } = await server.ssrLoadModule('/src/workflow/workflowDraft.ts'); + const { workflowTaskCategory, workflowTaskCards } = await server.ssrLoadModule( + '/src/workflow/workflowTaskBrowser.ts', + ); + const { unpackVisualOperationGroups } = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const tasks = [ + 'image_adjustment', + 'image_filter', + 'image_crop', + 'image_upscale', + 'image_stitch', + 'image_tile', + 'image_channels', + 'mask_composite', + ]; + const mediaRegistry = { + ...registry, + 'modules.Image.Preview': { + type: 'custom', + module: 'modules.Image', + action: 'Preview', + label: 'Preview', + category: 'Image', + params: { image: { type: 'image', display: 'input' } }, + }, + }; + for (const task of tasks) { + const starter = starters.find((s) => s.pipelineClass === 'BuiltinImageOperationV1' && s.task === task); + assert.ok(starter, `Missing real backend starter fixture: ${task}`); + assert.equal(workflowTaskCategory(task), 'Image', task); + assert.equal(workflowTaskCards([{ task }])[0].category, 'Image', task); + const before = structuredClone(starter); + const flat = unpackVisualOperationGroups(createWorkflowDraft(starter, mediaRegistry).graph).graph; + const process = flat.nodes.find((n) => n.data.action === 'ProcessImage'); + const roles = task === 'mask_composite' ? ['image', 'mask'] : ['image']; + const sources = roles.map((role) => { + const wire = flat.edges.find((e) => e.target === process.id && e.targetHandle === role); + assert.ok(wire, `${task}: missing ${role} input`); + assert.equal(wire.sourceHandle, 'image', 'Explicit masks use the loaded pixels, not inferred alpha'); + const source = flat.nodes.find((n) => n.id === wire.source); + assert.equal(source.data.module, 'modules.Image'); + assert.equal(source.data.action, 'Load'); + return source; + }); + assert.equal(new Set(sources.map((n) => n.id)).size, roles.length); + if (task === 'mask_composite') assert.equal(sources[1].data.label, 'Load Mask'); + const preview = flat.nodes.find((n) => n.data.action === 'Preview'); + assert.ok( + flat.edges.some((e) => e.source === process.id && e.sourceHandle === 'output' && e.target === preview.id), + ); + assert.equal(flat.nodes.length, roles.length + 2); + assert.deepEqual(starter, before, 'Creating a fresh draft must not rewrite the backend starter'); + } +}); + test('fresh image/audio workflows connect required media from separate loaders', async () => { const { createWorkflowDraft } = await server.ssrLoadModule('/src/workflow/workflowDraft.ts'); const { unpackVisualOperationGroups } = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); @@ -289,13 +929,17 @@ test('visual encoders and guidance preserve executable stages, typed wires, and input, JSON.stringify(starter.nodes.map((item) => [item.operation.nodeType, item.operation.decomposition])), ); - assert.ok( - guidance, - JSON.stringify(starter.nodes.map((item) => [item.operation.nodeType, item.operation.decomposition])), - ); - assert.equal(grouped.nodes.length, graph.nodes.length - 1); - assert.equal(presentation.isFocusedGuidance(guidance.data.blockInstanceV2), true); - assert.deepEqual(guidance.data.blockInstanceV2.effectiveGraph.nodes.map((n) => n.data.action).sort(), [ + assert.equal(guidance, undefined, 'fresh Guidance belongs to Encode Inputs'); + assert.equal(grouped.nodes.length, 3); + assert.deepEqual(grouped.nodes.map((node) => node.data.label).sort(), ['Encode Inputs', 'Generate', 'Model Setup']); + const generate = grouped.nodes.find((node) => visual.visualOperationGroup(node) === 'generate'); + assert.deepEqual(generate.data.blockInstanceV2.effectiveGraph.nodes.map((node) => node.data.action).sort(), [ + 'DecodeLatents', + 'Denoise', + ]); + assert.equal(presentation.isFocusedGuidance(input.data.blockInstanceV2), true); + assert.deepEqual(input.data.blockInstanceV2.effectiveGraph.nodes.map((n) => n.data.action).sort(), [ + 'EncodePrompt', 'Guider', 'Layers', ]); @@ -343,6 +987,245 @@ test('fresh sources keep masks distinct and share the same declared image across ); }); +function qwenImageMigrationSource() { + const source = starters.find((s) => s.pipelineClass === 'QwenImageModularPipeline' && s.task === 'image_to_image'); + const target = starters.find( + (s) => s.pipelineClass === 'QwenImageEditPlusModularPipeline' && s.task === 'edit_image', + ); + assert.ok(source && target, 'both actual backend routes are published'); + const graph = authoring.createOperationStarter(source, { x: 0, y: 0 }); + const owner = graph.nodes.find((node) => node.data.action === 'ModelsLoader'); + owner.data.params.auto_offload.value = false; + owner.data.params.offload_mode.value = 'none'; + const choice = attachment + .mediaAttachmentChoices( + source.nodes.map((node) => node.operation), + source.pipelineClass, + ) + .find((item) => item.role === 'image'); + const attached = attachment.planMediaAttachment(graph, owner.id, source, choice, registry); + const image = attached.nodes.find((node) => node.data.module === 'modules.Image' && node.data.action === 'Load'); + image.data.params.file = { type: 'str', display: 'filebrowser', value: ['inputs/source-product.png'] }; + return { source, target, graph: attached, ownerId: owner.id, imageId: image.id }; +} + +test('actual image-to-image model migration preserves one image source across all new declared consumers', async (t) => { + const visual = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const { useFlowStore } = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + const { inspectRequiredGraphInputs } = await server.ssrLoadModule('/src/studio/requiredGraphInputs.ts'); + for (const grouped of [false, true]) + await t.test(grouped ? 'visible encoding group' : 'ordinary leaves', () => { + const fixture = qwenImageMigrationSource(); + const graph = grouped ? visual.groupNewOperationGraph(fixture.graph) : fixture.graph; + const original = structuredClone(graph); + const ownerId = grouped ? visibleModelOwner(visual, graph).id : fixture.ownerId; + const plan = authoring.planOperationChange(graph, ownerId, fixture.target); + const flat = visual.unpackVisualOperationGroups(plan.graph).graph; + const consumers = flat.nodes.filter((node) => ['ImageEncode', 'EncodePrompt'].includes(node.data.action)); + assert.equal(consumers.length, 2); + for (const consumer of consumers) { + const port = consumer.data.operationAuthoring.operation.ports.find((item) => item.name === 'image'); + assert.equal(port.semanticName, 'image'); + assert.equal(port.semantics.kind, 'media'); + assert.equal(port.required, true); + assert.deepEqual( + flat.edges + .filter((edge) => edge.target === consumer.id && edge.targetHandle === port.name) + .map((edge) => [edge.source, edge.sourceHandle]), + [[fixture.imageId, 'image']], + 'the original image output, not a new source or mask, supplies both declared roles', + ); + } + assert.deepEqual( + flat.nodes.find((node) => node.id === fixture.imageId), + fixture.graph.nodes.find((node) => node.id === fixture.imageId), + ); + assert.deepEqual(graph, original, 'planning leaves the source graph and its immutable group snapshots unchanged'); + assert.ok( + !inspectRequiredGraphInputs(plan.graph.nodes, flat, {}).some((issue) => + /needs image before running/u.test(issue.message), + ), + ); + const api = useFlowStore + .getState() + .exportGraph('media-migration', undefined, { sourceGraph: plan.graph, randomizeSeeds: false }); + for (const consumer of consumers) { + const submitted = Object.values(api.nodes).find((node) => node.action === consumer.data.action); + assert.equal(submitted.params.image.sourceId, fixture.imageId); + assert.equal(submitted.params.image.sourceKey, 'image'); + assert.equal(submitted.params.image.display, 'input'); + } + }); +}); + +test('media migration keeps distinct roles, existing values, disabled sources and absent declarations unresolved', async (t) => { + const { preservedMediaFanout } = await server.ssrLoadModule('/src/workflow/operationMediaMigration.ts'); + const operationNodes = (graph) => graph.nodes.filter((node) => node.data.operationAuthoring); + for (const [name, change] of [ + [ + 'reference role', + ({ port }) => { + port.semanticName = 'reference_image'; + }, + ], + [ + 'mask role', + ({ port }) => { + port.semanticName = 'mask_image'; + }, + ], + [ + 'control role', + ({ port }) => { + port.semanticName = 'control_image'; + }, + ], + [ + 'component role', + ({ port }) => { + port.roles = ['component']; + }, + ], + [ + 'state scope', + ({ port }) => { + port.semantics.scope = 'OtherOwner'; + }, + ], + [ + 'missing semantics', + ({ port }) => { + delete port.semantics; + }, + ], + [ + 'hidden port', + ({ port }) => { + port.hidden = true; + }, + ], + [ + 'optional port', + ({ port }) => { + port.required = false; + }, + ], + [ + 'hidden field', + ({ field }) => { + field.hidden = true; + }, + ], + [ + 'disabled field', + ({ field }) => { + field.disabled = true; + }, + ], + [ + 'existing value', + ({ field }) => { + field.value = ['inputs/another-product.png']; + }, + ], + [ + 'disabled source', + ({ image }) => { + image.data.uiState = { disabled: true }; + }, + ], + [ + 'incompatible source', + ({ image }) => { + image.data.params.image.type = 'audio'; + }, + ], + [ + 'no preserved driver', + ({ after, image }) => { + after.edges = after.edges.filter((edge) => edge.source !== image.id); + }, + ], + [ + 'previously required but disconnected', + ({ previousPrompt, port, field }) => { + previousPrompt.data.operationAuthoring.operation.ports.push(structuredClone(port)); + previousPrompt.data.params.image = structuredClone(field); + }, + ], + ]) + await t.test(name, () => { + const fixture = qwenImageMigrationSource(); + const before = structuredClone(fixture.graph); + const after = authoring.planOperationChange(fixture.graph, fixture.ownerId, fixture.target).graph; + const prompt = after.nodes.find((node) => node.data.action === 'EncodePrompt'); + after.edges = after.edges.filter((edge) => !(edge.target === prompt.id && edge.targetHandle === 'image')); + const port = prompt.data.operationAuthoring.operation.ports.find((item) => item.name === 'image'); + const previousPrompt = before.nodes.find((node) => node.data.action === 'EncodePrompt'); + change({ + before, + after, + prompt, + port, + field: prompt.data.params.image, + previousPrompt, + image: after.nodes.find((node) => node.id === fixture.imageId), + }); + const snapshot = structuredClone({ before, after }); + assert.deepEqual(preservedMediaFanout(before, after, operationNodes(before), operationNodes(after)).edges, []); + assert.deepEqual({ before, after }, snapshot, 'rejected fanout is read-only'); + }); +}); + +test('media migration preserves occupied sockets and rejects competing drivers and cycles', async (t) => { + const { preservedMediaFanout } = await server.ssrLoadModule('/src/workflow/operationMediaMigration.ts'); + const operationNodes = (graph) => graph.nodes.filter((node) => node.data.operationAuthoring); + for (const mode of ['occupied', 'two sources', 'two handles', 'cycle']) + await t.test(mode, () => { + const fixture = qwenImageMigrationSource(); + const before = structuredClone(fixture.graph); + const after = authoring.planOperationChange(fixture.graph, fixture.ownerId, fixture.target).graph; + const prompt = after.nodes.find((node) => node.data.action === 'EncodePrompt'); + const current = after.edges.find((edge) => edge.target === prompt.id && edge.targetHandle === 'image'); + if (mode !== 'occupied') after.edges = after.edges.filter((edge) => edge !== current); + if (mode === 'two sources' || mode === 'two handles') { + const alternative = structuredClone(before.nodes.find((node) => node.id === fixture.imageId)); + if (mode === 'two sources') { + alternative.id = 'another-image'; + before.nodes.push(structuredClone(alternative)); + after.nodes.push(alternative); + } else { + for (const graph of [before, after]) + graph.nodes.find((node) => node.id === alternative.id).data.params.alternate = { + type: 'image', + display: 'output', + }; + } + const sourceHandle = mode === 'two sources' ? 'image' : 'alternate'; + for (const graph of [before, after]) { + const encoder = graph.nodes.find((node) => node.data.action === 'ImageEncode'); + graph.edges.push({ + id: `competing-${graph === before ? 'before' : 'after'}`, + source: alternative.id, + sourceHandle, + target: encoder.id, + targetHandle: 'image', + }); + } + } + if (mode === 'cycle') after.edges.push({ id: 'downstream-source', source: prompt.id, target: fixture.imageId }); + const snapshot = structuredClone({ before, after }); + const result = preservedMediaFanout(before, after, operationNodes(before), operationNodes(after)); + assert.deepEqual(result.edges, []); + assert.equal(result.attention.length, mode === 'occupied' ? 0 : 1); + assert.deepEqual( + { before, after }, + snapshot, + 'existing wires, conflicting sources and cycles are preserved for review', + ); + }); +}); + test('custom mirrored interfaces reject adaptation without mutating their source or values', async () => { const visual = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); const baseline = starters.find( @@ -354,7 +1237,7 @@ test('custom mirrored interfaces reject adaptation without mutating their source const port = input.data.blockInstanceV2.effectiveInterface.boundary.inputs[0]; port.mirrorBindings = [structuredClone(port.binding)]; const before = structuredClone(graph); - const owner = graph.nodes.find((n) => n.data.action === 'ModelsLoader'); + const owner = visibleModelOwner(visual, graph); assert.throws(() => authoring.planOperationChange(graph, owner.id, destination), /mirrored/); assert.deepEqual(graph, before); }); @@ -369,7 +1252,7 @@ test('grouped image attachment adds only a visible source and retains the immuta (item) => item.pipelineClass === baseline.pipelineClass && item.task === 'image_to_image', ); const graph = visual.groupNewOperationGraph(authoring.createOperationStarter(baseline, { x: 80, y: 120 })); - const owner = graph.nodes.find((node) => node.data.operationAuthoring?.operation.decomposition === 'loader'); + const owner = visibleModelOwner(visual, graph); const input = graph.nodes.find((node) => visual.visualOperationGroup(node) === 'inputs'); const definition = structuredClone(input.data.blockInstanceV2.definitionSnapshot); const choice = attachment @@ -405,11 +1288,82 @@ test('grouped image attachment adds only a visible source and retains the immuta ); }); -test('whole-pipeline audio stays unchanged rather than inventing encoders', async () => { +test('whole-pipeline audio preserves real leaves and API behind setup without inventing compute stages', async (t) => { const visual = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); - const starter = starters.find((item) => item.pipelineClass === 'AceStepPipeline' && item.task === 'text_to_audio'); - const graph = authoring.createOperationStarter(starter, { x: 0, y: 0 }); - assert.deepEqual(visual.groupNewOperationGraph(graph), graph); + const { useFlowStore } = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + const wholeAudio = starters.filter((item) => + item.nodes.some( + ({ node, operation }) => + node.module === 'modules.DiffusersAudio' && + node.action === 'Generate' && + operation.decomposition === 'pipeline', + ), + ); + assert.equal(wholeAudio.length, 7, 'four ACE tasks and the three other published integrated audio families'); + const api = (graph) => { + const exported = useFlowStore + .getState() + .exportGraph('whole-audio-preservation', undefined, { sourceGraph: graph, randomizeSeeds: false }); + const names = new Map(Object.entries(exported.nodes).map(([id, node]) => [id, `${node.module}.${node.action}`])); + assert.equal( + new Set(names.values()).size, + names.size, + 'these bounded routes have unique executable action identities', + ); + const normalize = (value) => { + if (Array.isArray(value)) return value.map(normalize); + if (value && typeof value === 'object') + return Object.fromEntries( + Object.entries(value).map(([key, item]) => [ + key, + key === 'sourceId' ? (names.get(item) ?? item) : normalize(item), + ]), + ); + return value; + }; + return { + nodes: Object.fromEntries( + [...names].map(([id, key]) => [key, normalize(exported.nodes[id])]).sort(([a], [b]) => a.localeCompare(b)), + ), + paths: exported.paths + .map((route) => route.map((id) => names.get(id) ?? id)) + .sort((a, b) => JSON.stringify(a).localeCompare(JSON.stringify(b))), + }; + }; + for (const starter of wholeAudio) + await t.test(`${starter.pipelineClass}:${starter.task}`, () => { + const graph = authoring.createOperationStarter(starter, { x: 0, y: 0 }); + // Select the declared NONE CPU authoring route before recording either + // graph; the schema fixture does not claim an accelerator or model run. + for (const node of graph.nodes) + if (String(node.data.params.device?.value ?? node.data.params.device?.default ?? '').startsWith('cpu')) { + if (node.data.params.auto_offload) node.data.params.auto_offload.value = false; + if (node.data.params.offload_mode) node.data.params.offload_mode.value = 'none'; + } + const before = structuredClone(graph); + const grouped = visual.groupNewOperationGraph(graph); + assert.deepEqual(grouped.nodes.map(visual.visualOperationGroup).filter(Boolean), ['setup']); + assert.equal(grouped.nodes.filter((node) => node.data.action === 'Generate').length, 1); + const flat = visual.unpackVisualOperationGroups(grouped).graph; + const leaves = (value) => value.nodes.map((node) => `${node.data.module}.${node.data.action}`).sort(); + assert.deepEqual( + leaves(flat), + leaves(before), + 'grouping cannot create an encoder, denoiser, decoder or output action', + ); + assert.ok( + !flat.nodes.some((node) => + ['EncodeInputs', 'EncodePrompt', 'Denoise', 'DecodeLatents'].includes(node.data.action), + ), + ); + assert.deepEqual( + api(grouped), + api(before), + 'all declared scalar values, model identity, inputs and executable wires survive', + ); + assert.deepEqual(api(flat), api(before)); + assert.deepEqual(graph, before, 'presentation does not mutate the creator graph'); + }); }); test('grouped model changes retain prompts, a custom output branch and group identity', async () => { @@ -443,7 +1397,7 @@ test('grouped model changes retain prompts, a custom output branch and group ide targetHandle: 'input', }); const graph = visual.groupNewOperationGraph(draft); - const owner = graph.nodes.find((node) => node.data.operationAuthoring?.operation.decomposition === 'loader'); + const owner = visibleModelOwner(visual, graph); const input = graph.nodes.find((node) => visual.visualOperationGroup(node) === 'inputs'); const before = structuredClone(graph); const plan = authoring.planOperationChange(graph, owner.id, target); @@ -495,7 +1449,7 @@ test('shared value edits preserve unrelated customized groups without rebuilding ); const first = visual.groupNewOperationGraph(authoring.createOperationStarter(starter, { x: 0, y: 0 })); const other = visual.groupNewOperationGraph(authoring.createOperationStarter(starter, { x: 0, y: 1000 })); - const guide = other.nodes.find((n) => visual.visualOperationGroup(n) === 'guidance'); + const guide = other.nodes.find((n) => visual.visualOperationGroup(n) === 'inputs'); let instance = runtime.addBlockEffectiveGraphNodeV2( guide.data.blockInstanceV2, { @@ -755,13 +1709,30 @@ test('a newly attached mask uses mask pixels, not an unrelated alpha channel', ( assert.ok(!result.edges.some((edge) => edge.source === source.id && edge.sourceHandle === 'mask')); }); -test('attachment choices reject undeclared roles and do not advertise video transport', () => { +test('attachment choices advertise only declared visible media roles', () => { for (const starter of starters) { const choices = attachment.mediaAttachmentChoices( starter.nodes.map((item) => item.operation), starter.pipelineClass, ); - assert.ok(choices.every((choice) => ['image', 'audio'].includes(choice.kind))); + assert.ok(choices.every((choice) => ['image', 'audio', 'video'].includes(choice.kind))); + for (const choice of choices) + assert.ok( + starter.nodes.some( + ({ operation }) => + operation.pipelineClass === starter.pipelineClass && + operation.task === choice.task && + operation.ports.some( + (port) => + port.direction === 'input' && + !port.hidden && + !port.roles.includes('component') && + port.semantics?.owner !== 'same_loader' && + port.semanticName === choice.role && + port.types.includes(choice.kind), + ), + ), + ); } assert.deepEqual(attachment.mediaAttachmentChoices([], 'UnknownPipeline'), []); }); diff --git a/scripts/media-viewer.test.mjs b/scripts/media-viewer.test.mjs index 426d54c3..4b76aa17 100644 --- a/scripts/media-viewer.test.mjs +++ b/scripts/media-viewer.test.mjs @@ -9,7 +9,11 @@ import { renderToStaticMarkup } from 'react-dom/server'; const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); let mediaViewer; let outputUtils; +let outputText; +let outputContracts; +let previewHistory; let templateAssets; +let templateInputPreview; let previewFrame; let audioField; let videoField; @@ -37,7 +41,11 @@ before(async () => { }); mediaViewer = await server.ssrLoadModule('/src/utils/mediaViewer.ts'); outputUtils = await server.ssrLoadModule('/src/studio/outputUtils.ts'); + outputText = await server.ssrLoadModule('/src/studio/outputText.ts'); + outputContracts = await server.ssrLoadModule('/src/studio/outputContracts.ts'); + previewHistory = await server.ssrLoadModule('/src/fields/PreviewHistoryStripContent.tsx'); templateAssets = await server.ssrLoadModule('/src/studio/templateAssets.ts'); + templateInputPreview = await server.ssrLoadModule('/src/studio/templateInputPreview.ts'); previewFrame = await server.ssrLoadModule('/src/ui/PreviewFrame.tsx'); audioField = await server.ssrLoadModule('/src/fields/UIAudioField.tsx'); videoField = await server.ssrLoadModule('/src/fields/UIVideoField.tsx'); @@ -53,6 +61,112 @@ after(async () => { await server?.close(); }); +test('text and JSON output presentation preserves missing, primitive, structured and literal markup values', () => { + for (const [value, expected] of [ + [undefined, ''], + ['', ''], + [0, '0'], + [false, 'false'], + [null, 'null'], + ['हैलो ', 'हैलो '], + [['native text'], '[\n "native text"\n]'], + [{ message: 'text', values: [0, false] }, '{\n "message": "text",\n "values": [\n 0,\n false\n ]\n}'], + ]) { + const output = { id: 'text-output', displayType: 'text', value }; + assert.equal(outputText.outputText(output), expected); + const opener = outputText.textOutputViewerOpener(output, 'Recorded text', 'recorded.txt'); + assert.deepEqual(opener.items, [ + { id: 'text-output', kind: 'text', label: 'Text', text: expected, downloadName: 'recorded.txt' }, + ]); + assert.equal(mediaViewer.sanitizeMediaViewerItems(opener.items)[0].text, expected); + } + assert.equal( + outputText.outputTextType({ displayType: 'text', url: '/recorded.mp4', mediaItems: [{ displayType: 'image' }] }), + 'text', + ); + assert.equal(outputText.outputTextType({ displayType: 'json', mediaItems: [{ displayType: 'text' }] }), 'json'); + assert.equal(outputText.outputTextType({ displayType: 'unknown', mediaItems: [{ displayType: 'json' }] }), 'json'); + for (const displayType of ['image', 'image_collection', 'audio', 'video']) { + assert.equal(outputText.outputTextType({ displayType, mediaItems: [{ displayType: 'text' }] }), undefined); + } +}); + +test('Previous strip renders declared text and JSON as escaped content rather than media', () => { + for (const displayType of ['text', 'json']) { + const value = ''; + const markup = renderToStaticMarkup( + createElement(previewHistory.default, { + history: [ + { + id: `history-${displayType}`, + displayType, + value, + url: '/recorded.mp4', + nodeId: 'preview', + fieldKey: 'preview', + createdAt: 1, + }, + ], + }), + ); + assert.match(markup, /<img src=x onerror="window\.__previewXss=true">/); + assert.doesNotMatch(markup, /<(img|video|audio)\b/); + assert.match(markup, new RegExp(`${displayType === 'json' ? 'JSON' : 'Text'} from`)); + } +}); + +test('history parsing preserves explicit text and JSON null values before presentation', () => { + for (const displayType of ['text', 'json']) { + for (const value of [null, 0, false, '', { message: 'हैलो' }]) { + const record = outputContracts.coerceStudioOutput({ + id: 'parsed-output', + url: '/file?file=recorded.json', + displayType, + value, + }); + assert.deepEqual(record.value, value); + assert.equal(outputText.outputText(record), typeof value === 'string' ? value : JSON.stringify(value, null, 2)); + } + } + for (const displayType of ['image', 'image_collection', 'audio', 'video']) { + const record = outputContracts.coerceStudioOutput({ + id: 'declared-media', + url: '/recorded-media', + displayType, + value: null, + }); + assert.equal(record.value, null); + assert.equal(record.url, '/recorded-media'); + } + assert.equal(outputContracts.coerceStudioOutput({ id: 'legacy-image', url: '/recorded.png' }).value, '/recorded.png'); +}); + +test('Previous preserves explicit media families and ordered image collection thumbnails', () => { + for (const displayType of ['image', 'video', 'audio', 'image_collection']) { + const markup = renderToStaticMarkup( + createElement(previewHistory.default, { + history: [ + outputContracts.coerceStudioOutput({ + id: 'declared-media', + displayType, + url: '/file?file=recorded-media', + value: 'Wrong item text', + createdAt: 1, + mediaItems: [{ index: 0, displayType: 'text', url: '/file?file=wrong-text.txt' }], + }), + ], + }), + ); + assert.doesNotMatch(markup, /Wrong item text/); + if (displayType === 'audio') assert.match(markup, /Audio from/); + else { + assert.match(markup, displayType === 'video' ? / { const baseUrl = 'http://127.0.0.1:8088'; assert.equal( @@ -185,6 +299,44 @@ test('video field URL compaction removes invalid holes and arrow navigation resp assert.equal(mediaViewer.shouldIgnoreMediaViewerArrowTarget(null), false); }); +test('file-backed media previews encode backend paths and retain browser media URLs', () => { + for (const kind of ['audio', 'video']) { + for (const file of [ + '/home/media/clip #1.mp4', + String.raw`C:\media\clip #1.mp4`, + '@data/videos/clip.mp4', + 'clips/one.mov', + ]) { + assert.equal( + outputUtils.fileBackedMediaPreviewUrl(file, kind), + `http://127.0.0.1:5191/media/preview?file=${encodeURIComponent(file)}&media_kind=${kind}`, + ); + } + for (const value of [ + 'https://media.example/clip.mp4', + 'blob:http://127.0.0.1:5191/media', + 'data:audio/wav;base64,AAAA', + ]) { + assert.equal(outputUtils.fileBackedMediaPreviewUrl(value, kind), value); + } + for (const route of [ + '/cache/node/file/0', + '/file?file=%40data%2Fclip.mp4', + '/media/preview?file=one&media_kind=audio', + ]) { + assert.equal(outputUtils.fileBackedMediaPreviewUrl(route, kind), `http://127.0.0.1:5191${route}`); + } + assert.equal(outputUtils.fileBackedMediaPreviewUrl('', kind), ''); + assert.equal(outputUtils.fileBackedMediaPreviewUrl(' ', kind), ''); + assert.match( + outputUtils.fileBackedMediaPreviewUrl('javascript:alert(1)', kind), + /\/media\/preview\?file=javascript%3A/, + ); + } + const asset = '/template-gallery/runtime-inputs/assets/example.mp4'; + assert.equal(outputUtils.fileBackedMediaPreviewUrl(asset, 'video'), templateAssets.resolveTemplateAssetUrl(asset)); +}); + test('template defaults preview from the configured asset source after upload or refresh', () => { const bundledPath = '/workspace/MoDiff-client/public/template-gallery/runtime-inputs/assets/example.webp'; const imagePath = '/template-gallery/runtime-inputs/assets/example.webp'; @@ -197,6 +349,31 @@ test('template defaults preview from the configured asset source after upload or assert.equal(outputUtils.bundledPublicAssetUrl('/workspace/MoDiff/data/images/user.webp'), null); }); +test('reviewed video sources use their playable derivative and keep the original for download and execution', () => { + const urls = (source, selectedFile) => + templateInputPreview.videoPlaybackUrls(source, 'http://127.0.0.1:5191', selectedFile); + const file = '@data/videos/ltx_video_video_to_video.source_video.mp4'; + const original = templateAssets.resolveTemplateAssetUrl( + '/template-gallery/runtime-inputs/assets/233d1b3a123fceb4f3b68d2d3a9f5b4129627073b8235fe7248ae6ebdeecb554.mp4', + ); + const playable = templateAssets.resolveTemplateAssetUrl( + '/template-gallery/inputs/ltx_video_video_to_video.before.mp4', + ); + assert.equal(outputUtils.fileBackedMediaPreviewUrl(file, 'video'), original); + const localPreview = (file) => + 'http://127.0.0.1:5191/media/preview?file=' + encodeURIComponent(file) + '&media_kind=video'; + const upload = '@data/videos/ltx_video_video_to_video.source_video_aB6-22.mp4'; + assert.deepEqual(urls(original, upload), [playable, original, localPreview(upload)]); + assert.deepEqual(urls(original), [playable, original, localPreview(file)]); + const mask = '@data/videos/wan_vace_outpaint_reframe.mask_video.mp4'; + const maskOriginal = outputUtils.fileBackedMediaPreviewUrl(mask, 'video'); + assert.deepEqual(urls(maskOriginal), [maskOriginal, localPreview(mask)]); + const remote = 'https://example.com/ltx_video_video_to_video.source_video.mp4'; + assert.deepEqual(urls(remote), [remote]); + assert.equal(outputUtils.fileBackedMediaPreviewUrl(remote, 'video'), remote); + assert.deepEqual(urls(original, remote), [playable, original, localPreview(file)]); +}); + test('embedded media frames opt out of graph drag, pan, and wheel capture', () => { const markup = renderToStaticMarkup( createElement(previewFrame.PreviewMediaFrame, { kind: 'audio' }, createElement('audio', { controls: true })), @@ -223,7 +400,7 @@ test('node audio controls retain a usable width and expose MoDiff-owned actions' }), ); - assert.match(markup, /class="[^"]*min-w-80[^"]*"/); + assert.match(markup, /class="[^"]*w-full min-w-0 max-w-80[^"]*"/); assert.match(markup, /]*controlsList="nodownload noplaybackrate noremoteplayback"/); assert.match(markup, /aria-label="Audio actions"[^>]*class="[^"]*rounded-full[^"]*"/); }); @@ -413,3 +590,63 @@ test('runtime optimization contracts fail closed and documentation URLs allow on /^https:/, ); }); + +test('Gallery collection full-size previews retain recorded URL order and selected item identity', () => { + const urls = [ + '/file?file=%40data%2Fstudio%2Foutputs%2Flayer0.webp', + '/file?file=%40data%2Fstudio%2Foutputs%2Flayer1.webp', + '/file?file=%40data%2Fstudio%2Foutputs%2Flayer2.webp', + ]; + const opener = mediaViewer.outputImageLightboxOpener({ + url: urls[2], + displayType: 'image_collection', + mediaItems: urls.map((url, index) => ({ url, index: 2 - index })), + }); + assert.deepEqual( + opener.images, + urls.map((url) => 'http://127.0.0.1:5191' + url), + ); + assert.equal(opener.currentIndex, 2); + assert.equal(opener.dataType, 'url'); + assert.equal(opener.mimeType, null); +}); + +test('Gallery collection selection follows canonical URL filtering without admitting unsafe schemes', () => { + const urls = [ + 'javascript:alert(1)', + '/file?file=first.webp', + 'data:image/svg+xml,', + ' /file?file=selected.webp ', + 'file:///tmp/untrusted.png', + 'blob:http://127.0.0.1:5191/untrusted', + 'data:text/html,', + 'data:image/png;base64,AAAA', + ]; + const opener = mediaViewer.outputImageLightboxOpener({ + url: ' /file?file=selected.webp ', + displayType: 'image_collection', + mediaItems: urls.map((url, index) => ({ url, index })), + }); + assert.deepEqual(opener.images, [ + 'http://127.0.0.1:5191/file?file=first.webp', + 'http://127.0.0.1:5191/file?file=selected.webp', + 'data:image/png;base64,AAAA', + ]); + assert.equal(opener.currentIndex, 1); +}); + +test('Gallery single images and empty collections retain the ordinary one-image fallback', () => { + const url = '/file?file=single.webp'; + for (const output of [ + { url, displayType: 'image', mediaItems: [{ url: '/file?file=other.webp', index: 0 }] }, + { url, displayType: 'image_collection', mediaItems: [] }, + { url, displayType: 'image_collection' }, + ]) { + assert.deepEqual(mediaViewer.outputImageLightboxOpener(output), { + images: ['http://127.0.0.1:5191/file?file=single.webp'], + currentIndex: 0, + dataType: 'url', + mimeType: null, + }); + } +}); diff --git a/scripts/model-setup-adapter-authority.test.mjs b/scripts/model-setup-adapter-authority.test.mjs new file mode 100644 index 00000000..ba5e3041 --- /dev/null +++ b/scripts/model-setup-adapter-authority.test.mjs @@ -0,0 +1,2046 @@ +import assert from 'node:assert/strict'; +import { execFileSync } from 'node:child_process'; +import path from 'node:path'; +import { after, before, test } from 'node:test'; +import { createServer } from 'vite'; + +let server, + adapters, + groups, + fixture, + authority, + cases, + flowStore, + runtimeProfiles, + studioStore, + transactions, + captureContext; +const integratedImageStageIds = [ + 'flux_fill_inpaint', + 'flux_control_canny', + 'flux_fill_outpaint', + 'flux_depth_control', + 'flux_redux_edit', + 'flux_redux_multi_reference', +]; +const curatedFluxIds = [ + 'flux_lora_cinematic_octane_3d', + 'flux_lora_ghibli_story', + 'flux_lora_oil_painting', + 'flux_lora_film_noir', + 'flux_lora_retro_comic', + 'flux_lora_watercolor', + 'flux_lora_paper_cutout', + 'flux_lora_photoreal_documentary', +]; +before(async () => { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, value), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { dispatchEvent: () => true, location: { origin: 'http://127.0.0.1:5191' }, localStorage }; + server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + adapters = await server.ssrLoadModule('/src/workflow/modelSetupAdapters.ts'); + runtimeProfiles = await server.ssrLoadModule('/src/studio/optionalRuntimes.ts'); + groups = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const { STUDIO_TEMPLATES } = await server.ssrLoadModule('/src/studio/templates.ts'); + const { DEFAULT_STUDIO_FORM } = await server.ssrLoadModule('/src/studio/modelProfiles.ts'); + const { getTemplateLockedSettings } = await server.ssrLoadModule('/src/studio/templateExactness.ts'); + const { createTemplateOperationGraph } = await server.ssrLoadModule('/src/studio/templateOperationWorkflow.ts'); + const { createOperationStarter } = await server.ssrLoadModule('/src/workflow/operationAuthoring.ts'); + const { parseOperationStarter } = await server.ssrLoadModule('/src/workflow/operationStarterRequest.ts'); + const { parseOperationContracts } = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + const { parsePipelineSupport } = await server.ssrLoadModule('/src/workflow/operationCatalog.ts'); + const { parseStudioModelCapabilities } = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); + const { useNodesStore } = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); + ({ useFlowStore: flowStore } = await server.ssrLoadModule('/src/stores/useFlowStore.ts')); + ({ useStudioStore: studioStore, captureWorkflowOperationContext: captureContext } = await server.ssrLoadModule( + '/src/stores/useStudioStore.ts', + )); + transactions = await server.ssrLoadModule('/src/workflow/operationGraphTransaction.ts'); + const ids = [ + 'z_image_quick_concept', + 'flux_schnell_text_to_image', + 'flux_krea_text_to_image', + ...editPolicySelections.map((selection) => selection.id), + 'qwen_text_rendering', + 'cosmos3_super_text_to_image', + ...integratedImageStageIds, + 'qwen_outpaint_draft', + ...curatedFluxIds, + ]; + const templates = ids.map((id) => { + const template = STUDIO_TEMPLATES.find((item) => item.id === id); + assert.ok(template?.executionSelection, id); + return template; + }); + const ddpm = { + id: 'ddpm-negative', + selection: { + pipelineClass: 'DDPMPipeline', + task: 'unconditional_image', + executionProfileId: 'ddpm-cifar10:direct', + }, + }; + const qwenDirect = { + id: 'qwen-direct', + selection: { + pipelineClass: 'QwenImagePipeline', + task: 'text_to_image', + executionProfileId: 'qwen-image:t2i-direct', + }, + }; + const backend = path.resolve('../MoDiff'); + const python = + process.env.MODIFF_BACKEND_PYTHON || + path.join(backend, '.venv', process.platform === 'win32' ? 'Scripts/python.exe' : 'bin/python'); + fixture = JSON.parse( + execFileSync(python, [path.resolve('scripts/template-operation-fixtures.py')], { + cwd: backend, + encoding: 'utf8', + maxBuffer: 64 * 1024 * 1024, + input: JSON.stringify([ + ...templates.map((template) => ({ id: template.id, selection: template.executionSelection })), + ddpm, + qwenDirect, + ...editControlSelections, + ]), + }), + ); + const payload = fixture.publicPayload; + const operations = parseOperationContracts(payload.operationContracts, payload.operationContractSchemaVersion); + const parsed = parseStudioModelCapabilities(payload); + authority = { + nodesRegistry: fixture.registry, + studioModelCapabilities: parsed.capabilities, + studioModelCapabilitiesAuthoritative: parsed.authoritative, + studioExecutionSpecInvalid: false, + operationContracts: operations, + pipelineSupport: parsePipelineSupport(payload.pipelineSupport, payload.pipelineSupportSchemaVersion, operations), + discoveryRequests: { nodes: { status: 'success' }, capabilities: { status: 'success' } }, + }; + useNodesStore.setState({ nodesRegistry: fixture.registry }); + cases = new Map( + fixture.recipes.map((row) => { + const template = templates.find((item) => item.id === row.id); + const selection = + template?.executionSelection ?? + [ddpm, qwenDirect, ...editControlSelections].find((item) => item.id === row.id)?.selection; + assert.ok(selection, row.id); + const starter = parseOperationStarter( + row.starter, + selection.pipelineClass, + selection.task, + operations, + selection, + ); + const owner = row.starter.nodes.find((item) => item.operation.decomposition === 'loader').node; + const graph = template + ? createTemplateOperationGraph( + template, + { + ...DEFAULT_STUDIO_FORM, + ...getTemplateLockedSettings(template), + ...(editPolicySelections.some((selection) => selection.id === template.id) + ? { + referenceImages: Array.from( + { length: editPolicySelections.find((selection) => selection.id === template.id).referenceCount }, + (_, index) => `@data/images/metadata-only-reference-${index + 1}.png`, + ), + } + : {}), + ...(integratedImageStageIds.includes(template.id) + ? { + referenceImages: ['@data/images/stage-source.png', '@data/images/stage-reference.png'], + maskImage: '@data/images/stage-mask.png', + controlImage: '@data/images/stage-control.png', + } + : {}), + device: owner.params.device.value ?? owner.params.device.default, + autoOffload: false, + offloadMode: 'none', + }, + starter, + fixture.registry, + row.spec, + parsed.capabilities.find((item) => item.modelType === template.modelType), + ) + : groups.groupNewOperationGraph(createOperationStarter(starter, { x: 0, y: 0 })); + const root = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'setup'); + assert.ok(root, row.id); + return [row.id, { graph, root }]; + }), + ); +}); + +test('a backend-defined model can explicitly decline LoRA without granting generic adapter execution', () => { + const { graph, root } = cases.get('z_image_quick_concept'); + const chain = adapters.modelSetupAdapterChain(graph, root.id); + const capability = authority.studioModelCapabilities.find((row) => row.modelType === 'ZImageModularPipeline'); + const profile = capability.executionProfiles.find( + (row) => + row.default_repo === chain.owner.data.params.repo_id.value.value && + row.pipeline_class === chain.owner.data.params.model_type.value, + ); + const descriptor = { + pipeline: profile.pipeline_class, + profileId: profile.id, + repo: profile.default_repo, + label: 'Backend image model', + supportsLora: false, + }; + const generic = { ...authority, studioModelCapabilities: [], workflowModelDescriptors: [descriptor] }; + assert.match(adapters.modelSetupAdapterAddUnavailable(chain, generic), /does not support LoRA/u); + descriptor.supportsLora = true; + assert.match(adapters.modelSetupAdapterAddUnavailable(chain, generic), /unavailable or ambiguous/u); +}); + +test('all eight curated FLUX templates retain their original adapters while the exact selected policy authorizes editing', async (t) => { + const capability = authority.studioModelCapabilities.find((item) => item.modelType === 'FluxModularPipeline'); + assert.equal(capability.supportsLora, false, 'The selected policy must not promote aggregate capability flags.'); + const profile = capability.executionProfiles.find((item) => item.id === 'flux-dev:modular'); + assert.equal(profile.adapterAuthoring.maxOwnedAdapters, 32); + for (const id of curatedFluxIds) + await t.test(id, () => { + const { graph, root } = cases.get(id); + const original = structuredClone(graph); + const chain = adapters.modelSetupAdapterChain(graph, root.id); + assert.equal(adapters.modelSetupAdapterAddUnavailable(chain, authority), null); + assert.equal(adapters.modelSetupAdapterEditUnavailable(chain, authority), null); + assert.equal(chain.adapters.length, id === curatedFluxIds[0] ? 2 : 1); + assert.deepEqual(graph.nodes.map((node) => node.data.label).sort(), [ + 'Encode Inputs', + 'Generate', + 'Image Output', + 'Model Setup', + ]); + const next = add(graph, root); + const changed = adapters.modelSetupAdapterChain(next, root.id); + assert.deepEqual( + changed.adapters.slice(0, -1).map((node) => node.data.params), + chain.adapters.map((node) => node.data.params), + ); + assert.deepEqual(changed.owner.data.params, chain.owner.data.params); + const restored = adapters.planModelSetupAdapterEdit(next, root.id, { + kind: 'remove', + nodeId: changed.adapters.at(-1).id, + }); + const exportApi = (sourceGraph) => + flowStore.getState().exportGraph('metadata-curated-policy', undefined, { sourceGraph, randomizeSeeds: false }); + assert.deepEqual( + exportApi(restored), + exportApi(graph), + 'Remove restores all original executable values and leaf wires.', + ); + assert.deepEqual(graph, original); + }); +}); +after(async () => server?.close()); + +const add = (graph, root, metadata = authority, values = {}) => { + const chain = adapters.modelSetupAdapterChain(graph, root.id); + return adapters.planModelSetupAdapterEdit( + graph, + root.id, + { + kind: 'add', + registry: metadata?.nodesRegistry ?? fixture.registry, + values: { + [chain.native ? 'model' : 'adapter_path']: { source: 'local', value: 'metadata-only.safetensors' }, + ...(!chain.native ? { replace_existing: false } : {}), + ...values, + }, + }, + metadata, + ); +}; + +const selectedFluxProfile = () => + authority.studioModelCapabilities + .flatMap((item) => item.executionProfiles ?? []) + .find((item) => item.id === 'flux-dev:modular'); +const aliasSelections = [ + { id: 'flux_schnell_text_to_image', profileId: 'flux-schnell:modular', embeddedGuidance: 0, guiderEnabled: false }, + { id: 'flux_krea_text_to_image', profileId: 'flux-krea:modular', embeddedGuidance: 3.5, guiderEnabled: true }, +]; +test('actual selected alias policies authorize their own native image adapter Add', async (t) => { + for (const { id, profileId, embeddedGuidance, guiderEnabled } of aliasSelections) + await t.test(id, () => { + const { graph, root } = cases.get(id); + const before = structuredClone(graph); + const next = add(add(graph, root, authority, { scale: '0.8' }), root, authority, { scale: '0.35' }); + const { profile, policy } = publishedAliasPolicy(profileId); + const chain = adapters.modelSetupAdapterChain(next, root.id); + assert.equal(chain.adapters.length, 2); + assert.equal(chain.owner.data.params.model_type.value, profile.pipeline_class); + assert.deepEqual(chain.owner.data.params.repo_id.value, { source: 'hub', value: profile.default_repo }); + assert.ok( + policy.repositoryRevisions.some( + (pair) => pair.repo === profile.default_repo && pair.revision === chain.owner.data.params.revision.value, + ), + 'The current selected owner must match its own actual reviewed pair.', + ); + assert.deepEqual(policy.tasks, ['text_to_image']); + assert.equal(policy.maxOwnedAdapters, 32); + assert.equal(adapters.modelSetupAdapterEditUnavailable(chain, authority), null); + assert.equal(adapters.modelSetupAdapterAddUnavailable(chain, authority), null); + assert.deepEqual(chain.owner.data.params, adapters.modelSetupAdapterChain(graph, root.id).owner.data.params); + const flat = groups.unpackVisualOperationGroups(next).graph; + const guider = flat.nodes.find((node) => node.data.action === 'Guider'); + assert.equal(guider.data.params.enabled.value, guiderEnabled); + assert.equal(guider.data.params.use_original_formulation.value, false); + assert.equal( + flat.nodes.find((node) => node.data.action === 'Denoise').data.params.guidance_scale.value, + embeddedGuidance, + ); + assert.equal( + authority.studioModelCapabilities.find((item) => item.modelType === profile.pipeline_class).supportsLora, + false, + 'Authoring permission must not promote canonical runtime capability.', + ); + const moved = adapters.planModelSetupAdapterEdit( + next, + root.id, + { kind: 'move', nodeId: chain.adapters[1].id, offset: -1 }, + authority, + ); + assert.deepEqual( + adapters.modelSetupAdapterChain(moved, root.id).adapters.map((node) => node.data.params.scale.value), + ['0.35', '0.8'], + ); + let removed = moved; + for (const adapter of adapters.modelSetupAdapterChain(moved, root.id).adapters) + removed = adapters.planModelSetupAdapterEdit(removed, root.id, { kind: 'remove', nodeId: adapter.id }); + const exportApi = (sourceGraph) => + flowStore + .getState() + .exportGraph('metadata-own-alias-policy', undefined, { sourceGraph, randomizeSeeds: false }); + assert.deepEqual( + exportApi(removed), + exportApi(graph), + 'Removing owned rows restores all creator values and wires.', + ); + assert.deepEqual(graph, before); + }); +}); +const publishedAliasPolicy = (profileId) => { + const matches = authority.studioModelCapabilities + .flatMap((item) => item.executionProfiles ?? []) + .filter((item) => item.id === profileId); + assert.equal(matches.length, 1, 'The selected alias profile must have unique actual publication.'); + const profile = matches[0]; + assert.ok( + Object.hasOwn(profile, 'adapterAuthoring'), + 'Permission must come from the actual selected backend profile.', + ); + const policy = runtimeProfiles.parseImageAdapterAuthoringPolicy( + profile.adapterAuthoring, + profile.modes, + profile.repository_revisions, + profile, + ); + assert.deepEqual(policy, profile.adapterAuthoring); + return { profile, policy }; +}; +const withPolicy = (id, policy, { omit = false, supportsLora } = {}) => ({ + ...authority, + studioModelCapabilities: authority.studioModelCapabilities.map((item) => ({ + ...item, + ...(supportsLora === undefined ? {} : { supportsLora }), + executionProfiles: item.executionProfiles?.map((profile) => { + if (profile.id !== id) return profile; + const copy = structuredClone(profile); + if (omit) delete copy.adapterAuthoring; + else copy.adapterAuthoring = policy; + return copy; + }), + })), +}); + +test('own alias policies reject borrowed, missing, stale and ambiguous metadata without graph mutation', async (t) => { + for (const { id, profileId } of aliasSelections) { + const { graph, root } = cases.get(id); + const { policy } = publishedAliasPolicy(profileId); + const foreignId = aliasSelections.find((item) => item.profileId !== profileId).profileId; + const foreignPolicy = publishedAliasPolicy(foreignId).policy; + const variants = { + absent: () => withPolicy(profileId, undefined, { omit: true }), + malformedPresent: () => withPolicy(profileId, { ...policy, maxOwnedAdapters: 0 }), + borrowedDense: () => withPolicy(profileId, selectedFluxProfile().adapterAuthoring), + borrowedAlias: () => withPolicy(profileId, foreignPolicy), + wrongTask: () => withPolicy(profileId, { ...policy, tasks: ['image_to_image'] }), + pending: () => ({ + ...authority, + discoveryRequests: { ...authority.discoveryRequests, capabilities: { status: 'loading' } }, + }), + staleOperations: () => ({ ...authority, operationContracts: [] }), + staleSupport: () => ({ ...authority, pipelineSupport: [] }), + ambiguousProfile: () => ({ + ...authority, + studioModelCapabilities: authority.studioModelCapabilities.map((capability) => ({ + ...capability, + executionProfiles: capability.executionProfiles?.flatMap((profile) => + profile.id === profileId ? [profile, structuredClone(profile)] : [profile], + ), + })), + }), + }; + for (const [name, metadata] of Object.entries(variants)) + await t.test(`${id}/${name}`, () => { + const before = structuredClone(graph); + assert.throws(() => add(graph, root, metadata()), /policy|LoRA|profile|capabilities/i); + assert.deepEqual(graph, before); + }); + } +}); + +test('own alias policies require literal current repository, immutable pin, workflow and task selectors', async (t) => { + for (const { id, profileId } of aliasSelections) { + const { graph, root } = cases.get(id); + publishedAliasPolicy(profileId); + for (const [field, selected] of [ + ['repo_id', { source: 'hub', value: 'black-forest-labs/FLUX.1-dev' }], + ['revision', 'a'.repeat(40)], + ['workflow_id', 'image_to_image'], + ['model_type', 'UnknownPipeline'], + ]) + await t.test(`${id}/changed ${field}`, () => { + const unpacked = groups.unpackVisualOperationGroups(graph); + const owner = adapters.modelSetupAdapterChain(graph, root.id).owner; + unpacked.graph.nodes.find((node) => node.id === owner.id).data.params[field].value = selected; + const changed = groups.restoreVisualOperationGroups(unpacked.graph, unpacked); + const before = structuredClone(changed); + assert.throws(() => add(changed, root), /policy|LoRA|profile|revision|selector/i); + assert.deepEqual(changed, before); + }); + for (const field of ['model_type', 'repo_id', 'revision', 'workflow_id']) + await t.test(`${id}/connected ${field}`, () => { + const unpacked = groups.unpackVisualOperationGroups(graph); + const owner = adapters.modelSetupAdapterChain(graph, root.id).owner; + unpacked.graph.nodes.push({ + id: `alias-supplier-${field}`, + type: 'custom', + position: { x: -400, y: 0 }, + data: { + module: 'modules.Test', + action: 'Selector', + params: { output: { type: 'string', display: 'output' } }, + }, + }); + unpacked.graph.edges.push({ + id: `alias-selector-${field}`, + source: `alias-supplier-${field}`, + sourceHandle: 'output', + target: owner.id, + targetHandle: field, + }); + const connected = groups.restoreVisualOperationGroups(unpacked.graph, unpacked); + const before = structuredClone(connected); + assert.throws(() => add(connected, root), /policy|LoRA|profile|selector|reviewed image model/i); + assert.deepEqual(connected, before); + }); + } +}); + +test('selected image adapter policies reject malformed keys, bounds, tasks and foreign immutable pairs', async (t) => { + const profile = selectedFluxProfile(); + const policy = profile.adapterAuthoring; + const parse = (value, selected = profile) => + runtimeProfiles.parseOptionalRuntimeExecutionProfiles( + [{ ...structuredClone(selected), adapterAuthoring: value }], + undefined, + (mode) => selected.modes.includes(mode), + )[0].adapterAuthoring; + assert.deepEqual(parse(policy), policy, 'The positive policy is actual current backend publication.'); + const inherited = Object.create(policy); + const variants = { + undefined, + null: null, + array: [], + empty: {}, + inherited, + extra: { ...policy, grant: true }, + schema: { ...policy, schemaVersion: 2 }, + audio: { ...policy, mediaKind: 'audio' }, + node: { ...policy, adapterNodeKey: 'modules.DiffusersImage.LoadAdapter' }, + tasksEmpty: { ...policy, tasks: [] }, + tasksRepeated: { ...policy, tasks: ['text_to_image', 'text_to_image'] }, + taskForeign: { ...policy, tasks: ['edit_image'] }, + tasksOversized: { ...policy, tasks: Array(33).fill('text_to_image') }, + taskNonstring: { ...policy, tasks: [123] }, + maxZero: { ...policy, maxOwnedAdapters: 0 }, + maxLarge: { ...policy, maxOwnedAdapters: 33 }, + maxFraction: { ...policy, maxOwnedAdapters: 2.5 }, + maxString: { ...policy, maxOwnedAdapters: '32' }, + maxNonfinite: { ...policy, maxOwnedAdapters: Infinity }, + pairsEmpty: { ...policy, repositoryRevisions: [] }, + pairsNull: { ...policy, repositoryRevisions: null }, + pairsRepeated: { ...policy, repositoryRevisions: [...policy.repositoryRevisions, ...policy.repositoryRevisions] }, + pairsOversized: { ...policy, repositoryRevisions: Array(33).fill(policy.repositoryRevisions[0]) }, + pairExtra: { ...policy, repositoryRevisions: [{ ...policy.repositoryRevisions[0], permission: true }] }, + pairForeign: { ...policy, repositoryRevisions: [{ ...policy.repositoryRevisions[0], repo: 'foreign/model' }] }, + pairUnreviewed: { + ...policy, + repositoryRevisions: [{ ...policy.repositoryRevisions[0], revision: 'a'.repeat(40) }], + }, + pairMutable: { ...policy, repositoryRevisions: [{ ...policy.repositoryRevisions[0], revision: 'main' }] }, + pairUppercase: { + ...policy, + repositoryRevisions: [ + { ...policy.repositoryRevisions[0], revision: policy.repositoryRevisions[0].revision.toUpperCase() }, + ], + }, + }; + for (const [name, value] of Object.entries(variants)) + await t.test(name, () => { + assert.throws(() => parse(value), /runtime contract/i); + const { graph, root } = cases.get(curatedFluxIds[0]); + const before = structuredClone(graph); + assert.throws( + () => add(graph, root, withPolicy(profile.id, value, { supportsLora: true })), + /policy.*invalid/i, + 'A malformed present policy cannot fall back to broad true capability flags.', + ); + assert.deepEqual(graph, before); + }); + const foreignProfile = authority.studioModelCapabilities + .flatMap((item) => item.executionProfiles ?? []) + .find((item) => item.id === 'flux-schnell:modular'); + assert.throws(() => parse(policy, foreignProfile), /runtime contract/i); + const { graph, root } = cases.get('flux_schnell_text_to_image'); + assert.throws(() => add(graph, root, withPolicy(foreignProfile.id, policy)), /policy|authorize/i); +}); + +test('selected policy removal retains false-flag fallback and cannot authorize another repository, revision or task', async (t) => { + const profile = selectedFluxProfile(); + const { graph, root } = cases.get(curatedFluxIds[0]); + assert.throws(() => add(graph, root, withPolicy(profile.id, undefined, { omit: true })), /does not support LoRA/); + for (const [field, value] of [ + ['repo_id', { source: 'hub', value: 'black-forest-labs/FLUX.1-dev-fp8' }], + ['repo_id', { source: 'hub', value: 'black-forest-labs/FLUX.1-Krea-dev' }], + ['revision', 'a'.repeat(40)], + ['workflow_id', 'image_to_image'], + ]) + await t.test(`${field}:${JSON.stringify(value)}`, () => { + const unpacked = groups.unpackVisualOperationGroups(graph); + const owner = adapters.modelSetupAdapterChain(graph, root.id).owner; + assert.ok(owner.data.params[field], 'The actual owner must declare this selector.'); + unpacked.graph.nodes.find((node) => node.id === owner.id).data.params[field].value = value; + const changed = groups.restoreVisualOperationGroups(unpacked.graph, unpacked); + const before = structuredClone(changed); + assert.throws(() => add(changed, root), /profile|revision|policy|task|selector|LoRA/i); + assert.deepEqual(changed, before); + }); +}); + +test('selected policy does not grant authoring through duplicated, stale or connected authority', async (t) => { + const { graph, root } = cases.get(curatedFluxIds[0]); + const variants = { + duplicateCapability: { + ...authority, + studioModelCapabilities: [ + ...authority.studioModelCapabilities, + structuredClone(authority.studioModelCapabilities.find((item) => item.modelType === 'FluxModularPipeline')), + ], + }, + duplicateProfile: { + ...authority, + studioModelCapabilities: authority.studioModelCapabilities.map((item) => ({ + ...item, + executionProfiles: item.executionProfiles?.flatMap((profile) => + profile.id === selectedFluxProfile().id ? [profile, structuredClone(profile)] : [profile], + ), + })), + }, + duplicateOperation: { + ...authority, + operationContracts: [ + ...authority.operationContracts, + authority.operationContracts.find( + (item) => + item.pipelineClass === 'FluxModularPipeline' && item.task === 'text_to_image' && item.nodeType === 'loader', + ), + ], + }, + staleProfileTask: { + ...authority, + pipelineSupport: authority.pipelineSupport.map((item) => ({ + ...item, + tasks: item.tasks.map((task) => ({ + ...task, + executionProfileIds: task.executionProfileIds.filter((id) => id !== selectedFluxProfile().id), + })), + })), + }, + pending: { + ...authority, + discoveryRequests: { ...authority.discoveryRequests, capabilities: { status: 'loading' } }, + }, + }; + for (const [name, metadata] of Object.entries(variants)) + await t.test(name, () => { + const before = structuredClone(graph); + assert.throws(() => add(graph, root, metadata), /profile|capabilities/i); + assert.deepEqual(graph, before); + }); + await t.test('connected workflow selector', () => { + const unpacked = groups.unpackVisualOperationGroups(graph); + const owner = adapters.modelSetupAdapterChain(graph, root.id).owner; + unpacked.graph.nodes.push({ + id: 'external-workflow-selector', + type: 'custom', + position: { x: -500, y: 0 }, + data: { module: 'modules.Text', action: 'Text', params: { output: { type: 'string', display: 'output' } } }, + }); + unpacked.graph.edges.push({ + id: 'external-workflow-wire', + source: 'external-workflow-selector', + sourceHandle: 'output', + target: owner.id, + targetHandle: 'workflow_id', + }); + const connected = groups.restoreVisualOperationGroups(unpacked.graph, unpacked); + const before = structuredClone(connected); + assert.throws(() => add(connected, root), /policy|selector|task/i); + assert.deepEqual(connected, before); + }); +}); + +test('a full selected 32-adapter setup supports Move and persisted export but refuses a 33rd draft or commit', () => { + const { graph, root } = cases.get(curatedFluxIds[1]); + let full = graph; + while (adapters.modelSetupAdapterChain(full, root.id).adapters.length < 32) full = add(full, root); + const original = structuredClone(full); + const chain = adapters.modelSetupAdapterChain(full, root.id); + assert.equal(adapters.modelSetupAdapterEditUnavailable(chain, authority), null); + assert.match(adapters.modelSetupAdapterAddUnavailable(chain, authority), /at most 32/); + assert.throws(() => add(full, root), /at most 32/); + assert.deepEqual(full, original); + const moved = adapters.planModelSetupAdapterEdit( + full, + root.id, + { kind: 'move', nodeId: chain.adapters[31].id, offset: -1 }, + authority, + ); + const order = chain.adapters.map((node) => node.id); + [order[30], order[31]] = [order[31], order[30]]; + assert.deepEqual( + adapters.modelSetupAdapterChain(moved, root.id).adapters.map((node) => node.id), + order, + ); + const savedId = studioStore.getState().createWorkflowTab('32 selected adapters', { + nodes: full.nodes, + edges: full.edges, + viewport: { x: 0, y: 0, zoom: 1 }, + }); + flowStore.getState().resetHistory(); + const current = flowStore.getState().toObject(); + const committedMove = adapters.planModelSetupAdapterEdit( + current, + root.id, + { kind: 'move', nodeId: chain.adapters[31].id, offset: -1 }, + authority, + ); + transactions.commitOperationGraph( + committedMove, + captureContext(), + transactions.operationGraphSignature(current), + 'move model adapter', + ); + assert.equal(flowStore.getState().historyPast.length, 1); + flowStore.getState().undo(); + assert.deepEqual( + adapters.modelSetupAdapterChain(flowStore.getState().toObject(), root.id).adapters.map((node) => node.id), + chain.adapters.map((node) => node.id), + ); + flowStore.getState().redo(); + studioStore.getState().saveActiveWorkflowTab(true); + studioStore.getState().createWorkflowTab('temporary blank'); + studioStore.getState().switchWorkflowTab(savedId); + const restored = flowStore.getState().toObject(); + const restoredChain = adapters.modelSetupAdapterChain(restored, root.id); + assert.deepEqual( + restoredChain.adapters.map((node) => node.id), + order, + ); + assert.deepEqual( + restoredChain.adapters.map((node) => node.data.params.model.value), + adapters.modelSetupAdapterChain(moved, root.id).adapters.map((node) => node.data.params.model.value), + ); + const api = flowStore + .getState() + .exportGraph('metadata-selected-policy', undefined, { sourceGraph: restored, randomizeSeeds: false }); + assert.equal( + Object.values(api.nodes).filter((node) => `${node.module}.${node.action}` === profileAdapterKey()).length, + 32, + ); + const withdrawn = withPolicy(selectedFluxProfile().id, undefined, { omit: true }); + assert.match(adapters.modelSetupAdapterEditUnavailable(restoredChain, withdrawn), /does not support LoRA/); + const removed = adapters.planModelSetupAdapterEdit(restored, root.id, { + kind: 'remove', + nodeId: restoredChain.adapters[0].id, + }); + assert.equal(adapters.modelSetupAdapterChain(removed, root.id).adapters.length, 31); + assert.deepEqual( + adapters.modelSetupAdapterChain(removed, root.id).owner.data.params, + restoredChain.owner.data.params, + ); +}); + +const profileAdapterKey = () => selectedFluxProfile().adapterAuthoring.adapterNodeKey; + +test('policy duplicate repository names are case-insensitive while exact selected spelling remains unchanged', () => { + const profile = selectedFluxProfile(); + const policy = profile.adapterAuthoring; + const pair = policy.repositoryRevisions[0]; + const upper = { ...pair, repo: pair.repo.toUpperCase() }; + assert.throws( + () => + runtimeProfiles.parseImageAdapterAuthoringPolicy( + { ...policy, repositoryRevisions: [pair, upper] }, + profile.modes, + [pair, upper], + profile, + ), + /runtime contract/i, + ); + assert.deepEqual( + runtimeProfiles.parseImageAdapterAuthoringPolicy(policy, profile.modes, profile.repository_revisions, profile) + .repositoryRevisions, + [pair], + ); + assert.throws( + () => + runtimeProfiles.parseImageAdapterAuthoringPolicy( + { ...policy, repositoryRevisions: [upper] }, + profile.modes, + [pair], + profile, + ), + /runtime contract/i, + 'Duplicate detection must not normalize authority spelling.', + ); +}); + +test('policy task grammar rejects mode-declared runtime IDs that are not backend task identifiers', () => { + const profile = selectedFluxProfile(); + for (const task of ['1task', 'image.task', 'image-task', 'x'.repeat(65), 'text_to_image\n']) + assert.throws( + () => + runtimeProfiles.parseImageAdapterAuthoringPolicy( + { ...profile.adapterAuthoring, tasks: [task] }, + [task], + profile.repository_revisions, + profile, + ), + /runtime contract/i, + task, + ); +}); + +test('policy repositories retain the backend bounded identifier grammar even when a parent declares the value', () => { + const profile = selectedFluxProfile(); + for (const repo of [ + '-owner/model', + 'owner/.model', + 'x'.repeat(97) + '/model', + 'owner/' + 'x'.repeat(97), + 'owner/model\n', + ]) { + const pair = { repo, revision: profile.adapterAuthoring.repositoryRevisions[0].revision }; + assert.throws( + () => + runtimeProfiles.parseImageAdapterAuthoringPolicy( + { ...profile.adapterAuthoring, repositoryRevisions: [pair] }, + profile.modes, + [pair], + profile, + ), + /runtime contract/i, + repo, + ); + } +}); + +test('absent selected policy keeps unsupported Cosmos and DDPM owners from changing the saved graph', async (t) => { + for (const id of ['cosmos3_super_text_to_image', 'ddpm-negative']) + await t.test(id, () => { + const { graph, root } = cases.get(id); + const before = structuredClone(graph); + const metadata = + id === 'cosmos3_super_text_to_image' + ? withPolicy('cosmos3-super-text-to-image:official-modular-workflow', undefined, { omit: true }) + : authority; + assert.throws(() => add(graph, root, metadata), /LoRA.*support|support.*LoRA/i); + assert.deepEqual(graph, before); + }); +}); + +test('current supported native and direct image owners authorize actual registered adapter transport', async (t) => { + for (const id of ['z_image_quick_concept', 'qwen_text_rendering', 'flux_fill_outpaint', 'qwen-direct']) + await t.test(id, () => { + const { graph, root } = cases.get(id); + const chain = adapters.modelSetupAdapterChain(graph, root.id); + const field = chain.native ? 'model' : 'adapter_path'; + const next = adapters.planModelSetupAdapterEdit( + graph, + root.id, + { + kind: 'add', + registry: fixture.registry, + values: { [field]: { source: 'local', value: 'metadata-only.safetensors' } }, + }, + authority, + ); + assert.equal(adapters.modelSetupAdapterChain(next, root.id).adapters.length, 1); + }); +}); + +test('pending, stale, unknown and mismatched selected metadata refuses Add without changing existing values', async (t) => { + const { graph, root } = cases.get('z_image_quick_concept'); + const variants = { + missing: () => null, + pendingCapabilities: () => ({ + ...authority, + discoveryRequests: { ...authority.discoveryRequests, capabilities: { status: 'loading' } }, + }), + pendingRegistry: () => ({ + ...authority, + discoveryRequests: { ...authority.discoveryRequests, nodes: { status: 'loading' } }, + }), + failedCapabilities: () => ({ + ...authority, + discoveryRequests: { ...authority.discoveryRequests, capabilities: { status: 'error' } }, + }), + nonAuthoritative: () => ({ ...authority, studioModelCapabilitiesAuthoritative: false }), + invalidSpecification: () => ({ ...authority, studioExecutionSpecInvalid: true }), + unknownTask: () => ({ ...authority, pipelineSupport: [] }), + staleOperation: () => ({ ...authority, operationContracts: [] }), + missingRegistry: () => ({ ...authority, nodesRegistry: {} }), + staleProfile: () => ({ + ...authority, + studioModelCapabilities: authority.studioModelCapabilities.map((item) => ({ ...item, executionProfiles: [] })), + }), + missingSelectedPairs: () => ({ + ...authority, + studioModelCapabilities: authority.studioModelCapabilities.map((item) => ({ + ...item, + executionProfiles: item.executionProfiles?.map((profile) => ({ ...profile, repository_revisions: undefined })), + })), + }), + foreignRepositoryPair: () => ({ + ...authority, + studioModelCapabilities: authority.studioModelCapabilities.map((item) => ({ + ...item, + executionProfiles: item.executionProfiles?.map((profile) => ({ + ...profile, + repository_revisions: profile.repository_revisions?.map((pair) => ({ ...pair, repo: 'unreviewed/model' })), + })), + })), + }), + staleSelectedRevision: () => ({ + ...authority, + studioModelCapabilities: authority.studioModelCapabilities.map((item) => ({ + ...item, + executionProfiles: item.executionProfiles?.map((profile) => ({ + ...profile, + repository_revisions: profile.repository_revisions?.map((pair) => ({ ...pair, revision: 'b'.repeat(40) })), + })), + })), + }), + staleRegistrySocket: () => { + const nodesRegistry = structuredClone(authority.nodesRegistry); + nodesRegistry['modules.ModularDiffusers.Lora'].params.lora.type = 'image'; + return { ...authority, nodesRegistry }; + }, + }; + for (const [name, make] of Object.entries(variants)) + await t.test(name, () => { + const before = structuredClone(graph); + assert.throws(() => add(graph, root, make()), /LoRA|capabilities|profile/i); + assert.deepEqual(graph, before); + }); + for (const [name, value] of [ + ['model_type', 'UnknownPipeline'], + ['repo_id', { source: 'hub', value: 'unreviewed/model' }], + ['revision', 'b'.repeat(40)], + ]) + await t.test(name, () => { + const unpacked = groups.unpackVisualOperationGroups(graph); + const owner = adapters.modelSetupAdapterChain(graph, root.id).owner; + unpacked.graph.nodes.find((node) => node.id === owner.id).data.params[name].value = value; + const modified = groups.restoreVisualOperationGroups(unpacked.graph, unpacked); + const before = structuredClone(modified); + assert.throws(() => add(modified, root), /LoRA|capabilities|profile/i); + assert.deepEqual(modified, before); + }); + for (const field of ['model_type', 'repo_id', 'revision']) + await t.test(`connected ${field}`, () => { + const unpacked = groups.unpackVisualOperationGroups(graph); + const owner = adapters.modelSetupAdapterChain(graph, root.id).owner; + unpacked.graph.nodes.push({ + id: `supplier-${field}`, + type: 'custom', + position: { x: -400, y: 0 }, + data: { + module: 'modules.Test', + action: 'Selector', + params: { output: { type: 'string', display: 'output' } }, + }, + }); + unpacked.graph.edges.push({ + id: `selector-${field}`, + source: `supplier-${field}`, + sourceHandle: 'output', + target: owner.id, + targetHandle: field, + }); + const modified = groups.restoreVisualOperationGroups(unpacked.graph, unpacked); + const before = structuredClone(modified); + assert.throws(() => add(modified, root), /reviewed image model|LoRA|profile/i); + assert.deepEqual(modified, before); + }); + + await t.test('stale direct profile selection', () => { + const direct = cases.get('qwen-direct'); + const unpacked = groups.unpackVisualOperationGroups(direct.graph); + const owner = adapters.modelSetupAdapterChain(direct.graph, direct.root.id).owner; + unpacked.graph.nodes.find((node) => node.id === owner.id).data.params.execution_profile_id.value = 'old-profile'; + const modified = groups.restoreVisualOperationGroups(unpacked.graph, unpacked); + const before = structuredClone(modified); + assert.throws(() => add(modified, direct.root), /profile|capabilities/i); + assert.deepEqual(modified, before); + }); +}); + +test('an existing adapter remains inspectable and removable when current selected support is withdrawn', () => { + const { graph, root } = cases.get('z_image_quick_concept'); + const populated = add(graph, root); + const before = structuredClone(populated); + const withdrawn = { + ...authority, + studioModelCapabilities: authority.studioModelCapabilities.map((item) => ({ ...item, supportsLora: false })), + }; + const chain = adapters.modelSetupAdapterChain(populated, root.id); + assert.match(adapters.modelSetupAdapterAddUnavailable(chain, withdrawn), /does not support LoRA/); + assert.equal(chain.adapters.length, 1); + assert.throws(() => add(populated, root, withdrawn), /does not support LoRA/); + assert.throws( + () => + adapters.planModelSetupAdapterEdit( + populated, + root.id, + { kind: 'move', nodeId: chain.adapters[0].id, offset: 1 }, + withdrawn, + ), + /does not support LoRA/, + ); + assert.deepEqual(populated, before); + const removed = adapters.planModelSetupAdapterEdit(populated, root.id, { + kind: 'remove', + nodeId: chain.adapters[0].id, + }); + assert.equal(adapters.modelSetupAdapterChain(removed, root.id).adapters.length, 0); + assert.deepEqual(adapters.modelSetupAdapterChain(removed, root.id).owner.data.params, chain.owner.data.params); +}); + +test('actual direct image adapters retain their operation scope through ordered edits and reject shared suppliers', async (t) => { + for (const id of ['flux_fill_outpaint', 'qwen-direct']) + await t.test(id, () => { + const { graph, root } = cases.get(id); + const original = adapters.modelSetupAdapterChain(graph, root.id); + const one = add(graph, root); + const two = add(one, root); + const chain = adapters.modelSetupAdapterChain(two, root.id); + assert.equal(chain.adapters.length, 2); + assert.deepEqual(chain.owner.data.params, original.owner.data.params); + const moved = adapters.planModelSetupAdapterEdit( + two, + root.id, + { kind: 'move', nodeId: chain.adapters[1].id, offset: -1 }, + authority, + ); + const reordered = adapters.modelSetupAdapterChain(moved, root.id); + assert.deepEqual( + reordered.adapters.map((node) => node.id), + chain.adapters.map((node) => node.id).reverse(), + ); + let removed = moved; + for (const node of reordered.adapters) + removed = adapters.planModelSetupAdapterEdit(removed, root.id, { kind: 'remove', nodeId: node.id }); + assert.equal(adapters.modelSetupAdapterChain(removed, root.id).adapters.length, 0); + assert.deepEqual(adapters.modelSetupAdapterChain(removed, root.id).owner.data.params, original.owner.data.params); + + for (const kind of ['sharedOutput', 'competingInput']) { + const unpacked = groups.unpackVisualOperationGroups(one); + const existing = adapters.modelSetupAdapterChain(one, root.id).adapters[0]; + const duplicate = structuredClone(kind === 'sharedOutput' ? existing : original.owner); + duplicate.id = `extra-${kind}`; + unpacked.graph.nodes.push(duplicate); + unpacked.graph.edges.push({ + id: `extra-${kind}-wire`, + source: kind === 'sharedOutput' ? existing.id : duplicate.id, + sourceHandle: kind === 'sharedOutput' ? 'output' : 'pipeline', + target: kind === 'sharedOutput' ? duplicate.id : existing.id, + targetHandle: 'pipeline', + }); + for (const edge of unpacked.graph.edges.filter((edge) => edge.id === `extra-${kind}-wire`)) { + const source = unpacked.graph.nodes.find((node) => node.id === edge.source).data.params[edge.sourceHandle]; + const target = unpacked.graph.nodes.find((node) => node.id === edge.target).data.params[edge.targetHandle]; + assert.equal(source.type, 'image_diffusion_pipeline'); + assert.equal(target.type, source.type); + } + const modified = groups.groupNewOperationGraph(unpacked.graph); + const projected = groups.unpackVisualOperationGroups(modified); + const setup = modified.nodes.find( + (node) => + groups.visualOperationGroup(node) === 'setup' && + projected.members.get(node.id)?.some((id) => id.endsWith(`/stage-${original.owner.id}`)), + ); + assert.ok(setup, 'The original owner remains in a valid derived setup.'); + const before = structuredClone(modified); + assert.throws(() => add(modified, setup), /shared|competing|another loader|missing consumers/i); + assert.deepEqual(modified, before); + } + }); +}); + +test('actual image sampler/decode group uses shared stages without changing executable leaves or saved standalone layout', () => { + const { graph } = cases.get('cosmos3_super_text_to_image'); + assert.deepEqual(graph.nodes.map((node) => node.data.label).sort(), [ + 'Encode Inputs', + 'Generate', + 'Image Output', + 'Model Setup', + ]); + const output = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'output'); + assert.ok(output); + const leaves = output.data.blockInstanceV2.effectiveGraph.nodes; + assert.deepEqual(leaves.map((node) => node.data.action).sort(), ['Preview']); + const generate = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'generate'); + assert.ok(generate); + assert.deepEqual(generate.data.blockInstanceV2.effectiveGraph.nodes.map((node) => node.data.action).sort(), [ + 'WorkflowCosmos3OmniDecode', + 'WorkflowCosmos3OmniDenoise', + ]); + const standalone = groups.unpackVisualOperationGroups(graph).graph; + const saved = structuredClone(standalone); + assert.equal(standalone.nodes.length, 5); + assert.equal(standalone.nodes.filter((node) => groups.visualOperationGroup(node)).length, 0); + const executable = (sourceGraph) => { + const api = flowStore + .getState() + .exportGraph('metadata-image-grouping', undefined, { sourceGraph, randomizeSeeds: false }); + const names = new Map(Object.entries(api.nodes).map(([id, node]) => [id, `${node.module}.${node.action}`])); + assert.equal(new Set(names.values()).size, names.size); + return Object.fromEntries( + Object.entries(api.nodes).map(([id, node]) => [ + names.get(id), + { + module: node.module, + action: node.action, + params: Object.fromEntries( + Object.entries(node.params).map(([field, value]) => [ + field, + value.sourceId ? { ...value, sourceId: names.get(value.sourceId) } : value, + ]), + ), + }, + ]), + ); + }; + assert.deepEqual(executable(graph), executable(standalone)); + assert.deepEqual(standalone, saved, 'Exporting/opening the saved standalone graph does not combine its stages.'); +}); + +// Fixture setup must include these actual curated selections and the two actual +// published negative starters below. No positive adapterAuthoring DTO is made here. +const editPolicySelections = [ + { + id: 'flux_kontext_edit', + profileId: 'flux-kontext:modular', + task: 'edit_image', + tasks: ['edit_image'], + repo: 'black-forest-labs/FLUX.1-Kontext-dev', + revision: '24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d', + visibleLabels: ['Encode Inputs', 'Generate', 'Image Output', 'Load Image', 'Model Setup'], + referenceCount: 1, + embeddedGuidance: 3.5, + guiderEnabled: true, + }, + { + id: 'flux_kontext_multi_reference', + profileId: 'flux-kontext:modular', + task: 'multi_image_reference_edit', + tasks: ['edit_image'], + repo: 'black-forest-labs/FLUX.1-Kontext-dev', + revision: '24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d', + visibleLabels: ['Encode Inputs', 'Generate', 'Image Output', 'Model Setup', 'Reference Images'], + referenceCount: 2, + embeddedGuidance: 3.5, + guiderEnabled: true, + }, + ...[ + ['flux2_klein_text_to_image', 'text_to_image', 0], + ['flux2_klein_edit', 'edit_image', 1], + ['flux2_klein_multi_reference', 'multi_image_reference_edit', 2], + ].map(([id, task, referenceCount]) => ({ + id, + task, + referenceCount, + profileId: 'flux2-klein:modular', + tasks: ['text_to_image', 'edit_image'], + repo: 'black-forest-labs/FLUX.2-klein-4B', + revision: 'e7b7dc27f91deacad38e78976d1f2b499d76a294', + visibleLabels: [ + 'Generate', + 'Encode Inputs', + 'Image Output', + 'Model Setup', + ...(referenceCount ? ['Load Image'] : []), + ].sort(), + embeddedGuidance: 1, + guiderEnabled: null, + })), +]; +const editControlSelections = [ + { + id: 'klein-base-native-negative', + selection: { + pipelineClass: 'Flux2KleinBaseModularPipeline', + task: 'text_to_image', + executionProfileId: 'flux2-klein-base:modular', + }, + }, + { + id: 'klein-kv-native-negative', + selection: { + pipelineClass: 'Flux2KleinModularPipeline', + task: 'text_to_image', + executionProfileId: 'flux2-klein-kv:t2i-modular', + }, + }, +]; + +test('actual selected Kontext and Klein policies authorize only their five original native templates', async (t) => { + for (const selection of editPolicySelections) + await t.test(selection.id, () => { + const { graph, root } = cases.get(selection.id); + const before = structuredClone(graph); + const authorityBefore = structuredClone(authority); + const chain = adapters.modelSetupAdapterChain(graph, root.id); + const retained = adapters.modelSetupAdapterChain( + cases.get(curatedFluxIds[0]).graph, + cases.get(curatedFluxIds[0]).root.id, + ).adapters; + assert.equal(retained.length, 2); + const values = retained.map((node, index) => + Object.fromEntries( + ['model', 'revision', 'expected_sha256', 'weight_name', 'adapter_name', 'scale'].map((field) => [ + field, + field === 'scale' ? ['0.8', '0.35'][index] : structuredClone(node.data.params[field].value), + ]), + ), + ); + const next = add(add(graph, root, authority, values[0]), root, authority, values[1]); + const { profile, policy } = publishedAliasPolicy(selection.profileId); + assert.deepEqual(policy.tasks, selection.tasks); + const currentOwner = currentEditOwnerContract(selection); + const executionMode = Object.hasOwn(currentOwner.binding, 'executionMode') + ? currentOwner.binding.executionMode + : currentOwner.task; + assert.ok(policy.tasks.includes(executionMode)); + assert.ok(profile.modes.includes(executionMode)); + assert.equal(policy.adapterNodeKey, 'modules.ModularDiffusers.Lora'); + assert.equal(policy.maxOwnedAdapters, 32); + assert.deepEqual(policy.repositoryRevisions, [{ repo: selection.repo, revision: selection.revision }]); + const changed = adapters.modelSetupAdapterChain(next, root.id); + assert.equal(changed.native, true); + assert.deepEqual(changed.owner.data.params, chain.owner.data.params); + assert.equal(changed.owner.data.params.model_type.value, profile.pipeline_class); + assert.deepEqual(changed.owner.data.params.repo_id.value, { source: 'hub', value: selection.repo }); + assert.equal(changed.owner.data.params.revision.value, selection.revision); + assert.equal(adapters.modelSetupAdapterEditUnavailable(changed, authority), null); + assert.equal( + authority.studioModelCapabilities.find((item) => item.modelType === profile.pipeline_class).supportsLora, + false, + ); + assert.deepEqual(next.nodes.map((node) => node.data.label).sort(), selection.visibleLabels); + const flat = groups.unpackVisualOperationGroups(next).graph; + const guider = flat.nodes.find((node) => node.data.action === 'Guider'); + assert.equal(guider?.data.params.enabled.value ?? null, selection.guiderEnabled); + assert.equal( + flat.nodes.find((node) => node.data.action === 'Denoise').data.params.guidance_scale.value, + selection.embeddedGuidance, + ); + for (const [index, adapter] of changed.adapters.entries()) + for (const [field, value] of Object.entries(values[index])) + assert.deepEqual(adapter.data.params[field].value, value); + const exportApi = (sourceGraph) => + flowStore.getState().exportGraph('metadata-own-edit-policy', undefined, { sourceGraph, randomizeSeeds: false }); + const core = (sourceGraph) => { + const api = exportApi(sourceGraph); + return Object.fromEntries( + Object.entries(api.nodes) + .filter(([, node]) => node.action !== 'Lora') + .map(([id, node]) => [ + id, + { + ...node, + params: Object.fromEntries(Object.entries(node.params).filter(([field]) => field !== 'lora_list')), + }, + ]), + ); + }; + assert.deepEqual( + core(next), + core(graph), + 'All non-adapter executable fields, settings and ordinary wires remain unchanged.', + ); + const moved = adapters.planModelSetupAdapterEdit( + next, + root.id, + { kind: 'move', nodeId: changed.adapters[1].id, offset: -1 }, + authority, + ); + assert.deepEqual( + adapters.modelSetupAdapterChain(moved, root.id).adapters.map((node) => node.data.params.scale.value), + ['0.35', '0.8'], + ); + assert.deepEqual(core(moved), core(graph)); + let removed = moved; + for (const adapter of adapters.modelSetupAdapterChain(moved, root.id).adapters) + removed = adapters.planModelSetupAdapterEdit(removed, root.id, { kind: 'remove', nodeId: adapter.id }); + assert.deepEqual( + exportApi(removed), + exportApi(graph), + 'Whole ordinary API JSON is restored, including media and all creator settings.', + ); + assert.deepEqual(graph, before); + assert.deepEqual( + authority, + authorityBefore, + 'No support/qualification/Auto flags or other public metadata are promoted.', + ); + }); +}); + +test('selected edit policies reject missing, foreign, malformed, stale, ambiguous and wrong-task grants unchanged', async (t) => { + for (const selection of editPolicySelections) { + const { graph, root } = cases.get(selection.id); + const { policy } = publishedAliasPolicy(selection.profileId); + const foreignId = selection.profileId === 'flux-kontext:modular' ? 'flux2-klein:modular' : 'flux-kontext:modular'; + const variants = { + absent: withPolicy(selection.profileId, undefined, { omit: true }), + malformedPresent: withPolicy(selection.profileId, { ...policy, maxOwnedAdapters: 0 }), + borrowedDense: withPolicy(selection.profileId, selectedFluxProfile().adapterAuthoring), + borrowedOtherEditProfile: withPolicy(selection.profileId, publishedAliasPolicy(foreignId).policy), + wrongTask: withPolicy(selection.profileId, { + ...policy, + tasks: policy.tasks.filter( + (task) => task !== (selection.task === 'multi_image_reference_edit' ? 'edit_image' : selection.task), + ), + }), + foreignPair: withPolicy(selection.profileId, { + ...policy, + repositoryRevisions: [ + { repo: 'black-forest-labs/FLUX.1-dev', revision: '3de623fc3c33e44ffbe2bad470d0f45bccf2eb21' }, + ], + }), + stalePin: withPolicy(selection.profileId, { + ...policy, + repositoryRevisions: [{ repo: selection.repo, revision: 'a'.repeat(40) }], + }), + missingPairs: withPolicy(selection.profileId, { ...policy, repositoryRevisions: [] }), + pending: { + ...authority, + discoveryRequests: { ...authority.discoveryRequests, capabilities: { status: 'loading' } }, + }, + staleOperations: { ...authority, operationContracts: [] }, + staleSupport: { ...authority, pipelineSupport: [] }, + ambiguousProfile: { + ...authority, + studioModelCapabilities: authority.studioModelCapabilities.map((capability) => ({ + ...capability, + executionProfiles: capability.executionProfiles?.flatMap((profile) => + profile.id === selection.profileId ? [profile, structuredClone(profile)] : [profile], + ), + })), + }, + ambiguousCapability: { + ...authority, + studioModelCapabilities: [ + ...authority.studioModelCapabilities, + structuredClone( + authority.studioModelCapabilities.find( + (capability) => + capability.modelType === + adapters.modelSetupAdapterChain(graph, root.id).owner.data.params.model_type.value, + ), + ), + ], + }, + }; + for (const [name, metadata] of Object.entries(variants)) + await t.test(`${selection.id}/${name}`, () => { + const before = structuredClone(graph); + assert.throws(() => add(graph, root, metadata), /policy|LoRA|profile|capabilities/i); + assert.deepEqual(graph, before); + }); + for (const [field, selected] of [ + ['repo_id', { source: 'hub', value: 'black-forest-labs/FLUX.1-dev' }], + ['revision', 'a'.repeat(40)], + ['workflow_id', selection.task === 'text_to_image' ? 'image_conditioned' : 'text2image'], + ['model_type', 'UnknownPipeline'], + ]) + await t.test(`${selection.id}/changed ${field}`, () => { + const unpacked = groups.unpackVisualOperationGroups(graph); + const owner = adapters.modelSetupAdapterChain(graph, root.id).owner; + unpacked.graph.nodes.find((node) => node.id === owner.id).data.params[field].value = selected; + const changed = groups.restoreVisualOperationGroups(unpacked.graph, unpacked); + const before = structuredClone(changed); + assert.throws(() => add(changed, root), /policy|LoRA|profile|revision|selector/i); + assert.deepEqual(changed, before); + }); + for (const field of ['model_type', 'repo_id', 'revision', 'workflow_id']) + await t.test(`${selection.id}/connected ${field}`, () => { + const unpacked = groups.unpackVisualOperationGroups(graph); + const owner = adapters.modelSetupAdapterChain(graph, root.id).owner; + unpacked.graph.nodes.push({ + id: `edit-policy-supplier-${field}`, + type: 'custom', + position: { x: -400, y: 0 }, + data: { + module: 'modules.Test', + action: 'Selector', + params: { output: { type: 'string', display: 'output' } }, + }, + }); + unpacked.graph.edges.push({ + id: `edit-policy-selector-${field}`, + source: `edit-policy-supplier-${field}`, + sourceHandle: 'output', + target: owner.id, + targetHandle: field, + }); + const connected = groups.restoreVisualOperationGroups(unpacked.graph, unpacked); + const before = structuredClone(connected); + assert.throws(() => add(connected, root), /policy|LoRA|profile|revision|selector/i); + assert.deepEqual(connected, before); + }); + } +}); + +test('native edit grants do not authorize Kontext NVFP4, Klein Base or Klein KV selectors', async (t) => { + await t.test('Kontext NVFP4 exact reviewed pair remains excluded from dense policy', () => { + const { graph, root } = cases.get('flux_kontext_edit'); + const unpacked = groups.unpackVisualOperationGroups(graph); + const owner = adapters.modelSetupAdapterChain(graph, root.id).owner; + const params = unpacked.graph.nodes.find((node) => node.id === owner.id).data.params; + params.repo_id.value = { source: 'hub', value: 'black-forest-labs/FLUX.1-Kontext-dev-NVFP4' }; + params.revision.value = '7e9dee453a3454251216a394697a6dcea44f54f8'; + const changed = groups.restoreVisualOperationGroups(unpacked.graph, unpacked); + const before = structuredClone(changed); + assert.throws(() => add(changed, root), /policy|LoRA|profile|revision/i); + assert.deepEqual(changed, before); + }); + for (const control of editControlSelections) + await t.test(control.id, () => { + const { graph, root } = cases.get(control.id); + const before = structuredClone(graph); + // Studio intentionally filters model types without a presentation (KV). + // Check the actual public declaration without inventing parsed authority. + const publicProfiles = fixture.publicPayload.capabilities + .flatMap((capability) => capability.executionProfiles ?? []) + .filter((profile) => profile.id === control.selection.executionProfileId); + assert.equal(publicProfiles.length, 1); + assert.equal(Object.hasOwn(publicProfiles[0], 'adapterAuthoring'), false); + assert.throws(() => add(graph, root), /policy|LoRA|profile/i); + assert.deepEqual(graph, before); + }); +}); + +// Positive mode fields are NEVER synthesized into a fixture. +function currentEditOwnerContract(selection, metadata = authority) { + const { graph, root } = cases.get(selection.id); + const hint = adapters.modelSetupAdapterChain(graph, root.id).owner.data.operationAuthoring.operation; + const rows = metadata.operationContracts.filter( + (item) => + item.pipelineClass === hint.pipelineClass && + item.task === hint.task && + item.operationId === hint.operationId && + item.nodeKey === hint.nodeKey, + ); + assert.equal(rows.length, 1); + return rows[0]; +} +function editAuthorityMode(selection, mode, omit = false) { + const metadata = structuredClone(authority); + const binding = currentEditOwnerContract(selection, metadata).binding; + if (omit) delete binding.executionMode; + else binding.executionMode = mode; + return metadata; +} +test('five selected image policies use their exact current backend execution mode without expanding profile modes', async (t) => { + for (const selection of editPolicySelections) + await t.test(selection.id, () => { + const expected = selection.task === 'multi_image_reference_edit' ? 'edit_image' : selection.task; + const current = currentEditOwnerContract(selection); + const { profile, policy } = publishedAliasPolicy(selection.profileId); + if (selection.task === 'multi_image_reference_edit') { + assert.equal( + current.binding.executionMode, + expected, + 'The alias mode must come from the real producer, not the graph hint or fixture injection.', + ); + } else { + assert.equal( + Object.hasOwn(current.binding, 'executionMode'), + false, + 'Exact T2I/edit owners preserve the existing absent field and exact-task fallback.', + ); + } + assert.deepEqual(profile.modes, ['text_to_image', 'edit_image']); + assert.deepEqual( + policy.tasks, + selection.profileId === 'flux-kontext:modular' ? ['edit_image'] : ['text_to_image', 'edit_image'], + ); + assert.ok(policy.tasks.includes(current.binding.executionMode ?? current.task)); + assert.ok(profile.modes.includes(current.binding.executionMode ?? current.task)); + assert.equal(policy.tasks.includes('multi_image_reference_edit'), false); + const { graph, root } = cases.get(selection.id); + assert.equal( + adapters.modelSetupAdapterAddUnavailable(adapters.modelSetupAdapterChain(graph, root.id), authority), + null, + ); + }); +}); +test('absent execution mode falls back only to the exact task and saved hints cannot grant a multi-reference alias', async (t) => { + for (const selection of editPolicySelections) + await t.test(selection.id, () => { + const { graph, root } = cases.get(selection.id); + const metadata = editAuthorityMode(selection, undefined, true); + const before = structuredClone(graph); + if (selection.task === 'multi_image_reference_edit') { + assert.throws(() => add(graph, root, metadata), /policy|LoRA|profile/i); + const unpacked = groups.unpackVisualOperationGroups(graph); + const ownerId = adapters.modelSetupAdapterChain(graph, root.id).owner.id; + unpacked.graph.nodes.find( + (node) => node.id === ownerId, + ).data.operationAuthoring.operation.binding.executionMode = 'edit_image'; + const advisory = groups.restoreVisualOperationGroups(unpacked.graph, unpacked); + const advisoryBefore = structuredClone(advisory); + assert.throws(() => add(advisory, root, metadata), /policy|LoRA|profile/i); + assert.deepEqual(advisory, advisoryBefore); + } else { + // Actual current own policy is retained; this is the backward-compatible + // absence case, not a fabricated positive mode or policy. + assert.equal( + adapters.modelSetupAdapterAddUnavailable(adapters.modelSetupAdapterChain(graph, root.id), metadata), + null, + ); + } + assert.deepEqual(graph, before); + }); +}); +test('present invalid or foreign execution modes never fall back and foreign owner contracts cannot supply a mode', async (t) => { + for (const selection of editPolicySelections) { + const { graph, root } = cases.get(selection.id); + for (const mode of [ + undefined, + null, + false, + 1, + {}, + [], + '', + 'inpaint', + 'audio_generation', + 'edit-image', + 'edit_image\n', + ]) + await t.test(`${selection.id}/${String(mode)}`, () => { + const before = structuredClone(graph); + assert.throws(() => add(graph, root, editAuthorityMode(selection, mode)), /policy|LoRA|profile/i); + assert.deepEqual(graph, before); + }); + for (const field of ['pipelineClass', 'task', 'nodeKey']) + await t.test(`${selection.id}/foreign ${field}`, () => { + const metadata = structuredClone(authority); + const owner = currentEditOwnerContract(selection, metadata); + owner[field] = + field === 'nodeKey' ? 'modules.Audio.LoadPipeline' : field === 'task' ? 'inpaint' : 'ForeignPipeline'; + const before = structuredClone(graph); + assert.throws(() => add(graph, root, metadata), /policy|LoRA|profile|capabilities/i); + assert.deepEqual(graph, before); + }); + } +}); + +test('six actual staged image starters keep all three owned consumers through adapter Add, Move, Remove and persisted API export', async (t) => { + const exported = (graph) => + flowStore.getState().exportGraph('staged-chain-contract', undefined, { sourceGraph: graph, randomizeSeeds: false }); + for (const id of integratedImageStageIds) + await t.test(id, () => { + const { graph, root } = cases.get(id), + before = structuredClone(graph), + original = exported(graph); + const initial = adapters.modelSetupAdapterChain(graph, root.id); + assert.equal(initial.tail.length, 3); + assert.equal(adapters.modelSetupAdapterAddUnavailable(initial, authority), null); + assert.equal(adapters.modelSetupAdapterEditUnavailable(initial, authority), null); + const one = add(graph, root, authority, { scale: '0.8' }), + two = add(one, root, authority, { scale: '0.35' }); + const current = adapters.modelSetupAdapterChain(two, root.id); + assert.equal(current.adapters.length, 2); + const moved = adapters.planModelSetupAdapterEdit( + two, + root.id, + { kind: 'move', nodeId: current.adapters[1].id, offset: -1 }, + authority, + ); + const saved = JSON.parse(JSON.stringify(moved)); + const state = adapters.modelSetupAdapterChain(saved, root.id); + assert.deepEqual( + state.adapters.map((node) => node.data.params.scale.value), + ['0.35', '0.8'], + ); + const api = exported(saved), + ownerId = Object.keys(api.nodes).find((nodeId) => api.nodes[nodeId].action === 'LoadPipeline'); + const finalId = Object.keys(api.nodes).find( + (nodeId) => api.nodes[nodeId].action === 'LoadAdapter' && api.nodes[nodeId].params.scale.value === '0.8', + ); + assert.ok(ownerId && finalId); + for (const action of ['EncodeInputs', 'Denoise', 'DecodeLatents']) { + const stage = Object.values(api.nodes).find((node) => node.action === action); + assert.equal(stage.params.pipeline.sourceId, finalId); + assert.equal(stage.params.pipeline.sourceKey, 'output'); + } + const denoiseId = Object.keys(api.nodes).find((nodeId) => api.nodes[nodeId].action === 'Denoise'); + const decoder = Object.values(api.nodes).find((node) => node.action === 'DecodeLatents'); + for (const [field, sourceKey] of [ + ['latents', 'latents_out'], + ['latent_binding', 'latent_binding'], + ['width', 'width_out'], + ['height', 'height_out'], + ]) { + assert.equal(decoder.params[field].sourceId, denoiseId); + assert.equal(decoder.params[field].sourceKey, sourceKey); + } + const visible = saved.nodes.filter((node) => !node.parentId && !node.data.blockProjectionOwnerId); + assert.equal(visible.length, id.includes('fill') ? 6 : 5); + for (const label of ['Model Setup', 'Encode Inputs', 'Generate', 'Image Output']) + assert.equal(visible.filter((node) => node.data.label === label).length, 1); + const firstRemoved = adapters.planModelSetupAdapterEdit(saved, root.id, { + kind: 'remove', + nodeId: state.adapters[0].id, + }); + const last = adapters.modelSetupAdapterChain(firstRemoved, root.id).adapters[0]; + const restored = adapters.planModelSetupAdapterEdit(firstRemoved, root.id, { kind: 'remove', nodeId: last.id }); + assert.deepEqual(exported(restored), original); + assert.deepEqual(graph, before); + }); +}); + +test('staged image adapter authoring refuses malformed geometry and noncurrent stage authority without mutating the graph', async (t) => { + for (const id of integratedImageStageIds) + await t.test(id, () => { + const { graph, root } = cases.get(id), + before = structuredClone(graph); + const unpacked = groups.unpackVisualOperationGroups(graph); + const decoder = unpacked.graph.nodes.find((node) => node.data.action === 'DecodeLatents'); + for (const field of ['width', 'height', 'latent_binding']) { + const missing = structuredClone(unpacked.graph); + missing.edges = missing.edges.filter((edge) => !(edge.target === decoder.id && edge.targetHandle === field)); + assert.throws(() => add(groups.restoreVisualOperationGroups(missing, unpacked), root)); + const competing = structuredClone(unpacked.graph); + const edge = competing.edges.find((edge) => edge.target === decoder.id && edge.targetHandle === field); + competing.edges.push({ ...edge, id: `competing-${field}` }); + assert.throws(() => add(groups.restoreVisualOperationGroups(competing, unpacked), root)); + } + const operation = decoder.data.operationAuthoring.operation; + for (const kind of ['missing', 'duplicate', 'stale']) { + const metadata = structuredClone(authority); + const index = metadata.operationContracts.findIndex( + (item) => + item.pipelineClass === operation.pipelineClass && + item.task === operation.task && + item.operationId === operation.operationId, + ); + assert.ok(index >= 0); + if (kind === 'missing') metadata.operationContracts.splice(index, 1); + else if (kind === 'duplicate') + metadata.operationContracts.push(structuredClone(metadata.operationContracts[index])); + else + metadata.operationContracts[index].binding = { + ...metadata.operationContracts[index].binding, + values: { ...metadata.operationContracts[index].binding?.values, seed: 7 }, + }; + assert.throws(() => add(graph, root, metadata)); + } + assert.deepEqual(graph, before); + }); +}); + +const conditionalAdapterCases = [ + ['cosmos3_super_text_to_image', 'cosmos3-super-text-to-image:official-modular-workflow'], + ['flux_redux_edit', 'flux-redux:direct'], + ['flux_redux_multi_reference', 'flux-redux:direct'], +]; +const conditionalAdapterProfile = (id) => { + const found = authority.studioModelCapabilities + .flatMap((item) => item.executionProfiles ?? []) + .filter((p) => p.id === id); + assert.equal(found.length, 1, 'Use one exact currently published selected profile.'); + return found[0]; +}; + +test('required adapter control policy validates exact transport context and bounded own scalar grammar', () => { + const profile = selectedFluxProfile(); + const parse = (policy, context = profile) => + runtimeProfiles.parseImageAdapterAuthoringPolicy(policy, profile.modes, profile.repository_revisions, context); + assert.deepEqual(parse(profile.adapterAuthoring), profile.adapterAuthoring); + assert.equal(Object.hasOwn(parse(profile.adapterAuthoring), 'requiredControls'), false); + // These malformed maps are parser specimens, never installed as authoring grants. + const specimen = { offload_mode: 'none', auto_offload: false, quant_config: null }; + assert.deepEqual(parse({ ...profile.adapterAuthoring, requiredControls: specimen }).requiredControls, specimen); + for (const value of [ + {}, + null, + undefined, + [], + { offload_mode: 0 }, + { offload_mode: NaN }, + { offload_mode: {} }, + { offload_mode: '' }, + { offload_mode: ' none' }, + { offload_mode: 'none ' }, + { offload_mode: 'a'.repeat(129) }, + { ['a'.repeat(65)]: null }, + { '1bad': null }, + { 'offload-mode': null }, + { Offload: null }, + { constructor: null }, + { prototype: null }, + Object.fromEntries(Array.from({ length: 33 }, (_, i) => [`field_${i}`, null])), + Object.assign(Object.create({ hidden: null }), specimen), + { ...specimen, [Symbol('extra')]: null }, + Object.defineProperty({}, 'offload_mode', { value: 'none' }), + ]) + assert.throws(() => parse({ ...profile.adapterAuthoring, requiredControls: value })); + for (const control of ['\n', '\r', '\r\n', '\u0000', '\u001f', '\u007f', '\u009f', '\u2028', '\u2029']) + assert.throws(() => parse({ ...profile.adapterAuthoring, requiredControls: { offload_mode: `none${control}` } })); + let getterReads = 0; + const accessor = Object.defineProperty({}, 'offload_mode', { + enumerable: true, + get() { + getterReads++; + return 'none'; + }, + }); + assert.throws(() => parse({ ...profile.adapterAuthoring, requiredControls: accessor })); + assert.equal(getterReads, 0); + assert.throws(() => parse(Object.assign(Object.create({ requiredControls: specimen }), profile.adapterAuthoring))); + for (const context of [ + undefined, + null, + {}, + Object.create(profile), + { ...profile, loader_action: 'LoadPipeline' }, + { ...profile, execution_path: 'direct-diffusers-image' }, + ]) + assert.throws(() => + runtimeProfiles.parseImageAdapterAuthoringPolicy( + profile.adapterAuthoring, + profile.modes, + profile.repository_revisions, + context, + ), + ); + for (const [, profileId] of conditionalAdapterCases) { + const selected = conditionalAdapterProfile(profileId); + assert.ok(selected.adapterAuthoring?.requiredControls, 'Require actual backend publication, not supportsLora.'); + assert.deepEqual( + runtimeProfiles.parseImageAdapterAuthoringPolicy( + selected.adapterAuthoring, + selected.modes, + selected.repository_revisions, + selected, + ), + selected.adapterAuthoring, + ); + const foreign = { ...selected, loader_module: 'modules.Foreign' }; + assert.throws(() => + runtimeProfiles.parseImageAdapterAuthoringPolicy( + selected.adapterAuthoring, + selected.modes, + selected.repository_revisions, + foreign, + ), + ); + } +}); + +test('actual conditional adapter policies bind literal optional inputs and pure recipe precedence before editing', async (t) => { + for (const [id, profileId] of conditionalAdapterCases) + await t.test(id, () => { + const { graph, root } = cases.get(id), + before = structuredClone(graph); + const chain = adapters.modelSetupAdapterChain(graph, root.id); + const profile = conditionalAdapterProfile(profileId); + const controls = profile.adapterAuthoring?.requiredControls; + assert.ok(controls, 'The selected current producer must declare the controls.'); + assert.equal(adapters.modelSetupAdapterAddUnavailable(chain, authority), null); + const deny = (mutate) => { + const changed = structuredClone(chain); + mutate(changed); + assert.notEqual(adapters.modelSetupAdapterAddUnavailable(changed, authority), null); + assert.notEqual(adapters.modelSetupAdapterEditUnavailable(changed, authority), null); + }; + for (const [name, expected] of Object.entries(controls)) { + if (!(name === 'auto_offload' && !chain.native)) + deny((state) => { + state.owner.data.params[name].value = + expected === null ? 'foreign' : typeof expected === 'boolean' ? !expected : 'foreign'; + }); + deny((state) => { + delete state.owner.data.params[name]; + }); + deny((state) => { + state.unpacked.graph.edges.push({ + id: `connected-${name}`, + source: state.owner.id, + sourceHandle: 'pipeline', + target: state.owner.id, + targetHandle: name, + }); + }); + if (expected !== null) + deny((state) => { + state.owner.data.params[name].value = null; + }); + } + const optional = structuredClone(chain); + for (const [name, expected] of Object.entries(controls)) + if (expected === null) { + delete optional.owner.data.params[name].value; + delete optional.owner.data.params[name].default; + } + assert.equal(adapters.modelSetupAdapterAddUnavailable(optional, authority), null); + if (chain.native) { + const defaulted = structuredClone(chain); + assert.equal(defaulted.owner.data.params.weight_loading_mode.default, 'cpu'); + delete defaulted.owner.data.params.weight_loading_mode.value; + assert.equal(adapters.modelSetupAdapterAddUnavailable(defaulted, authority), null); + deny((state) => { + assert.equal(state.owner.data.params.trust_remote_code.default, undefined); + delete state.owner.data.params.trust_remote_code.value; + }); + } else { + const recipe = (state) => + state.unpacked.graph.nodes.find( + (n) => n.data.module === 'modules.DiffusersRuntime' && n.data.action === 'DiffusersExecutionRecipe', + ); + assert.ok(recipe(chain)); + const overridden = structuredClone(chain); + overridden.owner.data.params.offload_mode.value = 'group_cpu'; + overridden.owner.data.params.auto_offload.value = true; + assert.equal(recipe(overridden).data.params.offload_mode.value, 'none'); + assert.equal(adapters.modelSetupAdapterAddUnavailable(overridden, authority), null); + deny((state) => { + recipe(state).data.params.offload_mode.value = 'group_cpu'; + }); + deny((state) => { + state.owner.data.params.device_map.value = 'balanced'; + }); + deny((state) => { + recipe(state).data.params.device_map.value = 'balanced'; + }); + deny((state) => { + recipe(state).data.module = 'custom.Unreviewed'; + }); + deny((state) => { + state.unpacked.graph.edges.push({ + id: 'computed-recipe', + source: state.owner.id, + sourceHandle: 'pipeline', + target: recipe(state).id, + targetHandle: 'offload_mode', + }); + }); + deny((state) => { + const edge = state.unpacked.graph.edges.find( + (e) => e.target === state.owner.id && e.targetHandle === 'execution_recipe', + ); + state.unpacked.graph.edges.push({ ...edge, id: 'duplicate-recipe' }); + }); + deny((state) => { + state.unpacked.graph.edges = state.unpacked.graph.edges.filter( + (e) => !(e.target === state.owner.id && e.targetHandle === 'execution_recipe'), + ); + state.owner.data.params.execution_recipe.value = { offload_mode: 'none', device_map: 'none' }; + }); + const quantizer = (state) => + state.unpacked.graph.nodes.find( + (n) => n.data.module === 'modules.DiffusersRuntime' && n.data.action === 'PipelineQuantizationConfigV2', + ); + assert.ok(quantizer(chain)); + deny((state) => { + quantizer(state).data.params.backend.value = 'bnb_4bit'; + }); + deny((state) => { + quantizer(state).data.params.component_overrides.value = '{"transformer":{}}'; + }); + deny((state) => { + state.unpacked.graph.edges.push({ + id: 'computed-quant', + source: state.owner.id, + sourceHandle: 'pipeline', + target: quantizer(state).id, + targetHandle: 'backend', + }); + }); + } + assert.deepEqual(graph, before); + }); +}); + +test('conditional Add2 Move and persistence preserve exports while unsafe controls allow Remove recovery only', async (t) => { + const api = (graph) => + flowStore.getState().exportGraph('conditional-metadata', undefined, { sourceGraph: graph, randomizeSeeds: false }); + for (const [id] of conditionalAdapterCases) + await t.test(id, () => { + const { graph, root } = cases.get(id), + before = structuredClone(graph); + const first = add(graph, root, authority, { scale: '0.8' }); + const second = add(first, root, authority, { scale: '0.35' }); + const chain = adapters.modelSetupAdapterChain(second, root.id); + const moved = adapters.planModelSetupAdapterEdit( + second, + root.id, + { kind: 'move', nodeId: chain.adapters[1].id, offset: -1 }, + authority, + ); + const restored = JSON.parse(JSON.stringify(moved)); + assert.deepEqual( + adapters.modelSetupAdapterChain(restored, root.id).adapters.map((n) => n.id), + [chain.adapters[1].id, chain.adapters[0].id], + ); + const unpacked = groups.unpackVisualOperationGroups(restored), + flat = unpacked.graph; + if (chain.native) flat.nodes.find((n) => n.id === chain.owner.id).data.params.offload_mode.value = 'group_cpu'; + else + flat.nodes.find( + (n) => n.data.module === 'modules.DiffusersRuntime' && n.data.action === 'DiffusersExecutionRecipe', + ).data.params.offload_mode.value = 'group_cpu'; + const unsafe = groups.restoreVisualOperationGroups(flat, unpacked), + unsafeBefore = structuredClone(unsafe); + assert.throws(() => add(unsafe, root)); + assert.throws(() => + adapters.planModelSetupAdapterEdit( + unsafe, + root.id, + { kind: 'move', nodeId: chain.adapters[0].id, offset: -1 }, + authority, + ), + ); + assert.deepEqual(unsafe, unsafeBefore); + const removedUnsafe = adapters.planModelSetupAdapterEdit(unsafe, root.id, { + kind: 'remove', + nodeId: chain.adapters[0].id, + }); + assert.equal(adapters.modelSetupAdapterChain(removedUnsafe, root.id).adapters.length, 1); + let removed = restored; + for (const node of chain.adapters) + removed = adapters.planModelSetupAdapterEdit(removed, root.id, { kind: 'remove', nodeId: node.id }); + assert.deepEqual(api(removed), api(graph)); + assert.deepEqual(graph, before); + }); +}); + +test('native adapter policy accepts fresh declared workflow selectors and the unchanged legacy blank representation', async (t) => { + for (const id of ['flux_schnell_text_to_image', 'flux_kontext_edit', 'flux2_klein_edit']) { + const { graph, root } = cases.get(id); + const chain = adapters.modelSetupAdapterChain(graph, root.id); + const operation = chain.owner.data.operationAuthoring.operation; + assert.equal(chain.native, true); + assert.equal(typeof operation.workflowId, 'string'); + assert.ok(operation.workflowId.length > 0); + assert.equal( + chain.owner.data.params.workflow_id.value, + operation.workflowId, + 'The genuine current backend starter must author its exact resolved selector.', + ); + for (const legacy of [false, true]) + await t.test(`${id}/${legacy ? 'legacy blank' : 'current declared'}`, () => { + const unpacked = groups.unpackVisualOperationGroups(graph); + if (legacy) unpacked.graph.nodes.find((node) => node.id === chain.owner.id).data.params.workflow_id.value = ''; + const candidate = groups.restoreVisualOperationGroups(unpacked.graph, unpacked); + const before = structuredClone(candidate); + assert.equal( + adapters.modelSetupAdapterAddUnavailable(adapters.modelSetupAdapterChain(candidate, root.id), authority), + null, + ); + assert.deepEqual(candidate, before); + }); + } +}); + +test('native adapter workflow authority keeps explicit bindings ahead of declarations and never adopts unknown values', async (t) => { + const { graph, root } = cases.get('flux_schnell_text_to_image'); + const chain = adapters.modelSetupAdapterChain(graph, root.id); + const operation = chain.owner.data.operationAuthoring.operation; + const metadataWithBinding = (workflow) => { + const metadata = structuredClone(authority); + const current = metadata.operationContracts.find( + (item) => + item.operationId === operation.operationId && + item.pipelineClass === operation.pipelineClass && + item.task === operation.task && + item.nodeKey === operation.nodeKey, + ); + assert.ok(current); + current.binding = { ...current.binding, values: { ...current.binding?.values, workflow_id: workflow } }; + return metadata; + }; + await t.test('exact explicit binding', () => { + assert.equal(adapters.modelSetupAdapterAddUnavailable(chain, metadataWithBinding(operation.workflowId)), null); + }); + for (const value of ['image_conditioned', 'unknown_workflow', null]) + await t.test(`mismatched explicit binding ${value}`, () => { + assert.match(adapters.modelSetupAdapterAddUnavailable(chain, metadataWithBinding(value)), /policy/); + }); + const unpacked = groups.unpackVisualOperationGroups(graph); + unpacked.graph.nodes.find((node) => node.id === chain.owner.id).data.params.workflow_id.value = ''; + const legacy = groups.restoreVisualOperationGroups(unpacked.graph, unpacked); + assert.match( + adapters.modelSetupAdapterAddUnavailable( + adapters.modelSetupAdapterChain(legacy, root.id), + metadataWithBinding(operation.workflowId), + ), + /policy/, + ); + for (const workflow of ['image_conditioned', 'unknown_workflow']) + await t.test(`wrong authored selector ${workflow}`, () => { + const unpacked = groups.unpackVisualOperationGroups(graph); + unpacked.graph.nodes.find((node) => node.id === chain.owner.id).data.params.workflow_id.value = workflow; + const changed = groups.restoreVisualOperationGroups(unpacked.graph, unpacked); + const before = structuredClone(changed); + assert.match( + adapters.modelSetupAdapterAddUnavailable(adapters.modelSetupAdapterChain(changed, root.id), authority), + /policy/, + ); + assert.deepEqual(changed, before); + }); +}); + +test('ordinary public LoRA discovery keeps first adapters optional in fresh, restored and chained graphs', async () => { + const { buildGraphFixPlan } = await server.ssrLoadModule('/src/studio/graphFixer.ts'); + const { createNodeFromRegistry } = await server.ssrLoadModule('/src/workflow/nodeFactory.ts'); + const { inspectRequiredGraphInputs } = await server.ssrLoadModule('/src/studio/requiredGraphInputs.ts'); + const key = 'modules.ModularDiffusers.Lora'; + const original = groups.unpackVisualOperationGroups(cases.get('flux_lora_ghibli_story').graph).graph; + const originalAdapters = original.nodes.filter((node) => `${node.data.module}.${node.data.action}` === key); + assert.equal(originalAdapters.length, 1); + const savedAdapter = originalAdapters[0]; + assert.equal( + original.edges.some((edge) => edge.target === savedAdapter.id && edge.targetHandle === 'previous_loras'), + false, + ); + + // Create through the same ordinary node factory as insertion. Retain the + // reviewed template's real immutable adapter values; do not invent a model + // or substitute a handwritten optional-input definition for discovery. + const fresh = createNodeFromRegistry(key, fixture.registry, savedAdapter.position); + assert.ok(fresh); + fresh.id = savedAdapter.id; + for (const [field, param] of Object.entries(savedAdapter.data.params)) { + if (fresh.data.params[field] && Object.hasOwn(param, 'value')) + fresh.data.params[field].value = structuredClone(param.value); + } + assert.match(fresh.data.params.revision.value, /^[a-f0-9]{40}$/); + assert.match(fresh.data.params.expected_sha256.value, /^[a-f0-9]{64}$/); + const freshGraph = { + nodes: original.nodes.map((node) => (node.id === fresh.id ? fresh : structuredClone(node))), + edges: structuredClone(original.edges), + }; + const predecessorIssues = (graph, registry = fixture.registry) => { + const ids = new Set( + graph.nodes.filter((node) => `${node.data.module}.${node.data.action}` === key).map((node) => node.id), + ); + return buildGraphFixPlan({ ...graph, registry }).issues.filter( + (issue) => + issue.kind === 'missing_input' && issue.targetHandle === 'previous_loras' && ids.has(issue.targetNodeId), + ); + }; + const before = structuredClone(freshGraph); + assert.deepEqual(predecessorIssues(freshGraph), [], 'A fresh singleton must not propose another Lora predecessor.'); + assert.deepEqual(freshGraph, before); + + // JSON restore deliberately retains the historical schema. The live fixer + // contract must override it only in its inspection copy, preserving authored + // values, edges and the saved schema even when its required bit is stale. + const historicalRegistry = structuredClone(fixture.registry); + delete historicalRegistry[key].params.previous_loras.required; + historicalRegistry[key].params.previous_loras.description = + 'Append this adapter to the connected ordered descriptor or descriptor list.'; + for (const staleRequired of [undefined, true]) { + const restored = JSON.parse(JSON.stringify(freshGraph)); + const predecessor = restored.nodes.find((node) => node.id === savedAdapter.id).data.params.previous_loras; + delete predecessor.required; + if (staleRequired !== undefined) predecessor.required = staleRequired; + predecessor.description = 'Append this adapter to the connected ordered descriptor or descriptor list.'; + const storedBefore = structuredClone(restored); + assert.equal( + predecessorIssues(restored, historicalRegistry).length, + 1, + 'The old public metadata reproduces the false Add Lora advisory.', + ); + assert.deepEqual(predecessorIssues(restored), [], 'A saved singleton uses current explicit optional metadata.'); + assert.deepEqual(restored, storedBefore, 'Inspection must not rewrite the restored contract.'); + } + + const caseWithChain = cases.get('flux_lora_cinematic_octane_3d'); + const root = caseWithChain.graph.nodes.find((node) => groups.visualOperationGroup(node) === 'setup'); + const ordered = adapters.modelSetupAdapterChain(caseWithChain.graph, root.id).adapters.map((node) => node.id); + assert.equal(ordered.length, 2); + const chain = groups.unpackVisualOperationGroups(caseWithChain.graph).graph; + assert.ok( + chain.edges.some( + (edge) => + edge.source === ordered[0] && + edge.sourceHandle === 'lora' && + edge.target === ordered[1] && + edge.targetHandle === 'previous_loras', + ), + ); + assert.equal( + chain.edges.some((edge) => edge.target === ordered[0] && edge.targetHandle === 'previous_loras'), + false, + ); + const chainBefore = structuredClone(chain); + assert.deepEqual( + predecessorIssues(chain), + [], + 'An ordered chain keeps its first adapter optional and its second wire intact.', + ); + assert.deepEqual(chain, chainBefore); + + // A genuine discovered required socket remains blocking. Optional chaining + // must not weaken the normal required-input contract for model consumers. + const encoder = createNodeFromRegistry('modules.ModularDiffusers.EncodePrompt', fixture.registry, { x: 0, y: 0 }); + assert.ok(encoder); + assert.equal(encoder.data.params.text_encoders.required, true); + const requiredIssues = inspectRequiredGraphInputs([encoder], { nodes: [encoder], edges: [] }, fixture.registry); + assert.ok( + requiredIssues.some((issue) => issue.nodeId === encoder.id && issue.fieldId === 'text_encoders' && issue.blocking), + ); +}); diff --git a/scripts/modiff-template.test.mjs b/scripts/modiff-template.test.mjs index e7547735..675e3e39 100644 --- a/scripts/modiff-template.test.mjs +++ b/scripts/modiff-template.test.mjs @@ -26,6 +26,7 @@ let outputContractsModule; let nodesStoreModule; let studioStoreModule; let templateQualityModule; +let approvedRetainedPromptById; let templateAssetsModule; let modelCacheModule; let templateExactnessModule; @@ -105,6 +106,13 @@ before(async () => { nodesStoreModule = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); studioStoreModule = await server.ssrLoadModule('/src/stores/useStudioStore.ts'); templateQualityModule = await server.ssrLoadModule('/src/studio/templateQuality.ts'); + const { APPROVED_RETAINED_BATCH } = await server.ssrLoadModule('/scripts/retained-gallery-recipes.ts'); + approvedRetainedPromptById = new Map( + APPROVED_RETAINED_BATCH.map(({ template }) => [ + template.id, + { prompt: template.prompt, negativePrompt: template.negativePrompt }, + ]), + ); templateAssetsModule = await server.ssrLoadModule('/src/studio/templateAssets.ts'); modelCacheModule = await server.ssrLoadModule('/src/studio/modelCache.ts'); templateExactnessModule = await server.ssrLoadModule('/src/studio/templateExactness.ts'); @@ -169,6 +177,31 @@ test('an installed Expert-only artifact remains ready in Model Manager without a assert.equal(autoResourceModule.modelInstallIsReady(false, expertOnlyPlan), false); }); +test('model Ready detail follows complete Auto artifacts instead of an incomplete install destination', () => { + const missing = 'The installed snapshot does not include the exact revision and files required by this workflow'; + const plan = { + error: false, + selectedCandidate: { + id: 'complete-external-snapshot', + installed: true, + artifactStatus: { installed: true, complete: true }, + artifactValidation: { repairRequired: false }, + }, + }; + assert.equal(autoResourceModule.modelInstallIsReady(false, plan), true); + assert.equal( + autoResourceModule.modelInstallReadyReason(false, missing, plan), + 'Required model artifacts are complete and available for this workflow.', + ); + assert.equal( + autoResourceModule.modelInstallReadyReason(true, 'Available in the configured cache', plan), + 'Available in the configured cache', + ); + const incomplete = { ...plan, selectedCandidate: { ...plan.selectedCandidate, artifactStatus: { complete: false } } }; + assert.equal(autoResourceModule.modelInstallIsReady(false, incomplete), false); + assert.equal(autoResourceModule.modelInstallReadyReason(false, missing, incomplete), null); +}); + test('every public Studio template resolves an exact canonical workflow contract', async () => { const manifest = JSON.parse( await readFile(path.join(ROOT, '..', 'MoDiff', 'data', 'workflow-library-manifest.json'), 'utf8'), @@ -1028,6 +1061,19 @@ test('final direct image and LTX2 routes stay additive, Expert-only, and media t ]); }); +test('outpaint uses the selected model canvas defaults and keeps other task defaults', () => { + const defaults = profilesModule.getFormDefaultsForMode('outpaint', 'ChromaInpaintPipeline'); + assert.deepEqual([defaults.width, defaults.height, defaults.aspectRatio], [1024, 768, '4:3']); + assert.deepEqual( + [defaults.outpaintLeft, defaults.outpaintRight, defaults.outpaintOverlap, defaults.outpaintFeather], + [96, 96, 48, 16], + ); + const inpaint = profilesModule.getFormDefaultsForMode('inpaint', 'ChromaInpaintPipeline'); + assert.deepEqual([inpaint.width, inpaint.height, inpaint.outpaintLeft], [1024, 1024, 256]); + const other = profilesModule.getFormDefaultsForMode('outpaint', 'ZImageInpaintPipeline'); + assert.deepEqual([other.width, other.height, other.outpaintLeft, other.outpaintRight], [1344, 768, 256, 256]); +}); + test('generic direct outpaint and synchronized LTX2 workflows infer exact modes and fields', () => { const node = (id, module, action, studioRole, params = {}) => ({ id, @@ -1159,6 +1205,13 @@ test('direct layers and dual-video workflows infer generic fields and block inco layerMessages.some((message) => /layer count/i.test(message)), true, ); + const layerIssues = runReadinessModule.collectRunReadinessIssues({ sid: 'contract-test', isConnected: true }); + const resolutionIssue = layerIssues.find((item) => /layer resolution/i.test(item.message)); + assert.equal(resolutionIssue?.action, 'edit_studio_field'); + assert.equal(resolutionIssue?.fieldId, 'width'); + const countIssue = layerIssues.find((item) => /layer count/i.test(item.message)); + assert.equal(countIssue?.action, 'edit_studio_field'); + assert.equal(countIssue?.fieldId, 'layers'); } finally { nodesStoreModule.useNodesStore.setState({ studioModelCapabilities: previousNodes.studioModelCapabilities, @@ -1395,6 +1448,40 @@ test('Whisper Tiny exposes generic transcription and translation contracts', () assert.equal(translation.mode, 'speech_translation'); }); +test('reopening a shared transcriber follows its wired loader and preserves both timing choices', async () => { + const saved = async (family) => + JSON.parse( + await readFile(path.join(ROOT, '..', 'MoDiff', 'data/graphs/studio', family, 'speech-to-text.json'), 'utf8'), + ); + const whisper = await saved('hugging-face-speech-recognition-model'); + const ctc = await saved('hugging-face-ctc-speech-recognition-model'); + const loader = ctc.nodes.find((node) => node.data.studioRole === 'speechModel'); + loader.id = 'alternative'; + const stage = whisper.nodes.find((node) => node.data.studioRole === 'transcribeAudio'); + Object.assign(stage.data.params, { + task: { value: 'translate' }, + language: { value: 'French' }, + timestamps: { value: 'segment' }, + ctc_timestamps: { value: 'none' }, + }); + whisper.nodes.push(loader); + const wire = whisper.edges.find((edge) => edge.target === stage.id && edge.targetHandle === 'model'); + const originalSource = wire.source; + const settings = structuredClone(stage.data.params); + for (const source of [loader.id, originalSource, loader.id]) { + wire.source = source; + const { studioForm } = workflowInferenceModule.workflowSnapshotFromGraph(whisper, 'default'); + assert.equal( + studioForm.modelType, + source === loader.id ? 'HuggingFaceCTCSpeechRecognitionModel' : 'HuggingFaceSpeechRecognitionModel', + ); + assert.equal(studioForm.mode, source === loader.id ? 'speech_to_text' : 'speech_translation'); + assert.equal(studioForm.speechTimestamps, source === loader.id ? 'none' : 'segment'); + assert.equal(studioForm.speechLanguage, source === loader.id ? '' : 'French'); + } + assert.deepEqual(stage.data.params, settings); +}); + test('equivalent Modular Diffusers Cluster identities retain their exact standard execution profiles', () => { const expected = { ErnieImageModularPipeline: { @@ -1624,6 +1711,8 @@ test('run readiness blocks unsupported backend modes in Auto and warns in Expert .find((item) => item.code === 'backend_mode_unsupported'); assert.equal(autoIssue?.blocking, true); assert.equal(autoIssue?.severity, 'error'); + assert.equal(autoIssue?.action, 'edit_studio_field'); + assert.equal(autoIssue?.fieldId, 'mode'); } finally { nodesStoreModule.useNodesStore.setState({ studioModelCapabilities: previousCapabilities, @@ -1765,6 +1854,7 @@ test('optional runtime readiness is exact-mode scoped and base delivery stays ne assert.equal(issue?.blocking, false); assert.equal(issue?.severity, 'warning'); assert.equal(issue?.action, 'open_setup'); + assert.deepEqual(issue?.runtimeProfileIds, required.profileIds); assert.match(issue?.message ?? '', /reviewed optional runtime/i); } finally { nodesStoreModule.useNodesStore.setState({ @@ -1777,6 +1867,53 @@ test('optional runtime readiness is exact-mode scoped and base delivery stays ne } }); +test('Run recovery points temporary planning and invalid control values to their real review surfaces', () => { + const beforeStudio = studioStoreModule.useStudioStore.getState(); + const beforeNodes = nodesStoreModule.useNodesStore.getState(); + const beforeFlow = flowStoreModule.useFlowStore.getState(); + try { + nodesStoreModule.useNodesStore.setState({ + studioModelCapabilities: [], + studioModelCapabilitiesAuthoritative: false, + }); + flowStoreModule.useFlowStore.setState({ nodes: [], edges: [] }); + const form = { + ...profilesModule.getFormDefaultsForMode('control_union_image', 'StableDiffusionXLModularPipeline'), + resourceMode: 'auto', + controlMode: 6, + }; + studioStoreModule.useStudioStore.setState({ + form, + graphBinding: null, + autoResourcePlan: { error: true, status: 'needs_setup', message: 'Planner unavailable' }, + }); + const issues = runReadinessModule.collectRunReadinessIssues({ sid: 'test-session', isConnected: true }); + const control = issues.find((item) => item.code === 'control_mode_invalid'); + assert.equal(control?.blocking, true); + assert.equal(control?.action, 'edit_studio_field'); + assert.equal(control?.fieldId, 'controlMode'); + const planning = issues.find((item) => item.code === 'auto_plan_not_ready'); + assert.equal(planning?.blocking, true); + assert.equal(planning?.action, 'open_resources'); + assert.deepEqual(studioStoreModule.useStudioStore.getState().form, form); + const offload = runReadinessModule.getStudioDeviceOffloadIssue({ + ...form, + device: 'cpu:0', + autoOffload: true, + offloadMode: 'model_cpu', + }); + assert.equal(offload?.action, 'edit_studio_field'); + assert.equal(offload?.fieldId, 'offloadMode'); + } finally { + studioStoreModule.useStudioStore.setState(beforeStudio); + nodesStoreModule.useNodesStore.setState({ + studioModelCapabilities: beforeNodes.studioModelCapabilities, + studioModelCapabilitiesAuthoritative: beforeNodes.studioModelCapabilitiesAuthoritative, + }); + flowStoreModule.useFlowStore.setState({ nodes: beforeFlow.nodes, edges: beforeFlow.edges }); + } +}); + test('optional runtime readiness mirrors repository disambiguation for shared loaders', () => { const nodesState = nodesStoreModule.useNodesStore.getState(); const studioState = studioStoreModule.useStudioStore.getState(); @@ -2426,6 +2563,67 @@ test('device rebasing only changes declared device parameters', () => { assert.equal(rebased.metadata.preferredLabel, 'cuda:0'); }); +test('ordinary graph imports preserve authored per-node devices and defaults independently of the current form', async (t) => { + for (const device of ['cpu:0', 'cuda:1', 'mps:0', 'xpu:0']) { + await t.test(device, () => { + const graph = canonicalModularTextToImageGraph(); + const loader = graph.nodes.find((node) => node.id === 'models'); + const preview = graph.nodes.find((node) => node.id === 'preview'); + // An ordinary operation graph owns its values, even when its shape also + // resembles a historical managed template. + loader.data.operationAuthoring = { schemaVersion: 1 }; + loader.data.params.device = { value: device, default: 'cpu:0' }; + preview.data.params.device = { value: 'cpu:0', default: 'cpu' }; + preview.data.params.notes = { value: 'cuda:0' }; + const original = structuredClone(graph); + + const snapshot = workflowInferenceModule.workflowSnapshotFromGraph(graph, 'smoothstep', { + ...profilesModule.DEFAULT_STUDIO_FORM, + device: 'cuda:0', + }); + + assert.equal(snapshot.studioGraphBinding, null); + assert.deepEqual(snapshot.nodes, graph.nodes); + assert.deepEqual( + snapshot.edges, + graph.edges.map((edge) => ({ ...edge, type: 'smoothstep' })), + ); + assert.deepEqual(snapshot.viewport, graph.viewport); + assert.equal(snapshot.studioForm.device, device, 'The imported loader supplies the form summary.'); + assert.deepEqual(graph, original, 'Import must not mutate the source graph.'); + snapshot.nodes[0].data.params.device.value = 'cpu'; + assert.deepEqual(graph, original, 'The imported snapshot must not share mutable node data with its source.'); + }); + } +}); + +test('ordinary graph imports leave missing and malformed device fields intact while inferring a fallback summary', async (t) => { + for (const params of [ + {}, + { device: { value: undefined, default: 'cpu:0' } }, + { device: { value: null, default: null } }, + { device: { value: '', default: '' } }, + { device: { value: 0, default: false } }, + ]) { + await t.test(JSON.stringify(params), () => { + const graph = canonicalModularTextToImageGraph(); + const loader = graph.nodes.find((node) => node.id === 'models'); + loader.data.operationAuthoring = { schemaVersion: 1 }; + Object.assign(loader.data.params, params); + const original = JSON.parse(JSON.stringify(graph)); + + const snapshot = workflowInferenceModule.workflowSnapshotFromGraph(graph, 'smoothstep', { + ...profilesModule.DEFAULT_STUDIO_FORM, + device: 'cuda:0', + }); + + assert.deepEqual(snapshot.nodes, original.nodes, 'Summary inference must not repair saved node values.'); + assert.equal(snapshot.studioForm.device, params.device?.default === 'cpu:0' ? 'cpu:0' : 'cuda:0'); + assert.deepEqual(JSON.parse(JSON.stringify(graph)), original); + }); + } +}); + test('role-marked generated Studio workflow imports retain their managed contract', () => { const graph = canonicalModularTextToImageGraph(); graph.nodes = graph.nodes.map((node, index) => ({ @@ -2551,6 +2749,106 @@ test('existing saved canonical imports are adopted during workflow-tab normaliza } }); +test('explicit whole image imports keep ordinary graph authority without inventing a managed receipt', async () => { + const graph = JSON.parse( + await readFile( + path.resolve(ROOT, '../MoDiff/data/graphs/studio/marigold-depth-pipeline/depth-estimation.json'), + 'utf8', + ), + ); + const previousStudio = studioStoreModule.useStudioStore.getState(); + const previousFlow = flowStoreModule.useFlowStore.getState(); + try { + const importedId = studioStoreModule.useStudioStore.getState().createWorkflowTab( + 'Depth', + { + nodes: graph.nodes, + edges: graph.edges, + studioForm: profilesModule.DEFAULT_STUDIO_FORM, + studioGraphBinding: null, + selectedMode: 'text_to_image', + activeTemplateId: null, + sourceOutputId: null, + }, + 'import', + ); + const snapshot = studioStoreModule.useStudioStore.getState().workflowTabs.find((t) => t.id === importedId).snapshot; + assert.equal(snapshot.studioGraphBinding, null); + assert.equal(snapshot.studioForm.mode, 'depth_estimation'); + assert.equal(snapshot.studioForm.modelType, 'MarigoldDepthPipeline'); + assert.deepEqual(snapshot.edges, graph.edges); + for (const node of graph.nodes) { + assert.deepEqual(snapshot.nodes.find((n) => n.id === node.id).data.params, node.data.params); + } + const binding = workflowInferenceModule.adoptManagedWorkflowGraph( + graph.nodes, + graph.edges, + snapshot.studioForm, + ).binding; + studioStoreModule.useStudioStore.getState().mergeBackendWorkflow({ + id: 'explicit-image-receipt', + title: 'Explicit', + createdAt: 1, + updatedAt: 1, + dirty: false, + source: 'import', + backendRevision: 1, + snapshot: { ...snapshot, studioGraphBinding: { ...binding, finalizationProofInvalid: true } }, + }); + const explicit = studioStoreModule.useStudioStore + .getState() + .workflowTabs.find((t) => t.id === 'explicit-image-receipt'); + assert.equal(explicit.snapshot.studioGraphBinding.finalizationProofInvalid, true); + } finally { + flowStoreModule.useFlowStore.setState(previousFlow); + studioStoreModule.useStudioStore.setState(previousStudio); + } +}); + +test('saved whole image hydration preserves its recognized form while keeping the exact ordinary graph', async () => { + const graph = JSON.parse( + await readFile( + path.resolve(ROOT, '../MoDiff/data/graphs/studio/marigold-depth-pipeline/depth-estimation.json'), + 'utf8', + ), + ); + const previousStudio = studioStoreModule.useStudioStore.getState(); + const previousFlow = flowStoreModule.useFlowStore.getState(); + const savedForm = { ...profilesModule.DEFAULT_STUDIO_FORM, prompt: 'Retain this saved form', seed: 321 }; + try { + studioStoreModule.useStudioStore.getState().mergeBackendWorkflow({ + id: 'saved-ordinary-depth', + title: 'Saved depth graph', + createdAt: 1, + updatedAt: 1, + source: 'import', + revision: 1, + snapshot: { + nodes: graph.nodes, + edges: graph.edges, + studioForm: savedForm, + studioGraphBinding: null, + selectedMode: savedForm.mode, + activeTemplateId: null, + sourceOutputId: null, + }, + }); + const snapshot = studioStoreModule.useStudioStore + .getState() + .workflowTabs.find((t) => t.id === 'saved-ordinary-depth').snapshot; + assert.deepEqual(snapshot.studioForm, savedForm); + assert.equal(snapshot.selectedMode, savedForm.mode); + assert.equal(snapshot.studioGraphBinding, null); + assert.deepEqual(snapshot.edges, graph.edges); + for (const node of graph.nodes) { + assert.deepEqual(snapshot.nodes.find((n) => n.id === node.id).data.params, node.data.params); + } + } finally { + flowStoreModule.useFlowStore.setState(previousFlow); + studioStoreModule.useStudioStore.setState(previousStudio); + } +}); + test('persisted inferred bindings self-repair stale model metadata from canonical nodes', () => { const graph = canonicalModularTextToImageGraph(); const modelNode = graph.nodes.find((node) => node.id === 'models'); @@ -2624,9 +2922,19 @@ test('persisted inferred bindings self-repair stale model metadata from canonica } }); -test('template prompts are unique, detailed, and not generic placeholders', () => { - const prompts = templatesModule.STUDIO_TEMPLATES.map((template) => template.prompt); - assert.equal(new Set(prompts).size, prompts.length); +test('template prompt recipes are distinct, detailed, and not generic placeholders', () => { + // A retained comparison may use the same prompt with distinct pinned models. + // Duplicate authoring authority within the same model/task is still refused. + const recipes = templatesModule.STUDIO_TEMPLATES.map((template) => + JSON.stringify([ + template.modelType, + template.mode, + template.modelArtifact, + template.executionSelection?.executionProfileId, + template.prompt, + ]), + ); + assert.equal(new Set(recipes).size, recipes.length); const weakFragments = [ 'one clear subject, cinematic lighting', @@ -2639,14 +2947,59 @@ test('template prompts are unique, detailed, and not generic placeholders', () = assert.ok(template.intentGroup, `${template.id} has an intent group`); assert.ok(template.recipeSummary, `${template.id} has a recipe summary`); assert.ok(template.mediaSlots?.length > 0, `${template.id} has media placeholders`); - if (template.promptQualityPolicy === 'adapter_reference') { + const retained = approvedRetainedPromptById.get(template.id); + if (retained) { + // Authoring guidance must not rewrite conditioning from an approved execution. + assert.deepEqual({ prompt: template.prompt, negativePrompt: template.negativePrompt }, retained); + if ( + ['unconditional_image', 'speech_translation', 'video_upscale'].includes(template.mode) || + (template.mode === 'image_to_video' && template.modelType === 'StableVideoDiffusionPipeline') + ) { + assert.equal(template.prompt, '', `${template.id} keeps its prompt-free task contract`); + } else if (template.id === 'pixart_sigma_pag_pink_mascot') { + assert.equal(template.prompt, '', 'The PAG preview preserves the original blank-prompt run.'); + assert.equal(template.example.lockedSettings.pagScale, 4); + } else { + assert.ok(template.prompt.trim(), `${template.id} retains the recorded prompt`); + } + continue; + } + const backendDefaultPrompt = + !template.prompt && template.executionSelection?.backendDefaultInputs?.includes('prompt'); + if (backendDefaultPrompt) { + const pendingAudit = templateQualityModule.auditTemplateQuality(template); + assert.equal(pendingAudit.promptResolution, 'unresolved_backend_default'); + assert.equal(pendingAudit.passed, false, `${template.id} needs its actual backend starter audit`); + assert.deepEqual( + pendingAudit.issues.map((issue) => issue.code), + ['unresolved_backend_default'], + ); + } else if (template.promptQualityPolicy === 'raw_layout_reference') { + assert.equal(template.mode, 'text_to_image'); + assert.ok(template.prompt.length >= 40); + assert.equal(templateQualityModule.auditTemplateQuality(template).passed, true); + } else if (template.promptQualityPolicy === 'adapter_reference') { assert.equal(template.category, 'lora', `${template.id} adapter reference prompts are limited to LoRA recipes`); assert.ok(template.prompt.length >= 20, `${template.id} retains a meaningful adapter reference prompt`); + } else if (template.mode === 'depth_estimation' || template.mode === 'image_upscale') { + assert.equal(template.prompt, '', `${template.id} uses only a source image`); + } else if (templateQualityModule.classifyTemplateQualityKind(template) === 'speech_recognition') { + assert.equal(template.prompt, '', `${template.id} reads source audio without a prompt`); + assert.ok( + template.inputBindings?.some((binding) => binding.origin === 'user' && binding.field === 'sourceAudio'), + ); + } else if (template.mode === 'text_generation') { + assert.ok(template.prompt.trim(), `${template.id} asks the text model a question`); } else { assert.ok(template.prompt.length >= 120, `${template.id} prompt is detailed`); } const audit = templateQualityModule.auditTemplateQuality(template); - assert.deepEqual(audit.issues, [], `${template.id} has a modality-complete prompt and model-aware negative policy`); + if (!backendDefaultPrompt) + assert.deepEqual( + audit.issues, + [], + `${template.id} has a modality-complete prompt and model-aware negative policy`, + ); for (const fragment of weakFragments) { assert.equal( template.prompt.toLowerCase().includes(fragment), @@ -2724,7 +3077,7 @@ test('LTX templates use the qualified 13B distilled execution contract', () => { : template.id === 'ltx_video_multi_reference' ? 81 : template.id === 'ltx_video_video_to_video' - ? 81 + ? 25 : 161; assert.equal( template.example.lockedSettings.numFrames, @@ -2780,8 +3133,17 @@ test('LTX templates use the qualified 13B distilled execution contract', () => { ); }); -test('every published template exposes a hardware-aware loader reuse contract for family batches', () => { +test('published templates declare loader reuse only where the workflow has a reusable loader', () => { for (const template of templatesModule.STUDIO_TEMPLATES) { + if (template.mode === 'image_upscale' && template.modelType === 'SpandrelImageUpscale') { + assert.deepEqual(template.requiredBackendCapabilities, [ + 'modules.Image.Load', + 'modules.Spandrel.Upscaler', + 'modules.Image.Preview', + ]); + assert.equal(template.runtimeReuseKey, undefined, `${template.id} loads its checkpoint in the upscaler`); + continue; + } assert.ok(template.runtimeReuseKey, `${template.id} has a loader reuse key`); } @@ -3170,6 +3532,12 @@ test('Wan VACE execution pins the app-installed immutable model revision', () => test('qualified Wan gallery proofs use native five-second shots without reducing recommended steps', () => { for (const template of [...templatesModule.STUDIO_TEMPLATES, ...templatesModule.PLANNING_STUDIO_TEMPLATES]) { if (!template.id.startsWith('wan_')) continue; + if (template.example?.retainedVideoPreview) { + // The Gallery can replay a reviewed native run with its original prompt. + // All default Wan showcases still use the common negative prompt guard. + assert.match(template.example.retainedVideoPreview.mediaHash, /^sha256:decoded-video-framemd5:[a-f0-9]{64}$/u); + continue; + } assert.match(template.negativePrompt, /deformity/i, `${template.id} includes the shared deformity guard`); } @@ -3847,31 +4215,31 @@ test('ACE templates lock musical structure, metadata, and model-aware negative b for (const template of templates) { const locked = template.example.lockedSettings; - assert.equal(locked.steps, 8); - assert.equal(locked.guidanceScale, 1); + const isBaseCover = template.id === 'ace_step_audio_variation'; + assert.equal(locked.steps, isBaseCover ? 50 : 8); + assert.equal(locked.guidanceScale, isBaseCover ? 7 : 1); + if (isBaseCover) { + assert.equal(template.modelArtifact.value, 'ACE-Step/acestep-v15-xl-base-diffusers'); + assert.equal(template.modelArtifact.revision, '8f40447d21ee59ad4dcee6c99ce248027410bfec'); + } assert.equal(locked.shift, 3); const expectedBpm = template.id === 'ace_step_lyric_music_video' - ? 100 + ? 96 : template.id === 'ace_step_chinese_new_year_lora' ? 96 : template.id === 'ace_step_custom_lora' ? 92 : 170; - const expectedKey = - template.id === 'ace_step_chinese_new_year_lora' - ? 'D major' - : template.id === 'ace_step_custom_lora' - ? 'A minor' - : 'C# minor'; + const expectedKey = ['ace_step_chinese_new_year_lora', 'ace_step_lyric_music_video'].includes(template.id) + ? 'D major' + : template.id === 'ace_step_custom_lora' + ? 'A minor' + : 'C# minor'; assert.equal(locked.bpm, expectedBpm); assert.equal(locked.keyscale, expectedKey); const expectedTimeSignature = - template.id === 'ace_step_text_to_audio' || template.id === 'ace_step_audio_continuation' - ? '3' - : template.id === 'ace_step_lyric_music_video' - ? '4' - : '4/4'; + template.id === 'ace_step_text_to_audio' || template.id === 'ace_step_audio_continuation' ? '3' : '4/4'; assert.equal(locked.timesignature, expectedTimeSignature); assert.equal(template.negativePrompt, ''); } @@ -3891,32 +4259,28 @@ test('ACE templates lock musical structure, metadata, and model-aware negative b const lyricVideo = templates.find((template) => template.id === 'ace_step_lyric_music_video'); assert.ok(lyricVideo.workflowBlocks.includes('lyric_video')); assert.ok(lyricVideo.example.expectedOutput.durationSeconds >= 20); - assert.equal(lyricVideo.example.lockedSeed, 1201047366); - assert.equal(lyricVideo.example.lockedSettings.audioDuration, 30); + assert.equal(lyricVideo.example.lockedSeed, 20261106); + assert.equal(lyricVideo.example.lockedSettings.audioDuration, 45); assert.equal(lyricVideo.example.expectedOutput.requiresAudio, true); assert.ok(lyricVideo.requiredBackendCapabilities.includes('modules.Audio.FitDuration')); assert.deepEqual(lyricVideo.workflowBlockSettings.lyricVideo.audioFit, { sourceStartSeconds: 0, - sourceDurationSeconds: 30, - targetDurationSeconds: 381 / 16, + sourceDurationSeconds: 45, + targetDurationSeconds: 45, delaySeconds: 0, targetSampleRate: 48000, fadeInSeconds: 0, fadeOutSeconds: 0, }); - assert.equal(lyricVideo.workflowBlockSettings.lyricVideo.audio.seed, 1201047366); - assert.equal(lyricVideo.workflowBlockSettings.lyricVideo.audio.bpm, 100); - assert.match(lyricVideo.workflowBlockSettings.lyricVideo.audio.lyrics, /^\[Verse\]/); + assert.equal(lyricVideo.workflowBlockSettings.lyricVideo.audio.seed, 20261106); + assert.equal(lyricVideo.workflowBlockSettings.lyricVideo.audio.bpm, 96); + assert.match(lyricVideo.workflowBlockSettings.lyricVideo.audio.lyrics, /^\[verse\]/); + assert.equal(lyricVideo.workflowBlockSettings.lyricVideo.lrc, ''); + const scenes = JSON.parse(lyricVideo.workflowBlockSettings.lyricVideo.promptsJson); + assert.equal(scenes.length, 9); assert.equal( - lyricVideo.workflowBlockSettings.lyricVideo.lrc, - [ - '[00:00.00]Daylight leaves the garden wall', - '[00:03.26]Silver buds begin to call', - '[00:07.44]White petals turn into the night', - '[00:11.38]Every vine unfolds its light', - '[00:15.08]Stars grow pale above the lawn', - '[00:18.90]Moonflowers hold until the dawn', - ].join('\n'), + scenes.reduce((total, shot) => total + shot.reference_count, 0), + 10, ); const textToAudio = templates.find((template) => template.mode === 'text_to_audio'); @@ -4073,6 +4437,34 @@ test('ACE templates lock musical structure, metadata, and model-aware negative b ); }); +test('template search puts exact card, recipe and model names ahead of incidental prompt matches', () => { + const { STUDIO_TEMPLATES } = templatesModule; + const { filterStudioTemplates, templateModelDisplayName } = browserModule; + const form = profilesModule.DEFAULT_STUDIO_FORM; + const filter = { category: 'all', modelType: 'all', difficulty: 'all', sort: 'recommended' }; + const exactText = STUDIO_TEMPLATES.find((item) => item.id === 'qwen_text_rendering'); + const preview = STUDIO_TEMPLATES.find((item) => item.id === 'low_vram'); + assert.ok(exactText && preview); + const queryCatalog = (query) => filterStudioTemplates(STUDIO_TEMPLATES, form, { ...filter, query }); + for (const query of [exactText.label, 'Exact Text', 'QWEN_text_rendering']) { + assert.equal(queryCatalog(query)[0].id, exactText.id, query); + } + assert.equal(queryCatalog('Quick Preview')[0].id, preview.id); + + const model = templateModelDisplayName(exactText); + const promptMatch = { + ...preview, + prompt: `Reference lighting from ${model} (${exactText.modelType}). Exact text on a small sign.`, + }; + const recipes = [promptMatch, exactText]; + const search = (query, sort = 'recommended') => + filterStudioTemplates(recipes, form, { ...filter, query, sort }, (item) => (item === promptMatch ? 1 : 15)); + assert.deepEqual(search(model), [exactText, promptMatch]); + assert.deepEqual(search(exactText.modelType), [exactText, promptMatch]); + assert.deepEqual(search('Exact Text'), [exactText, promptMatch]); + assert.deepEqual(search('Exact Text', 'runtime'), [promptMatch, exactText]); +}); + test('template browser exposes the complete workflow catalog across task and adapter categories', () => { const { STUDIO_TEMPLATES } = templatesModule; const { TEMPLATE_BROWSER_CATEGORIES, filterStudioTemplates, templateCategoryId, templateCategoryIds } = browserModule; @@ -4083,19 +4475,32 @@ test('template browser exposes the complete workflow catalog across task and ada [ 'recommended', 'all', - 'experimental', 'getting-started', 'image', 'edit', - 'control', 'video', 'audio', + 'text', + '3d', + 'control', 'adapters', 'upscale', 'performance', + 'experimental', ], ); + const crossField = { category: 'all', modelType: 'all', difficulty: 'all', sort: 'recommended' }; + for (const query of ['tabby minimax', 'MINIMAX / tabby']) { + assert.ok( + filterStudioTemplates(STUDIO_TEMPLATES, form, { ...crossField, query }).some( + (recipe) => recipe.id === 'minimax_h3_image_old_town_cat', + ), + query, + ); + } + assert.deepEqual(filterStudioTemplates(STUDIO_TEMPLATES, form, { ...crossField, query: '///' }), []); + const imageTemplates = filterStudioTemplates(STUDIO_TEMPLATES, form, { category: 'image', query: '', @@ -4107,6 +4512,27 @@ test('template browser exposes the complete workflow catalog across task and ada assert.ok(imageTemplates.every((template) => templateCategoryIds(template).includes('image'))); assert.ok(imageTemplates.some((template) => template.id === 'flux_lora_oil_painting')); assert.ok(imageTemplates.some((template) => template.id === 'flux_lora_retro_comic')); + assert.ok(imageTemplates.every((template) => template.id !== 'smollm2_rain_gauge')); + assert.deepEqual( + filterStudioTemplates(STUDIO_TEMPLATES, form, { + category: 'upscale', + query: 'synthetic gradient', + modelType: 'all', + difficulty: 'all', + sort: 'recommended', + }).map(({ id }) => id), + ['spandrel_x2_synthetic_gradient'], + ); + assert.deepEqual( + filterStudioTemplates(STUDIO_TEMPLATES, form, { + category: 'text', + query: 'rain gauge', + modelType: 'all', + difficulty: 'all', + sort: 'recommended', + }).map(({ id }) => id), + ['smollm2_rain_gauge'], + ); const adapterTemplates = filterStudioTemplates(STUDIO_TEMPLATES, form, { category: 'adapters', @@ -4116,9 +4542,14 @@ test('template browser exposes the complete workflow catalog across task and ada difficulty: 'all', sort: 'recommended', }); - const authoredAdapterIds = STUDIO_TEMPLATES.filter((template) => template.category === 'lora').map( - (template) => template.id, - ); + const visible = (template) => + profilesModule.isStudioModelVisibleInCatalog(template.modelType, { + currentModelType: form.modelType, + includeWorkflowOnly: true, + }); + const authoredAdapterIds = STUDIO_TEMPLATES.filter( + (template) => template.category === 'lora' && visible(template), + ).map((template) => template.id); assert.deepEqual( authoredAdapterIds.filter((templateId) => !adapterTemplates.some((template) => template.id === templateId)), [], @@ -4156,18 +4587,232 @@ test('template browser exposes the complete workflow catalog across task and ada difficulty: 'all', sort: 'recommended', }); - assert.equal(completeInventory.length, STUDIO_TEMPLATES.length); + assert.deepEqual( + completeInventory.map((template) => template.id).sort(), + STUDIO_TEMPLATES.filter((template) => visible(template) || browserModule.hasDeclaredExperimentalCreator(template)) + .map((template) => template.id) + .sort(), + ); assert.ok(completeInventory.length >= defaultInventory.length); }); -test('every template name identifies its exact model and operation', () => { +test('Advanced recipes are also discoverable under their tasks while runtime qualifications remain unchanged', () => { + const { STUDIO_TEMPLATES, PLANNING_STUDIO_TEMPLATES } = templatesModule; + const planning = STUDIO_TEMPLATES.filter((template) => /^flux3_klein(?:_base)?_fp8r512_/.test(template.id)); + assert.equal(planning.length, 10); + assert.equal( + PLANNING_STUDIO_TEMPLATES.some((template) => /^flux3_klein(?:_base)?_fp8r512_/.test(template.id)), + false, + ); + const before = JSON.stringify(planning); + const form = profilesModule.DEFAULT_STUDIO_FORM; + const filter = { + category: 'experimental', + includeBlocked: true, + query: '', + modelType: 'all', + mode: 'all', + difficulty: 'all', + sort: 'recommended', + }; + const shown = (entries, changes = {}) => + browserModule.filterStudioTemplates(entries, form, { ...filter, ...changes }); + assert.deepEqual( + shown(planning) + .map(({ id }) => id) + .sort(), + planning.map(({ id }) => id).sort(), + ); + assert.equal(shown(planning, { query: 'FLUX 3' }).length, 10); + assert.equal(shown(planning, { query: 'Ceramic Radio' }).length, 2); + assert.equal(shown(planning, { mode: 'text_to_image' }).length, 6); + assert.equal(shown(planning, { modelType: 'Flux3ModularPipeline' }).length, 5); + assert.equal(shown(planning, { includeBlocked: false }).length, 10); + assert.equal(shown(planning, { difficulty: 'starter' }).length, 0); + for (const category of ['all', 'recommended', 'image', 'edit', 'adapters']) + assert.equal( + shown(STUDIO_TEMPLATES, { category }).some((item) => planning.includes(item)), + true, + ); + for (const template of planning) { + assert.equal( + profilesModule.isStudioModelVisibleInCatalog(template.modelType, { includeWorkflowOnly: true }), + false, + ); + assert.equal(template.difficulty, 'advanced'); + assert.equal(template.example.status, 'unverified'); + assert.equal(template.readinessPolicy, template.inputRequirements ? 'requires_input' : 'runnable'); + } + assert.equal(JSON.stringify(planning), before); +}); + +test('category features and model choices come from the visible recipes and their reviewed outputs', () => { const { STUDIO_TEMPLATES } = templatesModule; - const { STUDIO_MODEL_LABELS } = profilesModule; - for (const template of STUDIO_TEMPLATES) { + const { templateCategoryIds, templateModelOptions, filterStudioTemplates, featuredCategoryTemplate } = browserModule; + const options = { category: 'all', query: '', modelType: 'all', difficulty: 'all', sort: 'recommended' }; + const form = profilesModule.DEFAULT_STUDIO_FORM; + const all = filterStudioTemplates(STUDIO_TEMPLATES, form, options); + for (const { value, label } of templateModelOptions(all)) { + const matches = filterStudioTemplates(all, form, { ...options, modelType: value }); + assert.ok(matches.length, label); assert.ok( - template.label.startsWith(`${STUDIO_MODEL_LABELS[template.modelType]} — `), - `${template.id} must begin with its model name`, + matches.every((item) => browserModule.templateModelDisplayName(item) === label), + label, + ); + } + const minimax = templateModelOptions(all).filter(({ label }) => /minimax/i.test(label)); + assert.equal(minimax.length, 2); + const lookup = (id) => all.find((item) => item.id === id); + const starters = filterStudioTemplates(all, form, { ...options, category: 'getting-started' }); + assert.deepEqual( + starters, + all.filter((item) => item.difficulty === 'starter'), + ); + assert.ok(starters.some((item) => item.mode === 'speech_to_text')); + const lowMemory = filterStudioTemplates(all, form, { ...options, category: 'performance' }); + assert.deepEqual(lowMemory.map((item) => item.id).sort(), [ + 'low_vram', + 'qwen_low_vram_poster_layout', + 'qwen_low_vram_product_concept', + 'qwen_low_vram_text_rendering', + ]); + assert.ok(lowMemory.every((item) => templateCategoryIds(item).includes('image'))); + const recommended = browserModule.recommendedBrowserTemplates(all); + assert.equal(recommended[0].id, 'lumina2_larch_on_glacial_pond'); + assert.equal(new Set(recommended.map((item) => item.id)).size, recommended.length); + for (const id of [ + 'shap_e_traffic_cone_turntable', + 'minimax_h3_image_old_town_cat', + 'flux3_klein_fp8r512_text_to_image', + 'janus_reykjavik_travel_note', + 'minimax_music3_chamber_pop', + ]) { + assert.ok( + recommended.some((item) => item.id === id), + id, + ); + } + assert.deepEqual(templateCategoryIds(lookup('shap_e_traffic_cone_turntable')), ['3d']); + assert.ok(templateCategoryIds(lookup('qwen_text_rendering')).includes('image')); + assert.ok(templateCategoryIds(lookup('whisper_tiny_blue_cup_transcription')).includes('text')); + for (const category of [ + 'all', + 'image', + 'audio', + 'edit', + 'video', + 'control', + '3d', + 'text', + 'adapters', + 'upscale', + 'performance', + 'getting-started', + ]) { + const rows = filterStudioTemplates(all, form, { ...options, category }); + const featured = featuredCategoryTemplate(rows, category); + assert.ok(rows.includes(featured), category); + if (['all', 'recommended', 'image'].includes(category)) assert.equal(featured.id, 'lumina2_larch_on_glacial_pond'); + if (category === 'audio') assert.equal(featured.id, 'minimax_music3_chamber_pop'); + if (rows.length > 1) { + const other = rows.find((item) => item !== featured); + assert.equal( + featuredCategoryTemplate(rows, category, (item) => item === other), + other, + ); + } + } +}); + +test('Experimental refuses undeclared or incomplete internal creator selections', () => { + const template = templatesModule.STUDIO_TEMPLATES.find((item) => item.id === 'flux3_klein_fp8r512_text_to_image'); + const variants = [ + { ...template, id: 'undeclared-internal-creator' }, + { ...template, executionSelection: undefined }, + ...['pipelineClass', 'task', 'executionProfileId', 'authoringRecipeId', 'implementation', 'memoryPolicy'].map( + (key) => ({ + ...template, + executionSelection: { ...template.executionSelection, [key]: undefined }, + }), + ), + { ...template, executionSelection: { ...template.executionSelection, schemaVersion: 2 } }, + { ...template, executionSelection: { ...template.executionSelection, executionProfileId: 'arbitrary-profile' } }, + { ...template, executionSelection: { ...template.executionSelection, bindingSpec: undefined } }, + { + ...template, + executionSelection: { + ...template.executionSelection, + bindingSpec: { modelType: template.modelType, mode: 'edit_image' }, + }, + }, + { ...template, modelType: 'Flux3ModularPipeline' }, + { ...template, modelArtifact: undefined }, + { ...template, modelArtifact: { ...template.modelArtifact, revision: 'main' } }, + { ...template, modelArtifact: { ...template.modelArtifact, value: '' } }, + { ...template, modelArtifact: { source: 'local', value: 'unverified-model.safetensors' } }, + ]; + for (const variant of variants) { + assert.deepEqual( + browserModule.filterStudioTemplates([variant], profilesModule.DEFAULT_STUDIO_FORM, { + category: 'experimental', + includeBlocked: true, + query: '', + modelType: 'all', + difficulty: 'all', + sort: 'recommended', + }), + [], + JSON.stringify(variant.executionSelection), ); + } +}); + +test('every template name identifies its exact model and operation', () => { + const { STUDIO_TEMPLATES } = templatesModule; + const reviewedTitles = new Map([ + [ + 'shap_e_traffic_cone_turntable', + ['Shap-E — Technical Preview: Traffic Cone Turntable', 'Shap-E Rendered 3D', 'text_to_3d'], + ], + ['pixart_sigma_terracotta_herbs', ['Lavender and Rosemary', 'PixArt Sigma XL 1024px', 'text_to_image']], + [ + 'pixart_sigma_pag_pink_mascot', + ['Technical Preview — Pink Mascot', 'PixArt Sigma XL 1024px PAG', 'text_to_image'], + ], + [ + 'ddpm_cifar32_technical_preview', + ['Technical Preview — DDPM CIFAR-10 Technical Preview', 'DDPM CIFAR-10 32x32', 'unconditional_image'], + ], + [ + 'consistency_64_technical_preview', + [ + 'Technical Preview — Consistency Model 64px Technical Preview', + 'Consistency Model ImageNet 64x64', + 'unconditional_image', + ], + ], + ]); + for (const template of STUDIO_TEMPLATES) { + const modelName = browserModule.templateModelDisplayName(template); + const modelLabel = + template.mode === 'image_upscale' && template.modelType === 'SpandrelImageUpscale' + ? `Spandrel ${modelName}` + : modelName; + // The archived review titles are exact. The card identifies each variant + // and operation separately. + if (template.id === 'sana_sprint_monochrome_tiger') { + assert.equal(template.label, 'Sana Sprint — Monochrome Tiger'); + assert.equal(modelLabel, 'Sana Sprint 0.6B'); + assert.equal(template.mode, 'edit_image'); + } else if (template.id === 'wav2vec2_station_announcement') { + assert.equal(template.label, 'Wav2Vec2 — Station Announcement'); + assert.equal(modelLabel, 'Wav2Vec2 Base 960h'); + assert.equal(template.mode, 'speech_to_text'); + } else if (reviewedTitles.has(template.id)) { + assert.deepEqual([template.label, modelLabel, template.mode], reviewedTitles.get(template.id)); + } else { + assert.ok(template.label.startsWith(`${modelLabel} — `), `${template.id} must begin with its model name`); + } assert.doesNotMatch(template.label, /^(Low VRAM|High quality|Fast LoRA)$/i); } assert.equal( @@ -4176,6 +4821,22 @@ test('every template name identifies its exact model and operation', () => { ); }); +test('template artifact display names distinguish same-class variants without changing their backend identity', () => { + const cosmos = templatesModule.STUDIO_TEMPLATES.find((item) => item.id === 'cosmos3_super_text_to_image'); + const flux = templatesModule.STUDIO_TEMPLATES.find((item) => item.id === 'flux2_dev_text_to_image'); + assert.equal(browserModule.templateModelDisplayName(cosmos), 'Cosmos 3 Super'); + assert.equal(browserModule.templateModelDisplayName(flux), 'FLUX.2-dev'); + assert.equal(cosmos.modelType, 'Cosmos3OmniModularPipeline'); + assert.equal(flux.modelType, 'Flux2ModularPipeline'); + assert.ok(browserModule.templateSearchText(cosmos).includes('nvidia/cosmos3-super-text2image')); + const variant = { ...cosmos, modelDisplayName: 'Another exact artifact variant' }; + assert.equal(browserModule.templateModelDisplayName(variant), 'Another exact artifact variant'); + assert.equal( + browserModule.templateModelDisplayName({ ...variant, modelDisplayName: ' ' }), + profilesModule.STUDIO_MODEL_LABELS[cosmos.modelType], + ); +}); + test('browser display names stay concise because model and operation have dedicated metadata', () => { const displayNames = templatesModule.STUDIO_TEMPLATES.map((template) => ({ template, @@ -4201,6 +4862,32 @@ test('browser display names stay concise because model and operation have dedica } }); +test('Gallery previews name the delivered medium and distinguish both Subway Musician recipes', () => { + const templates = templatesModule.STUDIO_TEMPLATES; + for (const template of templates) { + for (const slot of browserModule.templateMediaSlots(template)) { + if (slot.kind === 'video') assert.doesNotMatch(slot.label, /^generated image$/i, template.id); + } + } + const names = ['wan_22_ti2v_5b_seed_vault', 'wan_ti2v_subway_musician'].map((id) => { + const template = templates.find((entry) => entry.id === id); + const name = browserModule.templateDisplayName(template); + assert.match(name, /Subway Musician/); + assert.ok(browserModule.templateSearchText(template).includes(name.toLowerCase())); + return name; + }); + assert.notEqual(names[0], names[1]); +}); + +test('attention options distinguish built-in, separately installed and Hub implementations', () => { + const label = runtimeOptionsModule.attentionBackendLabel; + assert.equal(label('_native_flash', '_native_flash'), 'PyTorch flash SDPA'); + assert.equal(label('flash', 'flash'), 'FlashAttention 2'); + assert.equal(label('flash_hub', 'flash_hub'), 'FlashAttention 2 (Hub)'); + assert.equal(label('_native_flash', 'Qualified for this device'), 'Qualified for this device'); + assert.equal(label('future_backend', 'future_backend'), 'future_backend'); +}); + test('every declared template backend capability has an explicit registry contract', () => { const templates = [...templatesModule.STUDIO_TEMPLATES, ...templatesModule.PLANNING_STUDIO_TEMPLATES]; for (const template of templates) { @@ -4266,6 +4953,151 @@ test('runtime option normalization supports the real registry descriptor contrac ]); }); +test('template readiness scopes a successful model prerequisite check to Run', () => { + const quick = templatesModule.STUDIO_TEMPLATES.find((template) => template.id === 'z_image_quick_concept'); + assert.ok(quick); + const context = readinessContext({ hfCache: ['Tongyi-MAI/Z-Image-Turbo'] }); + const originalContext = structuredClone(context); + const ready = readinessModule.getTemplateReadiness(quick, context); + + // A per-model recipe has no submitted graph or live full-workflow memory proof. + assert.equal(ready.status, 'ready'); + assert.equal(ready.label, 'Auto check at Run'); + assert.match(ready.summary, /complete workflow and current memory.*before submitting a task/u); + assert.doesNotMatch(ready.summary, /hardware looks usable|Auto plan is ready/u); + assert.deepEqual(ready.compatibility, context.autoResourcePlan.compatibility); + assert.equal(ready.decision.state, 'ready'); + assert.deepEqual(ready.issues, []); + assert.deepEqual(ready.modelInstallTargets, []); + assert.deepEqual(context, originalContext); + + const custom = readinessModule.getTemplateReadiness(quick, { + ...context, + form: { ...context.form, resourceMode: 'expert' }, + }); + assert.equal(custom.status, ready.status); + assert.equal(custom.label, 'Check at Run'); + assert.match(custom.summary, /complete workflow using your Custom memory settings.*before submitting a task/u); + assert.doesNotMatch(custom.summary, /Auto plan|hardware.*usable|current memory/u); + assert.deepEqual(custom.decision, ready.decision); + assert.deepEqual(custom.compatibility, ready.compatibility); + + const pending = readinessModule.getTemplateReadiness(quick, { ...context, autoResourcePlan: null }); + assert.equal(pending.status, 'preparing'); + assert.equal(pending.label, 'Checking models'); + assert.equal(pending.decision.state, 'preparing'); + assert.ok(pending.issues.some((issue) => issue.id === 'auto-plan-checking' && issue.blocking)); + const blocked = readinessModule.getTemplateReadiness(quick, { + ...context, + autoResourcePlan: { + ...context.autoResourcePlan, + compatibility: { + ...context.autoResourcePlan.compatibility, + state: 'needs_setup', + severity: 'error', + code: 'memory_unavailable', + summary: 'Memory unavailable', + detail: 'The model prerequisite check cannot proceed.', + }, + issue: { category: 'device' }, + }, + }); + assert.equal(blocked.status, 'needs_setup'); + assert.equal(blocked.decision.state, 'blocked'); + assert.equal(blocked.issues[0].category, 'hardware_fit'); + assert.equal(blocked.summary, 'The model prerequisite check cannot proceed.'); +}); + +test('template readiness scope preserves model-free readiness and explicit Custom prerequisites', () => { + const quick = templatesModule.STUDIO_TEMPLATES.find((template) => template.id === 'z_image_quick_concept'); + assert.ok(quick); + const builtin = { + ...quick, + modelType: 'BuiltinDataOperation', + mode: 'text_select', + modelArtifact: undefined, + executionSelection: undefined, + inputRequirements: undefined, + inputBindings: undefined, + requiredBackendCapabilities: [], + workflowBlockSettings: undefined, + }; + const builtInReady = readinessModule.getTemplateReadiness(builtin, readinessContext()); + assert.equal(builtInReady.status, 'ready'); + assert.equal(builtInReady.label, 'Ready now'); + assert.match(builtInReady.summary, /Built-in processing needs no model download/u); + assert.doesNotMatch(builtInReady.summary, /Auto plan|hardware/u); + assert.deepEqual(builtInReady.modelInstallTargets, []); + + const revision = 'a'.repeat(40); + const customTemplate = { + ...quick, + modelArtifact: { source: 'hub', value: 'Tongyi-MAI/Z-Image-Turbo', revision }, + example: { ...quick.example, modelRevision: revision }, + executionSelection: { + schemaVersion: 1, + pipelineClass: 'ZImageModularPipeline', + task: 'text_to_image', + executionProfileId: 'unit-custom-prerequisite', + bindingSpec: { modelType: quick.modelType, mode: quick.mode }, + implementation: 'native_stages', + memoryPolicy: 'custom_experimental', + }, + }; + const customContext = { + ...readinessContext({ + autoResourcePlan: null, + form: { ...profilesModule.DEFAULT_STUDIO_FORM, resourceMode: 'expert' }, + hfCache: [ + { + id: 'Tongyi-MAI/Z-Image-Turbo', + installed: true, + complete: true, + planned_revision: revision, + planned_files: [], + }, + ], + nodesRegistry: { 'modules.ModularDiffusers.ModelsLoader': {} }, + runtime: { + ready: true, + runtimeEnvironment: { profileVerified: true, executionReady: true }, + packages: Object.fromEntries( + ['torch', 'diffusers', 'transformers', 'peft'].map((name) => [name, { available: true }]), + ), + missing_required_packages: [], + }, + }), + studioModelCapabilities: [ + { + modelType: quick.modelType, + defaultRepo: 'Tongyi-MAI/Z-Image-Turbo', + executionProfiles: [ + { + id: 'unit-custom-prerequisite', + model_type: quick.modelType, + pipeline_class: 'ZImageModularPipeline', + modes: [quick.mode], + default_repo: 'Tongyi-MAI/Z-Image-Turbo', + }, + ], + }, + ], + }; + const custom = readinessModule.getTemplateReadiness(customTemplate, customContext); + assert.equal(custom.status, 'ready'); + assert.equal(custom.label, 'Custom · experimental'); + assert.equal(custom.tone, 'warning'); + assert.match(custom.summary, /hardware fit and output quality remain experimental/u); + assert.deepEqual(custom.issues, []); + const missingRuntime = readinessModule.getTemplateReadiness(customTemplate, { + ...customContext, + runtimeStatus: { ...customContext.runtimeStatus, ready: false }, + }); + assert.equal(missingRuntime.status, 'needs_backend'); + assert.equal(missingRuntime.decision.state, 'blocked'); + assert.ok(missingRuntime.issues.some((issue) => issue.id === 'custom:base-runtime' && issue.blocking)); +}); + test('template readiness classifies ready, input, model, and backend states', () => { const { STUDIO_TEMPLATES } = templatesModule; const { getTemplateReadiness } = readinessModule; @@ -5213,6 +6045,100 @@ test('built-in video operations are locally ready and preserve multi-video infer assert.deepEqual(tiled.referenceVideos, ['first.mp4', 'second.mp4']); }); +test('ordinary generation with postprocessing retains the generator summary in either node order', () => { + const node = (id, module, action, params) => ({ + id, + type: 'custom', + position: { x: 0, y: 0 }, + data: { + module, + action, + params: Object.fromEntries(Object.entries(params).map(([key, value]) => [key, { value }])), + }, + }); + for (const [module, modelType, mode] of [ + ['modules.DiffusersVideo', 'LTXVideoPipeline', 'image_to_video'], + ['modules.DiffusersVideo', 'WanVACEPipeline', 'control_to_video'], + ['modules.DiffusersImage', 'StableDiffusionXLPipeline', 'text_to_image'], + ]) { + for (const processor of [ + node('upscale', 'modules.Spandrel', 'Upscaler', { device: 'cpu' }), + node('process', 'modules.Video', 'ProcessVideo', { operation: 'video_trim' }), + ]) { + const stages = [ + node('pipeline', module, 'LoadPipeline', { + model_type: modelType, + device: 'cuda:0', + dtype: 'bfloat16', + offload_mode: 'sequential_cpu', + auto_offload: true, + }), + node('encode', module, 'EncodeInputs', { mode, prompt: 'Keep the subject and camera movement.' }), + node('denoise', module, 'Denoise', { + mode, + width: 768, + height: 512, + num_frames: 81, + num_inference_steps: 8, + guidance_scale: 1, + seed: 8313, + }), + node('export', 'modules.Video', 'Export', { fps: 16 }), + ]; + for (const nodes of [ + [processor, ...stages], + [...stages, processor], + ]) { + const original = structuredClone(nodes); + const inferred = workflowInferenceModule.inferStudioFormFromWorkflow(nodes); + assert.equal(inferred.modelType, modelType); + assert.equal(inferred.mode, mode); + assert.equal(inferred.device, 'cuda:0'); + assert.equal(inferred.dtype, 'bfloat16'); + assert.equal(inferred.offloadMode, 'sequential_cpu'); + assert.equal(inferred.prompt, 'Keep the subject and camera movement.'); + assert.equal(inferred.steps, 8); + assert.equal(inferred.seed, 8313); + assert.equal(inferred.numFrames, 81); + assert.equal(inferred.fps, 16); + assert.deepEqual(nodes, original, 'Summary inference must not change executable node settings.'); + } + } + } +}); + +test('ordinary staged video uses the recognized loader repository when its class is not a Studio profile', () => { + const inferred = workflowInferenceModule.inferStudioFormFromWorkflow( + [ + { data: { module: 'modules.Spandrel', action: 'Upscaler', params: {} } }, + { + data: { + module: 'modules.DiffusersVideo', + action: 'LoadPipeline', + params: { + model_id: { + value: { source: 'hub', value: profilesModule.STUDIO_MODEL_PROFILES.LTXVideoPipeline.defaultRepo }, + }, + pipeline_class: { value: 'LTXConditionPipeline' }, + offload_mode: { value: 'sequential_cpu' }, + }, + }, + }, + { + data: { + module: 'modules.DiffusersVideo', + action: 'Denoise', + params: { mode: { value: 'image_to_video' } }, + }, + }, + ], + { ...profilesModule.DEFAULT_STUDIO_FORM, modelType: 'LTXVideoPipeline', mode: 'image_to_video' }, + ); + assert.equal(inferred.modelType, 'LTXVideoPipeline'); + assert.equal(inferred.mode, 'image_to_video'); + assert.equal(inferred.offloadMode, 'sequential_cpu'); +}); + test('Real-ESRGAN video upscale stays model-backed and infers the generic source-video contract', () => { const profile = profilesModule.STUDIO_MODEL_PROFILES.SpandrelVideoUpscale; const requirement = profilesModule.STUDIO_AUTO_MODEL_REQUIREMENTS.SpandrelVideoUpscale; @@ -6532,6 +7458,40 @@ test('canonical workflows reject retired or mutable Hub attention backends', () assert.equal(workflowNodeAttentionBackendError({ data: { params: {} } }), null); }); +test('canonical workflows allow only portable native math attention on CPU', () => { + const node = (backend, device, options = []) => ({ + data: { + params: { + attention_backend: { value: backend, options }, + device: { value: device }, + }, + }, + }); + for (const device of ['cpu', 'cpu:0']) { + for (const backend of ['auto', 'inherit', 'native', '_native_math']) + assert.equal(workflowNodeAttentionBackendError(node(backend, device)), null, `${backend} on ${device}`); + for (const backend of [ + '_native_flash', + '_native_efficient', + '_native_cudnn', + '_native_future', + '_native_math_extra', + ['_native_math'], + ]) + assert.match(workflowNodeAttentionBackendError(node(backend, device)), /selects accelerator attention/); + for (const backend of ['aiter', 'aiter_fa2_hub']) { + assert.match(workflowNodeAttentionBackendError(node(backend, device)), /unsupported attention/); + assert.match( + workflowNodeAttentionBackendError(node('_native_math', device, ['auto', { value: backend }])), + /unsupported attention/, + ); + } + } + for (const backend of ['_native_math', '_native_flash', '_native_efficient', '_native_cudnn']) + assert.equal(workflowNodeAttentionBackendError(node(backend, 'cuda:0')), null); + assert.match(workflowNodeAttentionBackendError(node('auto', 'cuda:0', { aiter: 'Retired' })), /aiter/); +}); + test('Hub-backed adapter member filenames are not treated as standalone local models', () => { const references = runReadinessModule.collectNodeModelReferences({ id: 'audio-lora', @@ -7123,6 +8083,18 @@ test('shared pipeline classes resolve one exact Expert artifact per workflow mod }, ], }; + const sharedRepoVariants = profilesModule.expandArtifactSelectionProfiles({ + ...profile, + artifactSelections: [ + { ...profile.artifactSelections[0], repo: 'example/same', modes: ['text_to_image'] }, + { ...profile.artifactSelections[1], repo: 'example/same', modes: ['image_to_video'] }, + ], + }); + assert.deepEqual( + sharedRepoVariants.map((entry) => entry.surfaceCategory), + ['Image', 'Video'], + ); + assert.equal(new Set(sharedRepoVariants.map(profilesModule.modelInventoryRowKey)).size, 2); const variants = profilesModule.expandArtifactSelectionProfiles(profile); assert.deepEqual( variants.map(({ modes, defaultRepo, revisionCandidates, downloadFiles }) => ({ @@ -7293,6 +8265,30 @@ test('startup request caches recover manifest and plans at their startup readine assert.doesNotMatch(browserSource, /templateManifestRequest\s*\?\?=/); }); +test('planning-only templates reject creation before changing the active document', async () => { + const { createWorkflowFromTemplate } = await server.ssrLoadModule('/src/studio/templateWorkflow.ts'); + const studioStore = studioStoreModule.useStudioStore; + const previous = studioStore.getState(); + let created = 0; + studioStore.setState({ + createWorkflowTab: () => { + created += 1; + throw new Error('Unexpected planning-template document mutation'); + }, + }); + try { + assert.ok(templatesModule.PLANNING_STUDIO_TEMPLATES.length > 0); + for (const template of templatesModule.PLANNING_STUDIO_TEMPLATES) { + await assert.rejects(createWorkflowFromTemplate(template), /Planning templates are for reference/); + } + assert.equal(created, 0); + assert.equal(studioStore.getState().activeWorkflowTabId, previous.activeWorkflowTabId); + assert.equal(studioStore.getState().workflowTabs, previous.workflowTabs); + } finally { + studioStore.setState(previous); + } +}); + test('template creation waits for initial capabilities and cannot continue into another workflow', async () => { const { createWorkflowFromTemplate } = await server.ssrLoadModule('/src/studio/templateWorkflow.ts'); const nodeStore = nodesStoreModule.useNodesStore; @@ -7339,3 +8335,46 @@ test('template creation waits for initial capabilities and cannot continue into flowStore.setState(previousFlow); } }); + +test('legacy template provenance still recovers its original role-marked managed graph', () => { + const graph = canonicalModularTextToImageGraph(); + const roles = ['models', 'prompt', 'denoise', 'decode', 'preview']; + graph.nodes = graph.nodes.map((node, index) => ({ + ...node, + data: { ...node.data, studioRole: roles[index] }, + })); + const studio = studioStoreModule.useStudioStore; + const before = studio.getState(); + const beforeFlow = flowStoreModule.useFlowStore.getState(); + try { + studio.getState().mergeBackendWorkflow({ + id: 'legacy-template-role-recovery', + title: 'Saved Z template', + source: 'template', + sourceLabel: 'z_image_quick_concept', + revision: 1, + snapshot: { ...graph, studioForm: profilesModule.DEFAULT_STUDIO_FORM, selectedMode: 'text_to_image' }, + }); + const saved = studio.getState().workflowTabs.find((tab) => tab.id === 'legacy-template-role-recovery'); + assert.equal(saved.source, 'template'); + assert.equal(saved.snapshot.activeTemplateId, 'z_image_quick_concept'); + assert.deepEqual( + saved.snapshot.studioGraphBinding.managedNodeIds, + graph.nodes.map((node) => node.id), + ); + assert.deepEqual( + saved.snapshot.studioGraphBinding.managedEdgeIds, + graph.edges.map((edge) => edge.id), + ); + assert.deepEqual( + saved.snapshot.nodes.map((node) => node.position), + graph.nodes.map((node) => node.position), + ); + assert.deepEqual(saved.snapshot.edges, graph.edges); + assert.deepEqual(saved.snapshot.viewport, graph.viewport); + assert.ok(saved.snapshot.nodes.every((node) => node.data.studioOwned)); + } finally { + studio.setState(before); + flowStoreModule.useFlowStore.setState(beforeFlow); + } +}); diff --git a/scripts/modular-hierarchy-v2.test.mjs b/scripts/modular-hierarchy-v2.test.mjs index 853eb732..f60a3764 100644 --- a/scripts/modular-hierarchy-v2.test.mjs +++ b/scripts/modular-hierarchy-v2.test.mjs @@ -26,6 +26,7 @@ let blockContainerInterfaceModule; let graphLayoutModule; let nodeLibraryModule; let reviewedLibrary; +let reviewedConditionals; let server; function executionContract(graph) { @@ -55,7 +56,7 @@ before(async () => { [ ...(process.platform === 'win32' ? [] : [BACKEND_PYTHON]), '-c', - 'import json; from modiff.huggingface_node_library import build_huggingface_node_library; print(json.dumps(build_huggingface_node_library(), separators=(",", ":")))', + 'import json; from modiff.huggingface_node_library import build_huggingface_node_library; from modiff.modular_conditional_contracts import reviewed_modular_conditional_collection; print(json.dumps({"library": build_huggingface_node_library(), "conditionals": reviewed_modular_conditional_collection()}, separators=(",", ":")))', ], { cwd: BACKEND_ROOT, @@ -84,7 +85,9 @@ before(async () => { blockContainerInterfaceModule = await server.ssrLoadModule('/src/studio/blockContainerInterfaceV1.ts'); graphLayoutModule = await server.ssrLoadModule('/src/workflow/graphLayout.ts'); nodeLibraryModule = await server.ssrLoadModule('/src/studio/huggingFaceNodeLibrary.ts'); - reviewedLibrary = nodeLibraryModule.parseHuggingFaceNodeLibrary(JSON.parse(libraryResult.stdout)); + const published = JSON.parse(libraryResult.stdout); + reviewedLibrary = nodeLibraryModule.parseHuggingFaceNodeLibrary(published.library); + reviewedConditionals = conditionalModule.parseHuggingFaceModularConditionalSnapshot(published.conditionals); }); test('the Modular Diffusers catalog exposes every exact block once and retains all placement contexts', () => { @@ -98,6 +101,7 @@ test('the Modular Diffusers catalog exposes every exact block once and retains a return { id: `diffusers.modular:${workflow.pipelineClass}:${workflow.workflowId}`, provider: 'diffusers', + libraryRevision: conditional.diffusersRevision, pipelineClass: workflow.pipelineClass, blocksClass: blockById.get(pipeline.rootBlockDefinitionId).className, workflowId: workflow.workflowId, @@ -127,8 +131,8 @@ test('the Modular Diffusers catalog exposes every exact block once and retains a conditional.pipelines.flatMap((pipeline) => pipeline.placements.map(({ blockDefinitionId }) => blockDefinitionId)), ); - assert.equal(expectedPlacements, 1051); - assert.equal(expectedDefinitions.size, 598); + assert.equal(expectedPlacements, 1105); + assert.equal(expectedDefinitions.size, 626); assert.equal(section.entries.length, expectedDefinitions.size); assert.equal(new Set(section.entries.map(({ id }) => id)).size, expectedDefinitions.size); assert.equal( @@ -162,13 +166,78 @@ after(async () => { await server?.close(); }); -test('all 94 reviewed workflows map every selected step into the exact unpruned hierarchy', () => { +test('the newly reviewed Flux3 workflows retain exact active branches and loop members', () => { + const conditional = conditionalModule.parseHuggingFaceModularConditionalSnapshot( + JSON.parse(readFileSync(path.join(BACKEND_DATA, 'modular-conditional-contracts.json'), 'utf8')), + ); + const selected = JSON.parse(readFileSync(path.join(BACKEND_DATA, 'modular-block-contracts.json'), 'utf8')); + assert.equal(conditional.diffusersRevision, '7ecb1e1b4fe500be7fb7381a7bb79a24d7fa3941'); + const blocks = new Map(conditional.blockDefinitions.map((block) => [block.id, block])); + for (const pipelineClass of ['Flux3ModularPipeline', 'Flux3DistilledModularPipeline']) { + const pipeline = conditional.pipelines.find((item) => item.pipelineClass === pipelineClass); + assert.ok(pipeline); + assert.equal(pipeline.placements.length, 27); + const workflows = selected.workflows.filter((item) => item.pipelineClass === pipelineClass); + assert.deepEqual(workflows.map(({ workflowId }) => workflowId).sort(), ['image_conditioned', 'text2image']); + for (const workflow of workflows) { + const imageConditioned = workflow.workflowId === 'image_conditioned'; + const branch = workflow.workflowId; + const hierarchy = reviewedGraphModule.reviewedWorkflowHierarchyV2(conditional, { + provider: 'diffusers', + libraryRevision: selected.diffusersRevision, + pipelineClass, + workflowId: workflow.workflowId, + blockPlacements: workflow.placements, + }); + assert.ok(hierarchy); + const denoiseSteps = [ + 'input', + ...(imageConditioned ? ['cond_input'] : []), + 'prepare_latents', + ...(imageConditioned ? ['prepare_image_cond_latents'] : []), + 'set_timesteps', + 'prepare_rope_inputs', + 'denoise', + 'denoise/denoiser', + 'denoise/after_denoiser', + 'after_denoise', + ]; + const active = [...hierarchy.fullPlacementBySelectedPath.values()]; + assert.deepEqual( + active.map(({ path }) => path.join('/')), + [ + 'text_encoder', + ...(imageConditioned + ? ['vae_encoder/image_conditioning/preprocess', 'vae_encoder/image_conditioning/encode'] + : []), + ...denoiseSteps.map((step) => `denoise/${branch}/${step}`), + 'decode', + ], + ); + assert.equal(active.length, imageConditioned ? 14 : 10); + assert.deepEqual( + hierarchy.structuralPlacements.map(({ placement }) => placement.path.join('/')), + [ + ...(imageConditioned ? ['vae_encoder', 'vae_encoder/image_conditioning'] : []), + 'denoise', + `denoise/${branch}`, + ], + ); + const loop = active.find(({ path }) => path.join('/') === `denoise/${branch}/denoise`); + assert.equal(blocks.get(loop.blockDefinitionId).kind, 'loop'); + const inactive = imageConditioned ? 'text2image' : 'image_conditioned'; + assert.ok(active.every(({ path }) => path[0] !== 'denoise' || path[1] !== inactive)); + } + } +}); + +test('all 98 reviewed workflows map every selected step into the exact unpruned hierarchy', () => { const conditional = conditionalModule.parseHuggingFaceModularConditionalSnapshot( JSON.parse(readFileSync(path.join(BACKEND_DATA, 'modular-conditional-contracts.json'), 'utf8')), ); const selected = JSON.parse(readFileSync(path.join(BACKEND_DATA, 'modular-block-contracts.json'), 'utf8')); assert.equal(selected.diffusersRevision, conditional.diffusersRevision); - assert.equal(selected.workflows.length, 94); + assert.equal(selected.workflows.length, 98); let maximumDepth = 0; let structuralPlacements = 0; @@ -215,13 +284,15 @@ test('all 94 reviewed workflows map every selected step into the exact unpruned assert.ok(structuralPlacements > 400, 'the audit unexpectedly flattened away reviewed containers'); }); -test('all 94 reviewed workflows compile to one V2 graph with progressively projected nested containers', () => { - const conditional = conditionalModule.parseHuggingFaceModularConditionalSnapshot( - JSON.parse(readFileSync(path.join(BACKEND_DATA, 'modular-conditional-contracts.json'), 'utf8')), - ); +test('all reviewed workflows compile to one V2 graph with progressively projected nested containers', () => { + const conditional = reviewedConditionals; const selected = JSON.parse(readFileSync(path.join(BACKEND_DATA, 'modular-block-contracts.json'), 'utf8')); const allBlocks = new Map( - [...conditional.blockDefinitions, ...selected.blockDefinitions].map((block) => [block.id, block]), + [ + ...conditional.blockDefinitions, + ...(conditional.sourceSupplements ?? []).flatMap((source) => source.blockDefinitions), + ...selected.blockDefinitions, + ].map((block) => [block.id, block]), ); const params = { pipeline_components: { type: 'diffusers_modular_pipeline_components', display: 'input' }, @@ -688,10 +759,18 @@ test('all 94 reviewed workflows compile to one V2 graph with progressively proje ordinaryNodeNestedParent: utilityParent ?? null, }); } - assert.equal(definitions.length, 94); - assert.equal(nodeCount, 1796); + const h3Ids = new Set( + definitions.filter((item) => item.pipelineClass === 'MiniMaxH3ImageModularPipeline').map((item) => item.id), + ); + assert.equal(h3Ids.size, 2); + assert.equal(definitions.length - h3Ids.size, 101); + const h3Nodes = workflowAudit + .filter((item) => h3Ids.has(item.definitionId)) + .reduce((total, item) => total + item.effectiveNodeCount, 0); + assert.ok(h3Nodes > 0); + assert.equal(nodeCount - h3Nodes, 1918); assert.equal(maximumDepth, 5); - assert.equal(parameterLocalityChecks, 94); + assert.equal(parameterLocalityChecks, definitions.length); assert.ok(subtreeSaveChecks > 1400); if (process.env.MODIFF_HIERARCHY_AUDIT_OUTPUT) { writeFileSync( diff --git a/scripts/native-image-load-evidence.mjs b/scripts/native-image-load-evidence.mjs new file mode 100644 index 00000000..0398be31 --- /dev/null +++ b/scripts/native-image-load-evidence.mjs @@ -0,0 +1,90 @@ +import assert from 'node:assert/strict'; + +export function verifyRetainedHostImageFiles(observation, { taskId, persistedOutputSha256, inputs }) { + assert.deepEqual(Object.keys(observation).sort(), ['files', 'persistedOutputSha256', 'taskId']); + assert.equal(observation.taskId, taskId); + assert.equal(observation.persistedOutputSha256, persistedOutputSha256); + const bySource = (items) => [...items].sort((left, right) => left.sourceValue.localeCompare(right.sourceValue)); + assert.deepEqual( + bySource(observation.files), + bySource(inputs.map(({ sourceValue, file }) => ({ sourceValue, byteSize: file.bytes, sha256: file.sha256 }))), + 'Original host inputs differ from the saved media.', + ); +} + +const literal = (value) => ({ value, source: 'literal' }); + +export function verifyNativeLoadedImages(load, loaded, modes) { + assert.equal(load?.module, 'modules.Image'); + assert.equal(load.action, 'Load'); + assert.equal(loaded?.module, load.module); + assert.equal(loaded.action, load.action); + assert.deepEqual(loaded.omittedFields, {}); + + const media = loaded.mediaEvidence; + assert.equal(media?.status, 'complete', 'The native source decode is missing.'); + assert.ok(modes.length > 0); + const files = media.files.file; + assert.equal( + files?.length, + modes.length, + modes.length === 1 ? 'A single native file observation is required.' : 'Native file observation count differs.', + ); + for (const file of files) { + assert.ok(typeof file.sourceValue === 'string' && file.sourceValue && file.byteSize > 0 && !file.converted); + } + assert.deepEqual( + load.params.file, + { display: 'filebrowser', value: files.map(({ sourceValue }) => sourceValue) }, + 'Image.Load file differs from the declared selection.', + ); + assert.equal( + media.outputs.image?.length, + modes.length, + modes.length === 1 ? 'A single native decoded image is required.' : 'Native decoded image count differs.', + ); + const images = media.outputs.image.map(({ kind, ...decodedImage }, index) => { + assert.equal(kind, 'image'); + assert.equal(decodedImage.mode, modes[index]); + return { sourceFile: files[index], decodedImage }; + }); + assert.deepEqual(media.controls, { alpha_channel: load.params.alpha_channel.value }); + assert.deepEqual(loaded.fields, { + alpha_channel: literal(media.controls.alpha_channel), + source_hashes: literal(files.map(({ sha256 }) => sha256)), + source_widths: literal(images.map(({ decodedImage }) => decodedImage.width)), + source_heights: literal(images.map(({ decodedImage }) => decodedImage.height)), + source_modes: literal(modes), + }); + return images; +} + +export function verifyNativeLoadedImage(load, loaded, mode) { + const [image] = verifyNativeLoadedImages(load, loaded, [mode]); + return image; +} + +export function verifyNativeCanny(settings, evidence, decodedGuide) { + assert.equal(evidence?.schemaVersion, 1); + assert.equal(evidence.source, 'native-builtin-media-v1'); + assert.equal(evidence.status, 'complete'); + const thresholds = [settings.low_threshold.value, settings.high_threshold.value]; + const outputMode = settings.output_mode?.value ?? 'L'; + assert.deepEqual(evidence.controls, { + low_threshold: Math.min(...thresholds), + high_threshold: Math.max(...thresholds), + output_mode: outputMode, + device: settings.device.value, + }); + assert.deepEqual(evidence.inputs, { image: [{ kind: 'image', ...decodedGuide }] }, 'Canny guide bytes differ.'); + assert.deepEqual(evidence.files, {}); + assert.deepEqual(Object.keys(evidence.outputs), ['output']); + assert.equal(evidence.outputs.output.length, 1); + const [edgeImage] = evidence.outputs.output; + assert.equal(edgeImage.kind, 'image'); + assert.equal(edgeImage.mode, outputMode); + assert.deepEqual([edgeImage.width, edgeImage.height], [decodedGuide.width, decodedGuide.height]); + assert.match(edgeImage.sha256, /^[a-f0-9]{64}$/u); + assert.ok(edgeImage.byteSize > 0); + return evidence.outputs.output; +} diff --git a/scripts/native-modular-image-resource.test.mjs b/scripts/native-modular-image-resource.test.mjs new file mode 100644 index 00000000..742cee04 --- /dev/null +++ b/scripts/native-modular-image-resource.test.mjs @@ -0,0 +1,586 @@ +import assert from 'node:assert/strict'; +import { test } from 'node:test'; +import { + backendContractIdentity, + canonicalizeApiGraph, + executionPlanIdentity, + executionReceiptIdentity, + sha256Value, +} from './live-proof-provenance.mjs'; +import { canonicalJsonHash } from './canonical-json.mjs'; +import { workerGraphHash } from './observed-workflow-auto-resource.mjs'; +import { + observedNativeModularImageProofMatches, + observedNativeModularImageResourceId, +} from './observed-native-modular-image-resource.mjs'; + +const SOURCE = 'observed-native-modular-image-resource-v1'; +const literal = (value) => ({ value }); +const wire = (sourceId, sourceKey) => ({ sourceId, sourceKey }); + +export function nativeImageWitness(mode = 'edit_image') { + const layered = mode === 'layer_decomposition'; + const multi = mode === 'multi_image_reference_edit'; + const pipeline = layered ? 'QwenImageLayeredModularPipeline' : 'FluxKontextModularPipeline'; + const repository = layered ? 'example/layered' : 'example/material-edit'; + const resolution = layered ? 640 : 1024; + const form = { + mode, + modelType: layered ? pipeline : 'FluxKontextPipeline', + resourceMode: layered ? 'auto' : 'expert', + dtype: 'bfloat16', + device: 'cuda:0', + autoOffload: true, + offloadMode: layered ? 'model_cpu' : 'group_cpu', + quantizationMode: 'none', + trustRemoteCode: false, + randomSeed: false, + seed: 123, + width: resolution, + height: resolution, + steps: 28, + guidanceScale: 3.5, + maxSequenceLength: 512, + prompt: 'Preserve the photographed subject and change only the requested material.', + negativePrompt: '', + ...(layered ? { layers: 3 } : {}), + }; + const add = (module, action, params) => ({ module, action, params }); + const modular = (action, params) => add('modules.ModularDiffusers', action, params); + const inputArtifacts = Array.from({ length: multi ? 2 : 1 }, (_, index) => ({ + role: `referenceImages[${index}]`, + path: `@data/input-${index}.png`, + contentHash: 'sha256:bytes:' + String(index + 1).repeat(64), + byteSize: 100 + index, + })); + const nodes = { + load: add('modules.Image', 'Load', { + file: literal(inputArtifacts.map((item) => item.path)), + alpha_channel: literal(layered ? 'add alpha' : 'ignore'), + label: { display: 'ui_label', value: 'Synthetic reference input' }, + }), + models: modular('ModelsLoader', { + model_type: literal(pipeline), + repo_id: literal({ source: 'hub', value: repository }), + revision: literal('a'.repeat(40)), + reviewed_variant: literal(repository), + workflow_id: literal('default'), + dtype: literal(form.dtype), + device: literal(form.device), + auto_offload: literal(form.autoOffload), + offload_mode: literal(form.offloadMode), + weight_loading_mode: literal('cpu'), + weight_format: literal('native'), + attention_backend: literal('auto'), + vae_slicing: literal(true), + vae_tiling: literal(true), + inpaint_compatibility: literal('native'), + trust_remote_code: literal(false), + refresh_pipeline_identity_button: { display: 'ui_button', value: true }, + ...Object.fromEntries(['unet', 'vae', 'controlnet', 'lora_list', 'quant_config'].map((k) => [k, literal(null)])), + }), + guider: modular('Guider', { + model_type: literal(pipeline), + guider: literal('ClassifierFreeGuidance'), + guidance_scale: literal(form.guidanceScale), + guidance_rescale: literal(0), + use_original_formulation: literal(false), + enabled: literal(true), + start: literal(0), + stop: literal(1), + layers_config: literal(null), + }), + encode: modular('EncodePrompt', { + text_encoders: wire('models', 'text_encoders'), + guider: wire('guider', 'guider_out'), + prompt: literal(form.prompt), + prompt_input: literal(null), + negative_prompt: literal(''), + max_sequence_length: literal(512), + ...(layered ? { image: wire('load', 'image'), resolution: literal(640), use_en_prompt: literal(false) } : {}), + }), + image: modular('ImageEncode', { + vae: wire('models', 'vae_out'), + image: wire(multi ? 'stitch' : 'load', multi ? 'output' : 'image'), + seed: literal(form.seed), + ...(layered ? { resolution: literal(640) } : {}), + }), + denoise: modular('Denoise', { + unet: wire('models', 'unet_out'), + scheduler: wire('models', 'scheduler'), + embeddings: wire('encode', 'embeddings'), + image_latents: wire('image', 'image_latents'), + guider: wire('guider', 'guider_out'), + seed: literal(form.seed), + num_inference_steps: literal(form.steps), + guidance_scale: literal(form.guidanceScale), + ...(layered ? { layers: literal(3) } : { width: literal(1024), height: literal(1024) }), + }), + decode: modular('DecodeLatents', { + vae: wire('models', 'vae_out'), + latents: wire('denoise', 'latents'), + ...(layered + ? {} + : { + width: { ...wire('denoise', 'out_width'), value: 1024 }, + height: { ...wire('denoise', 'out_height'), value: 1024 }, + }), + }), + preview: add('modules.Image', 'Preview', { + image: wire('decode', 'images'), + device: literal('cpu:0'), + export: literal('0'), + }), + ...(multi + ? { + stitch: add('modules.ImageOperations', 'StitchImages', { + image: wire('load', 'image'), + layout: literal('horizontal_reference'), + columns: literal(2), + spacing: literal(0), + background: literal('white'), + match_size: literal(true), + }), + } + : {}), + }; + const order = [ + 'load', + 'models', + 'guider', + 'encode', + ...(multi ? ['stitch'] : []), + 'image', + 'denoise', + 'decode', + 'preview', + ]; + const snapshot = { studioForm: form, nodes: [], edges: [] }; + const hints = { + clientRunId: 'client-run', + workflowTabId: 'tab', + runInputHash: 'input-hash', + workflowSnapshot: snapshot, + }; + const apiGraph = { sid: 'session', nodes, paths: [order], runtimeHints: hints }; + if (layered) + Object.assign(hints, { + resourceMode: 'auto', + workflowAutoPlan: { schemaVersion: 1, graphHash: workerGraphHash(apiGraph) }, + }); + const capturedKeys = { + models: + 'model_type repo_id revision dtype device auto_offload offload_mode quant_config weight_loading_mode attention_backend vae_slicing vae_tiling'.split( + ' ', + ), + guider: 'model_type guider guidance_scale guidance_rescale use_original_formulation enabled start stop'.split(' '), + encode: ['prompt', 'negative_prompt', 'max_sequence_length'], + image: ['seed'], + denoise: ['seed', 'num_inference_steps', 'guidance_scale', ...(layered ? [] : ['width', 'height'])], + decode: layered ? [] : ['width', 'height'], + preview: ['device'], + stitch: [], + }; + const sourceFiles = [{ path: 'main.py', sha256: 'b'.repeat(64) }]; + const backendSource = { + gitCommit: null, + files: sourceFiles, + fingerprint: sha256Value('backend-source-v1', { gitCommit: null, files: sourceFiles }), + }; + const startedAt = Date.parse('2026-11-12T02:00:00Z') / 1000; + const task = { + task_id: 'native-task', + status: 'completed', + attempt_index: 0, + resourceCandidateId: null, + sid: apiGraph.sid, + client_run_id: hints.clientRunId, + workflow_tab_id: hints.workflowTabId, + run_input_hash: hints.runInputHash, + started_at: startedAt, + completed_at: startedAt + 60, + workflow_snapshot: snapshot, + runtimeFingerprint: { + backendSource: { + schemaVersion: 1, + claim: 'process_start_backend_source_identity', + fingerprint: backendSource.fingerprint, + gitCommit: null, + fileCount: 1, + capturedAt: '2026-11-12T01:59:00Z', + }, + }, + runtimeMeasurement: { elapsedSeconds: 60, processRssBytes: 1024 }, + runtimePreparation: { + resourceMode: form.resourceMode, + performed: false, + residentRecipeReusable: !layered, + cleanup: null, + ...(layered + ? { + workflowAuto: { + strategy: 'dependency_order_retained_owners', + schedule: null, + cachePreparation: null, + reusedOwnerIds: [], + preparedDataNodes: [], + resolvedFields: {}, + appliedUpdates: [], + releases: [], + }, + } + : {}), + }, + }; + const captures = order.map((nodeId) => { + const node = nodes[nodeId]; + const fields = + nodeId === 'load' + ? { + alpha_channel: { source: 'literal', value: layered ? 'add alpha' : 'ignore' }, + source_hashes: { source: 'literal', value: inputArtifacts.map((x) => x.contentHash.slice(-64)) }, + source_widths: { source: 'literal', value: inputArtifacts.map(() => 1024) }, + source_heights: { source: 'literal', value: inputArtifacts.map(() => 1024) }, + source_modes: { source: 'literal', value: inputArtifacts.map(() => (layered ? 'RGBA' : 'RGB')) }, + } + : Object.fromEntries( + (capturedKeys[nodeId] ?? []).map((key) => [ + key, + nodeId === 'decode' + ? { source: 'connected', sourceNodeId: 'denoise', sourcePortId: 'out_' + key, value: resolution } + : { source: 'literal', value: key === 'repo_id' ? repository : node.params[key].value }, + ]), + ); + return { + nodeId, + module: node.module, + action: node.action, + fields, + omittedFields: {}, + ...(nodeId === 'models' + ? { + appliedAdapters: layered + ? { + schemaVersion: 1, + status: 'complete', + source: 'backend-adapter-application', + applicationId: '1'.repeat(32), + observation: 'activated', + adapters: [], + stateSha256: 'sha256:applied-adapters-v1:' + canonicalJsonHash({ adapters: [] }), + } + : { schemaVersion: 1, status: 'unavailable', reason: 'unsupported-owner' }, + } + : {}), + }; + }); + const mediaItems = Array.from({ length: layered ? 3 : 1 }, (_, index) => ({ + index, + width: resolution, + height: resolution, + mediaHash: 'sha256:bytes:' + String(index + 5).repeat(64), + byteSize: 50 + index, + })); + const output = { + taskId: task.task_id, + attemptIndex: 0, + nodeId: 'preview', + sid: apiGraph.sid, + workflowTabId: hints.workflowTabId, + clientRunId: hints.clientRunId, + runInputHash: hints.runInputHash, + apiGraphSnapshot: apiGraph, + formSnapshot: form, + mediaItems, + resolvedExecutionInputs: { + schemaVersion: 1, + source: 'backend-execution', + taskId: task.task_id, + attemptIndex: 0, + nodeId: 'preview', + truncated: false, + uncapturedNodeIds: [], + nodes: captures, + graphTasks: [{ loaderId: 'models', pipelineClass: pipeline, task: layered ? 'layer_decomposition' : null }], + appliedAdaptersStatus: { schemaVersion: 1, truncated: false }, + }, + }; + const modelIdentities = [ + { + repoId: repository, + selectedRevision: 'a'.repeat(40), + modelRevision: repository + '@' + 'a'.repeat(40), + fingerprint: 'sha256:test-model', + }, + ]; + const backendContract = backendContractIdentity( + Object.fromEntries(Object.values(nodes).map((node) => [node.module + '.' + node.action, node])), + canonicalizeApiGraph(apiGraph), + ); + return { + apiGraph, + context: { + executionReceipt: task, + executedOutput: output, + taskId: task.task_id, + modelIdentities, + inputArtifacts, + backendSource, + backendContract, + }, + }; +} + +for (const mode of ['edit_image', 'multi_image_reference_edit', 'layer_decomposition']) { + test(`native image receipt binds the actual ${mode} owner without changing original evidence`, () => { + const w = nativeImageWitness(mode), + before = structuredClone(w); + const plan = executionPlanIdentity(w.apiGraph, w.context).plan; + assert.equal(plan.source, SOURCE); + assert.equal(plan.modelType, w.apiGraph.nodes.models.params.model_type.value); + assert.equal(plan.resourceMode, mode === 'layer_decomposition' ? 'auto' : 'expert'); + assert.match( + executionReceiptIdentity(w.context.executionReceipt, plan).resourceCandidateId, + /^observed-native-image-v1:/u, + ); + assert.deepEqual(w, before); + assert.equal(w.context.executionReceipt.resourceCandidateId, null); + }); +} + +test('nested saved Block metadata does not change the flat native image receipt', () => { + const w = nativeImageWitness(); + let metadata = { preserved: true }; + for (let index = 0; index < 24; index++) metadata = { childDefinition: metadata }; + w.apiGraph.runtimeHints.workflowSnapshot.nodes.push({ data: metadata }); + assert.equal(executionPlanIdentity(w.apiGraph, w.context).plan.source, SOURCE); +}); + +function proofFor(w, plan) { + return { + taskId: w.context.taskId, + capturedAt: new Date(w.context.executionReceipt.completed_at * 1000).toISOString(), + graph: { canonicalGraph: canonicalizeApiGraph(w.apiGraph) }, + models: { items: w.context.modelIdentities }, + inputs: { items: w.context.inputArtifacts }, + runtime: { backendSource: w.context.backendSource, backendContract: w.context.backendContract }, + execution: { resourceCandidateId: observedNativeModularImageResourceId(plan) }, + output: { + items: w.context.executedOutput.mediaItems.map((item) => ({ + width: item.width, + height: item.height, + byteSize: item.byteSize, + encodedSha256: item.mediaHash, + })), + }, + }; +} + +for (const mode of ['edit_image', 'multi_image_reference_edit', 'layer_decomposition']) { + test(`canonical public-proof join retains native ${mode} controls and declared-only limitations`, () => { + const w = nativeImageWitness(mode), + plan = executionPlanIdentity(w.apiGraph, w.context).plan; + assert(observedNativeModularImageProofMatches(plan, proofFor(w, plan))); + assert.equal(plan.resourceObservation.completeFieldAccountingClaimed, false); + assert.equal(plan.resourceObservation.hardwareQualificationClaimed, false); + const missing = plan.resourceObservation.declaredOnlyControls; + assert(missing.some((item) => item.role === 'ModelsLoader' && item.field === 'weight_format')); + if (mode === 'layer_decomposition') { + assert(missing.some((item) => item.role === 'ImageEncode' && item.field === 'resolution')); + assert(missing.some((item) => item.role === 'Denoise' && item.field === 'layers')); + } else { + assert.equal(plan.resourceObservation.adapterApplicationObserved, false); + const decoder = plan.resourceObservation.capturedNodes.find((row) => row.role === 'DecodeLatents'); + assert.deepEqual(decoder.fields.width, { + source: 'connected', + value: 1024, + sourceRole: 'Denoise', + sourcePortId: 'out_width', + }); + } + }); +} + +const nativeRow = (w, nodeId) => + w.context.executedOutput.resolvedExecutionInputs.nodes.find((row) => row.nodeId === nodeId); +const invalidContexts = { + 'failed task': (w) => { + w.context.executionReceipt.status = 'failed'; + }, + 'retried attempt': (w) => { + w.context.executionReceipt.attempt_index = 1; + }, + 'invented native candidate': (w) => { + w.context.executionReceipt.resourceCandidateId = 'made-up'; + }, + 'different output task': (w) => { + w.context.executedOutput.taskId = 'other'; + }, + 'different output attempt': (w) => { + w.context.executedOutput.attemptIndex = 1; + }, + 'different run correlation': (w) => { + w.context.executionReceipt.client_run_id = 'other'; + }, + 'missing model': (w) => { + w.context.modelIdentities = []; + }, + 'extra model': (w) => { + w.context.modelIdentities.push(structuredClone(w.context.modelIdentities[0])); + }, + 'wrong selected revision': (w) => { + w.context.modelIdentities[0].selectedRevision = 'b'.repeat(40); + }, + 'wrong source identity': (w) => { + w.context.backendSource.fingerprint = 'sha256:backend-source-v1:' + '0'.repeat(64); + }, + 'borrowed model component': (w) => { + w.apiGraph.nodes.models.params.unet = wire('decode', 'images'); + }, + 'remote code': (w) => { + w.apiGraph.nodes.models.params.trust_remote_code.value = true; + }, + 'unreviewed packed weights': (w) => { + w.apiGraph.nodes.models.params.weight_format.value = 'fp8r'; + }, + 'extra execution authority': (w) => { + w.apiGraph.runtimeHints.retryPlan = []; + }, + 'loop authority': (w) => { + w.apiGraph.loops = [{ hidden: true }]; + }, + 'duplicate execution path': (w) => { + w.apiGraph.paths[0].push('models'); + }, + 'unknown consumer control': (w) => { + w.apiGraph.nodes.denoise.params.custom_code = literal('ignored'); + }, + 'scalar supplier replacing seed': (w) => { + w.apiGraph.nodes.denoise.params.seed = wire('decode', 'width'); + }, + 'wrong decoder port': (w) => { + w.apiGraph.nodes.decode.params.width.sourceKey = 'width'; + }, + 'wrong decoder receipt producer': (w) => { + nativeRow(w, 'decode').fields.width.sourceNodeId = 'models'; + }, + 'wrong consumed seed': (w) => { + nativeRow(w, 'denoise').fields.seed.value = 42; + }, + 'missing consumed step': (w) => { + delete nativeRow(w, 'denoise').fields.num_inference_steps; + }, + 'omitted consumed control': (w) => { + nativeRow(w, 'denoise').omittedFields.seed = 'missing'; + }, + 'truncated native receipt': (w) => { + w.context.executedOutput.resolvedExecutionInputs.truncated = true; + }, + 'uncaptured node': (w) => { + w.context.executedOutput.resolvedExecutionInputs.uncapturedNodeIds = ['denoise']; + }, + 'ambiguous native inputs': (w) => { + w.context.executedOutput.resolvedExecutionInputs.ambiguousFields = ['seed']; + }, + 'contradictory summary': (w) => { + w.context.executedOutput.resolvedExecutionInputs.summary = { seed: 456 }; + }, + 'wrong input byte identity': (w) => { + w.context.inputArtifacts[0].contentHash = 'sha256:bytes:' + '0'.repeat(64); + }, + 'fabricated adapter availability': (w) => { + nativeRow(w, 'models').appliedAdapters = { schemaVersion: 1, status: 'unavailable', reason: 'owner-invalidated' }; + }, + 'wrong delivered dimensions': (w) => { + w.context.executedOutput.mediaItems[0].width = 16; + }, +}; +for (const [name, mutate] of Object.entries(invalidContexts)) + test(`native image reader holds ${name}`, () => { + const w = nativeImageWitness(); + mutate(w); + assert.notEqual(executionPlanIdentity(w.apiGraph, w.context).plan.source, SOURCE); + }); + +test('the connected decoder consumes its supplier, preserving a different inactive saved fallback', () => { + const w = nativeImageWitness(); + w.apiGraph.nodes.decode.params.width.value = 17; + const plan = executionPlanIdentity(w.apiGraph, w.context).plan; + assert.equal(plan.source, SOURCE); + assert(observedNativeModularImageProofMatches(plan, proofFor(w, plan))); + assert.equal(w.apiGraph.nodes.decode.params.width.value, 17); +}); + +test('two-reference order is bound to the native input bodies and stitch contract', () => { + const w = nativeImageWitness('multi_image_reference_edit'); + w.context.inputArtifacts.reverse(); + assert.notEqual(executionPlanIdentity(w.apiGraph, w.context).plan.source, SOURCE); +}); + +test('Auto layered observations reject an unrelated override, missing layer or fabricated history field', () => { + for (const mutate of [ + (w) => { + w.context.executionReceipt.runtimePreparation.workflowAuto.resolvedFields.denoise = { layers: 2 }; + }, + (w) => { + w.context.executionReceipt.runtimePreparation.workflowAuto.appliedUpdates.push({ hidden: true }); + }, + (w) => { + w.context.executedOutput.mediaItems.pop(); + }, + (w) => { + nativeRow(w, 'denoise').fields.layers = { source: 'literal', value: 3 }; + }, + (w) => { + w.apiGraph.runtimeHints.workflowAutoPlan.graphHash = 'stale'; + }, + ]) { + const w = nativeImageWitness('layer_decomposition'); + mutate(w); + assert.notEqual(executionPlanIdentity(w.apiGraph, w.context).plan.source, SOURCE); + } +}); + +test('rehashed observations cannot switch the original model, source, input, image or claim level', () => { + const w = nativeImageWitness(), + plan = executionPlanIdentity(w.apiGraph, w.context).plan; + for (const mutate of [ + (p) => { + p.models.items[0].repoId = 'other/model'; + }, + (p) => { + p.runtime.backendSource.fingerprint = 'sha256:backend-source-v1:' + '0'.repeat(64); + }, + (p) => { + p.inputs.items[0].contentHash = 'sha256:bytes:' + '0'.repeat(64); + }, + (p) => { + p.output.items[0].encodedSha256 = 'sha256:bytes:' + '0'.repeat(64); + }, + (p) => { + p.taskId = 'other-task'; + }, + ]) { + const changed = structuredClone(proofFor(w, plan)); + mutate(changed); + assert(!observedNativeModularImageProofMatches(plan, changed)); + } + for (const mutate of [ + (p) => { + p.resourceObservation.completeFieldAccountingClaimed = true; + }, + (p) => { + p.resourceObservation.hardwareQualificationClaimed = true; + }, + (p) => { + p.resourceObservation.adapterApplicationObserved = true; + }, + (p) => { + p.resourceObservation.extraAuthority = true; + }, + ]) { + const changed = structuredClone(plan); + mutate(changed); + assert.equal(observedNativeModularImageResourceId(changed), null); + } +}); diff --git a/scripts/native-variant-run-evidence.mjs b/scripts/native-variant-run-evidence.mjs new file mode 100644 index 00000000..2d5b5aa2 --- /dev/null +++ b/scripts/native-variant-run-evidence.mjs @@ -0,0 +1,255 @@ +import assert from 'node:assert/strict'; + +export function bindRetainedCpuFloat32Recipe({ quantization, recipe, loader }) { + for (const [owner, field, baseline, observed] of [ + [loader, 'auto_offload', true, false], + [loader, 'device', 'cuda:0', 'cpu:0'], + [loader, 'dtype', 'float16', 'float32'], + [loader, 'offload_mode', 'model_cpu', 'none'], + [quantization, 'dtype', 'float16', 'float32'], + [recipe, 'device', 'cuda:0', 'cpu:0'], + [recipe, 'offload_mode', 'model_cpu', 'none'], + ]) { + const param = owner.node.params[field]; + assert.equal(param.value, baseline); + assert.ok(!param.sourceId && !param.sourceKey, 'A CPU variant requires literal resource controls.'); + param.value = observed; + } +} +import { stableStringify } from './live-proof-provenance.mjs'; + +const same = (a, b, message) => assert.equal(stableStringify(a), stableStringify(b), message); +const recordKeys = (row, keys, message) => same(Object.keys(row ?? {}).sort(), keys.sort(), message); +const nativeOutputFields = [ + 'id', + 'taskId', + 'sid', + 'clientRunId', + 'runInputHash', + 'workflowTabId', + 'attemptIndex', + 'nodeId', + 'fieldKey', + 'displayType', + 'formSnapshot', + 'graphSnapshot', + 'apiGraphSnapshot', + 'resolvedExecutionInputs', + 'backendProvenance', + 'mediaHash', + 'mediaCollectionHash', + 'mediaItems', +]; + +export function validateUnmodifiedExpertPreparation(preparation, modelType, previousModelFamily = null) { + const { availableRamBytes, availableVramBytes, ...status } = preparation; + assert.ok(Number.isSafeInteger(availableRamBytes) && availableRamBytes > 0); + assert.ok(Number.isSafeInteger(availableVramBytes) && availableVramBytes > 0); + same( + status, + { + cleanup: null, + incomingModelFamily: modelType, + performed: false, + previousModelFamily, + reasons: [], + residentRecipeReusable: false, + resourceMode: 'expert', + resourceRecipeChanged: previousModelFamily !== null, + }, + 'The captured resource preparation differed from the unmodified Expert recipe.', + ); +} + +// Join independently retained native task, output and completion facts. Route +// readers must separately bind the submitted graph, model and consumed inputs. +export function validateNativeVariantRun({ + target, + expectedFormMode = target.task, + outputNodeId, + displayType, + creator, + outputPackage, + retainedServerOutput, + run, + graphCompleted, + graphRequest, + graphAcknowledgment, + validatePreparation = (preparation) => assert.equal(preparation, null), +}) { + assert.equal(creator?.manifest?.packageType, 'modiff-workflow-share'); + const serverOnly = retainedServerOutput !== undefined; + if (serverOnly) { + assert.equal(outputPackage, undefined); + assert.equal(displayType, 'image'); + assert.ok(graphRequest && graphAcknowledgment, 'A server-retained image requires the original Run exchange.'); + assert.ok(retainedServerOutput.apiGraphSnapshot == null, 'Unexpected client API snapshot on server-only output.'); + } else { + assert.equal(outputPackage?.manifest?.packageType, 'modiff-output-package'); + } + const output = serverOnly ? retainedServerOutput : outputPackage.latestOutput; + const task = run.task; + const submitted = serverOnly ? graphRequest : output.apiGraphSnapshot; + const hints = submitted.runtimeHints; + recordKeys( + hints, + ['clientRunId', 'runInputHash', 'workflowTabId', 'workflowCanvasEpoch', 'workflowTitle', 'workflowSnapshot'], + 'Unexpected submission runtime hints.', + ); + if (!serverOnly) { + same(outputPackage.apiGraph, submitted, 'Original package API graph differs.'); + same(outputPackage.graph, output.graphSnapshot, 'Original package visual graph differs.'); + } + same(creator.metadata?.studio, output.formSnapshot, 'Creator form differs from the persisted output.'); + assert.equal(output.formSnapshot.mode, expectedFormMode); + assert.equal(output.formSnapshot.modelType, target.modelType); + assert.equal(output.formSnapshot.resourceMode, 'expert'); + assert.equal(task.status, 'completed'); + assert.equal(task.attempt_index, 0); + assert.equal(task.resourceCandidateId, null); + assert.ok(!task.runtimeHints || Object.keys(task.runtimeHints).length === 0); + assert.ok( + Number.isFinite(task.started_at) && Number.isFinite(task.completed_at) && task.completed_at >= task.started_at, + ); + assert.match(task.task_id, /^[a-zA-Z0-9_-]+$/u); + assert.equal(output.taskId, task.task_id); + assert.equal(output.sid, task.sid); + assert.equal(submitted.sid, task.sid); + assert.equal(output.attemptIndex, 0); + assert.equal(output.nodeId, outputNodeId); + assert.equal(output.fieldKey, 'preview'); + assert.equal(output.displayType, displayType); + assert.equal(run.workflow_id, output.workflowTabId); + assert.equal(run.workflow_title, hints.workflowTitle); + same(run.workflow_snapshot, hints.workflowSnapshot, 'Native workflow snapshot differs.'); + same(task.workflow_snapshot, hints.workflowSnapshot, 'Completed task workflow snapshot differs.'); + const context = { + client_run_id: hints.clientRunId, + run_input_hash: hints.runInputHash, + workflow_tab_id: hints.workflowTabId, + workflow_canvas_epoch: hints.workflowCanvasEpoch, + }; + for (const [key, value] of Object.entries(context)) { + assert.ok(typeof value === 'string' ? value.length > 0 : Number.isSafeInteger(value)); + assert.equal(task[key], value, 'Completed task context differs.'); + assert.equal(graphCompleted[key], value, 'Native completion context differs.'); + } + for (const key of ['clientRunId', 'runInputHash', 'workflowTabId']) assert.equal(output[key], hints[key]); + assert.equal(graphCompleted.type, 'graph_completed'); + assert.equal(graphCompleted.task_id, task.task_id); + assert.equal(graphCompleted.sid, task.sid); + assert.equal(graphCompleted.deterministicMode, null); + same(graphCompleted.resourceRetryHistory, []); + assert.equal(graphCompleted.runtimeBudget?.applied, false); + validatePreparation(task.runtimePreparation); + same(graphCompleted.runtimeFingerprint, task.runtimeFingerprint, 'Native completion runtime differs.'); + same(graphCompleted.runtimeMeasurement, task.runtimeMeasurement, 'Native completion measurements differ.'); + same(graphCompleted.runtimePreparation, task.runtimePreparation, 'Native completion preparation differs.'); + assert.equal(run.outputs.length, 1, 'A single native output is required.'); + const nativeOutput = run.outputs[0]; + for (const field of nativeOutputFields) { + if (serverOnly && field === 'apiGraphSnapshot') { + assert.ok(nativeOutput[field] == null, 'Unexpected client API snapshot on native task output.'); + continue; + } + assert.notEqual(output[field], undefined, `Original output is missing ${field}.`); + same(output[field], nativeOutput[field], `Original native output ${field} differs.`); + } + if (graphRequest !== undefined) { + same(graphRequest, submitted, 'Original Run request differs from the output graph.'); + assert.equal(graphAcknowledgment.error, false); + assert.equal(graphAcknowledgment.task_id, task.task_id); + assert.equal(graphAcknowledgment.sid, task.sid); + } + return { task, output, hints }; +} + +// The output store can attach its API snapshot after the completed task +// GET returns. Compare that original response and the late native record +// before applying the ordinary complete-output validation to the late record. +export function validateLateNativeSingleAssetRun({ run, persistedOutput, ...options }) { + assert.ok(['audio', 'image'].includes(options.displayType)); + assert.equal(run.outputs.length, 1); + const [early] = run.outputs; + assert.equal(early.apiGraphSnapshot, undefined, 'Unexpected already captured early API snapshot.'); + assert.ok(persistedOutput?.apiGraphSnapshot, 'The late native API snapshot is missing.'); + for (const field of nativeOutputFields) { + if (['apiGraphSnapshot', 'backendProvenance', 'mediaItems'].includes(field)) continue; + assert.notEqual(early[field], undefined, `Early native output lacks ${field}.`); + same(early[field], persistedOutput[field], `Native output changed ${field} during persistence.`); + } + const earlyMedia = early.mediaItems; + const lateMedia = persistedOutput.mediaItems; + assert.equal(earlyMedia.length, 1); + assert.equal(lateMedia.length, 1); + const { durationSeconds: earlyDuration, label: earlyLabel, ...earlyItem } = earlyMedia[0]; + const { durationSeconds: lateDuration, label: lateLabel, ...lateItem } = lateMedia[0]; + assert.equal(earlyDuration, null); + assert.equal(lateDuration, undefined); + assert.equal(earlyLabel, undefined); + assert.equal(lateLabel, 'Item 1'); + if (options.displayType === 'audio') { + const { height, width, ...audioItem } = earlyItem; + assert.equal(height, null); + assert.equal(width, null); + same(audioItem, lateItem, 'Native audio identity changed during persistence.'); + } else { + same(earlyItem, lateItem, 'Native image identity changed during persistence.'); + } + const provenanceAt = (row, media) => { + const { capturedAt, exactTemplateCompatible, promptSettingsHash, mediaItems, ...identity } = row.backendProvenance; + assert.ok(Number.isSafeInteger(capturedAt) && capturedAt > 0); + assert.ok(exactTemplateCompatible == null || exactTemplateCompatible === false); + assert.ok(promptSettingsHash == null); + same(mediaItems, media, 'Native provenance media differs from its output.'); + return { capturedAt, identity }; + }; + const earlyProof = provenanceAt(early, earlyMedia); + const lateProof = provenanceAt(persistedOutput, lateMedia); + assert.ok(earlyProof.capturedAt <= lateProof.capturedAt); + same(earlyProof.identity, lateProof.identity, 'Native provenance identity changed during persistence.'); + return validateNativeVariantRun({ ...options, run: { ...run, outputs: [persistedOutput] } }); +} + +export function validateNativeVariantOutput({ + output, + outputRef, + task, + bytes, + displayType, + contentType, + backendOnly = false, +}) { + const { backendProvenance } = output; + assert.equal(backendProvenance.source, 'backend-record'); + assert.equal(backendProvenance.backendExecutionId, task.task_id); + for (const key of ['clientRunId', 'runInputHash', 'workflowTabId']) { + if (backendOnly) { + assert.equal(backendProvenance[key] ?? null, null); + assert.equal(output[key] ?? null, null); + } else assert.equal(backendProvenance[key], output[key]); + } + assert.equal(backendProvenance.mediaCollectionHash, output.mediaCollectionHash); + assert.equal(backendProvenance.attemptIndex, 0); + assert.equal(backendProvenance.nodeId, output.nodeId); + assert.equal(backendProvenance.fieldKey, 'preview'); + assert.equal(backendProvenance.runtimeFingerprint, task.runtimeFingerprint.fingerprint); + assert.equal(backendProvenance.mediaPath, outputRef.backendPath); + assert.equal(backendProvenance.mediaHash, output.mediaHash); + same(backendProvenance.mediaItems, output.mediaItems); + assert.equal(output.mediaItems.length, 1); + const [item] = output.mediaItems; + assert.equal(item.index, 0); + assert.equal(item.backendPath, outputRef.backendPath); + assert.equal(item.taskId, task.task_id); + assert.equal(item.attemptIndex, 0); + assert.equal(item.clientRunId, backendOnly ? null : output.clientRunId); + assert.equal(item.runInputHash, backendOnly ? null : output.runInputHash); + assert.equal(item.displayType, displayType); + assert.equal(item.contentType, contentType); + assert.equal(outputRef.mediaType, displayType); + assert.equal(item.mediaHash, output.mediaHash); + assert.equal(item.mediaHash, `sha256:bytes:${outputRef.file.sha256}`); + assert.equal(item.byteSize, bytes.length); + return item; +} diff --git a/scripts/node-connection-search.test.mjs b/scripts/node-connection-search.test.mjs index 116c9174..da78839d 100644 --- a/scripts/node-connection-search.test.mjs +++ b/scripts/node-connection-search.test.mjs @@ -31,6 +31,131 @@ const definition = (params, action = 'Process') => ({ params, }); +test('an unmatched output recommends a usable material sibling and respects the exact role on each output', () => { + const output = (type, label, extra = {}) => ({ display: 'output', type, label, ...extra }); + const source = definition({ + original: output('prediction_map', 'Native prediction'), + width: output('int', 'Width'), + hidden: output('image', 'Internal preview', { hidden: true }), + off: output('image', 'Inactive preview', { disabled: true }), + metadata: output('any', 'Metadata'), + input: { display: 'input', type: 'image' }, + mask: output('image', 'Mask', { connectionRole: 'mask' }), + color: output('image', 'Color preview', { connectionRole: 'source' }), + }); + const target = definition({ + image: { display: 'input', type: 'image', signalCompatibility: { role: 'source' } }, + width: { display: 'input', type: 'int' }, + }); + const origin = { node: source, handleId: 'original' }; + const probed = []; + const result = search.usableSiblingOutput(origin, (sibling, type) => { + probed.push(sibling.handleId); + return search.matchingNodeHandleForDrop(target, type, 'source', sibling, false)?.[0]; + }); + assert.deepEqual(result, { handleId: 'color', label: 'Color preview', destination: 'image' }); + assert.deepEqual(probed, ['mask', 'color']); + assert.equal( + search.usableSiblingOutput(origin, () => undefined), + undefined, + ); +}); + +test('the shipped Marigold workflow points from its native depth map to its wired preview image', () => { + const graph = JSON.parse( + readFileSync( + new URL('../../MoDiff/data/graphs/studio/marigold-depth-pipeline/depth-estimation.json', import.meta.url), + ), + ); + const source = graph.nodes.find((node) => node.data.action === 'PredictMap'); + const preview = graph.nodes.find((node) => node.data.module === 'modules.Image' && node.data.action === 'Preview'); + const origin = { node: source.data, handleId: 'prediction_map' }; + assert.equal( + search.matchingNodeHandleForDrop(preview.data, source.data.params.prediction_map.type, 'source', origin, false), + undefined, + ); + const suggestion = search.usableSiblingOutput(origin, (sibling, type) => + search.matchingNodeHandleForDrop(preview.data, type, 'source', sibling, false) ? preview.data.label : undefined, + ); + assert.deepEqual(suggestion, { handleId: 'preview_images', label: 'Preview', destination: 'Preview Image' }); + assert.ok( + graph.edges.some( + (edge) => + edge.source === source.id && + edge.sourceHandle === suggestion.handleId && + edge.target === preview.id && + edge.targetHandle === 'image', + ), + ); +}); + +test('backend-declared component role selectors accept only an exact unconnected literal selection', async () => { + const storage = new Map(); + globalThis.localStorage ??= { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, value), + removeItem: (key) => storage.delete(key), + }; + globalThis.window ??= { + location: { origin: 'http://127.0.0.1:5191' }, + localStorage: globalThis.localStorage, + dispatchEvent: () => true, + }; + const matching = await server.ssrLoadModule('/src/workflow/nodeConnectionMatching.ts'); + const { parseNodesResponse } = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); + const selector = { field: 'model_type', values: { controlnet: 'controlnet_component' } }; + const loader = definition( + { + model_type: { type: 'string', value: 'controlnet' }, + model: { display: 'output', type: 'diffusers_auto_model', connectionRoleSelector: selector }, + }, + 'AutoModelLoader', + ); + const control = definition( + { + controlnet: { + display: 'input', + type: 'diffusers_auto_model', + signalCompatibility: { role: 'controlnet_component' }, + }, + }, + 'Controlnet', + ); + const parsed = parseNodesResponse({ + instance: 'component-contract', + nodes: { 'custom.Workbench.AutoModelLoader': loader }, + }); + assert.deepEqual(parsed.nodes['custom.Workbench.AutoModelLoader'].params.model.connectionRoleSelector, selector); + const compatible = (source) => matching.nodeConnectionSemanticsAreCompatible(source, 'model', control, 'controlnet'); + assert.equal(compatible(loader), true); + for (const value of ['', 'vae', 'unet', 'transformer', 'unknown', undefined, 1, { value: 'controlnet' }]) { + const source = structuredClone(loader); + source.params.model_type.value = value; + assert.equal(compatible(source), false, `unsupported selector ${JSON.stringify(value)}`); + } + const connected = structuredClone(loader); + connected.params.model_type.isConnected = true; + assert.equal(compatible(connected), false, 'a connected selector cannot borrow the stale local literal'); + const missing = structuredClone(loader); + delete missing.params.model_type; + assert.equal(compatible(missing), false); + for (const malformed of [ + null, + [], + {}, + { field: 'model_type', values: {} }, + { field: 'model_type', values: { controlnet: 1 } }, + { field: 'model_type', values: { controlnet: 'controlnet_component' }, extra: true }, + { field: '__proto__', values: { controlnet: 'controlnet_component' } }, + ]) { + const source = structuredClone(loader); + source.params.model.connectionRoleSelector = malformed; + source.params.model.connectionRole = 'controlnet_component'; + assert.throws(() => parseNodesResponse({ nodes: { source } }), /invalid connection role selector/); + assert.equal(compatible(source), false, 'malformed saved declarations fail closed'); + } +}); + test('insertion preserves the discovery policy and rejects stale endpoints without choosing another socket', async () => { const { matchingNodeHandleForInsertion } = await server.ssrLoadModule('/src/workflow/nodeConnectionMatching.ts'); const node = definition({ metadata: { type: 'any', display: 'input' }, image: { type: 'image', display: 'input' } }); @@ -54,6 +179,40 @@ test('insertion preserves the discovery policy and rejects stale endpoints witho ); }); +test('generic drag suggestions and insertion exclude hidden or disabled candidate sockets in both directions', async () => { + const { matchingNodeHandleForInsertion } = await server.ssrLoadModule('/src/workflow/nodeConnectionMatching.ts'); + for (const handleType of ['source', 'target']) { + const display = handleType === 'source' ? 'input' : 'output'; + const origin = { + handleId: 'image', + node: definition({ image: { type: 'image', display: display === 'input' ? 'output' : 'input' } }), + }; + for (const restriction of ['hidden', 'disabled']) { + for (const allowUnverified of [false, true]) { + const unavailable = { type: 'image', display, [restriction]: true }; + const node = definition({ unavailable }); + const selection = { dataType: 'image', handleType, origin, allowUnverified }; + assert.deepEqual( + search.connectionSearchEntries({ candidate: node }, 'image', handleType, '', 'all', origin, allowUnverified), + [], + `${restriction} ${display} must not be suggested`, + ); + assert.equal(matchingNodeHandleForInsertion(node, selection, origin), undefined); + const visible = definition({ unavailable, image: { type: 'image', display } }); + assert.equal( + search.matchingNodeHandleForDrop(visible, 'image', handleType, origin, allowUnverified)?.[0], + 'image', + ); + assert.equal(matchingNodeHandleForInsertion(visible, selection, origin)?.[0], 'image'); + if (display === 'input') { + const widget = definition({ unavailable: { ...unavailable, display: 'text', isInput: true } }); + assert.equal(matchingNodeHandleForInsertion(widget, selection, origin), undefined); + } + } + } + } +}); + test('insertion revalidates derived Block crossing sockets using the normal connector resolver', async () => { const { matchingNodeHandleForInsertion } = await server.ssrLoadModule('/src/workflow/nodeConnectionMatching.ts'); const schema = await server.ssrLoadModule('/src/studio/blockSchemaV2.ts'); @@ -625,3 +784,45 @@ test('every shipped compiled catalog interface agrees with the frontend route an } } }); + +test('a wire from an authored stage finds model-resolved ports absent from its bare registry', () => { + const pipeline = 'ExampleModularPipeline'; + const common = { pipelineClass: pipeline, task: 'text_to_image', binding: { values: {}, pipelineClass: pipeline } }; + const encoder = { ...common, operationId: 'image.encode', nodeKey: 'modules.Sample.Encode', ports: [] }; + const port = { name: 'image_latents', direction: 'input', roles: ['value'], types: ['latents'], hidden: false }; + const denoise = { ...common, operationId: 'image.denoise', nodeKey: 'modules.Sample.Denoise', ports: [port] }; + const bare = definition({ unet: { type: 'model', display: 'input' } }); + const stage = { + node: { + ...definition({}), + blockInstanceV2: { + effectiveInterface: { boundary: { inputs: [], outputs: [] } }, + effectiveGraph: { nodes: [{ nodeId: 'encoder', data: { operationAuthoring: { operation: encoder } } }] }, + }, + }, + handleId: 'image_latents', + }; + assert.deepEqual(search.wireOperationScope(stage, [encoder, denoise]), { pipeline, task: common.task }); + assert.deepEqual(search.wireOperationScope(stage, [denoise]), undefined); + assert.equal(search.operationWirePort(bare, denoise, 'latents', 'source'), 'image_latents'); + assert.equal(search.operationWirePort(bare, denoise, 'string', 'source'), undefined); + assert.equal(search.operationWirePort(bare, denoise, 'latents', 'target'), undefined); + assert.equal( + search.operationWirePort(bare, { ...denoise, ports: [{ ...port, hidden: true }] }, 'latents', 'source'), + undefined, + ); +}); + +test('a dedicated prompt socket wins over a same-type editable prompt earlier in the contract', () => { + const value = { direction: 'input', roles: ['value'], types: ['string'] }; + const op = { + ports: [ + { ...value, name: 'prompt' }, + { ...value, name: 'prompt_input' }, + ], + }; + const bare = definition({ prompt_input: { type: 'string', display: 'input' } }); + assert.equal(search.operationWirePort(bare, op, 'string', 'source'), 'prompt_input'); + const resolved = definition({ ...bare.params, prompt: { type: 'string', display: 'textarea' } }); + assert.equal(search.operationWirePort(resolved, op, 'string', 'source'), 'prompt_input'); +}); diff --git a/scripts/node-presentation.test.mjs b/scripts/node-presentation.test.mjs index 9c9e3869..9429939a 100644 --- a/scripts/node-presentation.test.mjs +++ b/scripts/node-presentation.test.mjs @@ -5,9 +5,18 @@ import { createServer } from 'vite'; let server; let catalog; let browser; +let presentation; +let utilityPresentation; +let operationCatalog; const cases = [ ['ModularDiffusers', 'ModelsLoader', 'Load Models', 'Load Modular Components'], ['ModularDiffusers', 'AutoModelLoader', 'Load Model', 'Load Model Component'], + [ + 'ModularDiffusers', + 'WorkflowJointAVReferenceAssembler', + 'Add Ordered Video or Audio Reference', + 'Add Ordered Media Reference', + ], ['DiffusersImage', 'LoadPipeline', 'Load Diffusers Image Pipeline', 'Load Image Pipeline'], ['DiffusersAudio', 'LoadPipeline', 'Load Diffusers Audio Pipeline', 'Load Audio Pipeline'], ['DiffusersVideo', 'LoadPipeline', 'Load Diffusers Video Pipeline', 'Load Video Pipeline'], @@ -25,7 +34,7 @@ const cases = [ ['DiffusersImage', 'ControlInpaint', 'Diffusers Control Inpaint', 'Inpaint Image with Control'], ['Audio', 'Preview', 'Preview Audio', 'Preview Audio'], ['Image', 'Preview', 'Preview Image', 'Preview Image'], - ['ModularDiffusers', 'LatentsPreview', 'Latents Preview', 'Preview Latents'], + ['ModularDiffusers', 'LatentsPreview', 'Latents Preview', 'Preview 4-Channel Latent'], ['Audio', 'Export', 'Export Audio', 'Export Audio'], ['Image', 'Save', 'Save Image', 'Save Image'], ['Primitive', 'ExportData', 'Export Data', 'Export Data'], @@ -45,6 +54,9 @@ before(async () => { }); catalog = await server.ssrLoadModule('/src/studio/nodeCatalog.ts'); browser = await server.ssrLoadModule('/src/workflow/workflowTaskBrowser.ts'); + presentation = await server.ssrLoadModule('/src/workflow/nodePresentation.ts'); + utilityPresentation = await server.ssrLoadModule('/src/workflow/builtinUtilityOperationPresentation.ts'); + operationCatalog = await server.ssrLoadModule('/src/workflow/operationCatalog.ts'); }); after(async () => server?.close()); @@ -76,6 +88,359 @@ test('user titles remain intact and a registry alias uses the executable identit assert.equal(catalog.getNodeCatalogEntry({ ...data, label: 'My border preparation' }).label, 'My border preparation'); }); +test('canonical portable captions display their exact execution action while retaining authored titles and data', () => { + const stock = [ + ['DiffusersAudio', 'Generate', 'Diffusers.GenerateAudio', 'Generate Audio'], + ['DiffusersAudio', 'LoadPipeline', 'Diffusers.LoadPipeline', 'Load Audio Pipeline'], + ['DiffusersImage', 'ControlEdit', 'Diffusers.ControlEdit', 'Edit Image with Control'], + ['DiffusersImage', 'ControlGenerate', 'Diffusers.Control', 'Generate Image with Control'], + ['DiffusersImage', 'ControlInpaint', 'Diffusers.ControlInpaint', 'Inpaint Image with Control'], + ['DiffusersImage', 'Edit', 'Diffusers.Edit', 'Edit Image'], + ['DiffusersImage', 'Generate', 'Diffusers.Generate', 'Generate Image'], + ['DiffusersImage', 'Inpaint', 'Diffusers.Inpaint', 'Inpaint Image'], + ['DiffusersImage', 'LoadPipeline', 'Diffusers.LoadPipeline', 'Load Image Pipeline'], + ['DiffusersThreeD', 'GenerateRenderedArtifact', 'Diffusers.Generate3D', 'Render 3D Orbit'], + ['DiffusersThreeD', 'LoadPipeline', 'Diffusers.LoadPipeline', 'Load 3D Pipeline'], + ['DiffusersVideo', 'Generate', 'Diffusers.Generate', 'Generate Video'], + ['DiffusersVideo', 'GenerateVideoAudio', 'Diffusers.Generate', 'Generate Video and Audio'], + ['DiffusersVideo', 'LoadPipeline', 'Diffusers.LoadPipeline', 'Load Video Pipeline'], + ['ModularDiffusers', 'ModelsLoader', 'Diffusers.LoadPipeline', 'Load Modular Components'], + ]; + for (const [module, action, label, expected] of stock) { + const data = node(module, action, label); + const before = JSON.stringify(data); + assert.equal(presentation.nodeDisplayLabel(data), expected, module + '.' + action); + assert.equal(catalog.nodeCatalogEntryMatchesSearch(catalog.getNodeCatalogEntry(data), label), true); + assert.equal(presentation.nodeDisplayLabel({ ...data, label: label + ' for my scene' }), label + ' for my scene'); + assert.equal(presentation.nodeDisplayLabel({ ...data, module: 'custom.Models' }), label); + assert.equal(JSON.stringify(data), before); + } + const authored = node('DiffusersImage', 'Edit', 'Diffusers.Generate'); + assert.equal(presentation.nodeDisplayLabel(authored), 'Diffusers.Generate'); +}); + +test('stock media loaders show their bound role without changing custom names or unbound palette entries', () => { + const stock = [ + ['Image', 'loadImage', 'Source Image'], + ['Image', 'loadMask', 'Mask'], + ['Image', 'loadControlImage', 'Control Image'], + ['Image', 'loadIPAdapterImage', 'Reference Image'], + ['Image', 'loadLastImage', 'Last Frame'], + ['Audio', 'loadAudio', 'Source Audio'], + ['Audio', 'loadReferenceAudio', 'Reference Audio'], + ['Video', 'loadVideo', 'Source Video'], + ['Video', 'loadReferenceVideo', 'Reference Video'], + ['Video', 'loadControlVideo', 'Control Video'], + ['Video', 'loadMaskVideo', 'Mask Video'], + ['Video', 'loadPoseVideo', 'Pose Video'], + ['Video', 'loadFaceVideo', 'Face Video'], + ['Video', 'loadBackgroundVideo', 'Background Video'], + ]; + for (const [module, studioRole, expected] of stock) { + const label = 'Load ' + module; + const data = { ...node(module, 'Load', label), studioRole }; + const before = JSON.stringify(data); + assert.equal(presentation.nodeDisplayLabel(data), expected); + assert.equal( + presentation.nodeDisplayLabel({ ...data, label: 'Reference from my camera' }), + 'Reference from my camera', + ); + assert.equal(presentation.nodeDisplayLabel({ ...data, studioRole: 'unknownRole' }), label); + assert.equal(presentation.nodeDisplayLabel({ ...data, module: 'custom.Media' }), label); + assert.equal(presentation.nodeDisplayLabel({ ...data, action: 'Clone' }), label); + assert.equal(presentation.nodeDisplayLabel({ ...data, studioRole: undefined }), label); + assert.equal(JSON.stringify(data), before); + } + assert.equal( + presentation.nodeDisplayLabel({ ...node('Audio', 'Load', 'Load Audio'), studioRole: 'loadMask' }), + 'Load Audio', + ); +}); + +test('managed image actions show their exact task instead of the shared generation operation title', () => { + const cases = [ + ['Edit', 'edit_image', 'Edit Image'], + ['Edit', 'multi_image_reference_edit', 'Edit Image'], + ['Inpaint', 'inpaint', 'Inpaint Image'], + ['Inpaint', 'outpaint', 'Outpaint Image'], + ['ControlGenerate', 'control_image', 'Generate Image with Control'], + ['ControlEdit', 'control_edit_image', 'Edit Image with Control'], + ['ControlInpaint', 'control_inpaint', 'Inpaint Image with Control'], + ['UnconditionalGenerate', 'unconditional_image', 'Generate Unconditional Image'], + ]; + for (const [action, task, expected] of cases) { + const data = { + ...node('DiffusersImage', action, 'Generate Image'), + operationAuthoring: { + operation: { operationId: 'diffusion.generate_image', nodeKey: `modules.DiffusersImage.${action}`, task }, + }, + }; + const before = JSON.stringify(data); + assert.equal(presentation.nodeDisplayLabel(data), expected); + assert.equal(operationCatalog.operationLabel(data.operationAuthoring.operation), expected); + assert.equal(presentation.nodeDisplayLabel({ ...data, label: 'My authored stage' }), 'My authored stage'); + assert.equal(presentation.nodeDisplayLabel({ ...data, module: 'custom.Images' }), 'Generate Image'); + assert.equal(JSON.stringify(data), before); + } + assert.equal( + operationCatalog.operationLabel({ operationId: 'diffusion.generate_image', nodeKey: 'custom.Images.Edit' }), + 'Generate image', + ); +}); + +test('common discovery shows ordinary image and video preparation but keeps native recipe details advanced', () => { + const cases = [ + ['DiffusersImage', 'ControlEdit', 'Edit'], + ['DiffusersImage', 'ControlInpaint', 'Edit'], + ['DiffusersImage', 'LayerDecompose', 'Edit'], + ['DiffusersImage', 'PredictMap', 'Condition'], + ['VideoConditioning', 'Normalize', 'Condition'], + ['VideoConditioning', 'AlignMask', 'Edit'], + ['VideoConditioning', 'OutpaintCanvas', 'Edit'], + ['VideoConditioning', 'EdgePreprocessor', 'Condition'], + ]; + for (const [module, action, category] of cases) { + const entry = catalog.getNodeCatalogEntry(node(module, action, action)); + assert.equal(entry.surfaceCategory, category); + assert.equal( + catalog.nodeCatalogEntryMatchesView(entry, 'common'), + !['ControlEdit', 'ControlInpaint'].includes(action), + ); + assert.ok(catalog.nodeCatalogEntryMatchesView(entry, 'common', true)); + assert.equal(entry.dragKey, `modules.${module}.${action}`); + } + for (const [module, action] of [ + ['DiffusersRuntime', 'PipelineQuantizationConfigV2'], + ['DiffusersRuntime', 'DiffusersExecutionRecipe'], + ['ModularDiffusers', 'WorkflowMiniMaxH3TextEncode'], + ]) { + const entry = catalog.getNodeCatalogEntry(node(module, action, action)); + assert.equal(catalog.nodeCatalogEntryMatchesView(entry, 'common'), false); + assert.ok(catalog.nodeCatalogEntryMatchesView(entry, 'advanced')); + } +}); + +test('ordinary controls and sockets distinguish requested settings from supplied or measured results', () => { + const fields = [ + ['Image.Merge', 'image_from', 'Image From', 'Overlay image'], + ['Image.Merge', 'image_to', 'Image To', 'Base image'], + ['Image.Merge', 'output', 'Output', 'Composite image'], + ['Image.ApplyMask', 'output', 'Output', 'Masked image'], + ['Image.Compare', 'image_1', 'Image From', 'Before image'], + ['Image.Compare', 'image_2', 'Image To', 'After image'], + ['Image.Preview', 'export', 'Export', 'Image indices'], + ['Video.FrameExtract', 'fps', 'FPS', 'Frame-list FPS'], + ['VideoConditioning.FirstLastFrames', 'first', 'First', 'First frame'], + ['VideoConditioning.FirstLastFrames', 'last', 'Last', 'Last frame'], + ['VideoConditioning.FirstLastFrames', 'references', 'References', 'Frame pair'], + ['ModularDiffusers.Guider', 'guider', 'Guider', 'Guidance type'], + ['ModularDiffusers.Guider', 'guider_out', 'Guider', 'Configured guider'], + ['ModularDiffusers.ModelsLoader', 'unet', 'Denoise Model', 'Denoiser override'], + ['ModularDiffusers.ModelsLoader', 'unet_out', 'Denoise Model', 'Loaded denoiser'], + ['ModularDiffusers.ModelsLoader', 'vae', 'VAE', 'VAE override'], + ['ModularDiffusers.ModelsLoader', 'vae_out', 'VAE', 'Loaded VAE'], + ['DiffusersRuntime.ApplyPipelineRuntimeConfig', 'configured_pipeline', 'Pipeline', 'Configured pipeline'], + ['DiffusersImage.LoadAdapter', 'output', 'Pipeline', 'Adapted pipeline'], + ['DiffusersImage.Generate', 'width_out', 'Width', 'Actual width'], + ['DiffusersImage.Inpaint', 'height_out', 'Height', 'Actual height'], + ['DiffusersVideo.Denoise', 'width_out', 'Width', 'Actual width'], + ['DiffusersVideo.GenerateVideoAudio', 'height_out', 'Height', 'Actual height'], + ['VideoConditioning.Normalize', 'video', 'Video', 'Source frames'], + ['VideoConditioning.Normalize', 'num_frames', 'Frames', 'Target frames'], + ['VideoConditioning.Normalize', 'output', 'Video', 'Normalized video'], + ['VideoConditioning.Normalize', 'frames_out', 'Frames', 'Actual frame count'], + ['ModularDiffusers.Scheduler', 'scheduler_in', 'Scheduler', 'Base scheduler'], + ['ModularDiffusers.Scheduler', 'scheduler', 'Scheduler', 'Scheduler type'], + ['ModularDiffusers.Scheduler', 'scheduler_out', 'Scheduler', 'Configured scheduler'], + ['Video.MuxAudioAsset', 'fit', 'Duration', 'Audio fit'], + ['Video.MuxAudioAsset', 'duration_seconds', 'Duration', 'Measured duration (s)'], + ['DiffusersAudio.Generate', 'sample_rate', 'Sample Rate', 'Requested sample rate'], + ['DiffusersAudio.Generate', 'sample_rate_out', 'Sample Rate', 'Actual sample rate'], + ['Audio.FitDuration', 'target_sample_rate', 'Target SR', 'Target sample rate'], + ]; + for (const [action, field, label, expected] of fields) { + const key = `modules.${action}`; + assert.equal(presentation.nodeFieldDisplayLabel(key, field, label), expected); + assert.equal(presentation.nodeFieldDisplayLabel(key, field, 'My title'), 'My title'); + assert.equal(presentation.nodeFieldDisplayLabel(`custom.${action}`, field, label), label); + } +}); + +test('the reviewed Block placement helper stays resolvable but cannot be inserted from discovery', () => { + const step = node('ModularDiffusers', 'ReviewedModularWorkflowStep', 'Reviewed Modular Diffusers Block'); + const [entry] = catalog.nodeCatalogEntries({ 'modules.ModularDiffusers.ReviewedModularWorkflowStep': step }); + assert.equal(entry.node, step); + for (const view of ['common', 'advanced', 'experimental', 'all']) { + assert.equal(catalog.nodeCatalogEntryMatchesView(entry, view), false); + } + const custom = catalog.getNodeCatalogEntry({ ...step, module: 'custom.Example' }); + assert.equal(catalog.nodeCatalogEntryMatchesView(custom, 'common'), true); +}); + +test('utility enum captions retain values, live status and authored labels', () => { + const descriptor = { + schemaVersion: 1, + value: 'audio_loudness_match', + label: 'audio_loudness_match', + compatibility: 'unknown', + availability: 'unavailable', + installationState: 'unavailable', + disabledReason: 'Retain this status', + }; + const custom = { ...descriptor, value: 'audio_join', label: 'My soundtrack join' }; + const options = ['audio_trim', descriptor, custom]; + assert.deepEqual( + utilityPresentation.builtinUtilityOptionPresentation('modules.Audio.ProcessAudio', 'operation', options), + [{ value: 'audio_trim', label: 'Trim Audio' }, { ...descriptor, label: 'Match Loudness' }, custom], + ); + assert.equal( + utilityPresentation.builtinUtilityOptionPresentation('custom.Audio.ProcessAudio', 'operation', options), + options, + ); + assert.equal(descriptor.label, descriptor.value); +}); + +test('direct and generic image filters keep only effective controls without replacing saved settings', () => { + const { builtinUtilityOperationPresentation, builtinUtilityOptionPresentation } = utilityPresentation; + const direct = 'modules.ImageOperations.FilterImage'; + const generic = 'modules.ImageOperations.ProcessImage'; + const params = { operation: { default: 'gaussian_blur' }, threshold: { value: 11 }, seed: { value: 23 } }; + const snapshot = structuredClone(params); + assert.deepEqual([...builtinUtilityOperationPresentation(direct, params).inactive].sort(), ['seed', 'threshold']); + for (const [filter, unavailable] of [ + ['unsharp_mask', 'seed'], + ['film_grain', 'threshold'], + ]) { + const directView = builtinUtilityOperationPresentation(direct, { ...params, operation: { value: filter } }); + const genericView = builtinUtilityOperationPresentation(generic, { + ...params, + operation: { value: 'image_filter' }, + filter_operation: { value: filter }, + }); + assert.deepEqual([...directView.inactive], [unavailable]); + assert.equal(genericView.inactive.has(unavailable), true); + assert.equal(genericView.inactive.has(unavailable === 'seed' ? 'threshold' : 'seed'), false); + } + assert.deepEqual( + [ + ...builtinUtilityOperationPresentation(direct, { operation: { value: 'gaussian_blur', isConnected: true } }) + .inactive, + ], + [], + ); + assert.equal(builtinUtilityOperationPresentation('custom.Custom.FilterImage', params), undefined); + assert.deepEqual(builtinUtilityOptionPresentation(direct, 'operation', ['gaussian_blur', 'film_grain']), [ + { value: 'gaussian_blur', label: 'Gaussian Blur' }, + { value: 'film_grain', label: 'Film Grain' }, + ]); + assert.deepEqual(params, snapshot); +}); + +test('direct frame extraction shows the selected timing input and preserves frame-list FPS', () => { + const { builtinUtilityOperationPresentation, builtinUtilityOptionPresentation } = utilityPresentation; + const action = 'modules.Video.FrameExtract'; + const params = { mode: { default: 'first_last' }, fps: { value: 24 }, timecodes: { value: '1.25' } }; + const before = structuredClone(params); + assert.deepEqual( + [...builtinUtilityOperationPresentation(action, params).inactive], + ['indices', 'timecodes', 'every_n'], + ); + for (const active of ['indices', 'timecodes', 'every_n']) { + const { inactive } = builtinUtilityOperationPresentation(action, { ...params, mode: { value: active } }); + assert.equal(inactive.size, 2); + assert.equal(inactive.has(active), false); + assert.equal(inactive.has('fps'), false); + } + assert.deepEqual( + [...builtinUtilityOperationPresentation(action, { mode: { value: 'timecodes', isConnected: true } }).inactive], + [], + ); + assert.deepEqual(builtinUtilityOptionPresentation(action, 'mode', ['first_last', 'timecodes']), [ + { value: 'first_last', label: 'First and Last Frames' }, + { value: 'timecodes', label: 'Timecodes' }, + ]); + assert.deepEqual(params, before); +}); + +test('one discoverable transcription stage and one video editor accept typed connections', () => { + const entry = (action) => catalog.getNodeCatalogEntry(node('HuggingFaceSpeech', action, action)); + assert.ok(catalog.nodeCatalogEntryMatchesView(entry('TranscribeAudio'), 'common')); + assert.equal(catalog.nodeCatalogEntryMatchesView(entry('TranscribeCTCAudio'), 'common'), false); + const saved = { operation: { value: 'video_trim' }, videos: { value: ['original.mp4'] }, fps: { value: 25 } }; + const backup = structuredClone(saved); + for (const connected of [false, true, false]) { + const view = utilityPresentation.builtinUtilityOperationPresentation('modules.Video.ProcessVideo', { + ...saved, + source: { isConnected: connected }, + }); + assert.equal(view.inactive.has('videos'), connected); + assert.equal(view.inactive.has('fps'), !connected); + } + assert.deepEqual(saved, backup); +}); + +test('discoverability reflects the encoder role and both declared upscale media types', () => { + const encoder = { ...node('ModularDiffusers', 'ImageEncode', 'Encode Image'), category: 'sampler' }; + const upscaler = { + ...node('Spandrel', 'Upscaler', 'Upscale with model'), + category: 'upscaler', + params: { + image: { display: 'input', type: ['image', 'video'] }, + output: { display: 'output', type: ['image', 'video'] }, + }, + }; + const before = JSON.stringify({ encoder, upscaler }); + const encode = catalog.getNodeCatalogEntry(encoder); + assert.deepEqual(encode.groupPath, ['Models & Components', 'Condition']); + assert.equal(encode.dragKey, 'modules.ModularDiffusers.ImageEncode'); + assert.ok(catalog.nodeCatalogEntryMatchesSearch(encode, 'encode image')); + + const upscale = catalog.getNodeCatalogEntry(upscaler); + assert.deepEqual(upscale.groupPath, ['Image & Video', 'Upscale']); + assert.equal(upscale.dragKey, 'modules.Spandrel.Upscaler'); + assert.equal(upscale.label, 'Upscale Image or Video'); + assert.ok(catalog.nodeCatalogEntryMatchesView(upscale, 'common')); + for (const search of ['image upscale', 'video upscale', 'Upscale with model']) { + assert.ok(catalog.nodeCatalogEntryMatchesSearch(upscale, search), search); + } + const imageOnly = { + ...upscaler, + params: { ...upscaler.params, image: { display: 'input', type: 'image' } }, + }; + assert.notEqual(catalog.getNodeCatalogEntry(imageOnly).groupPath[0], 'Image & Video'); + assert.equal(JSON.stringify({ encoder, upscaler }), before); +}); + +test('image task discovery leads with creative tasks and searches across modality and guidance aliases', () => { + const tasks = ['text_to_video', 'image_upscale', 'controlnet_ip_adapter', 'edit_image', 'text_to_image']; + const cards = browser.workflowTaskCards(tasks.map((task) => ({ task }))); + assert.deepEqual( + cards.filter((card) => card.category === 'Image' && !card.specialist).map((card) => card.task), + ['text_to_image', 'edit_image', 'image_upscale'], + ); + assert.deepEqual( + cards.filter((card) => browser.matchesWorkflowTask(card, 'video')).map((card) => card.task), + ['text_to_video'], + ); + assert.deepEqual( + cards.filter((card) => browser.matchesWorkflowTask(card, 'ip-adapter')).map((card) => card.task), + ['controlnet_ip_adapter'], + ); +}); + +test('video route labels explain the reference inputs and keep their executable identifiers', () => { + const routes = { + flf2v: 'Video from first and last frames', + first_last_frame_to_video_with_audio: 'Video and audio from first and last frames', + in_context_to_video: 'Generate video with a reference clip', + }; + for (const card of browser.workflowTaskCards(Object.keys(routes).map((task) => ({ task })))) { + assert.equal(card.label, routes[card.task]); + assert.equal(card.category, 'Video'); + assert.ok(browser.matchesWorkflowTask(card, card.task)); + } +}); + test('task browser groups modalities, deduplicates models and prefers available composable execution', () => { const choice = (id, task, overrides = {}) => ({ id, diff --git a/scripts/node-store-requests.test.mjs b/scripts/node-store-requests.test.mjs index 7e5ab59d..134ee3cf 100644 --- a/scripts/node-store-requests.test.mjs +++ b/scripts/node-store-requests.test.mjs @@ -18,6 +18,8 @@ let stableHashModule; let studioStoreModule; let flowStoreModule; let originalFetch; +let controlModule; +let websocketMessagesModule; function requestStates() { return Object.fromEntries( @@ -53,6 +55,8 @@ before(async () => { flowStoreModule = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); studioStoreModule = await server.ssrLoadModule('/src/stores/useStudioStore.ts'); nodesStoreModule = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); + controlModule = await server.ssrLoadModule('/src/utils/supervisorControl.ts'); + websocketMessagesModule = await server.ssrLoadModule('/src/stores/websocketMessageHandler.ts'); operationContractsModule = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); optionalRuntimesModule = await server.ssrLoadModule('/src/studio/optionalRuntimes.ts'); runReadinessModule = await server.ssrLoadModule('/src/studio/runReadiness.ts'); @@ -61,6 +65,7 @@ before(async () => { }); beforeEach(() => { + controlModule.resetSupervisorControl(); nodesStoreModule.useNodesStore.setState({ nodesRegistry: {}, isLoading: false, @@ -197,6 +202,52 @@ function fluxExecutionProfile( }; } +test('execution-profile repository revisions are bounded, immutable and owned by that exact profile', () => { + const profile = { + ...fluxExecutionProfile(), + fallback_repo: 'review/fallback', + compatible_repos: ['review/compatible'], + }; + const parse = (pairs) => + optionalRuntimesModule.parseOptionalRuntimeExecutionProfiles( + [{ ...structuredClone(profile), ...(pairs === undefined ? {} : { repository_revisions: pairs }) }], + undefined, + (mode) => mode === 'text_to_image', + )[0]; + const valid = [ + { repo: profile.default_repo, revision: 'a'.repeat(40) }, + { repo: profile.fallback_repo, revision: 'b'.repeat(40) }, + { repo: profile.compatible_repos[0], revision: 'a'.repeat(40) }, + ]; + assert.deepEqual(parse(valid).repository_revisions, valid); + assert.deepEqual( + parse([valid[1]]).repository_revisions, + [valid[1]], + 'A lowercase declared repository remains exact.', + ); + assert.equal( + parse(undefined).repository_revisions, + undefined, + 'Older metadata remains parseable without granting Add.', + ); + assert.deepEqual(parse([]).repository_revisions, []); + for (const pairs of [ + null, + {}, + [null], + [{ ...valid[0], extra: true }], + [{ repo: 'unrelated/repository', revision: 'a'.repeat(40) }], + [{ repo: 'Review/Fallback', revision: valid[1].revision }], + [{ repo: profile.default_repo, revision: 'main' }], + [{ repo: profile.default_repo, revision: 'A'.repeat(40) }], + [{ repo: profile.default_repo, revision: 123 }], + [valid[0], valid[0]], + [valid[0], { ...valid[0], revision: 'b'.repeat(40) }], + Array.from({ length: 33 }, () => valid[0]), + ]) + assert.throws(() => parse(pairs), /runtime contract/i); +}); + function fluxExecutionSpec(overrides = {}) { const semantic = { schemaVersion: 1, @@ -1499,8 +1550,8 @@ test('optional runtime catalog parsing is bounded and qualified-active only', () ); assert.equal( optionalRuntimesModule.optionalRuntimeBlockState(mixedPins, mixedCatalog), - null, - 'one active alternative pin must satisfy the optional-runtime requirement', + 'wrong_version', + 'every requested profile must match the backend guard; a second pin is not implicitly an alternative', ); for (const [label, activeProfileId, activeDigest] of [ [ @@ -1790,6 +1841,57 @@ test('optional runtime status uses latest-response ordering and clears malformed assert.match(state.discoveryRequests.optionalRuntimes.error, /runtime contract/i); }); +test('optional runtime catalog restores bounded activation jobs through validation and restart', () => { + const job = { + id: 'optjob-Activate1234', + operation: 'activate', + profileId: 'huggingface-transformers-peft-5.14.1-0.20.0', + specDigest: `sha256:${'1'.repeat(64)}`, + createdAt: 1, + updatedAt: 2, + status: 'restarting', + progress: { phase: 'restarting', message: 'Waiting for the replacement worker.' }, + result: { environmentId: 'runtime-2-12345678', requiresActivation: false, restartRequired: true }, + }; + const catalog = optionalRuntimesModule.parseOptionalRuntimeCatalog(optionalRuntimeCatalog({ latestJob: job })); + assert.deepEqual(catalog.latestJob, job); + for (const [status, phase] of [ + ['running', 'validating'], + ['verifying', 'verifying'], + ['ready', 'ready'], + ]) { + const parsed = optionalRuntimesModule.parseOptionalRuntimeJobResponse({ + error: false, + job: { ...job, status, progress: { ...job.progress, phase } }, + }); + assert.equal(parsed.status, status); + } + for (const malformed of [ + { operation: 'execute' }, + { updatedAt: -1 }, + { createdAt: Infinity }, + { id: '../private' }, + { status: 'connected' }, + ]) { + assert.throws( + () => + optionalRuntimesModule.parseOptionalRuntimeCatalog( + optionalRuntimeCatalog({ latestJob: { ...job, ...malformed } }), + ), + /runtime contract/i, + ); + } +}); + +test('optional runtime profiles distinguish verified base dependencies from legacy optional cards', () => { + const payload = optionalRuntimeCatalog(); + assert.equal(optionalRuntimesModule.parseOptionalRuntimeCatalog(payload).profiles[0].baseIncluded, false); + payload.profiles[0].baseIncluded = true; + assert.equal(optionalRuntimesModule.parseOptionalRuntimeCatalog(payload).profiles[0].baseIncluded, true); + payload.profiles[0].baseIncluded = 'true'; + assert.throws(() => optionalRuntimesModule.parseOptionalRuntimeCatalog(payload), /runtime contract/i); +}); + test('requestJson aborts requests at the configured timeout', async () => { globalThis.fetch = (_url, init) => new Promise((_resolve, reject) => { @@ -1973,6 +2075,117 @@ test('runtime discovery normalizes legacy and managed runtime payloads', async ( assert.equal(environment.installation.resumeCommand, './install.sh --resume'); }); +test('runtime discovery publishes supervisor capability and retains it across temporary health failures', async () => { + globalThis.fetch = async () => + jsonResponse({ ready: true, workerControl: { available: true, address: 'http://127.0.0.1:43001' } }); + await nodesStoreModule.useNodesStore.getState().fetchRuntimeStatus(); + assert.deepEqual(nodesStoreModule.useNodesStore.getState().runtimeStatus.workerControl, { + available: true, + address: 'http://127.0.0.1:43001', + }); + globalThis.fetch = async () => { + throw new TypeError('Worker is temporarily restarting.'); + }; + await nodesStoreModule.useNodesStore.getState().fetchRuntimeStatus(); + assert.equal(nodesStoreModule.useNodesStore.getState().runtimeStatus, null); + assert.equal(controlModule.supervisorControlAddress(), 'http://127.0.0.1:43001'); + globalThis.fetch = async () => jsonResponse({ ready: true, workerControl: { available: false, address: null } }); + await nodesStoreModule.useNodesStore.getState().fetchRuntimeStatus(); + assert.equal(controlModule.supervisorControlAddress(), null); +}); + +test('runtime discovery resolves a published adjacent supervisor through the configured production tunnel', async () => { + const config = (await server.ssrLoadModule('/app.config.ts')).default; + const previous = { ...config }; + Object.assign(config, { + backendAddress: 'http://127.0.0.1:18088', + supervisorAddress: 'http://127.0.0.1:18089', + supervisorAddressExplicit: false, + }); + try { + globalThis.fetch = async () => + jsonResponse({ + ready: true, + server: { host: '127.0.0.1', port: 8088, scheme: 'http' }, + workerControl: { available: true, address: 'http://127.0.0.1:8089' }, + }); + await nodesStoreModule.useNodesStore.getState().fetchRuntimeStatus(); + assert.equal( + nodesStoreModule.useNodesStore.getState().runtimeStatus.workerControl.address, + 'http://127.0.0.1:18089', + ); + assert.equal(controlModule.supervisorControlAddress(), 'http://127.0.0.1:18089'); + globalThis.fetch = async () => { + throw new TypeError('Owned tunneled worker restarting.'); + }; + await nodesStoreModule.useNodesStore.getState().fetchRuntimeStatus(); + assert.equal(controlModule.supervisorControlAddress(), 'http://127.0.0.1:18089'); + } finally { + Object.assign(config, previous); + } +}); + +test('malformed runtime control metadata rejects discovery without replacing the last verified destination', async () => { + globalThis.fetch = async () => + jsonResponse({ ready: true, workerControl: { available: true, address: 'http://127.0.0.1:43001' } }); + await nodesStoreModule.useNodesStore.getState().fetchRuntimeStatus(); + globalThis.fetch = async () => + jsonResponse({ ready: true, workerControl: { available: true, address: 'http://example.com:43001' } }); + await nodesStoreModule.useNodesStore.getState().fetchRuntimeStatus(); + assert.equal(nodesStoreModule.useNodesStore.getState().discoveryRequests.runtime.status, 'error'); + assert.equal(controlModule.supervisorControlAddress(), 'http://127.0.0.1:43001'); +}); + +test('a stale runtime response cannot overwrite current worker-control discovery', async () => { + const first = deferred(), + second = deferred(); + let count = 0; + globalThis.fetch = () => (++count === 1 ? first.promise : second.promise); + const older = nodesStoreModule.useNodesStore.getState().fetchRuntimeStatus(); + const newer = nodesStoreModule.useNodesStore.getState().fetchRuntimeStatus(); + second.resolve(jsonResponse({ ready: true, workerControl: { available: true, address: 'http://127.0.0.1:43001' } })); + await newer; + first.resolve(jsonResponse({ ready: true, workerControl: { available: false, address: null } })); + await older; + assert.equal(controlModule.supervisorControlAddress(), 'http://127.0.0.1:43001'); +}); + +test('a replacement worker welcome refreshes runtime readiness and fences the old response', async () => { + const oldRead = deferred(); + const replacementRead = deferred(); + let runtimeReads = 0; + nodesStoreModule.useNodesStore.setState({ + instance: 'old-worker', + runtimeStatus: { ready: false, packages: { transformers: { available: false } } }, + }); + globalThis.fetch = (url) => { + const pathname = new URL(url).pathname; + if (pathname === '/runtime/status') return ++runtimeReads === 1 ? oldRead.promise : replacementRead.promise; + if (pathname === '/nodes') return Promise.resolve(jsonResponse({ nodes: {}, instance: 'replacement-worker' })); + if (pathname === '/studio_outputs') return Promise.resolve(jsonResponse({ outputs: [] })); + throw new Error(`Unexpected request: ${pathname}`); + }; + const older = nodesStoreModule.useNodesStore.getState().fetchRuntimeStatus(); + websocketMessagesModule.handleWebsocketMessage( + { type: 'welcome', sid: 'same-session', instance: 'replacement-worker', current: null, queued: {}, recent: [] }, + { + sid: 'same-session', + ws: { url: 'ws://127.0.0.1:5191/ws?sid=same-session' }, + setSid: () => {}, + getSid: () => 'same-session', + setLoopTimer: () => {}, + }, + ); + const welcomeRuntimeReads = runtimeReads; + replacementRead.resolve(jsonResponse({ ready: true, packages: { transformers: { available: true } } })); + for (let turn = 0; turn < 10; turn++) await new Promise((resolve) => setImmediate(resolve)); + oldRead.resolve(jsonResponse({ ready: false, packages: { transformers: { available: false } } })); + await older; + assert.equal(welcomeRuntimeReads, 2); + assert.equal(nodesStoreModule.useNodesStore.getState().runtimeStatus.ready, true); + assert.equal(nodesStoreModule.useNodesStore.getState().runtimeStatus.packages.transformers.available, true); +}); + test('runtime fingerprint changes invalidate every cached Auto plan', async () => { const cachedPlan = { status: 'ready', checkedAt: 1 }; studioStoreModule.useStudioStore.setState({ diff --git a/scripts/observed-native-modular-image-resource.mjs b/scripts/observed-native-modular-image-resource.mjs new file mode 100644 index 00000000..9272aa9d --- /dev/null +++ b/scripts/observed-native-modular-image-resource.mjs @@ -0,0 +1,661 @@ +// Maintainer evidence reader only: no loading, execution, Auto admission or fit. +import assert from 'node:assert/strict'; +import { canonicalJsonHash, stableJsonValue } from './canonical-json.mjs'; +import { assertFiniteObservedJson, workerGraphHash } from './observed-workflow-auto-resource.mjs'; +import { validateAppliedAdapterSection } from './applied-adapter-provenance.mjs'; + +export const OBSERVED_NATIVE_MODULAR_IMAGE_SOURCE = 'observed-native-modular-image-resource-v1'; +const prefix = 'modules.ModularDiffusers.'; +const same = (left, right) => assert.deepEqual(stableJsonValue(left), stableJsonValue(right)); +const scopes = Object.fromEntries( + ['ModelsLoader', 'Guider', 'EncodePrompt', 'ImageEncode', 'Denoise', 'DecodeLatents'] + .map((action) => [action, prefix + action]) + .concat([ + ['Load', 'modules.Image.Load'], + ['Preview', 'modules.Image.Preview'], + ['StitchImages', 'modules.ImageOperations.StitchImages'], + ]), +); +const fields = { + ModelsLoader: + 'model_type repo_id revision reviewed_variant workflow_id dtype device auto_offload offload_mode weight_loading_mode weight_format attention_backend vae_slicing vae_tiling inpaint_compatibility trust_remote_code unet vae controlnet lora_list quant_config text_encoders pipeline_components image_encoder modiff_pipeline_identity refresh_pipeline_identity_button', + Guider: 'model_type guider guidance_scale guidance_rescale use_original_formulation enabled start stop layers_config', + EncodePrompt: + 'text_encoders guider prompt prompt_input negative_prompt max_sequence_length image resolution use_en_prompt', + ImageEncode: 'vae image seed resolution encode_summary', + Denoise: 'unet scheduler embeddings image_latents guider seed num_inference_steps guidance_scale width height layers', + DecodeLatents: 'vae latents width height', + Load: 'file alpha_channel label', + Preview: 'image vae device preview export', + StitchImages: 'image layout columns spacing background match_size', +}; +const ignored = new Set(['label', 'modiff_pipeline_identity', 'refresh_pipeline_identity_button', 'prompt_input']); +const formKeys = + 'mode modelType resourceMode dtype device autoOffload offloadMode quantizationMode trustRemoteCode randomSeed seed width height steps guidanceScale maxSequenceLength prompt negativePrompt'.split( + ' ', + ); +const integer = (value) => assert(Number.isSafeInteger(value) && value > 0); +const hash = (value) => assert.match(value, /^[a-f0-9]{64}$/u); +const keys = (value, expected) => same(Object.keys(value).sort(), expected.toSorted()); +const kind = (node) => node.module + '.' + node.action; +const encodedHash = (value) => { + const matched = /^(?:sha256:(?:bytes:)?)?([a-f0-9]{64})$/u.exec(value); + assert(matched); + return matched[1]; +}; + +function project(entries, paths, form, artifacts) { + assert(['edit_image', 'multi_image_reference_edit', 'layer_decomposition'].includes(form.mode)); + const layered = form.mode === 'layer_decomposition', + multi = form.mode === 'multi_image_reference_edit'; + const pipeline = layered ? 'QwenImageLayeredModularPipeline' : 'FluxKontextModularPipeline'; + same(form.modelType, layered ? pipeline : 'FluxKontextPipeline'); + same(form.resourceMode, layered ? 'auto' : 'expert'); + same(form.dtype, 'bfloat16'); + same(form.device, 'cuda:0'); + same(form.quantizationMode, 'none'); + same(form.trustRemoteCode, false); + same(form.randomSeed, false); + same(form.autoOffload, true); + same(form.offloadMode, layered ? 'model_cpu' : 'group_cpu'); + for (const key of ['width', 'height', 'steps', 'maxSequenceLength']) integer(form[key]); + assert(Number.isSafeInteger(form.seed) && form.seed >= 0 && form.seed < 2 ** 32); + assert(Number.isFinite(form.guidanceScale) && form.guidanceScale > 0 && form.guidanceScale <= 100); + assert(typeof form.prompt === 'string' && form.prompt && typeof form.negativePrompt === 'string'); + if (Object.hasOwn(form, 'weightFormat')) same(form.weightFormat, 'native'); + same(entries.length, multi ? 9 : 8); + same(paths.length, 1); + same(new Set(paths[0]).size, entries.length); + same([...paths[0]].sort(), entries.map(([id]) => id).sort()); + const byScope = new Map(entries.map(([id, node]) => [kind(node), { id, node }])); + same(byScope.size, entries.length); + const roles = Object.fromEntries( + Object.entries(scopes) + .filter(([role]) => multi || role !== 'StitchImages') + .map(([role, scope]) => { + const selected = byScope.get(scope); + assert(selected, scope); + return [role, selected]; + }), + ); + const value = (role, key, optional = false) => { + const param = roles[role].node.params[key]; + if (optional && param === undefined) return null; + assert(param && !param.sourceId && !param.sourceKey, role + '.' + key); + if (!optional) assert(Object.hasOwn(param, 'value'), role + '.' + key); + return param.value ?? null; + }; + const connections = new Set(); + const connect = (role, field, producer, port) => { + const param = roles[role].node.params[field]; + same({ id: param?.sourceId, port: param?.sourceKey }, { id: roles[producer].id, port }); + // Scalar ports retain an inactive UI fallback alongside their connection. + // The consumed receipt must still identify the actual producer/port. + if (!(role === 'DecodeLatents' && ['width', 'height'].includes(field))) assert(!Object.hasOwn(param, 'value')); + assert(paths[0].indexOf(roles[producer].id) < paths[0].indexOf(roles[role].id)); + connections.add(role + '.' + field); + }; + for (const args of [ + ['EncodePrompt', 'text_encoders', 'ModelsLoader', 'text_encoders'], + ['EncodePrompt', 'guider', 'Guider', 'guider_out'], + ['ImageEncode', 'vae', 'ModelsLoader', 'vae_out'], + ['ImageEncode', 'image', multi ? 'StitchImages' : 'Load', multi ? 'output' : 'image'], + ['Denoise', 'unet', 'ModelsLoader', 'unet_out'], + ['Denoise', 'scheduler', 'ModelsLoader', 'scheduler'], + ['Denoise', 'embeddings', 'EncodePrompt', 'embeddings'], + ['Denoise', 'image_latents', 'ImageEncode', 'image_latents'], + ['Denoise', 'guider', 'Guider', 'guider_out'], + ['DecodeLatents', 'vae', 'ModelsLoader', 'vae_out'], + ['DecodeLatents', 'latents', 'Denoise', 'latents'], + ['Preview', 'image', 'DecodeLatents', 'images'], + ...(multi ? [['StitchImages', 'image', 'Load', 'image']] : []), + ...(layered ? [['EncodePrompt', 'image', 'Load', 'image']] : []), + ]) + connect(...args); + if (!layered) + for (const key of ['width', 'height']) { + same(value('Denoise', key), form[key]); + if (roles.DecodeLatents.node.params[key]?.sourceId) connect('DecodeLatents', key, 'Denoise', 'out_' + key); + else same(value('DecodeLatents', key), form[key]); + } + const presentation = (role, key, param) => + !param.sourceId && + ((role === 'ImageEncode' && + key === 'encode_summary' && + param.display === 'ui_text' && + param.sourceKey === 'encode_summary_data') || + (role === 'Preview' && key === 'preview' && param.display === 'ui_image' && param.sourceKey === 'output')); + for (const [role, { node }] of Object.entries(roles)) + for (const [key, param] of Object.entries(node.params)) { + assert(fields[role].split(' ').includes(key), role + '.' + key); + if (param.sourceId || param.sourceKey) + assert(connections.has(role + '.' + key) || presentation(role, key, param)); + } + same(value('ModelsLoader', 'model_type'), pipeline); + const repo = value('ModelsLoader', 'repo_id'), + revision = value('ModelsLoader', 'revision'); + same(Object.keys(repo).sort(), ['source', 'value']); + same(repo.source, 'hub'); + assert.match(repo.value, /^[\w.-]+\/[\w.-]+$/u); + assert.match(revision, /^[a-f0-9]{40}$/u); + same(value('ModelsLoader', 'weight_format'), 'native'); + same(value('ModelsLoader', 'trust_remote_code'), false); + for (const key of [ + 'unet', + 'vae', + 'controlnet', + 'lora_list', + 'quant_config', + 'text_encoders', + 'pipeline_components', + 'image_encoder', + ]) + same(value('ModelsLoader', key, true), null); + for (const [key, expected] of Object.entries({ + dtype: form.dtype, + device: form.device, + auto_offload: true, + offload_mode: form.offloadMode, + weight_loading_mode: 'cpu', + inpaint_compatibility: 'native', + })) + same(value('ModelsLoader', key), expected); + const workflowId = value('ModelsLoader', 'workflow_id'); + assert(['default', 'image_conditioned'].includes(workflowId)); + same(value('Guider', 'model_type'), pipeline); + for (const [key, expected] of Object.entries({ + guider: 'ClassifierFreeGuidance', + guidance_scale: form.guidanceScale, + guidance_rescale: 0, + use_original_formulation: false, + enabled: true, + start: 0, + stop: 1, + })) + same(value('Guider', key), expected); + same(value('Guider', 'layers_config', true), null); + same(value('EncodePrompt', 'prompt_input', true), null); + for (const [key, expected] of Object.entries({ + prompt: form.prompt, + negative_prompt: form.negativePrompt, + max_sequence_length: form.maxSequenceLength, + })) + same(value('EncodePrompt', key), expected); + for (const [key, expected] of Object.entries({ + seed: form.seed, + num_inference_steps: form.steps, + guidance_scale: form.guidanceScale, + })) + same(value('Denoise', key), expected); + same(value('ImageEncode', 'seed'), form.seed); + if (layered) { + same(form.width, form.height); + integer(form.layers); + same(value('ImageEncode', 'resolution'), form.width); + same(value('EncodePrompt', 'resolution'), form.width); + same(value('Denoise', 'layers'), form.layers); + assert(typeof value('EncodePrompt', 'use_en_prompt') === 'boolean'); + for (const role of ['Denoise', 'DecodeLatents']) + for (const key of ['width', 'height']) assert(!Object.hasOwn(roles[role].node.params, key)); + } else { + assert(!Object.hasOwn(roles.Denoise.node.params, 'layers')); + for (const key of ['resolution', 'image', 'use_en_prompt']) + assert(!Object.hasOwn(roles.EncodePrompt.node.params, key)); + assert(!Object.hasOwn(roles.ImageEncode.node.params, 'resolution')); + } + if (multi) { + same(value('StitchImages', 'layout'), 'horizontal_reference'); + same(value('StitchImages', 'columns'), 2); + same(value('StitchImages', 'spacing'), 0); + assert(typeof value('StitchImages', 'background') === 'string'); + same(value('StitchImages', 'match_size'), true); + } + const files = value('Load', 'file'); + assert(Array.isArray(files)); + same(files.length, multi ? 2 : 1); + same(artifacts.length, files.length); + same(new Set(files).size, files.length); + const references = artifacts.map((artifact, index) => { + same(artifact.path, files[index]); + same(artifact.role, `referenceImages[${index}]`); + assert(typeof artifact.path === 'string' && artifact.path.length <= 16384); + assert.match(artifact.contentHash, /^sha256:bytes:[a-f0-9]{64}$/u); + integer(artifact.byteSize); + return { role: artifact.role, contentHash: artifact.contentHash, byteSize: artifact.byteSize }; + }); + same(value('Load', 'alpha_channel'), layered ? 'add alpha' : 'ignore'); + assert(['cpu:0', 'cuda:0'].includes(value('Preview', 'device'))); + same(value('Preview', 'vae', true), null); + // This is the image export-index string, not a boolean model control. + assert(/^(?:|0|[1-9]\d*)$/u.test(value('Preview', 'export'))); + const labels = new Map(Object.entries(roles).map(([role, { id }]) => [id, role])); + const graphControls = Object.entries(roles).map(([role, { node }]) => ({ + role, + scope: kind(node), + params: Object.fromEntries( + Object.entries(node.params).map(([key, param]) => [ + key, + presentation(role, key, param) || (ignored.has(key) && param.display?.startsWith('ui_')) + ? { presentation: true } + : param.sourceId + ? { + producer: labels.get(param.sourceId), + port: param.sourceKey, + ...(Object.hasOwn(param, 'value') ? { inactiveFallback: param.value } : {}), + } + : { value: role === 'Load' && key === 'file' ? references : (param.value ?? null) }, + ]), + ), + })); + const formControls = Object.fromEntries([...formKeys, ...(layered ? ['layers'] : [])].map((key) => [key, form[key]])); + return { + roles, + value, + layered, + multi, + pipeline, + repo: repo.value, + revision, + references, + formControls, + workflowId, + graphControlsHash: canonicalJsonHash(graphControls), + }; +} + +function validateCaptures(p, captures) { + const byRole = new Map(captures.map((row) => [row.role, row])); + same(byRole.size, Object.keys(p.roles).length); + same(captures.length, byRole.size); + const expectedKeys = { + ModelsLoader: + 'model_type repo_id revision dtype device auto_offload offload_mode quant_config weight_loading_mode attention_backend vae_slicing vae_tiling'.split( + ' ', + ), + Guider: 'model_type guider guidance_scale guidance_rescale use_original_formulation enabled start stop'.split(' '), + EncodePrompt: ['prompt', 'negative_prompt', 'max_sequence_length'], + ImageEncode: ['seed'], + Denoise: ['seed', 'num_inference_steps', 'guidance_scale', ...(p.layered ? [] : ['width', 'height'])], + DecodeLatents: p.layered ? [] : ['width', 'height'], + Preview: ['device'], + StitchImages: [], + Load: ['alpha_channel', 'source_hashes', 'source_widths', 'source_heights', 'source_modes'], + }; + const missing = []; + for (const [role, { node }] of Object.entries(p.roles)) { + const row = byRole.get(role); + assert(row); + same(row.scope, kind(node)); + keys(row, ['role', 'scope', 'fields', ...(role === 'ModelsLoader' ? ['adapterApplication'] : [])]); + same(Object.keys(row.fields).sort(), expectedKeys[role].toSorted()); + for (const [key, capture] of Object.entries(row.fields)) { + const connectedGeometry = + role === 'DecodeLatents' && ['width', 'height'].includes(key) && node.params[key]?.sourceId; + if (connectedGeometry) { + same(Object.keys(capture).sort(), ['source', 'sourcePortId', 'sourceRole', 'value']); + same(capture.source, 'connected'); + same(capture.sourceRole, 'Denoise'); + same(capture.sourcePortId, 'out_' + key); + } else { + same(Object.keys(capture).sort(), ['source', 'value']); + same(capture.source, 'literal'); + } + if (role === 'Load' && key !== 'alpha_channel') continue; + const expected = connectedGeometry + ? p.formControls[key] + : key === 'repo_id' + ? p.repo + : p.value(role, key, key === 'quant_config'); + same(capture.value, expected); + } + for (const [key, param] of Object.entries(node.params)) + if (!param.sourceId && !param.sourceKey && !ignored.has(key) && !Object.hasOwn(row.fields, key)) + missing.push({ role, field: key }); + } + const load = byRole.get('Load').fields, + count = p.references.length; + for (const key of ['source_hashes', 'source_widths', 'source_heights', 'source_modes']) { + assert(Array.isArray(load[key].value)); + same(load[key].value.length, count); + } + same( + load.source_hashes.value, + p.references.map((item) => encodedHash(item.contentHash)), + ); + for (const values of [load.source_widths.value, load.source_heights.value]) for (const size of values) integer(size); + for (const mode of load.source_modes.value) same(mode, p.layered ? 'RGBA' : 'RGB'); + const application = byRole.get('ModelsLoader').adapterApplication; + validateAppliedAdapterSection(application); + if (p.layered) { + same(application.status, 'complete'); + same(application.observation, 'activated'); + same(application.adapters, []); + } else { + same(application.status, 'unavailable'); + assert(['unsupported-owner', 'unobserved-application'].includes(application.reason)); + } + return missing.sort((a, b) => (a.role + '.' + a.field).localeCompare(b.role + '.' + b.field)); +} + +function projectedItems(items) { + assert(Array.isArray(items) && items.length > 0); + return items.map((item, index) => { + same(item.index, index); + integer(item.width); + integer(item.height); + integer(item.byteSize); + assert.match(item.mediaHash, /^sha256:bytes:[a-f0-9]{64}$/u); + return { + index, + width: item.width, + height: item.height, + byteSize: item.byteSize, + byteHash: encodedHash(item.mediaHash), + }; + }); +} + +export function deriveObservedNativeModularImagePlan(api, context) { + const { + executionReceipt: task, + executedOutput: output, + taskId, + modelIdentities: models, + inputArtifacts, + backendSource, + backendContract, + } = context; + // Saved Block metadata can be deeply nested. Only the already lowered, + // executable envelope uses the observation's shallow finite-value contract. + assertFiniteObservedJson({ nodes: api.nodes, paths: api.paths }); + same(Object.keys(api).sort(), ['nodes', 'paths', 'runtimeHints', 'sid']); + const hints = api.runtimeHints, + form = hints.workflowSnapshot.studioForm; + const allowedHints = + 'clientRunId runInputHash workflowTabId workflowCanvasEpoch workflowTitle workflowSnapshot resourceMode workflowAutoPlan'.split( + ' ', + ); + for (const key of Object.keys(hints)) assert(allowedHints.includes(key)); + same(task.status, 'completed'); + same(task.attempt_index, 0); + same(task.resourceCandidateId, null); + same(output.attemptIndex, 0); + same(task.task_id, output.taskId); + if (taskId !== undefined) same(taskId, task.task_id); + for (const [h, t, o] of [ + ['sid', 'sid', 'sid'], + ['workflowTabId', 'workflow_tab_id', 'workflowTabId'], + ['clientRunId', 'client_run_id', 'clientRunId'], + ['runInputHash', 'run_input_hash', 'runInputHash'], + ]) { + const identity = h === 'sid' ? api.sid : hints[h]; + assert(typeof identity === 'string' && identity); + same(task[t], identity); + same(output[o], identity); + } + same(output.apiGraphSnapshot, api); + same(task.workflow_snapshot, hints.workflowSnapshot); + same(output.formSnapshot, form); + assert( + Number.isFinite(task.started_at) && Number.isFinite(task.completed_at) && task.completed_at >= task.started_at, + ); + same(backendSource.fingerprint, task.runtimeFingerprint.backendSource.fingerprint); + same(backendSource.gitCommit, task.runtimeFingerprint.backendSource.gitCommit); + same(backendSource.files.length, task.runtimeFingerprint.backendSource.fileCount); + assert.match(backendSource.fingerprint, /^sha256:backend-source-v1:[a-f0-9]{64}$/u); + assert.match(backendContract.fingerprint, /^sha256:backend-contract-v1:[a-f0-9]{64}$/u); + const p = project(Object.entries(api.nodes), api.paths, form, inputArtifacts); + same(models.length, 1); + same(models[0].repoId, p.repo); + same(models[0].selectedRevision, p.revision); + same(models[0].modelRevision, p.repo + '@' + p.revision); + same(output.nodeId, p.roles.Preview.id); + const prep = task.runtimePreparation; + same(prep.resourceMode, form.resourceMode); + same(prep.performed, false); + same(prep.cleanup, null); + assert(typeof prep.residentRecipeReusable === 'boolean'); + if (p.layered) { + same(hints.resourceMode, 'auto'); + same(hints.workflowAutoPlan.schemaVersion, 1); + same(hints.workflowAutoPlan.graphHash, workerGraphHash(api)); + same(prep.residentRecipeReusable, false); + const auto = prep.workflowAuto; + same(auto.strategy, 'dependency_order_retained_owners'); + same(auto.schedule, null); + same(auto.cachePreparation, null); + for (const key of ['reusedOwnerIds', 'preparedDataNodes', 'appliedUpdates', 'releases']) same(auto[key], []); + for (const [id, values] of Object.entries(auto.resolvedFields)) { + const role = Object.keys(p.roles).find((name) => p.roles[name].id === id); + assert(['ModelsLoader', 'EncodePrompt', 'Guider', 'Denoise'].includes(role)); + for (const [key, value] of Object.entries(values)) same(value, p.value(role, key)); + } + } else { + assert(hints.resourceMode === undefined || hints.resourceMode === 'expert'); + assert(hints.workflowAutoPlan === undefined); + } + const native = output.resolvedExecutionInputs; + same(native.schemaVersion, 1); + same(native.source, 'backend-execution'); + same(native.taskId, task.task_id); + same(native.attemptIndex, 0); + same(native.nodeId, output.nodeId); + same(native.truncated, false); + same(native.uncapturedNodeIds, []); + for (const key of ['ambiguousFields', 'unavailableFields']) if (native[key] !== undefined) same(native[key], []); + same(native.graphTasks, [ + { loaderId: p.roles.ModelsLoader.id, pipelineClass: p.pipeline, task: p.layered ? 'layer_decomposition' : null }, + ]); + same(native.appliedAdaptersStatus, { schemaVersion: 1, truncated: false }); + const rolesById = new Map(Object.entries(p.roles).map(([role, { id }]) => [id, role])); + same(native.nodes.length, rolesById.size); + same(new Set(native.nodes.map((row) => row.nodeId)).size, rolesById.size); + const captures = native.nodes + .map((row) => { + const role = rolesById.get(row.nodeId); + assert(role); + same(kind(row), kind(p.roles[role].node)); + same(row.omittedFields ?? {}, {}); + const fields = Object.fromEntries( + Object.entries(row.fields).map(([key, field]) => { + if (field.source !== 'connected') return [key, structuredClone(field)]; + same(Object.keys(field).sort(), ['source', 'sourceNodeId', 'sourcePortId', 'value']); + const sourceRole = rolesById.get(field.sourceNodeId); + assert(sourceRole); + return [key, { source: field.source, value: field.value, sourceRole, sourcePortId: field.sourcePortId }]; + }), + ); + return { + role, + scope: kind(row), + fields, + ...(role === 'ModelsLoader' ? { adapterApplication: structuredClone(row.appliedAdapters) } : {}), + }; + }) + .sort((a, b) => a.role.localeCompare(b.role)); + const declaredOnlyControls = validateCaptures(p, captures); + if (native.summary !== undefined) { + const loader = captures.find((row) => row.role === 'ModelsLoader').fields; + const load = captures.find((row) => row.role === 'Load').fields; + const expected = { + modelType: p.pipeline, + repo: p.repo, + revision: p.revision, + dtype: loader.dtype.value, + device: loader.device.value, + autoOffload: loader.auto_offload.value, + offloadMode: loader.offload_mode.value, + quantConfig: null, + weightLoadingMode: 'cpu', + attentionBackend: loader.attention_backend.value, + vaeSlicing: loader.vae_slicing.value, + vaeTiling: loader.vae_tiling.value, + width: form.width, + height: form.height, + prompt: form.prompt, + negativePrompt: form.negativePrompt, + maxSequenceLength: form.maxSequenceLength, + seed: form.seed, + steps: form.steps, + guidanceScale: form.guidanceScale, + guiderType: 'ClassifierFreeGuidance', + guidanceRescale: 0, + guidanceOriginalFormulation: false, + guidanceEnabled: true, + guidanceStart: 0, + guidanceStop: 1, + imageAlphaChannel: load.alpha_channel.value, + imageSourceHashes: load.source_hashes.value, + imageSourceWidths: load.source_widths.value, + imageSourceHeights: load.source_heights.value, + imageSourceModes: load.source_modes.value, + }; + // Corroborate available summaries; never create absent summary fields. + for (const [key, value] of Object.entries(expected)) + if (Object.hasOwn(native.summary, key)) same(native.summary[key], value); + } + const items = projectedItems(output.mediaItems); + same(items.length, p.layered ? form.layers : 1); + for (const item of items) { + same(item.width, form.width); + same(item.height, form.height); + } + const observation = { + schemaVersion: 1, + taskId: task.task_id, + attemptIndex: 0, + completedAt: task.completed_at, + graphControlsHash: p.graphControlsHash, + formControls: p.formControls, + references: p.references, + capturedNodes: captures, + declaredOnlyControls, + reportedGraphTask: p.layered ? 'layer_decomposition' : null, + nativeReceiptHash: canonicalJsonHash(native), + nativeItems: items, + backendSourceFingerprint: backendSource.fingerprint, + backendContractFingerprint: backendContract.fingerprint, + residentRecipeReusable: prep.residentRecipeReusable, + adapterApplicationObserved: p.layered, + completeFieldAccountingClaimed: false, + hardwareQualificationClaimed: false, + }; + const loader = captures.find((row) => row.role === 'ModelsLoader').fields; + return { + source: OBSERVED_NATIVE_MODULAR_IMAGE_SOURCE, + modelType: p.pipeline, + modelRepo: p.repo, + modelRevision: p.revision, + task: form.mode, + dtype: loader.dtype.value, + device: loader.device.value, + autoOffload: loader.auto_offload.value, + offloadMode: loader.offload_mode.value, + weightLoadingMode: loader.weight_loading_mode.value, + resourceMode: form.resourceMode, + resolvedResourceMode: form.resourceMode, + quantizationMode: 'none', + quantizedComponents: [], + resourceObservation: observation, + }; +} + +export function observedNativeModularImagePlan(api, context = {}) { + try { + const plan = deriveObservedNativeModularImagePlan(api, context); + assert(observedNativeModularImageResourceId(plan)); + return plan; + } catch { + return null; + } +} + +export function observedNativeModularImageResourceId(plan) { + try { + assertFiniteObservedJson(plan); + assert(Buffer.byteLength(JSON.stringify(plan)) <= 65536); + keys( + plan, + 'source modelType modelRepo modelRevision task dtype device autoOffload offloadMode weightLoadingMode resourceMode resolvedResourceMode quantizationMode quantizedComponents resourceObservation'.split( + ' ', + ), + ); + same(plan.source, OBSERVED_NATIVE_MODULAR_IMAGE_SOURCE); + same(plan.resourceMode, plan.resolvedResourceMode); + same(plan.quantizationMode, 'none'); + same(plan.quantizedComponents, []); + const o = plan.resourceObservation; + same(o.schemaVersion, 1); + same(o.attemptIndex, 0); + keys( + o, + 'schemaVersion taskId attemptIndex completedAt graphControlsHash formControls references capturedNodes declaredOnlyControls reportedGraphTask nativeReceiptHash nativeItems backendSourceFingerprint backendContractFingerprint residentRecipeReusable adapterApplicationObserved completeFieldAccountingClaimed hardwareQualificationClaimed'.split( + ' ', + ), + ); + same(o.completeFieldAccountingClaimed, false); + same(o.hardwareQualificationClaimed, false); + for (const digest of [o.graphControlsHash, o.nativeReceiptHash]) hash(digest); + assert(typeof o.taskId === 'string' && o.taskId && Number.isFinite(o.completedAt)); + same(plan.task, o.formControls.mode); + same(plan.resourceMode, o.formControls.resourceMode); + same(plan.dtype, o.formControls.dtype); + same(plan.device, o.formControls.device); + same(plan.autoOffload, o.formControls.autoOffload); + same(plan.offloadMode, o.formControls.offloadMode); + same(plan.weightLoadingMode, 'cpu'); + assert.match(o.backendSourceFingerprint, /^sha256:backend-source-v1:[a-f0-9]{64}$/u); + assert.match(o.backendContractFingerprint, /^sha256:backend-contract-v1:[a-f0-9]{64}$/u); + assert(typeof o.residentRecipeReusable === 'boolean'); + same(o.adapterApplicationObserved, plan.task === 'layer_decomposition'); + return 'observed-native-image-v1:' + canonicalJsonHash(plan); + } catch { + return null; + } +} + +export function assertNativeModularImageProof(plan, provenance) { + assert(observedNativeModularImageResourceId(plan)); + const o = plan.resourceObservation; + const p = project( + provenance.graph.canonicalGraph.nodes.map((node) => [node.key, node]), + provenance.graph.canonicalGraph.paths, + o.formControls, + provenance.inputs.items, + ); + same(p.graphControlsHash, o.graphControlsHash); + same(p.references, o.references); + same(validateCaptures(p, o.capturedNodes), o.declaredOnlyControls); + same(p.pipeline, plan.modelType); + same(p.repo, plan.modelRepo); + same(p.revision, plan.modelRevision); + same(o.taskId, provenance.taskId); + same(new Date(o.completedAt * 1000).toISOString(), provenance.capturedAt); + same(o.backendSourceFingerprint, provenance.runtime.backendSource.fingerprint); + same(o.backendContractFingerprint, provenance.runtime.backendContract.fingerprint); + same(provenance.models.items.length, 1); + const model = provenance.models.items[0]; + same(model.repoId, p.repo); + same(model.selectedRevision, p.revision); + same(model.modelRevision, p.repo + '@' + p.revision); + const items = provenance.output.items.map((item, index) => ({ + index, + width: item.width, + height: item.height, + byteSize: item.byteSize, + byteHash: encodedHash(item.encodedSha256), + })); + same(items, o.nativeItems); + same(items.length, p.layered ? o.formControls.layers : 1); + same(o.adapterApplicationObserved, p.layered); + same(o.reportedGraphTask, p.layered ? 'layer_decomposition' : null); + return true; +} + +export function observedNativeModularImageProofMatches(plan, provenance) { + try { + return assertNativeModularImageProof(plan, provenance); + } catch { + return false; + } +} diff --git a/scripts/observed-workflow-auto-control-resource.mjs b/scripts/observed-workflow-auto-control-resource.mjs new file mode 100644 index 00000000..f1ca688f --- /dev/null +++ b/scripts/observed-workflow-auto-control-resource.mjs @@ -0,0 +1,420 @@ +// Maintainer evidence only. Uses native dispatch captures and grants no execution admission. +import assert from 'node:assert/strict'; +import { canonicalJsonHash, stableJsonValue } from './canonical-json.mjs'; +import { assertFiniteObservedJson, workerGraphHash } from './observed-workflow-auto-resource.mjs'; +export const OBSERVED_WORKFLOW_AUTO_CONTROL_SOURCE = 'observed-workflow-auto-control-resource-v1'; +const same = (a, b) => assert.deepEqual(stableJsonValue(a), stableJsonValue(b)); +const key = (n) => n.module + '.' + n.action; +const prefix = 'modules.ModularDiffusers.'; +const kinds = ['AutoModelLoader', 'ModelsLoader', 'Controlnet', 'Guider', 'EncodePrompt', 'Denoise', 'DecodeLatents'] + .map((k) => prefix + k) + .concat('modules.Image.Load', 'modules.Image.Preview'); +function project(entries, paths, form, artifacts) { + assert.equal(form.mode, 'control_image'); + assert.equal(form.resourceMode, 'auto'); + assert.equal(form.quantizationMode, 'none'); + if (Object.hasOwn(form, 'trustRemoteCode')) assert.equal(form.trustRemoteCode, false); + assert.equal(form.randomSeed, false); + assert.equal(entries.length, 9); + assert.equal(paths.length, 1); + same([...paths[0]].sort(), entries.map(([id]) => id).sort()); + assert.equal(new Set(paths[0]).size, 9); + const roles = new Map(entries.map(([id, node]) => [key(node), { id, node }])); + same([...roles.keys()].sort(), [...kinds].sort()); + const role = (k) => roles.get(k.includes('.') ? k : prefix + k); + const val = (r, k) => { + const p = r.node.params[k]; + assert(p && !p.sourceId && !p.sourceKey, r.node.action + '.' + k); + return p.value; + }; + const owner = role('ModelsLoader'), + aux = role('AutoModelLoader'), + control = role('Controlnet'), + guide = role('Guider'), + enc = role('EncodePrompt'), + den = role('Denoise'), + dec = role('DecodeLatents'), + load = role('modules.Image.Load'), + out = role('modules.Image.Preview'); + const edges = new Set(); + for (const [t, f, s, p] of [ + [control, 'control_image', load, 'image'], + [control, 'controlnet', aux, 'model'], + [control, 'vae', owner, 'vae_out'], + [owner, 'controlnet', aux, 'model'], + [enc, 'text_encoders', owner, 'text_encoders'], + [enc, 'guider', guide, 'guider_out'], + [den, 'unet', owner, 'unet_out'], + [den, 'embeddings', enc, 'embeddings'], + [den, 'controlnet_bundle', control, 'controlnet_bundle'], + [den, 'route_state_in', control, 'route_state_out'], + [den, 'guider', guide, 'guider_out'], + [den, 'scheduler', owner, 'scheduler'], + [dec, 'vae', owner, 'vae_out'], + [dec, 'latents', den, 'latents'], + [dec, 'route_state_in', den, 'route_state_out'], + [out, 'image', dec, 'images'], + ]) { + const v = t.node.params[f]; + same({ id: v?.sourceId, port: v?.sourceKey }, { id: s.id, port: p }); + assert(!Object.hasOwn(v, 'value')); + assert(paths[0].indexOf(s.id) < paths[0].indexOf(t.id)); + edges.add(t.id + ':' + f); + } + for (const [id, node] of entries) + for (const [f, p] of Object.entries(node.params)) { + if (p.sourceId) assert(edges.has(id + ':' + f)); + else if (p.sourceKey) + assert(id === out.id && f === 'preview' && p.sourceKey === 'output' && p.display === 'ui_image'); + } + same(val(owner, 'model_type'), form.modelType); + same(val(owner, 'dtype'), form.dtype); + same(val(owner, 'device'), 'cuda:0'); + same(val(owner, 'workflow_id'), 'controlnet_text2image'); + same(val(owner, 'trust_remote_code'), false); + same(val(owner, 'weight_format'), 'native'); + same(val(owner, 'weight_loading_mode'), 'cpu'); + for (const f of ['unet', 'vae', 'lora_list', 'quant_config']) { + const p = owner.node.params[f]; + assert(!p?.sourceId && !p?.sourceKey && p?.value == null); + } + const base = val(owner, 'repo_id'), + auxiliary = val(aux, 'model_id'); + same(base.source, 'hub'); + same(auxiliary.source, 'hub'); + for (const repo of [base.value, auxiliary.value]) assert.match(repo, /^[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*$/u); + const revision = val(owner, 'revision'), + auxRevision = val(aux, 'revision'); + for (const v of [revision, auxRevision]) assert.match(v, /^[a-f0-9]{40}$/u); + same(val(aux, 'model_type'), 'controlnet'); + same(val(aux, 'dtype'), form.dtype); + same(val(aux, 'device'), 'cuda:0'); + same(val(aux, 'auto_offload'), false); + same(val(aux, 'offload_mode'), 'none'); + same(val(aux, 'trust_remote_code'), false); + for (const f of ['subfolder', 'variant', 'component_class']) same(val(aux, f), ''); + assert(['none', 'model_cpu', 'group_cpu'].includes(val(owner, 'offload_mode'))); + assert.equal(typeof val(owner, 'auto_offload'), 'boolean'); + assert(['bfloat16', 'float16'].includes(form.dtype)); + for (const [f, k] of [ + ['width', 'width'], + ['height', 'height'], + ['seed', 'seed'], + ['num_inference_steps', 'steps'], + ['strength', 'strength'], + ]) + same(val(den, f), form[k]); + for (const f of ['width', 'height', 'seed']) same(val(control, f), form[f]); + same(val(control, 'model_type'), form.modelType); + for (const f of ['width', 'height', 'steps', 'seed']) + assert(Number.isSafeInteger(form[f]) && form[f] >= 0 && form[f] <= 2 ** 32); + same(val(control, 'controlnet_conditioning_scale'), form.conditioningScale); + same(val(control, 'control_guidance_start'), 0); + same(val(control, 'control_guidance_end'), 1); + assert(Number.isFinite(form.conditioningScale) && form.conditioningScale >= 0 && form.conditioningScale <= 2); + assert(Number.isFinite(form.guidanceScale) && form.guidanceScale >= 0 && form.guidanceScale <= 100); + assert(Number.isFinite(form.strength) && form.strength >= 0 && form.strength <= 1); + for (const [f, k] of [ + ['prompt', 'prompt'], + ['negative_prompt', 'negativePrompt'], + ]) { + if (Object.hasOwn(enc.node.params, f)) same(val(enc, f), form[k]); + else same(form[k], ''); + } + same(val(enc, 'max_sequence_length'), form.maxSequenceLength); + same(val(guide, 'model_type'), form.modelType); + same(val(guide, 'guider'), 'ClassifierFreeGuidance'); + same(val(guide, 'guidance_scale'), form.guidanceScale); + assert( + Number.isFinite(val(den, 'guidance_scale')) && val(den, 'guidance_scale') >= 0 && val(den, 'guidance_scale') <= 100, + ); + for (const [f, v] of Object.entries({ + guidance_rescale: 0, + use_original_formulation: false, + enabled: true, + start: 0, + stop: 1, + })) + same(val(guide, f), v); + same(val(load, 'alpha_channel'), 'ignore'); + const file = val(load, 'file'); + assert(typeof file === 'string' && file.length > 0 && file.length <= 16384); + if (form.controlImage !== undefined) same(file, form.controlImage); + same(artifacts.length, 1); + const input = artifacts[0]; + same(input.role, 'controlImage'); + same(input.path, file); + assert.match(input.contentHash, /^sha256:bytes:[a-f0-9]{64}$/u); + assert(Number.isSafeInteger(input.byteSize) && input.byteSize > 0); + const labels = new Map(entries.map(([id, n]) => [id, key(n)])); + const projection = paths[0].map((id) => { + const n = entries.find(([k]) => k === id)[1]; + return { + scope: key(n), + params: Object.fromEntries( + Object.entries(n.params) + .filter(([k, p]) => k !== 'label' && !p.display?.startsWith('ui_')) + .map(([k, p]) => [ + k, + p.sourceId + ? { supplier: labels.get(p.sourceId), port: p.sourceKey } + : { + hasValue: Object.hasOwn(p, 'value'), + value: n === load.node && k === 'file' ? 'controlImage' : (p.value ?? null), + }, + ]), + ), + }; + }); + const formFields = [ + 'mode', + 'resourceMode', + 'modelType', + 'dtype', + 'quantizationMode', + 'randomSeed', + 'width', + 'height', + 'steps', + 'seed', + 'guidanceScale', + 'strength', + 'prompt', + 'negativePrompt', + 'conditioningScale', + 'maxSequenceLength', + ]; + const observation = { + schemaVersion: 1, + graphControlsHash: canonicalJsonHash(projection), + formControlsHash: canonicalJsonHash(Object.fromEntries(formFields.map((k) => [k, form[k]]))), + geometry: { width: form.width, height: form.height }, + input: { role: input.role, contentHash: input.contentHash, byteSize: input.byteSize }, + auxiliary: { + repo: auxiliary.value, + revision: auxRevision, + dtype: form.dtype, + device: 'cuda:0', + autoOffload: false, + offloadMode: 'none', + }, + authoredControlScale: form.conditioningScale, + nativeControlScaleObserved: false, + originalGraphTask: null, + guiderScale: val(guide, 'guidance_scale'), + denoiserGuidanceScale: val(den, 'guidance_scale'), + requestedOffloadMode: form.offloadMode, + requestedAutoOffload: form.autoOffload, + }; + const plan = { + source: OBSERVED_WORKFLOW_AUTO_CONTROL_SOURCE, + modelType: form.modelType, + modelRepo: base.value, + modelRevision: revision, + task: 'control_image', + resourceMode: 'auto', + resolvedResourceMode: 'auto', + dtype: form.dtype, + device: 'cuda:0', + offloadMode: val(owner, 'offload_mode'), + autoOffload: val(owner, 'auto_offload'), + quantizationMode: 'none', + quantizedComponents: [], + resourceObservation: observation, + }; + return { plan, roles, owner, aux, control, guide, enc, den, dec, load, out, val }; +} +export function observedWorkflowAutoControlResourceId(plan) { + try { + assertFiniteObservedJson(plan); + assert(Buffer.byteLength(JSON.stringify(plan)) <= 65536); + same( + Object.keys(plan).sort(), + 'source modelType modelRepo modelRevision task resourceMode resolvedResourceMode dtype device offloadMode autoOffload quantizationMode quantizedComponents resourceObservation' + .split(' ') + .sort(), + ); + same(plan.source, OBSERVED_WORKFLOW_AUTO_CONTROL_SOURCE); + same(plan.task, 'control_image'); + same(plan.resourceMode, 'auto'); + same(plan.resolvedResourceMode, 'auto'); + same(plan.quantizationMode, 'none'); + same(plan.quantizedComponents, []); + assert.match(plan.modelType, /^[A-Za-z]\w*ModularPipeline$/u); + assert.match(plan.modelRepo, /^[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*$/u); + assert.match(plan.modelRevision, /^[a-f0-9]{40}$/u); + assert(['bfloat16', 'float16'].includes(plan.dtype)); + same(plan.device, 'cuda:0'); + assert(['none', 'model_cpu', 'group_cpu'].includes(plan.offloadMode)); + assert.equal(typeof plan.autoOffload, 'boolean'); + const o = plan.resourceObservation; + same( + Object.keys(o).sort(), + 'schemaVersion graphControlsHash formControlsHash geometry input auxiliary authoredControlScale nativeControlScaleObserved originalGraphTask guiderScale denoiserGuidanceScale requestedOffloadMode requestedAutoOffload' + .split(' ') + .sort(), + ); + same(o.schemaVersion, 1); + for (const h of [o.graphControlsHash, o.formControlsHash]) assert.match(h, /^[a-f0-9]{64}$/u); + same(Object.keys(o.geometry).sort(), ['height', 'width']); + for (const n of Object.values(o.geometry)) assert(Number.isSafeInteger(n) && n > 0 && n <= 32768); + same(Object.keys(o.input).sort(), ['byteSize', 'contentHash', 'role']); + same(o.input.role, 'controlImage'); + assert.match(o.input.contentHash, /^sha256:bytes:[a-f0-9]{64}$/u); + assert(Number.isSafeInteger(o.input.byteSize) && o.input.byteSize > 0); + same(Object.keys(o.auxiliary).sort(), 'repo revision dtype device autoOffload offloadMode'.split(' ').sort()); + assert.match(o.auxiliary.repo, /^[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*$/u); + assert.match(o.auxiliary.revision, /^[a-f0-9]{40}$/u); + same(o.auxiliary.dtype, plan.dtype); + same(o.auxiliary.device, 'cuda:0'); + same(o.auxiliary.autoOffload, false); + same(o.auxiliary.offloadMode, 'none'); + same(o.nativeControlScaleObserved, false); + same(o.originalGraphTask, null); + assert(Number.isFinite(o.authoredControlScale) && o.authoredControlScale >= 0 && o.authoredControlScale <= 2); + assert(Number.isFinite(o.guiderScale) && o.guiderScale >= 0 && o.guiderScale <= 100); + assert(Number.isFinite(o.denoiserGuidanceScale) && o.denoiserGuidanceScale >= 0 && o.denoiserGuidanceScale <= 100); + assert.equal(typeof o.requestedAutoOffload, 'boolean'); + assert(['none', 'model_cpu', 'group_cpu'].includes(o.requestedOffloadMode)); + return 'observed-workflow-auto-control-v1:' + canonicalJsonHash(plan); + } catch { + return null; + } +} +export function observedWorkflowAutoControlPlan(api, context = {}) { + try { + const { + executionReceipt: task, + executedOutput: output, + taskId, + modelIdentities: models, + inputArtifacts = [], + } = context, + hints = api.runtimeHints, + form = hints.workflowSnapshot.studioForm; + same(hints.resourceMode, 'auto'); + same(form.trustRemoteCode, false); + same(task.status, 'completed'); + same(task.attempt_index, 0); + same(task.resourceCandidateId, null); + same(output.attemptIndex, 0); + same(task.task_id, output.taskId); + if (taskId !== undefined) same(taskId, task.task_id); + for (const [h, t, o] of [ + ['sid', 'sid', 'sid'], + ['workflowTabId', 'workflow_tab_id', 'workflowTabId'], + ['clientRunId', 'client_run_id', 'clientRunId'], + ['runInputHash', 'run_input_hash', 'runInputHash'], + ]) { + const v = h === 'sid' ? api.sid : hints[h]; + assert(typeof v === 'string' && v); + same(task[t], v); + same(output[o], v); + } + same(output.apiGraphSnapshot, api); + same(task.workflow_snapshot, hints.workflowSnapshot); + same(output.formSnapshot, form); + same(hints.workflowAutoPlan.schemaVersion, 1); + same(hints.workflowAutoPlan.graphHash, workerGraphHash(api)); + assert(!Object.hasOwn(api, 'loops')); + const p = project(Object.entries(api.nodes), api.paths, form, inputArtifacts); + same(output.nodeId, p.out.id); + const prep = task.runtimePreparation; + same(prep.resourceMode, 'auto'); + same(prep.performed, false); + same(prep.residentRecipeReusable, false); + same(prep.cleanup, null); + const auto = prep.workflowAuto; + same(auto.strategy, 'dependency_order_retained_owners'); + same(auto.schedule, null); + same(auto.cachePreparation, null); + for (const k of ['reusedOwnerIds', 'preparedDataNodes', 'appliedUpdates', 'releases']) same(auto[k], []); + const native = output.resolvedExecutionInputs; + same(native.schemaVersion, 1); + same(native.source, 'backend-execution'); + same(native.taskId, task.task_id); + same(native.attemptIndex, 0); + same(native.nodeId, p.out.id); + same(native.truncated, false); + same(native.uncapturedNodeIds, []); + same(native.nodes.length, 9); + const rows = new Map(native.nodes.map((n) => [n.nodeId, n])); + same(rows.size, 9); + for (const [id, n] of Object.entries(api.nodes)) { + same(rows.get(id)?.module, n.module); + same(rows.get(id)?.action, n.action); + same(rows.get(id)?.omittedFields, {}); + } + same(native.graphTasks, [{ loaderId: p.owner.id, pipelineClass: p.plan.modelType, task: null }]); + const consumed = (r, k, v) => same(rows.get(r.id).fields[k], { source: 'literal', value: v }); + for (const [r, fields] of [ + [ + p.owner, + 'repo_id revision model_type dtype device offload_mode auto_offload weight_loading_mode attention_backend vae_slicing vae_tiling', + ], + [p.aux, 'model_type model_id revision dtype device offload_mode auto_offload'], + [p.guide, 'model_type guider guidance_scale guidance_rescale use_original_formulation enabled start stop'], + [p.den, 'width height seed num_inference_steps guidance_scale strength'], + [p.control, 'model_type width height seed control_guidance_start control_guidance_end'], + ]) + for (const k of fields.split(' ')) { + const v = p.val(r, k); + consumed(r, k, ['repo_id', 'model_id'].includes(k) ? v.value : v); + } + consumed(p.owner, 'quant_config', null); + consumed(p.enc, 'max_sequence_length', form.maxSequenceLength); + consumed(p.load, 'alpha_channel', 'ignore'); + consumed(p.load, 'source_hashes', [p.plan.resourceObservation.input.contentHash.slice(13)]); + for (const k of ['prompt', 'negative_prompt']) + if (Object.hasOwn(p.enc.node.params, k)) consumed(p.enc, k, p.val(p.enc, k)); + assert(!Object.hasOwn(rows.get(p.control.id).fields, 'controlnet_conditioning_scale')); + const expectedResolved = [p.owner, p.enc, p.guide, p.den, p.control, p.aux]; + same(Object.keys(auto.resolvedFields).sort(), expectedResolved.map((r) => r.id).sort()); + for (const r of expectedResolved) + for (const [k, v] of Object.entries(auto.resolvedFields[r.id])) same(v, p.val(r, k)); + same(models.length, 2); + for (const [repo, revision] of [ + [p.plan.modelRepo, p.plan.modelRevision], + [p.plan.resourceObservation.auxiliary.repo, p.plan.resourceObservation.auxiliary.revision], + ]) { + const m = models.filter((m) => m.repoId === repo); + same(m.length, 1); + same(m[0].selectedRevision, revision); + same(m[0].modelRevision, repo + '@' + revision); + assert(m[0].fingerprint); + } + assert(observedWorkflowAutoControlResourceId(p.plan)); + return stableJsonValue(p.plan); + } catch { + return null; + } +} +export function observedWorkflowAutoControlProofMatches(plan, provenance) { + try { + assert(observedWorkflowAutoControlResourceId(plan)); + const g = provenance.graph.canonicalGraph, + p = project( + g.nodes.map((n) => [n.key, n]), + g.paths, + provenance.template.lockedSettings, + provenance.inputs.items, + ); + p.plan.resourceObservation.requestedOffloadMode = plan.resourceObservation.requestedOffloadMode; + p.plan.resourceObservation.requestedAutoOffload = plan.resourceObservation.requestedAutoOffload; + same(p.plan, plan); + same(provenance.inputs.count, 1); + same( + provenance.models.items.map((m) => [m.repoId, m.selectedRevision]).sort(), + [ + [plan.modelRepo, plan.modelRevision], + [plan.resourceObservation.auxiliary.repo, plan.resourceObservation.auxiliary.revision], + ].sort(), + ); + same(provenance.output.items.length, 1); + same(provenance.output.items[0].mediaType, 'image'); + for (const k of ['width', 'height']) same(provenance.output.items[0][k], plan.resourceObservation.geometry[k]); + return true; + } catch { + return false; + } +} diff --git a/scripts/observed-workflow-auto-masked-image-resource.mjs b/scripts/observed-workflow-auto-masked-image-resource.mjs new file mode 100644 index 00000000..fc478870 --- /dev/null +++ b/scripts/observed-workflow-auto-masked-image-resource.mjs @@ -0,0 +1,448 @@ +// Native receipt vocabulary only. This module never executes or admits a model. +import assert from 'node:assert/strict'; +import { canonicalJsonHash, stableJsonValue } from './canonical-json.mjs'; +import { assertFiniteObservedJson, workerGraphHash } from './observed-workflow-auto-resource.mjs'; +export const OBSERVED_WORKFLOW_AUTO_MASKED_IMAGE_SOURCE = 'observed-workflow-auto-masked-image-resource-v1'; +const same = (a, b) => assert.deepEqual(stableJsonValue(a), stableJsonValue(b)); +const prefix = 'modules.ModularDiffusers.'; +function project(entries, paths, form, artifacts) { + same(form.mode, 'inpaint'); + same(form.resourceMode, 'auto'); + same(form.dtype, 'bfloat16'); + same(form.quantizationMode, 'none'); + same(form.randomSeed, false); + if (Object.hasOwn(form, 'trustRemoteCode')) same(form.trustRemoteCode, false); + for (const k of ['width', 'height', 'steps', 'maxSequenceLength']) + assert(Number.isSafeInteger(form[k]) && form[k] > 0 && form[k] <= 4096); + assert(Number.isSafeInteger(form.seed) && form.seed >= 0 && form.seed < 2 ** 32); + for (const [k, max] of [ + ['guidanceScale', 100], + ['strength', 1], + ]) + assert(Number.isFinite(form[k]) && form[k] >= 0 && form[k] <= max); + same(entries.length, 9); + same(paths.length, 1); + same(new Set(paths[0]).size, 9); + same([...paths[0]].sort(), entries.map(([id]) => id).sort()); + const byId = new Map(entries.map(([id, node]) => [id, { id, node }])); + same(byId.size, 9); + const get = (scope) => { + const rows = entries.filter(([, n]) => n.module + '.' + n.action === scope); + same(rows.length, 1); + return byId.get(rows[0][0]); + }; + const owner = get(prefix + 'ModelsLoader'), + guide = get(prefix + 'Guider'), + encode = get(prefix + 'EncodePrompt'), + image = get(prefix + 'ImageEncode'), + denoise = get(prefix + 'Denoise'), + decode = get(prefix + 'DecodeLatents'), + preview = get('modules.Image.Preview'); + const source = byId.get(image.node.params.image?.sourceId), + mask = byId.get(image.node.params.mask_image?.sourceId); + assert(source && mask && source.id !== mask.id); + for (const r of [source, mask]) { + same(r.node.module, 'modules.Image'); + same(r.node.action, 'Load'); + } + same(new Set([owner, guide, encode, image, denoise, decode, preview, source, mask].map((r) => r.id)).size, 9); + const value = (r, k) => { + const p = r.node.params[k]; + assert(p && !p.sourceId && !p.sourceKey); + return p.value; + }; + const literal = (r, k, v) => same(value(r, k), v); + const edges = [ + [image, 'vae', owner, 'vae_out'], + [image, 'image', source, 'image'], + [image, 'mask_image', mask, 'image'], + [encode, 'text_encoders', owner, 'text_encoders'], + [encode, 'guider', guide, 'guider_out'], + [encode, 'image', source, 'image'], + [denoise, 'unet', owner, 'unet_out'], + [denoise, 'scheduler', owner, 'scheduler'], + [denoise, 'embeddings', encode, 'embeddings'], + [denoise, 'image_latents', image, 'image_latents'], + [denoise, 'route_state_in', image, 'route_state_out'], + [denoise, 'guider', guide, 'guider_out'], + [decode, 'vae', owner, 'vae_out'], + [decode, 'latents', denoise, 'latents'], + [decode, 'route_state_in', denoise, 'route_state_out'], + [preview, 'image', decode, 'images'], + ]; + const wires = new Set(); + for (const [t, k, s, port] of edges) { + const p = t.node.params[k]; + same({ id: p?.sourceId, port: p?.sourceKey }, { id: s.id, port }); + assert(!Object.hasOwn(p, 'value')); + assert(paths[0].indexOf(s.id) < paths[0].indexOf(t.id)); + wires.add(t.id + ':' + k); + } + const fields = new Map( + [ + [ + owner.id, + 'model_type repo_id reviewed_variant revision dtype device attention_backend vae_slicing vae_tiling inpaint_compatibility trust_remote_code workflow_id modiff_pipeline_identity refresh_pipeline_identity_button auto_offload offload_mode weight_loading_mode weight_format unet vae controlnet lora_list quant_config', + ], + [ + guide.id, + 'model_type guider guidance_scale guidance_rescale use_original_formulation enabled start stop layers_config', + ], + [encode.id, 'text_encoders prompt_input guider prompt negative_prompt image'], + [image.id, 'vae encode_summary image mask_image padding_mask_crop seed inpaint_compatibility'], + [ + denoise.id, + 'unet embeddings width height seed num_inference_steps guidance_scale image_latents strength route_state_in guider scheduler', + ], + [decode.id, 'vae latents route_state_in'], + [preview.id, 'vae device image preview export'], + [source.id, 'label file alpha_channel'], + [mask.id, 'label file alpha_channel'], + ].map(([id, keys]) => [id, new Set(keys.split(' '))]), + ); + for (const [id, n] of entries) + for (const [k, p] of Object.entries(n.params)) { + assert(fields.get(id).has(k), 'Unexpected parameter ' + k); + if (p.sourceId) assert(wires.has(id + ':' + k)); + else if (p.sourceKey) + assert( + (id === preview.id && k === 'preview' && p.sourceKey === 'output' && p.display === 'ui_image') || + (id === image.id && + k === 'encode_summary' && + p.sourceKey === 'encode_summary_data' && + p.display === 'ui_text'), + ); + } + const repo = value(owner, 'repo_id'); + same(repo.source, 'hub'); + assert.match(repo.value, /^[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*$/u); + const revision = value(owner, 'revision'); + assert.match(revision, /^[a-f0-9]{40}$/u); + const modelType = value(owner, 'model_type'); + assert.match(modelType, /^[A-Za-z]\w*ModularPipeline$/u); + same(modelType, form.modelType); + const actualOffload = value(owner, 'offload_mode'); + assert(['group_cpu', 'model_cpu'].includes(actualOffload)); + for (const [k, v] of Object.entries({ + dtype: 'bfloat16', + device: 'cuda:0', + attention_backend: 'auto', + vae_slicing: true, + vae_tiling: true, + inpaint_compatibility: 'whole_v1', + trust_remote_code: false, + workflow_id: 'image_conditioned_inpainting', + auto_offload: true, + offload_mode: actualOffload, + weight_loading_mode: 'cpu', + weight_format: 'native', + })) + literal(owner, k, v); + for (const k of ['unet', 'vae', 'controlnet', 'lora_list', 'quant_config']) assert(value(owner, k) == null); + for (const [r, k] of [ + [guide, 'layers_config'], + [encode, 'prompt_input'], + [image, 'padding_mask_crop'], + [preview, 'vae'], + ]) { + const p = r.node.params[k]; + assert(!p?.sourceId && !p?.sourceKey && p?.value == null); + } + literal(image, 'inpaint_compatibility', 'whole_v1'); + literal(image, 'seed', form.seed); + literal(preview, 'device', 'cuda:0'); + literal(source, 'alpha_channel', 'ignore'); + literal(mask, 'alpha_channel', 'remove alpha'); + literal(encode, 'prompt', form.prompt); + literal(encode, 'negative_prompt', form.negativePrompt); + for (const [k, f] of [ + ['width', 'width'], + ['height', 'height'], + ['seed', 'seed'], + ['num_inference_steps', 'steps'], + ['guidance_scale', 'guidanceScale'], + ['strength', 'strength'], + ]) + literal(denoise, k, form[f]); + for (const [k, v] of Object.entries({ + model_type: modelType, + guider: 'ClassifierFreeGuidance', + guidance_scale: form.guidanceScale, + guidance_rescale: 0, + use_original_formulation: false, + enabled: true, + start: 0, + stop: 1, + })) + literal(guide, k, v); + const sourceFiles = value(source, 'file'); + assert(Array.isArray(sourceFiles) && sourceFiles.length === 1); + const maskFile = value(mask, 'file'); + assert(typeof maskFile === 'string' && maskFile); + if (form.referenceImages !== undefined) same(form.referenceImages, sourceFiles); + if (form.maskImage !== undefined) same(form.maskImage, maskFile); + same(artifacts.length, 2); + const inputs = [ + [source, 'referenceImages[0]', sourceFiles[0]], + [mask, 'maskImage', maskFile], + ].map(([r, role, path]) => { + assert(typeof path === 'string' && path.length > 0 && path.length <= 16384); + const matches = artifacts.filter((a) => a.role === role); + same(matches.length, 1); + same(matches[0].path, path); + assert.match(matches[0].contentHash, /^sha256:bytes:[a-f0-9]{64}$/u); + assert(Number.isSafeInteger(matches[0].byteSize) && matches[0].byteSize > 0); + return { role, contentHash: matches[0].contentHash, byteSize: matches[0].byteSize }; + }); + assert(sourceFiles[0] !== maskFile); + const roles = new Map([ + [owner.id, 'owner'], + [guide.id, 'guide'], + [encode.id, 'encode'], + [image.id, 'image'], + [denoise.id, 'denoise'], + [decode.id, 'decode'], + [preview.id, 'preview'], + [source.id, 'source'], + [mask.id, 'mask'], + ]); + const projection = paths[0].map((id) => ({ + role: roles.get(id), + module: byId.get(id).node.module, + action: byId.get(id).node.action, + params: Object.fromEntries( + Object.entries(byId.get(id).node.params) + .filter(([k, p]) => !['label', 'preview', 'export'].includes(k) && !p.display?.startsWith('ui_')) + .map(([k, p]) => [ + k, + p.sourceId + ? { supplier: roles.get(p.sourceId), port: p.sourceKey } + : { value: k === 'file' ? [roles.get(id)] : (p.value ?? null) }, + ]), + ), + })); + const formKeys = + 'mode modelType resourceMode dtype quantizationMode randomSeed seed width height steps guidanceScale prompt negativePrompt maxSequenceLength offloadMode autoOffload strength'.split( + ' ', + ); + assert(['none', 'model_cpu', 'group_cpu'].includes(form.offloadMode)); + assert(typeof form.autoOffload === 'boolean'); + const plan = { + source: OBSERVED_WORKFLOW_AUTO_MASKED_IMAGE_SOURCE, + modelType, + pipelineClass: modelType, + modelRepo: repo.value, + modelRevision: revision, + dtype: 'bfloat16', + device: 'cuda:0', + offloadMode: actualOffload, + autoOffload: true, + resourceMode: 'auto', + resolvedResourceMode: 'auto', + quantizationMode: 'none', + quantizedComponents: [], + resourceObservation: { + schemaVersion: 1, + graphControlsHash: canonicalJsonHash(projection), + formControlsHash: canonicalJsonHash(Object.fromEntries(formKeys.map((k) => [k, form[k]]))), + inputs, + geometry: { width: form.width, height: form.height }, + steps: form.steps, + seed: form.seed, + guidanceScale: form.guidanceScale, + strength: form.strength, + requestedOffloadMode: form.offloadMode, + requestedAutoOffload: form.autoOffload, + compatibility: 'whole_v1', + compatibilityBasis: 'original_graph_and_auto_resolution', + nativeGraphTask: 'inpaint', + unusedFormMaxSequenceLength: form.maxSequenceLength, + }, + }; + return { plan, owner, guide, encode, image, denoise, decode, preview, source, mask, value }; +} +export function observedWorkflowAutoMaskedImageResourceId(plan) { + try { + assertFiniteObservedJson(plan); + assert(Buffer.byteLength(JSON.stringify(plan)) <= 16384); + same( + Object.keys(plan).sort(), + 'source modelType pipelineClass modelRepo modelRevision dtype device offloadMode autoOffload resourceMode resolvedResourceMode quantizationMode quantizedComponents resourceObservation' + .split(' ') + .sort(), + ); + same(plan.source, OBSERVED_WORKFLOW_AUTO_MASKED_IMAGE_SOURCE); + same(plan.pipelineClass, plan.modelType); + assert.match(plan.modelType, /^[A-Za-z]\w*ModularPipeline$/u); + assert.match(plan.modelRepo, /^[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*$/u); + assert.match(plan.modelRevision, /^[a-f0-9]{40}$/u); + for (const [k, v] of Object.entries({ + dtype: 'bfloat16', + device: 'cuda:0', + autoOffload: true, + resourceMode: 'auto', + resolvedResourceMode: 'auto', + quantizationMode: 'none', + quantizedComponents: [], + })) + same(plan[k], v); + assert(['group_cpu', 'model_cpu'].includes(plan.offloadMode)); + const o = plan.resourceObservation; + same( + Object.keys(o).sort(), + 'schemaVersion graphControlsHash formControlsHash inputs geometry steps seed guidanceScale strength requestedOffloadMode requestedAutoOffload compatibility compatibilityBasis nativeGraphTask unusedFormMaxSequenceLength' + .split(' ') + .sort(), + ); + same(o.schemaVersion, 1); + for (const k of ['graphControlsHash', 'formControlsHash']) assert.match(o[k], /^[a-f0-9]{64}$/u); + same(o.compatibility, 'whole_v1'); + same(o.compatibilityBasis, 'original_graph_and_auto_resolution'); + same(o.nativeGraphTask, 'inpaint'); + same(Object.keys(o.geometry).sort(), ['height', 'width']); + for (const n of [o.geometry.width, o.geometry.height, o.steps, o.unusedFormMaxSequenceLength]) + assert(Number.isSafeInteger(n) && n > 0 && n <= 4096); + assert(Number.isSafeInteger(o.seed) && o.seed >= 0 && o.seed < 2 ** 32); + for (const [k, max] of [ + ['guidanceScale', 100], + ['strength', 1], + ]) + assert(Number.isFinite(o[k]) && o[k] >= 0 && o[k] <= max); + assert(['none', 'model_cpu', 'group_cpu'].includes(o.requestedOffloadMode)); + same(typeof o.requestedAutoOffload, 'boolean'); + same(o.inputs.length, 2); + for (const [i, input] of o.inputs.entries()) { + same(Object.keys(input).sort(), ['byteSize', 'contentHash', 'role']); + same(input.role, i === 0 ? 'referenceImages[0]' : 'maskImage'); + assert.match(input.contentHash, /^sha256:bytes:[a-f0-9]{64}$/u); + assert(Number.isSafeInteger(input.byteSize) && input.byteSize > 0); + } + return 'observed-workflow-auto-masked-image-v1:' + canonicalJsonHash(plan); + } catch { + return null; + } +} +export function observedWorkflowAutoMaskedImagePlan(api, context = {}) { + try { + const { executionReceipt: task, executedOutput: output, modelIdentities: models, inputArtifacts = [] } = context, + hints = api.runtimeHints, + form = hints.workflowSnapshot.studioForm; + same(hints.resourceMode, 'auto'); + same(task.status, 'completed'); + same(task.attempt_index, 0); + same(output.attemptIndex, 0); + same(task.resourceCandidateId, null); + same(task.task_id, output.taskId); + if (context.taskId !== undefined) same(task.task_id, context.taskId); + for (const [h, t, o] of [ + ['sid', 'sid', 'sid'], + ['workflowTabId', 'workflow_tab_id', 'workflowTabId'], + ['clientRunId', 'client_run_id', 'clientRunId'], + ['runInputHash', 'run_input_hash', 'runInputHash'], + ]) { + const v = h === 'sid' ? api.sid : hints[h]; + assert(typeof v === 'string' && v); + same(task[t], v); + same(output[o], v); + } + same(output.apiGraphSnapshot, api); + same(task.workflow_snapshot, hints.workflowSnapshot); + same(output.formSnapshot, form); + same(hints.workflowAutoPlan.schemaVersion, 1); + same(hints.workflowAutoPlan.graphHash, workerGraphHash(api)); + assert(!Object.hasOwn(api, 'loops')); + const p = project(Object.entries(api.nodes), api.paths, form, inputArtifacts); + same(output.nodeId, p.preview.id); + const prep = task.runtimePreparation; + same(prep.resourceMode, 'auto'); + same(prep.performed, false); + same(prep.residentRecipeReusable, false); + same(prep.cleanup, null); + const auto = prep.workflowAuto; + same(auto.strategy, 'dependency_order_retained_owners'); + same(auto.schedule, null); + same(auto.cachePreparation, null); + for (const k of ['reusedOwnerIds', 'preparedDataNodes', 'appliedUpdates', 'releases']) same(auto[k], []); + const native = output.resolvedExecutionInputs; + same(native.schemaVersion, 1); + same(native.source, 'backend-execution'); + same(native.taskId, task.task_id); + same(native.attemptIndex, 0); + same(native.nodeId, p.preview.id); + same(native.truncated, false); + same(native.uncapturedNodeIds, []); + same(native.nodes.length, 9); + same(native.graphTasks, [{ loaderId: p.owner.id, pipelineClass: p.plan.modelType, task: 'inpaint' }]); + const rows = new Map(native.nodes.map((n) => [n.nodeId, n])); + same(rows.size, 9); + for (const [id, n] of Object.entries(api.nodes)) { + same(rows.get(id)?.module, n.module); + same(rows.get(id)?.action, n.action); + same(rows.get(id)?.omittedFields, {}); + } + const consumed = (r, k, v) => same(rows.get(r.id).fields[k], { source: 'literal', value: v }); + for (const [r, keys] of [ + [ + p.owner, + 'model_type repo_id revision dtype device auto_offload offload_mode quant_config weight_loading_mode attention_backend vae_slicing vae_tiling', + ], + [p.guide, 'model_type guider guidance_scale guidance_rescale use_original_formulation enabled start stop'], + [p.encode, 'prompt negative_prompt'], + [p.denoise, 'width height seed num_inference_steps guidance_scale strength'], + [p.image, 'seed'], + [p.preview, 'device'], + ]) + for (const k of keys.split(' ')) { + const v = p.value(r, k); + consumed(r, k, k === 'repo_id' ? v.value : (v ?? null)); + } + for (const [r, i, mode] of [ + [p.source, 0, 'RGB'], + [p.mask, 1, 'L'], + ]) { + consumed(r, 'alpha_channel', p.value(r, 'alpha_channel')); + consumed(r, 'source_hashes', [p.plan.resourceObservation.inputs[i].contentHash.slice(13)]); + consumed(r, 'source_widths', [form.width]); + consumed(r, 'source_heights', [form.height]); + consumed(r, 'source_modes', [mode]); + } + same(Object.keys(auto.resolvedFields).sort(), [p.owner.id, p.guide.id, p.denoise.id].sort()); + for (const r of [p.owner, p.guide, p.denoise]) + for (const [k, v] of Object.entries(auto.resolvedFields[r.id])) same(v, p.value(r, k)); + same(auto.resolvedFields[p.owner.id].inpaint_compatibility, 'whole_v1'); + same(auto.resolvedFields[p.owner.id].offload_mode, p.plan.offloadMode); + same(models.length, 1); + same(models[0].repoId, p.plan.modelRepo); + same(models[0].selectedRevision, p.plan.modelRevision); + same(models[0].modelRevision, p.plan.modelRepo + '@' + p.plan.modelRevision); + assert(models[0].fingerprint); + assert(observedWorkflowAutoMaskedImageResourceId(p.plan)); + return stableJsonValue(p.plan); + } catch { + return null; + } +} +export function observedWorkflowAutoMaskedImageProofMatches(plan, provenance) { + try { + assert(observedWorkflowAutoMaskedImageResourceId(plan)); + const g = provenance.graph.canonicalGraph, + p = project( + g.nodes.map((n) => [n.key, n]), + g.paths, + provenance.template.lockedSettings, + provenance.inputs.items, + ); + same(p.plan, plan); + same(provenance.inputs.count, 2); + same( + provenance.models.items.map((m) => [m.repoId, m.selectedRevision]), + [[plan.modelRepo, plan.modelRevision]], + ); + same(provenance.output.items.length, 1); + same(provenance.output.items[0].mediaType, 'image'); + for (const k of ['width', 'height']) same(provenance.output.items[0][k], plan.resourceObservation.geometry[k]); + return true; + } catch { + return false; + } +} diff --git a/scripts/observed-workflow-auto-resource.mjs b/scripts/observed-workflow-auto-resource.mjs new file mode 100644 index 00000000..930d6cd0 --- /dev/null +++ b/scripts/observed-workflow-auto-resource.mjs @@ -0,0 +1,1421 @@ +// Maintainer evidence reader only. No graph execution, Auto admission or qualification. +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { canonicalJsonHash, stableJsonValue } from './canonical-json.mjs'; +import { + validateAppliedAdapterItems, + validateAppliedAdapterProof, + validateAppliedAdapterSection, +} from './applied-adapter-provenance.mjs'; + +export const OBSERVED_WORKFLOW_AUTO_SOURCE = 'observed-workflow-auto-resource-v1'; +export const OBSERVED_WORKFLOW_AUTO_LORA_SOURCE = 'observed-workflow-auto-lora-resource-v1'; +export const OBSERVED_WORKFLOW_AUTO_AUDIO_SOURCE = 'observed-workflow-auto-audio-resource-v1'; +export const OBSERVED_WORKFLOW_AUTO_IMAGE_SOURCE = 'observed-workflow-auto-image-resource-v1'; +export const OBSERVED_WORKFLOW_AUTO_LEGACY_SOURCE = 'observed-workflow-auto-legacy-resource-v1'; +export const isObservedWorkflowAutoSource = (source) => + source === OBSERVED_WORKFLOW_AUTO_SOURCE || + source === OBSERVED_WORKFLOW_AUTO_LORA_SOURCE || + source === OBSERVED_WORKFLOW_AUTO_AUDIO_SOURCE || + source === OBSERVED_WORKFLOW_AUTO_IMAGE_SOURCE || + source === OBSERVED_WORKFLOW_AUTO_LEGACY_SOURCE; +const same = (a, b) => assert.deepEqual(stableJsonValue(a), stableJsonValue(b)); +const value = (node, key) => node.params?.[key]?.value; +const scope = (node) => `${node.module}.${node.action}`; +const ownerScope = 'modules.ModularDiffusers.ModelsLoader'; +const core = ['ModelsLoader', 'EncodePrompt', 'Denoise', 'DecodeLatents'] + .map((a) => 'modules.ModularDiffusers.' + a) + .concat('modules.Image.Preview'); +const optional = 'modules.ModularDiffusers.Guider'; +const encodeScope = 'modules.ModularDiffusers.EncodePrompt'; +const descriptorScope = 'modules.ModularDiffusers.Lora'; +const descriptorFields = new Set( + 'model weight_name revision expected_sha256 scale adapter_name previous_loras scheduler_class scheduler_config'.split( + ' ', + ), +); +const ownerFields = new Set( + 'reviewed_variant workflow_id revision repo_id model_type dtype device offload_mode auto_offload weight_loading_mode attention_backend vae_slicing vae_tiling weight_format inpaint_compatibility'.split( + ' ', + ), +); +const scalarFields = new Set('width height num_inference_steps guidance_scale strength'.split(' ')); + +function validateControlFields(kind, fields, imageConditioned) { + if (kind === encodeScope) { + assert(!imageConditioned); + same(Object.keys(fields), ['max_sequence_length']); + assert(Number.isSafeInteger(fields.max_sequence_length) && fields.max_sequence_length > 0); + } else { + assert(kind === ownerScope || kind === 'modules.ModularDiffusers.Denoise' || kind === optional); + for (const key of Object.keys(fields)) assert((kind === ownerScope ? ownerFields : scalarFields).has(key)); + } +} + +function finiteJson(value, depth = 0, seen = new Set()) { + assert(depth <= 16); + if (value === null || typeof value === 'boolean') return; + if (typeof value === 'number') { + assert(Number.isFinite(value)); + return; + } + if (typeof value === 'string') { + assert(Buffer.byteLength(value) <= 65536); + return; + } + assert(value && typeof value === 'object' && !seen.has(value)); + assert( + Array.isArray(value) || Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null, + ); + assert(Object.keys(value).length <= 2048); + seen.add(value); + for (const item of Object.values(value)) finiteJson(item, depth + 1, seen); + seen.delete(value); +} +export { finiteJson as assertFiniteObservedJson }; + +// Same compact sorted ASCII-JSON wire domain as the worker. A representation +// mismatch remains unsupported; it is never repaired by replacing the receipt. +export function workerGraphHash(graph) { + const material = { nodes: graph.nodes, paths: graph.paths }; + finiteJson(material); + const text = JSON.stringify(stableJsonValue(material)).replace( + /[\u007f-\uffff]/g, + (c) => '\\u' + c.charCodeAt(0).toString(16).padStart(4, '0'), + ); + assert(Buffer.byteLength(text) <= 8 * 1024 ** 2); + return 'sha256:workflow-auto-v1:' + createHash('sha256').update(text).digest('hex'); +} + +export function observedWorkflowAutoResourceId(plan) { + try { + assert(isObservedWorkflowAutoSource(plan.source)); + if (plan.source === OBSERVED_WORKFLOW_AUTO_AUDIO_SOURCE) return audioResourceId(plan); + const o = plan.resourceObservation; + finiteJson(o); + assert.equal(o.schemaVersion, 1); + assert.equal(typeof o.modelType, 'string'); + assert(o.modelType.length > 0); + assert.equal(typeof o.repo, 'string'); + assert(o.repo.length > 0); + assert.match(o.revision, /^[0-9a-f]{40}$/u); + const imageConditioned = plan.source === OBSERVED_WORKFLOW_AUTO_IMAGE_SOURCE; + const legacy = plan.source === OBSERVED_WORKFLOW_AUTO_LEGACY_SOURCE; + if (o.decoderGeometryRoute !== undefined) { + assert(!imageConditioned); + assert.equal(o.decoderGeometryRoute, 'denoiser_dimensions'); + } + if (imageConditioned) assert(['edit_image', 'multi_image_reference_edit'].includes(o.task)); + else { + assert.equal(o.task, 'text_to_image'); + if (o.formModelType !== undefined) { + assert(typeof o.formModelType === 'string' && o.formModelType.length > 0 && o.formModelType.length <= 256); + assert.notEqual(o.formModelType, o.modelType); + } + } + if (imageConditioned) { + if (o.imageRoute === 'native_state') { + assert.equal(o.task, 'edit_image'); + assert.equal(o.reportedGraphTask, 'edit_image'); + } else { + assert(!Object.hasOwn(o, 'imageRoute')); + assert.equal(o.reportedGraphTask, null); + } + assert.equal(o.workflowId, 'image_conditioned'); + assert(typeof o.formModelType === 'string' && o.formModelType.length > 0 && o.formModelType.length <= 256); + assert(Array.isArray(o.references) && o.references.length === (o.task === 'edit_image' ? 1 : 2)); + for (const [index, reference] of o.references.entries()) { + same(Object.keys(reference).sort(), ['contentHash', 'role']); + assert.equal(reference.role, `referenceImages[${index}]`); + assert.match(reference.contentHash, /^sha256:bytes:[a-f0-9]{64}$/u); + } + if (o.references.length === 2) assert.notEqual(o.references[0].contentHash, o.references[1].contentHash); + if (o.task === 'edit_image') { + assert(['none', 'model_cpu', 'sequential_cpu', 'group_cpu', 'group_disk'].includes(o.requestedOffloadMode)); + assert.equal(typeof o.requestedAutoOffload, 'boolean'); + } + } + assert(['bfloat16', 'float16', 'float32'].includes(o.dtype)); + assert.equal(typeof o.device, 'string'); + assert(o.device.length > 0); + assert.equal(typeof o.autoOffload, 'boolean'); + assert(['none', 'model_cpu', 'sequential_cpu', 'group_cpu', 'group_disk'].includes(o.offloadMode)); + if (legacy) { + assert(!Object.hasOwn(o, 'weightLoadingMode') && !Object.hasOwn(plan, 'weightLoadingMode')); + same(o.absentLoaderControls, ['weight_format', 'weight_loading_mode']); + assert.match(o.backendSourceFingerprint, /^sha256:backend-source-v1:[a-f0-9]{64}$/u); + assert.match(o.backendContractFingerprint, /^sha256:backend-contract-v1:[a-f0-9]{64}$/u); + if (o.guiderConfiguration !== undefined) { + same( + Object.keys(o.guiderConfiguration).sort(), + 'model_type guider guidance_scale guidance_rescale use_original_formulation enabled start stop' + .split(' ') + .sort(), + ); + const g = o.guiderConfiguration; + same(g.model_type, o.modelType); + same(g.guider, 'ClassifierFreeGuidance'); + same(g.guidance_rescale, 0); + same(g.use_original_formulation, false); + assert.equal(typeof g.enabled, 'boolean'); + same(g.start, 0); + same(g.stop, 1); + assert(Number.isFinite(g.guidance_scale) && g.guidance_scale >= 0); + } + } else assert(['cpu', 'cuda'].includes(o.weightLoadingMode)); + for (const key of ['width', 'height']) + assert(Number.isInteger(o.geometry[key]) && o.geometry[key] > 0 && o.geometry[key] <= 32768); + assert.equal(o.strategy, 'dependency_order_retained_owners'); + assert(Array.isArray(o.controls) && o.controls.length >= 2 && o.controls.length <= (imageConditioned ? 3 : 4)); + const controls = new Map(o.controls.map((c) => [c.scope, c.fields])); + assert.equal(controls.size, o.controls.length); + assert(controls.has(ownerScope)); + if (imageConditioned) assert.equal(controls.get(ownerScope).workflow_id, o.workflowId); + const denoiseFields = controls.get('modules.ModularDiffusers.Denoise'); + assert(denoiseFields); + for (const key of ['width', 'height']) same(denoiseFields[key], o.geometry[key]); + for (const [kind, fields] of controls) validateControlFields(kind, fields, imageConditioned); + if (legacy) { + const primary = controls.get(ownerScope); + for (const field of o.absentLoaderControls) assert(!Object.hasOwn(primary, field)); + for (const field of [ + 'repo_id', + 'revision', + 'model_type', + 'dtype', + 'device', + 'offload_mode', + 'auto_offload', + 'attention_backend', + 'vae_slicing', + 'vae_tiling', + ]) + assert(Object.hasOwn(primary, field)); + } + if (controls.has(encodeScope)) same(plan.maxSequenceLength, controls.get(encodeScope).max_sequence_length); + else assert(!Object.hasOwn(plan, 'maxSequenceLength')); + for (const [key, other] of Object.entries({ + modelType: 'modelType', + modelRepo: 'repo', + modelRevision: 'revision', + task: 'task', + dtype: 'dtype', + device: 'device', + offloadMode: 'offloadMode', + autoOffload: 'autoOffload', + weightLoadingMode: 'weightLoadingMode', + attentionBackend: 'attentionBackend', + vaeSlicing: 'vaeSlicing', + vaeTiling: 'vaeTiling', + })) + same(plan[key], o[other]); + assert.equal(plan.resolvedModelRepo, o.repo); + assert.equal(plan.resolvedArtifact, o.repo); + assert.equal(plan.pipelineClass, o.modelType); + assert.equal(plan.resourceMode, 'auto'); + assert.equal(plan.resolvedResourceMode, 'auto'); + assert.equal(plan.quantizationMode, 'none'); + same(plan.quantizedComponents, []); + if (plan.source === OBSERVED_WORKFLOW_AUTO_LORA_SOURCE) { + validateAppliedAdapterItems(o.adapters); + assert.equal(o.adapters.length, 1); + assert.equal(o.adapters[0].artifact.source, 'hub'); + assert.equal(o.adapters[0].scheduler, null); + } else assert(!Object.hasOwn(o, 'adapters')); + if (plan.source === OBSERVED_WORKFLOW_AUTO_LORA_SOURCE || imageConditioned || legacy) { + const primary = controls.get(ownerScope); + assert.equal(primary.repo_id?.source, 'hub'); + same(primary.repo_id.value, o.repo); + for (const [key, observed] of Object.entries({ + model_type: 'modelType', + revision: 'revision', + dtype: 'dtype', + device: 'device', + auto_offload: 'autoOffload', + offload_mode: 'offloadMode', + weight_loading_mode: 'weightLoadingMode', + attention_backend: 'attentionBackend', + vae_slicing: 'vaeSlicing', + vae_tiling: 'vaeTiling', + })) { + if (legacy && key === 'weight_loading_mode') continue; + assert(Object.hasOwn(primary, key)); + same(primary[key], o[observed]); + } + if (!legacy) assert.equal(primary.weight_format, 'native'); + } + const id = plan.source + ':' + canonicalJsonHash(o); + assert.equal(plan.observedResourceCandidateId, id); + return id; + } catch { + return null; + } +} + +const audioControlFields = new Map( + [ + [ + 'modules.DiffusersAudio.LoadPipeline', + 'model_id pipeline_class revision dtype device offload_mode auto_offload mode', + ], + [ + 'modules.DiffusersRuntime.DiffusersExecutionRecipe', + 'attention_backend regional_compile layerwise_casting channels_last device_map denoiser_cache max_memory device_map_overrides vae_slicing vae_tiling offload_mode device', + ], + ['modules.DiffusersRuntime.PipelineQuantizationConfigV2', 'backend component_overrides'], + ['modules.DiffusersAudio.Generate', 'num_inference_steps guidance_scale audio_duration'], + ].map(([kind, fields]) => [kind, fields.split(' ').sort()]), +); + +// This is an observed recipe identity, never a new Auto admission or fit claim. +function audioResourceId(plan) { + const o = plan.resourceObservation; + finiteJson(o); + assert.equal(o.schemaVersion, 1); + assert.equal(o.strategy, 'dependency_order_retained_owners'); + assert(['text_to_audio', 'audio_continuation'].includes(o.task)); + assert.match(o.repo, /^[A-Za-z0-9][A-Za-z0-9._-]*\/[A-Za-z0-9][A-Za-z0-9._-]*$/u); + assert.match(o.revision, /^[0-9a-f]{40}$/u); + assert.equal(typeof o.modelType, 'string'); + assert(o.modelType.length > 0); + assert(['bfloat16', 'float16', 'float32'].includes(o.dtype)); + assert.equal(typeof o.device, 'string'); + assert(o.device.length > 0); + assert(['none', 'model_cpu', 'sequential_cpu', 'group_cpu', 'group_disk'].includes(o.offloadMode)); + assert.equal(typeof o.autoOffload, 'boolean'); + assert.equal(o.attentionBackend, 'auto'); + for (const [field, observed] of Object.entries({ + modelType: 'modelType', + pipelineClass: 'modelType', + modelRepo: 'repo', + resolvedModelRepo: 'repo', + resolvedArtifact: 'repo', + modelRevision: 'revision', + task: 'task', + dtype: 'dtype', + device: 'device', + offloadMode: 'offloadMode', + autoOffload: 'autoOffload', + deviceMap: 'deviceMap', + attentionBackend: 'attentionBackend', + })) + same(plan[field], o[observed]); + assert.equal(plan.resourceMode, 'auto'); + assert.equal(plan.resolvedResourceMode, 'auto'); + assert.equal(plan.quantizationMode, 'none'); + same(plan.quantizedComponents, []); + const w = o.workload; + for (const field of ['requestedAudioDuration', 'effectiveAudioDuration', 'steps', 'guidanceScale', 'sampleRate']) + assert(Number.isFinite(w[field]) && w[field] > 0); + assert(Number.isInteger(w.steps) && Number.isInteger(w.sampleRate)); + if (o.task === 'text_to_audio') { + assert.equal(w.extensionDuration, null); + assert.equal(w.requestedAudioDuration, w.effectiveAudioDuration); + } else { + assert(Number.isFinite(w.extensionDuration) && w.extensionDuration > 0); + assert.equal(w.effectiveAudioDuration, w.requestedAudioDuration + w.extensionDuration); + } + assert(Array.isArray(o.controls) && o.controls.length === 4); + const controls = new Map(o.controls.map((control) => [control.scope, control.fields])); + assert.equal(controls.size, 4); + for (const control of o.controls) { + assert(audioControlFields.has(control.scope)); + assert(control.fields && !Array.isArray(control.fields)); + same(Object.keys(control.fields).sort(), audioControlFields.get(control.scope)); + } + const owner = controls.get('modules.DiffusersAudio.LoadPipeline'); + for (const [field, observed] of Object.entries({ + model_id: { source: 'hub', value: o.repo }, + pipeline_class: o.modelType, + revision: o.revision, + dtype: o.dtype, + device: o.device, + offload_mode: o.offloadMode, + auto_offload: o.autoOffload, + mode: o.task, + })) + same(owner[field], observed); + const recipe = controls.get('modules.DiffusersRuntime.DiffusersExecutionRecipe'); + for (const [field, observed] of Object.entries({ + attention_backend: o.attentionBackend, + device_map: o.deviceMap, + offload_mode: o.offloadMode, + device: o.device, + regional_compile: false, + layerwise_casting: false, + channels_last: false, + denoiser_cache: 'none', + max_memory: '{}', + device_map_overrides: '{}', + })) + same(recipe[field], observed); + for (const field of ['vae_slicing', 'vae_tiling']) assert.equal(typeof recipe[field], 'boolean'); + for (const [field, observed] of Object.entries({ + regionalCompile: false, + layerwiseCasting: false, + channelsLast: false, + denoiserCache: 'none', + })) + same(plan[field], observed); + same(controls.get('modules.DiffusersRuntime.PipelineQuantizationConfigV2'), { + backend: 'none', + component_overrides: '{}', + }); + same(controls.get('modules.DiffusersAudio.Generate'), { + audio_duration: w.requestedAudioDuration, + num_inference_steps: w.steps, + guidance_scale: w.guidanceScale, + }); + const id = plan.source + ':' + canonicalJsonHash(o); + assert.equal(plan.observedResourceCandidateId, id); + return id; +} + +/** Keep a recomputed observed ID bound to the original canonical graph/model/output. */ +export function observedWorkflowAutoAudioProofMatches(plan, provenance) { + try { + assert.equal(plan.source, OBSERVED_WORKFLOW_AUTO_AUDIO_SOURCE); + assert(audioResourceId(plan)); + const nodes = provenance.graph.canonicalGraph.nodes; + assert.equal(nodes.length, plan.task === 'text_to_audio' ? 5 : 8); + const unique = (kind) => { + const matches = nodes.filter((node) => scope(node) === kind); + assert.equal(matches.length, 1); + return matches[0]; + }; + const owner = unique('modules.DiffusersAudio.LoadPipeline'); + same(value(owner, 'model_id'), { source: 'hub', value: plan.modelRepo }); + same(value(owner, 'revision'), plan.modelRevision); + same(value(owner, 'pipeline_class'), plan.modelType); + same(value(owner, 'mode'), plan.task); + assert.equal(provenance.models.items.length, 1); + const model = provenance.models.items[0]; + assert.equal(model.repoId, plan.modelRepo); + assert.equal(model.selectedRevision, plan.modelRevision); + for (const control of plan.resourceObservation.controls) { + const node = unique(control.scope); + for (const [field, observed] of Object.entries(control.fields)) { + assert(!node.params[field]?.sourceId && !node.params[field]?.sourceKey); + same(value(node, field), observed); + } + } + const generate = unique('modules.DiffusersAudio.Generate'), + w = plan.resourceObservation.workload; + assert.equal(provenance.output.items.length, 1); + same(value(unique('modules.DiffusersRuntime.PipelineQuantizationConfigV2'), 'dtype'), plan.dtype); + same(value(unique('modules.Audio.Export'), 'sample_rate'), w.sampleRate); + for (const [field, observed] of Object.entries({ + audio_duration: w.requestedAudioDuration, + num_inference_steps: w.steps, + guidance_scale: w.guidanceScale, + sample_rate: w.sampleRate, + })) + same(value(generate, field), observed); + if (plan.task === 'audio_continuation') same(value(generate, 'extension_duration'), w.extensionDuration); + same(provenance.output.items[0].durationSeconds, w.effectiveAudioDuration); + same(provenance.output.items[0].sampleRate, w.sampleRate); + return true; + } catch { + return false; + } +} + +/** Keep absent historical loader controls absent, with source/contract bindings. */ +export function observedWorkflowAutoLegacyProofMatches(plan, provenance) { + try { + assert.equal(plan.source, OBSERVED_WORKFLOW_AUTO_LEGACY_SOURCE); + assert(observedWorkflowAutoResourceId(plan)); + const o = plan.resourceObservation; + same(o.backendSourceFingerprint, provenance.runtime.backendSource.fingerprint); + same(o.backendContractFingerprint, provenance.runtime.backendContract.fingerprint); + const nodes = provenance.graph.canonicalGraph.nodes; + assert(nodes.length === 5 || nodes.length === 6); + const unique = (kind) => { + const matches = nodes.filter((node) => scope(node) === kind); + assert.equal(matches.length, 1); + return matches[0]; + }; + const owner = unique(ownerScope), + encode = unique(encodeScope); + const denoise = unique('modules.ModularDiffusers.Denoise'); + const decode = unique('modules.ModularDiffusers.DecodeLatents'); + const preview = unique('modules.Image.Preview'); + assert(nodes.every((node) => core.includes(scope(node)) || scope(node) === optional)); + const contract = provenance.runtime.backendContract.contracts.filter((item) => item.key === ownerScope); + assert.equal(contract.length, 1); + for (const field of o.absentLoaderControls) { + assert(!Object.hasOwn(owner.params, field)); + assert(!Object.hasOwn(contract[0].params, field)); + } + for (const control of o.controls) { + const node = unique(control.scope); + for (const [field, observed] of Object.entries(control.fields)) { + assert(!node.params[field]?.sourceId && !node.params[field]?.sourceKey); + same(value(node, field), observed); + } + } + const connected = new Set(); + const wire = (node, field, supplier, output) => { + connected.add(node.key + ':' + field); + assert.equal(node.params[field]?.sourceId, supplier.key); + assert.equal(node.params[field]?.sourceKey, output); + if (Object.hasOwn(node.params[field], 'value')) { + assert(node === decode && ['width', 'height'].includes(field)); + same(node.params[field].value, o.geometry[field]); + } + }; + wire(encode, 'text_encoders', owner, 'text_encoders'); + wire(denoise, 'unet', owner, 'unet_out'); + wire(denoise, 'scheduler', owner, 'scheduler'); + wire(denoise, 'embeddings', encode, 'embeddings'); + wire(decode, 'vae', owner, 'vae_out'); + wire(decode, 'latents', denoise, 'latents'); + if (o.decoderGeometryRoute === 'denoiser_dimensions') { + wire(decode, 'width', denoise, 'out_width'); + wire(decode, 'height', denoise, 'out_height'); + } + wire(preview, 'image', decode, 'images'); + if (nodes.length === 6) { + const guider = unique(optional); + assert(o.guiderConfiguration); + wire(denoise, 'guider', guider, 'guider_out'); + wire(encode, 'guider', guider, 'guider_out'); + for (const [field, observed] of Object.entries(o.guiderConfiguration)) same(value(guider, field), observed); + same(o.guiderConfiguration.guidance_scale, value(denoise, 'guidance_scale')); + } else assert(!Object.hasOwn(o, 'guiderConfiguration')); + for (const node of nodes) + for (const [field, param] of Object.entries(node.params)) { + if (param.sourceId) assert(connected.has(node.key + ':' + field)); + } + same(value(owner, 'repo_id'), { source: 'hub', value: plan.modelRepo }); + same(value(owner, 'revision'), plan.modelRevision); + same(value(owner, 'model_type'), plan.modelType); + for (const field of [ + 'quant_config', + 'lora_list', + 'unet', + 'vae', + 'controlnet', + 'text_encoders', + 'pipeline_components', + 'image_encoder', + ]) { + assert(!owner.params[field]?.sourceId && !owner.params[field]?.sourceKey); + assert(value(owner, field) == null); + } + assert.equal(provenance.models.items.length, 1); + const model = provenance.models.items[0]; + same(model.repoId, plan.modelRepo); + same(model.selectedRevision, plan.modelRevision); + const form = provenance.template.lockedSettings; + same(form.mode, 'text_to_image'); + same(form.modelType, o.formModelType ?? plan.modelType); + same(form.dtype, plan.dtype); + same(form.quantizationMode, 'none'); + same(value(owner, 'trust_remote_code'), false); + if (Object.hasOwn(form, 'trustRemoteCode')) same(form.trustRemoteCode, false); + assert(!Object.hasOwn(form, 'weightFormat')); + for (const [field, formKey] of [ + ['width', 'width'], + ['height', 'height'], + ['seed', 'seed'], + ['num_inference_steps', 'steps'], + ['guidance_scale', 'guidanceScale'], + ]) { + same(value(denoise, field), form[formKey]); + } + same(value(encode, 'prompt'), form.prompt); + same(value(encode, 'negative_prompt') ?? '', form.negativePrompt); + if (plan.maxSequenceLength !== undefined) same(plan.maxSequenceLength, form.maxSequenceLength); + assert.equal(provenance.inputs.items.length, 0); + assert.equal(provenance.output.items.length, 1); + same(provenance.output.items[0].mediaType, 'image'); + for (const field of ['width', 'height']) same(provenance.output.items[0][field], o.geometry[field]); + return true; + } catch { + return false; + } +} + +/** Recheck the connected decoder route after hashes have been recomputed. */ +export function observedWorkflowAutoTextGeometryProofMatches(plan, provenance) { + try { + assert([OBSERVED_WORKFLOW_AUTO_SOURCE, OBSERVED_WORKFLOW_AUTO_LORA_SOURCE].includes(plan.source)); + assert(observedWorkflowAutoResourceId(plan)); + assert.equal(plan.resourceObservation.decoderGeometryRoute, 'denoiser_dimensions'); + const nodes = provenance.graph.canonicalGraph.nodes; + assert(nodes.length >= 5 && nodes.length <= 7); + const roles = new Map(nodes.map((node) => [scope(node), node])); + assert.equal(roles.size, nodes.length); + assert(nodes.every((node) => core.includes(scope(node)) || [optional, descriptorScope].includes(scope(node)))); + for (const kind of core) assert(roles.has(kind)); + assert.equal(roles.has(descriptorScope), plan.source === OBSERVED_WORKFLOW_AUTO_LORA_SOURCE); + const owner = roles.get(ownerScope), + denoise = roles.get('modules.ModularDiffusers.Denoise'); + const decode = roles.get('modules.ModularDiffusers.DecodeLatents'), + preview = roles.get('modules.Image.Preview'); + for (const [node, field, supplier, port] of [ + [decode, 'vae', owner, 'vae_out'], + [decode, 'latents', denoise, 'latents'], + [preview, 'image', decode, 'images'], + ]) { + assert.equal(node.params[field]?.sourceId, supplier.key); + assert.equal(node.params[field].sourceKey, port); + assert(!Object.hasOwn(node.params[field], 'value')); + } + assert.equal(provenance.output.items.length, 1); + for (const field of ['width', 'height']) { + const actual = plan.resourceObservation.geometry[field], + p = decode.params[field]; + assert.equal(p?.sourceId, denoise.key); + assert.equal(p.sourceKey, 'out_' + field); + if (Object.hasOwn(p, 'value')) same(p.value, actual); + assert(!denoise.params[field]?.sourceId && !denoise.params[field]?.sourceKey); + same(value(denoise, field), actual); + same(provenance.output.items[0][field], actual); + same(provenance.template.lockedSettings[field], actual); + } + same(value(owner, 'repo_id'), { source: 'hub', value: plan.modelRepo }); + same(value(owner, 'revision'), plan.modelRevision); + same(value(owner, 'model_type'), plan.modelType); + assert.equal(provenance.template.lockedSettings.mode, 'text_to_image'); + assert.equal(provenance.template.lockedSettings.resourceMode, 'auto'); + assert(Array.isArray(provenance.inputs.items) && provenance.inputs.items.length === 0); + return true; + } catch { + return false; + } +} + +/** A projected adapter identity is useful only with the existing strict native proof. */ +export function observedWorkflowAutoLoraProofMatches(plan, provenance) { + try { + assert.equal(plan.source, OBSERVED_WORKFLOW_AUTO_LORA_SOURCE); + const proof = validateAppliedAdapterProof(provenance, { required: true }); + assert.equal(proof.owners.length, 1); + const application = proof.owners[0].application; + assert.equal(application.status, 'complete'); + assert.equal(application.observation, 'activated'); + same(plan.resourceObservation.adapters, application.adapters); + const graph = provenance.graph.canonicalGraph; + const owner = graph.nodes.find((node) => node.key === proof.owners[0].nodeKey); + assert.equal(owner.module + '.' + owner.action, ownerScope); + same(value(owner, 'repo_id'), { source: 'hub', value: plan.modelRepo }); + same(value(owner, 'revision'), plan.modelRevision); + same(value(owner, 'model_type'), plan.modelType); + assert( + provenance.models.items.some( + (item) => + item.repoId === plan.modelRepo && + item.selectedRevision === plan.modelRevision && + item.modelRevision === `${plan.modelRepo}@${plan.modelRevision}`, + ), + ); + for (const control of plan.resourceObservation.controls) { + const matching = graph.nodes.filter((node) => scope(node) === control.scope); + assert.equal(matching.length, 1); + for (const [key, field] of Object.entries(control.fields)) { + const param = matching[0].params[key]; + assert(param && !param.sourceId && !param.sourceKey && Object.hasOwn(param, 'value')); + same(field, param.value); + } + } + return true; + } catch { + return false; + } +} + +/** Recover only a fresh, literal, unquantized native image T2I owner. Unknown, + * connected, composite, deferred, reused and runtime-patched cases stay held. */ +function durableTextOwnerAuthoringMatches(snapshot, ownerId, owner) { + const matches = []; + const visit = (nodes, localIds = null) => { + assert(Array.isArray(nodes)); + for (const node of nodes) { + const data = node?.data; + if (!data || data.blockProjectionOwnerId) continue; + if (data.blockInstanceV2) { + assert.equal(localIds, null); + const instance = data.blockInstanceV2, + children = instance.effectiveGraph?.nodes; + assert(typeof instance.instanceId === 'string' && Array.isArray(children)); + const ids = new Map( + children.map((child) => { + assert.equal(typeof child.nodeId, 'string'); + return [ + child.nodeId, + `block-v2-node:${instance.instanceId.length}:${instance.instanceId}:${child.nodeId.length}:${child.nodeId}`, + ]; + }), + ); + assert.equal(ids.size, children.length); + visit(children, ids); + } else if (scope(data) === ownerScope) matches.push({ id: localIds?.get(node.nodeId) ?? node.id, data }); + } + }; + visit(snapshot.nodes); + assert.equal(matches.length, 1); + const { id, data } = matches[0], + authoring = data.operationAuthoring, + operation = authoring?.operation; + assert.equal(id, ownerId); + assert.equal(authoring?.schemaVersion, 1); + assert.equal(operation?.pipelineClass, value(owner, 'model_type')); + assert.equal(operation.task, 'text_to_image'); + assert.equal(operation.nodeKey, ownerScope); + assert.equal(operation.binding?.pipelineClass, value(owner, 'model_type')); + same(operation.binding?.values?.model_type, value(owner, 'model_type')); + assert(!data.params?.model_type?.sourceId && !data.params?.model_type?.sourceKey); + same(data.params?.model_type?.value, value(owner, 'model_type')); + return true; +} + +export function observedWorkflowAutoPlan( + apiGraph, + { executionReceipt: task, executedOutput: output, taskId, adapterProofContext, backendSource, backendContract } = {}, +) { + try { + const hints = apiGraph.runtimeHints, + snapshot = hints.workflowSnapshot, + form = snapshot.studioForm; + assert.equal(hints.resourceMode, 'auto'); + assert.equal(form.resourceMode, 'auto'); + const imageConditioned = ['edit_image', 'multi_image_reference_edit'].includes(form.mode); + assert(form.mode === 'text_to_image' || imageConditioned); + if (imageConditioned) assert.equal(task.resourceCandidateId, null); + assert.equal(task.status, 'completed'); + assert.equal(task.attempt_index, 0); + assert.equal(output.attemptIndex, 0); + for (const [key, taskKey, outputKey] of [ + ['sid', 'sid', 'sid'], + ['workflowTabId', 'workflow_tab_id', 'workflowTabId'], + ['clientRunId', 'client_run_id', 'clientRunId'], + ['runInputHash', 'run_input_hash', 'runInputHash'], + ]) { + const v = key === 'sid' ? apiGraph.sid : hints[key]; + assert.equal(typeof v, 'string'); + assert(v.length > 0); + assert.equal(task[taskKey], v); + assert.equal(output[outputKey], v); + } + assert.equal(typeof task.task_id, 'string'); + assert(task.task_id); + if (taskId !== undefined) assert.equal(taskId, task.task_id); + assert.equal(output.taskId, task.task_id); + same(output.apiGraphSnapshot, apiGraph); + same(task.workflow_snapshot, snapshot); + same(output.formSnapshot, form); + assert.equal(hints.workflowAutoPlan.schemaVersion, 1); + assert(!Object.hasOwn(apiGraph, 'loops')); + assert.equal(hints.workflowAutoPlan.graphHash, workerGraphHash(apiGraph)); + const entries = Object.entries(apiGraph.nodes), + ids = new Set(entries.map(([id]) => id)); + const order = [...new Set(apiGraph.paths.flat())]; + same([...ids].sort(), [...order].sort()); + assert(entries.length <= (form.mode === 'edit_image' ? 8 : 7)); + const scopes = new Map(); + for (const [id, node] of entries) { + const key = scope(node); + assert( + core.includes(key) || + (imageConditioned + ? key === 'modules.ModularDiffusers.ImageEncode' || + key === 'modules.Image.Load' || + (form.mode === 'edit_image' && key === optional) + : key === optional || key === descriptorScope), + ); + assert(!scopes.has(key)); + scopes.set(key, { id, node }); + for (const param of Object.values(node.params)) + if (param.sourceId) { + assert(ids.has(param.sourceId)); + assert(order.indexOf(param.sourceId) < order.indexOf(id)); + } + } + for (const key of core) assert(scopes.has(key)); + const { id: ownerId, node: owner } = scopes.get(ownerScope), + { id: previewId } = scopes.get('modules.Image.Preview'); + const descriptor = scopes.get(descriptorScope); + const legacy = + !imageConditioned && + !descriptor && + !Object.hasOwn(owner.params, 'weight_format') && + !Object.hasOwn(owner.params, 'weight_loading_mode'); + assert.equal(output.nodeId, previewId); + const receipt = output.resolvedExecutionInputs; + assert.equal(receipt.source, 'backend-execution'); + assert.equal(receipt.taskId, task.task_id); + assert.equal(receipt.attemptIndex, 0); + assert.equal(receipt.nodeId, previewId); + assert.equal(receipt.truncated, false); + same(receipt.uncapturedNodeIds, []); + assert.equal(receipt.nodes.length, entries.length); + const rows = new Map(receipt.nodes.map((row) => [row.nodeId, row])); + same([...rows.keys()].sort(), [...ids].sort()); + for (const [id, node] of entries) { + assert.equal(rows.get(id).module, node.module); + assert.equal(rows.get(id).action, node.action); + } + const routedImage = imageConditioned && scopes.has(optional); + same(receipt.graphTasks, [ + { + loaderId: ownerId, + pipelineClass: value(owner, 'model_type'), + task: imageConditioned ? (routedImage ? 'edit_image' : null) : 'text_to_image', + }, + ]); + assert(typeof form.modelType === 'string' && form.modelType.length > 0 && form.modelType.length <= 256); + const legacyTextLabel = !imageConditioned && form.modelType !== value(owner, 'model_type'); + if (legacyTextLabel) assert(durableTextOwnerAuthoringMatches(snapshot, ownerId, owner)); + assert.equal(form.quantizationMode, 'none'); + assert.equal(form.trustRemoteCode, false); + assert.equal(value(owner, 'trust_remote_code'), false); + if (legacy) { + assert(!Object.hasOwn(form, 'weightFormat')); + assert.equal(task.resourceCandidateId, null); + assert.equal(task.runtimePreparation.performed, false); + assert.equal(task.runtimePreparation.residentRecipeReusable, false); + assert.equal(backendSource?.fingerprint, task.runtimeFingerprint?.backendSource?.fingerprint); + assert.match(backendSource?.fingerprint, /^sha256:backend-source-v1:[a-f0-9]{64}$/u); + assert(Array.isArray(backendSource.files) && backendSource.files.length > 0); + assert.equal(backendSource.gitCommit, task.runtimeFingerprint.backendSource.gitCommit); + assert.equal(backendSource.files.length, task.runtimeFingerprint.backendSource.fileCount); + const contracts = backendContract?.contracts?.filter((item) => item.key === ownerScope); + assert.equal(contracts?.length, 1); + assert.match(backendContract.fingerprint, /^sha256:backend-contract-v1:[a-f0-9]{64}$/u); + for (const key of ['weight_format', 'weight_loading_mode']) { + assert(!Object.hasOwn(contracts[0].params, key)); + assert(!Object.hasOwn(rows.get(ownerId).fields, key)); + assert(!Object.hasOwn(rows.get(ownerId).omittedFields ?? {}, key)); + assert(!Object.hasOwn(task.runtimePreparation.workflowAuto.resolvedFields[ownerId], key)); + } + } else assert.equal(value(owner, 'weight_format'), 'native'); + for (const key of [ + 'repo_id', + 'revision', + 'model_type', + 'dtype', + 'device', + 'offload_mode', + 'auto_offload', + 'weight_loading_mode', + 'trust_remote_code', + 'weight_format', + ]) + assert(!owner.params[key]?.sourceId && !owner.params[key]?.sourceKey); + for (const key of [ + 'quant_config', + 'unet', + 'vae', + 'controlnet', + 'text_encoders', + 'pipeline_components', + 'image_encoder', + ]) { + assert(!owner.params[key]?.sourceId && !owner.params[key]?.sourceKey); + assert(value(owner, key) == null); + } + let adapters; + if (descriptor) { + const connection = owner.params.lora_list; + assert.equal(connection?.sourceId, descriptor.id); + assert.equal(connection.sourceKey, 'lora'); + assert(!Object.hasOwn(connection, 'value')); + const node = descriptor.node; + assert(Object.keys(node.params).every((key) => descriptorFields.has(key))); + for (const param of Object.values(node.params)) assert(!param.sourceId && !param.sourceKey); + assert(value(node, 'previous_loras') == null); + assert.equal(value(node, 'scheduler_class'), ''); + assert.equal(value(node, 'scheduler_config'), '{}'); + assert.equal(receipt.schemaVersion, 1); + assert.equal(receipt.appliedAdaptersStatus?.schemaVersion, 1); + assert.equal(receipt.appliedAdaptersStatus.truncated, false); + const row = rows.get(descriptor.id); + assert.equal(row.fields.revision.source, 'literal'); + same(row.fields.revision.value, value(node, 'revision')); + assert(!Object.hasOwn(row.omittedFields ?? {}, 'revision')); + const proof = validateAppliedAdapterProof(adapterProofContext, { required: true }); + assert.equal(proof.owners.length, 1); + const application = rows.get(ownerId).appliedAdapters; + same(proof.owners[0].application, application); + assert.equal(application.status, 'complete'); + assert.equal(application.observation, 'activated'); + assert.equal(application.adapters.length, 1); + adapters = structuredClone(application.adapters); + for (const [id, other] of entries) + for (const [key, param] of Object.entries(other.params)) { + if (param.sourceId === descriptor.id) + assert(id === ownerId && key === 'lora_list' && param.sourceKey === 'lora'); + } + } else { + assert(!owner.params.lora_list?.sourceId && !owner.params.lora_list?.sourceKey); + assert(value(owner, 'lora_list') == null); + } + const repo = value(owner, 'repo_id'); + assert.equal(repo.source, 'hub'); + assert.equal(typeof repo.value, 'string'); + assert(repo.value); + const revision = value(owner, 'revision'); + assert.match(revision, /^[0-9a-f]{40}$/u); + if (adapters) + assert( + adapterProofContext.models.items.some( + (item) => + item.repoId === repo.value && + item.selectedRevision === revision && + item.modelRevision === `${repo.value}@${revision}`, + ), + ); + const trace = rows.get(ownerId).fields; + for (const key of [ + 'repo_id', + 'revision', + 'model_type', + 'dtype', + 'device', + 'offload_mode', + 'auto_offload', + 'weight_loading_mode', + 'attention_backend', + 'vae_slicing', + 'vae_tiling', + ]) { + if (legacy && key === 'weight_loading_mode') continue; + assert.equal(trace[key].source, 'literal'); + same(trace[key].value, key === 'repo_id' ? repo.value : value(owner, key)); + } + assert.equal(trace.quant_config.source, 'literal'); + assert.equal(trace.quant_config.value, null); + assert(['bfloat16', 'float16', 'float32'].includes(value(owner, 'dtype'))); + assert.equal(typeof value(owner, 'auto_offload'), 'boolean'); + assert.equal(typeof value(owner, 'device'), 'string'); + assert(['none', 'model_cpu', 'sequential_cpu', 'group_cpu', 'group_disk'].includes(value(owner, 'offload_mode'))); + if (!legacy) assert(['cpu', 'cuda'].includes(value(owner, 'weight_loading_mode'))); + const prep = task.runtimePreparation; + assert.equal(prep.resourceMode, 'auto'); + const auto = prep.workflowAuto; + assert.equal(auto.strategy, 'dependency_order_retained_owners'); + assert.equal(auto.schedule, null); + assert.equal(auto.cachePreparation, null); + for (const key of ['reusedOwnerIds', 'preparedDataNodes', 'appliedUpdates', 'releases']) same(auto[key], []); + assert(auto.resolvedFields[ownerId]); + for (const key of [ + 'repo_id', + 'revision', + 'model_type', + 'dtype', + 'device', + 'offload_mode', + 'auto_offload', + 'weight_loading_mode', + 'weight_format', + 'attention_backend', + 'vae_slicing', + 'vae_tiling', + ].filter((key) => !legacy || !['weight_loading_mode', 'weight_format'].includes(key))) + assert(Object.hasOwn(auto.resolvedFields[ownerId], key)); + const denoiseOwner = scopes.get('modules.ModularDiffusers.Denoise').id; + for (const key of ['width', 'height']) assert(Object.hasOwn(auto.resolvedFields[denoiseOwner], key)); + const controls = []; + let connectedDecoderRoute = false; + let legacyGuiderConfiguration; + if (legacy && scopes.has(optional)) { + const guider = scopes.get(optional), + fields = rows.get(guider.id).fields; + legacyGuiderConfiguration = {}; + for (const key of 'model_type guider guidance_scale guidance_rescale use_original_formulation enabled start stop'.split( + ' ', + )) { + assert(!guider.node.params[key]?.sourceId && !guider.node.params[key]?.sourceKey); + assert.equal(fields[key]?.source, 'literal'); + assert(!Object.hasOwn(rows.get(guider.id).omittedFields ?? {}, key)); + same(fields[key].value, value(guider.node, key)); + legacyGuiderConfiguration[key] = fields[key].value; + } + const layers = guider.node.params.layers_config; + assert(!layers?.sourceId && !layers?.sourceKey); + assert(layers?.value == null); + } + for (const [id, fields] of Object.entries(auto.resolvedFields)) { + const node = apiGraph.nodes[id]; + assert(node); + const kind = scope(node); + if (!imageConditioned && kind === 'modules.ModularDiffusers.DecodeLatents') { + same(Object.keys(fields).sort(), ['height', 'width']); + for (const key of ['width', 'height']) { + const param = node.params[key], + captured = rows.get(id).fields[key]; + assert.equal(param.sourceId, denoiseOwner); + assert.equal(param.sourceKey, 'out_' + key); + if (Object.hasOwn(param, 'value')) same(param.value, fields[key]); + assert.equal(captured.source, 'connected'); + assert.equal(captured.sourceNodeId, denoiseOwner); + assert.equal(captured.sourcePortId, 'out_' + key); + same(captured.value, fields[key]); + same(fields[key], value(apiGraph.nodes[denoiseOwner], key)); + assert(!Object.hasOwn(rows.get(id).omittedFields ?? {}, key)); + } + connectedDecoderRoute = true; + continue; + } + validateControlFields(kind, fields, imageConditioned); + for (const [key, v] of Object.entries(fields)) { + assert(!node.params[key]?.sourceId && !node.params[key]?.sourceKey); + same(v, value(node, key)); + const captured = rows.get(id).fields[key]; + if (legacy) { + assert(captured); + assert(!Object.hasOwn(rows.get(id).omittedFields ?? {}, key)); + } + if (kind === encodeScope) { + assert(captured); + assert(!Object.hasOwn(rows.get(id).omittedFields ?? {}, key)); + same(v, form.maxSequenceLength); + } + if (captured) { + assert.equal(captured.source, 'literal'); + same(captured.value, key === 'repo_id' ? repo.value : v); + } + } + controls.push({ scope: kind, fields: structuredClone(fields) }); + } + controls.sort((a, b) => a.scope.localeCompare(b.scope)); + const denoise = scopes.get('modules.ModularDiffusers.Denoise'), + d = rows.get(denoise.id).fields; + for (const key of ['width', 'height', 'seed', 'num_inference_steps', 'guidance_scale']) { + assert.equal(d[key].source, 'literal'); + same(d[key].value, value(denoise.node, key)); + } + for (const key of ['width', 'height']) + assert(Number.isInteger(d[key].value) && d[key].value > 0 && d[key].value <= 32768); + const encoded = scopes.get('modules.ModularDiffusers.EncodePrompt'); + const exposesNegativePrompt = Object.hasOwn(encoded.node.params, 'negative_prompt'); + if (!exposesNegativePrompt) { + assert.equal(form.negativePrompt, ''); + assert(!Object.hasOwn(rows.get(encoded.id).fields, 'negative_prompt')); + assert(!Object.hasOwn(rows.get(encoded.id).omittedFields ?? {}, 'negative_prompt')); + } + for (const [key, formKey] of !exposesNegativePrompt + ? [['prompt', 'prompt']] + : [ + ['prompt', 'prompt'], + ['negative_prompt', 'negativePrompt'], + ]) { + assert.equal(rows.get(encoded.id).fields[key].source, 'literal'); + same(rows.get(encoded.id).fields[key].value, value(encoded.node, key)); + same(value(encoded.node, key), form[formKey]); + } + const references = imageConditioned ? observedImageReferences(apiGraph, receipt, form) : null; + const plan = { + source: legacy + ? OBSERVED_WORKFLOW_AUTO_LEGACY_SOURCE + : imageConditioned + ? OBSERVED_WORKFLOW_AUTO_IMAGE_SOURCE + : adapters + ? OBSERVED_WORKFLOW_AUTO_LORA_SOURCE + : OBSERVED_WORKFLOW_AUTO_SOURCE, + modelType: value(owner, 'model_type'), + pipelineClass: value(owner, 'model_type'), + modelRepo: repo.value, + resolvedModelRepo: repo.value, + resolvedArtifact: repo.value, + modelRevision: revision, + task: imageConditioned ? form.mode : 'text_to_image', + resourceMode: 'auto', + resolvedResourceMode: 'auto', + dtype: value(owner, 'dtype'), + device: value(owner, 'device'), + offloadMode: value(owner, 'offload_mode'), + autoOffload: value(owner, 'auto_offload'), + ...(!legacy ? { weightLoadingMode: value(owner, 'weight_loading_mode') } : {}), + attentionBackend: value(owner, 'attention_backend'), + vaeSlicing: value(owner, 'vae_slicing'), + vaeTiling: value(owner, 'vae_tiling'), + quantizationMode: 'none', + quantizedComponents: [], + ...(auto.resolvedFields[encoded.id] + ? { maxSequenceLength: auto.resolvedFields[encoded.id].max_sequence_length } + : {}), + }; + const observation = { + schemaVersion: 1, + modelType: plan.modelType, + repo: repo.value, + revision, + task: plan.task, + dtype: plan.dtype, + device: plan.device, + offloadMode: plan.offloadMode, + autoOffload: plan.autoOffload, + ...(!legacy ? { weightLoadingMode: plan.weightLoadingMode } : {}), + attentionBackend: plan.attentionBackend, + vaeSlicing: plan.vaeSlicing, + vaeTiling: plan.vaeTiling, + geometry: { width: d.width.value, height: d.height.value }, + strategy: auto.strategy, + controls, + ...(connectedDecoderRoute ? { decoderGeometryRoute: 'denoiser_dimensions' } : {}), + ...(legacy + ? { + absentLoaderControls: ['weight_format', 'weight_loading_mode'], + backendSourceFingerprint: backendSource.fingerprint, + backendContractFingerprint: backendContract.fingerprint, + ...(legacyGuiderConfiguration ? { guiderConfiguration: legacyGuiderConfiguration } : {}), + } + : {}), + ...(imageConditioned + ? { + references, + formModelType: form.modelType, + reportedGraphTask: receipt.graphTasks[0].task, + workflowId: 'image_conditioned', + } + : {}), + ...(routedImage ? { imageRoute: 'native_state' } : {}), + ...(imageConditioned && form.mode === 'edit_image' + ? { requestedOffloadMode: form.offloadMode, requestedAutoOffload: form.autoOffload } + : {}), + ...(legacyTextLabel ? { formModelType: form.modelType } : {}), + ...(adapters ? { adapters } : {}), + }; + const result = { + ...plan, + resourceObservation: observation, + observedResourceCandidateId: plan.source + ':' + canonicalJsonHash(observation), + }; + if (imageConditioned || legacy) assert(observedWorkflowAutoResourceId(result)); + return result; + } catch { + return null; + } +} + +// Explicit one- and two-reference paths. These are declarations and receipts, +// never executable suppliers or a fallback task classifier in the application. +function imageConditionedRoles(entries, referenceCount = 2, routed = false) { + assert(referenceCount === 1 || referenceCount === 2); + if (routed) assert.equal(referenceCount, 1); + const roles = new Map(entries.map(([id, node]) => [scope(node), { id, node }])); + assert.equal(entries.length, routed ? 8 : 7); + assert.equal(roles.size, routed ? 8 : 7); + const get = (kind) => { + const role = roles.get(kind); + assert(role); + return role; + }; + const owner = get(ownerScope), + load = get('modules.Image.Load'), + image = get('modules.ModularDiffusers.ImageEncode'), + encode = get('modules.ModularDiffusers.EncodePrompt'), + denoise = get('modules.ModularDiffusers.Denoise'), + decode = get('modules.ModularDiffusers.DecodeLatents'), + preview = get('modules.Image.Preview'); + const wires = new Map([ + [owner.id, {}], + [load.id, {}], + [image.id, { image: [load.id, 'image'], vae: [owner.id, 'vae_out'] }], + [encode.id, { text_encoders: [owner.id, 'text_encoders'] }], + [ + denoise.id, + { + unet: [owner.id, 'unet_out'], + scheduler: [owner.id, 'scheduler'], + embeddings: [encode.id, 'embeddings'], + image_latents: [image.id, 'image_latents'], + }, + ], + [decode.id, { vae: [owner.id, 'vae_out'], latents: [denoise.id, 'latents'] }], + [preview.id, { image: [decode.id, 'images'] }], + ]); + const fields = new Map([ + [ + owner.id, + new Set([ + ...ownerFields, + 'trust_remote_code', + 'quant_config', + 'unet', + 'vae', + 'controlnet', + 'lora_list', + 'text_encoders', + 'pipeline_components', + 'image_encoder', + 'modiff_pipeline_identity', + 'refresh_pipeline_identity_button', + ]), + ], + [load.id, new Set(['file', 'alpha_channel', 'label'])], + [image.id, new Set(['image', 'vae', 'seed', 'encode_summary'])], + [encode.id, new Set(['text_encoders', 'prompt', 'prompt_input', 'guider'])], + [ + denoise.id, + new Set([ + 'unet', + 'scheduler', + 'embeddings', + 'image_latents', + 'width', + 'height', + 'seed', + 'num_inference_steps', + 'guidance_scale', + ]), + ], + [decode.id, new Set(['vae', 'latents'])], + [preview.id, new Set(['image', 'vae', 'device', 'preview', 'export'])], + ]); + const guider = routed ? get(optional) : null; + if (routed) { + wires.set(guider.id, {}); + Object.assign(wires.get(encode.id), { guider: [guider.id, 'guider_out'], image: [load.id, 'image'] }); + Object.assign(wires.get(denoise.id), { + guider: [guider.id, 'guider_out'], + route_state_in: [image.id, 'route_state_out'], + }); + Object.assign(wires.get(decode.id), { route_state_in: [denoise.id, 'route_state_out'] }); + for (const key of ['mask_image', 'padding_mask_crop', 'inpaint_compatibility']) fields.get(image.id).add(key); + for (const key of ['image', 'negative_prompt']) fields.get(encode.id).add(key); + for (const key of ['guider', 'strength', 'route_state_in']) fields.get(denoise.id).add(key); + fields.get(decode.id).add('route_state_in'); + fields.set( + guider.id, + new Set( + 'model_type guider guidance_scale guidance_rescale use_original_formulation enabled start stop layers_config'.split( + ' ', + ), + ), + ); + validateRoutedGuider(guider.node, owner.node); + for (const key of ['mask_image', 'padding_mask_crop']) assert(value(image.node, key) == null); + assert.equal(value(image.node, 'inpaint_compatibility'), 'native'); + } + for (const [id, node] of entries) { + const expected = wires.get(id); + for (const [field, param] of Object.entries(node.params)) { + assert(fields.get(id).has(field)); + if (param.sourceId || param.sourceKey) { + const presentation = + !param.sourceId && + ((id === image.id && + field === 'encode_summary' && + param.display === 'ui_text' && + param.sourceKey === 'encode_summary_data') || + (id === preview.id && field === 'preview' && param.display === 'ui_image' && param.sourceKey === 'output')); + assert(Object.hasOwn(expected, field) || presentation); + } + } + for (const [field, [producer, port]] of Object.entries(expected)) { + assert.equal(node.params[field]?.sourceId, producer); + assert.equal(node.params[field]?.sourceKey, port); + assert(!Object.hasOwn(node.params[field], 'value')); + } + } + for (const [role, field] of [[encode, 'prompt_input'], ...(routed ? [] : [[encode, 'guider']]), [preview, 'vae']]) + assert(value(role.node, field) == null); + assert.equal(value(owner.node, 'workflow_id'), 'image_conditioned'); + assert.equal(value(load.node, 'alpha_channel'), 'ignore'); + const files = value(load.node, 'file'); + assert(Array.isArray(files) && files.length === referenceCount); + assert(files.every((file) => typeof file === 'string' && file.length > 0 && file.length <= 16384)); + if (referenceCount === 2) assert.notEqual(files[0], files[1]); + return { owner, load, image, encode, denoise, decode, preview, files, guider }; +} + +function validateRoutedGuider(node, owner) { + for (const param of Object.values(node.params)) assert(!param.sourceId && !param.sourceKey); + for (const [key, expected] of Object.entries({ + model_type: value(owner, 'model_type'), + guider: 'ClassifierFreeGuidance', + guidance_rescale: 0, + use_original_formulation: false, + enabled: true, + start: 0, + stop: 1, + })) + same(value(node, key), expected); + assert(value(node, 'layers_config') == null); + assert(Number.isFinite(value(node, 'guidance_scale')) && value(node, 'guidance_scale') > 0); +} + +function observedImageReferences(apiGraph, receipt, form) { + assert.equal(apiGraph.paths.length, 1); + const routed = Object.values(apiGraph.nodes).some((node) => scope(node) === optional); + assert.equal(apiGraph.paths[0].length, routed ? 8 : 7); + assert.equal(new Set(apiGraph.paths[0]).size, routed ? 8 : 7); + const referenceCount = form.mode === 'edit_image' ? 1 : 2; + const roles = imageConditionedRoles(Object.entries(apiGraph.nodes), referenceCount, routed); + const { owner, load, image, denoise } = roles; + for (const field of ['ambiguousFields', 'unavailableFields']) + if (receipt[field] !== undefined) same(receipt[field], []); + if (routed) same(value(roles.encode.node, 'negative_prompt'), form.negativePrompt); + else assert.equal(form.negativePrompt, ''); + for (const [key, formKey] of [ + ['dtype', 'dtype'], + ['device', 'device'], + ...(referenceCount === 2 + ? [ + ['offload_mode', 'offloadMode'], + ['auto_offload', 'autoOffload'], + ] + : []), + ]) + same(value(owner.node, key), form[formKey]); + for (const [key, formKey] of [ + ['width', 'width'], + ['height', 'height'], + ['seed', 'seed'], + ['num_inference_steps', 'steps'], + ['guidance_scale', 'guidanceScale'], + ]) + same(value(denoise.node, key), form[formKey]); + same(value(image.node, 'seed'), form.seed); + const rows = new Map(receipt.nodes.map((row) => [row.nodeId, row])); + if (routed) + for (const key of 'model_type guider guidance_scale guidance_rescale use_original_formulation enabled start stop'.split( + ' ', + )) { + const row = rows.get(roles.guider.id), + field = row.fields[key]; + assert.equal(field.source, 'literal'); + same(field.value, value(roles.guider.node, key)); + assert(!Object.hasOwn(row.omittedFields ?? {}, key)); + } + const imageRow = rows.get(image.id); + assert.equal(imageRow.fields.seed.source, 'literal'); + same(imageRow.fields.seed.value, form.seed); + assert(!Object.hasOwn(imageRow.omittedFields ?? {}, 'seed')); + assert.equal(receipt.appliedAdaptersStatus?.schemaVersion, 1); + assert.equal(receipt.appliedAdaptersStatus.truncated, false); + const application = validateAppliedAdapterSection(rows.get(owner.id).appliedAdapters); + assert.equal(application.status, 'complete'); + assert.equal(application.observation, 'activated'); + same(application.adapters, []); + const read = (key) => { + const row = rows.get(load.id); + assert.equal(row.fields[key].source, 'literal'); + assert(!Object.hasOwn(row.omittedFields ?? {}, key)); + return row.fields[key].value; + }; + assert.equal(read('alpha_channel'), 'ignore'); + const hashes = read('source_hashes'), + widths = read('source_widths'), + heights = read('source_heights'), + modes = read('source_modes'); + for (const values of [hashes, widths, heights, modes]) + assert(Array.isArray(values) && values.length === referenceCount); + if (receipt.summary) { + for (const [key, expected] of Object.entries({ + imageAlphaChannel: 'ignore', + imageSourceHashes: hashes, + imageSourceWidths: widths, + imageSourceHeights: heights, + imageSourceModes: modes, + })) + same(receipt.summary[key], expected); + } + return hashes.map((hash, index) => { + assert.match(hash, /^[a-f0-9]{64}$/u); + for (const size of [widths[index], heights[index]]) assert(Number.isInteger(size) && size > 0 && size <= 32768); + assert.equal(modes[index], 'RGB'); + return { role: `referenceImages[${index}]`, contentHash: 'sha256:bytes:' + hash }; + }); +} + +/** Rehashed observations still need the original canonical graph/model/inputs. + * The legacy form label and null graph-task classification remain explicit; + * neither is substituted for the actual executed model owner. */ +export function observedWorkflowAutoImageProofMatches(plan, provenance) { + try { + assert.equal(plan.source, OBSERVED_WORKFLOW_AUTO_IMAGE_SOURCE); + assert(observedWorkflowAutoResourceId(plan)); + const referenceCount = plan.task === 'edit_image' ? 1 : 2; + const roles = imageConditionedRoles( + provenance.graph.canonicalGraph.nodes.map((node) => [node.key, node]), + referenceCount, + plan.resourceObservation.imageRoute === 'native_state', + ); + const observation = plan.resourceObservation; + const { owner, denoise } = roles; + assert.equal(provenance.models.items.length, 1); + const model = provenance.models.items[0]; + assert.equal(model.repoId, plan.modelRepo); + assert.equal(model.selectedRevision, plan.modelRevision); + assert.equal(model.modelRevision, `${plan.modelRepo}@${plan.modelRevision}`); + same(value(owner.node, 'repo_id'), { source: 'hub', value: plan.modelRepo }); + same(value(owner.node, 'revision'), plan.modelRevision); + same(value(owner.node, 'model_type'), plan.modelType); + same(value(owner.node, 'trust_remote_code'), false); + same(value(owner.node, 'weight_format'), 'native'); + for (const key of [ + 'quant_config', + 'unet', + 'vae', + 'controlnet', + 'lora_list', + 'text_encoders', + 'pipeline_components', + 'image_encoder', + ]) + assert(value(owner.node, key) == null); + const applied = validateAppliedAdapterProof(provenance, { required: true }); + assert.equal(applied.owners.length, 1); + assert.equal(applied.owners[0].nodeKey, owner.id); + same(applied.owners[0].application.adapters, []); + assert.equal(applied.owners[0].application.observation, 'activated'); + for (const control of observation.controls) { + const node = provenance.graph.canonicalGraph.nodes.find((node) => scope(node) === control.scope); + assert(node); + for (const [field, observed] of Object.entries(control.fields)) { + assert(!node.params[field]?.sourceId && !node.params[field]?.sourceKey); + same(value(node, field), observed); + } + } + const form = provenance.template.lockedSettings; + assert.equal(form.mode, plan.task); + assert.equal(form.modelType, observation.formModelType); + assert.equal(form.resourceMode, 'auto'); + assert.equal(form.quantizationMode, 'none'); + // Device and remote-code safety are bound by the immutable owner above; + // they are not part of the portable template's locked-settings projection. + for (const [key, formKey] of [ + ['dtype', 'dtype'], + ...(referenceCount === 2 + ? [ + ['offload_mode', 'offloadMode'], + ['auto_offload', 'autoOffload'], + ] + : []), + ]) + same(value(owner.node, key), form[formKey]); + if (referenceCount === 1) { + same(form.offloadMode, observation.requestedOffloadMode); + same(form.autoOffload, observation.requestedAutoOffload); + } + for (const [key, formKey] of [ + ['width', 'width'], + ['height', 'height'], + ['seed', 'seed'], + ['num_inference_steps', 'steps'], + ['guidance_scale', 'guidanceScale'], + ]) + same(value(denoise.node, key), form[formKey]); + same(value(roles.image.node, 'seed'), form.seed); + same(value(roles.encode.node, 'prompt'), form.prompt); + if (roles.guider) same(value(roles.encode.node, 'negative_prompt'), form.negativePrompt); + else assert.equal(form.negativePrompt, ''); + assert.equal(provenance.inputs.items.length, referenceCount); + for (const [index, input] of provenance.inputs.items.entries()) { + assert.equal(input.role, `referenceImages[${index}]`); + assert.equal(input.path, roles.files[index]); + assert.equal(input.contentHash, observation.references[index].contentHash); + assert(Number.isSafeInteger(input.byteSize) && input.byteSize > 0); + } + assert.equal(provenance.output.items.length, 1); + for (const key of ['width', 'height']) same(provenance.output.items[0][key], observation.geometry[key]); + return true; + } catch { + return false; + } +} diff --git a/scripts/observed-workflow-auto-video-resource.mjs b/scripts/observed-workflow-auto-video-resource.mjs new file mode 100644 index 00000000..3fb4b16c --- /dev/null +++ b/scripts/observed-workflow-auto-video-resource.mjs @@ -0,0 +1,649 @@ +// Maintainer evidence only: a fresh ordinary text-to-video path, never admission. +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { canonicalJsonHash, stableJsonValue } from './canonical-json.mjs'; +import { assertFiniteObservedJson, workerGraphHash } from './observed-workflow-auto-resource.mjs'; + +export const OBSERVED_WORKFLOW_AUTO_VIDEO_SOURCE = 'observed-workflow-auto-video-resource-v1'; +const same = (a, b) => assert.deepEqual(stableJsonValue(a), stableJsonValue(b)); +const scope = (node) => `${node.module}.${node.action}`; +const video = (action) => `modules.DiffusersVideo.${action}`; +const recipeScope = 'modules.DiffusersRuntime.DiffusersExecutionRecipe'; +const quantScope = 'modules.DiffusersRuntime.PipelineQuantizationConfigV2'; +const upScope = 'modules.Spandrel.Upscaler'; +const outScope = 'modules.Video.Export'; +const kinds = [ + quantScope, + recipeScope, + ...['LoadPipeline', 'EncodeInputs', 'Denoise', 'DecodeLatents'].map(video), + upScope, + outScope, +]; + +const normalizationPaths = [ + 'modules/Video/main.py', + 'modules/VideoConditioning/main.py', + 'modules/DiffusersImage/stage_execution.py', + 'modules/DiffusersVideo/stage_execution.py', +]; +function normalizationEvidence(evidence, input, base) { + const keys = + 'schemaVersion sourceContentHash sourceByteSize sourceFrames sourceWidth sourceHeight sourceFps normalizedWidth normalizedHeight normalizedFrames fit descriptors normalizedPixelHash backendSourceFingerprint implementationFiles decoder'.split( + ' ', + ); + const n = Object.fromEntries(keys.map((k) => [k, evidence?.[k]])); + same(n.schemaVersion, 1); + same(n.sourceContentHash, input.contentHash); + same(n.sourceByteSize, input.byteSize); + for (const k of ['sourceFrames', 'sourceWidth', 'sourceHeight']) + assert(Number.isSafeInteger(n[k]) && n[k] > 0 && n[k] <= 32768); + assert(Number.isFinite(n.sourceFps) && n.sourceFps > 0 && n.sourceFps <= 120); + same(n.normalizedWidth, base.width); + same(n.normalizedHeight, base.height); + same(n.normalizedFrames, base.frames); + same(n.fit, 'cover'); + assert(n.normalizedFrames <= 241); + same(n.descriptors.length, base.frames); + for (const d of n.descriptors) { + assert(Array.isArray(d)); + same(d.length, 3); + same(d[0], 'RGB'); + same(d[1], [base.width, base.height]); + assert.match(d[2], /^[a-f0-9]{64}$/u); + } + same( + n.normalizedPixelHash, + createHash('sha256').update('modiff-video-source-pixels-v1\0').update(JSON.stringify(n.descriptors)).digest('hex'), + ); + assert.match(n.backendSourceFingerprint, /^sha256:backend-source-v1:[a-f0-9]{64}$/u); + same(n.implementationFiles.length, 4); + same(n.implementationFiles.map((f) => f.path).sort(), [...normalizationPaths].sort()); + for (const f of n.implementationFiles) { + same(Object.keys(f).sort(), ['path', 'sha256']); + assert.match(f.sha256, /^[a-f0-9]{64}$/u); + } + same(Object.keys(n.decoder).sort(), ['executableSHA256', 'imageioFfmpegVersion', 'imageioVersion']); + assert.match(n.decoder.executableSHA256, /^[a-f0-9]{64}$/u); + for (const k of ['imageioVersion', 'imageioFfmpegVersion']) + assert(typeof n.decoder[k] === 'string' && n.decoder[k].length > 0 && n.decoder[k].length <= 64); + return n; +} +function normalizationSourceMatches(n, source) { + same(n.backendSourceFingerprint, source.fingerprint); + for (const f of n.implementationFiles) { + const rows = source.files.filter((r) => r.path === f.path); + same(rows.length, 1); + same(rows[0].sha256, f.sha256); + } +} +function project(entries, paths, form, inputArtifacts = [], normalization) { + assert.equal(form.resourceMode, 'auto'); + assert(['text_to_video', 'image_to_video', 'reference_to_video', 'video_to_video'].includes(form.mode)); + const remaster = form.mode === 'video_to_video'; + const conditioned = ['image_to_video', 'reference_to_video'].includes(form.mode); + const inputCount = remaster ? 1 : form.mode === 'image_to_video' ? 1 : form.mode === 'reference_to_video' ? 2 : 0; + const imageScope = 'modules.Image.Load'; + const sourceVideoScope = 'modules.Video.Load', + normalizeScope = 'modules.VideoConditioning.Normalize'; + assert.equal(form.modelType, 'LTXVideoPipeline'); + assert.equal(form.dtype, 'bfloat16'); + assert.equal(form.quantizationMode, 'none'); + assert.equal(form.guidanceScale, 1); + assert.equal(form.negativePrompt, ''); + assert.equal(typeof form.autoOffload, 'boolean'); + assert(['none', 'model_cpu', 'group_cpu'].includes(form.offloadMode)); + assert.equal(entries.length, remaster ? 10 : conditioned ? 9 : 8); + assert.equal(paths.length, 1); + const ids = entries.map(([id]) => id); + same([...paths[0]].sort(), [...ids].sort()); + assert.equal(new Set(paths[0]).size, entries.length); + const roles = new Map(entries.map(([id, node]) => [scope(node), { id, node }])); + same( + [...roles.keys()].sort(), + [...kinds, ...(conditioned ? [imageScope] : []), ...(remaster ? [sourceVideoScope, normalizeScope] : [])].sort(), + ); + const literal = (kind, field) => { + const p = roles.get(kind).node.params[field]; + assert(p && !p.sourceId && !p.sourceKey, `${kind}.${field} must be literal`); + return p.value; + }; + const load = video('LoadPipeline'), + enc = video('EncodeInputs'), + den = video('Denoise'), + dec = video('DecodeLatents'); + for (const [kind, fields] of [ + [ + load, + 'model_id revision dtype device auto_offload offload_mode execution_recipe low_cpu_mem_usage pipeline_class execution_profile_id motion_adapter_id motion_adapter_revision ic_lora_id ic_lora_revision ic_lora_weight_name', + ], + [ + enc, + 'pipeline prompt negative_prompt video reference_images guidance_scale max_sequence_length video_contract mode', + ], + [ + den, + 'pipeline conditioning_scale width height num_frames num_inference_steps guidance_scale guidance_scale_2 use_guidance_scale_2 seed attention_kwargs_json video_contract mode frame_rate strength denoise_strength reference_strength scheduler_flow_shift encoded_inputs', + ], + [dec, 'pipeline output_type latents latent_binding'], + [upScope, 'image model_id downscale tile_size tile_overlap device'], + ]) + same(Object.keys(roles.get(kind).node.params).sort(), fields.split(' ').sort()); + const wires = new Set(); + for (const [target, field, producer, port] of [ + [recipeScope, 'quantization_config', quantScope, 'quantization_config'], + [load, 'execution_recipe', recipeScope, 'execution_recipe'], + [enc, 'pipeline', load, 'pipeline'], + [den, 'pipeline', load, 'pipeline'], + [dec, 'pipeline', load, 'pipeline'], + [den, 'encoded_inputs', enc, 'encoded_inputs'], + [dec, 'latents', den, 'latents_out'], + [dec, 'latent_binding', den, 'latent_binding'], + [upScope, 'image', dec, 'video_out'], + [outScope, 'video', upScope, 'output'], + ...(conditioned ? [[enc, 'reference_images', imageScope, 'image']] : []), + ...(remaster + ? [ + [normalizeScope, 'video', sourceVideoScope, 'video'], + [enc, 'video', normalizeScope, 'output'], + ] + : []), + ]) { + const p = roles.get(target).node.params[field]; + assert.equal(p?.sourceId, roles.get(producer).id); + assert.equal(p.sourceKey, port); + assert(!Object.hasOwn(p, 'value')); + assert(paths[0].indexOf(p.sourceId) < paths[0].indexOf(roles.get(target).id)); + wires.add(`${target}:${field}`); + } + for (const [, node] of entries) + for (const [field, p] of Object.entries(node.params)) + if (p.sourceId || p.sourceKey) { + const presentation = + scope(node) === outScope && + field === 'preview' && + p.display === 'ui_video' && + p.sourceKey === 'file' && + !p.sourceId; + assert(wires.has(`${scope(node)}:${field}`) || presentation); + } + const repo = literal(load, 'model_id'); + same(repo, { source: 'hub', value: 'Lightricks/LTX-Video-0.9.8-13B-distilled' }); + const revision = literal(load, 'revision'); + assert.match(revision, /^[a-f0-9]{40}$/u); + assert.equal(literal(load, 'pipeline_class'), 'LTXConditionPipeline'); + assert.equal(literal(load, 'execution_profile_id'), 'ltx-video:direct'); + for (const field of [ + 'motion_adapter_id', + 'motion_adapter_revision', + 'ic_lora_id', + 'ic_lora_revision', + 'ic_lora_weight_name', + ]) + assert.equal(literal(load, field), ''); + const dtype = literal(load, 'dtype'), + device = literal(load, 'device'), + offloadMode = literal(load, 'offload_mode'), + autoOffload = literal(load, 'auto_offload'); + assert.equal(dtype, 'bfloat16'); + assert.equal(device, 'cuda:0'); + assert(['none', 'model_cpu', 'group_cpu'].includes(offloadMode)); + assert.equal(typeof autoOffload, 'boolean'); + assert.equal(literal(load, 'low_cpu_mem_usage'), true); + for (const [field, expected] of Object.entries({ + device, + offload_mode: offloadMode, + attention_backend: 'auto', + device_map: 'none', + max_memory: '{}', + device_map_overrides: '{}', + layerwise_casting: false, + channels_last: false, + regional_compile: false, + denoiser_cache: 'none', + })) + same(literal(recipeScope, field), expected); + const vaeSlicing = literal(recipeScope, 'vae_slicing'), + vaeTiling = literal(recipeScope, 'vae_tiling'); + assert.equal(typeof vaeSlicing, 'boolean'); + assert.equal(typeof vaeTiling, 'boolean'); + assert.equal(literal(quantScope, 'backend'), 'none'); + assert.equal(literal(quantScope, 'dtype'), dtype); + assert.equal(literal(quantScope, 'component_overrides'), '{}'); + for (const field of [...(remaster ? [] : ['video']), ...(conditioned ? [] : ['reference_images'])]) { + const p = roles.get(enc).node.params[field]; + assert(p && !p.sourceId && !p.sourceKey && p.value == null); + } + const contract = literal(enc, 'video_contract'); + same(contract, literal(den, 'video_contract')); + assert.equal(contract.schemaVersion, 1); + assert.equal(contract.library, 'diffusers'); + assert.equal(contract.mediaKind, 'video'); + assert.equal(contract.pipelineClass, 'LTXConditionPipeline'); + for (const action of ['EncodeInputs', 'Denoise', 'DecodeLatents']) { + assert(Array.isArray(contract.actions[action])); + assert(contract.actions[action].includes(form.mode)); + } + assert.equal(literal(enc, 'mode'), form.mode); + assert.equal(literal(den, 'mode'), form.mode); + same(inputArtifacts.length, inputCount); + const inputs = []; + if (remaster) { + same( + Object.keys(roles.get(sourceVideoScope).node.params).filter((k) => k !== 'label'), + ['file'], + ); + same( + Object.keys(roles.get(normalizeScope).node.params).sort(), + 'video width height num_frames fit'.split(' ').sort(), + ); + const path = literal(sourceVideoScope, 'file'); + assert(typeof path === 'string' && path.length > 0 && path.length <= 16384); + if (form.sourceVideo) same(path, form.sourceVideo); + const input = inputArtifacts[0]; + same(input.role, 'sourceVideo'); + same(input.path, path); + assert.match(input.contentHash, /^sha256:bytes:[a-f0-9]{64}$/u); + assert(Number.isSafeInteger(input.byteSize) && input.byteSize > 0); + inputs.push({ role: 'sourceVideo', contentHash: input.contentHash, byteSize: input.byteSize }); + for (const [k, v] of Object.entries({ + width: form.width, + height: form.height, + num_frames: form.numFrames, + fit: 'cover', + })) + same(literal(normalizeScope, k), v); + assert(Number.isFinite(form.strength) && form.strength >= 0 && form.strength <= 1); + } + if (conditioned) { + const fields = Object.keys(roles.get(imageScope).node.params).filter((field) => field !== 'label'); + same(fields.sort(), ['alpha_channel', 'file']); + same(literal(imageScope, 'alpha_channel'), 'ignore'); + const files = literal(imageScope, 'file'); + assert(Array.isArray(files)); + if (form.referenceImages !== undefined) same(files, form.referenceImages); + same(files.length, inputCount); + for (const [index, path] of files.entries()) { + assert(typeof path === 'string' && path.length > 0 && path.length <= 16384); + const role = `referenceImages[${index}]`; + const matches = inputArtifacts.filter((item) => item.role === role); + same(matches.length, 1); + const input = matches[0]; + same(input.path, path); + assert.match(input.contentHash, /^sha256:bytes:[a-f0-9]{64}$/u); + assert(Number.isSafeInteger(input.byteSize) && input.byteSize > 0); + inputs.push({ role, contentHash: input.contentHash, byteSize: input.byteSize }); + } + assert(Number.isFinite(form.strength) && form.strength >= 0 && form.strength <= 1); + } + same(literal(enc, 'prompt'), form.prompt); + same(literal(enc, 'negative_prompt'), form.negativePrompt); + const width = literal(den, 'width'), + height = literal(den, 'height'), + frames = literal(den, 'num_frames'), + fps = literal(den, 'frame_rate'); + for (const n of [width, height, frames, form.steps, form.maxSequenceLength]) assert(Number.isSafeInteger(n) && n > 0); + assert(Number.isFinite(fps) && fps > 0 && fps <= 120); + for (const [field, expected] of Object.entries({ + width: form.width, + height: form.height, + num_frames: form.numFrames, + frame_rate: form.fps, + num_inference_steps: form.steps, + seed: form.seed, + guidance_scale: form.guidanceScale, + })) + same(literal(den, field), expected); + same(literal(enc, 'guidance_scale'), form.guidanceScale); + same(literal(enc, 'max_sequence_length'), form.maxSequenceLength); + assert.equal(literal(den, 'use_guidance_scale_2'), false); + assert.equal(literal(den, 'guidance_scale_2'), 0); + for (const [field, expected] of Object.entries({ + conditioning_scale: form.mode === 'image_to_video' ? form.strength : 1, + attention_kwargs_json: '', + strength: remaster ? 1 : form.strength, + denoise_strength: form.strength, + reference_strength: 1, + scheduler_flow_shift: 0, + })) + same(literal(den, field), expected); + assert.equal(literal(dec, 'output_type'), 'pil'); + assert.equal(literal(outScope, 'fps'), fps); + const upscaler = literal(upScope, 'model_id'); + same(upscaler, { + source: 'hub', + value: 'nateraw/real-esrgan/RealESRGAN_x2plus.pth', + revision: '42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094', + sha256: '49fafd45f8fd7aa8d31ab2a22d14d91b536c34494a5cfe31eb5d89c2fa266abb', + byteSize: 67061725, + license: 'bsd-3-clause', + }); + for (const [field, expected] of Object.entries({ downscale: 1, tile_size: 256, tile_overlap: 32, device })) + same(literal(upScope, field), expected); + const plan = { + source: OBSERVED_WORKFLOW_AUTO_VIDEO_SOURCE, + modelType: 'LTXConditionPipeline', + pipelineClass: 'LTXConditionPipeline', + modelRepo: repo.value, + modelRevision: revision, + task: form.mode, + dtype, + device, + offloadMode, + autoOffload, + resourceMode: 'auto', + resolvedResourceMode: 'auto', + quantizationMode: 'none', + quantizedComponents: [], + requestedOffloadMode: form.offloadMode, + requestedAutoOffload: form.autoOffload, + resourceObservation: { + base: { width, height, frames, fps }, + delivery: { width: width * 2, height: height * 2, frames, fps }, + requestedMaxSequenceLength: form.maxSequenceLength, + maxSequenceLength: Math.min(form.maxSequenceLength, 128), + vaeSlicing, + vaeTiling, + upscaler, + ...(conditioned ? { inputs, conditioningStrength: form.strength } : {}), + ...(remaster + ? { + inputs, + conditioningStrength: 1, + denoiseStrength: form.strength, + unusedDenoiserStrength: 1, + normalization: normalizationEvidence(normalization, inputs[0], { width, height, frames, fps }), + } + : {}), + }, + }; + return { plan, roles, literal }; +} + +export function observedWorkflowAutoVideoResourceId(plan) { + try { + assert.equal(plan?.source, OBSERVED_WORKFLOW_AUTO_VIDEO_SOURCE); + assertFiniteObservedJson(plan); + assert(Buffer.byteLength(JSON.stringify(plan)) <= 65536); + same( + Object.keys(plan).sort(), + 'source modelType pipelineClass modelRepo modelRevision task dtype device offloadMode autoOffload resourceMode resolvedResourceMode quantizationMode quantizedComponents requestedOffloadMode requestedAutoOffload resourceObservation' + .split(' ') + .sort(), + ); + for (const [field, expected] of Object.entries({ + modelType: 'LTXConditionPipeline', + pipelineClass: 'LTXConditionPipeline', + modelRepo: 'Lightricks/LTX-Video-0.9.8-13B-distilled', + dtype: 'bfloat16', + device: 'cuda:0', + resourceMode: 'auto', + resolvedResourceMode: 'auto', + quantizationMode: 'none', + })) + same(plan[field], expected); + assert(['text_to_video', 'image_to_video', 'reference_to_video', 'video_to_video'].includes(plan.task)); + assert.match(plan.modelRevision, /^[a-f0-9]{40}$/u); + same(plan.quantizedComponents, []); + for (const field of ['offloadMode', 'requestedOffloadMode']) + assert(['none', 'model_cpu', 'group_cpu'].includes(plan[field])); + for (const field of ['autoOffload', 'requestedAutoOffload']) assert.equal(typeof plan[field], 'boolean'); + const o = plan.resourceObservation; + same( + Object.keys(o).sort(), + ( + 'base delivery requestedMaxSequenceLength maxSequenceLength vaeSlicing vaeTiling upscaler' + + (plan.task === 'text_to_video' ? '' : ' inputs conditioningStrength') + + (plan.task === 'video_to_video' ? ' denoiseStrength unusedDenoiserStrength normalization' : '') + ) + .split(' ') + .sort(), + ); + if (plan.task !== 'text_to_video') { + same(o.inputs.length, ['image_to_video', 'video_to_video'].includes(plan.task) ? 1 : 2); + assert(Number.isFinite(o.conditioningStrength) && o.conditioningStrength >= 0 && o.conditioningStrength <= 1); + for (const [index, input] of o.inputs.entries()) { + same(Object.keys(input).sort(), ['byteSize', 'contentHash', 'role']); + same(input.role, plan.task === 'video_to_video' ? 'sourceVideo' : `referenceImages[${index}]`); + assert.match(input.contentHash, /^sha256:bytes:[a-f0-9]{64}$/u); + assert(Number.isSafeInteger(input.byteSize) && input.byteSize > 0); + } + } + if (plan.task === 'video_to_video') { + same(o.conditioningStrength, 1); + same(o.unusedDenoiserStrength, 1); + assert(Number.isFinite(o.denoiseStrength) && o.denoiseStrength >= 0 && o.denoiseStrength <= 1); + same(o.normalization, normalizationEvidence(o.normalization, o.inputs[0], o.base)); + } + assert(Number.isSafeInteger(o.requestedMaxSequenceLength) && o.requestedMaxSequenceLength > 0); + assert.equal(o.maxSequenceLength, Math.min(o.requestedMaxSequenceLength, 128)); + for (const field of ['vaeSlicing', 'vaeTiling']) assert.equal(typeof o[field], 'boolean'); + for (const geometry of [o.base, o.delivery]) { + same(Object.keys(geometry).sort(), ['fps', 'frames', 'height', 'width']); + for (const field of ['width', 'height', 'frames']) + assert(Number.isSafeInteger(geometry[field]) && geometry[field] > 0 && geometry[field] <= 32768); + assert(Number.isFinite(geometry.fps) && geometry.fps > 0 && geometry.fps <= 120); + } + same(o.delivery, { width: o.base.width * 2, height: o.base.height * 2, frames: o.base.frames, fps: o.base.fps }); + same(o.upscaler, { + source: 'hub', + value: 'nateraw/real-esrgan/RealESRGAN_x2plus.pth', + revision: '42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094', + sha256: '49fafd45f8fd7aa8d31ab2a22d14d91b536c34494a5cfe31eb5d89c2fa266abb', + byteSize: 67061725, + license: 'bsd-3-clause', + }); + return `observed-workflow-auto-video-v1:${canonicalJsonHash(plan)}`; + } catch { + return null; + } +} + +export function observedWorkflowAutoVideoPlan( + apiGraph, + { + executionReceipt: task, + executedOutput: output, + taskId, + modelIdentities, + inputArtifacts = [], + backendSource, + videoNormalizationEvidence, + } = {}, +) { + try { + const hints = apiGraph.runtimeHints, + snapshot = hints.workflowSnapshot, + form = snapshot.studioForm; + assert.equal(hints.resourceMode, 'auto'); + assert.equal(form.trustRemoteCode, false); + assert.equal(task.status, 'completed'); + assert.equal(task.attempt_index, 0); + assert.equal(output.attemptIndex, 0); + assert.equal(task.resourceCandidateId, null); + assert.equal(output.taskId, task.task_id); + if (taskId !== undefined) assert.equal(taskId, task.task_id); + assert(typeof task.task_id === 'string' && task.task_id); + for (const [hint, taskKey, outputKey] of [ + ['sid', 'sid', 'sid'], + ['workflowTabId', 'workflow_tab_id', 'workflowTabId'], + ['clientRunId', 'client_run_id', 'clientRunId'], + ['runInputHash', 'run_input_hash', 'runInputHash'], + ]) { + const v = hint === 'sid' ? apiGraph.sid : hints[hint]; + assert(typeof v === 'string' && v); + assert.equal(task[taskKey], v); + assert.equal(output[outputKey], v); + } + same(output.apiGraphSnapshot, apiGraph); + same(task.workflow_snapshot, snapshot); + same(output.formSnapshot, form); + assert(!Object.hasOwn(apiGraph, 'loops')); + assert.equal(hints.workflowAutoPlan.schemaVersion, 1); + assert.equal(hints.workflowAutoPlan.graphHash, workerGraphHash(apiGraph)); + const { plan, roles, literal } = project( + Object.entries(apiGraph.nodes), + apiGraph.paths, + form, + inputArtifacts, + videoNormalizationEvidence, + ); + if (form.mode === 'video_to_video') + normalizationSourceMatches(plan.resourceObservation.normalization, backendSource); + assert.equal(output.nodeId, roles.get(outScope).id); + const prep = task.runtimePreparation; + assert.equal(prep.resourceMode, 'auto'); + assert.equal(prep.performed, false); + assert.equal(prep.residentRecipeReusable, false); + assert.equal(prep.cleanup, null); + const auto = prep.workflowAuto; + assert.equal(auto.strategy, 'dependency_order_retained_owners'); + same(auto.schedule, null); + same(auto.cachePreparation, null); + for (const field of ['reusedOwnerIds', 'preparedDataNodes', 'appliedUpdates', 'releases']) same(auto[field], []); + const receipt = output.resolvedExecutionInputs; + assert.equal(receipt.schemaVersion, 1); + assert.equal(receipt.source, 'backend-execution'); + assert.equal(receipt.taskId, task.task_id); + assert.equal(receipt.attemptIndex, 0); + assert.equal(receipt.nodeId, output.nodeId); + assert.equal(receipt.truncated, false); + same(receipt.uncapturedNodeIds, []); + same(receipt.graphTasks, [ + { loaderId: roles.get(video('LoadPipeline')).id, pipelineClass: 'LTXConditionPipeline', task: form.mode }, + ]); + const rows = new Map(receipt.nodes.map((row) => [row.nodeId, row])); + assert.equal(rows.size, Object.keys(apiGraph.nodes).length); + assert.equal(receipt.nodes.length, rows.size); + for (const [id, node] of Object.entries(apiGraph.nodes)) { + assert.equal(rows.get(id).module, node.module); + assert.equal(rows.get(id).action, node.action); + same(rows.get(id).omittedFields, {}); + } + const consumed = (kind, field, expected) => { + const f = rows.get(roles.get(kind).id).fields[field]; + assert.equal(f.source, 'literal'); + same(f.value, expected); + }; + for (const [kind, fields] of [ + [ + video('LoadPipeline'), + ['model_id', 'revision', 'dtype', 'device', 'auto_offload', 'offload_mode', 'pipeline_class'], + ], + [recipeScope, ['offload_mode', 'device', 'attention_backend', 'vae_slicing', 'vae_tiling']], + [quantScope, ['dtype']], + [video('EncodeInputs'), ['prompt', 'negative_prompt', 'guidance_scale', 'max_sequence_length']], + [ + video('Denoise'), + ['width', 'height', 'num_frames', 'frame_rate', 'num_inference_steps', 'guidance_scale', 'seed'], + ], + [video('DecodeLatents'), ['output_type']], + [upScope, ['model_id', 'device']], + [outScope, ['fps']], + ]) + for (const field of fields) { + let expected = literal(kind, field); + if (field === 'model_id') expected = expected.value; + // The native stage normalizes the empty, inactive negative prompt to + // null at guidance one. Keep the authored blank and actual null distinct. + if (kind === video('EncodeInputs') && field === 'negative_prompt') expected = null; + // LTX's declared 128-token adapter bound normalizes the shared 512 + // form default before both native stage captures. + if (kind === video('EncodeInputs') && field === 'max_sequence_length') + expected = plan.resourceObservation.maxSequenceLength; + consumed(kind, field, expected); + } + for (const kind of [video('EncodeInputs'), video('Denoise'), video('DecodeLatents')]) + consumed(kind, 'executed_task', form.mode); + if (form.mode === 'video_to_video') { + consumed(video('Denoise'), 'conditioning_strength', 1); + consumed(video('Denoise'), 'denoise_strength', form.strength); + for (const [k, v] of Object.entries({ width: form.width, height: form.height, num_frames: form.numFrames })) + consumed('modules.VideoConditioning.Normalize', k, v); + const fields = rows.get(roles.get(video('EncodeInputs')).id).fields; + for (const [k, v] of Object.entries({ + video_source_sha256: plan.resourceObservation.normalization.normalizedPixelHash, + video_source_frames: form.numFrames, + })) + same(fields[k], { + source: 'connected', + value: v, + sourceNodeId: roles.get('modules.VideoConditioning.Normalize').id, + sourcePortId: 'output', + }); + } else if (form.mode !== 'text_to_video') { + consumed(video('Denoise'), 'conditioning_strength', form.strength); + consumed('modules.Image.Load', 'alpha_channel', 'ignore'); + consumed( + 'modules.Image.Load', + 'source_hashes', + plan.resourceObservation.inputs.map((i) => i.contentHash.slice(13)), + ); + } + consumed(video('Denoise'), 'max_sequence_length', plan.resourceObservation.maxSequenceLength); + for (const kind of [video('LoadPipeline'), recipeScope]) + for (const field of kind === recipeScope + ? ['offload_mode', 'device', 'attention_backend', 'vae_slicing', 'vae_tiling'] + : ['revision', 'dtype', 'device', 'auto_offload', 'offload_mode', 'pipeline_class']) + same(auto.resolvedFields[roles.get(kind).id][field], literal(kind, field)); + assert.equal(output.mediaItems.length, 1); + const media = output.mediaItems[0]; + assert.equal(media.displayType, 'video'); + for (const [field, expected] of Object.entries({ + width: plan.resourceObservation.delivery.width, + height: plan.resourceObservation.delivery.height, + frame_count: form.numFrames, + fps: form.fps, + })) + same(media.mediaMetadata[field], expected); + assert.equal(modelIdentities.length, 2); + for (const [repo, rev] of [ + [plan.modelRepo, plan.modelRevision], + ['nateraw/real-esrgan', plan.resourceObservation.upscaler.revision], + ]) { + const matches = modelIdentities.filter((m) => m.repoId === repo); + assert.equal(matches.length, 1); + assert.equal(matches[0].selectedRevision, rev); + assert.equal(matches[0].modelRevision, repo + '@' + rev); + assert(matches[0].fingerprint); + } + assert(observedWorkflowAutoVideoResourceId(plan)); + return stableJsonValue(plan); + } catch { + return null; + } +} + +export function observedWorkflowAutoVideoProofMatches(plan, provenance) { + try { + assert(observedWorkflowAutoVideoResourceId(plan)); + const graph = provenance.graph.canonicalGraph; + const projected = project( + graph.nodes.map((n) => [n.key, n]), + graph.paths, + provenance.template.lockedSettings, + provenance.inputs.items ?? [], + plan.resourceObservation.normalization, + ).plan; + same(plan, projected); + if (plan.task === 'video_to_video') + normalizationSourceMatches(plan.resourceObservation.normalization, provenance.runtime.backendSource); + assert.equal(provenance.inputs.count, plan.resourceObservation.inputs?.length ?? 0); + assert.equal(provenance.models.items.length, 2); + for (const [repo, rev] of [ + [plan.modelRepo, plan.modelRevision], + ['nateraw/real-esrgan', plan.resourceObservation.upscaler.revision], + ]) { + const matches = provenance.models.items.filter((m) => m.repoId === repo); + assert.equal(matches.length, 1); + assert.equal(matches[0].selectedRevision, rev); + } + assert.equal(provenance.output.items.length, 1); + const output = provenance.output.items[0]; + same(output.width, plan.resourceObservation.delivery.width); + same(output.height, plan.resourceObservation.delivery.height); + same(output.frames, plan.resourceObservation.delivery.frames); + return true; + } catch { + return false; + } +} diff --git a/scripts/operation-authoring-headless.test.mjs b/scripts/operation-authoring-headless.test.mjs new file mode 100644 index 00000000..4a783016 --- /dev/null +++ b/scripts/operation-authoring-headless.test.mjs @@ -0,0 +1,45 @@ +import assert from 'node:assert/strict'; +import { test } from 'node:test'; +import { mkdtempSync, realpathSync, rmSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { createServer } from 'vite'; + +const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); + +test('operation planners import without window or localStorage', async () => { + assert.equal(typeof globalThis.window, 'undefined'); + assert.equal(typeof globalThis.localStorage, 'undefined'); + const tempRoot = realpathSync(tmpdir()); + const cacheDir = mkdtempSync(path.join(tempRoot, 'modiff-operation-headless-')); + let server; + try { + server = await createServer({ + root, + configFile: false, + cacheDir, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + for (const [module, name] of [ + ['/src/workflow/operationAuthoring.ts', 'planOperationChange'], + ['/src/workflow/operationBlockChange.ts', 'planBlockOperationChange'], + ['/src/workflow/encodingNodeConnection.ts', 'planEncodingConnection'], + ['/src/workflow/mediaAttachment.ts', 'planMediaAttachment'], + ]) { + const loaded = await server.ssrLoadModule(module); + assert.equal(typeof loaded[name], 'function'); + } + assert.equal(typeof globalThis.window, 'undefined'); + assert.equal(typeof globalThis.localStorage, 'undefined'); + } finally { + await server?.close(); + const resolvedCacheDir = realpathSync(cacheDir); + assert.equal(path.dirname(resolvedCacheDir), tempRoot, 'Cleanup must remain inside the temporary directory.'); + assert.ok(path.basename(resolvedCacheDir).startsWith('modiff-operation-headless-')); + rmSync(resolvedCacheDir, { recursive: true, force: true }); + } +}); diff --git a/scripts/operation-authoring-recipes.test.mjs b/scripts/operation-authoring-recipes.test.mjs new file mode 100644 index 00000000..fe945d2d --- /dev/null +++ b/scripts/operation-authoring-recipes.test.mjs @@ -0,0 +1,540 @@ +import assert from 'node:assert/strict'; +import { execFileSync } from 'node:child_process'; +import path from 'node:path'; +import { after, before, test } from 'node:test'; +import { createServer } from 'vite'; + +let server, requests, contracts, fixture, hashes; +const selection = { + pipelineClass: 'ZImageModularPipeline', + task: 'text_to_image', + executionProfileId: 'z-image:modular', + authoringRecipeId: 'retained-z-image-text-to-image:v1', + bindingSpec: { modelType: 'ZImageModularPipeline', mode: 'modular_text_to_image' }, +}; +const auxiliarySelections = [ + { + id: 'qwen_control_image_layout', + selection: { + pipelineClass: 'QwenImageModularPipeline', + task: 'control_image', + executionProfileId: 'qwen-image:modular', + authoringRecipeId: 'generic-native-image:v1', + bindingSpec: { modelType: 'QwenImageModularPipeline', mode: 'control_image' }, + }, + }, + ...['control_image', 'control_edit_image', 'control_inpaint'].map((mode) => ({ + id: `sdxl-authoring-${mode}`, + selection: { + pipelineClass: 'StableDiffusionXLModularPipeline', + task: mode, + executionProfileId: 'sdxl-base:modular', + authoringRecipeId: 'generic-native-image:v1', + bindingSpec: { modelType: 'StableDiffusionXLModularPipeline', mode }, + }, + })), +]; +const qwenImage21Models = [ + { + pipelineClass: 'QwenImage21Pipeline', + executionProfileId: 'qwen-image-21:direct', + repository: 'Qwen/Qwen-Image-2.1', + revision: '790c92633540aa0cb11d9abf19eb46d861714758', + }, + { + pipelineClass: 'QwenImage21TurboPipeline', + executionProfileId: 'qwen-image-21-turbo:direct', + repository: 'Qwen/Qwen-Image-2.1-Turbo', + revision: 'fc13ba1986fcb905854dc8de2f52eee395f49b5b', + }, +]; +const qwenImage21Tasks = ['text_to_image', 'edit_image', 'multi_image_reference_edit']; +const qwenImage21Selections = qwenImage21Models.flatMap(({ pipelineClass, executionProfileId }) => + qwenImage21Tasks.map((task) => ({ + id: `${pipelineClass}:${task}`, + selection: { pipelineClass, task, executionProfileId }, + })), +); +before(async () => { + globalThis.window = { location: { origin: 'http://127.0.0.1:5191' } }; + server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + requests = await server.ssrLoadModule('/src/workflow/operationStarterRequest.ts'); + hashes = await server.ssrLoadModule('/src/studio/stableHash.ts'); + const operations = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + const backend = path.resolve(process.env.MODIFF_BACKEND_DIR || '../MoDiff'); + const python = process.env.MODIFF_BACKEND_PYTHON || path.join(backend, '.venv', 'Scripts/python.exe'); + fixture = JSON.parse( + execFileSync(python, [path.resolve('scripts/template-operation-fixtures.py'), '--mock-cuda'], { + cwd: backend, + encoding: 'utf8', + maxBuffer: 64 * 1024 * 1024, + input: JSON.stringify([ + { id: 'z_image_quick_concept', selection }, + ...auxiliarySelections, + ...qwenImage21Selections, + ]), + }), + ); + contracts = operations.parseOperationContracts( + fixture.publicPayload.operationContracts, + fixture.publicPayload.operationContractSchemaVersion, + ); +}); + +test('the generic Qwen Image 2.1 workflows discover and switch to the exact Turbo model', async (t) => { + const { parsePipelineSupport } = await server.ssrLoadModule('/src/workflow/operationCatalog.ts'); + const { parseStudioModelCapabilities } = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); + const { parseWorkflowModelDescriptors, workflowChoices } = await server.ssrLoadModule( + '/src/workflow/workflowChoices.ts', + ); + const { createWorkflowDraft } = await server.ssrLoadModule('/src/workflow/workflowDraft.ts'); + const { useFlowStore } = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + const { buildWorkflowPackage, parseWorkflowPackage } = await server.ssrLoadModule('/src/studio/workflowPackage.ts'); + const { DEFAULT_STUDIO_FORM } = await server.ssrLoadModule('/src/studio/modelProfiles.ts'); + const { operationFieldValue, planOperationChange } = await server.ssrLoadModule( + '/src/workflow/operationAuthoring.ts', + ); + const { groupNewOperationGraph, unpackVisualOperationGroups } = await server.ssrLoadModule( + '/src/workflow/visualOperationGroups.ts', + ); + const { publicPayload, recipes, registry } = fixture; + const support = parsePipelineSupport( + publicPayload.pipelineSupport, + publicPayload.pipelineSupportSchemaVersion, + contracts, + ); + const { capabilities } = parseStudioModelCapabilities(publicPayload); + const descriptors = parseWorkflowModelDescriptors(publicPayload, support, capabilities); + const choices = workflowChoices(support, capabilities, [], [], null, descriptors); + const [, turboModel] = qwenImage21Models; + const turboDescriptor = descriptors.find(({ profileId }) => profileId === turboModel.executionProfileId); + const artifact = turboDescriptor?.inventory?.nativeSelection; + assert.equal(artifact?.repo, turboModel.repository); + assert.equal(artifact?.revision, turboModel.revision); + assert.equal(artifact.downloadFiles.length, 18); + assert.ok(artifact.downloadFiles.includes('model_index.json')); + assert.ok(artifact.downloadFiles.includes('LICENSE')); + assert.equal(turboDescriptor.supportsLora, false); + const leaf = (draft, action) => + unpackVisualOperationGroups(draft).graph.nodes.find((node) => node.data.action === action); + const exportGraph = (sourceGraph) => + useFlowStore.getState().exportGraph('qwen-turbo-contract', undefined, { sourceGraph, randomizeSeeds: false }); + const checkOwner = (owner, model) => { + assert.equal(owner.data.module, 'modules.DiffusersImage'); + assert.deepEqual(operationFieldValue(owner.data.params.model_id), { source: 'hub', value: model.repository }); + assert.equal(operationFieldValue(owner.data.params.revision), model.revision); + }; + + for (const task of qwenImage21Tasks) { + await t.test(task, () => { + const starters = qwenImage21Models.map((model) => { + const choice = choices.find( + ({ profileId, task: mode }) => profileId === model.executionProfileId && mode === task, + ); + assert.equal(choice?.repo, model.repository); + const row = recipes.find(({ id }) => id === `${model.pipelineClass}:${task}`); + return requests.parseOperationStarter(row.starter, model.pipelineClass, task, contracts, { + executionProfileId: model.executionProfileId, + }); + }); + const [baseModel] = qwenImage21Models; + const [baseStarter, turboStarter] = starters; + const base = createWorkflowDraft(baseStarter, registry).graph; + const owner = leaf(base, 'LoadPipeline'); + checkOwner(owner, baseModel); + const action = task === 'text_to_image' ? 'Generate' : 'Edit'; + const freshTurbo = leaf(createWorkflowDraft(turboStarter, registry).graph, action); + assert.equal(freshTurbo.data.module, 'modules.DiffusersImage'); + const turboFields = freshTurbo.data.params; + assert.equal(operationFieldValue(turboFields.num_inference_steps), 8); + assert.equal(operationFieldValue(turboFields.guidance_scale), 1); + assert.equal(turboFields.num_inference_steps.hidden, true); + assert.equal(turboFields.negative_prompt?.hidden, true); + assert.equal(turboFields.sigmas?.hidden, true); + assert.equal(turboFields.guidance_scale.hidden, true); + + const request = 'Painted porcelain on an oak bench, photographed under soft window light.'; + const source = unpackVisualOperationGroups(base).graph; + const generation = source.nodes.find((node) => node.data.action === action); + generation.data.params.prompt.value = request; + generation.data.params.guidance_scale.value = 5; + generation.data.params.negative_prompt.value = 'harsh shadows'; + generation.data.params.num_inference_steps.value = 22; + const fileInputs = task === 'edit_image' ? ['first.png'] : ['first.png', 'second.png']; + if (task !== 'text_to_image') leaf(source, 'Load').data.params.file.value = fileInputs; + const authored = groupNewOperationGraph(source); + const turbo = planOperationChange(authored, leaf(authored, 'LoadPipeline').id, turboStarter, { + replaceModel: true, + baseline: baseStarter, + }).graph; + const turboOwner = leaf(turbo, 'LoadPipeline'); + const turboGeneration = leaf(turbo, action); + checkOwner(turboOwner, turboModel); + assert.equal(operationFieldValue(turboGeneration.data.params.prompt), request); + assert.equal(operationFieldValue(turboGeneration.data.params.num_inference_steps), 8); + assert.equal(operationFieldValue(turboGeneration.data.params.guidance_scale), 1); + assert.equal(operationFieldValue(turboGeneration.data.params.negative_prompt), ''); + if (task !== 'text_to_image') + assert.deepEqual(operationFieldValue(leaf(turbo, 'Load').data.params.file), fileInputs); + + const savedGraph = { ...turbo, viewport: { x: 0, y: 0, zoom: 1 } }; + const apiGraph = exportGraph(savedGraph); + const saved = buildWorkflowPackage({ + apiGraph, + form: { ...DEFAULT_STUDIO_FORM, mode: task }, + graph: savedGraph, + workflowModelType: turboModel.pipelineClass, + }); + const imported = parseWorkflowPackage(JSON.parse(JSON.stringify(saved))); + assert.ok(imported); + assert.deepEqual(exportGraph(imported.snapshot), apiGraph); + + const restored = planOperationChange(turbo, turboOwner.id, baseStarter, { + replaceModel: true, + baseline: turboStarter, + }).graph; + checkOwner(leaf(restored, 'LoadPipeline'), baseModel); + assert.equal(operationFieldValue(leaf(restored, action).data.params.prompt), request); + }); + } +}); + +test('protects auxiliary model identity while keeping declared Qwen and SDXL Control bindings', async (t) => { + const { STUDIO_TEMPLATES } = await server.ssrLoadModule('/src/studio/templates.ts'); + const { DEFAULT_STUDIO_FORM } = await server.ssrLoadModule('/src/studio/modelProfiles.ts'); + const { getTemplateLockedSettings } = await server.ssrLoadModule('/src/studio/templateExactness.ts'); + const { createTemplateOperationGraph } = await server.ssrLoadModule('/src/studio/templateOperationWorkflow.ts'); + const { resolveStudioExecutionSpecValues } = await server.ssrLoadModule('/src/studio/executionSpecValues.ts'); + const groups = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + for (const item of auxiliarySelections) + await t.test(item.id, () => { + const row = fixture.recipes.find((row) => row.id === item.id); + const template = structuredClone(STUDIO_TEMPLATES.find((item) => item.id === 'qwen_control_image_layout')); + template.id = item.id; + template.modelType = item.selection.bindingSpec.modelType; + template.mode = item.selection.bindingSpec.mode; + template.executionSelection = item.selection; + delete template.modelArtifact; + delete template.example.modelRevision; + if (item.id !== 'qwen_control_image_layout') delete template.example; + const device = row.starter.nodes.find((node) => node.operation.decomposition === 'loader').node.params.device; + const form = { + ...DEFAULT_STUDIO_FORM, + ...(item.id === 'qwen_control_image_layout' ? getTemplateLockedSettings(template) : {}), + modelType: template.modelType, + mode: template.mode, + device: device.value ?? device.default, + autoOffload: false, + offloadMode: 'none', + prompt: 'Creative text must never replace a model identity', + negativePrompt: 'Creative exclusions must never replace a variant', + controlImage: 'control.png', + referenceImages: ['source.png'], + maskImage: 'mask.png', + }; + const materialize = (raw) => { + const starter = requests.parseOperationStarter( + raw, + item.selection.pipelineClass, + item.selection.task, + contracts, + item.selection, + ); + return groups.unpackVisualOperationGroups( + createTemplateOperationGraph(template, form, starter, fixture.registry, row.spec, row.capability), + ).graph; + }; + const valid = materialize(row.starter); + const owner = valid.nodes.find((node) => node.data.action === 'ModelsLoader'); + const auxiliary = valid.nodes.find((node) => node.data.action === 'AutoModelLoader'); + const expected = resolveStudioExecutionSpecValues(form, row.spec, row.capability, { + defaultModelRevision: owner.data.params.revision.value, + }); + for (const [, field, source] of row.spec.bindings.filter( + ([role, field]) => + role === 'controlnetModel' && ['model_type', 'model_id', 'variant', 'revision'].includes(field), + )) { + const actual = auxiliary.data.params[field].value; + assert.deepEqual( + field === 'model_id' && typeof expected[source] === 'string' ? actual.value : actual, + expected[source], + ); + } + const rehash = (raw) => { + const { contentHash: _hash, ...semantic } = raw.authoring; + raw.authoring.contentHash = `studio-authoring-v1-${hashes.hashString(hashes.stableStringify(semantic))}`; + return raw; + }; + const baseRevisionSource = row.spec.bindings.find( + ([role, field]) => role === 'controlnetModel' && field === 'revision', + )[2]; + for (const [field, source] of [ + ['revision', 'prompt'], + ['variant', 'negativePrompt'], + ['trust_remote_code', 'true'], + ['revision', baseRevisionSource === 'revision' ? 'controlnetRevision' : 'revision'], + ]) { + const changed = structuredClone(row.starter); + changed.authoring.bindings.find(([role, name]) => role === 'controlnetModel' && name === field)[2] = source; + assert.throws(() => materialize(rehash(changed)), /identity/, `${field} must reject ${source}`); + } + const literal = structuredClone(row.starter); + literal.authoring.bindings = literal.authoring.bindings.filter( + ([role, field]) => role !== 'controlnetModel' || field !== 'variant', + ); + literal.authoring.initialValues.push(['controlnetModel', 'variant', 'fp16']); + assert.throws(() => materialize(rehash(literal)), /identity/); + }); +}); +after(async () => server?.close()); + +test('accepts the exact backend-declared fresh recipe and preserves its provenance', () => { + const raw = fixture.recipes[0].starter; + const parsed = requests.parseOperationStarter(raw, selection.pipelineClass, selection.task, contracts, selection); + assert.deepEqual(parsed.authoring, raw.authoring); +}); + +test('rejects unsolicited, mismatched, mutated and unbounded recipe declarations', () => { + const raw = fixture.recipes[0].starter; + assert.throws(() => requests.parseOperationStarter(raw, selection.pipelineClass, selection.task, contracts)); + for (const [index, change] of [ + (recipe) => { + recipe.id = 'other:v1'; + }, + (recipe) => { + recipe.executionProfileIds = ['wrong:profile']; + }, + (recipe) => { + recipe.roles[0][0] = 'invented'; + }, + (recipe) => { + recipe.roles[0][2] = Infinity; + }, + (recipe) => { + recipe.bindings[0][2] = 'arbitraryExpression'; + }, + (recipe) => { + recipe.initialValues[0][2] = { executable: 'code' }; + }, + (recipe) => { + recipe.initialValues.push(recipe.initialValues[0]); + }, + (recipe) => { + recipe.extra = true; + }, + (recipe) => { + recipe.contentHash = 'studio-authoring-v1-deadbeef'; + }, + ].entries()) { + const changed = structuredClone(raw); + change(changed.authoring); + // Structural validation must reject invalid data even when its sender + // recomputes this provenance checksum. It is not a trust signature. + if (index < 8) { + const { contentHash: _hash, ...semantic } = changed.authoring; + changed.authoring.contentHash = `studio-authoring-v1-${hashes.hashString(hashes.stableStringify(semantic))}`; + } + assert.throws(() => + requests.parseOperationStarter(changed, selection.pipelineClass, selection.task, contracts, selection), + ); + } + const absent = structuredClone(raw); + delete absent.authoring; + assert.throws(() => + requests.parseOperationStarter(absent, selection.pipelineClass, selection.task, contracts, selection), + ); + const wrongWorkflow = structuredClone(raw); + wrongWorkflow.workflowId = 'another_workflow'; + assert.throws(() => + requests.parseOperationStarter(wrongWorkflow, selection.pipelineClass, selection.task, contracts, selection), + ); +}); + +test('materializes backend bindings independently of template identity and rejects stale base specifications', async () => { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, value), + removeItem: (key) => storage.delete(key), + }; + globalThis.window.localStorage = globalThis.localStorage; + globalThis.window.dispatchEvent = () => true; + const { STUDIO_TEMPLATES } = await server.ssrLoadModule('/src/studio/templates.ts'); + const { DEFAULT_STUDIO_FORM } = await server.ssrLoadModule('/src/studio/modelProfiles.ts'); + const { createTemplateOperationGraph } = await server.ssrLoadModule('/src/studio/templateOperationWorkflow.ts'); + const groups = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const template = structuredClone(STUDIO_TEMPLATES.find((item) => item.id === 'z_image_quick_concept')); + template.id = 'future-template-identity'; + template.executionSelection = { ...template.executionSelection, ...selection }; + const row = fixture.recipes[0]; + const starter = requests.parseOperationStarter( + row.starter, + selection.pipelineClass, + selection.task, + contracts, + selection, + ); + const form = { + ...DEFAULT_STUDIO_FORM, + modelType: selection.bindingSpec.modelType, + mode: selection.bindingSpec.mode, + device: 'cpu', + guidanceScale: 5, + }; + const graph = createTemplateOperationGraph(template, form, starter, fixture.registry, row.spec, row.capability); + const flat = groups.unpackVisualOperationGroups(graph).graph; + const owner = flat.nodes.find((node) => node.data.action === 'ModelsLoader'); + const guider = flat.nodes.find((node) => node.data.action === 'Guider'); + assert.equal(owner.data.params.attention_backend.value, 'auto'); + assert.equal(guider.data.params.guidance_scale.value, 5); + assert.equal(guider.data.params.use_original_formulation.value, true); + assert.throws( + () => + createTemplateOperationGraph( + template, + form, + starter, + fixture.registry, + { ...row.spec, contentHash: 'studio-spec-v1-deadbeef' }, + row.capability, + ), + /stale/, + ); + const corrupt = structuredClone(starter); + corrupt.authoring.initialValues.push(['guider', 'guidance_scale', 1000]); + assert.throws( + () => createTemplateOperationGraph(template, form, corrupt, fixture.registry, row.spec, row.capability), + /incompatible/, + ); + for (const [role, field, source] of [ + ['models', 'revision', 'prompt'], + ['guider', 'enabled', 'guidanceScale'], + ['guider', 'guider', 'prompt'], + ['prompt', 'prompt', 'guidanceScale'], + ['guider', 'guider_out', 'prompt'], + ['prompt', '__proto__', 'prompt'], + ['prompt', 'constructor', 'prompt'], + ]) { + const changed = structuredClone(row.starter); + changed.authoring.initialValues = changed.authoring.initialValues.filter(([r, f]) => r !== role || f !== field); + changed.authoring.bindings = changed.authoring.bindings.filter(([r, f]) => r !== role || f !== field); + changed.authoring.bindings.push([role, field, source]); + const { contentHash: _hash, ...semantic } = changed.authoring; + changed.authoring.contentHash = `studio-authoring-v1-${hashes.hashString(hashes.stableStringify(semantic))}`; + const parsed = requests.parseOperationStarter( + changed, + selection.pipelineClass, + selection.task, + contracts, + selection, + ); + assert.throws( + () => createTemplateOperationGraph(template, form, parsed, fixture.registry, row.spec, row.capability), + /identity|incompatible|not declared/, + `must reject ${role}.${field} bound to ${source}`, + ); + } + for (const [role, field, value] of [ + ['prompt', '__proto__', 'unsafe'], + ['prompt', 'constructor', 'unsafe'], + ['guider', 'guidance_scale', '5'], + ['guider', 'enabled', 1], + ]) { + const changed = structuredClone(starter); + changed.authoring.initialValues.push([role, field, value]); + assert.throws( + () => createTemplateOperationGraph(template, form, changed, fixture.registry, row.spec, row.capability), + /incompatible|not declared/, + `must reject ${role}.${field} literal ${value}`, + ); + } + assert.equal(Object.prototype.value, undefined, 'Inherited names must never mutate the parameter prototype.'); + assert.throws( + () => + createTemplateOperationGraph( + template, + { ...form, guidanceScale: 1000 }, + starter, + fixture.registry, + row.spec, + row.capability, + ), + /incompatible/, + ); + + const withVariant = structuredClone(starter); + const variantOwner = withVariant.nodes.find((item) => item.operation.decomposition === 'loader'); + variantOwner.node.params.reviewed_variant = { + type: 'string', + options: ['pinned_variant', 'another_variant'], + value: 'pinned_variant', + }; + variantOwner.operation.binding.values.reviewed_variant = 'pinned_variant'; + withVariant.authoring.bindings.push(['models', 'reviewed_variant', 'modelVariant']); + const preserved = groups.unpackVisualOperationGroups( + createTemplateOperationGraph(template, form, withVariant, fixture.registry, row.spec, row.capability), + ).graph; + assert.equal( + preserved.nodes.find((node) => node.data.action === 'ModelsLoader').data.params.reviewed_variant.value, + 'pinned_variant', + ); + const variantBinding = structuredClone(withVariant); + variantBinding.authoring.bindings.find(([, field]) => field === 'reviewed_variant')[2] = 'prompt'; + assert.throws( + () => createTemplateOperationGraph(template, form, variantBinding, fixture.registry, row.spec, row.capability), + /identity/, + ); + const variantLiteral = structuredClone(withVariant); + variantLiteral.authoring.bindings = variantLiteral.authoring.bindings.filter( + ([, field]) => field !== 'reviewed_variant', + ); + variantLiteral.authoring.initialValues.push(['models', 'reviewed_variant', 'another_variant']); + assert.throws( + () => createTemplateOperationGraph(template, form, variantLiteral, fixture.registry, row.spec, row.capability), + /identity/, + ); + + const nullable = structuredClone(starter); + const nullableGuider = nullable.nodes.find((item) => item.operation.operationId === 'diffusion.guidance'); + nullableGuider.node.params.optional_strength = { type: 'float', default: null }; + nullable.authoring.bindings.push(['guider', 'optional_strength', 'paddingMaskCrop']); + const nullableGraph = groups.unpackVisualOperationGroups( + createTemplateOperationGraph(template, form, nullable, fixture.registry, row.spec, row.capability), + ).graph; + assert.equal( + nullableGraph.nodes.find((node) => node.data.action === 'Guider').data.params.optional_strength.value, + null, + ); + nullableGuider.node.params.optional_strength.required = true; + assert.throws( + () => createTemplateOperationGraph(template, form, nullable, fixture.registry, row.spec, row.capability), + /incompatible/, + ); + + const withLora = structuredClone(template); + withLora.workflowBlocks = ['lora']; + withLora.workflowBlockSettings = { + lora: { + model: { source: 'hub', value: 'org/Adapter', revision: 'a'.repeat(40), sha256: 'b'.repeat(64) }, + scale: 0.7, + weightName: 'adapter_model.safetensors', + }, + }; + const loraGraph = groups.unpackVisualOperationGroups( + createTemplateOperationGraph(withLora, form, starter, fixture.registry, row.spec, row.capability), + ).graph; + const adapter = loraGraph.nodes.find((node) => node.data.action === 'Lora'); + assert.deepEqual(adapter.data.params.model.value, { source: 'hub', value: 'org/Adapter' }); + const localOnlyRegistry = structuredClone(fixture.registry); + localOnlyRegistry['modules.ModularDiffusers.Lora'].params.model.fieldOptions.sources = ['local']; + assert.throws( + () => createTemplateOperationGraph(withLora, form, starter, localOnlyRegistry, row.spec, row.capability), + /incompatible/, + ); +}); diff --git a/scripts/operation-authoring.test.mjs b/scripts/operation-authoring.test.mjs index 1d1168e0..16e928d8 100644 --- a/scripts/operation-authoring.test.mjs +++ b/scripts/operation-authoring.test.mjs @@ -1,8 +1,135 @@ import assert from 'node:assert/strict'; import { after, before, test } from 'node:test'; import { createServer } from 'vite'; +import fs from 'node:fs'; +import React from 'react'; +import { renderToStaticMarkup } from 'react-dom/server'; let server, authoring, requests, drafts, choices; + +test('task-specific artifact inventories preserve finite partitions and install the selected one', async () => { + const inventory = await server.ssrLoadModule('/src/workflow/workflowModelInventory.ts'); + const repo = 'owner/future-video'; + const pin = 'b'.repeat(40); + const model = { + defaultRepo: repo, + modes: ['text_to_video_with_audio', 'reference_to_video_with_audio'], + executionStatus: 'expert_only', + revisionCandidates: [pin], + downloadFiles: [], + artifactSelections: [ + { + modes: ['text_to_video_with_audio'], + repo, + revision: pin, + label: 'Text video', + downloadFiles: ['model_index.json', 'transformer/model.safetensors'], + }, + { + modes: ['reference_to_video_with_audio'], + repo, + revision: pin, + label: 'Reference video', + downloadFiles: ['model_index.json', 'transformer_ref/model.safetensors'], + }, + ], + }; + const descriptor = { + profileId: 'future-video', + repo, + label: 'Future video', + inventory: inventory.parseWorkflowModelInventory(model, repo), + }; + const rows = inventory.workflowModelArtifactRows(descriptor); + assert.deepEqual( + rows.map((row) => row.label), + ['Text video', 'Reference video'], + ); + assert.equal(new Set(rows.map((row) => row.id)).size, 2); + for (const [index, row] of rows.entries()) { + const state = inventory.workflowModelArtifactStatus(row, descriptor, [], [], null); + assert.equal(state.installTarget.revision, pin); + assert.deepEqual(state.installTarget.files, model.artifactSelections[index].downloadFiles); + assert.equal( + state.installTarget.files.includes('transformer/model.safetensors') && + state.installTarget.files.includes('transformer_ref/model.safetensors'), + false, + ); + } + const cache = [ + { + id: repo, + complete: true, + installed: true, + planned_revision: pin, + planned_files: model.artifactSelections[0].downloadFiles, + }, + ]; + assert.equal(inventory.workflowModelArtifactStatus(rows[0], descriptor, cache, [], null).status.runnable, true); + assert.equal(inventory.workflowModelArtifactStatus(rows[1], descriptor, cache, [], null).status.runnable, false); + const taskChoices = choices.workflowChoices( + [ + { + pipelineClass: 'FutureVideoPipeline', + tasks: model.modes.map((task) => ({ task, operationIds: ['load'], executionProfileIds: ['future-video'] })), + }, + ], + [], + cache, + [], + null, + [{ ...descriptor, pipeline: 'FutureVideoPipeline' }], + ); + assert.equal(taskChoices.find((choice) => choice.task === model.modes[0]).cache.runnable, true); + assert.equal(taskChoices.find((choice) => choice.task === model.modes[1]).cache.runnable, false); + for (const mutate of [ + (row) => { + row.revision = 'main'; + }, + (row) => { + row.downloadFiles = ['*']; + }, + (row) => { + row.downloadFiles = ['../outside']; + }, + (row) => { + row.modes = ['undeclared']; + }, + (row) => { + row.repo = 'https://outside/model'; + }, + ]) { + const changed = structuredClone(model); + mutate(changed.artifactSelections[0]); + assert.throws(() => inventory.parseWorkflowModelInventory(changed, repo)); + } + const duplicate = structuredClone(model); + duplicate.artifactSelections[1].modes = ['text_to_video_with_audio']; + assert.throws(() => inventory.parseWorkflowModelInventory(duplicate, repo)); + const component = await server.ssrLoadModule('/src/components/WorkflowModelInventoryRow.tsx'); + const markup = renderToStaticMarkup( + React.createElement(component.default, { + descriptor, + cache: [], + local: [], + diagnostics: null, + installProgress: {}, + activeInstallCount: 0, + hfTokenConfigured: true, + onConfigureHfToken() {}, + async onInstall() {}, + }), + ); + assert.match(markup, /Workflow task for Future video/); + const policies = await server.ssrLoadModule('/src/studio/modelUsagePolicies.ts'); + const policy = policies.usagePolicyForRepository('Pika-Labs/Pika-H3-Flex'); + assert.equal(policy.acknowledgementRequired, true); + assert.equal(policy.reviewedRevision, '3ff166447d5edb1406107ab8370c42000ce173e4'); + assert.match(policy.termsUrl, /\/3ff166447d5edb1406107ab8370c42000ce173e4\/LICENSE$/u); +}); +const evaluationImageFixture = JSON.parse( + fs.readFileSync(new URL('../tests/fixtures/evaluation-image-authoring.v1.json', import.meta.url), 'utf8'), +); const originalFetch = globalThis.fetch; before(async () => { globalThis.fetch = async (url, options) => { @@ -108,6 +235,69 @@ function graph() { return authoring.createOperationStarter(starter(), { x: 40, y: 60 }); } +test('legacy schema-one hints without retained expose model ownership without rewriting saved data', async () => { + const declaration = starter(); + declaration.nodes[0].node.params.repo_id = { type: 'string', value: 'test/base' }; + const legacy = authoring.createOperationStarter(declaration, { x: 40, y: 60 }); + const loader = legacy.nodes[0]; + const current = loader.data.operationAuthoring; + // Historical schema-one saved nodes had defaults/authored but no retained list. + loader.data.operationAuthoring = { + schemaVersion: 1, + operation: current.operation, + defaults: current.defaults, + authored: ['repo_id'], + }; + const before = structuredClone(legacy); + const parsed = authoring.operationAuthoring(loader); + assert.ok(parsed, 'The historical advisory shape must remain editable.'); + assert.deepEqual(parsed.retained, []); + assert.notEqual(parsed, loader.data.operationAuthoring, 'Compatibility is a derived view.'); + const { operationModelSource } = await server.ssrLoadModule('/src/workflow/operationModelSource.ts'); + assert.equal(operationModelSource(loader, 'repo_id'), loader, 'The normal model picker can resolve its owner.'); + assert.deepEqual(legacy, before, 'Reading or locating a model must not migrate the saved graph.'); + assert.equal(Object.hasOwn(loader.data.operationAuthoring, 'retained'), false); + loader.data.operationAuthoring = current; + assert.equal(authoring.operationAuthoring(loader), current, 'Current valid hints retain their existing identity.'); +}); + +test('legacy schema-one compatibility refuses present malformed retained and other invalid claims', () => { + const node = graph().nodes[0]; + const valid = structuredClone(node.data.operationAuthoring); + for (const retained of [undefined, null, 'bad', {}, Array(513).fill({}), [null], [{}], [{ field: 'prompt' }]]) { + node.data.operationAuthoring = { ...valid, retained }; + assert.equal(authoring.operationAuthoring(node), null, 'A present invalid list is not a historical omission.'); + } + const { retained: _retained, ...legacy } = valid; + node.data.operationAuthoring = Object.assign(Object.create({ retained: [] }), legacy); + assert.equal(authoring.operationAuthoring(node), null, 'An inherited list cannot become a historical omission.'); + let reads = 0; + node.data.operationAuthoring = Object.defineProperty({ ...legacy }, 'retained', { + enumerable: true, + get() { + reads++; + return []; + }, + }); + assert.equal(authoring.operationAuthoring(node), null, 'Accessor claims are not saved JSON data.'); + assert.equal(reads, 0); + for (const change of [ + { schemaVersion: 2 }, + { defaults: undefined }, + { defaults: null }, + { defaults: [] }, + { defaults: Object.fromEntries(Array.from({ length: 513 }, (_, index) => [String(index), 0])) }, + { operation: undefined }, + { operation: { ...valid.operation, nodeKey: 'unrelated.Action' } }, + { authored: 'prompt' }, + { inactiveDrafts: {} }, + { ancillaryParent: {} }, + ]) { + node.data.operationAuthoring = { ...legacy, ...change }; + assert.equal(authoring.operationAuthoring(node), null, 'Other required fields and saved claims stay guarded.'); + } +}); + test('replaced native stages cannot overwrite exact whole-pipeline binding values', () => { const source = graph(); source.nodes[1].data.params.prompt.value = 'Authored native prompt'; @@ -478,6 +668,147 @@ test('review ignores derived operation availability but protects values, wires, } }); +test('a reviewed model change survives delayed empty uiState enrichment without losing Undo or sibling metadata', async () => { + const { useFlowStore } = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + const { captureWorkflowOperationContext } = await server.ssrLoadModule('/src/stores/useStudioStore.ts'); + const { commitOperationGraph, operationGraphSignature } = await server.ssrLoadModule( + '/src/workflow/operationGraphTransaction.ts', + ); + const flow = useFlowStore.getState(); + flow.replaceGraph(graph()); + flow.resetHistory(); + let before = flow.toObject(); + delete before.nodes[0].data.uiState; + delete before.nodes[1].data.uiState; + const sibling = structuredClone(before.nodes[1]); + sibling.id = 'independent-reviewed-stage'; + sibling.data.uiState = { disabled: false }; + delete sibling.data.operationAuthoring; + before.nodes.push(sibling); + flow.replaceGraph(before); + before = flow.toObject(); + const context = captureWorkflowOperationContext(); + const signature = operationGraphSignature(before); + const plan = authoring.planOperationChange(before, before.nodes[0].id, starter('OtherPipeline')); + const liveBefore = JSON.stringify(useFlowStore.getState().nodes); + const enriched = structuredClone(before); + enriched.nodes[0].data.uiState = {}; + enriched.nodes[1].data.uiState = {}; + enriched.nodes[2].data.uiState = { disabled: false }; + flow.replaceGraph(enriched); + for (const node of enriched.nodes.slice(0, 2)) + assert.deepEqual(useFlowStore.getState().nodes.find((live) => live.id === node.id).data.uiState, {}); + assert.notEqual( + JSON.stringify(useFlowStore.getState().nodes), + liveBefore, + 'Exercise the actual delayed metadata difference.', + ); + assert.deepEqual(flow.toObject(), before, 'Empty presentation metadata is not a durable workflow edit.'); + assert.equal(operationGraphSignature(flow.toObject()), signature); + commitOperationGraph(plan.graph, context, signature, 'Change model after presentation refresh'); + assert.equal(flow.toObject().nodes[0].data.params.pipeline_class.value, 'OtherPipeline'); + assert.equal(flow.toObject().nodes.find((node) => node.id === sibling.id).data.uiState.disabled, false); + assert.deepEqual( + flow.toObject().nodes.find((node) => node.id === sibling.id).data.params, + enriched.nodes[2].data.params, + ); + assert.equal(useFlowStore.getState().historyPast.length, 1); + flow.undo(); + assert.equal(flow.toObject().nodes[0].data.params.pipeline_class.value, 'FuturePipeline'); + assert.equal(flow.toObject().nodes.find((node) => node.id === sibling.id).data.uiState.disabled, false); + flow.redo(); + assert.equal(flow.toObject().nodes[0].data.params.pipeline_class.value, 'OtherPipeline'); + assert.equal(flow.toObject().nodes.find((node) => node.id === sibling.id).data.uiState.disabled, false); +}); + +test('preview normalization preserves every nonempty UI setting and authored graph mutation', async () => { + const { useFlowStore } = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + const { captureWorkflowOperationContext } = await server.ssrLoadModule('/src/stores/useStudioStore.ts'); + const { commitOperationGraph, operationGraphSignature, operationGraphPreviewSignature } = await server.ssrLoadModule( + '/src/workflow/operationGraphTransaction.ts', + ); + const flow = useFlowStore.getState(); + flow.replaceGraph(graph()); + const original = flow.toObject(); + delete original.nodes[0].data.uiState; + original.nodes[1].data.params.seed = { type: 'int', value: { value: 4109, isRandom: false } }; + const previewSignature = operationGraphPreviewSignature(original); + const signature = operationGraphSignature(original); + const empty = structuredClone(original); + empty.nodes[0].data.uiState = {}; + assert.equal(operationGraphPreviewSignature(empty), previewSignature); + assert.equal(operationGraphSignature(empty), signature); + for (const mutate of [ + (value) => { + value.nodes[0].data.uiState = { collapsed: false }; + }, + (value) => { + value.nodes[0].data.uiState = { collapsed: true }; + }, + (value) => { + value.nodes[0].data.uiState = { disabled: false }; + }, + (value) => { + value.nodes[0].data.uiState = { disabled: true }; + }, + (value) => { + value.nodes[0].data.uiState = { blockExpanded: false }; + }, + (value) => { + value.nodes[0].data.params.pipeline_class.value = 'AnotherModel'; + }, + (value) => { + value.nodes[1].data.params.seed.value.value = 4110; + }, + (value) => { + value.nodes[1].data.params.seed.value.isRandom = true; + }, + (value) => { + value.nodes[1].data.operationAuthoring.authored = ['prompt']; + }, + (value) => { + value.nodes[1].data.operationAuthoring.operation.binding.values = { task: 'image_to_image' }; + }, + (value) => { + value.nodes[1].data.params.prompt.value = 'Edited prompt'; + }, + (value) => { + value.nodes[0].position.x += 1; + }, + (value) => { + value.edges[0].targetHandle = 'different-port'; + }, + (value) => { + value.nodes[0].data.label = 'Edited label'; + }, + ]) { + const changed = structuredClone(original); + mutate(changed); + assert.notEqual(operationGraphPreviewSignature(changed), previewSignature); + assert.notEqual(operationGraphSignature(changed), signature); + flow.replaceGraph(changed); + assert.throws( + () => commitOperationGraph(original, captureWorkflowOperationContext(), signature, 'Stale'), + /changed/, + ); + } + for (const uiState of [null, [], { arbitrary: {} }]) { + const changed = structuredClone(original); + changed.nodes[0].data.uiState = uiState; + assert.notEqual(operationGraphPreviewSignature(changed), previewSignature); + assert.notEqual(operationGraphSignature(changed), signature); + } + for (const field of ['hidden', 'disabled']) { + const changed = structuredClone(original); + changed.nodes[1].data.params.prompt[field] = true; + assert.notEqual( + operationGraphPreviewSignature(changed), + previewSignature, + 'The UI preview check gains no broader availability waiver.', + ); + } +}); + test('an application failure rolls the whole graph back and does not create a history entry', async () => { const { useFlowStore } = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); const { captureWorkflowOperationContext } = await server.ssrLoadModule('/src/stores/useStudioStore.ts'); @@ -597,6 +928,112 @@ function seededStarter(imageTask = false) { return s; } +function sharedCreativeStarter() { + const recipe = seededStarter(true); + for (const field of ['width', 'height']) { + for (const stage of recipe.nodes.slice(1)) { + stage.node.params[field] = { type: 'int', display: 'number', default: 1024, min: 64, max: 4096 }; + stage.operation.ports.push({ + ...structuredClone(stage.operation.ports.find((port) => port.name === 'seed')), + name: field, + semanticName: field, + }); + } + recipe.sharedInputs.push({ + name: field, + members: recipe.nodes.slice(1).map((stage) => ({ operationId: stage.operation.operationId, field })), + }); + } + return recipe; +} + +function authoredSharedCreativeGraph(recipe) { + const graph = authoring.createOperationStarter(recipe, { x: 0, y: 0 }); + for (const node of graph.nodes.slice(1)) { + node.data.params.seed.value = { value: '4109', isRandom: false }; + node.data.params.width.value = 768; + node.data.params.height.value = 512; + node.data.operationAuthoring.authored = ['seed', 'width', 'height']; + } + return graph; +} + +test('explicit model defaults reset unconnected shared seed and size instead of restoring the old values', () => { + const recipe = sharedCreativeStarter(); + const graph = authoredSharedCreativeGraph(recipe); + const before = structuredClone(graph); + const reset = authoring.planOperationChange(graph, graph.nodes[0].id, recipe, { restoreDefaults: true }); + for (const node of reset.graph.nodes.slice(1)) { + assert.equal(authoring.operationFieldValue(node.data.params.seed), 0); + assert.equal(authoring.operationFieldValue(node.data.params.width), 1024); + assert.equal(authoring.operationFieldValue(node.data.params.height), 1024); + } + assert.deepEqual(graph, before, 'Reset preview cannot mutate the current graph.'); +}); + +test('explicit model defaults preserve a connected shared group and its custom source while resetting other groups', () => { + for (const connectedField of ['seed', 'width', 'height']) { + const recipe = sharedCreativeStarter(); + const graph = authoredSharedCreativeGraph(recipe); + const source = { + id: 'custom-source', + type: 'custom', + position: { x: -100, y: 80 }, + data: { module: 'custom.Workbench', action: 'Value', params: { output: { type: 'int', display: 'output' } } }, + }; + graph.nodes.push(source); + graph.nodes[1].data.params[connectedField].isInput = true; + graph.edges.push({ + id: 'custom-wire', + source: source.id, + sourceHandle: 'output', + target: graph.nodes[1].id, + targetHandle: connectedField, + }); + const before = structuredClone(graph); + const reset = authoring.planOperationChange(graph, graph.nodes[0].id, recipe, { restoreDefaults: true }); + assert.deepEqual( + reset.graph.nodes.find((node) => node.id === source.id), + source, + ); + assert.ok(reset.graph.edges.some((edge) => edge.id === 'custom-wire')); + assert.equal(reset.graph.edges.filter((edge) => edge.source === source.id).length, 2); + for (const node of reset.graph.nodes.filter((node) => node.data.params.seed)) { + for (const field of ['seed', 'width', 'height']) { + assert.deepEqual( + authoring.operationFieldValue(node.data.params[field]), + field === connectedField + ? authoring.operationFieldValue(graph.nodes[1].data.params[field]) + : field === 'seed' + ? 0 + : 1024, + ); + } + } + assert.deepEqual(graph, before); + } +}); + +test('ordinary model changes still preserve authored shared seed and size', () => { + const recipe = sharedCreativeStarter(); + const graph = authoredSharedCreativeGraph(recipe); + const target = structuredClone(recipe); + target.pipelineClass = 'OtherPipeline'; + for (const stage of target.nodes) { + stage.operation.pipelineClass = target.pipelineClass; + stage.operation.binding.pipelineClass = target.pipelineClass; + } + target.nodes[0].node.params.pipeline_class.value = target.pipelineClass; + const changed = authoring.planOperationChange(graph, graph.nodes[0].id, target, { replaceModel: true }); + for (const node of changed.graph.nodes.filter((node) => node.data.params.seed)) { + for (const field of ['seed', 'width', 'height']) + assert.deepEqual( + authoring.operationFieldValue(node.data.params[field]), + authoring.operationFieldValue(graph.nodes[1].data.params[field]), + ); + } +}); + test('task extension carries the seed, shared edits undo together, and random mode exports one draw', async () => { const old = authoring.createOperationStarter(seededStarter(), { x: 0, y: 0 }); old.nodes[1].data.params.seed.value = { value: '4109', isRandom: false }; @@ -732,6 +1169,55 @@ test('workflow drafts keep unsupported or latent outputs explicit instead of inv assert.match(result.notices[0], /No compatible output/); }); +test('fresh video exporters inherit the declared generation frame rate without changing the starter', async () => { + for (const paired of [false, true]) { + const s = starter('FutureVideoPipeline', 'text_to_video'); + const source = s.nodes[1]; + source.node.params.frame_rate = { type: 'float', default: 24, value: 24 }; + source.node.params.result = { type: 'video', display: 'output' }; + source.operation.ports.push( + { + name: 'frame_rate', + semanticName: 'frame_rate', + direction: 'input', + types: ['float'], + hidden: false, + semantics: { kind: 'value' }, + }, + { name: 'result', direction: 'output', types: ['video'], hidden: false, semantics: { kind: 'media' } }, + ); + if (paired) { + source.node.params.audio = { type: 'audio', display: 'output' }; + source.operation.ports.push({ + name: 'audio', + direction: 'output', + types: ['audio'], + hidden: false, + semantics: { kind: 'media' }, + }); + } + const action = paired ? 'ExportWithAudio' : 'ExportAsset'; + const registry = { + [`modules.Video.${action}`]: { + module: 'modules.Video', + action, + label: 'Video Output', + params: { + video: { type: 'video', display: 'input' }, + fps: { type: 'float', default: 16 }, + ...(paired ? { audio: { type: 'audio', display: 'input' } } : {}), + }, + }, + }; + const before = structuredClone(s); + const { unpackVisualOperationGroups } = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const graph = unpackVisualOperationGroups(drafts.createWorkflowDraft(s, registry).graph).graph; + const output = graph.nodes.find((node) => node.data.action === action); + assert.equal(output.data.params.fps.value, 24); + assert.deepEqual(s, before); + } +}); + test('workflow choices join exact execution profiles and retain task and pipeline distinctions', () => { const support = [ { @@ -760,6 +1246,184 @@ test('workflow choices join exact execution profiles and retain task and pipelin assert.equal(choices.workflowTaskLabel('future_task'), 'Future task'); }); +test('public authoring offers retain exact per-task raw choices for known and generic workflow models', () => { + const pipelineClass = 'FuturePipeline'; + const profileId = 'future:official:v1'; + const tasks = ['text_to_image', 'edit_image']; + const offers = tasks.map((task) => ({ + executionProfileId: profileId, + pipelineClass, + task, + authoringRecipeId: `future:${task}:append:v1`, + rawAuthoringRecipeId: `future:${task}:raw:v1`, + rawAuthoringRecipeChoices: [ + { authoringRecipeId: `future:${task}:raw:v1`, label: 'Raw FP32' }, + { authoringRecipeId: `future:${task}:raw-nf4:v1`, label: 'Raw NF4' }, + ], + layoutAuthoringRecipeChoices: [ + { authoringRecipeId: `future:${task}:append:v1`, label: 'Append wording' }, + { authoringRecipeId: `future:${task}:constrained:v1`, label: 'Wording for authored regions' }, + ], + })); + const profile = { + id: profileId, + pipeline_class: pipelineClass, + model_type: 'FutureModel', + default_repo: 'review/future-model', + modes: tasks, + public: true, + authoringRecipes: offers, + }; + const model = { + modelType: profile.model_type, + label: 'Future model', + defaultRepo: profile.default_repo, + executionProfiles: [profile], + }; + const support = [ + { + pipelineClass, + tasks: tasks.map((task) => ({ + task, + operationIds: ['load', 'run'], + executionProfileIds: [profileId], + })), + }, + ]; + const payload = { schemaVersion: 2, capabilities: [model] }; + const original = structuredClone(payload); + for (const known of [[], [model]]) { + const descriptors = choices.parseWorkflowModelDescriptors(payload, support, known); + assert.equal(descriptors.length, 1); + const [descriptor] = descriptors; + assert.equal(descriptor.evaluationOnly, undefined); + for (const offer of offers) { + assert.equal(descriptor.authoringRecipes[offer.task], offer.authoringRecipeId); + assert.equal(descriptor.rawPromptAuthoringRecipes[offer.task], offer.rawAuthoringRecipeId); + assert.deepEqual(descriptor.rawPromptAuthoringChoices[offer.task], offer.rawAuthoringRecipeChoices); + assert.deepEqual(descriptor.layoutPromptAuthoringChoices[offer.task], offer.layoutAuthoringRecipeChoices); + } + const rows = choices.workflowChoices(support, known, [], [], null, descriptors); + assert.equal(rows.length, 2); + assert.ok(rows.every((row) => !row.evaluationOnly)); + for (const row of rows) + assert.equal(row.authoringRecipeId, offers.find((offer) => offer.task === row.task).authoringRecipeId); + } + assert.deepEqual(payload, original, 'Parsing cannot rewrite source metadata or promote private identities'); + for (const alter of [ + (rows) => { + rows.push(structuredClone(rows[0])); + }, + (rows) => { + rows[0].executionProfileId = 'another:profile'; + }, + (rows) => { + rows[0].pipelineClass = 'AnotherPipeline'; + }, + (rows) => { + rows[0].task = 'unsupported_task'; + }, + (rows) => { + rows[0].rawAuthoringRecipeChoices[0].label = ' padded '; + }, + (rows) => { + rows[0].rawAuthoringRecipeChoices[0].authoringRecipeId = 'undeclared:v1'; + }, + (rows) => { + rows[0].rawAuthoringRecipeChoices[1].authoringRecipeId = rows[0].authoringRecipeId; + }, + ]) { + const bad = structuredClone(payload); + alter(bad.capabilities[0].executionProfiles[0].authoringRecipes); + assert.throws(() => choices.parseWorkflowModelDescriptors(bad, support, [model])); + } + const old = structuredClone(payload); + delete old.capabilities[0].executionProfiles[0].authoringRecipes; + assert.deepEqual( + choices.parseWorkflowModelDescriptors(old, support, [model]), + [], + 'Old known-model payloads keep their legacy presentation boundary', + ); + const undeclaredPublic = structuredClone(payload); + delete undeclaredPublic.capabilities[0].executionProfiles[0].public; + assert.throws(() => choices.parseWorkflowModelDescriptors(undeclaredPublic, support, [model])); + const privateOffer = structuredClone(payload); + privateOffer.capabilities[0].executionProfiles[0].public = false; + assert.deepEqual( + choices.parseWorkflowModelDescriptors(privateOffer, support, [model]), + [], + 'Private offers are never promoted through public descriptors', + ); +}); + +test('authored layout choices are explicit bounded offers and cannot overlap raw alternatives', async () => { + const { parseAuthoringRecipeOffers } = await server.ssrLoadModule('/src/workflow/authoringRecipeOffers.ts'); + const profile = { id: 'future:official:v1', pipeline: 'FuturePipeline', modes: ['text_to_image'] }; + const row = { + executionProfileId: profile.id, + pipelineClass: profile.pipeline, + task: profile.modes[0], + authoringRecipeId: 'future:append:v1', + rawAuthoringRecipeId: 'future:raw:v1', + rawAuthoringRecipeChoices: [{ authoringRecipeId: 'future:raw:v1', label: 'Raw wording' }], + layoutAuthoringRecipeChoices: [ + { authoringRecipeId: 'future:append:v1', label: 'Append wording; keep layout' }, + { authoringRecipeId: 'future:constrained:v1', label: 'Generate wording for authored regions' }, + ], + }; + const support = [{ pipelineClass: profile.pipeline, tasks: [{ task: row.task, executionProfileIds: [profile.id] }] }]; + const invalid = () => { + throw new Error('invalid offers'); + }; + const parsed = parseAuthoringRecipeOffers([row], [profile], support, invalid); + assert.deepEqual(parsed.layoutChoices.get(profile.id)[row.task], row.layoutAuthoringRecipeChoices); + assert.equal( + parsed.recipes.get(profile.id)[row.task], + row.authoringRecipeId, + 'Adding an explicit mode cannot change the default.', + ); + const original = structuredClone(row); + for (const alter of [ + (item) => { + item.layoutAuthoringRecipeChoices = []; + }, + (item) => { + item.layoutAuthoringRecipeChoices[0].authoringRecipeId = 'another:v1'; + }, + (item) => { + item.layoutAuthoringRecipeChoices[1].authoringRecipeId = item.authoringRecipeId; + }, + (item) => { + item.layoutAuthoringRecipeChoices[1].authoringRecipeId = item.rawAuthoringRecipeId; + }, + (item) => { + item.layoutAuthoringRecipeChoices[1].label = ' padded '; + }, + (item) => { + item.layoutAuthoringRecipeChoices.push( + ...Array.from({ length: 3 }, (_, index) => ({ authoringRecipeId: `other:${index}`, label: 'Other' })), + ); + }, + (item) => { + Object.defineProperty(item.layoutAuthoringRecipeChoices, '0', { + enumerable: true, + get: () => original.layoutAuthoringRecipeChoices[0], + }); + }, + (item) => { + item.layoutAuthoringRecipeChoices.extra = true; + }, + ]) { + const bad = structuredClone(row); + alter(bad); + assert.throws(() => parseAuthoringRecipeOffers([bad], [profile], support, invalid)); + } + assert.deepEqual(row, original, 'Metadata parsing cannot alter source offers.'); + const old = structuredClone(row); + delete old.layoutAuthoringRecipeChoices; + assert.equal(parseAuthoringRecipeOffers([old], [profile], support, invalid).layoutChoices.size, 0); +}); + async function operationBlock(instanceId = 'operation-block', selectedStarter = seededStarter(true)) { const schema = await server.ssrLoadModule('/src/studio/blockSchemaV2.ts'); const runtime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); @@ -1605,6 +2269,9 @@ test('workflow discovery retains backend models absent from the legacy Studio un ['Future relative', 'owner/relative', 'relative'], ]); assert.equal(result.length, 2); + const noLora = structuredClone(payload); + noLora.capabilities[0].supportsLora = false; + assert.equal(choices.parseWorkflowModelDescriptors(noLora, support)[0].supportsLora, false); const legacy = structuredClone(payload); delete legacy.capabilities[0].label; assert.deepEqual( @@ -1640,52 +2307,1265 @@ test('workflow discovery retains backend models absent from the legacy Studio un assert.deepEqual(choices.parseWorkflowModelDescriptors(unavailable, support), []); }); -for (const prefix of ['node-', '_', '-']) { - test(`native saved ordinary Block supports atomic model replacement with ${prefix} identities`, async () => { - const { createUserBlockFromSelection, createUserBlockNode } = - await server.ssrLoadModule('/src/studio/userBlocks.ts'); - const { prepareOperationBlockGraph, planOwnerBlockOperationChange } = await server.ssrLoadModule( - '/src/workflow/operationLegacyBlockChange.ts', - ); - const { useUserBlockStore } = await server.ssrLoadModule('/src/stores/useUserBlockStore.ts'); - const { useFlowStore } = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); - const studio = await server.ssrLoadModule('/src/stores/useStudioStore.ts'); - const { commitOperationGraph } = await server.ssrLoadModule('/src/workflow/operationGraphTransaction.ts'); - const runtime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); - const { remapOperationAuthoring } = await server.ssrLoadModule('/src/workflow/operationSharedInputs.ts'); - const old = seededStarter(true); - Object.assign(old.nodes[0].node.params, { - repo_id: { type: 'string', display: 'text', value: 'test/base' }, - revision: { type: 'string', display: 'text', value: 'a'.repeat(40) }, - }); - const draft = authoring.createOperationStarter(old, { x: 80, y: 80 }); - const ids = new Map(draft.nodes.map((node, index) => [node.id, `${prefix}${index}`])); - draft.nodes = draft.nodes.map((node) => ({ - ...node, - id: ids.get(node.id), - selected: true, - data: { - ...node.data, - operationAuthoring: remapOperationAuthoring(node.data.operationAuthoring, (id) => ids.get(id) ?? id), +test('evaluation authoring is an explicit private Expert namespace and cannot promote public discovery', async () => { + const evaluation = await server.ssrLoadModule('/src/workflow/evaluationAuthoring.ts'); + const operations = starter().nodes.map((node) => node.operation); + const requirement = { + schemaVersion: 1, + delivery: 'base', + requiredNow: false, + profileIds: [], + executionProfileIds: ['future-evaluation'], + state: 'base_satisfied', + reason: 'base_runtime_ready', + }; + const pipeline = { + pipelineClass: 'FuturePipeline', + coverage: 'research-blocked', + reason: 'Evaluation authoring only', + equivalentTo: [], + upstreamTasks: [{ task: 'text_to_image', source: 'modular', workflowId: 'text2image' }], + tasks: [ + { + task: 'text_to_image', + execution: 'declared', + decomposition: 'stages', + operationIds: operations.map((op) => op.operationId), + executionProfileIds: ['future-evaluation'], + dependencies: 'ready', + runtimeRequirements: [requirement], }, - })); - draft.edges = draft.edges.map((edge) => ({ ...edge, source: ids.get(edge.source), target: ids.get(edge.target) })); - draft.nodes[1].data.params.prompt.value = 'Keep this carefully edited prompt'; - const saved = createUserBlockFromSelection(draft, 'Saved ordinary graph'); - assert.equal(saved.ok, true); - const savedSnapshot = structuredClone(saved.block); - const root = createUserBlockNode(saved.block, { x: 300, y: 200 }, `${prefix}instance`); - const graph = { nodes: [root], edges: [] }; - const snapshot = structuredClone(graph); - const library = structuredClone(useUserBlockStore.getState().blocks); - assert.equal(root.data.blockInstanceV2, undefined, 'exercise the actual v1 Save path'); - const prepared = prepareOperationBlockGraph(graph, root.id); - const loader = prepared.root.data.blockInstanceV2.effectiveGraph.nodes.find( - (node) => node.data.operationAuthoring?.operation.decomposition === 'loader', - ); - const { operationModelSource } = await server.ssrLoadModule('/src/workflow/operationModelSource.ts'); - const control = prepared.root.data.blockInstanceV2.effectiveInterface.controls.find( - (c) => c.binding.nodeId === loader.nodeId && c.binding.fieldId === 'repo_id', + ], + }; + const publicSupport = [ + { + ...pipeline, + tasks: pipeline.tasks.map((task) => ({ + ...task, + executionProfileIds: [], + dependencies: 'unknown', + runtimeRequirements: [], + })), + }, + ]; + const payload = { + schemaVersion: 2, + capabilities: [ + { + modelType: 'FuturePipeline', + label: 'Future image', + executionProfiles: [], + defaultRepo: 'owner/future', + autoEligible: false, + templateEligible: false, + galleryEligible: false, + liveProof: false, + }, + ], + evaluationAuthoring: { + schemaVersion: 1, + scope: 'expert-authoring', + autoEligible: false, + templateEligible: false, + galleryEligible: false, + executionProfiles: [ + { + id: 'future-evaluation', + model_type: 'FuturePipeline', + pipeline_class: 'FuturePipeline', + default_repo: 'owner/future', + public: false, + live_proof: false, + modes: ['text_to_image'], + }, + ], + pipelineSupport: [pipeline], + }, + }; + const before = structuredClone(payload); + const parsed = evaluation.parseEvaluationAuthoring(payload, publicSupport, operations); + assert.deepEqual(payload, before); + assert.equal(parsed.descriptors.length, 1); + assert.equal(parsed.descriptors[0].evaluationOnly, true); + assert.equal(parsed.descriptors[0].profileId, 'future-evaluation'); + assert.deepEqual(choices.parseWorkflowModelDescriptors(payload, publicSupport), []); + const rows = choices.workflowChoices(parsed.support, [], [], [], null, parsed.descriptors); + assert.equal(rows.length, 1); + assert.equal(rows[0].evaluationOnly, true); + const sharedPublicPipeline = structuredClone(publicSupport); + sharedPublicPipeline[0].tasks[0].executionProfileIds = ['public-profile']; + assert.throws( + () => evaluation.parseEvaluationAuthoring(payload, sharedPublicPipeline, operations), + /evaluation authoring/i, + 'private metadata cannot replace any existing public profile on the same pipeline', + ); + assert.deepEqual(sharedPublicPipeline[0].tasks[0].executionProfileIds, ['public-profile']); + const nodeStore = (await server.ssrLoadModule('/src/stores/useNodeStore.ts')).useNodesStore; + const original = globalThis.fetch; + try { + globalThis.fetch = async () => + new Response( + JSON.stringify({ + ...payload, + operationContractSchemaVersion: 3, + operationContracts: operations, + pipelineSupportSchemaVersion: 1, + pipelineSupport: publicSupport, + }), + { headers: { 'Content-Type': 'application/json' } }, + ); + await nodeStore.getState().fetchStudioModelCapabilities(); + assert.equal(nodeStore.getState().discoveryRequests.capabilities.status, 'success'); + assert.deepEqual(nodeStore.getState().workflowModelDescriptors, parsed.descriptors); + assert.deepEqual(nodeStore.getState().pipelineSupport, parsed.support); + assert.equal( + nodeStore.getState().studioModelCapabilities.some((model) => model.modelType === 'FuturePipeline'), + false, + ); + } finally { + globalThis.fetch = original; + } + assert.deepEqual( + evaluation.parseEvaluationAuthoring({ ...payload, evaluationAuthoring: undefined }, publicSupport, operations), + { support: publicSupport, descriptors: [] }, + ); + for (const alter of [ + (p) => { + p.evaluationAuthoring.autoEligible = true; + }, + (p) => { + p.evaluationAuthoring.scope = 'automatic'; + }, + (p) => { + p.evaluationAuthoring.executionProfiles[0].public = true; + }, + (p) => { + p.evaluationAuthoring.executionProfiles[0].live_proof = true; + }, + (p) => { + p.evaluationAuthoring.executionProfiles[0].modes = ['edit_image']; + }, + (p) => { + p.evaluationAuthoring.executionProfiles[0].default_repo = 'owner/other'; + }, + (p) => { + p.evaluationAuthoring.executionProfiles[0].modes.push('text_to_image'); + }, + (p) => { + p.evaluationAuthoring.pipelineSupport[0].tasks[0].executionProfileIds = ['other']; + }, + (p) => { + p.evaluationAuthoring.executionProfiles.push(p.evaluationAuthoring.executionProfiles[0]); + }, + (p) => { + p.evaluationAuthoring.unreviewed = true; + }, + ]) { + const malformed = structuredClone(payload); + alter(malformed); + assert.throws(() => evaluation.parseEvaluationAuthoring(malformed, publicSupport, operations)); + } +}); + +function evaluationImagePayload() { + return structuredClone({ + schemaVersion: 2, + capabilities: evaluationImageFixture.capabilities, + evaluationAuthoring: evaluationImageFixture.evaluationAuthoring, + }); +} + +async function evaluationImageAuthority(payload = evaluationImagePayload()) { + const { parseEvaluationAuthoring } = await server.ssrLoadModule('/src/workflow/evaluationAuthoring.ts'); + const parsed = parseEvaluationAuthoring(payload, [], evaluationImageFixture.operationContracts); + return { + nodesRegistry: {}, + studioModelCapabilities: [], + studioModelCapabilitiesAuthoritative: true, + studioExecutionSpecInvalid: false, + operationContracts: evaluationImageFixture.operationContracts, + pipelineSupport: parsed.support, + workflowModelDescriptors: parsed.descriptors, + resourceMode: 'expert', + runtimeStatus: { ready: true, runtimeEnvironment: { profileVerified: true, executionReady: true } }, + discoveryRequests: { + nodes: { status: 'success' }, + capabilities: { status: 'success' }, + runtime: { status: 'success' }, + }, + }; +} + +test('evaluation model discovery keeps declared choices searchable across spaces and dots without public promotion', async () => { + const payload = evaluationImagePayload(); + const before = structuredClone(payload); + const authority = await evaluationImageAuthority(payload); + assert.deepEqual(payload, before, 'Parsing must not mutate the backend DTO.'); + const rows = choices.workflowChoices(authority.pipelineSupport, [], [], [], null, authority.workflowModelDescriptors); + assert.equal(rows.length, 4); + for (const query of ['FLUX3', 'flux 3', 'FLUX.3', 'black forest labs']) + assert.equal(rows.filter((row) => choices.workflowModelMatchesQuery(row, query)).length, 4, query); + assert.equal(rows.filter((row) => choices.workflowModelMatchesQuery(row, 'base')).length, 2); + assert.equal(rows.filter((row) => choices.workflowModelMatchesQuery(row, 'unrelated')).length, 0); + for (const row of rows) { + assert.equal(row.evaluationOnly, true); + assert.equal( + row.authoringRecipeId, + evaluationImageFixture.evaluationAuthoring.authoringRecipes.find( + (recipe) => recipe.executionProfileId === row.profileId && recipe.task === row.task, + ).authoringRecipeId, + ); + } + const { parseStudioModelCapabilities } = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); + assert.deepEqual( + parseStudioModelCapabilities(payload).capabilities, + [], + 'Private execution profiles stay outside runnable Studio capabilities.', + ); + assert.equal( + choices.workflowModelMatchesQuery({ label: 'Future Vision.7', repo: 'another/future-vision-7' }, 'future vision7'), + true, + ); +}); + +test('typed template identities preserve contract-only workflow discovery and reject inconsistent admissions', async () => { + const { parseStudioModelCapabilities } = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); + const profiles = await server.ssrLoadModule('/src/studio/modelProfiles.ts'); + const { STUDIO_TEMPLATES, PLANNING_STUDIO_TEMPLATES } = await server.ssrLoadModule('/src/studio/templates.ts'); + const payload = evaluationImagePayload(); + const before = structuredClone(payload); + const original = await evaluationImageAuthority(payload); + const baseline = choices.workflowChoices( + original.pipelineSupport, + [], + [], + [], + null, + original.workflowModelDescriptors, + ); + const full = structuredClone(payload); + for (const capability of full.capabilities) + Object.assign(capability, { + executionStatus: 'contract_only', + modes: ['text_to_image', 'edit_image'], + runnableModes: [], + qualifiedModes: [], + }); + for (const value of [payload, full]) { + const parsed = parseStudioModelCapabilities(value); + assert.deepEqual(parsed.capabilities, []); + const authority = await evaluationImageAuthority(value); + assert.deepEqual( + choices.workflowChoices( + authority.pipelineSupport, + parsed.capabilities, + [], + [], + null, + authority.workflowModelDescriptors, + ), + baseline, + 'Task, profile, private recipe, cache and Custom-memory identity stay on the ordinary starter path.', + ); + } + assert.deepEqual(payload, before, 'The actual retained metadata is not rewritten.'); + assert.equal(baseline.length, 4); + assert.ok( + baseline.every( + (row) => row.evaluationOnly && row.authoringRecipeId && ['text_to_image', 'edit_image'].includes(row.task), + ), + ); + for (const capability of payload.capabilities) { + const profile = profiles.STUDIO_MODEL_PROFILES[capability.modelType]; + assert.equal(profile.catalogVisibility, 'internal'); + assert.equal(profile.defaultRepo, capability.defaultRepo); + assert.deepEqual(profile.modes, ['text_to_image', 'edit_image']); + assert.ok( + [profile.autoEligible, profile.templateEligible, profile.galleryEligible, profile.liveProof].every( + (flag) => flag === false, + ), + ); + assert.equal( + profiles.isStudioModelVisibleInCatalog(capability.modelType, { + includeWorkflowOnly: true, + currentModelType: capability.modelType, + }), + false, + ); + } + const privateProfileIds = new Set(payload.evaluationAuthoring.executionProfiles.map((profile) => profile.id)); + const privateRecipeIds = new Set( + payload.evaluationAuthoring.authoringRecipes.map((recipe) => recipe.authoringRecipeId), + ); + assert.equal( + [...STUDIO_TEMPLATES, ...PLANNING_STUDIO_TEMPLATES].some( + (template) => + privateProfileIds.has(template.executionSelection?.executionProfileId) || + privateRecipeIds.has(template.executionSelection?.authoringRecipeId), + ), + false, + 'Public and planning cards cannot promote fixture-private profiles or recipes; a shared model family is not execution authority.', + ); + for (const alter of [ + (p) => { + p.capabilities[0].autoEligible = true; + }, + (p) => { + p.capabilities[0].templateEligible = true; + }, + (p) => { + p.capabilities[0].galleryEligible = true; + }, + (p) => { + p.capabilities[0].liveProof = true; + }, + (p) => { + delete p.capabilities[0].liveProof; + }, + (p) => { + p.capabilities[0].executionProfiles = [{ id: 'unreviewed' }]; + }, + (p) => { + p.capabilities[0].runnableModes = ['text_to_image']; + }, + (p) => { + p.capabilities[0].qualifiedModes = ['text_to_image']; + }, + (p) => { + p.schemaVersion = 1; + }, + ]) { + const invalid = structuredClone(full); + alter(invalid); + assert.throws(() => parseStudioModelCapabilities(invalid), /model.capabilities/i); + } + const publicProfile = structuredClone(profiles.STUDIO_MODEL_PROFILES.StableDiffusionPipeline); + assert.equal( + parseStudioModelCapabilities({ schemaVersion: 2, capabilities: [publicProfile] }).capabilities[0].modelType, + 'StableDiffusionPipeline', + ); +}); + +test('evaluation authoring validates selected policy and recipe bindings and rejects malformed extensions', async () => { + const authority = await evaluationImageAuthority(); + assert.deepEqual( + authority.workflowModelDescriptors.map((row) => row.adapterAuthoringProfile.adapterAuthoring), + evaluationImageFixture.evaluationAuthoring.executionProfiles.map((row) => row.adapterAuthoring), + ); + for (const alter of [ + (p) => { + p.evaluationAuthoring.authoringRecipes.push(p.evaluationAuthoring.authoringRecipes[0]); + }, + (p) => { + p.evaluationAuthoring.authoringRecipes[0].executionProfileId = 'unpublished'; + }, + (p) => { + p.evaluationAuthoring.authoringRecipes[0].pipelineClass = 'AnotherPipeline'; + }, + (p) => { + p.evaluationAuthoring.authoringRecipes[0].task = 'unconditional_image'; + }, + (p) => { + p.evaluationAuthoring.authoringRecipes[0].extraAuthority = true; + }, + (p) => { + p.evaluationAuthoring.executionProfiles[0].adapterAuthoring = + p.evaluationAuthoring.executionProfiles[1].adapterAuthoring; + }, + (p) => { + p.evaluationAuthoring.executionProfiles[0].adapterAuthoring.maxOwnedAdapters = 33; + }, + (p) => { + p.evaluationAuthoring.executionProfiles[0].adapterAuthoring.requiredControls.quant_config = {}; + }, + (p) => { + p.evaluationAuthoring.executionProfiles[0].optionalRuntimeRequirement.executionProfileIds = ['other']; + }, + ]) { + const payload = evaluationImagePayload(); + alter(payload); + await assert.rejects(() => evaluationImageAuthority(payload)); + } + const old = evaluationImagePayload(); + delete old.evaluationAuthoring.authoringRecipes; + for (const profile of old.evaluationAuthoring.executionProfiles) delete profile.adapterAuthoring; + const parsed = await evaluationImageAuthority(old); + assert.ok(parsed.workflowModelDescriptors.every((row) => !row.adapterAuthoringProfile && !row.authoringRecipes)); +}); + +test('evaluation authoring retains an optional exact raw recipe per selected task without public promotion', async () => { + const payload = evaluationImagePayload(); + for (const row of payload.evaluationAuthoring.authoringRecipes) + row.rawAuthoringRecipeId = `${row.authoringRecipeId}:raw`; + const before = structuredClone(payload); + const parsed = await evaluationImageAuthority(payload); + for (const row of payload.evaluationAuthoring.authoringRecipes) { + const descriptor = parsed.workflowModelDescriptors.find( + (descriptor) => descriptor.profileId === row.executionProfileId, + ); + assert.equal(descriptor.rawPromptAuthoringRecipes[row.task], row.rawAuthoringRecipeId); + assert.equal(descriptor.authoringRecipes[row.task], row.authoringRecipeId); + assert.equal(descriptor.evaluationOnly, true); + } + assert.deepEqual(payload, before); + for (const value of [ + null, + '', + 17, + 'x'.repeat(257), + payload.evaluationAuthoring.authoringRecipes[0].authoringRecipeId, + ]) { + const malformed = structuredClone(payload); + malformed.evaluationAuthoring.authoringRecipes[0].rawAuthoringRecipeId = value; + await assert.rejects(() => evaluationImageAuthority(malformed)); + } + const malformed = structuredClone(payload); + Object.defineProperty(malformed.evaluationAuthoring.authoringRecipes[0], 'rawAuthoringRecipeId', { + enumerable: true, + get: () => { + throw new Error('getter executed'); + }, + }); + await assert.rejects(() => evaluationImageAuthority(malformed), /Invalid/); +}); + +test('declared raw enhancement choices retain labels and exact defaults while rejecting malformed alternatives', async () => { + const payload = evaluationImagePayload(); + const row = payload.evaluationAuthoring.authoringRecipes[0]; + row.rawAuthoringRecipeId = `${row.authoringRecipeId}:raw`; + row.rawAuthoringRecipeChoices = [ + { authoringRecipeId: row.rawAuthoringRecipeId, label: 'Raw wording: FP32' }, + { authoringRecipeId: `${row.authoringRecipeId}:nf4`, label: 'Raw wording: BF16 + NF4' }, + ]; + const before = structuredClone(payload); + const parsed = await evaluationImageAuthority(payload); + assert.deepEqual( + parsed.workflowModelDescriptors.find((descriptor) => descriptor.profileId === row.executionProfileId) + .rawPromptAuthoringChoices[row.task], + row.rawAuthoringRecipeChoices, + ); + assert.deepEqual(payload, before); + for (const alter of [ + (r) => { + delete r.rawAuthoringRecipeId; + }, + (r) => { + r.rawAuthoringRecipeChoices = []; + }, + (r) => { + r.rawAuthoringRecipeChoices = null; + }, + (r) => { + r.rawAuthoringRecipeChoices.push(...r.rawAuthoringRecipeChoices, r.rawAuthoringRecipeChoices[0]); + }, + (r) => { + r.rawAuthoringRecipeChoices[1] = r.rawAuthoringRecipeChoices[0]; + }, + (r) => { + r.rawAuthoringRecipeChoices.shift(); + }, + (r) => { + r.rawAuthoringRecipeChoices[1].authoringRecipeId = r.authoringRecipeId; + }, + (r) => { + r.rawAuthoringRecipeChoices[1].extra = true; + }, + (r) => { + r.rawAuthoringRecipeChoices[1].label = ''; + }, + (r) => { + r.rawAuthoringRecipeChoices[1].label = ' Raw wording'; + }, + (r) => { + r.rawAuthoringRecipeChoices[1].label = 'x'.repeat(129); + }, + (r) => { + delete r.rawAuthoringRecipeChoices[1]; + }, + (r) => { + Object.defineProperty(r.rawAuthoringRecipeChoices[1], 'label', { + enumerable: true, + get: () => { + throw new Error('getter executed'); + }, + }); + }, + (r) => { + Object.defineProperty(r, 'rawAuthoringRecipeChoices', { + enumerable: true, + get: () => { + throw new Error('getter executed'); + }, + }); + }, + ]) { + const malformed = structuredClone(payload); + alter(malformed.evaluationAuthoring.authoringRecipes[0]); + await assert.rejects(() => evaluationImageAuthority(malformed), /Invalid/); + } +}); + +test('evaluation selected native policy permits ordinary Add and Remove without rewriting the model or unrelated nodes', async () => { + const adapters = await server.ssrLoadModule('/src/workflow/modelSetupAdapters.ts'); + const groups = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const authority = await evaluationImageAuthority(); + const raw = structuredClone(evaluationImageFixture.starter); + delete raw.authoring; + const selected = evaluationImageFixture.evaluationAuthoring.executionProfiles.find( + (profile) => profile.pipeline_class === raw.pipelineClass, + ); + const parsed = requests.parseOperationStarter(raw, raw.pipelineClass, raw.task, authority.operationContracts, { + executionProfileId: selected.id, + repository: selected.default_repo, + }); + const owner = parsed.nodes.find((node) => node.operation.decomposition === 'loader').node; + authority.nodesRegistry = Object.fromEntries( + parsed.nodes.map((node) => [node.operation.nodeKey, structuredClone(node.node)]), + ); + for (const [name, value] of Object.entries(selected.adapterAuthoring.requiredControls)) + owner.params[name].value = structuredClone(value); + authority.nodesRegistry['modules.ModularDiffusers.Lora'] = { + type: 'custom', + module: 'modules.ModularDiffusers', + action: 'Lora', + category: 'loader', + label: 'LoRA', + params: { + model: { type: 'string', value: { source: 'local', value: '' } }, + revision: { type: 'string', value: '' }, + expected_sha256: { type: 'string', value: '' }, + weight_name: { type: 'string', value: '' }, + adapter_name: { type: 'string', value: '' }, + scale: { type: 'float', value: 1 }, + previous_loras: { type: 'custom_lora', display: 'input' }, + lora: { type: 'custom_lora', display: 'output' }, + }, + }; + const graph = groups.groupNewOperationGraph(authoring.createOperationStarter(parsed, { x: 0, y: 0 })); + const root = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'setup'); + const chain = adapters.modelSetupAdapterChain(graph, root.id); + const before = structuredClone(graph); + assert.equal(adapters.modelSetupAdapterAddUnavailable(chain, authority), null); + const next = adapters.planModelSetupAdapterEdit( + graph, + root.id, + { + kind: 'add', + registry: authority.nodesRegistry, + values: { model: { source: 'local', value: 'metadata-only.safetensors' }, scale: '0.4' }, + }, + authority, + ); + const added = adapters.modelSetupAdapterChain(next, root.id); + assert.equal(added.adapters.length, 1); + assert.deepEqual(added.owner.data.params, chain.owner.data.params); + assert.equal(added.adapters[0].data.params.scale.value, '0.4'); + const restored = adapters.planModelSetupAdapterEdit(next, root.id, { kind: 'remove', nodeId: added.adapters[0].id }); + assert.deepEqual(adapters.modelSetupAdapterChain(restored, root.id).owner.data.params, chain.owner.data.params); + assert.equal(adapters.modelSetupAdapterChain(restored, root.id).adapters.length, 0); + assert.deepEqual(graph, before); + for (const alter of [ + (a) => { + a.resourceMode = 'auto'; + }, + (a) => { + a.discoveryRequests.runtime.status = 'error'; + }, + (a) => { + a.runtimeStatus.runtimeEnvironment.profileVerified = false; + }, + (a) => { + a.runtimeStatus.runtimeEnvironment.executionReady = false; + }, + (a) => { + a.discoveryRequests.capabilities.status = 'loading'; + }, + (a) => { + a.workflowModelDescriptors = []; + }, + (a) => { + a.workflowModelDescriptors.push(structuredClone(a.workflowModelDescriptors[1])); + }, + (a) => { + a.workflowModelDescriptors[1].adapterAuthoringProfile.repository_revisions[0].revision = 'f'.repeat(40); + }, + (a) => { + a.workflowModelDescriptors[1].modelType = 'AnotherModel'; + }, + (a) => { + delete a.workflowModelDescriptors[1].adapterAuthoringProfile; + }, + (a) => { + a.pipelineSupport + .find((p) => p.pipelineClass === raw.pipelineClass) + .tasks.find((t) => t.task === raw.task).dependencies = 'missing'; + }, + ]) { + const invalid = structuredClone(authority); + alter(invalid); + assert.ok(adapters.modelSetupAdapterAddUnavailable(chain, invalid)); + assert.throws(() => + adapters.planModelSetupAdapterEdit( + graph, + root.id, + { + kind: 'add', + registry: invalid.nodesRegistry, + values: { model: { source: 'local', value: 'metadata-only.safetensors' } }, + }, + invalid, + ), + ); + assert.deepEqual(graph, before); + } +}); + +test('fresh declared evaluation drafts attach the current optional enhancement offer after ordinary output completion', async () => { + const authority = await evaluationImageAuthority(); + const raw = structuredClone(evaluationImageFixture.starter); + const profile = evaluationImageFixture.evaluationAuthoring.executionProfiles.find( + (p) => p.pipeline_class === raw.pipelineClass, + ); + const selected = requests.parseOperationStarter(raw, raw.pipelineClass, raw.task, authority.operationContracts, { + executionProfileId: profile.id, + repository: profile.default_repo, + authoringRecipeId: raw.authoring.id, + }); + const registry = Object.fromEntries(selected.nodes.map((node) => [node.operation.nodeKey, node.node])); + registry['modules.Image.Preview'] = { + type: 'custom', + module: 'modules.Image', + action: 'Preview', + category: 'image', + label: 'Preview', + params: { image: { type: 'image', display: 'input' } }, + }; + const before = structuredClone(selected); + const draft = drafts.createWorkflowDraft(selected, registry); + const { unpackVisualOperationGroups } = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const { promptEnhancementParentFromHint } = await server.ssrLoadModule('/src/studio/promptEnhancementAuthoring.ts'); + const unpacked = unpackVisualOperationGroups(draft.graph).graph; + const offered = unpacked.nodes.filter((node) => promptEnhancementParentFromHint(node.data.operationAuthoring)); + assert.equal(offered.length, 1); + const offer = promptEnhancementParentFromHint(offered[0].data.operationAuthoring); + assert.equal(offer.parent.authoringRecipeId, raw.authoring.id); + assert.equal(offer.parent.authoringContentHash, raw.authoring.contentHash); + assert.equal(offer.parent.executionProfileId, profile.id); + assert.ok(unpacked.nodes.some((node) => node.data.module === 'modules.Image' && node.data.action === 'Preview')); + assert.equal( + unpacked.nodes.some((node) => node.data.action === 'GenerateImageVideoText'), + false, + 'An offer does not Enable a provider branch.', + ); + assert.deepEqual(selected, before); +}); + +test('a previously unknown evaluation image model uses the same declared policy parser without a model-name branch', async () => { + const source = evaluationImagePayload(); + const names = new Map([ + ['Flux3ModularPipeline', 'FutureImageModularPipeline'], + ['Flux3DistilledModularPipeline', 'FutureCompactImageModularPipeline'], + ]); + const remap = (value) => + typeof value === 'string' + ? (names.get(value) ?? value) + : Array.isArray(value) + ? value.map(remap) + : value && typeof value === 'object' + ? Object.fromEntries(Object.entries(value).map(([key, item]) => [key, remap(item)])) + : value; + const evaluation = await server.ssrLoadModule('/src/workflow/evaluationAuthoring.ts'); + const parsed = evaluation.parseEvaluationAuthoring( + remap(source), + [], + remap(evaluationImageFixture.operationContracts), + ); + assert.equal(parsed.descriptors.length, 2); + assert.ok(parsed.descriptors.every((row) => row.pipeline.startsWith('Future') && row.adapterAuthoringProfile)); + assert.deepEqual( + parsed.descriptors.map((row) => row.adapterAuthoringProfile.adapterAuthoring), + evaluationImageFixture.evaluationAuthoring.executionProfiles.map((row) => row.adapterAuthoring), + ); +}); + +test('evaluation authoring mock payload declares every operation task before the private namespace is decoded', async () => { + const contracts = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + const catalog = await server.ssrLoadModule('/src/workflow/operationCatalog.ts'); + const evaluation = await server.ssrLoadModule('/src/workflow/evaluationAuthoring.ts'); + const publicStarter = starter(); + const payload = { + ...structuredClone(evaluationImageFixture), + operationContractSchemaVersion: 3, + operationContracts: [ + ...publicStarter.nodes.map((row) => row.operation), + ...evaluationImageFixture.operationContracts, + ], + pipelineSupportSchemaVersion: 1, + pipelineSupport: [ + { + pipelineClass: publicStarter.pipelineClass, + coverage: 'local-adapter', + reason: 'Native authoring fixture; execution unqualified', + equivalentTo: [], + upstreamTasks: [], + tasks: [ + { + task: publicStarter.task, + execution: 'declared', + decomposition: 'stages', + operationIds: publicStarter.nodes.map((row) => row.operation.operationId), + executionProfileIds: [], + dependencies: 'unknown', + runtimeRequirements: [], + }, + ], + }, + ...(evaluationImageFixture.pipelineSupport ?? []), + ], + }; + const operations = contracts.parseOperationContracts( + payload.operationContracts, + payload.operationContractSchemaVersion, + ); + const support = catalog.parsePipelineSupport( + payload.pipelineSupport, + payload.pipelineSupportSchemaVersion, + operations, + ); + const privateRows = support.filter((row) => row.coverage === 'research-blocked'); + assert.equal(privateRows.length, 2); + assert.equal(privateRows.flatMap((row) => row.tasks).length, 4); + assert.ok( + privateRows + .flatMap((row) => row.tasks) + .every((task) => task.dependencies === 'unknown' && task.executionProfileIds.length === 0), + ); + assert.throws( + () => + catalog.parsePipelineSupport( + payload.pipelineSupport.filter((row) => row.coverage !== 'research-blocked'), + 1, + operations, + ), + /Invalid backend operation contract/u, + ); + const decoded = evaluation.parseEvaluationAuthoring(payload, support, operations); + assert.equal(decoded.descriptors.length, 2); + assert.equal( + decoded.support + .filter((row) => privateRows.some((privateRow) => privateRow.pipelineClass === row.pipelineClass)) + .flatMap((row) => row.tasks).length, + 4, + ); +}); + +test('imported runtime option presentation follows current registry availability in both directions without changing the document', async () => { + const options = await server.ssrLoadModule('/src/studio/runtimeOptions.ts'); + const descriptor = (value, available) => ({ + schemaVersion: 1, + value, + label: value, + compatibility: available ? 'compatible' : 'incompatible', + availability: available ? 'installed' : 'unavailable', + installationState: available ? 'installed' : 'unavailable', + ...(available ? {} : { disabledReason: 'Other platform' }), + }); + for (const [savedReady, currentReady] of [ + [false, true], + [true, false], + ]) { + const saved = [descriptor('none', true), descriptor('reviewed-format', savedReady)]; + const current = [ + descriptor('none', true), + descriptor('reviewed-format', currentReady), + descriptor('new-format', true), + ]; + const document = { value: 'none', options: saved, min: 0, hidden: false, source: 'saved', onChange: undefined }; + const original = structuredClone(document); + const presented = options.runtimeOptionEntries(document.options, current); + assert.equal(presented.find((row) => row.value === 'reviewed-format').disabled, !currentReady); + assert.deepEqual( + presented.map((row) => row.value), + ['none', 'reviewed-format'], + 'Current metadata cannot expand authored membership.', + ); + assert.deepEqual(document, original); + const importedOnly = options.runtimeOptionEntries([descriptor('snapshot-only', true)], current); + assert.equal(importedOnly[0].disabled, true, 'An import cannot enable an option absent from the current registry.'); + } +}); + +test('runtime option presentation preserves dynamic authority, dictionary membership and ambiguous-option refusal', async () => { + const options = await server.ssrLoadModule('/src/studio/runtimeOptions.ts'); + const ready = (value) => ({ + schemaVersion: 1, + value, + label: value, + compatibility: 'compatible', + availability: 'installed', + installationState: 'installed', + }); + const saved = { + __formats: 'Formats', + reviewed: { + ...ready('reviewed'), + label: 'Saved label', + group: 'Saved group', + compatibility: 'incompatible', + availability: 'unavailable', + }, + imported: ready('imported'), + }; + const before = structuredClone(saved); + const live = { quantization: { options: [ready('reviewed')] } }; + const presented = options.registeredRuntimeOptionPresentation(saved, 'quantization', live); + assert.deepEqual(Object.keys(presented), Object.keys(saved)); + assert.equal(presented.__formats, 'Formats'); + assert.equal(presented.reviewed.label, 'Saved label'); + assert.equal(presented.reviewed.group, 'Saved group'); + assert.equal(options.runtimeOptionEntries(presented).find((row) => row.value === 'reviewed').disabled, false); + assert.equal(options.runtimeOptionEntries(presented).find((row) => row.value === 'imported').disabled, true); + assert.equal( + options.runtimeOptionEntries([ready('reviewed')], [ready('reviewed'), ready('reviewed')])[0].disabled, + true, + ); + assert.deepEqual(saved, before); + for (const changes of [ + { quantization: { options: live.quantization.options, optionsSource: {} } }, + { other: { onChange: 'refresh_options' } }, + { other: { onSignal: [{ action: 'exec', data: 'refresh_options' }] } }, + { other: { onChange: { action: 'create', data: {} } } }, + { other: { onChange: { action: 'value', target: 'quantization', prop: 'options', data: {} } } }, + ]) { + assert.equal(options.registeredRuntimeOptionPresentation(saved, 'quantization', { ...live, ...changes }), saved); + } + assert.equal(options.registeredRuntimeOptionPresentation(saved, 'quantization', undefined), saved); + assert.deepEqual(options.runtimeOptionEntries(['legacy'], ['new']), options.runtimeOptionEntries(['legacy'])); +}); + +test('only current registry runtime scopes refresh hardware choices across unrelated dynamic actions', async () => { + const options = await server.ssrLoadModule('/src/studio/runtimeOptions.ts'); + const ready = (value, enabled = true) => ({ + schemaVersion: 1, + value, + label: value, + compatibility: enabled ? 'compatible' : 'incompatible', + availability: enabled ? 'installed' : 'unavailable', + installationState: enabled ? 'installed' : 'unavailable', + }); + const saved = [ready('float32'), ready('float16', false)]; + const current = { + dtype: { runtimeOptions: 'availability', options: [ready('float32'), ready('float16'), ready('bfloat16')] }, + model: { onChange: 'opaque_model_schema_action' }, + }; + const shown = options.registeredRuntimeOptionPresentation(saved, 'dtype', current); + assert.deepEqual(options.runtimeOptionValues(shown), ['float32', 'float16']); + assert.deepEqual(saved, [ready('float32'), ready('float16', false)]); + const device = options.registeredRuntimeOptionPresentation([ready('cpu')], 'device', { + device: { runtimeOptions: 'choices', options: [ready('cpu'), ready('cuda:0')] }, + model: { onChange: 'opaque_model_schema_action' }, + }); + assert.deepEqual(options.runtimeOptionValues(device), ['cpu', 'cuda:0']); + assert.equal( + options.registeredRuntimeOptionPresentation(saved, 'dtype', { + ...current, + dtype: { ...current.dtype, optionsSource: {} }, + }), + saved, + 'A dynamic options provider still owns its choices.', + ); +}); + +test('SSD streaming extends an older loading selector only at presentation time', async () => { + const options = await server.ssrLoadModule('/src/studio/runtimeOptions.ts'); + const api = await server.ssrLoadModule('/src/types/api.ts'); + const saved = ['cpu', 'cuda']; + const live = { weight_loading_mode: { runtimeOptions: 'choices', options: ['cpu', 'cuda', 'ssd_stream'] } }; + const presented = options.registeredRuntimeOptionPresentation(saved, 'weight_loading_mode', live); + assert.deepEqual(options.runtimeOptionValues(presented), ['cpu', 'cuda', 'ssd_stream']); + assert.deepEqual(saved, ['cpu', 'cuda']); + assert.equal(options.registeredRuntimeOptionPresentation(saved, 'weight_loading_mode', undefined), saved); + assert.equal(api.isWorkflowResourceValue('weight_loading_mode', 'ssd_stream'), true); + assert.equal(api.isWorkflowResourceValue('weight_loading_mode', 'another-setting'), false); +}); + +test('generic model default weight format requires its exact declared immutable selection', async () => { + const inventory = await server.ssrLoadModule('/src/workflow/workflowModelInventory.ts'); + const model = { + defaultRepo: 'reviewed/future-image', + defaultWeightFormat: 'fp8r', + revisionCandidates: ['a'.repeat(40)], + weightFormatSelections: [ + { + weightFormat: 'fp8r', + repo: 'reviewed/future-image', + revision: 'a'.repeat(40), + downloadFiles: ['model_index.json', 'variants/fp8r/model.safetensors'], + }, + ], + }; + const before = structuredClone(model); + assert.equal(inventory.parseWorkflowModelInventory(model, model.defaultRepo).defaultWeightFormat, 'fp8r'); + assert.deepEqual(model, before); + for (const invalid of [ + { ...model, defaultWeightFormat: null }, + { ...model, defaultWeightFormat: 'unsupported' }, + { ...model, defaultWeightFormat: 'nvfp4' }, + { ...model, defaultWeightFormat: 0 }, + { ...model, defaultWeightFormat: {} }, + { ...model, weightFormatSelections: undefined }, + { ...model, weightFormatSelections: [...model.weightFormatSelections, ...model.weightFormatSelections] }, + { ...model, revisionCandidates: undefined }, + { ...model, revisionCandidates: [] }, + { ...model, revisionCandidates: ['b'.repeat(40)] }, + { ...model, revisionCandidates: ['a'.repeat(40), 'b'.repeat(40)] }, + { ...model, weightFormatSelections: [{ ...model.weightFormatSelections[0], repo: 'other/model' }] }, + { ...model, weightFormatSelections: [{ ...model.weightFormatSelections[0], downloadFiles: [] }] }, + ]) + assert.throws(() => inventory.parseWorkflowModelInventory(invalid, model.defaultRepo), /Invalid workflow model/); + const foreign = inventory.parseWorkflowModelInventory(model, 'another/model'); + assert.equal(foreign.defaultWeightFormat, undefined, 'a sibling repository cannot inherit a default selection'); + const historical = { ...model, defaultWeightFormat: undefined }; + assert.equal(inventory.parseWorkflowModelInventory(historical, model.defaultRepo).defaultWeightFormat, undefined); + assert.equal( + inventory.parseWorkflowModelInventory({ ...historical, defaultWeightFormat: 'native' }, model.defaultRepo) + .defaultWeightFormat, + 'native', + ); +}); + +test('workflow inventory character guards preserve exact control and filename boundaries', async () => { + const inventory = await server.ssrLoadModule('/src/workflow/workflowModelInventory.ts'); + const repo = 'reviewed/future-image'; + const selection = { + weightFormat: 'fp8r', + repo, + revision: 'a'.repeat(40), + downloadFiles: ['weights/model.safetensors'], + }; + const model = { + defaultRepo: repo, + defaultWeightFormat: 'fp8r', + revisionCandidates: [selection.revision], + weightFormatSelections: [selection], + }; + for (const character of ['\u0000', '\u001f', '\u007f', '\u009f']) { + assert.throws( + () => inventory.parseWorkflowModelInventory({ ...model, qualificationStatus: `declared${character}` }, repo), + /Invalid workflow model/, + ); + } + for (const character of ['\u0000', '\u001f', '\u007f', '\u009f', ...'\\:*?[]{}']) { + assert.throws( + () => + inventory.parseWorkflowModelInventory( + { + ...model, + weightFormatSelections: [{ ...selection, downloadFiles: [`weights/model${character}.safetensors`] }], + }, + repo, + ), + /Invalid workflow model/, + ); + } + const allowed = ' !~\u00a0𝄞'; + const parsed = inventory.parseWorkflowModelInventory( + { + ...model, + qualificationStatus: allowed, + weightFormatSelections: [{ ...selection, downloadFiles: [`weights/model${allowed}.safetensors`] }], + }, + repo, + ); + assert.equal(parsed.qualificationStatus, allowed); + assert.equal(parsed.defaultWeightFormat, 'fp8r'); + assert.equal(parsed.weightFormatSelections[0].downloadFiles[0], `weights/model${allowed}.safetensors`); +}); + +test('generic public model inventory preserves native defaults and exact additional format Install/Repair selections', async () => { + const inventory = await server.ssrLoadModule('/src/workflow/workflowModelInventory.ts'); + const actual = JSON.parse( + fs.readFileSync(new URL('../tests/fixtures/weight-format-selections.v1.json', import.meta.url), 'utf8'), + ); + for (const row of actual.rows) { + // A future public declaration exercises generic discovery. The file rows + // are the actual backend selector output, not a public/runtime grant for + // the private identities from which that pure fixture was captured. + const model = { + modelType: 'FutureNativePipeline', + label: 'Future image', + defaultRepo: row.repo, + executionStatus: 'expert_only', + qualificationStatus: 'graph-contract-only', + autoEligible: false, + templateEligible: false, + revisionCandidates: [row.revision], + downloadFiles: ['model_index.json', 'transformer/model.safetensors'], + weightFormatSelections: row.weightFormatSelections, + executionProfiles: [ + { + id: 'future-native', + model_type: 'FutureNativePipeline', + pipeline_class: 'FutureNativePipeline', + default_repo: row.repo, + public: true, + }, + ], + }; + const support = [ + { + pipelineClass: model.modelType, + tasks: [ + { + task: 'text_to_image', + operationIds: ['load', 'encode', 'denoise', 'decode'], + executionProfileIds: ['future-native'], + }, + ], + }, + ]; + const payload = { schemaVersion: 2, capabilities: [model] }; + const [descriptor] = choices.parseWorkflowModelDescriptors(payload, support); + assert.ok(descriptor); + const rows = inventory.workflowModelArtifactRows(descriptor); + assert.deepEqual( + inventory.matchingWorkflowModelArtifactRows(descriptor, 'nvfp4').map((item) => item.weightFormat), + ['nvfp4'], + ); + assert.deepEqual(inventory.matchingWorkflowModelArtifactRows(descriptor, 'unrelated'), []); + assert.equal(inventory.matchingWorkflowModelArtifactRows(descriptor, '').length, 3); + + assert.deepEqual( + rows.map((item) => item.weightFormat), + ['native', 'fp8r', 'nvfp4'], + ); + assert.equal(new Set(rows.map((item) => item.id)).size, 3); + assert.deepEqual(rows[0].selection.downloadFiles, model.downloadFiles); + for (const [index, format] of rows.entries()) { + const state = inventory.workflowModelArtifactStatus(format, descriptor, [], [], null); + assert.equal(state.installTarget.actionLabel, 'Install'); + assert.equal(state.installTarget.repo, index ? row.weightFormatSelections[index - 1].repo : row.repo); + assert.equal(state.installTarget.revision, row.revision); + assert.deepEqual(state.installTarget.files, format.selection.downloadFiles); + assert.notEqual(state.installTarget.files, format.selection.downloadFiles); + assert.match(state.reason, /readiness.*separately/); + assert.equal(descriptor.autoEligible, undefined); + assert.equal(descriptor.templateEligible, undefined); + } + const [native, fp8] = rows; + const nativeCache = [ + { + id: row.repo, + complete: true, + installed: true, + planned_revision: row.revision, + planned_files: native.selection.downloadFiles, + }, + ]; + const repair = inventory.workflowModelArtifactStatus(fp8, descriptor, nativeCache, [], null); + assert.equal(repair.installTarget.actionLabel, 'Repair'); + assert.deepEqual(repair.installTarget.files, row.weightFormatSelections[0].downloadFiles); + const installed = inventory.workflowModelArtifactStatus( + fp8, + descriptor, + [{ ...nativeCache[0], planned_files: fp8.selection.downloadFiles }], + [], + null, + ); + assert.equal(installed.status.runnable, true); + assert.equal(installed.installTarget, null); + assert.match(installed.reason, /Execution readiness still depends/); + const privatePayload = structuredClone(payload); + privatePayload.capabilities[0].executionProfiles[0].public = false; + privatePayload.capabilities[0].weightFormatSelections = [{ malicious: true }]; + assert.deepEqual(choices.parseWorkflowModelDescriptors(privatePayload, support), []); + assert.deepEqual(choices.parseWorkflowModelDescriptors(payload, []), []); + const foreignRepository = structuredClone(payload); + foreignRepository.capabilities[0].executionProfiles[0].default_repo = 'another/model'; + const [foreignDescriptor] = choices.parseWorkflowModelDescriptors(foreignRepository, support); + assert.equal(foreignDescriptor.inventory.nativeSelection, undefined); + assert.equal(foreignDescriptor.inventory.weightFormatSelections, undefined); + assert.deepEqual( + inventory.workflowModelArtifactRows(foreignDescriptor).map((item) => item.weightFormat), + ['native'], + ); + assert.equal( + inventory.workflowModelArtifactStatus( + inventory.workflowModelArtifactRows(foreignDescriptor)[0], + foreignDescriptor, + [], + [], + null, + ).installTarget, + null, + ); + assert.deepEqual( + choices.parseWorkflowModelDescriptors( + { ...payload, capabilities: [{ ...model, executionProfiles: [] }] }, + support, + ), + [], + ); + const requirement = { + schemaVersion: 1, + delivery: 'optional_overlay', + requiredNow: true, + profileIds: ['reviewed-runtime'], + executionProfileIds: ['future-native'], + state: 'missing', + reason: 'runtime_missing', + }; + const runtimeDescriptor = { + ...descriptor, + inventory: { ...descriptor.inventory, optionalRuntimeRequirement: requirement }, + }; + const blocked = inventory.workflowModelArtifactStatus(fp8, runtimeDescriptor, [], [], null); + assert.equal(blocked.installTarget, null); + assert.match(blocked.reason, /runtime is missing/); + runtimeDescriptor.inventory.optionalRuntimeRequirement.state = 'active'; + assert.ok(inventory.workflowModelArtifactStatus(fp8, runtimeDescriptor, [], [], null).installTarget); + const rowComponent = (await server.ssrLoadModule('/src/components/WorkflowModelInventoryRow.tsx')).default; + const markup = renderToStaticMarkup( + React.createElement(rowComponent, { + descriptor, + cache: [], + local: [], + diagnostics: null, + installProgress: {}, + activeInstallCount: 0, + hfTokenConfigured: true, + onConfigureHfToken: () => {}, + onInstall: async () => {}, + }), + ); + assert.match(markup, /Weight format for Future image/); + assert.match(markup, /Native/); + assert.match(markup, /Install/); + assert.doesNotMatch(markup, />Ready { + const inventory = await server.ssrLoadModule('/src/workflow/workflowModelInventory.ts'); + const valid = { + weightFormat: 'fp8r', + repo: 'owner/model', + revision: 'a'.repeat(40), + downloadFiles: ['config.json', 'variants/fp8r/model.safetensors'], + }; + assert.equal(inventory.parseWeightFormatSelections(undefined), undefined); + assert.deepEqual(inventory.parseWeightFormatSelections([valid]), [valid]); + for (const malformed of [ + null, + {}, + [], + [valid, valid], + [valid, { ...valid, weightFormat: 'nvfp4' }, valid], + ...['native', ['fp8r'], null, true, 'FP8R'].map((weightFormat) => [{ ...valid, weightFormat }]), + ...['main', 'A'.repeat(40), '', null].map((revision) => [{ ...valid, revision }]), + ...['../model', 'owner/model/extra', '/owner/model', ['owner/model']].map((repo) => [{ ...valid, repo }]), + ...[ + [], + ['../model'], + ['/model'], + ['a//b'], + ['a/./b'], + ['a\\b'], + ['*.safetensors'], + ['a?.json'], + ['a\u0000b'], + ['same', 'same'], + ].map((downloadFiles) => [{ ...valid, downloadFiles }]), + [{ ...valid, unexpected: true }], + [{ ...valid, sourceId: 'foreign' }], + ]) + assert.throws(() => inventory.parseWeightFormatSelections(malformed), /artifact selection/); + for (const entry of [ + Object.defineProperty({ ...valid }, 'repo', { + get() { + throw new Error('must not execute'); + }, + enumerable: true, + }), + Object.defineProperty({ ...valid }, 'hidden', { value: true }), + { ...valid, [Symbol('foreign')]: true }, + Object.assign(Object.create(valid), { weightFormat: 'fp8r' }), + ]) + assert.throws(() => inventory.parseWeightFormatSelections([entry]), /artifact selection/); + assert.equal(inventory.parseWorkflowModelInventory({}, 'owner/model'), undefined); + assert.deepEqual( + inventory + .workflowModelArtifactRows({ profileId: 'old', repo: 'owner/model', label: 'Old' }) + .map((row) => row.weightFormat), + ['native'], + ); + assert.equal( + inventory.workflowModelArtifactStatus( + inventory.workflowModelArtifactRows({ profileId: 'old', repo: 'owner/model', label: 'Old' })[0], + { repo: 'owner/model', label: 'Old' }, + [], + [], + null, + ).installTarget, + null, + ); + for (const executionStatus of [['supported'], true, 'unqualified', null]) + assert.throws( + () => inventory.parseWorkflowModelInventory({ executionStatus }, 'owner/model'), + /artifact selection/, + ); + assert.throws( + () => inventory.parseWorkflowModelInventory({ optionalRuntimeRequirement: { state: 'active' } }, 'owner/model'), + /runtime contract/, + ); +}); + +for (const prefix of ['node-', '_', '-']) { + test(`native saved ordinary Block supports atomic model replacement with ${prefix} identities`, async () => { + const { createUserBlockFromSelection, createUserBlockNode } = + await server.ssrLoadModule('/src/studio/userBlocks.ts'); + const { prepareOperationBlockGraph, planOwnerBlockOperationChange } = await server.ssrLoadModule( + '/src/workflow/operationLegacyBlockChange.ts', + ); + const { useUserBlockStore } = await server.ssrLoadModule('/src/stores/useUserBlockStore.ts'); + const { useFlowStore } = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + const studio = await server.ssrLoadModule('/src/stores/useStudioStore.ts'); + const { commitOperationGraph } = await server.ssrLoadModule('/src/workflow/operationGraphTransaction.ts'); + const runtime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); + const { remapOperationAuthoring } = await server.ssrLoadModule('/src/workflow/operationSharedInputs.ts'); + const old = seededStarter(true); + Object.assign(old.nodes[0].node.params, { + repo_id: { type: 'string', display: 'text', value: 'test/base' }, + revision: { type: 'string', display: 'text', value: 'a'.repeat(40) }, + }); + const draft = authoring.createOperationStarter(old, { x: 80, y: 80 }); + const ids = new Map(draft.nodes.map((node, index) => [node.id, `${prefix}${index}`])); + draft.nodes = draft.nodes.map((node) => ({ + ...node, + id: ids.get(node.id), + selected: true, + data: { + ...node.data, + operationAuthoring: remapOperationAuthoring(node.data.operationAuthoring, (id) => ids.get(id) ?? id), + }, + })); + draft.edges = draft.edges.map((edge) => ({ ...edge, source: ids.get(edge.source), target: ids.get(edge.target) })); + draft.nodes[1].data.params.prompt.value = 'Keep this carefully edited prompt'; + const saved = createUserBlockFromSelection(draft, 'Saved ordinary graph'); + assert.equal(saved.ok, true); + const savedSnapshot = structuredClone(saved.block); + const root = createUserBlockNode(saved.block, { x: 300, y: 200 }, `${prefix}instance`); + const graph = { nodes: [root], edges: [] }; + const snapshot = structuredClone(graph); + const library = structuredClone(useUserBlockStore.getState().blocks); + assert.equal(root.data.blockInstanceV2, undefined, 'exercise the actual v1 Save path'); + const prepared = prepareOperationBlockGraph(graph, root.id); + const loader = prepared.root.data.blockInstanceV2.effectiveGraph.nodes.find( + (node) => node.data.operationAuthoring?.operation.decomposition === 'loader', + ); + const { operationModelSource } = await server.ssrLoadModule('/src/workflow/operationModelSource.ts'); + const control = prepared.root.data.blockInstanceV2.effectiveInterface.controls.find( + (c) => c.binding.nodeId === loader.nodeId && c.binding.fieldId === 'repo_id', ); assert.ok(control, 'model is exposed on the saved Block'); const legacyOwner = operationModelSource(root, control.controlId); @@ -1928,6 +3808,78 @@ test('integrated model operations author, parse and replace without a synthetic ); }); +test('implementation changes reconnect uniquely declared media aliases and retain ambiguous branches for review', () => { + for (const media of ['image', 'audio', 'video']) + for (const ambiguous of [false, true]) { + const old = starter('OldMediaPipeline'); + const output = (entry, name) => { + entry.node.params[name] = { type: media, display: 'output' }; + entry.operation.ports.push({ + name, + semanticName: name, + direction: 'output', + roles: ['value'], + types: [media], + required: false, + hidden: false, + semantics: { kind: 'media', scope: null, state: null, owner: 'none', members: [] }, + }); + }; + output(old.nodes[1], 'decoded_result'); + const next = structuredClone(old); + next.pipelineClass = 'NewMediaPipeline'; + for (const entry of next.nodes) { + entry.operation.pipelineClass = next.pipelineClass; + entry.operation.binding.pipelineClass = next.pipelineClass; + } + next.nodes[0].operation.binding.values.pipeline_class = next.pipelineClass; + const generation = next.nodes[1]; + generation.operation.operationId = 'diffusion.generate_media'; + generation.operation.nodeType = 'pipeline'; + generation.operation.decomposition = 'pipeline'; + generation.operation.blockName = null; + generation.operation.ports = generation.operation.ports.filter((p) => p.name !== 'decoded_result'); + delete generation.node.params.decoded_result; + output(generation, 'generated_media_out'); + if (ambiguous) output(generation, 'alternate_media_out'); + next.edges[0].target = generation.operation.operationId; + const graph = authoring.createOperationStarter(old, { x: 80, y: 120 }); + const owner = graph.nodes[0]; + graph.nodes.push({ + id: 'external-output', + type: 'custom', + position: { x: 1500, y: 120 }, + data: { + module: 'custom.Output', + action: 'Preview', + label: 'Keep this output', + params: { media: { type: media, display: 'input' } }, + }, + }); + graph.edges.push({ + id: 'retained-output-wire', + source: graph.nodes[1].id, + sourceHandle: 'decoded_result', + target: 'external-output', + targetHandle: 'media', + }); + const before = structuredClone(graph); + const plan = authoring.planOperationChange(graph, owner.id, next, { replaceModel: true }); + assert.deepEqual(graph, before); + const wire = plan.graph.edges.find((e) => e.target === 'external-output'); + assert.equal(Boolean(wire), !ambiguous, media); + if (wire) assert.equal(wire.sourceHandle, 'generated_media_out'); + assert.equal( + plan.review.attention.some((text) => text.includes('cannot be reconnected')), + ambiguous, + ); + assert.deepEqual( + plan.graph.nodes.find((n) => n.id === 'external-output'), + graph.nodes.at(-1), + ); + } +}); + test('pristine route replacement reconnects preview across decomposition and refuses authored graphs', () => { const old = starter(); const output = { type: 'image', display: 'output' }; @@ -2216,6 +4168,683 @@ test('a whole-pipeline round trip restores custom text to the dedicated prompt s assert.equal(returned.graph.nodes.find((node) => node.id === wire.target).data.params.prompt.isInput, false); }); +function declaredGuidance(pipeline = 'FuturePipeline', options = {}) { + const item = starter(pipeline); + const node = item.nodes[1]; + const controls = { + guider: { type: 'string', display: 'select', value: 'ClassifierFreeGuidance' }, + enabled: { type: 'boolean', display: 'switch', value: true }, + use_original_formulation: { type: 'boolean', display: 'switch', value: false }, + guidance_scale: { type: 'float', display: 'number', value: 3.5 }, + }; + Object.assign(node.node.params, controls); + const control = { + technique: 'classifier_free', + parameter: 'scale', + compatibilityScope: 'diffusers.classifier_free.v1', + scaleMeaning: 'cfg_prediction_mix', + enabled: 'boolean_field', + enabledField: 'enabled', + formulation: 'boolean_field', + formulationField: 'use_original_formulation', + selectorField: 'guider', + selectorValue: 'ClassifierFreeGuidance', + negativeConditioning: 'pipeline_scoped_when_enabled', + negativeConditioningScope: pipeline, + ...options, + }; + for (const [name, field] of Object.entries(controls)) { + node.operation.ports.push({ + name, + semanticName: name, + direction: 'input', + roles: ['value'], + types: [field.type], + required: false, + hidden: false, + semantics: { + kind: 'value', + scope: null, + state: null, + owner: 'none', + members: [], + ...(name === 'guidance_scale' ? { control } : {}), + }, + }); + } + return item; +} + +test('an unchanged route attachment retains authored hidden runtime values while a new task adopts its defaults', () => { + const recipe = starter(); + recipe.nodes[0].node.params.repo_id = { + type: 'model', + display: 'modelselect', + value: { source: 'hub', value: 'org/model' }, + }; + for (const stage of recipe.nodes) { + stage.node.params.runtime_variant = { + type: 'string', + display: 'select', + hidden: true, + options: ['native', 'compatible'], + value: 'native', + }; + stage.operation.ports.push({ + name: 'runtime_variant', + semanticName: 'runtime_variant', + direction: 'input', + roles: ['value'], + types: ['string'], + required: false, + hidden: true, + semantics: { kind: 'value', scope: null, state: null, owner: 'none', members: [] }, + }); + } + const graph = authoring.createOperationStarter(recipe, { x: 0, y: 0 }); + graph.nodes.forEach((node) => { + node.data.params.runtime_variant.value = 'compatible'; + }); + const preserved = authoring.planOperationChange(graph, graph.nodes[0].id, recipe, { preserveValues: true }); + assert.ok(preserved.graph.nodes.every((node) => node.data.params.runtime_variant.value === 'compatible')); + const nextTask = structuredClone(recipe); + nextTask.task = 'image_to_image'; + nextTask.workflowId = 'image_to_image'; + for (const stage of nextTask.nodes) { + stage.operation.task = nextTask.task; + stage.operation.workflowId = nextTask.workflowId; + } + const changed = authoring.planOperationChange(graph, graph.nodes[0].id, nextTask, { preserveValues: true }); + assert.ok(changed.graph.nodes.every((node) => node.data.params.runtime_variant.value === 'native')); + const nextModel = structuredClone(recipe); + nextModel.nodes[0].node.params.repo_id.value = { source: 'hub', value: 'org/other-model' }; + const replaced = authoring.planOperationChange(graph, graph.nodes[0].id, nextModel, { + preserveValues: true, + replaceModel: true, + }); + assert.ok(replaced.graph.nodes.every((node) => node.data.params.runtime_variant.value === 'native')); + const rebound = structuredClone(recipe); + for (const stage of rebound.nodes) { + stage.operation.binding = { ...stage.operation.binding, values: { runtime_variant: 'native' } }; + } + const bound = authoring.planOperationChange(graph, graph.nodes[0].id, rebound, { preserveValues: true }); + assert.ok(bound.graph.nodes.every((node) => node.data.params.runtime_variant.value === 'native')); + const reset = authoring.planOperationChange(graph, graph.nodes[0].id, recipe, { + preserveValues: true, + restoreDefaults: true, + }); + assert.ok(reset.graph.nodes.every((node) => node.data.params.runtime_variant.value === 'native')); + for (const [sourceSelector, targetSelector, expected] of [ + [{ source: 'local', value: '/models/model' }, { source: 'local', value: '/models/model' }, 'compatible'], + ['org/model', 'org/model', 'compatible'], + [{ source: 'hub', value: 'org/model' }, { source: 'local', value: 'org/model' }, 'native'], + [{ source: 'unknown', value: 'org/model' }, { source: 'unknown', value: 'org/model' }, 'native'], + [{ source: 'hub', value: ' ' }, { source: 'hub', value: ' ' }, 'native'], + [{ source: 'hub', value: ['org/model'] }, { source: 'hub', value: ['org/model'] }, 'native'], + [ + { source: 'hub', value: 'org/model', sha256: 'old' }, + { source: 'hub', value: 'org/model', sha256: 'new' }, + 'native', + ], + ]) { + const source = structuredClone(graph); + source.nodes[0].data.params.repo_id.value = sourceSelector; + const target = structuredClone(recipe); + target.nodes[0].node.params.repo_id.value = targetSelector; + const result = authoring.planOperationChange(source, source.nodes[0].id, target, { preserveValues: true }); + assert.ok( + result.graph.nodes.every((node) => node.data.params.runtime_variant.value === expected), + `Exact durable owner identity: ${JSON.stringify([sourceSelector, targetSelector])}`, + ); + } +}); + +function archivedHiddenRuntimeFixture() { + const recipe = starter(); + recipe.nodes[0].node.params.repo_id = { + type: 'model', + display: 'modelselect', + value: { source: 'hub', value: 'org/model' }, + }; + for (const stage of recipe.nodes) { + stage.node.params.runtime_variant = { + type: 'string', + display: 'select', + hidden: true, + options: ['native', 'compatible'], + value: 'native', + }; + stage.operation.ports.push({ + name: 'runtime_variant', + semanticName: 'runtime_variant', + direction: 'input', + roles: ['value'], + types: ['string'], + required: false, + hidden: true, + semantics: { kind: 'value', scope: null, state: null, owner: 'none', members: [] }, + }); + } + const graph = authoring.createOperationStarter(recipe, { x: 0, y: 0 }); + graph.nodes.forEach((node) => { + node.data.params.runtime_variant.value = 'compatible'; + }); + const next = structuredClone(recipe); + next.task = next.workflowId = 'image_to_image'; + for (const stage of next.nodes) stage.operation.task = stage.operation.workflowId = next.task; + const away = authoring.planOperationChange(graph, graph.nodes[0].id, next).graph; + const owner = away.nodes.find((node) => node.data.action === 'Load'); + return { recipe, away, owner, archive: owner.data.operationAuthoring.inactiveDrafts[0] }; +} + +test('exact archived route return restores its authored hidden runtime literals together', () => { + const { recipe, away, owner } = archivedHiddenRuntimeFixture(); + const before = structuredClone(away); + const returned = authoring.planOperationChange(away, owner.id, recipe); + assert.ok(returned.graph.nodes.every((node) => node.data.params.runtime_variant.value === 'compatible')); + assert.ok(returned.review.preserved.some((message) => /runtime settings.*inactive draft/i.test(message))); + assert.deepEqual(away, before, 'return preview must not alter the archive or current workflow'); + const reset = authoring.planOperationChange(away, owner.id, recipe, { restoreDefaults: true }); + assert.ok(reset.graph.nodes.every((node) => node.data.params.runtime_variant.value === 'native')); +}); + +test('bound hidden identity selectors stay under fresh binding authority during runtime draft recovery', () => { + const { recipe, away, owner, archive } = archivedHiddenRuntimeFixture(); + for (const [index, stage] of recipe.nodes.entries()) { + stage.node.params.bound_identity = { type: 'string', hidden: true, value: 'exact' }; + stage.operation.binding.values.bound_identity = 'exact'; + stage.operation.ports.push({ + name: 'bound_identity', + semanticName: 'bound_identity', + direction: 'input', + roles: ['value'], + types: ['string'], + required: false, + hidden: true, + semantics: { kind: 'value', scope: null, state: null, owner: 'none', members: [] }, + }); + archive.nodes[index].data.operationAuthoring.operation = structuredClone(stage.operation); + archive.nodes[index].data.params.bound_identity = { ...stage.node.params.bound_identity, value: 'stale' }; + archive.nodes[index].data.operationAuthoring.authored = ['runtime_variant', 'bound_identity']; + } + const returned = authoring.planOperationChange(away, owner.id, recipe); + assert.ok(returned.graph.nodes.every((node) => node.data.params.runtime_variant.value === 'compatible')); + assert.ok(returned.graph.nodes.every((node) => node.data.params.bound_identity.value === 'exact')); +}); + +test('regrouping unchanged stages and returning to their snapshot derives the actual customization state', async () => { + const visual = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const runtime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); + const ordinary = graph(); + const grouped = visual.groupVisualStages(ordinary, [ordinary.nodes[1].id], 'inputs'); + const initial = structuredClone(grouped); + const root = grouped.nodes.find((node) => node.data.blockInstanceV2); + const same = visual.groupVisualStages(ordinary, [ordinary.nodes[1].id], 'inputs', root); + const sameInstance = same.nodes.find((node) => node.id === root.id).data.blockInstanceV2; + assert.equal(sameInstance.customization.state, 'unchanged'); + assert.deepEqual(sameInstance.definitionSnapshot, root.data.blockInstanceV2.definitionSnapshot); + assert.deepEqual(sameInstance.effectiveGraph, root.data.blockInstanceV2.effectiveGraph); + + const promptControl = root.data.blockInstanceV2.effectiveInterface.controls.find( + (control) => control.binding.fieldId === 'prompt', + ); + const parameterEdit = structuredClone(grouped); + const parameterRoot = parameterEdit.nodes.find((node) => node.id === root.id); + parameterRoot.data.blockInstanceV2 = runtime.setBlockInstanceValueV2( + parameterRoot.data.blockInstanceV2, + promptControl.controlId, + 'Public override', + ); + assert.equal(parameterRoot.data.blockInstanceV2.customization.state, 'parameters_changed'); + const parameterUnpacked = visual.unpackVisualOperationGroups(parameterEdit); + const parameterRegrouped = visual.restoreVisualOperationGroups(parameterUnpacked.graph, parameterUnpacked); + assert.equal( + visual.unpackVisualOperationGroups(parameterRegrouped).graph.nodes.find((node) => node.data.action === 'Denoise') + .data.params.prompt.value, + 'Public override', + 'regrouping materializes and keeps the public parameter override', + ); + assert.equal( + parameterRegrouped.nodes.find((node) => node.id === root.id).data.blockInstanceV2.customization.state, + 'structure_changed', + 'materialized parameter overrides differ from the immutable base graph', + ); + + const changed = structuredClone(ordinary); + changed.nodes.find((node) => node.data.action === 'Denoise').data.params.prompt.value = 'Changed prompt'; + const edited = visual.groupVisualStages(changed, [ordinary.nodes[1].id], 'inputs', root); + assert.equal( + edited.nodes.find((node) => node.id === root.id).data.blockInstanceV2.customization.state, + 'structure_changed', + ); + const restored = visual.groupVisualStages( + ordinary, + [ordinary.nodes[1].id], + 'inputs', + edited.nodes.find((node) => node.id === root.id), + ); + const restoredInstance = restored.nodes.find((node) => node.id === root.id).data.blockInstanceV2; + assert.equal(restoredInstance.customization.state, 'unchanged'); + assert.deepEqual(restoredInstance.definitionSnapshot, root.data.blockInstanceV2.definitionSnapshot); + assert.deepEqual(restoredInstance.effectiveGraph, root.data.blockInstanceV2.effectiveGraph); + assert.deepEqual(grouped, initial, 'regrouping never mutates the reusable snapshot or original instance'); +}); + +for (const [name, change] of [ + [ + 'another archived owner', + ({ archive }) => { + archive.nodes[0].data.params.repo_id.value = { source: 'hub', value: 'org/other' }; + }, + ], + [ + 'another archived revision', + ({ archive }) => { + archive.nodes[0].data.params.revision = { type: 'string', value: 'other' }; + }, + ], + [ + 'another archived task', + ({ archive }) => { + archive.nodes[0].data.operationAuthoring.operation.task = 'outpaint'; + }, + ], + [ + 'changed archived binding', + ({ archive }) => { + archive.nodes[1].data.operationAuthoring.operation.binding.values.other = 'bound'; + }, + ], + [ + 'changed archived value port', + ({ archive }) => { + archive.nodes[1].data.operationAuthoring.operation.ports.find((p) => p.name === 'runtime_variant').semanticName = + 'another_runtime'; + }, + ], + [ + 'changed destination visibility', + ({ recipe }) => { + recipe.nodes[1].node.params.runtime_variant.hidden = false; + }, + ], + [ + 'changed destination type', + ({ recipe }) => { + recipe.nodes[1].node.params.runtime_variant.type = 'int'; + }, + ], + [ + 'rejected destination value', + ({ recipe }) => { + recipe.nodes[1].node.params.runtime_variant.options = ['native']; + }, + ], + [ + 'archived runtime wire', + ({ archive }) => { + archive.edges.push({ + id: 'runtime-wire', + source: 'external', + sourceHandle: 'value', + target: archive.nodes[1].id, + targetHandle: 'runtime_variant', + }); + }, + ], + [ + 'archived connected marker', + ({ archive }) => { + archive.nodes[1].data.params.runtime_variant.isConnected = true; + }, + ], + [ + 'fresh runtime wire', + ({ recipe }) => { + recipe.edges.push({ + source: 'diffusion.load_models', + sourceHandle: 'models', + target: 'diffusion.denoise', + targetHandle: 'runtime_variant', + }); + }, + ], + [ + 'removed destination runtime port', + ({ recipe }) => { + recipe.nodes[1].operation.ports = recipe.nodes[1].operation.ports.filter((p) => p.name !== 'runtime_variant'); + }, + ], + [ + 'fresh connected marker', + ({ recipe }) => { + recipe.nodes[1].node.params.runtime_variant.isConnected = true; + }, + ], + [ + 'new bound runtime selector', + ({ recipe }) => { + recipe.nodes[1].operation.binding.values.runtime_variant = 'native'; + }, + ], +]) + test(`archived hidden runtime restoration is atomic and reviewed with ${name}`, () => { + const value = archivedHiddenRuntimeFixture(); + change(value); + const before = structuredClone(value.away); + const result = authoring.planOperationChange(value.away, value.owner.id, value.recipe); + assert.ok(result.graph.nodes.every((node) => node.data.params.runtime_variant.value === 'native')); + assert.equal(result.review.required, true); + assert.ok(result.review.attention.some((message) => /runtime settings.*archived.*defaults/i.test(message))); + assert.deepEqual(value.away, before, 'failed restoration keeps the original archive intact'); + }); + +test('explicitly compatible CFG settings transfer across families without moving conditioning ownership', () => { + const source = authoring.createOperationStarter(declaredGuidance(), { x: 0, y: 0 }); + source.nodes[1].data.params.guidance_scale.value = 7; + const before = structuredClone(source); + const changed = authoring.planOperationChange(source, source.nodes[0].id, declaredGuidance('OtherPipeline')); + const stage = changed.graph.nodes.find((node) => node.data.action === 'Denoise'); + assert.equal(stage.data.params.guidance_scale.value, 7); + assert.equal(stage.data.operationAuthoring.retained.length, 0); + assert.equal( + stage.data.operationAuthoring.operation.ports.find((p) => p.name === 'guidance_scale').semantics.control + .negativeConditioningScope, + 'OtherPipeline', + ); + assert.deepEqual(source, before, 'Preview does not mutate the original workflow.'); +}); + +test('reviewed control aliases transfer by declared meaning rather than field labels', () => { + const source = authoring.createOperationStarter(declaredGuidance(), { x: 0, y: 0 }); + source.nodes[1].data.params.guidance_scale.value = 7; + const target = declaredGuidance('OtherPipeline'); + const node = target.nodes[1]; + node.node.params.true_cfg_scale = node.node.params.guidance_scale; + delete node.node.params.guidance_scale; + const port = node.operation.ports.find((p) => p.name === 'guidance_scale'); + port.name = 'true_cfg_scale'; + port.semanticName = 'true_cfg_scale'; + const changed = authoring.planOperationChange(source, source.nodes[0].id, target); + const stage = changed.graph.nodes.find((node) => node.data.action === 'Denoise'); + assert.equal(stage.data.params.true_cfg_scale.value, 7); + assert.equal(stage.data.operationAuthoring.retained.length, 0); +}); + +test('unchanged model attachment preserves unresolved distilled values and wires without authorizing model transfer', () => { + const recipe = declaredGuidance(); + recipe.nodes[0].node.params.repo_id = { + type: 'model', + display: 'modelselect', + value: { source: 'hub', value: 'org/model' }, + }; + recipe.nodes[1].operation.ports.find((p) => p.name === 'guidance_scale').semantics.control.enabled = 'model_config'; + recipe.nodes[1].operation.ports.find((p) => p.name === 'guidance_scale').semantics.control.enabledField = null; + const source = authoring.createOperationStarter(recipe, { x: 0, y: 0 }); + source.nodes[1].data.params.guidance_scale.value = 7; + source.nodes[1].data.params.guidance_scale.isInput = true; + const input = { + id: 'external-guidance', + type: 'custom', + position: { x: -400, y: 0 }, + data: { + module: 'modules.Test', + action: 'Scalar', + label: 'Guidance value', + params: { value: { type: 'float', display: 'output' } }, + }, + }; + source.nodes.push(input); + source.edges.push({ + id: 'external-guidance-wire', + source: input.id, + sourceHandle: 'value', + target: source.nodes[1].id, + targetHandle: 'guidance_scale', + }); + const preserved = authoring.planOperationChange(source, source.nodes[0].id, recipe, { preserveValues: true }); + assert.equal(preserved.graph.nodes.find((n) => n.data.action === 'Denoise').data.params.guidance_scale.value, 7); + assert.ok(preserved.graph.edges.some((e) => e.id === 'external-guidance-wire')); + const reset = authoring.planOperationChange(source, source.nodes[0].id, recipe, { restoreDefaults: true }); + assert.ok( + reset.graph.edges.some((e) => e.id === 'external-guidance-wire'), + "Resetting unconnected creative defaults preserves the unchanged model's connected distilled control.", + ); + const different = structuredClone(recipe); + different.nodes[0].node.params.repo_id.value = { source: 'hub', value: 'org/other-model' }; + const changed = authoring.planOperationChange(source, source.nodes[0].id, different, { replaceModel: true }); + assert.equal(changed.graph.nodes.find((n) => n.data.action === 'Denoise').data.params.guidance_scale.value, 3.5); + assert.ok(!changed.graph.edges.some((e) => e.id === 'external-guidance-wire')); +}); + +test('empty negative text is a supplied condition, while wired or absent conditioning remains unresolved', () => { + const direct = (negative) => { + const value = declaredGuidance('OtherPipeline', { + negativePromptField: 'negative_prompt', + negativePromptPolicy: 'empty_string_is_condition', + }); + value.nodes[1].node.params.negative_prompt = { type: 'string', display: 'text', value: negative }; + value.nodes[1].operation.ports.push({ + name: 'negative_prompt', + semanticName: 'negative_prompt', + direction: 'input', + roles: ['value'], + types: ['string'], + required: false, + hidden: false, + semantics: { kind: 'value', scope: null, state: null, owner: 'none', members: [] }, + }); + return value; + }; + const source = authoring.createOperationStarter(declaredGuidance(), { x: 0, y: 0 }); + source.nodes[1].data.params.guidance_scale.value = 7; + const supplied = authoring.planOperationChange(source, source.nodes[0].id, direct('')); + assert.equal(supplied.graph.nodes.find((n) => n.data.action === 'Denoise').data.params.guidance_scale.value, 7); + const absent = authoring.planOperationChange(source, source.nodes[0].id, direct(undefined)); + assert.equal(absent.graph.nodes.find((n) => n.data.action === 'Denoise').data.params.guidance_scale.value, 3.5); +}); + +test('a direct-pipeline scale must preserve the effective CFG switch after transfer', () => { + const source = authoring.createOperationStarter(declaredGuidance(), { x: 0, y: 0 }); + source.nodes[1].data.params.guidance_scale.value = 0; + const target = declaredGuidance('OtherPipeline', { enabled: 'scale_gt_one', enabledField: 'guidance_scale' }); + const changed = authoring.planOperationChange(source, source.nodes[0].id, target); + const stage = changed.graph.nodes.find((node) => node.data.action === 'Denoise'); + assert.equal(stage.data.params.guidance_scale.value, 3.5); + assert.ok( + stage.data.operationAuthoring.retained.some((entry) => entry.field === 'guidance_scale' && entry.value === 0), + ); + assert.equal(changed.review.required, true); +}); + +test('wired guidance policy is unresolved even if the inline fallback looks compatible', () => { + const source = authoring.createOperationStarter(declaredGuidance(), { x: 0, y: 0 }); + source.nodes[1].data.params.guidance_scale.value = 7; + source.nodes.push({ + id: 'policy', + type: 'custom', + position: { x: 0, y: 0 }, + data: { + module: 'custom.Policy', + action: 'Value', + params: { value: { display: 'output', type: 'boolean' } }, + }, + }); + source.nodes[1].data.params.enabled.isInput = true; + source.edges.push({ + id: 'enabled-wire', + source: 'policy', + sourceHandle: 'value', + target: source.nodes[1].id, + targetHandle: 'enabled', + }); + const changed = authoring.planOperationChange(source, source.nodes[0].id, declaredGuidance('OtherPipeline')); + const stage = changed.graph.nodes.find((node) => node.data.action === 'Denoise'); + assert.equal(stage.data.params.guidance_scale.value, 3.5); + assert.ok( + stage.data.operationAuthoring.retained.some((entry) => entry.field === 'guidance_scale' && entry.value === 7), + ); + assert.equal(changed.review.required, true); +}); + +test('external CFG scale wiring is preserved only for an explicitly compatible target policy', () => { + const source = authoring.createOperationStarter(declaredGuidance(), { x: 0, y: 0 }); + source.nodes[1].data.params.guidance_scale.value = 7; + source.nodes.push({ + id: 'scale', + type: 'custom', + position: { x: 0, y: 0 }, + data: { + module: 'custom.Scale', + action: 'Value', + params: { value: { display: 'output', type: 'float' } }, + }, + }); + source.nodes[1].data.params.guidance_scale.isInput = true; + source.edges.push({ + id: 'scale-wire', + source: 'scale', + sourceHandle: 'value', + target: source.nodes[1].id, + targetHandle: 'guidance_scale', + }); + const compatible = authoring.planOperationChange(source, source.nodes[0].id, declaredGuidance('OtherPipeline')); + assert.ok(compatible.graph.edges.some((edge) => edge.id === 'scale-wire')); + const target = declaredGuidance('OtherPipeline'); + target.nodes[1].node.params.use_original_formulation.value = true; + const incompatible = authoring.planOperationChange(source, source.nodes[0].id, target); + assert.ok(!incompatible.graph.edges.some((edge) => edge.id === 'scale-wire')); + assert.ok(incompatible.graph.nodes.some((node) => node.id === 'scale')); + assert.equal(incompatible.review.required, true); + assert.ok(incompatible.review.attention.some((message) => /disconnect/i.test(message))); + const threshold = authoring.planOperationChange( + source, + source.nodes[0].id, + declaredGuidance('OtherPipeline', { enabled: 'scale_gt_one', enabledField: 'guidance_scale' }), + ); + assert.ok(!threshold.graph.edges.some((edge) => edge.id === 'scale-wire')); + assert.ok(threshold.graph.nodes.some((node) => node.id === 'scale')); + assert.equal(threshold.review.required, true); + assert.ok(threshold.review.attention.some((message) => /disconnect/i.test(message))); +}); + +test('actual CFG contracts never use a wired scale fallback to prove the destination activation policy', async () => { + const { readFile } = await import('node:fs/promises'); + const fixture = JSON.parse( + await readFile(new URL('../tests/fixtures/guidance-control-contract.v1.json', import.meta.url)), + ); + const { compatibleOperationControlTransfer } = await server.ssrLoadModule( + '/src/workflow/operationControlTransfer.ts', + ); + const contract = (pipeline, nodeKey) => { + const operation = fixture.contracts.find((item) => item.pipelineClass === pipeline && item.nodeKey === nodeKey); + assert.ok(operation); + return operation; + }; + const node = (operation, values) => ({ + id: operation.pipelineClass, + type: 'custom', + position: { x: 0, y: 0 }, + data: { + module: operation.nodeKey.slice(0, operation.nodeKey.lastIndexOf('.')), + action: operation.nodeKey.split('.').at(-1), + params: Object.fromEntries(Object.entries(values).map(([field, value]) => [field, { value }])), + }, + }); + const sourceContract = contract('StableDiffusionXLModularPipeline', 'modules.ModularDiffusers.Guider'); + const targetContract = contract('FluxPipeline', 'modules.DiffusersImage.Generate'); + const nativeContract = contract('FluxModularPipeline', 'modules.ModularDiffusers.Guider'); + const control = (operation) => operation.ports.find((port) => port.name === 'guidance_scale').semantics.control; + const source = node(sourceContract, { + guider: 'ClassifierFreeGuidance', + enabled: true, + use_original_formulation: false, + guidance_scale: 7, + }); + const target = node(targetContract, { guidance_scale: 7, negative_prompt: '' }); + const native = node(nativeContract, { + guider: 'ClassifierFreeGuidance', + enabled: true, + use_original_formulation: false, + guidance_scale: 7, + }); + const compatible = (destination, destinationContract, connected = new Set()) => + compatibleOperationControlTransfer( + source, + 'guidance_scale', + control(sourceContract), + destination, + 'guidance_scale', + control(destinationContract), + connected, + new Set(), + ); + assert.equal(compatible(target, targetContract), true, 'the known literal retains enabled CFG'); + assert.equal( + compatible(target, targetContract, new Set(['guidance_scale'])), + false, + 'a wire can supply zero regardless of its fallback', + ); + assert.equal( + compatible(native, nativeContract, new Set(['guidance_scale'])), + true, + 'native boolean activation does not depend on the unknown scale', + ); + source.data.params.guidance_scale.isConnected = true; + assert.equal(compatible(target, targetContract), false, 'the connected field marker must also stay opaque'); + assert.equal(compatible(native, nativeContract), true); +}); + +for (const [name, change] of [ + [ + 'different formulation', + (item) => { + item.nodes[1].node.params.use_original_formulation.value = true; + }, + ], + [ + 'disabled guidance', + (item) => { + item.nodes[1].node.params.enabled.value = false; + }, + ], + [ + 'another guider technique', + (item) => { + item.nodes[1].node.params.guider.value = 'OtherGuidance'; + }, + ], + [ + 'unknown component enablement', + (item) => { + const control = item.nodes[1].operation.ports.find((p) => p.name === 'guidance_scale').semantics.control; + control.enabled = 'model_config'; + control.enabledField = null; + }, + ], + [ + 'unrelated compatibility scope', + (item) => { + item.nodes[1].operation.ports.find((p) => p.name === 'guidance_scale').semantics.control.compatibilityScope = + 'reviewed.unrelated.v1'; + }, + ], +]) { + test(`guidance transfer retains the edited value for review with ${name}`, () => { + const source = authoring.createOperationStarter(declaredGuidance(), { x: 0, y: 0 }); + source.nodes[1].data.params.guidance_scale.value = 7; + const target = declaredGuidance('OtherPipeline'); + change(target); + const changed = authoring.planOperationChange(source, source.nodes[0].id, target); + const stage = changed.graph.nodes.find((node) => node.data.action === 'Denoise'); + assert.equal(stage.data.params.guidance_scale.value, 3.5); + assert.ok( + stage.data.operationAuthoring.retained.some((entry) => entry.field === 'guidance_scale' && entry.value === 7), + ); + assert.equal(changed.review.required, true); + }); +} + test('matching guidance labels do not establish cross-family guidance semantics', () => { const source = starter(); const target = starter('DistilledPipeline'); diff --git a/scripts/operation-catalog.test.mjs b/scripts/operation-catalog.test.mjs index 982ea3e3..7176b436 100644 --- a/scripts/operation-catalog.test.mjs +++ b/scripts/operation-catalog.test.mjs @@ -1,6 +1,7 @@ import assert from 'node:assert/strict'; import { after, before, test } from 'node:test'; import { createServer } from 'vite'; +import { readFileSync } from 'node:fs'; let server, contracts, catalog; before(async () => { @@ -84,6 +85,132 @@ test('v3 accepts scoped state and exact existing bindings without a family union assert.equal(catalog.operationPortCompatibility(output, value.ports[0]), 'incompatible'); }); +function cfgControl(pipeline = 'FutureModularPipeline') { + return { + technique: 'classifier_free', + parameter: 'scale', + compatibilityScope: 'diffusers.classifier_free.v1', + scaleMeaning: 'cfg_prediction_mix', + enabled: 'boolean_field', + enabledField: 'enabled', + formulation: 'boolean_field', + formulationField: 'use_original_formulation', + selectorField: 'guider', + selectorValue: 'ClassifierFreeGuidance', + negativeConditioning: 'pipeline_scoped_when_enabled', + negativeConditioningScope: pipeline, + }; +} + +function controlledOperation() { + const value = operation(); + value.ports = [ + { + name: 'guidance_scale', + semanticName: 'guidance_scale', + direction: 'input', + roles: ['value'], + types: ['float'], + required: false, + hidden: false, + semantics: { kind: 'value', scope: null, state: null, owner: 'none', members: [], control: cfgControl() }, + }, + ]; + for (const [name, type] of [ + ['guider', 'string'], + ['enabled', 'boolean'], + ['use_original_formulation', 'boolean'], + ]) { + value.ports.push({ + name, + semanticName: name, + direction: 'input', + roles: ['value'], + types: [type], + required: false, + hidden: false, + semantics: { kind: 'value', scope: null, state: null, owner: 'none', members: [] }, + }); + } + return value; +} + +test('v3 accepts additive reviewed control semantics without changing legacy contracts', () => { + const value = controlledOperation(); + assert.deepEqual(contracts.parseOperationContracts([value], 3), [value]); + const legacy = operation(); + assert.deepEqual(contracts.parseOperationContracts([legacy], 3), [legacy]); +}); + +test('the actual backend guidance fixture round-trips all published family policies', () => { + const fixture = JSON.parse( + readFileSync(new URL('../tests/fixtures/guidance-control-contract.v1.json', import.meta.url), 'utf8'), + ); + assert.equal(fixture.schemaVersion, 1); + assert.equal(fixture.contracts.length, 33); + assert.deepEqual(contracts.parseOperationContracts(fixture.contracts, 3), fixture.contracts); + const cfg = fixture.contracts.filter((c) => c.operationId === 'diffusion.guidance'); + assert.equal(cfg.length, 8); + for (const c of cfg) { + const controls = c.ports.filter((p) => p.semantics.control); + assert.equal(controls.length, 7); + for (const port of controls) { + assert.equal(port.semantics.control.technique, 'classifier_free'); + assert.equal(port.semantics.control.negativeConditioningScope, c.binding.pipelineClass); + } + } + for (const c of fixture.contracts.filter((c) => c.operationId === 'diffusion.denoise')) { + const control = c.ports.find((p) => p.name === 'guidance_scale').semantics.control; + assert.equal(control.technique, 'embedded_distilled'); + assert.equal(control.enabled, 'model_config', 'Discovery cannot infer the connected transformer configuration.'); + assert.equal(control.negativeConditioningScope, null); + } + const standard = fixture.contracts.filter((c) => c.decomposition === 'pipeline'); + assert.equal(standard.length, 22); + for (const contract of standard) { + for (const port of contract.ports.filter((p) => p.semantics.control?.technique === 'classifier_free')) { + assert.equal(port.semantics.control.negativePromptField, 'negative_prompt'); + assert.equal(port.semantics.control.negativePromptPolicy, 'empty_string_is_condition'); + } + } +}); + +test('v3 rejects malformed guidance control declarations instead of trusting labels', () => { + for (const mutate of [ + (c) => { + c.technique = 'anything'; + }, + (c) => { + c.parameter = 'pipeline'; + }, + (c) => { + c.compatibilityScope = ''; + }, + (c) => { + c.enabledField = null; + }, + (c) => { + c.formulationField = '__proto__'; + }, + (c) => { + c.selectorValue = null; + }, + (c) => { + c.negativeConditioningScope = 'OtherPipeline'; + }, + (c) => { + c.scaleMeaning = 'distilled_model_embedding'; + }, + (c) => { + c.extra = true; + }, + ]) { + const value = controlledOperation(); + mutate(value.ports[0].semantics.control); + assert.throws(() => contracts.parseOperationContracts([value], 3), /operation contract/i); + } +}); + test('v3 rejects ambiguous bindings, unsafe selectors and malformed semantics', () => { for (const mutate of [ (c) => { @@ -216,3 +343,67 @@ test('integrated model operations keep whole-call discovery and strict v3 identi assert.equal(contracts.operationOwnsModel(undefined), false); assert.throws(() => contracts.parseOperationContracts([{ ...value, nodeType: 'loader' }], 3)); }); + +// Schema tests only; this fixture is not an +// authoring permission, runtime route or model qualification. +function modeOwnerOperation() { + return { + ...operation(), + operationId: 'diffusion.load_models', + nodeKey: 'modules.ModularDiffusers.ModelsLoader', + nodeType: 'loader', + blockName: null, + decomposition: 'loader', + }; +} +test('v3 preserves optional bounded backend execution mode while legacy bindings remain unchanged', () => { + const legacy = modeOwnerOperation(); + assert.deepEqual(contracts.parseOperationContracts([legacy], 3), [legacy]); + assert.equal(Object.hasOwn(contracts.parseOperationContracts([legacy], 3)[0].binding, 'executionMode'), false); + for (const mode of ['text_to_image', 'edit_image', `a${'b'.repeat(63)}`]) { + const value = structuredClone(legacy); + value.binding.executionMode = mode; + assert.deepEqual(contracts.parseOperationContracts([value], 3), [value]); + assert.deepEqual(contracts.parseOperationContracts(JSON.parse(JSON.stringify([value])), 3), [value]); + } +}); +test('v3 rejects malformed present execution modes and preserves exact binding keys', () => { + for (const mode of [ + undefined, + null, + false, + 1, + {}, + [], + '', + 'Edit_Image', + '1edit', + 'edit-image', + 'edit.image', + 'edit_image\n', + ' edit_image', + 'edit_image ', + 'a'.repeat(65), + '__proto__', + 'constructor', + 'prototype', + ]) { + const value = modeOwnerOperation(); + value.binding.executionMode = mode; + assert.throws(() => contracts.parseOperationContracts([value], 3), /Invalid backend operation contract/); + } + const extra = modeOwnerOperation(); + extra.binding.executionMode = 'edit_image'; + extra.binding.unreviewed = true; + assert.throws(() => contracts.parseOperationContracts([extra], 3)); + const inherited = modeOwnerOperation(); + inherited.binding = Object.assign(Object.create({ executionMode: 'edit_image' }), inherited.binding); + const parsed = contracts.parseOperationContracts([inherited], 3)[0]; + assert.equal(Object.hasOwn(parsed.binding, 'executionMode'), false); +}); + +test('v3 rejects execution-mode annotations on non-model-owner contracts', () => { + const value = operation(); + value.binding.executionMode = 'edit_image'; + assert.throws(() => contracts.parseOperationContracts([value], 3), /Invalid backend operation contract/); +}); diff --git a/scripts/operation-component-bundle-inputs.test.mjs b/scripts/operation-component-bundle-inputs.test.mjs new file mode 100644 index 00000000..4c66169f --- /dev/null +++ b/scripts/operation-component-bundle-inputs.test.mjs @@ -0,0 +1,206 @@ +import assert from 'node:assert/strict'; +import { after, before, test } from 'node:test'; +import { readFileSync } from 'node:fs'; +import { createServer } from 'vite'; + +let server, contracts, bundle, required, fixer; +const fixture = JSON.parse( + readFileSync(new URL('../tests/fixtures/qwen-component-bundle-contract.v1.json', import.meta.url)), +); +before(async () => { + server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + contracts = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + bundle = await server.ssrLoadModule('/src/workflow/componentBundleInputs.ts'); + required = await server.ssrLoadModule('/src/studio/requiredGraphInputs.ts'); + fixer = await server.ssrLoadModule('/src/studio/graphFixer.ts'); +}); +after(async () => { + await server?.close(); +}); + +function graphFor(action = 'EncodePrompt') { + const node = (operation, id) => { + const params = Object.fromEntries( + operation.ports.map((port) => [ + port.name, + { + type: port.types.length === 1 ? port.types[0] : port.types, + display: port.direction === 'output' ? 'output' : 'input', + required: port.required, + ...(port.required && port.semantics.kind !== 'component' ? { value: 'supplied' } : {}), + }, + ]), + ); + const parts = operation.nodeKey.split('.'); + return { + id, + type: 'custom', + position: { x: 0, y: 0 }, + data: { + module: parts.slice(0, -1).join('.'), + action: parts.at(-1), + label: parts.at(-1), + params, + operationAuthoring: { schemaVersion: 1, operation: structuredClone(operation), defaults: {}, retained: [] }, + }, + }; + }; + const source = node( + fixture.contracts.find((c) => c.decomposition === 'loader'), + 'loader', + ); + const target = node( + fixture.contracts.find((c) => c.nodeKey.endsWith(`.${action}`)), + 'stage', + ); + return { + nodes: [source, target], + edges: [ + { + id: 'bundle', + source: 'loader', + sourceHandle: 'pipeline_components', + target: 'stage', + targetHandle: 'pipeline_components', + }, + ], + }; +} + +test('the actual backend facade fixture preserves required fields and round-trips typed member alternatives', () => { + assert.equal(fixture.schemaVersion, 1); + assert.equal(fixture.contracts.length, 4); + assert.deepEqual(contracts.parseOperationContracts(fixture.contracts, 3), fixture.contracts); + for (const action of ['EncodePrompt', 'Denoise', 'DecodeLatents']) { + const graph = graphFor(action), + target = graph.nodes[1]; + for (const port of target.data.operationAuthoring.operation.ports.filter((p) => p.semantics.suppliedBy)) { + assert.equal(port.required, true); + assert.equal(bundle.operationInputIsSuppliedByBundle(target, port.name, graph), true); + } + assert.deepEqual(required.inspectRequiredGraphInputs(graph.nodes, graph, {}), []); + const plan = fixer.buildGraphFixPlan({ ...graph, registry: {} }); + assert.ok( + !plan.issues.some((i) => i.kind === 'missing_input' && i.targetNodeId === target.id), + 'Graph Fix agrees that the declared connected bundle supplies the required members.', + ); + } +}); + +for (const [name, mutate] of [ + [ + 'disabled source', + (g) => { + g.nodes[0].data.uiState = { disabled: true }; + }, + ], + [ + 'disabled bundle socket', + (g) => { + g.nodes[1].data.params.pipeline_components.disabled = true; + }, + ], + [ + 'missing member', + (g) => { + const port = g.nodes[0].data.operationAuthoring.operation.ports.find((p) => p.name === 'pipeline_components'); + port.semantics.members = port.semantics.members.filter((m) => m.name !== 'text_encoder'); + }, + ], + [ + 'wrong member type', + (g) => { + g.nodes[0].data.operationAuthoring.operation.ports + .find((p) => p.name === 'pipeline_components') + .semantics.members.forEach((m) => { + m.type = 'WrongComponent'; + }); + }, + ], + [ + 'wrong source scope', + (g) => { + g.nodes[0].data.operationAuthoring.operation.ports.find((p) => p.name === 'pipeline_components').semantics.scope = + 'OtherPipeline'; + }, + ], + [ + 'wrong role', + (g) => { + g.nodes[0].data.operationAuthoring.operation.ports.find((p) => p.name === 'pipeline_components').roles = [ + 'value', + ]; + }, + ], + [ + 'wildcard socket', + (g) => { + g.nodes[0].data.params.pipeline_components.type = 'any'; + }, + ], + [ + 'missing wire', + (g) => { + g.edges = []; + }, + ], + [ + 'duplicate supplier', + (g) => { + g.edges.push({ ...g.edges[0], id: 'second' }); + }, + ], +]) { + test(`${name} does not satisfy required components or suppress their readiness finding`, () => { + const graph = graphFor(); + mutate(graph); + assert.equal(bundle.operationInputIsSuppliedByBundle(graph.nodes[1], 'text_encoders', graph), false); + assert.ok(required.inspectRequiredGraphInputs(graph.nodes, graph, {}).some((i) => i.fieldId === 'text_encoders')); + }); +} + +test('hiding a connected declared bundle is presentation; inspection preserves the graph', () => { + const graph = graphFor(); + graph.nodes[1].data.params.pipeline_components.hidden = true; + const before = structuredClone(graph); + assert.equal(bundle.operationInputIsSuppliedByBundle(graph.nodes[1], 'text_encoders', graph), true); + assert.deepEqual(graph, before); +}); + +test('malformed alternatives never acquire supply authority from a saved hint', () => { + for (const mutate of [ + (a) => { + a.input = 'absent'; + }, + (a) => { + a.members = []; + }, + (a) => { + a.members = ['text_encoder', 'text_encoder']; + }, + (a) => { + a.members = ['missing_component']; + }, + (a) => { + a.members = ['scheduler']; + }, + (a) => { + a.members = ['tokenizer']; + }, + (a) => { + a.extra = true; + }, + ]) { + const graph = graphFor(); + const operation = graph.nodes[1].data.operationAuthoring.operation; + mutate(operation.ports.find((p) => p.name === 'text_encoders').semantics.suppliedBy); + assert.throws(() => contracts.parseOperationContracts([operation], 3), /operation contract/i); + assert.equal(bundle.operationInputIsSuppliedByBundle(graph.nodes[1], 'text_encoders', graph), false); + } +}); diff --git a/scripts/operation-component-bundle.test.mjs b/scripts/operation-component-bundle.test.mjs new file mode 100644 index 00000000..06af2608 --- /dev/null +++ b/scripts/operation-component-bundle.test.mjs @@ -0,0 +1,249 @@ +import assert from 'node:assert/strict'; +import { after, before, test } from 'node:test'; +import { execFileSync } from 'node:child_process'; +import path from 'node:path'; +import { readFileSync } from 'node:fs'; +import { createServer } from 'vite'; + +let server, authoring, bundle, visual, starters; +before(async () => { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, value), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { + localStorage: globalThis.localStorage, + location: { origin: 'http://localhost:5191' }, + dispatchEvent: () => true, + }; + server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null, hmr: false }, + appType: 'custom', + }); + authoring = await server.ssrLoadModule('/src/workflow/operationAuthoring.ts'); + bundle = await server.ssrLoadModule('/src/workflow/operationComponentBundle.ts'); + visual = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const backend = path.resolve('../MoDiff'); + const python = + process.env.MODIFF_BACKEND_PYTHON || + path.join(backend, '.venv', process.platform === 'win32' ? 'Scripts/python.exe' : 'bin/python'); + const script = path.resolve('scripts/operation-starter-fixtures.py'); + starters = process.env.MODIFF_STARTER_FIXTURE + ? JSON.parse(readFileSync(process.env.MODIFF_STARTER_FIXTURE, 'utf8')) + : JSON.parse( + execFileSync( + process.platform === 'win32' ? python : path.join(backend, 'scripts/with-runtime-env.sh'), + process.platform === 'win32' ? [script, '--image-audio'] : [python, script, '--image-audio'], + { cwd: backend, encoding: 'utf8', timeout: 120000, maxBuffer: 32 * 1024 * 1024 }, + ), + ); +}); +after(async () => server?.close()); + +function graph(pipeline = 'QwenImageModularPipeline') { + return authoring.createOperationStarter( + starters.find((item) => item.pipelineClass === pipeline && item.task === 'text_to_image'), + { x: 0, y: 0 }, + ); +} +function owner(graph) { + return graph.nodes.find((node) => node.data.action === 'ModelsLoader'); +} +function semanticEdges(graph) { + // Expand only explicitly supplied component inputs for comparison. Real + // bundle objects/ownership and raw override precedence are backend tests. + return graph.edges + .flatMap((edge) => { + const target = graph.nodes.find((node) => node.id === edge.target); + const operation = authoring.operationAuthoring(target)?.operation; + const leaves = operation?.ports.filter((port) => port.semantics?.suppliedBy?.input === edge.targetHandle) ?? []; + if (!leaves.length) return [edge]; + return leaves + .filter( + (port) => !graph.edges.some((other) => other.target === edge.target && other.targetHandle === port.name), + ) + .map((port) => { + const source = graph.nodes.find((node) => node.id === edge.source); + const outputs = authoring + .operationAuthoring(source) + .operation.ports.filter( + (output) => + output.direction === 'output' && + output.name !== edge.sourceHandle && + output.semantics.kind === 'component' && + port.semantics.members.every((member) => + output.semantics.members.some( + (candidate) => candidate.name === member.name && candidate.type === member.type, + ), + ), + ); + assert.equal(outputs.length, 1); + return { ...edge, sourceHandle: outputs[0].name, targetHandle: port.name }; + }); + }) + .map((edge) => [edge.source, edge.sourceHandle, edge.target, edge.targetHandle]) + .sort(); +} + +test('actual declared Qwen bundle rewires existing leaves reversibly without changing controls or guidance', () => { + const ordinary = graph(); + const loader = owner(ordinary); + ordinary.nodes.find((node) => node.data.action === 'EncodePrompt').data.params.prompt.value = 'Keep my prompt'; + ordinary.nodes.find((node) => node.data.action === 'Guider').data.params.guidance_scale.value = 0; + const before = structuredClone(ordinary); + assert.deepEqual(bundle.availableOperationComponentBundleActions(ordinary, loader.id), ['bundle']); + const bundled = bundle.setOperationComponentBundle(ordinary, loader.id, 'bundle'); + assert.deepEqual(ordinary, before, 'planning is read-only'); + assert.deepEqual(bundled.nodes, before.nodes, 'no loader, stage, parameter or runtime identity is replaced'); + assert.equal( + bundled.edges.length, + ordinary.edges.length - 1, + 'four component fanout edges become three aggregate edges', + ); + assert.equal( + bundled.edges.filter((edge) => edge.source === loader.id && edge.sourceHandle === 'pipeline_components').length, + 3, + ); + assert.deepEqual(semanticEdges(bundled), semanticEdges(before)); + assert.deepEqual(bundle.availableOperationComponentBundleActions(bundled, loader.id), ['components']); + const exposed = bundle.setOperationComponentBundle(bundled, loader.id, 'components'); + assert.deepEqual(exposed.nodes, before.nodes); + assert.deepEqual(semanticEdges(exposed), semanticEdges(before)); + assert.deepEqual(bundle.availableOperationComponentBundleActions(exposed, loader.id), ['bundle']); +}); + +test('bundle and breakout preserve explicit component overrides and an unrelated branch', () => { + const ordinary = graph(), + loader = owner(ordinary); + const denoise = ordinary.nodes.find((node) => node.data.action === 'Denoise'); + ordinary.nodes.push({ + id: 'override', + type: 'custom', + position: { x: -400, y: 0 }, + data: { + module: 'custom.Components', + action: 'Transformer', + params: { model: { type: denoise.data.params.unet.type, display: 'output' } }, + }, + }); + ordinary.nodes.push({ + id: 'unrelated', + type: 'custom', + position: { x: -400, y: 400 }, + data: { + module: 'custom.Text', + action: 'Value', + params: { value: { type: 'string', display: 'text', value: 'untouched' } }, + }, + }); + ordinary.edges = ordinary.edges.filter((edge) => !(edge.target === denoise.id && edge.targetHandle === 'unet')); + const override = { + id: 'explicit-override', + source: 'override', + sourceHandle: 'model', + target: denoise.id, + targetHandle: 'unet', + }; + ordinary.edges.push(override); + const before = structuredClone(ordinary), + unrelated = ordinary.nodes.at(-1); + const bundled = bundle.setOperationComponentBundle(ordinary, loader.id, 'bundle'); + assert.deepEqual( + bundled.edges.find((edge) => edge.id === override.id), + override, + ); + assert.equal( + bundled.nodes.find((node) => node.id === unrelated.id), + unrelated, + ); + assert.deepEqual(semanticEdges(bundled), semanticEdges(before)); + const exposed = bundle.setOperationComponentBundle(bundled, loader.id, 'components'); + assert.deepEqual( + exposed.edges.find((edge) => edge.id === override.id), + override, + ); + assert.deepEqual(semanticEdges(exposed), semanticEdges(before)); +}); + +test('component rewiring uses visual stage projection while keeping wrappers, values and canonical leaves', () => { + const ordinary = graph(); + const grouped = visual.groupNewOperationGraph(ordinary); + const roots = grouped.nodes.filter((node) => visual.visualOperationGroup(node)); + const before = visual.unpackVisualOperationGroups(grouped).graph; + const projectedOwnerId = owner(before).id; + const bundled = bundle.setOperationComponentBundle(grouped, projectedOwnerId, 'bundle'); + for (const root of roots) { + const after = bundled.nodes.find((node) => node.id === root.id); + assert.equal(visual.visualOperationGroup(after), visual.visualOperationGroup(root)); + assert.deepEqual( + after.data.blockInstanceV2.definitionSnapshot, + root.data.blockInstanceV2.definitionSnapshot, + 'immutable reusable definition content remains unchanged', + ); + } + const lowered = visual.unpackVisualOperationGroups(bundled).graph; + assert.deepEqual(lowered.nodes.map((node) => node.id).sort(), before.nodes.map((node) => node.id).sort()); + assert.deepEqual(semanticEdges(lowered), semanticEdges(before)); + const exposed = visual.unpackVisualOperationGroups( + bundle.setOperationComponentBundle(bundled, projectedOwnerId, 'components'), + ).graph; + assert.deepEqual(semanticEdges(exposed), semanticEdges(before)); +}); + +test('an aggregate alone, missing exact supplied members, or a custom bundle grants no rewrite authority', () => { + const other = graph('FluxModularPipeline'); + assert.deepEqual(bundle.availableOperationComponentBundleActions(other, owner(other).id), []); + const ordinary = graph(), + loader = owner(ordinary); + loader.data.operationAuthoring.operation.ports + .find((port) => port.name === 'pipeline_components') + .semantics.members.forEach((member) => (member.type = 'custom.Unreviewed')); + assert.deepEqual(bundle.availableOperationComponentBundleActions(ordinary, loader.id), []); + assert.throws(() => bundle.setOperationComponentBundle(ordinary, loader.id, 'bundle'), /No declared component/); + const literal = graph(), + literalOwner = owner(literal); + const literalDenoise = literal.nodes.find((node) => node.data.action === 'Denoise'); + literalDenoise.data.params.pipeline_components.value = { reference: 'explicit opaque bundle' }; + const literalResult = bundle.setOperationComponentBundle(literal, literalOwner.id, 'bundle'); + assert.ok( + !literalResult.edges.some( + (edge) => edge.target === literalDenoise.id && edge.targetHandle === 'pipeline_components', + ), + ); + assert.deepEqual(literalResult.nodes, literal.nodes, 'a literal aggregate remains unchanged'); + const custom = graph(), + customOwner = owner(custom), + encode = custom.nodes.find((node) => node.data.action === 'EncodePrompt'); + custom.nodes.push({ + id: 'custom-bundle', + type: 'custom', + position: { x: 0, y: 500 }, + data: { + module: 'custom.Components', + action: 'Bundle', + params: { output: { type: 'diffusers_modular_pipeline_components', display: 'output' } }, + }, + }); + const edge = { + id: 'custom-bundle-wire', + source: 'custom-bundle', + sourceHandle: 'output', + target: encode.id, + targetHandle: 'pipeline_components', + }; + custom.edges.push(edge); + const bundled = bundle.setOperationComponentBundle(custom, customOwner.id, 'bundle'); + assert.deepEqual( + bundled.edges.find((item) => item.id === edge.id), + edge, + ); + assert.ok( + bundled.edges.some((item) => item.target === encode.id && item.targetHandle === 'text_encoders'), + 'explicit alternate aggregate preserves its raw fallback', + ); +}); diff --git a/scripts/operation-modification-matrix.test.mjs b/scripts/operation-modification-matrix.test.mjs index c3a3cc42..fb788bb6 100644 --- a/scripts/operation-modification-matrix.test.mjs +++ b/scripts/operation-modification-matrix.test.mjs @@ -284,3 +284,253 @@ test('modular image graph to GLM keeps authored controls, custom prompt wiring a await server.close(); } }); + +test('ordinary same-pipeline profile and task Apply retains exact workflow bindings through visual groups', async () => { + const selections = [ + ['nano-image', 'text_to_image', 'cosmos3-nano:official-modular-workflow'], + ['super-image', 'text_to_image', 'cosmos3-super-text-to-image:official-modular-workflow'], + ['nano-video', 'text_to_video', 'cosmos3-nano:official-modular-workflow'], + ].map(([id, task, executionProfileId]) => ({ + id, + selection: { + pipelineClass: 'Cosmos3OmniModularPipeline', + task, + executionProfileId, + bindingSpec: { modelType: 'Cosmos3OmniModularPipeline', mode: task }, + }, + })); + const profiles = JSON.parse( + execFileSync( + process.platform === 'win32' ? python : path.join(backend, 'scripts/with-runtime-env.sh'), + process.platform === 'win32' + ? [path.join(root, 'scripts/template-operation-fixtures.py')] + : [python, path.join(root, 'scripts/template-operation-fixtures.py')], + { cwd: backend, encoding: 'utf8', maxBuffer: 64 * 1024 * 1024, input: JSON.stringify(selections) }, + ), + ); + const server = await createServer({ + root, + configFile: false, + logLevel: 'silent', + define: { 'import.meta.env.VITE_SERVER_ADDRESS': JSON.stringify('http://127.0.0.1:5191') }, + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + try { + const a = await server.ssrLoadModule('/src/workflow/operationAuthoring.ts'); + const contracts = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + const request = await server.ssrLoadModule('/src/workflow/operationStarterRequest.ts'); + const groups = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const runtime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); + const operations = contracts.parseOperationContracts( + profiles.publicPayload.operationContracts, + profiles.publicPayload.operationContractSchemaVersion, + ); + const recipes = profiles.recipes.map((row) => + request.parseOperationStarter(row.starter, row.starter.pipelineClass, row.starter.task, operations), + ); + const owner = (graph) => + graph.nodes.find((node) => contracts.operationOwnsModel(a.operationAuthoring(node)?.operation)); + // Resolve the current owner as Model Setup's actual controls do. Model/task + // changes can regroup or remove the wrapper, so do not reuse an old leaf ID. + function currentOwnerId(graph) { + const setup = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'setup'); + if (!setup) return owner(graph).id; + const projected = owner(runtime.blockOperationGraphV2(setup.data.blockInstanceV2)); + return groups.visualOperationOwnerId(graph, projected.data.blockProjectionNodeId, setup.id); + } + function checkBindings(graph, recipe) { + const flat = groups.unpackVisualOperationGroups(graph).graph; + for (const { operation } of recipe.nodes) { + const node = flat.nodes.find((n) => a.operationAuthoring(n)?.operation.operationId === operation.operationId); + assert.ok(node, operation.operationId); + assert.deepEqual(a.operationAuthoring(node).operation.binding, operation.binding); + for (const [name, value] of Object.entries(operation.binding.values)) + assert.equal(a.operationFieldValue(node.data.params[name]), value, `${operation.operationId}.${name}`); + } + const loader = owner(flat); + assert.equal(loader.data.params.workflow_id.value, recipe.workflowId); + assert.equal(a.operationAuthoring(loader).operation.binding.values.workflow_id, recipe.workflowId); + return flat; + } + for (const grouped of [false, true]) { + let graph = a.createOperationStarter(recipes[0], { x: 80, y: 100 }); + const loader = owner(graph); + // The actual failed production starter had an empty hidden loader field. + // A fresh reviewed Apply must replace that stored value with its binding. + loader.data.params.workflow_id.value = ''; + loader.data.operationAuthoring.authored = ['workflow_id']; + const prompt = graph.nodes.find((node) => node.data.params.prompt); + prompt.data.params.prompt.value = 'Keep my authored caption through model and task changes.'; + prompt.data.operationAuthoring.authored = ['prompt']; + if (grouped) graph = groups.groupNewOperationGraph(graph); + const before = structuredClone(graph); + for (const preserveValues of [false, true]) { + const plan = a.planOperationChange(graph, currentOwnerId(graph), recipes[1], { + replaceModel: true, + preserveValues, + }); + const next = checkBindings(plan.graph, recipes[1]); + assert.equal(owner(next).data.params.repo_id.value.value, 'nvidia/Cosmos3-Super-Text2Image'); + assert.equal(owner(next).data.params.reviewed_variant.value, 'nvidia/Cosmos3-Super-Text2Image'); + assert.equal( + next.nodes.find((node) => node.data.params.prompt).data.params.prompt.value, + 'Keep my authored caption through model and task changes.', + ); + assert.equal(owner(next).data.params.revision.value, 'daf3d374804be4c512c2135568a7cb95d4341d79'); + assert.deepEqual(graph, before, 'Previewing a change must not mutate the source graph.'); + const video = a.planOperationChange(plan.graph, currentOwnerId(plan.graph), recipes[2], { replaceModel: true }); + checkBindings(video.graph, recipes[2]); + const returned = a.planOperationChange(video.graph, currentOwnerId(video.graph), recipes[0], { + replaceModel: true, + }); + checkBindings(returned.graph, recipes[0]); + const reset = a.planOperationChange(returned.graph, currentOwnerId(returned.graph), recipes[0], { + restoreDefaults: true, + }); + checkBindings(reset.graph, recipes[0]); + } + } + } finally { + await server.close(); + } +}); + +test('H3 Image changes retain prompts and ordered reference wires through a round trip', async () => { + const server = await createServer({ + root, + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + try { + const a = await server.ssrLoadModule('/src/workflow/operationAuthoring.ts'); + const { operationOwnsModel } = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + for (const [pipeline, task] of [ + ['FluxModularPipeline', 'text_to_image'], + ['FluxKontextModularPipeline', 'edit_image'], + ['QwenImageEditPlusModularPipeline', 'multi_image_reference_edit'], + ]) { + const source = starters.find((s) => s.pipelineClass === pipeline && s.task === task); + const target = starters.find((s) => s.pipelineClass === 'MiniMaxH3ImageModularPipeline' && s.task === task); + assert.ok(source && target); + const graph = a.createOperationStarter(source, { x: 80, y: 100 }); + const owner = (g) => g.nodes.find((n) => operationOwnsModel(n.data.operationAuthoring?.operation ?? {})); + const prompt = graph.nodes.find((n) => n.data.params.prompt && !n.data.params.prompt.hidden); + assert.ok(prompt); + prompt.data.params.prompt.value = 'Keep the ordered reference composition and change the material.'; + let referenceConsumers = 0; + if (task !== 'text_to_image') { + const consumers = graph.nodes.filter((n) => + n.data.operationAuthoring?.operation.ports.some( + (p) => p.direction === 'input' && p.semanticName === 'image' && !p.hidden, + ), + ); + referenceConsumers = consumers.length; + assert.ok(referenceConsumers); + graph.nodes.push({ + id: 'ordered-reference-source', + type: 'custom', + position: { x: -600, y: 0 }, + data: { + module: 'modules.Image', + action: 'Load', + label: 'Ordered references', + params: { images: { type: 'image', display: 'output' } }, + }, + }); + for (const [index, consumer] of consumers.entries()) { + const port = consumer.data.operationAuthoring.operation.ports.find( + (p) => p.direction === 'input' && p.semanticName === 'image' && !p.hidden, + ); + graph.edges.push({ + id: `ordered-reference-edge-${index}`, + source: 'ordered-reference-source', + sourceHandle: 'images', + target: consumer.id, + targetHandle: port.name, + }); + } + } + const before = structuredClone(graph); + const plan = a.planOperationChange(graph, owner(graph).id, target, { replaceModel: true, baseline: source }); + assert.deepEqual(graph, before); + assert.deepEqual(plan.diagnostics, []); + assert.ok(plan.graph.nodes.some((n) => n.data.params.prompt?.value === prompt.data.params.prompt.value)); + const encoder = plan.graph.nodes.find((n) => n.data.action === 'WorkflowImageEncode'); + if (encoder) { + const { inspectRequiredGraphInputs } = await server.ssrLoadModule('/src/studio/requiredGraphInputs.ts'); + const registry = { + 'modules.ModularDiffusers.WorkflowImageEncode': { + params: { + ...encoder.data.params, + image: { type: 'image', display: 'input', required: true }, + }, + }, + }; + const operations = starters.flatMap((s) => s.nodes.map((n) => n.operation)); + const issues = inspectRequiredGraphInputs(plan.graph.nodes, plan.graph, registry, operations); + assert.equal( + issues.some((i) => i.id === `required-input:${encoder.id}:image`), + false, + ); + assert.equal( + issues.some((i) => i.id === `required-input:${encoder.id}:state_in`), + false, + ); + const unbound = { + ...plan.graph, + edges: plan.graph.edges.filter((e) => e.target !== encoder.id || e.targetHandle !== 'state_in'), + }; + assert.equal( + inspectRequiredGraphInputs(unbound.nodes, unbound, registry, operations).some( + (i) => i.id === `required-input:${encoder.id}:state_in`, + ), + true, + ); + } + if (task !== 'text_to_image') { + const prepare = plan.graph.nodes.find((n) => n.data.action === 'WorkflowPrepareImages'); + assert.ok(prepare); + assert.ok(plan.graph.edges.some((e) => e.source === 'ordered-reference-source' && e.target === prepare.id)); + } + const groups = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const grouped = groups.groupNewOperationGraph(plan.graph); + assert.ok(grouped.nodes.some((n) => groups.visualOperationGroup(n) === 'generate')); + const generate = grouped.nodes.find((n) => groups.visualOperationGroup(n) === 'generate'); + const shared = generate.data.blockInstanceV2.effectiveInterface.boundary.inputs.filter( + (port) => port.binding.fieldOrPortId === 'pipeline_components', + ); + assert.equal(shared.length, 1, 'Generate must expose one shared component bundle'); + assert.equal(shared[0].mirrorBindings.length, 1); + const input = grouped.nodes.find((n) => groups.visualOperationGroup(n) === 'inputs'); + assert.ok(input); + if (task !== 'text_to_image') { + assert.ok( + input.data.blockInstanceV2.effectiveGraph.nodes.some((n) => n.data.action === 'WorkflowPrepareImages'), + ); + } + const flat = groups.unpackVisualOperationGroups(grouped).graph; + assert.equal(flat.nodes.length, plan.graph.nodes.length); + assert.equal(flat.edges.length, plan.graph.edges.length); + const restored = a.planOperationChange(plan.graph, owner(plan.graph).id, source, { + replaceModel: true, + baseline: target, + }); + assert.ok( + restored.diagnostics.every((message) => message.startsWith('Runtime settings remain archived')), + JSON.stringify({ pipeline, task, diagnostics: restored.diagnostics }), + ); + assert.ok(restored.graph.nodes.some((n) => n.data.params.prompt?.value === prompt.data.params.prompt.value)); + assert.equal( + restored.graph.edges.filter((edge) => edge.source === 'ordered-reference-source').length, + referenceConsumers, + ); + } + } finally { + await server.close(); + } +}); diff --git a/scripts/operation-starter-fixtures.py b/scripts/operation-starter-fixtures.py index 60ce7898..1d39fd9f 100644 --- a/scripts/operation-starter-fixtures.py +++ b/scripts/operation-starter-fixtures.py @@ -42,12 +42,31 @@ ("StableDiffusionXLModularPipeline", "inpaint"), ("QwenImageEditPlusModularPipeline", "multi_image_reference_edit"), ) - if "--image-audio" in sys.argv: + if "--selection" in sys.argv: + index = sys.argv.index("--selection") + if len(sys.argv[index + 1:]) != 2: + raise ValueError("--selection requires a pipeline class and task") + selections = (tuple(sys.argv[index + 1:]),) + elif "--image-audio" in sys.argv: selections = sorted({(c["pipelineClass"], c["task"]) for c in contracts if c["task"] and operation_owns_model(c) and not ("video" in c["task"] or c["task"] == "flf2v" or "3d" in c["task"] or c["task"].startswith("character_")) - and re.search(r"image|inpaint|outpaint|controlnet|ip_adapter|depth|layer_decomposition|audio|speech|music", c["task"])}) + and re.search(r"image|inpaint|outpaint|controlnet|ip_adapter|depth|layer_decomposition|mask_composite|audio|speech|music", c["task"])}) + elif "--large-av" in sys.argv: + selections = ( + ('Kandinsky6TI2VAPipeline', 'text_to_video'), + ('Kandinsky6TI2VAPipeline', 'image_to_video'), + ('Kandinsky6DistilledTI2VAPipeline', 'text_to_video'), + ('Kandinsky6DistilledTI2VAPipeline', 'image_to_video'), + ('Kandinsky6TI2VAPipeline', 'text_to_video_with_audio'), + ('Kandinsky6TI2VAPipeline', 'image_to_video_with_audio'), + ('Kandinsky6DistilledTI2VAPipeline', 'text_to_video_with_audio'), + ('Kandinsky6DistilledTI2VAPipeline', 'image_to_video_with_audio'), + ('LTX2Pipeline', 'text_to_video'), + ('LTX2ConditionPipeline', 'text_to_video'), + ('LTX2ConditionPipeline', 'image_to_video'), + ) elif "--all-models" in sys.argv: selections = sorted({(c["pipelineClass"], c["task"]) for c in contracts if c["task"] and operation_owns_model(c)}) @@ -64,5 +83,13 @@ } for node in result["nodes"] ] + if "--selection" in sys.argv: + result["testMediaLoaderRegistry"] = { + f"{module}.Load": describer._describe_registered_node(module, "Load", MODULE_MAP[module]["Load"]) + for module in ("modules.Image", "modules.Audio") + } + if "--large-av" in sys.argv: + result['testOperationContracts'] = [c for c in contracts + if c['pipelineClass'] == pipeline and c['task'] == task] results.append(result) json.dump(results, sys.stdout) diff --git a/scripts/page-workspace-checkpoint.test.mjs b/scripts/page-workspace-checkpoint.test.mjs new file mode 100644 index 00000000..7555866f --- /dev/null +++ b/scripts/page-workspace-checkpoint.test.mjs @@ -0,0 +1,417 @@ +import { runInNewContext } from 'node:vm'; +import { installEphemeralWorkflowStorage } from './workflow-library-ephemeral-storage.mjs'; +import { installEphemeralGalleryStorage } from './template-gallery-runner.mjs'; +import assert from 'node:assert/strict'; +import { after, test } from 'node:test'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { createServer } from 'vite'; + +const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); +const servers = []; +const originalFetch = globalThis.fetch; + +function storage() { + const values = new Map(); + return { + values, + getItem: (key) => values.get(key) ?? null, + setItem: (key, value) => values.set(key, String(value)), + removeItem: (key) => values.delete(key), + }; +} + +function activate(page) { + globalThis.window = page.window; + globalThis.localStorage = page.window.localStorage; + globalThis.sessionStorage = page.window.sessionStorage; + globalThis.location = page.window.location; +} + +async function page(local, session = storage(), initialize) { + const context = { + window: { localStorage: local, sessionStorage: session, location: { origin: 'http://127.0.0.1:5191' } }, + }; + activate(context); + initialize?.(); + const server = await createServer({ + root: ROOT, + configFile: false, + logLevel: 'silent', + cacheDir: path.join(ROOT, 'node_modules', `.vite-page-checkpoint-${servers.length}`), + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + servers.push(server); + context.studio = (await server.ssrLoadModule('/src/stores/useStudioStore.ts')).useStudioStore; + context.flow = (await server.ssrLoadModule('/src/stores/useFlowStore.ts')).useFlowStore; + context.settings = (await server.ssrLoadModule('/src/stores/useSettingsStore.ts')).useSettingsStore; + context.nodes = (await server.ssrLoadModule('/src/stores/useNodeStore.ts')).useNodesStore; + context.websocket = await server.ssrLoadModule('/src/stores/websocketMessageHandler.ts'); + context.checkpoints = await server.ssrLoadModule('/src/utils/checkpointStorage.ts'); + context.toasts = await server.ssrLoadModule('/src/ui/snackbar.ts'); + return context; +} + +function seed(context, label, count = 3) { + activate(context); + const form = { ...context.studio.getState().form, prompt: `${label} authored prompt`, seed: 7654321 }; + const nodes = [ + { + id: `${label}-text`, + type: 'custom', + position: { x: 42, y: 81 }, + data: { + type: 'custom', + label: `${label} text`, + module: 'fixture.Text', + action: 'Text', + params: { text: { type: 'string', value: `${label} authored value` } }, + }, + }, + ]; + const viewport = { x: 21, y: 34, zoom: 0.75 }; + const snapshot = { + nodes, + edges: [], + viewport, + studioForm: form, + studioGraphBinding: null, + selectedMode: form.mode, + activeTemplateId: null, + sourceOutputId: null, + }; + const tabs = Array.from({ length: count }, (_, index) => ({ + id: `${label}-${index}`, + title: `${label} ${index}`, + createdAt: index + 1, + updatedAt: index + 10, + dirty: true, + source: 'manual', + snapshot: structuredClone(snapshot), + })); + context.flow.getState().replaceGraph({ nodes, edges: [], viewport }); + context.studio.setState( + context.studio.persist.getOptions().merge( + { + workflowTabs: tabs, + activeWorkflowTabId: tabs.at(-1).id, + form, + selectedMode: form.mode, + graphBinding: null, + workflowCanvasHydrated: true, + }, + context.studio.getState(), + ), + ); + return workspace(context); +} + +function workspace(context) { + const state = context.studio.getState(); + return structuredClone({ + tabs: state.workflowTabs, + active: state.activeWorkflowTabId, + form: state.form, + flow: context.flow.getState().toObject(), + }); +} + +after(async () => { + await Promise.all(servers.map((server) => server.close())); + globalThis.fetch = originalFetch; + delete globalThis.window; + delete globalThis.localStorage; + delete globalThis.sessionStorage; + delete globalThis.location; +}); + +test('another page welcome, output fetch and flow reset cannot replace this page checkpoint on reload', async () => { + const shared = storage(); + const b = await page(shared); + const expectedB = seed(b, 'older-B'); + let outputRead; + const fetchOutputs = b.studio.getState().fetchBackendOutputs; + b.studio.setState({ fetchBackendOutputs: () => (outputRead = fetchOutputs()) }); + b.nodes.setState({ instance: 'B-worker', fetchRuntimeStatus: async () => {} }); + const a = await page(shared); + const expectedA = seed(a, 'current-A'); + activate(b); + b.studio.getState().setLauncherDismissed(false); + globalThis.fetch = async () => + new Response(JSON.stringify({ outputs: [], previewSlots: [], revision: 0 }), { + headers: { 'Content-Type': 'application/json' }, + }); + b.websocket.handleWebsocketMessage( + { + type: 'welcome', + sid: 'B-session', + instance: 'B-worker', + cachedNodes: [], + current: null, + queued: {}, + recent: [], + downloads: [], + }, + { ws: { url: 'ws://127.0.0.1:5191/ws' }, sid: 'B-session', setSid: () => {} }, + ); + assert.ok(outputRead, 'the real welcome handler must start its actual output-history request'); + await outputRead; + b.flow.getState().resetExecutionProgress(); + assert.deepEqual(workspace(b), expectedB, 'volatile activity must leave B authored state intact'); + const reloaded = await page(shared, a.window.sessionStorage); + assert.deepEqual( + workspace(reloaded), + expectedA, + 'A must reload its own exact roster, active document, form and canvas', + ); + assert.deepEqual(workspace(b), expectedB, 'reloading A must leave B intact'); +}); + +test('page recovery prefers current keys, copies exact bytes once and never changes shared recovery bytes', async () => { + const shared = storage(); + const context = await page(shared); + const session = storage(); + context.window.sessionStorage = session; + activate(context); + for (const [key, alias] of [ + ['modiff.studio', 'studio'], + ['modiff.flow', 'reactflow'], + ]) { + const current = ' { "state": { "from": "current" }, "version": 1 } '; + const older = '{"state":{"from":"legacy"},"version":0}'; + shared.setItem(key, current); + shared.setItem(alias, older); + const checkpoint = context.checkpoints.createPageCheckpointStorage(alias); + assert.equal(checkpoint.getItem(key), current); + assert.equal(session.getItem(key), current, 'recovery copies original bytes without JSON rewriting'); + shared.setItem(key, 'newer-other-page-recovery'); + assert.equal(checkpoint.getItem(key), current, 'this page owns its checkpoint after recovery'); + checkpoint.removeItem(key); + const reloaded = context.checkpoints.createPageCheckpointStorage(alias); + assert.equal( + reloaded.getItem(key), + null, + 'a page-scoped recovery marker prevents stale re-import after clear/reload', + ); + assert.equal(shared.getItem(key), 'newer-other-page-recovery'); + assert.equal(shared.getItem(alias), older); + } +}); + +test('legacy aliases recover without promoting shared keys and a missing workspace is admitted once per page', async () => { + const shared = storage(); + const context = await page(shared); + const session = storage(); + context.window.sessionStorage = session; + activate(context); + for (const [key, alias] of [ + ['modiff.studio', 'studio'], + ['modiff.flow', 'reactflow'], + ]) { + shared.setItem(alias, `raw-${alias}`); + const checkpoint = context.checkpoints.createPageCheckpointStorage(alias); + assert.equal(checkpoint.getItem(key), `raw-${alias}`); + assert.equal(shared.getItem(key), null); + assert.equal(shared.getItem(alias), `raw-${alias}`); + } + const empty = context.checkpoints.createPageCheckpointStorage('absent-alias'); + assert.equal(empty.getItem('absent-workspace'), null); + shared.setItem('absent-workspace', 'a later foreign checkpoint'); + assert.equal(context.checkpoints.createPageCheckpointStorage('absent-alias').getItem('absent-workspace'), null); +}); + +test('an existing page checkpoint is authoritative even when its bytes are malformed', async () => { + const shared = storage(); + const context = await page(shared); + const session = storage(); + context.window.sessionStorage = session; + activate(context); + session.setItem('modiff.studio', '{incomplete page recovery bytes'); + shared.setItem('modiff.studio', 'an older valid shared checkpoint'); + const checkpoint = context.checkpoints.createPageCheckpointStorage('studio'); + assert.equal(checkpoint.getItem('modiff.studio'), '{incomplete page recovery bytes'); + assert.equal(shared.getItem('modiff.studio'), 'an older valid shared checkpoint'); +}); + +test('page quota failures retain live edits, preserve shared bytes and warn until both workspace keys recover', async () => { + const shared = storage(); + const session = storage(); + const write = session.setItem; + session.setItem = () => { + throw new DOMException('Full', 'QuotaExceededError'); + }; + const warn = console.warn; + console.warn = () => {}; + try { + const context = await page(shared, session); + const expected = seed(context, 'quota-live'); + assert.deepEqual(workspace(context), expected); + const warning = context.toasts.getToastItems().find((item) => item.id === 'studio-checkpoint-write-failed'); + assert.equal(warning.persist, true); + assert.match(warning.message, /Save or export unsaved workflows before refreshing/); + assert.equal(shared.getItem('modiff.studio'), null); + assert.equal(shared.getItem('modiff.flow'), null); + session.setItem = write; + context.studio.setState({ launcherDismissed: true }); + assert.ok( + context.toasts.getToastItems().some((item) => item.id === warning.id), + 'Flow failure remains outstanding', + ); + context.flow.getState().resetExecutionProgress(); + assert.equal( + context.toasts.getToastItems().some((item) => item.id === warning.id), + false, + ); + } finally { + console.warn = warn; + session.setItem = write; + } +}); + +test('blocked session storage warns without a shared-write fallback and SSR remains unavailable normally', async () => { + const shared = storage(); + const context = await page(shared); + const originalWindow = context.window; + const blocked = { ...originalWindow }; + Object.defineProperty(blocked, 'sessionStorage', { + get: () => { + throw new DOMException('Blocked', 'SecurityError'); + }, + }); + globalThis.window = blocked; + const warn = console.warn; + console.warn = () => {}; + try { + const checkpoint = context.checkpoints.createPageCheckpointStorage('studio'); + assert.equal(checkpoint.getItem('modiff.studio'), null); + assert.doesNotThrow(() => checkpoint.setItem('modiff.studio', 'unsaved in-memory state')); + assert.doesNotThrow(() => checkpoint.removeItem('modiff.studio')); + assert.equal(shared.getItem('modiff.studio'), null); + assert.ok(context.toasts.getToastItems().some((item) => item.persist && /Save or export/.test(item.message))); + delete globalThis.window; + assert.throws(() => context.checkpoints.createPageCheckpointStorage('studio'), /outside a browser/); + } finally { + globalThis.window = originalWindow; + console.warn = warn; + } +}); + +test('shared Settings retain their global checkpoint while each workspace survives same-page reload', async () => { + const shared = storage(); + const a = await page(shared); + const expectedA = seed(a, 'settings-A'); + a.settings.getState().setLeftPanelWidth(444); + const b = await page(shared); + seed(b, 'settings-B'); + assert.equal(b.settings.getState().leftPanelWidth, 444); + b.settings.getState().setLeftPanelWidth(555); + const reloaded = await page(shared, a.window.sessionStorage); + assert.equal(reloaded.settings.getState().leftPanelWidth, 555); + assert.deepEqual(workspace(reloaded), expectedA); + assert.equal(JSON.parse(shared.getItem('modiff.settings')).state.leftPanelWidth, 555); + assert.equal(shared.getItem('modiff.studio'), null); + assert.equal(shared.getItem('modiff.flow'), null); +}); + +test('page checkpoints retain more than twelve dirty workflows without changing the existing retention policy', async () => { + const shared = storage(); + const context = await page(shared); + const expected = seed(context, 'dirty-page', 14); + assert.equal(JSON.parse(context.window.sessionStorage.getItem('modiff.studio')).state.workflowTabs.length, 14); + const reloaded = await page(shared, context.window.sessionStorage); + assert.deepEqual(workspace(reloaded), expected); +}); + +for (const [label, install] of [ + ['Workflow', installEphemeralWorkflowStorage], + ['Gallery', installEphemeralGalleryStorage], +]) { + test(`${label} owned generator startup cannot recover a foreign legacy workspace`, async () => { + let initialize; + await install({ + addInitScript: async (script) => { + initialize = script; + }, + route: async () => {}, + }); + class MemoryStorage { + values = new Map(); + getItem(key) { + return this.values.get(key) ?? null; + } + setItem(key, value) { + this.values.set(key, String(value)); + } + removeItem(key) { + this.values.delete(key); + } + } + const shared = new MemoryStorage(); + const session = new MemoryStorage(); + const foreignNode = { + id: 'foreign-graph', + type: 'custom', + position: { x: 1, y: 2 }, + data: { + type: 'custom', + label: 'Foreign graph', + module: 'fixture.Text', + action: 'Text', + params: { text: { type: 'string', value: 'foreign authored graph' } }, + }, + }; + const foreignFlow = JSON.stringify({ + version: 1, + state: { nodes: [foreignNode], edges: [], viewport: { x: 0, y: 0, zoom: 1 } }, + }); + const foreignStudio = JSON.stringify({ + version: 0, + state: { + form: { prompt: 'foreign authored prompt' }, + activeWorkflowTabId: 'foreign-document', + workflowTabs: [ + { + id: 'foreign-document', + title: 'Foreign document', + createdAt: 1, + updatedAt: 2, + dirty: true, + source: 'manual', + snapshot: { + nodes: [foreignNode], + edges: [], + studioForm: { prompt: 'foreign authored prompt' }, + studioGraphBinding: null, + }, + }, + ], + }, + }); + shared.setItem('studio', foreignStudio); + shared.setItem('reactflow', foreignFlow); + const app = await page(shared, session, () => + runInNewContext(`(${initialize.toString()})()`, { + Storage: MemoryStorage, + localStorage: shared, + sessionStorage: session, + }), + ); + assert.deepEqual( + app.studio.getState().workflowTabs, + [], + 'the actual Studio factory must not return retained foreign alias bytes', + ); + assert.equal(app.studio.getState().activeWorkflowTabId, null); + assert.deepEqual( + app.flow.getState().nodes, + [], + 'the actual Flow factory must not return retained foreign alias bytes', + ); + assert.equal(shared.getItem('studio'), foreignStudio, 'keep exact legacy recovery bytes'); + assert.equal(shared.getItem('reactflow'), foreignFlow); + assert.equal(session.getItem('modiff.studio'), null, 'generated workspace remains ephemeral'); + assert.equal(session.getItem('modiff.flow'), null); + }); +} diff --git a/scripts/private-image-edit-evidence.mjs b/scripts/private-image-edit-evidence.mjs new file mode 100644 index 00000000..7dda6516 --- /dev/null +++ b/scripts/private-image-edit-evidence.mjs @@ -0,0 +1,1508 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { lstatSync, readFileSync, realpathSync } from 'node:fs'; +import { dirname } from 'node:path'; +import { stableJsonValue } from './canonical-json.mjs'; +import { verifyNativeLoadedImages, verifyRetainedHostImageFiles } from './native-image-load-evidence.mjs'; +import { + backendContractIdentity, + backendSourceEvidence, + canonicalGraphIdentity, + normalizeBackendRuntime, + selectBackendRuntimeFingerprintEvidence, + selectInstalledModelIdentity, + stableStringify, +} from './live-proof-provenance.mjs'; +import { + bindRetainedCpuFloat32Recipe, + validateLateNativeSingleAssetRun, + validateNativeVariantOutput, + validateNativeVariantRun, + validateUnmodifiedExpertPreparation, +} from './native-variant-run-evidence.mjs'; +import { + canonicalWorkflowAuthoringContract, + exportCanonicalWorkflowGraphs, + readCanonicalEvidenceFile, +} from './release-contract-core.mjs'; +import { validateImagePromptPreparation, validateSampledCpuWorkerMemory } from './prompt-variant-evidence.mjs'; + +export const PRIVATE_IMAGE_EDIT_FORMAT = 'modiff.private.lcm-source-bound-edit.v1'; +export const DIRECT_IMAGE_EDIT_FORMAT = 'modiff.private.direct-image-edit-source-bound.v1'; +export const NATIVE_PNG_EDIT_FORMAT = 'modiff.private.direct-image-edit-native-png.v1'; +export const NATIVE_PNG_INPAINT_FORMAT = 'modiff.private.direct-image-inpaint-native-png.v1'; +export const SAVED_PNG_EDIT_FORMAT = 'modiff.private.saved-image-edit-native-png.v1'; +const SAVED_WEBP_EDIT_FORMAT = 'modiff.private.saved-image-edit-native-webp.v1'; +const NATIVE_WEBP_EDIT_FORMAT = 'modiff.private.direct-image-edit-native-webp.v1'; +const FLUX_ENAMEL_EDIT_FORMAT = 'modiff.private.flux-enamel-edit-native-webp.v1'; +const SAVED_HOST_FILE_EDIT_FORMAT = 'modiff.private.saved-image-edit-native-host-file.v1'; +const RETAINED_SERVER_EDIT_FORMAT = 'modiff.private.server-retained-image-edit-native-png.v1'; +const baseConsumed = ['num_inference_steps', 'output_type', 'prompt', 'seed']; +const imageGeometry = ['height', 'max_sequence_length', 'width']; +const stableDiffusionEditConsumed = [...baseConsumed, 'negative_prompt', 'guidance_scale', 'strength']; +const retainedImageEdit = { + format: SAVED_PNG_EDIT_FORMAT, + captureFormat: 'modiff.private.direct-image-edit-observation.v1', + consumed: [...baseConsumed, ...imageGeometry, 'negative_prompt', 'guidance_scale'], + inactiveRecorded: ['strength'], + inputPathPrefix: '@data/images/', + nativeSourceMedia: true, + outputGeometryFromSettings: true, +}; +const joyPlusEdit = { + ...retainedImageEdit, + modelRepo: 'jdopensource/JoyAI-Image-Edit-Plus-Diffusers', + modelRevision: 'c2686460c7b64d8aa11bc4d0da423fb316b33f9e', + loaderClass: 'JoyImageEditPlusPipeline', +}; +const qwenPlusEdit = { + ...retainedImageEdit, + modelRepo: 'Qwen/Qwen-Image-Edit-2511', + modelRevision: '6f3ccc0b56e431dc6a0c2b2039706d7d26f22cb9', + loaderClass: 'QwenImageEditPlusPipeline', + sourceFingerprint: 'sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8', + runtimeContractDigest: '8cbe038eeeb6d4a4c079783b8d7e4915d9f78faad9495cb8e354504c66925cf5', + fullNativeSnapshot: true, + guidanceObservedAsTrueCfg: true, +}; +const retainedCfgInpaint = { + ...retainedImageEdit, + captureFormat: 'modiff.private.direct-image-inpaint-observation.v1', + consumed: [...retainedImageEdit.consumed, 'strength'], + inactiveRecorded: [], + sourceFingerprint: 'sha256:backend-source-v1:43f2ed10792fc6167b963166287cf7d5a0429afa26029e6455b0418e2123be86', + runtimeContractDigest: qwenPlusEdit.runtimeContractDigest, + fullNativeSnapshot: true, + guidanceObservedAsTrueCfg: true, + masked: true, +}; +const retainedOutpaint = { + ...retainedCfgInpaint, + masked: false, + captureFormat: retainedImageEdit.captureFormat, + sourceFingerprint: qwenPlusEdit.sourceFingerprint, + guidanceObservedAsTrueCfg: false, + task: 'outpaint', + canvasVariant: [ + ['overlap', 24, 80], + ['feather', 8, 28], + ], + unobservedControls: ['left', 'right', 'top', 'bottom', 'overlap', 'feather', 'fill_color'], +}; +const editRoutes = new Map([ + [ + 'DreamLitePipeline:edit_image', + { + ...retainedImageEdit, + format: SAVED_WEBP_EDIT_FORMAT, + modelRepo: 'carlofkl/DreamLite-base', + modelRevision: '751cb8dbb9072a8c8ffd8684e0f254b50f20531b', + loaderClass: 'DreamLitePipeline', + sourceFingerprint: 'sha256:backend-source-v1:6c9e4842b9ebdfd2427b449dd490bef2b22ff3346d7c440bf4a90b2365184385', + originalRegistryHash: '946f902f4cd1c1e65f9b3b0413393278670905fd755e5bd9e5f506e2e72bc5e0', + fullNativeSnapshot: true, + }, + ], + [ + 'DreamLiteMobilePipeline:edit_image', + { + modelRepo: 'carlofkl/DreamLite-mobile', + modelRevision: '6695c3f4be230f0493fa5dbf78be3bc4d3bb2ab4', + loaderClass: 'DreamLiteMobilePipeline', + format: DIRECT_IMAGE_EDIT_FORMAT, + captureFormat: 'modiff.private.direct-image-edit-observation.v1', + consumed: [...baseConsumed, ...imageGeometry], + fullNativeSnapshot: true, + }, + ], + [ + 'FluxDevPipeline:edit_image', + { + ...retainedImageEdit, + format: SAVED_WEBP_EDIT_FORMAT, + modelRepo: 'black-forest-labs/FLUX.1-dev', + modelRevision: '3de623fc3c33e44ffbe2bad470d0f45bccf2eb21', + loaderClass: 'FluxImg2ImgPipeline', + consumed: [...retainedImageEdit.consumed, 'strength'], + inactiveRecorded: [], + sourceFingerprint: retainedCfgInpaint.sourceFingerprint, + runtimeContractDigest: retainedCfgInpaint.runtimeContractDigest, + fullNativeSnapshot: true, + guidanceObservedAsTrueCfg: true, + savedNativeRecipe: { + format: FLUX_ENAMEL_EDIT_FORMAT, + sourceFingerprint: 'sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7', + originalRegistryHash: '194fdfe25573ca708535e0913337cfee8c1137a2b3860f5c5c5a7c5419951d46', + strengthVariant: { original: 0.8, retained: 0.92 }, + guidanceVariant: { original: 3.5, retained: 4 }, + nativeSourceMedia: false, + }, + }, + ], + [ + 'ChromaImg2ImgPipeline:edit_image', + { + ...retainedImageEdit, + modelRepo: 'lodestones/Chroma1-HD', + modelRevision: '0e0c60ece1e82b17cb7f77342d765ba5024c40c0', + loaderClass: 'ChromaImg2ImgPipeline', + consumed: [...retainedImageEdit.consumed, 'strength'], + inactiveRecorded: [], + sourceFingerprint: 'sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7', + originalRegistryHash: 'c4e99d780fef75bce44f4c5e7414d99840a794999355308f69f03176bd573193', + fullNativeSnapshot: true, + previousExpertFamily: 'QwenImageImg2ImgPipeline', + }, + ], + [ + 'FluxKontextInpaintPipeline:outpaint', + { + ...retainedOutpaint, + modelRepo: 'black-forest-labs/FLUX.1-Kontext-dev', + modelRevision: '24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d', + loaderClass: 'FluxKontextInpaintPipeline', + sourceFingerprint: 'sha256:backend-source-v1:272116bf77447dfb20b0899666ae417b68401993dd97ca438db63d91ff79cab6', + originalRegistryHash: '33be3a472703c43591f907916a3c4b8901af522c24d1930eb88f75c8033f4cec', + fullNativeSnapshot: false, + guidanceObservedAsTrueCfg: true, + canvasVariant: [ + ['overlap', 24, 72], + ['feather', 8, 28], + ], + strengthVariant: { original: 0.85, retained: 1 }, + }, + ], + [ + 'FluxKontextInpaintPipeline:inpaint', + { + ...retainedCfgInpaint, + format: SAVED_WEBP_EDIT_FORMAT, + modelRepo: 'black-forest-labs/FLUX.1-Kontext-dev', + modelRevision: '24e9dedc4ef646698dc8eb4e18ae2cec3c9fea0d', + loaderClass: 'FluxKontextInpaintPipeline', + originalRegistryHash: '4a6a3ee6a0ba2f07d6e2f66daf085d4d43b70e0180a4b277b44b0b25f7a4c06c', + fullNativeSnapshot: false, + savedNativeRecipe: { + format: NATIVE_WEBP_EDIT_FORMAT, + sourceFingerprint: 'sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7', + originalRegistryHash: '194fdfe25573ca708535e0913337cfee8c1137a2b3860f5c5c5a7c5419951d46', + strengthVariant: { original: 0.8, retained: 0.96 }, + fullNativeSnapshot: true, + nativeSourceMedia: false, + previousExpertFamily: 'FluxImg2ImgPipeline', + }, + }, + ], + [ + 'ChromaInpaintPipeline:outpaint', + { + ...retainedOutpaint, + modelRepo: 'lodestones/Chroma1-HD', + modelRevision: '0e0c60ece1e82b17cb7f77342d765ba5024c40c0', + loaderClass: 'ChromaInpaintPipeline', + sourceFingerprint: 'sha256:backend-source-v1:70bc1ff7fe61307be52cfda86b38c6400f2156cbc8240a489b62ff19a93d58dc', + originalRegistryHash: '67979c2308c670f70d5d4fd38672be0a3ccd3cae7f083d1c7e7ae2e2169f90e8', + alternateSourceRegistryPair: { + sourceFingerprint: 'sha256:backend-source-v1:ee86f26ee410419fae168f4380029a01d302ec0fd0607308d9b1e40ae2ace7f7', + registryHash: '100a85d1bff56ef6d0bf236fb4a69f869b3c909a7a4ec31683bbc7f24d24d80c', + // This worker records the original upload and native load hashes and dimensions. + nativeSourceMedia: false, + }, + canvasVariant: [], + }, + ], + [ + 'StableDiffusionXLPAGPipeline:edit_image', + { + ...retainedImageEdit, + modelRepo: 'stabilityai/stable-diffusion-xl-base-1.0', + modelRevision: '462165984030d82259a11f4367a4eed129e94a7b', + loaderClass: 'StableDiffusionXLPAGImg2ImgPipeline', + consumed: stableDiffusionEditConsumed, + inactiveRecorded: ['width', 'height', 'max_sequence_length'], + sourceFingerprint: 'sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290', + originalRegistryHash: 'fd66c8907b4a7969c1a87757f4d9e629d62395c55b8b74f730432cf1ce47d13e', + fullNativeSnapshot: true, + windowsCudaRuntime: true, + previousUnmodifiedModelFamily: 'StableDiffusionXLPAGInpaintPipeline', + unobservedControls: ['pag_scale', 'pag_adaptive_scale'], + reviewedSourceRecipes: new Map([ + [ + '4cbc984b44c398b6e92b4350513d3543139e9dffe01a38857845c8a7698272c8', + { strengthVariant: { original: 0.8, retained: 0.85 }, previousExpertFamily: 'AnimateLCMPipeline' }, + ], + ]), + }, + ], + [ + 'QwenImageModularPipeline:edit_image', + { + ...retainedImageEdit, + format: SAVED_WEBP_EDIT_FORMAT, + modelRepo: 'Qwen/Qwen-Image-2512', + modelRevision: '25468b98e3276ca6700de15c6628e51b7de54a26', + loaderClass: 'QwenImageImg2ImgPipeline', + consumed: [...retainedImageEdit.consumed, 'strength'], + inactiveRecorded: [], + guidanceObservedAsTrueCfg: true, + sourceFingerprint: 'sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7', + originalRegistryHash: 'c4e99d780fef75bce44f4c5e7414d99840a794999355308f69f03176bd573193', + fullNativeSnapshot: true, + previousExpertFamily: 'OmniGenPipeline', + }, + ], + [ + 'Flux2KleinInpaintPipeline:outpaint', + { + ...retainedOutpaint, + modelRepo: 'black-forest-labs/FLUX.2-klein-4B', + modelRevision: 'e7b7dc27f91deacad38e78976d1f2b499d76a294', + loaderClass: 'Flux2KleinInpaintPipeline', + consumed: [...baseConsumed, ...imageGeometry, 'guidance_scale', 'strength'], + inactiveRecorded: ['negative_prompt'], + strengthVariant: { original: 0.85, retained: 1 }, + }, + ], + [ + 'ZImageInpaintPipeline:outpaint', + { + ...retainedOutpaint, + modelRepo: 'Tongyi-MAI/Z-Image-Turbo', + modelRevision: 'f332072aa78be7aecdf3ee76d5c247082da564a6', + loaderClass: 'ZImageInpaintPipeline', + fullNativeSnapshot: false, + }, + ], + [ + 'StableDiffusionXLPAGPipeline:inpaint', + { + ...retainedCfgInpaint, + modelRepo: 'stabilityai/stable-diffusion-xl-base-1.0', + modelRevision: '462165984030d82259a11f4367a4eed129e94a7b', + loaderClass: 'StableDiffusionXLPAGInpaintPipeline', + consumed: [...stableDiffusionEditConsumed, 'width', 'height'], + inactiveRecorded: ['max_sequence_length'], + sourceFingerprint: 'sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290', + originalRegistryHash: 'fd66c8907b4a7969c1a87757f4d9e629d62395c55b8b74f730432cf1ce47d13e', + guidanceObservedAsTrueCfg: false, + windowsCudaRuntime: true, + previousExpertFamily: 'AnimateDiffPipeline', + strengthVariant: { original: 0.8, retained: 1 }, + unobservedControls: ['pag_scale', 'pag_adaptive_scale'], + }, + ], + [ + 'Flux2KleinInpaintPipeline:inpaint', + { + ...retainedCfgInpaint, + modelRepo: 'black-forest-labs/FLUX.2-klein-4B', + modelRevision: 'e7b7dc27f91deacad38e78976d1f2b499d76a294', + loaderClass: 'Flux2KleinInpaintPipeline', + consumed: [...baseConsumed, ...imageGeometry, 'guidance_scale', 'strength'], + inactiveRecorded: ['negative_prompt'], + sourceFingerprint: qwenPlusEdit.sourceFingerprint, + guidanceObservedAsTrueCfg: false, + }, + ], + [ + 'ZImageInpaintPipeline:inpaint', + { + ...retainedCfgInpaint, + modelRepo: 'Tongyi-MAI/Z-Image-Turbo', + modelRevision: 'f332072aa78be7aecdf3ee76d5c247082da564a6', + loaderClass: 'ZImageInpaintPipeline', + sourceFingerprint: qwenPlusEdit.sourceFingerprint, + guidanceObservedAsTrueCfg: false, + }, + ], + [ + 'OmniGenPipeline:edit_image', + { + ...retainedImageEdit, + format: RETAINED_SERVER_EDIT_FORMAT, + modelRepo: 'Shitao/OmniGen-v1-diffusers', + modelRevision: '016e2f61d12a98303f6bbdf122687694d7984268', + loaderClass: 'OmniGenPipeline', + consumed: [...baseConsumed, 'width', 'height', 'guidance_scale'], + inactiveRecorded: ['negative_prompt', 'max_sequence_length', 'strength'], + inputImagePromptPrefix: '<|image_1|> ', + unobservedControls: ['image_guidance_scale'], + sourceFingerprint: 'sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7', + originalRegistryHash: 'c4e99d780fef75bce44f4c5e7414d99840a794999355308f69f03176bd573193', + serverRetainedOutput: true, + previousExpertFamily: 'ChromaImg2ImgPipeline', + }, + ], + [ + 'OmniGenPipeline:multi_image_reference_edit', + { + ...retainedImageEdit, + modelRepo: 'Shitao/OmniGen-v1-diffusers', + modelRevision: '016e2f61d12a98303f6bbdf122687694d7984268', + loaderClass: 'OmniGenPipeline', + consumed: [...baseConsumed, 'width', 'height', 'guidance_scale'], + inactiveRecorded: ['negative_prompt', 'max_sequence_length', 'strength'], + orderedReferences: 1, + task: 'multi_image_reference_edit', + retainedFormMode: 'edit_image', + inputImagePromptPrefix: '<|image_1|> <|image_2|> ', + unobservedControls: ['image_guidance_scale'], + sourceFingerprint: 'sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7', + originalRegistryHash: 'c4e99d780fef75bce44f4c5e7414d99840a794999355308f69f03176bd573193', + fullNativeSnapshot: true, + previousExpertFamily: 'LongCatImagePipeline', + }, + ], + [ + 'Kandinsky3Pipeline:edit_image', + { + ...retainedImageEdit, + modelRepo: 'kandinsky-community/kandinsky-3', + modelRevision: 'bf79e6c219da8a94abb50235fdc4567eb8fb4632', + loaderClass: 'Kandinsky3Img2ImgPipeline', + consumed: stableDiffusionEditConsumed, + inactiveRecorded: imageGeometry, + sourceFingerprint: 'sha256:backend-source-v1:175112f2430928958bd90dc5ae78b50ce0a54403e42e28cfc68096945d05fbe6', + originalRegistryHash: 'c4e6cbddbff684ac03dfb6625a04048f484d0ed38d58bb14daf072e629458d69', + cpuExecution: true, + }, + ], + [ + 'LongCatImageEditPipeline:edit_image', + { + ...retainedImageEdit, + format: SAVED_WEBP_EDIT_FORMAT, + modelRepo: 'meituan-longcat/LongCat-Image-Edit', + modelRevision: '7b54ef423aa7854be7861600024be5c56ab7875a', + loaderClass: 'LongCatImageEditPipeline', + consumed: [...baseConsumed, 'negative_prompt', 'guidance_scale'], + inactiveRecorded: [...imageGeometry, 'strength'], + sourceFingerprint: retainedCfgInpaint.sourceFingerprint, + runtimeContractDigest: retainedCfgInpaint.runtimeContractDigest, + fullNativeSnapshot: true, + }, + ], + [ + 'LatentConsistencyModelPipeline:edit_image', + { + modelRepo: 'SimianLuo/LCM_Dreamshaper_v7', + modelRevision: 'a85df6a8bd976cdd08b4fd8f3b73f229c9e54df5', + loaderClass: 'LatentConsistencyModelImg2ImgPipeline', + format: PRIVATE_IMAGE_EDIT_FORMAT, + captureFormat: 'modiff.private.lcm-image-edit-observation.v1', + consumed: [...baseConsumed, 'guidance_scale', 'strength'], + }, + ], + [ + 'SanaSprintPipeline:edit_image', + { + modelRepo: 'Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers', + modelRevision: 'aa76e7f4f4928f378716b6716a2130fba3caf5b1', + loaderClass: 'SanaSprintImg2ImgPipeline', + format: DIRECT_IMAGE_EDIT_FORMAT, + captureFormat: 'modiff.private.direct-image-edit-observation.v1', + consumed: [...baseConsumed, ...imageGeometry, 'guidance_scale', 'strength'], + fullNativeSnapshot: true, + strengthVariant: { original: 0.5, retained: 0.75 }, + }, + ], + [ + 'StableDiffusionPipeline:edit_image', + { + modelRepo: 'stable-diffusion-v1-5/stable-diffusion-v1-5', + modelRevision: '451f4fe16113bff5a5d2269ed5ad43b0592e9a14', + loaderClass: 'StableDiffusionImg2ImgPipeline', + format: DIRECT_IMAGE_EDIT_FORMAT, + captureFormat: 'modiff.private.direct-image-edit-observation.v1', + consumed: stableDiffusionEditConsumed, + fullNativeSnapshot: true, + inputPathPrefix: '@data/images/', + windowsCudaRuntime: true, + nativePngEvidence: true, + }, + ], + [ + 'StableDiffusionPipeline:inpaint', + { + modelRepo: 'stable-diffusion-v1-5/stable-diffusion-v1-5', + modelRevision: '451f4fe16113bff5a5d2269ed5ad43b0592e9a14', + loaderClass: 'StableDiffusionInpaintPipeline', + format: NATIVE_PNG_INPAINT_FORMAT, + captureFormat: 'modiff.private.direct-image-inpaint-observation.v1', + consumed: [...stableDiffusionEditConsumed, 'width', 'height'], + fullNativeSnapshot: true, + inputPathPrefix: '@data/images/', + windowsCudaRuntime: true, + nativePngEvidence: true, + masked: true, + }, + ], + [ + 'StableDiffusionXLPipeline:edit_image', + { + modelRepo: 'stabilityai/stable-diffusion-xl-base-1.0', + modelRevision: '462165984030d82259a11f4367a4eed129e94a7b', + loaderClass: 'StableDiffusionXLImg2ImgPipeline', + format: DIRECT_IMAGE_EDIT_FORMAT, + captureFormat: 'modiff.private.direct-image-edit-observation.v1', + consumed: stableDiffusionEditConsumed, + fullOrLateNativeSnapshot: true, + inputPathPrefix: '@data/images/', + nativePngEvidence: true, + savedNativeRecipe: { + ...retainedImageEdit, + consumed: stableDiffusionEditConsumed, + outputGeometryFromSettings: false, + samplerSourceProjection: true, + sourceFingerprint: 'sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290', + originalRegistryHash: 'fd66c8907b4a7969c1a87757f4d9e629d62395c55b8b74f730432cf1ce47d13e', + windowsCudaRuntime: true, + fullNativeSnapshot: true, + previousExpertFamily: 'StableDiffusionXLPAGImg2ImgPipeline', + }, + }, + ], + [ + 'StableDiffusionXLPipeline:inpaint', + { + modelRepo: 'stabilityai/stable-diffusion-xl-base-1.0', + modelRevision: '462165984030d82259a11f4367a4eed129e94a7b', + loaderClass: 'StableDiffusionXLInpaintPipeline', + format: NATIVE_PNG_INPAINT_FORMAT, + captureFormat: 'modiff.private.direct-image-inpaint-observation.v1', + consumed: [...stableDiffusionEditConsumed, 'width', 'height'], + fullNativeSnapshot: true, + inputPathPrefix: '@data/images/', + windowsCudaRuntime: true, + nativePngEvidence: true, + masked: true, + strengthVariant: { original: 0.8, retained: 1 }, + }, + ], + [ + 'ChromaInpaintPipeline:inpaint', + { + modelRepo: 'lodestones/Chroma1-HD', + modelRevision: '0e0c60ece1e82b17cb7f77342d765ba5024c40c0', + loaderClass: 'ChromaInpaintPipeline', + format: SAVED_PNG_EDIT_FORMAT, + captureFormat: 'modiff.private.direct-image-inpaint-observation.v1', + consumed: [...stableDiffusionEditConsumed, ...imageGeometry], + sourceFingerprint: 'sha256:backend-source-v1:43f2ed10792fc6167b963166287cf7d5a0429afa26029e6455b0418e2123be86', + runtimeContractDigest: '8cbe038eeeb6d4a4c079783b8d7e4915d9f78faad9495cb8e354504c66925cf5', + fullNativeSnapshot: true, + inputPathPrefix: '@data/images/', + masked: true, + }, + ], + [ + 'StableDiffusionXLInstructPix2PixPipeline:edit_image', + { + modelRepo: 'diffusers/sdxl-instructpix2pix-768', + modelRevision: '06653d47f8d22f2c2205a5884d6a24c5e76d2ca7', + loaderClass: 'StableDiffusionXLInstructPix2PixPipeline', + format: SAVED_PNG_EDIT_FORMAT, + captureFormat: 'modiff.private.direct-image-edit-observation.v1', + consumed: [...baseConsumed, 'negative_prompt', 'guidance_scale', 'width', 'height'], + inactiveRecorded: ['strength', 'max_sequence_length'], + sourceFingerprint: 'sha256:backend-source-v1:55da4a68212923ee8a67e70754f46193288e210bce08ab4ae8c06834a7a76995', + runtimeContractDigest: 'e5d045d5ecf997c0cfe8dba771fd92cfc1fef6d3e10d91791b2b5e747f384b3c', + fullNativeSnapshot: true, + inputPathPrefix: '@data/images/', + windowsCudaRuntime: true, + residentRecipe: true, + unobservedControls: ['image_guidance_scale'], + }, + ], + [ + 'StableDiffusionPAGPipeline:edit_image', + { + modelRepo: 'stable-diffusion-v1-5/stable-diffusion-v1-5', + modelRevision: '451f4fe16113bff5a5d2269ed5ad43b0592e9a14', + loaderClass: 'StableDiffusionPAGImg2ImgPipeline', + format: SAVED_PNG_EDIT_FORMAT, + captureFormat: 'modiff.private.direct-image-edit-observation.v1', + consumed: stableDiffusionEditConsumed, + inactiveRecorded: ['width', 'height', 'max_sequence_length'], + sourceFingerprint: 'sha256:backend-source-v1:3b073e3f6f5e9489e06116f277ee4a9e878b8f0c6258efc93c60be9a04513cb5', + runtimeContractDigest: 'e5d045d5ecf997c0cfe8dba771fd92cfc1fef6d3e10d91791b2b5e747f384b3c', + windowsCudaRuntime: true, + fullNativeSnapshot: true, + inputPathPrefix: '@data/images/', + unobservedControls: ['pag_scale', 'pag_adaptive_scale'], + nativeSourceMedia: true, + }, + ], + [ + 'StableDiffusionPAGPipeline:inpaint', + { + modelRepo: 'stable-diffusion-v1-5/stable-diffusion-v1-5', + modelRevision: '451f4fe16113bff5a5d2269ed5ad43b0592e9a14', + loaderClass: 'StableDiffusionPAGInpaintPipeline', + format: SAVED_PNG_EDIT_FORMAT, + captureFormat: 'modiff.private.direct-image-inpaint-observation.v1', + consumed: [...stableDiffusionEditConsumed, 'width', 'height'], + inactiveRecorded: ['max_sequence_length'], + sourceFingerprint: 'sha256:backend-source-v1:1f2f7e00ce4a500ba52d5b729f43d4321af6f931125a3f266f307cf80038c12e', + runtimeContractDigest: 'e5d045d5ecf997c0cfe8dba771fd92cfc1fef6d3e10d91791b2b5e747f384b3c', + windowsCudaRuntime: true, + fullNativeSnapshot: true, + inputPathPrefix: '@data/images/', + unobservedControls: ['pag_scale', 'pag_adaptive_scale'], + nativeSourceMedia: true, + masked: true, + }, + ], + [ + 'ZImageModularPipeline:edit_image', + { + modelRepo: 'Tongyi-MAI/Z-Image-Turbo', + modelRevision: 'f332072aa78be7aecdf3ee76d5c247082da564a6', + loaderClass: 'ZImageImg2ImgPipeline', + format: SAVED_PNG_EDIT_FORMAT, + captureFormat: 'modiff.private.direct-image-edit-observation.v1', + consumed: [...stableDiffusionEditConsumed, ...imageGeometry], + sourceFingerprint: 'sha256:backend-source-v1:e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8', + runtimeContractDigest: '8cbe038eeeb6d4a4c079783b8d7e4915d9f78faad9495cb8e354504c66925cf5', + fullNativeSnapshot: true, + inputPathPrefix: '@data/images/', + nativeSourceMedia: true, + outputGeometryFromSettings: true, + }, + ], + [ + 'JoyImageEditPlusPipeline:edit_image', + { + ...joyPlusEdit, + fullNativeSnapshot: true, + sourceFingerprint: 'sha256:backend-source-v1:d275bc94517015b221a9a8b5aea7572ec68c491060855c7895526e1ba640796d', + originalRegistryHash: '6167f8ae8f746e854b73dfcb66000a54c71d65199c1f4b0b081b7a9ce02d9d28', + }, + ], + [ + 'JoyImageEditPlusPipeline:multi_image_reference_edit', + { + ...joyPlusEdit, + task: 'multi_image_reference_edit', + retainedFormMode: 'edit_image', + orderedReferences: 1, + sourceFingerprint: 'sha256:backend-source-v1:585997dc1146ec6effb20c260272babc01713ecdea4f78a0872c12ef2568ef83', + runtimeContractDigest: '8cbe038eeeb6d4a4c079783b8d7e4915d9f78faad9495cb8e354504c66925cf5', + }, + ], + [ + 'JoyImageEditPipeline:edit_image', + { + ...retainedImageEdit, + format: SAVED_HOST_FILE_EDIT_FORMAT, + modelRepo: 'jdopensource/JoyAI-Image-Edit-Diffusers', + modelRevision: '4b41fb25d961f37668750178ccbb380da326201c', + loaderClass: 'JoyImageEditPipeline', + sourceFingerprint: 'sha256:backend-source-v1:585997dc1146ec6effb20c260272babc01713ecdea4f78a0872c12ef2568ef83', + runtimeContractDigest: qwenPlusEdit.runtimeContractDigest, + fullNativeSnapshot: true, + }, + ], + ['QwenImageEditPlusPipeline:edit_image', qwenPlusEdit], + [ + 'QwenImageEditPipeline:edit_image', + { + ...qwenPlusEdit, + modelRepo: 'Qwen/Qwen-Image-Edit', + modelRevision: 'ac7f9318f633fc4b5778c59367c8128225f1e3de', + loaderClass: 'QwenImageEditPipeline', + }, + ], + [ + 'QwenImageEditPlusPipeline:multi_image_reference_edit', + { + ...qwenPlusEdit, + task: 'multi_image_reference_edit', + retainedFormMode: 'edit_image', + orderedReferences: 1, + }, + ], + [ + 'QwenImageModularPipeline:inpaint', + { + ...retainedCfgInpaint, + modelRepo: 'Qwen/Qwen-Image-2512', + modelRevision: '25468b98e3276ca6700de15c6628e51b7de54a26', + loaderClass: 'QwenImageInpaintPipeline', + }, + ], + [ + 'FluxDevPipeline:inpaint', + { + ...retainedCfgInpaint, + modelRepo: 'black-forest-labs/FLUX.1-dev', + modelRevision: '3de623fc3c33e44ffbe2bad470d0f45bccf2eb21', + loaderClass: 'FluxInpaintPipeline', + }, + ], +]); +const lcmRoute = editRoutes.get('LatentConsistencyModelPipeline:edit_image'); + +const ownerOrder = [ + ['quantization', 'modules.DiffusersRuntime', 'PipelineQuantizationConfigV2'], + ['recipe', 'modules.DiffusersRuntime', 'DiffusersExecutionRecipe'], + ['loader', 'modules.DiffusersImage', 'LoadPipeline'], + ['source', 'modules.Image', 'Load'], + ['edit', 'modules.DiffusersImage', 'Edit'], + ['preview', 'modules.Image', 'Preview'], +]; +const inpaintOwners = [ + ...ownerOrder.slice(0, 4), + ['mask', 'modules.Image', 'Load'], + ['edit', 'modules.DiffusersImage', 'Inpaint'], + ownerOrder.at(-1), +]; +const outpaintOwners = [ + ...ownerOrder.slice(0, 4), + ['canvas', 'modules.DiffusersImage', 'OutpaintCanvas'], + ...inpaintOwners.slice(-2), +]; +const editableFields = [ + ...baseConsumed, + ...imageGeometry, + 'cfg_normalize', + 'control_guidance_end', + 'control_guidance_start', + 'guidance_scale', + 'image_guidance_scale', + 'layers', + 'negative_prompt', + 'padding_mask_crop', + 'pag_adaptive_scale', + 'pag_scale', + 'reference_strength', + 'resolution', + 'strength', + 'use_en_prompt', +]; +const sha256 = (bytes) => createHash('sha256').update(bytes).digest('hex'); +const literal = (value) => ({ value, source: 'literal' }); +const same = (a, b, message) => assert.equal(stableStringify(a), stableStringify(b), message); +const keys = (row, expected) => + same(Object.keys(row ?? {}).sort(), [...expected].sort(), 'Unexpected evidence fields.'); + +function directOwners(api, hinted = false, masked = false, outpaint = false) { + keys(api, ['sid', 'nodes', 'paths', ...(hinted ? ['runtimeHints'] : [])]); + const owners = outpaint ? outpaintOwners : masked ? inpaintOwners : ownerOrder; + assert.equal(Object.keys(api.nodes).length, owners.length); + assert.equal(api.paths.length, 1); + const route = api.paths[0]; + assert.equal(route.length, owners.length); + assert.equal(new Set(route).size, owners.length); + return Object.fromEntries( + owners.map(([role, module, action], index) => { + const id = route[index]; + const node = api.nodes[id]; + keys(node, ['module', 'action', 'params']); + assert.equal(node.module, module); + assert.equal(node.action, action); + return [role, { id, node }]; + }), + ); +} + +export function bindPrivateImageEditGraph({ + expected, + submitted, + input, + maskInput, + references = [], + strengthVariant, + guidanceVariant, + canvasVariant, + inputPathPrefix = '', + nativePngEvidence = false, + residentRecipe = false, + cpuExecution = false, +}) { + const bound = structuredClone(expected); + const masked = maskInput !== undefined; + const canonical = directOwners(bound, false, masked, Boolean(canvasVariant)); + const observed = directOwners(submitted, Object.hasOwn(submitted, 'runtimeHints'), masked, Boolean(canvasVariant)); + const canonicalPrompt = canonical.edit.node.params.prompt; + assert.equal(canonicalPrompt.value, ''); + const safeBasename = nativePngEvidence ? /^[a-zA-Z0-9_-][\w.-]{0,200}\.png$/u : /^[a-zA-Z0-9_-][\w.-]{0,200}\.webp$/u; + const bindFile = (role, selected) => { + const field = canonical[role].node.params.file; + assert.deepEqual(field, { value: role === 'mask' ? '' : [], display: 'filebrowser' }); + field.value = selected.map((reference) => { + assert.equal(reference.nodeId, observed[role].id); + assert.equal(reference.field, 'file'); + assert.ok(typeof reference.sourceValue === 'string' && reference.sourceValue.startsWith(inputPathPrefix)); + assert.match( + reference.sourceValue.slice(inputPathPrefix.length), + role === 'mask' ? /^[a-zA-Z0-9_-][\w.-]{0,200}\.png$/u : safeBasename, + ); + return reference.sourceValue; + }); + }; + bindFile('source', [input, ...references]); + if (masked) bindFile('mask', [maskInput]); + const prompt = observed.edit.node.params.prompt.value; + assert.ok(typeof prompt === 'string' && prompt.length > 0 && prompt.length <= 4096 && prompt.trim() === prompt); + assert.ok(!/[\u0000-\u001f\u007f]/u.test(prompt)); + canonicalPrompt.value = prompt; + if (cpuExecution) bindRetainedCpuFloat32Recipe(canonical); + if (strengthVariant) { + assert.equal(canonical.edit.node.params.strength.value, strengthVariant.original); + canonical.edit.node.params.strength.value = strengthVariant.retained; + } + if (guidanceVariant) { + assert.equal(canonical.edit.node.params.guidance_scale.value, guidanceVariant.original); + canonical.edit.node.params.guidance_scale.value = guidanceVariant.retained; + } + for (const [field, original, retained] of canvasVariant ?? []) { + const setting = canonical.canvas.node.params[field]; + same(setting, { value: original }); + setting.value = retained; + } + if (residentRecipe) { + const offload = canonical.recipe.node.params.offload_mode; + same(offload, { value: 'model_cpu' }); + offload.value = 'none'; + } + const identity = canonicalGraphIdentity(bound); + same( + canonicalGraphIdentity(submitted), + identity, + 'Submitted edit differs outside its declared file, prompt and reviewed control variant.', + ); + return { ...observed, prompt, identity }; +} + +export function validatePrivateImageEditFields(bound, output, consumed = lcmRoute.consumed) { + const accounting = output.resolvedExecutionInputs; + for (const field of ['unavailableFields', 'uncapturedNodeIds']) same(accounting[field], []); + // The legacy flat summary combines the GPU loader/recipe and the inactive + // CPU preview selector. Only its exact, independently scoped causes are safe. + // Source and mask also each publish their own exact decoded image facts. + same( + accounting.ambiguousFields, + bound.mask ? ['device', 'imageAlphaChannel', 'imageSourceHashes', 'imageSourceModes'] : ['device'], + ); + const roles = (bound.mask ? inpaintOwners : ownerOrder).map(([role]) => bound[role]); + same(accounting.nodes.map(({ nodeId }) => nodeId).sort(), roles.map(({ id }) => id).sort()); + for (const { id, node } of roles) { + const observed = accounting.nodes.find(({ nodeId }) => nodeId === id); + assert.equal(observed.module, node.module); + assert.equal(observed.action, node.action); + same(observed.omittedFields, {}); + } + for (const [role, value, flags] of [ + ['recipe', 'cuda:0', { disposition: 'consumed' }], + ['loader', 'cuda:0', { disposition: 'superseded', reason: 'connected-recipe' }], + ['preview', 'cpu:0', { disposition: 'inactive', reason: 'already-decoded-image' }], + ]) { + const { id, node } = bound[role]; + const observed = accounting.nodes.find(({ nodeId }) => nodeId === id); + assert.equal(node.params.device.value, value); + same(observed.fields.device, { value, source: 'literal' }); + same(observed.fieldAccounting.fields.device, { ...flags, inputValue: value, value, source: 'literal' }); + } + const { fields, complete, inputProjections, outputProjections, unaccountedFields, omittedFields } = + accounting.nodes.find(({ nodeId }) => nodeId === bound.edit.id).fieldAccounting; + assert.equal(complete, true); + same(unaccountedFields, []); + same(omittedFields, {}); + keys(inputProjections, bound.mask ? ['image', 'mask_image'] : ['image']); + keys(outputProjections, []); + const params = bound.edit.node.params; + const metadata = 'image_contract'; + const known = [...editableFields, metadata]; + keys(fields, known); + keys(params, [...known, 'image', 'pipeline', ...(bound.mask ? ['mask_image'] : [])]); + for (const field of known) { + const value = params[field].value; + assert.notEqual(value, undefined); + const expected = + field === metadata + ? { + disposition: 'metadata', + reason: 'presentation-contract', + sha256: sha256(`image-contract-v1\n${JSON.stringify(stableJsonValue(value))}`), + } + : { + ...(consumed.includes(field) + ? { disposition: 'consumed' } + : { disposition: 'inactive', reason: 'adapter-inactive' }), + inputValue: value, + value, + }; + same(fields[field], { ...expected, source: 'literal' }, `Native Edit field differs: ${field}.`); + } + return fields; +} + +async function verifySourceBinding(clientRoot, bound, output, input, route) { + const { createServer } = await import('vite'); + const server = await createServer({ + root: clientRoot, + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, hmr: false, watch: null }, + appType: 'custom', + }); + try { + const { verifyImageEditSourceBinding, verifyImageInpaintSourceBinding } = await server.ssrLoadModule( + '/scripts/image-edit-source-binding.mjs', + ); + const receipt = output.resolvedExecutionInputs; + if (bound.mask) { + const { source, mask } = verifyImageInpaintSourceBinding({ + submittedApi: output.apiGraphSnapshot, + receipt, + outputIdentity: output, + sourceId: bound.source.id, + maskId: bound.mask.id, + inpaintId: bound.edit.id, + expectedOwner: route, + }); + assert.equal(source.sourceFile.sha256, input.file.sha256); + assert.equal(source.sourceFile.byteSize, input.file.bytes); + return { decodedInput: source.decodedImage, mask }; + } + const joined = verifyImageEditSourceBinding({ + submittedApi: output.apiGraphSnapshot, + receipt, + outputIdentity: output, + loadId: bound.source.id, + editId: bound.edit.id, + }); + assert.equal(joined.sourceFile.sha256, input.file.sha256); + assert.equal(joined.sourceFile.byteSize, input.file.bytes); + return { decodedInput: joined.decodedImage }; + } finally { + await server.close(); + } +} + +function reviewedEditRoute(workflowId, format) { + const route = editRoutes.get(workflowId); + assert.ok(route, 'Unknown private image-edit evidence route.'); + const saved = route.savedNativeRecipe; + return saved && saved.format === format ? { ...route, ...saved } : route; +} + +export function validatePrivateImageEditRuntimePlatform(workflowId, platform, backend, format) { + const route = reviewedEditRoute(workflowId, format); + if (route.windowsCudaRuntime && /^Windows-/iu.test(platform)) { + assert.equal(backend, 'cuda'); + } else { + assert.match(platform, /Linux/iu); + assert.equal(backend, 'rocm'); + } +} + +function verifySavedEditControls(bound, output, route) { + const receipt = output.resolvedExecutionInputs; + assert.equal(receipt.schemaVersion, 1); + assert.equal(receipt.source, 'backend-execution'); + assert.equal(receipt.taskId, output.taskId); + assert.equal(receipt.nodeId, bound.preview.id); + assert.equal(receipt.attemptIndex, 0); + assert.equal(receipt.truncated, false); + same(receipt.unavailableFields, []); + same(receipt.uncapturedNodeIds, []); + const ambiguous = bound.mask ? ['device', 'imageAlphaChannel', 'imageSourceHashes', 'imageSourceModes'] : ['device']; + same(receipt.ambiguousFields, route.cpuExecution ? [] : route.residentRecipe ? ['offloadMode'] : ambiguous); + const owners = (bound.canvas ? outpaintOwners : bound.mask ? inpaintOwners : ownerOrder).map(([role]) => bound[role]); + same(receipt.nodes.map(({ nodeId }) => nodeId).sort(), owners.map(({ id }) => id).sort()); + const record = ({ id, node }) => { + const row = receipt.nodes.find(({ nodeId }) => nodeId === id); + assert.equal(row.module, node.module); + assert.equal(row.action, node.action); + same(row.omittedFields, {}); + return row; + }; + const sampler = record(bound.edit); + assert.equal(sampler.fieldAccounting, undefined); + const controls = Object.fromEntries( + route.consumed.map((name) => [name, literal(bound.edit.node.params[name].value)]), + ); + if (route.guidanceObservedAsTrueCfg) { + controls.true_cfg_scale = controls.guidance_scale; + controls.guidance_scale = literal(null); + } + if (route.inputImagePromptPrefix) { + assert.ok(['', '', '<|image_'].every((token) => !bound.prompt.includes(token))); + controls.prompt = literal(route.inputImagePromptPrefix + bound.prompt); + } + for (const field of [ + 'conditioning_scale', + 'control_guidance_start', + 'control_guidance_end', + ...(route.inactiveRecorded ?? []), + ]) { + controls[field] = literal(null); + } + controls.executed_task = literal(route.task ?? (bound.mask ? 'inpaint' : 'edit_image')); + same(sampler.fields, controls, 'Saved sampler controls differ.'); + const loader = record(bound.loader); + for (const [field, value] of Object.entries({ + model_id: route.modelRepo, + revision: route.modelRevision, + pipeline_class: route.loaderClass, + mode: controls.executed_task.value, + })) + same(loader.fields[field], literal(value)); + const recipe = record(bound.recipe); + const offload = bound.recipe.node.params.offload_mode.value; + const connected = bound.loader.node.params.execution_recipe; + same(connected, { display: 'input', sourceId: bound.recipe.id, sourceKey: 'execution_recipe' }); + same(recipe.fields.offload_mode, literal(offload)); + assert.equal(recipe.fieldAccounting.fields.offload_mode.disposition, 'consumed'); + assert.equal(loader.fieldAccounting.fields.offload_mode.disposition, 'superseded'); + assert.equal(loader.fieldAccounting.fields.offload_mode.reason, 'connected-recipe'); + if (route.cpuExecution) { + same(recipe.fields.device, literal('cpu:0')); + same(loader.fields.device, literal('cpu:0')); + same(loader.fields.dtype, literal('float32')); + same(loader.fields.auto_offload, literal(false)); + assert.equal(offload, 'none'); + } + return record; +} + +async function verifySavedImageSource(bound, output, { input, maskInput, references }, route, read, json, evidence) { + const record = verifySavedEditControls(bound, output, route); + const { decodedMediaHash } = await import('./template-gallery-harness.mjs'); + const hostFileWitness = route.format === SAVED_HOST_FILE_EDIT_FORMAT; + const verify = async (role, selected, uploads, port, mode) => { + const owner = bound[role]; + assert.equal(uploads.length, selected.length); + const images = await Promise.all( + selected.map(async (entry, index) => { + const { bytes, file } = read(entry.file); + const { width, height } = await decodedMediaHash(file, 'image'); + const decodedImage = { width, height, mode }; + if (hostFileWitness) { + assert.equal(bytes.subarray(0, 8).toString('hex'), '89504e470d0a1a0a', 'The saved host source is not PNG.'); + } else { + verifyRetainedImageUpload( + json(uploads[index]), + entry, + decodedImage, + bytes, + role !== 'mask' && isNativeWebpEdit(route.format) ? 'webp' : 'png', + ); + } + return decodedImage; + }), + ); + const row = record(owner); + same( + row.fields, + { + alpha_channel: literal(owner.node.params.alpha_channel.value), + source_hashes: literal(selected.map(({ file }) => file.sha256)), + source_widths: literal(images.map(({ width }) => width)), + source_heights: literal(images.map(({ height }) => height)), + source_modes: literal(images.map(({ mode }) => mode)), + }, + `Original ${role} load differs.`, + ); + const destination = bound.canvas ?? bound.edit; + same(destination.node.params[port], { display: 'input', sourceId: owner.id, sourceKey: 'image' }); + if (!route.nativeSourceMedia) return images; + const nativeImages = verifyNativeLoadedImages( + owner.node, + row, + images.map(({ mode }) => mode), + ); + return nativeImages.map(({ sourceFile, decodedImage }, index) => { + const entry = selected[index]; + const { width, height } = images[index]; + same(sourceFile, { + sourceValue: entry.sourceValue, + sha256: entry.file.sha256, + byteSize: entry.file.bytes, + }); + same([decodedImage.width, decodedImage.height], [width, height]); + return decodedImage; + }); + }; + const [decodedInput, ...decodedReferences] = await verify( + 'source', + [input, ...references], + [evidence.inputUpload, ...(evidence.referenceUploads ?? [])], + 'image', + 'RGB', + ); + if (bound.canvas) { + const { params } = bound.canvas.node; + const width = decodedInput.width + params.left.value + params.right.value; + const height = decodedInput.height + params.top.value + params.bottom.value; + same([width, height], [params.width.value, params.height.value]); + same([width, height], [bound.edit.node.params.width.value, bound.edit.node.params.height.value]); + same(record(bound.canvas).fields, { width: literal(width), height: literal(height) }); + for (const [port, sourceKey] of [ + ['image', 'canvas'], + ['mask_image', 'mask_image'], + ]) { + same(bound.edit.node.params[port], { display: 'input', sourceId: bound.canvas.id, sourceKey }); + } + } + if (!maskInput) return { decodedInput, decodedReferences }; + assert.notEqual(input.file.sha256, maskInput.file.sha256); + const [decodedMask] = await verify('mask', [maskInput], [evidence.maskUpload], 'mask_image', 'L'); + same([decodedInput.width, decodedInput.height], [decodedMask.width, decodedMask.height]); + return { decodedInput, mask: { decodedImage: decodedMask } }; +} + +function validateRuntime( + task, + hints, + completion, + observation, + bound, + workflowId, + { modelRepo, modelRevision, loaderClass, cpuExecution, format }, +) { + same( + completion.runtimeHints, + { + ...hints, + controlledArtifacts: [], + loaderContract: ['modules.DiffusersImage.LoadPipeline'], + }, + 'Native completion runtime envelope differs.', + ); + const runtime = selectBackendRuntimeFingerprintEvidence([task.runtimeFingerprint]); + validatePrivateImageEditRuntimePlatform( + workflowId, + runtime.packages.platform, + task.runtimeMeasurement.backend, + format, + ); + assert.equal(runtime.torch.cuda_available, true); + assert.equal(task.runtimeMeasurement.device, 'cuda:0'); + const { elapsedSeconds, peakAllocatedBytes, peakReservedBytes, peakMeasurementVersion } = task.runtimeMeasurement; + assert.equal(peakMeasurementVersion, 2); + assert.ok(Number.isFinite(elapsedSeconds) && elapsedSeconds > 0 && elapsedSeconds <= 7200); + assert.ok( + Number.isSafeInteger(peakAllocatedBytes) && (cpuExecution ? peakAllocatedBytes === 0 : peakAllocatedBytes > 0), + ); + assert.ok(Number.isSafeInteger(peakReservedBytes) && peakReservedBytes >= peakAllocatedBytes); + assert.equal(observation.error, false); + assert.equal(observation.runtimeFingerprint, runtime.fingerprint); + assert.equal(observation.models.length, 1); + assert.equal(observation.models[0].complete, true); + assert.equal(observation.models[0].repairRequired, false); + const model = selectInstalledModelIdentity(observation, modelRepo); + assert.equal(model?.selectedRevision, modelRevision); + assert.equal(model?.modelRevision, `${modelRepo}@${modelRevision}`); + const loader = bound.loader.node.params; + same(loader.model_id.value, { source: 'hub', value: modelRepo }); + assert.equal(loader.revision.value, modelRevision); + assert.equal(loader.pipeline_class.value, loaderClass); + return { runtime, elapsedSeconds, peakAllocatedBytes }; +} + +export function verifyRetainedPngUpload(upload, input, decoded, bytes) { + verifyRetainedImageUpload(upload, input, decoded, bytes, 'png'); +} + +export function verifyRetainedWebpUpload(upload, input, decoded, bytes) { + verifyRetainedImageUpload(upload, input, decoded, bytes, 'webp'); +} + +function verifyRetainedImageUpload(upload, input, decoded, bytes, encoding) { + const png = encoding === 'png'; + keys(upload, ['error', 'path', 'media']); + assert.equal(upload.error, false); + assert.equal(upload.path, input.sourceValue); + assert.match( + input.sourceValue, + png ? /^@data\/images\/[a-zA-Z0-9_-][\w.-]{0,200}\.png$/u : /^@data\/images\/[a-zA-Z0-9_-][\w.-]{0,200}\.webp$/u, + ); + same( + upload.media, + { + filename: input.sourceValue.split('/').at(-1), + extension: '.' + encoding, + sizeBytes: bytes.length, + sha256: sha256(bytes), + kind: 'image', + mimeType: 'image/' + encoding, + width: decoded.width, + height: decoded.height, + frames: 1, + }, + `The retained source upload differs from the exact native ${encoding.toUpperCase()} input.`, + ); + if (png) { + assert.equal(bytes.subarray(0, 8).toString('hex'), '89504e470d0a1a0a', 'The retained source is not PNG.'); + } else { + assert.equal(bytes.subarray(0, 4).toString('ascii'), 'RIFF', 'The retained source is not WebP.'); + assert.equal(bytes.subarray(8, 12).toString('ascii'), 'WEBP', 'The retained source is not WebP.'); + assert.equal(bytes.readUInt32LE(4), bytes.length - 8, 'The retained WebP container size differs.'); + } +} + +function isNativeWebpEdit(format) { + return [SAVED_WEBP_EDIT_FORMAT, NATIVE_WEBP_EDIT_FORMAT, FLUX_ENAMEL_EDIT_FORMAT].includes(format); +} + +export async function readPrivateImageEditEvidence({ clientRoot, manifest, graph, authoring, artifact, evidencePath }) { + const workflowId = manifest.id; + const { modelRepo, modelRevision, loaderClass } = reviewedEditRoute(workflowId); + const target = canonicalWorkflowAuthoringContract(manifest, graph, authoring, artifact); + same(target.modelSet, [{ repoId: modelRepo, revision: modelRevision }], 'Private edit model pin differs.'); + same(target.outputPlan.mediaKinds, ['image']); + assert.equal(target.outputPlan.minimumAssetCount, 1); + const stat = lstatSync(evidencePath); + assert.ok(stat.isFile() && !stat.isSymbolicLink() && stat.size > 0 && stat.size <= 65_536); + const descriptorBytes = readFileSync(evidencePath); + const evidence = JSON.parse(descriptorBytes); + const route = reviewedEditRoute(workflowId, evidence.format); + const masked = route.masked === true; + const hostFileWitness = evidence.format === SAVED_HOST_FILE_EDIT_FORMAT && evidence.format === route.format; + const savedImage = + hostFileWitness || + ((isNativeWebpEdit(route.format) || [SAVED_PNG_EDIT_FORMAT, RETAINED_SERVER_EDIT_FORMAT].includes(route.format)) && + evidence.format === route.format); + const replayedRegistry = savedImage && !route.originalRegistryHash; + const referenceCount = route.orderedReferences ?? 0; + const pngFormat = masked ? NATIVE_PNG_INPAINT_FORMAT : NATIVE_PNG_EDIT_FORMAT; + const nativeUpload = savedImage || (route.nativePngEvidence === true && evidence.format === pngFormat); + keys(evidence, [ + 'schemaVersion', + 'format', + 'workflowId', + 'capture', + 'graphRequest', + 'graphAcknowledgment', + 'persistedOutputs', + ...(hostFileWitness + ? ['hostInputFiles'] + : nativeUpload + ? ['inputUpload'] + : ['inputServerBefore', 'inputServerAfter']), + ...(masked ? ['maskUpload'] : []), + ...(replayedRegistry ? ['registryReplay'] : []), + ...(referenceCount ? ['referenceUploads'] : []), + ...(route.cpuExecution ? ['resourceSamples', 'worker'] : []), + ]); + assert.equal(evidence.schemaVersion, 1); + assert.equal(evidence.format, nativeUpload && !savedImage ? pngFormat : route.format); + assert.equal(evidence.workflowId, workflowId); + const evidenceRoot = realpathSync(dirname(evidencePath)); + const retainedFiles = []; + const read = (ref, maximum = 16 * 1024 * 1024) => { + const physical = readCanonicalEvidenceFile(evidenceRoot, ref, maximum); + retainedFiles.push({ ...ref, absolutePath: physical.file }); + return physical; + }; + const json = (ref) => JSON.parse(read(ref).bytes); + const capture = json(evidence.capture); + keys(capture, [ + 'schemaVersion', + 'format', + 'workflowId', + 'qualificationClaims', + 'creatorPackage', + ...(route.serverRetainedOutput ? [] : ['outputPackage']), + 'runDetail', + 'nodes', + 'backendSourceBefore', + 'backendSourceAfter', + 'graphCompleted', + 'modelObservations', + 'inputs', + 'outputs', + ]); + assert.equal(capture.schemaVersion, 1); + assert.equal(capture.format, route.captureFormat); + assert.equal(capture.workflowId, workflowId); + same(capture.qualificationClaims, { releaseEligible: false, technicalVariant: true }); + assert.equal(capture.inputs.length, masked ? 2 : 1 + referenceCount); + assert.equal(capture.outputs.length, 1); + assert.equal(capture.modelObservations.length, 1); + const [input, ...otherInputs] = capture.inputs; + const reviewedSourceRecipe = route.reviewedSourceRecipes?.get(input.file?.sha256); + const maskInput = masked ? otherInputs[0] : undefined; + const references = masked ? [] : otherInputs; + if (referenceCount) { + assert.equal(evidence.referenceUploads.length, referenceCount); + assert.equal(new Set(capture.inputs.map(({ file }) => file.sha256)).size, capture.inputs.length); + } + const [outputRef] = capture.outputs; + for (const source of capture.inputs) keys(source, ['nodeId', 'field', 'sourceValue', 'file']); + keys(outputRef, ['backendPath', 'mediaType', 'file']); + const creator = json(capture.creatorPackage); + const outputPackage = route.serverRetainedOutput ? undefined : json(capture.outputPackage); + const run = json(capture.runDetail); + const graphCompleted = json(capture.graphCompleted); + const graphRequest = json(evidence.graphRequest); + const graphAcknowledgment = json(evidence.graphAcknowledgment); + const store = json(evidence.persistedOutputs); + if (hostFileWitness) { + verifyRetainedHostImageFiles(json(evidence.hostInputFiles), { + taskId: run.task.task_id, + persistedOutputSha256: evidence.persistedOutputs.sha256, + inputs: capture.inputs, + }); + } + const exactStoredOutputs = store.outputs.filter(({ taskId }) => taskId === run.task.task_id); + assert.equal(exactStoredOutputs.length, 1, 'The saved output store must contain exactly one result for the task.'); + const [persistedOutput] = exactStoredOutputs; + const retainedVisual = outputPackage?.latestOutput.graphSnapshot ?? persistedOutput.graphSnapshot; + const [expected, ...visualExports] = await exportCanonicalWorkflowGraphs(clientRoot, [ + graph, + creator.graph, + retainedVisual, + run.workflow_snapshot, + ]); + const bound = bindPrivateImageEditGraph({ + expected, + submitted: graphRequest, + input, + maskInput, + references, + strengthVariant: reviewedSourceRecipe?.strengthVariant ?? route.strengthVariant, + guidanceVariant: route.guidanceVariant, + canvasVariant: route.canvasVariant, + inputPathPrefix: route.inputPathPrefix, + nativePngEvidence: nativeUpload && !isNativeWebpEdit(route.format), + residentRecipe: route.residentRecipe, + cpuExecution: route.cpuExecution, + }); + for (const api of [creator.apiGraph, ...visualExports]) { + directOwners(api, false, masked, Boolean(route.canvasVariant)); + same(canonicalGraphIdentity(api), bound.identity, 'A saved visual owner graph differs from the original Run.'); + } + const previousExpertFamily = reviewedSourceRecipe?.previousExpertFamily ?? route.previousExpertFamily; + const runOptions = { + target, + expectedFormMode: route.retainedFormMode, + outputNodeId: bound.preview.id, + displayType: 'image', + creator, + outputPackage, + ...(route.serverRetainedOutput ? { retainedServerOutput: persistedOutput } : {}), + run, + graphCompleted, + graphRequest, + graphAcknowledgment, + persistedOutput, + validatePreparation: (preparation) => { + if (reviewedSourceRecipe) { + assert.equal(preparation.previousModelFamily, previousExpertFamily); + assert.equal(preparation.performed, true); + assert.ok(preparation.cleanup?.released?.models > 0, 'Expected the previous model release for the saved edit.'); + } + return previousExpertFamily + ? validateImagePromptPreparation(preparation, { modelType: loaderClass, previousExpertFamily }) + : validateUnmodifiedExpertPreparation(preparation, loaderClass, route.previousUnmodifiedModelFamily); + }, + }; + const hasNativeSnapshot = + route.fullNativeSnapshot || (route.fullOrLateNativeSnapshot && run.outputs[0]?.apiGraphSnapshot !== undefined); + if (hasNativeSnapshot) { + assert.equal(run.outputs.length, 1); + same(run.outputs[0], persistedOutput, 'Saved native output differs from the at-close output store.'); + } + const validateRun = + hasNativeSnapshot || route.serverRetainedOutput ? validateNativeVariantRun : validateLateNativeSingleAssetRun; + const { task, output, hints } = validateRun(runOptions); + same(hints.workflowSnapshot.studioForm, output.formSnapshot); + const alternate = + savedImage && + route.alternateSourceRegistryPair && + task.runtimeFingerprint.backendSource?.fingerprint === route.alternateSourceRegistryPair.sourceFingerprint + ? route.alternateSourceRegistryPair + : null; + const sourceProjection = !savedImage || route.samplerSourceProjection === true; + let sourceBinding; + if (!sourceProjection) { + sourceBinding = await verifySavedImageSource( + bound, + output, + { input, maskInput, references }, + alternate ? { ...route, nativeSourceMedia: alternate.nativeSourceMedia } : route, + read, + json, + evidence, + ); + } else { + validatePrivateImageEditFields(bound, output, route.consumed); + sourceBinding = await verifySourceBinding(clientRoot, bound, output, input, route); + const inputMedia = read(input.file); + if (nativeUpload) { + verifyRetainedPngUpload(json(evidence.inputUpload), input, sourceBinding.decodedInput, inputMedia.bytes); + } else { + for (const ref of [evidence.inputServerBefore, evidence.inputServerAfter]) { + assert.ok(read(ref).bytes.equals(inputMedia.bytes), 'The server-bound source bytes differ.'); + } + } + if (masked) { + const maskMedia = read(maskInput.file); + assert.equal(sourceBinding.mask.sourceFile.sha256, maskInput.file.sha256); + assert.equal(sourceBinding.mask.sourceFile.byteSize, maskInput.file.bytes); + verifyRetainedPngUpload(json(evidence.maskUpload), maskInput, sourceBinding.mask.decodedImage, maskMedia.bytes); + } + } + const { decodedInput, decodedReferences, mask } = sourceBinding; + const media = read(outputRef.file); + const item = validateNativeVariantOutput({ + output, + outputRef, + task, + bytes: media.bytes, + displayType: 'image', + contentType: 'image/webp', + }); + assert.match(output.id, /^run-output-[a-f0-9]{24}$/u); + assert.equal(item.backendPath, `@data/studio/outputs/${output.id}_item_00.webp`); + assert.equal(output.mediaCollectionHash, `sha256:collection:${sha256(JSON.stringify([item.mediaHash]))}`); + const { decodedMediaHash, technicalMediaErrors } = await import('./template-gallery-harness.mjs'); + const decoded = await decodedMediaHash(media.file, 'image'); + const expectedGeometry = route.outputGeometryFromSettings + ? { width: bound.edit.node.params.width.value, height: bound.edit.node.params.height.value } + : { width: decodedInput.width, height: decodedInput.height }; + same(technicalMediaErrors(decoded, expectedGeometry), []); + assert.equal(item.width, decoded.width); + assert.equal(item.height, decoded.height); + const nodes = read(capture.nodes); + const backendContract = backendContractIdentity(JSON.parse(nodes.bytes), bound.identity.canonicalGraph); + assert.ok(backendContract.fingerprint); + const source = backendSourceEvidence({ + before: json(capture.backendSourceBefore).identity, + after: json(capture.backendSourceAfter).identity, + runtimeFingerprint: task.runtimeFingerprint, + }); + same(source.blockers, []); + if (savedImage) { + assert.equal(source.identity.fingerprint, alternate?.sourceFingerprint ?? route.sourceFingerprint); + } + if (route.originalRegistryHash) { + assert.equal( + sha256(nodes.bytes), + alternate?.registryHash ?? route.originalRegistryHash, + 'The node registry does not match the saved runtime source.', + ); + } + if (replayedRegistry) { + const replay = json(evidence.registryReplay); + assert.equal(replay.scope, 'Original nodes handler only, with exact source and runtime contract'); + assert.equal(replay.modelRuns, 0); + assert.equal(replay.fileCount, source.identity.files.length); + assert.equal(replay.sourceFingerprint, route.sourceFingerprint); + assert.equal(replay.runtimeContract, route.runtimeContractDigest); + assert.equal(replay.nodeBytes, nodes.bytes.length); + assert.equal(replay.nodeHash, sha256(nodes.bytes)); + } + const { runtime, elapsedSeconds, peakAllocatedBytes } = validateRuntime( + task, + hints, + graphCompleted, + json(capture.modelObservations[0]), + bound, + workflowId, + route, + ); + const peakMemoryBytes = route.cpuExecution + ? validateSampledCpuWorkerMemory( + read(evidence.resourceSamples, 1024 * 1024).bytes, + json(evidence.worker), + source.identity, + task, + ) + : peakAllocatedBytes; + for (const ref of retainedFiles) readCanonicalEvidenceFile(evidenceRoot, ref, 16 * 1024 * 1024); + assert.ok(readFileSync(evidencePath).equals(descriptorBytes), 'Evidence descriptor changed during validation.'); + const receipt = { + schemaVersion: 1, + format: 'modiff.canonical-workflow-run-receipt.v1', + proofKind: 'real_backend_input_bound_model_variant', + ...target, + taskId: task.task_id, + capturedAt: new Date(task.completed_at * 1000).toISOString(), + graphHash: bound.identity.hash, + resourceCandidateId: null, + outputHash: item.mediaHash, + runtimeFingerprint: normalizeBackendRuntime(runtime).lockFingerprint, + backendSourceFingerprint: source.identity.fingerprint, + backendContractFingerprint: backendContract.fingerprint, + executionDurationSeconds: elapsedSeconds, + peakMemoryBytes, + canonicalDefaultsExecuted: false, + inputBinding: { nodeId: input.nodeId, field: 'file', sha256: input.file.sha256, decodedImage: decodedInput }, + ...(referenceCount + ? { + referenceBindings: references.map((reference, index) => ({ + nodeId: reference.nodeId, + field: 'file', + inputIndex: index + 1, + sha256: reference.file.sha256, + decodedImage: decodedReferences[index], + })), + } + : {}), + ...(masked + ? { + maskBinding: { + nodeId: maskInput.nodeId, + field: 'file', + sha256: maskInput.file.sha256, + decodedImage: mask.decodedImage, + }, + } + : {}), + promptBinding: { nodeId: bound.edit.id, field: 'prompt', sha256: sha256(bound.prompt) }, + decodedOutput: { hash: decoded.hash, width: decoded.width, height: decoded.height }, + observationLimits: { + fullConsumedFieldAccounting: false, + editConsumerControlsObserved: true, + sourceGeometryQualified: false, + ...(nativeUpload + ? { + sourceByteWitness: hostFileWitness + ? 'retained-host-file-with-native-load-and-typed-wire' + : !sourceProjection + ? 'native-load-and-upload-with-typed-wire' + : 'native-load-consumer-and-upload', + } + : {}), + ...(bound.canvas + ? { canvasSizeObserved: true, canvasPixelsObserved: false, derivedMaskPixelsObserved: false } + : {}), + ...((alternate?.nativeSourceMedia ?? route.nativeSourceMedia) === false + ? { fullSourceDecodeRecordObserved: false } + : {}), + ...(masked + ? { maskByteWitness: savedImage ? 'native-load-and-upload-with-typed-wire' : 'native-load-consumer-and-upload' } + : {}), + ...(route.retainedFormMode ? { retainedStudioFormMode: route.retainedFormMode } : {}), + ...(savedImage + ? { independentConsumerPixels: sourceProjection, configuredUnobservedControls: route.unobservedControls ?? [] } + : {}), + ...(hostFileWitness ? { originalUploadResponseObserved: false } : {}), + ...(route.cpuExecution ? { executionDevice: 'cpu:0', peakMemorySource: 'sampled-worker-rss' } : {}), + ...(route.serverRetainedOutput ? { clientApiSnapshotObserved: false, serverOutputStoreMatched: true } : {}), + ...(route.inputImagePromptPrefix ? { nativeInputMarkerBound: true } : {}), + physicalPlatformQualification: false, + }, + qualificationClaims: { + publicTemplate: false, + qualityApproved: false, + rightsApproved: false, + hardwareQualified: false, + modelResourceQualified: false, + }, + }; + return { + receipt, + provenance: { format: 'modiff.input-bound-model-variant-proof.v1', receipt }, + evidence, + descriptorBytes, + retainedFiles, + evidenceRoot, + }; +} diff --git a/scripts/private-image-edit-evidence.test.mjs b/scripts/private-image-edit-evidence.test.mjs new file mode 100644 index 00000000..4da0f063 --- /dev/null +++ b/scripts/private-image-edit-evidence.test.mjs @@ -0,0 +1,852 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { copyFileSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { basename, dirname, join, resolve } from 'node:path'; +import test from 'node:test'; +import { fileURLToPath } from 'node:url'; +import { canonicalJsonHash } from './canonical-json.mjs'; +import { validateLateNativeSingleAssetRun, validateNativeVariantRun } from './native-variant-run-evidence.mjs'; +import { readCanonicalWorkflowEvidence } from './release-contract-core.mjs'; +import { + bindPrivateImageEditGraph, + readPrivateImageEditEvidence, + validatePrivateImageEditRuntimePlatform, + verifyRetainedPngUpload, +} from './private-image-edit-evidence.mjs'; + +function archivedImage() { + const target = { task: 'edit_image', modelType: 'LatentConsistencyModelPipeline' }; + const formSnapshot = { ...target, mode: target.task, resourceMode: 'expert' }; + const graphSnapshot = { nodes: [], edges: [] }; + const workflowSnapshot = { ...graphSnapshot, studioForm: formSnapshot }; + const hints = { + clientRunId: 'client-run', + runInputHash: 'run-input', + workflowTabId: 'workflow', + workflowCanvasEpoch: 2, + workflowTitle: 'Private image test', + workflowSnapshot, + }; + const sid = 'native-session'; + const taskId = 'native-task'; + const apiGraphSnapshot = { sid, nodes: {}, paths: [], runtimeHints: hints }; + const item = { displayType: 'image', backendPath: '@data/studio/outputs/test.webp', byteSize: 10 }; + const earlyMedia = [{ ...item, durationSeconds: null }]; + const mediaItems = [{ ...item, label: 'Item 1' }]; + const backendIdentity = { source: 'backend-record', backendExecutionId: taskId, mediaHash: 'native-image-sha' }; + const runtimeFingerprint = { fingerprint: 'private-runtime' }; + const runtimeMeasurement = { elapsedSeconds: 1 }; + const runtimePreparation = null; + const shared = { + taskId, + sid, + id: 'native-image', + attemptIndex: 0, + clientRunId: hints.clientRunId, + runInputHash: hints.runInputHash, + workflowTabId: hints.workflowTabId, + nodeId: 'preview', + fieldKey: 'preview', + displayType: 'image', + formSnapshot, + graphSnapshot, + resolvedExecutionInputs: {}, + mediaHash: backendIdentity.mediaHash, + mediaCollectionHash: 'native-collection-sha', + }; + const output = { + ...shared, + apiGraphSnapshot, + mediaItems, + backendProvenance: { ...backendIdentity, mediaItems, capturedAt: 200, exactTemplateCompatible: false }, + }; + const early = { + ...shared, + mediaItems: earlyMedia, + backendProvenance: { ...backendIdentity, mediaItems: earlyMedia, capturedAt: 100 }, + }; + const context = { + client_run_id: hints.clientRunId, + run_input_hash: hints.runInputHash, + workflow_tab_id: hints.workflowTabId, + workflow_canvas_epoch: hints.workflowCanvasEpoch, + }; + const run = { + task: { + task_id: taskId, + sid, + status: 'completed', + attempt_index: 0, + resourceCandidateId: null, + started_at: 100, + completed_at: 200, + ...context, + runtimeFingerprint, + runtimeMeasurement, + runtimePreparation, + workflow_snapshot: workflowSnapshot, + }, + workflow_id: hints.workflowTabId, + workflow_title: hints.workflowTitle, + workflow_snapshot: workflowSnapshot, + outputs: [early], + }; + return { + target, + displayType: 'image', + outputNodeId: 'preview', + run, + creator: { manifest: { packageType: 'modiff-workflow-share' }, metadata: { studio: formSnapshot } }, + outputPackage: { + manifest: { packageType: 'modiff-output-package' }, + apiGraph: apiGraphSnapshot, + graph: graphSnapshot, + latestOutput: structuredClone(output), + }, + graphCompleted: { + type: 'graph_completed', + task_id: taskId, + sid, + ...context, + deterministicMode: null, + resourceRetryHistory: [], + runtimeBudget: { applied: false }, + runtimeFingerprint, + runtimeMeasurement, + runtimePreparation, + }, + graphRequest: apiGraphSnapshot, + graphAcknowledgment: { error: false, sid, task_id: taskId }, + persistedOutput: output, + }; +} + +test('strict output verification accepts a separately joined late native image snapshot', () => { + const options = archivedImage(); + const before = structuredClone(options); + assert.throws(() => validateNativeVariantRun(options), /native output apiGraphSnapshot differs/u); + const { task, output } = validateLateNativeSingleAssetRun(options); + assert.equal(task.task_id, 'native-task'); + assert.equal(output.apiGraphSnapshot.sid, 'native-session'); + assert.deepEqual(options, before); +}); + +test('server-retained images require the original Run exchange and matching backend records', () => { + const options = archivedImage(); + const retainedServerOutput = structuredClone(options.run.outputs[0]); + const retained = { ...options, outputPackage: undefined, retainedServerOutput }; + assert.deepEqual(validateNativeVariantRun(retained).output, retainedServerOutput); + assert.throws( + () => validateNativeVariantRun({ ...retained, graphRequest: undefined }), + /requires the original Run exchange/u, + ); + assert.throws( + () => + validateNativeVariantRun({ + ...retained, + graphAcknowledgment: { ...retained.graphAcknowledgment, task_id: 'stale' }, + }), + assert.AssertionError, + ); + options.run.outputs[0].mediaHash = 'unrelated-output'; + assert.throws(() => validateNativeVariantRun(retained), /Original native output mediaHash differs/u); +}); + +test('the late native image join rejects a changed task, capture, graph or output', () => { + const scenarios = [ + [ + ({ persistedOutput }) => { + persistedOutput.taskId = 'different-task'; + }, + /changed taskId/u, + ], + [ + ({ persistedOutput }) => { + persistedOutput.apiGraphSnapshot = undefined; + }, + /snapshot is missing/u, + ], + [ + ({ persistedOutput }) => { + persistedOutput.apiGraphSnapshot = { ...persistedOutput.apiGraphSnapshot, sid: 'different' }; + }, + /apiGraphSnapshot differs/u, + ], + [ + ({ run }) => { + run.outputs[0].resolvedExecutionInputs = { swapped: true }; + }, + /changed resolvedExecutionInputs/u, + ], + [ + ({ persistedOutput }) => { + persistedOutput.mediaItems[0].byteSize = 11; + }, + /image identity changed/u, + ], + [ + ({ persistedOutput }) => { + persistedOutput.backendProvenance.backendExecutionId = 'stale-task'; + }, + /provenance identity changed/u, + ], + [ + ({ persistedOutput }) => { + persistedOutput.backendProvenance.exactTemplateCompatible = true; + }, + /false/u, + ], + ]; + for (const [mutate, error] of scenarios) { + const options = archivedImage(); + mutate(options); + assert.throws(() => validateLateNativeSingleAssetRun(options), error); + } +}); + +test('private direct image edit graph binds exactly one empty file and one empty prompt', () => { + const expected = { + sid: 'canonical', + nodes: { + quantization: { module: 'modules.DiffusersRuntime', action: 'PipelineQuantizationConfigV2', params: {} }, + recipe: { module: 'modules.DiffusersRuntime', action: 'DiffusersExecutionRecipe', params: {} }, + loader: { module: 'modules.DiffusersImage', action: 'LoadPipeline', params: {} }, + source: { module: 'modules.Image', action: 'Load', params: { file: { value: [], display: 'filebrowser' } } }, + edit: { + module: 'modules.DiffusersImage', + action: 'Edit', + params: { + prompt: { value: '' }, + strength: { value: 0.8 }, + guidance_scale: { value: 3.5 }, + image: { display: 'input', sourceId: 'source', sourceKey: 'image' }, + }, + }, + preview: { module: 'modules.Image', action: 'Preview', params: {} }, + }, + paths: [['quantization', 'recipe', 'loader', 'source', 'edit', 'preview']], + }; + const input = { nodeId: 'source', field: 'file', sourceValue: 'source.webp' }; + const submitted = structuredClone(expected); + submitted.nodes.source.params.file.value = [input.sourceValue]; + submitted.nodes.edit.params.prompt.value = 'A lake at dawn.'; + const invoke = () => bindPrivateImageEditGraph({ expected, submitted, input }); + assert.equal(invoke().prompt, 'A lake at dawn.'); + assert.deepEqual(expected.nodes.source.params.file.value, []); + submitted.nodes.edit.params.strength.value = 0.7; + assert.throws(invoke, /changed|differs outside/u); + const strengthVariant = { original: 0.8, retained: 0.7 }; + const bindVariant = (variant = strengthVariant) => + bindPrivateImageEditGraph({ expected, submitted, input, strengthVariant: variant }); + assert.equal(bindVariant().edit.node.params.strength.value, 0.7); + assert.equal(expected.nodes.edit.params.strength.value, 0.8); + assert.throws(() => bindVariant({ ...strengthVariant, original: 0.5 })); + submitted.nodes.edit.params.strength.value = 0.8; + assert.throws(() => bindVariant(), /differs outside/u); + submitted.nodes.edit.params.guidance_scale.value = 4; + assert.throws(invoke, /differs outside/u); + const guidanceVariant = { original: 3.5, retained: 4 }; + const bindGuidance = () => bindPrivateImageEditGraph({ expected, submitted, input, guidanceVariant }); + assert.equal(bindGuidance().edit.node.params.guidance_scale.value, 4); + assert.equal(expected.nodes.edit.params.guidance_scale.value, 3.5); + submitted.nodes.edit.params.guidance_scale.value = 5; + assert.throws(bindGuidance, /differs outside/u); + submitted.nodes.edit.params.guidance_scale.value = 3.5; + const scoped = { ...input, sourceValue: '@data/images/source.webp' }; + submitted.nodes.source.params.file.value = [scoped.sourceValue]; + assert.equal( + bindPrivateImageEditGraph({ expected, submitted, input: scoped, inputPathPrefix: '@data/images/' }).prompt, + 'A lake at dawn.', + ); + for (const sourceValue of ['source.webp', '@data/videos/source.webp', '@data/images/../source.webp']) { + submitted.nodes.source.params.file.value = [sourceValue]; + assert.throws(() => + bindPrivateImageEditGraph({ + expected, + submitted, + input: { ...scoped, sourceValue }, + inputPathPrefix: '@data/images/', + }), + ); + } + submitted.nodes.source.params.file.value = [input.sourceValue]; + submitted.nodes.edit.params.image.sourceKey = 'mask'; + assert.throws(invoke, /differs outside/u); + submitted.loops = []; + assert.throws(invoke, /Unexpected evidence fields/u); +}); + +function assertPinnedPrivateEdit({ modelType, task = 'edit_image', graphPath, sourceTemplateId, repo, exactRevision }) { + const makeOptions = (revision) => { + const graph = { + nodes: [ + { + id: 'model', + data: { + module: 'modules.DiffusersImage', + action: 'LoadPipeline', + params: { model_id: { value: { source: 'hub', value: repo } }, revision: { value: revision } }, + }, + }, + ], + edges: [], + }; + const manifest = { + id: modelType + ':' + task, + modelType, + mode: task, + graphPath, + graphHash: canonicalJsonHash(graph), + sourceTemplateId, + requiredArtifacts: [repo], + }; + const authoring = { + id: 'template-authoring:' + manifest.id, + canonicalWorkflowId: manifest.id, + modelType, + mode: manifest.mode, + canonicalGraph: { path: manifest.graphPath, sha256: manifest.graphHash }, + defaultsPlan: { sourceGraphSha256: manifest.graphHash }, + artifactPlan: { requiredArtifacts: [repo] }, + outputPlan: { mediaKinds: ['image'], minimumAssetCount: 1 }, + }; + return { manifest, graph, authoring, evidencePath: '' }; + }; + return Promise.all([ + assert.rejects(readPrivateImageEditEvidence(makeOptions(exactRevision)), { code: 'ENOENT' }), + assert.rejects(readPrivateImageEditEvidence(makeOptions('0'.repeat(40))), /Private edit model pin differs/u), + ]); +} + +test('SDXL private Edit evidence requires the reviewed checkpoint before reading its descriptor', () => + assertPinnedPrivateEdit({ + modelType: 'StableDiffusionXLPipeline', + graphPath: 'studio/stable-diffusion-xl-pipeline/edit-image.json', + sourceTemplateId: 'task-template:sdxl-base:edit-image:v1', + repo: 'stabilityai/stable-diffusion-xl-base-1.0', + exactRevision: '462165984030d82259a11f4367a4eed129e94a7b', + })); + +test('SD1.5 private Edit evidence requires the reviewed checkpoint before reading its descriptor', () => + assertPinnedPrivateEdit({ + modelType: 'StableDiffusionPipeline', + graphPath: 'studio/stable-diffusion-pipeline/edit-image.json', + sourceTemplateId: 'task-template:sd15-base:edit-image:v1', + repo: 'stable-diffusion-v1-5/stable-diffusion-v1-5', + exactRevision: '451f4fe16113bff5a5d2269ed5ad43b0592e9a14', + })); + +test('only the reviewed edit and masked routes accept the observed Windows CUDA runtime', () => { + const sd15 = 'StableDiffusionPipeline:edit_image'; + const sdxl = 'StableDiffusionXLPipeline:edit_image'; + const windows = 'Windows-11-10.0.26300-SP0'; + const linux = 'Linux-7.0.0-38-generic-x86_64-with-glibc2.43'; + assert.doesNotThrow(() => validatePrivateImageEditRuntimePlatform(sd15, windows, 'cuda')); + assert.doesNotThrow(() => validatePrivateImageEditRuntimePlatform(sd15, linux, 'rocm')); + assert.throws(() => validatePrivateImageEditRuntimePlatform(sd15, windows, 'rocm')); + assert.throws(() => validatePrivateImageEditRuntimePlatform(sd15, linux, 'cuda')); + assert.throws(() => validatePrivateImageEditRuntimePlatform(sd15, 'Darwin-26.0', 'mps')); + assert.doesNotThrow(() => + validatePrivateImageEditRuntimePlatform('StableDiffusionPipeline:inpaint', windows, 'cuda'), + ); + assert.doesNotThrow(() => + validatePrivateImageEditRuntimePlatform('StableDiffusionXLPipeline:inpaint', windows, 'cuda'), + ); + assert.throws(() => validatePrivateImageEditRuntimePlatform('StableDiffusionXLPipeline:inpaint', windows, 'rocm')); + assert.throws(() => + validatePrivateImageEditRuntimePlatform('StableDiffusionPipeline:control_inpaint', windows, 'cuda'), + ); + assert.doesNotThrow(() => validatePrivateImageEditRuntimePlatform(sdxl, linux, 'rocm')); + assert.throws(() => validatePrivateImageEditRuntimePlatform(sdxl, windows, 'cuda')); +}); + +test('SD1.5 masked evidence requires the reviewed checkpoint before reading its descriptor', () => + assertPinnedPrivateEdit({ + modelType: 'StableDiffusionPipeline', + task: 'inpaint', + graphPath: 'studio/stable-diffusion-pipeline/inpaint.json', + sourceTemplateId: 'task-template:sd15-base:inpaint:v1', + repo: 'stable-diffusion-v1-5/stable-diffusion-v1-5', + exactRevision: '451f4fe16113bff5a5d2269ed5ad43b0592e9a14', + })); + +test('SDXL masked evidence requires the reviewed checkpoint before reading its descriptor', () => + assertPinnedPrivateEdit({ + modelType: 'StableDiffusionXLPipeline', + task: 'inpaint', + graphPath: 'studio/stable-diffusion-xl-pipeline/inpaint.json', + sourceTemplateId: 'task-template:sdxl-base:inpaint:v1', + repo: 'stabilityai/stable-diffusion-xl-base-1.0', + exactRevision: '462165984030d82259a11f4367a4eed129e94a7b', + })); + +const retainedSdxlEvidence = process.env.MODIFF_SDXL_EDIT_NATIVE_PNG_EVIDENCE; +test( + 'saved SDXL edit binds the original PNG upload and consumed RGB input', + { skip: !retainedSdxlEvidence }, + async () => { + const clientRoot = fileURLToPath(new URL('..', import.meta.url)); + const backendRoot = resolve(process.env.MODIFF_BACKEND_DIR ?? join(clientRoot, '..', 'MoDiff')); + const evidencePath = resolve(retainedSdxlEvidence); + const args = { clientRoot, backendRoot, workflowId: 'StableDiffusionXLPipeline:edit_image', evidencePath }; + const original = await readCanonicalWorkflowEvidence(args); + const { receipt } = original; + assert.equal(receipt.inputBinding.sha256, 'e75c20f0e8a74e283b996bf526e6ea74535ed24125ad97c2d92508d3435d7a87'); + assert.equal(receipt.inputBinding.decodedImage.mode, 'RGB'); + assert.ok(Object.values(receipt.qualificationClaims).every((flag) => flag === false)); + + const root = mkdtempSync(join(tmpdir(), 'modiff-sdxl-edit-evidence-')); + try { + for (const file of original.retainedFiles) { + assert.equal(basename(file.path), file.path); + copyFileSync(file.absolutePath, join(root, file.path)); + } + const descriptor = JSON.parse(original.descriptorBytes); + const uploadPath = join(root, descriptor.inputUpload.path); + const upload = JSON.parse(readFileSync(uploadPath, 'utf8')); + upload.media.sha256 = '0'.repeat(64); + const changedUpload = Buffer.from(JSON.stringify(upload)); + writeFileSync(uploadPath, changedUpload); + descriptor.inputUpload.bytes = changedUpload.length; + descriptor.inputUpload.sha256 = createHash('sha256').update(changedUpload).digest('hex'); + const changedPath = join(root, 'evidence.json'); + writeFileSync(changedPath, JSON.stringify(descriptor)); + await assert.rejects(readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath })); + } finally { + rmSync(root, { recursive: true, force: true }); + } + }, +); + +const retainedMaskEvidence = process.env.MODIFF_SD15_INPAINT_EVIDENCE; +const retainedDreamLiteEdit = process.env.MODIFF_DREAMLITE_MOBILE_PRIVATE_EVIDENCE; + +test('DreamLite Mobile verifies its private saved edit and input bytes', { skip: !retainedDreamLiteEdit }, async () => { + const clientRoot = fileURLToPath(new URL('..', import.meta.url)); + const backendRoot = resolve(process.env.MODIFF_BACKEND_DIR ?? join(clientRoot, '..', 'MoDiff')); + const { receipt } = await readCanonicalWorkflowEvidence({ + clientRoot, + backendRoot, + workflowId: 'DreamLiteMobilePipeline:edit_image', + evidencePath: resolve(retainedDreamLiteEdit), + }); + assert.equal(receipt.taskId, 'UkIOy4hkWvBa'); + assert.equal(receipt.inputBinding.sha256, 'b0c9f07333c2fc9a5de03f2b8f28d07bfaff162e38920d2f3bc70806be4be309'); + assert.ok(Object.values(receipt.qualificationClaims).every((value) => value === false)); +}); + +test( + 'saved Inpaint evidence binds two original PNG uploads to their distinct consumed ports', + { + skip: !retainedMaskEvidence, + }, + async () => { + const clientRoot = fileURLToPath(new URL('..', import.meta.url)); + const backendRoot = resolve(process.env.MODIFF_BACKEND_DIR ?? join(clientRoot, '..', 'MoDiff')); + const evidencePath = resolve(retainedMaskEvidence); + const args = { clientRoot, backendRoot, workflowId: 'StableDiffusionPipeline:inpaint', evidencePath }; + const original = await readCanonicalWorkflowEvidence(args); + const { receipt } = original; + assert.equal(receipt.inputBinding.decodedImage.mode, 'RGB'); + assert.equal(receipt.maskBinding.decodedImage.mode, 'L'); + assert.notEqual(receipt.inputBinding.sha256, receipt.maskBinding.sha256); + assert.ok(Object.values(receipt.qualificationClaims).every((flag) => flag === false)); + + const root = mkdtempSync(join(tmpdir(), 'modiff-inpaint-evidence-')); + try { + for (const file of original.retainedFiles) { + assert.equal(basename(file.path), file.path); + copyFileSync(file.absolutePath, join(root, file.path)); + } + const swapped = JSON.parse(original.descriptorBytes); + [swapped.inputUpload, swapped.maskUpload] = [swapped.maskUpload, swapped.inputUpload]; + const changedPath = join(root, 'evidence.json'); + writeFileSync(changedPath, JSON.stringify(swapped)); + await assert.rejects(readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath })); + assert.deepEqual(readFileSync(evidencePath), original.descriptorBytes); + } finally { + rmSync(root, { recursive: true, force: true }); + } + }, +); + +for (const [workflowId, variable, hasMask, unobserved] of [ + ['ChromaInpaintPipeline:inpaint', 'MODIFF_SAVED_CHROMA_INPAINT_EVIDENCE', true, []], + [ + 'StableDiffusionXLInstructPix2PixPipeline:edit_image', + 'MODIFF_SAVED_PIX2PIX_EVIDENCE', + false, + ['image_guidance_scale'], + ], + [ + 'StableDiffusionPAGPipeline:edit_image', + 'MODIFF_SAVED_PAG_EDIT_EVIDENCE', + false, + ['pag_scale', 'pag_adaptive_scale'], + ], + [ + 'StableDiffusionPAGPipeline:inpaint', + 'MODIFF_SAVED_PAG_INPAINT_EVIDENCE', + true, + ['pag_scale', 'pag_adaptive_scale'], + ], + ['ZImageModularPipeline:edit_image', 'MODIFF_SAVED_ZIMAGE_EDIT_EVIDENCE', false, []], + ['QwenImageEditPlusPipeline:edit_image', 'MODIFF_SAVED_QWEN_AMBER_EVIDENCE', false, []], + ['QwenImageEditPipeline:edit_image', 'MODIFF_SAVED_QWEN_SLATE_EVIDENCE', false, []], + ['QwenImageModularPipeline:inpaint', 'MODIFF_SAVED_QWEN_SCRATCH_EVIDENCE', true, []], + ['FluxDevPipeline:inpaint', 'MODIFF_SAVED_FLUX_DEV_REPAIR_EVIDENCE', true, []], + ['LongCatImageEditPipeline:edit_image', 'MODIFF_SAVED_LONGCAT_EDIT_EVIDENCE', false, []], + ['QwenImageModularPipeline:edit_image', 'MODIFF_QWEN_BOOKSHOP_EDIT_EVIDENCE', false, []], + ['ChromaImg2ImgPipeline:edit_image', 'MODIFF_CHROMA_LARCH_EDIT_EVIDENCE', false, []], + ['DreamLitePipeline:edit_image', 'MODIFF_SAVED_DREAMLITE_COPPER_EDIT_EVIDENCE', false, []], + ['JoyImageEditPipeline:edit_image', 'MODIFF_SAVED_JOY_BASE_EDIT_EVIDENCE', false, []], + ['StableDiffusionXLPipeline:edit_image', 'MODIFF_SDXL_LINEN_EDIT_EVIDENCE', false, []], + ['FluxDevPipeline:edit_image', 'MODIFF_SAVED_FLUX_DEV_TEAPOT_EVIDENCE', false, []], + ['FluxDevPipeline:edit_image', 'MODIFF_FLUX_ENAMEL_EDIT_EVIDENCE', false, []], + ['FluxKontextInpaintPipeline:inpaint', 'MODIFF_SAVED_KONTEXT_WINDOW_EVIDENCE', true, []], + [ + 'FluxKontextInpaintPipeline:outpaint', + 'MODIFF_SAVED_KONTEXT_PANORAMA_EVIDENCE', + false, + ['left', 'right', 'top', 'bottom', 'overlap', 'feather', 'fill_color'], + ], + [ + 'ChromaInpaintPipeline:outpaint', + 'MODIFF_SAVED_CHROMA_PANORAMA_EVIDENCE', + false, + ['left', 'right', 'top', 'bottom', 'overlap', 'feather', 'fill_color'], + ], + [ + 'StableDiffusionXLPAGPipeline:edit_image', + 'MODIFF_SAVED_SDXL_PAG_AMBER_EDIT_EVIDENCE', + false, + ['pag_scale', 'pag_adaptive_scale'], + ], + [ + 'StableDiffusionXLPAGPipeline:edit_image', + 'MODIFF_SAVED_SDXL_PAG_GRAPHITE_EDIT_EVIDENCE', + false, + ['pag_scale', 'pag_adaptive_scale'], + ], + ['ZImageInpaintPipeline:inpaint', 'MODIFF_SAVED_ZIMAGE_REPAIR_EVIDENCE', true, []], + ['Flux2KleinInpaintPipeline:inpaint', 'MODIFF_SAVED_FLUX_KLEIN_REPAIR_EVIDENCE', true, []], + [ + 'Flux2KleinInpaintPipeline:outpaint', + 'MODIFF_SAVED_FLUX_KLEIN_OUTPAINT_EVIDENCE', + false, + ['left', 'right', 'top', 'bottom', 'overlap', 'feather', 'fill_color'], + ], + [ + 'ZImageInpaintPipeline:outpaint', + 'MODIFF_SAVED_ZIMAGE_OUTPAINT_EVIDENCE', + false, + ['left', 'right', 'top', 'bottom', 'overlap', 'feather', 'fill_color'], + ], + [ + 'StableDiffusionXLPAGPipeline:inpaint', + 'MODIFF_SAVED_SDXL_PAG_REPAIR_EVIDENCE', + true, + ['pag_scale', 'pag_adaptive_scale'], + ], +]) { + const saved = process.env[variable]; + test( + `${workflowId} retains the original source identity with disclosed sampler limits`, + { skip: !saved }, + async () => { + const clientRoot = fileURLToPath(new URL('..', import.meta.url)); + const backendRoot = resolve(process.env.MODIFF_BACKEND_DIR ?? join(clientRoot, '..', 'MoDiff')); + const evidencePath = resolve(saved); + const args = { clientRoot, backendRoot, workflowId, evidencePath }; + const original = await readCanonicalWorkflowEvidence(args); + const { receipt } = original; + const hostFileWitness = workflowId === 'JoyImageEditPipeline:edit_image'; + const samplerSourceProjection = workflowId === 'StableDiffusionXLPipeline:edit_image'; + assert.equal(receipt.observationLimits.independentConsumerPixels, samplerSourceProjection); + assert.equal( + receipt.observationLimits.sourceByteWitness, + hostFileWitness + ? 'retained-host-file-with-native-load-and-typed-wire' + : samplerSourceProjection + ? 'native-load-consumer-and-upload' + : 'native-load-and-upload-with-typed-wire', + ); + if (hostFileWitness) assert.equal(receipt.observationLimits.originalUploadResponseObserved, false); + assert.deepEqual(receipt.observationLimits.configuredUnobservedControls, unobserved); + assert.equal(Boolean(receipt.maskBinding), hasMask); + const root = mkdtempSync(join(tmpdir(), 'modiff-retained-edit-')); + try { + for (const file of original.retainedFiles) { + assert.equal(basename(file.path), file.path); + copyFileSync(file.absolutePath, join(root, file.path)); + } + const descriptor = JSON.parse(original.descriptorBytes); + const changedPath = join(root, 'evidence.json'); + const changedStrength = + variable === 'MODIFF_SAVED_SDXL_PAG_GRAPHITE_EDIT_EVIDENCE' + ? { action: 'Edit', expected: 0.85 } + : descriptor.format === 'modiff.private.direct-image-edit-native-webp.v1' + ? { action: 'Inpaint', expected: 0.96 } + : null; + if (changedStrength) { + const altered = structuredClone(descriptor); + const path = join(root, altered.graphRequest.path); + const originalRequest = readFileSync(path); + const graph = JSON.parse(originalRequest); + const edit = Object.values(graph.nodes).find(({ action }) => action === changedStrength.action); + assert.equal(edit.params.strength.value, changedStrength.expected); + edit.params.strength.value = 0.8; + const bytes = Buffer.from(JSON.stringify(graph)); + Object.assign(altered.graphRequest, { + bytes: bytes.length, + sha256: createHash('sha256').update(bytes).digest('hex'), + }); + writeFileSync(path, bytes); + writeFileSync(changedPath, JSON.stringify(altered)); + await assert.rejects( + readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath }), + /outside its declared file, prompt and reviewed control variant/u, + ); + writeFileSync(path, originalRequest); + } + if (receipt.observationLimits.fullSourceDecodeRecordObserved === false) { + const changed = structuredClone(descriptor); + const capturePath = join(root, changed.capture.path); + const captureBytes = readFileSync(capturePath); + const capture = JSON.parse(captureBytes); + const nodesPath = join(root, capture.nodes.path); + const nodesBytes = readFileSync(nodesPath); + const replacement = Buffer.concat([nodesBytes, Buffer.from('\n')]); + Object.assign(capture.nodes, { + bytes: replacement.length, + sha256: createHash('sha256').update(replacement).digest('hex'), + }); + const changedCapture = Buffer.from(JSON.stringify(capture)); + Object.assign(changed.capture, { + bytes: changedCapture.length, + sha256: createHash('sha256').update(changedCapture).digest('hex'), + }); + writeFileSync(nodesPath, replacement); + writeFileSync(capturePath, changedCapture); + writeFileSync(changedPath, JSON.stringify(changed)); + await assert.rejects( + readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath }), + /node registry does not match the saved runtime source/u, + ); + writeFileSync(nodesPath, nodesBytes); + writeFileSync(capturePath, captureBytes); + } + if (hostFileWitness) { + const changed = structuredClone(descriptor); + const path = join(root, changed.hostInputFiles.path); + const originalBytes = readFileSync(path); + const witness = JSON.parse(originalBytes); + witness.files[0].sha256 = 'a'.repeat(64); + const bytes = Buffer.from(JSON.stringify(witness)); + Object.assign(changed.hostInputFiles, { + bytes: bytes.length, + sha256: createHash('sha256').update(bytes).digest('hex'), + }); + writeFileSync(path, bytes); + writeFileSync(changedPath, JSON.stringify(changed)); + await assert.rejects( + readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath }), + /Original host inputs differ/u, + ); + writeFileSync(path, originalBytes); + } + if (workflowId.endsWith(':outpaint')) { + assert.equal(receipt.observationLimits.canvasSizeObserved, true); + assert.equal(receipt.observationLimits.canvasPixelsObserved, false); + assert.equal(receipt.observationLimits.derivedMaskPixelsObserved, false); + assert.deepEqual( + [receipt.decodedOutput.width, receipt.decodedOutput.height], + [workflowId === 'ChromaInpaintPipeline:outpaint' ? 1024 : 1344, 768], + ); + const altered = structuredClone(descriptor); + const path = join(root, altered.graphRequest.path); + const originalRequest = readFileSync(path); + const graph = JSON.parse(originalRequest); + const inpaint = Object.values(graph.nodes).find(({ action }) => action === 'Inpaint'); + inpaint.params.mask_image.sourceKey = 'canvas'; + const bytes = Buffer.from(JSON.stringify(graph)); + Object.assign(altered.graphRequest, { + bytes: bytes.length, + sha256: createHash('sha256').update(bytes).digest('hex'), + }); + writeFileSync(path, bytes); + writeFileSync(changedPath, JSON.stringify(altered)); + await assert.rejects(readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath }), /declared file/u); + writeFileSync(path, originalRequest); + } + const ref = descriptor.registryReplay ?? descriptor.persistedOutputs; + const proof = JSON.parse(readFileSync(join(root, ref.path))); + if (descriptor.registryReplay) { + proof.nodeHash = 'a'.repeat(64); + } else { + if (workflowId === 'StableDiffusionXLPAGPipeline:inpaint') { + assert.ok(proof.outputs.some(({ taskId }) => taskId !== receipt.taskId)); + } + proof.outputs.push(proof.outputs.find(({ taskId }) => taskId === receipt.taskId)); + } + const bytes = Buffer.from(JSON.stringify(proof)); + Object.assign(ref, { bytes: bytes.length, sha256: createHash('sha256').update(bytes).digest('hex') }); + writeFileSync(join(root, ref.path), bytes); + writeFileSync(changedPath, JSON.stringify(descriptor)); + await assert.rejects( + readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath }), + descriptor.registryReplay ? /strictly equal/u : /exactly one result for the task/u, + ); + } finally { + rmSync(root, { recursive: true, force: true }); + } + }, + ); +} + +const retainedCpuEdit = process.env.MODIFF_SAVED_KANDINSKY_CPU_EDIT_EVIDENCE; +test('Kandinsky CPU edit joins archived pixels and sampled worker memory', { skip: !retainedCpuEdit }, async () => { + const clientRoot = fileURLToPath(new URL('..', import.meta.url)); + const backendRoot = resolve(process.env.MODIFF_BACKEND_DIR ?? join(clientRoot, '..', 'MoDiff')); + const args = { + clientRoot, + backendRoot, + workflowId: 'Kandinsky3Pipeline:edit_image', + evidencePath: resolve(retainedCpuEdit), + }; + const original = await readCanonicalWorkflowEvidence(args); + assert.equal(original.receipt.observationLimits.executionDevice, 'cpu:0'); + assert.equal(original.receipt.observationLimits.peakMemorySource, 'sampled-worker-rss'); + assert.equal(original.receipt.peakMemoryBytes, 62254313472); + assert.equal(original.receipt.qualificationClaims.hardwareQualified, false); + const root = mkdtempSync(join(tmpdir(), 'modiff-retained-cpu-edit-')); + try { + for (const file of original.retainedFiles) { + assert.equal(basename(file.path), file.path); + copyFileSync(file.absolutePath, join(root, file.path)); + } + const descriptor = JSON.parse(original.descriptorBytes); + const ref = descriptor.resourceSamples; + const samples = readFileSync(join(root, ref.path), 'utf8').trim().split(/\r?\n/u); + const reduced = samples.map((line) => JSON.stringify({ ...JSON.parse(line), workerRss: 1 })); + const bytes = Buffer.from(reduced.join('\n') + '\n'); + Object.assign(ref, { bytes: bytes.length, sha256: createHash('sha256').update(bytes).digest('hex') }); + writeFileSync(join(root, ref.path), bytes); + const changed = join(root, 'evidence.json'); + writeFileSync(changed, JSON.stringify(descriptor)); + await assert.rejects(readCanonicalWorkflowEvidence({ ...args, evidencePath: changed }), /peak >=/u); + } finally { + assert.equal(dirname(root), resolve(tmpdir())); + rmSync(root, { recursive: true, force: true }); + } +}); + +const serverRetainedEdit = process.env.MODIFF_SERVER_RETAINED_OMNIGEN_EDIT_EVIDENCE; +test('saved OmniGen joins the server capture and one original input', { skip: !serverRetainedEdit }, async () => { + const clientRoot = fileURLToPath(new URL('..', import.meta.url)); + const backendRoot = resolve(process.env.MODIFF_BACKEND_DIR ?? join(clientRoot, '..', 'MoDiff')); + const result = await readCanonicalWorkflowEvidence({ + clientRoot, + backendRoot, + workflowId: 'OmniGenPipeline:edit_image', + evidencePath: resolve(serverRetainedEdit), + }); + assert.equal(result.receipt.observationLimits.serverOutputStoreMatched, true); + assert.equal(result.receipt.observationLimits.clientApiSnapshotObserved, false); + assert.equal(result.receipt.observationLimits.nativeInputMarkerBound, true); + assert.deepEqual(result.receipt.observationLimits.configuredUnobservedControls, ['image_guidance_scale']); + assert.equal(result.receipt.qualificationClaims.hardwareQualified, false); +}); + +test('retained native PNG upload binds an exact safe path, file bytes and decoded dimensions', () => { + const bytes = Buffer.from( + 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+a0AMAAAAASUVORK5CYII=', + 'base64', + ); + const sourceValue = '@data/images/study.png'; + const metadata = { width: 1, height: 1 }; + const upload = { + error: false, + path: sourceValue, + media: { + filename: 'study.png', + extension: '.png', + sizeBytes: bytes.length, + sha256: createHash('sha256').update(bytes).digest('hex'), + kind: 'image', + mimeType: 'image/png', + ...metadata, + frames: 1, + }, + }; + verifyRetainedPngUpload(upload, { sourceValue }, metadata, bytes); + for (const bad of [ + { ...upload, path: '@data/images/other.png' }, + { ...upload, media: { ...upload.media, sha256: 'a'.repeat(64) } }, + { ...upload, media: { ...upload.media, width: 2 } }, + { ...upload, media: { ...upload.media, mimeType: 'image/webp' } }, + ]) { + assert.throws(() => verifyRetainedPngUpload(bad, { sourceValue }, metadata, bytes)); + } + const wrongMagic = Buffer.from(bytes); + wrongMagic[0] = 0; + const magicWitness = { + ...upload, + media: { ...upload.media, sha256: createHash('sha256').update(wrongMagic).digest('hex') }, + }; + assert.throws(() => verifyRetainedPngUpload(magicWitness, { sourceValue }, metadata, wrongMagic), /not PNG/u); +}); + +for (const [model, task, variable] of [ + ['JoyImageEditPlusPipeline', 'edit_image', 'MODIFF_SAVED_JOY_PLUS_EDIT_EVIDENCE'], + ['JoyImageEditPlusPipeline', 'multi_image_reference_edit', 'MODIFF_SAVED_JOY_PLUS_REFERENCES_EVIDENCE'], + ['QwenImageEditPlusPipeline', 'multi_image_reference_edit', 'MODIFF_SAVED_QWEN_TERRACOTTA_EVIDENCE'], + ['OmniGenPipeline', 'multi_image_reference_edit', 'MODIFF_SAVED_OMNIGEN_ORDERED_REFERENCES_EVIDENCE'], +]) { + const evidencePath = process.env[variable]; + test(`${model} verifies exact references in ${task}`, { skip: !evidencePath }, async () => { + const clientRoot = fileURLToPath(new URL('..', import.meta.url)); + const backendRoot = resolve(process.env.MODIFF_BACKEND_DIR ?? join(clientRoot, '..', 'MoDiff')); + const args = { + clientRoot, + backendRoot, + workflowId: model + ':' + task, + evidencePath: resolve(evidencePath), + }; + const result = await readCanonicalWorkflowEvidence(args); + const { receipt } = result; + assert.equal(receipt.observationLimits.independentConsumerPixels, false); + assert.equal(receipt.inputBinding.decodedImage.mode, 'RGB'); + if (task === 'edit_image') { + assert.equal(receipt.referenceBindings, undefined); + return; + } + assert.equal(receipt.referenceBindings.length, 1); + const [material] = receipt.referenceBindings; + assert.equal(material.inputIndex, 1); + assert.equal(material.nodeId, receipt.inputBinding.nodeId); + assert.notEqual(material.sha256, receipt.inputBinding.sha256); + assert.equal(receipt.observationLimits.retainedStudioFormMode, 'edit_image'); + const root = mkdtempSync(join(tmpdir(), 'modiff-reference-proof-')); + try { + for (const file of result.retainedFiles) { + assert.equal(basename(file.path), file.path); + copyFileSync(file.absolutePath, join(root, file.path)); + } + const descriptor = JSON.parse(result.descriptorBytes); + const [materialUpload] = descriptor.referenceUploads; + descriptor.referenceUploads[0] = descriptor.inputUpload; + descriptor.inputUpload = materialUpload; + const substituted = join(root, 'evidence.json'); + writeFileSync(substituted, JSON.stringify(descriptor)); + await assert.rejects( + readCanonicalWorkflowEvidence({ ...args, evidencePath: substituted }), + assert.AssertionError, + ); + } finally { + assert.equal(dirname(root), resolve(tmpdir())); + rmSync(root, { recursive: true, force: true }); + } + }); +} diff --git a/scripts/private-speech-evidence.mjs b/scripts/private-speech-evidence.mjs new file mode 100644 index 00000000..be3c883a --- /dev/null +++ b/scripts/private-speech-evidence.mjs @@ -0,0 +1,597 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { lstatSync, readFileSync, realpathSync } from 'node:fs'; +import { basename, dirname } from 'node:path'; +import { assertCanonicalAccountingGraphEnvelope } from './canonical-runtime-hints.mjs'; +import { + backendSourceEvidence, + canonicalGraphIdentity, + normalizeBackendRuntime, + selectBackendRuntimeFingerprintEvidence, + selectInstalledModelIdentity, + stableStringify, +} from './live-proof-provenance.mjs'; +import { validateNativeVariantOutput, validateNativeVariantRun } from './native-variant-run-evidence.mjs'; +import { + canonicalWorkflowAuthoringContract, + exportCanonicalWorkflowGraphs, + readCanonicalEvidenceFile, +} from './release-contract-core.mjs'; + +const whisperType = 'HuggingFaceSpeechRecognitionModel'; +const ctcType = 'HuggingFaceCTCSpeechRecognitionModel'; +const task = 'speech_to_text'; +const whisperTiny = { repoId: 'openai/whisper-tiny', revision: '169d4a4341b33bc18d8881c4b69c2e104e1cc0af' }; +const routes = new Map([ + [ + `${whisperType}:${task}`, + { + modelType: whisperType, + repo: whisperTiny.repoId, + revision: whisperTiny.revision, + pipeline: 'AutoModelForSpeechSeq2Seq', + loader: 'LoadSpeechRecognitionModel', + consumer: 'TranscribeAudio', + timestamps: 'segment', + }, + ], + [ + `${whisperType}:speech_translation`, + { + modelType: whisperType, + repo: 'openai/whisper-small', + revision: '973afd24965f72e36ca33b3055d56a652f456b4d', + pipeline: 'AutoModelForSpeechSeq2Seq', + loader: 'LoadSpeechRecognitionModel', + consumer: 'TranscribeAudio', + timestamps: 'segment', + translation: { baselineModel: whisperTiny, language: 'es', sourceSampleRate: 22_050 }, + }, + ], + [ + `${ctcType}:${task}`, + { + modelType: ctcType, + repo: 'facebook/wav2vec2-base-960h', + revision: '22aad52d435eb6dbaf354bdad9b0da84ce7d6156', + pipeline: 'AutoModelForCTC', + loader: 'LoadCTCSpeechRecognitionModel', + consumer: 'TranscribeCTCAudio', + timestamps: 'word', + }, + ], +]); +const source = 'node-01'; +const loader = 'node-02'; +const consumer = 'node-03'; +const terminal = 'node-04'; +const ids = [source, loader, consumer, terminal]; +const speech = 'modules.HuggingFaceSpeech'; +export const MAX_SPEECH_WAV_BYTES = 4 * 1024 * 1024; +export const MAX_SPEECH_TRANSCRIPT_BYTES = 1024 * 1024; +const digest = (bytes) => createHash('sha256').update(bytes).digest('hex'); +const same = (actual, expected, message) => assert.deepEqual(actual, expected, message); +const sameWireJson = (actual, expected, message) => + assert.equal(stableStringify(actual), stableStringify(expected), message); +const keys = (row, names, message) => same(Object.keys(row ?? {}).sort(), [...names].sort(), message); +const wire = (sourceId, sourceKey) => ({ display: 'input', sourceId, sourceKey }); +const literal = (value) => ({ value, source: 'literal' }); +const completeStatus = { schemaVersion: 1, truncated: false }; +const media = (inputs, outputs, files) => ({ + schemaVersion: 1, + status: 'complete', + source: 'native-builtin-media-v1', + controls: {}, + inputs, + outputs, + files, +}); + +export function speechRoute(workflowId) { + const route = routes.get(workflowId); + assert.ok(route, 'Unsupported private speech evidence route.'); + return route; +} + +function speechControls(route) { + const controls = { timestamps: route.timestamps, chunk_length_seconds: 30, stride_length_seconds: 5 }; + if (route.translation) return { ...controls, task: 'translate', language: route.translation.language }; + return route.modelType === whisperType ? { ...controls, task: 'transcribe', language: '' } : controls; +} + +function assertSafeSourceName(name, { translation }) { + assert.ok( + typeof name === 'string' && + name.length <= 200 && + (translation ? /^@data\/audio\/[a-z0-9][a-z0-9_.-]*[.]wav$/iu : /^[a-z0-9][a-z0-9_.-]*[.]wav$/iu).test(name), + translation ? 'Expected a managed WAV file picker name.' : 'Expected a plain WAV file picker name.', + ); +} + +function boundSpeechGraph(workflowId, expectedApi, submitted, sourceName) { + const route = speechRoute(workflowId); + assertSafeSourceName(sourceName, route); + assertCanonicalAccountingGraphEnvelope(expectedApi); + assertCanonicalAccountingGraphEnvelope(submitted); + same(submitted.paths, [ids], 'The speech recipe must run the four reviewed nodes in order.'); + keys(submitted.nodes, ids, 'Speech node identities differ.'); + for (const [id, module, action] of [ + [source, 'modules.Audio', 'Load'], + [loader, speech, route.loader], + [consumer, speech, route.consumer], + [terminal, 'modules.Primitive', 'DataViewer'], + ]) { + const node = submitted.nodes[id]; + keys(node, ['module', 'action', 'params'], 'Unexpected node execution authority.'); + same([node.module, node.action], [module, action], 'Unexpected speech operation.'); + const fileFields = Object.keys(node.params).filter((field) => node.params[field].display === 'filebrowser'); + same(fileFields, id === source ? ['file'] : [], 'Unexpected speech file input.'); + } + same(expectedApi.nodes[source].params.file, { display: 'filebrowser', value: '' }); + const expected = structuredClone(expectedApi); + expected.nodes[source].params.file.value = [sourceName]; + if (route.translation) { + const { baselineModel, language } = route.translation; + const { model_id: modelId, revision } = expected.nodes[loader].params; + same(modelId.value, { source: 'hub', value: baselineModel.repoId }, 'Original translation repository differs.'); + assert.equal(revision.value, baselineModel.revision, 'Original translation revision differs.'); + sameWireJson(expected.nodes[consumer].params.language, { value: '' }); + modelId.value.value = route.repo; + revision.value = route.revision; + expected.nodes[consumer].params.language.value = language; + } + sameWireJson( + submitted.nodes, + expected.nodes, + route.translation + ? 'Speech graph differs outside its reviewed bindings.' + : 'Speech graph differs outside its single bound WAV.', + ); + same(submitted.paths, expected.paths, 'Speech graph paths differ.'); + const model = submitted.nodes[loader].params; + same(model.model_id.value, { source: 'hub', value: route.repo }, 'Speech repository differs.'); + assert.equal(model.revision.value, route.revision, 'Speech model pin differs.'); + assert.equal(model.pipeline_class.value, route.pipeline, 'Speech loader class differs.'); + const controls = speechControls(route); + same( + submitted.nodes[consumer].params, + { + audio: wire(source, 'audio'), + model: wire(loader, 'model'), + ...Object.fromEntries(Object.entries(controls).map(([key, value]) => [key, { value }])), + }, + 'Speech consumer inputs or controls differ.', + ); + same(submitted.nodes[terminal].params.value, wire(consumer, 'transcript'), 'Transcript output wire differs.'); + return { route, model, controls, identity: canonicalGraphIdentity(submitted) }; +} + +function pcm16Wave(bytes, sampleRate) { + assert.ok(Buffer.isBuffer(bytes) && bytes.length >= 44 && bytes.length <= MAX_SPEECH_WAV_BYTES); + same(bytes.toString('ascii', 0, 4), 'RIFF'); + same(bytes.toString('ascii', 8, 12), 'WAVE'); + assert.equal(bytes.readUInt32LE(4) + 8, bytes.length, 'WAV size differs.'); + let format, pcm; + let offset = 12; + while (offset + 8 <= bytes.length) { + const chunk = bytes.toString('ascii', offset, offset + 4); + const length = bytes.readUInt32LE(offset + 4); + const start = offset + 8; + const end = start + length; + assert.ok(end <= bytes.length, 'WAV chunk exceeds retained bytes.'); + if (chunk === 'fmt ') { + assert.ok(!format && (length === 16 || (length === 18 && bytes.readUInt16LE(start + 16) === 0))); + format = bytes.subarray(start, end); + } else if (chunk === 'data') { + assert.ok(!pcm && format && length > 0 && length % 2 === 0); + pcm = bytes.subarray(start, end); + } + offset = end + (length % 2); + } + assert.ok(format && pcm && offset === bytes.length, 'WAV chunks are incomplete.'); + same( + [ + format.readUInt16LE(0), + format.readUInt16LE(2), + format.readUInt32LE(4), + format.readUInt32LE(8), + format.readUInt16LE(12), + format.readUInt16LE(14), + ], + [1, 1, sampleRate, sampleRate * 2, 2, 16], + 'Expected mono PCM16 WAV at the reviewed source sample rate.', + ); + const floats = Buffer.alloc(pcm.length * 2); + for (let i = 0; i < pcm.length; i += 2) floats.writeFloatLE(pcm.readInt16LE(i) / 32768, i * 2); + const frames = pcm.length / 2; + return { + duration: frames / sampleRate, + identity: { + kind: 'audio', + shape: [frames, 1], + sampleRate, + dtype: 'float32-le', + byteSize: floats.length, + sha256: digest(floats), + }, + }; +} + +function expectedAccounting(controls) { + const fields = Object.fromEntries( + Object.entries(controls).map(([field, value]) => [ + field, + field === 'language' && value === '' + ? { disposition: 'inactive', inputValue: value, ...literal(value), reason: 'feature-disabled' } + : { disposition: 'consumed', inputValue: value, ...literal(value === 'segment' ? true : value) }, + ]), + ); + return { + schemaVersion: 1, + fields, + inputProjections: {}, + outputProjections: {}, + omittedFields: {}, + unaccountedFields: [], + complete: true, + }; +} + +export function verifyPrivateSpeechConsumer({ workflowId, expectedApi, submitted, output, sourceName, wavBytes }) { + const bound = boundSpeechGraph(workflowId, expectedApi, submitted, sourceName); + const read = output.resolvedExecutionInputs; + assert.ok(read, 'Native speech consumer evidence is required.'); + same( + [read.schemaVersion, read.source, read.taskId, read.attemptIndex, read.nodeId], + [1, 'backend-execution', output.taskId, 0, terminal], + 'Native speech evidence owner differs.', + ); + assert.equal(output.nodeId, terminal); + same(read.uncapturedNodeIds, []); + assert.equal(read.truncated, false); + same(read.fieldAccountingStatus, completeStatus, 'Complete native speech control accounting is required.'); + same(read.mediaEvidenceStatus, completeStatus, 'Complete native speech media evidence is required.'); + same(read.nodes.map((row) => row.nodeId).sort(), ids, 'Native speech node owners are incomplete or ambiguous.'); + const observations = Object.fromEntries(read.nodes.map((row) => [row.nodeId, row])); + for (const id of ids) { + same( + [observations[id].module, observations[id].action], + [submitted.nodes[id].module, submitted.nodes[id].action], + 'Native speech observation scope differs.', + ); + same(observations[id].omittedFields, {}); + } + const { route, model, controls } = bound; + for (const id of [source, consumer, terminal]) same(observations[id].fields, {}); + same( + observations[loader].fields, + { + device: literal(model.device.value), + dtype: literal(model.dtype.value), + model_id: literal(route.repo), + pipeline_class: literal(route.pipeline), + revision: literal(route.revision), + }, + 'Native speech loader or model pin differs.', + ); + const wave = pcm16Wave(wavBytes, route.translation?.sourceSampleRate ?? 16000); + const input = { sourceValue: sourceName, sha256: digest(wavBytes), byteSize: wavBytes.length, converted: false }; + same( + observations[source].mediaEvidence, + media({}, { audio: [wave.identity] }, { file: [input] }), + 'Native Audio.Load WAV or decoded audio differs.', + ); + same(observations[consumer].fieldAccounting, expectedAccounting(controls), 'Native speech controls differ.'); + same( + observations[consumer].mediaEvidence, + media({ audio: [wave.identity] }, {}, {}), + 'The speech consumer did not observe the same decoded audio.', + ); + return { ...bound, wave, input }; +} + +function speechTranscript(bytes, item, bound) { + assert.ok(Buffer.isBuffer(bytes) && bytes.length > 0 && bytes.length <= MAX_SPEECH_TRANSCRIPT_BYTES); + const transport = JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(bytes)); + assert.ok(Array.isArray(transport) && transport.length === 1 && typeof transport[0] === 'string'); + same(transport, item.value, 'Transcript bytes do not match the native Data Viewer value.'); + const transcript = JSON.parse(transport[0]); + keys(transcript, ['schemaVersion', 'task', 'text', 'timestampMode', 'durationSeconds', 'segments']); + same( + [transcript.schemaVersion, transcript.task, transcript.timestampMode, transcript.durationSeconds], + [1, bound.controls.task ?? 'transcribe', bound.route.timestamps, bound.wave.duration], + 'Delivered transcript settings differ.', + ); + assert.ok(Array.isArray(transcript.segments) && transcript.segments.length > 0); + let previous = 0; + const pieces = []; + for (const segment of transcript.segments) { + keys(segment, ['start', 'end', 'text']); + assert.ok( + Number.isFinite(segment.start) && + Number.isFinite(segment.end) && + previous <= segment.start && + segment.start < segment.end && + segment.end <= bound.wave.duration, + 'Invalid speech transcript timestamps.', + ); + assert.ok(typeof segment.text === 'string' && segment.text.length > 0 && segment.text.trim() === segment.text); + previous = segment.end; + pieces.push(segment.text); + } + assert.equal(transcript.text, pieces.join(' '), 'Transcript text and timed segments differ.'); + return transcript; +} + +// Offline observation only. Source-template review and release are separate. +export function verifyPrivateSpeechRun({ + workflowId, + expectedApi, + creator, + outputPackage, + run, + graphCompleted, + graphRequest, + graphAcknowledgment, + sourceName, + wavBytes, + outputRef, + outputBytes, + modelObservation, + sourceBefore, + sourceAfter, +}) { + const route = speechRoute(workflowId); + const { + output, + task: nativeTask, + hints, + } = validateNativeVariantRun({ + target: { modelType: route.modelType, task: route.translation ? 'speech_translation' : task }, + outputNodeId: terminal, + displayType: 'text', + creator, + outputPackage, + run, + graphCompleted, + graphRequest, + graphAcknowledgment, + }); + const bound = verifyPrivateSpeechConsumer({ + workflowId, + expectedApi, + submitted: graphRequest, + output, + sourceName, + wavBytes, + }); + same(creator.apiGraph.nodes, graphRequest.nodes, 'Creator speech graph differs.'); + same(creator.apiGraph.paths, graphRequest.paths, 'Creator speech paths differ.'); + same( + graphCompleted.runtimeHints, + { ...hints, controlledArtifacts: [], loaderContract: [] }, + 'Unexpected native speech execution authority.', + ); + const fingerprint = selectBackendRuntimeFingerprintEvidence([nativeTask.runtimeFingerprint]); + assert.ok(fingerprint, 'Native runtime fingerprint is required.'); + const attestation = backendSourceEvidence({ + before: sourceBefore, + after: sourceAfter, + runtimeFingerprint: nativeTask.runtimeFingerprint, + }); + same(attestation.blockers, [], 'Backend source attestation differs.'); + assert.equal(modelObservation.error, false); + assert.equal(modelObservation.runtimeFingerprint, fingerprint.fingerprint); + assert.equal(modelObservation.models.length, 1); + assert.equal(modelObservation.models[0].complete, true); + assert.equal(modelObservation.models[0].repairRequired, false); + const observedModel = selectInstalledModelIdentity(modelObservation, route.repo); + assert.equal(observedModel?.modelRevision, `${route.repo}@${route.revision}`, 'Installed speech model pin differs.'); + assert.equal(nativeTask.runtimeMeasurement?.device, bound.model.device.value, 'Native speech device differs.'); + const measurement = nativeTask.runtimeMeasurement; + assert.ok( + Number.isFinite(measurement.elapsedSeconds) && measurement.elapsedSeconds > 0, + 'Native speech elapsed time is missing.', + ); + assert.ok(Number.isSafeInteger(measurement.peakAllocatedBytes) && measurement.peakAllocatedBytes > 0); + assert.equal(measurement.peakMeasurementVersion, 2); + assert.equal(outputBytes.length, outputRef.file.bytes, 'Retained transcript byte count differs.'); + assert.equal(digest(outputBytes), outputRef.file.sha256, 'Retained transcript bytes differ.'); + const item = validateNativeVariantOutput({ + output, + outputRef, + task: nativeTask, + bytes: outputBytes, + displayType: 'text', + contentType: 'text/plain', + }); + const transcript = speechTranscript(outputBytes, item, bound); + return { + workflowId, + taskId: nativeTask.task_id, + runTitle: hints.workflowTitle, + capturedAt: new Date(nativeTask.completed_at * 1000).toISOString(), + modelRevision: observedModel.modelRevision, + graphHash: bound.identity.hash, + input: bound.input, + decodedAudio: bound.wave.identity, + runtimeFingerprint: normalizeBackendRuntime(fingerprint).lockFingerprint, + backendSourceFingerprint: attestation.identity.fingerprint, + executionDurationSeconds: measurement.elapsedSeconds, + peakMemoryBytes: measurement.peakAllocatedBytes, + outputSha256: outputRef.file.sha256, + transcript, + scope: 'private-native-speech-observation', + }; +} + +async function readPrivateSpeechCapture({ + clientRoot, + canonicalGraph, + captureRoot, + evidenceRef, + graphRequestRef, + graphAcknowledgmentRef, +}) { + const retainedFiles = []; + const read = (ref, maximum) => { + const result = readCanonicalEvidenceFile(captureRoot, ref, maximum); + retainedFiles.push({ ...ref, absolutePath: result.file }); + return result.bytes; + }; + const readJson = (ref, maximum) => JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(read(ref, maximum))); + const evidence = readJson(evidenceRef, 64 * 1024); + assert.equal(evidence.schemaVersion, 1); + speechRoute(evidence.workflowId); + assert.ok( + ['modiff.private.speech-recognition-observation.v1', 'modiff.private.input-bound-speech-capture.v1'].includes( + evidence.format, + ), + ); + same(evidence.qualificationClaims, { releaseEligible: false, technicalVariant: true }); + assert.ok(Array.isArray(evidence.inputs) && evidence.inputs.length === 1); + assert.ok(Array.isArray(evidence.outputs) && evidence.outputs.length === 1); + assert.ok(Array.isArray(evidence.modelObservations) && evidence.modelObservations.length === 1); + const [input] = evidence.inputs; + const [outputRef] = evidence.outputs; + same([input.nodeId, input.field], [source, 'file']); + const creator = readJson(evidence.creatorPackage); + const outputPackage = readJson(evidence.outputPackage); + const run = readJson(evidence.runDetail); + const graphRequest = readJson(graphRequestRef ?? evidence.graphRequest); + const registry = readJson(evidence.nodes).nodes; + for (const [id, { module, action }] of Object.entries(graphRequest.nodes)) { + const contract = registry[`${module}.${action}`]; + same([contract?.module, contract?.action], [module, action], 'Speech runtime node registry differs.'); + same( + Object.keys(contract.params).filter((field) => contract.params[field].display === 'filebrowser'), + id === source ? ['file'] : [], + 'The retained speech worker had an unbound file input.', + ); + } + const [expectedApi, ...captures] = await exportCanonicalWorkflowGraphs(clientRoot, [ + canonicalGraph, + creator.graph, + outputPackage.graph, + run.workflow_snapshot, + ]); + for (const capture of captures) { + sameWireJson(capture.nodes, graphRequest.nodes, 'Retained visual speech graph exports to different nodes.'); + same(capture.paths, graphRequest.paths, 'Retained visual speech graph exports to different paths.'); + } + const observation = verifyPrivateSpeechRun({ + workflowId: evidence.workflowId, + expectedApi, + creator, + outputPackage, + run, + graphRequest, + graphAcknowledgment: readJson(graphAcknowledgmentRef ?? evidence.graphAcknowledgment), + graphCompleted: readJson(evidence.graphCompleted), + sourceName: input.sourceValue, + wavBytes: read(input.file, MAX_SPEECH_WAV_BYTES), + outputRef, + outputBytes: read(outputRef.file, MAX_SPEECH_TRANSCRIPT_BYTES), + modelObservation: readJson(evidence.modelObservations[0]), + sourceBefore: readJson(evidence.backendSourceBefore).identity, + sourceAfter: readJson(evidence.backendSourceAfter).identity, + }); + return { observation, evidence, retainedFiles }; +} + +export async function readPrivateSpeechRun(args) { + return (await readPrivateSpeechCapture(args)).observation; +} + +// The canonical recorder can recognize this exact private recipe. Its +// immutable evidence never implies permission to register a public template. +export async function readCanonicalSpeechEvidence({ clientRoot, manifest, graph, authoring, artifact, evidencePath }) { + const route = speechRoute(manifest.id); + const target = canonicalWorkflowAuthoringContract(manifest, graph, authoring, artifact); + const modelSet = [{ repoId: route.repo, revision: route.revision }]; + same( + target.modelSet, + route.translation ? [route.translation.baselineModel] : modelSet, + 'Canonical speech pin differs.', + ); + same(target.outputPlan.mediaKinds, ['json'], 'Canonical speech must deliver structured text.'); + assert.equal(target.outputPlan.minimumAssetCount, 1); + const stat = lstatSync(evidencePath); + assert.ok(stat.isFile() && !stat.isSymbolicLink() && stat.size > 0 && stat.size <= 65_536); + const descriptorBytes = readFileSync(evidencePath); + const evidence = JSON.parse(descriptorBytes); + keys(evidence, ['schemaVersion', 'format', 'workflowId', 'capture', 'graphRequest', 'graphAcknowledgment']); + assert.equal(evidence.schemaVersion, 1); + assert.equal(evidence.format, 'modiff.private.speech-to-text-input-bound.v1'); + assert.equal(evidence.workflowId, manifest.id); + const evidenceRoot = realpathSync(dirname(evidencePath)); + const { + observation, + evidence: capture, + retainedFiles, + } = await readPrivateSpeechCapture({ + clientRoot, + canonicalGraph: graph, + captureRoot: evidenceRoot, + evidenceRef: evidence.capture, + graphRequestRef: evidence.graphRequest, + graphAcknowledgmentRef: evidence.graphAcknowledgment, + }); + assert.equal(observation.workflowId, manifest.id, 'Captured speech workflow differs.'); + assert.equal(observation.modelRevision, `${route.repo}@${route.revision}`, 'Captured speech pin differs.'); + assert.equal(observation.runTitle, basename(manifest.graphPath, '.json'), 'Canonical speech run title differs.'); + for (const ref of retainedFiles) readCanonicalEvidenceFile(evidenceRoot, ref); + assert.ok(readFileSync(evidencePath).equals(descriptorBytes), 'Speech descriptor changed during validation.'); + + const receipt = { + schemaVersion: 1, + format: 'modiff.canonical-workflow-run-receipt.v1', + proofKind: 'real_backend_input_bound_model_variant', + ...target, + modelSet, + recipeTitle: authoring.title, + runTitle: observation.runTitle, + taskId: observation.taskId, + capturedAt: observation.capturedAt, + graphHash: observation.graphHash, + resourceCandidateId: null, + runtimeFingerprint: observation.runtimeFingerprint, + backendSourceFingerprint: observation.backendSourceFingerprint, + outputHash: `sha256:bytes:${observation.outputSha256}`, + executionDurationSeconds: observation.executionDurationSeconds, + peakMemoryBytes: observation.peakMemoryBytes, + canonicalDefaultsExecuted: false, + inputBinding: { nodeId: source, field: 'file', ...observation.input, decodedAudio: observation.decodedAudio }, + transcriptEvidence: { + storage: 'native-text-json', + durationSeconds: observation.transcript.durationSeconds, + timestampMode: observation.transcript.timestampMode, + segmentCount: observation.transcript.segments.length, + }, + observationLimits: { + fullConsumedFieldAccounting: false, + speechConsumerControlsObserved: true, + actualRecognizerInputAfterNormalization: false, + physicalPlatformQualification: false, + }, + qualificationClaims: { + publicTemplate: false, + qualityApproved: false, + rightsApproved: false, + hardwareQualified: false, + modelResourceQualified: false, + }, + }; + const provenance = { + format: 'modiff.input-bound-model-variant-proof.v1', + receipt, + evidenceFiles: { + capture: evidence.capture, + graphRequest: evidence.graphRequest, + graphAcknowledgment: evidence.graphAcknowledgment, + input: capture.inputs[0].file, + output: capture.outputs[0].file, + }, + }; + return { receipt, provenance, evidence, descriptorBytes, retainedFiles, evidenceRoot }; +} diff --git a/scripts/private-speech-evidence.test.mjs b/scripts/private-speech-evidence.test.mjs new file mode 100644 index 00000000..9e781560 --- /dev/null +++ b/scripts/private-speech-evidence.test.mjs @@ -0,0 +1,286 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import test from 'node:test'; +import { verifyPrivateSpeechConsumer } from './private-speech-evidence.mjs'; + +const sha256 = (bytes) => createHash('sha256').update(bytes).digest('hex'); +const sourceName = 'sample-source.wav'; +const status = { schemaVersion: 1, truncated: false }; +const ctc = { + type: 'HuggingFaceCTCSpeechRecognitionModel', + repo: 'facebook/wav2vec2-base-960h', + pin: '22aad52d435eb6dbaf354bdad9b0da84ce7d6156', + loader: 'LoadCTCSpeechRecognitionModel', + method: 'AutoModelForCTC', + consumer: 'TranscribeCTCAudio', + timestamps: 'word', +}; +const whisper = { + type: 'HuggingFaceSpeechRecognitionModel', + repo: 'openai/whisper-tiny', + pin: '169d4a4341b33bc18d8881c4b69c2e104e1cc0af', + loader: 'LoadSpeechRecognitionModel', + method: 'AutoModelForSpeechSeq2Seq', + consumer: 'TranscribeAudio', + timestamps: 'segment', +}; + +function capture(route) { + const wavBytes = Buffer.from( + '524946462800000057415645666d74201000000001000100803e0000007d000002001000646174610400000000c00040', + 'hex', + ); + const floats = Buffer.from('000000bf0000003f', 'hex'); + const identity = { + kind: 'audio', + shape: [2, 1], + sampleRate: 16000, + dtype: 'float32-le', + byteSize: 8, + sha256: sha256(floats), + }; + const files = { + file: [{ sourceValue: sourceName, byteSize: wavBytes.length, sha256: sha256(wavBytes), converted: false }], + }; + const media = { schemaVersion: 1, source: 'native-builtin-media-v1', status: 'complete', controls: {} }; + const mediaSource = { ...media, inputs: {}, outputs: { audio: [identity] }, files }; + const mediaConsumer = { ...media, inputs: { audio: [structuredClone(identity)] }, outputs: {}, files: {} }; + const literal = (value) => ({ value, source: 'literal' }); + const active = (value, actual = value) => ({ disposition: 'consumed', inputValue: value, ...literal(actual) }); + const controls = { + timestamps: active(route.timestamps, route === whisper ? true : 'word'), + chunk_length_seconds: active(30), + stride_length_seconds: active(5), + ...(route === whisper + ? { + task: active('transcribe'), + language: { disposition: 'inactive', inputValue: '', ...literal(''), reason: 'feature-disabled' }, + } + : {}), + }; + const model = { + model_id: route.repo, + pipeline_class: route.method, + revision: route.pin, + device: 'cuda:0', + dtype: 'float32', + }; + const pipeline = 'modules.HuggingFaceSpeech'; + const wire = (sourceId, sourceKey) => ({ display: 'input', sourceId, sourceKey }); + const graphNode = (module, action, params) => ({ module, action, params }); + const paramsFrom = (values) => Object.fromEntries(Object.entries(values).map(([key, value]) => [key, { value }])); + const nodes = { + 'node-01': graphNode('modules.Audio', 'Load', { file: { display: 'filebrowser', value: '' } }), + 'node-02': graphNode( + pipeline, + route.loader, + paramsFrom({ ...model, model_id: { source: 'hub', value: route.repo } }), + ), + 'node-03': graphNode(pipeline, route.consumer, { + ...paramsFrom(Object.fromEntries(Object.entries(controls).map(([key, row]) => [key, row.inputValue]))), + audio: wire('node-01', 'audio'), + model: wire('node-02', 'model'), + }), + 'node-04': graphNode('modules.Primitive', 'DataViewer', { value: wire('node-03', 'transcript') }), + }; + const expectedApi = { sid: 'test', nodes, paths: [Object.keys(nodes)] }; + const submitted = structuredClone(expectedApi); + submitted.nodes['node-01'].params.file.value = [sourceName]; + const nodeReceipts = Object.entries(nodes).map(([nodeId, { module, action }]) => ({ + nodeId, + module, + action, + fields: {}, + omittedFields: {}, + })); + nodeReceipts[0].mediaEvidence = mediaSource; + nodeReceipts[1].fields = Object.fromEntries(Object.entries(model).map(([key, value]) => [key, literal(value)])); + nodeReceipts[2].fieldAccounting = { + schemaVersion: 1, + complete: true, + fields: controls, + inputProjections: {}, + outputProjections: {}, + omittedFields: {}, + unaccountedFields: [], + }; + nodeReceipts[2].mediaEvidence = mediaConsumer; + const output = { + taskId: 'speech-task', + nodeId: 'node-04', + resolvedExecutionInputs: { + schemaVersion: 1, + source: 'backend-execution', + taskId: 'speech-task', + attemptIndex: 0, + nodeId: 'node-04', + truncated: false, + uncapturedNodeIds: [], + nodes: nodeReceipts, + fieldAccountingStatus: { ...status }, + mediaEvidenceStatus: { ...status }, + }, + }; + return { workflowId: route.type + ':speech_to_text', expectedApi, submitted, output, sourceName, wavBytes }; +} + +test('uses bound audio and effective native controls for both supported speech-to-text recipes', () => { + for (const route of [whisper, ctc]) { + const checked = verifyPrivateSpeechConsumer(capture(route)); + assert.equal(checked.route.repo, route.repo); + assert.equal(checked.wave.duration, 2 / 16000); + assert.equal(checked.input.sourceValue, sourceName); + } +}); + +test('binds the saved Spanish translation to the reviewed alternate model and source audio', () => { + const record = capture(whisper); + record.workflowId = whisper.type + ':speech_translation'; + record.sourceName = '@data/audio/sample-source.wav'; + record.wavBytes.writeUInt32LE(22050, 24); + record.wavBytes.writeUInt32LE(44100, 28); + const repo = 'openai/whisper-small'; + const revision = '973afd24965f72e36ca33b3055d56a652f456b4d'; + record.expectedApi.nodes['node-03'].params.task.value = 'translate'; + const submitted = record.submitted.nodes; + submitted['node-01'].params.file.value = [record.sourceName]; + submitted['node-02'].params.model_id.value.value = repo; + submitted['node-02'].params.revision.value = revision; + submitted['node-03'].params.task.value = 'translate'; + submitted['node-03'].params.language.value = 'es'; + const [loader, model, consumer] = record.output.resolvedExecutionInputs.nodes; + loader.mediaEvidence.files.file[0].sourceValue = record.sourceName; + loader.mediaEvidence.files.file[0].sha256 = sha256(record.wavBytes); + loader.mediaEvidence.outputs.audio[0].sampleRate = 22050; + consumer.mediaEvidence.inputs.audio[0].sampleRate = 22050; + model.fields.model_id.value = repo; + model.fields.revision.value = revision; + const fields = consumer.fieldAccounting.fields; + fields.task.inputValue = fields.task.value = 'translate'; + fields.language = { disposition: 'consumed', inputValue: 'es', value: 'es', source: 'literal' }; + + const verified = verifyPrivateSpeechConsumer(record); + assert.equal(verified.route.repo, repo); + assert.equal(verified.wave.duration, 2 / 22050); + submitted['node-03'].params.language.value = 'fr'; + assert.throws(() => verifyPrivateSpeechConsumer(record), /outside its reviewed bindings/u); + submitted['node-03'].params.language.value = 'es'; + record.wavBytes.writeUInt32LE(16000, 24); + assert.throws(() => verifyPrivateSpeechConsumer(record), /Expected mono/u); +}); + +test('rejects legacy speech receipts and any incomplete native accounting', () => { + for (const route of [whisper, ctc]) { + const older = capture(route); + const receipt = older.output.resolvedExecutionInputs; + delete receipt.fieldAccountingStatus; + delete receipt.nodes[2].fieldAccounting; + delete receipt.nodes[2].mediaEvidence; + assert.throws(() => verifyPrivateSpeechConsumer(older), /Complete native speech control accounting/u); + receipt.fieldAccountingStatus = { ...status }; + assert.throws(() => verifyPrivateSpeechConsumer(older), /Native speech controls differ/u); + receipt.fieldAccountingStatus.truncated = true; + assert.throws(() => verifyPrivateSpeechConsumer(older), /Complete native speech control accounting/u); + } +}); + +test('rejects changed audio, controls, graph wiring, model pin and output ownership', () => { + const mutations = [ + [ + 'consumer hash', + (row, read) => { + read.nodes[2].mediaEvidence.inputs.audio[0].sha256 = '0'.repeat(64); + }, + /same decoded audio/u, + ], + [ + 'consumer origin', + (row, read) => { + read.nodes[2].fieldAccounting.fields.timestamps.source = 'override'; + }, + /speech controls differ/u, + ], + [ + 'timestamp argument', + (row, read) => { + read.nodes[2].fieldAccounting.fields.timestamps.value = 'segment'; + }, + /speech controls differ/u, + ], + [ + 'language hint', + (row, read) => { + read.nodes[2].fieldAccounting.fields.language.value = 'French'; + }, + /speech controls differ/u, + ], + [ + 'audio bytes', + (row) => { + row.wavBytes[45] ^= 1; + }, + /Audio.Load WAV or decoded audio differs/u, + ], + [ + 'audio filename', + (row) => { + row.sourceName = '../sample-source.wav'; + }, + /plain WAV file picker name/u, + ], + [ + 'conversion', + (row, read) => { + read.nodes[0].mediaEvidence.files.file[0].converted = true; + }, + /Audio.Load WAV or decoded audio differs/u, + ], + [ + 'loader pin', + (row, read) => { + read.nodes[1].fields.revision.value = '0'.repeat(40); + }, + /loader or model pin differs/u, + ], + [ + 'output owner', + (row, read) => { + read.nodeId = 'node-02'; + }, + /speech evidence owner differs/u, + ], + [ + 'node owners', + (row, read) => { + read.nodes[0].nodeId = 'node-03'; + }, + /node owners are incomplete or ambiguous/u, + ], + [ + 'audio wire', + (row) => { + row.submitted.nodes['node-03'].params.audio.sourceKey = 'filename'; + }, + /graph differs outside/u, + ], + [ + 'extra graph authority', + (row) => { + row.submitted.runtimePreparation = {}; + }, + /top-level execution authority/u, + ], + [ + 'wrong route', + (row) => { + row.workflowId = whisper.type + ':speaker_classification'; + }, + /Unsupported private speech/u, + ], + ]; + for (const [name, tamper, error] of mutations) { + const row = capture(whisper); + tamper(row, row.output.resolvedExecutionInputs); + assert.throws(() => verifyPrivateSpeechConsumer(row), error, name); + } +}); diff --git a/scripts/private-workflow-qualification.mjs b/scripts/private-workflow-qualification.mjs new file mode 100644 index 00000000..65e206d9 --- /dev/null +++ b/scripts/private-workflow-qualification.mjs @@ -0,0 +1,253 @@ +import assert from 'node:assert/strict'; +import { existsSync } from 'node:fs'; +import { dirname, join } from 'node:path'; +import { canonicalGraphIdentity } from './live-proof-provenance.mjs'; +import { validateNativeVariantOutput } from './native-variant-run-evidence.mjs'; +import { readCanonicalEvidenceFile } from './release-contract-core.mjs'; +import { decodedMediaHash } from './template-gallery-harness.mjs'; + +const framepack = 'HunyuanVideoFramepackPipeline:image_to_video'; +const routes = new Map([ + [ + 'AceStepAudioPipeline:text_to_audio:ace_step_chinese_new_year_lora', + { + scope: 'research_academic_only', + policyId: 'ace-step-chinese-new-year-research-academic-only', + contentType: 'audio/x-wav', + loaders: [ + ['LoadPipeline', 'model_id'], + ['LoadAdapter', 'adapter_path', true], + ], + }, + ], + [ + 'FluxDevPipeline:text_to_image:flux_lora_ghibli_story', + { + scope: 'personal_noncommercial', + policyId: 'ghibli-characters-personal-noncommercial', + contentType: 'image/webp', + loaders: [ + ['ModelsLoader', 'repo_id'], + ['Lora', 'model', true], + ], + }, + ], + [ + framepack, + { + scope: 'territory_limited_private_evaluation', + contentType: 'video/mp4', + loaders: [['LoadPipeline', 'model_id']], + }, + ], +]); + +const parse = ({ bytes }) => JSON.parse(bytes); +const modelKey = ({ repoId, revision }) => `${repoId}@${revision}`; +const modelKeys = (models) => models.map(modelKey).sort(); +const exactDigest = /^[a-f0-9]{64}$/u; + +function checkLoaderBindings(graph, resolved, review, route) { + for (const [action, field, adapter] of route.loaders) { + const matches = Object.entries(graph.nodes).filter(([, node]) => node.action === action); + assert.equal(matches.length, 1, `Expected one executable ${action}.`); + const [[nodeId, node]] = matches; + const selection = node.params[field].value; + const revision = node.params.revision.value; + assert.equal(selection.source, 'hub'); + assert.ok(review.modelSet.some(({ repoId, revision: pin }) => repoId === selection.value && pin === revision)); + const native = resolved.find((row) => row.nodeId === nodeId); + assert.equal(native?.action, action); + assert.equal(native?.module, node.module); + assert.equal(native.fields.revision?.value, revision, `The consumed ${action} revision differs.`); + // The native adapter receipt records the revision. Its repository and + // bytes are additionally locked by the submitted loader's checksum guard. + if (adapter) assert.match(node.params.expected_sha256.value, exactDigest); + const consumed = native.fields[field]?.value; + if (consumed !== undefined || !adapter) { + assert.equal(consumed?.value ?? consumed, selection.value, `The consumed ${action} artifact differs.`); + } + } +} + +function checkFramePackVariant(graph, resolved, references, original, review) { + assert.equal(original?.proofKind, 'real_backend_input_bound_model_variant'); + assert.equal(original.canonicalWorkflowHash, review.canonicalWorkflowHash); + assert.deepEqual(modelKeys(original.modelSet), modelKeys(review.modelSet)); + assert.equal(references.length, 2); + assert.equal(references[0].ref.sha256, original.inputBinding.sha256); + assert.notEqual(references[1].ref.sha256, references[0].ref.sha256); + const generator = Object.values(graph.nodes).find( + ({ module, action }) => module === 'modules.DiffusersVideo' && action === 'Generate', + ); + assert.equal(generator.params.framepack_sampling.value, 'inverted_anti_drifting'); + for (const [index, field] of ['reference_images', 'last_image'].entries()) { + const { nodeId, ref } = references[index]; + assert.equal(graph.nodes[nodeId].action, 'Load'); + assert.equal(graph.nodes[nodeId].module, 'modules.Image'); + assert.equal(generator.params[field].sourceId, nodeId); + assert.equal(generator.params[field].sourceKey, 'image'); + const loaded = resolved.find((row) => row.nodeId === nodeId); + assert.deepEqual(loaded.fields.source_hashes.value, [ref.sha256]); + } +} + +/** Revalidate private native task records. This lane claims no authored UI + * gesture, model-entitlement change, Gallery approval or hardware coverage. */ +export async function readPrivateWorkflowQualification({ + backendRoot, + manifest, + canonicalHash, + expectedGraph, + canonicalReceipt, + review, + usagePolicy, +}) { + const route = routes.get(manifest.id); + assert.ok(route, `Unreviewed private workflow: ${manifest.id}`); + assert.equal(review.workflowId, manifest.id); + assert.equal(review.sourceTemplateId, manifest.sourceTemplateId); + assert.equal(review.canonicalWorkflowHash, canonicalHash); + assert.equal(review.scope, route.scope); + assert.equal(review.preview, 'withheld'); + assert.equal(review.redistributionAuthorized, false); + assert.deepEqual(review.modelSet.map(({ repoId }) => repoId).sort(), [...new Set(manifest.requiredArtifacts)].sort()); + for (const { revision } of review.modelSet) assert.match(revision, /^[a-f0-9]{40}$/u); + if (route.policyId) { + const policy = review.modelSet + .map(({ repoId }) => usagePolicy(repoId)) + .find((entry) => entry?.id === route.policyId); + assert.equal(policy?.useScope, route.scope); + assert.equal(policy.acknowledgementRequired, true); + assert.ok( + review.modelSet.some( + ({ repoId, revision }) => policy.repository === repoId && policy.reviewedRevision === revision, + ), + ); + } + + const { sha256, bytes } = review.evidence; + assert.match(sha256, exactDigest); + assert.match(review.outputSha256, exactDigest); + const path = `data/qualification/release/private-workflow-evidence/${sha256}/evidence.json`; + if (!existsSync(join(backendRoot, path))) return null; + const descriptor = readCanonicalEvidenceFile(backendRoot, { path, sha256, bytes }, 65536); + const evidence = parse(descriptor); + const read = (ref) => readCanonicalEvidenceFile(dirname(descriptor.file), ref); + assert.equal(evidence.format, 'modiff.private-workflow-execution.v1'); + assert.equal(evidence.workflowId, manifest.id); + const graph = parse(read(evidence.graph)); + const ack = parse(read(evidence.ack)); + const terminal = parse(read(evidence.terminal)); + const { task, outputs } = parse(read(evidence.run)); + const executedHash = canonicalGraphIdentity(graph).hash; + assert.equal(executedHash, review.executedGraphHash); + assert.deepEqual(Object.keys(graph.runtimeHints), ['resourceMode']); + assert.equal(graph.runtimeHints.resourceMode, 'expert'); + assert.equal(ack.error, false); + assert.equal(ack.task_id, task.task_id); + assert.equal(terminal.task_id, task.task_id); + assert.equal(terminal.type, 'graph_completed'); + assert.equal(task.status, 'completed'); + assert.equal(task.attempt_index, 0); + assert.equal(graph.sid, task.sid); + assert.equal(ack.sid, task.sid); + assert.equal(terminal.sid, task.sid); + assert.deepEqual(terminal.resourceRetryHistory, []); + assert.deepEqual(terminal.runtimeFingerprint, task.runtimeFingerprint); + assert.deepEqual(terminal.runtimeMeasurement, task.runtimeMeasurement); + assert.match(task.runtimeFingerprint.fingerprint, /^sha256:[a-f0-9]{64}$/u); + assert.ok(task.completed_at > task.started_at); + assert.equal(outputs.length, 1); + const [output] = outputs; + assert.equal(output.taskId, task.task_id); + assert.equal(output.sid, task.sid); + assert.equal(output.fieldKey, 'preview'); + assert.ok(graph.nodes[output.nodeId]?.params.preview); + assert.equal(output.resolvedExecutionInputs.source, 'backend-execution'); + assert.equal(output.resolvedExecutionInputs.taskId, task.task_id); + assert.equal(output.resolvedExecutionInputs.attemptIndex, 0); + assert.equal(output.resolvedExecutionInputs.truncated, false); + const resolved = output.resolvedExecutionInputs.nodes; + checkLoaderBindings(graph, resolved, review, route); + const snapshots = + manifest.id === framepack + ? evidence.downloadRecords.map((ref) => { + const download = parse(read(ref)); + assert.equal(download.error, false); + const { + repo_id: repoId, + revision: selectedRevision, + complete, + repair_required: repairRequired, + } = download.result; + return { repoId, selectedRevision, complete, repairRequired }; + }) + : parse(read(evidence.modelFingerprints)); + assert.deepEqual( + modelKeys( + snapshots.map(({ repoId, selectedRevision, complete, repairRequired }) => { + assert.equal(complete, true); + assert.equal(repairRequired, false); + return { repoId, revision: selectedRevision }; + }), + ), + modelKeys(review.modelSet), + ); + if (manifest.id === framepack) { + for (const { ref } of evidence.references) read(ref); + checkFramePackVariant(graph, resolved, evidence.references, canonicalReceipt, review); + } else { + assert.equal( + executedHash, + canonicalGraphIdentity(expectedGraph).hash, + 'The private recipe differs from the current export.', + ); + } + assert.equal(evidence.media.sha256, review.outputSha256); + const media = read(evidence.media); + const item = validateNativeVariantOutput({ + output, + outputRef: { backendPath: output.backendMediaPath, mediaType: manifest.mediaKind, file: evidence.media }, + task, + bytes: media.bytes, + displayType: manifest.mediaKind, + contentType: route.contentType, + backendOnly: true, + }); + const decoded = await decodedMediaHash(media.file, manifest.mediaKind); + if (manifest.mediaKind === 'audio') { + assert.ok(decoded.durationSeconds > 25 && decoded.durationSeconds < 35); + assert.ok(decoded.peakAmplitude > 0.05 && decoded.silenceRatio < 0.75); + assert.equal(decoded.clippedSampleRatio, 0); + } else { + const native = item.mediaMetadata ?? item; + assert.deepEqual([decoded.width, decoded.height], [native.width, native.height]); + assert.ok(decoded.width >= 640 && decoded.height >= 640); + if (manifest.mediaKind === 'video') { + assert.equal(decoded.frames, native.frame_count); + assert.equal(decoded.fps, native.fps); + assert.equal(decoded.codecName, 'h264'); + assert.equal(decoded.hasAudio, false); + assert.equal(decoded.frames, 109); + const motion = parse(read(evidence.motion)); + assert.equal(motion.framesDecoded, decoded.frames); + assert.equal(motion.adjacentFrameMatches, decoded.frames - 1); + const finish = motion.frameTransformsRelativeToOpening[decoded.frames - 1]; + assert.ok(finish.zoom >= 1.25 && finish.shiftX640 <= -35); + assert.ok(motion.largestAdjacentZoomDelta < 0.02); + } + } + return { + scope: review.scope, + preview: 'withheld', + modelRevision: modelKeys(review.modelSet).join(' | '), + graphHash: executedHash, + outputHash: `sha256:bytes:${review.outputSha256}`, + evidenceSha256: sha256, + taskId: task.task_id, + capturedAt: new Date(task.completed_at * 1000).toISOString(), + canonicalDefaultsExecuted: manifest.id !== framepack, + proofKind: 'real_backend_private_workflow', + }; +} diff --git a/scripts/process-image-input-requirements.test.mjs b/scripts/process-image-input-requirements.test.mjs new file mode 100644 index 00000000..effa2d51 --- /dev/null +++ b/scripts/process-image-input-requirements.test.mjs @@ -0,0 +1,236 @@ +import assert from 'node:assert/strict'; +import { after, before, test } from 'node:test'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { createServer } from 'vite'; + +let server, buildGraphFixPlan, inspectRequiredGraphInputs; +before(async () => { + server = await createServer({ + root: path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'), + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + ({ buildGraphFixPlan } = await server.ssrLoadModule('/src/studio/graphFixer.ts')); + ({ inspectRequiredGraphInputs } = await server.ssrLoadModule('/src/studio/requiredGraphInputs.ts')); +}); +after(async () => server?.close()); + +// The shared palette declaration intentionally differs from the exact backend +// task overlay (integrated_operation_fields): only composite requires a mask. +const rawDefinition = { + module: 'modules.ImageOperations', + action: 'ProcessImage', + label: 'Process Image', + params: { + image: { label: 'Image', type: 'image', display: 'input' }, + mask: { label: 'Mask', type: 'image', display: 'input' }, + pipeline_class: { type: 'string', default: 'BuiltinImageOperationV1', hidden: true }, + operation: { + type: 'string', + default: 'image_adjustment', + options: [ + 'image_adjustment', + 'image_filter', + 'image_crop', + 'image_upscale', + 'image_stitch', + 'image_tile', + 'image_channels', + 'mask_composite', + ], + }, + output: { type: 'image', display: 'output' }, + }, +}; +const operationContracts = rawDefinition.params.operation.options.map((task) => ({ + pipelineClass: 'BuiltinImageOperationV1', + task, + operationId: 'image.process', + nodeKey: 'modules.ImageOperations.ProcessImage', + nodeType: 'integrated', + decomposition: 'integrated', + support: 'declared', + blockName: null, + ports: ['image', 'mask'].map((name) => ({ + name, + semanticName: name, + direction: 'input', + roles: ['value'], + types: ['image'], + required: name === 'image' || task === 'mask_composite', + hidden: name === 'mask' && task !== 'mask_composite', + })), +})); + +function fixture(task) { + const process = { id: 'process', type: 'custom', position: { x: 200, y: 0 }, data: structuredClone(rawDefinition) }; + process.data.params.operation.value = task; + const source = { + id: 'source', + type: 'custom', + position: { x: 0, y: 0 }, + data: { + module: 'modules.Test', + action: 'Source', + label: 'Source', + params: { image: { type: 'image', display: 'output' } }, + }, + }; + const preview = { + id: 'preview', + type: 'custom', + position: { x: 400, y: 0 }, + data: { + module: 'modules.Image', + action: 'Preview', + label: 'Preview', + params: { image: { type: 'image', display: 'input' } }, + }, + }; + const graph = { + nodes: [source, process, preview], + edges: [ + { id: 'in', source: 'source', sourceHandle: 'image', target: 'process', targetHandle: 'image' }, + { id: 'out', source: 'process', sourceHandle: 'output', target: 'preview', targetHandle: 'image' }, + ], + }; + return { graph, process, registry: { 'modules.ImageOperations.ProcessImage': structuredClone(rawDefinition) } }; +} +function findings(f, contracts = operationContracts) { + return { + fixes: buildGraphFixPlan({ ...f.graph, registry: f.registry, operationContracts: contracts }).issues.filter( + (issue) => issue.targetNodeId === 'process' && issue.kind === 'missing_input', + ), + required: inspectRequiredGraphInputs(f.graph.nodes, f.graph, f.registry, contracts), + }; +} + +test('raw palette Stitch does not request an unused mask', () => { + const f = fixture('image_stitch'); + const before = structuredClone(f); + assert.deepEqual(findings(f).fixes, [], 'Stitch consumes image only; do not propose a mask connection'); + assert.deepEqual(findings(f).required, []); + assert.deepEqual(f, before, 'inspection must not mutate the saved graph or registry'); +}); + +test('adjustment and tile keep mask optional while composite requires it in both inspectors', () => { + for (const task of ['image_adjustment', 'image_tile', 'image_stitch', 'mask_composite']) { + const f = fixture(task); + const found = findings(f); + assert.deepEqual( + found.fixes.map((issue) => issue.targetHandle), + task === 'mask_composite' ? ['mask'] : [], + task, + ); + assert.deepEqual( + found.required.map((issue) => issue.fieldId), + task === 'mask_composite' ? ['mask'] : [], + task, + ); + } +}); + +test('all selected image tasks still require their image source', () => { + for (const task of rawDefinition.params.operation.options) { + const f = fixture(task); + f.graph.edges = f.graph.edges.filter((edge) => edge.id !== 'in'); + assert.ok( + findings(f).fixes.some((issue) => issue.targetHandle === 'image'), + task, + ); + assert.ok( + findings(f).required.some((issue) => issue.fieldId === 'image'), + task, + ); + } +}); + +test('current selected task overrides stale saved mask metadata in either direction without rewriting it', () => { + const f = fixture('image_stitch'); + f.process.data.params.mask.required = true; + assert.deepEqual(findings(f).fixes, []); + assert.deepEqual(findings(f).required, []); + f.process.data.params.operation.value = 'mask_composite'; + f.process.data.params.mask = { ...f.process.data.params.mask, required: false, hidden: true }; + const before = structuredClone(f); + assert.deepEqual( + findings(f).fixes.map((issue) => issue.targetHandle), + ['mask'], + ); + assert.deepEqual( + findings(f).required.map((issue) => issue.fieldId), + ['mask'], + ); + assert.deepEqual(f, before); +}); + +test('composite accepts an enabled compatible mask source but keeps disabled or incompatible sources blocking', () => { + const f = fixture('mask_composite'); + const mask = structuredClone(f.graph.nodes[0]); + mask.id = 'mask'; + f.graph.nodes.push(mask); + f.graph.edges.push({ id: 'mask-in', source: 'mask', sourceHandle: 'image', target: 'process', targetHandle: 'mask' }); + assert.deepEqual(findings(f).fixes, []); + assert.deepEqual(findings(f).required, []); + mask.data.uiState = { disabled: true }; + assert.deepEqual( + findings(f).required.map((issue) => issue.fieldId), + ['mask'], + ); + delete mask.data.uiState; + mask.data.params.image.type = 'string'; + assert.deepEqual( + findings(f).required.map((issue) => issue.fieldId), + ['mask'], + ); +}); + +test('unknown, malformed, computed or ambiguous selection preserves conservative legacy inspection', () => { + const cases = [ + (f) => { + f.process.data.params.operation.value = 'unknown_task'; + }, + (f) => { + f.process.data.params.operation.value = { task: 'image_stitch' }; + }, + (f) => { + f.process.data.params.pipeline_class.value = 'UnknownPipeline'; + }, + (f) => { + f.process.data.params.operation.isConnected = true; + }, + (f) => { + f.graph.edges.push({ + id: 'task-in', + source: 'source', + sourceHandle: 'image', + target: 'process', + targetHandle: 'operation', + }); + }, + ]; + for (const mutate of cases) { + const f = fixture('image_stitch'); + mutate(f); + assert.deepEqual(findings(f), findings(f, [])); + assert.ok(findings(f).fixes.some((issue) => issue.targetHandle === 'mask')); + } + const f = fixture('image_stitch'); + const duplicate = [...operationContracts, operationContracts.find((operation) => operation.task === 'image_stitch')]; + assert.deepEqual(findings(f, duplicate), findings(f, [])); + const malformed = structuredClone(operationContracts); + delete malformed.find((operation) => operation.task === 'image_stitch').ports[1].required; + assert.deepEqual(findings(f, malformed), findings(f, [])); +}); + +test('default selector values resolve and unrelated generic nodes retain their legacy requirements', () => { + const f = fixture('image_stitch'); + delete f.process.data.params.operation.value; + assert.deepEqual(findings(f).fixes, []); + f.process.data.module = 'custom.ImageOperations'; + assert.ok(findings(f).fixes.some((issue) => issue.targetHandle === 'mask')); +}); diff --git a/scripts/prompt-enhancement-authoring.test.mjs b/scripts/prompt-enhancement-authoring.test.mjs new file mode 100644 index 00000000..39d9a4d4 --- /dev/null +++ b/scripts/prompt-enhancement-authoring.test.mjs @@ -0,0 +1,683 @@ +import assert from 'node:assert/strict'; +import { readFileSync, mkdtempSync, rmSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import path from 'node:path'; +import { before, after, test } from 'node:test'; +import { createServer } from 'vite'; + +const declared = JSON.parse(readFileSync('tests/fixtures/ancillary-authoring.v1.json', 'utf8')); +const actual = JSON.parse(readFileSync('tests/fixtures/ancillary-starter.v1.json', 'utf8')); +const legacy = JSON.parse(readFileSync('tests/fixtures/prompt-enhancement-legacy-parent.v1.json', 'utf8')); +const cache = mkdtempSync(path.join(tmpdir(), 'modiff-enhancement-authoring-')); +let server, authoring, remap, metadata, stable; +before(async () => { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, value), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { localStorage, dispatchEvent: () => true, location: { origin: 'http://127.0.0.1:5191' } }; + server = await createServer({ + configFile: false, + cacheDir: cache, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + authoring = await server.ssrLoadModule('/src/studio/promptEnhancementAuthoring.ts'); + metadata = await server.ssrLoadModule('/src/studio/ancillaryOperations.ts'); + stable = await server.ssrLoadModule('/src/studio/stableHash.ts'); + ({ remapOperationAuthoring: remap } = await server.ssrLoadModule('/src/workflow/operationSharedInputs.ts')); +}); +after(async () => { + await server?.close(); + delete globalThis.window; + delete globalThis.localStorage; + rmSync(cache, { recursive: true, force: true }); +}); + +// Real constructor-trapped declaration/registry DTOs, with explicitly synthetic +// authored scalar controls. This does not qualify the private profile or model. +function setup(index = 0, preserve = false, capturedParent) { + const parent = capturedParent ? structuredClone(capturedParent) : JSON.parse(declared.parents[index].rawParentJson); + if (index === 0 && !preserve) assert.deepEqual(parent, actual.response.authoring); + if (preserve) { + const child = parent.ancillaryOperations[0]; + parent.id = parent.id.replace(/:v1$/u, ':v2'); + child.id = `${parent.id}:preview`; + child.parent.authoringRecipeId = parent.id; + child.layoutPolicy = 'preserve-authored-v1'; + if (child.verification) child.verification.supportedPromptModes = ['t2i', 'i2i', 't2i_bbox', 'i2i_bbox']; + const { contentHash: _oldChild, ...semanticChild } = child; + child.contentHash = `studio-ancillary-v1-${stable.hashString(stable.stableStringify(semanticChild))}`; + const { contentHash: _oldParent, ...semanticParent } = parent; + parent.contentHash = `studio-authoring-v1-${stable.hashString(stable.stableStringify(semanticParent))}`; + } + const registry = { + ...structuredClone(declared.parents[index].registry), + ...Object.fromEntries( + actual.response.nodes.map(({ operation, node }) => [operation.nodeKey, structuredClone(node)]), + ), + }; + const nodes = parent.roles.map(([role, key, x, y]) => { + const data = structuredClone(registry[key]); + const operation = actual.operationContracts.find((operation) => operation.nodeKey === key); + data.studioRole = role; + if (operation) data.operationAuthoring = { schemaVersion: 1, operation, defaults: {}, retained: [] }; + if (data.params.offload_mode) data.params.offload_mode.value = 'none'; + if (data.params.auto_offload) data.params.auto_offload.value = false; + return { id: `authored-${role}`, type: 'custom', position: { x, y }, data }; + }); + const graph = { + nodes, + edges: parent.edges.map(([a, b, c, d], index) => ({ + id: `authored-edge-${index}`, + source: `authored-${a}`, + sourceHandle: b, + target: `authored-${c}`, + targetHandle: d, + })), + }; + const child = parent.ancillaryOperations[0]; + const owner = nodes.find((node) => node.data.studioRole === child.bindings.owner.role); + owner.data.params[child.bindings.owner.promptField].value = ' Unchanged raw prompt.\n'; + owner.data.params[child.bindings.owner.layoutField].value = null; + authoring.attachPromptEnhancementParents(graph, parent); + return { graph, parent, child, owner, registry }; +} + +test('absent metadata preserves legacy graph bytes and adds no feature', () => { + const graph = { nodes: [], edges: [] }; + assert.equal(authoring.attachPromptEnhancementParents(graph, undefined), graph); + assert.deepEqual(graph, { nodes: [], edges: [] }); +}); + +test('unavailable enhancement removal preserves applied and later authored pairs, references and unrelated topology', async () => { + for (const index of [0, 1]) { + const { graph, parent, child, owner, registry } = setup(index); + const enabled = await authoring.planEnablePromptEnhancement(graph, owner.id, parent, child.id, registry); + const current = enabled.nodes.find((node) => node.id === owner.id); + const layout = { + schemaVersion: 2, + coordinateSpace: 'normalized_xyxy', + regions: [{ id: 'subject', description: 'Retain exactly.', action: 'place', targetBox: [0.2, 0.2, 0.8, 0.8] }], + }; + current.data.params.prompt.value = 'Keep this applied caption.\n'; + current.data.params.layout_conditioning.value = layout; + current.data.operationAuthoring.ancillaryParent.appliedPairSha256 = await authoring.promptEnhancementPairHash({ + prompt: current.data.params.prompt.value, + layout, + }); + const before = structuredClone(enabled); + const binding = current.data.operationAuthoring.ancillaryBindings[0]; + const removed = new Set(Object.values(binding.roleNodes)); + const expected = structuredClone(enabled); + expected.nodes = expected.nodes.filter((node) => !removed.has(node.id)); + expected.edges = expected.edges.filter((edge) => !removed.has(edge.source) && !removed.has(edge.target)); + const kept = expected.nodes.find((node) => node.id === owner.id); + delete kept.data.operationAuthoring.ancillaryBindings; + delete kept.data.operationAuthoring.ancillaryParent.appliedPairSha256; + assert.deepEqual(await authoring.planDetachUnavailablePromptEnhancement(enabled, owner.id, child.id), expected); + assert.deepEqual(enabled, before); + } +}); + +test('unavailable enhancement removal refuses ambiguous or shared persisted ownership atomically', async (t) => { + for (const fault of [ + 'wrong-parent', + 'wrong-owner', + 'wrong-leaf', + 'extra-role', + 'shared-claim', + 'shared-parent-claim', + 'extra-edge', + 'missing-edge', + 'duplicate-edge', + 'duplicate-node', + 'duplicate-owner', + ]) { + await t.test(fault, async () => { + const { graph, parent, child, owner, registry } = setup(); + const enabled = await authoring.planEnablePromptEnhancement(graph, owner.id, parent, child.id, registry); + const current = enabled.nodes.find((node) => node.id === owner.id); + const binding = current.data.operationAuthoring.ancillaryBindings[0]; + const provider = enabled.nodes.find((node) => node.id === binding.roleNodes.provider); + const proposal = enabled.nodes.find((node) => node.id === binding.roleNodes.proposal); + const edge = enabled.edges.find((edge) => edge.source === provider.id); + if (fault === 'wrong-parent') binding.parent.authoringRecipeId += ':foreign'; + if (fault === 'wrong-owner') binding.parentRoleNodes.prompt = 'foreign'; + if (fault === 'wrong-leaf') provider.data.action = 'ModelsLoader'; + if (fault === 'extra-role') binding.roleNodes.foreign = 'foreign'; + if (fault === 'shared-claim') { + const other = structuredClone(current); + other.id = 'other-owner'; + enabled.nodes.push(other); + } + if (fault === 'shared-parent-claim') { + const other = structuredClone(current); + other.id = 'other-owner'; + delete other.data.operationAuthoring.ancillaryBindings; + other.data.operationAuthoring.ancillaryParent.parentRoleNodes.prompt = provider.id; + enabled.nodes.push(other); + } + if (fault === 'extra-edge') + enabled.edges.push({ + id: 'foreign-edge', + source: proposal.id, + sourceHandle: 'text', + target: owner.id, + targetHandle: 'prompt', + }); + if (fault === 'missing-edge') enabled.edges = enabled.edges.filter((item) => item.id !== edge.id); + if (fault === 'duplicate-edge') enabled.edges.push({ ...edge, id: 'duplicate-edge' }); + if (fault === 'duplicate-node') enabled.nodes.push(structuredClone(provider)); + if (fault === 'duplicate-owner') enabled.nodes.push(structuredClone(current)); + const before = structuredClone(enabled); + await assert.rejects( + authoring.planDetachUnavailablePromptEnhancement(enabled, owner.id, child.id), + /ancillary|enhancement|duplicate|collision/i, + ); + assert.deepEqual(enabled, before); + }); + } +}); + +test('alternative enhancement parent selection preserves authored graph state and refuses structural drift', async (t) => { + const { graph, parent, owner } = setup(); + const target = structuredClone(parent); + target.id = `${parent.id}:alternative`; + const child = target.ancillaryOperations[0]; + child.id = `${target.id}:preview`; + child.parent.authoringRecipeId = target.id; + const rehash = () => { + const { contentHash: _childHash, ...childBody } = child; + child.contentHash = `studio-ancillary-v1-${stable.hashString(stable.stableStringify(childBody))}`; + const { contentHash: _parentHash, ...body } = target; + target.contentHash = `studio-authoring-v1-${stable.hashString(stable.stableStringify(body))}`; + }; + rehash(); + const before = structuredClone(graph); + const chosen = await authoring.planSelectPromptEnhancementParent(graph, owner.id, parent, target); + assert.deepEqual(graph, before); + assert.deepEqual(chosen.edges, graph.edges); + assert.equal(chosen.nodes.length, graph.nodes.length); + const expected = structuredClone(graph); + expected.nodes.find((node) => node.id === owner.id).data.operationAuthoring.ancillaryParent.parent = { + ...child.parent, + authoringContentHash: target.contentHash, + }; + assert.deepEqual(chosen, expected, 'Only the selected owner advisory identity changes.'); + for (const [name, alter] of [ + [ + 'base spec', + (p) => { + p.baseSpecId = 'another'; + }, + ], + [ + 'roles', + (p) => { + p.roles[0][2] += 1; + }, + ], + [ + 'bindings', + (p) => { + p.bindings[0][1] = 'another'; + }, + ], + [ + 'initial values', + (p) => { + p.initialValues.push(['prompt', 'unrelated', 1]); + }, + ], + [ + 'edges', + (p) => { + p.edges[0][1] = 'another'; + }, + ], + [ + 'owner', + (p) => { + p.ancillaryOperations[0].bindings.owner.layoutField = 'another'; + }, + ], + [ + 'multiple children', + (p) => { + p.ancillaryOperations.push(p.ancillaryOperations[0]); + }, + ], + ]) + await t.test(name, async () => { + const malformed = structuredClone(target); + alter(malformed); + await assert.rejects( + authoring.planSelectPromptEnhancementParent(graph, owner.id, parent, malformed), + /alternative/, + ); + assert.deepEqual(graph, before); + }); +}); + +test('saved enhancement selection is a strict advisory context with exact role remapping', () => { + const { owner, parent } = setup(); + const before = structuredClone(owner.data.operationAuthoring); + const offer = authoring.promptEnhancementParentFromHint(before); + assert.equal(offer.parent.authoringContentHash, parent.contentHash); + assert.equal('executionAuthority' in offer, false); + const next = remap(before, (id) => `clone-${id}`); + assert.deepEqual( + Object.values(next.ancillaryParent.parentRoleNodes), + Object.values(offer.parentRoleNodes).map((id) => `clone-${id}`), + ); + assert.deepEqual(owner.data.operationAuthoring, before); + const restored = JSON.parse(JSON.stringify(next)); + assert.deepEqual(authoring.promptEnhancementParentFromHint(restored), next.ancillaryParent); +}); + +test('malformed contexts, accessor hints, duplicate nodes and forged grants refuse', () => { + const { owner } = setup(); + const offer = structuredClone(owner.data.operationAuthoring.ancillaryParent); + for (const mutate of [ + (value) => { + value.schemaVersion = true; + }, + (value) => { + value.canApply = true; + }, + (value) => { + value.parent.executionProfileId = ['profile']; + }, + (value) => { + value.parent.authoringContentHash = 'wrong'; + }, + (value) => { + value.parentRoleNodes.models = value.parentRoleNodes.prompt; + }, + (value) => { + value.parentRoleNodes.prompt = '\ud800'; + }, + (value) => { + value.parentRoleNodes.prompt = 'a'.repeat(513); + }, + (value) => { + value.appliedPairSha256 = 'not-a-digest'; + }, + ]) { + const copy = structuredClone(offer); + mutate(copy); + assert.throws(() => authoring.parsePromptEnhancementParent(copy), /ancillary/i); + } + let touched = false; + assert.throws( + () => + authoring.promptEnhancementParentFromHint( + Object.defineProperty({}, 'ancillaryParent', { + enumerable: true, + get() { + touched = true; + return offer; + }, + }), + ), + /data field/, + ); + assert.equal(touched, false); +}); + +test('Enable creates only the exact declared branch and leaves raw prompt/layout intact', async () => { + const { graph, parent, child, owner, registry } = setup(); + const before = structuredClone(graph); + const next = await authoring.planEnablePromptEnhancement(graph, owner.id, parent, child.id, registry); + assert.deepEqual(graph, before); + assert.equal(next.nodes.length, graph.nodes.length + child.roles.length); + const binding = next.nodes.find((node) => node.id === owner.id).data.operationAuthoring.ancillaryBindings[0]; + const request = next.nodes.find((node) => node.id === binding.roleNodes[child.bindings.request.role]); + assert.equal(request.data.params[child.bindings.request.promptField].value, ' Unchanged raw prompt.\n'); + assert.equal(request.data.params[child.bindings.request.layoutField].value, null); + assert.deepEqual(next.nodes.find((node) => node.id === owner.id).data.params, owner.data.params); + await assert.rejects(authoring.planEnablePromptEnhancement(next, owner.id, parent, child.id, registry), /disable/i); +}); + +test('retained plain v1 full declaration supports normal Disable and Enable without hash migration', async () => { + const { graph, parent, child, owner, registry } = setup(1, false, legacy.authoring); + const currentRegistry = JSON.parse( + readFileSync('tests/fixtures/prompt-enhancement-starter.v1.json', 'utf8'), + ).registry; + for (const [, key] of child.roles) registry[key] = structuredClone(currentRegistry[key]); + assert.equal(parent.contentHash, 'studio-authoring-v1-d43668d0'); + assert.equal(child.contentHash, 'studio-ancillary-v1-95fc4619'); + assert.deepEqual(child.verification.supportedPromptModes, ['t2i', 'i2i']); + assert.equal(Object.hasOwn(child, 'layoutPolicy'), false); + const enabled = await authoring.planEnablePromptEnhancement(graph, owner.id, parent, child.id, registry); + const disabled = await authoring.planDisablePromptEnhancement(enabled, owner.id, parent, child.id); + const reenabled = await authoring.planEnablePromptEnhancement(disabled, owner.id, parent, child.id, registry); + const binding = reenabled.nodes.find((node) => node.id === owner.id).data.operationAuthoring.ancillaryBindings[0]; + assert.equal(binding.contentHash, child.contentHash); + assert.equal(binding.parent.authoringContentHash, parent.contentHash); + assert.deepEqual(parent, legacy.authoring); +}); + +test('Apply changes caption and layout together; Disable restores only untouched applied values', async () => { + const { graph, parent, child, owner, registry } = setup(); + const enabled = await authoring.planEnablePromptEnhancement(graph, owner.id, parent, child.id, registry); + const hash = await authoring.promptEnhancementPairHash({ prompt: ' Unchanged raw prompt.\n', layout: null }); + const pair = { prompt: 'Proposed caption.', layout: null }; + const applied = await authoring.planApplyPromptEnhancement(enabled, owner.id, parent, child.id, pair, hash); + assert.equal(applied.nodes.find((node) => node.id === owner.id).data.params.prompt.value, pair.prompt); + assert.equal( + enabled.nodes.find((node) => node.id === owner.id).data.params.prompt.value, + ' Unchanged raw prompt.\n', + ); + const disabled = await authoring.planDisablePromptEnhancement(applied, owner.id, parent, child.id); + assert.equal(disabled.nodes.length, graph.nodes.length); + assert.equal( + disabled.nodes.find((node) => node.id === owner.id).data.params.prompt.value, + ' Unchanged raw prompt.\n', + ); + const edited = structuredClone(applied); + edited.nodes.find((node) => node.id === owner.id).data.params.prompt.value = 'Later user edit.'; + const kept = await authoring.planDisablePromptEnhancement(edited, owner.id, parent, child.id); + assert.equal(kept.nodes.find((node) => node.id === owner.id).data.params.prompt.value, 'Later user edit.'); + await assert.rejects( + authoring.planApplyPromptEnhancement(edited, owner.id, parent, child.id, pair, hash), + /changed/i, + ); +}); + +test('declared structured Apply is one Undo pair and refuses stale bindings or geometry without mutation', async () => { + const { graph, parent, child, owner, registry } = setup(1, true); + const layout = { + schemaVersion: 2, + coordinateSpace: 'normalized_xyxy', + regions: [ + { + id: 'object', + description: 'Original object.', + action: 'relocate', + targetBox: [0.2, 0.2, 0.8, 0.8], + source: { referenceIndex: 0, box: [0, 0, 1, 1], expectedReferenceId: `sha256:${'a'.repeat(64)}` }, + }, + ], + }; + owner.data.params.prompt.value = 'Move .'; + owner.data.params.layout_conditioning.value = structuredClone(layout); + const enabled = await authoring.planEnablePromptEnhancement(graph, owner.id, parent, child.id, registry); + const original = { prompt: 'Move .', layout }; + const hash = await authoring.promptEnhancementPairHash(original); + const proposed = structuredClone(original); + proposed.prompt = 'Move the detailed .'; + proposed.layout.regions[0].description = 'A detailed object.'; + const { useFlowStore: flow } = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + const studio = await server.ssrLoadModule('/src/stores/useStudioStore.ts'); + const transaction = await server.ssrLoadModule('/src/workflow/operationGraphTransaction.ts'); + studio.useStudioStore.setState({ + activeWorkflowTabId: 'structured-unit', + workflowCanvasEpoch: 1, + workflowFormEpoch: 1, + canvasTransition: null, + graphFinalization: null, + }); + flow.getState().replaceGraph(enabled); + flow.getState().resetHistory(); + const current = flow.getState().toObject(); + const next = await authoring.planApplyPromptEnhancement(current, owner.id, parent, child.id, proposed, hash); + transaction.commitOperationGraph( + next, + studio.captureWorkflowOperationContext(), + transaction.operationGraphSignature(current), + 'Apply structured enhancement', + ); + assert.equal(flow.getState().historyPast.length, 1); + const pair = () => { + const current = flow.getState().nodes.find((node) => node.id === owner.id); + return { prompt: current.data.params.prompt.value, layout: current.data.params.layout_conditioning.value }; + }; + assert.deepEqual(pair(), proposed); + flow.getState().undo(); + assert.deepEqual(pair(), original); + flow.getState().redo(); + assert.deepEqual(pair(), proposed); + for (const mutate of [ + (p) => { + p.layout.regions[0].source.expectedReferenceId = `sha256:${'b'.repeat(64)}`; + }, + (p) => { + p.layout.regions[0].targetBox[0] = 0.201; + }, + (p) => { + p.layout.regions[0].action = 'remove'; + p.layout.regions[0].targetBox = null; + }, + ]) { + const changed = structuredClone(proposed), + before = structuredClone(enabled); + mutate(changed); + await assert.rejects( + authoring.planApplyPromptEnhancement(enabled, owner.id, parent, child.id, changed, hash), + /identities|geometry/, + ); + assert.deepEqual(enabled, before); + } + const stale = structuredClone(enabled); + stale.nodes.find( + (node) => node.id === owner.id, + ).data.params.layout_conditioning.value.regions[0].source.expectedReferenceId = `sha256:${'c'.repeat(64)}`; + await assert.rejects( + authoring.planApplyPromptEnhancement(stale, owner.id, parent, child.id, proposed, hash), + /changed/, + ); +}); + +test('Enable refuses stale metadata, source layout and absent registry; Disable protects unrelated connections', async () => { + const { graph, parent, child, owner, registry } = setup(); + const stale = structuredClone(parent); + stale.contentHash = 'studio-authoring-v1-00000000'; + await assert.rejects(authoring.planEnablePromptEnhancement(graph, owner.id, stale, child.id, registry), /refresh/i); + await assert.rejects(authoring.planEnablePromptEnhancement(graph, owner.id, parent, child.id, {}), /registry/i); + const source = structuredClone(graph); + source.nodes.find((node) => node.id === owner.id).data.params.layout_conditioning.value = { + schemaVersion: 2, + coordinateSpace: 'normalized_xyxy', + regions: [ + { + id: 'object', + description: 'Move object', + action: 'relocate', + targetBox: [0.1, 0.1, 0.5, 0.5], + source: { referenceIndex: 0, expectedReferenceId: `sha256:${'a'.repeat(64)}`, box: [0, 0, 1, 1] }, + }, + ], + }; + await assert.rejects( + authoring.planEnablePromptEnhancement(source, owner.id, parent, child.id, registry), + /source|layout/i, + ); + const enabled = await authoring.planEnablePromptEnhancement(graph, owner.id, parent, child.id, registry); + const binding = enabled.nodes.find((node) => node.id === owner.id).data.operationAuthoring.ancillaryBindings[0]; + enabled.edges.push({ + id: 'foreign', + source: binding.roleNodes[child.bindings.output.role], + sourceHandle: 'text', + target: owner.id, + targetHandle: 'prompt_input', + }); + await assert.rejects( + authoring.planDisablePromptEnhancement(enabled, owner.id, parent, child.id), + /additional connections/i, + ); +}); + +test('verification metadata stays closed, immutable and distinct from observed runtime or grants', () => { + // Synthetic static declaration, not an artifact/processor/runtime observation. + const value = { + schemaVersion: 1, + adapter: { id: 'fixture-adapter', declarationSha256: `sha256:${'a'.repeat(64)}` }, + supportedPromptModes: ['t2i', 'i2i'], + runtimeInputs: { + role: 'source', + modelField: 'model_id', + revisionField: 'revision', + dtypeField: 'dtype', + deviceField: 'device', + quantizationField: 'quantization_mode', + }, + requestInputs: { + role: 'request', + operationField: 'operation', + maxNewTokensField: 'enhancement_max_new_tokens', + minNewTokensField: 'min_new_tokens', + maxInputTokensField: 'max_input_tokens', + maxImagePixelsField: 'max_image_pixels', + }, + systemPromptsSha256: `sha256:${'b'.repeat(64)}`, + chatTemplateSha256: `sha256:${'c'.repeat(64)}`, + systemPromptSha256ByMode: Object.fromEntries( + ['t2i', 'i2i', 't2i_bbox', 'i2i_bbox'].map((mode) => [mode, 'd'.repeat(64)]), + ), + modelReceipt: { + schemaVersion: 1, + library: 'transformers', + task: 'image-video-to-text', + source: { kind: 'hub', repository: 'fixture/model', revision: 'e'.repeat(40) }, + loader: { preprocessorAutoClass: 'AutoProcessor', modelAutoClass: 'AutoModelForImageTextToText' }, + security: { localFilesOnly: true, trustRemoteCode: false, safetensorsOnly: true, hostedInference: false }, + runtime: { + transformersVersion: '5.18.0', + preprocessorClass: 'FixtureProcessor', + modelClass: 'FixtureModel', + modelType: 'fixture', + architectures: ['FixtureModel'], + }, + }, + quantizationRecipes: [{ mode: 'none' }], + }; + assert.deepEqual(metadata.parseAncillaryVerification(value), value); + for (const mutate of [ + (v) => { + v.canApply = true; + }, + (v) => { + v.supportedPromptModes = [['t2i']]; + }, + (v) => { + v.supportedPromptModes = ['t2i', 't2i']; + }, + (v) => { + v.runtimeInputs.dtypeField = v.runtimeInputs.deviceField; + }, + (v) => { + v.runtimeInputs.role = ['source']; + }, + (v) => { + v.requestInputs.canApply = true; + }, + (v) => { + v.modelReceipt.security.trustRemoteCode = true; + }, + (v) => { + v.modelReceipt.source.revision = 'main'; + }, + (v) => { + v.modelReceipt.source.kind = ['hub']; + }, + (v) => { + v.modelReceipt.runtime.device = 'cuda'; + }, + (v) => { + v.modelReceipt.runtime.architectures = [true]; + }, + (v) => { + v.modelReceipt.runtime.modelClass = 'a'.repeat(257); + }, + (v) => { + v.modelReceipt.receiptDigest = `sha256:${'a'.repeat(64)}`; + }, + (v) => { + v.adapter.declarationSha256 = 'a'.repeat(64); + }, + (v) => { + v.systemPromptSha256ByMode.i2i = `sha256:${'a'.repeat(64)}`; + }, + (v) => { + v.quantizationRecipes = [{ mode: ['none'] }]; + }, + (v) => { + v.quantizationRecipes.push({ mode: 'none' }); + }, + ]) { + const copy = structuredClone(value); + mutate(copy); + assert.throws(() => metadata.parseAncillaryVerification(copy), /ancillary/i); + } +}); + +test('Regenerate reuses the original request after Apply and captures later user edits without recursively enhancing output', async () => { + const { graph, parent, child, owner, registry } = setup(); + const raw = owner.data.params.prompt.value; + const enabled = await authoring.planEnablePromptEnhancement(graph, owner.id, parent, child.id, registry); + const hash = await authoring.promptEnhancementPairHash({ prompt: raw, layout: null }); + const applied = await authoring.planApplyPromptEnhancement( + enabled, + owner.id, + parent, + child.id, + { prompt: 'First proposed wording.', layout: null }, + hash, + ); + const refreshed = await authoring.planRefreshPromptEnhancementRequest(applied, owner.id, parent, child.id); + const current = refreshed.nodes.find((node) => node.id === owner.id); + const binding = current.data.operationAuthoring.ancillaryBindings[0]; + const request = refreshed.nodes.find((node) => node.id === binding.roleNodes[child.bindings.request.role]); + assert.equal(current.data.params.prompt.value, raw); + assert.equal(request.data.params.prompt.value, raw); + assert.equal(current.data.operationAuthoring.ancillaryParent.appliedPairSha256, undefined); + const edited = structuredClone(applied); + edited.nodes.find((node) => node.id === owner.id).data.params.prompt.value = 'Later user-authored wording.'; + const later = await authoring.planRefreshPromptEnhancementRequest(edited, owner.id, parent, child.id); + assert.equal( + later.nodes.find((node) => node.id === binding.roleNodes[child.bindings.request.role]).data.params.prompt.value, + 'Later user-authored wording.', + ); +}); + +test('implicit scalar Inputs controls are opt-in for exact generic members; other stage behavior stays unchanged', async () => { + const { child, registry } = setup(); + const { createNodeFromRegistry } = await server.ssrLoadModule('/src/workflow/nodeFactory.ts'); + const { groupVisualStages } = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const node = createNodeFromRegistry(child.roles[0][1], registry, { x: 0, y: 0 }); + const graph = { nodes: [node], edges: [] }; + const ordinary = groupVisualStages(graph, [node.id], 'inputs'); + const adopted = groupVisualStages(graph, [node.id], 'inputs', undefined, { implicitScalarControlNodeIds: [node.id] }); + const ordinaryFields = ordinary.nodes[0].data.blockInstanceV2.effectiveInterface.controls.map( + (control) => control.binding.fieldId, + ); + const adoptedFields = adopted.nodes[0].data.blockInstanceV2.effectiveInterface.controls.map( + (control) => control.binding.fieldId, + ); + assert.ok(adoptedFields.length > ordinaryFields.length); + assert.ok(adoptedFields.includes('dtype')); + assert.throws( + () => + groupVisualStages(graph, [node.id], 'inputs', undefined, { implicitScalarControlNodeIds: ['foreign-member'] }), + /explicitly adopted/, + ); + assert.throws( + () => groupVisualStages(graph, [node.id], 'setup', undefined, { implicitScalarControlNodeIds: [node.id] }), + /explicitly adopted/, + ); + const declared = setup().owner; + assert.throws( + () => + groupVisualStages({ nodes: [declared], edges: [] }, [declared.id], 'inputs', undefined, { + implicitScalarControlNodeIds: [declared.id], + }), + /explicitly adopted/, + ); + assert.deepEqual(graph, { nodes: [node], edges: [] }); +}); diff --git a/scripts/prompt-enhancement-preview.test.mjs b/scripts/prompt-enhancement-preview.test.mjs new file mode 100644 index 00000000..2af22ac4 --- /dev/null +++ b/scripts/prompt-enhancement-preview.test.mjs @@ -0,0 +1,1696 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { readFileSync, mkdtempSync, rmSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import path from 'node:path'; +import { before, after, beforeEach, test } from 'node:test'; +import React from 'react'; +import { renderToStaticMarkup } from 'react-dom/server'; +import { createServer } from 'vite'; + +// Genuine constructor-trapped metadata, closed eligibility; all HTTP replies, +// task observations and generated summaries below are synthetic unit fixtures. +const fixture = JSON.parse(readFileSync('tests/fixtures/prompt-enhancement-starter.v1.json', 'utf8')); +const cache = mkdtempSync(path.join(tmpdir(), 'modiff-enhancement-preview-')); +const sha = (text) => `sha256:${createHash('sha256').update(text, 'utf8').digest('hex')}`; +const worker = { + instance: 'synthetic-ui-worker', + backend_source: { fingerprint: `sha256:backend-source-v1:${'a'.repeat(64)}` }, +}; +let server, flow, studio, registry, socket, tasks, authoring, preview, runtime, canonical, transaction, Component; +let originalFetch, calls, onMetadata, onRuntime, submitted, cacheBody, taskReplies, submissionId; +before(async () => { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, String(value)), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { localStorage, dispatchEvent: () => true, location: { origin: 'http://127.0.0.1:5191' } }; + originalFetch = globalThis.fetch; + globalThis.fetch = async () => { + throw new Error('No network during module loading'); + }; + server = await createServer({ + configFile: false, + cacheDir: cache, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + ({ useFlowStore: flow } = await server.ssrLoadModule('/src/stores/useFlowStore.ts')); + ({ useStudioStore: studio } = await server.ssrLoadModule('/src/stores/useStudioStore.ts')); + ({ useNodesStore: registry } = await server.ssrLoadModule('/src/stores/useNodeStore.ts')); + ({ useWebsocketStore: socket } = await server.ssrLoadModule('/src/stores/useWebsocketStore.ts')); + ({ useTaskStore: tasks } = await server.ssrLoadModule('/src/stores/useTaskStore.ts')); + authoring = await server.ssrLoadModule('/src/studio/promptEnhancementAuthoring.ts'); + preview = await server.ssrLoadModule('/src/studio/promptEnhancementPreview.ts'); + runtime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); + canonical = (await server.ssrLoadModule('/src/studio/blockSchemaV2.ts')).canonicalBlockStringifyV2; + transaction = await server.ssrLoadModule('/src/workflow/operationGraphTransaction.ts'); + Component = (await server.ssrLoadModule('/src/components/PromptEnhancementControls.tsx')).default; +}); +beforeEach(() => { + calls = []; + onMetadata = null; + onRuntime = null; + submitted = null; + submissionId = 'synthetic-preview-B'; + cacheBody = null; + taskReplies = new Map(); + studio.setState({ + form: { + ...studio.getState().form, + resourceMode: 'expert', + device: 'cpu', + offloadMode: 'none', + autoOffload: false, + randomSeed: false, + }, + activeWorkflowTabId: 'unit-preview-tab', + workflowCanvasHydrated: true, + workflowCanvasEpoch: 0, + workflowFormEpoch: 0, + graphBinding: null, + workflowTabs: [], + currentRunContext: null, + outputs: [], + runContextsByClientRunId: {}, + runContextsByTaskId: {}, + }); + registry.setState({ + nodesRegistry: structuredClone(fixture.registry), + operationContracts: structuredClone(fixture.operationContracts), + workflowModelDescriptors: [], + }); + socket.setState({ isConnected: true, sid: 'unit-preview-sid' }); + tasks.setState({ currentTask: undefined, queuedTasks: {}, sessionRuns: [] }); + flow.getState().replaceGraph({ nodes: [], edges: [] }); + flow.getState().resetHistory(); + globalThis.fetch = async (url, init) => { + const parsed = new URL(String(url)), + endpoint = parsed.pathname; + calls.push(endpoint); + const json = (value) => + new Response(JSON.stringify(value), { status: 200, headers: { 'Content-Type': 'application/json' } }); + if (endpoint === '/operations/starter') { + const response = onMetadata?.(JSON.parse(init.body)); + return json(response ?? fixture.response); + } + if (endpoint === '/runtime/status') { + assert.equal(init.cache, 'no-store', 'Runtime identity reads must bypass HTTP caches.'); + onRuntime?.(); + return json(worker); + } + if (endpoint === '/graph') { + submitted = JSON.parse(init.body); + return json({ + error: false, + sid: 'unit-preview-sid', + task_id: submissionId, + message: 'Synthetic transport only', + }); + } + if (endpoint.startsWith('/runs/')) return json({ task: taskReplies.get(decodeURIComponent(endpoint.slice(6))) }); + if (endpoint.startsWith('/cache/')) { + assert.equal(parsed.search, '?with_metadata=1'); + assert.equal(init.cache, 'no-store'); + return cacheBody instanceof Response + ? cacheBody + : new Response(cacheBody, { headers: { 'Content-Type': 'application/json' } }); + } + if (endpoint === '/cache' && init?.method === 'DELETE') { + const body = JSON.parse(init.body); + return json({ + error: false, + nodes: body.nodes, + ...(body.scope === 'outputs' ? { scope: 'outputs', retainedModelNodes: [] } : {}), + }); + } + assert.fail(`Unexpected request ${endpoint}`); + }; +}); +after(async () => { + globalThis.fetch = originalFetch; + await server?.close(); + delete globalThis.window; + delete globalThis.localStorage; + rmSync(cache, { recursive: true, force: true }); +}); + +const parent = fixture.response.authoring, + child = parent.ancillaryOperations[0]; + +test('retired enhancement metadata cannot trap normal Disable or alter the authored pair', async () => { + const { ownerId } = await setup(); + await preview.enablePromptEnhancement(ownerId); + editOwnerField(ownerId, 'prompt', 'Keep this later authored caption exactly.'); + editOwnerField(ownerId, 'layout_conditioning', { + schemaVersion: 2, + coordinateSpace: 'normalized_xyxy', + regions: [{ id: 'subject', description: 'Keep this region.', action: 'place', targetBox: [0.2, 0.2, 0.8, 0.8] }], + }); + const before = structuredClone(flow.getState().toObject()); + const originalOwner = structuredClone(activeOwner(ownerId)); + onMetadata = () => { + throw new Error('The execution profile has a current public authoring replacement. Rebind explicitly.'); + }; + await assert.rejects(preview.startPromptEnhancementPreview(ownerId, child.id), /Rebind explicitly/); + assert.equal(submitted, null); + flow.getState().resetHistory(); + await preview.disablePromptEnhancement(ownerId, child.id); + const disabled = activeOwner(ownerId); + assert.deepEqual(disabled.data.params, originalOwner.data.params); + assert.equal(disabled.data.operationAuthoring.ancillaryBindings, undefined); + assert.equal(flow.getState().historyPast.length, 1); + assert.equal(submitted, null); + flow.getState().undo(); + assert.deepEqual(flow.getState().toObject(), before); + flow.getState().redo(); + assert.deepEqual(activeOwner(ownerId).data.params, originalOwner.data.params); + await assert.rejects(preview.enablePromptEnhancement(ownerId), /Rebind explicitly/); + + // A synthetic current declaration exercises the ordinary same-model planner; + // this does not claim current public metadata or native runtime proof. + const fresh = structuredClone(fixture.response); + const profileId = 'synthetic:current-profile'; + fresh.authoring.id = 'synthetic:current-authoring'; + fresh.authoring.executionProfileIds = [profileId]; + const freshChild = fresh.authoring.ancillaryOperations[0]; + freshChild.id = `${fresh.authoring.id}:preview`; + freshChild.parent.authoringRecipeId = fresh.authoring.id; + freshChild.parent.executionProfileId = profileId; + freshChild.layoutPolicy = 'append-details-preserve-layout-v1'; + freshChild.initialValues.find(([role, name]) => role === 'proposal' && name === 'operation')[2] = + 'enhance_prompt_append_details'; + const { hashString, stableStringify } = await server.ssrLoadModule('/src/studio/stableHash.ts'); + const rehash = (item, prefix) => + `${prefix}${hashString(stableStringify(Object.fromEntries(Object.entries(item).filter(([key]) => key !== 'contentHash'))))}`; + freshChild.contentHash = rehash(freshChild, 'studio-ancillary-v1-'); + fresh.authoring.contentHash = rehash(fresh.authoring, 'studio-authoring-v1-'); + onMetadata = (selection) => { + assert.equal(selection.authoringRecipeId, fresh.authoring.id); + assert.equal(selection.executionProfileId, profileId); + return fresh; + }; + const { requestOperationStarter } = await server.ssrLoadModule('/src/workflow/operationStarterRequest.ts'); + const { planOperationChange } = await server.ssrLoadModule('/src/workflow/operationAuthoring.ts'); + const { visualOperationOwnerId } = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const { expandFlowExecutionGraph } = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + const { layoutReferenceContext } = await server.ssrLoadModule('/src/studio/layoutReferenceContext.ts'); + const starter = await requestOperationStarter( + fixture.selection.pipelineClass, + fixture.selection.task, + fixture.operationContracts, + undefined, + profileId, + fresh.authoring.id, + ); + const graph = flow.getState().toObject(); + const root = graph.nodes.find((node) => + node.data.blockInstanceV2?.effectiveGraph.nodes.some((leaf) => leaf.data.studioRole === 'models'), + ); + const leaf = root.data.blockInstanceV2.effectiveGraph.nodes.find((leaf) => leaf.data.studioRole === 'models'); + const plan = planOperationChange(graph, visualOperationOwnerId(graph, leaf.nodeId, root.id), starter, { + replaceModel: true, + }); + const rebound = expandFlowExecutionGraph(plan.graph.nodes, plan.graph.edges).nodes.find( + (node) => node.data.operationAuthoring?.ancillaryParent, + ); + for (const name of ['prompt', 'layout_conditioning', 'max_sequence_length']) + assert.deepEqual( + rebound.data.params[name].value, + originalOwner.data.params[name].value, + `Same-model rebind must keep ${name}.`, + ); + assert.equal(rebound.data.operationAuthoring.ancillaryParent.parent.authoringRecipeId, fresh.authoring.id); + assert.equal(rebound.data.operationAuthoring.ancillaryBindings, undefined); + const { unpackVisualOperationGroups } = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const legacyGraph = unpackVisualOperationGroups(structuredClone(graph)).graph; + for (const node of legacyGraph.nodes) { + const hint = node.data.operationAuthoring; + if (hint) { + const { retained: _retained, ...legacyHint } = hint; + node.data.operationAuthoring = legacyHint; + } + } + const legacyModel = legacyGraph.nodes.find((node) => node.data.studioRole === 'models'); + const legacyBefore = structuredClone(legacyGraph); + const { operationModelSource } = await server.ssrLoadModule('/src/workflow/operationModelSource.ts'); + assert.equal(operationModelSource(legacyModel, 'repo_id'), legacyModel); + const legacyPlan = planOperationChange(legacyGraph, legacyModel.id, starter, { replaceModel: true }); + assert.deepEqual(legacyGraph, legacyBefore, 'Preview never rewrites the historical flat saved hints.'); + const legacyRebound = legacyPlan.graph.nodes.find((node) => node.data.operationAuthoring?.ancillaryParent); + for (const name of ['prompt', 'layout_conditioning', 'max_sequence_length']) + assert.deepEqual(legacyRebound.data.params[name].value, originalOwner.data.params[name].value); + assert.equal(legacyRebound.data.operationAuthoring.ancillaryParent.parent.executionProfileId, profileId); + assert.equal(legacyRebound.data.operationAuthoring.ancillaryBindings, undefined); + const legacyReference = legacyBefore.nodes.find((node) => node.data.studioRole === 'loadImage'); + if (legacyReference) + assert.deepEqual( + legacyPlan.graph.nodes.find((node) => node.id === legacyReference.id), + legacyReference, + ); + assert.equal(legacyPlan.graph.edges.length, legacyBefore.edges.length); + for (const fault of [ + 'none', + 'missing-context', + 'missing-resolver', + 'changed-ancestor', + 'different-model', + 'different-task', + 'wired-layout', + ]) { + const boundGraph = unpackVisualOperationGroups(structuredClone(graph)).graph; + const boundOwner = boundGraph.nodes.find((node) => node.data.operationAuthoring?.ancillaryParent); + const model = boundGraph.nodes.find((node) => node.data.studioRole === 'models'); + // Keep all other model fields byte-equivalent to the planned current + // schema, so the positive case changes exactly one profile selector. + model.data.params = structuredClone( + unpackVisualOperationGroups(plan.graph).graph.nodes.find((node) => node.id === model.id).data.params, + ); + for (const field of Object.values(model.data.params)) + if (field.default !== undefined && canonical(field.value ?? field.default) === canonical(field.default)) + delete field.value; + const boundStarter = structuredClone(starter); + const promptRow = boundStarter.nodes.find( + (row) => row.operation.nodeKey === boundOwner.data.operationAuthoring.operation.nodeKey, + ); + const modelRow = boundStarter.nodes.find( + (row) => row.operation.nodeKey === model.data.operationAuthoring.operation.nodeKey, + ); + const bindingField = { type: 'reference_conditioning', display: 'input' }; + boundOwner.data.params.reference_binding = structuredClone(bindingField); + promptRow.node.params.reference_binding = structuredClone(bindingField); + model.data.params.execution_profile_id = { type: 'string', hidden: true, default: 'synthetic:retired-profile' }; + modelRow.node.params.execution_profile_id = { type: 'string', hidden: true, default: profileId }; + if (fault === 'different-model') modelRow.node.params.revision.value = 'f'.repeat(40); + if (fault === 'different-task') boundStarter.task = 'edit_image'; + // Synthetic ancestor field: the context key must retain every non-profile + // change, including reference order and preprocessing controls. + model.data.params.reference_order = { type: 'list', hidden: true, default: ['A', 'B'] }; + modelRow.node.params.reference_order = { + type: 'list', + hidden: true, + default: fault === 'changed-ancestor' ? ['B', 'A'] : ['A', 'B'], + }; + const boundLayout = structuredClone(originalOwner.data.params.layout_conditioning.value); + Object.assign(boundLayout.regions[0], { + action: 'relocate', + source: { referenceIndex: 0, box: [0.1, 0.1, 0.5, 0.5], expectedReferenceId: `sha256:${'a'.repeat(64)}` }, + }); + boundOwner.data.params.layout_conditioning.value = boundLayout; + const supplier = { + id: 'synthetic-reference-supplier', + type: 'custom', + position: { x: 0, y: 0 }, + data: { + module: 'Synthetic', + action: 'Reference', + label: 'Synthetic reference', + params: { + pipeline: { type: 'diffusers_modular_pipeline_components', display: 'input' }, + reference_binding: { type: 'reference_conditioning', display: 'output' }, + layout_reference_summary: { type: 'string', display: 'output' }, + }, + }, + }; + boundGraph.nodes.push(supplier); + if (fault === 'wired-layout') { + boundOwner.data.params.layout_conditioning.isInput = true; + supplier.data.params.layout = { type: 'layout_conditioning', display: 'output' }; + boundGraph.edges.push({ + id: 'synthetic-layout-wire', + source: supplier.id, + sourceHandle: 'layout', + target: boundOwner.id, + targetHandle: 'layout_conditioning', + }); + } + boundGraph.edges.push({ + id: 'synthetic-reference-owner', + source: model.id, + sourceHandle: 'pipeline_components', + target: supplier.id, + targetHandle: 'pipeline', + }); + if (fault !== 'missing-context') + boundGraph.edges.push({ + id: 'synthetic-reference-binding', + source: supplier.id, + sourceHandle: 'reference_binding', + target: boundOwner.id, + targetHandle: 'reference_binding', + }); + const boundBefore = structuredClone(boundGraph); + const boundPlan = planOperationChange(boundGraph, model.id, boundStarter, { + replaceModel: true, + ...(fault === 'missing-resolver' ? {} : { layoutReferenceContext }), + }); + const planned = boundPlan.graph.nodes.find((node) => node.id === boundOwner.id); + assert.deepEqual(boundGraph, boundBefore); + if (fault === 'none') { + assert.deepEqual( + planned.data.params.layout_conditioning.value, + boundLayout, + 'Changing only the current profile preserves an otherwise exact bound context.', + ); + assert.deepEqual( + boundPlan.graph.nodes.find((node) => node.id === supplier.id), + supplier, + ); + } else { + assert.equal( + planned.data.params.layout_conditioning.value ?? planned.data.params.layout_conditioning.default, + null, + fault, + ); + assert.ok( + planned.data.operationAuthoring.retained.some( + (row) => row.field === 'layout_conditioning' && canonical(row.value) === canonical(boundLayout), + ), + fault, + ); + assert.equal(boundPlan.review.required, true, fault); + } + } + flow.getState().replaceGraph(plan.graph); + const enabled = await preview.enablePromptEnhancement(rebound.id); + assert.equal(enabled.id, freshChild.id); + assert.equal(submitted, null); +}); + +test('unavailable Disable refuses cancellation, a replaced document and concurrent graph edits', async () => { + for (const fault of ['abort', 'document', 'graph']) { + onMetadata = null; + const { ownerId } = await setup(); + await preview.enablePromptEnhancement(ownerId); + flow.getState().resetHistory(); + const controller = new AbortController(); + let afterInterruption; + onMetadata = () => { + if (fault === 'abort') controller.abort(new Error('Cancelled Disable.')); + if (fault === 'document') studio.setState({ workflowCanvasEpoch: studio.getState().workflowCanvasEpoch + 1 }); + if (fault === 'graph') editOwnerField(ownerId, 'prompt', 'Concurrent user edit.'); + afterInterruption = structuredClone(flow.getState().toObject()); + throw new Error('Retired enhancement declaration.'); + }; + await assert.rejects( + preview.disablePromptEnhancement(ownerId, child.id, controller.signal), + /cancel|changed|document|context/i, + ); + assert.deepEqual(flow.getState().toObject(), afterInterruption); + assert.equal(flow.getState().historyPast.length, 0); + assert.ok(activeOwner(ownerId).data.operationAuthoring.ancillaryBindings); + assert.equal(submitted, null); + } +}); + +async function setup() { + const { createTemplateOperationGraph } = await server.ssrLoadModule('/src/studio/templateOperationWorkflow.ts'); + const { DEFAULT_STUDIO_FORM } = await server.ssrLoadModule('/src/studio/modelProfiles.ts'); + const spec = fixture.baseSpec; + const form = { + ...DEFAULT_STUDIO_FORM, + modelType: spec.modelType, + mode: spec.mode, + resourceMode: 'expert', + device: 'cpu', + offloadMode: 'none', + autoOffload: false, + prompt: ' Authored unit prompt.\n', + width: 1024, + height: 1024, + steps: fixture.capability.recommendedSteps, + seed: 4201, + randomSeed: false, + maxSequenceLength: 8192, + }; + const graph = createTemplateOperationGraph( + { + id: 'unit-preview', + label: 'Unit fixture only', + modelType: spec.modelType, + mode: spec.mode, + executionSelection: { ...fixture.selection, bindingSpec: { modelType: spec.modelType, mode: spec.mode } }, + }, + form, + structuredClone(fixture.response), + structuredClone(fixture.registry), + spec, + fixture.capability, + ); + studio.setState({ form }); + flow.getState().replaceGraph(graph); + flow.getState().resetHistory(); + const root = graph.nodes.find((node) => + node.data.blockInstanceV2?.effectiveGraph.nodes.some((leaf) => leaf.data.studioRole === child.bindings.owner.role), + ); + const leaf = root.data.blockInstanceV2.effectiveGraph.nodes.find( + (leaf) => leaf.data.studioRole === child.bindings.owner.role, + ); + return { ownerId: runtime.blockProjectionNodeIdV2(root.id, leaf.nodeId), graph }; +} +function activeOwner(ownerId) { + return preview.promptEnhancementOwner(ownerId).owner; +} +function editOwnerField(ownerId, field, value) { + const graph = flow.getState().toObject(); + const root = graph.nodes.find((node) => + node.data.blockInstanceV2?.effectiveGraph.nodes.some( + (leaf) => runtime.blockProjectionNodeIdV2(node.id, leaf.nodeId) === ownerId, + ), + ); + const leaf = root.data.blockInstanceV2.effectiveGraph.nodes.find( + (leaf) => runtime.blockProjectionNodeIdV2(root.id, leaf.nodeId) === ownerId, + ); + const control = root.data.blockInstanceV2.effectiveInterface.controls.find( + (control) => control.binding.nodeId === leaf.nodeId && control.binding.fieldId === field, + ); + assert.ok(control, 'The actual public Block control must exist.'); + const changed = runtime.createBlockRootNodeV2( + runtime.setBlockInstanceValueV2(root.data.blockInstanceV2, control.controlId, value), + ); + flow.getState().replaceGraph({ ...graph, nodes: graph.nodes.map((node) => (node.id === root.id ? changed : node)) }); +} + +function syntheticEnvelope(run, warm = false, nativeText = 'Synthetic appended wording.') { + const binding = submitted.runtimeHints.executionPurpose.bindings[0], + verification = child.verification; + const input = (role, field) => submitted.nodes[binding.roleNodes[role]].params[field].value; + const mapped = verification.runtimeInputs, + request = verification.requestInputs, + hints = submitted.runtimeHints; + const controls = { + max_new_tokens: input(request.role, request.maxNewTokensField), + min_new_tokens: input(request.role, request.minNewTokensField), + return_dict_in_generate: false, + ...Object.fromEntries( + ['do_sample', 'num_beams', 'repetition_penalty', 'use_chat_template'].map((field) => [ + field, + input(request.role, field), + ]), + ), + }; + const receipt = { + ...structuredClone(verification.modelReceipt), + runtime: { + ...verification.modelReceipt.runtime, + dtype: input(mapped.role, mapped.dtypeField), + device: input(mapped.role, mapped.deviceField), + quantization: verification.quantizationRecipes.find( + (recipe) => recipe.mode === input(mapped.role, mapped.quantizationField), + ), + }, + }; + const sorted = (value) => + Array.isArray(value) + ? value.map(sorted) + : value && typeof value === 'object' + ? Object.fromEntries( + Object.keys(value) + .sort() + .map((key) => [key, sorted(value[key])]), + ) + : value; + receipt.receiptDigest = sha(JSON.stringify(sorted(receipt))); // This closed fixture is entirely ASCII. + const producer = { + taskId: warm ? 'synthetic-preview-A' : run.taskId, + attemptIndex: 0, + node: { id: run.target.nodeId, module: 'modules.HuggingFaceTransformers', action: 'GenerateImageVideoText' }, + sid: submitted.sid, + workerInstance: worker.instance, + backendSourceFingerprint: worker.backend_source.fingerprint, + graphHash: `sha256:workflow-auto-v1:${'b'.repeat(64)}`, + recipe: null, + uiContext: { + clientRunId: warm ? 'original-client-run-A' : hints.clientRunId, + runInputHash: hints.runInputHash, + workflowTabId: hints.workflowTabId, + workflowCanvasEpoch: warm ? 0 : hints.workflowCanvasEpoch, + workflowFormEpoch: null, + }, + }; + const prompt = input(child.bindings.request.role, child.bindings.request.promptField), + rendered = `Synthetic rendered ${prompt}`; + const authoredLayout = input(child.bindings.request.role, child.bindings.request.layoutField); + const append = child.layoutPolicy === 'append-details-preserve-layout-v1'; + const mode = authoredLayout?.regions.length && !append ? 't2i_bbox' : 't2i'; + const consumed = { + schemaVersion: 1, + renderedPrompt: rendered, + references: [], + processedImageGrid: [], + fingerprints: { + operation: input(request.role, request.operationField), + enhancement_max_new_tokens: controls.max_new_tokens, + prompt_adapter_id: verification.adapter.id, + system_prompt_mode: mode, + system_prompt_sha256: verification.systemPromptSha256ByMode[mode], + rendered_prompt_sha256: sha(rendered), + rendered_prompt_utf8_bytes: Buffer.byteLength(rendered), + rendered_input_ids_sha256: sha('synthetic input token IDs'), + reference_source_sha256: [], + }, + }; + const summary = { + schemaVersion: 1, + kind: 'prompt-enhancement-proposal', + producer, + adapter: verification.adapter, + request: { + authoredPromptSha256: sha(prompt), + authoredLayoutKind: authoredLayout === null ? 'none' : 'object', + authoredLayoutSha256: authoredLayout === null ? null : sha(canonical({ kind: 'object', value: authoredLayout })), + controls, + consumedInputSha256: sha(canonical(consumed)), + }, + modelReceipt: receipt, + consumedInput: consumed, + proposal: { + mode, + text: mode === 't2i' && !append ? 'Synthetic independently reviewed proposal.' : null, + structuredProposal: append + ? { + schemaVersion: 3, + kind: 'caption-append-preserve-layout-v1', + caption: prompt + '\n\n' + nativeText, + layoutConditioning: structuredClone(authoredLayout), + nativeText, + } + : mode === 't2i' + ? null + : { + schemaVersion: 2, + caption: authoredLayout.regions.map((region) => `Enhanced <${region.id}>.`).join(' '), + rawCaption: authoredLayout.regions.map((_region, index) => `Enhanced .`).join(' '), + layoutConditioning: { + ...structuredClone(authoredLayout), + regions: authoredLayout.regions.map((region) => ({ + ...structuredClone(region), + description: 'Enhanced description.', + })), + }, + rawTable: authoredLayout.regions.map((region, index) => ({ + id: `native_${index}`, + bbox: [region.targetBox[1], region.targetBox[0], region.targetBox[3], region.targetBox[2]].map( + (value) => value * 1000, + ), + desc: 'Enhanced description.', + })), + }, + finishReason: 'stop', + inputTokens: 7, + generatedTokens: 3, + applyRequired: true, + applicationAllowed: true, + layoutOutputValidated: mode === 't2i' && !append ? null : true, + semanticFidelityVerified: false, + applicationBlockedReason: null, + }, + }; + const { recipe: _recipe, ...dispatch } = { + ...producer, + taskId: run.taskId, + uiContext: { + ...producer.uiContext, + clientRunId: hints.clientRunId, + workflowCanvasEpoch: hints.workflowCanvasEpoch, + }, + }; + const { consumedInputSha256: _consumedHash, ...observedRequest } = summary.request; + const value = JSON.stringify(summary); + const envelope = { + value, + observation: { + schemaVersion: 1, + summarySha256: sha(value), + producer, + dispatch: { ...dispatch, status: warm ? 'cached' : 'succeeded' }, + request: observedRequest, + consumedInput: { schemaVersion: 1, references: [], processedImageGrid: [], fingerprints: consumed.fingerprints }, + }, + }; + for (const actor of [producer, envelope.observation.dispatch]) + taskReplies.set(actor.taskId, { + task_id: actor.taskId, + status: 'completed', + attempt_index: actor.attemptIndex, + sid: actor.sid, + client_run_id: actor.uiContext.clientRunId, + run_input_hash: actor.uiContext.runInputHash, + workflow_tab_id: actor.uiContext.workflowTabId, + workflow_canvas_epoch: actor.uiContext.workflowCanvasEpoch, + workflow_form_epoch: actor.uiContext.workflowFormEpoch, + }); + cacheBody = JSON.stringify(envelope); + return envelope; +} + +test('actual metadata remains private; Enable and atomic Apply use normal Undo/Redo and JSON save/reload', async () => { + assert.equal(fixture.capability.autoEligible, false); + assert.equal(fixture.capability.templateEligible, false); + const { ownerId } = await setup(), + before = structuredClone(flow.getState().toObject()); + await preview.enablePromptEnhancement(ownerId); + assert.equal(flow.getState().nodes.length, 4); + assert.equal(flow.getState().historyPast.length, 1); + flow.getState().undo(); + assert.deepEqual(flow.getState().toObject(), before); + flow.getState().redo(); + assert.ok(activeOwner(ownerId).data.operationAuthoring.ancillaryBindings); + const enabled = JSON.parse(JSON.stringify(flow.getState().toObject())); + flow.getState().replaceGraph(enabled); + flow.getState().resetHistory(); + const pair = { prompt: activeOwner(ownerId).data.params.prompt.value, layout: null }; + const next = await authoring.planApplyPromptEnhancement( + enabled, + ownerId, + parent, + child.id, + { prompt: 'Reviewed unit proposal.', layout: null }, + await authoring.promptEnhancementPairHash(pair), + ); + transaction.commitOperationGraph( + next, + (await server.ssrLoadModule('/src/stores/useStudioStore.ts')).captureWorkflowOperationContext(), + transaction.operationGraphSignature(enabled), + 'Unit Apply', + ); + assert.equal(activeOwner(ownerId).data.params.prompt.value, 'Reviewed unit proposal.'); + assert.equal(flow.getState().historyPast.length, 1); + flow.getState().undo(); + assert.equal(activeOwner(ownerId).data.params.prompt.value, pair.prompt); + flow.getState().redo(); + await preview.disablePromptEnhancement(ownerId, child.id); + assert.equal(activeOwner(ownerId).data.params.prompt.value, pair.prompt); + assert.equal(flow.getState().nodes.length, 4); +}); + +test('declared structured Preview reaches paired Apply and one Undo without changing authored geometry', async () => { + const saved = structuredClone(parent); + const originalSelectionId = fixture.selection.authoringRecipeId; + try { + const { hashString, stableStringify } = await server.ssrLoadModule('/src/studio/stableHash.ts'); + child.layoutPolicy = 'preserve-authored-v1'; + parent.id = parent.id.replace(/:v1$/u, ':v2'); + child.id = `${parent.id}:preview`; + child.parent.authoringRecipeId = parent.id; + fixture.selection.authoringRecipeId = parent.id; + child.verification.supportedPromptModes = ['t2i', 'i2i', 't2i_bbox', 'i2i_bbox']; + child.verification.layoutRequestSuffixSha256 = sha('synthetic declared preservation suffix'); + const { contentHash: _childHash, ...childBody } = child; + child.contentHash = `studio-ancillary-v1-${hashString(stableStringify(childBody))}`; + const { contentHash: _parentHash, ...parentBody } = parent; + parent.contentHash = `studio-authoring-v1-${hashString(stableStringify(parentBody))}`; + const { ownerId } = await setup(); + const layout = { + schemaVersion: 2, + coordinateSpace: 'normalized_xyxy', + regions: [ + { + id: 'authored_object', + description: 'Original description.', + action: 'place', + targetBox: [0.1, 0.2, 0.4, 0.7], + }, + ], + }; + editOwnerField(ownerId, 'prompt', 'A scene with .'); + editOwnerField(ownerId, 'layout_conditioning', layout); + await preview.enablePromptEnhancement(ownerId); + const run = await preview.startPromptEnhancementPreview(ownerId, child.id); + syntheticEnvelope(run); + const proposal = await preview.finishPromptEnhancementPreview(run); + assert.equal(preview.promptEnhancementPreviewDetails(proposal).proposal.structuredProposal.schemaVersion, 2); + const before = structuredClone(flow.getState().toObject()); + flow.getState().resetHistory(); + await preview.applyPromptEnhancementPreview(proposal); + assert.equal(activeOwner(ownerId).data.params.prompt.value, 'Enhanced .'); + assert.deepEqual( + activeOwner(ownerId).data.params.layout_conditioning.value.regions[0].targetBox, + layout.regions[0].targetBox, + ); + assert.equal(flow.getState().historyPast.length, 1); + flow.getState().undo(); + assert.deepEqual(flow.getState().toObject(), before); + } finally { + fixture.selection.authoringRecipeId = originalSelectionId; + for (const key of Object.keys(child)) delete child[key]; + Object.assign(child, saved.ancillaryOperations[0]); + for (const key of Object.keys(parent)) if (key !== 'ancillaryOperations') delete parent[key]; + Object.assign(parent, { ...saved, ancillaryOperations: [child] }); + } +}); + +test('declared append-details Preview keeps the full layout and Regenerate never appends its own previous output', async () => { + const saved = structuredClone(parent), + originalSelectionId = fixture.selection.authoringRecipeId; + const operationField = fixture.registry['modules.HuggingFaceTransformers.GenerateImageVideoText'].params.operation; + const options = structuredClone(operationField.options); + try { + const { hashString, stableStringify } = await server.ssrLoadModule('/src/studio/stableHash.ts'); + // Synthetic additive protocol variant. Real producer/native coverage is separate. + child.layoutPolicy = 'append-details-preserve-layout-v1'; + parent.id = parent.id.replace(/:v1$/u, ':v3'); + child.id = `${parent.id}:preview`; + child.parent.authoringRecipeId = parent.id; + fixture.selection.authoringRecipeId = parent.id; + child.initialValues.find( + ([role, field]) => + role === child.verification.requestInputs.role && field === child.verification.requestInputs.operationField, + )[2] = 'enhance_prompt_append_details'; + child.verification.supportedPromptModes = ['t2i', 'i2i']; + child.verification.layoutRequestSuffixSha256 = sha('synthetic declared append request'); + operationField.options.push({ + ...operationField.options.find((option) => option.value === 'enhance_prompt'), + value: 'enhance_prompt_append_details', + label: 'enhance_prompt_append_details', + }); + const { contentHash: _childHash, ...childBody } = child; + child.contentHash = `studio-ancillary-v1-${hashString(stableStringify(childBody))}`; + const { contentHash: _parentHash, ...parentBody } = parent; + parent.contentHash = `studio-authoring-v1-${hashString(stableStringify(parentBody))}`; + const { ownerId } = await setup(); + const layout = { + schemaVersion: 2, + coordinateSpace: 'normalized_xyxy', + regions: [ + { + id: 'authored_object', + description: ' Original description.\n', + action: 'place', + targetBox: [0.10001, 0.2, 0.4, 0.7], + }, + ], + }; + const prompt = ' A scene with .\n'; + editOwnerField(ownerId, 'prompt', prompt); + editOwnerField(ownerId, 'layout_conditioning', layout); + await preview.enablePromptEnhancement(ownerId); + const first = await preview.startPromptEnhancementPreview(ownerId, child.id); + const firstEnvelope = syntheticEnvelope(first, false, 'First proposed wording.'); + const firstTicket = await preview.finishPromptEnhancementPreview(first); + const before = structuredClone(flow.getState().toObject()); + const originalPairHash = await authoring.promptEnhancementPairHash({ prompt, layout }); + await assert.rejects( + authoring.planApplyPromptEnhancement( + before, + ownerId, + parent, + child.id, + { prompt: 'Replacement caption .', layout }, + originalPairHash, + ), + /caption prefix/, + ); + const changedLayout = structuredClone(layout); + changedLayout.regions[0].description = 'Changed description'; + await assert.rejects( + authoring.planApplyPromptEnhancement( + before, + ownerId, + parent, + child.id, + { prompt: prompt + '\n\nProposed wording.', layout: changedLayout }, + originalPairHash, + ), + /any authored layout field/, + ); + assert.deepEqual(flow.getState().toObject(), before); + flow.getState().resetHistory(); + await preview.applyPromptEnhancementPreview(firstTicket); + assert.equal(activeOwner(ownerId).data.params.prompt.value, prompt + '\n\nFirst proposed wording.'); + assert.deepEqual(activeOwner(ownerId).data.params.layout_conditioning.value, layout); + assert.equal(flow.getState().historyPast.length, 1); + flow.getState().undo(); + assert.deepEqual(flow.getState().toObject(), before); + flow.getState().redo(); + submissionId = 'synthetic-preview-C'; + const second = await preview.startPromptEnhancementPreview(ownerId, child.id, true); + assert.notEqual(second.taskId, first.taskId); + const binding = submitted.runtimeHints.executionPurpose.bindings[0]; + const request = submitted.nodes[binding.roleNodes[child.bindings.request.role]]; + assert.equal(request.params.prompt.value, prompt, 'Regenerate submits the untouched original caption.'); + assert.deepEqual(request.params.layout_conditioning.value, layout); + assert.ok(calls.includes('/cache'), 'Regenerate uses normal explicit recomputation.'); + syntheticEnvelope(second, false, 'Second proposed wording.'); + const secondTicket = await preview.finishPromptEnhancementPreview(second); + assert.notEqual( + JSON.parse(firstEnvelope.value).producer.taskId, + preview.promptEnhancementPreviewDetails(secondTicket).producer.taskId, + ); + flow.getState().resetHistory(); + await preview.applyPromptEnhancementPreview(secondTicket); + assert.equal(activeOwner(ownerId).data.params.prompt.value, prompt + '\n\nSecond proposed wording.'); + assert.doesNotMatch(activeOwner(ownerId).data.params.prompt.value, /First proposed wording/); + assert.deepEqual(activeOwner(ownerId).data.params.layout_conditioning.value, layout); + assert.equal(flow.getState().historyPast.length, 1); + flow.getState().undo(); + assert.equal(activeOwner(ownerId).data.params.prompt.value, prompt); + assert.deepEqual(activeOwner(ownerId).data.params.layout_conditioning.value, layout); + } finally { + operationField.options = options; + fixture.selection.authoringRecipeId = originalSelectionId; + for (const key of Object.keys(child)) delete child[key]; + Object.assign(child, saved.ancillaryOperations[0]); + for (const key of Object.keys(parent)) if (key !== 'ancillaryOperations') delete parent[key]; + Object.assign(parent, { ...saved, ancillaryOperations: [child] }); + } +}); + +test('normal unavailable metadata and concurrent document/session/task changes refuse before mutation or dispatch', async (t) => { + for (const failure of ['unavailable', 'document', 'session', 'task']) + await t.test(failure, async () => { + const { ownerId } = await setup(); + if (failure === 'unavailable') { + const saved = globalThis.fetch; + globalThis.fetch = async (url, init) => + new URL(String(url)).pathname === '/operations/starter' + ? new Response(JSON.stringify({ error: true, message: 'Private profile unavailable' }), { status: 400 }) + : saved(url, init); + } else { + await preview.enablePromptEnhancement(ownerId); + onRuntime = () => { + if (failure === 'document') + studio.setState({ workflowCanvasEpoch: studio.getState().workflowCanvasEpoch + 1 }); + if (failure === 'session') socket.setState({ sid: 'replacement-session' }); + if (failure === 'task') + tasks.setState({ currentTask: { name: 'Another owned run', task_id: 'another', status: 'running' } }); + }; + } + const before = structuredClone(flow.getState().toObject()), + history = flow.getState().historyPast.length; + await assert.rejects( + failure === 'unavailable' + ? preview.enablePromptEnhancement(ownerId) + : preview.startPromptEnhancementPreview(ownerId, child.id), + /private|unavailable|changed|wait|workflow/i, + ); + assert.deepEqual(flow.getState().toObject(), before); + assert.equal(flow.getState().historyPast.length, history); + assert.equal(calls.includes('/graph'), false); + onRuntime = null; + socket.setState({ sid: 'unit-preview-sid' }); + tasks.setState({ currentTask: undefined }); + }); +}); + +test('current plain-only declaration refuses every authored layout object before preparation and keeps raw values', async () => { + const { ownerId } = await setup(); + for (const layout of [ + {}, + { schemaVersion: 2, coordinateSpace: 'normalized_xyxy', regions: [] }, + { + schemaVersion: 2, + coordinateSpace: 'normalized_xyxy', + regions: [{ id: 'one', action: 'place', description: 'An object', targetBox: [0, 0, 1, 1] }], + }, + ]) { + editOwnerField(ownerId, 'layout_conditioning', layout); + assert.deepEqual(activeOwner(ownerId).data.params.layout_conditioning.value, layout); + const before = structuredClone(flow.getState().toObject()); + await assert.rejects(preview.enablePromptEnhancement(ownerId), /layout|schema|regions|invalid/i); + assert.deepEqual(flow.getState().toObject(), before); + assert.equal(calls.includes('/graph'), false); + } +}); + +test('normal Enable selects only the declared raw alternative for null layout and returns to append for authored regions', async () => { + const saved = structuredClone(parent), + originalSelectionId = fixture.selection.authoringRecipeId; + const operationField = fixture.registry['modules.HuggingFaceTransformers.GenerateImageVideoText'].params.operation; + const options = structuredClone(operationField.options); + const rawResponse = structuredClone(fixture.response); + const { hashString, stableStringify } = await server.ssrLoadModule('/src/studio/stableHash.ts'); + try { + // Synthetic paired DTOs exercise generic selection; this is not model evidence. + parent.id = parent.id.replace(/:v1$/u, ':v3'); + child.id = `${parent.id}:preview`; + child.parent.authoringRecipeId = parent.id; + child.layoutPolicy = 'append-details-preserve-layout-v1'; + child.initialValues.find( + ([role, field]) => + role === child.verification.requestInputs.role && field === child.verification.requestInputs.operationField, + )[2] = 'enhance_prompt_append_details'; + child.verification.layoutRequestSuffixSha256 = sha('synthetic declared append request'); + child.contentHash = `studio-ancillary-v1-${hashString(stableStringify(Object.fromEntries(Object.entries(child).filter(([key]) => key !== 'contentHash'))))}`; + parent.contentHash = `studio-authoring-v1-${hashString(stableStringify(Object.fromEntries(Object.entries(parent).filter(([key]) => key !== 'contentHash'))))}`; + fixture.selection.authoringRecipeId = parent.id; + operationField.options.push({ + ...options.find((option) => option.value === 'enhance_prompt'), + value: 'enhance_prompt_append_details', + label: 'enhance_prompt_append_details', + }); + const { ownerId } = await setup(); + const descriptor = { + profileId: fixture.selection.executionProfileId, + pipeline: fixture.response.pipelineClass, + label: 'Synthetic paired model', + repo: child.verification.modelReceipt.source.repository, + evaluationOnly: true, + authoringRecipes: { [fixture.response.task]: parent.id }, + rawPromptAuthoringRecipes: { [fixture.response.task]: rawResponse.authoring.id }, + }; + registry.setState({ + nodesRegistry: structuredClone(fixture.registry), + workflowModelDescriptors: [structuredClone(descriptor)], + }); + const selections = []; + onMetadata = (selection) => { + selections.push(selection.authoringRecipeId); + return selection.authoringRecipeId === rawResponse.authoring.id ? rawResponse : fixture.response; + }; + for (const layout of [{}, { schemaVersion: 2, coordinateSpace: 'normalized_xyxy', regions: [] }]) { + editOwnerField(ownerId, 'layout_conditioning', layout); + const before = structuredClone(flow.getState().toObject()); + await assert.rejects(preview.enablePromptEnhancement(ownerId), /layout|regions|invalid/i); + assert.deepEqual(flow.getState().toObject(), before); + assert.equal(calls.includes('/graph'), false); + } + editOwnerField(ownerId, 'layout_conditioning', null); + flow.getState().resetHistory(); + const beforeEnable = structuredClone(flow.getState().toObject()); + onMetadata = (selection) => { + if (selection.authoringRecipeId === rawResponse.authoring.id) + registry.setState({ workflowModelDescriptors: [{ ...descriptor, rawPromptAuthoringRecipes: {} }] }); + return selection.authoringRecipeId === rawResponse.authoring.id ? rawResponse : fixture.response; + }; + await assert.rejects(preview.enablePromptEnhancement(ownerId), /metadata changed/); + assert.deepEqual(flow.getState().toObject(), beforeEnable); + assert.equal(flow.getState().historyPast.length, 0); + registry.setState({ workflowModelDescriptors: [structuredClone(descriptor)] }); + onMetadata = (selection) => { + selections.push(selection.authoringRecipeId); + return selection.authoringRecipeId === rawResponse.authoring.id ? rawResponse : fixture.response; + }; + const enabled = await preview.enablePromptEnhancement(ownerId); + assert.equal(enabled.id, rawResponse.authoring.ancillaryOperations[0].id); + assert.equal(activeOwner(ownerId).data.params.layout_conditioning.value, null); + assert.equal(activeOwner(ownerId).data.params.prompt.value, ' Authored unit prompt.\n'); + assert.equal(flow.getState().historyPast.length, 1, 'Parent selection and Enable are one Undo transaction.'); + assert.equal(calls.includes('/graph'), false, 'Enable does not submit a model task.'); + flow.getState().undo(); + assert.deepEqual(flow.getState().toObject(), beforeEnable); + flow.getState().redo(); + await preview.disablePromptEnhancement(ownerId, enabled.id); + const layout = { + schemaVersion: 2, + coordinateSpace: 'normalized_xyxy', + regions: [{ id: 'subject', description: 'Authored subject', action: 'place', targetBox: [0.1, 0.2, 0.8, 0.9] }], + }; + editOwnerField(ownerId, 'layout_conditioning', layout); + const appended = await preview.enablePromptEnhancement(ownerId); + assert.equal(appended.id, child.id); + assert.deepEqual(activeOwner(ownerId).data.params.layout_conditioning.value, layout); + assert.ok(selections.includes(rawResponse.authoring.id)); + assert.equal(calls.includes('/graph'), false); + } finally { + registry.setState({ workflowModelDescriptors: [] }); + operationField.options = options; + fixture.selection.authoringRecipeId = originalSelectionId; + for (const key of Object.keys(child)) delete child[key]; + Object.assign(child, saved.ancillaryOperations[0]); + for (const key of Object.keys(parent)) if (key !== 'ancillaryOperations') delete parent[key]; + Object.assign(parent, { ...saved, ancillaryOperations: [child] }); + } +}); + +test('an explicit declared raw provider choice preserves NF4 identity across Disable and reload and refuses structured or withdrawn choices', async () => { + const actual = JSON.parse(readFileSync('tests/fixtures/evaluation-prompt-enhancement-alternatives.v1.json', 'utf8')); + const display = JSON.parse(readFileSync('tests/fixtures/evaluation-image-authoring.v1.json', 'utf8')); + const operations = [ + ...new Map( + actual.starters.flatMap((starter) => + starter.nodes.map(({ operation }) => [ + `${operation.pipelineClass}:${operation.task}:${operation.operationId}`, + operation, + ]), + ), + ).values(), + ]; + const { parseEvaluationAuthoring } = await server.ssrLoadModule('/src/workflow/evaluationAuthoring.ts'); + const descriptors = parseEvaluationAuthoring( + { capabilities: display.capabilities, evaluationAuthoring: actual.evaluationAuthoring }, + [], + operations, + ).descriptors; + const offer = actual.evaluationAuthoring.authoringRecipes.find( + (row) => row.task === 'text_to_image' && row.rawAuthoringRecipeChoices, + ); + const nf4 = offer.rawAuthoringRecipeChoices.find((choice) => choice.authoringRecipeId !== offer.rawAuthoringRecipeId); + const source = actual.starters.find((starter) => starter.authoring.id === offer.authoringRecipeId); + const sourceRegistry = { + ...structuredClone(fixture.registry), + ...Object.fromEntries( + actual.starters.flatMap((starter) => starter.nodes.map(({ operation, node }) => [operation.nodeKey, node])), + ), + ...actual.registry, + }; + const { parseOperationStarter } = await server.ssrLoadModule('/src/workflow/operationStarterRequest.ts'); + const { createWorkflowDraft } = await server.ssrLoadModule('/src/workflow/workflowDraft.ts'); + const { expandFlowExecutionGraph } = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + const parsed = parseOperationStarter(source, offer.pipelineClass, offer.task, operations, { + executionProfileId: offer.executionProfileId, + authoringRecipeId: offer.authoringRecipeId, + }); + registry.setState({ + nodesRegistry: sourceRegistry, + operationContracts: operations, + workflowModelDescriptors: descriptors, + }); + flow.getState().replaceGraph(createWorkflowDraft(parsed, sourceRegistry).graph); + const owner = expandFlowExecutionGraph(flow.getState().nodes, flow.getState().edges).nodes.find( + (node) => node.data.operationAuthoring?.ancillaryParent, + ); + const ownerId = owner.id; + onMetadata = (selection) => { + const selected = actual.starters.find((starter) => starter.authoring.id === selection.authoringRecipeId); + assert.ok(selected, 'Only the captured current declaration may answer metadata.'); + return selected; + }; + try { + const declared = await preview.enablePromptEnhancement(ownerId, undefined, undefined, nf4.authoringRecipeId); + assert.equal(declared.parent.authoringRecipeId, nf4.authoringRecipeId); + const binding = activeOwner(ownerId).data.operationAuthoring.ancillaryBindings[0]; + const native = expandFlowExecutionGraph(flow.getState().nodes, flow.getState().edges); + const provider = native.nodes.find( + (node) => node.id === binding.roleNodes[declared.verification.runtimeInputs.role], + ); + for (const [name, expected] of [ + [declared.verification.runtimeInputs.dtypeField, 'bfloat16'], + [declared.verification.runtimeInputs.quantizationField, 'bnb_4bit'], + ]) + assert.equal(provider.data.params[name].value ?? provider.data.params[name].default, expected); + await preview.disablePromptEnhancement(ownerId, declared.id); + flow.getState().replaceGraph(JSON.parse(JSON.stringify(flow.getState().toObject()))); + const restored = await preview.enablePromptEnhancement(ownerId); + assert.equal(restored.id, declared.id, 'The exact existing raw parent preserves the explicit choice after reload.'); + await preview.disablePromptEnhancement(ownerId, restored.id); + const layout = { + schemaVersion: 2, + coordinateSpace: 'normalized_xyxy', + regions: [{ id: 'subject', description: 'Original subject', action: 'place', targetBox: [0, 0, 1, 1] }], + }; + editOwnerField(ownerId, 'layout_conditioning', layout); + const before = structuredClone(flow.getState().toObject()); + await assert.rejects( + preview.enablePromptEnhancement(ownerId, undefined, undefined, nf4.authoringRecipeId), + /requires Raw prompt mode/, + ); + assert.deepEqual(flow.getState().toObject(), before); + const changed = structuredClone(descriptors); + changed.find((row) => row.profileId === offer.executionProfileId).rawPromptAuthoringChoices[offer.task] = [ + { authoringRecipeId: offer.rawAuthoringRecipeId, label: 'Raw wording: FP32' }, + ]; + registry.setState({ workflowModelDescriptors: changed }); + await assert.rejects( + preview.enablePromptEnhancement(ownerId, undefined, undefined, nf4.authoringRecipeId), + /no longer declared/, + ); + assert.deepEqual(flow.getState().toObject(), before); + assert.equal(calls.includes('/graph'), false); + } finally { + registry.setState({ workflowModelDescriptors: [] }); + } +}); + +test('explicit authored-layout selection preserves its identity and refuses null, stale or conflicting choices atomically', async () => { + const actual = JSON.parse(readFileSync('tests/fixtures/evaluation-prompt-enhancement-alternatives.v1.json', 'utf8')); + const display = JSON.parse(readFileSync('tests/fixtures/evaluation-image-authoring.v1.json', 'utf8')); + const operations = [ + ...new Map( + actual.starters.flatMap((starter) => + starter.nodes.map(({ operation }) => [ + `${operation.pipelineClass}:${operation.task}:${operation.operationId}`, + operation, + ]), + ), + ).values(), + ]; + const { parseEvaluationAuthoring } = await server.ssrLoadModule('/src/workflow/evaluationAuthoring.ts'); + const descriptors = parseEvaluationAuthoring( + { capabilities: display.capabilities, evaluationAuthoring: actual.evaluationAuthoring }, + [], + operations, + ).descriptors; + const offer = actual.evaluationAuthoring.authoringRecipes.find((row) => row.task === 'text_to_image'); + const source = actual.starters.find((starter) => starter.authoring.id === offer.authoringRecipeId); + // A synthetic NF4 alternative retains captured append semantics: this covers + // selection/persistence, not native precision, fit or generated model output. + const alternative = structuredClone(source); + alternative.authoring.id = 'synthetic:append-nf4:v1'; + const alternateChild = alternative.authoring.ancillaryOperations[0]; + alternateChild.id = `${alternative.authoring.id}:preview`; + alternateChild.parent.authoringRecipeId = alternative.authoring.id; + for (const [field, value] of [ + ['dtype', 'bfloat16'], + ['quantization_mode', 'bnb_4bit'], + ]) { + alternateChild.initialValues.find(([role, name]) => role === 'provider' && name === field)[2] = value; + } + const { hashString, stableStringify } = await server.ssrLoadModule('/src/studio/stableHash.ts'); + const rehash = (item, prefix) => + `${prefix}${hashString(stableStringify(Object.fromEntries(Object.entries(item).filter(([key]) => key !== 'contentHash'))))}`; + alternateChild.contentHash = rehash(alternateChild, 'studio-ancillary-v1-'); + alternative.authoring.contentHash = rehash(alternative.authoring, 'studio-authoring-v1-'); + const descriptor = descriptors.find((row) => row.profileId === offer.executionProfileId); + descriptor.layoutPromptAuthoringChoices = { + [offer.task]: [ + { authoringRecipeId: offer.authoringRecipeId, label: 'Append wording' }, + { authoringRecipeId: alternative.authoring.id, label: 'Append wording: BF16 + NF4, preserve authored layout' }, + ], + }; + const sourceRegistry = { + ...structuredClone(fixture.registry), + ...Object.fromEntries( + actual.starters.flatMap((starter) => starter.nodes.map(({ operation, node }) => [operation.nodeKey, node])), + ), + ...actual.registry, + }; + const { parseOperationStarter } = await server.ssrLoadModule('/src/workflow/operationStarterRequest.ts'); + const { createWorkflowDraft } = await server.ssrLoadModule('/src/workflow/workflowDraft.ts'); + const { expandFlowExecutionGraph } = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + const parsed = parseOperationStarter(source, offer.pipelineClass, offer.task, operations, { + executionProfileId: offer.executionProfileId, + authoringRecipeId: offer.authoringRecipeId, + }); + registry.setState({ + nodesRegistry: sourceRegistry, + operationContracts: operations, + workflowModelDescriptors: descriptors, + }); + flow.getState().replaceGraph(createWorkflowDraft(parsed, sourceRegistry).graph); + const ownerId = expandFlowExecutionGraph(flow.getState().nodes, flow.getState().edges).nodes.find( + (node) => node.data.operationAuthoring?.ancillaryParent, + ).id; + onMetadata = (selection) => + selection.authoringRecipeId === alternative.authoring.id + ? alternative + : actual.starters.find((starter) => starter.authoring.id === selection.authoringRecipeId); + const layout = { + schemaVersion: 2, + coordinateSpace: 'normalized_xyxy', + regions: [{ id: 'subject', description: 'Authored subject', action: 'place', targetBox: [0.1, 0.2, 0.8, 0.9] }], + }; + editOwnerField(ownerId, 'layout_conditioning', layout); + flow.getState().resetHistory(); + const before = structuredClone(flow.getState().toObject()); + const declared = await preview.enablePromptEnhancement( + ownerId, + undefined, + undefined, + undefined, + alternative.authoring.id, + ); + assert.equal(declared.parent.authoringRecipeId, alternative.authoring.id); + assert.equal(declared.layoutPolicy, 'append-details-preserve-layout-v1'); + const providerId = activeOwner(ownerId).data.operationAuthoring.ancillaryBindings[0].roleNodes.provider; + const provider = expandFlowExecutionGraph(flow.getState().nodes, flow.getState().edges).nodes.find( + (node) => node.id === providerId, + ); + assert.equal(provider.data.params.dtype.value, 'bfloat16'); + assert.equal(provider.data.params.quantization_mode.value, 'bnb_4bit'); + assert.deepEqual(activeOwner(ownerId).data.params.layout_conditioning.value, layout); + assert.equal(flow.getState().historyPast.length, 1); + flow.getState().undo(); + assert.deepEqual(flow.getState().toObject(), before); + flow.getState().redo(); + await preview.disablePromptEnhancement(ownerId, declared.id); + flow.getState().replaceGraph(JSON.parse(JSON.stringify(flow.getState().toObject()))); + const restored = await preview.enablePromptEnhancement(ownerId); + assert.equal(restored.id, declared.id, 'A saved explicit layout mode must not silently become append.'); + await preview.disablePromptEnhancement(ownerId, restored.id); + for (const [rawId, layoutId, expected] of [ + [undefined, 'withdrawn:v1', /no longer declared/], + [offer.rawAuthoringRecipeId, alternative.authoring.id, /one.*mode|both/i], + ]) { + const unchanged = structuredClone(flow.getState().toObject()); + await assert.rejects(preview.enablePromptEnhancement(ownerId, undefined, undefined, rawId, layoutId), expected); + assert.deepEqual(flow.getState().toObject(), unchanged); + } + editOwnerField(ownerId, 'layout_conditioning', null); + const noLayout = structuredClone(flow.getState().toObject()); + await assert.rejects( + preview.enablePromptEnhancement(ownerId, undefined, undefined, undefined, alternative.authoring.id), + /authored regions/, + ); + assert.deepEqual(flow.getState().toObject(), noLayout); + assert.equal(calls.includes('/graph'), false); +}); + +test('optional controls render the raw path and disabled actions with existing wrapping tokens', async () => { + const { ownerId } = await setup(); + const previous = socket.getInitialState().isConnected; + const originalGraph = { nodes: flow.getInitialState().nodes, edges: flow.getInitialState().edges }; + Object.assign(flow.getInitialState(), { nodes: flow.getState().nodes, edges: flow.getState().edges }); + socket.getInitialState().isConnected = false; + try { + const markup = renderToStaticMarkup(React.createElement(Component, { ownerId })); + assert.match(markup, /The raw prompt runs directly/); + assert.match(markup, /Enable enhancement/); + assert.match(markup, /disabled/); + assert.match(markup, /min-w-0/); + assert.match(markup, /flex-wrap/); + assert.doesNotMatch(markup, /switch to Custom|release.*owner|canApply/); + } finally { + socket.getInitialState().isConnected = previous; + Object.assign(flow.getInitialState(), originalGraph); + } +}); + +test('Preview dispatch uses the selected ordinary scope and does not change the resource mode', async () => { + const { ownerId } = await setup(); + await preview.enablePromptEnhancement(ownerId); + const run = await preview.startPromptEnhancementPreview(ownerId, child.id); + assert.equal(run.taskId, 'synthetic-preview-B'); + assert.equal(submitted.runtimeHints.executionPurpose.kind, 'explicit_preview'); + assert.equal(submitted.runtimeHints.resourceMode, 'expert'); + assert.equal(studio.getState().form.resourceMode, 'expert'); + const binding = submitted.runtimeHints.executionPurpose.bindings[0]; + assert.deepEqual(Object.keys(submitted.nodes).sort(), Object.values(binding.roleNodes).sort()); + assert.equal(activeOwner(ownerId).data.params.prompt.value, ' Authored unit prompt.\n'); +}); + +test('request refresh keeps the selected inspector mounted through Preview verification and Apply', async () => { + await setup(); + const { unpackVisualOperationGroups } = await server.ssrLoadModule('/src/workflow/visualOperationGroupProjection.ts'); + const graph = unpackVisualOperationGroups(flow.getState().toObject()).graph; + flow.getState().replaceGraph(graph); + const owner = graph.nodes.find( + (node) => node.data.studioRole === child.bindings.owner.role && node.data.operationAuthoring?.ancillaryParent, + ); + assert.ok(owner, 'The declared prompt owner must be present after normal ungrouping.'); + const ownerId = owner.id; + await preview.enablePromptEnhancement(ownerId); + const edited = 'A later authored prompt requires a fresh ancillary request.'; + flow.getState().setParamWithHistory(ownerId, child.bindings.owner.promptField, edited); + await flow.getState().onNodesChange([{ type: 'select', id: ownerId, selected: true }]); + const selectedIds = () => + flow + .getState() + .nodes.filter((node) => node.selected) + .map((node) => node.id); + assert.deepEqual(selectedIds(), [ownerId]); + const binding = activeOwner(ownerId).data.operationAuthoring.ancillaryBindings[0]; + const requestId = binding.roleNodes[child.bindings.request.role]; + assert.notEqual( + flow.getState().nodes.find((node) => node.id === requestId).data.params[child.bindings.request.promptField].value, + edited, + ); + const lostInspector = []; + const unsubscribe = flow.subscribe(() => { + // GraphNodeInputs mounts the selected node's controls only while selected. + if (!selectedIds().includes(ownerId)) lostInspector.push(true); + }); + try { + const run = await preview.startPromptEnhancementPreview(ownerId, child.id); + assert.deepEqual(lostInspector, [], 'Request refresh must not unmount the action before it receives its run.'); + assert.equal(submitted.nodes[requestId].params[child.bindings.request.promptField].value, edited); + assert.ok( + flow + .getState() + .toObject() + .nodes.every((node) => !Object.hasOwn(node, 'selected')), + ); + const envelope = syntheticEnvelope(run); + const ticket = await preview.finishPromptEnhancementPreview(run); + assert.equal(preview.promptEnhancementPreviewDetails(ticket).producer.taskId, run.taskId); + await preview.applyPromptEnhancementPreview(ticket); + assert.equal(activeOwner(ownerId).data.params.prompt.value, JSON.parse(envelope.value).proposal.text); + assert.deepEqual(selectedIds(), [ownerId]); + await preview.disablePromptEnhancement(ownerId, child.id); + assert.deepEqual(selectedIds(), [ownerId]); + await preview.enablePromptEnhancement(ownerId, child.id); + assert.deepEqual(selectedIds(), [ownerId]); + assert.deepEqual(lostInspector, []); + } finally { + unsubscribe(); + } +}); + +test('ordinary graph replacements clear selection unless explicitly preserved', async (t) => { + const { captureWorkflowOperationContext } = await server.ssrLoadModule('/src/stores/useStudioStore.ts'); + for (const preserveSelection of [false, true]) + await t.test(preserveSelection ? 'explicit in-place refresh' : 'ordinary replacement', async () => { + await setup(); + const selectedId = flow.getState().nodes[0].id; + await flow.getState().onNodesChange([{ type: 'select', id: selectedId, selected: true }]); + const before = flow.getState().toObject(); + assert.ok(before.nodes.every((node) => !Object.hasOwn(node, 'selected'))); + transaction.commitOperationGraph( + structuredClone(before), + captureWorkflowOperationContext(), + transaction.operationGraphSignature(before), + 'Replace reviewed graph', + { preserveSelection }, + ); + assert.deepEqual( + flow + .getState() + .nodes.filter((node) => node.selected) + .map((node) => node.id), + preserveSelection ? [selectedId] : [], + ); + }); +}); + +test('an explicit operation selection plan can select a new node or clear the old selection', async (t) => { + const { createNodeFromRegistry } = await server.ssrLoadModule('/src/workflow/nodeFactory.ts'); + const { captureWorkflowOperationContext } = await server.ssrLoadModule('/src/stores/useStudioStore.ts'); + for (const intent of ['new node', 'clear selection']) + await t.test(intent, async () => { + await setup(); + const previousId = flow.getState().nodes[0].id; + await flow.getState().onNodesChange([{ type: 'select', id: previousId, selected: true }]); + const before = flow.getState().toObject(); + const graph = structuredClone(before); + let nextId = null; + if (intent === 'new node') { + const next = createNodeFromRegistry('modules.Image.Preview', fixture.registry, { x: 2100, y: 0 }); + assert.ok(next); + next.selected = true; + nextId = next.id; + graph.nodes.push(next); + } else graph.nodes[0].selected = false; + transaction.commitOperationGraph( + graph, + captureWorkflowOperationContext(), + transaction.operationGraphSignature(before), + 'Explicit selection intent', + { preserveSelection: true }, + ); + assert.deepEqual( + flow + .getState() + .nodes.filter((node) => node.selected) + .map((node) => node.id), + nextId ? [nextId] : [], + ); + }); +}); + +test('a raw unclaimed text-generator graph still requires an ordinary visible output path', async () => { + const { createNodeFromRegistry } = await server.ssrLoadModule('/src/workflow/nodeFactory.ts'); + const provider = createNodeFromRegistry(child.roles[0][1], fixture.registry, { x: 0, y: 0 }); + const proposal = createNodeFromRegistry(child.roles[1][1], fixture.registry, { x: 300, y: 0 }); + flow.getState().replaceGraph({ + nodes: [provider, proposal], + edges: child.edges.map(([a, output, b, input], index) => ({ + id: `raw-${index}`, + source: a === child.roles[0][0] ? provider.id : proposal.id, + sourceHandle: output, + target: b === child.roles[0][0] ? provider.id : proposal.id, + targetHandle: input, + })), + }); + const { collectRunReadinessIssues } = await server.ssrLoadModule('/src/studio/runReadiness.ts'); + assert.ok( + collectRunReadinessIssues({ sid: 'unit-preview-sid', isConnected: true, includeStudio: false }).some( + (issue) => issue.code === 'graph_output_missing', + ), + ); +}); + +test('synthetic fresh and warm observations require task/request/source correlation before an explicit atomic Apply', async (t) => { + for (const warm of [false, true]) + await t.test(warm ? 'original producer A with current cached dispatch B' : 'fresh current producer B', async () => { + const { ownerId } = await setup(); + await preview.enablePromptEnhancement(ownerId); + const run = await preview.startPromptEnhancementPreview(ownerId, child.id), + envelope = syntheticEnvelope(run, warm); + const original = activeOwner(ownerId).data.params.prompt.value; + const ticket = await preview.finishPromptEnhancementPreview(run); + assert.equal( + preview.promptEnhancementPreviewDetails(ticket).producer.taskId, + warm ? 'synthetic-preview-A' : run.taskId, + ); + assert.equal( + activeOwner(ownerId).data.params.prompt.value, + original, + 'Verification alone must not edit authored values.', + ); + await preview.applyPromptEnhancementPreview(ticket); + assert.equal(activeOwner(ownerId).data.params.prompt.value, JSON.parse(envelope.value).proposal.text); + flow.getState().undo(); + assert.equal(activeOwner(ownerId).data.params.prompt.value, original); + await assert.rejects(preview.applyPromptEnhancementPreview(ticket), /new verified Preview/i); + }); +}); + +test('a verified Preview cannot Apply after a worker or backend source rollover, without changing the document', async (t) => { + for (const field of ['worker', 'source']) + await t.test(field, async () => { + const originalRuntime = structuredClone(worker); + try { + const { ownerId } = await setup(); + await preview.enablePromptEnhancement(ownerId); + const run = await preview.startPromptEnhancementPreview(ownerId, child.id); + syntheticEnvelope(run); + const ticket = await preview.finishPromptEnhancementPreview(run); + const before = structuredClone(flow.getState().toObject()); + const history = flow.getState().historyPast.length; + // Only the fresh Apply read observes the rollover; same DTOs/epochs stay unchanged. + onRuntime = () => { + if (field === 'worker') worker.instance = 'replacement-worker'; + else worker.backend_source.fingerprint = `sha256:backend-source-v1:${'d'.repeat(64)}`; + }; + await assert.rejects(preview.applyPromptEnhancementPreview(ticket), /worker or backend source changed/); + assert.deepEqual(flow.getState().toObject(), before); + assert.equal(flow.getState().historyPast.length, history); + } finally { + onRuntime = null; + Object.assign(worker, originalRuntime); + } + }); +}); + +test('normal running and completed node status cannot stale an otherwise unchanged Preview or Apply', async () => { + const { ownerId } = await setup(); + await preview.enablePromptEnhancement(ownerId); + const run = await preview.startPromptEnhancementPreview(ownerId, child.id), + envelope = syntheticEnvelope(run); + const root = flow + .getState() + .nodes.find((node) => + node.data.blockInstanceV2?.effectiveGraph.nodes.some( + (leaf) => runtime.blockProjectionNodeIdV2(node.id, leaf.nodeId) === ownerId, + ), + ); + assert.equal(root.data.uiState, undefined); + const original = activeOwner(ownerId).data.params.prompt.value, + graphSignature = transaction.operationGraphSignature(flow.getState().toObject()); + // The websocket status reducer materializes uiState even when there is no authored UI setting. + flow.getState().setNodeUiState(root.id, { validationSeverity: 'info', validationMessage: 'Running' }); + flow.getState().updateProgress(root.id, -1, { activeTaskId: run.taskId, executionStatus: 'running' }); + flow.getState().setNodeUiState(root.id, { validationSeverity: 'success', validationMessage: 'Completed' }); + flow.getState().updateProgress(root.id, 0, { activeTaskId: run.taskId, executionStatus: 'completed' }); + assert.equal(transaction.operationGraphSignature(flow.getState().toObject()), graphSignature); + const ticket = await preview.finishPromptEnhancementPreview(run); + assert.equal(activeOwner(ownerId).data.params.prompt.value, original); + await preview.applyPromptEnhancementPreview(ticket); + assert.equal(activeOwner(ownerId).data.params.prompt.value, JSON.parse(envelope.value).proposal.text); + flow.getState().undo(); + assert.equal(activeOwner(ownerId).data.params.prompt.value, original); +}); + +test('synthetic observation drift, contradictory cache origin, duplicate JSON and later edits cannot mint or reuse Apply', async (t) => { + for (const fault of [ + 'task', + 'source', + 'graph', + 'request', + 'consumed', + 'digest', + 'duplicate', + 'ui', + 'wire', + 'later-edit', + ]) + await t.test(fault, async () => { + const { ownerId } = await setup(); + await preview.enablePromptEnhancement(ownerId); + const run = await preview.startPromptEnhancementPreview(ownerId, child.id), + envelope = syntheticEnvelope(run, true); + if (fault === 'task') envelope.observation.dispatch.taskId = 'foreign-task'; + if (fault === 'source') envelope.observation.producer.workerInstance = 'replacement-worker'; + if (fault === 'graph') envelope.observation.producer.graphHash = `sha256:workflow-auto-v1:${'c'.repeat(64)}`; + if (fault === 'request') envelope.observation.request.authoredPromptSha256 = sha('other raw prompt'); + if (fault === 'consumed') + envelope.observation.consumedInput.fingerprints.rendered_input_ids_sha256 = sha('other processed tokens'); + if (fault === 'digest') envelope.observation.summarySha256 = sha('different summary bytes'); + cacheBody = JSON.stringify(envelope); + if (fault === 'duplicate') cacheBody = cacheBody.replace('{"value":', '{"value":"discarded","value":'); + if (fault === 'ui') flow.getState().setNodeUiState(flow.getState().nodes[0].id, { disabled: true }); + if (fault === 'wire') { + const graph = flow.getState().toObject(); + assert.ok(graph.edges.length); + flow.getState().replaceGraph({ ...graph, edges: graph.edges.slice(1) }); + } + const before = activeOwner(ownerId).data.params.prompt.value; + if (fault === 'later-edit') { + const ticket = await preview.finishPromptEnhancementPreview(run); + editOwnerField(ownerId, 'prompt', 'Later user edit'); + await assert.rejects(preview.applyPromptEnhancementPreview(ticket), /changed|fresh|workflow/i); + assert.equal(activeOwner(ownerId).data.params.prompt.value, 'Later user edit'); + } else { + await assert.rejects( + preview.finishPromptEnhancementPreview(run), + /changed|Preview|duplicate|observ|producer|task|graph|input/i, + ); + assert.equal(activeOwner(ownerId).data.params.prompt.value, before); + } + }); +}); + +test('metadata reads bound streamed bytes and reject invalid UTF8 before creating a verified ticket', async (t) => { + for (const fault of ['overflow', 'invalid-utf8', 'advertised-overflow', 'advertised-invalid']) + await t.test(fault, async () => { + const { ownerId } = await setup(); + await preview.enablePromptEnhancement(ownerId); + const run = await preview.startPromptEnhancementPreview(ownerId, child.id); + syntheticEnvelope(run); + let cancelled = false; + const limit = (await server.ssrLoadModule('/src/studio/promptEnhancementSummary.ts')) + .MAX_ENHANCEMENT_ENVELOPE_BYTES; + cacheBody = + fault === 'invalid-utf8' + ? new Response(new Uint8Array([0xc3, 0x28])) + : new Response( + new ReadableStream({ + pull(controller) { + controller.enqueue(new Uint8Array(limit + 1)); + }, + cancel() { + cancelled = true; + }, + }), + { + headers: fault.startsWith('advertised') + ? { 'Content-Length': fault === 'advertised-invalid' ? 'not-a-number' : String(limit + 1) } + : {}, + }, + ); + await assert.rejects(preview.finishPromptEnhancementPreview(run), /byte limit|encoded data|UTF/i); + if (fault !== 'invalid-utf8') assert.equal(cancelled, true); + assert.equal(activeOwner(ownerId).data.params.prompt.value, ' Authored unit prompt.\n'); + }); +}); + +test('metadata status failures retain the HTTP status and cannot change authored inputs', async () => { + const { ownerId } = await setup(); + await preview.enablePromptEnhancement(ownerId); + const run = await preview.startPromptEnhancementPreview(ownerId, child.id); + syntheticEnvelope(run); + cacheBody = new Response('Unavailable metadata', { status: 503 }); + await assert.rejects( + preview.finishPromptEnhancementPreview(run), + (error) => error.kind === 'http' && error.status === 503 && /Preview metadata/.test(error.message), + ); + assert.equal(activeOwner(ownerId).data.params.prompt.value, ' Authored unit prompt.\n'); +}); + +test('cancelling a metadata body read uses the shared transport without changing authored inputs', async () => { + const { ownerId } = await setup(); + await preview.enablePromptEnhancement(ownerId); + const run = await preview.startPromptEnhancementPreview(ownerId, child.id); + syntheticEnvelope(run); + const previousFetch = globalThis.fetch, + controller = new AbortController(); + let bodyStarted; + const started = new Promise((resolve) => { + bodyStarted = resolve; + }); + globalThis.fetch = async (url, init) => { + if (!new URL(String(url)).pathname.startsWith('/cache/')) return previousFetch(url, init); + assert.equal(init.cache, 'no-store'); + return new Response( + new ReadableStream({ + start(stream) { + init.signal.addEventListener('abort', () => stream.error(init.signal.reason), { once: true }); + }, + pull() { + bodyStarted(); + }, + }), + ); + }; + const pending = preview.finishPromptEnhancementPreview(run, controller.signal); + const rejected = assert.rejects(pending, (error) => error.kind === 'aborted'); + await started; + controller.abort(new Error('Unit read cancelled.')); + await rejected; + assert.equal(activeOwner(ownerId).data.params.prompt.value, ' Authored unit prompt.\n'); +}); + +test('changing an enabled parent requires Disable; a disabled change derives a fresh exact offer from its new starter', async () => { + const { ownerId } = await setup(); + await preview.enablePromptEnhancement(ownerId); + const { planOperationChange } = await server.ssrLoadModule('/src/workflow/operationAuthoring.ts'); + const { requestOperationStarter } = await server.ssrLoadModule('/src/workflow/operationStarterRequest.ts'); + const { visualOperationOwnerId } = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const { expandFlowExecutionGraph } = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + const starter = await requestOperationStarter( + fixture.selection.pipelineClass, + fixture.selection.task, + fixture.operationContracts, + undefined, + fixture.selection.executionProfileId, + fixture.selection.authoringRecipeId, + ); + const loaderId = (graph) => { + const root = graph.nodes.find((node) => + node.data.blockInstanceV2?.effectiveGraph.nodes.some((leaf) => leaf.data.studioRole === 'models'), + ); + const leaf = root.data.blockInstanceV2.effectiveGraph.nodes.find((leaf) => leaf.data.studioRole === 'models'); + return visualOperationOwnerId(graph, leaf.nodeId, root.id); + }; + const enabled = flow.getState().toObject(); + assert.throws( + () => planOperationChange(enabled, loaderId(enabled), starter, { restoreDefaults: true }), + /disable.*enhancement/i, + ); + assert.equal(activeOwner(ownerId).data.params.prompt.value, ' Authored unit prompt.\n'); + await preview.disablePromptEnhancement(ownerId, child.id); + const disabled = flow.getState().toObject(); + const plan = planOperationChange(disabled, loaderId(disabled), starter, { restoreDefaults: true }); + const native = expandFlowExecutionGraph(plan.graph.nodes, plan.graph.edges); + const ownerKey = parent.roles.find(([role]) => role === child.bindings.owner.role)[1]; + const prompt = native.nodes.find((node) => `${node.data.module}.${node.data.action}` === ownerKey); + assert.ok( + prompt.data.operationAuthoring.ancillaryParent, + 'A complete disabled parent must receive a fresh backend-declared advisory offer.', + ); + assert.equal( + prompt.data.operationAuthoring.ancillaryParent.parent.authoringContentHash, + starter.authoring.contentHash, + ); + const offer = prompt.data.operationAuthoring.ancillaryParent; + assert.deepEqual(Object.keys(offer.parentRoleNodes).sort(), parent.roles.map(([role]) => role).sort()); + for (const [role, key] of starter.authoring.roles) { + const actual = native.nodes.find((node) => node.id === offer.parentRoleNodes[role]); + assert.ok(actual, `The new role ${role} must point to an actual current native leaf.`); + assert.equal(`${actual.data.module}.${actual.data.action}`, key); + } + assert.equal(plan.graph.nodes.length, 4); + assert.equal(prompt.data.operationAuthoring.ancillaryBindings, undefined); +}); + +test('normal Enable and reloaded Preview renew selected parent fields absent from the generic raw registry', async () => { + const { ownerId } = await setup(); + const nextRegistry = structuredClone(registry.getState().nodesRegistry); + const key = fixture.response.authoring.roles.find( + ([role]) => role === fixture.response.authoring.ancillaryOperations[0].bindings.owner.role, + )[1]; + delete nextRegistry[key].params.prompt; + delete nextRegistry[key].params.layout_conditioning; + registry.setState({ nodesRegistry: nextRegistry }); + await preview.enablePromptEnhancement(ownerId); + const enabled = JSON.parse(JSON.stringify(flow.getState().toObject())); + flow.setState(enabled); + await preview.currentPromptEnhancementDeclaration(ownerId, fixture.response.authoring.ancillaryOperations[0].id); + await preview.startPromptEnhancementPreview(ownerId, fixture.response.authoring.ancillaryOperations[0].id); + assert.equal(submitted.runtimeHints.executionPurpose.kind, 'explicit_preview'); + assert.deepEqual(registry.getState().nodesRegistry, nextRegistry); +}); diff --git a/scripts/prompt-enhancement-summary.test.mjs b/scripts/prompt-enhancement-summary.test.mjs new file mode 100644 index 00000000..e79fea3a --- /dev/null +++ b/scripts/prompt-enhancement-summary.test.mjs @@ -0,0 +1,1076 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { after, before, test } from 'node:test'; +import { createServer } from 'vite'; +import { mkdtempSync, rmSync, readFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import path from 'node:path'; + +const cache = mkdtempSync(path.join(tmpdir(), 'modiff-enhancement-summary-')); +let server, contract, canonical; +before(async () => { + server = await createServer({ + configFile: false, + cacheDir: cache, + logLevel: 'silent', + appType: 'custom', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + }); + contract = await server.ssrLoadModule('/src/studio/promptEnhancementSummary.ts'); + canonical = (await server.ssrLoadModule('/src/studio/blockSchemaV2.ts')).canonicalBlockStringifyV2; +}); +after(async () => { + await server?.close(); + rmSync(cache, { recursive: true, force: true }); +}); + +const sha = (text) => `sha256:${createHash('sha256').update(text, 'utf8').digest('hex')}`; +const copy = (value) => structuredClone(value); + +// Synthetic protocol fixture only. Its receipt digest is independently generated +// by the existing HFT _canonical_json/_sealed_receipt source for this closed receipt. +// This is not a model, actual processor/rendered token or producer fixture. +const nativeReceipt = { + schemaVersion: 1, + library: 'transformers', + task: 'image-video-to-text', + source: { kind: 'hub', repository: 'synthetic/review-fixture', revision: 'a'.repeat(40) }, + loader: { preprocessorAutoClass: 'AutoProcessor', modelAutoClass: 'AutoModelForImageTextToText' }, + security: { localFilesOnly: true, trustRemoteCode: false, safetensorsOnly: true, hostedInference: false }, + runtime: { + transformersVersion: '5.18.0', + dtype: 'float32', + device: 'cpu', + preprocessorClass: 'FixtureProcessor', + modelClass: 'FixtureVisionTextModel', + modelType: 'fixture_model', + architectures: ['FixtureVisionTextModel'], + quantization: { mode: 'none' }, + }, + receiptDigest: 'sha256:bf02490f3df13b73bc28a5233592944a839598466d607ec2763a7466bfd25084', +}; +const controls = { + max_new_tokens: 16, + min_new_tokens: 0, + do_sample: false, + num_beams: 1, + repetition_penalty: 1, + return_dict_in_generate: false, + use_chat_template: true, +}; +const producer = { + taskId: 'synthetic-task-A', + attemptIndex: 0, + node: { id: 'synthetic/prompt', module: 'modules.HuggingFaceTransformers', action: 'GenerateImageVideoText' }, + sid: null, + workerInstance: 'synthetic-worker', + backendSourceFingerprint: `sha256:backend-source-v1:${'b'.repeat(64)}`, + graphHash: `sha256:workflow-auto-v1:${'c'.repeat(64)}`, + recipe: null, + uiContext: { + clientRunId: null, + runInputHash: null, + workflowTabId: null, + workflowCanvasEpoch: null, + workflowFormEpoch: null, + }, +}; +const adapter = { id: 'synthetic-enhancement-v1', declarationSha256: sha('synthetic descriptor bytes\n') }; + +function fixture({ + images = 0, + layout = null, + invalidLayout = false, + prompt = ' Synthetic authored prompt 😀.\n', +} = {}) { + const references = Array.from({ length: images }, (_, index) => ({ + index, + mode: 'RGB', + width: 2, + height: 3, + sha256: sha(`synthetic ordered RGB source ${index}`), + })); + const bbox = Boolean(layout?.regions.length); + const mode = `${images ? 'i2i' : 't2i'}${bbox ? '_bbox' : ''}`; + const rendered = `synthetic rendered ${prompt}`; + const consumed = { + schemaVersion: 1, + renderedPrompt: rendered, + references, + processedImageGrid: references.map(() => [1, 1, 2]), + fingerprints: { + operation: 'enhance_prompt', + enhancement_max_new_tokens: controls.max_new_tokens, + prompt_adapter_id: adapter.id, + system_prompt_mode: mode, + system_prompt_sha256: sha('synthetic system').slice(7), + rendered_prompt_sha256: sha(rendered), + rendered_prompt_utf8_bytes: Buffer.byteLength(rendered), + rendered_input_ids_sha256: sha('synthetic input IDs'), + reference_source_sha256: references.map((ref) => ref.sha256), + ...(images + ? { + processed_pixel_sha256: sha('synthetic pixels'), + processed_grid_sha256: sha('synthetic grid'), + processed_pixel_shape: [images * 2, 4], + processed_grid_shape: [images, 3], + } + : {}), + }, + }; + let structured = null; + if (bbox && !invalidLayout) { + const proposed = copy(layout); + for (const region of proposed.regions) region.description = `Proposed ${region.id}`; + structured = { + schemaVersion: 1, + caption: proposed.regions.map((region) => `<${region.id}>`).join(' beside '), + layoutConditioning: proposed, + rawTable: proposed.regions.map((region) => ({ + id: region.id, + ...(images + ? { from: 'target', src_bbox: null, tgt_bbox: [200, 100, 700, 400] } + : { bbox: [200, 100, 700, 400] }), + desc: region.description, + })), + }; + } + const value = { + schemaVersion: 1, + kind: 'prompt-enhancement-proposal', + producer: copy(producer), + adapter: copy(adapter), + request: { + authoredPromptSha256: sha(prompt), + authoredLayoutKind: layout === null ? 'none' : 'object', + authoredLayoutSha256: layout === null ? null : sha(canonical({ kind: 'object', value: layout })), + controls: copy(controls), + consumedInputSha256: sha(canonical(consumed)), + }, + modelReceipt: copy(nativeReceipt), + consumedInput: consumed, + proposal: { + mode, + text: bbox ? null : 'Synthetic proposal text.', + structuredProposal: structured, + finishReason: 'stop', + inputTokens: 7, + generatedTokens: 3, + applyRequired: true, + applicationAllowed: !invalidLayout, + layoutOutputValidated: bbox ? !invalidLayout : null, + semanticFidelityVerified: false, + applicationBlockedReason: invalidLayout ? 'Invalid generated target layout: synthetic diagnostic.' : null, + }, + }; + const expectedReceipt = copy(nativeReceipt); + delete expectedReceipt.receiptDigest; + return { + value, + expected: { + producer: copy(producer), + adapter: copy(adapter), + modelReceipt: expectedReceipt, + authoredPrompt: prompt, + authoredLayout: copy(layout), + controls: copy(controls), + systemPromptSha256: sha('synthetic system').slice(7), + references: copy(references), + }, + }; +} +const layout = (version = 2) => ({ + schemaVersion: version, + coordinateSpace: 'normalized_xyxy', + regions: [ + { + id: 'region_1', + description: 'Authored description.', + targetBox: [0.1, 0.2, 0.4, 0.7], + ...(version === 2 ? { action: 'place' } : {}), + }, + ], +}); +const parse = (value) => contract.parsePromptEnhancementSummary(JSON.stringify(value)); +const verify = ({ value, expected }) => + contract.verifyPromptEnhancementSummaryBindings(JSON.stringify(value), expected); + +// Source-only declaration with synthetic output/producer, never a model receipt. +const constraintDeclaration = JSON.parse( + readFileSync('tests/fixtures/authored-layout-constraint.v1.json', 'utf8'), +).contract; +const asciiCanonical = (value) => + canonical(value).replace( + /[\u007f-\uffff]/g, + (character) => `\\u${character.charCodeAt(0).toString(16).padStart(4, '0')}`, + ); +function constrainedFixture(images = 0) { + const input = fixture({ images, layout: layout(), prompt: 'Keep at its authored coordinates.' }); + const consumed = input.value.consumedInput; + const source = copy(constraintDeclaration); + const selectedAdapter = { ...input.value.adapter, id: source.adapterId }; + input.value.adapter = copy(selectedAdapter); + input.expected.adapter = copy(selectedAdapter); + consumed.fingerprints.prompt_adapter_id = source.adapterId; + consumed.fingerprints.operation = source.operation; + input.expected.operation = source.operation; + input.expected.layoutPolicy = source.layoutPolicy; + input.expected.authoredLayoutConstraint = copy(source); + const receipt = input.expected.modelReceipt; + receipt.source = { kind: 'hub', repository: source.repository, revision: source.revision }; + receipt.runtime.device = 'cuda:0'; + receipt.runtime.transformersVersion = source.transformersVersion; + input.value.modelReceipt = { ...copy(receipt), receiptDigest: sha(asciiCanonical(receipt)) }; + const rows = [ + { + id: 'region_1', + ...(images ? { from: 'target', src_bbox: null, tgt_bbox: [200, 100, 700, 400] } : { bbox: [200, 100, 700, 400] }), + desc: input.expected.authoredLayout.regions[0].description, + }, + ]; + const constraint = { + contract: source, + authoritativeRowsSha256: sha(asciiCanonical(rows)), + vocabularySha256: source.ordinaryVocabularySha256, + tokenizerSemanticSha256: source.tokenizerSemanticSha256, + renderedInputIdsSha256: consumed.fingerprints.rendered_input_ids_sha256, + promptTokenCount: input.value.proposal.inputTokens, + limits: { ...source.limits, max_new_tokens: input.value.request.controls.max_new_tokens }, + }; + consumed.fingerprints.authored_layout_constraint = constraint; + input.value.proposal.constraintCompletion = { + version: source.version, + terminalTokenId: source.effectiveEosTokenIds[0], + grammarComplete: true, + rawOutputSha256: sha('synthetic full raw output'), + generatedTokens: input.value.proposal.generatedTokens, + constraintFingerprintSha256: sha(asciiCanonical(constraint)), + }; + input.value.request.consumedInputSha256 = sha(canonical(consumed)); + return input; +} + +test('constrained authored-table summaries bind the source contract and exact original rows with genuine EOS at the token bound', async () => { + for (const images of [0, 2]) { + const input = constrainedFixture(images); + const result = await verify(input); + assert.equal(result.proposal.applicationAllowed, true); + assert.equal(result.proposal.semanticFidelityVerified, false); + input.value.proposal.generatedTokens = input.value.request.controls.max_new_tokens; + input.value.proposal.constraintCompletion.generatedTokens = input.value.proposal.generatedTokens; + assert.equal((await verify(input)).proposal.finishReason, 'stop'); + } +}); + +test('constrained proposals cannot borrow old keysets, drift contract/input/geometry or self-declare completion', async () => { + for (const mutate of [ + (x) => { + delete x.value.consumedInput.fingerprints.authored_layout_constraint; + }, + (x) => { + delete x.expected.authoredLayoutConstraint; + }, + (x) => { + x.value.consumedInput.fingerprints.authored_layout_constraint.contract.status = 'qualified'; + }, + (x) => { + const constraint = x.value.consumedInput.fingerprints.authored_layout_constraint; + constraint.contract = { ...constraint.contract, effectivePreTokenizerSha256: sha('foreign tokenizer') }; + }, + (x) => { + x.value.consumedInput.fingerprints.authored_layout_constraint.authoritativeRowsSha256 = sha('foreign rows'); + }, + (x) => { + x.value.consumedInput.fingerprints.authored_layout_constraint.renderedInputIdsSha256 = sha('foreign tokens'); + }, + (x) => { + x.value.consumedInput.fingerprints.authored_layout_constraint.limits.max_new_tokens++; + }, + (x) => { + x.value.consumedInput.fingerprints.authored_layout_constraint.promptTokenCount++; + }, + (x) => { + x.value.proposal.constraintCompletion.terminalTokenId = constraintDeclaration.padTokenId; + }, + (x) => { + x.value.proposal.constraintCompletion.constraintFingerprintSha256 = sha('foreign constraint'); + }, + (x) => { + x.value.proposal.constraintCompletion.grammarComplete = false; + }, + (x) => { + x.value.proposal.constraintCompletion.generatedTokens++; + }, + (x) => { + x.value.proposal.finishReason = 'length'; + }, + (x) => { + x.value.modelReceipt.runtime.dtype = x.expected.modelReceipt.runtime.dtype = 'bfloat16'; + }, + (x) => { + x.value.proposal.structuredProposal.layoutConditioning.regions[0].targetBox[0] = 0.3; + }, + (x) => { + x.value.consumedInput.fingerprints.operation = x.expected.operation = 'enhance_prompt'; + }, + ]) { + const changed = constrainedFixture(); + mutate(changed); + await assert.rejects(verify(changed)); + } + const old = fixture(); + old.value.proposal.constraintCompletion = constrainedFixture().value.proposal.constraintCompletion; + assert.throws(() => parse(old.value), /unexpected|properties|keys/i); +}); + +// Explicitly synthetic composition protocol: not a captured model response. +function appendFixture({ + images = 0, + authored = layout(), + prompt = ' Keep exactly.\n', + nativeText = ' Additional visual wording 😀.\n', +} = {}) { + const input = fixture({ images, layout: authored, prompt }); + const mode = images ? 'i2i' : 't2i'; + input.value.consumedInput.fingerprints.operation = 'enhance_prompt_append_details'; + input.value.consumedInput.fingerprints.system_prompt_mode = mode; + input.value.request.consumedInputSha256 = sha(canonical(input.value.consumedInput)); + Object.assign(input.value.proposal, { + mode, + text: null, + layoutOutputValidated: true, + structuredProposal: { + schemaVersion: 3, + kind: 'caption-append-preserve-layout-v1', + caption: prompt + '\n\n' + nativeText, + layoutConditioning: copy(authored), + nativeText, + }, + }); + Object.assign(input.expected, { + operation: 'enhance_prompt_append_details', + layoutPolicy: 'append-details-preserve-layout-v1', + }); + return input; +} + +test('append-details verifies exact Unicode caption composition and the entire unchanged authored layout', async (t) => { + for (const images of [0, 1, 10]) + await t.test(`plain native mode with ${images} references`, async () => { + const input = appendFixture({ images }); + const result = await verify(input); + assert.deepEqual(result, input.value); + assert.equal(result.proposal.mode, images ? 'i2i' : 't2i'); + assert.equal( + result.proposal.structuredProposal.caption, + input.expected.authoredPrompt + '\n\n' + result.proposal.structuredProposal.nativeText, + ); + assert.deepEqual(result.proposal.structuredProposal.layoutConditioning, input.expected.authoredLayout); + assert.equal(Object.hasOwn(result.proposal.structuredProposal, 'rawTable'), false); + assert.equal(result.proposal.semanticFidelityVerified, false); + }); + const source = layout(); + Object.assign(source.regions[0], { + action: 'relocate', + targetBox: [0.10001, 0.2, 0.4, 0.7], + source: { referenceIndex: 0, box: [0, 0, 1, 1], expectedReferenceId: sha('authored binding') }, + }); + const input = appendFixture({ images: 1, authored: source, prompt: 'Keep from .' }); + assert.deepEqual( + (await verify(input)).proposal.structuredProposal.layoutConditioning, + source, + 'No native geometry conversion or rounding is involved in composition.', + ); + const legacy = appendFixture({ authored: layout(1) }); + assert.equal((await verify(legacy)).proposal.structuredProposal.layoutConditioning.schemaVersion, 1); +}); + +test('append-details requires the independent current policy and operation, never an untrusted kind alone', async () => { + for (const mutate of [ + (x) => { + delete x.expected.layoutPolicy; + }, + (x) => { + delete x.expected.operation; + }, + (x) => { + x.expected.layoutPolicy = 'preserve-authored-v1'; + }, + (x) => { + x.value.consumedInput.fingerprints.operation = 'enhance_prompt'; + }, + (x) => { + x.value.proposal.mode = x.value.consumedInput.fingerprints.system_prompt_mode = 't2i_bbox'; + }, + (x) => { + x.value.proposal.structuredProposal.rawTable = []; + }, + (x) => { + x.value.proposal.text = 'not a public text output'; + }, + ]) { + const input = appendFixture(); + mutate(input); + await assert.rejects(verify(input)); + } + const rejected = appendFixture(); + Object.assign(rejected.value.proposal, { + structuredProposal: null, + applicationAllowed: false, + layoutOutputValidated: false, + applicationBlockedReason: 'Plain wording was refused.', + }); + assert.equal((await verify(rejected)).proposal.applicationAllowed, false); +}); + +test('append-details rejects every authored caption/layout alteration including descriptions and source identity', async () => { + for (const mutate of [ + (s) => { + s.caption = s.caption.trimStart(); + }, + (s) => { + s.caption = s.caption.replace('\n\n', '\n'); + }, + (s) => { + s.caption = 'Replacement caption .\n\n' + s.nativeText; + }, + (s) => { + s.layoutConditioning.regions[0].description = 'Edited description'; + }, + (s) => { + s.layoutConditioning.regions[0].targetBox[0] += 0.01; + }, + (s) => { + s.layoutConditioning.regions[0].id = 'foreign'; + }, + (s) => { + s.layoutConditioning.schemaVersion = 1; + delete s.layoutConditioning.regions[0].action; + }, + ]) { + const input = appendFixture(); + mutate(input.value.proposal.structuredProposal); + await assert.rejects(verify(input)); + } + const source = layout(); + Object.assign(source.regions[0], { + action: 'remove', + targetBox: null, + source: { referenceIndex: 0, box: [0, 0, 1, 1], expectedReferenceId: sha('current ref') }, + }); + const input = appendFixture({ images: 1, authored: source }); + input.value.proposal.structuredProposal.layoutConditioning.regions[0].source.expectedReferenceId = sha('stale ref'); + await assert.rejects(verify(input), /complete authored layout/); +}); + +test('append-details refuses unsafe suffix grammar, malformed tags and existing byte limits without rewriting text', async () => { + for (const nativeText of [ + '', + ' ', + '', + 'unclosed <', + '```text```', + '~~~text~~~', + 'A paragraph [{"id":"extra"}]', + 'A paragraph []', + 'A mixed trailing table [{"id":"extra"},3]', + '\ud800', + 'bad\u0000text', + ]) { + await assert.rejects(verify(appendFixture({ nativeText }))); + } + for (const nativeText of [ + 'A malformed table [{', + 'A mid-sentence [{"id":"example"}] remains prose.', + 'Quoted [wording], {variables}, 2 * 3, and a list: [1,2].', + '**Visual wording** stays exact.', + ]) { + const input = appendFixture({ nativeText }); + assert.equal((await verify(input)).proposal.structuredProposal.nativeText, nativeText); + } + for (const prompt of [ + 'No authored tag.', + ' ', + ' ', + ' ', + ' incomplete <', + '>', + ]) + await assert.rejects(verify(appendFixture({ prompt }))); + await assert.rejects( + verify(appendFixture({ nativeText: 'x'.repeat(131073) })), + /existing ASCII projection guard exceeded/, + ); + await assert.rejects( + verify(appendFixture({ nativeText: '😀'.repeat(65537) })), + /existing ASCII projection guard exceeded/, + ); +}); + +test('append-details finds trailing tables after ordinary, multiple or unmatched prose brackets', async () => { + for (const nativeText of [ + 'A [red] accent. [{"id":"fox","bbox":[0,0,1000,1000]}]', + 'A [red] accent. []', + 'First [1,2] and [3,4]. [{"description":"a table"}]', + 'An unmatched [ prose prefix. [{"description":"a table"}]', + 'An unmatched [ prose prefix. []', + 'A duplicate region table [{"id":"one","id":"two","bbox":[0,0,1000,1000]}]', + '[red] '.repeat(33), + ]) + await assert.rejects(verify(appendFixture({ nativeText }))); + for (const nativeText of [ + 'A [red] accent with no table.', + 'An incomplete table [{"id":"one"}', + 'A duplicate ordinary object table [{"note":"one","note":"two"}]', + '[0]'.repeat(9), + ]) + assert.equal((await verify(appendFixture({ nativeText }))).proposal.structuredProposal.nativeText, nativeText); +}); + +test('structured source proposals preserve authored binding and remap only a unique exact native table', async () => { + const authored = layout(); + authored.regions[0].action = 'relocate'; + authored.regions[0].source = { referenceIndex: 0, box: [0, 0, 1, 1], expectedReferenceId: sha('bound encoding') }; + const input = fixture({ layout: authored, images: 1 }); + const structured = input.value.proposal.structuredProposal; + structured.schemaVersion = 2; + structured.rawCaption = 'Move from .'; + structured.caption = 'Move from .'; + Object.assign(structured.rawTable[0], { id: 'circle_1', from: 'ref_image_0', src_bbox: [0, 0, 1000, 1000] }); + const result = await verify(input); + assert.deepEqual(result.proposal.structuredProposal.layoutConditioning.regions[0].source, authored.regions[0].source); + for (const mutate of [ + (s) => { + s.rawTable[0].src_bbox[0] = 1; + }, + (s) => { + s.rawTable[0].tgt_bbox[0] = 201; + }, + (s) => { + s.caption = s.rawCaption; + }, + (s) => { + s.rawCaption += ' '; + }, + (s) => { + s.layoutConditioning.regions[0].source.expectedReferenceId = sha('stale binding'); + }, + ]) { + const changed = copy(input); + mutate(changed.value.proposal.structuredProposal); + await assert.rejects(verify(changed), /geometry|bijection|mapping|reference|caption/i); + } + const ambiguous = copy(input); + const s = ambiguous.value.proposal.structuredProposal; + s.layoutConditioning.regions.push({ ...copy(s.layoutConditioning.regions[0]), id: 'another' }); + s.rawTable.push({ ...copy(s.rawTable[0]), id: 'circle_2' }); + s.rawCaption += ' '; + s.caption += ' '; + assert.throws(() => parse(ambiguous.value), /bijection/); +}); + +test('synthetic text, image and target-layout summaries parse and match external snapshots without granting Apply', async (t) => { + for (const settings of [ + {}, + { images: 1 }, + { images: 10 }, + { layout: layout(1) }, + { layout: layout(2), images: 2 }, + { layout: layout(), invalidLayout: true }, + { layout: { schemaVersion: 2, coordinateSpace: 'normalized_xyxy', regions: [] } }, + ]) + await t.test(JSON.stringify(settings), async () => { + const input = fixture(settings); + const result = await verify(input); + assert.deepEqual(result, input.value); + assert.equal(result.producer.recipe, null); + assert.equal(Object.hasOwn(result, 'canApply'), false); + assert.equal(result.proposal.semanticFidelityVerified, false); + }); +}); + +test('the existing native ASCII receipt digest is verified in its own closed domain', async () => { + const input = fixture(); + assert.equal(sha(canonical(input.expected.modelReceipt)), nativeReceipt.receiptDigest); + await verify(input); + input.value.modelReceipt.receiptDigest = `sha256:${'0'.repeat(64)}`; + await assert.rejects(verify(input), /native receipt digest/); +}); + +test('raw lexical reader refuses duplicate and escape-equivalent keys before JSON.parse loses them', () => { + const raw = JSON.stringify(fixture().value); + for (const key of ['schemaVersion', 'schema\\u0056ersion']) + assert.throws(() => contract.parsePromptEnhancementSummary(`{"${key}":1,${raw.slice(1)}`), /duplicate JSON key/); + assert.throws( + () => + contract.parsePromptEnhancementSummary( + raw.replace('"attemptIndex":0', '"attemptIndex":0,"attempt\\u0049ndex":0'), + ), + /duplicate JSON key/, + ); + const input = fixture({ prompt: 'A string containing {"x":1,"x":2} is ordinary authored text.' }); + assert.doesNotThrow(() => parse(input.value)); +}); + +test('raw parser rejects objects without traversing getters and refuses invalid JSON/Unicode/nonfinite values', () => { + let accessed = false; + assert.throws( + () => + contract.parsePromptEnhancementSummary({ + get schemaVersion() { + accessed = true; + return 1; + }, + }), + /raw JSON text/, + ); + assert.equal(accessed, false); + const raw = JSON.stringify(fixture().value); + for (const bad of [ + '', + 'null', + '{', + raw + ' garbage', + raw.replace('"inputTokens":7', '"inputTokens":1e999'), + raw.replace('Synthetic proposal text.', '\\ud800'), + raw + '\ud800', + ]) + assert.throws(() => contract.parsePromptEnhancementSummary(bad)); +}); + +test('wire, depth, entry and key limits are finite and exact', () => { + const raw = JSON.stringify(fixture().value); + const padding = contract.MAX_ENHANCEMENT_SUMMARY_BYTES - Buffer.byteLength(raw); + assert.doesNotThrow(() => contract.parsePromptEnhancementSummary(raw + ' '.repeat(padding))); + assert.throws(() => contract.parsePromptEnhancementSummary(raw + ' '.repeat(padding + 1)), /2 MiB/); + assert.throws(() => contract.parsePromptEnhancementSummary('['.repeat(17) + '0' + ']'.repeat(17)), /depth/); + assert.throws(() => contract.parsePromptEnhancementSummary(JSON.stringify(Array(8192).fill(0))), /entries/); + assert.throws( + () => + contract.parsePromptEnhancementSummary( + JSON.stringify(Object.fromEntries(Array.from({ length: 33 }, (_, i) => [`k${i}`, i]))), + ), + /32 keys/, + ); +}); + +test('closed fields refuse bool-as-int, coercion, foreign actions, sources, grants and reserved layout strings', async (t) => { + const cases = { + schema: (x) => { + x.schemaVersion = true; + }, + kind: (x) => { + x.kind = ['prompt-enhancement-proposal']; + }, + unknown: (x) => { + x.canApply = true; + }, + producerNull: (x) => { + x.producer = null; + }, + attempt: (x) => { + x.producer.attemptIndex = true; + }, + foreignAction: (x) => { + x.producer.node.action = 'PredictDepth'; + }, + recipe: (x) => { + x.producer.recipe = { schemaVersion: 1, id: 'fake' }; + }, + source: (x) => { + x.producer.backendSourceFingerprint = sha('wrong domain'); + }, + layoutString: (x) => { + x.request.authoredLayoutKind = 'string'; + x.request.authoredLayoutSha256 = sha('null'); + }, + rawLayoutHash: (x) => { + x.request.authoredLayoutSha256 = sha('none'); + }, + sourceLocal: (x) => { + x.modelReceipt.source = { kind: 'local', path: 'C:/private' }; + }, + remote: (x) => { + x.modelReceipt.security.trustRemoteCode = true; + }, + quant: (x) => { + x.modelReceipt.runtime.quantization.mode = 'bnb_4bit'; + }, + modelClass: (x) => { + x.modelReceipt.runtime.modelClass = ['FixtureVisionTextModel']; + }, + sampled: (x) => { + x.request.controls.do_sample = true; + }, + unconsumed: (x) => { + x.request.controls.temperature = 0.7; + }, + maxTokens: (x) => { + x.request.controls.max_new_tokens = 3585; + }, + finishReason: (x) => { + x.proposal.finishReason = 'length'; + }, + plainFlag: (x) => { + x.proposal.layoutOutputValidated = false; + }, + fidelity: (x) => { + x.proposal.semanticFidelityVerified = true; + }, + implicit: (x) => { + x.proposal.applyRequired = false; + }, + plainTextControl: (x) => { + x.proposal.text = 'Bad\u0080text'; + }, + }; + for (const [name, mutate] of Object.entries(cases)) + await t.test(name, () => { + const { value } = fixture(); + mutate(value); + assert.throws(() => parse(value)); + }); +}); + +test('actual current opaque API correlation and null observations stay valid, never synthetic UI authority', async () => { + const input = fixture(); + input.value.producer.uiContext.runInputHash = 'api-correlation:any-reviewed-string'; + input.expected.producer.uiContext.runInputHash = 'api-correlation:any-reviewed-string'; + await verify(input); + assert.equal(input.value.producer.sid, null); + input.value.producer.uiContext.workflowFormEpoch = Number.MAX_SAFE_INTEGER + 1; + assert.throws(() => parse(input.value)); +}); + +test('ordered references, processed geometry and hash domains must agree before digest matching', async (t) => { + const cases = { + order: (x) => { + x.consumedInput.references.reverse(); + }, + mode: (x) => { + x.consumedInput.references[0].mode = 'RGBA'; + }, + refHash: (x) => { + x.consumedInput.fingerprints.reference_source_sha256.reverse(); + }, + width: (x) => { + x.consumedInput.references[0].width = true; + }, + gridCount: (x) => { + x.consumedInput.processedImageGrid.pop(); + }, + gridZero: (x) => { + x.consumedInput.processedImageGrid[0][0] = 0; + }, + pixelRows: (x) => { + x.consumedInput.fingerprints.processed_pixel_shape[0] = 5; + }, + gridShape: (x) => { + x.consumedInput.fingerprints.processed_grid_shape = [1, 3]; + }, + missing: (x) => { + delete x.consumedInput.fingerprints.processed_grid_sha256; + }, + prefix: (x) => { + x.consumedInput.fingerprints.system_prompt_sha256 = sha('system'); + }, + bytes: (x) => { + x.consumedInput.fingerprints.rendered_prompt_utf8_bytes++; + }, + Nul: (x) => { + x.consumedInput.renderedPrompt += '\0'; + }, + }; + for (const [name, mutate] of Object.entries(cases)) + await t.test(name, () => { + const { value } = fixture({ images: 2 }); + mutate(value); + assert.throws(() => parse(value)); + }); + const input = fixture(); + input.value.consumedInput.fingerprints.processed_grid_shape = [0, 3]; + assert.throws(() => parse(input.value)); +}); + +test('target proposals refuse changed boxes, unknown IDs/tags, sources and contradictory flags', async (t) => { + const cases = { + box: (x) => { + x.proposal.structuredProposal.rawTable[0].tgt_bbox[0]++; + }, + id: (x) => { + x.proposal.structuredProposal.rawTable[0].id = 'foreign'; + }, + description: (x) => { + x.proposal.structuredProposal.rawTable[0].desc = 'foreign'; + }, + source: (x) => { + x.proposal.structuredProposal.rawTable[0].from = 'ref_image_0'; + }, + tag: (x) => { + x.proposal.structuredProposal.caption += ''; + }, + referenceTag: (x) => { + x.proposal.structuredProposal.caption += ''; + }, + sourceRegion: (x) => { + x.proposal.structuredProposal.layoutConditioning.regions[0].source = { + referenceIndex: 0, + box: [0, 0, 1, 1], + expectedReferenceId: sha('fake'), + }; + }, + extraText: (x) => { + x.proposal.text = 'caption/table'; + }, + flag: (x) => { + x.proposal.applicationAllowed = false; + }, + reason: (x) => { + x.proposal.applicationBlockedReason = 'contradictory'; + }, + nullStructure: (x) => { + x.proposal.structuredProposal = null; + }, + }; + for (const [name, mutate] of Object.entries(cases)) + await t.test(name, () => { + const { value } = fixture({ images: 1, layout: layout() }); + mutate(value); + assert.throws(() => parse(value)); + }); + const input = fixture({ layout: layout() }); + input.value.proposal.structuredProposal.layoutConditioning.regions[0].targetBox[0] = 0.10000000000000002; + assert.throws(() => parse(input.value), /integer grid/); +}); + +test('digest and external binding checks refuse tampering rather than trusting self-selected declarations', async (t) => { + const cases = { + adapter: (x) => { + x.value.adapter.declarationSha256 = sha('forged declaration'); + }, + receipt: (x) => { + x.value.modelReceipt.receiptDigest = sha('forged receipt'); + }, + consumed: (x) => { + x.value.request.consumedInputSha256 = sha('forged consumed'); + }, + rendered: (x) => { + x.value.consumedInput.fingerprints.rendered_prompt_sha256 = sha('forged rendered'); + }, + prompt: (x) => { + x.expected.authoredPrompt = x.expected.authoredPrompt.trim(); + }, + task: (x) => { + x.expected.producer.taskId = 'later-task-B'; + }, + attempt: (x) => { + x.expected.producer.attemptIndex = 1; + }, + worker: (x) => { + x.expected.producer.workerInstance = 'new-worker'; + }, + source: (x) => { + x.expected.producer.backendSourceFingerprint = `sha256:backend-source-v1:${'d'.repeat(64)}`; + }, + tab: (x) => { + x.expected.producer.uiContext.workflowTabId = 'foreign-tab'; + }, + model: (x) => { + x.expected.modelReceipt.source.revision = 'd'.repeat(40); + }, + controls: (x) => { + x.expected.controls.min_new_tokens = 1; + }, + references: (x) => { + x.expected.references[0].sha256 = sha('replaced source'); + }, + }; + for (const [name, mutate] of Object.entries(cases)) + await t.test(name, async () => { + const input = fixture({ images: 1 }); + mutate(input); + await assert.rejects(verify(input)); + }); +}); + +test('raw layout hashing preserves representation and geometry while descriptions may be proposed', async () => { + const input = fixture({ layout: layout() }); + await verify(input); + input.expected.authoredLayout.regions[0].description = 'A concurrent authored layout edit.'; + await assert.rejects(verify(input), /authored layout digest/); + const next = fixture({ layout: layout() }); + next.expected.authoredLayout.regions[0].targetBox[0] = 0.2; + await assert.rejects(verify(next), /authored layout digest/); + const invalid = fixture(); + invalid.expected.authoredLayout = 'null'; + await assert.rejects(verify(invalid)); +}); + +test('external snapshot rejects getters/toJSON and is detached before async hashing', async () => { + const input = fixture(); + let accessed = false; + Object.defineProperty(input.expected, 'authoredPrompt', { + enumerable: true, + get() { + accessed = true; + return 'bad'; + }, + }); + await assert.rejects(verify(input), /data bindings/); + assert.equal(accessed, false); + const valid = fixture(); + const pending = verify(valid); + valid.expected.authoredPrompt = 'Changed after the explicit immutable snapshot.'; + assert.equal((await pending).producer.taskId, producer.taskId); + // A future UI still must recheck its live editing epoch after every await. +}); + +test('parity: native five-digit devices and 256-character type/architecture observations remain accepted', () => { + const input = fixture(); + input.value.modelReceipt.runtime.device = 'cuda:12345'; + input.value.modelReceipt.runtime.modelType = 'A' + '-'.repeat(255); + input.value.modelReceipt.runtime.architectures = ['Model-With-Hyphen']; + assert.doesNotThrow(() => parse(input.value)); +}); + +test('parity: malformed model type observations cannot become a native receipt', () => { + for (const modelType of ['invalid space', 'invalid_\u{1f600}', 'A'.repeat(257), [], true]) { + const input = fixture(); + input.value.modelReceipt.runtime.modelType = modelType; + assert.throws(() => parse(input.value), /type|class/); + } +}); + +test('parity: JSON structural entries include every object key', () => { + const raw = JSON.stringify(Array.from({ length: 3000 }, () => ({ a: 0 }))); + assert.throws(() => contract.parsePromptEnhancementSummary(raw), /entries/); +}); + +test('parity: the existing consumed ASCII projection budget remains additive to UTF8', () => { + const input = fixture(); + input.value.consumedInput.renderedPrompt = '\u{1f600}'.repeat(24000); + input.value.consumedInput.fingerprints.rendered_prompt_utf8_bytes = 96000; + input.value.consumedInput.fingerprints.rendered_prompt_sha256 = sha(input.value.consumedInput.renderedPrompt); + assert.throws(() => parse(input.value), /ASCII/); +}); + +test('parity: the existing structured ASCII projection budget remains additive to UTF8', () => { + const authored = layout(); + authored.regions = Array.from({ length: 32 }, (_, index) => ({ + ...copy(authored.regions[0]), + id: `region_${index}`, + })); + const input = fixture({ layout: authored }); + for (const region of input.value.proposal.structuredProposal.layoutConditioning.regions) + region.description = '\u{1f600}'.repeat(350); + for (const row of input.value.proposal.structuredProposal.rawTable) row.desc = '\u{1f600}'.repeat(350); + assert.throws(() => parse(input.value), /ASCII/); +}); + +test('parity: structured captions preserve the producer Markdown fence refusal', () => { + const input = fixture({ layout: layout() }); + input.value.proposal.structuredProposal.caption += ' ```'; + assert.throws(() => parse(input.value), /fence/); +}); + +test('parity: external snapshot key bytes are bounded before unknown-key validation', async () => { + const input = fixture(); + input.expected['x'.repeat(contract.MAX_ENHANCEMENT_SUMMARY_BYTES + 1)] = null; + await assert.rejects(verify(input), /binding.*limit/); +}); + +test('historical ASCII lexical guard preserves native float/exponent spelling and exact boundary', () => { + // Padding independently measured with Python json.dumps(ensure_ascii=True), + // using native 1.0 / 1e-07 spellings. This is a lexical-budget probe, not a DTO. + const prefix = 'escaped " quote } [ {"x":1} \u00e9'; + for (const key of ['consumedInput', 'consumed\\u0049nput', 'structuredProposal', 'structured\\u0050roposal']) { + const raw = (extra) => + `{"${key}":{"text":${JSON.stringify(prefix + 'x'.repeat(262070 + extra))},"n":1.0,"tiny":1e-07}}`; + assert.throws( + () => contract.parsePromptEnhancementSummary(raw(0)), + (error) => !/ASCII/.test(error.message), + ); + assert.throws(() => contract.parsePromptEnhancementSummary(raw(1)), /ASCII/); + } + assert.throws(() => contract.parsePromptEnhancementSummary('{"consumedInput":{"n":1e--07}}'), SyntaxError); +}); + +test('Markdown fences in a target description are also refused before successful layout transport', () => { + const input = fixture({ layout: layout() }); + input.value.proposal.structuredProposal.layoutConditioning.regions[0].description = 'not ``` native output'; + input.value.proposal.structuredProposal.rawTable[0].desc = 'not ``` native output'; + assert.throws(() => parse(input.value), /fence/); +}); + +test('decoded C0 controls are refused in every wire string, including nonhuman identities', () => { + for (const mutate of [ + (value) => { + value.producer.taskId = 'task\u0000'; + }, + (value) => { + value.producer.sid = 'sid\u0001'; + }, + (value) => { + value.modelReceipt.runtime.transformersVersion = '5.18.0\u001f'; + }, + ]) { + const input = fixture(); + mutate(input.value); + assert.throws(() => parse(input.value), /control/); + } +}); + +test('decoded C1 controls are refused in nonhuman identities while tab LF CR remain valid', () => { + for (const mutate of [ + (value) => { + value.producer.workerInstance = 'unit\u007fworker'; + }, + (value) => { + value.producer.uiContext.runInputHash = 'opaque\u0085correlation'; + }, + (value) => { + value.modelReceipt.runtime.transformersVersion = '5.18.0\u009f'; + }, + ]) { + const input = fixture(); + mutate(input.value); + assert.throws(() => parse(input.value), /control/); + } + const input = fixture(); + input.value.producer.uiContext.runInputHash = 'opaque\t\n\rcorrelation'; + assert.doesNotThrow(() => parse(input.value)); +}); + +test('exact optional native NF4 receipt is transport data and malformed recipes refuse', async () => { + const input = fixture(); + const quantization = { + mode: 'bnb_4bit', + quantType: 'nf4', + doubleQuant: true, + computeDtype: 'bfloat16', + skipModules: ['lm_head', 'model.visual'], + }; + input.value.modelReceipt.runtime.quantization = copy(quantization); + input.expected.modelReceipt.runtime.quantization = copy(quantization); + input.value.modelReceipt.receiptDigest = sha(canonical(input.expected.modelReceipt)); + const result = await verify(input); + assert.deepEqual(result.modelReceipt.runtime.quantization, quantization); + assert.equal(Object.hasOwn(result, 'canApply'), false); + for (const changed of [ + { ...quantization, doubleQuant: false }, + { ...quantization, doubleQuant: 1 }, + { ...quantization, quantType: 'fp4' }, + { ...quantization, computeDtype: 'float16' }, + { ...quantization, skipModules: ['model.visual', 'lm_head'] }, + { ...quantization, skipModules: ['lm_head'] }, + { ...quantization, skipModules: ['lm_head', 'model.visual', 'extra'] }, + { ...quantization, unexpected: true }, + { mode: ['none'] }, + { mode: 'none', quantType: 'nf4' }, + ]) { + const malformed = copy(input.value); + malformed.modelReceipt.runtime.quantization = changed; + assert.throws(() => parse(malformed), /quantized provider|unknown|missing/); + } +}); diff --git a/scripts/prompt-variant-evidence.mjs b/scripts/prompt-variant-evidence.mjs new file mode 100644 index 00000000..cf00830c --- /dev/null +++ b/scripts/prompt-variant-evidence.mjs @@ -0,0 +1,2010 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { lstatSync, readFileSync, realpathSync } from 'node:fs'; +import { dirname } from 'node:path'; +import { canonicalJsonHash } from './canonical-json.mjs'; +import { verifyNativeLoadedImage } from './native-image-load-evidence.mjs'; +import { + backendContractIdentity, + backendSourceEvidence, + canonicalGraphIdentity, + normalizeBackendRuntime, + directImagePromptAccountingExecutionPlan, + directImagePromptRoutes, + selectBackendRuntimeFingerprintEvidence, + selectInstalledModelIdentity, + stableStringify, +} from './live-proof-provenance.mjs'; +import { + bindRetainedCpuFloat32Recipe, + validateLateNativeSingleAssetRun, + validateNativeVariantOutput, + validateNativeVariantRun, + validateUnmodifiedExpertPreparation, +} from './native-variant-run-evidence.mjs'; +import { + canonicalWorkflowAuthoringContract, + exportCanonicalWorkflowGraphs, + readCanonicalEvidenceFile, +} from './release-contract-core.mjs'; + +// These are the reviewed authored prompt exercises, with no external inputs +// or changes to the rest of either published recipe. The native observations +// are narrower than full call accounting and do not qualify public assets. +const textRoute = { + format: 'modiff.private.smollm2-prompt-variant.v1', + workflowId: 'HuggingFaceTextGenerationModel:text_generation', + outputKind: 'json', + displayType: 'text', + contentType: 'text/plain', + platform: /^Windows-/u, + backend: 'cuda', + modelRepo: 'HuggingFaceTB/SmolLM2-135M-Instruct', + modelRevision: '12fd25f77366fa6b3b4b768ec3050bf629380bac', + loaderContract: [], + chain: [ + [ + 'loader', + 'modules.HuggingFaceTransformers', + 'LoadTextGenerationModel', + 'device dtype model_id pipeline_class revision', + ], + ['generator', 'modules.HuggingFaceTransformers', 'GenerateText', 'prompt'], + ['preview', 'modules.Primitive', 'DataViewer', ''], + ], +}; + +const janusTextRoute = { + ...textRoute, + format: 'modiff.private.janus-text-prompt-variant.v1', + workflowId: 'HuggingFaceAnyToAnyModel:text_generation', + modelRepo: 'deepseek-community/Janus-Pro-1B', + modelRevision: '1655280bb75959cc1cb85529a2a8b26e7016072e', + chain: [ + ['loader', 'modules.HuggingFaceTransformers', 'LoadAnyToAnyModel', 'device dtype model_id pipeline_class revision'], + ['generator', 'modules.HuggingFaceTransformers', 'GenerateAnyToAny', 'prompt'], + ['preview', 'modules.Primitive', 'DataViewer', ''], + ], +}; + +const janusImageRoute = { + ...janusTextRoute, + format: 'modiff.private.janus-image-prompt-variant.v1', + workflowId: 'HuggingFaceAnyToAnyModel:text_to_image', + outputKind: 'image', + displayType: 'image', + contentType: 'image/webp', + chain: [...janusTextRoute.chain.slice(0, 2), ['preview', 'modules.Image', 'Preview', 'device']], +}; + +const janusCaptionRoute = { + ...janusTextRoute, + format: 'modiff.private.janus-caption-variant.v1', + workflowId: 'HuggingFaceAnyToAnyModel:image_to_text', + bindsImage: true, + baselinePrompt: 'Describe the image.', + chain: [['source', 'modules.Image', 'Load', ''], ...janusTextRoute.chain], +}; + +const smolVlmCaptionRoute = { + ...textRoute, + format: 'modiff.private.smolvlm-caption-variant.v1', + workflowId: 'HuggingFaceImageTextToTextModel:image_to_text', + modelRepo: 'HuggingFaceTB/SmolVLM-256M-Instruct', + modelRevision: '7e3e67edbbed1bf9888184d9df282b700a323964', + bindsImage: true, + baselinePrompt: 'Describe the image.', + executedTask: 'image_to_text', + chain: [ + ['source', 'modules.Image', 'Load', ''], + [ + 'loader', + 'modules.HuggingFaceTransformers', + 'LoadImageTextToTextModel', + 'device dtype model_id pipeline_class revision', + ], + ['generator', 'modules.HuggingFaceTransformers', 'GenerateImageVideoText', 'prompt'], + ['preview', 'modules.Primitive', 'DataViewer', ''], + ], +}; + +const videoRoute = { + format: 'modiff.private.shap-e-prompt-variant.v1', + workflowId: 'ShapEPipeline:text_to_3d', + outputKind: 'video', + displayType: 'video', + contentType: 'video/mp4', + platform: /^Linux-/u, + backend: 'rocm', + modelRepo: 'openai/shap-e', + modelRevision: '7bd337afdea1c17842e1c3cc45c4e268356dba40', + loaderContract: ['modules.DiffusersThreeD.LoadPipeline'], + chain: [ + ['quantization', 'modules.DiffusersRuntime', 'PipelineQuantizationConfigV2', 'dtype'], + [ + 'recipe', + 'modules.DiffusersRuntime', + 'DiffusersExecutionRecipe', + 'attention_backend device offload_mode vae_slicing vae_tiling', + ], + [ + 'loader', + 'modules.DiffusersThreeD', + 'LoadPipeline', + 'auto_offload device dtype model_id offload_mode pipeline_class revision', + ], + [ + 'generator', + 'modules.DiffusersThreeD', + 'GenerateRenderedArtifact', + 'guidance_scale num_inference_steps prompt seed', + ], + ['preview', 'modules.Video', 'Export', 'fps'], + ], +}; + +const audioRoute = { + format: 'modiff.private.longcat-audio-prompt-variant.v1', + workflowId: 'LongCatAudioDiTPipeline:text_to_audio', + outputKind: 'audio', + displayType: 'audio', + contentType: 'audio/wav', + platform: /^Windows-/u, + backend: 'cuda', + modelRepo: 'ruixiangma/LongCat-AudioDiT-1B-Diffusers', + modelRevision: 'f4c063ea37f262ba5e6129ebd80095a6d6a9de4d', + loaderContract: ['modules.DiffusersAudio.LoadPipeline'], + bindSeed: true, + chain: [ + ['quantization', 'modules.DiffusersRuntime', 'PipelineQuantizationConfigV2', 'dtype'], + [ + 'recipe', + 'modules.DiffusersRuntime', + 'DiffusersExecutionRecipe', + 'attention_backend device offload_mode vae_slicing vae_tiling', + ], + [ + 'loader', + 'modules.DiffusersAudio', + 'LoadPipeline', + 'auto_offload device dtype enable_vae_tiling model_id offload_mode pipeline_class revision', + ], + ['generator', 'modules.DiffusersAudio', 'Generate', 'prompt seed audio_duration sample_rate'], + ['preview', 'modules.Audio', 'Export', 'sample_rate'], + ], +}; + +const audioLdmRoute = { + ...audioRoute, + format: 'modiff.private.audioldm2-prompt-variant.v1', + workflowId: 'AudioLDM2Pipeline:text_to_audio', + modelType: 'AudioLDM2Pipeline', + previousExpertFamily: 'StableDiffusionXLControlNetInpaintPipeline', + modelRepo: 'cvssp/audioldm2', + modelRevision: 'c8e7e189d324425c05c4c2f81214041ef4107983', + chain: audioRoute.chain.map((stage) => + stage[0] === 'generator' + ? ['generator', 'modules.DiffusersAudio', 'Generate', 'prompt seed audio_duration sample_rate'] + : stage, + ), +}; + +const stableAudioRoute = { + ...audioLdmRoute, + format: 'modiff.private.stable-audio-prompt-variant.v1', + workflowId: 'StableAudioPipeline:text_to_audio', + modelType: 'StableAudioPipeline', + previousExpertFamily: null, + platform: /^Linux-/u, + backend: 'rocm', + contentType: 'audio/x-wav', + modelRepo: 'stabilityai/stable-audio-open-1.0', + modelRevision: 'f21265c1e2710b3bd2386596943f0007f55f802e', + sourceFingerprint: 'sha256:backend-source-v1:bf8ee3b3df08410b5f041279f84ca3b9e0bbb7248f0e73fbe4c0ecb718727b6c', + lateNativeSnapshot: true, +}; + +const wanA14BRoute = { + format: 'modiff.private.wan-a14b-video-prompt-variant.v1', + workflowId: 'Wan22Pipeline:text_to_video', + modelType: 'Wan22Pipeline', + outputKind: 'video', + displayType: 'video', + contentType: 'video/mp4', + platform: /^Linux-/u, + backend: 'rocm', + previousExpertFamily: 'WanAnimatePipeline', + modelRepo: 'Wan-AI/Wan2.2-T2V-A14B-Diffusers', + modelRevision: '5be7df9619b54f4e2667b2755bc6a756675b5cd7', + loaderContract: ['modules.DiffusersVideo.LoadPipeline'], + bindSeed: true, + executedTask: 'text_to_video', + chain: [ + ['quantization', 'modules.DiffusersRuntime', 'PipelineQuantizationConfigV2', 'dtype'], + [ + 'recipe', + 'modules.DiffusersRuntime', + 'DiffusersExecutionRecipe', + 'attention_backend device offload_mode vae_slicing vae_tiling', + ], + [ + 'loader', + 'modules.DiffusersVideo', + 'LoadPipeline', + 'auto_offload device dtype model_id offload_mode pipeline_class revision', + ], + [ + 'generator', + 'modules.DiffusersVideo', + 'Generate', + 'conditioning_scale frame_rate guidance_scale height max_sequence_length negative_prompt num_frames num_inference_steps output_type prompt secondary_guidance_scale seed strength true_cfg_scale width', + ], + ['preview', 'modules.Video', 'Export', 'fps'], + ], +}; + +const wanA14BOpeningRoute = { + ...wanA14BRoute, + format: 'modiff.private.wan-a14b-opening-image-variant.v1', + workflowId: 'WanImageToVideoPipeline:image_to_video', + modelType: 'WanImageToVideoPipeline', + previousExpertFamily: 'QwenImageLayeredPipeline', + modelRepo: 'Wan-AI/Wan2.2-I2V-A14B-Diffusers', + modelRevision: '596658fd9ca6b7b71d5057529bbf319ecbc61d74', + sourceFingerprint: 'sha256:backend-source-v1:ce7ac712b4620d0e8efb35022a558a551e2d4ae6ef20b844744c4d674527b0b3', + executedTask: 'image_to_video', + bindsImage: true, + imageInputPort: 'reference_images', + bindSeed: false, + bindNegativePrompt: true, + baselinePromptHash: '9d8fe468ce8939dd73a197fa8ee97d01363a709cf34df18397fe589a4064d6b7', + baselineNegativePromptHash: '7a8923279a40a635424ada051ad177b63dab90cf78a7d60f9b9b9d5bf1cd2134', + chain: [['source', 'modules.Image', 'Load', ''], ...wanA14BRoute.chain], +}; + +const wanA14BDefaultOpeningRoute = { + ...wanA14BOpeningRoute, + format: 'modiff.private.wan-a14b-default-opening.v1', + previousExpertFamily: 'FluxControlImg2ImgPipeline', + sourceFingerprint: 'sha256:backend-source-v1:73c0d5622c9c305eb2c13478fbac4ca9ea09c71689c74d38679fa6af592c8964', + retainedRegistryHash: '0c7eb754b1eec427474be513ff6bd7837ce77ceb5f05853361616e302962fef4', + fixedAuthoredPrompts: true, + retainedImageLoadFields: true, + openingWebpSha256: '0afd006835683f29a96f60652958fe696713da2ac15bf75170e0e87b96860e15', +}; + +const framepackLanternRoute = { + ...wanA14BRoute, + format: 'modiff.private.framepack-lantern-opening.v1', + workflowId: 'HunyuanVideoFramepackPipeline:image_to_video', + modelType: 'HunyuanVideoFramepackPipeline', + modelRepo: 'lllyasviel/FramePackI2V_HY', + modelRevision: '86cef4396041b6002c957852daac4c91aaa47c79', + auxiliaryModels: [ + { repoId: 'hunyuanvideo-community/HunyuanVideo', revision: 'e8c2aaa66fe3742a32c11a6766aecbf07c56e773' }, + { repoId: 'lllyasviel/flux_redux_bfl', revision: '45b801affc54ff2af4e5daf1b282e0921901db87' }, + ], + sourceFingerprint: 'sha256:backend-source-v1:166b29e5c349734b73cf1012c791ce5fa5545c189bee7c5eb696258a8cb1c920', + retainedRegistryHash: 'cd72915788eec3784f2baf6753b624e8be958d872357df644d9261b296fa6c99', + previousExpertFamily: null, + executedTask: 'image_to_video', + bindsImage: true, + imageInputPort: 'reference_images', + bindSeed: false, + retainedImageLoadFields: true, + openingWebpSha256: '245deed3f2a8ac213c630ac7a8517c625c1eaa60971778d816a55220310ed8c3', + reviewedSettings: [ + ['generator', 'width', 768, 640], + ['generator', 'height', 512, 640], + ], + deliveredFrameCount: 109, + chain: [['source', 'modules.Image', 'Load', ''], ...wanA14BRoute.chain], +}; + +const ltx2AudioVideoRoutes = [ + ['LTX2Pipeline', 'text_to_video'], + ['LTX2ConditionPipeline', 'text_to_video'], + ['LTX2ConditionPipeline', 'image_to_video'], + ['LTX2ConditionPipeline', 'reference_to_video'], + ['LTX2ConditionPipeline', 'video_to_video'], +].map(([modelType, task]) => { + const bindsImage = ['image_to_video', 'reference_to_video'].includes(task); + const bindsVideoUpload = task === 'video_to_video'; + return { + ...wanA14BRoute, + format: 'modiff.private.ltx2-native-av-variant.v1', + workflowId: modelType + ':' + task, + modelType, + modelRepo: 'Lightricks/LTX-2', + modelRevision: '47da56e2ad66ce4125a9922b4a8826bf407f9d0a', + sourceFingerprint: 'sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7', + nativeJointAudio: true, + bindsImage, + imageInputPort: 'reference_images', + bindsVideoUpload, + originalVideoFrames: bindsVideoUpload ? 25 : undefined, + ...(bindsVideoUpload && { + reviewedVideoSources: new Map([ + // The retained stream recipe conditions at 0.60 to preserve the moving creek. + [ + '3b5e40ac2bf76236d1f901a7a2522addd7c4a1b2701bd89a33c1506b1523bc38', + { + settings: [['generator', 'strength', 0.8, 0.6]], + previousExpertFamily: 'LTXI2VLongMultiPromptPipeline', + }, + ], + ]), + }), + executedTask: task, + previousExpertFamily: undefined, + chain: [ + ...(bindsImage ? [['source', 'modules.Image', 'Load', '']] : []), + ...(bindsVideoUpload + ? [ + ['source', 'modules.Video', 'Load', ''], + ['normalize', 'modules.VideoConditioning', 'Normalize', 'height num_frames width'], + ] + : []), + ...wanA14BRoute.chain.slice(0, 3), + [ + 'generator', + 'modules.DiffusersVideo', + 'GenerateVideoAudio', + 'conditioning_scale frame_rate guidance_scale height max_sequence_length negative_prompt num_frames num_inference_steps output_type prompt seed strength true_cfg_scale width', + ], + ['preview', 'modules.Video', 'ExportWithAudio', 'fps'], + ], + }; +}); + +const subwaySoundtrack = { + repoId: 'ACE-Step/acestep-v15-xl-turbo-diffusers', + revision: '200ba991ae448051e14b0183157e35c2d27c9fb0', + modelType: 'AceStepPipeline', +}; +const wanSubwayRoute = { + ...wanA14BRoute, + format: 'modiff.private.wan-subway-soundtrack-variant.v1', + workflowId: 'WanTI2VPipeline:text_to_video', + modelType: 'WanTI2VPipeline', + modelRepo: 'Wan-AI/Wan2.2-TI2V-5B-Diffusers', + modelRevision: 'b8fff7315c768468a5333511427288870b2e9635', + sourceFingerprint: 'sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7', + retainedRegistryHash: '1c3c2335c07fde65bfddcdea34b2c9a51b91648c9afb04e0266e3fcbe1102b49', + baselinePromptHash: '893f3cf9925d3ddbd7c8ff60a052c5f4378ccb7731f907071b5936c19de33e22', + bindSeed: false, + soundtrack: subwaySoundtrack, + loaderContract: ['modules.DiffusersAudio.LoadPipeline', 'modules.DiffusersVideo.LoadPipeline'], + chain: [ + ['audioQuantization', ...wanA14BRoute.chain[0].slice(1)], + ['audioRecipe', ...wanA14BRoute.chain[1].slice(1)], + [ + 'audioLoader', + 'modules.DiffusersAudio', + 'LoadPipeline', + 'auto_offload device dtype enable_vae_tiling model_id offload_mode pipeline_class revision', + ], + [ + 'audioGenerator', + 'modules.DiffusersAudio', + 'Generate', + 'prompt lyrics audio_duration vocal_language num_inference_steps guidance_scale shift task_type keyscale timesignature bpm seed sample_rate', + ], + ['audioFit', 'modules.Audio', 'FitDuration', ''], + ...wanA14BRoute.chain.slice(0, -1), + ['preview', 'modules.Video', 'ExportWithAudio', 'fps'], + ], +}; + +const wanSubwayDefaultRoute = { + ...wanSubwayRoute, + format: 'modiff.private.wan-subway-soundtrack-default.v1', + canonicalDefaults: true, + sourceFingerprint: 'sha256:backend-source-v1:73c0d5622c9c305eb2c13478fbac4ca9ea09c71689c74d38679fa6af592c8964', + retainedRegistryHash: '0c7eb754b1eec427474be513ff6bd7837ce77ceb5f05853361616e302962fef4', +}; + +const ltxScheduledRoute = { + ...wanA14BRoute, + format: 'modiff.private.ltx-long-scheduled-image-variant.v1', + workflowId: 'LTXI2VLongMultiPromptPipeline:image_to_video', + modelType: 'LTXI2VLongMultiPromptPipeline', + modelRepo: 'Lightricks/LTX-Video-0.9.8-13B-distilled', + modelRevision: '7c64400e1861cc0d7b98d570a1926d5408ec60cd', + sourceFingerprint: 'sha256:backend-source-v1:70bc1ff7fe61307be52cfda86b38c6400f2156cbc8240a489b62ff19a93d58dc', + executedTask: 'image_to_video', + bindsImage: true, + imageInputPort: 'reference_images', + bindSeed: false, + chain: [['source', 'modules.Image', 'Load', ''], ...wanA14BRoute.chain], + retainedBaselineSettings: [ + ['generator', 'num_frames', 81, 129], + [ + 'generator', + 'prompt_segments_json', + '', + JSON.stringify([ + { + start_window: 0, + end_window: 0, + text: 'Wide eye-level shot from a fixed tripod at a rainy tram stop at blue hour. One red umbrella shelters a seated passenger. Fine rain falls and the warm shelter light reflects on the wet tracks and pavement.', + }, + { + start_window: 1, + end_window: 1, + text: 'Continue the same uncut fixed view. A distant pair of warm tram headlights approaches along the left tracks. Their reflections lengthen across the wet rails. The seated passenger and red umbrella stay beneath the same shelter.', + }, + ]), + ], + ], + configuredUnobservedControls: [ + 'prompt_segments_json', + 'segment_frame_length', + 'temporal_overlap', + 'temporal_overlap_condition_strength', + ], + reviewedOpeningImages: new Map([ + [ + '51624f59295a77119bf336a63bfc7731d33d6612bc44b15495bddabdfae3ef51', + { + sourceFingerprint: 'sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7', + retainedRegistryHash: '648c09b0af74fd0705adebb1b1e5c45d0a3ed41d0a5565fdd535f365664c3dc0', + previousExpertFamily: 'LTX2ConditionPipeline', + retainedBaselineSettings: [], + reviewedSettings: [ + ['generator', 'num_frames', 81, 129], + ['generator', 'strength', 0.8, 0.58], + [ + 'generator', + 'prompt_segments_json', + '', + JSON.stringify([ + { + start_window: 0, + end_window: 0, + text: 'At the same coastal lighthouse, start on the supplied frame. A strong gust runs through the tawny grass in the foreground, bending it right in clear waves. White sea foam swirls around the black rocks on the left. The camera slides right at walking speed, revealing parallax between foreground grass and the stable distant lighthouse. Natural gray dawn, one continuous shot.', + }, + { + start_window: 1, + end_window: 1, + text: 'Continue the unbroken rightward track along the same lighthouse headland. A broad incoming wave breaks bright white over the dark rocks on the left and rolls back as the camera passes the foreground grass. Keep the camera level and the tall white lighthouse steady on the skyline. Camera movement eases toward the end. Coherent coastline, real-time rolling surf.', + }, + ]), + ], + ], + }, + ], + ]), +}; + +const wanAnimateFiles = [ + ['face', 'face_video', 256, 256], + ['pose', 'pose_video', 768, 512], +]; +const wanAnimateRoute = { + ...wanA14BRoute, + format: 'modiff.private.wan-character-animate-inputs.v1', + workflowId: 'WanAnimatePipeline:character_animate', + modelType: 'WanAnimatePipeline', + previousExpertFamily: 'LattePipeline', + modelRepo: 'Wan-AI/Wan2.2-Animate-14B-Diffusers', + modelRevision: '6f4df10861c758af86ac3c979aacc1bf5c03eff0', + sourceFingerprint: 'sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7', + executedTask: 'character_animate', + bindsImage: true, + imageInputPort: 'reference_images', + retainedImageLoadFields: true, + bindSeed: false, + videoConditioners: wanAnimateFiles, + chain: [ + ['face', 'modules.Video', 'Load', ''], + ['source', 'modules.Image', 'Load', ''], + ['pose', 'modules.Video', 'Load', ''], + ...wanA14BRoute.chain, + ], +}; +const wanReplaceRoute = { + ...wanAnimateRoute, + format: 'modiff.private.wan-character-replace-inputs.v1', + workflowId: 'WanAnimatePipeline:character_replace', + previousExpertFamily: 'WanAnimatePipeline', + executedTask: 'character_replace', + videoConditioners: [...wanAnimateFiles, ['background', 'background_video', 768, 512], ['mask', 'mask', 768, 512]], + chain: [ + ['background', 'modules.Video', 'Load', ''], + ...wanAnimateRoute.chain.slice(0, 2), + ['mask', 'modules.Video', 'Load', ''], + ...wanAnimateRoute.chain.slice(2), + ], +}; + +const cogVideoRoute = { + ...wanA14BRoute, + format: 'modiff.private.cogvideox-video-prompt-variant.v1', + workflowId: 'CogVideoXPipeline:text_to_video', + modelType: 'CogVideoXPipeline', + previousExpertFamily: null, + modelRepo: 'zai-org/CogVideoX-2b', + modelRevision: '1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01', + retainedVaeTiling: true, +}; + +const cogVideoEditRoute = { + ...cogVideoRoute, + format: 'modiff.private.cogvideox-source-video-variant.v1', + workflowId: 'CogVideoXVideoToVideoPipeline:video_to_video', + modelType: 'CogVideoXVideoToVideoPipeline', + retainedVaeTiling: false, + executedTask: 'video_to_video', + bindsVideoUpload: true, + sourceFingerprint: 'sha256:backend-source-v1:43f2ed10792fc6167b963166287cf7d5a0429afa26029e6455b0418e2123be86', + chain: [ + ['source', 'modules.Video', 'Load', ''], + ['normalize', 'modules.VideoConditioning', 'Normalize', 'height num_frames width'], + ...cogVideoRoute.chain, + ], +}; + +const animateDiffPagRoute = { + ...wanA14BRoute, + format: 'modiff.private.animatediff-pag-video-prompt-variant.v1', + workflowId: 'AnimateDiffPAGPipeline:text_to_video', + modelType: 'AnimateDiffPAGPipeline', + platform: /^Windows-/u, + backend: 'cuda', + previousExpertFamily: 'AudioLDM2Pipeline', + modelRepo: 'stable-diffusion-v1-5/stable-diffusion-v1-5', + modelRevision: '451f4fe16113bff5a5d2269ed5ad43b0592e9a14', + motionAdapter: { + repoId: 'guoyww/animatediff-motion-adapter-v1-5-2', + revision: '6167b88ffe39b4441fdf2113e77b99a6f56b7906', + }, + configuredUnobservedControls: ['pag_scale', 'pag_adaptive_scale'], +}; + +const animateDiffEditRoute = { + ...cogVideoEditRoute, + format: 'modiff.private.animatediff-source-video-variant.v1', + workflowId: 'AnimateDiffVideoToVideoPipeline:video_to_video', + modelType: 'AnimateDiffVideoToVideoPipeline', + platform: animateDiffPagRoute.platform, + backend: animateDiffPagRoute.backend, + modelRepo: animateDiffPagRoute.modelRepo, + modelRevision: animateDiffPagRoute.modelRevision, + motionAdapter: animateDiffPagRoute.motionAdapter, + sourceFingerprint: 'sha256:backend-source-v1:2beaa95aae8558e64cf99f056b011d00c0653dc7d03987cd67c8ed7e774c770e', + replayedRuntimeContract: 'e5d045d5ecf997c0cfe8dba771fd92cfc1fef6d3e10d91791b2b5e747f384b3c', + reviewedSettings: [['generator', 'strength', 0.8, 0.45]], +}; + +const animateDiffGuideChain = [ + ['guide', 'modules.Video', 'Load', ''], + ['normalizeGuide', 'modules.VideoConditioning', 'Normalize', 'height num_frames width'], + ['edges', 'modules.VideoConditioning', 'EdgePreprocessor', ''], +]; + +const animateDiffGuideRoute = { + ...animateDiffEditRoute, + format: 'modiff.private.animatediff-guide-video-variant.v1', + workflowId: 'AnimateDiffControlNetPipeline:control_to_video', + modelType: 'AnimateDiffControlNetPipeline', + executedTask: 'control_to_video', + bindsVideoUpload: false, + bindsVideoGuide: true, + sourceFingerprint: 'sha256:backend-source-v1:a107f0838ce3b1be98034123eb3bf3393928a09c5ad7e3c133687d5a7c58be57', + reviewedSettings: [], + controlAdapter: { + repoId: 'lllyasviel/control_v11p_sd15_canny', + revision: '115a470d547982438f70198e353a921996e2e819', + }, + chain: [...animateDiffGuideChain, ...wanA14BRoute.chain], +}; + +const animateDiffGuidedEditRoute = { + ...animateDiffGuideRoute, + format: 'modiff.private.animatediff-source-and-guide-video-variant.v1', + workflowId: 'AnimateDiffVideoToVideoControlNetPipeline:control_video_to_video', + modelType: 'AnimateDiffVideoToVideoControlNetPipeline', + executedTask: 'control_video_to_video', + bindsVideoUpload: true, + sourceFingerprint: 'sha256:backend-source-v1:b4a707d462a5f13dae1660c1665ed5195f45ed4ffbfcd7d80de879cd881aea86', + chain: [...animateDiffGuideChain, ...animateDiffEditRoute.chain], +}; + +const allegroRoute = { + ...wanA14BRoute, + format: 'modiff.private.allegro-video-prompt-variant.v1', + workflowId: 'AllegroPipeline:text_to_video', + modelType: 'AllegroPipeline', + previousExpertFamily: 'AllegroPipeline', + modelRepo: 'rhymes-ai/Allegro', + modelRevision: 'c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6', + sourceFingerprint: 'sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7', + bindNegativePrompt: true, + retainedNativeMathDefault: true, + reviewedSettings: [ + ['recipe', 'attention_backend', '_native_math', 'auto'], + ['recipe', 'offload_mode', 'sequential_cpu', 'model_cpu'], + ], + retainedOffloadFallback: 'sequential_cpu', +}; + +const sanaVideoRoute = { + ...wanA14BRoute, + format: 'modiff.private.sana-video-prompt-variant.v1', + workflowId: 'SanaVideoPipeline:text_to_video', + modelType: 'SanaVideoPipeline', + previousExpertFamily: 'AllegroPipeline', + modelRepo: 'Efficient-Large-Model/SANA-Video_2B_480p_diffusers', + modelRevision: 'db5f398b13ca086d09a50ce156c20527773841b1', + bindNegativePrompt: true, +}; + +const sanaOpeningImageRoute = { + ...sanaVideoRoute, + format: 'modiff.private.sana-opening-image-variant.v1', + workflowId: 'SanaImageToVideoPipeline:image_to_video', + modelType: 'SanaImageToVideoPipeline', + previousExpertFamily: null, + executedTask: 'image_to_video', + bindsImage: true, + imageInputPort: 'reference_images', + retainedImageLoadFields: true, + retainedNativeMathDefault: true, + reviewedSettings: [['recipe', 'attention_backend', '_native_math', 'auto']], + chain: [['source', 'modules.Image', 'Load', ''], ...sanaVideoRoute.chain], +}; + +const stableVideoRoute = { + ...sanaOpeningImageRoute, + format: 'modiff.private.stable-video-opening-image-variant.v1', + workflowId: 'StableVideoDiffusionPipeline:image_to_video', + modelType: 'StableVideoDiffusionPipeline', + previousExpertFamily: 'StableVideoDiffusionPipeline', + modelRepo: 'stabilityai/stable-video-diffusion-img2vid-xt-1-1', + modelRevision: '043843887ccd51926e3efed36270444a838e7861', + sourceFingerprint: 'sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7', + imageOnly: true, + bindNegativePrompt: false, + retainedImageLoadFields: false, +}; + +const mochiVideoRoute = { + ...wanA14BRoute, + format: 'modiff.private.mochi-video-prompt-variant.v1', + workflowId: 'MochiPipeline:text_to_video', + modelType: 'MochiPipeline', + modelRepo: 'genmo/mochi-1-preview', + modelRevision: '14be5fcea23095ed330cb214647916a451e38b6e', + previousExpertFamily: 'SanaImageToVideoPipeline', + sourceFingerprint: 'sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7', + bindNegativePrompt: true, + retainedNativeMathDefault: true, + reviewedSettings: [['recipe', 'attention_backend', '_native_math', 'auto']], +}; + +const animateDiffVideoRoute = { + ...animateDiffPagRoute, + format: 'modiff.private.animatediff-video-prompt-variant.v1', + workflowId: 'AnimateDiffPipeline:text_to_video', + modelType: 'AnimateDiffPipeline', + previousExpertFamily: 'AnimateLCMPipeline', + sourceFingerprint: 'sha256:backend-source-v1:2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290', + configuredUnobservedControls: undefined, +}; + +const animateLcmVideoRoute = { + ...animateDiffVideoRoute, + format: 'modiff.private.animatelcm-video-prompt-variant.v1', + workflowId: 'AnimateLCMPipeline:text_to_video', + modelType: 'AnimateLCMPipeline', + motionAdapter: { repoId: 'wangfuyun/AnimateLCM', revision: '3d4d00fc113225e1040f4d3bec504b6ec750c10c' }, + lowRamTransitionFrom: 'StableDiffusionXLControlNetPAGImg2ImgPipeline', +}; + +const latteVideoRoute = { + ...wanA14BRoute, + format: 'modiff.private.latte-video-prompt-variant.v1', + workflowId: 'LattePipeline:text_to_video', + modelType: 'LattePipeline', + modelRepo: 'maxin-cn/Latte-1', + modelRevision: '0653024365272f061fc44d1078134df22842b687', + previousExpertFamily: 'WanAnimatePipeline', + sourceFingerprint: mochiVideoRoute.sourceFingerprint, + bindNegativePrompt: true, +}; + +const wanVaceVideoRoute = { + ...wanA14BRoute, + format: 'modiff.private.wan-vace-video-prompt-variant.v1', + workflowId: 'WanVACEPipeline:text_to_video', + modelType: 'WanVACEPipeline', + modelRepo: 'Wan-AI/Wan2.1-VACE-1.3B-diffusers', + modelRevision: 'ec4d2cb062b548996b179d493fdd05340de702a1', + previousExpertFamily: 'WanVACEPipeline', + sourceFingerprint: mochiVideoRoute.sourceFingerprint, + baselinePromptHash: '156339977073854795a350225015284e3676c45a49a30bff4d8120389e841848', + baselineNegativePromptHash: '767ef620d530158fb8c7a406c8b7f5f968b617d70b4d9eaf1796b4b5ffa57c98', + bindNegativePrompt: true, + videoUpscaler: { + repoId: 'nateraw/real-esrgan', + file: { + source: 'hub', + value: 'nateraw/real-esrgan/RealESRGAN_x2plus.pth', + revision: '42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094', + byteSize: 67061725, + sha256: '49fafd45f8fd7aa8d31ab2a22d14d91b536c34494a5cfe31eb5d89c2fa266abb', + license: 'bsd-3-clause', + }, + scale: 2, + }, + chain: [ + ...wanA14BRoute.chain.slice(0, -1), + ['upscaler', 'modules.Spandrel', 'Upscaler', 'device model_id'], + wanA14BRoute.chain.at(-1), + ], +}; + +const promptModelSet = (profile) => + [ + ...(profile.motionAdapter ? [profile.motionAdapter] : []), + ...(profile.controlAdapter ? [profile.controlAdapter] : []), + ...(profile.soundtrack ? [{ repoId: profile.soundtrack.repoId, revision: profile.soundtrack.revision }] : []), + ...(profile.auxiliaryModels ?? []), + { repoId: profile.modelRepo, revision: profile.modelRevision }, + ...(profile.videoUpscaler + ? [{ repoId: profile.videoUpscaler.file.value, revision: profile.videoUpscaler.file.revision }] + : []), + ].sort((left, right) => (left.repoId === right.repoId ? 0 : left.repoId < right.repoId ? -1 : 1)); + +const imagePromptRoute = { + outputKind: 'image', + displayType: 'image', + contentType: 'image/webp', + loaderContract: ['modules.DiffusersImage.LoadPipeline'], + bindSeed: true, + chain: [ + ['quantization', 'modules.DiffusersRuntime', 'PipelineQuantizationConfigV2', ''], + ['recipe', 'modules.DiffusersRuntime', 'DiffusersExecutionRecipe', ''], + ['loader', 'modules.DiffusersImage', 'LoadPipeline', ''], + ['generator', 'modules.DiffusersImage', 'Generate', ''], + ['preview', 'modules.Image', 'Preview', ''], + ], +}; + +const same = (actual, expected, message) => assert.equal(stableStringify(actual), stableStringify(expected), message); +const keys = (record, fields, message) => same(Object.keys(record ?? {}).sort(), [...fields].sort(), message); +const digest = (value) => createHash('sha256').update(value).digest('hex'); +const graphEnvelope = (graph, hinted = false) => + keys( + graph, + ['sid', 'nodes', 'paths', ...(hinted ? ['runtimeHints'] : [])], + 'Unreviewed prompt variant graph envelope.', + ); + +const hasFileInput = (profile, role) => + (role === 'source' && (profile.bindsImage || profile.bindsVideoUpload)) || + (role === 'guide' && profile.bindsVideoGuide) || + profile.videoConditioners?.some(([name]) => name === role); + +function owners(profile, api) { + const [path] = api.paths; + assert.equal(api.paths.length, 1, 'Expected one prompt variant execution path.'); + same( + [...path].sort(), + Object.keys(api.nodes).sort(), + 'Prompt variant contains an uncontrolled node or repeated path item.', + ); + assert.equal(path.length, profile.chain.length); + return Object.fromEntries( + profile.chain.map(([role, module, action, capturedFields], index) => { + const id = path[index]; + const node = api.nodes[id]; + keys(node, ['module', 'action', 'params'], 'Unreviewed prompt variant node definition.'); + assert.equal(node.module, module); + assert.equal(node.action, action); + const fileFields = Object.keys(node.params).filter((name) => node.params[name].display === 'filebrowser'); + same(fileFields, hasFileInput(profile, role) ? ['file'] : []); + return [role, { id, node, capturedFields: capturedFields ? capturedFields.split(' ') : [] }]; + }), + ); +} + +function bindReviewedSettings(owners, settings = []) { + for (const [role, field, defaultValue, reviewedValue] of settings) { + const param = owners[role].node.params[field]; + assert.equal(param.value, defaultValue); + assert.ok(!param.sourceId && !param.sourceKey, 'The reviewed setting must be literal.'); + param.value = reviewedValue; + } +} + +export function bindPromptVariant( + profile, + original, + created, + output, + baselineHash, + sourceValue, + guideValue, + videos = [], +) { + graphEnvelope(original); + graphEnvelope(created); + graphEnvelope(output, true); + const expected = structuredClone(original); + const expectedOwners = owners(profile, expected); + if (profile.retainedVaeTiling) { + const tiling = expectedOwners.recipe.node.params.vae_tiling; + same(tiling, { value: false }, 'CogVideoX tiling default changed.'); + tiling.value = true; + } + if (profile.executionDevice === 'cpu:0') bindRetainedCpuFloat32Recipe(expectedOwners); + if (profile.retainedNativeMathDefault) { + const attention = expectedOwners.recipe.node.params.attention_backend; + assert.ok(['auto', '_native_math'].includes(attention.value)); + assert.ok(!attention.sourceId && !attention.sourceKey); + // Verify the archive's literal pre-change graph identity before applying + // the recorded selection that became the current canonical default. + attention.value = '_native_math'; + } + bindReviewedSettings(expectedOwners, profile.retainedBaselineSettings); + const baseline = canonicalGraphIdentity(expected); + assert.equal(baseline.hash, baselineHash, 'The current authored prompt recipe differs from the original baseline.'); + bindReviewedSettings(expectedOwners, profile.reviewedSettings); + const expectedInputs = expectedOwners.generator.node.params; + if (profile.bindsImage) { + assert.match( + sourceValue, + profile.openingWebpSha256 + ? /^@data\/images\/[a-z0-9_-]{1,120}[.]webp$/iu + : /^@data\/images\/[a-z0-9_-]{1,120}[.]png$/iu, + ); + const { params } = expectedOwners.source.node; + same(params.file, { display: 'filebrowser', value: [] }); + assert.equal(params.alpha_channel.value, 'ignore'); + same(expectedInputs[profile.imageInputPort ?? 'images'], { + display: 'input', + sourceId: expectedOwners.source.id, + sourceKey: 'image', + }); + params.file.value = [sourceValue]; + } + if (profile.bindsVideoUpload) { + assert.match(sourceValue, /^@data\/videos\/[a-z0-9_-]{1,120}[.]mp4$/iu); + const { source, normalize } = expectedOwners; + same(source.node.params.file, { display: 'filebrowser', value: '' }); + same(normalize.node.params.video, { display: 'input', sourceId: source.id, sourceKey: 'video' }); + same(expectedInputs.video, { display: 'input', sourceId: normalize.id, sourceKey: 'output' }); + source.node.params.file.value = [sourceValue]; + } + if (profile.bindsVideoGuide) { + assert.match(guideValue, /^@data\/videos\/[a-z0-9_-]{1,120}[.]mp4$/iu); + assert.notEqual(guideValue, sourceValue, 'Guide and source must be distinct video selections.'); + const { guide, normalizeGuide, edges } = expectedOwners; + same(guide.node.params.file, { display: 'filebrowser', value: '' }); + same(normalizeGuide.node.params.video, { display: 'input', sourceId: guide.id, sourceKey: 'video' }); + same(edges.node.params.video, { display: 'input', sourceId: normalizeGuide.id, sourceKey: 'output' }); + same(expectedInputs.control_video, { display: 'input', sourceId: edges.id, sourceKey: 'output' }); + guide.node.params.file.value = [guideValue]; + } + for (const [role, port] of profile.videoConditioners ?? []) { + const { sourceValue } = videos.find((input) => input.role === role); + assert.match(sourceValue, /^@data\/videos\/[a-z0-9_-]{1,120}[.]mp4$/iu); + const owner = expectedOwners[role]; + same(owner.node.params.file, { display: 'filebrowser', value: '' }); + same(expectedInputs[port], { display: 'input', sourceId: owner.id, sourceKey: 'video' }); + owner.node.params.file.value = [sourceValue]; + } + const promptSlot = expectedInputs.prompt; + assert.equal( + profile.baselinePromptHash ? digest(promptSlot.value) : promptSlot.value, + profile.baselinePromptHash ?? profile.baselinePrompt ?? '', + 'The authored prompt differs from the reviewed default.', + ); + assert.ok(!promptSlot.sourceId, 'The authored prompt must be an unconnected literal.'); + const submittedOwners = owners(profile, output); + const prompt = submittedOwners.generator.node.params.prompt.value; + assert.ok(typeof prompt === 'string' && prompt.length <= 4096 && prompt.trim() === prompt); + if (profile.canonicalDefaults || profile.fixedAuthoredPrompts) + assert.equal(prompt, promptSlot.value, 'Canonical prompt cannot be changed.'); + else if (profile.imageOnly) assert.equal(prompt, promptSlot.value); + else assert.ok(prompt.length > 0); + assert.ok(!/[\u0000-\u001f\u007f]/u.test(prompt), 'Prompt exercise contains an unsupported control character.'); + promptSlot.value = prompt; + let negativePrompt; + if (profile.bindNegativePrompt) { + const slot = expectedInputs.negative_prompt; + const baselineValue = profile.baselineNegativePromptHash ? slot.value : ''; + assert.deepEqual(slot, { value: baselineValue, display: 'textarea' }); + if (profile.baselineNegativePromptHash) { + assert.equal(digest(slot.value), profile.baselineNegativePromptHash); + } + negativePrompt = submittedOwners.generator.node.params.negative_prompt.value; + assert.ok( + typeof negativePrompt === 'string' && negativePrompt.length <= 4096 && negativePrompt.trim() === negativePrompt, + ); + assert.ok(!/[\u0000-\u001f\u007f]/u.test(negativePrompt)); + if (profile.fixedAuthoredPrompts) + assert.equal(negativePrompt, slot.value, 'Canonical negative prompt cannot be changed.'); + slot.value = negativePrompt; + } + let seed; + if (profile.bindSeed) { + const seedSlot = expectedInputs.seed; + const actualSeed = submittedOwners.generator.node.params.seed; + for (const input of [seedSlot, actualSeed]) + assert.ok(input && !input.sourceId && !input.sourceKey, 'Prompt variant requires a literal seed.'); + const raw = actualSeed.value; + seed = typeof raw === 'string' && /^(?:0|[1-9][0-9]*)$/u.test(raw) ? Number(raw) : raw; + assert.ok(Number.isSafeInteger(seed) && seed >= 0, 'Prompt variant requires a safely representable unsigned seed.'); + seedSlot.value = raw; + } + const identity = canonicalGraphIdentity(expected); + if (profile.canonicalDefaults) { + same(identity, canonicalGraphIdentity(original), 'Canonical settings and wires cannot be changed.'); + } + const mismatch = profile.bindsImage + ? 'Image-bound variant changed the canonical graph outside its reviewed input and controls.' + : profile.bindSeed + ? 'Prompt variant changed a field or wire outside the bound prompt and seed.' + : 'Prompt variant changed a field or wire outside the empty prompt.'; + for (const graph of [created, output]) same(canonicalGraphIdentity(graph), identity, mismatch); + return { ...submittedOwners, identity, prompt, negativePrompt, expected, seed }; +} + +function validateConsumedPromptVariant(profile, bound, output, suppliedImage) { + const consumed = output.resolvedExecutionInputs; + assert.equal(consumed.schemaVersion, 1); + assert.equal(consumed.source, 'backend-execution'); + assert.equal(consumed.taskId, output.taskId); + assert.equal(consumed.attemptIndex, 0); + assert.equal(consumed.nodeId, bound.preview.id); + assert.equal(consumed.truncated, false); + for (const key of ['unavailableFields', 'uncapturedNodeIds']) same(consumed[key], []); + if (profile === audioRoute) { + same(bound.loader.node.params.execution_recipe, { + display: 'input', + sourceId: bound.recipe.id, + sourceKey: 'execution_recipe', + }); + assert.equal(bound.recipe.node.params.vae_tiling.value, false); + // The connected execution recipe wins over this retained loader fallback. + assert.equal(bound.loader.node.params.enable_vae_tiling.value, true); + same(consumed.ambiguousFields, ['vaeTiling']); + } else if (profile.soundtrack) { + same(consumed.ambiguousFields, [ + 'attentionBackend', + 'guidanceScale', + 'modelType', + 'outputType', + 'prompt', + 'repo', + 'revision', + 'seed', + 'steps', + ]); + } else if (profile.retainedOffloadFallback) { + assert.equal(bound.loader.node.params.offload_mode.value, profile.retainedOffloadFallback); + assert.equal(bound.recipe.node.params.offload_mode.value, 'model_cpu'); + same(consumed.ambiguousFields, ['offloadMode']); + } else { + // The loader and reviewed upscaler each supply a repository. Their + // typed records below independently bind the two selector values. + same(consumed.ambiguousFields, profile.videoUpscaler ? ['repo'] : []); + } + const roles = profile.chain.map(([role]) => bound[role]); + same( + consumed.nodes.map(({ nodeId }) => nodeId).sort(), + roles.map(({ id }) => id).sort(), + 'Native prompt variant scope differs.', + ); + let image; + for (const { id, node, capturedFields } of roles) { + const row = consumed.nodes.find(({ nodeId }) => nodeId === id); + assert.equal(row.module, node.module); + assert.equal(row.action, node.action); + same(row.omittedFields, {}); + if (profile.bindsImage && id === bound.source.id) { + let decodedImage; + if (profile.retainedImageLoadFields) { + assert.equal(row.mediaEvidence, undefined); + const [width] = row.fields.source_widths.value; + const [height] = row.fields.source_heights.value; + for (const dimension of [width, height]) assert.ok(Number.isSafeInteger(dimension) && dimension > 0); + same( + row.fields, + Object.fromEntries( + Object.entries({ + alpha_channel: 'ignore', + source_hashes: [suppliedImage.file.sha256], + source_widths: [width], + source_heights: [height], + source_modes: ['RGB'], + }).map(([field, value]) => [field, { value, source: 'literal' }]), + ), + 'Opening image differs from the retained Load fields.', + ); + decodedImage = { width, height, mode: 'RGB' }; + } else { + const native = verifyNativeLoadedImage(node, row, 'RGB'); + assert.equal(native.sourceFile.sourceValue, suppliedImage.sourceValue); + assert.equal( + native.sourceFile.sha256, + suppliedImage.file.sha256, + 'Source bytes differ from the native image load.', + ); + assert.equal(native.sourceFile.byteSize, suppliedImage.file.bytes); + decodedImage = native.decodedImage; + } + image = { nodeId: id, field: 'file', sha256: suppliedImage.file.sha256, decodedImage }; + continue; + } + const expected = Object.fromEntries( + capturedFields.map((field) => { + const { value, sourceId } = node.params[field]; + assert.notEqual(value, undefined); + assert.equal(sourceId, undefined); + return [field, { value: field === 'model_id' ? value.value : value, source: 'literal' }]; + }), + ); + if (profile.executedTask && id === bound.generator.id) { + expected.executed_task = { value: profile.executedTask, source: 'literal' }; + } + if (profile.soundtrack && id === bound.audioGenerator.id) { + expected.output_type = { value: 'pt', source: 'literal' }; + } + if (profile === audioRoute && id === bound.generator.id) { + assert.equal(node.params.negative_prompt.value, ''); + assert.equal(node.params.stable_audio_steps.value, 16); + assert.equal(node.params.stable_audio_guidance.value, 4); + assert.equal(node.params.audio_duration.value, 5); + for (const [name, value] of Object.entries({ + negative_prompt: null, + num_inference_steps: node.params.stable_audio_steps.value, + guidance_scale: node.params.stable_audio_guidance.value, + output_type: 'pt', + })) + expected[name] = { value, source: 'literal' }; + } + if ([audioLdmRoute, stableAudioRoute].includes(profile) && id === bound.generator.id) { + assert.equal(node.params.negative_prompt.value, ''); + expected.negative_prompt = { value: null, source: 'literal' }; + expected.output_type = { value: 'pt', source: 'literal' }; + // The generic audio contract exposes these controls for AudioLDM2. + // The ACE-style fallback values in the same graph are inactive. + assert.equal(node.params.audio_contract.value.fieldParams.num_inference_steps.hidden, true); + assert.equal(node.params.audio_contract.value.fieldParams.guidance_scale.hidden, true); + expected.num_inference_steps = { value: node.params.stable_audio_steps.value, source: 'literal' }; + expected.guidance_scale = { value: node.params.stable_audio_guidance.value, source: 'literal' }; + } + same(row.fields, expected, `Actual consumed fields differ for ${node.action}.`); + } + return image; +} + +function validateNativePromptRuntime(profile, bound, task, hints, graphCompleted, observations) { + const controlledArtifacts = []; + if (profile.soundtrack) { + const { repoId, revision, modelType } = profile.soundtrack; + for (const [loader, repository, pin, pipelineClass] of [ + [bound.audioLoader, repoId, revision, modelType], + [bound.loader, profile.modelRepo, profile.modelRevision, profile.modelType], + ]) { + const { module, action, params } = loader.node; + same(params.model_id.value, { source: 'hub', value: repository }); + assert.equal(params.revision.value, pin); + assert.equal(params.pipeline_class.value, pipelineClass); + const payload = { + schemaVersion: 1, + kind: 'diffusers_pipeline', + module, + action, + artifact: { source: 'hub', repository, revision: pin }, + pipelineClass, + }; + controlledArtifacts.push({ ...payload, descriptorSha256: digest(stableStringify(payload)) }); + } + } + if (profile.videoUpscaler) { + const { file, repoId: repository } = profile.videoUpscaler; + const { module, action, params } = bound.upscaler.node; + same(params.model_id.value, file); + assert.ok(file.value.startsWith(repository + '/')); + const payload = { + schemaVersion: 1, + kind: 'spandrel_upscaler', + module, + action, + artifact: { + source: file.source, + repository, + revision: file.revision, + weightName: file.value.slice(repository.length + 1), + sha256: file.sha256, + }, + }; + controlledArtifacts.push({ ...payload, descriptorSha256: digest(stableStringify(payload)) }); + } + same( + graphCompleted.runtimeHints, + { ...hints, controlledArtifacts, loaderContract: profile.loaderContract }, + 'Native completion has unreviewed runtime authority.', + ); + assert.match(task.runtimeFingerprint.packages.platform, profile.platform); + assert.equal(task.runtimeFingerprint.torch.cuda_available, true); + const runtime = selectBackendRuntimeFingerprintEvidence([task.runtimeFingerprint]); + assert.ok(runtime, 'Native runtime fingerprint is incomplete.'); + const { backend, device, peakMeasurementVersion, elapsedSeconds, peakAllocatedBytes } = task.runtimeMeasurement; + assert.equal(backend, profile.backend); + assert.equal(device, profile.executionDevice === 'cpu:0' ? 'cuda:0' : bound.loader.node.params.device.value); + assert.equal(peakMeasurementVersion, 2); + assert.ok(Number.isFinite(elapsedSeconds) && elapsedSeconds > 0 && elapsedSeconds <= 7200); + assert.ok(Number.isSafeInteger(peakAllocatedBytes)); + if (profile.executionDevice === 'cpu:0') assert.equal(peakAllocatedBytes, 0); + else assert.ok(peakAllocatedBytes > 0); + for (const { repoId, revision } of promptModelSet(profile)) { + const installedRepo = repoId === profile.videoUpscaler?.file.value ? profile.videoUpscaler.repoId : repoId; + const matching = observations.filter((observation) => selectInstalledModelIdentity(observation, installedRepo)); + assert.equal(matching.length, 1, 'Expected a single installed identity for ' + installedRepo); + const [observation] = matching; + assert.equal(observation.error, false); + assert.equal(observation.runtimeFingerprint, runtime.fingerprint); + assert.equal(observation.models.length, 1); + const model = selectInstalledModelIdentity(observation, installedRepo); + const [{ complete, repairRequired }] = observation.models; + assert.equal(complete, true); + assert.equal(repairRequired, false); + assert.equal(model.selectedRevision, revision); + assert.equal(model.modelRevision, installedRepo + '@' + revision); + } + same(bound.loader.node.params.model_id.value, { source: 'hub', value: profile.modelRepo }); + assert.equal(bound.loader.node.params.revision.value, profile.modelRevision); + if (profile.motionAdapter) { + const { motion_adapter_id, motion_adapter_revision } = bound.loader.node.params; + same(motion_adapter_id.value, { source: 'hub', value: profile.motionAdapter.repoId }); + assert.equal(motion_adapter_revision.value, profile.motionAdapter.revision); + } + return { runtime, measurement: task.runtimeMeasurement }; +} + +export function validateSampledCpuWorkerMemory(bytes, worker, source, task) { + keys(worker, ['origin', 'pid', 'source']); + assert.match(worker.origin, /^http:\/\/127[.]0[.]0[.]1:[1-9][0-9]{0,4}$/u); + assert.ok(Number.isSafeInteger(worker.pid) && worker.pid > 0); + assert.equal(worker.source.fingerprint, source.fingerprint); + assert.equal(worker.source.fileCount, source.files.length); + assert.equal(worker.source.gitCommit, source.gitCommit); + const samples = new TextDecoder('utf-8', { fatal: true }) + .decode(bytes) + .trim() + .split(/\r?\n/u) + .map((line) => JSON.parse(line)); + const { started_at: started, completed_at: completed } = task; + assert.ok(Number.isFinite(started) && Number.isFinite(completed) && completed > started); + assert.ok(samples.length >= 3 && samples.length <= 10000); + assert.ok(samples[0].unixTime <= started && started - samples[0].unixTime < 15); + assert.ok(samples.at(-1).unixTime >= completed && samples.at(-1).unixTime - completed < 15); + let previous = -Infinity; + let peak = 0; + for (const sample of samples) { + keys(sample, ['unixTime', 'hostAvailable', 'workerRss', 'accelerator']); + const { unixTime, workerRss, hostAvailable } = sample; + assert.ok(Number.isFinite(unixTime) && unixTime > previous); + if (Number.isFinite(previous)) assert.ok(unixTime - previous <= 3); + assert.ok(Number.isSafeInteger(workerRss) && workerRss > 0); + assert.ok(Number.isSafeInteger(hostAvailable) && hostAvailable > 0); + if (unixTime >= started && unixTime <= completed) peak = Math.max(peak, workerRss); + previous = unixTime; + } + assert.ok( + Number.isSafeInteger(task.runtimeMeasurement.processRssBytes) && task.runtimeMeasurement.processRssBytes > 0, + ); + assert.ok(peak >= task.runtimeMeasurement.processRssBytes); + return peak; +} + +export function validateImagePromptPreparation(preparation, { modelType, previousExpertFamily, lowRamTransitionFrom }) { + const previous = preparation?.previousModelFamily ?? null; + const lowRamTransition = previous !== null && previous === lowRamTransitionFrom; + assert.ok( + previous === null || previous === previousExpertFamily || lowRamTransition, + 'Unreviewed previous Expert model family.', + ); + if (lowRamTransition) { + // Four GiB is the lower bound of the backend's RAM safety floor. The + // retained task records both the pressure and the actual model release. + assert.ok( + preparation.performed === true && + preparation.availableRamBytes < 4 * 1024 ** 3 && + preparation.cleanup?.released?.models > 0, + 'The retained low-RAM transition lacks measured pressure or model release.', + ); + } + if (preparation?.performed !== true) { + validateUnmodifiedExpertPreparation(preparation, modelType, previous); + return; + } + const { cleanup, reasons, ...unchanged } = preparation; + validateUnmodifiedExpertPreparation( + { ...unchanged, performed: false, cleanup: null, reasons: [] }, + modelType, + previous, + ); + let reason = 'cached model family is unknown'; + if (previous === modelType) { + reason = `resource recipe changed within ${modelType}`; + } else if (previous !== null) { + reason = `model family changed from ${previous} to ${modelType}`; + } + same( + reasons, + lowRamTransition ? [reason, 'available system memory is below the safety floor'] : [reason], + 'Unreviewed direct image cache cleanup.', + ); + keys(cleanup, ['released', 'allocatorTrimmed', 'errors']); + same(cleanup.errors, [], 'Direct image cache cleanup failed.'); + assert.equal(typeof cleanup.allocatorTrimmed, 'boolean'); + keys(cleanup.released, ['nodes', 'models', 'diffusers_components', 'offload_files']); + assert.ok(Object.values(cleanup.released).every((count) => Number.isSafeInteger(count) && count >= 0)); +} + +function nativeTextResult(bytes, item) { + const text = new TextDecoder('utf-8', { fatal: true }).decode(bytes); + assert.ok(bytes.equals(Buffer.from(text)), 'Original JSON output encoding differs.'); + const payload = JSON.parse(text); + assert.ok(Array.isArray(payload) && payload.length === 1 && typeof payload[0] === 'string'); + assert.ok( + stableStringify(item.value) === stableStringify(payload), + 'Original text does not match the saved native output.', + ); + return JSON.parse(payload[0]); +} + +function validateGeneratedText(result, bound) { + assert.equal(result.schemaVersion, 1); + assert.ok(typeof result.text === 'string' && result.text.trim() && result.text.length <= 4096); + assert.ok(['stop', 'length'].includes(result.finishReason)); + assert.ok(Number.isSafeInteger(result.inputTokens) && result.inputTokens > 0); + assert.ok(Number.isSafeInteger(result.generatedTokens) && result.generatedTokens > 0); + assert.ok(result.generatedTokens <= bound.generator.node.params.max_new_tokens.value); +} + +export function validatePromptVariantText(bytes, item, bound, runtime) { + const result = nativeTextResult(bytes, item); + keys(result, ['schemaVersion', 'task', 'text', 'finishReason', 'inputTokens', 'generatedTokens', 'modelReceipt']); + assert.equal(result.task, 'text-generation'); + validateGeneratedText(result, bound); + const { receiptDigest, ...record } = result.modelReceipt; + const version = runtime.packages.transformers; + assert.match(version, /^\d+(?:\.\d+){2}(?:[a-z0-9.+-]+)?$/u); + same( + record, + { + schemaVersion: 1, + library: 'transformers', + task: 'text-generation', + loader: { modelAutoClass: 'AutoModelForCausalLM', preprocessorAutoClass: 'AutoTokenizer' }, + runtime: { + architectures: ['LlamaForCausalLM'], + device: bound.loader.node.params.device.value, + dtype: bound.loader.node.params.dtype.value, + modelClass: 'LlamaForCausalLM', + modelType: 'llama', + preprocessorClass: 'GPT2Tokenizer', + quantization: { mode: 'none' }, + transformersVersion: version, + }, + security: { hostedInference: false, localFilesOnly: true, safetensorsOnly: true, trustRemoteCode: false }, + source: { kind: 'hub', repository: textRoute.modelRepo, revision: textRoute.modelRevision }, + }, + 'Native text model-selection receipt differs from the executed local recipe.', + ); + assert.equal(receiptDigest, `sha256:${canonicalJsonHash(record)}`, 'Native text model receipt digest differs.'); + return { + schemaVersion: 1, + kind: 'json', + finishReason: result.finishReason, + inputTokens: result.inputTokens, + generatedTokens: result.generatedTokens, + modelReceiptDigest: receiptDigest, + }; +} + +function validateJanusPromptVariantText(bytes, item, bound, runtime, source) { + const result = nativeTextResult(bytes, item); + keys(result, [ + 'schemaVersion', + 'task', + 'adapter', + 'outputModality', + 'text', + 'image', + 'audio', + 'finishReason', + 'inputTokens', + 'generatedTokens', + 'inputImageCount', + 'inputMediaPixels', + 'modelReceipt', + ]); + assert.equal(result.task, 'any-to-any-generation'); + assert.equal(result.adapter, 'janus-v1'); + assert.equal(result.outputModality, 'text'); + assert.equal(result.image, null); + assert.equal(result.audio, null); + assert.equal(result.inputImageCount, source ? 1 : 0); + assert.equal(result.inputMediaPixels, source ? source.width * source.height : 0); + validateGeneratedText(result, bound); + const { receiptDigest, ...record } = result.modelReceipt; + const version = runtime.packages.transformers; + assert.match(version, /^\d+(?:\.\d+){2}(?:[a-z0-9.+-]+)?$/u); + same( + record, + { + schemaVersion: 1, + library: 'transformers', + task: 'any-to-any-generation', + adapter: { + adapterId: 'janus-v1', + imageGeneration: { height: 384, patchSize: 16, tokenCount: 576, width: 384 }, + inputModalities: ['image', 'text'], + modelType: 'janus', + outputModalities: ['image', 'text'], + }, + loader: { + configAutoClass: 'AutoConfig', + modelAutoClass: 'AutoModelForMultimodalLM', + pipelineClass: 'AnyToAnyPipeline', + preprocessorAutoClass: 'AutoProcessor', + }, + runtime: { + architectures: ['JanusForConditionalGeneration'], + device: bound.loader.node.params.device.value, + dtype: bound.loader.node.params.dtype.value, + modelClass: 'JanusForConditionalGeneration', + modelType: 'janus', + pipelineClass: 'AnyToAnyPipeline', + preprocessorClass: 'JanusProcessor', + transformersVersion: version, + }, + security: { hostedInference: false, localFilesOnly: true, safetensorsOnly: true, trustRemoteCode: false }, + source: { kind: 'hub', repository: janusTextRoute.modelRepo, revision: janusTextRoute.modelRevision }, + }, + 'Native Janus model-selection receipt differs from the executed local recipe.', + ); + assert.equal(receiptDigest, `sha256:${canonicalJsonHash(record)}`, 'Native Janus model receipt digest differs.'); + return { + schemaVersion: 1, + kind: 'json', + finishReason: result.finishReason, + inputTokens: result.inputTokens, + generatedTokens: result.generatedTokens, + modelReceiptDigest: receiptDigest, + }; +} + +function validateSmolVlmCaption(bytes, item, bound, runtime, source) { + const result = nativeTextResult(bytes, item); + keys(result, [ + 'schemaVersion', + 'task', + 'text', + 'finishReason', + 'inputTokens', + 'generatedTokens', + 'imageCount', + 'videoFrameCount', + 'mediaPixels', + 'modelReceipt', + ]); + assert.equal(result.task, 'image-video-to-text'); + assert.equal(result.imageCount, 1); + assert.equal(result.videoFrameCount, 0); + assert.equal(result.mediaPixels, source.width * source.height); + validateGeneratedText(result, bound); + const { receiptDigest, ...record } = result.modelReceipt; + const version = runtime.packages.transformers; + assert.match(version, /^\d+(?:\.\d+){2}(?:[a-z0-9.+-]+)?$/u); + same( + record, + { + schemaVersion: 1, + library: 'transformers', + task: 'image-video-to-text', + loader: { modelAutoClass: 'AutoModelForImageTextToText', preprocessorAutoClass: 'AutoProcessor' }, + runtime: { + architectures: ['Idefics3ForConditionalGeneration'], + device: bound.loader.node.params.device.value, + dtype: bound.loader.node.params.dtype.value, + modelClass: 'Idefics3ForConditionalGeneration', + modelType: 'idefics3', + preprocessorClass: 'Idefics3Processor', + quantization: { mode: 'none' }, + transformersVersion: version, + }, + security: { hostedInference: false, localFilesOnly: true, safetensorsOnly: true, trustRemoteCode: false }, + source: { kind: 'hub', repository: smolVlmCaptionRoute.modelRepo, revision: smolVlmCaptionRoute.modelRevision }, + }, + 'Native SmolVLM model-selection receipt differs from the executed local recipe.', + ); + assert.equal(receiptDigest, `sha256:${canonicalJsonHash(record)}`, 'Native SmolVLM model receipt digest differs.'); + return { + schemaVersion: 1, + kind: 'json', + finishReason: result.finishReason, + inputTokens: result.inputTokens, + generatedTokens: result.generatedTokens, + modelReceiptDigest: receiptDigest, + }; +} + +export function validatePromptVariantVideo(decoded, item, bound) { + const frameSize = bound.generator.node.params.frame_size.value; + const fps = bound.preview.node.params.fps.value; + return validateNativeVideoDelivery(decoded, item, { width: frameSize, height: frameSize, fps, frames: 20 }); +} + +export function validateNativeVideoDelivery( + decoded, + item, + { width, height, fps, frames, soundtrack = false, nativeJointAudio = false }, +) { + const native = item.mediaMetadata; + assert.equal(native.source, 'encoded-file'); + assert.equal(native.width, width); + assert.equal(native.height, height); + assert.equal(native.fps, fps); + assert.equal(native.frame_count, frames); + assert.ok(Math.abs(native.duration_seconds - native.frame_count / fps) <= 0.01); + same( + [decoded.width, decoded.height, decoded.fps, decoded.frames], + [native.width, native.height, native.fps, native.frame_count], + 'Decoded video properties differ from native encoded-file metadata.', + ); + assert.ok(Math.abs(decoded.durationSeconds - native.duration_seconds) <= 0.02); + assert.equal(decoded.codecName, 'h264'); + assert.equal(decoded.hasAudio, soundtrack || nativeJointAudio); + assert.equal(decoded.uniqueFrameRatio, 1); + const audio = decoded.embeddedAudio; + if (soundtrack || nativeJointAudio) { + assert.equal(audio?.sourceSampleRate, nativeJointAudio ? 24000 : 48000); + assert.equal(audio.channels, 2); + assert.equal(audio.clippedSampleRatio, 0); + if (soundtrack) assert.ok(audio.peakAmplitude > 0.05 && audio.silenceRatio < 0.75); + else assert.ok(audio.peakAmplitude > 0.001, 'The model did not emit measurable audio.'); + assert.match(audio.hash, /^sha256:decoded-audio-pcm-s16le-48000-stereo:[a-f0-9]{64}$/u); + } + return { + kind: 'video', + width: decoded.width, + height: decoded.height, + fps: decoded.fps, + frames: decoded.frames, + durationSeconds: decoded.durationSeconds, + hash: decoded.hash, + ...(soundtrack || nativeJointAudio ? { audio } : {}), + }; +} + +export async function readPromptVariantEvidence({ clientRoot, manifest, graph, authoring, artifact, evidencePath }) { + const target = canonicalWorkflowAuthoringContract(manifest, graph, authoring, artifact); + const stat = lstatSync(evidencePath); + assert.ok(stat.isFile() && !stat.isSymbolicLink() && stat.size > 0 && stat.size <= 65536); + const descriptorBytes = readFileSync(evidencePath); + const evidence = JSON.parse(descriptorBytes); + const imageRoute = directImagePromptRoutes.find(({ workflowId }) => workflowId === target.workflowId); + let profile = imageRoute + ? { ...imagePromptRoute, ...imageRoute } + : [ + textRoute, + janusTextRoute, + janusImageRoute, + janusCaptionRoute, + smolVlmCaptionRoute, + videoRoute, + audioRoute, + audioLdmRoute, + stableAudioRoute, + wanA14BRoute, + evidence.format === wanA14BDefaultOpeningRoute.format ? wanA14BDefaultOpeningRoute : wanA14BOpeningRoute, + framepackLanternRoute, + evidence.format === wanSubwayDefaultRoute.format ? wanSubwayDefaultRoute : wanSubwayRoute, + ...ltx2AudioVideoRoutes, + ltxScheduledRoute, + wanAnimateRoute, + wanReplaceRoute, + cogVideoRoute, + cogVideoEditRoute, + animateDiffPagRoute, + animateDiffEditRoute, + animateDiffGuideRoute, + animateDiffGuidedEditRoute, + allegroRoute, + sanaVideoRoute, + sanaOpeningImageRoute, + stableVideoRoute, + mochiVideoRoute, + animateDiffVideoRoute, + animateLcmVideoRoute, + latteVideoRoute, + wanVaceVideoRoute, + ].find(({ workflowId }) => workflowId === target.workflowId); + assert.ok(profile, 'Prompt variant route is not reviewed.'); + const generatedVideo = + profile.outputKind === 'video' && + (['text_to_video', 'image_to_video', 'video_to_video'].includes(profile.executedTask) || + profile.nativeJointAudio || + profile.bindsVideoGuide || + Boolean(profile.videoConditioners)); + const generatedAudio = [audioRoute, audioLdmRoute, stableAudioRoute].includes(profile); + const requiresOriginalRequest = + imageRoute !== undefined || + profile === janusTextRoute || + profile === janusImageRoute || + profile === janusCaptionRoute || + profile === smolVlmCaptionRoute || + generatedAudio || + generatedVideo; + const sampledCpuMemory = profile.executionDevice === 'cpu:0'; + same(target.modelSet, promptModelSet(profile)); + assert.equal(target.outputPlan.minimumAssetCount, 1); + assert.ok(target.outputPlan.mediaKinds.includes(profile.outputKind)); + keys(evidence, [ + 'schemaVersion', + 'format', + 'originalGraphHash', + 'workflowId', + 'creatorPackage', + 'outputPackage', + 'runDetail', + 'nodes', + 'backendSourceBefore', + 'backendSourceAfter', + 'graphCompleted', + 'modelObservations', + 'inputs', + 'outputs', + ...(requiresOriginalRequest ? ['graphRequest', 'graphAcknowledgment'] : []), + ...(profile.lateNativeSnapshot ? ['persistedOutputs'] : []), + ...(sampledCpuMemory ? ['worker', 'resourceSamples'] : []), + ...(profile.replayedRuntimeContract ? ['registryReplay'] : []), + ]); + assert.equal(evidence.schemaVersion, 1); + assert.equal(evidence.format, profile.format); + assert.equal(evidence.workflowId, profile.workflowId); + assert.ok(Array.isArray(evidence.inputs)); + const hasSourceInput = profile.bindsImage || profile.bindsVideoUpload; + const videoConditioners = profile.videoConditioners ?? []; + assert.equal( + evidence.inputs.length, + Number(Boolean(hasSourceInput)) + Number(Boolean(profile.bindsVideoGuide)) + videoConditioners.length, + ); + const suppliedInput = hasSourceInput ? evidence.inputs[0] : undefined; + const reviewedOpeningImage = profile.reviewedOpeningImages?.get(suppliedInput?.file?.sha256); + if (reviewedOpeningImage) profile = { ...profile, ...reviewedOpeningImage }; + const reviewedVideoSource = profile.reviewedVideoSources?.get(suppliedInput?.file?.sha256); + const suppliedGuide = profile.bindsVideoGuide ? evidence.inputs.at(-1) : undefined; + const suppliedVideos = videoConditioners.length ? evidence.inputs.slice(1) : []; + for (const input of evidence.inputs) { + keys(input, ['sourceValue', 'file', 'upload', ...(suppliedVideos.includes(input) ? ['role'] : [])]); + } + same( + suppliedVideos.map(({ role }) => role), + videoConditioners.map(([role]) => role), + 'The motion input roles differ from the exact recipe.', + ); + assert.equal(new Set(evidence.inputs.map(({ file }) => file.sha256)).size, evidence.inputs.length); + if (suppliedInput && suppliedGuide) assert.notEqual(suppliedInput.file.sha256, suppliedGuide.file.sha256); + assert.equal(evidence.modelObservations.length, target.modelSet.length); + assert.equal(evidence.outputs.length, 1); + const [outputRef] = evidence.outputs; + keys(outputRef, ['backendPath', 'mediaType', 'file']); + const root = realpathSync(dirname(evidencePath)); + const retainedFiles = []; + function read(ref, maximum = 16 * 1024 * 1024) { + const physical = readCanonicalEvidenceFile(root, ref, maximum); + retainedFiles.push({ ...ref, absolutePath: physical.file }); + return physical; + } + const json = (ref) => JSON.parse(read(ref).bytes); + const creator = json(evidence.creatorPackage); + const outputPackage = json(evidence.outputPackage); + const run = json(evidence.runDetail); + const graphCompleted = json(evidence.graphCompleted); + const submitted = outputPackage.latestOutput.apiGraphSnapshot; + const [expectedApi, creatorApi, outputApi, runApi] = await exportCanonicalWorkflowGraphs(clientRoot, [ + graph, + creator.graph, + outputPackage.latestOutput.graphSnapshot, + run.workflow_snapshot, + ]); + const bound = bindPromptVariant( + reviewedVideoSource ? { ...profile, reviewedSettings: reviewedVideoSource.settings } : profile, + expectedApi, + creator.apiGraph, + submitted, + evidence.originalGraphHash, + suppliedInput?.sourceValue, + suppliedGuide?.sourceValue, + suppliedVideos, + ); + for (const api of [creatorApi, outputApi, runApi]) { + graphEnvelope(api); + same( + canonicalGraphIdentity(api), + bound.identity, + 'Saved visual graph differs from the exact submitted prompt variant.', + ); + } + const runOptions = { + target, + outputNodeId: bound.preview.id, + displayType: profile.displayType, + creator, + outputPackage, + run, + graphCompleted, + ...(requiresOriginalRequest + ? { + graphRequest: json(evidence.graphRequest), + graphAcknowledgment: json(evidence.graphAcknowledgment), + } + : {}), + ...(imageRoute || (generatedVideo && !profile.soundtrack && !profile.nativeJointAudio) || profile === audioLdmRoute + ? { + validatePreparation: (preparation) => { + if (reviewedOpeningImage) { + assert.equal(preparation.previousModelFamily, profile.previousExpertFamily); + assert.equal(preparation.performed, true); + assert.ok(preparation.cleanup?.released?.models > 0, 'Expected the previous LTX model release.'); + } + validateImagePromptPreparation(preparation, profile); + }, + } + : {}), + ...(profile === videoRoute || profile === audioRoute || profile === stableAudioRoute + ? { validatePreparation: (preparation) => validateUnmodifiedExpertPreparation(preparation, target.modelType) } + : {}), + ...(profile.nativeJointAudio && { + validatePreparation: (preparation) => { + const previous = preparation.previousModelFamily; + if (reviewedVideoSource && previous === reviewedVideoSource.previousExpertFamily) { + assert.equal(preparation.performed, true); + assert.ok(preparation.cleanup?.released?.models > 0, 'Expected the previous LTX model release.'); + validateImagePromptPreparation(preparation, { + modelType: profile.modelType, + previousExpertFamily: reviewedVideoSource.previousExpertFamily, + }); + return; + } + assert.ok([null, 'LTX2Pipeline', 'LTX2ConditionPipeline'].includes(previous)); + validateUnmodifiedExpertPreparation(preparation, profile.modelType, previous); + }, + }), + }; + let validatedRun; + let accountingRun = run; + if (profile.lateNativeSnapshot) { + const store = json(evidence.persistedOutputs); + assert.equal(store.outputs.length, 1); + const [persistedOutput] = store.outputs; + validatedRun = validateLateNativeSingleAssetRun({ ...runOptions, persistedOutput }); + accountingRun = { ...run, outputs: [persistedOutput] }; + } else { + validatedRun = validateNativeVariantRun(runOptions); + } + const { task, output, hints } = validatedRun; + same(hints.workflowSnapshot.studioForm, output.formSnapshot, 'Run snapshot form differs from persisted form.'); + const source = backendSourceEvidence({ + before: json(evidence.backendSourceBefore).identity, + after: json(evidence.backendSourceAfter).identity, + runtimeFingerprint: task.runtimeFingerprint, + }); + same(source.blockers, [], 'Backend source differs from the running process.'); + if (profile.sourceFingerprint) { + assert.equal(source.identity.fingerprint, profile.sourceFingerprint, 'The archived source fingerprint differs.'); + } + const accounting = imageRoute + ? directImagePromptAccountingExecutionPlan({ + expectedApiGraph: bound.expected, + apiGraph: submitted, + consumed: output.resolvedExecutionInputs, + target, + runtimeEvidence: { run: accountingRun, output, graphCompleted, sourceFingerprint: source.identity.fingerprint }, + }) + : null; + let inputBinding = accounting ? undefined : validateConsumedPromptVariant(profile, bound, output, suppliedInput); + if (profile.bindsImage) { + const source = read(suppliedInput.file, (profile.nativeJointAudio ? 8 : 2) * 1024 * 1024); + const upload = json(suppliedInput.upload); + const { width, height } = inputBinding.decodedImage; + if (profile.openingWebpSha256) { + assert.equal(inputBinding.sha256, profile.openingWebpSha256, 'The authored opening image differs.'); + const { verifyRetainedWebpUpload } = await import('./private-image-edit-evidence.mjs'); + verifyRetainedWebpUpload(upload, suppliedInput, { width, height }, source.bytes); + } else { + assert.equal(upload.error, false); + assert.equal(upload.path, suppliedInput.sourceValue); + same( + upload.media, + { + filename: suppliedInput.sourceValue.split('/').at(-1), + extension: '.png', + sizeBytes: source.bytes.length, + sha256: inputBinding.sha256, + kind: 'image', + mimeType: 'image/png', + width, + height, + frames: 1, + }, + 'Caption input differs from the original image upload.', + ); + } + if (profile.retainedImageLoadFields) { + const { decodedMediaHash } = await import('./template-gallery-harness.mjs'); + const decoded = await decodedMediaHash(source.file, 'image'); + same([decoded.width, decoded.height], [width, height], 'Opening image dimensions differ from the original file.'); + } + } + const bindRetainedVideo = async (input, load, frames) => { + const { bytes, file } = read(input.file); + const upload = json(input.upload); + const { decodedMediaHash } = await import('./template-gallery-harness.mjs'); + const decoded = await decodedMediaHash(file, 'video'); + assert.equal(upload.error, false); + assert.equal(upload.path, input.sourceValue); + same( + upload.media, + { + filename: input.sourceValue.split('/').at(-1), + extension: '.mp4', + sizeBytes: bytes.length, + sha256: digest(bytes), + kind: 'video', + mimeType: 'video/mp4', + durationSeconds: decoded.durationSeconds, + width: decoded.width, + height: decoded.height, + }, + 'Archived video upload differs from the retained bytes.', + ); + assert.equal(decoded.frames, frames); + assert.equal(decoded.hasAudio, false); + return { + nodeId: load.id, + field: 'file', + sha256: digest(bytes), + decodedVideo: { + width: decoded.width, + height: decoded.height, + frames: decoded.frames, + fps: decoded.fps, + hash: decoded.hash, + }, + }; + }; + if (profile.bindsVideoUpload) { + const originalFrames = profile.originalVideoFrames ?? bound.normalize.node.params.num_frames.value; + inputBinding = await bindRetainedVideo(suppliedInput, bound.source, originalFrames); + } + const guideBinding = profile.bindsVideoGuide + ? await bindRetainedVideo(suppliedGuide, bound.guide, bound.normalizeGuide.node.params.num_frames.value) + : undefined; + const boundVideos = []; + for (const [index, [role, consumerPort, width, height]] of videoConditioners.entries()) { + const frames = bound.generator.node.params.num_frames.value; + const binding = await bindRetainedVideo(suppliedVideos[index], bound[role], frames); + same([binding.decodedVideo.width, binding.decodedVideo.height], [width, height]); + assert.equal(binding.decodedVideo.fps, bound.preview.node.params.fps.value); + boundVideos.push({ role, consumerPort, ...binding }); + } + if (!inputBinding) inputBinding = guideBinding; + const nodeBytes = read(evidence.nodes).bytes; + if (profile.retainedRegistryHash) assert.equal(digest(nodeBytes), profile.retainedRegistryHash); + const nodes = JSON.parse(nodeBytes); + if (profile.replayedRuntimeContract) { + same(json(evidence.registryReplay), { + scope: profile.bindsVideoGuide + ? 'metadata-only replay from exact source and runtime contract' + : 'Original nodes handler only, with exact source and runtime contract', + modelRuns: 0, + fileCount: source.identity.files.length, + sourceFingerprint: source.identity.fingerprint, + runtimeContract: profile.replayedRuntimeContract, + nodeHash: digest(nodeBytes), + nodeBytes: nodeBytes.length, + }); + } + const backendContract = backendContractIdentity(nodes, bound.identity.canonicalGraph); + assert.ok(backendContract.fingerprint, 'Native backend contract fingerprint is missing.'); + for (const [role, module, action] of profile.chain) { + const contract = (nodes.nodes ?? nodes)[`${module}.${action}`]; + assert.equal(contract?.module, module); + assert.equal(contract.action, action); + same( + Object.keys(contract.params).filter((name) => contract.params[name].display === 'filebrowser'), + hasFileInput(profile, role) ? ['file'] : [], + ); + } + const { runtime, measurement } = validateNativePromptRuntime( + profile, + bound, + task, + hints, + graphCompleted, + evidence.modelObservations.map(json), + ); + const peakMemoryBytes = sampledCpuMemory + ? validateSampledCpuWorkerMemory( + read(evidence.resourceSamples, 1024 * 1024).bytes, + json(evidence.worker), + source.identity, + task, + ) + : measurement.peakAllocatedBytes; + const mediaLimit = + (profile.soundtrack || profile.nativeJointAudio ? 64 : profile === stableAudioRoute ? 8 : 2) * 1024 * 1024; + const media = read(outputRef.file, mediaLimit); + const item = validateNativeVariantOutput({ + output, + outputRef, + task, + bytes: media.bytes, + displayType: profile.displayType, + contentType: profile.contentType, + }); + assert.match(output.id, /^run-output-[a-f0-9]{24}$/u); + const extension = { image: 'webp', json: 'txt', video: 'mp4', audio: 'wav' }[profile.outputKind]; + assert.equal(item.backendPath, `@data/studio/outputs/${output.id}_item_00.${extension}`); + assert.equal(output.mediaCollectionHash, `sha256:collection:${digest(JSON.stringify([item.mediaHash]))}`); + let decodedOutput; + if (profile === textRoute) { + decodedOutput = validatePromptVariantText(media.bytes, item, bound, runtime); + } else if (profile === janusTextRoute || profile === janusCaptionRoute) { + decodedOutput = validateJanusPromptVariantText(media.bytes, item, bound, runtime, inputBinding?.decodedImage); + } else if (profile === smolVlmCaptionRoute) { + decodedOutput = validateSmolVlmCaption(media.bytes, item, bound, runtime, inputBinding.decodedImage); + } else if (profile === videoRoute || generatedVideo) { + const { decodedMediaHash } = await import('./template-gallery-harness.mjs'); + const decoded = await decodedMediaHash(media.file, 'video'); + if (generatedVideo) { + const { width, height, num_frames } = bound.generator.node.params; + const scale = profile.videoUpscaler?.scale ?? 1; + decodedOutput = validateNativeVideoDelivery(decoded, item, { + width: width.value * scale, + height: height.value * scale, + frames: profile.deliveredFrameCount ?? num_frames.value, + fps: bound.preview.node.params.fps.value, + soundtrack: Boolean(profile.soundtrack), + nativeJointAudio: Boolean(profile.nativeJointAudio), + }); + } else decodedOutput = validatePromptVariantVideo(decoded, item, bound); + } else if (generatedAudio) { + assert.equal(media.bytes.toString('ascii', 0, 4), 'RIFF'); + assert.equal(media.bytes.toString('ascii', 8, 12), 'WAVE'); + const { decodedMediaHash } = await import('./template-gallery-harness.mjs'); + const decoded = await decodedMediaHash(media.file, 'audio'); + const rate = bound.generator.node.params.sample_rate.value; + const duration = bound.generator.node.params.audio_duration.value; + assert.equal(rate, profile === stableAudioRoute ? 48000 : profile === audioRoute ? 24000 : 16000); + assert.equal(duration, profile === stableAudioRoute ? 30 : profile === audioRoute ? 5 : 10); + assert.equal(decoded.sourceSampleRate, rate); + assert.equal(decoded.channels, profile === stableAudioRoute ? 2 : 1); + assert.equal(decoded.clippedSampleRatio, 0); + assert.ok(decoded.durationSeconds >= duration - 0.1 && decoded.durationSeconds <= duration); + assert.ok(decoded.peakAmplitude > 0.05 && decoded.silenceRatio < 0.75); + decodedOutput = { + kind: 'audio', + hash: decoded.hash, + durationSeconds: decoded.durationSeconds, + sampleRate: decoded.sourceSampleRate, + channels: decoded.channels, + }; + } else { + const { decodedMediaHash, technicalMediaErrors } = await import('./template-gallery-harness.mjs'); + const decoded = await decodedMediaHash(media.file, 'image'); + same(technicalMediaErrors(decoded, { width: item.width, height: item.height }), []); + if (profile === janusImageRoute) { + same([decoded.width, decoded.height], [384, 384], 'Janus image dimensions differ from the reviewed image route.'); + } + decodedOutput = { kind: 'image', hash: decoded.hash, width: decoded.width, height: decoded.height }; + } + for (const ref of retainedFiles) { + readCanonicalEvidenceFile(root, ref, ref.path === outputRef.file.path ? mediaLimit : 16 * 1024 * 1024); + } + assert.ok(readFileSync(evidencePath).equals(descriptorBytes), 'Prompt variant descriptor changed during validation.'); + const receipt = { + schemaVersion: 1, + format: 'modiff.canonical-workflow-run-receipt.v1', + proofKind: inputBinding ? 'real_backend_input_bound_model_variant' : 'real_backend_prompt_bound_model_variant', + ...target, + taskId: task.task_id, + outputId: output.id, + capturedAt: new Date(task.completed_at * 1000).toISOString(), + graphHash: bound.identity.hash, + runtimeFingerprint: normalizeBackendRuntime(runtime).lockFingerprint, + backendSourceFingerprint: source.identity.fingerprint, + backendContractFingerprint: backendContract.fingerprint, + resourceCandidateId: null, + outputHash: item.mediaHash, + executionDurationSeconds: measurement.elapsedSeconds, + peakMemoryBytes, + canonicalDefaultsExecuted: profile.canonicalDefaults === true, + promptBinding: { nodeId: bound.generator.id, field: 'prompt', sha256: digest(bound.prompt) }, + ...(profile.bindNegativePrompt + ? { + negativePromptBinding: { + nodeId: bound.generator.id, + field: 'negative_prompt', + sha256: digest(bound.negativePrompt), + }, + } + : {}), + ...(inputBinding ? { inputBinding } : {}), + ...(guideBinding ? { guideBinding } : {}), + ...(boundVideos.length ? { videoConditionBindings: boundVideos } : {}), + ...(accounting ? { seedBinding: { nodeId: bound.generator.id, field: 'seed', value: bound.seed } } : {}), + decodedOutput, + observationLimits: { + fullConsumedFieldAccounting: Boolean(accounting && !accounting.retainedGenerator), + physicalPlatformQualification: false, + ...(profile.soundtrack ? { configuredAudioFitObserved: false, audiovisualSynchronizationReviewed: false } : {}), + ...(profile.nativeJointAudio ? { audiovisualSynchronizationReviewed: false } : {}), + ...(accounting?.retainedGenerator && imageRoute.typedOnly?.length + ? { configuredUnobservedControls: [...imageRoute.typedOnly] } + : {}), + ...(sampledCpuMemory ? { memoryMeasurement: 'sampled_worker_rss' } : {}), + ...(profile.bindsVideoUpload + ? { sourceVideoByteWitness: 'original-upload-and-typed-wire', normalizedConsumerFramesObserved: false } + : {}), + ...(profile.motionAdapter ? { motionAdapterBoundByGraph: true } : {}), + ...(profile.bindsVideoGuide + ? { + guideVideoByteWitness: 'original-upload-normalize-and-edge-wire', + normalizedGuideFramesObserved: false, + controlAdapterObservedAsInstalled: true, + controlAdapterAppliedObserved: false, + } + : {}), + ...(profile.configuredUnobservedControls + ? { configuredUnobservedControls: profile.configuredUnobservedControls } + : {}), + ...(profile.retainedOffloadFallback ? { retainedLoaderOffloadFallback: profile.retainedOffloadFallback } : {}), + ...(profile.retainedImageLoadFields + ? { openingImageLoadFieldsObserved: true, samplerInputPixelsObserved: false } + : {}), + ...(profile.deliveredFrameCount !== undefined + ? { + requestedFrames: bound.generator.node.params.num_frames.value, + nativeDeliveredFrames: profile.deliveredFrameCount, + } + : {}), + ...(boundVideos.length + ? { motionVideoBytesWitnessed: 'original-uploads-and-typed-wires', consumedMotionFramesObserved: false } + : {}), + ...(profile === wanA14BOpeningRoute + ? { openingImageByteWitness: 'native-load-and-upload-with-typed-wire', samplerInputPixelsObserved: false } + : {}), + }, + qualificationClaims: { + publicTemplate: false, + qualityApproved: false, + rightsApproved: false, + hardwareQualified: false, + modelResourceQualified: false, + }, + }; + return { + receipt, + provenance: { + format: inputBinding ? 'modiff.input-bound-model-variant-proof.v1' : 'modiff.prompt-bound-model-variant-proof.v1', + receipt, + }, + evidence, + descriptorBytes, + retainedFiles, + evidenceRoot: root, + }; +} diff --git a/scripts/prompt-variant-evidence.test.mjs b/scripts/prompt-variant-evidence.test.mjs new file mode 100644 index 00000000..7e3e9fb3 --- /dev/null +++ b/scripts/prompt-variant-evidence.test.mjs @@ -0,0 +1,1031 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { dirname, join, resolve } from 'node:path'; +import test from 'node:test'; +import { fileURLToPath } from 'node:url'; +import { canonicalJsonHash } from './canonical-json.mjs'; +import { canonicalGraphIdentity, directImagePromptRoutes } from './live-proof-provenance.mjs'; +import { verifyRetainedStructuredText } from './retained-structured-text-evidence.mjs'; +import { + bindPromptVariant, + validateNativeVideoDelivery, + validatePromptVariantText, + validatePromptVariantVideo, + validateSampledCpuWorkerMemory, +} from './prompt-variant-evidence.mjs'; +import { + exportCanonicalWorkflowGraphs, + readCanonicalEvidenceFile, + readCanonicalWorkflowEvidence, +} from './release-contract-core.mjs'; + +const clientRoot = fileURLToPath(new URL('..', import.meta.url)); +const backendRoot = resolve(process.env.MODIFF_BACKEND_DIR ?? join(clientRoot, '../MoDiff')); +const digest = (value) => createHash('sha256').update(value).digest('hex'); + +const subwayDefaultEvidence = process.env.MODIFF_WAN_SUBWAY_DEFAULT_EVIDENCE; +test( + 'the original Subway run verifies both pinned models and its unchanged template', + { skip: !subwayDefaultEvidence }, + async () => { + const { receipt } = await readCanonicalWorkflowEvidence({ + clientRoot, + backendRoot, + workflowId: 'WanTI2VPipeline:text_to_video', + evidencePath: subwayDefaultEvidence, + }); + assert.equal(receipt.taskId, 'q1OmLM7R0ueK'); + assert.equal(receipt.sourceTemplateId, 'wan_22_ti2v_5b_seed_vault'); + assert.equal(receipt.canonicalDefaultsExecuted, true); + assert.deepEqual( + receipt.modelSet.map(({ repoId }) => repoId), + ['ACE-Step/acestep-v15-xl-turbo-diffusers', 'Wan-AI/Wan2.2-TI2V-5B-Diffusers'], + ); + assert.equal(receipt.decodedOutput.frames, 121); + assert.ok(receipt.decodedOutput.audio); + assert.ok(Object.values(receipt.qualificationClaims).every((claim) => claim === false)); + }, +); + +const miseEvidence = process.env.MODIFF_WAN_A14B_DEFAULT_OPENING_EVIDENCE; +test( + 'Final Mise en Place binds the original WebP in the current generic Generate recipe', + { skip: !miseEvidence }, + async () => { + const { receipt } = await readCanonicalWorkflowEvidence({ + clientRoot, + backendRoot, + workflowId: 'WanImageToVideoPipeline:image_to_video', + evidencePath: miseEvidence, + }); + assert.equal(receipt.taskId, 'JFza3SGd1h5j'); + assert.equal(receipt.sourceTemplateId, 'wan_22_i2v_seed_vault'); + assert.equal(receipt.inputBinding.sha256, '0afd006835683f29a96f60652958fe696713da2ac15bf75170e0e87b96860e15'); + assert.deepEqual(receipt.inputBinding.decodedImage, { width: 1536, height: 1024, mode: 'RGB' }); + assert.equal(receipt.decodedOutput.frames, 81); + assert.equal(receipt.observationLimits.openingImageLoadFieldsObserved, true); + assert.ok(Object.values(receipt.qualificationClaims).every((claim) => claim === false)); + }, +); + +const framepackEvidence = process.env.MODIFF_FRAMEPACK_LANTERN_EVIDENCE; +test( + 'FramePack binds the three installed snapshots and reports its window-rounded delivery', + { skip: !framepackEvidence }, + async () => { + const { receipt } = await readCanonicalWorkflowEvidence({ + clientRoot, + backendRoot, + workflowId: 'HunyuanVideoFramepackPipeline:image_to_video', + evidencePath: framepackEvidence, + }); + assert.equal(receipt.taskId, 'BvrI_dBb3QPQ'); + assert.equal(receipt.modelSet.length, 3); + assert.equal(receipt.observationLimits.requestedFrames, 81); + assert.equal(receipt.observationLimits.nativeDeliveredFrames, 109); + assert.equal(receipt.decodedOutput.frames, 109); + assert.ok(Object.values(receipt.qualificationClaims).every((claim) => claim === false)); + }, +); + +for (const [workflowId, environment, proofKind, output] of [ + [ + 'StableAudioPipeline:text_to_audio', + 'MODIFF_STABLE_AUDIO_EVIDENCE', + 'real_backend_prompt_bound_model_variant', + { kind: 'audio', durationSeconds: 30, sampleRate: 48000, channels: 2 }, + ], + [ + 'StableVideoDiffusionPipeline:image_to_video', + 'MODIFF_STABLE_VIDEO_EVIDENCE', + 'real_backend_input_bound_model_variant', + { kind: 'video', width: 1024, height: 576, fps: 7, frames: 25 }, + ], +]) { + const evidencePath = process.env[environment]; + test(`original ${workflowId} capture binds the native output`, { skip: !evidencePath }, async () => { + const { receipt } = await readCanonicalWorkflowEvidence({ clientRoot, backendRoot, workflowId, evidencePath }); + assert.equal(receipt.proofKind, proofKind); + for (const [key, value] of Object.entries(output)) assert.equal(receipt.decodedOutput[key], value); + assert.ok(Object.values(receipt.qualificationClaims).every((claim) => claim === false)); + if (output.kind === 'video') assert.match(receipt.inputBinding.sha256, /^[a-f0-9]{64}$/u); + }); +} + +test('joint audio-video evidence keeps native LTX audio separate from the fitted soundtrack contract', () => { + const shape = { width: 768, height: 512, frames: 81, fps: 24 }; + const item = { + mediaMetadata: { + source: 'encoded-file', + width: 768, + height: 512, + frame_count: 81, + fps: 24, + duration_seconds: 3.38, + }, + }; + const decoded = { + ...shape, + durationSeconds: 3.38, + uniqueFrameRatio: 1, + codecName: 'h264', + hasAudio: true, + embeddedAudio: { + sourceSampleRate: 24000, + channels: 2, + clippedSampleRatio: 0, + peakAmplitude: 0.01, + silenceRatio: 0.95, + hash: 'sha256:decoded-audio-pcm-s16le-48000-stereo:' + 'a'.repeat(64), + }, + }; + const joint = { ...shape, nativeJointAudio: true }; + assert.deepEqual(validateNativeVideoDelivery(decoded, item, joint).audio, decoded.embeddedAudio); + assert.throws(() => validateNativeVideoDelivery({ ...decoded, hasAudio: false }, item, joint)); + const wrongRate = { ...decoded, embeddedAudio: { ...decoded.embeddedAudio, sourceSampleRate: 48000 } }; + assert.throws(() => validateNativeVideoDelivery(wrongRate, item, joint)); + assert.throws(() => validateNativeVideoDelivery(wrongRate, item, { ...shape, soundtrack: true })); +}); + +test('a CPU capture measures sampled worker memory within its exact original task interval', () => { + const source = { fingerprint: 'original', gitCommit: null, files: [{}] }; + const worker = { + origin: 'http://127.0.0.1:8088', + pid: 123, + source: { fingerprint: source.fingerprint, gitCommit: null, fileCount: 1 }, + }; + const task = { started_at: 9.5, completed_at: 11.5, runtimeMeasurement: { processRssBytes: 100 } }; + const samples = [ + { unixTime: 9, hostAvailable: 1000, workerRss: 999, accelerator: '{}' }, + { unixTime: 10, hostAvailable: 1000, workerRss: 180, accelerator: '{}' }, + { unixTime: 11, hostAvailable: 1000, workerRss: 120, accelerator: '{}' }, + { unixTime: 12, hostAvailable: 1000, workerRss: 999, accelerator: '{}' }, + ]; + const capture = (entries) => Buffer.from(entries.map((entry) => JSON.stringify(entry)).join('\n')); + assert.equal(validateSampledCpuWorkerMemory(capture(samples), worker, source, task), 180); + assert.throws(() => validateSampledCpuWorkerMemory(capture(samples.slice(0, -1)), worker, source, task)); + assert.throws(() => + validateSampledCpuWorkerMemory(capture(samples), worker, { ...source, fingerprint: 'other' }, task), + ); + const contradicted = { ...task, runtimeMeasurement: { processRssBytes: 300 } }; + assert.throws(() => validateSampledCpuWorkerMemory(capture(samples), worker, source, contradicted)); + const unordered = [samples[0], samples[2], samples[1], samples[3]]; + assert.throws(() => validateSampledCpuWorkerMemory(capture(unordered), worker, source, task)); +}); + +test('a prompt variant fills a single empty literal and keeps all other fields and connections', () => { + const profile = { + chain: [ + ['loader', 'Fixture', 'Load', 'device'], + ['generator', 'Fixture', 'Generate', 'prompt'], + ['preview', 'Fixture', 'Preview', ''], + ], + }; + const baseline = { + sid: 'fixture', + paths: [['a', 'b', 'c']], + nodes: { + a: { module: 'Fixture', action: 'Load', params: { device: { value: 'cuda:0' } } }, + b: { + module: 'Fixture', + action: 'Generate', + params: { prompt: { value: '' }, model: { display: 'input', sourceId: 'a', sourceKey: 'model' } }, + }, + c: { + module: 'Fixture', + action: 'Preview', + params: { input: { display: 'input', sourceId: 'b', sourceKey: 'result' } }, + }, + }, + }; + const creator = structuredClone(baseline); + creator.nodes.b.params.prompt.value = 'One example'; + const submitted = { ...structuredClone(creator), runtimeHints: {} }; + const baselineHash = canonicalGraphIdentity(baseline).hash; + assert.equal(bindPromptVariant(profile, baseline, creator, submitted, baselineHash).prompt, 'One example'); + assert.equal(baseline.nodes.b.params.prompt.value, ''); + const exactProfile = { ...profile, canonicalDefaults: true }; + assert.throws( + () => bindPromptVariant(exactProfile, baseline, creator, submitted, baselineHash), + /Canonical prompt cannot be changed/u, + ); + const exactSubmission = { ...structuredClone(baseline), runtimeHints: {} }; + const changedDefault = { ...exactProfile, reviewedSettings: [['loader', 'device', 'cuda:0', 'cpu']] }; + assert.throws( + () => bindPromptVariant(changedDefault, baseline, baseline, exactSubmission, baselineHash), + /Canonical settings and wires cannot be changed/u, + ); + + const wrongControl = structuredClone(submitted); + wrongControl.nodes.a.params.device.value = 'cpu'; + assert.throws( + () => bindPromptVariant(profile, baseline, creator, wrongControl, baselineHash), + /outside the empty prompt/u, + ); + const wrongWire = structuredClone(submitted); + wrongWire.nodes.b.params.model.sourceKey = 'alternate'; + assert.throws( + () => bindPromptVariant(profile, baseline, creator, wrongWire, baselineHash), + /outside the empty prompt/u, + ); + const disconnectedNode = structuredClone(submitted); + disconnectedNode.nodes.d = disconnectedNode.nodes.b; + assert.throws( + () => bindPromptVariant(profile, baseline, creator, disconnectedNode, baselineHash), + /uncontrolled node/u, + ); + assert.throws( + () => bindPromptVariant(profile, baseline, creator, { ...submitted, deterministicMode: {} }, baselineHash), + /envelope/u, + ); +}); + +test('an image prompt variant binds the authored seed with the prompt and accepts no other controls', () => { + const profile = { + bindSeed: true, + chain: [['generator', 'Fixture', 'Generate', 'prompt seed']], + }; + const baseline = { + sid: 'fixture', + paths: [['generator']], + nodes: { + generator: { + module: 'Fixture', + action: 'Generate', + params: { prompt: { value: '' }, seed: { value: 42 }, num_inference_steps: { value: 2 } }, + }, + }, + }; + const creator = structuredClone(baseline); + creator.nodes.generator.params.prompt.value = 'A close photograph of a painted ceramic bowl.'; + creator.nodes.generator.params.seed.value = 1093; + const submitted = { ...structuredClone(creator), runtimeHints: {} }; + const baselineHash = canonicalGraphIdentity(baseline).hash; + const bound = bindPromptVariant(profile, baseline, creator, submitted, baselineHash); + assert.equal(bound.seed, 1093); + assert.deepEqual(bound.expected.nodes.generator.params, creator.nodes.generator.params); + assert.equal(baseline.nodes.generator.params.seed.value, 42); + + const wrongStep = structuredClone(submitted); + wrongStep.nodes.generator.params.num_inference_steps.value = 4; + assert.throws(() => bindPromptVariant(profile, baseline, creator, wrongStep, baselineHash), /outside the bound/u); + const invalidSeed = structuredClone(submitted); + invalidSeed.nodes.generator.params.seed.value = -1; + assert.throws(() => bindPromptVariant(profile, baseline, creator, invalidSeed, baselineHash), /unsigned seed/u); + const connectedSeed = structuredClone(submitted); + connectedSeed.nodes.generator.params.seed.sourceId = 'generator'; + assert.throws(() => bindPromptVariant(profile, baseline, creator, connectedSeed, baselineHash), /literal seed/u); +}); + +test('retained Janus text and captions preserve the output modality and source image binding', () => { + const model = { + source: { + repository: 'deepseek-community/Janus-Pro-1B', + revision: '1655280bb75959cc1cb85529a2a8b26e7016072e', + }, + }; + const modelReceiptDigest = `sha256:${canonicalJsonHash(model)}`; + const sourceImage = { decodedImage: { width: 640, height: 512 } }; + for (const caption of [false, true]) { + const receipt = { + schemaVersion: 1, + format: 'modiff.canonical-workflow-run-receipt.v1', + proofKind: caption ? 'real_backend_input_bound_model_variant' : 'real_backend_prompt_bound_model_variant', + workflowId: `HuggingFaceAnyToAnyModel:${caption ? 'image_to_text' : 'text_generation'}`, + modelSet: [{ repoId: model.source.repository, revision: model.source.revision }], + decodedOutput: { + schemaVersion: 1, + kind: 'json', + finishReason: 'stop', + inputTokens: 7, + generatedTokens: 5, + modelReceiptDigest, + }, + ...(caption && { inputBinding: sourceImage }), + }; + const native = { + schemaVersion: 1, + task: 'any-to-any-generation', + outputModality: 'text', + text: caption ? 'A red triangle on white.' : 'Reykjavik is the capital of Iceland.', + finishReason: 'stop', + inputTokens: 7, + generatedTokens: 5, + inputImageCount: caption ? 1 : 0, + inputMediaPixels: caption ? 640 * 512 : 0, + modelReceipt: { ...model, receiptDigest: modelReceiptDigest }, + }; + function verify(result, receiptOverrides = {}) { + const transportBytes = Buffer.from(JSON.stringify([JSON.stringify(result)])); + const structuredBytes = Buffer.from(JSON.stringify(result)); + return verifyRetainedStructuredText({ + receipt: { ...receipt, outputHash: `sha256:bytes:${digest(transportBytes)}`, ...receiptOverrides }, + transportBytes, + structuredBytes, + outputSha256: digest(structuredBytes), + }); + } + assert.equal(verify(native).decodedMediaHash, `sha256:canonical-json:${canonicalJsonHash(native)}`); + assert.throws(() => verify(native, { inputBinding: caption ? undefined : sourceImage }), /source evidence/u); + assert.throws(() => verify({ ...native, outputModality: 'image' })); + assert.throws(() => verify({ ...native, inputImageCount: 2 })); + assert.throws(() => verify({ ...native, inputMediaPixels: 1 })); + } +}); + +test('the native text output binds exact durable JSON, prompt route and local model receipt', () => { + const model = { + schemaVersion: 1, + library: 'transformers', + task: 'text-generation', + loader: { modelAutoClass: 'AutoModelForCausalLM', preprocessorAutoClass: 'AutoTokenizer' }, + runtime: { + architectures: ['LlamaForCausalLM'], + device: 'cuda:0', + dtype: 'float32', + modelClass: 'LlamaForCausalLM', + modelType: 'llama', + preprocessorClass: 'GPT2Tokenizer', + quantization: { mode: 'none' }, + transformersVersion: '5.18.0', + }, + security: { hostedInference: false, localFilesOnly: true, safetensorsOnly: true, trustRemoteCode: false }, + source: { + kind: 'hub', + repository: 'HuggingFaceTB/SmolLM2-135M-Instruct', + revision: '12fd25f77366fa6b3b4b768ec3050bf629380bac', + }, + }; + const result = { + schemaVersion: 1, + task: 'text-generation', + text: 'A technical fixture result.', + finishReason: 'stop', + inputTokens: 5, + generatedTokens: 7, + modelReceipt: { ...model, receiptDigest: `sha256:${canonicalJsonHash(model)}` }, + }; + const bound = { + generator: { node: { params: { max_new_tokens: { value: 256 } } } }, + loader: { node: { params: { device: { value: 'cuda:0' }, dtype: { value: 'float32' } } } }, + }; + const runtime = { packages: { transformers: '5.18.0' } }; + function data(value) { + const item = { value: [JSON.stringify(value)] }; + return { item, bytes: Buffer.from(JSON.stringify(item.value)) }; + } + const { item, bytes } = data(result); + const decodedOutput = validatePromptVariantText(bytes, item, bound, runtime); + assert.equal(decodedOutput.generatedTokens, 7); + assert.throws( + () => validatePromptVariantText(bytes, { value: ['"other output"'] }, bound, runtime), + /native output/u, + ); + const wrongDigest = data({ ...result, modelReceipt: { ...result.modelReceipt, receiptDigest: 'sha256:changed' } }); + assert.throws( + () => validatePromptVariantText(wrongDigest.bytes, wrongDigest.item, bound, runtime), + /receipt digest/u, + ); + const excessiveTokens = data({ ...result, generatedTokens: 257 }); + assert.throws(() => validatePromptVariantText(excessiveTokens.bytes, excessiveTokens.item, bound, runtime)); + + const structuredBytes = Buffer.from(`${JSON.stringify(result, null, 2)}\n`); + const releaseEvidence = { + receipt: { + schemaVersion: 1, + format: 'modiff.canonical-workflow-run-receipt.v1', + proofKind: 'real_backend_prompt_bound_model_variant', + workflowId: 'HuggingFaceTextGenerationModel:text_generation', + modelSet: [{ repoId: model.source.repository, revision: model.source.revision }], + outputHash: `sha256:bytes:${digest(bytes)}`, + decodedOutput, + }, + transportBytes: bytes, + structuredBytes, + outputSha256: digest(structuredBytes), + }; + const original = structuredClone(releaseEvidence.receipt); + const association = verifyRetainedStructuredText(releaseEvidence); + assert.equal(association.sourceOutputHash, releaseEvidence.receipt.outputHash); + assert.equal(association.outputEncodedSha256, `sha256:bytes:${digest(structuredBytes)}`); + assert.equal(association.decodedMediaHash, `sha256:canonical-json:${canonicalJsonHash(result)}`); + assert.deepEqual(releaseEvidence.receipt, original, 'The native receipt is immutable.'); + + // Byte identities remain exact even when a different file decodes to the same value. + assert.throws( + () => verifyRetainedStructuredText({ ...releaseEvidence, structuredBytes: Buffer.from(JSON.stringify(result)) }), + /approved structured result/u, + ); + assert.throws( + () => + verifyRetainedStructuredText({ + ...releaseEvidence, + transportBytes: Buffer.from(JSON.stringify(item.value, null, 2)), + }), + /original native transport/u, + ); + + // Rehashing substituted bytes cannot make a different answer the saved result. + const otherAnswer = Buffer.from(JSON.stringify({ ...result, text: 'An unrelated answer.' })); + assert.throws( + () => + verifyRetainedStructuredText({ + ...releaseEvidence, + structuredBytes: otherAnswer, + outputSha256: digest(otherAnswer), + }), + /decoded native result/u, + ); + const identicalAnswerDifferentTokens = Buffer.from(JSON.stringify({ ...result, generatedTokens: 2 })); + assert.throws( + () => + verifyRetainedStructuredText({ + ...releaseEvidence, + structuredBytes: identicalAnswerDifferentTokens, + outputSha256: digest(identicalAnswerDifferentTokens), + }), + /decoded native result/u, + ); + assert.throws( + () => + verifyRetainedStructuredText({ + ...releaseEvidence, + receipt: { ...releaseEvidence.receipt, workflowId: 'ShapEPipeline:text_to_3d' }, + }), + /reviewed text workflow/u, + ); + assert.throws( + () => + verifyRetainedStructuredText({ + ...releaseEvidence, + receipt: { ...releaseEvidence.receipt, decodedOutput: { ...decodedOutput, generatedTokens: 99 } }, + }), + /native text receipt/u, + ); + assert.throws( + () => verifyRetainedStructuredText({ ...releaseEvidence, transportBytes: Buffer.alloc(2 * 1024 * 1024 + 1) }), + /bounded file/u, + ); +}); + +test('the video variant needs independently decoded and moving geometry at the native cadence', () => { + const bound = { + generator: { node: { params: { frame_size: { value: 256 } } } }, + preview: { node: { params: { fps: { value: 12 } } } }, + }; + const item = { + mediaMetadata: { + source: 'encoded-file', + width: 256, + height: 256, + frame_count: 20, + fps: 12, + duration_seconds: 1.67, + }, + }; + const decoded = { + width: 256, + height: 256, + frames: 20, + fps: 12, + durationSeconds: 1.67, + codecName: 'h264', + hasAudio: false, + uniqueFrameRatio: 1, + hash: 'sha256:decoded-video-framemd5:fixture', + }; + assert.equal(validatePromptVariantVideo(decoded, item, bound).frames, 20); + assert.throws(() => validatePromptVariantVideo({ ...decoded, fps: 24 }, item, bound), /differ from native/u); + assert.throws(() => validatePromptVariantVideo({ ...decoded, uniqueFrameRatio: 0.1 }, item, bound)); +}); + +for (const [workflowId, variable, kind, proofKind = 'real_backend_prompt_bound_model_variant'] of [ + ['HuggingFaceAnyToAnyModel:text_generation', 'MODIFF_JANUS_TEXT_PROMPT_EVIDENCE', 'json'], + ['HuggingFaceAnyToAnyModel:text_to_image', 'MODIFF_JANUS_IMAGE_PROMPT_EVIDENCE', 'image'], + [ + 'HuggingFaceAnyToAnyModel:image_to_text', + 'MODIFF_JANUS_CAPTION_EVIDENCE', + 'json', + 'real_backend_input_bound_model_variant', + ], + [ + 'HuggingFaceImageTextToTextModel:image_to_text', + 'MODIFF_SMOLVLM_CAPTION_EVIDENCE', + 'json', + 'real_backend_input_bound_model_variant', + ], + ['LuminaPipeline:text_to_image', 'MODIFF_LUMINA_PROMPT_EVIDENCE', 'image'], + ['Kandinsky3Pipeline:text_to_image', 'MODIFF_KANDINSKY3_CPU_PROMPT_EVIDENCE', 'image'], + ['HuggingFaceTextGenerationModel:text_generation', 'MODIFF_SMOLLM2_PROMPT_EVIDENCE', 'json'], + ['ShapEPipeline:text_to_3d', 'MODIFF_SHAPE_PROMPT_EVIDENCE', 'video'], + ['Wan22Pipeline:text_to_video', 'MODIFF_WAN_A14B_VIDEO_PROMPT_EVIDENCE', 'video'], + ['WanTI2VPipeline:text_to_video', 'MODIFF_WAN_SUBWAY_SOUNDTRACK_EVIDENCE', 'video'], + [ + 'WanImageToVideoPipeline:image_to_video', + 'MODIFF_WAN_A14B_OPENING_IMAGE_EVIDENCE', + 'video', + 'real_backend_input_bound_model_variant', + ], + [ + 'WanAnimatePipeline:character_animate', + 'MODIFF_WAN_CHARACTER_ANIMATE_EVIDENCE', + 'video', + 'real_backend_input_bound_model_variant', + ], + [ + 'WanAnimatePipeline:character_replace', + 'MODIFF_WAN_CHARACTER_REPLACE_EVIDENCE', + 'video', + 'real_backend_input_bound_model_variant', + ], + ['AllegroPipeline:text_to_video', 'MODIFF_ALLEGRO_VIDEO_PROMPT_EVIDENCE', 'video'], + ['MochiPipeline:text_to_video', 'MODIFF_MOCHI_VIDEO_PROMPT_EVIDENCE', 'video'], + ['LattePipeline:text_to_video', 'MODIFF_LATTE_VIDEO_PROMPT_EVIDENCE', 'video'], + ['AnimateDiffPipeline:text_to_video', 'MODIFF_ANIMATEDIFF_VIDEO_PROMPT_EVIDENCE', 'video'], + ['AnimateLCMPipeline:text_to_video', 'MODIFF_ANIMATELCM_VIDEO_PROMPT_EVIDENCE', 'video'], + ['WanVACEPipeline:text_to_video', 'MODIFF_WAN_VACE_VIDEO_PROMPT_EVIDENCE', 'video'], + ['SanaVideoPipeline:text_to_video', 'MODIFF_SANA_VIDEO_PROMPT_EVIDENCE', 'video'], + [ + 'SanaImageToVideoPipeline:image_to_video', + 'MODIFF_SANA_OPENING_IMAGE_EVIDENCE', + 'video', + 'real_backend_input_bound_model_variant', + ], + ['CogVideoXPipeline:text_to_video', 'MODIFF_COGVIDEOX_VIDEO_PROMPT_EVIDENCE', 'video'], + ['AnimateDiffPAGPipeline:text_to_video', 'MODIFF_ANIMATEDIFF_PAG_VIDEO_EVIDENCE', 'video'], + [ + 'AnimateDiffVideoToVideoPipeline:video_to_video', + 'MODIFF_ANIMATEDIFF_EDIT_VIDEO_EVIDENCE', + 'video', + 'real_backend_input_bound_model_variant', + ], + [ + 'AnimateDiffControlNetPipeline:control_to_video', + 'MODIFF_ANIMATEDIFF_GUIDE_VIDEO_EVIDENCE', + 'video', + 'real_backend_input_bound_model_variant', + ], + [ + 'AnimateDiffVideoToVideoControlNetPipeline:control_video_to_video', + 'MODIFF_ANIMATEDIFF_DUAL_VIDEO_EVIDENCE', + 'video', + 'real_backend_input_bound_model_variant', + ], + [ + 'CogVideoXVideoToVideoPipeline:video_to_video', + 'MODIFF_COGVIDEOX_EDIT_EVIDENCE', + 'video', + 'real_backend_input_bound_model_variant', + ], + ['LongCatAudioDiTPipeline:text_to_audio', 'MODIFF_LONGCAT_AUDIO_PROMPT_EVIDENCE', 'audio'], + ['AudioLDM2Pipeline:text_to_audio', 'MODIFF_AUDIOLDM2_PROMPT_EVIDENCE', 'audio'], + ['CogView3PlusPipeline:text_to_image', 'MODIFF_COGVIEW3_PROMPT_EVIDENCE', 'image'], + ['StableDiffusionXLTurboPipeline:text_to_image', 'MODIFF_SDXL_TURBO_PROMPT_EVIDENCE', 'image'], + ['SanaPAGPipeline:text_to_image', 'MODIFF_SANA_PAG_PROMPT_EVIDENCE', 'image'], + ['AuraFlowPipeline:text_to_image', 'MODIFF_AURAFLOW_PROMPT_EVIDENCE', 'image'], + ['LatentConsistencyModelPipeline:text_to_image', 'MODIFF_LCM_IMAGE_PROMPT_EVIDENCE', 'image'], + ['SanaPipeline:text_to_image', 'MODIFF_SANA_IMAGE_PROMPT_EVIDENCE', 'image'], + ['ChromaPipeline:text_to_image', 'MODIFF_CHROMA_IMAGE_PROMPT_EVIDENCE', 'image'], + ['Lumina2Pipeline:text_to_image', 'MODIFF_LUMINA2_SAVED_PROMPT_EVIDENCE', 'image'], + ['HunyuanDiTPipeline:text_to_image', 'MODIFF_HUNYUAN_DIT_SAVED_PROMPT_EVIDENCE', 'image'], + ['HunyuanDiTPAGPipeline:text_to_image', 'MODIFF_HUNYUAN_DIT_PAG_SAVED_PROMPT_EVIDENCE', 'image'], + ['OmniGenPipeline:text_to_image', 'MODIFF_OMNIGEN_SAVED_PROMPT_EVIDENCE', 'image'], + ['SanaSprintPipeline:text_to_image', 'MODIFF_SANA_SPRINT_IMAGE_PROMPT_EVIDENCE', 'image'], + ['StableDiffusionXLPAGPipeline:text_to_image', 'MODIFF_SDXL_PAG_PROMPT_EVIDENCE', 'image'], + ['PixArtSigmaPipeline:text_to_image', 'MODIFF_SAVED_PIXART_SIGMA_PROMPT_EVIDENCE', 'image'], + ['DreamLitePipeline:text_to_image', 'MODIFF_DREAMLITE_BASE_PRIVATE_EVIDENCE', 'image'], + ['JoyImageEditPipeline:text_to_image', 'MODIFF_JOY_HERBARIUM_PROMPT_EVIDENCE', 'image'], + ['LongCatImagePipeline:text_to_image', 'MODIFF_LONGCAT_FLORIST_PROMPT_EVIDENCE', 'image'], + [ + 'LTXI2VLongMultiPromptPipeline:image_to_video', + 'MODIFF_LTX_SCHEDULED_TRAM_EVIDENCE', + 'video', + 'real_backend_input_bound_model_variant', + ], + [ + 'LTXI2VLongMultiPromptPipeline:image_to_video', + 'MODIFF_LTX_SCHEDULED_HEADLAND_EVIDENCE', + 'video', + 'real_backend_input_bound_model_variant', + ], + [ + 'LTX2ConditionPipeline:video_to_video', + 'MODIFF_LTX2_STREAM_EVIDENCE', + 'video', + 'real_backend_input_bound_model_variant', + ], + [ + 'LTX2ConditionPipeline:video_to_video', + 'MODIFF_LTX2_TRAM_EVIDENCE', + 'video', + 'real_backend_input_bound_model_variant', + ], +]) { + const saved = process.env[variable]; + test(`${workflowId} retained ${kind} prompt variant verifies without new execution`, { skip: !saved }, async () => { + const evidencePath = resolve(saved); + const args = { clientRoot, backendRoot, workflowId, evidencePath }; + const original = await readCanonicalWorkflowEvidence(args); + assert.equal(original.receipt.proofKind, proofKind); + assert.equal(original.receipt.canonicalDefaultsExecuted, false); + assert.equal(original.receipt.decodedOutput.kind, kind); + assert.ok(Object.values(original.receipt.qualificationClaims).every((claim) => claim === false)); + if (workflowId === 'LongCatImagePipeline:text_to_image') { + assert.equal(original.receipt.observationLimits.fullConsumedFieldAccounting, false); + assert.deepEqual(original.receipt.observationLimits.configuredUnobservedControls, ['max_sequence_length']); + } + if (workflowId === 'LTXI2VLongMultiPromptPipeline:image_to_video') { + assert.equal(original.receipt.decodedOutput.frames, 129); + assert.ok(original.receipt.observationLimits.configuredUnobservedControls.includes('prompt_segments_json')); + } + if (workflowId === 'HuggingFaceImageTextToTextModel:image_to_text') { + const [{ file }] = original.evidence.outputs; + const transportBytes = readCanonicalEvidenceFile(dirname(evidencePath), file).bytes; + const structuredBytes = Buffer.from(JSON.parse(transportBytes)[0]); + const args = { + receipt: original.receipt, + transportBytes, + structuredBytes, + outputSha256: digest(structuredBytes), + }; + assert.equal(verifyRetainedStructuredText(args).sourceOutputHash, original.receipt.outputHash); + assert.throws( + () => verifyRetainedStructuredText({ ...args, receipt: { ...original.receipt, inputBinding: undefined } }), + /missing its original source evidence/u, + ); + } + const temp = mkdtempSync(join(tmpdir(), 'modiff-prompt-variant-')); + try { + const refs = original.retainedFiles; + for (const ref of refs) { + assert.match(ref.path, /^[a-z0-9.-]+$/iu); + const archiveLimit = + workflowId === 'WanTI2VPipeline:text_to_video' && ref.path === original.evidence.outputs[0].file.path + ? 64 * 1024 * 1024 + : undefined; + const archived = readCanonicalEvidenceFile(dirname(evidencePath), ref, archiveLimit); + writeFileSync(join(temp, ref.path), archived.bytes); + } + const changedPath = join(temp, 'evidence.json'); + const evidence = JSON.parse(original.descriptorBytes); + if (['MODIFF_LTX_SCHEDULED_HEADLAND_EVIDENCE', 'MODIFF_LTX2_STREAM_EVIDENCE'].includes(variable)) { + if (variable === 'MODIFF_LTX2_STREAM_EVIDENCE') { + assert.equal(original.receipt.decodedOutput.frames, 81); + assert.equal(original.receipt.inputBinding.decodedVideo.frames, 25); + assert.equal(original.receipt.observationLimits.normalizedConsumerFramesObserved, false); + } else { + assert.equal(original.receipt.inputBinding.decodedImage.width, 768); + assert.equal(original.receipt.inputBinding.decodedImage.height, 512); + } + const changedPreparation = structuredClone(evidence); + const runPath = join(temp, evidence.runDetail.path); + const savedRun = readFileSync(runPath); + const run = JSON.parse(savedRun); + run.task.runtimePreparation.cleanup.released.models = 0; + const changedRun = Buffer.from(JSON.stringify(run)); + writeFileSync(runPath, changedRun); + Object.assign(changedPreparation.runDetail, { bytes: changedRun.length, sha256: digest(changedRun) }); + writeFileSync(changedPath, JSON.stringify(changedPreparation)); + await assert.rejects( + () => readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath }), + /Expected the previous LTX model release/u, + ); + writeFileSync(runPath, savedRun); + } + if (workflowId === 'AllegroPipeline:text_to_video') { + assert.equal(original.receipt.observationLimits.retainedLoaderOffloadFallback, 'sequential_cpu'); + assert.equal(original.receipt.decodedOutput.frames, 88); + assert.equal(original.receipt.negativePromptBinding.field, 'negative_prompt'); + assert.match(original.receipt.negativePromptBinding.sha256, /^[a-f0-9]{64}$/u); + } + if (workflowId === 'MochiPipeline:text_to_video') { + assert.equal(original.receipt.decodedOutput.frames, 31); + assert.equal(original.receipt.decodedOutput.fps, 30); + assert.equal(original.receipt.decodedOutput.width, 848); + assert.equal(original.receipt.negativePromptBinding.field, 'negative_prompt'); + } + if (workflowId === 'WanImageToVideoPipeline:image_to_video') { + assert.equal(original.receipt.sourceTemplateId, 'wan_22_i2v_seed_vault'); + assert.equal(original.receipt.inputBinding.sha256, evidence.inputs[0].file.sha256); + assert.equal(original.receipt.observationLimits.samplerInputPixelsObserved, false); + assert.equal(original.receipt.negativePromptBinding.field, 'negative_prompt'); + assert.equal(original.receipt.decodedOutput.frames, 81); + assert.equal(original.receipt.decodedOutput.fps, 16); + } + if (workflowId.startsWith('WanAnimatePipeline:')) { + const expected = ['face', 'pose', ...(workflowId.endsWith(':character_replace') ? ['background', 'mask'] : [])]; + assert.deepEqual( + original.receipt.videoConditionBindings.map(({ role, sha256 }) => [role, sha256]), + expected.map((role, index) => [role, evidence.inputs[index + 1].file.sha256]), + ); + assert.equal(original.receipt.observationLimits.consumedMotionFramesObserved, false); + assert.equal(original.receipt.decodedOutput.frames, 81); + assert.equal(original.receipt.decodedOutput.fps, 24); + const swapped = structuredClone(evidence); + [swapped.inputs[1], swapped.inputs[2]] = [swapped.inputs[2], swapped.inputs[1]]; + writeFileSync(changedPath, JSON.stringify(swapped)); + await assert.rejects( + () => readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath }), + /motion input roles differ/u, + ); + } + if (workflowId === 'WanVACEPipeline:text_to_video') { + assert.equal(original.receipt.sourceTemplateId, 'wan_vace_direct_text_to_video'); + assert.deepEqual( + original.receipt.modelSet.map(({ repoId }) => repoId), + ['Wan-AI/Wan2.1-VACE-1.3B-diffusers', 'nateraw/real-esrgan/RealESRGAN_x2plus.pth'], + ); + assert.equal(original.receipt.decodedOutput.frames, 81); + assert.equal(original.receipt.decodedOutput.width, 1664); + assert.equal(original.receipt.decodedOutput.height, 960); + const completionPath = join(temp, evidence.graphCompleted.path); + const savedCompletion = readFileSync(completionPath); + const completion = JSON.parse(savedCompletion); + completion.runtimeHints.controlledArtifacts = []; + const bytes = Buffer.from(JSON.stringify(completion)); + const substituted = { + ...evidence, + graphCompleted: { ...evidence.graphCompleted, bytes: bytes.length, sha256: digest(bytes) }, + }; + writeFileSync(completionPath, bytes); + writeFileSync(changedPath, JSON.stringify(substituted)); + await assert.rejects( + () => readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath }), + /unreviewed runtime authority/u, + ); + writeFileSync(completionPath, savedCompletion); + } + if (workflowId === 'AnimateLCMPipeline:text_to_video') { + assert.equal(original.receipt.modelSet[1].repoId, 'wangfuyun/AnimateLCM'); + assert.equal(original.receipt.decodedOutput.frames, 16); + const runPath = join(temp, evidence.runDetail.path); + const originalRun = readFileSync(runPath); + const run = JSON.parse(originalRun); + if (run.task.runtimePreparation.previousModelFamily === 'StableDiffusionXLControlNetPAGImg2ImgPipeline') { + const originalPreparation = run.task.runtimePreparation; + for (const [changes, failure] of [ + [{ availableRamBytes: 4 * 1024 ** 3 }, /lacks measured pressure/u], + [{ reasons: originalPreparation.reasons.slice(0, 1) }, /Unreviewed direct image cache cleanup/u], + [{ previousModelFamily: 'UnreviewedPipeline' }, /Unreviewed previous Expert model family/u], + ]) { + run.task.runtimePreparation = { ...originalPreparation, ...changes }; + const bytes = Buffer.from(JSON.stringify(run)); + const substituted = { + ...evidence, + runDetail: { ...evidence.runDetail, bytes: bytes.length, sha256: digest(bytes) }, + }; + writeFileSync(runPath, bytes); + writeFileSync(changedPath, JSON.stringify(substituted)); + await assert.rejects(() => readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath }), failure); + } + writeFileSync(runPath, originalRun); + } + } + const sanaOpeningImage = workflowId === 'SanaImageToVideoPipeline:image_to_video'; + if (sanaOpeningImage) { + assert.equal(original.receipt.decodedOutput.frames, 81); + assert.equal(original.receipt.negativePromptBinding.field, 'negative_prompt'); + assert.equal(original.receipt.observationLimits.openingImageLoadFieldsObserved, true); + assert.equal(original.receipt.observationLimits.samplerInputPixelsObserved, false); + } + if (workflowId.startsWith('AnimateDiff')) { + const guide = original.receipt.guideBinding; + assert.equal(original.receipt.modelSet.length, guide ? 3 : 2); + assert.equal(original.receipt.observationLimits.motionAdapterBoundByGraph, true); + const [first, second, ...rest] = evidence.modelObservations; + const incomplete = { ...evidence, modelObservations: [first, first, ...rest] }; + assert.notEqual(first.sha256, second.sha256); + writeFileSync(changedPath, JSON.stringify(incomplete)); + await assert.rejects( + () => readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath }), + /Expected a single installed identity/u, + ); + if (guide) { + assert.equal(original.receipt.observationLimits.normalizedGuideFramesObserved, false); + assert.equal(original.receipt.observationLimits.controlAdapterAppliedObserved, false); + assert.equal(guide.decodedVideo.frames, 16); + if (evidence.inputs.length === 2) { + assert.notEqual(guide.sha256, original.receipt.inputBinding.sha256); + const swapped = { ...evidence, inputs: [...evidence.inputs].reverse() }; + writeFileSync(changedPath, JSON.stringify(swapped)); + await assert.rejects( + () => readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath }), + /outside the bound prompt and seed/u, + ); + } else { + assert.deepEqual(original.receipt.inputBinding, guide); + } + } else if (workflowId === 'AnimateDiffPAGPipeline:text_to_video') { + assert.deepEqual(original.receipt.observationLimits.configuredUnobservedControls, [ + 'pag_scale', + 'pag_adaptive_scale', + ]); + } else if (workflowId === 'AnimateDiffVideoToVideoPipeline:video_to_video') { + assert.equal(original.receipt.observationLimits.normalizedConsumerFramesObserved, false); + assert.equal(original.receipt.inputBinding.decodedVideo.frames, 16); + } + } + if (workflowId === 'WanTI2VPipeline:text_to_video') { + assert.equal(original.receipt.modelSet.length, 2); + assert.equal(original.receipt.decodedOutput.audio.sourceSampleRate, 48000); + assert.equal(original.receipt.decodedOutput.audio.channels, 2); + assert.equal(original.receipt.observationLimits.audiovisualSynchronizationReviewed, false); + const [videoIdentity] = evidence.modelObservations; + writeFileSync(changedPath, JSON.stringify({ ...evidence, modelObservations: [videoIdentity, videoIdentity] })); + await assert.rejects( + () => readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath }), + /Expected a single installed identity/u, + ); + } + const route = directImagePromptRoutes.find((row) => row.workflowId === workflowId); + const cogVideo = workflowId === 'CogVideoXPipeline:text_to_video'; + const audioLdm = workflowId === 'AudioLDM2Pipeline:text_to_audio'; + if (route?.retainedObservationSource || workflowId === 'Wan22Pipeline:text_to_video' || cogVideo || audioLdm) { + assert.equal(original.receipt.observationLimits.fullConsumedFieldAccounting, false); + if (route?.typedOnly) { + assert.deepEqual(original.receipt.observationLimits.configuredUnobservedControls, route.typedOnly); + } + const packagePath = join(temp, evidence.outputPackage.path); + const runPath = join(temp, evidence.runDetail.path); + const originalPackage = readFileSync(packagePath); + const originalRun = readFileSync(runPath); + const changed = JSON.parse(originalPackage); + const inputs = changed.latestOutput.resolvedExecutionInputs; + const sampler = inputs.nodes.find((node) => node.action === 'Generate'); + let expectedFailure; + if (route?.retainedObservationSource) { + assert.equal(sampler.fieldAccounting, undefined); + sampler.fields.num_inference_steps.value += 1; + expectedFailure = /Retained adapter control differs: num_inference_steps/u; + } else if (cogVideo) { + const { fields } = inputs.nodes.find((node) => node.action === 'DiffusersExecutionRecipe'); + assert.equal(fields.vae_tiling.value, true); + fields.vae_tiling.value = false; + expectedFailure = /Actual consumed fields differ for DiffusersExecutionRecipe/u; + } else if (audioLdm) { + assert.equal(sampler.fields.num_inference_steps.value, 200); + sampler.fields.num_inference_steps.value = 8; + expectedFailure = /Actual consumed fields differ for Generate/u; + } else { + assert.equal(sampler.fields.secondary_guidance_scale.value, 3.5); + sampler.fields.secondary_guidance_scale.value = 0; + expectedFailure = /Actual consumed fields differ for Generate/u; + } + const run = JSON.parse(originalRun); + run.outputs[0].resolvedExecutionInputs = inputs; + const substituted = structuredClone(evidence); + for (const [field, path, data] of [ + ['outputPackage', packagePath, changed], + ['runDetail', runPath, run], + ]) { + const bytes = Buffer.from(JSON.stringify(data)); + substituted[field] = { ...substituted[field], bytes: bytes.length, sha256: digest(bytes) }; + writeFileSync(path, bytes); + } + writeFileSync(changedPath, JSON.stringify(substituted)); + await assert.rejects( + () => readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath }), + expectedFailure, + ); + writeFileSync(packagePath, originalPackage); + writeFileSync(runPath, originalRun); + } + if (['SanaPipeline:text_to_image', 'ChromaPipeline:text_to_image'].includes(workflowId)) { + const runPath = join(temp, evidence.runDetail.path); + const originalRun = readFileSync(runPath); + const run = JSON.parse(originalRun); + const originalPreparation = structuredClone(run.task.runtimePreparation); + run.task.runtimePreparation.previousModelFamily = 'UnreviewedPipeline'; + const replacement = Buffer.from(JSON.stringify(run)); + const substituted = structuredClone(evidence); + substituted.runDetail = { ...evidence.runDetail, bytes: replacement.length, sha256: digest(replacement) }; + writeFileSync(runPath, replacement); + writeFileSync(changedPath, JSON.stringify(substituted)); + await assert.rejects( + () => readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath }), + /Unreviewed previous Expert model family/u, + ); + if (workflowId === 'ChromaPipeline:text_to_image') { + run.task.runtimePreparation = { + ...originalPreparation, + reasons: ['model family changed from ChromaPipeline to ChromaPipeline'], + }; + const changed = Buffer.from(JSON.stringify(run)); + substituted.runDetail = { ...evidence.runDetail, bytes: changed.length, sha256: digest(changed) }; + writeFileSync(runPath, changed); + writeFileSync(changedPath, JSON.stringify(substituted)); + await assert.rejects( + () => readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath }), + /Unreviewed direct image cache cleanup/u, + ); + } + writeFileSync(runPath, originalRun); + } + if (proofKind === 'real_backend_input_bound_model_variant') { + const [input] = evidence.inputs; + const path = join(temp, input.file.path); + const originalBytes = readFileSync(path); + const replacement = Buffer.concat([originalBytes, Buffer.from([0])]); + const substituted = structuredClone(evidence); + substituted.inputs[0].file = { ...input.file, bytes: replacement.length, sha256: digest(replacement) }; + writeFileSync(path, replacement); + writeFileSync(changedPath, JSON.stringify(substituted)); + await assert.rejects( + () => readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath }), + variable === 'MODIFF_LTX2_STREAM_EVIDENCE' + ? /outside the bound prompt and seed/u + : variable === 'MODIFF_LTX_SCHEDULED_HEADLAND_EVIDENCE' + ? /current authored prompt recipe differs from the original baseline/u + : original.receipt.observationLimits.openingImageLoadFieldsObserved + ? /Opening image differs from the retained Load fields/u + : input.sourceValue.startsWith('@data/videos/') + ? /Archived video upload differs/u + : workflowId === 'HuggingFaceAnyToAnyModel:image_to_text' + ? /Source bytes differ from the native image load|Archived authoring requires the exact original capture/u + : /Source bytes differ from the native image load/u, + ); + writeFileSync(path, originalBytes); + } + const completionPath = join(temp, evidence.graphCompleted.path); + const completion = JSON.parse(readFileSync(completionPath)); + completion.task_id = 'another-execution'; + const changed = Buffer.from(JSON.stringify(completion)); + writeFileSync(completionPath, changed); + evidence.graphCompleted.bytes = changed.length; + evidence.graphCompleted.sha256 = digest(changed); + writeFileSync(changedPath, JSON.stringify(evidence)); + await assert.rejects( + () => readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath }), + /another-execution|Archived authoring requires the exact original capture/u, + ); + assert.ok(readFileSync(evidencePath).equals(original.descriptorBytes)); + } finally { + if (existsSync(temp) && dirname(temp) === resolve(tmpdir())) rmSync(temp, { recursive: true, force: true }); + } + }); +} + +test('Reviewed image prompt receipts keep the exact portable artifact and graph', async () => { + const graphs = join(backendRoot, 'data/graphs'); + const manifest = JSON.parse(readFileSync(join(backendRoot, 'data/workflow-library-manifest.json'), 'utf8')); + const workflowIds = [ + 'LuminaPipeline:text_to_image', + 'GlmImagePipeline:text_to_image', + 'NucleusMoEImagePipeline:text_to_image', + 'ErnieImagePipeline:text_to_image', + 'OvisImagePipeline:text_to_image', + 'CogView3PlusPipeline:text_to_image', + 'CogView4Pipeline:text_to_image', + 'StableDiffusionXLTurboPipeline:text_to_image', + 'SanaPAGPipeline:text_to_image', + 'AuraFlowPipeline:text_to_image', + 'LatentConsistencyModelPipeline:text_to_image', + 'SanaPipeline:text_to_image', + 'ChromaPipeline:text_to_image', + 'Lumina2Pipeline:text_to_image', + 'HunyuanDiTPipeline:text_to_image', + 'HunyuanDiTPAGPipeline:text_to_image', + 'OmniGenPipeline:text_to_image', + 'SanaSprintPipeline:text_to_image', + 'StableDiffusionXLPAGPipeline:text_to_image', + ]; + const fixtures = workflowIds.map((id) => + JSON.parse(readFileSync(join(graphs, manifest.workflows.find((entry) => entry.id === id).graphPath), 'utf8')), + ); + const originals = await exportCanonicalWorkflowGraphs(clientRoot, fixtures); + for (const [index, workflowId] of workflowIds.entries()) { + const record = directImagePromptRoutes.find((route) => route.workflowId === workflowId); + const original = originals[index]; + const identity = canonicalGraphIdentity(original); + const profile = { + ...record, + bindSeed: true, + chain: [ + ['quantization', 'modules.DiffusersRuntime', 'PipelineQuantizationConfigV2', ''], + ['recipe', 'modules.DiffusersRuntime', 'DiffusersExecutionRecipe', ''], + ['loader', 'modules.DiffusersImage', 'LoadPipeline', ''], + ['generator', 'modules.DiffusersImage', 'Generate', ''], + ['preview', 'modules.Image', 'Preview', ''], + ], + }; + const created = structuredClone(original); + const generation = Object.values(created.nodes).find((node) => node.action === 'Generate').params; + generation.prompt.value = 'A botanical print on ivory paper'; + generation.seed.value = record.generation.seed; + const output = { ...structuredClone(created), runtimeHints: {} }; + const witness = bindPromptVariant(profile, original, created, output, identity.hash); + assert.equal(witness.prompt, generation.prompt.value); + assert.equal(witness.loader.node.params.model_id.value.value, record.modelRepo); + assert.equal(witness.loader.node.params.revision.value, record.modelRevision); + assert.equal(witness.generator.node.params.max_sequence_length.value, record.generation.max_sequence_length); + + const changed = structuredClone(output); + Object.values(changed.nodes).find((node) => node.action === 'Generate').params.width.value += 32; + assert.throws( + () => bindPromptVariant(profile, original, created, changed, identity.hash), + /outside the bound prompt and seed/u, + ); + } +}); diff --git a/scripts/registered-block-v2-adapter.test.mjs b/scripts/registered-block-v2-adapter.test.mjs index 7af5d092..1c7c788f 100644 --- a/scripts/registered-block-v2-adapter.test.mjs +++ b/scripts/registered-block-v2-adapter.test.mjs @@ -588,6 +588,68 @@ test('definition and hashes ignore workflow ids, mutable values, layout, preview assert.equal('instanceOnlyMutation' in right.instance.definitionSnapshot.graph.nodes[0].data, false); }); +function sealedSignalFixture(instanceId, choices, declareSealedSignal = true) { + const definition = fixtureDefinition(); + const admission = definition.executionAdmissions[0]; + if (declareSealedSignal) + admission.dynamicFieldActions.push({ + role: 'generate', + field: 'images', + event: 'onSignal', + valueSource: 'artifact', + }); + const skeleton = fixtureSkeleton(definition, instanceId); + const node = skeleton.nodes.find((item) => item.data.huggingFaceClusterExecutionRole === 'generate'); + node.data.params.signal_choice = { type: 'string', options: ['base'], value: 'base' }; + node.data.params.images.signal = { direction: 'output', value: admission.artifact.repo }; + node.data.params.images.onSignal = [ + { action: 'value', target: 'signal_choice', prop: 'options', data: choices }, + { action: 'signal', target: 'components' }, + ]; + return { definition, skeleton, node }; +} + +test('sealed registered signal choices ignore unrelated availability and preserve the selected branch', () => { + const selected = 'fixture/image-model'; + const left = sealedSignalFixture('sealed-signal-base', { [selected]: ['base'], OtherPipeline: ['other'] }); + const right = sealedSignalFixture('sealed-signal-extra', { + [selected]: ['base'], + OtherPipeline: ['other'], + NewAvailablePipeline: ['new'], + }); + const before = structuredClone(right.skeleton); + const compile = ({ definition, skeleton }) => + adapter.compileRegisteredBlockV2(definition, skeleton, { instanceId: 'sealed-signal-result' }); + const baseline = compile(left); + const extended = compile(right); + assert.deepEqual(extended.definition, baseline.definition); + assert.deepEqual(right.skeleton, before, 'compilation must not mutate the ordinary source descriptor'); + const descriptor = extended.definition.graph.nodes.find(({ nodeId }) => nodeId === 'generate').data.params.images + .onSignal; + assert.deepEqual(descriptor[0].data, { [selected]: ['base'] }); + assert.deepEqual(descriptor[1], { action: 'signal', target: 'components' }); + const changed = sealedSignalFixture('sealed-signal-changed', { [selected]: ['different'], OtherPipeline: ['other'] }); + assert.notEqual(compile(changed).definition.contentHash, baseline.definition.contentHash); +}); + +test('unsealed registered signal maps remain semantic and sealed mismatches fail closed', () => { + const selected = 'fixture/image-model'; + const compile = ({ definition, skeleton }) => + adapter.compileRegisteredBlockV2(definition, skeleton, { instanceId: 'signal-boundary-result' }); + const ordinary = sealedSignalFixture('signal-ordinary', { [selected]: ['base'] }, false); + const extended = sealedSignalFixture( + 'signal-ordinary-extra', + { [selected]: ['base'], OtherPipeline: ['other'] }, + false, + ); + assert.notEqual(compile(ordinary).definition.contentHash, compile(extended).definition.contentHash); + const missing = sealedSignalFixture('signal-missing-branch', { OtherPipeline: ['other'] }); + assert.throws(() => compile(missing), /no exact options branch/); + const mismatch = sealedSignalFixture('signal-wrong-identity', { [selected]: ['base'] }); + mismatch.node.data.params.images.signal.value = 'OtherPipeline'; + assert.throws(() => compile(mismatch), /does not witness its declared sealed signal identity/); +}); + test('explicit false field-action busy flags are non-semantic while disabled true remains reviewed schema', () => { const source = fixtureDefinition(); const absentSkeleton = fixtureSkeleton(source, 'legacy-disabled-absent'); @@ -1015,15 +1077,15 @@ test('every reviewed direct-media projection is explicit and undeclared media ha .filter(({ mediaType }) => mediaType !== undefined) .map((binding) => ({ registeredRoute, binding })), ); - assert.equal(reviewedMediaBindings.length, 112); + assert.equal(reviewedMediaBindings.length, 120); assert.equal( reviewedMediaBindings.every(({ binding }) => binding.adaptation !== undefined), true, ); const directMediaBindings = reviewedMediaBindings.filter(({ binding }) => binding.adaptation === 'direct_media'); - assert.equal(directMediaBindings.length, 81); - assert.equal(new Set(directMediaBindings.map(({ registeredRoute }) => registeredRoute.definitionId)).size, 77); + assert.equal(directMediaBindings.length, 83); + assert.equal(new Set(directMediaBindings.map(({ registeredRoute }) => registeredRoute.definitionId)).size, 79); for (const { registeredRoute, binding } of directMediaBindings) { assert.notEqual(binding.fieldId, 'file', `${registeredRoute.definitionId} must use a reviewed export for files`); assert.notEqual(binding.role, 'videoExport', `${registeredRoute.definitionId} must not bypass its export node`); diff --git a/scripts/registered-block-v2-insertion.test.mjs b/scripts/registered-block-v2-insertion.test.mjs index f26385f3..80e00b82 100644 --- a/scripts/registered-block-v2-insertion.test.mjs +++ b/scripts/registered-block-v2-insertion.test.mjs @@ -3,6 +3,7 @@ import { createHash } from 'node:crypto'; import { after, before, beforeEach, test } from 'node:test'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; +import { readFileSync } from 'node:fs'; import { createServer } from 'vite'; const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); @@ -47,6 +48,7 @@ let studioStore; let topBarAutoPolicy; let originalFetch; let storage; +let sessionValues; let compiledCatalogRequests; test('full FLUX.2 has an exact Expert Model Manager profile without Auto promotion', () => { @@ -77,10 +79,17 @@ before(async () => { removeItem: (key) => storage.delete(key), setItem: (key, value) => storage.set(key, String(value)), }; + sessionValues = new Map(); + globalThis.sessionStorage = { + getItem: (key) => sessionValues.get(key) ?? null, + setItem: (key, value) => sessionValues.set(key, String(value)), + removeItem: (key) => sessionValues.delete(key), + }; globalThis.window = { dispatchEvent: () => true, location: { origin: 'http://127.0.0.1:5191' }, localStorage: globalThis.localStorage, + sessionStorage: globalThis.sessionStorage, }; server = await createServer({ root: ROOT, @@ -318,6 +327,10 @@ function fixture() { const definitionId = 'diffusers.modular:QwenImageModularPipeline:text2image'; const admissionId = 'diffusers.cluster-admission:QwenImageModularPipeline:text2image:mode:text_to_image'; const adapterId = 'diffusers.modular-adapter:QwenImageModularPipeline:text2image:mode:text_to_image'; + const route = routeModule.REGISTERED_BLOCK_V2_ROUTES.find( + (candidate) => candidate.definitionId === definitionId && candidate.admissionId === admissionId, + ); + assert.ok(route, 'The synthetic interaction fixture needs an exact current registered route.'); const receipt = { id: 'qwen-image-2512:modular-text-to-image:v1', contentHash: 'studio-spec-v1-f4c15e0d', @@ -376,7 +389,7 @@ function fixture() { definitionKind: 'modular_pipeline_workflow', ownership: 'library', mutable: false, - libraryRevision: 'fbf49e7f35857f76bc57b177e26f12b03687c668', + libraryRevision: route.libraryRevision, pipelineClass: 'QwenImageModularPipeline', blocksClass: 'QwenImageAutoBlocks', pipelineKind: 'auto', @@ -421,7 +434,7 @@ function fixture() { url: 'https://huggingface.co/Qwen/Qwen-Image-2512/blob/' + '25468b98e3276ca6700de15c6628e51b7de54a26/README.md', }, }, - contentHash: 'sha256:49cb50671b41cf2c03b22387cfe2cf1b37f16b2996961791505aef830817c393', + contentHash: route.definitionContentHash, }; const executionSpec = { schemaVersion: 1, @@ -477,9 +490,18 @@ function fluxFixture() { repo: 'black-forest-labs/FLUX.1-dev', revision: '3de623fc3c33e44ffbe2bad470d0f45bccf2eb21', }; + // This synthetic interaction fixture follows the published identity. Its + // synthetic compiled bytes are checked separately by pinFixtureRoute; + // these lifecycle tests do not qualify the real backend graph. + const route = routeModule.REGISTERED_BLOCK_V2_ROUTES.find( + (candidate) => candidate.definitionId === definitionId && candidate.admissionId === admissionId, + ); + assert.ok(route); + assert.deepEqual(route.artifact, artifact); Object.assign(definition, { id: definitionId, pipelineClass: 'FluxModularPipeline', + libraryRevision: route.libraryRevision, blocksClass: 'FluxAutoBlocks', label: 'Flux — Text To Image', inputs: [{ ...definition.inputs[0], type: 'opaque' }], @@ -498,7 +520,7 @@ function fluxFixture() { url: 'https://huggingface.co/black-forest-labs/FLUX.1-dev', }, }, - contentHash: 'sha256:cfec41815a507f63620e7b80cb6a18700485ac2520a7472826b1389418bbd7ed', + contentHash: route.definitionContentHash, }); Object.assign(admission, { id: admissionId, @@ -507,11 +529,7 @@ function fluxFixture() { sealedBindingValues: { artifact: artifact.repo, pipelineClass: 'FluxModularPipeline' }, modelDependencies: [{ id: 'model', kind: 'model', repo: artifact.repo, revision: artifact.revision }], adapterContractId: adapterId, - studioExecutionSpec: { - id: 'flux-dev:modular-text-to-image:v1', - contentHash: 'studio-spec-v1-9dd14796', - executionProfileId: 'flux-dev:modular', - }, + studioExecutionSpec: structuredClone(route.studioExecutionSpec), artifact, }); definition.graphAdapterContracts[0] = { ...definition.graphAdapterContracts[0], id: adapterId }; @@ -767,7 +785,9 @@ function transientNodes() { } function persistedFlowText() { - return storage.get('modiff.flow') ?? ''; + const checkpoint = sessionValues.get('modiff.flow'); + assert.ok(typeof checkpoint === 'string' && checkpoint.length > 0, 'inspect an actual nonempty page checkpoint'); + return checkpoint; } function autoReceipt(instance) { @@ -795,6 +815,7 @@ function deferred() { beforeEach(() => { storage.clear(); + sessionValues.clear(); const configured = fixture(); flowStore.useFlowStore.setState({ nodes: [baseNode()], @@ -896,6 +917,24 @@ test('a template skeleton cannot force Expert before its managed binding is read assert.equal(finished.autoUnavailable, false); }); +test('synthetic insertion fixtures follow exact current routes while the old identity stays refused', () => { + for (const configured of [fixture(), fluxFixture()]) { + assert.ok(routeModule.registeredBlockV2Route(configured.definition, configured.admission)); + } + const { definition, admission } = fixture(); + const oldIdentity = { + libraryRevision: 'fbf49e7f35857f76bc57b177e26f12b03687c668', + contentHash: 'sha256:49cb50671b41cf2c03b22387cfe2cf1b37f16b2996961791505aef830817c393', + }; + for (const stale of [ + oldIdentity, + { libraryRevision: oldIdentity.libraryRevision }, + { contentHash: oldIdentity.contentHash }, + ]) { + assert.equal(routeModule.registeredBlockV2Route({ ...definition, ...stale }, admission), null); + } +}); + test('Qwen text-to-image fetches one audited definition and inserts only one source-neutral V2 root', async () => { const { definition } = fixture(); const observedTransientStates = []; @@ -1275,6 +1314,80 @@ test('a fresh Qwen registered route rejects matching stale ambient defaults and ); }); +test('fresh CTC catalog insertion preserves its declared word timestamps instead of generic segment defaults', async () => { + const fixture = JSON.parse(readFileSync(path.join(ROOT, 'tests/fixtures/ctc-catalog-insertion.v1.json'), 'utf8')); + const definition = fixture.catalogDefinition; + const entry = fixture.compiledEntry; + libraryStore.useHuggingFaceNodeLibraryStore.setState({ + library: fixtureLibrary([definition], []), + loaded: true, + error: null, + }); + globalThis.fetch = async (url) => { + assert.ok(String(url).includes('/huggingface/registered-block-v2?')); + return new Response(JSON.stringify({ error: false, schemaVersion: 1, entry }), { + status: 200, + headers: { 'Content-Type': 'application/json' }, + }); + }; + const ambient = modelProfiles.getFormDefaultsForRegisteredRoute('speech_to_text', definition.pipelineClass); + assert.equal(ambient.speechTimestamps, 'segment'); + assert.equal(entry.values.timestamps, 'word'); + const root = await insertion.createHuggingFaceClusterForGraph(definition, { x: 80, y: 90 }, ambient); + assert.equal(root.data.blockInstanceV2.values.timestamps, 'word'); + assert.deepEqual(root.data.blockInstanceV2.definitionSnapshot, entry.definition); + assert.equal(blockRuntime.blockViewModelV2(root.data.blockInstanceV2).controlParams.timestamps.value, 'word'); +}); + +test('registered speech controls project exact uploaded media and transcription settings for Auto', async () => { + const fixture = JSON.parse(readFileSync(path.join(ROOT, 'tests/fixtures/ctc-catalog-insertion.v1.json'), 'utf8')); + libraryStore.useHuggingFaceNodeLibraryStore.setState({ + library: fixtureLibrary([fixture.catalogDefinition], []), + loaded: true, + error: null, + }); + globalThis.fetch = async () => Response.json({ error: false, schemaVersion: 1, entry: fixture.compiledEntry }); + const ambient = modelProfiles.getFormDefaultsForRegisteredRoute( + 'speech_to_text', + fixture.catalogDefinition.pipelineClass, + ); + const root = await insertion.createHuggingFaceClusterForGraph(fixture.catalogDefinition, { x: 80, y: 90 }, ambient); + const instance = blockSchema.normalizeBlockInstanceV2({ + ...root.data.blockInstanceV2, + values: { + ...root.data.blockInstanceV2.values, + audio: '@data/audio/authored-speech.wav', + timestamps: 'none', + chunk_length_seconds: '12', + stride_length_seconds: '2', + }, + }); + const projected = blockRunForm.registeredBlockRunFormV2(instance, 'auto'); + assert.ok(projected); + assert.equal(projected.form.sourceAudio, instance.values.audio); + assert.equal(projected.form.speechTimestamps, 'none'); + assert.equal(projected.form.speechChunkSeconds, 12); + assert.equal(projected.form.speechStrideSeconds, 2); + assert.deepEqual( + instance.values, + projected.instance.values, + 'Projection must not rewrite the authoritative instance', + ); + const defaults = blockRunForm.registeredBlockRunFormV2(root.data.blockInstanceV2, 'auto'); + assert.equal(defaults.form.speechTimestamps, 'word', 'Fresh declared timestamps must survive planning too'); + const uploaded = blockSchema.normalizeBlockInstanceV2({ + ...instance, + values: { ...instance.values, audio: [instance.values.audio] }, + }); + assert.equal(blockRunForm.registeredBlockRunFormV2(uploaded, 'auto').form.sourceAudio, instance.values.audio); + assert.deepEqual(uploaded.values.audio, [instance.values.audio]); + for (const field of ['sourceAudio', 'referenceAudio', 'sourceVideo', 'maskImage']) { + assert.equal(blockRunForm.projectBlockControlValueV2(['@data/input.bin'], '', field), '@data/input.bin'); + assert.equal(blockRunForm.projectBlockControlValueV2(['first', 'second'], '', field), ''); + } + assert.equal(blockRunForm.projectBlockControlValueV2(['float32'], '', 'dtype'), ''); +}); + test('a backend-defined route without a legacy Studio profile retains compiled creator defaults', async () => { const configured = fixture(); const witness = configureFixture(configured); @@ -2506,7 +2619,7 @@ test('workflow replacement during a deferred field action aborts and cleans the }); for (const change of ['workflow', 'edit', 'cancel', 'gesture', 'none']) { - test(`a delayed registered Block switch preserves its owner after ${change}`, async () => { + test(`a delayed registered Block switch preserves its owner after ${change}`, { timeout: 10000 }, async () => { const switching = await server.ssrLoadModule('/src/studio/registeredBlockRouteSwitchV1.ts'); const configured = fixture(); const root = await insertion.createHuggingFaceClusterForGraph(configured.definition, { x: 80, y: 90 }, form()); @@ -2543,7 +2656,13 @@ for (const change of ['workflow', 'edit', 'cancel', 'gesture', 'none']) { (value) => ({ value }), (error) => ({ error }), ); - await entered.promise; + await Promise.race([ + entered.promise, + settled.then((result) => { + if (result.error) throw result.error; + assert.fail('The switch completed before reaching the deliberately delayed request.'); + }), + ]); if (change === 'workflow') { studioStore.useStudioStore.setState({ activeWorkflowTabId: 'different-workflow', workflowCanvasEpoch: 2 }); } else if (change === 'edit') { diff --git a/scripts/registered-block-v2-route-audit.test.mjs b/scripts/registered-block-v2-route-audit.test.mjs index 7691b089..5a8d361e 100644 --- a/scripts/registered-block-v2-route-audit.test.mjs +++ b/scripts/registered-block-v2-route-audit.test.mjs @@ -29,6 +29,7 @@ let modelProfiles; let modularConditionalModule; let reviewedModularGraphModule; let routeModule; +let nodeLibraryModule; let server; let snapshot; let storage; @@ -72,7 +73,9 @@ from modiff.huggingface_cluster_promotions import build_post_promotion_node_libr from modiff.huggingface_node_library import build_huggingface_node_library from modiff.modular_conditional_contracts import reviewed_modular_conditional_snapshot from modiff.server import WebServer -from modiff.studio_execution_specs import _execution_spec_role_params, validate_studio_execution_specs +from modiff.studio_execution_specs import ( + _execution_spec_role_params, studio_execution_spec_for_pair, validate_studio_execution_specs, +) promotion_candidate_admission = os.environ.get("MODIFF_POST_PROMOTION_ADMISSION_ID", "") library = ( @@ -81,6 +84,23 @@ library = ( else build_huggingface_node_library() ) specs = validate_studio_execution_specs(MODULE_MAP) +# Frozen library admissions can retain a saved specification after fresh +# authoring moves to a provider-bound version. Join only their exact declared +# id/hash/profile; this static witness grants no executable/private publication. +spec_ids = {spec["id"] for spec in specs} +for definition in library["definitions"]: + for admission in definition.get("executionAdmissions", ()): + receipt = admission.get("studioExecutionSpec") + if admission.get("status") != "admitted" or not receipt or receipt["id"] in spec_ids: + continue + saved = studio_execution_spec_for_pair( + definition["pipelineClass"], admission["studioMode"], + content_hash=receipt["contentHash"], execution_profile_id=receipt["executionProfileId"], + ) + if saved is None or saved["id"] != receipt["id"] or saved["contentHash"] != receipt["contentHash"]: + raise ValueError("The frozen library admission has no exact retained Studio specification.") + specs.append(saved) + spec_ids.add(saved["id"]) web = WebServer(modules=MODULE_MAP) from modules.DiffusersRuntime.main import build_runtime_capabilities @@ -90,6 +110,7 @@ web._runtime_choice_capabilities_cache = build_runtime_capabilities( torch_module=SimpleNamespace( version=SimpleNamespace(hip="reviewed-contract", cuda=None), cuda=SimpleNamespace(is_bf16_supported=lambda: True), + backends=SimpleNamespace(cuda=SimpleNamespace(is_flash_attention_available=lambda: True)), nn=SimpleNamespace(attention=object()), ), package_available=lambda _name: False, @@ -157,8 +178,12 @@ reviewed_step_registry = { "cache": False, } base_registry[reviewed_step_key] = deepcopy(reviewed_step_registry) +# This common DTO is byte-identical for every spec. Serialize it once; +# the client creates an independent copy only for the selected compiler input. for registry in registries.values(): - registry[reviewed_step_key] = deepcopy(reviewed_step_registry) + if reviewed_step_key in registry: + assert registry[reviewed_step_key] == reviewed_step_registry + del registry[reviewed_step_key] def _source_values(definition, admission): @@ -840,6 +865,10 @@ const REVIEWED_IMAGE_RESULT_DEFINITIONS = [ * admission and graph pins below still fail closed if any terminal changes. */ const REVIEWED_TERMINAL_OUTPUTS = new Map([ + ...['text2image', 'image_conditioned'].map((workflow) => [ + `diffusers.modular:MiniMaxH3ImageModularPipeline:${workflow}`, + [{ portId: 'images', role: 'decode', fieldId: 'images', adaptation: 'direct_media', mediaType: 'image' }], + ]), ...[ ['FluxControlNetPipeline', 'control_image', 'diffusersImageControl'], ['FluxControlNetImg2ImgPipeline', 'control_edit_image', 'diffusersImageControlEdit'], @@ -852,20 +881,20 @@ const REVIEWED_TERMINAL_OUTPUTS = new Map([ ['Flux2KleinPipeline', 'multi_image_reference_edit', 'diffusersImageEdit'], ['Flux2Pipeline', 'multi_image_reference_edit', 'diffusersImageEdit'], ['FluxCannyPipeline', 'control_edit_image', 'diffusersImageControlEdit'], - ['FluxCannyPipeline', 'control_image', 'diffusersImageControl'], + ['FluxCannyPipeline', 'control_image', 'decode'], ['FluxCannyPipeline', 'control_inpaint', 'diffusersImageControlInpaint'], ['FluxDepthPipeline', 'control_edit_image', 'diffusersImageControlEdit'], - ['FluxDepthPipeline', 'control_image', 'diffusersImageControl'], + ['FluxDepthPipeline', 'control_image', 'decode'], ['FluxDepthPipeline', 'control_inpaint', 'diffusersImageControlInpaint'], ['FluxDevPipeline', 'inpaint', 'diffusersImageInpaint'], - ['FluxFillPipeline', 'inpaint', 'diffusersImageInpaint'], - ['FluxFillPipeline', 'outpaint', 'diffusersImageInpaint'], + ['FluxFillPipeline', 'inpaint', 'decode'], + ['FluxFillPipeline', 'outpaint', 'decode'], ['FluxKontextInpaintPipeline', 'inpaint', 'diffusersImageInpaint'], ['FluxKontextInpaintPipeline', 'outpaint', 'diffusersImageInpaint'], ['FluxKontextPipeline', 'multi_image_reference_edit', 'diffusersImageEdit'], ['FluxKreaPipeline', 'text_to_image', 'diffusersImageGenerate'], - ['FluxReduxPipeline', 'edit_image', 'diffusersImageEdit'], - ['FluxReduxPipeline', 'multi_image_reference_edit', 'diffusersImageEdit'], + ['FluxReduxPipeline', 'edit_image', 'decode'], + ['FluxReduxPipeline', 'multi_image_reference_edit', 'decode'], ['FluxSchnellPipeline', 'text_to_image', 'diffusersImageGenerate'], ].map(([pipeline, mode, role]) => [ `diffusers.composite:${pipeline}:${mode}`, @@ -1010,6 +1039,7 @@ before(async () => { modularConditionalModule = await server.ssrLoadModule('/src/studio/huggingFaceModularConditionals.ts'); reviewedModularGraphModule = await server.ssrLoadModule('/src/studio/reviewedModularGraphV2.ts'); routeModule = await server.ssrLoadModule('/src/studio/registeredBlockV2Routes.ts'); + nodeLibraryModule = await server.ssrLoadModule('/src/studio/huggingFaceNodeLibrary.ts'); }); after(async () => { @@ -1018,7 +1048,89 @@ after(async () => { delete globalThis.localStorage; }); -test('every explicitly routed admission is an exact backend schema-v6 compiler success with fixed runtime probes', () => { +function selectedCompilerRegistry(specId) { + const source = snapshot.registries[specId]; + const shared = snapshot.baseRegistry['modules.ModularDiffusers.ReviewedModularWorkflowStep']; + assert.ok(source && shared, 'the actual selected backend registry is unavailable'); + assert.equal(Object.hasOwn(source, 'modules.ModularDiffusers.ReviewedModularWorkflowStep'), false); + return { + ...structuredClone(source), + 'modules.ModularDiffusers.ReviewedModularWorkflowStep': structuredClone(shared), + }; +} + +test('the shared backend Step schema supplies independent exact compiler registries', () => { + const specId = snapshot.specs[0].id; + const key = 'modules.ModularDiffusers.ReviewedModularWorkflowStep'; + const first = selectedCompilerRegistry(specId); + const second = selectedCompilerRegistry(specId); + assert.deepEqual(first[key], snapshot.baseRegistry[key]); + assert.deepEqual(second[key], snapshot.baseRegistry[key]); + first[key].params.width.label = 'changed only in one scenario'; + assert.notEqual(first[key].params.width.label, second[key].params.width.label); + assert.deepEqual(second[key], snapshot.baseRegistry[key]); +}); + +test('the real public library preserves the sealed text-Control placement and rejects unsealed or altered values', () => { + const parsed = nodeLibraryModule.parseHuggingFaceNodeLibrary(snapshot.library); + const definition = parsed.definitions.find( + (item) => item.id === 'diffusers.modular:QwenImageModularPipeline:controlnet_text2image', + ); + const admission = definition.executionAdmissions.find((item) => item.studioMode === 'control_image'); + assert.equal(admission.sealedBindingValues.controlnetOffloadMode, 'none'); + assert.equal(admission.executionParameterSources.includes('controlnetOffloadMode'), false); + for (const value of ['model_cpu', false, null]) { + const invalid = structuredClone(snapshot.library); + invalid.definitions + .find((item) => item.id === definition.id) + .executionAdmissions.find((item) => item.id === admission.id).sealedBindingValues.controlnetOffloadMode = value; + assert.throws(() => nodeLibraryModule.parseHuggingFaceNodeLibrary(invalid), /node-library contract/); + } + const missing = structuredClone(snapshot.library); + delete missing.definitions + .find((item) => item.id === definition.id) + .executionAdmissions.find((item) => item.id === admission.id).sealedBindingValues.controlnetOffloadMode; + assert.throws(() => nodeLibraryModule.parseHuggingFaceNodeLibrary(missing), /node-library contract/); + const editable = structuredClone(snapshot.library); + editable.definitions + .find((item) => item.id === definition.id) + .executionAdmissions.find((item) => item.id === admission.id) + .executionParameterSources.push('controlnetOffloadMode'); + assert.throws(() => nodeLibraryModule.parseHuggingFaceNodeLibrary(editable), /node-library contract/); +}); + +test('actual registered materialization rejects a changed sealed ControlNet offload value before node preparation', () => { + const definition = snapshot.library.definitions.find( + (item) => item.id === 'diffusers.modular:QwenImageModularPipeline:controlnet_text2image', + ); + const admission = definition.executionAdmissions.find((item) => item.studioMode === 'control_image'); + const executionSpec = snapshot.specs.find((item) => item.id === admission.studioExecutionSpec.id); + let instance = clusterInstance.createHuggingFaceClusterInstance(definition, 'sealed-control-placement-rejection'); + instance = clusterInstance.setHuggingFaceClusterExecution(instance, definition, admission.id); + const bindingValues = clusterRuntime.huggingFaceClusterExecutionParameterValues( + admission, + modelProfiles.getFormDefaultsForRegisteredRoute(admission.studioMode, definition.pipelineClass), + ); + const altered = structuredClone(admission); + altered.sealedBindingValues.controlnetOffloadMode = 'model_cpu'; + assert.throws( + () => + clusterMaterializer.materializeHuggingFaceClusterExecutionSkeleton({ + definition, + instance, + admission: altered, + executionSpec, + nodesRegistry: selectedCompilerRegistry(executionSpec.id), + bindingValues, + expanded: false, + }), + /sealed or planner binding values/, + ); +}); + +test('every explicitly routed admission is an exact backend schema-v6 compiler success with fixed runtime probes', async () => { + const parsedLibrary = nodeLibraryModule.parseHuggingFaceNodeLibrary(snapshot.library); + assert.equal(parsedLibrary.definitions.length, snapshot.library.definitions.length); const specs = new Map(snapshot.specs.map((spec) => [spec.id, spec])); const eligibleAdmissions = snapshot.library.definitions.flatMap((definition) => definition.executionAdmissions.filter(eligibleAdmission).map((admission) => ({ definition, admission })), @@ -1037,6 +1149,7 @@ test('every explicitly routed admission is an exact backend schema-v6 compiler s for (const admission of definition.executionAdmissions.filter(eligibleAdmission)) { try { const executionSpec = specs.get(admission.studioExecutionSpec.id); + const nodesRegistry = selectedCompilerRegistry(executionSpec.id); assert.ok(executionSpec, 'the exact Studio execution specification is absent'); assert.deepEqual( { @@ -1060,7 +1173,7 @@ test('every explicitly routed admission is an exact backend schema-v6 compiler s instance, admission, executionSpec, - nodesRegistry: snapshot.registries[executionSpec.id], + nodesRegistry: nodesRegistry, bindingValues, expanded: false, }); @@ -1073,6 +1186,48 @@ test('every explicitly routed admission is an exact backend schema-v6 compiler s bindingValues, }); assert.equal(skeleton.bindingsComplete, true); + if ( + admission.id === + 'diffusers.cluster-admission:QwenImageModularPipeline:controlnet_text2image:mode:control_image' + ) { + const autoBindingValues = clusterRuntime.huggingFaceClusterExecutionParameterValues(admission, { + ...form, + resourceMode: 'auto', + autoOffload: true, + offloadMode: 'model_cpu', + device: 'cuda:0', + dtype: 'bfloat16', + }); + const autoMaterialized = clusterMaterializer.materializeHuggingFaceClusterExecutionSkeleton({ + definition, + instance, + admission, + executionSpec, + nodesRegistry: nodesRegistry, + bindingValues: autoBindingValues, + expanded: false, + }); + const autoSkeleton = finalizedRegisteredAuditSkeleton({ + definition, + instance, + admission, + executionSpec, + skeleton: autoMaterialized, + bindingValues: autoBindingValues, + }).skeleton; + const base = autoSkeleton.nodes.find((node) => node.data.huggingFaceClusterExecutionRole === 'models'); + const auxiliary = autoSkeleton.nodes.find( + (node) => node.data.huggingFaceClusterExecutionRole === 'controlnetModel', + ); + assert.ok(base && auxiliary, 'the actual registered Control graph must retain both model owners'); + assert.equal(base.data.params.auto_offload.value, true); + assert.equal(base.data.params.offload_mode.value, 'model_cpu'); + assert.equal(auxiliary.data.params.auto_offload.value, false); + assert.equal(auxiliary.data.params.offload_mode.value, 'none'); + for (const field of ['device', 'dtype']) { + assert.equal(auxiliary.data.params[field].value, base.data.params[field].value); + } + } const registeredRoute = routeModule.registeredBlockV2Route(definition, admission); const previousRoute = routeModule.REGISTERED_BLOCK_V2_ROUTES.find( (candidate) => candidate.definitionId === definition.id && candidate.admissionId === admission.id, @@ -1108,7 +1263,7 @@ test('every explicitly routed admission is an exact backend schema-v6 compiler s skeleton, route, snapshot.library.blockDefinitions, - snapshot.registries[executionSpec.id]['modules.ModularDiffusers.ReviewedModularWorkflowStep'], + nodesRegistry['modules.ModularDiffusers.ReviewedModularWorkflowStep'], modularConditionalModule.parseHuggingFaceModularConditionalSnapshot(snapshot.modularConditionalSnapshot), snapshot.library.blockRoleAdapters, ); @@ -1120,8 +1275,7 @@ test('every explicitly routed admission is an exact backend schema-v6 compiler s ...(route ? { route } : {}), blockDefinitions: snapshot.library.blockDefinitions, blockRoleAdapters: snapshot.library.blockRoleAdapters, - reviewedModularStepNodeData: - snapshot.registries[executionSpec.id]['modules.ModularDiffusers.ReviewedModularWorkflowStep'], + reviewedModularStepNodeData: nodesRegistry['modules.ModularDiffusers.ReviewedModularWorkflowStep'], modularConditionalSnapshot: modularConditionalModule.parseHuggingFaceModularConditionalSnapshot( snapshot.modularConditionalSnapshot, ), @@ -1182,6 +1336,49 @@ test('every explicitly routed admission is an exact backend schema-v6 compiler s `the exact graph leaves required runtime sockets unbound: ${unboundRequiredInputs.join(', ')}`, ); assert.equal(compiled.definition.source.executionAdmissionId, admission.id); + if ( + /^diffusers\.modular:Helios(?:Pyramid(?:Distilled)?)?ModularPipeline:(?:image2video|video2video)$/u.test( + definition.id, + ) + ) { + const outputs = compiled.definition.boundary.outputs; + assert.deepEqual( + outputs.map(({ portId, valueType, binding }) => ({ portId, valueType, binding })), + [ + { + portId: 'height', + valueType: 'int', + binding: { + nodeId: definition.workflowId === 'image2video' ? 'loadImage' : 'loadVideo', + fieldOrPortId: 'height', + }, + }, + { + portId: 'width', + valueType: 'int', + binding: { + nodeId: definition.workflowId === 'image2video' ? 'loadImage' : 'loadVideo', + fieldOrPortId: 'width', + }, + }, + { portId: 'videos', valueType: 'video', binding: { nodeId: 'videoExport', fieldOrPortId: 'file' } }, + ], + 'the generated movie must be wireable independently of the source dimensions', + ); + } + if (definition.id === 'diffusers.modular:QwenImageEditModularPipeline:image_conditioned') { + for (const dimension of ['width', 'height']) { + const input = compiled.definition.boundary.inputs.find(({ portId }) => portId === `${dimension}_input`); + const output = compiled.definition.boundary.outputs.find(({ portId }) => portId === dimension); + assert.ok(input, `the authored ${dimension} has its own public input alias`); + assert.deepEqual(input.binding, { + nodeId: 'upstream:denoise.input.additional_inputs', + fieldOrPortId: dimension, + }); + assert.ok(output, `the original source-image ${dimension} output remains public`); + assert.deepEqual(output.binding, { nodeId: 'loadImage', fieldOrPortId: dimension }); + } + } if (route && process.env.MODIFF_GENERATE_ROUTE_CANDIDATES !== '1') { assert.equal(compiled.definition.contentHash, route.compiledDefinitionContentHash); assert.equal( @@ -1202,8 +1399,7 @@ test('every explicitly routed admission is an exact backend schema-v6 compiler s route: tamperedBoundary, blockDefinitions: snapshot.library.blockDefinitions, blockRoleAdapters: snapshot.library.blockRoleAdapters, - reviewedModularStepNodeData: - snapshot.registries[executionSpec.id]['modules.ModularDiffusers.ReviewedModularWorkflowStep'], + reviewedModularStepNodeData: nodesRegistry['modules.ModularDiffusers.ReviewedModularWorkflowStep'], }), /reviewed registered output projection/u, ); @@ -1227,6 +1423,7 @@ test('every explicitly routed admission is an exact backend schema-v6 compiler s let candidateSkeleton; try { const executionSpec = specs.get(admission.studioExecutionSpec.id); + const nodesRegistry = selectedCompilerRegistry(executionSpec.id); const parameterOverrides = Object.fromEntries( definition.inputs.map((field) => [field.name, field.default]), ); @@ -1246,7 +1443,7 @@ test('every explicitly routed admission is an exact backend schema-v6 compiler s instance, admission, executionSpec, - nodesRegistry: snapshot.registries[executionSpec.id], + nodesRegistry: nodesRegistry, bindingValues, expanded: false, }); @@ -1270,8 +1467,7 @@ test('every explicitly routed admission is an exact backend schema-v6 compiler s route: discoveryRoute, blockDefinitions: snapshot.library.blockDefinitions, blockRoleAdapters: snapshot.library.blockRoleAdapters, - reviewedModularStepNodeData: - snapshot.registries[executionSpec.id]['modules.ModularDiffusers.ReviewedModularWorkflowStep'], + reviewedModularStepNodeData: nodesRegistry['modules.ModularDiffusers.ReviewedModularWorkflowStep'], }); assert.ok( discovery.definition.boundary.outputs.length > 0, @@ -1317,8 +1513,7 @@ test('every explicitly routed admission is an exact backend schema-v6 compiler s route: exactRoute, blockDefinitions: snapshot.library.blockDefinitions, blockRoleAdapters: snapshot.library.blockRoleAdapters, - reviewedModularStepNodeData: - snapshot.registries[executionSpec.id]['modules.ModularDiffusers.ReviewedModularWorkflowStep'], + reviewedModularStepNodeData: nodesRegistry['modules.ModularDiffusers.ReviewedModularWorkflowStep'], }); routeCandidates.push({ ...exactRoute, @@ -1380,6 +1575,7 @@ test('every explicitly routed admission is an exact backend schema-v6 compiler s process.env.MODIFF_GENERATE_ROUTE_CANDIDATES === '1' ? routeModule.REGISTERED_BLOCK_V2_ROUTES.length : expectedAdmissionCount, + `compiler failures: ${JSON.stringify(failures, null, 2)}`, ); } if (process.env.MODIFF_AUDIT_DISCOVERY === '1' && process.env.MODIFF_ROUTE_CANDIDATES_ONLY !== '1') { @@ -1414,7 +1610,7 @@ test('every explicitly routed admission is an exact backend schema-v6 compiler s definition.integrationStatus !== 'equivalent_standard_route', ); if (process.env.MODIFF_ROUTE_CANDIDATES_ONLY !== '1') - assert.equal(exactModularSuccesses.length, 73, 'the complete currently admitted exact Modular route set drifted'); + assert.equal(exactModularSuccesses.length, 75, 'the complete currently admitted exact Modular route set drifted'); exactModularSuccesses.forEach(({ definition, compiledDefinition }) => { const exactSteps = compiledDefinition.graph.nodes.filter( (node) => node.data.module === 'modules.ModularDiffusers' && node.data.action === 'ReviewedModularWorkflowStep', @@ -1513,6 +1709,104 @@ test('every explicitly routed admission is an exact backend schema-v6 compiler s `${definition.id} falsely presents an equivalent standard executor as exact upstream blocks`, ); }); + const runtime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); + for (const [catalogId, portId, savedLabel, displayLabel, type] of [ + ['diffusers.modular:Cosmos3DistilledModularPipeline:text2image', 'images', 'videos', 'Image', 'image'], + ['diffusers.modular:Cosmos3OmniModularPipeline:text2image', 'images', 'videos', 'Image', 'image'], + [ + 'transformers.composite:HuggingFaceCTCSpeechRecognitionModel:speech_to_text', + 'result', + 'result', + 'Transcript', + 'any', + ], + [ + 'transformers.composite:HuggingFaceSpeechRecognitionModel:speech_to_text', + 'result', + 'result', + 'Transcript', + 'any', + ], + [ + 'transformers.composite:HuggingFaceSpeechRecognitionModel:speech_translation', + 'result', + 'result', + 'Transcript', + 'any', + ], + ['diffusers.modular:Cosmos3OmniModularPipeline:image2video', 'videos', 'videos', 'videos', 'video'], + ]) { + const result = [...compilerSuccesses.values()].find(({ definition }) => definition.id === catalogId); + assert.ok(result, catalogId); + const instance = result.compiledInstance; + const saved = JSON.stringify(instance); + const { boundary, controls } = instance.effectiveInterface; + const publicPort = boundary.outputs.find((port) => port.portId === portId); + assert.equal(publicPort.label, savedLabel, catalogId); + const projected = runtime.blockConnectorParamsV2(instance).outputs[portId]; + assert.equal(projected.label, displayLabel, catalogId); + assert.equal(projected.type, type, catalogId); + assert.equal(projected.fieldOptions.blockBindingV2.logicalId, portId, catalogId); + assert.equal(projected.fieldOptions.blockBindingV2.nodeId, publicPort.binding.nodeId, catalogId); + assert.equal(projected.fieldOptions.blockBindingV2.fieldOrPortId, publicPort.binding.fieldOrPortId, catalogId); + const edited = runtime.replaceBlockEffectiveInterfaceV2(instance, { + controls, + boundary: { + ...boundary, + outputs: boundary.outputs.map((port) => (port.portId === portId ? { ...port, label: 'My output' } : port)), + }, + }); + assert.equal(runtime.blockConnectorParamsV2(edited).outputs[portId].label, 'My output', catalogId); + assert.equal(JSON.stringify(instance), saved, catalogId); + } + + for (const workflow of ['image2video', 'text2image', 'text2video', 'video2video', 'text2video_with_sound']) { + const catalogId = `diffusers.modular:Cosmos3OmniModularPipeline:${workflow}`; + const result = [...compilerSuccesses.values()].find(({ definition }) => definition.id === catalogId); + assert.ok(result, catalogId); + const instance = result.compiledInstance; + const wrapperId = 'container:decode/standard'; + if (workflow === 'text2video_with_sound') { + assert.equal(runtime.projectedStageKindV2(instance, wrapperId), null, catalogId); + continue; + } + const expanded = runtime.setBlockPresentationV2(instance, { + expanded: true, + collapsedContainerNodeIds: instance.presentation.collapsedContainerNodeIds.filter( + (id) => id !== 'container:decode', + ), + }); + const projection = runtime.materializeBlockProjectionV2(runtime.createBlockRootNodeV2(expanded)); + const wrapper = projection.nodes.find((node) => node.data.blockProjectionNodeId === wrapperId); + assert.ok(wrapper, catalogId); + assert.equal(runtime.projectedStageKindV2(expanded, wrapperId), 'decode', catalogId); + assert.equal(wrapper.data.blockProjectionContainerExpanded, false, catalogId); + assert.equal( + projection.nodes.some((node) => node.data.blockProjectionNodeId === 'decode'), + false, + catalogId, + ); + const sockets = Object.entries(wrapper.data.params).map(([handle, field]) => [ + runtime.blockProjectionConnectionEndpointV2(wrapper, handle, field.display)?.fieldOrPortId, + field.display, + field.type, + ]); + assert.deepEqual( + sockets.sort(), + [ + ['latents', 'input', 'latent'], + ['output_type', 'input', 'string'], + ['state_in', 'input', 'modular_workflow_state'], + ['state_out', 'output', 'modular_workflow_state'], + ['videos', 'output', workflow === 'text2image' ? 'image' : 'video'], + ].sort(), + catalogId, + ); + assert.deepEqual(runtime.blockOperationGraphV2(expanded), runtime.blockOperationGraphV2(instance), catalogId); + assert.deepEqual(expanded.definitionSnapshot, instance.definitionSnapshot, catalogId); + assert.deepEqual(expanded.effectiveGraph, instance.effectiveGraph, catalogId); + } + const qwenDefinition = snapshot.library.definitions.find( (definition) => definition.id === 'diffusers.modular:QwenImageModularPipeline:text2image', ); @@ -1564,8 +1858,9 @@ test('every explicitly routed admission is an exact backend schema-v6 compiler s if (process.env.MODIFF_GENERATE_ROUTE_CANDIDATES !== '1') assert.ok(qwenRoute); if (process.env.MODIFF_GENERATE_ROUTE_CANDIDATES !== '1') { const qwenExecutionSpec = specs.get(qwen.admission.studioExecutionSpec.id); - const qwenReviewedStep = - snapshot.registries[qwenExecutionSpec.id]['modules.ModularDiffusers.ReviewedModularWorkflowStep']; + const qwenReviewedStep = selectedCompilerRegistry(qwenExecutionSpec.id)[ + 'modules.ModularDiffusers.ReviewedModularWorkflowStep' + ]; const exactOnce = reviewedModularGraphModule.reviewedModularGraphV2( qwen.definition, qwen.skeleton, @@ -1763,6 +2058,42 @@ test('every explicitly routed admission is an exact backend schema-v6 compiler s } }); +test('fresh Cosmos image authoring selects its new exact catalog route and rejects the historical receipt as a fallback', () => { + const definition = snapshot.library.definitions.find( + ({ id }) => id === 'diffusers.modular:Cosmos3OmniModularPipeline:text2image', + ); + const admission = definition.executionAdmissions.find(eligibleAdmission); + const executionSpec = snapshot.specs.find(({ id }) => id === admission.studioExecutionSpec.id); + assert.equal( + executionSpec.roles.some(([role]) => role === 'afterDecode'), + false, + ); + assert.notEqual(admission.studioExecutionSpec.contentHash, 'studio-spec-v1-91ed105d'); + const route = routeModule.registeredBlockV2Route(definition, admission); + assert.ok(route, 'the fresh authoritative receipt must have an exact registered route'); + assert.deepEqual(route.studioExecutionSpec, admission.studioExecutionSpec); + assert.deepEqual( + route.boundary.outputs, + [ + { + portId: 'images', + outputName: 'videos', + role: 'decode', + fieldId: 'image', + adaptation: 'direct_media', + mediaType: 'image', + }, + ], + 'the reviewed upstream frame output and backend image boundary retain their existing adaptation', + ); + const historicalAdmission = structuredClone(admission); + historicalAdmission.studioExecutionSpec.contentHash = 'studio-spec-v1-91ed105d'; + assert.equal(routeModule.registeredBlockV2Route(definition, historicalAdmission), null); + const malformedAdmission = structuredClone(admission); + malformedAdmission.studioExecutionSpec.contentHash = 'studio-spec-v1-00000000'; + assert.equal(routeModule.registeredBlockV2Route(definition, malformedAdmission), null); +}); + test('registered route identity fails closed on catalog, artifact, spec, admission, and action drift', () => { if (process.env.MODIFF_POST_PROMOTION_ADMISSION_ID) { assert.equal(process.env.MODIFF_GENERATE_ROUTE_CANDIDATES, '1'); @@ -1808,3 +2139,25 @@ test('registered route identity fails closed on catalog, artifact, spec, admissi assert.equal(routeModule.registeredBlockV2Route(changed, changedAdmission), null); }); }); + +test('ordinary composite routes retain exact current contracts and refuse artifact pin drift', async (t) => { + const pairs = snapshot.library.definitions + .filter( + (definition) => definition.provider === 'diffusers' && definition.definitionKind === 'studio_execution_composite', + ) + .flatMap((definition) => + definition.executionAdmissions.filter(eligibleAdmission).map((admission) => ({ definition, admission })), + ); + assert.equal(pairs.length, 33, 'the existing ordinary composite admission set changed'); + for (const { definition, admission } of pairs) { + await t.test(admission.id, () => { + const route = routeModule.registeredBlockV2Route(definition, admission); + assert.ok(route, 'the current source declaration must have one exact reviewed route'); + assert.deepEqual(route.studioExecutionSpec, admission.studioExecutionSpec); + assert.deepEqual(route.artifact, admission.artifact); + const foreignPin = structuredClone(admission); + foreignPin.artifact.revision = '0'.repeat(40); + assert.equal(routeModule.registeredBlockV2Route(definition, foreignPin), null); + }); + } +}); diff --git a/scripts/release-candidate-report.mjs b/scripts/release-candidate-report.mjs index fddeb485..79197075 100644 --- a/scripts/release-candidate-report.mjs +++ b/scripts/release-candidate-report.mjs @@ -1,4 +1,5 @@ import { createHash } from 'node:crypto'; +import { spawnSync } from 'node:child_process'; import { existsSync, readFileSync, writeFileSync } from 'node:fs'; import { dirname, join, resolve } from 'node:path'; import { fileURLToPath } from 'node:url'; @@ -53,12 +54,26 @@ function hash(namespace, value) { } const contract = readJson(CONTRACT_PATH); +// A retained hash cannot attest that today's templates/source still match it. +// Reuse the existing read-only verifier; never regenerate the contract here. +const contractVerification = spawnSync(process.execPath, [join(SCRIPT_DIR, 'release-contract.mjs'), '--check'], { + cwd: CLIENT_ROOT, + env: { ...process.env, MODIFF_BACKEND_DIR: BACKEND_ROOT }, + encoding: 'utf8', + timeout: 120_000, + maxBuffer: 1024 * 1024, +}); +const releaseContractCurrent = + contractVerification.status === 0 && !contractVerification.error && !contractVerification.signal; const hardwareQualification = existsSync(HARDWARE_QUALIFICATION_PATH) ? readJson(HARDWARE_QUALIFICATION_PATH) : { receipts: [] }; -const resourceQualification = existsSync(RESOURCE_QUALIFICATION_PATH) +const savedResourceQualification = existsSync(RESOURCE_QUALIFICATION_PATH) ? readJson(RESOURCE_QUALIFICATION_PATH) - : { status: 'missing', coverage: { required: 0, qualified: 0, missing: 0 } }; + : null; +const resourceQualificationStale = + savedResourceQualification !== null && savedResourceQualification.releaseContractHash !== contract.contractHash; +const resourceQualification = resourceQualificationStale ? null : savedResourceQualification; const packageSet = Object.values(contract.packageSets ?? {})[0] ?? {}; const incompleteTemplates = contract.templates .filter((template) => !template.releaseEligible) @@ -66,9 +81,48 @@ const incompleteTemplates = contract.templates id: template.id, missing: template.missingReleaseEvidence, })); -const incompleteWorkflows = contract.workflows +const incompleteWorkflowEvidence = contract.workflows .filter((workflow) => !workflow.releaseEligible) - .map((workflow) => workflow.id); + .map((workflow) => ({ + id: workflow.id, + executionStatus: + workflow.canonicalExecutionEvidence?.status ?? + (workflow.lastSuccessfulRealRun ? 'retained_template_execution' : 'missing'), + missing: workflow.missingReleaseEvidence ?? [], + ...(workflow.reviewedRetainedTemplate + ? { + reviewedRetainedTemplate: { + templateId: workflow.reviewedRetainedTemplate.templateId, + associationHash: workflow.reviewedRetainedTemplate.associationHash, + qualificationScope: workflow.reviewedRetainedTemplate.qualificationScope, + }, + } + : {}), + })); +const incompleteWorkflows = incompleteWorkflowEvidence.map(({ id }) => id); +const standaloneExecutionScopes = new Map([ + ['verified_execution_only', 'exactModelWorkflows'], + ['verified_input_bound_model_variant', 'boundVariants'], + ['verified_prompt_bound_model_variant', 'boundVariants'], + ['verified_deterministic_execution', 'deterministicWorkflows'], + ['verified_deterministic_media_execution', 'deterministicWorkflows'], +]); +const standaloneExecution = { + verified: 0, + exactModelWorkflows: 0, + boundVariants: 0, + deterministicWorkflows: 0, + alreadyReleaseEligible: 0, + awaitingReleaseEligibility: 0, +}; +for (const workflow of contract.workflows) { + const scope = standaloneExecutionScopes.get(workflow.canonicalExecutionEvidence?.status); + if (!scope || !workflow.lastSuccessfulRealRun) continue; + standaloneExecution[scope] += 1; + standaloneExecution.verified += 1; + if (workflow.releaseEligible) standaloneExecution.alreadyReleaseEligible += 1; + else standaloneExecution.awaitingReleaseEligibility += 1; +} const missingFieldCounts = {}; for (const template of contract.templates) { for (const field of template.qualificationReceiptMissingFields ?? []) { @@ -89,16 +143,25 @@ const { } = hardwareCoverage; const gates = { - releaseContractCurrent: true, + releaseContractCurrent, templatesEligible: incompleteTemplates.length === 0, workflowsEligible: incompleteWorkflows.length === 0, qualificationReceiptsComplete: contract.coverage?.completeQualificationReceiptCount === contract.coverage?.templateCount, - resourceRecipesQualified: resourceQualification.status === 'complete', + resourceRecipesQualified: resourceQualification?.status === 'complete', supportedProfileDeclared: hardwareCoverage.hasSupportedProfile, supportedProfilesPhysicallyQualified: hardwareCoverage.allSupportedProfilesQualified, }; const blockers = [ + ...(gates.releaseContractCurrent + ? [] + : [ + { + id: 'release-contract-not-current', + message: + 'The retained release contract did not pass current-source verification. Run npm run release:contract:verify; preserve and diagnose stale or unavailable evidence before regenerating.', + }, + ]), ...(gates.templatesEligible ? [] : [ @@ -133,9 +196,11 @@ const blockers = [ ? [] : [ { - id: 'resource-recipes-incomplete', - count: resourceQualification.coverage?.missing ?? null, - message: 'Every advertised model-family resource recipe requires a measured real-weight run.', + id: resourceQualificationStale ? 'resource-report-not-current' : 'resource-recipes-incomplete', + count: resourceQualification?.coverage?.missing ?? null, + message: resourceQualificationStale + ? 'The saved resource report belongs to a different release contract. Run npm run release:resources:generate.' + : 'Every advertised model-family resource recipe requires a measured real-weight run.', }, ]), ...(gates.supportedProfileDeclared @@ -172,13 +237,17 @@ const body = { completeQualificationReceipts: contract.coverage?.completeQualificationReceiptCount ?? 0, workflows: contract.coverage?.workflowCount ?? 0, eligibleWorkflows: contract.coverage?.releaseEligibleWorkflowCount ?? 0, - resourceRecipes: resourceQualification.coverage, - releaseEligibleResourceRecipes: resourceQualification.coverage?.byReleaseLane?.releaseEligible ?? null, - deferredResourceRecipes: resourceQualification.coverage?.byReleaseLane?.deferred ?? null, + previewFreeResearchWorkflows: contract.coverage?.previewFreeResearchWorkflowCount ?? 0, + privateQualifiedWorkflows: contract.coverage?.privateQualifiedWorkflowCount ?? 0, + standaloneExecution, + resourceRecipes: resourceQualification?.coverage ?? null, + releaseEligibleResourceRecipes: resourceQualification?.coverage?.byReleaseLane?.releaseEligible ?? null, + deferredResourceRecipes: resourceQualification?.coverage?.byReleaseLane?.deferred ?? null, }, receiptMissingFieldCounts: missingFieldCounts, incompleteTemplates, incompleteWorkflows, + incompleteWorkflowEvidence, advertisedSupportedProfiles, physicallyQualifiedProfiles, physicallyObservedProfiles, diff --git a/scripts/release-candidate-report.test.mjs b/scripts/release-candidate-report.test.mjs new file mode 100644 index 00000000..f2e6df90 --- /dev/null +++ b/scripts/release-candidate-report.test.mjs @@ -0,0 +1,230 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { spawnSync } from 'node:child_process'; +import { mkdtempSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { basename, dirname, join, resolve } from 'node:path'; +import { fileURLToPath, pathToFileURL } from 'node:url'; +import { test } from 'node:test'; + +const scripts = dirname(fileURLToPath(import.meta.url)); +function fixture(workflows = []) { + const root = mkdtempSync(join(tmpdir(), 'modiff-release-freshness-')); + const clientScripts = join(root, 'client', 'scripts'); + const backend = join(root, 'backend'); + const output = join(backend, 'data', 'qualification', 'release', 'release-candidate-report.v1.json'); + mkdirSync(clientScripts, { recursive: true }); + mkdirSync(dirname(output), { recursive: true }); + const contractPath = join(backend, 'data', 'release-contract.v1.json'); + writeFileSync( + contractPath, + JSON.stringify({ + generatedAt: '2026-01-01T00:00:00Z', + contractHash: 'retained-contract-hash', + packageSets: {}, + templates: [], + workflows, + coverage: { + templateCount: 0, + completeQualificationReceiptCount: 0, + workflowCount: workflows.length, + releaseEligibleWorkflowCount: workflows.filter(({ releaseEligible }) => releaseEligible).length, + }, + }), + ); + const original = readFileSync(contractPath); + const sourceState = join(backend, 'source-state.txt'); + writeFileSync(sourceState, 'current'); + const reportSource = readFileSync(join(scripts, 'release-candidate-report.mjs'), 'utf8').replace( + "'./release-qualification-policy.mjs'", + JSON.stringify(pathToFileURL(join(scripts, 'release-qualification-policy.mjs')).href), + ); + const report = join(clientScripts, 'release-candidate-report.mjs'); + writeFileSync(report, reportSource); + // Controlled dependency stand-in exercises the normal read-only --check protocol. + // It never imports a model/runtime or rewrites the retained contract. + writeFileSync( + join(clientScripts, 'release-contract.mjs'), + ` + import { readFileSync } from 'node:fs'; + import { join } from 'node:path'; + if (process.argv.slice(2).join(' ') !== '--check') process.exit(81); + const state = readFileSync(join(process.env.MODIFF_BACKEND_DIR, 'source-state.txt'), 'utf8'); + process.exit(state === 'current' ? 0 : state === 'stale' ? 1 : 7); + `, + ); + return { + root, + backend, + output, + sourceState, + run: (...args) => + spawnSync(process.execPath, [report, ...args], { + encoding: 'utf8', + timeout: 10000, + env: { ...process.env, MODIFF_BACKEND_DIR: backend }, + }), + read: () => JSON.parse(readFileSync(output, 'utf8')), + assertPreserved: () => + assert.equal( + createHash('sha256').update(readFileSync(contractPath)).digest('hex'), + createHash('sha256').update(original).digest('hex'), + ), + close: () => { + assert.equal(dirname(root), resolve(tmpdir())); + assert(basename(root).startsWith('modiff-release-freshness-')); + rmSync(root, { recursive: true, force: true }); + }, + }; +} + +test('candidate report checks current source rather than trusting a retained contract hash', () => { + const f = fixture(); + try { + writeFileSync(f.sourceState, 'stale'); + const result = f.run(); + assert.equal(result.status, 0, result.stderr); + const report = f.read(); + assert.equal(report.gates.releaseContractCurrent, false); + assert(report.blockers.some((blocker) => blocker.id === 'release-contract-not-current')); + assert.equal(report.status, 'blocked'); + f.assertPreserved(); + } finally { + f.close(); + } +}); + +test('candidate --check detects source drift even while the retained contract bytes stay unchanged', () => { + const f = fixture(); + try { + assert.equal(f.run().status, 0); + assert.equal(f.run('--check').status, 0); + writeFileSync(f.sourceState, 'stale'); + const result = f.run('--check'); + assert.notEqual(result.status, 0); + assert.match(result.stderr, /stale/u); + f.assertPreserved(); + } finally { + f.close(); + } +}); + +test('current-source verification failure stays blocked without inventing other qualification', () => { + const f = fixture(); + try { + writeFileSync(f.sourceState, 'verification-error'); + assert.equal(f.run().status, 0); + assert.equal(f.read().gates.releaseContractCurrent, false); + assert(f.read().blockers.some((blocker) => blocker.id === 'release-contract-not-current')); + writeFileSync(f.sourceState, 'current'); + assert.equal(f.run().status, 0); + const current = f.read(); + assert.equal(current.gates.releaseContractCurrent, true); + assert(!current.blockers.some((blocker) => blocker.id === 'release-contract-not-current')); + assert.equal(current.status, 'blocked', 'Freshness alone cannot grant hardware/resource readiness.'); + assert.notEqual(f.run('--check', '--require-ready').status, 0); + f.assertPreserved(); + } finally { + f.close(); + } +}); + +test('candidate report ignores coverage from a different release contract', () => { + const f = fixture(); + const path = join(dirname(f.output), 'resource-recipe-coverage.v1.json'); + const coverage = { required: 2, qualified: 2, missing: 0 }; + try { + writeFileSync( + path, + JSON.stringify({ releaseContractHash: 'previous-contract-hash', status: 'complete', coverage }), + ); + assert.equal(f.run().status, 0); + const stale = f.read(); + assert.equal(stale.gates.resourceRecipesQualified, false); + assert.equal(stale.coverage.resourceRecipes, null); + assert(stale.blockers.some((blocker) => blocker.id === 'resource-report-not-current')); + + writeFileSync( + path, + JSON.stringify({ releaseContractHash: 'retained-contract-hash', status: 'complete', coverage }), + ); + assert.equal(f.run().status, 0); + const current = f.read(); + assert.equal(current.gates.resourceRecipesQualified, true); + assert.deepEqual(current.coverage.resourceRecipes, coverage); + f.assertPreserved(); + } finally { + f.close(); + } +}); + +test('candidate report counts exact runs and bound variants without granting release eligibility', () => { + const standalone = (id, status, receipt, missing, releaseEligible = false) => ({ + id, + releaseEligible, + canonicalExecutionEvidence: { status, releaseApprovalGranted: false }, + lastSuccessfulRealRun: receipt, + missingReleaseEvidence: missing, + }); + const f = fixture([ + standalone('exact-image', 'verified_execution_only', { taskId: 'native-image' }, ['eligible_source_template']), + standalone('prompt-variant', 'verified_prompt_bound_model_variant', { canonicalDefaultsExecuted: false }, [ + 'eligible_source_template', + 'reviewed_bound_recipe', + ]), + standalone( + 'source-image-variant', + 'verified_input_bound_model_variant', + { observationLimits: { numericDepthPrediction: false } }, + ['eligible_source_template', 'reviewed_bound_recipe'], + ), + standalone('deterministic', 'verified_deterministic_execution', { taskId: 'native-data' }, [], true), + standalone('missing-proof', 'missing', null, ['successful_real_run_receipt']), + { + id: 'template', + releaseEligible: false, + lastSuccessfulRealRun: { taskId: 'native-template' }, + missingReleaseEvidence: ['approved_gallery_example'], + }, + ]); + try { + assert.equal(f.run().status, 0); + const report = f.read(); + assert.equal(report.coverage.eligibleWorkflows, 1); + assert.deepEqual(report.coverage.standaloneExecution, { + verified: 4, + exactModelWorkflows: 1, + boundVariants: 2, + deterministicWorkflows: 1, + alreadyReleaseEligible: 1, + awaitingReleaseEligibility: 3, + }); + assert.deepEqual(report.incompleteWorkflows, [ + 'exact-image', + 'prompt-variant', + 'source-image-variant', + 'missing-proof', + 'template', + ]); + assert.deepEqual(report.incompleteWorkflowEvidence, [ + { id: 'exact-image', executionStatus: 'verified_execution_only', missing: ['eligible_source_template'] }, + { + id: 'prompt-variant', + executionStatus: 'verified_prompt_bound_model_variant', + missing: ['eligible_source_template', 'reviewed_bound_recipe'], + }, + { + id: 'source-image-variant', + executionStatus: 'verified_input_bound_model_variant', + missing: ['eligible_source_template', 'reviewed_bound_recipe'], + }, + { id: 'missing-proof', executionStatus: 'missing', missing: ['successful_real_run_receipt'] }, + { id: 'template', executionStatus: 'retained_template_execution', missing: ['approved_gallery_example'] }, + ]); + assert.equal(report.gates.workflowsEligible, false); + assert.notEqual(f.run('--check', '--require-ready').status, 0); + f.assertPreserved(); + } finally { + f.close(); + } +}); diff --git a/scripts/release-contract-core.mjs b/scripts/release-contract-core.mjs index ea9b88b6..5431bcae 100644 --- a/scripts/release-contract-core.mjs +++ b/scripts/release-contract-core.mjs @@ -1,4 +1,26 @@ import { canonicalJsonHash } from './canonical-json.mjs'; +import { assertCanonicalAccountingGraphEnvelope } from './canonical-runtime-hints.mjs'; +import assert from 'node:assert/strict'; +import { AsyncLocalStorage } from 'node:async_hooks'; +import { createHash } from 'node:crypto'; +import { lstatSync, readFileSync, realpathSync } from 'node:fs'; +import { dirname, isAbsolute, join, resolve, sep } from 'node:path'; +import retainedGalleryAuthoringArchives from '../config/retained-gallery-authoring-archives.v1.json' with { type: 'json' }; +import { + backendSourceEvidence, + canonicalGraphIdentity, + canonicalAccountingExecutionPlan, + createRunProvenance, + directImagePromptRoutes, + executionPlanIdentity, + executionReceiptIdentity, + normalizeBackendRuntime, + selectInstalledModelIdentity, + selectBackendRuntimeFingerprintEvidence, + sha256Value, + stableStringify, + validateRunProvenance, +} from './live-proof-provenance.mjs'; export function backendNodesFromCanonicalWorkflow(graph) { return [ @@ -38,6 +60,169 @@ export function findCanonicalWorkflowRecord(workflows, template) { ); } +export function templateResourceExecutionModelType(template) { + const selected = template?.executionSelection?.pipelineClass; + return typeof selected === 'string' && selected.trim() ? selected : template.modelType; +} + +export function qualificationModelArtifacts(modelRevision, existing = []) { + if (modelRevision === undefined || modelRevision === null) return []; + assert.equal(typeof modelRevision, 'string', 'Qualification model revision must be a revision lock.'); + const members = modelRevision.split(' | '); + assert(members.length > 0 && members.length <= 64, 'Qualification model set exceeds its bound.'); + const seen = new Map(); + const artifacts = []; + for (const member of members) { + const match = /^([A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*)@([a-f0-9]{40,64})$/iu.exec(member); + assert(match, 'Qualification model must identify one repository and immutable revision.'); + const [, repo, revision] = match; + assert(!seen.has(repo) || seen.get(repo) === revision, 'Qualification model set contains conflicting revisions.'); + if (seen.has(repo)) continue; + seen.set(repo, revision); + if (!existing.some((a) => a.repo === repo && a.revision === revision)) { + artifacts.push({ role: 'qualification_model', repo, revision }); + } + } + return artifacts; +} + +export function assessGalleryReleaseApproval(entry, { matchesCurrentRecipe, unavailableAssets = [] }) { + const reasons = []; + if (!entry || !['approved_exact', 'approved_reviewed'].includes(entry.qualityReviewStatus)) { + reasons.push('approved_quality_review'); + } + if (!matchesCurrentRecipe) reasons.push('current_recipe_example'); + const unavailable = new Set(unavailableAssets); + const paths = [ + 'outputPath', + 'thumbnailPath', + 'cardPreviewPath', + 'beforePath', + 'afterPath', + 'posterPath', + 'provenancePath', + 'qualityReviewPath', + ] + .map((key) => entry?.[key]) + .filter((value) => typeof value === 'string'); + for (const path of paths) { + if (unavailable.has(path.replace(/^\/+/, ''))) reasons.push(`unavailable_asset:${path}`); + } + return { approved: reasons.length === 0, reasons }; +} + +export function assessPreviewFreeResearchWorkflow({ + manifest, + graphHash, + exactModelRevision, + receipt, + review, + artifactReview, +}) { + if (!review || !receipt) return null; + const admitted = artifactReview?.admission; + const model = artifactReview?.repositories?.find( + (row) => row.pipelineClass === manifest.modelType && `${row.repository}@${row.revision}` === exactModelRevision, + ); + const expectedProof = + manifest.mode === 'edit_image' + ? ['real_backend_input_bound_model_variant'] + : ['real_backend_weights', 'real_backend_prompt_bound_model_variant']; + if ( + artifactReview?.license?.commercialUseAllowed !== false || + typeof artifactReview.license.id !== 'string' || + !artifactReview.license.id.trim() || + admitted?.galleryEligible !== false || + admitted?.autoEligible !== false || + !admitted.executableModes?.includes(manifest.id) || + !model || + manifest.mediaKind !== 'image' || + !['text_to_image', 'edit_image'].includes(manifest.mode) || + !expectedProof.includes(receipt.proofKind) || + (manifest.mode === 'edit_image' && !receipt.inputBinding?.sha256) || + review.workflowId !== manifest.id || + review.sourceTemplateId !== manifest.sourceTemplateId || + review.sourceTemplateId !== receipt.sourceTemplateId || + review.canonicalWorkflowHash !== graphHash || + review.canonicalWorkflowHash !== receipt.canonicalWorkflowHash || + review.executedGraphHash !== receipt.graphHash || + review.evidenceSha256 !== receipt.evidenceSha256 || + review.outputHash !== receipt.outputHash || + receipt.workflowId !== manifest.id || + receipt.modelType !== manifest.modelType || + receipt.task !== manifest.mode || + receipt.modelSet?.length !== 1 || + receipt.modelSet[0].repoId !== model.repository || + receipt.modelSet[0].revision !== model.revision || + !/^sha256:workflow-graph-v1:[a-f0-9]{64}$/.test(graphHash) || + !/^sha256:canonical-graph-v1:[a-f0-9]{64}$/.test(review.executedGraphHash) || + !/^[a-f0-9]{64}$/.test(review.evidenceSha256) || + !/^sha256:(bytes|decoded-output-collection-v1):[a-f0-9]{64}$/.test(review.outputHash) + ) + return null; + + return { + scope: 'noncommercial_research', + preview: 'withheld', + license: artifactReview.license.id, + canonicalDefaultsExecuted: receipt.canonicalDefaultsExecuted ?? receipt.proofKind === 'real_backend_weights', + evidenceSha256: receipt.evidenceSha256, + }; +} + +export function assessWorkflowReleaseEvidence({ + modelType, + exactModelRevision, + sourceTemplate, + canonicalReceipt, + previewFreeResearch, + privateQualification, +}) { + const dataOperation = modelType === 'BuiltinDataOperation'; + const mediaOperation = ['BuiltinImageOperation', 'BuiltinAudioOperation', 'BuiltinVideoOperation'].includes( + modelType, + ); + const deterministicProof = dataOperation ? 'real_backend_deterministic_data' : 'real_backend_deterministic_media'; + const deterministicCorrectness = dataOperation ? 'verified_exact_result' : 'verified_media_contract'; + const hasDeterministicReceipt = canonicalReceipt?.proofKind === deterministicProof; + const verifiedCorrectness = canonicalReceipt?.deterministicCorrectness === deterministicCorrectness; + const executedRequiredDefaults = !mediaOperation || canonicalReceipt?.canonicalDefaultsExecuted === true; + const releaseEligible = Boolean( + (exactModelRevision && sourceTemplate?.releaseEligible) || + (exactModelRevision && previewFreeResearch) || + (exactModelRevision && privateQualification) || + ((dataOperation || mediaOperation) && hasDeterministicReceipt && verifiedCorrectness && executedRequiredDefaults), + ); + const missingReleaseEvidence = []; + if (releaseEligible) return { releaseEligible, missingReleaseEvidence }; + + if (sourceTemplate) { + missingReleaseEvidence.push(...sourceTemplate.missingReleaseEvidence); + if (!exactModelRevision && !missingReleaseEvidence.includes('exact_model_revision')) { + missingReleaseEvidence.push('exact_model_revision'); + } + } else if (dataOperation || mediaOperation) { + if (!hasDeterministicReceipt) { + missingReleaseEvidence.push('deterministic_execution_receipt'); + } else { + if (!verifiedCorrectness) missingReleaseEvidence.push('deterministic_correctness'); + if (!executedRequiredDefaults) missingReleaseEvidence.push('canonical_defaults_execution'); + } + } else { + missingReleaseEvidence.push('eligible_source_template'); + if (!exactModelRevision) missingReleaseEvidence.push('exact_model_revision'); + if (!canonicalReceipt) missingReleaseEvidence.push('successful_real_run_receipt'); + if ( + ['real_backend_input_bound_model_variant', 'real_backend_prompt_bound_model_variant'].includes( + canonicalReceipt?.proofKind, + ) + ) { + missingReleaseEvidence.push('reviewed_bound_recipe'); + } + } + return { releaseEligible, missingReleaseEvidence }; +} + function sameNodeContract(left, right) { return ( Array.isArray(left) && @@ -46,6 +231,21 @@ function sameNodeContract(left, right) { ); } +// A retained receipt with an exact current canonical association is preferred +// over a Gallery projection of the same-time run. Keep completion time primary: +// a newer matching run is still the latest evidence. This never promotes stale +// or incomplete records into matching evidence. +export function selectCurrentHistoricalEvidence(assessed) { + return assessed + .filter((item) => item.assessment.matches) + .sort( + (left, right) => + String(left.candidate.capturedAt ?? '').localeCompare(String(right.candidate.capturedAt ?? '')) || + Number(left.assessment.status === 'current') - Number(right.assessment.status === 'current'), + ) + .at(-1); +} + export function assessHistoricalEvidence(candidate, canonicalWorkflow, backendRegistry, expected = {}) { if (!candidate) return { matches: false, status: 'missing', reasons: ['successful_real_run_receipt'] }; if (!canonicalWorkflow) { @@ -78,3 +278,985 @@ export function assessHistoricalEvidence(candidate, canonicalWorkflow, backendRe missingBackendNodes, }; } + +const same = (actual, expected, label) => assert.equal(stableStringify(actual), stableStringify(expected), label); +const immutableRevision = (value) => typeof value === 'string' && /^[a-f0-9]{40,64}$/i.test(value); + +export { canonicalAccountingExecutionPlan } from './live-proof-provenance.mjs'; + +const reviewedReplacementSources = new Map([ + ['WanImageToVideoPipeline:image_to_video', 'wan_22_i2v_seed_vault'], + ['WanTI2VPipeline:text_to_video', 'wan_22_ti2v_5b_seed_vault'], + ['WanVACEPipeline:video_inpaint', 'wan_vace_masked_object_replace'], +]); + +export function isReviewedReplacementSource(manifest, authoring) { + const reviewedSource = reviewedReplacementSources.get(manifest.id); + return ( + reviewedSource !== undefined && + manifest.sourceTemplateId === reviewedSource && + authoring?.canonicalWorkflowId === manifest.id && + authoring.replacementSourceTemplateId === manifest.sourceTemplateId + ); +} + +// This describes a real non-public authoring record. It is never a Studio +// template, a model entitlement, or permission to change canonical defaults. +export function canonicalWorkflowAuthoringContract(manifest, graph, authoring, artifact = null) { + const canonical = canonicalWorkflowContract(manifest, graph); + const reviewedVaceSource = + manifest.id === 'WanVACEPipeline:text_to_video' && manifest.sourceTemplateId === 'wan_vace_direct_text_to_video'; + assert.ok( + manifest.sourceTemplateId?.startsWith('task-template:') || + reviewedVaceSource || + isReviewedReplacementSource(manifest, authoring), + 'Only standalone canonical workflows and reviewed recipe replacements use this recorder.', + ); + assert.ok(authoring && authoring.canonicalWorkflowId === manifest.id, 'Exact canonical authoring record is missing.'); + assert.equal(authoring.modelType, manifest.modelType, 'Authoring model identity differs.'); + assert.equal(authoring.mode, manifest.mode, 'Authoring task differs.'); + assert.equal(authoring.canonicalGraph?.path, manifest.graphPath, 'Authoring graph path differs.'); + assert.equal(authoring.canonicalGraph?.sha256, manifest.graphHash, 'Authoring graph hash is stale.'); + assert.equal(authoring.defaultsPlan?.sourceGraphSha256, manifest.graphHash, 'Authoring defaults are stale.'); + assert.ok(typeof authoring.id === 'string' && authoring.id.length > 0, 'Authoring identity is missing.'); + const required = [...new Set(manifest.requiredArtifacts ?? [])].sort(); + assert.ok( + required.length && required.every((repo) => typeof repo === 'string' && !repo.startsWith('builtin:')), + 'Deterministic builtin qualification is unsupported; model identity is not applicable.', + ); + same( + [...new Set(authoring.artifactPlan?.requiredArtifacts ?? [])].sort(), + required, + 'Authoring artifact set differs.', + ); + const pins = new Map(required.map((repo) => [repo, new Set()])); + const add = (repo, revision) => { + assert.ok(pins.has(repo), `Undeclared model component: ${String(repo)}`); + if (revision !== undefined && revision !== null && revision !== '') { + assert.ok(immutableRevision(revision), `Unresolved immutable model pin: ${repo}`); + pins.get(repo).add(revision); + } + }; + for (const component of authoring.artifactPlan?.componentRequirements ?? []) add(component.repo, component.revision); + if (artifact?.baseRepo && pins.has(artifact.baseRepo)) add(artifact.baseRepo, artifact.baseRevision); + for (const node of graph.nodes ?? []) { + const params = node.data?.params ?? {}; + for (const [key, parameter] of Object.entries(params)) { + const value = parameter?.value ?? parameter?.default; + if (value?.source !== 'hub') continue; + let repo = value.value; + // File selectors retain org/repository/path together with exact bytes. + // Associate that reviewed file with its declared repository; do not trim + // arbitrary strings or turn an unpinned path into a model identity. + if (!pins.has(repo) && typeof repo === 'string' && repo.split('/').length > 2) { + const parts = repo.split('/'); + assert( + parts.every((part) => part && part !== '.' && part !== '..' && !/[\\\u0000-\u001f]/u.test(part)), + 'Unsafe Hub model file path.', + ); + assert( + /^[a-f0-9]{64}$/iu.test(value.sha256 ?? '') && Number.isSafeInteger(value.byteSize) && value.byteSize > 0, + 'Hub model file requires exact byte identity.', + ); + assert(immutableRevision(value.revision), 'Hub model file requires an immutable model pin.'); + repo = parts.slice(0, 2).join('/'); + } + const revisionKey = ['model', 'model_id', 'repo_id'].includes(key) + ? 'revision' + : `${key.replace(/_(?:id|path)$/, '')}_revision`; + add(repo, value.revision ?? params[revisionKey]?.value ?? params[revisionKey]?.default); + } + } + const modelSet = required.map((repoId) => { + const revisions = [...pins.get(repoId)]; + assert.equal(revisions.length, 1, `Missing or ambiguous immutable model pin: ${repoId}`); + return { repoId, revision: revisions[0] }; + }); + return { + workflowId: manifest.id, + sourceTemplateId: manifest.sourceTemplateId, + authoringId: authoring.id, + authoringHash: sha256Value('canonical-workflow-authoring-v1', authoring), + canonicalWorkflowHash: canonical.graphHash, + modelType: manifest.modelType, + task: manifest.mode, + modelSet, + outputPlan: authoring.outputPlan, + }; +} + +/** Declared source identity only. Resolving an immutable recipe pin does not + * create execution evidence, quality approval or resource qualification. */ +export function canonicalWorkflowDeclaredModelRevision(manifest, graph, authoring, artifact = null) { + return canonicalWorkflowAuthoringContract(manifest, graph, authoring, artifact) + .modelSet.map(({ repoId, revision }) => `${repoId}@${revision}`) + .join(' | '); +} + +// Pure shared validation used both when retaining a receipt and when projecting +// release evidence. expectedApiGraph must come from the normal frontend exporter +// over the current canonical source, never from the supplied evidence bundle. +export function validateCanonicalWorkflowEvidence({ + target, + expectedApiGraph, + creator, + outputPackage, + run, + provenance, + graphCompleted, +}) { + assert.equal(provenance?.format, 'modiff.live-proof.provenance.v2'); + assert.deepEqual(validateRunProvenance(provenance), [], 'Shared provenance validation failed.'); + assert.deepEqual(provenance.blockers ?? [], [], 'Provenance retains blockers.'); + assert.equal(creator?.manifest?.packageType, 'modiff-workflow-share', 'Original creator export is required.'); + assert.equal(outputPackage?.manifest?.packageType, 'modiff-output-package', 'Original output export is required.'); + const output = outputPackage.latestOutput; + const task = run?.task; + assert.ok(output && typeof output.id === 'string' && output.id.length > 0, 'Actual output is missing.'); + assert.equal(task?.status, 'completed', 'Task is not completed.'); + assert.equal(task.task_id, output.taskId, 'Output belongs to another task.'); + assert.equal(task.task_id, provenance.taskId, 'Provenance belongs to another task.'); + assert.equal(task.attempt_index, 0, 'Retry/fallback canonical qualification is unsupported.'); + assert.equal(output.attemptIndex, 0); + assert.equal(output.resolvedExecutionInputs?.taskId, task.task_id, 'Actual consumed-input receipt is missing.'); + assert.equal(output.resolvedExecutionInputs?.attemptIndex, 0); + assert.ok(typeof output.workflowTabId === 'string' && output.workflowTabId.length > 0); + assert.equal(run.workflow_id, output.workflowTabId, 'Output belongs to another workflow.'); + const persisted = (run.outputs ?? []).filter((item) => item.id === output.id && item.taskId === task.task_id); + assert.equal(persisted.length, 1, 'Output is not uniquely present in the raw task.'); + for (const field of [ + 'taskId', + 'clientRunId', + 'runInputHash', + 'workflowTabId', + 'attemptIndex', + 'nodeId', + 'fieldKey', + 'formSnapshot', + 'graphSnapshot', + 'apiGraphSnapshot', + 'resolvedExecutionInputs', + 'mediaHash', + 'mediaItems', + ]) { + assert.notEqual(output[field], undefined, `Actual output is missing ${field}.`); + same(output[field], persisted[0][field], `Raw task/output ${field} differs.`); + } + same(creator.metadata?.studio, output.formSnapshot, 'Creator settings changed before execution.'); + assert.equal( + output.formSnapshot.modelType, + target.modelType, + 'Actual model/task form differs from canonical source.', + ); + assert.equal(output.formSnapshot.mode, target.task, 'Actual model/task form differs from canonical source.'); + same(outputPackage.apiGraph, output.apiGraphSnapshot, 'Output package graph differs from submitted graph.'); + const expected = canonicalGraphIdentity(expectedApiGraph); + same( + canonicalGraphIdentity(creator.apiGraph), + expected, + 'Creator graph/defaults/bindings differ from canonical source.', + ); + same(canonicalGraphIdentity(output.apiGraphSnapshot), expected, 'Submitted graph differs from canonical source.'); + same(provenance.graph?.canonicalGraph, expected.canonicalGraph, 'Provenance graph differs from canonical execution.'); + const consumed = output.resolvedExecutionInputs; + assert.equal(consumed.source, 'backend-execution', 'Consumed inputs do not have backend authority.'); + assert.equal(consumed.truncated, false, 'Consumed inputs are truncated.'); + assert.deepEqual(consumed.uncapturedNodeIds, [], 'Consumed node evidence is incomplete.'); + assert.ok(Array.isArray(consumed.nodes) && consumed.nodes.length > 0, 'Consumed node evidence is missing.'); + assert.equal( + new Set(consumed.nodes.map((row) => row.nodeId)).size, + consumed.nodes.length, + 'Consumed node identities are ambiguous.', + ); + same( + consumed.nodes.map((row) => row.nodeId).sort(), + Object.keys(output.apiGraphSnapshot.nodes).sort(), + 'Consumed graph scope differs.', + ); + const hasAccounting = + consumed.fieldAccountingStatus !== undefined || consumed.nodes.some((row) => row.fieldAccounting !== undefined); + if (hasAccounting) assertCanonicalAccountingGraphEnvelope(creator.apiGraph); + const plan = hasAccounting + ? canonicalAccountingExecutionPlan({ + expectedApiGraph, + apiGraph: output.apiGraphSnapshot, + consumed, + target, + runtimeEvidence: { run, output, graphCompleted }, + }) + : executionPlanIdentity(output.apiGraphSnapshot); + if (hasAccounting) { + assert.equal(consumed.nodeId, output.nodeId, 'Canonical consumed receipt output owner differs.'); + assert.ok( + !task.runtimeHints || Object.keys(task.runtimeHints).length === 0, + 'Canonical task contains unreviewed runtime hints.', + ); + } + if (!hasAccounting) { + for (const row of consumed.nodes) { + const submitted = output.apiGraphSnapshot.nodes[row.nodeId]; + assert.equal(row.module, submitted.module, 'Consumed node module differs.'); + assert.equal(row.action, submitted.action, 'Consumed node action differs.'); + assert.deepEqual(row.omittedFields ?? {}, {}, 'Consumed fields were omitted; exact execution cannot be proved.'); + for (const [field, parameter] of Object.entries(submitted.params ?? {})) { + if (Object.hasOwn(parameter, 'value') && !parameter.sourceId) { + assert.ok(Object.hasOwn(row.fields ?? {}, field), `Consumed literal is missing: ${row.nodeId}.${field}`); + } + } + for (const [field, captured] of Object.entries(row.fields ?? {})) { + const parameter = submitted.params?.[field]; + // Connected runtime objects are authenticated by the exact submitted + // topology. Scalar connected/override values need a further native + // producer join; never silently treat them as an unchanged literal. + assert.equal(captured.source, 'literal', 'Connected or overridden consumed scalar is unsupported.'); + if (!parameter && field === 'executed_task') { + assert.equal(captured.value, target.task, 'Actual executed task differs from canonical task.'); + continue; + } + assert.ok( + parameter && Object.hasOwn(parameter, 'value') && !parameter.sourceId, + 'Consumed literal binding differs.', + ); + let expectedValue = parameter.value; + if (expectedValue?.source === 'hub') expectedValue = expectedValue.value; + // The existing seed receipt contract serializes integer seeds as decimal + // strings. This comparison accepts only the exact integer spelling. + if (field === 'seed' && Number.isSafeInteger(expectedValue) && typeof captured.value === 'string') + expectedValue = String(expectedValue); + same(captured.value, expectedValue, `Consumed field differs: ${row.nodeId}.${field}`); + } + } + } + assert.equal(provenance.graphHash, expected.hash); + + const auto = plan.plan.resourceMode === 'auto' || plan.plan.resolvedResourceMode === 'auto'; + if (auto) { + assert.ok( + typeof plan.plan.autoResourceCandidateId === 'string' && plan.plan.autoResourceCandidateId.trim().length > 0, + 'Auto resource candidate is missing from the declared execution plan.', + ); + assert.equal( + task.resourceCandidateId, + plan.plan.autoResourceCandidateId, + 'Native Auto resource candidate differs from the declared execution plan.', + ); + } else { + assert.ok(plan.plan.autoResourceCandidateId == null, 'Non-Auto graph retains an Auto resource candidate.'); + assert.ok(task.resourceCandidateId == null, 'Non-Auto task retains an Auto resource candidate.'); + } + assert.equal(plan.plan.modelType, target.modelType, 'Resource recipe model differs from canonical source.'); + if (!hasAccounting) { + for (const [planned, consumedField] of Object.entries({ + dtype: 'dtype', + offloadMode: 'offload_mode', + autoOffload: 'auto_offload', + device: 'device', + weightFormat: 'weight_format', + weightLoadingMode: 'weight_loading_mode', + })) { + if (!Object.hasOwn(plan.plan, planned)) continue; + const values = consumed.nodes.flatMap((row) => + Object.hasOwn(row.fields ?? {}, consumedField) ? [row.fields[consumedField].value] : [], + ); + assert.ok( + values.length > 0 && values.every((value) => stableStringify(value) === stableStringify(plan.plan[planned])), + `Resource recipe lacks matching consumed ${consumedField}.`, + ); + } + } + same(provenance.graph?.executionPlan, plan.plan, 'Resource recipe differs from executed graph.'); + assert.equal(provenance.graph?.executionPlanHash, plan.hash); + assert.equal(provenance.template?.id, target.authoringId, 'Provenance lacks the real canonical authoring identity.'); + assert.equal(provenance.template?.catalogTemplateLockHash, target.authoringHash, 'Canonical authoring lock differs.'); + assert.equal( + provenance.template?.resolvedTemplateLockHash, + sha256Value('canonical-workflow-execution-v1', { authoringHash: target.authoringHash, graphHash: expected.hash }), + 'Canonical execution lock differs.', + ); + assert.equal( + provenance.template?.promptSettingsHash, + sha256Value('canonical-workflow-settings-v1', creator.metadata.studio), + 'Canonical settings lock differs.', + ); + const actualModels = provenance.models.items + .map((item) => { + assert.ok(immutableRevision(item.selectedRevision), 'Executed model revision is not immutable.'); + assert.equal(item.modelRevision, `${item.repoId}@${item.selectedRevision}`); + return { repoId: item.repoId, revision: item.selectedRevision }; + }) + .sort((a, b) => a.repoId.localeCompare(b.repoId)); + same(actualModels, target.modelSet, 'Complete executed model set differs from canonical declarations.'); + const executedPins = new Map(); + for (const node of Object.values(output.apiGraphSnapshot.nodes ?? {})) { + for (const [key, parameter] of Object.entries(node.params ?? {})) { + const value = parameter?.value; + if (value?.source !== 'hub') continue; + const revisionKey = ['model', 'model_id', 'repo_id'].includes(key) + ? 'revision' + : `${key.replace(/_(?:id|path)$/, '')}_revision`; + const revision = value.revision ?? node.params[revisionKey]?.value; + assert.ok(immutableRevision(revision), `Executed component pin is unresolved: ${value.value}`); + if (executedPins.has(value.value)) + assert.equal(executedPins.get(value.value), revision, 'Ambiguous executed component.'); + executedPins.set(value.value, revision); + } + } + same( + [...executedPins] + .map(([repoId, revision]) => ({ repoId, revision })) + .sort((a, b) => a.repoId.localeCompare(b.repoId)), + target.modelSet, + 'The complete model set is not proved by explicit executed loader fields.', + ); + assert.ok( + selectBackendRuntimeFingerprintEvidence([task.runtimeFingerprint], output.apiGraphSnapshot.deterministicMode), + 'Complete structured actual runtime is required.', + ); + assert.equal( + normalizeBackendRuntime(task.runtimeFingerprint, output.apiGraphSnapshot.deterministicMode).lockFingerprint, + provenance.runtimeFingerprint, + 'Actual runtime differs from provenance.', + ); + same( + task.runtimeFingerprint.backendSource, + provenance.runtime.backendSourceAttestation, + 'Process-start source authority differs.', + ); + const actualExecution = executionReceiptIdentity( + { runtimeMeasurement: task.runtimeMeasurement, runtimeHints: task.runtimeHints }, + plan.plan, + ); + same(actualExecution, provenance.execution, 'Actual resource measurements differ.'); + assert.ok( + Number.isFinite(task.started_at) && Number.isFinite(task.completed_at) && task.completed_at >= task.started_at, + ); + assert.equal(provenance.capturedAt, new Date(task.completed_at * 1000).toISOString(), 'Completion time differs.'); + assert.ok(provenance.output.items.length >= target.outputPlan.minimumAssetCount, 'Output collection is incomplete.'); + assert.ok( + provenance.output.items.every((item) => target.outputPlan.mediaKinds.includes(item.mediaType)), + 'Output modality differs.', + ); + return { + schemaVersion: 1, + format: 'modiff.canonical-workflow-run-receipt.v1', + proofKind: 'real_backend_weights', + ...target, + taskId: task.task_id, + outputId: output.id, + capturedAt: provenance.capturedAt, + graphHash: expected.hash, + modelSetHash: provenance.models.hash, + runtimeFingerprint: provenance.runtimeFingerprint, + resourceCandidateId: provenance.execution.resourceCandidateId, + backendSourceFingerprint: provenance.backendSourceFingerprint, + backendContractFingerprint: provenance.backendContractFingerprint, + outputHash: provenance.output.collectionHash, + executionDurationSeconds: provenance.execution.elapsedSeconds, + peakMemoryBytes: provenance.execution.peakMemoryBytes, + ...(plan.retainedGenerator ? { observationLimits: { fullConsumedFieldAccounting: false } } : {}), + qualificationClaims: { + publicTemplate: false, + qualityApproved: false, + rightsApproved: false, + hardwareQualified: false, + }, + }; +} + +export function readCanonicalEvidenceFile(root, ref, maximum = 32 * 1024 * 1024) { + assert.ok( + ref && typeof ref.path === 'string' && !isAbsolute(ref.path) && !/[\\:]/.test(ref.path), + 'Evidence path must be relative and canonical.', + ); + assert.ok( + ref.path.split('/').every((part) => part && part !== '.' && part !== '..'), + 'Evidence path is not canonical.', + ); + assert.match(ref.sha256 ?? '', /^[a-f0-9]{64}$/); + const base = realpathSync(root); + let file = base; + for (const part of ref.path.split('/')) { + file = join(file, part); + assert.ok(!lstatSync(file).isSymbolicLink(), 'Evidence symlinks are not permitted.'); + } + assert.ok(realpathSync(file).startsWith(`${base}${sep}`), 'Evidence escapes its retained root.'); + const stat = lstatSync(file); + assert.ok( + stat.isFile() && stat.size > 0 && stat.size <= maximum && stat.size === ref.bytes, + 'Evidence file size/type differs.', + ); + const bytes = readFileSync(file); + assert.equal(createHash('sha256').update(bytes).digest('hex'), ref.sha256, 'Evidence file hash differs.'); + return { file, bytes }; +} + +export function canonicalEvidenceWritePath(root, relativePath) { + assert.ok( + typeof relativePath === 'string' && !isAbsolute(relativePath) && !/[\\:]/.test(relativePath), + 'Retention path must be relative and canonical.', + ); + assert.ok( + relativePath.split('/').every((part) => part && part !== '.' && part !== '..'), + 'Retention path is not canonical.', + ); + const base = realpathSync(root); + let target = base; + for (const part of relativePath.split('/')) { + target = join(target, part); + let stat; + try { + stat = lstatSync(target); + } catch (error) { + if (error.code === 'ENOENT') continue; + throw error; + } + assert.ok(!stat.isSymbolicLink(), 'Retention symlinks are not permitted.'); + assert.ok(realpathSync(target).startsWith(`${base}${sep}`), 'Retention path escapes its backend root.'); + } + return target; +} + +// Metadata-only export through the exact frontend implementation used by Run. +// Ephemeral storage and a rejecting fetch prevent inspection from using a live app. +function withGraphExportEnvironment(callback) { + const prior = new Map( + ['window', 'localStorage', 'fetch'].map((key) => [key, Object.getOwnPropertyDescriptor(globalThis, key)]), + ); + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, value), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { + location: { origin: 'http://127.0.0.1' }, + localStorage: globalThis.localStorage, + dispatchEvent: () => true, + }; + globalThis.fetch = () => { + throw new Error('Canonical qualification export cannot access the network.'); + }; + const restore = () => { + for (const [key, descriptor] of prior) { + if (descriptor) Object.defineProperty(globalThis, key, descriptor); + else delete globalThis[key]; + } + }; + let deferred = false; + try { + const result = callback(); + if (result instanceof Promise) { + deferred = true; + return result.finally(restore); + } + return result; + } finally { + if (!deferred) restore(); + } +} + +const canonicalGraphExport = new AsyncLocalStorage(); + +// A receipt batch uses the same frontend compiler for every graph. Each export +// still gets a cloned input, fixed seeds and its own offline environment. +export async function withCanonicalWorkflowGraphExporter(clientRoot, callback) { + const { createServer } = await import('vite'); + let server; + try { + const { useFlowStore } = await withGraphExportEnvironment(async () => { + server = await createServer({ + root: clientRoot, + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, hmr: false, watch: null }, + appType: 'custom', + }); + return server.ssrLoadModule('/src/stores/useFlowStore.ts'); + }); + const exportGraphs = (graphs) => + withGraphExportEnvironment(() => + graphs.map((graph) => + useFlowStore.getState().exportGraph('canonical-qualification', undefined, { + sourceGraph: structuredClone(graph), + randomizeSeeds: false, + }), + ), + ); + return await canonicalGraphExport.run({ clientRoot: resolve(clientRoot), exportGraphs }, () => + callback(exportGraphs), + ); + } finally { + await server?.close(); + } +} + +export async function exportCanonicalWorkflowGraphs(clientRoot, graphs) { + const active = canonicalGraphExport.getStore(); + if (active?.clientRoot === resolve(clientRoot)) return active.exportGraphs(graphs); + return withCanonicalWorkflowGraphExporter(clientRoot, (exportGraphs) => exportGraphs(graphs)); +} + +// Publication moves these authoring rows out of the hidden-candidate +// ledger. Revalidate the original evidence against its exact archived +// authoring row. A new or edited standalone capture cannot use that baseline. +const RETAINED_AUTHORING_ARCHIVES = new Map([ + [ + 'HuggingFaceCTCSpeechRecognitionModel:speech_to_text', + { + descriptorSha256: '226c35aaf3a811a8077e0caae4b4652daaf332d3c7718a095f238afde982f7ee', + bytes: 3666, + sha256: '16d68385a8e5fad61049a63f68846a1e848e2729d70ff915c5ebb1d704261534', + }, + ], + [ + 'MarigoldDepthPipeline:depth_estimation', + { + descriptorSha256: '1c358ef18df00556b704f826c706674d5ddbd89d8ad091478da862b8ad87c6ea', + bytes: 4075, + sha256: '29127ed9ed0c75eebe9d22348b34aca5b70c21f4eba949c1526b5e979c4149f5', + }, + ], + [ + 'HuggingFaceTextGenerationModel:text_generation', + { + descriptorSha256: '4d0e3ad2819d02cc04c3f264145ddd384b17b9dfa39e83f4af6e923bce34f3d8', + bytes: 3042, + sha256: 'e8158c1fcd94e0cf2c2e8e2163f036edc783371d6ca9e253cdf31722c7273d0a', + }, + ], + [ + 'SpandrelImageUpscale:image_upscale', + { + descriptorSha256: '49336b0f76e158b3be514275763e8b2c50f00c048852a34cff43167687503f15', + bytes: 3349, + sha256: '787946f2e68cba243b8ca0908c8a626a9bc792ac2a03b25316eb503a7956be5b', + }, + ], + [ + 'HuggingFaceSpeechRecognitionModel:speech_to_text', + { + descriptorSha256: '7ef2a7611856f6a0c111d5e4ffa248201f88718756aed16f5a6a30487e571faa', + bytes: 3846, + sha256: '50555a4961d24df966a82582bbb6a0f169f5419319e955ceec8a42ec4823e415', + }, + ], + [ + 'LatentConsistencyModelPipeline:edit_image', + { + descriptorSha256: 'd29515dfafdcde29ecff2332276275247a6feeae5afd36639da87efc552af4f6', + bytes: 4384, + sha256: '5b07f097ab9706ce5ce7f9de8c1e93c2860adf5712b9c874237bea0e5739f83c', + }, + ], + [ + 'SanaSprintPipeline:edit_image', + { + descriptorSha256: 'ec340d225ca8eae07996fc5f93e3561cd25c82e80d1229a3adca1f648ea8d20e', + bytes: 4739, + sha256: '47a822a576ca20855d10311136e51651c5a2765bdd6c7fb3d79f8ab781bb0c0f', + }, + ], + ...Object.entries(retainedGalleryAuthoringArchives), +]); + +function archivedCanonicalAuthoring(backendRoot, workflowId, evidencePath) { + const lock = RETAINED_AUTHORING_ARCHIVES.get(workflowId); + if (!lock) return null; + const stat = lstatSync(evidencePath); + assert.ok(stat.isFile() && !stat.isSymbolicLink() && stat.size <= 65536); + const descriptorSha256 = createHash('sha256').update(readFileSync(evidencePath)).digest('hex'); + // A published recipe can retire a candidate authoring record shared by + // multiple historical runs. Every such descriptor still needs its own pin. + assert.ok( + descriptorSha256 === lock.descriptorSha256 || lock.additionalDescriptorHashes?.includes(descriptorSha256), + 'Archived authoring requires the exact original capture.', + ); + return JSON.parse( + readCanonicalEvidenceFile( + backendRoot, + { + path: `data/qualification/release/canonical-workflow-evidence/${lock.descriptorSha256}/authoring-spec.original.json`, + bytes: lock.bytes, + sha256: lock.sha256, + }, + 65536, + ).bytes, + ); +} + +// The same derivation is repeated by release-contract; a registry row alone +// never authenticates a run. All file references are to retained original bytes. +export async function readCanonicalWorkflowEvidence({ clientRoot, backendRoot, workflowId, evidencePath }) { + const json = (file) => JSON.parse(readFileSync(file, 'utf8')); + const manifestRows = json(join(backendRoot, 'data/workflow-library-manifest.json')).workflows; + const matches = manifestRows.filter((row) => row.id === workflowId); + assert.equal(matches.length, 1, 'Canonical workflow ID is missing or ambiguous.'); + const manifest = matches[0]; + assert.ok( + typeof manifest.graphPath === 'string' && + !isAbsolute(manifest.graphPath) && + manifest.graphPath.split(/[\\/]/).every((part) => part && part !== '..' && part !== '.'), + 'Canonical graph path is unsafe.', + ); + const graphRoot = realpathSync(join(backendRoot, 'data/graphs')); + const graphPath = realpathSync(join(graphRoot, manifest.graphPath)); + assert.ok(graphPath.startsWith(`${graphRoot}${sep}`), 'Canonical graph escapes its source root.'); + const graph = json(graphPath); + const authoringRows = json(join(backendRoot, 'data/template-authoring-specs.v1.json')).specifications; + const authoringMatches = authoringRows.filter((row) => row.canonicalWorkflowId === workflowId); + assert.ok(authoringMatches.length <= 1, 'Canonical source authoring identity is ambiguous.'); + const authoring = authoringMatches[0] ?? archivedCanonicalAuthoring(backendRoot, workflowId, evidencePath); + assert.ok(authoring, 'Canonical source authoring identity is missing.'); + if (manifest.modelType === 'BuiltinDataOperation') { + const { readBuiltinDataEvidence } = await import('./builtin-data-qualification.mjs'); + return readBuiltinDataEvidence({ clientRoot, manifest, graph, authoring, evidencePath }); + } + if (['BuiltinImageOperation', 'BuiltinAudioOperation', 'BuiltinVideoOperation'].includes(manifest.modelType)) { + const { readBuiltinMediaEvidence } = await import('./builtin-media-qualification.mjs'); + return readBuiltinMediaEvidence({ clientRoot, manifest, graph, authoring, evidencePath }); + } + const artifact = json(join(backendRoot, 'data/model-artifact-catalog.json')).models.find( + (row) => row.modelType === manifest.modelType, + ); + const evidenceStat = lstatSync(evidencePath); + assert.ok( + evidenceStat.isFile() && !evidenceStat.isSymbolicLink() && evidenceStat.size <= 65536, + 'Evidence descriptor must be a bounded regular file.', + ); + const descriptorBytes = readFileSync(evidencePath); + const evidence = JSON.parse(descriptorBytes.toString('utf8')); + assert.equal(evidence.schemaVersion, 1); + assert.equal(evidence.workflowId, workflowId); + if (workflowId === 'WanVACEPipeline:video_inpaint' && evidence.format === 'modiff.private.saved-vace-composite.v1') { + const { readSavedVaceCompositeEvidence } = await import('./saved-vace-composite-evidence.mjs'); + return readSavedVaceCompositeEvidence({ manifest, graph, authoring, artifact, evidencePath }); + } + if ( + workflowId === 'QwenImageLayeredPipeline:layer_decomposition' && + evidence.format === 'modiff.private.native-layer-decomposition.v1' + ) { + const { readLayerDecompositionEvidence } = await import('./layer-decomposition-evidence.mjs'); + return readLayerDecompositionEvidence({ clientRoot, manifest, graph, authoring, artifact, evidencePath }); + } + if ( + evidence.format === 'modiff.private.speech-to-text-input-bound.v1' && + [ + 'HuggingFaceSpeechRecognitionModel:speech_to_text', + 'HuggingFaceSpeechRecognitionModel:speech_translation', + 'HuggingFaceCTCSpeechRecognitionModel:speech_to_text', + ].includes(workflowId) + ) { + const { readCanonicalSpeechEvidence } = await import('./private-speech-evidence.mjs'); + return readCanonicalSpeechEvidence({ clientRoot, manifest, graph, authoring, artifact, evidencePath }); + } + if ( + [ + 'modiff.private.lcm-source-bound-edit.v1', + 'modiff.private.direct-image-edit-source-bound.v1', + 'modiff.private.direct-image-edit-native-png.v1', + 'modiff.private.direct-image-inpaint-native-png.v1', + 'modiff.private.saved-image-edit-native-png.v1', + 'modiff.private.saved-image-edit-native-webp.v1', + 'modiff.private.direct-image-edit-native-webp.v1', + 'modiff.private.flux-enamel-edit-native-webp.v1', + 'modiff.private.saved-image-edit-native-host-file.v1', + 'modiff.private.server-retained-image-edit-native-png.v1', + ].includes(evidence.format) + ) { + const { readPrivateImageEditEvidence } = await import('./private-image-edit-evidence.mjs'); + return readPrivateImageEditEvidence({ clientRoot, manifest, graph, authoring, artifact, evidencePath }); + } + if ( + evidence.format === 'modiff.private.input-bound-model-smoke.v1' && + workflowId === 'MarigoldDepthPipeline:depth_estimation' + ) { + const { readMarigoldPreviewEvidence } = await import('./marigold-preview-evidence.mjs'); + return readMarigoldPreviewEvidence({ + clientRoot, + manifest, + graph, + authoring, + artifact, + evidencePath, + }); + } + if (evidence.format === 'modiff.private.input-bound-model-smoke.v1') { + const { readInputBoundModelEvidence } = await import('./input-bound-model-evidence.mjs'); + return readInputBoundModelEvidence({ + clientRoot, + manifest, + graph, + authoring, + artifact, + evidencePath, + }); + } + if ( + evidence.format === 'modiff.private.video-upscale-native-files.v1' && + workflowId === 'SpandrelVideoUpscale:video_upscale' + ) { + const { readVideoUpscaleEvidence } = await import('./video-upscale-evidence.mjs'); + return readVideoUpscaleEvidence({ clientRoot, manifest, graph, authoring, artifact, evidencePath }); + } + if ( + [ + 'modiff.private.smollm2-prompt-variant.v1', + 'modiff.private.janus-text-prompt-variant.v1', + 'modiff.private.janus-image-prompt-variant.v1', + 'modiff.private.janus-caption-variant.v1', + 'modiff.private.smolvlm-caption-variant.v1', + 'modiff.private.shap-e-prompt-variant.v1', + 'modiff.private.longcat-audio-prompt-variant.v1', + 'modiff.private.audioldm2-prompt-variant.v1', + 'modiff.private.stable-audio-prompt-variant.v1', + 'modiff.private.stable-video-opening-image-variant.v1', + 'modiff.private.wan-a14b-video-prompt-variant.v1', + 'modiff.private.wan-a14b-opening-image-variant.v1', + 'modiff.private.wan-a14b-default-opening.v1', + 'modiff.private.framepack-lantern-opening.v1', + 'modiff.private.wan-subway-soundtrack-variant.v1', + 'modiff.private.wan-subway-soundtrack-default.v1', + 'modiff.private.ltx-long-scheduled-image-variant.v1', + 'modiff.private.ltx2-native-av-variant.v1', + 'modiff.private.wan-character-animate-inputs.v1', + 'modiff.private.wan-character-replace-inputs.v1', + 'modiff.private.cogvideox-video-prompt-variant.v1', + 'modiff.private.cogvideox-source-video-variant.v1', + 'modiff.private.animatediff-pag-video-prompt-variant.v1', + 'modiff.private.animatediff-source-video-variant.v1', + 'modiff.private.animatediff-guide-video-variant.v1', + 'modiff.private.animatediff-source-and-guide-video-variant.v1', + 'modiff.private.allegro-video-prompt-variant.v1', + 'modiff.private.sana-video-prompt-variant.v1', + 'modiff.private.sana-opening-image-variant.v1', + 'modiff.private.mochi-video-prompt-variant.v1', + 'modiff.private.animatediff-video-prompt-variant.v1', + 'modiff.private.animatelcm-video-prompt-variant.v1', + 'modiff.private.latte-video-prompt-variant.v1', + 'modiff.private.wan-vace-video-prompt-variant.v1', + ].includes(evidence.format) || + directImagePromptRoutes.some(({ format }) => format === evidence.format) + ) { + const { readPromptVariantEvidence } = await import('./prompt-variant-evidence.mjs'); + return readPromptVariantEvidence({ + clientRoot, + manifest, + graph, + authoring, + artifact, + evidencePath, + }); + } + if (evidence.format === 'modiff.private.native-control-inpaint.v1') { + const { readControlInpaintEvidence } = await import('./control-inpaint-evidence.mjs'); + return readControlInpaintEvidence({ clientRoot, manifest, graph, authoring, artifact, evidencePath }); + } + if ( + [ + 'modiff.private.saved-control-image-native-png.v1', + 'modiff.private.saved-control-image-native-files.v1', + 'modiff.private.saved-control-image-native-load-fields.v1', + 'modiff.private.integrated-control-edit-native-upload.v1', + ].includes(evidence.format) + ) { + const { readSavedControlImageEvidence } = await import('./saved-control-image-evidence.mjs'); + return readSavedControlImageEvidence({ clientRoot, manifest, graph, authoring, artifact, evidencePath }); + } + if (evidence.format === 'modiff.private.wan-first-last-frame-variant.v1') { + const { readWanFirstLastEvidence } = await import('./wan-first-last-evidence.mjs'); + return readWanFirstLastEvidence({ clientRoot, manifest, graph, authoring, artifact, evidencePath }); + } + const captureFormat = { + 'DDPMPipeline:unconditional_image': 'modiff.private.ddpm-attention-variant.v1', + 'ConsistencyModelPipeline:unconditional_image': 'modiff.private.consistency-attention-variant.v1', + }[workflowId]; + assert.ok( + evidence.format === 'modiff.canonical-workflow-evidence.v1' || + (captureFormat !== undefined && evidence.format === captureFormat), + 'Canonical evidence descriptor format does not match the workflow.', + ); + const target = canonicalWorkflowAuthoringContract(manifest, graph, authoring, artifact); + assert.ok( + graph.nodes.every((node) => + Object.values(node.data?.params ?? {}).every((field) => field?.display !== 'filebrowser'), + ), + 'Input-backed canonical qualification is unsupported until native execution-bound input-byte evidence is available.', + ); + const root = realpathSync(dirname(evidencePath)); + const retainedFiles = []; + const read = (ref, maximum) => { + const result = readCanonicalEvidenceFile(root, ref, maximum); + retainedFiles.push({ ...ref, absolutePath: result.file }); + return result; + }; + const readJson = (ref) => JSON.parse(read(ref).bytes.toString('utf8')); + const creator = readJson(evidence.creatorPackage); + const outputPackage = readJson(evidence.outputPackage); + const run = readJson(evidence.runDetail); + // Optional for legacy unhinted evidence; hinted accounting requires this + // original native frame. read() retains and rechecks its original bytes/hash. + const graphCompleted = + evidence.graphCompleted === undefined + ? undefined + : JSON.parse(read(evidence.graphCompleted, 16 * 1024 * 1024).bytes.toString('utf8')); + const output = outputPackage.latestOutput; + assert.ok( + output?.apiGraphSnapshot && output?.graphSnapshot && creator.graph && creator.apiGraph, + 'Original graph exports are missing.', + ); + const [expectedApiGraph, creatorApiGraph, outputApiGraph] = await exportCanonicalWorkflowGraphs(clientRoot, [ + graph, + creator.graph, + output.graphSnapshot, + ]); + same( + canonicalGraphIdentity(creatorApiGraph), + canonicalGraphIdentity(creator.apiGraph), + 'Creator visual/API export differs.', + ); + same( + canonicalGraphIdentity(outputApiGraph), + canonicalGraphIdentity(output.apiGraphSnapshot), + 'Output visual/API export differs.', + ); + const nodesPayload = readJson(evidence.nodes); + const contracts = nodesPayload.nodes ?? nodesPayload; + for (const node of Object.values(output.apiGraphSnapshot.nodes)) { + const key = `${node.module}.${node.action}`; + assert.ok( + contracts[key]?.params && typeof contracts[key].params === 'object', + `Actual backend contract is missing: ${key}`, + ); + assert.ok( + Object.values(contracts[key].params).every((field) => field?.display !== 'filebrowser'), + 'Input-backed canonical qualification is unsupported until native execution-bound input-byte evidence is available.', + ); + } + const sourceBefore = readJson(evidence.backendSourceBefore); + const sourceAfter = readJson(evidence.backendSourceAfter); + const source = backendSourceEvidence({ + before: sourceBefore.identity, + after: sourceAfter.identity, + runtimeFingerprint: run.task?.runtimeFingerprint, + }); + assert.deepEqual(source.blockers, [], 'Source changed or does not match the running worker.'); + assert.ok( + Array.isArray(evidence.modelObservations) && evidence.modelObservations.length > 0, + 'Actual model observations are required.', + ); + const payloads = evidence.modelObservations.map(readJson); + assert.ok( + payloads.every((value) => value.error === false && Array.isArray(value.models)), + 'Model observation is incomplete.', + ); + const modelPayload = { models: payloads.flatMap((value) => value.models) }; + const modelIdentities = target.modelSet.map(({ repoId, revision }) => { + assert.equal( + modelPayload.models.filter((row) => row.installed && row.repoId === repoId).length, + 1, + 'Installed model identity is missing or ambiguous.', + ); + const identity = selectInstalledModelIdentity(modelPayload, repoId); + assert.equal(identity?.selectedRevision, revision, 'Observed model revision differs.'); + assert.equal(identity?.modelRevision, `${repoId}@${revision}`); + return identity; + }); + assert.ok(Array.isArray(evidence.inputs), 'Explicit input evidence array is required.'); + const inputPaths = new Set(); + const visit = (value) => { + if (typeof value === 'string' && value.startsWith('@data/')) inputPaths.add(value); + else if (Array.isArray(value)) value.forEach(visit); + else if (value && typeof value === 'object') Object.values(value).forEach(visit); + }; + for (const node of Object.values(output.apiGraphSnapshot.nodes)) { + for (const parameter of Object.values(node.params ?? {})) visit(parameter?.value); + } + same( + evidence.inputs.map((row) => row.sourceValue).sort(), + [...inputPaths].sort(), + 'Complete exact input file bindings are required.', + ); + assert.equal( + inputPaths.size, + 0, + 'Input-backed canonical qualification is unsupported until native execution-bound input-byte evidence is available.', + ); + const inputArtifacts = []; + const { decodedMediaHash } = await import('./template-gallery-harness.mjs'); + assert.ok(Array.isArray(evidence.outputs) && evidence.outputs.length > 0, 'Physical output evidence is required.'); + assert.equal(evidence.outputs.length, output.mediaItems?.length, 'Complete durable output collection is required.'); + const analyses = []; + for (const [index, row] of evidence.outputs.entries()) { + const item = output.mediaItems[index]; + assert.equal(row.backendPath, item.backendPath, 'Durable output order/path differs.'); + const { file, bytes } = read(row.file, 512 * 1024 * 1024); + assert.equal(item.mediaHash, `sha256:bytes:${row.file.sha256}`, 'Durable output bytes differ.'); + assert.equal(item.byteSize, bytes.length); + assert.ok(target.outputPlan.mediaKinds.includes(row.mediaType), 'Output modality is not declared.'); + const decoded = await decodedMediaHash(file, row.mediaType); + if (row.mediaType === 'image') { + if (item.width != null) assert.equal(decoded.width, item.width, 'Decoded image width differs from the run.'); + if (item.height != null) assert.equal(decoded.height, item.height, 'Decoded image height differs from the run.'); + } + analyses.push({ + ...decoded, + mediaType: row.mediaType, + byteSize: bytes.length, + encodedSha256: `sha256:${row.file.sha256}`, + decodedSha256: decoded.hash, + }); + } + const graphIdentity = canonicalGraphIdentity(expectedApiGraph); + const provenance = createRunProvenance({ + templateId: target.authoringId, + lockedSettings: creator.metadata?.studio, + promptSettingsHash: sha256Value('canonical-workflow-settings-v1', creator.metadata?.studio), + catalogTemplateLockHash: target.authoringHash, + resolvedTemplateLockHash: sha256Value('canonical-workflow-execution-v1', { + authoringHash: target.authoringHash, + graphHash: graphIdentity.hash, + }), + apiGraph: output.apiGraphSnapshot, + nodesPayload, + modelIdentities, + inputArtifacts, + runtimeFingerprint: run.task?.runtimeFingerprint, + deterministicMode: output.apiGraphSnapshot.deterministicMode, + backendSource: source.identity, + outputAnalysis: { analyses }, + executedOutput: output, + executionReceipt: run.task, + taskId: run.task?.task_id, + ...(output.resolvedExecutionInputs?.fieldAccountingStatus !== undefined || + output.resolvedExecutionInputs?.nodes?.some((row) => row.fieldAccounting !== undefined) + ? { + canonicalAccountingProof: { + expectedApiGraph, + target, + run, + ...(graphCompleted === undefined ? {} : { graphCompleted }), + }, + } + : {}), + capturedAt: new Date(run.task?.completed_at * 1000).toISOString(), + }); + const receipt = validateCanonicalWorkflowEvidence({ + target, + expectedApiGraph, + creator, + outputPackage, + run, + provenance, + graphCompleted, + }); + // Recheck before any caller writes. All generated metadata remains separate + // from the untouched exported packages and the raw task/observation bodies. + for (const ref of retainedFiles) readCanonicalEvidenceFile(root, ref, 512 * 1024 * 1024); + same( + readFileSync(evidencePath).toString('base64'), + descriptorBytes.toString('base64'), + 'Evidence descriptor changed during validation.', + ); + return { receipt, provenance, evidence, descriptorBytes, retainedFiles, evidenceRoot: root }; +} diff --git a/scripts/release-contract.mjs b/scripts/release-contract.mjs index 0652d20b..068c530f 100644 --- a/scripts/release-contract.mjs +++ b/scripts/release-contract.mjs @@ -7,10 +7,28 @@ import { buildBackendInstallerPackageSet } from './backend-installer-contract.mj import { assertBackendNodeKeys, readBundledBackendNodeRegistry } from './backend-node-registry.mjs'; import { assessHistoricalEvidence, + selectCurrentHistoricalEvidence, canonicalWorkflowContract, + canonicalWorkflowDeclaredModelRevision, findCanonicalWorkflowRecord, + isReviewedReplacementSource, + templateResourceExecutionModelType, + qualificationModelArtifacts, + assessGalleryReleaseApproval, + assessPreviewFreeResearchWorkflow, + assessWorkflowReleaseEvidence, + readCanonicalEvidenceFile, + readCanonicalWorkflowEvidence, + exportCanonicalWorkflowGraphs, + withCanonicalWorkflowGraphExporter, } from './release-contract-core.mjs'; import { findGalleryEvidencePath } from './release-evidence-paths.mjs'; +import { selectReviewedExperimentalWorkflows } from './workflow-library-manifest-state.mjs'; +import { readReviewedBoundTemplateAssociations } from './retained-template-association.mjs'; +import { createRetainedGalleryReleaseReader, retainedFullGraphImageResource } from './retained-gallery-release.mjs'; +import { canonicalJsonHash } from './canonical-json.mjs'; +import { readPrivateWorkflowQualification } from './private-workflow-qualification.mjs'; +import { readPrivateGalleryReviews } from './template-asset-release-contract.mjs'; const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url)); const CLIENT_ROOT = resolve(SCRIPT_DIR, '..'); @@ -23,6 +41,8 @@ const TEMPLATE_RECEIPT_REGISTRY_PATH = join( 'release', 'template-run-receipts.v2.json', ); +const RETAINED_TEMPLATE_REVIEW_ROOT = join(BACKEND_ROOT, 'data/qualification/release/retained-template-review'); +const PREVIEW_FREE_REVIEW_PATH = join(CLIENT_ROOT, 'config/preview-free-research-workflows.v1.json'); const CHECK = process.argv.includes('--check'); function readJson(path) { @@ -143,6 +163,7 @@ function outputContract(template) { function resourceContract(profile, template) { const locked = template.example?.lockedSettings ?? {}; return { + executionModelType: templateResourceExecutionModelType(template), supportedOffloadModes: profile.offloadSupport.modes, declaredRecipes: [ { @@ -310,8 +331,10 @@ function verifiedDirectReceipt(value) { } const gallery = readJson(join(CLIENT_ROOT, 'public', 'template-gallery', 'manifest.json')); +const gallerySource = readJson(join(CLIENT_ROOT, 'src', 'studio', 'templateAssetSource.json')); const workflowManifest = readJson(join(BACKEND_ROOT, 'data', 'workflow-library-manifest.json')); const artifactCatalog = readJson(join(BACKEND_ROOT, 'data', 'model-artifact-catalog.json')); +const canonicalAuthoring = readJson(join(BACKEND_ROOT, 'data', 'template-authoring-specs.v1.json')).specifications; const galleryByTemplate = new Map(gallery.examples.map((entry) => [entry.templateId, entry])); const artifactByModel = new Map(artifactCatalog.models.map((entry) => [entry.modelType, entry])); const directReceipts = readTemplateReceiptRegistry().map(verifiedDirectReceipt).filter(Boolean); @@ -322,24 +345,107 @@ for (const directReceipt of directReceipts) { candidates.sort((left, right) => String(left.capturedAt ?? '').localeCompare(String(right.capturedAt ?? ''))); directReceiptsByTemplate.set(directReceipt.templateId, candidates); } -const workflowRecords = workflowManifest.workflows.map((workflow) => { +const reviewedExperimental = selectReviewedExperimentalWorkflows( + workflowManifest.experimentalWorkflows ?? [], + readJson(join(CLIENT_ROOT, 'config/canonical-template-variants.v1.json')), +); +const workflowRecords = [...workflowManifest.workflows, ...reviewedExperimental].map((workflow) => { const graphPath = join(BACKEND_ROOT, 'data', 'graphs', workflow.graphPath); const graph = readJson(graphPath); return { manifest: workflow, graph, contract: canonicalWorkflowContract(workflow, graph) }; }); +const canonicalReceiptsByWorkflow = new Map(); +const researchReviews = readJson(PREVIEW_FREE_REVIEW_PATH); +if (researchReviews.schemaVersion !== 1 || !Array.isArray(researchReviews.reviews)) { + throw new Error('Preview-free research workflow reviews have an invalid schema.'); +} +const researchReviewsByWorkflow = new Map(researchReviews.reviews.map((review) => [review.workflowId, review])); +if (researchReviewsByWorkflow.size !== researchReviews.reviews.length) { + throw new Error('Preview-free research workflow reviews contain duplicate workflow IDs.'); +} +const dreamLiteArtifactReview = readJson(join(BACKEND_ROOT, 'data/dreamlite-artifact-review.json')); +const retainedNativeBySha = new Map(); +const executionStatuses = { + real_backend_deterministic_data: 'verified_deterministic_execution', + real_backend_deterministic_media: 'verified_deterministic_media_execution', + real_backend_input_bound_model_variant: 'verified_input_bound_model_variant', + real_backend_prompt_bound_model_variant: 'verified_prompt_bound_model_variant', +}; +const canonicalRegistryPath = join(BACKEND_ROOT, 'data/qualification/release/canonical-workflow-run-receipts.v1.json'); +if (existsSync(canonicalRegistryPath)) { + const registry = readJson(canonicalRegistryPath); + if ( + registry.schemaVersion !== 1 || + registry.format !== 'modiff.canonical-workflow-run-receipt-registry.v1' || + !Array.isArray(registry.receipts) + ) { + throw new Error('Canonical workflow receipt registry has an invalid schema.'); + } + await withCanonicalWorkflowGraphExporter(CLIENT_ROOT, async () => { + for (const stored of registry.receipts) { + const descriptor = readCanonicalEvidenceFile( + BACKEND_ROOT, + { path: stored.evidencePath, bytes: stored.evidenceBytes, sha256: stored.evidenceSha256 }, + 65536, + ); + const derived = await readCanonicalWorkflowEvidence({ + clientRoot: CLIENT_ROOT, + backendRoot: BACKEND_ROOT, + workflowId: stored.workflowId, + evidencePath: descriptor.file, + }); + const body = { ...stored }; + delete body.evidencePath; + delete body.evidenceSha256; + delete body.evidenceBytes; + if (JSON.stringify(stable(body)) !== JSON.stringify(stable(derived.receipt))) { + throw new Error(`Canonical workflow receipt differs from original task evidence: ${stored.workflowId}`); + } + if ( + derived.receipt.inputBinding || + derived.receipt.promptBinding || + retainedFullGraphImageResource(stored.workflowId) + ) { + if (retainedNativeBySha.has(stored.evidenceSha256)) { + throw new Error(`Original bound workflow evidence is duplicated: ${stored.workflowId}`); + } + retainedNativeBySha.set(stored.evidenceSha256, { ...derived, registeredReceipt: stored }); + } + const previous = canonicalReceiptsByWorkflow.get(stored.workflowId); + if (!previous || String(previous.capturedAt).localeCompare(stored.capturedAt) < 0) + canonicalReceiptsByWorkflow.set(stored.workflowId, stored); + } + }); +} const vite = await createServer({ root: CLIENT_ROOT, + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, appType: 'custom', - server: { middlewareMode: true, watch: null }, + server: { middlewareMode: true, hmr: false, watch: null }, }); try { const { STUDIO_TEMPLATES } = await vite.ssrLoadModule('/src/studio/templates.ts'); + const { usagePolicyForRepository } = await vite.ssrLoadModule('/src/studio/modelUsagePolicies.ts'); + const { RETAINED_GALLERY_TEMPLATES } = await vite.ssrLoadModule('/scripts/retained-gallery-recipes.ts'); + const retainedRecipesByTemplate = new Map(RETAINED_GALLERY_TEMPLATES.map((recipe) => [recipe.template.id, recipe])); + const retainedRecipesByWorkflow = new Map(RETAINED_GALLERY_TEMPLATES.map((recipe) => [recipe.workflowId, recipe])); + const readRetainedGalleryRelease = createRetainedGalleryReleaseReader({ + clientRoot: CLIENT_ROOT, + source: gallerySource, + registry: gallery, + }); const { STUDIO_MODEL_PROFILES } = await vite.ssrLoadModule('/src/studio/modelProfiles.ts'); const { templateBackendNodeKeys } = await vite.ssrLoadModule('/src/studio/templateBackendCapabilities.ts'); - const { getPromptSettingsHash, getTemplateLockHash, getTemplateLockedSettings } = await vite.ssrLoadModule( - '/src/studio/templateExactness.ts', - ); + const { getPromptSettingsHash, getTemplateLockHash, getTemplateLockedSettings, findManifestEntry } = + await vite.ssrLoadModule('/src/studio/templateExactness.ts'); + const retainedTemplateAssociations = await readReviewedBoundTemplateAssociations({ + approvalRoot: RETAINED_TEMPLATE_REVIEW_ROOT, + vite, + nativeBySha: retainedNativeBySha, + }); const backendNodeRegistry = readBundledBackendNodeRegistry(BACKEND_ROOT); for (const workflow of workflowRecords) { assertBackendNodeKeys(workflow.contract.backendNodes, backendNodeRegistry, workflow.manifest.id); @@ -353,6 +459,19 @@ try { const galleryEntry = galleryByTemplate.get(template.id); const proof = readLatestProof(galleryEntry); const workflow = findCanonicalWorkflowRecord(workflowRecords, template); + const retainedRecipe = retainedRecipesByTemplate.get(template.id); + const lockedSettings = getTemplateLockedSettings(template); + const retainedReceipt = retainedRecipe + ? readRetainedGalleryRelease({ + recipe: retainedRecipe, + entry: galleryEntry, + sourceWorkflow: workflow, + templateRevisionHash: canonicalJsonHash({ template, settings: lockedSettings }), + localAssociation: retainedTemplateAssociations.get(retainedRecipe.workflowId), + native: retainedNativeBySha.get(retainedRecipe.originalReceiptSha256), + nativeReceipt: retainedNativeBySha.get(retainedRecipe.originalReceiptSha256)?.registeredReceipt, + }) + : null; const schema = { id: template.id, mode: template.mode, @@ -370,7 +489,7 @@ try { const graphHash = workflow?.contract.graphHash ?? null; const galleryReceipt = receipt(template.id, galleryEntry, proof); const currentCatalogTemplateLockHash = getTemplateLockHash(template); - const currentPromptSettingsHash = getPromptSettingsHash(getTemplateLockedSettings(template)); + const currentPromptSettingsHash = getPromptSettingsHash(lockedSettings); const historicalCandidates = [...(directReceiptsByTemplate.get(template.id) ?? []), galleryReceipt] .filter(Boolean) .sort((left, right) => String(left.capturedAt ?? '').localeCompare(String(right.capturedAt ?? ''))); @@ -381,15 +500,17 @@ try { promptSettingsHash: currentPromptSettingsHash, }), })); - const currentHistoricalEvidence = assessedHistoricalCandidates.filter((item) => item.assessment.matches).at(-1); + const currentHistoricalEvidence = selectCurrentHistoricalEvidence(assessedHistoricalCandidates); const latestHistoricalEvidence = assessedHistoricalCandidates.at(-1) ?? null; - const lastSuccessfulRun = currentHistoricalEvidence - ? { - ...currentHistoricalEvidence.candidate, - canonicalWorkflowHash: workflow.contract.graphHash, - evidenceMatch: currentHistoricalEvidence.assessment.status, - } - : null; + const lastSuccessfulRun = + retainedReceipt ?? + (currentHistoricalEvidence + ? { + ...currentHistoricalEvidence.candidate, + canonicalWorkflowHash: workflow.contract.graphHash, + evidenceMatch: currentHistoricalEvidence.assessment.status, + } + : null); const modelRevision = exactRevision(lastSuccessfulRun?.modelRevision) ?? exactRevision(galleryEntry?.modelRevision ?? template.example?.modelRevision) ?? @@ -397,9 +518,18 @@ try { ? `${artifactCatalogEntry.baseRepo}@${artifactCatalogEntry.baseRevision}` : null); const qualificationExemption = template.evidencePolicy === 'user_supplied' ? 'user_supplied_artifact' : null; - const incompleteReceiptFields = qualificationExemption ? [] : receiptMissingFields(lastSuccessfulRun); - const approvedGalleryExample = - typeof galleryEntry?.qualityReviewStatus === 'string' && galleryEntry.qualityReviewStatus.startsWith('approved_'); + const incompleteReceiptFields = + qualificationExemption || retainedReceipt ? [] : receiptMissingFields(lastSuccessfulRun); + const galleryApproval = assessGalleryReleaseApproval(galleryEntry, { + matchesCurrentRecipe: Boolean( + findManifestEntry(template, { + ...gallery, + examples: galleryEntry ? [galleryEntry] : [], + }), + ), + unavailableAssets: gallerySource.unavailableAssets ?? [], + }); + const approvedGalleryExample = galleryApproval.approved; const missingReleaseEvidence = qualificationExemption ? [] : [ @@ -416,20 +546,7 @@ try { const backendNodes = workflow?.contract.backendNodes ?? declaredBackendNodes; assertBackendNodeKeys(backendNodes, backendNodeRegistry, template.id); const artifactRequirements = requiredArtifacts(template, profile, artifactCatalogEntry); - if ( - lastSuccessfulRun?.modelRevision && - !artifactRequirements.some( - (artifact) => - artifact.repo && `${artifact.repo}@${artifact.revision ?? ''}` === lastSuccessfulRun.modelRevision, - ) - ) { - const at = lastSuccessfulRun.modelRevision.lastIndexOf('@'); - artifactRequirements.push({ - role: 'qualification_model', - repo: lastSuccessfulRun.modelRevision.slice(0, at), - revision: lastSuccessfulRun.modelRevision.slice(at + 1), - }); - } + artifactRequirements.push(...qualificationModelArtifacts(lastSuccessfulRun?.modelRevision, artifactRequirements)); return { id: template.id, label: template.label, @@ -443,6 +560,11 @@ try { reviewedExampleModelRevision: exactRevision(galleryEntry?.modelRevision), reviewedExampleVerificationStatus: galleryEntry?.verificationStatus ?? null, reviewedExampleQualityReviewStatus: galleryEntry?.qualityReviewStatus ?? null, + reviewedExampleReleaseApproved: approvedGalleryExample, + galleryApprovalMissingReasons: galleryApproval.reasons, + ...(workflow?.manifest.experimentalRecipe + ? { experimentalRecipe: workflow.manifest.experimentalRecipe, modelSupportTier: 'experimental' } + : {}), requiredArtifacts: artifactRequirements, backendNodes, packageSetIds: [packageSet.id], @@ -464,6 +586,7 @@ try { } : null, qualificationReceiptMissingFields: incompleteReceiptFields, + ...(retainedReceipt ? { qualificationReceiptScope: retainedReceipt.evidenceMatch } : {}), evidencePolicy: template.evidencePolicy ?? 'generated', qualificationExemption, releaseEligible: Boolean(qualificationExemption) || missingReleaseEvidence.length === 0, @@ -471,28 +594,140 @@ try { }; }).sort((left, right) => left.id.localeCompare(right.id)); + const privateReviews = readPrivateGalleryReviews( + CLIENT_ROOT, + gallerySource, + readJson(join(CLIENT_ROOT, 'config', 'template-assets.v1.json')), + gallery, + ); + const reviewedPrivateWorkflows = privateReviews.map((review) => { + const record = workflowRecords.find(({ manifest }) => manifest.id === review.workflowId); + if (!record) throw new Error(`Missing private workflow source: ${review.workflowId}`); + return { review, ...record }; + }); + const privateWorkflowIds = new Set(privateReviews.map(({ workflowId }) => workflowId)); + if (privateWorkflowIds.size !== privateReviews.length) { + throw new Error('Private workflow reviews contain duplicate workflow IDs.'); + } + const canonicalPrivateGraphs = await exportCanonicalWorkflowGraphs( + CLIENT_ROOT, + reviewedPrivateWorkflows.map(({ graph }) => graph), + ); + const privateQualifications = new Map(); + for (const [index, { manifest, contract, review }] of reviewedPrivateWorkflows.entries()) { + const verified = await readPrivateWorkflowQualification({ + backendRoot: BACKEND_ROOT, + manifest, + canonicalHash: contract.graphHash, + expectedGraph: canonicalPrivateGraphs[index], + canonicalReceipt: canonicalReceiptsByWorkflow.get(manifest.id), + review, + usagePolicy: usagePolicyForRepository, + }); + if (verified) privateQualifications.set(manifest.id, verified); + } const workflows = workflowRecords - .map(({ manifest, graph }) => { + .map(({ manifest, graph, contract }) => { const artifact = artifactByModel.get(manifest.modelType); - const sourceTemplate = templates.find((template) => template.id === manifest.sourceTemplateId); + const retainedRecipe = retainedRecipesByWorkflow.get(manifest.id); + const authoring = canonicalAuthoring.find((row) => row.canonicalWorkflowId === manifest.id); + const namedTemplate = templates.find((template) => template.id === manifest.sourceTemplateId); + const retainedSource = templates.find( + (template) => + retainedRecipe && + template.id === retainedRecipe.template.id && + template.canonicalWorkflowId === manifest.id && + retainedRecipe.sourceTaskTemplateId === manifest.sourceTemplateId, + ); + const sourceTemplate = + retainedSource?.releaseEligible || !namedTemplate?.releaseEligible + ? (retainedSource ?? namedTemplate) + : namedTemplate; + const showCanonicalEvidence = + !sourceTemplate || retainedRecipe || isReviewedReplacementSource(manifest, authoring); + const canonicalReceipt = showCanonicalEvidence ? canonicalReceiptsByWorkflow.get(manifest.id) : null; + const reviewedRetainedTemplate = retainedTemplateAssociations.get(manifest.id); + const catalogRevision = + artifact?.baseRepo && artifact?.baseRevision ? `${artifact.baseRepo}@${artifact.baseRevision}` : null; + const authoredRevision = + !sourceTemplate && !catalogRevision && authoring && !manifest.modelType.startsWith('Builtin') + ? canonicalWorkflowDeclaredModelRevision(manifest, graph, authoring, artifact) + : null; + const privateQualification = privateQualifications.get(manifest.id); + if (privateWorkflowIds.has(manifest.id) && sourceTemplate?.reviewedExampleReleaseApproved) { + throw new Error(`Private workflow must withhold its Gallery preview: ${manifest.id}`); + } const exactModelRevision = + privateQualification?.modelRevision ?? sourceTemplate?.exactModelRevision ?? - (artifact?.baseRepo && artifact?.baseRevision ? `${artifact.baseRepo}@${artifact.baseRevision}` : null); + authoredRevision ?? + catalogRevision; + const previewFreeResearch = assessPreviewFreeResearchWorkflow({ + manifest, + graphHash: contract.graphHash, + exactModelRevision, + receipt: canonicalReceipt, + review: researchReviewsByWorkflow.get(manifest.id), + artifactReview: dreamLiteArtifactReview, + }); + const executionStatus = manifest.requiredArtifacts?.some((item) => item.startsWith('builtin:')) + ? 'unsupported_builtin_model_not_applicable' + : 'missing'; + const releaseEvidence = assessWorkflowReleaseEvidence({ + modelType: manifest.modelType, + exactModelRevision, + sourceTemplate, + canonicalReceipt, + previewFreeResearch, + privateQualification, + }); + if (reviewedRetainedTemplate) { + releaseEvidence.missingReleaseEvidence = releaseEvidence.missingReleaseEvidence.filter( + (reason) => reason !== 'reviewed_bound_recipe', + ); + } return { id: manifest.id, modelType: manifest.modelType, mode: manifest.mode, graphPath: manifest.graphPath, - graphHash: canonicalWorkflowContract(manifest, graph).graphHash, - backendNodes: canonicalWorkflowContract(manifest, graph).backendNodes, + ...(manifest.experimentalRecipe + ? { experimentalRecipe: manifest.experimentalRecipe, modelSupportTier: 'experimental' } + : {}), + graphHash: contract.graphHash, + backendNodes: contract.backendNodes, packageSetIds: [packageSet.id], exactModelRevision, + exactModelRevisionSource: privateQualification + ? 'verified_private_execution' + : sourceTemplate?.exactModelRevision + ? 'template_recipe' + : authoredRevision + ? 'canonical_authoring' + : catalogRevision + ? 'artifact_catalog' + : null, + requiredArtifacts: manifest.requiredArtifacts ?? [], defaultAssets: sourceTemplate?.defaultAssets ?? [], userInputs: sourceTemplate?.userInputs ?? manifest.requiredInputs ?? {}, resourceRecipes: sourceTemplate?.resourceRecipes ?? null, outputContract: sourceTemplate?.outputContract ?? { mediaKinds: [manifest.mediaKind] }, - lastSuccessfulRealRun: sourceTemplate?.lastSuccessfulRealRun ?? null, - releaseEligible: Boolean(exactModelRevision && sourceTemplate?.releaseEligible), + lastSuccessfulRealRun: + privateQualification ?? sourceTemplate?.lastSuccessfulRealRun ?? canonicalReceipt ?? null, + ...(showCanonicalEvidence + ? { + canonicalExecutionEvidence: { + status: canonicalReceipt + ? (executionStatuses[canonicalReceipt.proofKind] ?? 'verified_execution_only') + : executionStatus, + releaseApprovalGranted: false, + }, + } + : {}), + ...releaseEvidence, + ...(previewFreeResearch ? { previewFreeResearch } : {}), + ...(privateQualification ? { privateQualification } : {}), + ...(reviewedRetainedTemplate ? { reviewedRetainedTemplate } : {}), }; }) .sort((left, right) => left.id.localeCompare(right.id)); @@ -507,9 +742,7 @@ try { coverage: { templateCount: templates.length, reviewedExampleCount: templates.filter((item) => item.reviewedExampleModelRevision).length, - approvedReviewedExampleCount: templates.filter((item) => - String(item.reviewedExampleQualityReviewStatus ?? '').startsWith('approved_'), - ).length, + approvedReviewedExampleCount: templates.filter((item) => item.reviewedExampleReleaseApproved).length, historicalEvidenceCount: templates.filter((item) => item.historicalEvidence).length, currentHistoricalEvidenceCount: templates.filter((item) => item.lastSuccessfulRealRun).length, staleHistoricalEvidenceCount: templates.filter((item) => item.historicalEvidence?.status === 'stale').length, @@ -519,6 +752,8 @@ try { .length, workflowCount: workflows.length, releaseEligibleWorkflowCount: workflows.filter((item) => item.releaseEligible).length, + previewFreeResearchWorkflowCount: workflows.filter((item) => item.previewFreeResearch).length, + privateQualifiedWorkflowCount: workflows.filter((item) => item.privateQualification).length, missingTemplateEvidence: templates .filter((item) => item.missingReleaseEvidence.length) .map((item) => ({ id: item.id, missing: item.missingReleaseEvidence })), diff --git a/scripts/release-contract.test.mjs b/scripts/release-contract.test.mjs index b82feb1b..42efa854 100644 --- a/scripts/release-contract.test.mjs +++ b/scripts/release-contract.test.mjs @@ -1,14 +1,831 @@ import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { spawnSync } from 'node:child_process'; import { join, resolve } from 'node:path'; +import { mkdtempSync, mkdirSync, readFileSync, rmdirSync, rmSync, symlinkSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; import { test } from 'node:test'; +import retainedGalleryAuthoringArchives from '../config/retained-gallery-authoring-archives.v1.json' with { type: 'json' }; import { canonicalJsonHash } from './canonical-json.mjs'; +import { builtinDataQualificationTarget, validateBuiltinDataExecution } from './builtin-data-qualification.mjs'; import { assessHistoricalEvidence, + selectCurrentHistoricalEvidence, canonicalWorkflowContract, + exportCanonicalWorkflowGraphs, + withCanonicalWorkflowGraphExporter, + readCanonicalWorkflowEvidence, findCanonicalWorkflowRecord, + isReviewedReplacementSource, + templateResourceExecutionModelType, + qualificationModelArtifacts, + assessGalleryReleaseApproval, + assessPreviewFreeResearchWorkflow, + assessWorkflowReleaseEvidence, + canonicalWorkflowAuthoringContract, + canonicalWorkflowDeclaredModelRevision, + validateCanonicalWorkflowEvidence, } from './release-contract-core.mjs'; -import { galleryEvidenceCandidates } from './release-evidence-paths.mjs'; +import { canonicalGraphIdentity, createRunProvenance, sha256Value } from './live-proof-provenance.mjs'; +import { readPrivateWorkflowQualification } from './private-workflow-qualification.mjs'; +import { validateNativeVariantOutput } from './native-variant-run-evidence.mjs'; +import { galleryEvidenceCandidates, readReleaseRunProvenance } from './release-evidence-paths.mjs'; +import { + selectCanonicalWorkflowVariantTemplates, + retainUnselectedCurrentWorkflowRecords, + canonicalWorkflowVariantTemplateIds, + parseCanonicalWorkflowGenerationScope, + selectCanonicalWorkflowCapabilities, + selectReviewedExperimentalWorkflows, +} from './workflow-library-manifest-state.mjs'; + +test('a batch compiler preserves exact graph exports and releases its offline scope', async () => { + const clientRoot = resolve('.'); + const backendRoot = resolve(process.env.MODIFF_BACKEND_DIR ?? '../MoDiff'); + const read = (name) => JSON.parse(readFileSync(join(backendRoot, 'data', name), 'utf8')); + const entries = read('workflow-library-manifest.json').workflows.filter( + ({ modelType }) => modelType === 'BuiltinDataOperation', + ); + assert.ok(entries.length >= 2); + const graphs = entries.slice(0, 2).map(({ graphPath }) => read(join('graphs', graphPath))); + const expected = await exportCanonicalWorkflowGraphs(clientRoot, graphs); + const prior = globalThis.fetch; + await assert.rejects( + withCanonicalWorkflowGraphExporter(clientRoot, async () => { + const [last, first] = await Promise.all([ + exportCanonicalWorkflowGraphs(clientRoot, [graphs[1]]), + exportCanonicalWorkflowGraphs(clientRoot, [graphs[0]]), + ]); + assert.deepEqual([first[0], last[0]], expected); + assert.equal(globalThis.fetch, prior); + throw new Error('stop the test batch'); + }), + /stop the test batch/u, + ); + assert.equal(globalThis.fetch, prior); + assert.deepEqual(await exportCanonicalWorkflowGraphs(clientRoot, [graphs[0]]), [expected[0]]); +}); + +test( + 'retired authoring validates each pinned historical capture and rejects descriptor edits', + { skip: process.env.MODIFF_VERIFY_ARCHIVED_CAPTURES !== '1' }, + async () => { + const clientRoot = resolve('.'); + const backendRoot = resolve(process.env.MODIFF_BACKEND_DIR ?? '../MoDiff'); + const read = (name) => JSON.parse(readFileSync(join(backendRoot, 'data', name), 'utf8')); + const { receipts } = read('qualification/release/canonical-workflow-run-receipts.v1.json'); + const current = new Set( + read('template-authoring-specs.v1.json').specifications.map((row) => row.canonicalWorkflowId), + ); + const altered = mkdtempSync(join(tmpdir(), 'modiff-archived-authoring-')); + const tampered = join(altered, 'evidence.json'); + try { + await withCanonicalWorkflowGraphExporter(clientRoot, async () => { + for (const [workflowId, lock] of Object.entries(retainedGalleryAuthoringArchives)) { + if (!lock.additionalDescriptorHashes?.length) continue; + assert.equal(current.has(workflowId), false, workflowId); + for (const hash of [lock.descriptorSha256, ...lock.additionalDescriptorHashes]) { + const stored = receipts.find( + (receipt) => receipt.workflowId === workflowId && receipt.evidenceSha256 === hash, + ); + assert.ok(stored, workflowId); + const { evidencePath, evidenceSha256, evidenceBytes, ...expected } = stored; + const path = join(backendRoot, evidencePath); + const bytes = readFileSync(path); + assert.equal(bytes.length, evidenceBytes); + assert.equal(createHash('sha256').update(bytes).digest('hex'), evidenceSha256); + const { receipt } = await readCanonicalWorkflowEvidence({ + clientRoot, + backendRoot, + workflowId, + evidencePath: path, + }); + assert.deepEqual(receipt, expected); + writeFileSync(tampered, Buffer.concat([bytes, Buffer.from('\n')])); + await assert.rejects( + readCanonicalWorkflowEvidence({ clientRoot, backendRoot, workflowId, evidencePath: tampered }), + /Archived authoring requires the exact original capture/u, + ); + } + } + }); + } finally { + rmSync(tampered, { force: true }); + rmdirSync(altered); + } + }, +); + +test('verified standalone model execution remains distinct from a reviewed exact template recipe', () => { + const workflow = { modelType: 'ExamplePipeline', exactModelRevision: `example/base@${'a'.repeat(40)}` }; + assert.deepEqual(assessWorkflowReleaseEvidence({ modelType: workflow.modelType }), { + releaseEligible: false, + missingReleaseEvidence: ['eligible_source_template', 'exact_model_revision', 'successful_real_run_receipt'], + }); + assert.deepEqual( + assessWorkflowReleaseEvidence({ + ...workflow, + canonicalReceipt: { proofKind: 'real_backend_weights', canonicalDefaultsExecuted: true }, + }), + { releaseEligible: false, missingReleaseEvidence: ['eligible_source_template'] }, + ); + for (const proofKind of ['real_backend_input_bound_model_variant', 'real_backend_prompt_bound_model_variant']) { + assert.deepEqual( + assessWorkflowReleaseEvidence({ + ...workflow, + canonicalReceipt: { proofKind, canonicalDefaultsExecuted: false }, + }), + { releaseEligible: false, missingReleaseEvidence: ['eligible_source_template', 'reviewed_bound_recipe'] }, + ); + } +}); + +test('the withheld-preview lane requires the reviewed policy and retained native evidence', async () => { + const backendRoot = mkdtempSync(join(tmpdir(), 'modiff-private-qualification-')); + const repoId = 'ACE-Step/ACE-Step-v1.5-chinese-new-year-LoRA'; + const revision = 'a'.repeat(40); + const manifest = { + id: 'AceStepAudioPipeline:text_to_audio:ace_step_chinese_new_year_lora', + sourceTemplateId: 'ace_step_chinese_new_year_lora', + requiredArtifacts: [repoId, 'Runware/acestep-v15-turbo-diffusers'], + }; + const canonicalHash = `sha256:workflow-graph-v1:${'d'.repeat(64)}`; + const review = { + workflowId: manifest.id, + sourceTemplateId: manifest.sourceTemplateId, + canonicalWorkflowHash: canonicalHash, + scope: 'research_academic_only', + preview: 'withheld', + redistributionAuthorized: false, + modelSet: [ + { repoId, revision }, + { repoId: manifest.requiredArtifacts[1], revision: 'b'.repeat(40) }, + ], + outputSha256: 'c'.repeat(64), + evidence: { sha256: 'e'.repeat(64), bytes: 1000 }, + }; + const policy = { + id: 'ace-step-chinese-new-year-research-academic-only', + useScope: review.scope, + repository: repoId, + reviewedRevision: revision, + acknowledgementRequired: true, + }; + const usagePolicy = (candidate) => (candidate === repoId ? policy : null); + const args = { backendRoot, manifest, canonicalHash, review, usagePolicy }; + try { + const privateQualification = await readPrivateWorkflowQualification(args); + assert.equal(privateQualification, null); + assert.equal( + assessWorkflowReleaseEvidence({ + modelType: 'AceStepAudioPipeline', + exactModelRevision: `${repoId}@${revision}`, + privateQualification, + }).releaseEligible, + false, + ); + for (const change of [ + { preview: 'published' }, + { redistributionAuthorized: true }, + { scope: 'personal_noncommercial' }, + { canonicalWorkflowHash: 'another-graph' }, + { modelSet: [{ repoId, revision }] }, + ]) { + await assert.rejects(readPrivateWorkflowQualification({ ...args, review: { ...review, ...change } })); + } + await assert.rejects(readPrivateWorkflowQualification({ ...args, usagePolicy: () => null })); + await assert.rejects( + readPrivateWorkflowQualification({ + ...args, + usagePolicy: () => ({ ...policy, reviewedRevision: 'f'.repeat(40) }), + }), + ); + } finally { + rmdirSync(backendRoot); + } +}); + +test('server-only private media checks accept missing UI context only in that evidence lane', () => { + const bytes = Buffer.from('byte-locked fixture'); + const sha256 = createHash('sha256').update(bytes).digest('hex'); + const runtimeFingerprint = { fingerprint: 'test-runtime-fingerprint' }; + const task = { task_id: 'task-fixture', runtimeFingerprint }; + const backendPath = '@data/studio/outputs/private-fixture.wav'; + const mediaHash = `sha256:bytes:${sha256}`; + const item = { + index: 0, + backendPath, + taskId: task.task_id, + attemptIndex: 0, + clientRunId: null, + runInputHash: null, + displayType: 'audio', + contentType: 'audio/x-wav', + mediaHash, + byteSize: bytes.length, + }; + const output = { + mediaItems: [item], + mediaHash, + nodeId: 'audio-output', + mediaCollectionHash: 'test-collection', + backendProvenance: { + source: 'backend-record', + backendExecutionId: task.task_id, + clientRunId: null, + runInputHash: null, + workflowTabId: null, + mediaCollectionHash: 'test-collection', + attemptIndex: 0, + nodeId: 'audio-output', + fieldKey: 'preview', + runtimeFingerprint: runtimeFingerprint.fingerprint, + mediaPath: backendPath, + mediaHash, + mediaItems: [item], + }, + }; + const args = { + output, + outputRef: { backendPath, mediaType: 'audio', file: { sha256 } }, + task, + bytes, + displayType: 'audio', + contentType: 'audio/x-wav', + }; + assert.throws(() => validateNativeVariantOutput(args)); + assert.deepEqual(validateNativeVariantOutput({ ...args, backendOnly: true }), item); + assert.throws(() => + validateNativeVariantOutput({ + ...args, + backendOnly: true, + output: { ...output, clientRunId: 'unrelated-ui-run' }, + }), + ); + assert.throws(() => + validateNativeVariantOutput({ + ...args, + backendOnly: true, + outputRef: { ...args.outputRef, file: { sha256: 'a'.repeat(64) } }, + }), + ); +}); + +test('preview-free research qualification binds the reviewed recipe and the validated private output', () => { + const id = 'DreamLitePipeline:edit_image'; + const sourceTemplateId = 'task-template:dreamlite-base:edit-image:v1'; + const revision = 'a'.repeat(40); + const repoId = 'carlofkl/DreamLite-base'; + const graphHash = `sha256:workflow-graph-v1:${'b'.repeat(64)}`; + const review = { + workflowId: id, + sourceTemplateId, + canonicalWorkflowHash: graphHash, + executedGraphHash: `sha256:canonical-graph-v1:${'c'.repeat(64)}`, + evidenceSha256: 'd'.repeat(64), + outputHash: `sha256:bytes:${'e'.repeat(64)}`, + }; + const receipt = { + ...review, + graphHash: review.executedGraphHash, + task: 'edit_image', + modelType: 'DreamLitePipeline', + proofKind: 'real_backend_input_bound_model_variant', + modelSet: [{ repoId, revision }], + inputBinding: { sha256: 'f'.repeat(64) }, + canonicalDefaultsExecuted: false, + }; + const artifactReview = { + license: { commercialUseAllowed: false, id: 'cc-by-nc-4.0' }, + admission: { autoEligible: false, galleryEligible: false, executableModes: [id] }, + repositories: [{ pipelineClass: receipt.modelType, repository: repoId, revision }], + }; + const args = { + manifest: { id, sourceTemplateId, modelType: receipt.modelType, mode: receipt.task, mediaKind: 'image' }, + graphHash, + exactModelRevision: `${repoId}@${revision}`, + receipt, + review, + artifactReview, + }; + const previewFreeResearch = assessPreviewFreeResearchWorkflow(args); + assert.deepEqual(previewFreeResearch, { + scope: 'noncommercial_research', + preview: 'withheld', + license: 'cc-by-nc-4.0', + canonicalDefaultsExecuted: false, + evidenceSha256: review.evidenceSha256, + }); + assert.deepEqual( + assessWorkflowReleaseEvidence({ + modelType: receipt.modelType, + exactModelRevision: args.exactModelRevision, + canonicalReceipt: receipt, + previewFreeResearch, + }), + { releaseEligible: true, missingReleaseEvidence: [] }, + ); + + for (const change of [ + { review: null }, + { receipt: null }, + { graphHash: `sha256:workflow-graph-v1:${'9'.repeat(64)}` }, + { exactModelRevision: `${repoId}@${'9'.repeat(40)}` }, + { review: { ...review, evidenceSha256: '9'.repeat(64) } }, + { review: { ...review, outputHash: `sha256:bytes:${'9'.repeat(64)}` } }, + { receipt: { ...receipt, graphHash: `sha256:canonical-graph-v1:${'9'.repeat(64)}` } }, + { receipt: { ...receipt, inputBinding: null } }, + { manifest: { ...args.manifest, sourceTemplateId: 'different-template' } }, + { artifactReview: { ...artifactReview, license: null } }, + { artifactReview: { ...artifactReview, license: { commercialUseAllowed: false } } }, + { artifactReview: { ...artifactReview, admission: { ...artifactReview.admission, galleryEligible: true } } }, + ]) { + assert.equal(assessPreviewFreeResearchWorkflow({ ...args, ...change }), null); + } +}); + +test('the reviewed opening-video replacement exposes its receipt without qualifying its historical template', () => { + const id = 'WanImageToVideoPipeline:image_to_video'; + const sourceTemplateId = 'wan_22_i2v_seed_vault'; + const manifest = { id, sourceTemplateId }; + const authoring = { canonicalWorkflowId: id, replacementSourceTemplateId: sourceTemplateId }; + assert.equal(isReviewedReplacementSource(manifest, authoring), true); + assert.equal(isReviewedReplacementSource(manifest, null), false); + assert.equal(isReviewedReplacementSource(manifest, { ...authoring, replacementSourceTemplateId: 'other' }), false); + assert.equal(isReviewedReplacementSource({ ...manifest, id: 'OtherPipeline:image_to_video' }, authoring), false); + assert.deepEqual( + assessWorkflowReleaseEvidence({ + modelType: 'WanImageToVideoPipeline', + exactModelRevision: 'exact-model', + sourceTemplate: { releaseEligible: false, missingReleaseEvidence: ['approved_gallery_example'] }, + canonicalReceipt: { proofKind: 'real_backend_input_bound_model_variant', canonicalDefaultsExecuted: false }, + }), + { releaseEligible: false, missingReleaseEvidence: ['approved_gallery_example'] }, + ); +}); + +test('template-backed workflows inherit their exact template release gaps and require a revision', () => { + const workflow = { modelType: 'ExamplePipeline', exactModelRevision: `example/base@${'a'.repeat(40)}` }; + const releaseGaps = ['exact_model_revision', 'successful_real_run_receipt', 'approved_gallery_example']; + assert.deepEqual( + assessWorkflowReleaseEvidence({ + modelType: workflow.modelType, + sourceTemplate: { releaseEligible: false, missingReleaseEvidence: releaseGaps }, + }), + { releaseEligible: false, missingReleaseEvidence: releaseGaps }, + ); + assert.deepEqual( + assessWorkflowReleaseEvidence({ + modelType: workflow.modelType, + sourceTemplate: { releaseEligible: true, missingReleaseEvidence: [] }, + }), + { releaseEligible: false, missingReleaseEvidence: ['exact_model_revision'] }, + ); + assert.deepEqual( + assessWorkflowReleaseEvidence({ + ...workflow, + sourceTemplate: { releaseEligible: true, missingReleaseEvidence: [] }, + }), + { releaseEligible: true, missingReleaseEvidence: [] }, + ); +}); + +test('builtin release gaps reflect the deterministic proof requirements for each operation class', () => { + const dataOperation = { modelType: 'BuiltinDataOperation' }; + const dataReceipt = { + proofKind: 'real_backend_deterministic_data', + deterministicCorrectness: 'verified_exact_result', + }; + assert.deepEqual(assessWorkflowReleaseEvidence(dataOperation), { + releaseEligible: false, + missingReleaseEvidence: ['deterministic_execution_receipt'], + }); + assert.deepEqual( + assessWorkflowReleaseEvidence({ + ...dataOperation, + canonicalReceipt: { ...dataReceipt, deterministicCorrectness: null }, + }), + { releaseEligible: false, missingReleaseEvidence: ['deterministic_correctness'] }, + ); + assert.deepEqual(assessWorkflowReleaseEvidence({ ...dataOperation, canonicalReceipt: dataReceipt }), { + releaseEligible: true, + missingReleaseEvidence: [], + }); + for (const modelType of ['BuiltinImageOperation', 'BuiltinAudioOperation', 'BuiltinVideoOperation']) { + const mediaReceipt = { + proofKind: 'real_backend_deterministic_media', + deterministicCorrectness: 'verified_media_contract', + }; + assert.deepEqual(assessWorkflowReleaseEvidence({ modelType, canonicalReceipt: dataReceipt }), { + releaseEligible: false, + missingReleaseEvidence: ['deterministic_execution_receipt'], + }); + assert.deepEqual(assessWorkflowReleaseEvidence({ modelType, canonicalReceipt: mediaReceipt }), { + releaseEligible: false, + missingReleaseEvidence: ['canonical_defaults_execution'], + }); + assert.deepEqual( + assessWorkflowReleaseEvidence({ + modelType, + canonicalReceipt: { ...mediaReceipt, canonicalDefaultsExecuted: true, deterministicCorrectness: null }, + }), + { releaseEligible: false, missingReleaseEvidence: ['deterministic_correctness'] }, + ); + assert.deepEqual( + assessWorkflowReleaseEvidence({ + modelType, + canonicalReceipt: { ...mediaReceipt, canonicalDefaultsExecuted: true }, + }), + { releaseEligible: true, missingReleaseEvidence: [] }, + ); + } +}); + +test('qualification model artifacts preserve each immutable member of an aggregate revision lock', () => { + const model = { repo: 'Example/model', revision: 'a'.repeat(40), role: 'model' }; + const upscaler = { repo: 'Example/upscaler', revision: 'b'.repeat(40), role: 'qualification_model' }; + const lock = `${model.repo}@${model.revision} | ${upscaler.repo}@${upscaler.revision}`; + const before = JSON.stringify(model); + assert.deepEqual(qualificationModelArtifacts(lock, [model]), [upscaler]); + assert.deepEqual(qualificationModelArtifacts(lock), [{ ...model, role: 'qualification_model' }, upscaler]); + assert.deepEqual(qualificationModelArtifacts(`${model.repo}@${model.revision}`, [model]), []); + assert.equal(JSON.stringify(model), before); +}); + +test('canonical source pins close reporting associations without granting run or review evidence', () => { + const fixture = canonicalEvidenceFixture({ auxiliary: true }); + const before = structuredClone(fixture); + assert.equal( + canonicalWorkflowDeclaredModelRevision(fixture.manifest, fixture.graph, fixture.authoring), + `example/adapter@${'b'.repeat(40)} | example/base@${'a'.repeat(40)}`, + ); + assert.deepEqual(fixture, before); + const stale = structuredClone(fixture); + stale.graph.nodes[0].data.params.revision.value = 'main'; + assert.throws(() => canonicalWorkflowDeclaredModelRevision(stale.manifest, stale.graph, stale.authoring), /hash/); + stale.manifest.graphHash = canonicalJsonHash(stale.graph); + stale.authoring.canonicalGraph.sha256 = stale.manifest.graphHash; + stale.authoring.defaultsPlan.sourceGraphSha256 = stale.manifest.graphHash; + assert.throws( + () => canonicalWorkflowDeclaredModelRevision(stale.manifest, stale.graph, stale.authoring), + /immutable model pin/, + ); +}); + +test('canonical model file pins bind exact bytes to their declared repository', () => { + const fixture = () => { + const f = canonicalEvidenceFixture(); + f.graph.nodes[0].data.params.model_id.value = { + source: 'hub', + value: 'example/base/weights/model.safetensors', + revision: 'a'.repeat(40), + sha256: 'c'.repeat(64), + byteSize: 1024, + }; + return f; + }; + const resolve = (f) => { + f.manifest.graphHash = canonicalJsonHash(f.graph); + f.authoring.canonicalGraph.sha256 = f.manifest.graphHash; + f.authoring.defaultsPlan.sourceGraphSha256 = f.manifest.graphHash; + return canonicalWorkflowDeclaredModelRevision(f.manifest, f.graph, f.authoring); + }; + assert.equal(resolve(fixture()), `example/base@${'a'.repeat(40)}`); + for (const change of [ + (v) => { + delete v.sha256; + }, + (v) => { + v.byteSize = 0; + }, + (v) => { + v.revision = 'main'; + }, + (v) => { + v.value = 'example/base/../model.safetensors'; + }, + (v) => { + v.value = 'other/repository/model.safetensors'; + }, + ]) { + const f = fixture(); + change(f.graph.nodes[0].data.params.model_id.value); + assert.throws(() => resolve(f)); + } +}); + +test('qualification model artifacts reject malformed, mutable and conflicting pins without inventing repositories', () => { + const pin = `Example/model@${'a'.repeat(40)}`; + assert.deepEqual(qualificationModelArtifacts(), []); + assert.deepEqual(qualificationModelArtifacts(`${pin} | ${pin}`), [ + { repo: 'Example/model', revision: 'a'.repeat(40), role: 'qualification_model' }, + ]); + for (const invalid of [ + '', + 'Example/model@main', + `${pin} | `, + `../model@${'a'.repeat(40)}`, + `${pin} | Example/model@${'b'.repeat(40)}`, + Array(65).fill(pin).join(' | '), + {}, + ]) { + assert.throws(() => qualificationModelArtifacts(invalid)); + } +}); + +test('reviewed experimental recipes retain their tier and require an exact named association', () => { + const declaration = { + id: 'reviewed_edit', + reason: 'Exact reviewed composition', + experimentalRecipe: { modelType: 'ExamplePipeline', mode: 'edit_image', runtimeProfileId: 'reviewed-provider-v1' }, + }; + const policy = { schemaVersion: 1, format: 'modiff.canonical-template-variants.v1', templates: [declaration] }; + const record = { + id: 'ExamplePipeline:edit_image:reviewed_edit', + modelType: 'ExamplePipeline', + mode: 'edit_image', + sourceTemplateId: 'reviewed_edit', + variant: 'template-recipe', + supportTier: 'experimental', + graphPath: 'experimental/example/edit.json', + experimentalRecipe: declaration.experimentalRecipe, + }; + assert.deepEqual(selectReviewedExperimentalWorkflows([record], policy), [record]); + assert.equal(record.supportTier, 'experimental'); + assert.deepEqual( + selectReviewedExperimentalWorkflows( + [ + { + ...record, + experimentalRecipe: { + runtimeProfileId: 'reviewed-provider-v1', + mode: 'edit_image', + modelType: 'ExamplePipeline', + }, + }, + ], + policy, + ).map((row) => row.id), + [record.id], + ); + assert.deepEqual(selectReviewedExperimentalWorkflows([record], { ...policy, templates: [] }), []); + for (const patch of [ + { id: 'ExamplePipeline:edit_image' }, + { modelType: 'OtherPipeline' }, + { mode: 'text_to_image' }, + { supportTier: 'supported' }, + { graphPath: 'studio/example/edit.json' }, + { graphPath: 'experimental/../outside.json' }, + { graphPath: 'experimental/example/../../outside.json' }, + { graphPath: 'experimental/example/%2e%2e.json' }, + { graphPath: 'experimental/example/edit.json/extra' }, + { experimentalRecipe: { ...declaration.experimentalRecipe, runtimeProfileId: 'other-provider' } }, + ]) + assert.throws(() => selectReviewedExperimentalWorkflows([{ ...record, ...patch }], policy), /experimental/i); + assert.throws(() => selectReviewedExperimentalWorkflows([record, record], policy), /ambiguous/i); +}); + +test('experimental recipe declarations reject missing, unknown and malformed authority', () => { + const declaration = { id: 'reviewed_edit', reason: 'Reviewed composition' }; + const policy = { schemaVersion: 1, format: 'modiff.canonical-template-variants.v1', templates: [] }; + for (const experimentalRecipe of [ + null, + {}, + { modelType: 'ExamplePipeline', mode: 'edit_image' }, + { modelType: 'ExamplePipeline', mode: '../edit', runtimeProfileId: 'provider' }, + { modelType: 'ExamplePipeline', mode: 'edit_image', runtimeProfileId: 'provider', autoEligible: true }, + ]) + assert.throws( + () => canonicalWorkflowVariantTemplateIds({ ...policy, templates: [{ ...declaration, experimentalRecipe }] }), + /experimental/i, + ); +}); + +test('canonical variant generation includes reviewed exact recipes without replacing the default pair', () => { + const templates = [ + { id: 'default', category: 'generation', modelType: 'Example', mode: 'text_to_image' }, + { id: 'theme', category: 'lora', modelType: 'Example', mode: 'text_to_image' }, + { id: 'finish', category: 'upscale', modelType: 'Example', mode: 'text_to_image' }, + { id: 'sequence', category: 'video_generation', modelType: 'Video', mode: 'text_to_video' }, + ]; + assert.deepEqual( + selectCanonicalWorkflowVariantTemplates(templates, ['finish', 'sequence']).map((row) => row.id), + ['theme', 'finish', 'sequence'], + ); + assert.deepEqual( + selectCanonicalWorkflowVariantTemplates(templates, ['finish', 'sequence'], { requestedTemplateId: 'finish' }), + [templates[2]], + ); + const records = [ + { id: 'Example:text_to_image', sourceTemplateId: 'finish', modelType: 'Example', mode: 'text_to_image' }, + { + id: 'Example:text_to_image:finish', + sourceTemplateId: 'finish', + modelType: 'Example', + mode: 'text_to_image', + variant: 'template-recipe', + }, + { + id: 'Example:text_to_image:theme', + sourceTemplateId: 'theme', + modelType: 'Example', + mode: 'text_to_image', + variant: 'lora-theme', + }, + { id: 'Video:text_to_video', sourceTemplateId: 'default-video', modelType: 'Video', mode: 'text_to_video' }, + ]; + const capabilities = [ + { modelType: 'Example', runnableModes: ['text_to_image'] }, + { modelType: 'Video', runnableModes: ['text_to_video'] }, + ]; + assert.deepEqual(retainUnselectedCurrentWorkflowRecords(records, capabilities, null, 'finish'), [ + records[0], + records[2], + records[3], + ]); +}); + +test('canonical variant scope rejects unknown, malformed and ambiguous declarations before mutation', () => { + const policy = { + schemaVersion: 1, + format: 'modiff.canonical-template-variants.v1', + templates: [{ id: 'finish', reason: 'Pinned finishing recipe' }], + }; + assert.deepEqual(canonicalWorkflowVariantTemplateIds(policy), ['finish']); + assert.throws( + () => canonicalWorkflowVariantTemplateIds({ ...policy, templates: [policy.templates[0], policy.templates[0]] }), + /duplicated/, + ); + for (const id of ['../finish', 'finish/else', '', 'x'.repeat(129)]) + assert.throws( + () => canonicalWorkflowVariantTemplateIds({ ...policy, templates: [{ id, reason: 'reviewed' }] }), + /invalid/, + ); + const templates = [{ id: 'finish', category: 'upscale', modelType: 'Example', mode: 'text_to_image' }]; + assert.throws(() => selectCanonicalWorkflowVariantTemplates(templates, ['missing']), /missing or ambiguous/); + assert.throws(() => selectCanonicalWorkflowVariantTemplates([...templates, ...templates], ['finish']), /ambiguous/); + assert.throws( + () => selectCanonicalWorkflowVariantTemplates(templates, [], { requestedTemplateId: 'finish' }), + /no reviewed/, + ); + assert.deepEqual(parseCanonicalWorkflowGenerationScope(['--template=finish']), { + requestedPair: null, + requestedTemplateId: 'finish', + }); + assert.deepEqual(parseCanonicalWorkflowGenerationScope(['--pair=Example|text_to_image']), { + requestedPair: 'Example|text_to_image', + requestedTemplateId: null, + }); + for (const args of [ + ['--template=../finish'], + ['--template=finish', '--template=finish'], + ['--unknown'], + ['--template=finish', '--pair=Example|text_to_image'], + ]) + assert.throws(() => parseCanonicalWorkflowGenerationScope(args), /scope/); +}); + +test('one named canonical recipe does not require unrelated new backend families to have Studio skeletons', () => { + const selected = { modelType: 'Example', runnableModes: ['text_to_image', 'unmapped_task'] }; + const unrelated = { modelType: 'NewUpstreamFamily', runnableModes: ['unmapped_task'] }; + const templates = [{ id: 'finish', category: 'upscale', modelType: 'Example', mode: 'text_to_image' }]; + const scope = { requestedPair: null, requestedTemplateId: 'finish' }; + assert.deepEqual(selectCanonicalWorkflowCapabilities([selected, unrelated], templates, ['finish'], scope), [ + { ...selected, runnableModes: ['text_to_image'] }, + ]); + assert.deepEqual(selected.runnableModes, ['text_to_image', 'unmapped_task']); + assert.throws( + () => selectCanonicalWorkflowCapabilities([unrelated], templates, ['finish'], scope), + /not uniquely runnable/, + ); + assert.throws( + () => selectCanonicalWorkflowCapabilities([selected, selected], templates, ['finish'], scope), + /not uniquely runnable/, + ); +}); + +test('current retained receipts win same-time Gallery projections without overriding newer evidence', () => { + const direct = { + candidate: { capturedAt: '2026-11-12T02:00:00.000Z', provenancePath: 'original.json' }, + assessment: { matches: true, status: 'current' }, + }; + const gallery = { + candidate: { capturedAt: direct.candidate.capturedAt, provenancePath: '/template-gallery/public.json' }, + assessment: { matches: true, status: 'legacy_node_contract_match' }, + }; + const stale = { + candidate: { capturedAt: '2026-11-14T02:00:00.000Z' }, + assessment: { matches: false, status: 'stale' }, + }; + const input = [direct, gallery, stale]; + assert.equal(selectCurrentHistoricalEvidence(input), direct); + assert.deepEqual(input, [direct, gallery, stale]); + const newer = { ...gallery, candidate: { ...gallery.candidate, capturedAt: '2026-11-13T02:00:00.000Z' } }; + assert.equal(selectCurrentHistoricalEvidence([direct, newer]), newer); + assert.equal(selectCurrentHistoricalEvidence([stale]), undefined); +}); + +test('release baseline reader binds managed Gallery bundles and direct proofs to the original receipt', (t) => { + const root = mkdtempSync(join(tmpdir(), 'modiff-release-baseline-')); + t.after(() => { + assert.equal(resolve(root, '..'), resolve(tmpdir())); + rmSync(root, { recursive: true, force: true }); + }); + const clientRoot = join(root, 'client'); + const backendRoot = join(root, 'backend'); + const provenance = { + schemaVersion: 2, + format: 'modiff.live-proof.provenance.v2', + template: { id: 'baseline-template' }, + taskId: 'original-task', + graphHash: 'original-graph', + modelRevision: `owner/model@${'a'.repeat(40)}`, + runtimeFingerprint: 'original-runtime', + mediaHash: 'original-output', + execution: { resourceCandidateId: 'original-candidate', elapsedSeconds: 12, peakMemoryBytes: 345 }, + }; + const receipt = { + templateId: provenance.template.id, + taskId: provenance.taskId, + graphHash: provenance.graphHash, + modelRevision: provenance.modelRevision, + runtimeFingerprint: provenance.runtimeFingerprint, + outputHash: provenance.mediaHash, + resourceCandidateId: provenance.execution.resourceCandidateId, + executionDurationSeconds: provenance.execution.elapsedSeconds, + peakMemoryBytes: provenance.execution.peakMemoryBytes, + }; + const bundle = { + schemaVersion: 1, + format: 'modiff.gallery.reviewed-provenance.v1', + templateId: receipt.templateId, + originalCapture: { _native: true, Alpha: 'retained', alpha: 'retained' }, + run: provenance, + }; + const publicPath = '/template-gallery/reviews/baseline.json'; + const write = (filename, body) => { + mkdirSync(resolve(filename, '..'), { recursive: true }); + writeFileSync(filename, JSON.stringify(body) + '\n'); + }; + const publicReceipt = { + ...receipt, + provenancePath: publicPath, + provenanceHash: sha256Value('canonical-json', bundle), + }; + const backendPublic = join(backendRoot, 'web', publicPath.slice(1)); + write(backendPublic, bundle); + const load = (row = publicReceipt) => readReleaseRunProvenance({ clientRoot, backendRoot, receipt: row }); + assert.deepEqual(load(), provenance, 'backend-owned Gallery cache is supported'); + const clientPublic = join(clientRoot, 'public', publicPath.slice(1)); + write(clientPublic, bundle); + assert.deepEqual(load(), provenance, 'client Gallery cache is supported'); + write(clientPublic, { ...bundle, run: { ...provenance, taskId: 'different-task' } }); + assert.throws(() => load(), /hash differs/, 'do not hide a corrupt preferred cache with another copy'); + assert.throws( + () => + load({ + ...publicReceipt, + provenanceHash: sha256Value('canonical-json', JSON.parse(readFileSync(clientPublic, 'utf8'))), + }), + /taskId differs/, + ); + write(clientPublic, bundle); + for (const field of Object.keys(receipt)) { + const changed = { ...publicReceipt, [field]: 'different' }; + assert.throws(() => load(changed), new RegExp(`${field} differs`), field); + } + assert.throws(() => load({ ...publicReceipt, provenanceHash: undefined }), /hash differs/); + const directPath = 'data/qualification/release/proof.json'; + const directFile = join(backendRoot, directPath); + write(directFile, provenance); + const directReceipt = { + ...receipt, + provenancePath: directPath, + provenanceHash: `sha256:${createHash('sha256').update(readFileSync(directFile)).digest('hex')}`, + }; + assert.deepEqual(load(directReceipt), provenance); + write(directFile, { ...provenance, mediaHash: 'different' }); + assert.throws(() => load(directReceipt), /hash differs/); + const outside = join(root, 'outside'); + const escaped = join(outside, 'proof.json'); + write(escaped, provenance); + assert.throws(() => load({ ...directReceipt, provenancePath: escaped }), /escapes its managed root/); + const link = join(clientRoot, 'public', 'template-gallery', 'linked'); + symlinkSync(outside, link, 'junction'); + assert.throws( + () => load({ ...directReceipt, provenancePath: '/template-gallery/linked/proof.json' }), + /symbolic links/, + ); + const emptyRun = { ...bundle, run: undefined, runs: [provenance] }; + write(clientPublic, emptyRun); + assert.throws( + () => load({ ...publicReceipt, provenanceHash: sha256Value('canonical-json', emptyRun) }), + /unambiguous original v2 run/, + ); + writeFileSync(clientPublic, Buffer.alloc(16 * 1024 ** 2 + 1, 32)); + assert.throws(() => load(), /bounded JSON file/); +}); function graphHash(graph) { return canonicalJsonHash(graph); @@ -27,6 +844,47 @@ test('Gallery evidence lookup includes the backend-owned runtime media tree', () ); }); +test('resource requirements retain the selected execution identity separately from the catalog family', () => { + assert.equal( + templateResourceExecutionModelType({ + modelType: 'AudioDisplay', + executionSelection: { pipelineClass: 'ActualAudioPipeline' }, + }), + 'ActualAudioPipeline', + ); + assert.equal(templateResourceExecutionModelType({ modelType: 'LegacyPipeline' }), 'LegacyPipeline'); + assert.equal( + templateResourceExecutionModelType({ modelType: 'LegacyPipeline', executionSelection: { pipelineClass: '' } }), + 'LegacyPipeline', + ); +}); + +test('execution evidence cannot approve a different recipe or publicly withheld Gallery media', () => { + const entry = { + qualityReviewStatus: 'approved_reviewed', + outputPath: '/template-gallery/result.webp', + thumbnailPath: '/template-gallery/result.card.webp', + }; + assert.equal(assessGalleryReleaseApproval(entry, { matchesCurrentRecipe: true }).approved, true); + const historical = assessGalleryReleaseApproval(entry, { matchesCurrentRecipe: false }); + assert.equal(historical.approved, false); + assert.deepEqual(historical.reasons, ['current_recipe_example']); + for (const path of [entry.outputPath, entry.thumbnailPath]) { + const held = assessGalleryReleaseApproval(entry, { + matchesCurrentRecipe: true, + unavailableAssets: [path.slice(1)], + }); + assert.equal(held.approved, false); + assert.deepEqual(held.reasons, ['unavailable_asset:' + path]); + } + assert.equal( + assessGalleryReleaseApproval({ ...entry, qualityReviewStatus: 'approved_proposed' }, { matchesCurrentRecipe: true }) + .approved, + false, + ); + assert.equal(assessGalleryReleaseApproval(undefined, { matchesCurrentRecipe: false }).approved, false); +}); + test('canonical workflow identity comes from current graph bytes and historical evidence must match it', () => { const graph = { nodes: [ @@ -207,3 +1065,873 @@ test('legacy Qwen evidence cannot restore a deleted backend driver into a curren assert.ok(assessment.missingBackendNodes.some((nodeKey) => nodeKey.startsWith('modules.QwenImage.'))); } }); + +// Synthetic protocol fixtures exercise metadata validation only. They never +// execute weights or confer qualification on a real catalog row. +function canonicalEvidenceFixture({ auxiliary = false, auto = false } = {}) { + const revision = 'a'.repeat(40); + const params = { + model_id: { value: { source: 'hub', value: 'example/base' } }, + revision: { value: revision }, + dtype: { value: 'bfloat16' }, + offload_mode: { value: 'model_cpu' }, + auto_offload: { value: true }, + }; + const api = { + nodes: { + loader: { module: 'modules.DiffusersImage', action: 'LoadPipeline', params }, + generate: { + module: 'modules.DiffusersImage', + action: 'Generate', + params: { + pipeline: { sourceId: 'loader', sourceKey: 'pipeline' }, + prompt: { value: 'Exact canonical prompt' }, + width: { value: 512 }, + height: { value: 512 }, + steps: { value: 16 }, + seed: { value: 7 }, + }, + }, + }, + paths: [['loader', 'generate']], + runtimeHints: { + modelType: 'ExamplePipeline', + dtype: 'bfloat16', + offloadMode: 'model_cpu', + quantizationMode: 'none', + autoOffload: true, + ...(auto + ? { resourceMode: 'auto', resolvedResourceMode: 'auto', autoResourceCandidateId: 'synthetic-auto-candidate' } + : {}), + }, + }; + if (auxiliary) { + api.nodes.adapter = { + module: 'modules.ModularDiffusers', + action: 'Lora', + params: { + model: { value: { source: 'hub', value: 'example/adapter' } }, + revision: { value: 'b'.repeat(40) }, + scale: { value: 0.75 }, + }, + }; + api.paths = [['adapter', 'loader', 'generate']]; + } + const graph = { + nodes: Object.entries(api.nodes).map(([id, node]) => ({ id, data: structuredClone(node) })), + edges: [], + }; + const manifest = { + id: 'ExamplePipeline:text_to_image', + modelType: 'ExamplePipeline', + mode: 'text_to_image', + sourceTemplateId: 'task-template:example:text-to-image:v1', + graphPath: 'studio/example.json', + graphHash: canonicalJsonHash(graph), + requiredArtifacts: ['example/base', ...(auxiliary ? ['example/adapter'] : [])], + }; + const authoring = { + id: 'template-authoring:ExamplePipeline:text_to_image', + canonicalWorkflowId: manifest.id, + modelType: manifest.modelType, + mode: manifest.mode, + canonicalGraph: { path: manifest.graphPath, sha256: manifest.graphHash }, + defaultsPlan: { sourceGraphSha256: manifest.graphHash }, + artifactPlan: { requiredArtifacts: manifest.requiredArtifacts, componentRequirements: [] }, + outputPlan: { minimumAssetCount: 1, mediaKinds: ['image'] }, + }; + const target = canonicalWorkflowAuthoringContract(manifest, graph, authoring); + const files = [{ path: 'main.py', sha256: 'c'.repeat(64) }]; + const gitCommit = 'd'.repeat(40); + const fingerprint = sha256Value('backend-source-v1', { gitCommit, files }); + const backendSource = { fingerprint, gitCommit, files }; + const runtime = { + fingerprint: 'sha256:actual-runtime', + packages: { torch: '2.9.1' }, + torch: { version: '2.9.1' }, + work_dir: '/synthetic/work', + data_dir: '/synthetic/data', + backendSource: { + schemaVersion: 1, + claim: 'process_start_backend_source_identity', + fingerprint, + gitCommit, + fileCount: 1, + capturedAt: '2026-10-27T00:00:00.000Z', + }, + }; + const form = { modelType: manifest.modelType, mode: manifest.mode, prompt: 'Exact canonical prompt', seed: 7 }; + const task = { + task_id: 'synthetic-task', + status: 'completed', + attempt_index: 0, + started_at: 100, + completed_at: 112.5, + runtimeFingerprint: runtime, + runtimeMeasurement: { elapsedSeconds: 12.5, processRssBytes: 4096 }, + resourceCandidateId: auto ? 'synthetic-auto-candidate' : null, + }; + const output = { + id: 'synthetic-output', + taskId: task.task_id, + clientRunId: 'synthetic-run', + runInputHash: 'run_synthetic', + workflowTabId: 'synthetic-owned', + attemptIndex: 0, + nodeId: 'generate', + fieldKey: 'image', + formSnapshot: form, + graphSnapshot: graph, + apiGraphSnapshot: structuredClone(api), + mediaHash: 'sha256:bytes:synthetic', + mediaItems: [], + resolvedExecutionInputs: { + source: 'backend-execution', + taskId: task.task_id, + attemptIndex: 0, + truncated: false, + uncapturedNodeIds: [], + nodes: Object.entries(api.nodes).map(([nodeId, node]) => ({ + nodeId, + module: node.module, + action: node.action, + fields: Object.fromEntries( + Object.entries(node.params) + .filter(([, p]) => Object.hasOwn(p, 'value')) + .map(([key, p]) => [ + key, + { source: 'literal', value: p.value?.source === 'hub' ? p.value.value : p.value }, + ]), + ), + })), + }, + }; + const creator = { + manifest: { packageType: 'modiff-workflow-share' }, + metadata: { studio: structuredClone(form) }, + graph, + apiGraph: structuredClone(api), + }; + const outputPackage = { + manifest: { packageType: 'modiff-output-package' }, + apiGraph: structuredClone(api), + latestOutput: output, + }; + const modelIdentities = target.modelSet.map(({ repoId, revision: selectedRevision }) => ({ + repoId, + selectedRevision, + modelRevision: `${repoId}@${selectedRevision}`, + fingerprint: `sha256:model:${repoId}`, + revisions: [], + })); + const provenance = createRunProvenance({ + templateId: target.authoringId, + lockedSettings: form, + promptSettingsHash: sha256Value('canonical-workflow-settings-v1', form), + catalogTemplateLockHash: target.authoringHash, + resolvedTemplateLockHash: sha256Value('canonical-workflow-execution-v1', { + authoringHash: target.authoringHash, + graphHash: canonicalGraphIdentity(api).hash, + }), + apiGraph: api, + nodesPayload: { nodes: {} }, + modelIdentities, + runtimeFingerprint: runtime, + backendSource, + outputAnalysis: { + analyses: [ + { + mediaType: 'image', + width: 512, + height: 512, + byteSize: 99, + encodedSha256: 'sha256:synthetic', + decodedSha256: 'sha256:decoded:synthetic', + }, + ], + }, + executedOutput: output, + executionReceipt: task, + taskId: task.task_id, + capturedAt: new Date(task.completed_at * 1000).toISOString(), + }); + return { + target, + expectedApiGraph: api, + creator, + outputPackage, + run: { workflow_id: output.workflowTabId, task, outputs: [structuredClone(output)] }, + provenance, + manifest, + graph, + authoring, + }; +} + +test('standalone canonical receipts bind real authoring, exact execution and full model sets without granting approval', () => { + for (const auxiliary of [false, true]) { + const fixture = canonicalEvidenceFixture({ auxiliary }); + const receipt = validateCanonicalWorkflowEvidence(fixture); + assert.equal(receipt.workflowId, fixture.manifest.id); + assert.equal(receipt.modelSet.length, auxiliary ? 2 : 1); + assert.equal(receipt.taskId, 'synthetic-task'); + assert.deepEqual(receipt.qualificationClaims, { + publicTemplate: false, + qualityApproved: false, + rightsApproved: false, + hardwareQualified: false, + }); + } +}); + +async function builtinEvidenceFixture(mode = 'data_conversion') { + const backend = resolve(process.env.MODIFF_BACKEND_DIR || '../MoDiff'); + const read = (file) => JSON.parse(readFileSync(join(backend, file), 'utf8')); + const manifest = read('data/workflow-library-manifest.json').workflows.find( + (row) => row.id === `BuiltinDataOperation:${mode}`, + ); + const graph = read(`data/graphs/${manifest.graphPath}`); + const authoring = read('data/template-authoring-specs.v1.json').specifications.find( + (row) => row.canonicalWorkflowId === manifest.id, + ); + const target = builtinDataQualificationTarget(manifest, graph, authoring); + const [expectedApiGraph] = await exportCanonicalWorkflowGraphs(resolve('.'), [target.boundGraph]); + const task = canonicalEvidenceFixture().run.task; + task.started_at = Date.parse('2026-10-27T00:00:01.000Z') / 1000; + task.completed_at = task.started_at + 12.5; + task.sid = expectedApiGraph.sid; + task.runtimeMeasurement = { + backend: 'cpu', + device: 'cpu:0', + peakMeasurementVersion: 2, + elapsedSeconds: 12.5, + processRssBytes: 4096, + }; + const sourceInventory = { + gitCommit: 'd'.repeat(40), + files: [{ path: 'main.py', sha256: 'c'.repeat(64) }], + fingerprint: task.runtimeFingerprint.backendSource.fingerprint, + }; + const expected = { + data_conversion: { + project: 'footbridge repair', + shot_count: 5, + approved: false, + tags: ['documentary', 'community'], + }, + graph_utility: 'Primary branch: the repaired footbridge is ready for the morning crossing.', + text_select: 'Wide establishing shot at dawn', + }[mode]; + const text = typeof expected === 'string' ? expected : JSON.stringify(expected, null, 2); + const exportText = JSON.stringify(expected, null, 2); + const messages = Object.entries(expectedApiGraph.nodes).map(([node, value]) => ({ + type: 'executed', + task_id: task.task_id, + attempt_index: 0, + node, + name: `${value.module}.${value.action}`, + status: 'succeeded', + })); + const outputs = [], + durableOutputs = []; + for (const node of [target.roles.DataViewer, target.roles.ExportData]) { + const value = [node === target.roles.ExportData ? exportText : text]; + const bytes = Buffer.from(JSON.stringify(value)); + const backendPath = `@data/synthetic-${node}.txt`; + const consumed = { + source: 'backend-execution', + taskId: task.task_id, + attemptIndex: 0, + nodeId: node, + truncated: false, + uncapturedNodeIds: [], + nodes: [ + target.roles.ProcessText, + target.roles.DataViewer, + ...(node === target.roles.ExportData ? [target.roles.ExportData] : []), + ].map((nodeId) => ({ + nodeId, + module: expectedApiGraph.nodes[nodeId].module, + action: expectedApiGraph.nodes[nodeId].action, + fields: + nodeId === target.roles.ProcessText + ? { pipeline_class: { value: 'BuiltinDataOperationV1', source: 'literal' } } + : {}, + omittedFields: {}, + })), + }; + outputs.push({ + id: node, + taskId: task.task_id, + attemptIndex: 0, + nodeId: node, + value, + resolvedExecutionInputs: consumed, + mediaItems: [ + { + backendPath, + taskId: task.task_id, + attemptIndex: 0, + byteSize: bytes.length, + mediaHash: `sha256:bytes:${createHash('sha256').update(bytes).digest('hex')}`, + }, + ], + }); + messages.push({ + type: 'update_value', + task_id: task.task_id, + attempt_index: 0, + node, + key: 'preview', + backend_persisted: true, + value, + output_id: node, + runtimeFingerprint: task.runtimeFingerprint.fingerprint, + resolved_execution_inputs: consumed, + }); + durableOutputs.push({ nodeId: node, backendPath, bytes }); + } + messages.push({ + type: 'graph_completed', + task_id: task.task_id, + runtimeFingerprint: task.runtimeFingerprint, + runtimeMeasurement: task.runtimeMeasurement, + runtimeHints: null, + resourceRetryHistory: [], + }); + return { + target, + expectedApiGraph, + submittedApiGraph: structuredClone(expectedApiGraph), + acceptedGraph: { taskId: task.task_id, graph: structuredClone(expectedApiGraph) }, + run: { task, outputs }, + messages, + sourceBefore: { identity: structuredClone(task.runtimeFingerprint.backendSource) }, + sourceAfter: { identity: { ...task.runtimeFingerprint.backendSource, capturedAt: '2026-10-27T00:00:20.000Z' } }, + sourceInventory, + exportedBytes: Buffer.from(exportText + '\n'), + durableOutputs, + manifest, + graph, + authoring, + }; +} + +test('model-free canonical data proofs bind all three exact deterministic results without model or publication claims', async () => { + for (const mode of ['data_conversion', 'graph_utility', 'text_select']) { + const f = await builtinEvidenceFixture(mode); + const original = JSON.stringify(f.graph); + assert.throws( + () => canonicalWorkflowAuthoringContract(f.manifest, f.graph, f.authoring), + /builtin qualification is unsupported/, + ); + const receipt = validateBuiltinDataExecution(f); + assert.equal(receipt.proofKind, 'real_backend_deterministic_data'); + assert.equal(receipt.deterministicCorrectness, 'verified_exact_result'); + assert.deepEqual(receipt.modelSet, []); + assert.equal(receipt.resourceCandidateId, null); + assert.ok(Object.values(receipt.qualificationClaims).every((value) => value === false)); + assert.equal(receipt.observationLimits.fullConsumedFieldAccounting, false); + assert.equal(JSON.stringify(f.graph), original, 'Canonical source/defaults must not be edited'); + } +}); + +test('deterministic data proofs reject graph, authority, task, output and source substitutions', async (t) => { + const original = await builtinEvidenceFixture(); + const cases = [ + [ + 'changed selector', + (f) => { + f.submittedApiGraph.nodes[f.target.roles.ProcessText].params.index.value = 1; + }, + ], + [ + 'runtime authority', + (f) => { + f.submittedApiGraph.runtimeHints = { resourceMode: 'auto' }; + }, + ], + [ + 'service authority', + (f) => { + f.acceptedGraph.graph.servicePackage = {}; + }, + ], + [ + 'failed task', + (f) => { + f.run.task.status = 'failed'; + }, + ], + [ + 'fallback', + (f) => { + f.run.task.attempt_index = 1; + }, + ], + [ + 'unrelated accepted graph', + (f) => { + f.acceptedGraph.taskId = 'other'; + }, + ], + [ + 'cached execution', + (f) => { + f.messages.find((row) => row.type === 'executed').status = 'cached'; + }, + ], + [ + 'missing execution', + (f) => { + f.messages.splice(0, 1); + }, + ], + [ + 'unrelated preview', + (f) => { + f.messages.find((row) => row.type === 'update_value').task_id = 'other'; + }, + ], + [ + 'unpersisted preview', + (f) => { + f.messages.find((row) => row.type === 'update_value').backend_persisted = false; + }, + ], + [ + 'wrong export', + (f) => { + f.exportedBytes = Buffer.from('{}\n'); + }, + ], + [ + 'corrupt durable file', + (f) => { + f.durableOutputs[0].bytes = Buffer.from('[]'); + }, + ], + [ + 'missing durable file', + (f) => { + f.durableOutputs.pop(); + }, + ], + [ + 'different source', + (f) => { + f.sourceInventory.files[0].sha256 = 'a'.repeat(64); + }, + ], + [ + 'changed before source', + (f) => { + f.sourceBefore.identity.fingerprint = 'sha256:changed'; + }, + ], + [ + 'missing native measurement', + (f) => { + delete f.run.task.runtimeMeasurement.processRssBytes; + }, + ], + [ + 'uncaptured owner', + (f) => { + f.messages.find((row) => row.type === 'update_value').resolved_execution_inputs.uncapturedNodeIds = ['absent']; + }, + ], + ]; + for (const [name, change] of cases) + await t.test(name, () => { + const f = structuredClone(original); + f.exportedBytes = Buffer.from(f.exportedBytes); + f.durableOutputs.forEach((row) => { + row.bytes = Buffer.from(row.bytes); + }); + change(f); + assert.throws(() => validateBuiltinDataExecution(f)); + }); +}); + +test('builtin data admission rejects model/file-backed variants and stale authoring before execution', async () => { + const original = await builtinEvidenceFixture(); + for (const change of [ + (f) => { + f.manifest.modelType = 'BuiltinImageOperation'; + }, + (f) => { + f.manifest.requiredArtifacts.push('example/model'); + }, + (f) => { + f.authoring.inputPlan.items.push({ path: '@data/input.json' }); + }, + (f) => { + f.authoring.canonicalGraph.sha256 = 'stale'; + }, + (f) => { + f.authoring.promptPlan.prompt = ''; + }, + ]) { + const f = structuredClone(original); + change(f); + assert.throws(() => builtinDataQualificationTarget(f.manifest, f.graph, f.authoring)); + } +}); + +test('the normal canonical recorder retains deterministic originals and rejects file or descriptor substitution', async () => { + const f = await builtinEvidenceFixture(); + const root = mkdtempSync(join(tmpdir(), 'modiff-builtin-canonical-')); + try { + const backendRoot = join(root, 'backend'); + const evidenceRoot = join(root, 'originals'); + mkdirSync(join(backendRoot, 'data/graphs/studio/builtin-data-operation'), { recursive: true }); + mkdirSync(evidenceRoot); + const write = (path, value) => writeFileSync(path, JSON.stringify(value)); + write(join(backendRoot, 'data/workflow-library-manifest.json'), { workflows: [f.manifest] }); + write(join(backendRoot, 'data/template-authoring-specs.v1.json'), { specifications: [f.authoring] }); + write(join(backendRoot, 'data/graphs', f.manifest.graphPath), f.graph); + const retain = (path, value, raw = false) => { + const bytes = raw ? value : Buffer.from(JSON.stringify(value)); + writeFileSync(join(evidenceRoot, path), bytes); + return { path, bytes: bytes.length, sha256: createHash('sha256').update(bytes).digest('hex') }; + }; + const evidence = { + schemaVersion: 1, + format: 'modiff.canonical-builtin-data-evidence.v1', + workflowId: f.manifest.id, + submittedApiGraph: retain('submitted.json', f.submittedApiGraph), + acceptedGraph: retain('accepted.json', f.acceptedGraph), + runDetail: retain('run.json', f.run), + messages: retain('messages.json', f.messages), + sourceBefore: retain('before.json', f.sourceBefore), + sourceAfter: retain('after.json', f.sourceAfter), + sourceInventory: retain('source.json', f.sourceInventory), + exportedData: retain('data.json', f.exportedBytes, true), + durableOutputs: f.durableOutputs.map((row, i) => ({ + nodeId: row.nodeId, + backendPath: row.backendPath, + file: retain(`output-${i}.txt`, row.bytes, true), + })), + }; + const evidencePath = join(evidenceRoot, 'evidence.json'); + write(evidencePath, evidence); + const args = { clientRoot: resolve('.'), backendRoot, workflowId: f.manifest.id, evidencePath }; + const readback = await readCanonicalWorkflowEvidence(args); + assert.equal(readback.receipt.proofKind, 'real_backend_deterministic_data'); + const recorded = spawnSync(process.execPath, ['scripts/template-qualification.mjs', '--workflow', f.manifest.id], { + cwd: resolve('.'), + env: { ...process.env, MODIFF_BACKEND_DIR: backendRoot, MODIFF_CANONICAL_WORKFLOW_EVIDENCE: evidencePath }, + encoding: 'utf8', + timeout: 30000, + }); + assert.equal(recorded.status, 0, recorded.stderr); + const registry = JSON.parse( + readFileSync(join(backendRoot, 'data/qualification/release/canonical-workflow-run-receipts.v1.json')), + ); + assert.equal(registry.receipts.length, 1); + const receipt = registry.receipts[0]; + const retained = await readCanonicalWorkflowEvidence({ + ...args, + evidencePath: join(backendRoot, receipt.evidencePath), + }); + assert.deepEqual(retained.receipt, readback.receipt); + writeFileSync(join(evidenceRoot, 'data.json'), '{}'); + await assert.rejects(() => readCanonicalWorkflowEvidence(args), /size|hash|bytes/i); + writeFileSync(join(evidenceRoot, 'data.json'), f.exportedBytes); + write(evidencePath, { ...evidence, modelObservations: [] }); + await assert.rejects(() => readCanonicalWorkflowEvidence(args), /Unreviewed deterministic evidence fields/); + write(evidencePath, { ...evidence, exportedData: { ...evidence.exportedData, path: '../outside.json' } }); + await assert.rejects(() => readCanonicalWorkflowEvidence(args)); + } finally { + assert.equal(resolve(root, '..'), resolve(tmpdir())); + assert.ok(root.includes('modiff-builtin-canonical-')); + rmSync(root, { recursive: true, force: true }); + } +}); + +test('canonical Auto receipts join the actual task candidate and reject contradictory Expert candidates', async (t) => { + const accepted = canonicalEvidenceFixture({ auto: true }); + assert.equal(validateCanonicalWorkflowEvidence(accepted).resourceCandidateId, 'synthetic-auto-candidate'); + assert.equal(Object.hasOwn(accepted.run.task, 'runtimeHints'), false, 'Native task schema has no runtimeHints.'); + for (const [label, candidate] of [ + ['missing', undefined], + ['null', null], + ['different', 'another-native-candidate'], + ['empty', ''], + ]) { + await t.test(`Auto ${label} native candidate refuses`, () => { + const fixture = canonicalEvidenceFixture({ auto: true }); + if (candidate === undefined) delete fixture.run.task.resourceCandidateId; + else fixture.run.task.resourceCandidateId = candidate; + assert.throws(() => validateCanonicalWorkflowEvidence(fixture), /Native Auto resource candidate/); + }); + } + await t.test('Auto without a declared candidate refuses', () => { + const fixture = canonicalEvidenceFixture({ auto: true }); + delete fixture.outputPackage.latestOutput.apiGraphSnapshot.runtimeHints.autoResourceCandidateId; + delete fixture.outputPackage.apiGraph.runtimeHints.autoResourceCandidateId; + fixture.run.outputs[0] = structuredClone(fixture.outputPackage.latestOutput); + assert.throws(() => validateCanonicalWorkflowEvidence(fixture), /Auto resource candidate is missing/); + }); + for (const candidate of ['unexpected-native-candidate', '']) { + await t.test(`Expert nonnull native candidate ${JSON.stringify(candidate)} refuses`, () => { + const fixture = canonicalEvidenceFixture(); + fixture.run.task.resourceCandidateId = candidate; + assert.throws( + () => validateCanonicalWorkflowEvidence(fixture), + /Non-Auto task retains an Auto resource candidate/, + ); + }); + } + await t.test('Expert missing native candidate keeps measured graph-derived identity', () => { + const fixture = canonicalEvidenceFixture(); + delete fixture.run.task.resourceCandidateId; + assert.match(validateCanonicalWorkflowEvidence(fixture).resourceCandidateId, /^manual-resource-v1:/); + }); +}); + +test('standalone canonical source resolution rejects stale, ambiguous, builtin and unresolved declarations', () => { + const f = canonicalEvidenceFixture(); + const cases = [ + [ + 'stale graph', + (v) => { + v.manifest.graphHash = '0'.repeat(64); + }, + /graph hash/, + ], + [ + 'wrong authoring', + (v) => { + v.authoring.canonicalWorkflowId = 'other'; + }, + /authoring record/, + ], + [ + 'stale defaults', + (v) => { + v.authoring.defaultsPlan.sourceGraphSha256 = 'stale'; + }, + /defaults are stale/, + ], + [ + 'builtin', + (v) => { + v.manifest.requiredArtifacts = ['builtin://modiff/image-operations/v1']; + }, + /builtin qualification is unsupported/, + ], + [ + 'missing artifact', + (v) => { + v.authoring.artifactPlan.requiredArtifacts = []; + }, + /artifact set differs/, + ], + [ + 'mutable pin', + (v) => { + v.graph.nodes[0].data.params.revision.value = 'main'; + v.manifest.graphHash = canonicalJsonHash(v.graph); + v.authoring.canonicalGraph.sha256 = v.manifest.graphHash; + v.authoring.defaultsPlan.sourceGraphSha256 = v.manifest.graphHash; + }, + /immutable model pin/, + ], + [ + 'implicit component', + (v) => { + v.manifest.requiredArtifacts.push('example/hidden'); + v.authoring.artifactPlan.requiredArtifacts.push('example/hidden'); + }, + /Missing or ambiguous immutable model pin/, + ], + ]; + for (const [name, change, message] of cases) { + const value = structuredClone(f); + change(value); + assert.throws( + () => canonicalWorkflowAuthoringContract(value.manifest, value.graph, value.authoring), + message, + name, + ); + } +}); + +test('standalone canonical validation rejects unrelated, incomplete or drifted native evidence', () => { + const cases = [ + [ + 'task', + (f) => { + f.run.task.task_id = 'other'; + }, + /another task/, + ], + [ + 'failed', + (f) => { + f.run.task.status = 'failed'; + }, + /not completed/, + ], + [ + 'fallback', + (f) => { + f.run.task.attempt_index = 1; + }, + /Retry\/fallback/, + ], + [ + 'owner', + (f) => { + f.run.workflow_id = 'other'; + }, + /another workflow/, + ], + [ + 'raw output', + (f) => { + f.run.outputs = []; + }, + /uniquely present/, + ], + [ + 'input correlation', + (f) => { + f.run.outputs[0].runInputHash = 'other'; + }, + /runInputHash differs/, + ], + [ + 'form', + (f) => { + f.creator.metadata.studio.prompt = 'other'; + }, + /settings changed/, + ], + [ + 'default', + (f) => { + f.creator.apiGraph.nodes.generate.params.steps.value = 15; + }, + /defaults\/bindings differ/, + ], + [ + 'wire', + (f) => { + f.creator.apiGraph.nodes.generate.params.pipeline.sourceKey = 'other'; + }, + /defaults\/bindings differ/, + ], + [ + 'consumed field', + (f) => { + f.outputPackage.latestOutput.resolvedExecutionInputs.nodes[1].fields.width.value = 256; + f.run.outputs[0] = structuredClone(f.outputPackage.latestOutput); + }, + /Consumed field differs/, + ], + [ + 'consumed override', + (f) => { + f.outputPackage.latestOutput.resolvedExecutionInputs.nodes[1].fields.width = { source: 'override', value: 256 }; + f.run.outputs[0] = structuredClone(f.outputPackage.latestOutput); + }, + /overridden consumed scalar/, + ], + [ + 'consumed missing', + (f) => { + delete f.outputPackage.latestOutput.resolvedExecutionInputs.nodes[0].fields.model_id; + f.run.outputs[0] = structuredClone(f.outputPackage.latestOutput); + }, + /Consumed literal is missing/, + ], + [ + 'consumed omission', + (f) => { + f.outputPackage.latestOutput.resolvedExecutionInputs.nodes[0].omittedFields = { revision: 'oversize-string' }; + f.run.outputs[0] = structuredClone(f.outputPackage.latestOutput); + }, + /Consumed fields were omitted/, + ], + [ + 'consumed connected origin', + (f) => { + f.outputPackage.latestOutput.resolvedExecutionInputs.nodes[0].fields.revision = { + source: 'connected', + sourceNodeId: 'other', + sourcePortId: 'text', + value: 'a'.repeat(40), + }; + f.run.outputs[0] = structuredClone(f.outputPackage.latestOutput); + }, + /Connected or overridden/, + ], + [ + 'uncaptured', + (f) => { + f.outputPackage.latestOutput.resolvedExecutionInputs.uncapturedNodeIds = ['loader']; + f.run.outputs[0] = structuredClone(f.outputPackage.latestOutput); + }, + /incomplete/, + ], + [ + 'missing model', + (f) => { + f.target.modelSet.push({ repoId: 'example/missing', revision: 'e'.repeat(40) }); + }, + /Complete executed model set/, + ], + [ + 'source', + (f) => { + f.run.task.runtimeFingerprint.backendSource.gitCommit = 'f'.repeat(40); + }, + /source authority differs/, + ], + [ + 'runtime', + (f) => { + f.run.task.runtimeFingerprint = 'sha256:compact'; + }, + /Complete structured/, + ], + [ + 'resource recipe consumed identity', + (f) => { + f.outputPackage.latestOutput.apiGraphSnapshot.runtimeHints.offloadMode = 'none'; + f.outputPackage.apiGraph.runtimeHints.offloadMode = 'none'; + f.run.outputs[0] = structuredClone(f.outputPackage.latestOutput); + }, + /matching consumed offload_mode/, + ], + [ + 'memory', + (f) => { + f.run.task.runtimeMeasurement.processRssBytes = 0; + }, + /resource measurements differ/, + ], + [ + 'time', + (f) => { + f.run.task.completed_at += 1; + }, + /Completion time differs/, + ], + [ + 'blocker', + (f) => { + f.provenance.blockers.push('unqualified'); + }, + /retains blockers/, + ], + ]; + for (const [name, change, expected] of cases) { + const fixture = canonicalEvidenceFixture(); + change(fixture); + assert.throws(() => validateCanonicalWorkflowEvidence(fixture), expected, name); + } +}); diff --git a/scripts/release-evidence-paths.mjs b/scripts/release-evidence-paths.mjs index 85f0be10..2b08b8b5 100644 --- a/scripts/release-evidence-paths.mjs +++ b/scripts/release-evidence-paths.mjs @@ -1,5 +1,7 @@ -import { existsSync } from 'node:fs'; -import { relative, resolve } from 'node:path'; +import { existsSync, lstatSync, readFileSync, realpathSync } from 'node:fs'; +import { createHash } from 'node:crypto'; +import { isAbsolute, relative, resolve, sep } from 'node:path'; +import { sha256Value } from './live-proof-provenance.mjs'; function containedPath(root, publicPath) { const absoluteRoot = resolve(root); @@ -26,3 +28,75 @@ export function findGalleryEvidencePath(clientRoot, backendRoot, publicPath) { galleryEvidenceCandidates(clientRoot, backendRoot, publicPath).find((candidate) => existsSync(candidate)) ?? null ); } + +/** Read the exact retained baseline identified by a release receipt. A public + * Gallery path names a reviewed bundle, not an absolute operating-system path. + * Reading its original run does not supply absent native evidence. */ +export function readReleaseRunProvenance({ clientRoot, backendRoot, receipt }) { + const reference = receipt?.provenancePath; + if (typeof reference !== 'string' || !reference || reference.length > 1024) { + throw new Error('Locked-template baseline provenance path is missing or invalid.'); + } + const galleryPath = reference.startsWith('/template-gallery/'); + const candidates = galleryPath + ? galleryEvidenceCandidates(clientRoot, backendRoot, reference) + : [resolve(backendRoot, reference)]; + const index = candidates.findIndex((candidate) => existsSync(candidate)); + if (index < 0) throw new Error('Locked-template baseline provenance is missing.'); + const filename = candidates[index]; + const root = galleryPath + ? resolve(index === 0 ? clientRoot : backendRoot, index === 0 ? 'public' : 'web') + : resolve(backendRoot); + const within = relative(root, filename); + if (isAbsolute(within) || within === '..' || within.startsWith(`..${sep}`) || !within) { + throw new Error('Locked-template baseline provenance escapes its managed root.'); + } + let current = root; + for (const segment of within.split(sep)) { + current = resolve(current, segment); + if (lstatSync(current).isSymbolicLink()) throw new Error('Locked-template baseline cannot use symbolic links.'); + } + const actual = relative(realpathSync(root), realpathSync(filename)); + if (isAbsolute(actual) || actual === '..' || actual.startsWith(`..${sep}`)) { + throw new Error('Locked-template baseline provenance escapes its managed root.'); + } + const info = lstatSync(filename); + if (!info.isFile() || info.size <= 0 || info.size > 16 * 1024 ** 2) { + throw new Error('Locked-template baseline must be a bounded JSON file.'); + } + const bytes = readFileSync(filename); + const body = JSON.parse(bytes.toString('utf8')); + const expectedHash = receipt.provenanceHash; + const observedHash = /^sha256:canonical-json:[a-f0-9]{64}$/u.test(expectedHash ?? '') + ? sha256Value('canonical-json', body) + : `sha256:${createHash('sha256').update(bytes).digest('hex')}`; + if (typeof expectedHash !== 'string' || expectedHash !== observedHash) { + throw new Error('Locked-template baseline provenance hash differs from the release receipt.'); + } + const reviewedBundle = body?.schemaVersion === 1 && body?.format === 'modiff.gallery.reviewed-provenance.v1'; + const provenance = reviewedBundle ? body.run : body; + if ( + provenance?.format !== 'modiff.live-proof.provenance.v2' || + Number(provenance.schemaVersion) < 2 || + (reviewedBundle && body.templateId !== provenance.template?.id) + ) { + throw new Error('Locked-template baseline has no unambiguous original v2 run.'); + } + const fields = { + templateId: provenance.template?.id, + taskId: provenance.taskId, + graphHash: provenance.graphHash, + modelRevision: provenance.modelRevision, + runtimeFingerprint: provenance.runtimeFingerprint, + resourceCandidateId: provenance.execution?.resourceCandidateId, + outputHash: provenance.mediaHash, + executionDurationSeconds: provenance.execution?.elapsedSeconds, + peakMemoryBytes: provenance.execution?.peakMemoryBytes, + }; + for (const [key, value] of Object.entries(fields)) { + if (receipt[key] === undefined || receipt[key] !== value) { + throw new Error(`Locked-template baseline ${key} differs from the release receipt.`); + } + } + return provenance; +} diff --git a/scripts/release-qualification-policy.mjs b/scripts/release-qualification-policy.mjs index 6e514145..5f7a97d4 100644 --- a/scripts/release-qualification-policy.mjs +++ b/scripts/release-qualification-policy.mjs @@ -2,6 +2,38 @@ export function captureQualificationStatus(supportTier) { return supportTier === 'supported' ? 'qualified' : 'observed'; } +export function hardwareExecutionDevice(health, provenance) { + const profile = health?.runtime_profile?.installed; + const measurement = provenance?.execution?.measurement; + const measuredDevice = measurement?.device; + const backend = measurement?.backend; + const expected = { + 'nvidia-cuda': ['cuda', 'cuda'], + 'amd-rocm-linux': ['cuda', 'rocm'], + 'amd-instinct-rocm-linux': ['cuda', 'rocm'], + 'amd-pytorch-windows': ['cuda', 'rocm'], + 'intel-xpu': ['xpu', 'xpu'], + 'apple-mps': ['mps', 'mps'], + cpu: ['cpu', 'cpu'], + }[profile]; + if (!expected) throw new Error('Hardware evidence has no reviewed runtime profile.'); + const match = typeof measuredDevice === 'string' ? /^(cpu|cuda|xpu|mps)(?::([0-9]+))?$/.exec(measuredDevice) : null; + if (!match || match[1] !== expected[0] || backend !== expected[1]) { + throw new Error('Executed device/backend does not match the recorded hardware profile.'); + } + const index = Number(match[2] ?? 0); + if (!Number.isSafeInteger(index) || (['cpu', 'mps'].includes(match[1]) && index !== 0)) { + throw new Error('Executed device index is invalid.'); + } + if (profile === 'cpu') return { name: 'cpu', backend: 'cpu', vendor: null, total_memory: null }; + const devices = health?.packages?.torch?.[`${match[1]}_devices`]; + const device = Array.isArray(devices) ? devices.find((item) => item?.index === index) : null; + if (!device || typeof device.name !== 'string' || !device.name.trim() || device.backend !== backend) { + throw new Error('Executed accelerator is missing or inconsistent in captured physical device metadata.'); + } + return device; +} + export function hardwareReceiptQualifies(receipt, profileId, manifestRevision) { return ( receipt?.status === 'qualified' && diff --git a/scripts/release-showcase-scope.mjs b/scripts/release-showcase-scope.mjs new file mode 100644 index 00000000..d86138c7 --- /dev/null +++ b/scripts/release-showcase-scope.mjs @@ -0,0 +1,58 @@ +import { canonicalJsonHash } from './template-gallery-harness.mjs'; + +/** An explicit showcase selection does not waive execution or hardware gates. */ +export function validateReleaseShowcaseScope(profile, { templates, manifest, history, source }) { + const { profileHash, ...body } = profile; + if ( + profile.schemaVersion !== 1 || + profile.format !== 'modiff.release-showcase-scope.v1' || + profileHash !== canonicalJsonHash(body) || + profile.currentGraphQualificationClaimed !== false || + profile.userRuntimeLimitSeconds !== null || + !Array.isArray(profile.includedTemplates) || + !profile.includedTemplates.length || + !Array.isArray(profile.excludedTemplates) || + profile.dataset.repository !== source.repoId || + profile.dataset.revision !== source.revision + ) + throw new Error('Invalid, stale or vacuous release showcase scope.'); + const ids = new Set(templates.map((template) => template.id)); + const selected = new Set(); + const all = [...profile.includedTemplates, ...profile.excludedTemplates]; + for (const row of all) { + if (!ids.has(row.id) || selected.has(row.id)) throw new Error(`Duplicate or unknown release template: ${row.id}`); + selected.add(row.id); + } + if (selected.size !== ids.size) throw new Error('Every current template must be included or explicitly excluded.'); + for (const row of profile.excludedTemplates) { + if ( + !['amd-cloud', 'pending-review', 'rights-or-access', 'planning-contract', 'supplementary-only'].includes( + row.category, + ) || + typeof row.reason !== 'string' || + !row.reason.trim() || + row.countedAsComplete !== false + ) { + throw new Error(`Invalid release exclusion: ${row.id}`); + } + } + for (const row of profile.includedTemplates) { + const entry = manifest.examples.find((candidate) => candidate.templateId === row.id); + if ( + !entry || + row.templateLockHash !== entry.templateLockHash || + !['current_recipe', 'approved_historical_recipe'].includes(row.evidenceScope) + ) { + throw new Error(`Release entry is missing or changed: ${row.id}`); + } + if ( + row.evidenceScope === 'approved_historical_recipe' && + !history.records.some( + (record) => record.templateId === row.id && record.bindings.templateLockHash === row.templateLockHash, + ) + ) { + throw new Error(`Historical release entry has no explicit recipe record: ${row.id}`); + } + } + return profile.includedTemplates.map((row) => row.id); +} diff --git a/scripts/release-showcase-scope.test.mjs b/scripts/release-showcase-scope.test.mjs new file mode 100644 index 00000000..44e87b70 --- /dev/null +++ b/scripts/release-showcase-scope.test.mjs @@ -0,0 +1,99 @@ +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; +import { resolve } from 'node:path'; +import test from 'node:test'; +import { canonicalJsonHash, loadTemplateRuntime } from './template-gallery-harness.mjs'; +import { validateReleaseShowcaseScope } from './release-showcase-scope.mjs'; + +function fixture() { + const body = { + schemaVersion: 1, + format: 'modiff.release-showcase-scope.v1', + currentGraphQualificationClaimed: false, + userRuntimeLimitSeconds: null, + dataset: { repository: 'test/gallery', revision: 'a'.repeat(40) }, + includedTemplates: [{ id: 'kept', evidenceScope: 'approved_historical_recipe', templateLockHash: 'old-lock' }], + excludedTemplates: [ + { id: 'cloud', category: 'amd-cloud', reason: 'Pending cloud resources', countedAsComplete: false }, + ], + }; + const profile = { ...body, profileHash: canonicalJsonHash(body) }; + const context = { + templates: [{ id: 'kept' }, { id: 'cloud' }], + manifest: { examples: [{ templateId: 'kept', templateLockHash: 'old-lock' }] }, + history: { records: [{ templateId: 'kept', bindings: { templateLockHash: 'old-lock' } }] }, + source: { repoId: 'test/gallery', revision: 'a'.repeat(40) }, + }; + return { profile, context }; +} + +test('scoped showcases retain explicit exclusions without granting current graph proof', () => { + const { profile, context } = fixture(); + assert.deepEqual(validateReleaseShowcaseScope(profile, context), ['kept']); + assert.equal(profile.currentGraphQualificationClaimed, false); +}); + +test('the checked-in showcase selection preserves exact file locks for current and historical examples', async () => { + const root = resolve(import.meta.dirname, '..'); + const read = (name) => JSON.parse(readFileSync(resolve(root, name), 'utf8')); + const profile = read('config/release-showcase-scope.v1.json'); + const manifest = read('public/template-gallery/manifest.json'); + const history = read('config/template-recipe-history.v1.json'); + const runtime = await loadTemplateRuntime(root, { includePlanning: true }); + const selected = validateReleaseShowcaseScope(profile, { + templates: runtime.templates, + manifest, + history, + source: read('src/studio/templateAssetSource.json'), + }); + assert.equal(selected.length, profile.includedTemplates.length); + const historicalIds = new Set(history.records.map((record) => record.templateId)); + for (const row of profile.includedTemplates) { + assert.equal(row.evidenceScope === 'approved_historical_recipe', historicalIds.has(row.id), row.id); + if (row.evidenceScope === 'current_recipe') { + const template = runtime.templates.find((candidate) => candidate.id === row.id); + assert.ok(runtime.findManifestEntry(template, manifest), row.id); + } + } +}); + +test('curation rejects unknown, omitted, vacuous, silently completed and stale records', () => { + for (const mutate of [ + (p) => { + p.includedTemplates = []; + }, + (p) => { + p.excludedTemplates = []; + }, + (p) => { + p.excludedTemplates[0].reason = ''; + }, + (p) => { + p.excludedTemplates[0].countedAsComplete = true; + }, + (p) => { + p.excludedTemplates[0].id = 'kept'; + }, + (p) => { + p.includedTemplates[0].templateLockHash = 'changed'; + }, + (p) => { + p.dataset.revision = 'b'.repeat(40); + }, + (p) => { + p.currentGraphQualificationClaimed = true; + }, + (p) => { + p.userRuntimeLimitSeconds = 7200; + }, + ]) { + const { profile, context } = fixture(); + mutate(profile); + const { profileHash: _old, ...body } = profile; + profile.profileHash = canonicalJsonHash(body); + assert.throws(() => validateReleaseShowcaseScope(profile, context)); + } + const { profile, context } = fixture(); + context.history.records = []; + assert.throws(() => validateReleaseShowcaseScope(profile, context), /no explicit recipe record/u); +}); diff --git a/scripts/release-showcases-verify.mjs b/scripts/release-showcases-verify.mjs new file mode 100644 index 00000000..06d11aab --- /dev/null +++ b/scripts/release-showcases-verify.mjs @@ -0,0 +1,66 @@ +import { readFileSync, writeFileSync } from 'node:fs'; +import { resolve, join } from 'node:path'; +import { loadTemplateRuntime, verifyGallery } from './template-gallery-harness.mjs'; +import { verifyTemplateRecipeRecords } from './template-recipe-records.mjs'; +import { validateReleaseShowcaseScope } from './release-showcase-scope.mjs'; + +const root = resolve(import.meta.dirname, '..'); +const read = (name) => JSON.parse(readFileSync(join(root, name), 'utf8')); +const profile = read('config/release-showcase-scope.v1.json'); +const history = read('config/template-recipe-history.v1.json'); +const manifest = read('public/template-gallery/manifest.json'); +const runtime = await loadTemplateRuntime(root, { includePlanning: true }); +const ids = validateReleaseShowcaseScope(profile, { + templates: runtime.templates, + manifest, + history, + source: read('src/studio/templateAssetSource.json'), +}); +const historical = verifyTemplateRecipeRecords(history, { root, runtime, manifest }); +const selectedIds = new Set(ids); +const byId = new Map( + historical.filter(({ templateId }) => selectedIds.has(templateId)).map((record) => [record.templateId, record]), +); +for (const selected of profile.includedTemplates) { + const current = runtime.templates.find((template) => template.id === selected.id); + if (selected.evidenceScope === 'current_recipe' && !runtime.findManifestEntry(current, manifest)) { + throw new Error(`${selected.id}: current Gallery entry failed normal selection`); + } + if ((selected.evidenceScope === 'approved_historical_recipe') !== byId.has(selected.id)) { + throw new Error(`${selected.id}: release proof scope differs from original recipe record`); + } +} +const result = await verifyGallery({}, 'release-showcase-scope', { + root, + templateIds: ids, + runtime: { ...runtime, templates: runtime.templates.map((template) => byId.get(template.id)?.template ?? template) }, +}); +const report = { + ...result, + profileHash: profile.profileHash, + currentRecipeExamples: profile.includedTemplates.filter((row) => row.evidenceScope === 'current_recipe').length, + approvedHistoricalRecipeExamples: byId.size, + excludedTemplates: profile.excludedTemplates, + currentGraphQualificationClaimed: false, + hardwareQualificationClaimed: false, + defaultFullGalleryGateChanged: false, + modelsRun: 0, +}; +const outputIndex = process.argv.indexOf('--output'); +if (outputIndex >= 0) + writeFileSync(resolve(process.argv[outputIndex + 1]), JSON.stringify(report, null, 2) + '\n', { flag: 'wx' }); +console.log( + JSON.stringify( + { + ok: report.ok, + verifiedExamples: report.verifiedExamples, + current: report.currentRecipeExamples, + historical: report.approvedHistoricalRecipeExamples, + excludedTemplates: report.excludedTemplates.length, + errors: report.errors, + }, + null, + 2, + ), +); +if (!report.ok || report.verifiedExamples !== ids.length) process.exitCode = 1; diff --git a/scripts/render-h3-template-poster.mjs b/scripts/render-h3-template-poster.mjs new file mode 100644 index 00000000..66b580fe --- /dev/null +++ b/scripts/render-h3-template-poster.mjs @@ -0,0 +1,14 @@ +// Render the original vector card illustration; this never runs an image model. +import { fileURLToPath } from 'node:url'; +import { chromium } from 'playwright'; + +const browser = await chromium.launch({ headless: true }); +try { + const page = await browser.newPage({ viewport: { width: 1536, height: 864 }, deviceScaleFactor: 1 }); + await page.goto(new URL('../public/assets/minimax-h3-old-town.card-poster.svg', import.meta.url).href); + await page.screenshot({ + path: fileURLToPath(new URL('../public/assets/minimax-h3-old-town.card-poster.png', import.meta.url)), + }); +} finally { + await browser.close(); +} diff --git a/scripts/request-boundary.test.mjs b/scripts/request-boundary.test.mjs index d90606ef..10d8e42a 100644 --- a/scripts/request-boundary.test.mjs +++ b/scripts/request-boundary.test.mjs @@ -11,6 +11,7 @@ const SRC = path.join(ROOT, 'src'); let fileApiModule; let originalFetch; let requestModule; +let optionalRuntimePolling; let templateGalleryInstall; let server; @@ -40,6 +41,7 @@ before(async () => { appType: 'custom', }); requestModule = await server.ssrLoadModule('/src/utils/requestJson.ts'); + optionalRuntimePolling = await server.ssrLoadModule('/src/studio/optionalRuntimePolling.ts'); templateGalleryInstall = await server.ssrLoadModule('/src/studio/templateGalleryInstall.ts'); fileApiModule = await server.ssrLoadModule('/src/utils/backendUpload.ts'); originalFetch = globalThis.fetch; @@ -61,6 +63,59 @@ function jsonResponse(value, status = 200) { }); } +test('optional setup status retries transient failures with bounded delay and preserves the error', () => { + for (const options of [ + { kind: 'network' }, + { kind: 'timeout' }, + { kind: 'http', status: 408 }, + { kind: 'http', status: 429 }, + { kind: 'http', status: 503 }, + ]) { + const error = new requestModule.RequestError('Status temporarily unavailable.', { url: '/job', ...options }); + const first = optionalRuntimePolling.optionalRuntimePollingFailure(error, 1); + assert.equal(first.message, error.message); + assert.equal(first.retryDelayMs, 1500); + assert.equal(optionalRuntimePolling.optionalRuntimePollingFailure(error, 7).retryDelayMs, 5000); + assert.equal(optionalRuntimePolling.optionalRuntimePollingFailure(error, 8).retryDelayMs, null); + } +}); + +test('optional setup status uses transient HTTP status when the real transport receives non-JSON errors', async () => { + for (const [status, retryDelayMs] of [ + [503, 1500], + [200, null], + [404, null], + ]) { + globalThis.fetch = async () => + new Response('Service Unavailable', { + status, + headers: { 'Content-Type': 'text/html' }, + }); + await assert.rejects(requestModule.requestJson('/runtime/optional-runtimes/jobs/optjob-AbCdEf123456'), (error) => { + assert.equal(error.kind, 'invalid_json'); + assert.equal(error.status, status); + assert.equal(optionalRuntimePolling.optionalRuntimePollingFailure(error, 1).retryDelayMs, retryDelayMs); + assert.equal(optionalRuntimePolling.optionalRuntimePollingFailure(error, 8).retryDelayMs, null); + return true; + }); + } +}); + +test('missing, invalid and identity-mismatched setup status pause without fabricating a job outcome', () => { + for (const error of [ + new requestModule.RequestError('Job not found.', { kind: 'http', status: 404, url: '/job' }), + new requestModule.RequestError('Invalid JSON.', { kind: 'invalid_json', status: 200, url: '/job' }), + new requestModule.RequestError('Invalid payload.', { kind: 'invalid_payload', status: 200, url: '/job' }), + new Error('The optional-runtime job identity changed.'), + ]) { + const failure = optionalRuntimePolling.optionalRuntimePollingFailure(error, 1); + assert.equal(failure.retryDelayMs, null); + assert.equal(failure.message, error.message); + assert.equal('status' in failure, false); + assert.equal('job' in failure, false); + } +}); + test('production source keeps raw fetch calls inside the request transport boundary', async () => { const violations = []; for (const filename of await sourceFiles(SRC)) { @@ -209,6 +264,50 @@ test('binary request helpers consume blobs and array buffers through the shared assert.deepEqual(new Uint8Array(await requestModule.requestArrayBuffer('/bytes')), bytes); }); +test('response readers retain shared cancellation and timeout through streamed body consumption', async (t) => { + for (const mode of ['aborted', 'timeout']) + await t.test(mode, async () => { + const controller = new AbortController(); + let bodyStarted; + const started = new Promise((resolve) => { + bodyStarted = resolve; + }); + globalThis.fetch = async (_url, init) => { + assert.equal(init.cache, 'no-store'); + return new Response( + new ReadableStream({ + start(stream) { + init.signal.addEventListener('abort', () => stream.error(init.signal.reason), { once: true }); + }, + pull() { + bodyStarted(); + }, + }), + ); + }; + const pending = requestModule.requestWithResponse( + '/streamed', + { + signal: controller.signal, + timeoutMs: mode === 'timeout' ? 20 : 1000, + cache: 'no-store', + }, + async (response) => { + const reader = response.body.getReader(); + try { + return await reader.read(); + } finally { + reader.releaseLock(); + } + }, + ); + const rejected = assert.rejects(pending, (error) => error.kind === mode && error.url === '/streamed'); + await started; + if (mode === 'aborted') controller.abort(new Error('Unit caller cancelled its read.')); + await rejected; + }); +}); + test('binary HTTP failures preserve structured backend messages', async () => { globalThis.fetch = async () => jsonResponse({ error: true, message: 'Media is unavailable.' }, 404); diff --git a/scripts/resolved-execution-inputs.test.mjs b/scripts/resolved-execution-inputs.test.mjs index 4f15e981..09e62d85 100644 --- a/scripts/resolved-execution-inputs.test.mjs +++ b/scripts/resolved-execution-inputs.test.mjs @@ -3,21 +3,1144 @@ import { after, before, test } from 'node:test'; import { createServer } from 'vite'; import { spawnSync } from 'node:child_process'; import { fileURLToPath } from 'node:url'; +import { readFileSync } from 'node:fs'; +import { canonicalAccountingExecutionPlan } from './release-contract-core.mjs'; +import { canonicalJsonHash } from './canonical-json.mjs'; +import { actualAppliedAdapterFixtures, protocolFactoryArguments } from './canonical-provenance-fixtures.mjs'; +import { createRunProvenance, validateAppliedAdapterProof } from './live-proof-provenance.mjs'; -let server, contracts, inputs, outputUtils, profiles; +let server, contracts, inputs, outputUtils, profiles, tasks, observedModels, packages; +let ddimAccountingFixture; + +test('native AV guidance inputs remain strict, scoped and visible in the exact receipt', () => { + const capture = receipt(); + const values = { + stg_scale: [1, 'temporalGuidance'], + modality_scale: [3, 'videoModalityGuidance'], + guidance_rescale: [0.7, 'videoGuidanceRescale'], + audio_guidance_scale: [7, 'audioGuidanceScale'], + audio_stg_scale: [1, 'audioTemporalGuidance'], + audio_modality_scale: [3, 'audioModalityGuidance'], + audio_guidance_rescale: [0.7, 'audioGuidanceRescale'], + temporal_guidance_blocks_json: [[27, 28], 'temporalGuidanceLayers'], + use_cross_timestep: [true, 'crossTimestepGuidance'], + condition_indices_json: [[0, -1], 'keyframePositions'], + }; + capture.nodes = [ + { + nodeId: 'render', + module: 'modules.DiffusersVideo', + action: 'GenerateVideoAudio', + fields: Object.fromEntries(Object.entries(values).map(([key, [value]]) => [key, { value, source: 'literal' }])), + omittedFields: {}, + }, + ]; + capture.summary = Object.fromEntries(Object.values(values).map(([value, key]) => [key, value])); + const identity = { taskId: capture.taskId, attemptIndex: capture.attemptIndex, nodeId: capture.nodeId }; + assert.deepEqual(inputs.coerceResolvedExecutionInputs(capture, identity), capture); + const tampered = structuredClone(capture); + tampered.summary.audioGuidanceScale = 4; + assert.equal(inputs.coerceResolvedExecutionInputs(tampered, identity), undefined); + const wrongScope = structuredClone(capture); + wrongScope.nodes[0].action = 'Generate'; + assert.equal(inputs.coerceResolvedExecutionInputs(wrongScope, identity), undefined); +}); +test('native joint-video inputs keep their real model and expansion settings instead of a stale image form', () => { + const { receipt } = JSON.parse( + readFileSync(new URL('../tests/fixtures/native-joint-video-inputs.v1.json', import.meta.url), 'utf8'), + ); + const identity = { taskId: receipt.taskId, attemptIndex: receipt.attemptIndex, nodeId: receipt.nodeId }; + assert.deepEqual(inputs.coerceResolvedExecutionInputs(receipt, identity), receipt); + const output = contracts.coerceStudioOutput({ + id: 'native-av', + url: '/video.mp4', + ...identity, + modelType: 'ZImageModularPipeline', + modelLabel: 'Z-Image Turbo', + mode: 'text_to_image', + formSnapshot: { modelType: 'ZImageModularPipeline', prompt: 'stale form' }, + resolvedExecutionInputs: receipt, + }); + assert.equal(inputs.outputModelKey(output), 'Kandinsky6TI2VAPipeline'); + assert.equal(output.modelLabel, 'Kandinsky6TI2VAPipeline'); + assert.equal(output.prompt, receipt.summary.prompt); + assert.equal(output.resolvedExecutionInputs.summary.expandPrompt, false); + const tampered = structuredClone(receipt); + tampered.nodes.find((n) => n.action === 'GenerateVideoAudio').fields.unreviewed_control = { + value: true, + source: 'literal', + }; + assert.equal(inputs.coerceResolvedExecutionInputs(tampered, identity), undefined); +}); +test('recorded output labels and packages use the exact observed loader without rewriting its restore form', () => { + const { receipt: retained } = JSON.parse( + readFileSync(new URL('../tests/fixtures/native-joint-video-inputs.v1.json', import.meta.url), 'utf8'), + ); + const owner = retained.nodes.find((node) => node.action === 'LoadPipeline'); + const pipeline = owner.fields.pipeline_class.value; + const repo = owner.fields.model_id.value; + const revision = owner.fields.revision.value; + const task = 'text_to_video_with_audio'; + const capturedReceipt = { + ...retained, + graphTasksVersion: 2, + graphTasks: [{ loaderId: owner.nodeId, pipelineClass: pipeline, task }], + }; + const record = { + id: 'native-av', + url: '/video.mp4', + taskId: retained.taskId, + attemptIndex: retained.attemptIndex, + nodeId: retained.nodeId, + modelType: 'ZImageModularPipeline', + formSnapshot: { modelType: 'ZImageModularPipeline' }, + resolvedExecutionInputs: capturedReceipt, + }; + const output = contracts.coerceStudioOutput(record); + const descriptor = { + label: 'Exact native video model', + profileId: 'exact-video:direct', + pipeline, + repo, + inventory: { + taskSelections: [{ modes: [task], repo, revision, downloadFiles: ['model_index.json'] }], + }, + }; + assert.equal(observedModels.observedOutputModelLabel(output, [descriptor]), descriptor.label); + const differentTask = structuredClone(descriptor); + differentTask.inventory.taskSelections[0].modes = ['image_to_video']; + const differentRevision = structuredClone(descriptor); + differentRevision.inventory.taskSelections[0].revision = '0'.repeat(40); + assert.equal(observedModels.observedOutputModelLabel(output, [differentTask, differentRevision]), pipeline); + assert.equal( + observedModels.observedOutputModelLabel(output, [descriptor, { ...descriptor, label: 'Conflicting name' }]), + pipeline, + ); + const packageData = packages.buildOutputWorkflowPackage(output); + assert.equal(packageData.metadata.studio.modelType, pipeline); + assert.equal(packageData.restore.formSnapshot.modelType, 'ZImageModularPipeline'); + assert.equal(packageData.latestOutput.modelLabel, pipeline); + assert.deepEqual(packageData.latestOutput.resolvedExecutionInputs, capturedReceipt); + assert.equal(inputs.outputModelKey(output), pipeline); + const historical = contracts.coerceStudioOutput({ + ...record, + modelLabel: 'Historical model alias', + resolvedExecutionInputs: undefined, + }); + assert.equal(observedModels.observedOutputModelLabel(historical, [descriptor]), 'Historical model alias'); + assert.equal(packages.buildOutputWorkflowPackage(historical).metadata.studio.modelType, record.modelType); +}); +function audioLoadReceipt(sourceValue) { + return { + ...receipt(), + mediaEvidenceStatus: { schemaVersion: 1, truncated: false }, + summary: {}, + nodes: [ + { + nodeId: 'load', + module: 'modules.Audio', + action: 'Load', + fields: {}, + omittedFields: {}, + mediaEvidence: { + schemaVersion: 1, + source: 'native-builtin-media-v1', + status: 'complete', + controls: {}, + inputs: {}, + outputs: { + audio: [ + { + kind: 'audio', + shape: [16, 1], + sampleRate: 16000, + dtype: 'float32-le', + sha256: 'a'.repeat(64), + byteSize: 64, + }, + ], + }, + files: { file: [{ sourceValue, sha256: 'b'.repeat(64), byteSize: 76, converted: false }] }, + }, + }, + { nodeId: 'preview', module: 'modules.Primitive', action: 'DataViewer', fields: {}, omittedFields: {} }, + ], + }; +} + +test('video upscale model evidence requires the declared operation and exact native owner', () => { + const sourceFile = { sha256: '1'.repeat(64), byteSize: 1200 }; + const outputFile = { sha256: '2'.repeat(64), byteSize: 1800 }; + const witness = { + ...receipt(), + mediaEvidenceStatus: { schemaVersion: 1, truncated: false }, + summary: { modelType: 'SpandrelVideoUpscaleV1' }, + nodes: [ + { + nodeId: 'preview', + module: 'modules.Video', + action: 'UpscaleVideo', + fields: { pipeline_class: { source: 'literal', value: 'SpandrelVideoUpscaleV1' } }, + omittedFields: {}, + mediaEvidence: { + schemaVersion: 1, + status: 'complete', + source: 'native-builtin-media-v1', + controls: { + pipeline_class: 'SpandrelVideoUpscaleV1', + operation: 'video_upscale', + tile_size: 256, + tile_overlap: 32, + device: 'cuda:0', + fps: 16, + }, + inputs: { video: [{ kind: 'file', ...sourceFile }] }, + outputs: { video_out: [{ kind: 'file', ...outputFile }] }, + files: { video: [{ sourceValue: '@data/videos/source.mp4', ...sourceFile }] }, + }, + }, + ], + }; + Object.assign(witness, { ambiguousFields: [], unavailableFields: [], uncapturedNodeIds: [] }); + const record = { + id: 'video-upscale-proof', + url: '/recorded.mp4', + modelType: 'SpandrelVideoUpscaleV1', + mode: 'video_upscale', + taskId: witness.taskId, + attemptIndex: witness.attemptIndex, + nodeId: witness.nodeId, + resolvedExecutionInputs: witness, + }; + const output = contracts.coerceStudioOutput(record); + assert.deepEqual(output.resolvedExecutionInputs, witness); + assert.equal(inputs.outputModelKey(output), 'SpandrelVideoUpscale'); + const changed = structuredClone(record); + changed.resolvedExecutionInputs.nodes[0].mediaEvidence.controls.operation = 'video_trim'; + const unrelated = contracts.coerceStudioOutput(changed); + assert.notEqual(inputs.outputModelKey(unrelated), 'SpandrelVideoUpscale'); +}); + +const retainedVideoUpscale = process.env.MODIFF_VIDEO_UPSCALE_OUTPUTS; +test( + 'native video upscale retains its model and verified file chain in exported output history', + { skip: !retainedVideoUpscale }, + () => { + const raw = JSON.parse(readFileSync(retainedVideoUpscale, 'utf8')); + assert.equal(raw.outputs.length, 2); + for (const record of raw.outputs) { + const output = contracts.coerceStudioOutput(record); + assert.equal(output.modelType, 'SpandrelVideoUpscale'); + assert.equal(output.mode, 'video_upscale'); + assert.equal(output.repo, record.repo); + assert.deepEqual(output.resolvedExecutionInputs, record.resolvedExecutionInputs); + const exported = packages.buildOutputWorkflowPackage(output); + assert.equal(exported.metadata.studio.modelType, 'SpandrelVideoUpscale'); + assert.deepEqual(exported.latestOutput.resolvedExecutionInputs, record.resolvedExecutionInputs); + const changed = structuredClone(record); + const owner = changed.resolvedExecutionInputs.nodes.find(({ action }) => action === 'UpscaleVideo'); + owner.mediaEvidence.files.extra = owner.mediaEvidence.files.video; + const tampered = contracts.coerceStudioOutput(changed); + assert.equal(tampered.resolvedExecutionInputs, undefined); + } + }, +); + +test('Audio.Load scalar and legacy singleton filenames survive history and output export exactly', () => { + for (const sourceValue of ['speech.wav', ['speech.wav']]) { + const capture = audioLoadReceipt(sourceValue); + const identity = { taskId: capture.taskId, attemptIndex: capture.attemptIndex, nodeId: capture.nodeId }; + const before = JSON.stringify(capture); + const parsed = inputs.coerceResolvedExecutionInputs(capture, identity); + assert.deepEqual(parsed, capture); + const restored = contracts.coerceStudioOutput({ + id: 'audio-file-proof', + url: '/native.txt', + ...identity, + resolvedExecutionInputs: capture, + }); + assert.deepEqual(restored.resolvedExecutionInputs, capture); + assert.deepEqual(packages.buildOutputWorkflowPackage(restored).latestOutput.resolvedExecutionInputs, capture); + assert.equal(JSON.stringify(capture), before); + } +}); + +test('Audio.Load legacy filenames stay bounded and scoped to its declared file port', async () => { + const { parseBuiltinMediaEvidence } = await server.ssrLoadModule('/src/studio/builtinMediaEvidence.ts'); + for (const sourceValue of [[], [''], [null], [['speech.wav']], ['one.wav', 'two.wav'], ['x'.repeat(16385)]]) { + assert.equal( + parseBuiltinMediaEvidence(audioLoadReceipt(sourceValue).nodes[0].mediaEvidence, 'Audio.Load'), + undefined, + ); + } + const capture = audioLoadReceipt(['speech.wav']).nodes[0].mediaEvidence; + for (const mutate of [ + (row) => { + row.files.other = row.files.file; + }, + (row) => { + row.files.file[0].sha256 = 'changed'; + }, + (row) => { + row.files.file[0].proofOverride = true; + }, + ]) { + const changed = structuredClone(capture); + mutate(changed); + assert.equal(parseBuiltinMediaEvidence(changed, 'Audio.Load'), undefined); + } + const duplicate = { ...capture, files: { file: [...capture.files.file, ...capture.files.file] } }; + assert.equal(parseBuiltinMediaEvidence(duplicate, 'Audio.Load'), undefined); + const otherScope = { ...capture, outputs: {} }; + assert.equal(parseBuiltinMediaEvidence(otherScope, 'Image.Load'), undefined); + otherScope.files = { videos: capture.files.file }; + assert.equal(parseBuiltinMediaEvidence(otherScope, 'Video.ProcessVideo'), undefined); +}); + +test('Video.Load binds one encoded source and one bounded ordered set of decoded frames', async () => { + const { parseBuiltinMediaEvidence } = await server.ssrLoadModule('/src/studio/builtinMediaEvidence.ts'); + const sha256 = 'a'.repeat(64); + const capture = { + schemaVersion: 1, + source: 'native-builtin-media-v1', + status: 'complete', + inputs: {}, + controls: {}, + files: { file: [{ sourceValue: '@data/guide.mp4', sha256, byteSize: 120 }] }, + outputs: { video: [{ kind: 'video', sha256, byteSize: 360, width: 3, height: 2, mode: 'RGB', frameCount: 20 }] }, + }; + assert.deepEqual(parseBuiltinMediaEvidence(capture, 'Video.Load'), capture); + assert.equal(parseBuiltinMediaEvidence(capture, 'Video.ProcessVideo'), undefined); + for (const mutate of [ + (row) => { + delete row.files.file; + }, + (row) => { + row.outputs.video[0].frameCount = 21; + }, + (row) => { + row.outputs.video[0].mode = 'P'; + }, + (row) => { + row.outputs.video.push(row.outputs.video[0]); + }, + ]) { + const changed = structuredClone(capture); + mutate(changed); + assert.equal(parseBuiltinMediaEvidence(changed, 'Video.Load'), undefined); + } +}); + +test('Wan motion evidence distinguishes reference, motion, face, background, and mask roles', async () => { + const { parseBuiltinMediaEvidence } = await server.ssrLoadModule('/src/studio/builtinMediaEvidence.ts'); + const sha256 = 'b'.repeat(64); + const clip = { kind: 'video', sha256, byteSize: 360, width: 3, height: 2, mode: 'RGB', frameCount: 20 }; + const image = { kind: 'image', sha256, byteSize: 18, width: 3, height: 2, mode: 'RGB' }; + for (const mode of ['character_replace', 'character_animate']) { + const supported = mode === 'character_replace' ? [clip] : []; + const record = { + schemaVersion: 1, + status: 'complete', + source: 'native-builtin-media-v1', + controls: { mode }, + inputs: { + reference: [image], + pose_video: [clip], + face_video: [clip], + background_video: supported, + mask: supported, + }, + files: {}, + outputs: {}, + }; + assert.deepEqual(parseBuiltinMediaEvidence(record, 'DiffusersVideo.Generate'), record); + for (const mutate of [ + (row) => { + row.inputs.reference = [clip]; + }, + (row) => { + row.inputs.pose_video = [image]; + }, + (row) => { + delete row.inputs.face_video; + }, + (row) => { + row.inputs.mask = row.inputs.mask.length ? [] : [clip]; + }, + (row) => { + row.controls.mode = 'text_to_video'; + }, + ]) { + const changed = structuredClone(record); + mutate(changed); + assert.equal(parseBuiltinMediaEvidence(changed, 'DiffusersVideo.Generate'), undefined); + } + } +}); + +test('layer decomposition evidence retains one input and the ordered output stack', async () => { + const { parseBuiltinMediaEvidence } = await server.ssrLoadModule('/src/studio/builtinMediaEvidence.ts'); + const source = { kind: 'image', sha256: 'a'.repeat(64), byteSize: 4, width: 1, height: 1, mode: 'RGBA' }; + const layers = ['b', 'c', 'd'].map((digit) => ({ ...source, sha256: digit.repeat(64) })); + const capture = { + schemaVersion: 1, + source: 'native-builtin-media-v1', + status: 'complete', + controls: { layers: 3, resolution: 640, cfg_normalize: true, use_en_prompt: false }, + inputs: { image: [source] }, + outputs: { images: layers }, + files: {}, + }; + const scope = 'DiffusersImage.LayerDecompose'; + assert.deepEqual(parseBuiltinMediaEvidence(capture, scope), capture); + for (const mutate of [ + (row) => { + row.outputs.images.pop(); + }, + (row) => { + row.inputs.image.push(source); + }, + (row) => { + row.controls.cfg_normalize = 'true'; + }, + ]) { + const changed = structuredClone(capture); + mutate(changed); + assert.equal(parseBuiltinMediaEvidence(changed, scope), undefined); + } +}); + +test('controlled inpainting evidence preserves the source, mask and derived guide roles', async () => { + const { parseBuiltinMediaEvidence } = await server.ssrLoadModule('/src/studio/builtinMediaEvidence.ts'); + const rgb = { kind: 'image', sha256: 'a'.repeat(64), byteSize: 3, width: 1, height: 1, mode: 'RGB' }; + const mask = { ...rgb, sha256: 'b'.repeat(64), byteSize: 1, mode: 'L' }; + const guide = { ...rgb, sha256: 'c'.repeat(64) }; + const base = { schemaVersion: 1, source: 'native-builtin-media-v1', status: 'complete', files: {} }; + const edges = { + ...base, + controls: { low_threshold: 0.1, high_threshold: 0.7, output_mode: 'RGB', device: 'cpu:0' }, + inputs: { image: [rgb] }, + outputs: { output: [guide] }, + }; + const inpaint = { + ...base, + controls: {}, + inputs: { image: [rgb], mask_image: [mask], control_image: [guide] }, + outputs: { images: [rgb] }, + }; + assert.deepEqual(parseBuiltinMediaEvidence(edges, 'ImageFilters.Canny'), edges); + assert.deepEqual(parseBuiltinMediaEvidence(inpaint, 'DiffusersImage.ControlInpaint'), inpaint); + assert.equal(parseBuiltinMediaEvidence(inpaint, 'DiffusersImage.Inpaint'), undefined); + const invalid = structuredClone(inpaint); + invalid.inputs.background = invalid.inputs.image; + assert.equal(parseBuiltinMediaEvidence(invalid, 'DiffusersImage.ControlInpaint'), undefined); +}); + +test('native builtin media metadata survives strict parsing without granting model evidence', async () => { + const backend = fileURLToPath(new URL('../../MoDiff/', import.meta.url)); + const python = + process.env.MODIFF_BACKEND_PYTHON || + `${backend}.venv/${process.platform === 'win32' ? 'Scripts/python.exe' : 'bin/python'}`; + const generated = spawnSync( + python, + [ + '-B', + '-c', + String.raw` +import json, os +from types import SimpleNamespace +from PIL import Image +from modiff.builtin_media_evidence import begin_media_capture, CONTROL_FIELDS +from modiff.execution_input_provenance import capture_generation_inputs, build_resolved_execution_inputs +os.environ['MODIFF_CAPTURE_BUILTIN_MEDIA']='1' +n=SimpleNamespace(module_name='modules.ImageOperations', class_name='ProcessImage', + _execution_input_record=capture_generation_inputs('op',{'module':'modules.ImageOperations','action':'ProcessImage'},{'pipeline_class':'BuiltinImageOperationV1'})) +begin_media_capture(n,{'operation':'image_crop','width':0},inputs={'image':Image.new('RGB',(3,2),'red'),'mask':None}).finish({'output':Image.new('RGB',(3,2),'red')}) +graph={'nodes':{'op':{'module':'modules.ImageOperations','action':'ProcessImage','params':{}}}} +receipt=build_resolved_execution_inputs(graph,{'op':n._execution_input_record},task_id='synthetic-media',attempt_index=0,node_id='op') +print(json.dumps({'receipt':receipt,'scopes':{'.'.join(k):v for k,v in CONTROL_FIELDS.items()}})) +`, + ], + // Cold registry imports can exceed 30 seconds under the complete gate. + // Match the bounded backend-fixture startup window used by related suites. + { cwd: backend, encoding: 'utf8', timeout: 120000 }, + ); + assert.equal(generated.status, 0, generated.stderr); + const original = JSON.parse(generated.stdout); + const { parseBuiltinMediaEvidence, BUILTIN_MEDIA_EVIDENCE_SCOPES } = await server.ssrLoadModule( + '/src/studio/builtinMediaEvidence.ts', + ); + for (const [scope, fields] of Object.entries(original.scopes)) + assert.deepEqual(BUILTIN_MEDIA_EVIDENCE_SCOPES[scope].controls.split(/\s+/u).filter(Boolean).sort(), fields.sort()); + const identity = { taskId: 'synthetic-media', attemptIndex: 0, nodeId: 'op' }; + const parsed = inputs.coerceResolvedExecutionInputs(original.receipt, identity); + assert.ok(parsed); + assert.deepEqual(parsed.nodes[0].mediaEvidence, original.receipt.nodes[0].mediaEvidence); + assert.deepEqual(parsed.summary, original.receipt.summary); + const legacy = structuredClone(original.receipt); + delete legacy.nodes[0].mediaEvidence; + delete legacy.mediaEvidenceStatus; + assert.ok(inputs.coerceResolvedExecutionInputs(legacy, identity)); + for (const mutate of [ + (value) => { + delete value.mediaEvidenceStatus; + }, + (value) => { + value.nodes[0].mediaEvidence.inputs.image[0].sha256 = 'changed'; + }, + (value) => { + value.nodes[0].mediaEvidence.controls.secret = 'unreviewed'; + }, + (value) => { + value.nodes[0].mediaEvidence.inputs.image[0].pixels = [1, 2, 3]; + }, + (value) => { + value.nodes[0].mediaEvidence.files.other = []; + }, + (value) => { + value.nodes[0].module = 'custom.Unreviewed'; + }, + ]) { + const bad = structuredClone(original.receipt); + mutate(bad); + assert.equal(inputs.coerceResolvedExecutionInputs(bad, identity), undefined); + } + assert.equal( + parseBuiltinMediaEvidence(original.receipt.nodes[0].mediaEvidence, 'DiffusersImage.Generate'), + undefined, + ); +}); +function actualDdimAccountingFixture() { + if (ddimAccountingFixture) return structuredClone(ddimAccountingFixture); + const backend = fileURLToPath(new URL('../../MoDiff/', import.meta.url)); + const python = + process.env.MODIFF_BACKEND_PYTHON || + `${backend}.venv/${process.platform === 'win32' ? 'Scripts/python.exe' : 'bin/python'}`; + const generated = spawnSync( + python, + [ + '-B', + '-c', + String.raw` +import importlib.util, json +from pathlib import Path +from pytest import MonkeyPatch +spec = importlib.util.spec_from_file_location('ddim_protocol', Path('tests/test_canonical_field_accounting.py')) +module = importlib.util.module_from_spec(spec) +spec.loader.exec_module(module) +with MonkeyPatch.context() as patch: + graph = module.ddim_graph() + receipt, _, _, _ = module.run_ddim(patch, graph) +with MonkeyPatch.context() as patch: + conditional_receipt, _, _ = module.run_conditional_image(patch, 'StableDiffusionPAGPipeline') +print(json.dumps({'apiGraph': graph, 'receipt': receipt, 'conditionalReceipt': conditional_receipt})) +`, + ], + { cwd: backend, encoding: 'utf8', maxBuffer: 2_000_000 }, + ); + assert.equal(generated.status, 0, generated.stderr); + ddimAccountingFixture = JSON.parse(generated.stdout); + return structuredClone(ddimAccountingFixture); +} + +function canonicalAccountingCase() { + const { apiGraph, receipt } = actualDdimAccountingFixture(); + const loader = Object.values(apiGraph.nodes).find((node) => node.action === 'LoadPipeline'); + return { + apiGraph, + expectedApiGraph: structuredClone(apiGraph), + consumed: receipt, + target: { + modelType: 'DDIMPipeline', + task: 'unconditional_image', + modelSet: [{ repoId: loader.params.model_id.value.value, revision: loader.params.revision.value }], + }, + }; +} + +test('native empty execution-profile accounting survives receipt and output history parsing', () => { + const { receipt } = actualDdimAccountingFixture(); + const identity = { taskId: receipt.taskId, attemptIndex: receipt.attemptIndex, nodeId: receipt.nodeId }; + const before = JSON.stringify(receipt); + const parsed = inputs.coerceResolvedExecutionInputs(receipt, identity); + assert.ok(parsed, 'The current native producer contract must not be dropped by the paired client.'); + assert.deepEqual( + parsed.nodes.find((row) => row.action === 'LoadPipeline').fieldAccounting.fields.execution_profile_id, + { + disposition: 'inactive', + inputValue: '', + value: '', + source: 'literal', + reason: 'adapter-inactive', + }, + ); + const restored = contracts.coerceStudioOutput({ + id: 'accounted-profile', + url: '/native.webp', + ...identity, + resolvedExecutionInputs: receipt, + }); + assert.deepEqual(restored.resolvedExecutionInputs, parsed); + assert.equal(JSON.stringify(receipt), before); + const unknown = structuredClone(receipt); + unknown.nodes.find((row) => row.action === 'LoadPipeline').fieldAccounting.fields.unknown_profile_grant = { + disposition: 'consumed', + inputValue: '', + value: '', + source: 'literal', + }; + assert.equal(inputs.coerceResolvedExecutionInputs(unknown, identity), undefined); +}); + +test('plain conditional accounting preserves the bounded backend PAG call and rejects undeclared values', () => { + const { conditionalReceipt: receipt } = actualDdimAccountingFixture(); + const identity = { taskId: receipt.taskId, attemptIndex: receipt.attemptIndex, nodeId: receipt.nodeId }; + assert.deepEqual(inputs.coerceResolvedExecutionInputs(receipt, identity), receipt); + const fields = receipt.nodes[0].fieldAccounting.fields; + assert.equal(fields.pag_scale.value, 2.5); + assert.equal(fields.pag_adaptive_scale.value, 0.5); + assert.equal(fields.layers.disposition, 'inactive'); + assert.equal(fields.layers.inputValue, 4); + assert.equal(fields.width.inputValue, '512'); + assert.equal(fields.width.value, 512); + const unknown = structuredClone(receipt); + unknown.nodes[0].fieldAccounting.fields.latents = { ...fields.seed }; + assert.equal(inputs.coerceResolvedExecutionInputs(unknown, identity), undefined); +}); + +test('image edit accounting preserves only a bounded decoded RGB input on the image port', () => { + const capture = receipt(); + const values = { mode: 'RGB', width: 48, height: 32, byteSize: 4608, sha256: 'b'.repeat(64) }; + const projection = { + kind: 'decoded-image-v1', + values, + sha256: 'a'.repeat(64), + source: 'connected', + sourceNodeId: 'source-image', + sourcePortId: 'image', + }; + const accounting = { + schemaVersion: 1, + fields: { + reference_strength: { + disposition: 'inactive', + inputValue: 1, + value: 1, + reason: 'feature-disabled', + source: 'literal', + }, + }, + inputProjections: { image: projection }, + outputProjections: {}, + unaccountedFields: [], + omittedFields: {}, + complete: true, + }; + const node = { + nodeId: 'edit', + module: 'modules.DiffusersImage', + action: 'Edit', + fields: { executed_task: { value: 'edit_image', source: 'literal' } }, + omittedFields: {}, + fieldAccounting: accounting, + }; + capture.nodes = [node]; + capture.summary = { executedTask: 'edit_image' }; + capture.fieldAccountingStatus = { schemaVersion: 1, truncated: false }; + const identity = { taskId: capture.taskId, attemptIndex: capture.attemptIndex, nodeId: capture.nodeId }; + const output = contracts.coerceStudioOutput({ + id: 'edit', + url: '/edit.png', + ...identity, + resolvedExecutionInputs: capture, + }); + assert.deepEqual(output.resolvedExecutionInputs, capture); + assert.deepEqual(contracts.coerceStudioOutput(JSON.parse(JSON.stringify(output))).resolvedExecutionInputs, capture); + + const withAccounting = (changes) => ({ + ...capture, + nodes: [{ ...node, fieldAccounting: { ...accounting, ...changes } }], + }); + const image = (changes) => ({ image: { ...projection, ...changes } }); + for (const invalid of [ + { mode: 'RGBA' }, + { width: '48' }, + { width: 0, byteSize: 0 }, + { height: 32.5, byteSize: 4680 }, + { height: true }, + { height: Number.MAX_SAFE_INTEGER + 1 }, + { byteSize: 4609 }, + { width: 8192, height: 8192, byteSize: 201326592 }, + { sha256: 'B'.repeat(64) }, + { sha256: 'b'.repeat(63) }, + { samples: [0, 0, 0] }, + ]) { + assert.equal( + inputs.coerceResolvedExecutionInputs( + withAccounting({ inputProjections: image({ values: { ...values, ...invalid } }) }), + identity, + ), + undefined, + JSON.stringify(invalid), + ); + } + for (const [label, changes] of [ + ['missing image', { inputProjections: {} }], + ['foreign port', { inputProjections: { mask: projection } }], + ['output port', { outputProjections: { image: projection } }], + ['unbounded wrapper digest', { inputProjections: image({ sha256: 'wrong' }) }], + ['missing source port', { inputProjections: image({ sourcePortId: undefined }) }], + ]) { + assert.equal(inputs.coerceResolvedExecutionInputs(withAccounting(changes), identity), undefined, label); + } + const wrongScope = { + ...capture, + nodes: [{ ...node, action: 'Generate', fieldAccounting: { ...accounting, fields: {} } }], + }; + assert.equal(inputs.coerceResolvedExecutionInputs(wrongScope, identity), undefined); + for (const source of ['literal', 'override']) { + const { sourceNodeId: _nodeId, sourcePortId: _portId, ...withoutLink } = projection; + const inputProjections = { image: { ...withoutLink, source } }; + assert.equal( + inputs.coerceResolvedExecutionInputs(withAccounting({ inputProjections }), identity), + undefined, + source, + ); + const partial = withAccounting({ + inputProjections, + omittedFields: { image: 'unsupported-origin' }, + complete: false, + }); + assert.deepEqual(inputs.coerceResolvedExecutionInputs(partial, identity), partial, source); + const falselyPartial = withAccounting({ + inputProjections, + omittedFields: { width: 'unavailable' }, + complete: false, + }); + assert.equal(inputs.coerceResolvedExecutionInputs(falselyPartial, identity), undefined, source); + } +}); + +test('mocked native DDIM accounting derives the unique executed owner without borrowing Preview CPU or hints', () => { + const value = canonicalAccountingCase(); + const graphBefore = JSON.stringify(value.apiGraph); + const receiptBefore = JSON.stringify(value.consumed); + const result = canonicalAccountingExecutionPlan(value); + assert.equal(result.ownerId, 'node-01'); + assert.equal(result.plan.modelType, 'DDIMPipeline'); + assert.equal(result.plan.dtype, 'float32'); + assert.equal(result.plan.device, 'cuda:0'); + assert.equal(result.plan.deviceMap, 'cuda', 'effective loader placement, not requested none'); + assert.equal(result.plan.quantizationMode, 'none'); + assert.equal(result.plan.offloadMode, 'none'); + assert.equal(result.plan.autoOffload, false); + assert.equal(result.plan.resourceMode, 'expert'); + assert.equal(result.plan.modelRepo, value.target.modelSet[0].repoId); + assert.match(result.hash, /^sha256:execution-plan-v1:[a-f0-9]{64}$/u); + assert.equal(value.apiGraph.runtimeHints, undefined); + assert.equal(JSON.stringify(value.apiGraph), graphBefore, 'never synthesize hints or rewrite original graph'); + assert.equal(JSON.stringify(value.consumed), receiptBefore, 'never rewrite native evidence'); + assert.equal(result.qualified, undefined, 'a recipe join is not release or native qualification'); +}); + +test('canonical accounting joins reject effective-control, metadata and producer forgeries', () => { + const section = (value, action) => value.consumed.nodes.find((row) => row.action === action).fieldAccounting; + const mutations = { + 'changed effective loader device': (value) => { + section(value, 'LoadPipeline').fields.device.value = 'cpu:0'; + }, + 'changed actual generator steps': (value) => { + section(value, 'UnconditionalGenerate').fields.num_inference_steps.value = 1; + }, + 'invented inactive control': (value) => { + section(value, 'UnconditionalGenerate').fields.num_inference_steps.disposition = 'inactive'; + section(value, 'UnconditionalGenerate').fields.num_inference_steps.reason = 'adapter-inactive'; + }, + 'forged consumed class label': (value) => { + section(value, 'UnconditionalGenerate').fields.class_label.disposition = 'consumed'; + delete section(value, 'UnconditionalGenerate').fields.class_label.reason; + }, + 'requested control differs': (value) => { + section(value, 'LoadPipeline').fields.enable_vae_slicing.inputValue = false; + }, + 'wrong scalar origin': (value) => { + section(value, 'UnconditionalGenerate').fields.seed.source = 'override'; + }, + 'missing literal': (value) => { + delete section(value, 'UnconditionalGenerate').fields.batch_size; + }, + 'unknown field': (value) => { + section(value, 'UnconditionalGenerate').fields.unknown = { + disposition: 'consumed', + source: 'literal', + inputValue: 1, + value: 1, + }; + }, + 'forged metadata': (value) => { + section(value, 'UnconditionalGenerate').fields.image_contract.sha256 = 'a'.repeat(64); + }, + 'wrong recipe producer': (value) => { + section(value, 'LoadPipeline').inputProjections.execution_recipe.sourceNodeId = 'node-02'; + }, + 'wrong recipe producer port': (value) => { + section(value, 'LoadPipeline').inputProjections.execution_recipe.sourcePortId = 'summary'; + }, + 'forged producer projection hash': (value) => { + section(value, 'DiffusersExecutionRecipe').outputProjections.execution_recipe.sha256 = 'a'.repeat(64); + }, + 'forged matching projection values': (value) => { + section(value, 'LoadPipeline').inputProjections.execution_recipe.values.device = 'cpu:0'; + section(value, 'DiffusersExecutionRecipe').outputProjections.execution_recipe.values.device = 'cpu:0'; + }, + 'missing quantizer projection': (value) => { + section(value, 'PipelineQuantizationConfigV2').outputProjections = {}; + }, + 'enabled quantizer': (value) => { + section(value, 'PipelineQuantizationConfigV2').outputProjections.quantization_config.values.disabled = false; + }, + 'unaccounted fields': (value) => { + section(value, 'LoadPipeline').unaccountedFields = ['unknown']; + }, + 'truncated accounting': (value) => { + value.consumed.fieldAccountingStatus.truncated = true; + }, + 'missing accounting': (value) => { + delete value.consumed.nodes[0].fieldAccounting; + }, + 'wrong immutable model': (value) => { + value.target.modelSet[0].revision = 'a'.repeat(40); + }, + 'unsupported model': (value) => { + value.target.modelType = 'UnknownPipeline'; + }, + 'conflicting invented runtime hints': (value) => { + value.apiGraph.runtimeHints = { resourceMode: 'auto' }; + }, + 'ambiguous owner': (value) => { + value.consumed.nodes[1].nodeId = value.consumed.nodes[0].nodeId; + }, + 'changed original graph': (value) => { + value.apiGraph.nodes['node-04'].params.num_inference_steps.value = 1; + }, + 'legacy scalar contradicts new accounting': (value) => { + value.consumed.nodes.find((row) => row.action === 'UnconditionalGenerate').fields.num_inference_steps.value = 1; + }, + }; + for (const [label, mutate] of Object.entries(mutations)) { + const value = canonicalAccountingCase(); + mutate(value); + assert.throws(() => canonicalAccountingExecutionPlan(value), undefined, label); + } +}); before(async () => { globalThis.window = { location: { origin: 'http://localhost' } }; - server = await createServer({ server: { middlewareMode: true }, appType: 'custom' }); + // These SSR imports never use HMR. Middleware mode alone still watches the + // repository and local Gallery assets, consuming inotify entries in parallel tests. + server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, hmr: false, watch: null }, + appType: 'custom', + }); contracts = await server.ssrLoadModule('/src/studio/outputContracts.ts'); inputs = await server.ssrLoadModule('/src/studio/resolvedExecutionInputs.ts'); outputUtils = await server.ssrLoadModule('/src/studio/outputUtils.ts'); profiles = await server.ssrLoadModule('/src/studio/modelProfiles.ts'); + tasks = await server.ssrLoadModule('/src/studio/outputTaskDisplay.ts'); + observedModels = await server.ssrLoadModule('/src/studio/observedOutputModel.ts'); + packages = await server.ssrLoadModule('/src/studio/workflowPackage.ts'); }); after(async () => { await server?.close(); delete globalThis.window; }); +test('actual mocked DDIM native accounting survives history without changing legacy v1 bytes', () => { + // Real five-node canonical export and native accounting, mocked allocation and + // inference only. This fixture is not a native/model/hardware qualification. + const { receipt: capture } = actualDdimAccountingFixture(); + const identity = { taskId: capture.taskId, attemptIndex: capture.attemptIndex, nodeId: capture.nodeId }; + const legacy = structuredClone(capture); + delete legacy.fieldAccountingStatus; + for (const row of legacy.nodes) delete row.fieldAccounting; + const before = JSON.stringify(inputs.coerceResolvedExecutionInputs(legacy, identity)); + const normalized = inputs.coerceResolvedExecutionInputs(capture, identity); + assert.ok( + normalized.nodes.every((row) => row.fieldAccounting?.complete), + 'new accounting must survive parsing', + ); + assert.deepEqual(normalized.fieldAccountingStatus, { schemaVersion: 1, truncated: false }); + const stripped = structuredClone(normalized); + delete stripped.fieldAccountingStatus; + for (const row of stripped.nodes) delete row.fieldAccounting; + assert.equal(JSON.stringify(stripped), before, 'the optional extension must not alter any normalized legacy byte'); + const restored = contracts.coerceStudioOutput({ + id: 'protocol-only', + url: '/fixture.png', + ...identity, + resolvedExecutionInputs: capture, + }); + assert.deepEqual(restored.resolvedExecutionInputs, normalized); + assert.equal(JSON.stringify(inputs.coerceResolvedExecutionInputs(legacy, identity)), before); +}); + +test('the actual Python image utility producer retains scoped controls and ordered hashes in history', () => { + const backend = fileURLToPath(new URL('../../MoDiff/', import.meta.url)); + const python = + process.env.MODIFF_BACKEND_PYTHON || + `${backend}.venv/${process.platform === 'win32' ? 'Scripts/python.exe' : 'bin/python'}`; + const produced = spawnSync( + python, + [ + '-B', + '-c', + String.raw` +import json +from modiff.execution_input_provenance import capture_generation_inputs, build_resolved_execution_inputs +cases = [ + ('Image','Load',{'alpha_channel':'ignore','source_hashes':['a'*64,'b'*64], 'source_widths':[512,1024], 'source_heights':[512,1024], 'source_modes':['RGB','L']}), + ('Image','Resize',{'width':768,'height':1280,'method':'pad','multiple_of':1,'interpolation':'lanczos'}), + ('ImageOperations','ResizeImage',{'fit_mode':'contain','resampling':'bicubic'}), + ('ImageOperations','CropImage',{'x':0,'y':165,'width':1024,'height':1024}), + ('ImageOperations','MaskComposite',{'mask_channel':'luminance','invert_mask':False}), + ('Image','Save',{'filename':'studio/outputs/composite_{HASH:12}.png','quality':100}), +] +nodes, records = {}, {} +for i,(module,action,values) in enumerate(cases): + key='node-'+str(i) + node={'module':'modules.'+module,'action':action,'params':({'image':{'sourceId':'node-'+str(i-1),'sourceKey':'output'}} if i else {})} + nodes[key]=node + records[key]=capture_generation_inputs(key,node,{**values,'token':'not-evidence'}) +receipt=build_resolved_execution_inputs({'nodes':nodes},records,task_id='protocol-only',attempt_index=0,node_id='node-5') +print(json.dumps(receipt)) +`, + ], + { cwd: backend, encoding: 'utf8', maxBuffer: 300_000 }, + ); + assert.equal(produced.status, 0, produced.stderr); + const capture = JSON.parse(produced.stdout); + const original = JSON.stringify(capture); + const identity = { taskId: capture.taskId, attemptIndex: 0, nodeId: capture.nodeId }; + const parsed = inputs.coerceResolvedExecutionInputs(capture, identity); + assert.ok(parsed, 'the compatible client must retain the genuine producer contract'); + const load = parsed.nodes.find((node) => node.action === 'Load'); + assert.deepEqual(load.fields.source_hashes.value, ['a'.repeat(64), 'b'.repeat(64)]); + assert.deepEqual(load.fields.source_modes.value, ['RGB', 'L']); + assert.equal(parsed.nodes.find((node) => node.action === 'CropImage').fields.y.value, 165); + assert.equal(parsed.nodes.find((node) => node.action === 'MaskComposite').fields.invert_mask.value, false); + assert.equal(JSON.stringify(capture), original, 'no receipt rewrites'); + assert.equal(original.includes('not-evidence'), false); + const restored = contracts.coerceStudioOutput({ + id: 'image-utility-protocol', + url: '/fixture.png', + ...identity, + resolvedExecutionInputs: capture, + }); + assert.deepEqual(restored.resolvedExecutionInputs, parsed); + const moved = structuredClone(capture); + moved.nodes[0].action = 'UnreviewedAction'; + assert.equal( + inputs.coerceResolvedExecutionInputs(moved, identity), + undefined, + 'scoped fields cannot move to another action', + ); + const reordered = structuredClone(capture); + reordered.nodes.find((node) => node.action === 'Load').fields.source_hashes.value.reverse(); + assert.equal( + inputs.coerceResolvedExecutionInputs(reordered, identity), + undefined, + 'a summary cannot borrow reordered input evidence', + ); +}); + +test('optional accounting rejects unknown scopes, objects, origins, projections and incomplete claims', () => { + const { receipt: original } = actualDdimAccountingFixture(); + const identity = { taskId: original.taskId, attemptIndex: original.attemptIndex, nodeId: original.nodeId }; + const quant = (value) => value.nodes.find((row) => row.action === 'PipelineQuantizationConfigV2'); + const recipeNode = (value) => value.nodes.find((row) => row.action === 'DiffusersExecutionRecipe'); + const changes = { + 'unknown scope': (value) => { + quant(value).action = 'Unknown'; + }, + 'unknown accounting field': (value) => { + quant(value).fieldAccounting.fields.token = { + disposition: 'consumed', + inputValue: 'private', + value: 'private', + source: 'literal', + }; + }, + 'opaque value': (value) => { + quant(value).fieldAccounting.fields.backend.value = { private: true }; + }, + 'extra field key': (value) => { + quant(value).fieldAccounting.fields.backend.token = 'private'; + }, + 'unknown disposition': (value) => { + quant(value).fieldAccounting.fields.backend.disposition = 'approved'; + }, + 'invented reason': (value) => { + quant(value).fieldAccounting.fields.dtype.reason = 'approved'; + }, + 'connected origin missing port': (value) => { + delete recipeNode(value).fieldAccounting.inputProjections.quantization_config.sourcePortId; + }, + 'stale literal origin': (value) => { + quant(value).fieldAccounting.fields.backend.sourceNodeId = 'old'; + }, + 'unknown projection field': (value) => { + quant(value).fieldAccounting.outputProjections.quantization_config.values.secret = 'private'; + }, + 'enabled quantization': (value) => { + quant(value).fieldAccounting.outputProjections.quantization_config.values.disabled = false; + }, + 'wrong projection kind': (value) => { + quant(value).fieldAccounting.outputProjections.quantization_config.kind = 'runtime-object'; + }, + 'missing projection': (value) => { + quant(value).fieldAccounting.outputProjections = {}; + }, + 'false complete': (value) => { + quant(value).fieldAccounting.omittedFields.backend = 'missing'; + }, + 'missing status': (value) => { + delete value.fieldAccountingStatus; + }, + 'unknown status version': (value) => { + value.fieldAccountingStatus.schemaVersion = 2; + }, + 'oversize section': (value) => { + quant(value).fieldAccounting.unaccountedFields = Array(20).fill('x'.repeat(16000)); + quant(value).fieldAccounting.complete = false; + }, + }; + for (const [label, change] of Object.entries(changes)) { + const value = structuredClone(original); + change(value); + assert.equal(inputs.coerceResolvedExecutionInputs(value, identity), undefined, label); + } + const partial = structuredClone(original); + partial.fieldAccountingStatus.truncated = true; + delete quant(partial).fieldAccounting; + recipeNode(partial).fieldAccounting = { + schemaVersion: 1, + fields: {}, + inputProjections: {}, + outputProjections: {}, + unaccountedFields: [], + omittedFields: { accounting: 'record-size-limit' }, + complete: false, + }; + const parsed = inputs.coerceResolvedExecutionInputs(partial, identity); + assert.equal(parsed.fieldAccountingStatus.truncated, true); + assert.equal(recipeNode(parsed).fieldAccounting.complete, false); + assert.equal(parsed.truncated, false, 'optional extension limits never change v1 truncation'); + assert.deepEqual(parsed.summary, original.summary); + const old = receipt(); + const legacyIdentity = { taskId: 'actual-task', attemptIndex: 2, nodeId: 'preview' }; + assert.equal(JSON.stringify(inputs.coerceResolvedExecutionInputs(old, legacyIdentity)), JSON.stringify(old)); +}); + +test('video source and distinct condition strengths survive the actual backend receipt boundary', () => { + const backend = fileURLToPath(new URL('../../MoDiff/', import.meta.url)); + const python = + process.env.MODIFF_BACKEND_PYTHON || + `${backend}.venv/${process.platform === 'win32' ? 'Scripts/python.exe' : 'bin/python'}`; + const generated = spawnSync( + python, + [ + '-B', + '-c', + String.raw` +import json +from modiff.execution_input_provenance import capture_generation_inputs, build_resolved_execution_inputs +nodes = { + 'encode': {'module': 'modules.DiffusersVideo', 'action': 'EncodeInputs', 'params': {}}, + 'sample': {'module': 'modules.DiffusersVideo', 'action': 'Denoise', 'params': { + 'encoded_inputs': {'sourceId': 'encode', 'sourceKey': 'encoded_inputs'}}}, +} +records = { + 'encode': capture_generation_inputs('encode', nodes['encode'], {'video_source_sha256': 'a' * 64, 'video_source_frames': 121}), + 'sample': capture_generation_inputs('sample', nodes['sample'], {'conditioning_strength': .65, 'denoise_strength': .8}), +} +print(json.dumps(build_resolved_execution_inputs({'nodes': nodes}, records, task_id='video-input-contract', attempt_index=0, node_id='sample'))) +`, + ], + { cwd: backend, encoding: 'utf8', maxBuffer: 1_000_000 }, + ); + assert.equal(generated.status, 0, generated.stderr); + const capture = JSON.parse(generated.stdout); + assert.deepEqual(capture.summary, { + videoSourceSha256: 'a'.repeat(64), + videoSourceFrames: 121, + conditioningStrength: 0.65, + denoiseStrength: 0.8, + }); + const parsed = inputs.coerceResolvedExecutionInputs(capture, capture); + assert.deepEqual(parsed, capture); + const output = contracts.coerceStudioOutput({ + id: 'video-input-contract-output', + url: '/clip.mp4', + displayType: 'video', + taskId: capture.taskId, + nodeId: capture.nodeId, + attemptIndex: capture.attemptIndex, + resolvedExecutionInputs: capture, + }); + assert.deepEqual(output.resolvedExecutionInputs, capture); + assert.deepEqual(contracts.coerceStudioOutput(JSON.parse(JSON.stringify(output))).resolvedExecutionInputs, capture); + const unrelated = structuredClone(capture); + unrelated.nodes[0].module = 'modules.DiffusersImage'; + assert.equal( + inputs.coerceResolvedExecutionInputs(unrelated, unrelated), + undefined, + 'Source-video fields remain scoped to video encoding', + ); +}); + +test('SSR receipt imports and explicit watch requests allocate no filesystem watchers', () => { + assert.equal(server.config.server.watch, null); + assert.deepEqual(server.watcher.getWatched(), {}); + server.watcher.add([ + fileURLToPath(new URL('../src/studio/resolvedExecutionInputs.ts', import.meta.url)), + fileURLToPath(new URL('../public/template-gallery', import.meta.url)), + ]); + assert.deepEqual(server.watcher.getWatched(), {}); +}); + +test('receipt-free records never present coercion defaults as recorded task, model or numeric inputs', () => { + for (const displayType of ['text', 'json', 'image', 'video', 'audio']) { + const output = contracts.coerceStudioOutput({ id: 'unrecorded', url: '/asset', displayType }); + for (const restored of [output, contracts.coerceStudioOutput(JSON.parse(JSON.stringify(output)))]) { + assert.equal(tasks.outputTaskDisplay(restored), 'Task not captured'); + assert.equal(inputs.outputModelKey(restored), 'uncaptured-model'); + assert.equal(restored.modelLabel, 'Model not captured'); + for (const key of ['seed', 'width', 'height', 'steps', 'guidanceScale', 'numFrames', 'fps']) { + assert.equal(inputs.outputNumericInputValue(restored, key), undefined); + } + } + } +}); + +test('explicit legacy settings retain zero values and survive history without borrowing omitted fields', () => { + const output = contracts.coerceStudioOutput({ + id: 'legacy-partial', + url: '/clip.mp4', + seed: 0, + formSnapshot: { mode: 'text_to_video', modelType: 'WanVideoPipeline', fps: 15, numFrames: 81 }, + }); + for (const restored of [output, contracts.coerceStudioOutput(JSON.parse(JSON.stringify(output)))]) { + assert.equal(tasks.outputTaskDisplay(restored), 'Text to video'); + assert.equal(inputs.outputModelKey(restored), 'WanVideoPipeline'); + assert.equal(inputs.outputNumericInputValue(restored, 'seed'), 0); + assert.equal(inputs.outputNumericInputValue(restored, 'fps'), 15); + assert.equal(inputs.outputNumericInputValue(restored, 'numFrames'), 81); + assert.equal(inputs.outputNumericInputValue(restored, 'steps'), undefined); + } +}); + function capturedOutput(fields, extra = {}) { const evidence = receipt(); evidence.nodes[0].fields = Object.fromEntries( @@ -41,6 +1164,152 @@ function capturedOutput(fields, extra = {}) { }); } +function builtinHistoryOutput(kind, operation, extra = {}) { + const evidence = receipt(); + const owner = { + Image: ['modules.ImageOperations', 'ProcessImage'], + Audio: ['modules.Audio', 'ProcessAudio'], + Video: ['modules.Video', 'ProcessVideo'], + Data: ['modules.Text', 'ProcessText'], + }[kind]; + evidence.nodes = [ + { + nodeId: 'operation', + module: owner[0], + action: owner[1], + fields: { pipeline_class: { value: `Builtin${kind}OperationV1`, source: 'literal' } }, + omittedFields: {}, + }, + ]; + evidence.summary = { [kind === 'Data' ? 'dataOperationType' : 'modelType']: `Builtin${kind}OperationV1` }; + if (kind === 'Image') { + evidence.nodes[0].fields.executed_task = { value: operation, source: 'literal' }; + evidence.summary.executedTask = operation; + evidence.graphTasks = [{ loaderId: 'operation', pipelineClass: 'BuiltinImageOperationV1', task: operation }]; + } else if (kind !== 'Data') { + evidence.nodes[0].mediaEvidence = { + schemaVersion: 1, + status: 'complete', + source: 'native-builtin-media-v1', + controls: { pipeline_class: `Builtin${kind}OperationV1`, operation }, + inputs: {}, + outputs: {}, + files: {}, + }; + evidence.mediaEvidenceStatus = { schemaVersion: 1, truncated: false }; + } + return contracts.coerceStudioOutput({ + id: 'builtin-history', + url: '/retained-output', + taskId: evidence.taskId, + attemptIndex: evidence.attemptIndex, + nodeId: evidence.nodeId, + modelType: 'ZImageModularPipeline', + repo: profiles.STUDIO_MODEL_PROFILES.ZImageModularPipeline.defaultRepo, + formSnapshot: { modelType: 'ZImageModularPipeline', mode: 'text_to_image' }, + resolvedExecutionInputs: evidence, + ...extra, + }); +} + +test('native builtin operation history never inherits an unrelated model or repository', () => { + for (const [kind, operation] of [ + ['Image', 'image_crop'], + ['Audio', 'audio_trim'], + ['Video', 'frame_interpolation'], + ['Data', 'text_select'], + ]) { + const modelType = `Builtin${kind}Operation`; + let output = builtinHistoryOutput(kind, operation); + assert.ok(output.resolvedExecutionInputs, kind); + const rawReceipt = structuredClone(output.resolvedExecutionInputs); + for (let reload = 0; reload < 3; reload++) { + assert.equal(output.modelType, modelType, `${kind}: output identity`); + assert.equal(inputs.outputModelKey(output), modelType, `${kind}: filter identity`); + assert.equal(output.modelLabel, profiles.STUDIO_MODEL_PROFILES[modelType].label); + assert.equal(output.repo, profiles.STUDIO_MODEL_PROFILES[modelType].defaultRepo); + if (kind !== 'Data') { + assert.equal(output.mode, operation); + assert.equal(tasks.outputTaskDisplay(output), profiles.STUDIO_MODE_LABELS[operation]); + } + assert.equal(output.formSnapshot.modelType, 'ZImageModularPipeline', 'historical authoring form is preserved'); + assert.deepEqual(output.resolvedExecutionInputs, rawReceipt, 'native evidence is never rewritten'); + output = contracts.coerceStudioOutput(JSON.parse(JSON.stringify(output))); + } + } +}); + +test('a valid native receipt never borrows missing prompt or repository fields from a form', () => { + const output = capturedOutput( + { model_type: 'QwenImageModularPipeline' }, + { + prompt: 'stale form prompt', + negativePrompt: 'stale negative prompt', + repo: 'wrong/form-model', + }, + ); + for (const value of [output, contracts.coerceStudioOutput(JSON.parse(JSON.stringify(output)))]) { + assert.equal(value.repo, ''); + assert.equal(value.prompt, ''); + assert.equal(value.negativePrompt, ''); + } +}); + +test('builtin task labels require complete supported controls and never borrow the saved task', () => { + for (const kind of ['Audio', 'Video']) { + const operation = kind === 'Audio' ? 'audio_trim' : 'video_trim'; + const original = builtinHistoryOutput(kind, operation); + for (const mutate of [ + (evidence) => { + evidence.nodes[0].mediaEvidence = { schemaVersion: 1, status: 'unavailable', reason: 'not captured' }; + }, + (evidence) => { + evidence.nodes[0].mediaEvidence.controls.operation = 'not_a_supported_operation'; + }, + (evidence) => { + evidence.nodes[0].mediaEvidence.controls.pipeline_class = 'ForeignPipeline'; + }, + (evidence) => { + evidence.graphTasks = []; + }, + ]) { + const candidate = structuredClone(original); + mutate(candidate.resolvedExecutionInputs); + const output = contracts.coerceStudioOutput(candidate); + assert.ok( + output.resolvedExecutionInputs, + 'the bounded receipt remains valid; missing task authority is not invented', + ); + assert.equal(tasks.outputTaskDisplay(output), 'Task not uniquely captured'); + assert.equal(output.formSnapshot.mode, 'text_to_image'); + } + } +}); + +test('multiple native deterministic operations retain their profile without inventing one task', () => { + const candidate = builtinHistoryOutput('Audio', 'audio_trim'); + const next = structuredClone(candidate.resolvedExecutionInputs.nodes[0]); + next.nodeId = 'second-operation'; + next.mediaEvidence.controls.operation = 'audio_join'; + candidate.resolvedExecutionInputs.nodes.push(next); + const output = contracts.coerceStudioOutput(candidate); + assert.ok(output.resolvedExecutionInputs); + assert.equal(inputs.outputModelKey(output), 'BuiltinAudioOperation'); + assert.equal(tasks.outputTaskDisplay(output), 'Task not uniquely captured'); +}); + +test('builtin display aliases require their exact native owner instead of a model-name suffix', () => { + const candidate = builtinHistoryOutput('Audio', 'audio_trim'); + delete candidate.resolvedExecutionInputs.nodes[0].mediaEvidence; + delete candidate.resolvedExecutionInputs.mediaEvidenceStatus; + candidate.resolvedExecutionInputs.nodes[0].module = 'modules.Foreign'; + const output = contracts.coerceStudioOutput(candidate); + assert.ok(output.resolvedExecutionInputs); + assert.notEqual(inputs.outputModelKey(output), 'BuiltinAudioOperation'); + assert.equal(output.repo, ''); + assert.equal(tasks.outputTaskDisplay(output), 'Task not uniquely captured'); +}); + test('captured model identity replaces stale labels for every registered model and custom pipelines', () => { for (const [modelType, profile] of Object.entries(profiles.STUDIO_MODEL_PROFILES)) { const output = capturedOutput({ model_type: modelType }); @@ -169,6 +1438,532 @@ function receipt() { }; } +function adapterSummaryReceipt(module, action) { + const capture = receipt(); + capture.nodes = [ + { + nodeId: 'loader', + module: 'modules.DiffusersImage', + action: 'LoadPipeline', + fields: { + model_id: { value: 'owner/model', source: 'literal' }, + revision: { value: 'a'.repeat(40), source: 'literal' }, + }, + omittedFields: {}, + }, + { + nodeId: 'adapter', + module, + action, + fields: { revision: { value: 'b'.repeat(40), source: 'literal' } }, + omittedFields: {}, + }, + ]; + capture.summary = { repo: 'owner/model', revision: 'a'.repeat(40) }; + capture.summaryScopeVersion = 2; + return capture; +} + +test('scoped adapter summaries retain exact node evidence and legacy receipt semantics', () => { + for (const [module, action] of [ + ['ModularDiffusers', 'Lora'], + ['DiffusersImage', 'LoadAdapter'], + ['DiffusersAudio', 'LoadAdapter'], + ]) { + for (const prefix of ['', 'modules.']) { + const capture = adapterSummaryReceipt(prefix + module, action); + for (const reverse of [false, true]) { + const value = structuredClone(capture); + if (reverse) value.nodes.reverse(); + const original = JSON.stringify(value); + const parsed = inputs.coerceResolvedExecutionInputs(value, value); + assert.ok(parsed, `${module}.${action} reversed=${reverse}`); + assert.equal(parsed.summaryScopeVersion, 2); + assert.deepEqual(parsed.nodes, value.nodes); + assert.deepEqual(parsed.summary, value.summary); + assert.equal(JSON.stringify(value), original, 'never rewrite original evidence'); + assert.deepEqual(inputs.coerceResolvedExecutionInputs(JSON.parse(JSON.stringify(parsed)), parsed), parsed); + } + const omitted = structuredClone(capture); + omitted.nodes[1].fields = {}; + omitted.nodes[1].omittedFields = { revision: 'unsupported-value' }; + assert.deepEqual(inputs.coerceResolvedExecutionInputs(omitted, omitted)?.summary, capture.summary); + const legacy = structuredClone(capture); + delete legacy.summaryScopeVersion; + delete legacy.summary.revision; + legacy.ambiguousFields = ['revision']; + const parsed = inputs.coerceResolvedExecutionInputs(legacy, legacy); + assert.ok(parsed); + assert.equal(parsed.summaryScopeVersion, undefined); + assert.deepEqual(parsed.summary, { repo: 'owner/model' }); + assert.deepEqual(parsed.ambiguousFields, ['revision']); + } + } +}); + +test('scoped summaries reject forged model identity, unknown scope versions and custom lookalikes', () => { + const capture = adapterSummaryReceipt('modules.ModularDiffusers', 'Lora'); + for (const version of [1, 3, null, true, '2']) { + const value = structuredClone(capture); + value.summaryScopeVersion = version; + assert.equal(inputs.coerceResolvedExecutionInputs(value, value), undefined, String(version)); + } + for (const [module, action] of [ + ['modules.custom.ModularDiffusers', 'Lora'], + ['modules.ModularDiffusers', 'CustomLora'], + ['modules.DiffusersImage', 'LoadPipeline'], + ['modules.DiffusersAudio', 'LoadPipeline'], + ]) { + const value = adapterSummaryReceipt(module, action); + assert.equal(inputs.coerceResolvedExecutionInputs(value, value), undefined, `${module}.${action}`); + } + const forged = structuredClone(capture); + forged.summary.revision = 'b'.repeat(40); + assert.equal(inputs.coerceResolvedExecutionInputs(forged, forged), undefined); + const missingMarker = structuredClone(capture); + delete missingMarker.summaryScopeVersion; + assert.equal(inputs.coerceResolvedExecutionInputs(missingMarker, missingMarker), undefined); + const multiple = structuredClone(capture); + multiple.nodes.push({ ...structuredClone(capture.nodes[0]), nodeId: 'other-loader' }); + multiple.nodes[2].fields.revision.value = 'c'.repeat(40); + assert.equal(inputs.coerceResolvedExecutionInputs(multiple, multiple), undefined); + delete multiple.summary.revision; + multiple.ambiguousFields = ['revision']; + assert.ok(inputs.coerceResolvedExecutionInputs(multiple, multiple), 'real owner ambiguity remains explicit'); + const malformed = structuredClone(capture); + malformed.nodes[1].fields.revision.value = { opaque: true }; + assert.equal(inputs.coerceResolvedExecutionInputs(malformed, malformed), undefined, 'excluded fields still validate'); +}); + +test('actual backend adapter summary projections survive the paired history parser', () => { + const backend = fileURLToPath(new URL('../../MoDiff/', import.meta.url)); + const python = + process.env.MODIFF_BACKEND_PYTHON || + `${backend}.venv/${process.platform === 'win32' ? 'Scripts/python.exe' : 'bin/python'}`; + const generated = spawnSync( + python, + [ + '-B', + '-c', + String.raw` +import json +from modiff.execution_input_provenance import capture_generation_inputs, build_resolved_execution_inputs +receipts = [] +for module, action in [('ModularDiffusers', 'Lora'), ('DiffusersImage', 'LoadAdapter'), ('DiffusersAudio', 'LoadAdapter')]: + for omitted in (False, True): + graph = {'nodes': { + 'loader': {'module': 'modules.DiffusersImage', 'action': 'LoadPipeline', 'params': {}}, + 'adapter': {'module': 'modules.' + module, 'action': action, 'params': { + 'pipeline': {'sourceId': 'loader', 'sourceKey': 'pipeline'}}}}} + records = { + 'loader': capture_generation_inputs('loader', graph['nodes']['loader'], {'model_id': 'owner/model', 'revision': 'a' * 40}), + 'adapter': capture_generation_inputs('adapter', graph['nodes']['adapter'], {'revision': object() if omitted else 'b' * 40})} + receipts.append(build_resolved_execution_inputs(graph, records, task_id='paired', attempt_index=0, node_id='adapter')) +print(json.dumps(receipts)) +`, + ], + { cwd: backend, encoding: 'utf8', maxBuffer: 1_000_000 }, + ); + assert.equal(generated.status, 0, generated.stderr); + const captures = JSON.parse(generated.stdout); + assert.equal(captures.length, 6); + for (const capture of captures) { + assert.equal(capture.summaryScopeVersion, 2); + assert.deepEqual(capture.summary, { repo: 'owner/model', revision: 'a'.repeat(40) }); + assert.deepEqual(inputs.coerceResolvedExecutionInputs(capture, capture), capture); + } +}); + +function appliedAdapterReceipt(observation = 'activated') { + const capture = receipt(); + const adapters = [0, 1, 0.75].map((scale, index) => ({ + adapterName: `protocol_${index}`, + scale, + descriptorSha256: String(index + 1).repeat(64), + artifact: { + source: 'hub', + repository: `protocol/adapter-${index}`, + revision: 'a'.repeat(40), + weightName: 'adapter.safetensors', + sha256: String(index + 4).repeat(64), + }, + scheduler: null, + })); + capture.nodes.push({ + nodeId: 'loader', + module: 'modules.ModularDiffusers', + action: 'ModelsLoader', + fields: {}, + omittedFields: {}, + appliedAdapters: { + schemaVersion: 1, + status: 'complete', + source: 'backend-adapter-application', + applicationId: 'a'.repeat(32), + observation, + adapters, + stateSha256: `sha256:applied-adapters-v1:${canonicalJsonHash({ adapters })}`, + }, + }); + capture.appliedAdaptersStatus = { schemaVersion: 1, truncated: false }; + return capture; +} + +test('applied adapter observations survive history without changing any legacy receipt byte', () => { + for (const observation of ['activated', 'reused']) { + const capture = appliedAdapterReceipt(observation); + const identity = { taskId: capture.taskId, attemptIndex: capture.attemptIndex, nodeId: capture.nodeId }; + const legacy = structuredClone(capture); + delete legacy.appliedAdaptersStatus; + delete legacy.nodes[1].appliedAdapters; + const before = JSON.stringify(inputs.coerceResolvedExecutionInputs(legacy, identity)); + const result = inputs.coerceResolvedExecutionInputs(capture, identity); + assert.deepEqual(result.nodes[1].appliedAdapters, capture.nodes[1].appliedAdapters); + assert.deepEqual(result.appliedAdaptersStatus, capture.appliedAdaptersStatus); + const stripped = structuredClone(result); + delete stripped.appliedAdaptersStatus; + delete stripped.nodes[1].appliedAdapters; + assert.equal(JSON.stringify(stripped), before); + const restored = contracts.coerceStudioOutput({ + id: 'protocol-only', + url: '/fixture.png', + ...identity, + resolvedExecutionInputs: capture, + }); + assert.deepEqual(restored.resolvedExecutionInputs, result); + } + const unicodeAlias = appliedAdapterReceipt(); + unicodeAlias.nodes[1].appliedAdapters.adapters[0].artifact.weightName = '😀'.repeat(140) + '.safetensors'; + assert.ok( + inputs.coerceResolvedExecutionInputs(unicodeAlias, unicodeAlias), + 'Backend alias bounds count Unicode code points.', + ); +}); + +test('actual backend applied adapter producer survives history and locks Python numeric and lifecycle identities', () => { + for (const [kind, { receipt: capture, originalReceipt, apiGraph }] of Object.entries( + actualAppliedAdapterFixtures(), + )) { + const identity = { taskId: capture.taskId, attemptIndex: capture.attemptIndex, nodeId: capture.nodeId }; + const parsed = inputs.coerceResolvedExecutionInputs(capture, identity); + assert.ok(parsed, kind); + const original = capture.nodes.find((node) => node.appliedAdapters)?.appliedAdapters; + assert.deepEqual(parsed.nodes.find((node) => node.appliedAdapters)?.appliedAdapters, original, kind); + const restored = contracts.coerceStudioOutput({ + id: 'protocol-only', + url: '/fixture.png', + ...identity, + resolvedExecutionInputs: capture, + }); + assert.deepEqual(restored.resolvedExecutionInputs, parsed); + const args = protocolFactoryArguments(apiGraph); + args.taskId = capture.taskId; + args.executedOutput = { + ...args.executedOutput, + ...identity, + apiGraphSnapshot: apiGraph, + resolvedExecutionInputs: capture, + }; + args.executionReceipt = { + ...args.executionReceipt, + task_id: capture.taskId, + attempt_index: capture.attemptIndex, + status: 'completed', + }; + const proof = createRunProvenance(args); + // This tiny adapter-dispatch fixture has no declared resource plan. Keep + // that existing hold; adapter evidence must not manufacture qualification. + const baselineArgs = structuredClone(args); + delete baselineArgs.executedOutput.resolvedExecutionInputs; + assert.deepEqual(proof.blockers, createRunProvenance(baselineArgs).blockers, kind); + assert.deepEqual(proof.blockers, ['execution.resourceCandidateId is missing.'], kind); + if (kind === 'unavailable') { + assert.throws(() => validateAppliedAdapterProof(proof, { required: true }), /unavailable/); + continue; + } + const locked = validateAppliedAdapterProof(proof, { required: true }).owners[0].application; + assert.deepEqual(locked, original); + assert.equal(locked.stateSha256, `sha256:applied-adapters-v1:${canonicalJsonHash({ adapters: locked.adapters })}`); + assert.deepEqual( + locked.adapters.map((item) => item.scale), + kind === 'empty' ? [] : [0, 1, 0.75], + ); + if (kind !== 'empty') + assert.ok(locked.adapters.every((item) => item.artifact.weightName === 'weights/adapter.safetensors')); + assert.equal(locked.observation, kind === 'reused' ? 'reused' : 'activated'); + if (kind === 'reused') + assert.equal( + locked.applicationId, + originalReceipt.nodes.find((node) => node.appliedAdapters).appliedAdapters.applicationId, + ); + const legacy = structuredClone(capture); + delete legacy.appliedAdaptersStatus; + for (const node of legacy.nodes) delete node.appliedAdapters; + const stripped = structuredClone(parsed); + delete stripped.appliedAdaptersStatus; + for (const node of stripped.nodes) delete node.appliedAdapters; + assert.equal( + JSON.stringify(stripped), + JSON.stringify(inputs.coerceResolvedExecutionInputs(legacy, identity)), + kind, + ); + } +}); + +test('applied adapter history rejects unknown scopes, opaque values and malformed lifecycle evidence', () => { + const changes = { + 'foreign owner': (v) => { + v.nodes[1].action = 'AutoModelLoader'; + }, + 'foreign module': (v) => { + v.nodes[1].module = 'modules.Foreign'; + }, + 'missing status': (v) => { + delete v.appliedAdaptersStatus; + }, + 'unknown status key': (v) => { + v.appliedAdaptersStatus.secret = 'opaque'; + }, + 'false complete envelope': (v) => { + delete v.nodes[1].appliedAdapters; + }, + 'unknown section key': (v, a) => { + a.localPath = '/private'; + }, + 'unknown version': (v, a) => { + a.schemaVersion = 2; + }, + 'wrong source': (v, a) => { + a.source = 'submitted-graph'; + }, + 'invalid application ID': (v, a) => { + a.applicationId = 'A'.repeat(32); + }, + 'invented observation': (v, a) => { + a.observation = 'assumed'; + }, + 'invalid state hash': (v, a) => { + a.stateSha256 = 'a'.repeat(64); + }, + 'too many adapters': (v, a) => { + a.adapters = Array(33).fill(a.adapters[0]); + }, + 'oversize UTF8 payload': (v, a) => { + a.adapters = Array.from({ length: 32 }, (_, index) => ({ + ...a.adapters[0], + adapterName: `style_${index}`, + artifact: { ...a.adapters[0].artifact, weightName: '界'.repeat(240) + '.safetensors' }, + })); + }, + 'duplicate names': (v, a) => { + a.adapters[1].adapterName = a.adapters[0].adapterName; + }, + 'oversize name': (v, a) => { + a.adapters[0].adapterName = 'a'.repeat(129); + }, + 'path name': (v, a) => { + a.adapters[0].adapterName = 'C:/private/adapter'; + }, + 'url name': (v, a) => { + a.adapters[0].adapterName = 'https://private/adapter'; + }, + 'repository url': (v, a) => { + a.adapters[0].artifact.repository = 'https://private/adapter'; + }, + 'repository alias': (v, a) => { + a.adapters[0].artifact.repository = 'protocol/adapter.git'; + }, + 'unsupported weight': (v, a) => { + a.adapters[0].artifact.weightName = 'adapter.bin'; + }, + 'boolean scale': (v, a) => { + a.adapters[0].scale = false; + }, + 'string scale': (v, a) => { + a.adapters[0].scale = '1'; + }, + 'out of bounds scale': (v, a) => { + a.adapters[0].scale = 21; + }, + 'opaque scale': (v, a) => { + a.adapters[0].scale = {}; + }, + 'nonfinite scale': (v, a) => { + a.adapters[0].scale = Infinity; + }, + 'unknown descriptor digest': (v, a) => { + a.adapters[0].descriptorSha256 = 'bad'; + }, + 'opaque artifact': (v, a) => { + a.adapters[0].artifact.private = '/private'; + }, + 'coerced source': (v, a) => { + a.adapters[0].artifact.source = ['local']; + delete a.adapters[0].artifact.repository; + delete a.adapters[0].artifact.revision; + }, + 'mutable revision': (v, a) => { + a.adapters[0].artifact.revision = 'main'; + }, + 'path traversal': (v, a) => { + a.adapters[0].artifact.weightName = '../weights.safetensors'; + }, + 'bad artifact digest': (v, a) => { + a.adapters[0].artifact.sha256 = 'A'.repeat(64); + }, + 'opaque scheduler': (v, a) => { + a.adapters[0].scheduler = { className: 'Scheduler', config: {} }; + }, + 'coerced scheduler': (v, a) => { + a.adapters[0].scheduler = []; + }, + }; + for (const [label, mutate] of Object.entries(changes)) { + const capture = appliedAdapterReceipt(); + mutate(capture, capture.nodes[1].appliedAdapters); + assert.equal(inputs.coerceResolvedExecutionInputs(capture, capture), undefined, label); + } + for (const section of [ + { schemaVersion: 1, status: 'unavailable', reason: 'unobserved-application' }, + { schemaVersion: 1, status: 'unavailable', reason: 'owner-invalidated' }, + { schemaVersion: 1, status: 'truncated', reason: 'record-size-limit' }, + ]) { + const capture = appliedAdapterReceipt(); + capture.nodes[1].appliedAdapters = section; + assert.deepEqual(inputs.coerceResolvedExecutionInputs(capture, capture).nodes[1].appliedAdapters, section); + capture.nodes[1].appliedAdapters.reason = [section.reason]; + assert.equal(inputs.coerceResolvedExecutionInputs(capture, capture), undefined); + } + const dropped = appliedAdapterReceipt(); + delete dropped.nodes[1].appliedAdapters; + dropped.appliedAdaptersStatus.truncated = true; + assert.deepEqual( + inputs.coerceResolvedExecutionInputs(dropped, dropped).appliedAdaptersStatus, + dropped.appliedAdaptersStatus, + ); +}); + +test('only the actual native loader capture accepts the exact consumed weight format', () => { + const identity = { taskId: 'actual-task', attemptIndex: 2, nodeId: 'preview' }; + const make = (value, module = 'modules.ModularDiffusers', action = 'ModelsLoader') => { + const capture = receipt(); + capture.nodes.push({ + nodeId: 'weight-owner', + module, + action, + fields: { weight_format: { value, source: 'literal' } }, + omittedFields: {}, + }); + capture.summary.weightFormat = value; + return capture; + }; + for (const value of ['native', 'fp8r', 'nvfp4']) { + for (const module of ['modules.ModularDiffusers', 'ModularDiffusers']) { + const evidence = make(value, module); + assert.deepEqual(inputs.coerceResolvedExecutionInputs(evidence, identity), evidence); + const restored = contracts.coerceStudioOutput({ + id: 'weights', + url: '/out.png', + ...identity, + resolvedExecutionInputs: JSON.parse(JSON.stringify(evidence)), + }); + assert.equal(restored.resolvedExecutionInputs.summary.weightFormat, value); + const forged = structuredClone(evidence); + forged.summary.weightFormat = value === 'native' ? 'fp8r' : 'native'; + assert.equal(inputs.coerceResolvedExecutionInputs(forged, identity), undefined); + } + } + for (const invalid of ['', 'auto', 'FP8R', true, null, 1, ['native'], {}]) + assert.equal(inputs.coerceResolvedExecutionInputs(make(invalid), identity), undefined); + for (const [module, action] of [ + ['modules.ModularDiffusers', 'EncodePrompt'], + ['modules.DiffusersImage', 'LoadPipeline'], + ['modules.Foreign', 'ModelsLoader'], + ]) + assert.equal(inputs.coerceResolvedExecutionInputs(make('native', module, action), identity), undefined); + const wrongLabel = make('native'); + wrongLabel.summary = { ...receipt().summary, weight_format: 'native' }; + assert.equal(inputs.coerceResolvedExecutionInputs(wrongLabel, identity), undefined); + assert.equal(inputs.coerceResolvedExecutionInputs(receipt(), identity).summary.weightFormat, undefined); +}); + +test('connected native NF4 consumed configuration survives strict output history as a bounded flat list', () => { + // Match the validated backend adapter's successful snapshot, not Python + // config objects or a client-derived claim about loaded tensor precision. + const consumed = [ + 'transformer:weight_format=nvfp4;compute_dtype=bfloat16;load_device=cpu', + 'text_encoder:quantization=bnb_4bit;quant_type=nf4;compute_dtype=bfloat16', + 'text_encoder:double_quant=true;quant_storage=uint8;load_device=cuda:0', + 'text_encoder:skip_modules=model.visual,lm_head', + 'text_encoder:converted_linear_count=252', + 'text_encoder:placement=model_cpu;current_device=cpu', + 'text_encoder:recipe_id=flux3-qwen3vl-language-nf4:v1', + `text_encoder:signature=${'d'.repeat(64)}`, + ]; + const backend = fileURLToPath(new URL('../../MoDiff/', import.meta.url)); + const python = + process.env.MODIFF_BACKEND_PYTHON || + `${backend}.venv/${process.platform === 'win32' ? 'Scripts/python.exe' : 'bin/python'}`; + const generated = spawnSync( + python, + [ + '-B', + '-c', + String.raw` +import json, sys +from modiff.execution_input_provenance import capture_generation_inputs, bind_generation_input_origins, build_resolved_execution_inputs +consumed = json.load(sys.stdin) +nodes = { + "quantization": {"module": "modules.ModularDiffusers", "action": "QuantizationConfigNode", "params": {}}, + "loader": {"module": "modules.ModularDiffusers", "action": "ModelsLoader", "params": { + "quant_config": {"sourceId": "quantization", "sourceKey": "quantization_config"}}}, + "preview": {"module": "modules.Image", "action": "Preview", "params": { + "image": {"sourceId": "loader", "sourceKey": "vae_out"}}}, +} +args = {"model_type": "Flux3DistilledModularPipeline", "weight_format": "nvfp4", + "quant_config": consumed, "weight_loading_mode": "cpu"} +records = {key: capture_generation_inputs(key, node, args if key == "loader" else {}) + for key, node in nodes.items()} +records["loader"] = bind_generation_input_origins("loader", nodes["loader"], records["loader"]) +print(json.dumps(build_resolved_execution_inputs({"nodes": nodes}, records, + task_id="actual-task", attempt_index=2, node_id="preview"))) +`, + ], + { cwd: backend, encoding: 'utf8', input: JSON.stringify(consumed) }, + ); + assert.equal(generated.status, 0, generated.stderr); + const capture = JSON.parse(generated.stdout); + const identity = { taskId: 'actual-task', attemptIndex: 2, nodeId: 'preview' }; + const field = capture.nodes.find((node) => node.nodeId === 'loader').fields.quant_config; + assert.deepEqual(field, { + value: consumed, + source: 'connected', + sourceNodeId: 'quantization', + sourcePortId: 'quantization_config', + }); + assert.deepEqual(capture.summary.quantConfig, consumed); + assert.deepEqual(inputs.coerceResolvedExecutionInputs(capture, identity), capture); + let output = contracts.coerceStudioOutput({ + id: 'parent-nf4', + url: '/image.webp', + ...identity, + resolvedExecutionInputs: capture, + }); + for (let reload = 0; reload < 2; reload++) { + assert.deepEqual(output.resolvedExecutionInputs, capture); + output = contracts.coerceStudioOutput(JSON.parse(JSON.stringify(output))); + } + for (const invalid of [[{ recipeId: 'not-a-flat-snapshot' }], [consumed], Array(17).fill('entry')]) { + const malformed = structuredClone(capture); + malformed.nodes.find((node) => node.nodeId === 'loader').fields.quant_config.value = invalid; + malformed.summary.quantConfig = invalid; + assert.equal(inputs.coerceResolvedExecutionInputs(malformed, identity), undefined); + } + const changed = structuredClone(capture); + changed.summary.quantConfig[2] = 'text_encoder:load_device=cpu'; + assert.equal(inputs.coerceResolvedExecutionInputs(changed, identity), undefined); +}); + test('merged video metadata keeps requested, consumed and encoded dimensions distinct', () => { const value = contracts.coerceStudioOutput({ id: 'video', @@ -253,6 +2048,253 @@ test('receipt requires exact task attempt/output identity and a summary derived assert.equal(inputs.coerceResolvedExecutionInputs(badOrigin, identity), undefined); }); +test('captured native and whole-pipeline attention/VAE policies survive history and retain ambiguity', () => { + const identity = { taskId: 'actual-task', attemptIndex: 2, nodeId: 'preview' }; + for (const [slicing, tiling] of [ + ['vae_slicing', 'vae_tiling'], + ['enable_vae_slicing', 'enable_vae_tiling'], + ]) { + const capture = receipt(); + Object.assign(capture.nodes[0].fields, { + attention_backend: { value: '_native_math', source: 'literal' }, + [slicing]: { value: true, source: 'literal' }, + [tiling]: { value: false, source: 'literal' }, + }); + Object.assign(capture.summary, { attentionBackend: '_native_math', vaeSlicing: true, vaeTiling: false }); + assert.deepEqual(inputs.coerceResolvedExecutionInputs(capture, identity), capture); + const restored = contracts.coerceStudioOutput( + JSON.parse(JSON.stringify({ id: 'policies', url: '/image.webp', ...identity, resolvedExecutionInputs: capture })), + ); + assert.deepEqual(restored.resolvedExecutionInputs, capture); + const unknown = structuredClone(capture); + unknown.nodes[0].fields.enable_vae_unknown = { value: true, source: 'literal' }; + assert.equal(inputs.coerceResolvedExecutionInputs(unknown, identity), undefined); + } + const mixed = receipt(); + Object.assign(mixed.nodes[0].fields, { + vae_slicing: { value: true, source: 'literal' }, + enable_vae_slicing: { value: false, source: 'literal' }, + }); + mixed.ambiguousFields = ['vaeSlicing']; + assert.deepEqual(inputs.coerceResolvedExecutionInputs(mixed, identity), mixed); +}); + +test('captured weight loading mode survives output history', () => { + const identity = { taskId: 'actual-task', attemptIndex: 2, nodeId: 'preview' }; + for (const value of ['cpu', 'cuda', 'ssd_stream']) { + const capture = receipt(); + capture.nodes.push({ + nodeId: 'loader', + module: 'modules.ModularDiffusers', + action: 'ModelsLoader', + fields: { weight_loading_mode: { value, source: 'literal' } }, + omittedFields: {}, + }); + capture.summary.weightLoadingMode = value; + assert.deepEqual(inputs.coerceResolvedExecutionInputs(capture, identity), capture); + const restored = contracts.coerceStudioOutput( + JSON.parse( + JSON.stringify({ + id: 'weight-loading', + url: '/image.webp', + ...identity, + resolvedExecutionInputs: capture, + }), + ), + ); + assert.deepEqual(restored.resolvedExecutionInputs, capture); + assert.equal(restored.resolvedExecutionInputs.summary.weightLoadingMode, value); + const forged = structuredClone(capture); + forged.summary.weightLoadingMode = value === 'cpu' ? 'cuda' : 'cpu'; + assert.equal(inputs.coerceResolvedExecutionInputs(forged, identity), undefined); + } + for (const value of ['auto', 'CUDA', '', true, null, 1, ['cpu']]) { + const capture = receipt(); + capture.nodes.push({ + nodeId: 'loader', + module: 'modules.ModularDiffusers', + action: 'ModelsLoader', + fields: { weight_loading_mode: { value, source: 'literal' } }, + omittedFields: {}, + }); + capture.summary.weightLoadingMode = value; + assert.equal(inputs.coerceResolvedExecutionInputs(capture, identity), undefined); + } + assert.equal(inputs.coerceResolvedExecutionInputs(receipt(), identity).summary.weightLoadingMode, undefined); + const mixed = receipt(); + mixed.nodes.push( + ...['cpu', 'cuda'].map((value) => ({ + nodeId: `loader-${value}`, + module: 'modules.ModularDiffusers', + action: 'ModelsLoader', + fields: { weight_loading_mode: { value, source: 'literal' } }, + omittedFields: {}, + })), + ); + mixed.ambiguousFields = ['weightLoadingMode']; + assert.deepEqual(inputs.coerceResolvedExecutionInputs(mixed, identity), mixed); + const omitted = receipt(); + omitted.nodes.push({ + nodeId: 'loader', + module: 'modules.ModularDiffusers', + action: 'ModelsLoader', + fields: {}, + omittedFields: { weight_loading_mode: 'opaque input' }, + }); + omitted.unavailableFields = ['weightLoadingMode']; + assert.deepEqual(inputs.coerceResolvedExecutionInputs(omitted, identity), omitted); +}); + +test('audio creative inputs survive history with exact Unicode and reject other node scopes', () => { + const identity = { taskId: 'audio-creative', attemptIndex: 0, nodeId: 'generate' }; + const values = { + lyrics: 'MoDiff—三拍', + vocal_language: 'en', + shift: 3, + bpm: 170, + keyscale: 'C# minor', + timesignature: '3', + }; + const capture = { + schemaVersion: 1, + source: 'backend-execution', + ...identity, + nodes: [ + { + nodeId: 'generate', + module: 'modules.DiffusersAudio', + action: 'Generate', + fields: Object.fromEntries(Object.entries(values).map(([key, value]) => [key, { value, source: 'literal' }])), + omittedFields: {}, + }, + ], + summary: { + lyrics: values.lyrics, + vocalLanguage: 'en', + shift: 3, + bpm: 170, + keyscale: 'C# minor', + timesignature: '3', + }, + ambiguousFields: [], + unavailableFields: [], + uncapturedNodeIds: [], + truncated: false, + }; + assert.deepEqual(inputs.coerceResolvedExecutionInputs(capture, identity), capture); + const restored = contracts.coerceStudioOutput({ + id: 'audio-creative', + url: '/song.wav', + ...identity, + resolvedExecutionInputs: capture, + }); + assert.deepEqual(restored.resolvedExecutionInputs, capture); + const wrongScope = structuredClone(capture); + wrongScope.nodes[0].module = 'modules.Image'; + wrongScope.nodes[0].action = 'Preview'; + assert.equal(inputs.coerceResolvedExecutionInputs(wrongScope, identity), undefined); + const forged = structuredClone(capture); + forged.summary.lyrics = 'invented'; + assert.equal(inputs.coerceResolvedExecutionInputs(forged, identity), undefined); + const legacy = structuredClone(capture); + legacy.nodes[0].fields = {}; + legacy.summary = {}; + assert.deepEqual( + inputs.coerceResolvedExecutionInputs(legacy, identity), + legacy, + 'never backfill older audio evidence', + ); +}); + +test('audio dispatch tensor identities stay node-local through history restore', () => { + const identity = { taskId: 'audio-dispatch', attemptIndex: 0, nodeId: 'generate' }; + const capture = { + schemaVersion: 1, + source: 'backend-execution', + ...identity, + nodes: [ + { + nodeId: identity.nodeId, + module: 'modules.DiffusersAudio', + action: 'Generate', + fields: { + seed: { value: 8, source: 'literal' }, + task_type: { value: 'repaint', source: 'literal' }, + repainting_start: { value: 0, source: 'literal' }, + repainting_end: { value: 10, source: 'literal' }, + src_audio_sha256: { + value: 'a'.repeat(64), + source: 'connected', + sourceNodeId: 'source', + sourcePortId: 'audio', + }, + src_audio_shape: { value: [2, 1440000], source: 'connected', sourceNodeId: 'source', sourcePortId: 'audio' }, + }, + omittedFields: { reference_audio_shape: 'unsupported-value' }, + }, + ], + summary: { seed: 8 }, + ambiguousFields: [], + unavailableFields: [], + uncapturedNodeIds: [], + truncated: false, + }; + assert.deepEqual(inputs.coerceResolvedExecutionInputs(capture, identity), capture); + assert.deepEqual( + contracts.coerceStudioOutput({ id: 'audio', url: '/song.wav', ...identity, resolvedExecutionInputs: capture }) + .resolvedExecutionInputs, + capture, + ); + const forged = structuredClone(capture); + forged.summary.audioTaskType = 'repaint'; + assert.equal(inputs.coerceResolvedExecutionInputs(forged, identity), undefined); + const wrongScope = structuredClone(capture); + wrongScope.nodes[0].action = 'Other'; + assert.equal(inputs.coerceResolvedExecutionInputs(wrongScope, identity), undefined); + const nested = structuredClone(capture); + nested.nodes[0].fields.src_audio_shape.value = [[2, 1440000]]; + assert.equal(inputs.coerceResolvedExecutionInputs(nested, identity), undefined); +}); + +test('A14B low-noise guidance retains its node-local connected-control evidence', () => { + const identity = { taskId: 'a14b-staged', attemptIndex: 0, nodeId: 'output' }; + const capture = { + schemaVersion: 1, + source: 'backend-execution', + ...identity, + nodes: [ + { + nodeId: 'sample', + module: 'modules.DiffusersVideo', + action: 'Denoise', + fields: { + secondary_guidance_scale: { + value: 2, + source: 'connected', + sourceNodeId: 'low-noise-control', + sourcePortId: 'value', + }, + }, + omittedFields: {}, + }, + ], + summary: { guidanceScale2: 2 }, + ambiguousFields: [], + unavailableFields: [], + uncapturedNodeIds: [], + truncated: false, + }; + assert.deepEqual(inputs.coerceResolvedExecutionInputs(capture, identity), capture); + const foreign = structuredClone(capture); + foreign.nodes[0].module = 'modules.DiffusersImage'; + foreign.nodes[0].action = 'Generate'; + assert.equal( + inputs.coerceResolvedExecutionInputs(foreign, identity), + undefined, + 'a scoped video control must not become an accepted arbitrary image field', + ); +}); + test('every backend capture field survives client history parsing with node-scoped adapter identity', () => { const backend = fileURLToPath(new URL('../../MoDiff/', import.meta.url)); const python = @@ -266,13 +2308,23 @@ test('every backend capture field survives client history parsing with node-scop import json from modiff.execution_input_provenance import FIELD_NAMES, NODE_FIELD_NAMES, capture_generation_inputs, build_resolved_execution_inputs cases = [] -for prefix in ("", "modules."): +for prefix, weight_mode in [(p, w) for p in ("", "modules.") for w in ("cpu", "cuda")]: nodes, records = {}, {} scopes = [("DiffusersImage", "Generate", FIELD_NAMES), *[(m, a, fields) for (m, a), fields in NODE_FIELD_NAMES.items()], ("Text", "ProcessText", {"pipeline_class": "dataOperationType"})] for index, (module, action, fields) in enumerate(scopes): key = str(index) node = {"module": prefix + module, "action": action, "params": {}} args = {name: "scope-" + str(index) + "-" + name for name in fields} + if "weight_loading_mode" in args: args["weight_loading_mode"] = weight_mode + if "weight_format" in args: args["weight_format"] = "native" + enhancement = {"operation": "enhance_prompt", "enhancement_max_new_tokens": 2, + "prompt_adapter_id": "transformers-prompt-enhancement-v1", "system_prompt_mode": "i2i", + "system_prompt_sha256": "a" * 64, "rendered_prompt_sha256": "sha256:" + "b" * 64, + "rendered_prompt_utf8_bytes": 64, "rendered_input_ids_sha256": "sha256:" + "c" * 64, + "reference_source_sha256": ["sha256:" + "d" * 64], + "processed_pixel_sha256": "sha256:" + "e" * 64, "processed_pixel_shape": [4, 5], + "processed_grid_sha256": "sha256:" + "f" * 64, "processed_grid_shape": [1, 3]} + args.update({name: value for name, value in enhancement.items() if name in args}) for name in ("conditioning_scale", "control_mode", "prompt_embeds_scale", "pooled_prompt_embeds_scale"): if name in args: args[name] = [0.4, 0.2] if "shared_conditions" in args: args["shared_conditions"] = True @@ -315,6 +2367,57 @@ print(json.dumps(cases)) } }); +test('shared guidance receipts distinguish scale-one CFG formulations and stay scoped to the Guider', () => { + const identity = { taskId: 'actual-task', attemptIndex: 2, nodeId: 'preview' }; + for (const enabled of [true, false]) { + for (const original of [true, false]) { + const capture = receipt(); + capture.nodes.push({ + nodeId: 'guide', + module: 'modules.ModularDiffusers', + action: 'Guider', + fields: { + guider: { value: 'ClassifierFreeGuidance', source: 'literal' }, + guidance_scale: { value: 1, source: 'literal' }, + enabled: { value: enabled, source: 'literal' }, + use_original_formulation: { value: original, source: 'literal' }, + guidance_rescale: { value: 0, source: 'literal' }, + start: { value: 0, source: 'literal' }, + stop: { value: 1, source: 'literal' }, + }, + omittedFields: {}, + }); + Object.assign(capture.summary, { + guidanceScale: 1, + guiderType: 'ClassifierFreeGuidance', + guidanceEnabled: enabled, + guidanceOriginalFormulation: original, + guidanceRescale: 0, + guidanceStart: 0, + guidanceStop: 1, + }); + assert.deepEqual(inputs.coerceResolvedExecutionInputs(capture, identity), capture); + const restored = contracts.coerceStudioOutput( + JSON.parse( + JSON.stringify({ + id: 'guidance', + url: '/image.webp', + ...identity, + resolvedExecutionInputs: capture, + }), + ), + ); + assert.deepEqual(restored.resolvedExecutionInputs, capture); + const wrongScope = structuredClone(capture); + wrongScope.nodes.at(-1).action = 'EncodePrompt'; + assert.equal(inputs.coerceResolvedExecutionInputs(wrongScope, identity), undefined); + const forged = structuredClone(capture); + forged.summary.guidanceOriginalFormulation = !original; + assert.equal(inputs.coerceResolvedExecutionInputs(forged, identity), undefined); + } + } +}); + test('ambiguous or opaque generation inputs are disclosed instead of presenting form defaults as runtime facts', () => { const capture = receipt(); capture.nodes.push({ @@ -454,6 +2557,205 @@ test('graph task evidence replaces stale history labels while preserving the sav } }); +function taskHistoryOutput(graphTasks) { + const evidence = receipt(); + evidence.nodes.push({ + nodeId: 'loader', + module: 'modules.ModularDiffusers', + action: 'ModelsLoader', + fields: { model_type: { value: 'QwenImageEditPlusModularPipeline', source: 'literal' } }, + omittedFields: {}, + }); + evidence.summary.modelType = 'QwenImageEditPlusModularPipeline'; + if (graphTasks !== undefined) evidence.graphTasks = graphTasks; + return contracts.coerceStudioOutput({ + id: 'task-alias', + url: '/image.webp', + taskId: 'actual-task', + attemptIndex: 2, + nodeId: 'preview', + mode: 'text_to_image', + formSnapshot: { mode: 'text_to_image', steps: 50 }, + resolvedExecutionInputs: evidence, + }); +} + +test('ordinary image task receipts survive history reload with strict owner identity', () => { + for (const [module, action, pipeline, task] of [ + ['DiffusersImage', 'LoadPipeline', 'ZImageInpaintPipeline', 'outpaint'], + ['HuggingFaceTransformers', 'LoadDepthEstimationModel', 'AutoModelForDepthEstimation', 'depth_estimation'], + ['HuggingFaceTransformers', 'LoadImageTextToTextModel', 'AutoModelForImageTextToText', 'image_to_text'], + ['ImageOperations', 'ProcessImage', 'BuiltinImageOperationV1', 'image_crop'], + ]) { + const evidence = receipt(); + evidence.nodes = [ + { + nodeId: 'owner', + module: 'modules.' + module, + action, + fields: { pipeline_class: { value: pipeline, source: 'literal' } }, + omittedFields: {}, + }, + ]; + evidence.summary = { modelType: pipeline }; + evidence.ambiguousFields = []; + evidence.unavailableFields = []; + evidence.graphTasks = [{ loaderId: 'owner', pipelineClass: pipeline, task }]; + const identity = { taskId: 'actual-task', attemptIndex: 2, nodeId: 'preview' }; + assert.deepEqual(inputs.coerceResolvedExecutionInputs(evidence, identity), evidence); + let output = contracts.coerceStudioOutput({ + id: 'ordinary-image', + url: '/image.webp', + ...identity, + mode: 'text_to_image', + formSnapshot: { mode: 'text_to_image' }, + resolvedExecutionInputs: evidence, + }); + for (let reload = 0; reload < 2; reload++) { + assert.equal(output.mode, task); + assert.equal(output.formSnapshot.mode, 'text_to_image'); + output = contracts.coerceStudioOutput(JSON.parse(JSON.stringify(output))); + } + for (const mutate of [ + (e) => { + e.nodes[0].module = 'custom.Foreign'; + }, + (e) => { + e.graphTasks[0].pipelineClass = 'WrongClass'; + }, + (e) => { + e.nodes[0].fields = {}; + e.summary = {}; + }, + (e) => { + e.graphTasks.push(e.graphTasks[0]); + }, + (e) => { + e.truncated = true; + }, + (e) => { + e.uncapturedNodeIds = ['missing']; + }, + ]) { + const malformed = structuredClone(evidence); + mutate(malformed); + assert.equal(inputs.coerceResolvedExecutionInputs(malformed, identity), undefined); + } + } +}); + +const taskOwner = { loaderId: 'loader', pipelineClass: 'QwenImageEditPlusModularPipeline' }; + +test('versioned video task receipts override stale image history and preserve legacy owner vocabulary', () => { + const evidence = receipt(); + evidence.nodes = [ + { + nodeId: 'owner', + module: 'modules.DiffusersVideo', + action: 'LoadPipeline', + fields: { pipeline_class: { value: 'LTXConditionPipeline', source: 'literal' } }, + omittedFields: {}, + }, + ]; + evidence.summary = { modelType: 'LTXConditionPipeline' }; + evidence.ambiguousFields = []; + evidence.unavailableFields = []; + evidence.graphTasks = [{ loaderId: 'owner', pipelineClass: 'LTXConditionPipeline', task: 'text_to_video' }]; + evidence.graphTasksVersion = 2; + const identity = { taskId: 'actual-task', attemptIndex: 2, nodeId: 'preview' }; + let output = contracts.coerceStudioOutput({ + id: 'video', + url: '/video.mp4', + ...identity, + mode: 'text_to_image', + formSnapshot: { mode: 'text_to_image' }, + resolvedExecutionInputs: evidence, + }); + for (let reload = 0; reload < 2; reload++) { + assert.equal(output.mode, 'text_to_video'); + assert.equal(output.formSnapshot.mode, 'text_to_image'); + assert.deepEqual(output.resolvedExecutionInputs, evidence); + output = contracts.coerceStudioOutput(JSON.parse(JSON.stringify(output))); + } + for (const mutate of [ + (e) => { + delete e.graphTasksVersion; + }, + (e) => { + e.graphTasksVersion = 3; + }, + (e) => { + delete e.graphTasks; + }, + (e) => { + e.graphTasks = []; + }, + (e) => { + e.graphTasks.push(e.graphTasks[0]); + }, + (e) => { + e.graphTasks[0].pipelineClass = 'ForeignPipeline'; + }, + (e) => { + e.nodes.push({ ...e.nodes[0], nodeId: 'missing-owner' }); + }, + ]) { + const bad = structuredClone(evidence); + mutate(bad); + assert.equal(inputs.coerceResolvedExecutionInputs(bad, identity), undefined); + } + // Pre-versioned mixed outputs may contain video nodes but only image task owners. + const legacy = receipt(); + legacy.nodes.push(evidence.nodes[0]); + legacy.summary.modelType = 'LTXConditionPipeline'; + assert.deepEqual(inputs.coerceResolvedExecutionInputs(legacy, identity), legacy); +}); + +test('ambiguous consumed task stays explicitly uncaptured across history reload without borrowing the form', () => { + let output = taskHistoryOutput([{ ...taskOwner, task: null }]); + for (let reload = 0; reload < 2; reload++) { + assert.equal(tasks.outputTaskDisplay(output), 'Task not uniquely captured'); + assert.equal(output.mode, 'text_to_image'); + assert.equal(output.formSnapshot.mode, 'text_to_image'); + assert.equal(output.formSnapshot.steps, 50); + assert.equal(inputs.outputModelKey(output), 'QwenImageEditPlusModularPipeline'); + output = contracts.coerceStudioOutput(JSON.parse(JSON.stringify(output))); + } +}); + +test('missing and mixed consumed task evidence never uses the historical global task', () => { + const output = taskHistoryOutput(); + assert.equal(tasks.outputTaskDisplay(output), 'Task not uniquely captured'); + for (const graphTasks of [ + [], + [{ ...taskOwner, task: null }], + [ + { ...taskOwner, task: 'edit_image' }, + { ...taskOwner, loaderId: 'other', task: 'text_to_image' }, + ], + [ + { ...taskOwner, task: 'edit_image' }, + { ...taskOwner, loaderId: 'other', task: null }, + ], + [{ ...taskOwner, task: 'unrecognized_task' }], + [{ ...taskOwner, task: 'constructor' }], + ]) { + output.resolvedExecutionInputs.graphTasks = graphTasks; + assert.equal(tasks.outputTaskDisplay(output), 'Task not uniquely captured'); + } +}); + +test('unique consumed task labels override stale history, and only receipt-free records retain legacy labels', () => { + for (const task of ['edit_image', 'multi_image_reference_edit']) { + const output = taskHistoryOutput([{ ...taskOwner, task }]); + assert.equal(tasks.outputTaskDisplay(output), profiles.STUDIO_MODE_LABELS[task]); + assert.equal(output.formSnapshot.mode, 'text_to_image'); + } + const legacy = taskHistoryOutput(); + delete legacy.resolvedExecutionInputs; + assert.equal(tasks.outputTaskDisplay(legacy), 'Text to image'); +}); + test('depth receipt preserves model-default resolution and false input matching through history parsing', () => { const value = receipt(); value.nodes[0] = { @@ -499,6 +2801,138 @@ test('audio receipt validates duration, delivery rate and consumed controls thro assert.equal(restored.nodes[0].fields.num_inference_steps.sourceNodeId, 'steps'); }); +function speechConsumerReceipt(action) { + const value = receipt(); + const consumed = (inputValue, value = inputValue) => ({ + disposition: 'consumed', + inputValue, + value, + source: 'literal', + }); + const fields = { + timestamps: consumed('word'), + chunk_length_seconds: consumed(30), + stride_length_seconds: consumed(5), + }; + if (action === 'TranscribeAudio') { + fields.task = consumed(' TRANSLATE ', 'translate'); + fields.language = { + ...consumed(''), + disposition: 'inactive', + reason: 'feature-disabled', + }; + } + value.nodes = [ + { + nodeId: 'speech', + module: 'modules.HuggingFaceSpeech', + action, + fields: {}, + omittedFields: {}, + fieldAccounting: { + schemaVersion: 1, + fields, + inputProjections: {}, + outputProjections: {}, + unaccountedFields: [], + omittedFields: {}, + complete: true, + }, + mediaEvidence: { + schemaVersion: 1, + source: 'native-builtin-media-v1', + status: 'complete', + controls: {}, + inputs: { + audio: [ + { + kind: 'audio', + sha256: 'a'.repeat(64), + shape: [12, 2], + sampleRate: 16000, + byteSize: 96, + dtype: 'float32-le', + }, + ], + }, + outputs: {}, + files: {}, + }, + }, + ]; + value.summary = {}; + value.fieldAccountingStatus = { schemaVersion: 1, truncated: false }; + value.mediaEvidenceStatus = { schemaVersion: 1, truncated: false }; + return value; +} + +test('speech consumer accounting preserves options and one audio input in hydrated outputs', () => { + for (const action of ['TranscribeAudio', 'TranscribeCTCAudio']) { + const capture = speechConsumerReceipt(action); + const identity = { taskId: capture.taskId, attemptIndex: capture.attemptIndex, nodeId: capture.nodeId }; + const output = contracts.coerceStudioOutput({ + id: action, + url: '/transcript.txt', + displayType: 'text', + ...identity, + resolvedExecutionInputs: capture, + }); + assert.deepEqual(output.resolvedExecutionInputs, capture, action); + assert.deepEqual(contracts.coerceStudioOutput(JSON.parse(JSON.stringify(output))).resolvedExecutionInputs, capture); + assert.deepEqual(output.resolvedExecutionInputs.summary, {}); + const incomplete = structuredClone(capture); + incomplete.nodes[0].fieldAccounting.complete = false; + incomplete.nodes[0].fieldAccounting.unaccountedFields = ['unexpected_parameter']; + incomplete.nodes[0].mediaEvidence = { + schemaVersion: 1, + status: 'unavailable', + reason: 'unsupported-or-bounded-input', + }; + assert.deepEqual(inputs.coerceResolvedExecutionInputs(incomplete, identity), incomplete); + } +}); + +test('speech consumer hydration rejects extra options, projections and spoofed media', () => { + for (const action of ['TranscribeAudio', 'TranscribeCTCAudio']) { + const capture = speechConsumerReceipt(action); + const identity = { taskId: capture.taskId, attemptIndex: capture.attemptIndex, nodeId: capture.nodeId }; + const [speech] = capture.nodes; + const accounting = speech.fieldAccounting; + const media = speech.mediaEvidence; + const [audio] = media.inputs.audio; + const option = accounting.fields.timestamps; + const fields = (additional) => ({ + fieldAccounting: { ...accounting, fields: { ...accounting.fields, ...additional } }, + }); + const projections = (key) => ({ fieldAccounting: { ...accounting, [key]: { audio: {} } } }); + const evidence = (changes) => ({ mediaEvidence: { ...media, ...changes } }); + const unreviewedOptions = action === 'TranscribeCTCAudio' ? ['task', 'language'] : ['guidance_scale']; + for (const [reason, changes] of [ + ['foreign scope', { module: 'custom.HuggingFaceSpeech' }], + ...unreviewedOptions.map((name) => [`out-of-scope option ${name}`, fields({ [name]: option })]), + ['raw audio in field accounting', fields({ audio: option })], + ['extra accounting data', fields({ timestamps: { ...option, rawSamples: [1] } })], + ['input projection', projections('inputProjections')], + ['output projection', projections('outputProjections')], + ['media control', evidence({ controls: { timestamps: true } })], + ['file observation', evidence({ files: { file: [] } })], + ['media output', evidence({ outputs: { text: [] } })], + ['foreign input port', evidence({ inputs: { ...media.inputs, reference: [audio] } })], + ['missing audio input', evidence({ inputs: {} })], + ['empty audio input', evidence({ inputs: { audio: [] } })], + ['multiple audio inputs', evidence({ inputs: { audio: [audio, audio] } })], + [ + 'file posing as audio', + evidence({ inputs: { audio: [{ kind: 'file', sha256: audio.sha256, byteSize: audio.byteSize }] } }), + ], + ['extra audio data', evidence({ inputs: { audio: [{ ...audio, samples: [1, 2] }] } })], + ]) { + const candidate = { ...capture, nodes: [{ ...speech, ...changes }] }; + assert.equal(inputs.coerceResolvedExecutionInputs(candidate, identity), undefined, `${action}: ${reason}`); + } + } +}); + test('attention context reuse survives receipts and rejects a contradictory summary', () => { for (const enabled of [true, false]) { const value = receipt(); @@ -516,3 +2950,433 @@ test('attention context reuse survives receipts and rejects a contradictory summ assert.equal(inputs.coerceResolvedExecutionInputs(value, identity), undefined); } }); + +test('image stage receipts keep loader execution mode and each consumed stage task scoped to their actual actions', () => { + const identity = { taskId: 'actual-task', attemptIndex: 2, nodeId: 'preview' }; + for (const [action, field, label] of [ + ['LoadPipeline', 'mode', 'executionMode'], + ['EncodeInputs', 'executed_task', 'executedTask'], + ['Denoise', 'executed_task', 'executedTask'], + ['DecodeLatents', 'executed_task', 'executedTask'], + ]) { + const value = receipt(); + value.nodes = [ + { + nodeId: 'stage', + module: 'modules.DiffusersImage', + action, + fields: { [field]: { value: 'control_image', source: 'literal' } }, + omittedFields: {}, + }, + ]; + value.summary = { [label]: 'control_image' }; + assert.deepEqual(inputs.coerceResolvedExecutionInputs(value, identity), value); + assert.deepEqual(inputs.coerceResolvedExecutionInputs(JSON.parse(JSON.stringify(value)), identity), value); + const omitted = structuredClone(value); + omitted.nodes[0].fields = {}; + omitted.nodes[0].omittedFields = { [field]: 'unsupported-value' }; + omitted.summary = {}; + omitted.unavailableFields = [label]; + assert.deepEqual(inputs.coerceResolvedExecutionInputs(omitted, identity), omitted); + for (const mutate of [ + (copy) => { + copy.nodes[0].action = 'UnreviewedAction'; + }, + (copy) => { + copy.nodes[0].module = 'modules.Foreign'; + }, + (copy) => { + copy.nodes[0].fields.unknown_mode = copy.nodes[0].fields[field]; + }, + (copy) => { + copy.summary[label] = 'foreign_task'; + }, + (copy) => { + copy.summary = { [label === 'executedTask' ? 'executionMode' : 'executedTask']: 'control_image' }; + }, + ]) { + const copy = structuredClone(value); + mutate(copy); + assert.equal(inputs.coerceResolvedExecutionInputs(copy, identity), undefined); + } + } + const foreignField = receipt(); + foreignField.nodes = [ + { + nodeId: 'denoise', + module: 'modules.DiffusersImage', + action: 'Denoise', + fields: { mode: { value: 'control_image', source: 'literal' } }, + omittedFields: {}, + }, + ]; + foreignField.summary = { executionMode: 'control_image' }; + assert.equal(inputs.coerceResolvedExecutionInputs(foreignField, identity), undefined); +}); + +// Frozen NodeBase/official tiny CPU producer captures, not HTTP or trained-model proof. +const textGenerationProducerReceipts = { + 'enhance-two-references': { + schemaVersion: 1, + source: 'backend-execution', + taskId: 'pup-cpu-unit-enhance-two-references', + attemptIndex: 0, + nodeId: 'enhancement-two-reference-producer', + nodes: [ + { + nodeId: 'enhancement-two-reference-producer', + module: 'modules.HuggingFaceTransformers', + action: 'GenerateImageVideoText', + fields: { + operation: { + value: 'enhance_prompt', + source: 'literal', + }, + enhancement_max_new_tokens: { + value: 2, + source: 'literal', + }, + prompt_adapter_id: { + value: 'transformers-prompt-enhancement-v1', + source: 'literal', + }, + system_prompt_mode: { + value: 'i2i', + source: 'literal', + }, + system_prompt_sha256: { + value: '95cec384d5b6d341caa9fb3f2c7ca45ee80c2364b3a95d4044aebf976f6dd3bf', + source: 'literal', + }, + rendered_prompt_sha256: { + value: 'sha256:e583f6f3e687f148de99dfb5a343cbbc41176639a63f587cbc67e0d662afda5f', + source: 'literal', + }, + rendered_prompt_utf8_bytes: { + value: 2895, + source: 'literal', + }, + rendered_input_ids_sha256: { + value: 'sha256:4cbd5087487435586ea6a9296a7ff22994a1501d25eaded251eff78080d866e5', + source: 'literal', + }, + reference_source_sha256: { + value: [ + 'sha256:b89644f82b4521c8f0367c253020a36500bff049786d8b77237ad17ea3dcbed8', + 'sha256:d44a7e0346e4324df997c774a567940899789649018fb6a6072ef28a95e9bd50', + ], + source: 'literal', + }, + processed_pixel_sha256: { + value: 'sha256:c6f80e90f8455363b22d0f1be2fd04f399761bc6580448d2c32c717b2353fea2', + source: 'literal', + }, + processed_pixel_shape: { + value: [512, 1536], + source: 'literal', + }, + processed_grid_sha256: { + value: 'sha256:63a4454b5f1dd1e3fe5850ed8174d35d1346744920630f0e7b8ef547b1b86ba6', + source: 'literal', + }, + processed_grid_shape: { + value: [2, 3], + source: 'literal', + }, + prompt: { + value: 'Combine the red and blue squares.', + source: 'literal', + }, + }, + omittedFields: {}, + }, + ], + summary: { + textOperation: 'enhance_prompt', + enhancementMaxNewTokens: 2, + promptAdapterId: 'transformers-prompt-enhancement-v1', + systemPromptMode: 'i2i', + systemPromptSha256: '95cec384d5b6d341caa9fb3f2c7ca45ee80c2364b3a95d4044aebf976f6dd3bf', + renderedPromptSha256: 'sha256:e583f6f3e687f148de99dfb5a343cbbc41176639a63f587cbc67e0d662afda5f', + renderedPromptUtf8Bytes: 2895, + renderedInputIdsSha256: 'sha256:4cbd5087487435586ea6a9296a7ff22994a1501d25eaded251eff78080d866e5', + referenceSourceSha256: [ + 'sha256:b89644f82b4521c8f0367c253020a36500bff049786d8b77237ad17ea3dcbed8', + 'sha256:d44a7e0346e4324df997c774a567940899789649018fb6a6072ef28a95e9bd50', + ], + processedPixelSha256: 'sha256:c6f80e90f8455363b22d0f1be2fd04f399761bc6580448d2c32c717b2353fea2', + processedPixelShape: [512, 1536], + processedGridSha256: 'sha256:63a4454b5f1dd1e3fe5850ed8174d35d1346744920630f0e7b8ef547b1b86ba6', + processedGridShape: [2, 3], + prompt: 'Combine the red and blue squares.', + }, + ambiguousFields: [], + unavailableFields: [], + uncapturedNodeIds: [], + truncated: false, + }, + 'standard-fresh-defaults': { + schemaVersion: 1, + source: 'backend-execution', + taskId: 'pup-cpu-unit-standard-fresh-defaults', + attemptIndex: 0, + nodeId: 'standard-fresh-defaults', + nodes: [ + { + nodeId: 'standard-fresh-defaults', + module: 'modules.HuggingFaceTransformers', + action: 'GenerateImageVideoText', + fields: { + prompt: { + value: 'Describe the red square.', + source: 'literal', + }, + operation: { + value: 'standard', + source: 'literal', + }, + executed_task: { + value: 'image_to_text', + source: 'literal', + }, + }, + omittedFields: {}, + }, + ], + summary: { + prompt: 'Describe the red square.', + textOperation: 'standard', + executedTask: 'image_to_text', + }, + ambiguousFields: [], + unavailableFields: [], + uncapturedNodeIds: [], + truncated: false, + }, + 'standard-legacy-omitted': { + schemaVersion: 1, + source: 'backend-execution', + taskId: 'pup-cpu-unit-standard-legacy-omitted', + attemptIndex: 0, + nodeId: 'standard-legacy-omitted', + nodes: [ + { + nodeId: 'standard-legacy-omitted', + module: 'modules.HuggingFaceTransformers', + action: 'GenerateImageVideoText', + fields: { + prompt: { + value: 'Describe the blue square.', + source: 'literal', + }, + executed_task: { + value: 'image_to_text', + source: 'literal', + }, + }, + omittedFields: {}, + }, + ], + summary: { + prompt: 'Describe the blue square.', + executedTask: 'image_to_text', + }, + ambiguousFields: [], + unavailableFields: [], + uncapturedNodeIds: [], + truncated: false, + }, +}; + +test('paired backend prompt-enhancement and ordinary receipts survive exact history roundtrip', () => { + for (const [name, capture] of Object.entries(textGenerationProducerReceipts)) { + const identity = { taskId: capture.taskId, attemptIndex: capture.attemptIndex, nodeId: capture.nodeId }; + assert.deepEqual(inputs.coerceResolvedExecutionInputs(capture, identity), capture, name); + const output = contracts.coerceStudioOutput({ + id: name, + url: '/unit-text', + displayType: 'text', + ...identity, + prompt: 'stale form fallback', + formSnapshot: { prompt: 'stale form fallback' }, + resolvedExecutionInputs: capture, + }); + assert.deepEqual(output.resolvedExecutionInputs, capture); + assert.equal(output.prompt, capture.summary.prompt); + assert.equal(output.formSnapshot.prompt, 'stale form fallback'); + assert.deepEqual(contracts.coerceStudioOutput(JSON.parse(JSON.stringify(output))).resolvedExecutionInputs, capture); + } + assert.equal(textGenerationProducerReceipts['standard-fresh-defaults'].summary.textOperation, 'standard'); + assert.equal(textGenerationProducerReceipts['standard-fresh-defaults'].summary.enhancementMaxNewTokens, undefined); + assert.equal(textGenerationProducerReceipts['standard-legacy-omitted'].summary.textOperation, undefined); + const enhanced = textGenerationProducerReceipts['enhance-two-references']; + assert.equal(enhanced.summary.textOperation, 'enhance_prompt'); + assert.equal(enhanced.summary.referenceSourceSha256.length, 2); + assert.notEqual(enhanced.summary.referenceSourceSha256[0], enhanced.summary.referenceSourceSha256[1]); + assert.equal(enhanced.summary.modelType, undefined, 'capture does not grant an image model identity'); +}); + +test('captured append-details operation survives the ordinary output receipt parser', () => { + const capture = enhancementReceipt(); + capture.summary.textOperation = 'enhance_prompt_append_details'; + for (const node of capture.nodes) { + if (node.fields.operation) node.fields.operation.value = 'enhance_prompt_append_details'; + } + assert.equal( + inputs.coerceResolvedExecutionInputs(capture, enhancementIdentity(capture)).summary.textOperation, + 'enhance_prompt_append_details', + ); +}); + +const enhancementNames = { + operation: 'textOperation', + enhancement_max_new_tokens: 'enhancementMaxNewTokens', + prompt_adapter_id: 'promptAdapterId', + system_prompt_mode: 'systemPromptMode', + system_prompt_sha256: 'systemPromptSha256', + rendered_prompt_sha256: 'renderedPromptSha256', + rendered_prompt_utf8_bytes: 'renderedPromptUtf8Bytes', + rendered_input_ids_sha256: 'renderedInputIdsSha256', + reference_source_sha256: 'referenceSourceSha256', + processed_pixel_sha256: 'processedPixelSha256', + processed_pixel_shape: 'processedPixelShape', + processed_grid_sha256: 'processedGridSha256', + processed_grid_shape: 'processedGridShape', +}; + +function enhancementReceipt() { + return structuredClone(textGenerationProducerReceipts['enhance-two-references']); +} + +function enhancementIdentity(capture) { + return { taskId: capture.taskId, attemptIndex: capture.attemptIndex, nodeId: capture.nodeId }; +} + +test('enhancement observations reject malformed scalars, hashes, counts and tensor shapes without coercion', () => { + const invalid = { + operation: ['', 'enhance', ['enhance_prompt'], true, null, 1], + enhancement_max_new_tokens: [0, -1, 3585, 1.5, '2', true, null], + prompt_adapter_id: ['', 'bad id', 'Uppercase', 'a'.repeat(129), [], null], + system_prompt_mode: ['', 'bbox', ['i2i'], true, null], + system_prompt_sha256: ['sha256:' + 'a'.repeat(64), 'a'.repeat(63), 'A'.repeat(64), null], + rendered_prompt_sha256: ['a'.repeat(64), 'sha256:' + 'a'.repeat(63), 'sha256:' + 'A'.repeat(64), null], + rendered_prompt_utf8_bytes: [0, -1, 524289, 1.5, '3', true, null], + rendered_input_ids_sha256: ['', 'a'.repeat(64), null], + reference_source_sha256: [ + null, + ['bad'], + ['sha256:' + 'a'.repeat(64)].flatMap((hash) => Array(11).fill(hash)), + [[]], + ], + processed_pixel_sha256: ['', 'a'.repeat(64), null], + processed_pixel_shape: [ + [], + [1], + [1, 2, 3], + [true, 2], + [0, 2], + [1.5, 2], + ['1', 2], + [Number.MAX_SAFE_INTEGER + 1, 2], + ], + processed_grid_sha256: ['', 'a'.repeat(64), null], + processed_grid_shape: [[], [0, 3], [11, 3], [2, 4], [2.5, 3], ['2', 3], [2, true]], + }; + for (const [key, values] of Object.entries(invalid)) + for (const value of values) { + const capture = enhancementReceipt(); + capture.nodes[0].fields[key].value = value; + capture.summary[enhancementNames[key]] = value; + assert.equal( + inputs.coerceResolvedExecutionInputs(capture, enhancementIdentity(capture)), + undefined, + `${key}: ${JSON.stringify(value)}`, + ); + } +}); + +test('enhancement observations are scoped to the exact generic generation action and output identity', () => { + for (const [module, action] of [ + ['modules.HuggingFaceTransformers', 'PredictDepth'], + ['modules.HuggingFaceTransformers', 'LoadImageTextToTextModel'], + ['modules.ModularDiffusers', 'EncodePrompt'], + ['modules.Foreign', 'GenerateImageVideoText'], + ]) { + const capture = enhancementReceipt(); + Object.assign(capture.nodes[0], { module, action }); + assert.equal(inputs.coerceResolvedExecutionInputs(capture, enhancementIdentity(capture)), undefined); + } + for (const patch of [{ taskId: 'other' }, { attemptIndex: 1 }, { nodeId: 'other' }]) { + const capture = enhancementReceipt(); + assert.equal( + inputs.coerceResolvedExecutionInputs(capture, { ...enhancementIdentity(capture), ...patch }), + undefined, + ); + } + const capture = enhancementReceipt(); + capture.nodes[0].module = 'HuggingFaceTransformers'; + assert.deepEqual(inputs.coerceResolvedExecutionInputs(capture, enhancementIdentity(capture)), capture); + capture.nodes[0].fields.reference_id = { value: 'not-vae-authority', source: 'literal' }; + assert.equal(inputs.coerceResolvedExecutionInputs(capture, enhancementIdentity(capture)), undefined); +}); + +test('enhancement text-only, bounded endpoints, missing observations and ambiguity retain existing receipt rules', () => { + const capture = enhancementReceipt(); + capture.nodes[0].fields.enhancement_max_new_tokens.value = capture.summary.enhancementMaxNewTokens = 3584; + capture.nodes[0].fields.rendered_prompt_utf8_bytes.value = capture.summary.renderedPromptUtf8Bytes = 524288; + capture.nodes[0].fields.reference_source_sha256.value = capture.summary.referenceSourceSha256 = []; + capture.nodes[0].fields.system_prompt_mode.value = capture.summary.systemPromptMode = 't2i'; + for (const key of [ + 'processed_pixel_sha256', + 'processed_pixel_shape', + 'processed_grid_sha256', + 'processed_grid_shape', + ]) { + delete capture.nodes[0].fields[key]; + delete capture.summary[enhancementNames[key]]; + } + assert.deepEqual(inputs.coerceResolvedExecutionInputs(capture, enhancementIdentity(capture)), capture); + const missing = enhancementReceipt(); + delete missing.nodes[0].fields.processed_pixel_sha256; + delete missing.summary.processedPixelSha256; + missing.nodes[0].omittedFields.processed_pixel_sha256 = 'record-size-limit'; + missing.unavailableFields = ['processedPixelSha256']; + assert.deepEqual(inputs.coerceResolvedExecutionInputs(missing, enhancementIdentity(missing)), missing); + const mixed = enhancementReceipt(); + mixed.nodes.push({ + nodeId: 'encoder', + module: 'modules.ModularDiffusers', + action: 'EncodePrompt', + fields: { + prompt: { + value: 'An explicitly applied proposal.', + source: 'connected', + sourceNodeId: mixed.nodes[0].nodeId, + sourcePortId: 'text', + }, + }, + omittedFields: {}, + }); + delete mixed.summary.prompt; + mixed.ambiguousFields = ['prompt']; + const output = contracts.coerceStudioOutput({ + id: 'mixed-prompt', + url: '/out.png', + ...enhancementIdentity(mixed), + prompt: 'wrong fallback', + formSnapshot: { prompt: 'wrong fallback' }, + resolvedExecutionInputs: mixed, + }); + assert.deepEqual(output.resolvedExecutionInputs, mixed); + assert.equal(output.prompt, ''); + assert.equal(output.formSnapshot.prompt, 'wrong fallback'); + assert.equal(output.resolvedExecutionInputs.nodes[0].fields.prompt.value, 'Combine the red and blue squares.'); +}); + +test('enhancement observation origins reject coercible arrays, objects and booleans', () => { + for (const source of [['literal'], ['connected'], ['override'], { value: 'literal' }, false, true, 1, null]) { + const capture = enhancementReceipt(); + capture.nodes[0].fields.operation.source = source; + assert.equal(inputs.coerceResolvedExecutionInputs(capture, enhancementIdentity(capture)), undefined); + } +}); diff --git a/scripts/resource-qualification-report.mjs b/scripts/resource-qualification-report.mjs index 600599c5..f0d199e0 100644 --- a/scripts/resource-qualification-report.mjs +++ b/scripts/resource-qualification-report.mjs @@ -7,6 +7,7 @@ import { exactCurrentResourceRouteFromManifest, loadCurrentResourceRouteManifest import { classifyResourceRecipeReleaseLanes } from './release-qualification-policy.mjs'; import { resourceRecipeHash, validateResourceQualificationEvidence } from './resource-qualification.mjs'; import { retainedRouteResourceProofs, validateRouteResourceWorkloadReceipt } from './route-resource-qualification.mjs'; +import { readReleaseRunProvenance } from './release-evidence-paths.mjs'; const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url)); const CLIENT_ROOT = resolve(SCRIPT_DIR, '..'); @@ -54,7 +55,7 @@ function sha256File(path) { } function recipeKey(value) { - return [value.modelType, value.dtype, value.offloadMode, value.quantizationMode].join('|'); + return [value.resourceFamily ?? value.modelType, value.dtype, value.offloadMode, value.quantizationMode].join('|'); } function validMeasurement(entry) { @@ -132,6 +133,9 @@ if (existsSync(RECEIPT_REGISTRY_PATH)) { for (const receipt of registry.receipts ?? []) { const contractTemplate = contractTemplateById.get(receipt.templateId); if (!contractTemplate || receipt.templateSchemaHash !== contractTemplate.schemaHash) continue; + if ((receipt.resourceFamily ?? receipt.modelType) !== contractTemplate.modelType) { + throw new Error(`Resource qualification receipt names another catalog family: ${receipt.templateId}.`); + } const requirement = requiredByKey.get(recipeKey(receipt)); if (!requirement?.templates.includes(receipt.templateId)) continue; const proofPath = resolve(BACKEND_ROOT, String(receipt.proofPath ?? '')); @@ -141,18 +145,19 @@ if (existsSync(RECEIPT_REGISTRY_PATH)) { if (sha256File(proofPath) !== receipt.proofSha256) { throw new Error(`Resource qualification proof hash mismatch: ${String(receipt.proofPath)}`); } - const baselinePath = resolve(BACKEND_ROOT, String(contractTemplate.lastSuccessfulRealRun?.provenancePath ?? '')); - if (!existsSync(baselinePath)) { - throw new Error(`Locked-template baseline proof is missing for ${receipt.templateId}.`); - } + const baseline = readReleaseRunProvenance({ + clientRoot: CLIENT_ROOT, + backendRoot: BACKEND_ROOT, + receipt: contractTemplate.lastSuccessfulRealRun, + }); const proof = readJson(proofPath); const validated = validateResourceQualificationEvidence({ provenance: proof, - baseline: readJson(baselinePath), + baseline, contractTemplate, }); if ( - recipeKey(validated.recipe) !== recipeKey(receipt) || + recipeKey({ ...validated.recipe, resourceFamily: contractTemplate.modelType }) !== recipeKey(receipt) || validated.workloadHash !== receipt.workloadHash || validated.baselineWorkloadHash !== receipt.baselineWorkloadHash || validated.modelRevision !== receipt.modelRevision || diff --git a/scripts/resource-qualification.mjs b/scripts/resource-qualification.mjs index 31a14692..162724cc 100644 --- a/scripts/resource-qualification.mjs +++ b/scripts/resource-qualification.mjs @@ -5,6 +5,7 @@ import { fileURLToPath } from 'node:url'; import { validateRunProvenance } from './live-proof-provenance.mjs'; import { normalizeResourceRouteBinding, resourceRouteBindingHash } from './resource-route-binding.mjs'; +import { readReleaseRunProvenance } from './release-evidence-paths.mjs'; const SCRIPT_PATH = fileURLToPath(import.meta.url); const SCRIPT_DIR = dirname(SCRIPT_PATH); @@ -243,7 +244,13 @@ export function validateResourceQualificationEvidence({ provenance, baseline, co const recipe = resourceRecipeFromProvenance(provenance); const declared = (contractTemplate?.resourceRecipes?.declaredRecipes ?? []).some((candidate) => - sameDeclaredRecipe({ modelType: contractTemplate.modelType, ...candidate }, recipe), + sameDeclaredRecipe( + { + modelType: contractTemplate.resourceRecipes.executionModelType ?? contractTemplate.modelType, + ...candidate, + }, + recipe, + ), ); if (!declared) { throw new Error( @@ -313,11 +320,11 @@ export async function recordResourceQualification({ const templateId = provenance?.template?.id; const contractTemplate = contract.templates?.find((template) => template.id === templateId); if (!contractTemplate) throw new Error(`Template ${String(templateId)} is not in the release contract.`); - const baselinePath = required( - resolve(BACKEND_ROOT, contractTemplate.lastSuccessfulRealRun?.provenancePath ?? ''), - 'Locked-template baseline provenance', - ); - const baseline = readJson(baselinePath); + const baseline = readReleaseRunProvenance({ + clientRoot: CLIENT_ROOT, + backendRoot: BACKEND_ROOT, + receipt: contractTemplate.lastSuccessfulRealRun, + }); const validated = validateResourceQualificationEvidence({ provenance, baseline, contractTemplate }); mkdirSync(provenanceDir, { recursive: true }); @@ -341,6 +348,7 @@ export async function recordResourceQualification({ format: 'modiff.resource-run-receipt.v1', proofKind: 'real_backend_weights_full_locked_workload', templateId, + resourceFamily: contractTemplate.modelType, templateSchemaHash: contractTemplate.schemaHash, taskId: provenance.taskId, capturedAt: provenance.capturedAt, diff --git a/scripts/resource-qualification.test.mjs b/scripts/resource-qualification.test.mjs index 909b6601..81ebfd6a 100644 --- a/scripts/resource-qualification.test.mjs +++ b/scripts/resource-qualification.test.mjs @@ -199,6 +199,30 @@ test('accepts a full locked workload when only resource controls change', () => assert.equal(result.recipe.offloadMode, 'model_cpu'); }); +test('a reviewed execution-class alias keeps the original recipe and cannot qualify a different pipeline', () => { + const baseline = provenance(); + const candidate = provenance({ offloadMode: 'model_cpu', autoOffload: true }); + const target = { + ...contractTemplate, + modelType: 'CatalogDisplayFamily', + resourceRecipes: { + ...contractTemplate.resourceRecipes, + executionModelType: 'FluxSchnellPipeline', + }, + }; + const result = validateResourceQualificationEvidence({ provenance: candidate, baseline, contractTemplate: target }); + assert.equal( + result.recipe.modelType, + 'FluxSchnellPipeline', + 'do not rewrite original runtime identity to a display alias', + ); + target.resourceRecipes.executionModelType = 'DifferentPipeline'; + assert.throws( + () => validateResourceQualificationEvidence({ provenance: candidate, baseline, contractTemplate: target }), + /not declared/, + ); +}); + test('resource recipe identity changes for optimization and placement controls', () => { const baseline = provenance(); baseline.graph.executionPlan.device = 'cuda:0'; @@ -329,105 +353,162 @@ test('pre-attestation V2 resource evidence requires a fresh worker run', () => { ); }); -test('resource coverage consumes a retained full-workload receipt', () => { - const backendRoot = mkdtempSync(join(tmpdir(), 'modiff-resource-report-')); - try { - const releaseDir = join(backendRoot, 'data', 'qualification', 'release'); - const templateProofDir = join(releaseDir, 'template-provenance'); - const resourceProofDir = join(releaseDir, 'resource-provenance'); - const historyDir = join(backendRoot, 'data', 'auto_resource'); - mkdirSync(templateProofDir, { recursive: true }); - mkdirSync(resourceProofDir, { recursive: true }); - mkdirSync(historyDir, { recursive: true }); +for (const baselineKind of ['direct', 'gallery_bundle']) { + test(`resource coverage consumes a retained full-workload receipt with a ${baselineKind} baseline`, () => { + const backendRoot = mkdtempSync(join(tmpdir(), 'modiff-resource-report-')); + try { + const releaseDir = join(backendRoot, 'data', 'qualification', 'release'); + const templateProofDir = join(releaseDir, 'template-provenance'); + const resourceProofDir = join(releaseDir, 'resource-provenance'); + const historyDir = join(backendRoot, 'data', 'auto_resource'); + mkdirSync(templateProofDir, { recursive: true }); + mkdirSync(resourceProofDir, { recursive: true }); + mkdirSync(historyDir, { recursive: true }); - const baseline = provenance(); - const candidate = provenance({ offloadMode: 'model_cpu', autoOffload: true, exactRoute: true }); - const baselineRelativePath = 'data/qualification/release/template-provenance/baseline.json'; - const proofRelativePath = 'data/qualification/release/resource-provenance/candidate.json'; - const proofPath = join(backendRoot, proofRelativePath); - writeFileSync(join(backendRoot, baselineRelativePath), `${JSON.stringify(baseline)}\n`); - writeFileSync(proofPath, `${JSON.stringify(candidate)}\n`); - const proofSha256 = `sha256:${createHash('sha256').update(readFileSync(proofPath)).digest('hex')}`; - const recipe = resourceRecipeFromProvenance(candidate); - const recipeHash = resourceRecipeHash(recipe); - writeFileSync( - join(backendRoot, 'data', 'release-contract.v1.json'), - `${JSON.stringify({ - generatedAt: '2026-07-28T00:00:00.000Z', - contractHash: 'sha256:contract', - templates: [ - { - ...contractTemplate, - releaseEligible: true, - qualificationExemption: null, - lastSuccessfulRealRun: { provenancePath: baselineRelativePath }, - }, - ], - })}\n`, - ); - writeFileSync(join(historyDir, 'history.json'), `${JSON.stringify({ entries: {} })}\n`); - writeFileSync( - join(releaseDir, 'resource-run-receipts.v1.json'), - `${JSON.stringify({ - schemaVersion: 1, - format: 'modiff.resource-run-receipt-registry.v1', - receipts: [ - { - templateId: contractTemplate.id, - templateSchemaHash: contractTemplate.schemaHash, - taskId: candidate.taskId, - capturedAt: candidate.capturedAt, - modelType: 'FluxSchnellPipeline', - dtype: 'bfloat16', - offloadMode: 'model_cpu', - quantizationMode: 'none', - recipe, - recipeHash, - bindingStatus: 'exact_route_bound', - routeBinding: candidate.routeBinding, - routeBindingHash: candidate.routeBindingHash, - modelRevision: candidate.modelRevision, - modelSetHash: candidate.models.hash, - resourceCandidateId: 'manual:test', - graphHash: candidate.graphHash, - workloadHash: resourceWorkloadHash(candidate), - baselineWorkloadHash: resourceWorkloadHash(baseline), - runtimeFingerprint: candidate.runtimeFingerprint, - outputHash: candidate.mediaHash, - executionDurationSeconds: candidate.execution.elapsedSeconds, - peakMemoryBytes: candidate.execution.peakMemoryBytes, - peakReservedBytes: 1400, - processRssBytes: 5600, - proofPath: proofRelativePath, - proofSha256, - }, - ], - })}\n`, - ); + const targetTemplate = + baselineKind === 'gallery_bundle' + ? { + ...contractTemplate, + modelType: 'CatalogDisplayFamily', + resourceRecipes: { ...contractTemplate.resourceRecipes, executionModelType: 'FluxSchnellPipeline' }, + } + : contractTemplate; + const baseline = provenance(); + const candidate = provenance({ offloadMode: 'model_cpu', autoOffload: true, exactRoute: true }); + const baselineRelativePath = + baselineKind === 'direct' + ? 'data/qualification/release/template-provenance/baseline.json' + : '/template-gallery/reviews/resource-baseline-fixture.json'; + const baselineFile = + baselineKind === 'direct' + ? join(backendRoot, baselineRelativePath) + : join(backendRoot, 'web', baselineRelativePath.slice(1)); + mkdirSync(join(baselineFile, '..'), { recursive: true }); + const baselineBody = + baselineKind === 'direct' + ? baseline + : { + schemaVersion: 1, + format: 'modiff.gallery.reviewed-provenance.v1', + templateId: baseline.template.id, + run: baseline, + }; + const proofRelativePath = 'data/qualification/release/resource-provenance/candidate.json'; + const proofPath = join(backendRoot, proofRelativePath); + writeFileSync(baselineFile, `${JSON.stringify(baselineBody)}\n`); + writeFileSync(proofPath, `${JSON.stringify(candidate)}\n`); + const proofSha256 = `sha256:${createHash('sha256').update(readFileSync(proofPath)).digest('hex')}`; + const recipe = resourceRecipeFromProvenance(candidate); + const recipeHash = resourceRecipeHash(recipe); + writeFileSync( + join(backendRoot, 'data', 'release-contract.v1.json'), + `${JSON.stringify({ + generatedAt: '2026-07-28T00:00:00.000Z', + contractHash: 'sha256:contract', + templates: [ + { + ...targetTemplate, + releaseEligible: true, + qualificationExemption: null, + lastSuccessfulRealRun: { + provenancePath: baselineRelativePath, + provenanceHash: + baselineKind === 'direct' + ? `sha256:${createHash('sha256').update(readFileSync(baselineFile)).digest('hex')}` + : sha256Value('canonical-json', baselineBody), + templateId: baseline.template.id, + taskId: baseline.taskId, + graphHash: baseline.graphHash, + modelRevision: baseline.modelRevision, + runtimeFingerprint: baseline.runtimeFingerprint, + resourceCandidateId: baseline.execution.resourceCandidateId, + outputHash: baseline.mediaHash, + executionDurationSeconds: baseline.execution.elapsedSeconds, + peakMemoryBytes: baseline.execution.peakMemoryBytes, + }, + }, + ], + })}\n`, + ); + writeFileSync(join(historyDir, 'history.json'), `${JSON.stringify({ entries: {} })}\n`); + writeFileSync( + join(releaseDir, 'resource-run-receipts.v1.json'), + `${JSON.stringify({ + schemaVersion: 1, + format: 'modiff.resource-run-receipt-registry.v1', + receipts: [ + { + templateId: contractTemplate.id, + resourceFamily: targetTemplate.modelType, + templateSchemaHash: contractTemplate.schemaHash, + taskId: candidate.taskId, + capturedAt: candidate.capturedAt, + modelType: 'FluxSchnellPipeline', + dtype: 'bfloat16', + offloadMode: 'model_cpu', + quantizationMode: 'none', + recipe, + recipeHash, + bindingStatus: 'exact_route_bound', + routeBinding: candidate.routeBinding, + routeBindingHash: candidate.routeBindingHash, + modelRevision: candidate.modelRevision, + modelSetHash: candidate.models.hash, + resourceCandidateId: 'manual:test', + graphHash: candidate.graphHash, + workloadHash: resourceWorkloadHash(candidate), + baselineWorkloadHash: resourceWorkloadHash(baseline), + runtimeFingerprint: candidate.runtimeFingerprint, + outputHash: candidate.mediaHash, + executionDurationSeconds: candidate.execution.elapsedSeconds, + peakMemoryBytes: candidate.execution.peakMemoryBytes, + peakReservedBytes: 1400, + processRssBytes: 5600, + proofPath: proofRelativePath, + proofSha256, + }, + ], + })}\n`, + ); - const result = spawnSync(process.execPath, [resolve('scripts/resource-qualification-report.mjs')], { - cwd: resolve('.'), - encoding: 'utf8', - env: { ...process.env, MODIFF_BACKEND_DIR: backendRoot }, - }); - assert.equal(result.status, 0, result.stderr); - const report = JSON.parse(readFileSync(join(releaseDir, 'resource-recipe-coverage.v1.json'), 'utf8')); - assert.equal(report.coverage.qualified, 1); - const qualified = report.recipes.find((recipe) => recipe.status === 'qualified'); - assert.equal(qualified.evidence.evidenceSource, 'resource_run_receipt'); - assert.equal(qualified.evidence.taskId, candidate.taskId); - assert.equal(qualified.evidence.processRssBytes, 5600); - assert.equal(qualified.evidence.bindingStatus, 'exact_route_bound'); - assert.equal(qualified.evidence.routeBindingHash, candidate.routeBindingHash); - assert.equal(qualified.evidence.modelSetHash, candidate.models.hash); - // Standard-template evidence qualifies the explicitly declared family - // recipe only. Even when it retains an exact binding for audit, it cannot - // authorize the independent two-proof exact-route lane. - assert.equal(report.routeQualifications.length, 0); - } finally { - rmSync(backendRoot, { recursive: true, force: true }); - } -}); + const result = spawnSync(process.execPath, [resolve('scripts/resource-qualification-report.mjs')], { + cwd: resolve('.'), + encoding: 'utf8', + env: { ...process.env, MODIFF_BACKEND_DIR: backendRoot }, + }); + assert.equal(result.status, 0, result.stderr); + const report = JSON.parse(readFileSync(join(releaseDir, 'resource-recipe-coverage.v1.json'), 'utf8')); + assert.equal(report.coverage.qualified, 1); + const qualified = report.recipes.find((recipe) => recipe.status === 'qualified'); + assert.equal(qualified.evidence.evidenceSource, 'resource_run_receipt'); + assert.equal(qualified.evidence.taskId, candidate.taskId); + assert.equal(qualified.evidence.processRssBytes, 5600); + assert.equal(qualified.evidence.bindingStatus, 'exact_route_bound'); + assert.equal(qualified.evidence.routeBindingHash, candidate.routeBindingHash); + assert.equal(qualified.evidence.modelSetHash, candidate.models.hash); + assert.equal(qualified.modelType, targetTemplate.modelType); + // Standard-template evidence qualifies the explicitly declared family + // recipe only. Even when it retains an exact binding for audit, it cannot + // authorize the independent two-proof exact-route lane. + assert.equal(report.routeQualifications.length, 0); + if (baselineKind === 'gallery_bundle') { + const registryPath = join(releaseDir, 'resource-run-receipts.v1.json'); + const changedRegistry = JSON.parse(readFileSync(registryPath, 'utf8')); + changedRegistry.receipts[0].resourceFamily = 'AnotherCatalogFamily'; + writeFileSync(registryPath, JSON.stringify(changedRegistry)); + const rejected = spawnSync(process.execPath, [resolve('scripts/resource-qualification-report.mjs')], { + cwd: resolve('.'), + encoding: 'utf8', + env: { ...process.env, MODIFF_BACKEND_DIR: backendRoot }, + }); + assert.notEqual(rejected.status, 0); + assert.match(rejected.stderr, /another catalog family/); + } + } finally { + rmSync(backendRoot, { recursive: true, force: true }); + } + }); +} test('resource coverage treats missing local history as empty evidence on a clean host', () => { const backendRoot = mkdtempSync(join(tmpdir(), 'modiff-resource-report-clean-')); diff --git a/scripts/retained-gallery-provenance.mjs b/scripts/retained-gallery-provenance.mjs new file mode 100644 index 00000000..d02bc508 --- /dev/null +++ b/scripts/retained-gallery-provenance.mjs @@ -0,0 +1,232 @@ +import { createHash } from 'node:crypto'; +import retainedBatchPins from '../config/retained-gallery-approved-batch.v1.json' with { type: 'json' }; +import { canonicalJsonHash } from './canonical-json.mjs'; + +export const RETAINED_GALLERY_PROVENANCE_FORMAT = 'modiff.gallery.retained-template-provenance.v1'; + +export function decodedAudiovisualMediaHash(decodedMediaHash, decodedAudioHash) { + if (!decodedMediaHash || !decodedAudioHash) return null; + return 'sha256:decoded-av-v1:' + canonicalJsonHash({ decodedAudioHash, decodedMediaHash }); +} + +export function retainedGalleryFileLimit(path) { + // Retained comparison inputs preserve the original encoding of the file + // used by the recorded run. The registered size and hash are still checked. + if (/^\/?template-gallery\/inputs\/[a-z0-9_-]+\.before\.mp4$/u.test(path)) return 128 * 1024 * 1024; + if (path.endsWith('.mp4')) return 64 * 1024 * 1024; + if (/\.(png|webp|wav)$/u.test(path)) return 8 * 1024 * 1024; + return 2 * 1024 * 1024; +} + +// The public copy omits the original task ID and all underlying capture files. +// Pin the exact redacted associations that the maintainer reviewed against the +// original runs, so a rewritten association cannot approve itself. +const originalBackendSourceFingerprint = + 'sha256:backend-source-v1:8dd9a4d61d2c9c484e4167e38e7360d6b64a37d278e49771630e428189f5448b'; +const pinsByTemplate = new Map( + Object.entries({ + marigold_depth_synthetic_ramp: { + associationSha256: '9bf40847cebd0424cc17f8af5f87d7ce3a9e463ed0593177c1483f62a3a9e945', + backendSourceFingerprint: originalBackendSourceFingerprint, + backendContractFingerprint: + 'sha256:backend-contract-v1:d159675b024e7b008f6347cf9655169efaa55dc928ddd7e17aae1fab5ca6fb29', + templateRevisionHash: '4e43813ae0e4b664e4982545884644ec097eb0cc25e8f13ff549ac24c2f49ce1', + capturedAt: '2026-11-19T07:35:33.324Z', + inputSize: { width: 64, height: 48 }, + outputSize: { width: 64, height: 48 }, + outputExtension: 'webp', + }, + smollm2_rain_gauge: { + associationSha256: 'a31b55bc4524f2e5999ac84a3c5a9f62350f45c807a1f03a0c14904b31e19c8d', + backendSourceFingerprint: originalBackendSourceFingerprint, + backendContractFingerprint: + 'sha256:backend-contract-v1:cb7aeec701fb0aba61ab0c4fdffd3efbbde9f359f0b22b127d29c83cd44c1d00', + templateRevisionHash: 'aab7cfcf15db94d4e3d1415e963cabc0cf7e6a4baafd243d4095539b1004545b', + capturedAt: '2026-11-19T07:50:15.253Z', + outputExtension: 'json', + }, + spandrel_x2_synthetic_gradient: { + associationSha256: 'bc51ecc479d2996d44954e4283d8cdad857f72ea1d5e35af7ef5afcecd7c1fb0', + backendSourceFingerprint: + 'sha256:backend-source-v1:fd16f3acc76e08525b28215b603104d281e8ab26169b03076a112edbb7d100bb', + backendContractFingerprint: + 'sha256:backend-contract-v1:bb13de17797e5bf1f3427f45b91f253013f7f0e590749710332783f28d251566', + templateRevisionHash: '8de95b8b13a0636a37a7db672fbced2199e00e6719517c282f68f685bc5fd482', + capturedAt: '2026-11-19T06:05:44.894Z', + inputSize: { width: 64, height: 48 }, + outputSize: { width: 128, height: 96 }, + outputExtension: 'webp', + }, + wav2vec2_station_announcement: { + associationSha256: '74534ec594b1fd02b8913ff572fcaf7984b78a2533550ab6e6d58aee11bac514', + backendSourceFingerprint: + 'sha256:backend-source-v1:98ee8d4a895829905e82d8fefeea42b93e55c96252a5456561eada6ffef3c764', + backendContractFingerprint: + 'sha256:backend-contract-v1:0a28031ff08ae7b2858c04f373cdb65b75ee0a0bf66ba3ccec2a65ee033cdca9', + templateRevisionHash: 'fc0cb2cf3751967eb0ab2910d5b17fd0796bdf047cfc48871e5266346d925e37', + capturedAt: '2026-11-21T03:22:14.027Z', + outputExtension: 'json', + }, + whisper_tiny_blue_cup_transcription: { + associationSha256: '17998ed9f920a3656b4b30178f18b03ef3c709dcaf6e43cfdd7c0804fa5c7b8c', + backendSourceFingerprint: + 'sha256:backend-source-v1:674f8959f84e6b26f6ff04d8c7cdd2af9d9a5f4e438a325ecd4c042ecda9eeab', + backendContractFingerprint: + 'sha256:backend-contract-v1:a54ff5dae2f71449c7a5b7cbb9f3db0277594d7e5117f892ecc21d4ce676f98f', + templateRevisionHash: 'f9e6bd0b708cc08d7068555be9f4094f68cc9aa6115639792339f50b38c2e35c', + capturedAt: '2026-11-20T15:39:15.190Z', + outputExtension: 'json', + }, + lcm_dawn_alpine_lake: { + associationSha256: '33a841dd30dfa18c0de548283a9adbcb92b7a89fc28a0defe3975b79f0cbeb10', + backendSourceFingerprint: + 'sha256:backend-source-v1:56db5ad14d640c084f94cafa1e746939ebff60ac39d214f5d413dca61b94df66', + backendContractFingerprint: + 'sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194', + templateRevisionHash: '79ee258770b00a581d8e006b743cacd78ad992739353bcfcd724a920eb41fc8e', + capturedAt: '2026-11-20T16:22:50.650Z', + inputSize: { width: 512, height: 512 }, + outputSize: { width: 512, height: 512 }, + beforeExtension: 'webp', + outputExtension: 'webp', + }, + sana_sprint_monochrome_tiger: { + associationSha256: '71acd76b4251a090e7c311cdb2a7d60a1ca7efbb48740046c2a9c71d62c064ce', + backendSourceFingerprint: + 'sha256:backend-source-v1:51be643787f3d45e45bed24df176137979ee0c8983fd86521cc2bcf45ad568ec', + backendContractFingerprint: + 'sha256:backend-contract-v1:315617df789a8a5f57426692318e197c13786098718305edd1927471b5b9c194', + templateRevisionHash: '7f1ac6b38c8f3fcc701921fe7f500b4717c4f1bfdf5cc2f059e934972923296b', + capturedAt: '2026-11-20T16:56:35.946Z', + inputSize: { width: 1024, height: 1024 }, + outputSize: { width: 1024, height: 1024 }, + beforeExtension: 'webp', + outputExtension: 'webp', + }, + ...retainedBatchPins, + }), +); + +export function retainedGalleryProvenancePins(templateId) { + const pins = pinsByTemplate.get(templateId); + return ( + pins && { + ...pins, + inputSize: pins.inputSize && { ...pins.inputSize }, + outputSize: pins.outputSize && { ...pins.outputSize }, + } + ); +} + +export function buildRetainedGalleryProvenance(association) { + const { originalTaskId: _privateTaskId, ...publicAssociation } = association; + const { templateId } = publicAssociation; + const pins = pinsByTemplate.get(templateId); + if (!pins || canonicalJsonHash(publicAssociation) !== pins.associationSha256) { + throw new Error('Retained Gallery association differs from the approved observation.'); + } + return { + schemaVersion: 1, + format: RETAINED_GALLERY_PROVENANCE_FORMAT, + templateId, + association: publicAssociation, + }; +} + +function encodedHash(bytes) { + return Buffer.isBuffer(bytes) ? 'sha256:bytes:' + createHash('sha256').update(bytes).digest('hex') : null; +} + +export function verifyRetainedApprovedFiles(approvedFiles, readAsset) { + for (const { path, bytes, sha256 } of Object.values(approvedFiles)) { + const stored = readAsset(path); + if (stored?.length !== bytes || encodedHash(stored) !== 'sha256:bytes:' + sha256) { + throw new Error('A retained Gallery file differs from the exact approved bytes.'); + } + } +} + +// The normal Gallery verifier still checks the decoded output, full sidecar +// hash and quality rubric. This branch establishes the retained run bindings +// against the current catalog and the encoded bytes that were approved. +export function validateRetainedGalleryProvenance(bundle, entry, { templateRevisionHash, outputBytes, beforeBytes }) { + const pins = retainedGalleryProvenancePins(entry.templateId); + if ( + !pins || + bundle?.schemaVersion !== 1 || + bundle.format !== RETAINED_GALLERY_PROVENANCE_FORMAT || + bundle.templateId !== entry.templateId || + Object.keys(bundle).sort().join(',') !== 'association,format,schemaVersion,templateId' || + !bundle.association || + canonicalJsonHash(bundle.association) !== pins.associationSha256 + ) { + return ['retained Gallery provenance is outside the exact approved association']; + } + const association = bundle.association; + const { output, observedExecution } = association; + const models = observedExecution.modelSet; + const model = pins.primaryModelRepo ? models.find(({ repoId }) => repoId === pins.primaryModelRepo) : models[0]; + if (!model) return ['retained Gallery primary model is missing from the approved execution']; + const base = '/template-gallery/'; + const stem = entry.templateId; + const outputPath = base + stem + '.' + pins.outputExtension; + const expected = { + templateRevisionHash: pins.templateRevisionHash, + proofLockHash: association.associationHash, + graphHash: association.originalGraphHash, + backendSourceFingerprint: pins.backendSourceFingerprint, + backendContractFingerprint: pins.backendContractFingerprint, + templateLockHash: association.galleryTemplateLockHash, + promptSettingsHash: association.catalogPromptSettingsHash, + runtimeFingerprint: observedExecution.runtimeFingerprint, + modelRevision: model.repoId + '@' + model.revision, + modelCommit: model.revision, + mediaType: output.mediaType, + mediaHash: output.decodedMediaHash, + decodedAudioHash: output.video?.audio?.hash, + audiovisualMediaHash: decodedAudiovisualMediaHash(output.decodedMediaHash, output.video?.audio?.hash) ?? undefined, + outputPath, + thumbnailPath: outputPath, + provenancePath: base + 'reviews/' + stem + '.retained-template-provenance.json', + qualityReviewPath: base + 'reviews/' + stem + '.quality-review.json', + qualityReviewHash: association.qualityReviewHash, + qualityReviewStatus: 'approved_reviewed', + verificationStatus: 'reviewed', + verificationTimestamp: pins.capturedAt, + // A reused source must retain the exact already approved Gallery path. + beforePath: pins.inputSize + ? (pins.beforePath ?? base + 'inputs/' + stem + '.before.' + (pins.beforeExtension ?? 'png')) + : undefined, + afterPath: pins.inputSize ? outputPath : undefined, + beforeMediaHash: output.inputEncodedSha256, + beforeSourceMediaHash: pins.beforeExtension === 'mp4' ? output.inputEncodedSha256 : undefined, + width: pins.outputSize?.width, + height: pins.outputSize?.height, + frames: output.video?.frames, + durationSeconds: output.video && output.video.frames / output.video.fps, + ...Object.fromEntries(Object.entries(association.approvedFiles ?? {}).map(([field, ref]) => [field, ref.path])), + }; + const errors = Object.entries(expected) + .filter(([field, value]) => entry[field] !== value) + .map(([field]) => 'retained Gallery manifest ' + field + ' differs from the approved observation'); + if (templateRevisionHash !== pins.templateRevisionHash) { + errors.push('retained Gallery recipe does not match the current template'); + } + if (outputBytes?.length !== output.outputBytes || encodedHash(outputBytes) !== output.outputEncodedSha256) { + errors.push('retained Gallery output bytes differ from the approved artifact'); + } + if (pins.inputSize ? encodedHash(beforeBytes) !== output.inputEncodedSha256 : beforeBytes !== undefined) { + errors.push('retained Gallery source bytes differ from the approved artifact'); + } + if ( + ['modelSetHash', 'inputArtifactsHash', 'templateInputContractHash', 'cardPreviewPath', 'cardPreviewSha256'].some( + (field) => entry[field] !== undefined, + ) + ) { + errors.push('retained Gallery entry has unreviewed asset or capture fields'); + } + if (entry.posterPath !== association.approvedFiles?.posterPath?.path) { + errors.push('retained Gallery poster differs from the approved artifact'); + } + return errors; +} diff --git a/scripts/retained-gallery-recipes.ts b/scripts/retained-gallery-recipes.ts new file mode 100644 index 00000000..496c5746 --- /dev/null +++ b/scripts/retained-gallery-recipes.ts @@ -0,0 +1,28 @@ +import batchLocks from '../config/retained-gallery-batch-recipe-locks.v1.json'; +import legacyLocks from '../config/retained-gallery-legacy-recipe-locks.v1.json'; +import { APPROVED_RETAINED_TEMPLATES } from '../src/studio/retainedGalleryApprovedBatch'; +import { LEGACY_RETAINED_GALLERY_TEMPLATES, type RetainedGalleryRecipe } from '../src/studio/retainedGalleryTemplates'; +import type { StudioTemplate } from '../src/studio/types'; + +type RecipeLock = RetainedGalleryRecipe extends infer Recipe + ? Recipe extends RetainedGalleryRecipe + ? Omit + : never + : never; + +function bindRecipes(templates: readonly StudioTemplate[], locksById: Record) { + if (Object.keys(locksById).length !== templates.length) { + throw new Error('Retained Gallery metadata and the published template catalog differ.'); + } + return templates.map((template) => { + const lock = locksById[template.id]; + if (!lock) throw new Error(`Retained Gallery metadata is missing for ${template.id}.`); + return { ...lock, template }; + }); +} + +export const APPROVED_RETAINED_BATCH = bindRecipes(APPROVED_RETAINED_TEMPLATES, batchLocks); +export const RETAINED_GALLERY_TEMPLATES = [ + ...APPROVED_RETAINED_BATCH, + ...bindRecipes(LEGACY_RETAINED_GALLERY_TEMPLATES, legacyLocks), +]; diff --git a/scripts/retained-gallery-release.mjs b/scripts/retained-gallery-release.mjs new file mode 100644 index 00000000..48c7e719 --- /dev/null +++ b/scripts/retained-gallery-release.mjs @@ -0,0 +1,499 @@ +import assert from 'node:assert/strict'; +import { join } from 'node:path'; +import { readCanonicalEvidenceFile } from './release-contract-core.mjs'; +import { + canonicalJsonHash as galleryJsonHash, + decodedAudiovisualMediaHash, + galleryVerificationScope, + validateQualityReview, +} from './template-gallery-harness.mjs'; +import { + retainedGalleryFileLimit, + validateRetainedGalleryProvenance, + verifyRetainedApprovedFiles, +} from './retained-gallery-provenance.mjs'; +import { verifyRetainedSpeechGalleryEvidence } from './retained-speech-gallery-evidence.mjs'; + +const same = (actual, expected, label) => assert.deepEqual(actual, expected, label); + +const fullGraphImageResources = new Map([ + ['DDIMPipeline:unconditional_image', 'manual-resource-v1:DDIMPipeline|float32|none|none'], + ['DDPMPipeline:unconditional_image', 'manual-resource-v1:DDPMPipeline|float32|none|none'], + ['ConsistencyModelPipeline:unconditional_image', 'manual-resource-v1:ConsistencyModelPipeline|float32|none|none'], + ['PixArtSigmaPAGPipeline:text_to_image', 'manual-resource-v1:PixArtSigmaPAGPipeline|float32|model_cpu|none'], +]); + +export function retainedFullGraphImageResource(workflowId) { + return fullGraphImageResources.get(workflowId) ?? null; +} + +export function assertRetainedFullGraphImage(nativeOutput, receipt, output, dimensions, label) { + assert.equal(receipt.proofKind, 'real_backend_weights', label); + assert.equal(nativeOutput.collectionHash, receipt.outputHash, label); + assert.equal(nativeOutput.count, 1, label); + assert.equal(nativeOutput.items.length, 1, label); + const [image] = nativeOutput.items; + assert.equal(image.mediaType, 'image', label); + assert.equal(image.backendMediaHash, output.outputEncodedSha256, label); + assert.equal(image.byteSize, output.outputBytes, label); + assert.equal(image.decodedSha256, output.decodedMediaHash, label); + assert.deepEqual([image.width, image.height], dimensions, label); +} + +export function assertRetainedVideoAdjustment(nativeReceipt, output, label) { + const { videoAdjustment, video } = output; + const source = nativeReceipt.decodedOutput; + assert.equal(source.kind, 'video', label); + assert.equal(output.sourceOutputHash, nativeReceipt.outputHash, label); + assert.notEqual(output.outputEncodedSha256, nativeReceipt.outputHash, label); + assert.equal(videoAdjustment.schemaVersion, 1, label); + assert.equal(videoAdjustment.sourceVideoHash, source.hash, label); + for (const key of ['width', 'height', 'frames', 'fps', 'durationSeconds']) { + assert.equal(video[key], source[key], label); + } + if (videoAdjustment.kind === 'exposure_deflicker') { + assert.equal(source.audio, undefined, label); + assert.equal(video.hasAudio, false, label); + assert.equal(video.audio ?? null, null, label); + assert.equal(videoAdjustment.sourceAudioHash, undefined, label); + assert.notEqual(output.decodedMediaHash, source.hash, label); + } else { + assert.equal(videoAdjustment.kind, 'audio_gain', label); + assert.ok(source.audio?.hash && video.audio?.hash && video.hasAudio, label); + assert.equal(videoAdjustment.sourceAudioHash, source.audio.hash, label); + assert.equal(output.decodedMediaHash, source.hash, label); + assert.equal(video.audio.sourceSampleRate, source.audio.sourceSampleRate, label); + assert.equal(video.audio.channels, source.audio.channels, label); + assert.notEqual(video.audio.hash, source.audio.hash, label); + } +} + +function assertRetainedNativeIdentity(association, entry, nativeReceipt, label) { + const { observedExecution, output } = association; + const expected = { + sourceTemplateId: association.nativeSourceTaskContractId, + workflowId: association.workflowId, + proofKind: association.nativeProofKind ?? 'real_backend_input_bound_model_variant', + capturedAt: entry.verificationTimestamp, + backendSourceFingerprint: entry.backendSourceFingerprint, + canonicalWorkflowHash: association.originalCanonicalWorkflowHash, + graphHash: association.originalGraphHash, + evidenceSha256: association.originalEvidenceSha256, + modelSet: observedExecution.modelSet, + ...(association.nativeProofKind !== 'real_backend_weights' && { + observationLimits: observedExecution.observationLimits, + }), + outputHash: output.sourceOutputHash, + runtimeFingerprint: observedExecution.runtimeFingerprint, + executionDurationSeconds: observedExecution.executionDurationSeconds, + peakMemoryBytes: observedExecution.peakMemoryBytes, + resourceCandidateId: association.originalResourceCandidateId, + }; + const actual = Object.fromEntries(Object.keys(expected).map((key) => [key, nativeReceipt[key]])); + same(actual, expected, label); +} + +export function assertRetainedVideoReference(recipe, approvedFiles, nativeReceipt) { + const { referenceImageSha256 } = recipe; + assert.equal(approvedFiles.approvedReferenceImagePath?.sha256, referenceImageSha256); + if (referenceImageSha256 === undefined) return; + assert.match(referenceImageSha256, /^[a-f0-9]{64}$/u); + assert.equal(recipe.secondaryReferenceSha256, undefined); + const { inputBindings = [], inputRequirements } = recipe.template; + assert.ok(inputRequirements?.sourceVideo || inputBindings.some(({ field }) => field === 'sourceVideo')); + const imageBinding = inputBindings.find( + ({ field, mediaType }) => field === 'referenceImages' && mediaType === 'image', + ); + assert.equal( + inputRequirements?.referenceImages ?? imageBinding?.count, + 1, + 'The retained video recipe must declare its reference image.', + ); + if (nativeReceipt) { + same( + nativeReceipt.referenceBindings?.map(({ inputIndex, sha256 }) => ({ inputIndex, sha256 })), + [{ inputIndex: 0, sha256: referenceImageSha256 }], + 'Published video reference differs from the saved input.', + ); + } +} + +const motionInputRoles = [ + ['face', 'faceVideo', 'face_video', 'approvedFaceVideoPath'], + ['pose', 'poseVideo', 'pose_video', 'approvedPoseVideoPath'], + ['background', 'backgroundVideo', 'background_video', 'approvedBackgroundVideoPath'], + ['mask', 'maskVideo', 'mask', 'approvedMaskVideoPath'], +]; + +export function assertRetainedMotionInputs(recipe, approvedFiles, nativeReceipt) { + const expected = []; + const hashes = recipe.videoConditionerHashes ?? {}; + for (const [role, field, consumerPort, approvalKey] of motionInputRoles) { + const sha256 = hashes[role]; + assert.equal(approvedFiles[approvalKey]?.sha256, sha256); + if (sha256 === undefined) continue; + assert.match(sha256, /^[a-f0-9]{64}$/u); + assert.ok( + recipe.template.inputBindings?.some((binding) => binding.field === field && binding.mediaType === 'video'), + 'The retained recipe must declare its motion video input.', + ); + expected.push({ role, consumerPort, sha256 }); + } + assert.equal(Object.keys(hashes).length, expected.length, 'Unknown retained motion input role.'); + if (expected.length && nativeReceipt) { + const observed = nativeReceipt.videoConditionBindings?.map(({ role, consumerPort, sha256 }) => ({ + role, + consumerPort, + sha256, + })); + same(observed, expected, 'Published motion input differs from the saved typed binding.'); + } +} + +function assertRetainedBatchEvidence({ + recipe, + sourceWorkflow, + association, + entry, + native, + nativeReceipt, + outputBytes, +}) { + assert.equal(association.originalCanonicalWorkflowHash, sourceWorkflow.contract.graphHash); + assert.equal(association.originalEvidenceSha256, recipe.originalReceiptSha256); + assert.equal(association.originalGraphHash, recipe.retainedGraphHash); + assert.equal(association.originalResourceCandidateId, retainedFullGraphImageResource(recipe.workflowId)); + assert.equal(association.originalTemplateLockHash, null); + assert.equal(association.observedExecution.backendContractFingerprint, entry.backendContractFingerprint); + assert.equal(association.observedExecution.observationLimits.physicalPlatformQualification, false); + assert.equal(association.review.redistributionConfirmed, true); + assert.equal(association.approvedFiles.approvedOriginalReviewPath.sha256, association.review.draftReviewSha256); + assert.equal( + association.approvedFiles.approvedOriginalProvenancePath.sha256, + association.review.draftProvenanceSha256, + ); + const inputHash = + association.output.inputEncodedSha256?.replace(/^sha256:bytes:/u, '') ?? + association.approvedFiles.approvedSourcePath?.sha256 ?? + (recipe.inputSha256 === recipe.guideSha256 ? association.approvedFiles.approvedGuidePath?.sha256 : undefined) ?? + association.privateSourceSha256; + assert.equal(inputHash, recipe.inputSha256); + assert.equal(association.approvedFiles.approvedMaskPath?.sha256, recipe.maskSha256); + assert.equal(association.approvedFiles.approvedGuidePath?.sha256, recipe.guideSha256); + assert.equal(association.approvedFiles.approvedClosingFramePath?.sha256, recipe.lastFrameSha256); + assert.equal(association.approvedFiles.approvedSecondaryReferencePath?.sha256, recipe.secondaryReferenceSha256); + assertRetainedVideoReference(recipe, association.approvedFiles, nativeReceipt); + assertRetainedMotionInputs(recipe, association.approvedFiles, nativeReceipt); + if (recipe.secondaryReferenceSha256) { + assert.equal(recipe.template.mode, 'multi_image_reference_edit'); + same( + association.output.orderedReferenceHashes, + [recipe.inputSha256, recipe.secondaryReferenceSha256].map((hash) => 'sha256:bytes:' + hash), + 'Retained Gallery reference order differs from the template.', + ); + } + assert.equal( + association.output.maskEncodedSha256, + recipe.maskSha256 ? 'sha256:bytes:' + recipe.maskSha256 : undefined, + ); + if (!nativeReceipt) return; + const label = 'Published Gallery batch proof differs from the verified native receipt.'; + assertRetainedNativeIdentity(association, entry, nativeReceipt, label); + if (retainedFullGraphImageResource(recipe.workflowId)) { + assert.equal(nativeReceipt.backendContractFingerprint, entry.backendContractFingerprint, label); + assertRetainedFullGraphImage( + native.provenance.output, + nativeReceipt, + association.output, + [entry.width, entry.height], + label, + ); + return; + } + assert.equal(nativeReceipt.canonicalDefaultsExecuted, false, label); + if (recipe.workflowId === 'HuggingFaceSpeechRecognitionModel:speech_translation') { + const verified = verifyRetainedSpeechGalleryEvidence({ + recipe, + native, + galleryOutput: { + bytes: outputBytes, + ref: { + bytes: association.output.outputBytes, + sha256: association.output.outputEncodedSha256.slice('sha256:bytes:'.length), + }, + }, + }); + assert.deepEqual(verified.output, association.output, label); + assert.equal(verified.backendContractFingerprint, entry.backendContractFingerprint, label); + return; + } + if (recipe.workflowId !== 'SpandrelVideoUpscale:video_upscale') { + assert.equal(nativeReceipt.backendContractFingerprint, entry.backendContractFingerprint, label); + } + assert.equal(nativeReceipt.promptBinding?.sha256, recipe.promptSha256, label); + assert.equal(nativeReceipt.inputBinding?.sha256, recipe.inputSha256, label); + assert.equal(nativeReceipt.maskBinding?.sha256, recipe.maskSha256, label); + assert.equal(nativeReceipt.guideBinding?.sha256, recipe.guideSha256, label); + assert.equal(nativeReceipt.lastFrameBinding?.sha256, recipe.lastFrameSha256, label); + if (recipe.secondaryReferenceSha256) { + same( + nativeReceipt.referenceBindings?.map(({ inputIndex, sha256 }) => ({ inputIndex, sha256 })), + [{ inputIndex: 1, sha256: recipe.secondaryReferenceSha256 }], + label, + ); + assert.equal(nativeReceipt.inputBinding?.nodeId, nativeReceipt.referenceBindings[0].nodeId, label); + } + if (recipe.workflowId === 'QwenImageLayeredPipeline:layer_decomposition') { + const { orderedLayerItems } = association.output; + same(nativeReceipt.decodedOutput, { kind: 'image_collection', items: orderedLayerItems }, label); + assert.equal(orderedLayerItems.length, recipe.template.example.lockedSettings.layers, label); + for (const [index, layer] of orderedLayerItems.entries()) { + assert.equal(association.approvedFiles[`approvedLayer${index + 1}Path`]?.sha256, layer.encodedSha256, label); + } + } else if (association.output.mediaType === 'image') { + assert.equal(nativeReceipt.decodedOutput.hash, association.output.decodedMediaHash, label); + } + if (association.output.mediaType === 'audio') { + const { decodedMediaHash, durationSeconds, sampleRate, channels, outputEncodedSha256 } = association.output; + same( + nativeReceipt.decodedOutput, + { kind: 'audio', hash: decodedMediaHash, durationSeconds, sampleRate, channels }, + label, + ); + assert.equal(outputEncodedSha256, nativeReceipt.outputHash, label); + } + if (association.output.mediaType === 'video') { + const { decodedMediaHash, outputEncodedSha256, video } = association.output; + const { hasAudio, ...videoMetadata } = video; + assert.equal(hasAudio, Boolean(videoMetadata.audio), label); + assert.equal(entry.decodedAudioHash, videoMetadata.audio?.hash, label); + assert.equal( + entry.audiovisualMediaHash, + decodedAudiovisualMediaHash(decodedMediaHash, entry.decodedAudioHash) ?? undefined, + label, + ); + if (association.output.videoAdjustment) { + assertRetainedVideoAdjustment(nativeReceipt, association.output, label); + return; + } + if (recipe.workflowId === 'SpandrelVideoUpscale:video_upscale') { + const { width, height, frames, fps } = videoMetadata; + same(nativeReceipt.decodedOutput, { hash: decodedMediaHash, width, height, frameCount: frames, fps }, label); + assert.equal(width, 2 * nativeReceipt.inputBinding.width, label); + assert.equal(height, 2 * nativeReceipt.inputBinding.height, label); + } else { + same(nativeReceipt.decodedOutput, { kind: 'video', hash: decodedMediaHash, ...videoMetadata }, label); + } + assert.equal(outputEncodedSha256, nativeReceipt.outputHash, label); + } +} + +function assertRetainedSpandrelEvidence({ recipe, sourceWorkflow, association, entry, nativeReceipt }) { + const { observedExecution, output } = association; + const { modelArtifact, observationLimits } = observedExecution; + assert.equal(association.originalCanonicalWorkflowHash, sourceWorkflow.contract.graphHash); + assert.equal(association.originalEvidenceSha256, recipe.originalReceiptSha256); + assert.equal(association.originalGraphHash, recipe.retainedGraphHash); + same( + observationLimits, + { fullConsumedFieldAccounting: false, physicalPlatformQualification: false }, + 'Spandrel retained evidence has a broader scope than its saved run.', + ); + assert.equal(association.originalResourceCandidateId, null); + assert.equal(association.originalTemplateLockHash, null); + const { modelArtifact: selected } = recipe.template; + same( + modelArtifact.artifact, + { + source: 'hub', + repository: selected.value, + revision: selected.revision, + weightName: 'RealESRGAN_x2plus.pth', + sha256: selected.sha256, + }, + 'Spandrel retained checkpoint differs from the template.', + ); + assert.equal(modelArtifact.byteSize, selected.byteSize); + assert.equal(output.inputEncodedSha256, `sha256:bytes:${recipe.inputSha256}`); + if (!nativeReceipt) return; + const label = 'Published Spandrel proof differs from the verified native receipt.'; + assertRetainedNativeIdentity(association, entry, nativeReceipt, label); + same(nativeReceipt.modelArtifact, modelArtifact, label); + assert.equal(nativeReceipt.decodedOutput?.hash, output.decodedMediaHash, label); + assert.equal(nativeReceipt.inputBinding?.sha256, recipe.inputSha256); +} + +function assertRetainedTechnicalRecipe({ recipe, sourceWorkflow, association, entry, nativeReceipt }) { + const { observedExecution, output, recipeObservation } = association; + const speech = output.mediaType === 'json'; + assert.equal(association.originalCanonicalWorkflowHash, sourceWorkflow.contract.graphHash); + assert.equal(association.originalEvidenceSha256, recipe.originalReceiptSha256); + assert.equal(association.originalGraphHash, recipe.retainedGraphHash); + assert.equal(association.originalResourceCandidateId, null); + assert.equal(association.originalTemplateLockHash, null); + assert.equal(observedExecution.backendContractFingerprint, entry.backendContractFingerprint); + assert.equal(observedExecution.observationLimits.physicalPlatformQualification, false); + if (speech) { + assert.equal(recipeObservation.input.sha256, recipe.inputSha256); + assert.equal(recipeObservation.input.galleryScope, 'private_source_hash_only'); + assert.equal(entry.beforePath, undefined); + } else { + assert.equal(output.inputEncodedSha256, `sha256:bytes:${recipe.inputSha256}`); + assert.equal(recipeObservation.observedEditControls.prompt, recipe.template.prompt); + assert.equal(observedExecution.observationLimits.sourceGeometryQualified, false); + } + if (!nativeReceipt) return; + assertRetainedNativeIdentity( + association, + entry, + nativeReceipt, + 'Published recipe differs from the verified native receipt.', + ); + assert.equal(nativeReceipt.canonicalDefaultsExecuted, false); + assert.equal(nativeReceipt.inputBinding?.sha256, recipe.inputSha256); + if (speech) { + same(nativeReceipt.transcriptEvidence, recipeObservation.transcript, 'Published transcript observations differ.'); + } else { + assert.equal(nativeReceipt.backendContractFingerprint, entry.backendContractFingerprint); + assert.equal(nativeReceipt.promptBinding.sha256, recipe.promptSha256); + assert.equal(nativeReceipt.decodedOutput.hash, output.decodedMediaHash); + } +} + +export function verifiedRetainedGalleryAssetIndex(clientRoot, expectedSource) { + const { source, assets } = galleryVerificationScope(clientRoot); + same(source, expectedSource, 'Retained release evidence differs from the activated Gallery source.'); + assert.equal(source.mode, 'huggingface', 'Retained release evidence requires an activated public Gallery.'); + return new Map(assets.map((asset) => [asset.path, asset])); +} + +export function createRetainedGalleryReleaseReader({ clientRoot, source, registry }) { + let approved; + const open = (path) => { + assert.ok(typeof path === 'string' && path.startsWith('/template-gallery/'), 'Invalid retained Gallery path.'); + const asset = approved.get(path.slice(1)); + assert.ok( + asset && /^sha256:bytes:[a-f0-9]{64}$/u.test(asset.sha256), + 'Retained Gallery asset is unapproved or unregistered.', + ); + return readCanonicalEvidenceFile( + join(clientRoot, 'public'), + { + path: asset.path, + bytes: asset.size, + sha256: asset.sha256.slice('sha256:bytes:'.length), + }, + retainedGalleryFileLimit(asset.path), + ).bytes; + }; + + return ({ recipe, entry, sourceWorkflow, templateRevisionHash, localAssociation, native, nativeReceipt }) => { + if (!sourceWorkflow || !entry?.proofLockHash?.startsWith('sha256:retained-template-association-v1:')) return null; + if (!approved) { + approved = verifiedRetainedGalleryAssetIndex(clientRoot, source); + same(JSON.parse(open('/template-gallery/manifest.json')), registry, 'Registered Gallery manifest differs.'); + } + assert.equal(sourceWorkflow.manifest.id, recipe.workflowId); + assert.equal(sourceWorkflow.manifest.sourceTemplateId, recipe.sourceTaskTemplateId); + const bundle = JSON.parse(open(entry.provenancePath)); + const outputBytes = open(entry.outputPath); + assert.equal(galleryJsonHash(bundle), entry.provenanceHash); + same( + validateRetainedGalleryProvenance(bundle, entry, { + templateRevisionHash, + outputBytes, + beforeBytes: entry.beforePath ? open(entry.beforePath) : undefined, + }), + [], + 'Retained Gallery provenance differs from the approved recipe.', + ); + assert.equal(entry.thumbnailPath, entry.outputPath, 'The published retained example uses an unreviewed thumbnail.'); + const { association } = bundle; + assert.equal(association.workflowId, recipe.workflowId); + assert.equal(association.nativeSourceTaskContractId, sourceWorkflow.manifest.sourceTemplateId); + const spandrel = ['SpandrelImageUpscale:image_upscale', 'SpandrelVideoUpscale:video_upscale'].includes( + recipe.workflowId, + ); + if (spandrel) assertRetainedSpandrelEvidence({ recipe, sourceWorkflow, association, entry, nativeReceipt }); + if (association.recipeObservation) { + assertRetainedTechnicalRecipe({ recipe, sourceWorkflow, association, entry, nativeReceipt }); + } + if (association.approvedFiles) { + assertRetainedBatchEvidence({ recipe, sourceWorkflow, association, entry, native, nativeReceipt, outputBytes }); + verifyRetainedApprovedFiles(association.approvedFiles, open); + } + if (localAssociation) { + const { originalTaskId, ...redacted } = localAssociation; + same(association, redacted, 'Published Gallery proof differs from the locally revalidated saved run.'); + } + const review = JSON.parse(open(entry.qualityReviewPath)); + assert.equal(galleryJsonHash(review), entry.qualityReviewHash); + assert.equal(association.qualityReviewHash, entry.qualityReviewHash); + const reviewBindings = Object.fromEntries( + [ + 'templateId', + 'templateLockHash', + 'promptSettingsHash', + 'modelRevision', + 'runtimeFingerprint', + 'graphHash', + 'proofLockHash', + ].map((key) => [key, entry[key]]), + ); + assert.equal(entry.reviewer, review.reviewer); + assert.equal(entry.reviewedAt, review.reviewedAt); + same( + validateQualityReview( + review, + { + ...reviewBindings, + decodedMediaHash: entry.mediaHash, + ...(entry.decodedAudioHash && { + decodedAudioHash: entry.decodedAudioHash, + audiovisualMediaHash: entry.audiovisualMediaHash, + }), + }, + 'approved_reviewed', + ), + [], + 'Retained Gallery quality review failed.', + ); + const { observedExecution } = association; + assert.ok( + Number.isFinite(observedExecution.executionDurationSeconds) && observedExecution.executionDurationSeconds > 0, + ); + assert.ok(Number.isSafeInteger(observedExecution.peakMemoryBytes) && observedExecution.peakMemoryBytes > 0); + return { + templateId: entry.templateId, + proofKind: 'reviewed_retained_template_execution', + proofFormat: bundle.format, + capturedAt: entry.verificationTimestamp, + graphHash: association.originalGraphHash, + canonicalWorkflowHash: sourceWorkflow.contract.graphHash, + backendNodes: sourceWorkflow.contract.backendNodes, + catalogTemplateLockHash: association.catalogTemplateLockHash, + promptSettingsHash: association.catalogPromptSettingsHash, + modelRevision: entry.modelRevision, + runtimeFingerprint: observedExecution.runtimeFingerprint, + backendSourceFingerprint: entry.backendSourceFingerprint, + backendContractFingerprint: entry.backendContractFingerprint, + resourceCandidateId: null, + executionDurationSeconds: observedExecution.executionDurationSeconds, + peakMemoryBytes: observedExecution.peakMemoryBytes, + mediaHash: entry.mediaHash, + outputHash: entry.mediaHash, + outputPath: entry.outputPath, + provenancePath: entry.provenancePath, + provenanceHash: entry.provenanceHash, + verificationStatus: entry.verificationStatus, + qualityReviewStatus: entry.qualityReviewStatus, + ...(spandrel + ? { modelArtifact: observedExecution.modelArtifact, observationLimits: observedExecution.observationLimits } + : {}), + ...(association.recipeObservation || observedExecution.observationLimits?.memoryMeasurement + ? { observationLimits: observedExecution.observationLimits } + : {}), + evidenceMatch: 'current_reviewed_retained_recipe', + }; + }; +} diff --git a/scripts/retained-gallery-release.test.mjs b/scripts/retained-gallery-release.test.mjs new file mode 100644 index 00000000..66868f85 --- /dev/null +++ b/scripts/retained-gallery-release.test.mjs @@ -0,0 +1,534 @@ +import assert from 'node:assert/strict'; +import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { basename, dirname, join, resolve } from 'node:path'; +import { test } from 'node:test'; +import { canonicalJsonHash } from './canonical-json.mjs'; +import { canonicalWorkflowContract, readCanonicalEvidenceFile } from './release-contract-core.mjs'; +import { + assertRetainedFullGraphImage, + assertRetainedMotionInputs, + assertRetainedVideoAdjustment, + assertRetainedVideoReference, + createRetainedGalleryReleaseReader, + retainedFullGraphImageResource, + verifiedRetainedGalleryAssetIndex, +} from './retained-gallery-release.mjs'; +import { createHash } from 'node:crypto'; +import { + retainedGalleryFileLimit, + validateRetainedGalleryProvenance, + verifyRetainedApprovedFiles, +} from './retained-gallery-provenance.mjs'; +import { loadTemplateRuntime } from './template-gallery-harness.mjs'; + +const hash = (value) => `sha256:canonical-json:${canonicalJsonHash(value)}`; + +test('full-graph image recipes require the saved resource settings and exact native image', () => { + assert.equal( + retainedFullGraphImageResource('PixArtSigmaPAGPipeline:text_to_image'), + 'manual-resource-v1:PixArtSigmaPAGPipeline|float32|model_cpu|none', + ); + for (const pipeline of ['DDIMPipeline', 'DDPMPipeline', 'ConsistencyModelPipeline']) { + assert.equal( + retainedFullGraphImageResource(`${pipeline}:unconditional_image`), + `manual-resource-v1:${pipeline}|float32|none|none`, + ); + } + assert.equal(retainedFullGraphImageResource('PixArtSigmaPipeline:text_to_image'), null); + const image = { + mediaType: 'image', + backendMediaHash: 'original-image-bytes', + decodedSha256: 'original-decoded-image', + width: 32, + height: 32, + byteSize: 2000, + }; + const native = { collectionHash: 'original-collection', count: 1, items: [image] }; + const receipt = { proofKind: 'real_backend_weights', outputHash: native.collectionHash }; + const output = { + outputEncodedSha256: image.backendMediaHash, + decodedMediaHash: image.decodedSha256, + outputBytes: 2000, + }; + const check = (collection, run = receipt) => assertRetainedFullGraphImage(collection, run, output, [32, 32]); + assert.doesNotThrow(() => check(native)); + assert.throws(() => check(native, { ...receipt, proofKind: 'real_backend_prompt_bound_model_variant' })); + assert.throws(() => check({ ...native, collectionHash: 'another-collection' })); + assert.throws(() => check({ ...native, items: [image, image] })); + for (const override of [ + { width: 64 }, + { mediaType: 'video' }, + { byteSize: 2001 }, + { backendMediaHash: 'another-encoded-image' }, + { decodedSha256: 'another-decoded-image' }, + ]) { + assert.throws(() => check({ ...native, items: [{ ...image, ...override }] })); + } +}); + +test('only retained Gallery before videos accept the larger encoded source size', () => { + for (const prefix of ['', '/']) { + assert.equal( + retainedGalleryFileLimit(prefix + 'template-gallery/inputs/amber-glass.before.mp4'), + 128 * 1024 * 1024, + ); + } + for (const path of [ + '/template-gallery/amber-glass.mp4', + '/template-gallery/inputs/amber-glass.mask.mp4', + '/template-gallery/inputs/amber-glass.guide.mp4', + '/template-gallery/reviews/amber-glass.before.mp4', + '/template-gallery/inputs/../amber-glass.before.mp4', + ]) { + assert.equal(retainedGalleryFileLimit(path), 64 * 1024 * 1024, path); + } +}); + +const savedLargeSource = process.env.MODIFF_RETAINED_LARGE_BEFORE_VIDEO; +test('the saved Amber source stays byte-bound at its original size', { skip: !savedLargeSource }, () => { + const source = resolve(savedLargeSource); + const ref = { + path: basename(source), + bytes: 88384819, + sha256: 'da6a0abe90bfc8c4efcb4a63201a6db839c944416cef49d452b629fbb86c3ec0', + }; + assert.throws( + () => readCanonicalEvidenceFile(dirname(source), ref, retainedGalleryFileLimit('template-gallery/amber-glass.mp4')), + /Evidence file size\/type differs/u, + ); + const beforeLimit = retainedGalleryFileLimit('template-gallery/inputs/amber-glass.before.mp4'); + assert.equal(readCanonicalEvidenceFile(dirname(source), ref, beforeLimit).bytes.length, ref.bytes); + assert.throws( + () => readCanonicalEvidenceFile(dirname(source), { ...ref, sha256: '0'.repeat(64) }, beforeLimit), + /Evidence file hash differs/u, + ); +}); + +test('a retained video reference binds the declared material image to the exact saved input', () => { + const sha256 = '1'.repeat(64); + const recipe = { + referenceImageSha256: sha256, + template: { + inputBindings: [ + { field: 'sourceVideo', mediaType: 'video', count: 1 }, + { field: 'maskVideo', mediaType: 'video', count: 1 }, + { field: 'referenceImages', mediaType: 'image', count: 1 }, + ], + }, + }; + const approvedFiles = { approvedReferenceImagePath: { sha256 } }; + const native = { referenceBindings: [{ nodeId: 'reference-load', field: 'file', inputIndex: 0, sha256 }] }; + assert.doesNotThrow(() => assertRetainedVideoReference(recipe, approvedFiles, native)); + assert.doesNotThrow(() => assertRetainedVideoReference(recipe, approvedFiles)); + assert.doesNotThrow(() => + assertRetainedVideoReference( + { ...recipe, template: { inputRequirements: { sourceVideo: true, maskVideo: true, referenceImages: 1 } } }, + approvedFiles, + native, + ), + ); + assert.throws(() => assertRetainedVideoReference(recipe, {}, native)); + assert.throws(() => assertRetainedVideoReference({}, approvedFiles, native)); + assert.throws( + () => assertRetainedVideoReference(recipe, approvedFiles, { referenceBindings: [{ inputIndex: 1, sha256 }] }), + /Published video reference differs/u, + ); + assert.throws( + () => + assertRetainedVideoReference(recipe, approvedFiles, { + referenceBindings: [{ inputIndex: 0, sha256: '0'.repeat(64) }], + }), + /Published video reference differs/u, + ); + assert.throws( + () => + assertRetainedVideoReference( + { ...recipe, template: { inputBindings: recipe.template.inputBindings.slice(0, 2) } }, + approvedFiles, + native, + ), + /must declare its reference image/u, + ); +}); + +test('retained motion roles reject swapped, omitted, and undeclared inputs', () => { + const face = '2'.repeat(64); + const pose = '3'.repeat(64); + const recipe = { + videoConditionerHashes: { face, pose }, + template: { + inputBindings: [ + { field: 'faceVideo', mediaType: 'video' }, + { field: 'poseVideo', mediaType: 'video' }, + ], + }, + }; + const approved = { approvedFaceVideoPath: { sha256: face }, approvedPoseVideoPath: { sha256: pose } }; + const bindings = [ + { role: 'face', consumerPort: 'face_video', sha256: face }, + { role: 'pose', consumerPort: 'pose_video', sha256: pose }, + ]; + assert.doesNotThrow(() => assertRetainedMotionInputs(recipe, approved, { videoConditionBindings: bindings })); + assert.throws(() => assertRetainedMotionInputs(recipe, { ...approved, approvedFaceVideoPath: { sha256: pose } })); + assert.throws(() => assertRetainedMotionInputs(recipe, { approvedFaceVideoPath: { sha256: face } })); + assert.throws( + () => + assertRetainedMotionInputs( + { ...recipe, videoConditionerHashes: { face, pose, unknown: '4'.repeat(64) } }, + approved, + ), + /Unknown retained motion input role/u, + ); + assert.throws( + () => assertRetainedMotionInputs(recipe, approved, { videoConditionBindings: [...bindings].reverse() }), + /differs from the saved typed binding/u, + ); +}); + +test('an exposure-corrected retained video stays bound to its silent source and frame cadence', () => { + const video = { width: 512, height: 512, frames: 16, fps: 8, durationSeconds: 2 }; + const native = { outputHash: 'native-file', decodedOutput: { kind: 'video', hash: 'native-video', ...video } }; + const output = { + sourceOutputHash: 'native-file', + outputEncodedSha256: 'corrected-file', + decodedMediaHash: 'corrected-video', + video: { ...video, hasAudio: false }, + videoAdjustment: { schemaVersion: 1, kind: 'exposure_deflicker', sourceVideoHash: 'native-video' }, + }; + assert.doesNotThrow(() => assertRetainedVideoAdjustment(native, output)); + assert.doesNotThrow(() => + assertRetainedVideoAdjustment(native, { ...output, video: { ...output.video, audio: null } }), + ); + for (const modification of [ + { sourceOutputHash: 'different-file' }, + { outputEncodedSha256: 'native-file' }, + { decodedMediaHash: 'native-video' }, + { video: { ...output.video, frames: 15 } }, + { video: { ...output.video, fps: 16 } }, + { video: { ...output.video, hasAudio: true } }, + { video: { ...output.video, audio: { hash: 'unexpected-audio' } } }, + { videoAdjustment: { ...output.videoAdjustment, sourceVideoHash: 'different-video' } }, + { videoAdjustment: { ...output.videoAdjustment, kind: 'replace_video' } }, + ]) { + assert.throws(() => assertRetainedVideoAdjustment(native, { ...output, ...modification })); + } +}); + +test('an audio-gain adjustment retains the exact video and recorded original audio', () => { + const video = { width: 768, height: 512, frames: 81, fps: 24, durationSeconds: 3.38 }; + const audio = { sourceSampleRate: 24000, channels: 2, hash: 'native-audio' }; + const native = { outputHash: 'native-file', decodedOutput: { kind: 'video', hash: 'native-video', ...video, audio } }; + const output = { + sourceOutputHash: 'native-file', + outputEncodedSha256: 'adjusted-file', + decodedMediaHash: 'native-video', + video: { ...video, hasAudio: true, audio: { ...audio, hash: 'adjusted-audio' } }, + videoAdjustment: { + schemaVersion: 1, + kind: 'audio_gain', + sourceVideoHash: 'native-video', + sourceAudioHash: audio.hash, + }, + }; + assert.doesNotThrow(() => assertRetainedVideoAdjustment(native, output)); + for (const modification of [ + { decodedMediaHash: 'changed-video' }, + { video: { ...output.video, audio } }, + { video: { ...output.video, audio: { ...output.video.audio, sourceSampleRate: 48000 } } }, + { video: { ...output.video, audio: { ...output.video.audio, channels: 1 } } }, + { videoAdjustment: { ...output.videoAdjustment, sourceAudioHash: 'different-audio' } }, + ]) { + assert.throws(() => assertRetainedVideoAdjustment(native, { ...output, ...modification })); + } +}); + +test('retained registration binds the exact approved review, provenance and mask files', () => { + const archive = new Map([ + ['/template-gallery/reviews/example.original-review.json', Buffer.from('{"review":"accepted"}\n')], + ['/template-gallery/reviews/example.original-provenance.json', Buffer.from('{"source":"saved run"}\n')], + ['/template-gallery/inputs/example.mask.png', Buffer.from('original mask bytes')], + ]); + const approved = Object.fromEntries( + [...archive].map(([path, bytes], index) => [ + index, + { path, bytes: bytes.length, sha256: createHash('sha256').update(bytes).digest('hex') }, + ]), + ); + assert.doesNotThrow(() => verifyRetainedApprovedFiles(approved, (path) => archive.get(path))); + for (const [path, bytes] of archive) { + const changed = Buffer.from(bytes); + changed[0] ^= 1; + assert.throws( + () => verifyRetainedApprovedFiles(approved, (key) => (key === path ? changed : archive.get(key))), + /exact approved bytes/u, + ); + assert.throws( + () => verifyRetainedApprovedFiles(approved, (key) => (key === path ? undefined : archive.get(key))), + /exact approved bytes/u, + ); + } +}); + +function fixture(t) { + const root = mkdtempSync(join(tmpdir(), 'retained-gallery-release-')); + t.after(() => rmSync(root, { recursive: true, force: true })); + mkdirSync(join(root, 'config')); + mkdirSync(join(root, 'src', 'studio'), { recursive: true }); + const available = { path: 'template-gallery/retained.json', size: 10, sha256: `sha256:bytes:${'a'.repeat(64)}` }; + const held = { path: 'template-gallery/withheld.webp', size: 20, sha256: `sha256:bytes:${'b'.repeat(64)}` }; + const payload = { schemaVersion: 1, assetVersion: 'v1', assets: [available, held] }; + const inventory = { + ...payload, + status: 'ready', + assetSetId: hash(payload), + assetCount: 2, + totalBytes: 30, + missingAssets: [], + }; + const source = { + schemaVersion: 1, + mode: 'huggingface', + localBasePath: '/template-gallery', + repoType: 'dataset', + repoId: 'maintainer/gallery', + revision: 'c'.repeat(40), + pathPrefix: 'template-gallery', + assetManifestPath: '_modiff/template-assets.v1.json', + assetSetId: hash({ ...payload, assets: [available] }), + completeAssetSetId: inventory.assetSetId, + unavailableAssets: [held.path], + }; + const rights = { + schemaVersion: 1, + assetSetId: inventory.assetSetId, + records: [ + { path: available.path, sha256: available.sha256, publishDecision: 'approved' }, + { path: held.path, sha256: held.sha256, publishDecision: 'hold', holdReason: 'existing rights hold' }, + ], + }; + const write = () => { + for (const [name, value] of [ + ['src/studio/templateAssetSource.json', source], + ['config/template-assets.v1.json', inventory], + ['config/template-asset-rights.v1.json', rights], + ]) + writeFileSync(join(root, name), JSON.stringify(value)); + }; + return { root, source, inventory, rights, available, held, write }; +} + +test('retained publication resolves only exact registered rights-approved assets', (t) => { + const { root, source, available, held, write } = fixture(t); + write(); + const approved = verifiedRetainedGalleryAssetIndex(root, source); + assert.deepEqual(approved.get(available.path), available); + assert.equal(approved.has(held.path), false); + assert.throws( + () => verifiedRetainedGalleryAssetIndex(root, { ...source, revision: 'd'.repeat(40) }), + /differs from the activated Gallery source/u, + ); +}); + +test('retained release refuses stale Gallery inventory, unbound rights and changed holds', (t) => { + for (const alter of [ + (value) => { + value.source.assetSetId = 'sha256:canonical-json:' + 'd'.repeat(64); + }, + (value) => { + value.inventory.assets[0].size += 1; + }, + (value) => { + value.rights.records[0].sha256 = value.held.sha256; + }, + (value) => { + value.rights.records[1].publishDecision = 'approved'; + }, + (value) => { + value.source.unavailableAssets = []; + }, + ]) { + const value = fixture(t); + alter(value); + value.write(); + assert.throws(() => verifiedRetainedGalleryAssetIndex(value.root, value.source)); + } +}); + +test( + 'the staged Spandrel preview qualifies only the locked recipe and original saved execution', + { + skip: !process.env.MODIFF_VERIFY_SPANDREL_GALLERY_STAGE, + }, + async () => { + const clientRoot = resolve(import.meta.dirname, '..'); + const backend = resolve(process.env.MODIFF_BACKEND_DIR || join(clientRoot, '..', 'MoDiff')); + const stage = resolve(process.env.MODIFF_VERIFY_SPANDREL_GALLERY_STAGE); + const json = (root, path) => JSON.parse(readFileSync(join(root, path), 'utf8')); + const runtime = await loadTemplateRuntime(clientRoot); + const template = runtime.templates.find(({ id }) => id === 'spandrel_x2_synthetic_gradient'); + const registry = json(stage, 'public/template-gallery/manifest.json'); + const source = json(stage, 'src/studio/templateAssetSource.json'); + const entry = runtime.findManifestEntry(template, registry); + assert.ok(entry, 'The saved Gallery preview must match its current technical recipe.'); + const workflowId = 'SpandrelImageUpscale:image_upscale'; + const manifest = json(backend, 'data/workflow-library-manifest.json').workflows.find(({ id }) => id === workflowId); + const graph = json(backend, `data/graphs/${manifest.graphPath}`); + const receiptRegistry = json(backend, 'data/qualification/release/canonical-workflow-run-receipts.v1.json'); + const nativeReceipt = receiptRegistry.receipts.find((row) => row.workflowId === workflowId); + assert.ok(nativeReceipt); + const proof = { + recipe: { + template, + workflowId, + sourceTaskTemplateId: manifest.sourceTemplateId, + originalReceiptSha256: nativeReceipt.evidenceSha256, + retainedGraphHash: nativeReceipt.graphHash, + inputSha256: nativeReceipt.inputBinding.sha256, + }, + entry, + sourceWorkflow: { manifest, contract: canonicalWorkflowContract(manifest, graph) }, + templateRevisionHash: canonicalJsonHash({ template, settings: runtime.lockedSettingsForTemplate(template) }), + nativeReceipt, + }; + const read = createRetainedGalleryReleaseReader({ clientRoot: stage, source, registry }); + const retained = read(proof); + assert.equal(retained.proofKind, 'reviewed_retained_template_execution'); + assert.equal(retained.resourceCandidateId, null); + assert.deepEqual(retained.observationLimits, nativeReceipt.observationLimits); + assert.deepEqual(retained.modelArtifact, nativeReceipt.modelArtifact); + assert.deepEqual(read({ ...proof, nativeReceipt: undefined }), retained); + for (const changes of [ + { graphHash: 'different executed graph' }, + { evidenceSha256: 'a'.repeat(64) }, + { capturedAt: 'changed capture timestamp' }, + { backendSourceFingerprint: 'changed source fingerprint' }, + { modelArtifact: { ...nativeReceipt.modelArtifact, byteSize: 1 } }, + { peakMemoryBytes: 1 }, + ]) { + assert.throws( + () => read({ ...proof, nativeReceipt: { ...nativeReceipt, ...changes } }), + /Published Spandrel proof differs from the verified native receipt/u, + ); + } + }, +); + +test( + 'approved retained speech and edit examples bind exact bytes and native observations', + { skip: !process.env.MODIFF_VERIFY_WHISPER_LCM_GALLERY_STAGE && !process.env.MODIFF_VERIFY_SANA_GALLERY_STAGE }, + async () => { + const clientRoot = resolve(import.meta.dirname, '..'); + const backend = resolve(process.env.MODIFF_BACKEND_DIR || join(clientRoot, '..', 'MoDiff')); + const whisperLcmStage = process.env.MODIFF_VERIFY_WHISPER_LCM_GALLERY_STAGE; + const sanaStage = process.env.MODIFF_VERIFY_SANA_GALLERY_STAGE; + const json = (root, path) => JSON.parse(readFileSync(join(root, path), 'utf8')); + const manifest = json(backend, 'data/workflow-library-manifest.json'); + const receiptRegistry = json(backend, 'data/qualification/release/canonical-workflow-run-receipts.v1.json'); + const runtime = await loadTemplateRuntime(clientRoot); + for (const [id, workflowId, stagePath] of [ + ['whisper_tiny_blue_cup_transcription', 'HuggingFaceSpeechRecognitionModel:speech_to_text', whisperLcmStage], + ['lcm_dawn_alpine_lake', 'LatentConsistencyModelPipeline:edit_image', whisperLcmStage], + ['sana_sprint_monochrome_tiger', 'SanaSprintPipeline:edit_image', sanaStage], + ]) { + if (!stagePath) continue; + const stage = resolve(stagePath); + const registry = json(stage, 'public/template-gallery/manifest.json'); + const source = json(stage, 'src/studio/templateAssetSource.json'); + const read = createRetainedGalleryReleaseReader({ clientRoot: stage, source, registry }); + const template = runtime.templates.find((item) => item.id === id); + const entry = runtime.findManifestEntry(template, registry); + const workflow = manifest.workflows.find((item) => item.id === workflowId); + const graph = json(backend, `data/graphs/${workflow.graphPath}`); + const nativeReceipt = receiptRegistry.receipts.find((item) => item.workflowId === workflowId); + assert.ok(entry); + const proof = { + recipe: { + template, + workflowId, + sourceTaskTemplateId: workflow.sourceTemplateId, + originalReceiptSha256: nativeReceipt.evidenceSha256, + retainedGraphHash: nativeReceipt.graphHash, + inputSha256: nativeReceipt.inputBinding.sha256, + promptSha256: nativeReceipt.promptBinding?.sha256, + }, + entry, + sourceWorkflow: { manifest: workflow, contract: canonicalWorkflowContract(workflow, graph) }, + templateRevisionHash: canonicalJsonHash({ template, settings: runtime.lockedSettingsForTemplate(template) }), + nativeReceipt, + }; + const retained = read(proof); + assert.equal(retained.proofKind, 'reviewed_retained_template_execution'); + assert.equal(retained.resourceCandidateId, null); + assert.deepEqual(retained.observationLimits, nativeReceipt.observationLimits); + assert.deepEqual(read({ ...proof, nativeReceipt: undefined }), retained); + assert.throws( + () => read({ ...proof, nativeReceipt: { ...nativeReceipt, resourceCandidateId: 'made-up' } }), + /Published recipe differs from the verified native receipt/u, + ); + const provenance = json(stage, `public${entry.provenancePath}`); + const outputBytes = readFileSync(join(stage, `public${entry.outputPath}`)); + const beforeBytes = entry.beforePath && readFileSync(join(stage, `public${entry.beforePath}`)); + const check = { templateRevisionHash: proof.templateRevisionHash, outputBytes, beforeBytes }; + const changed = Buffer.from('not the original media'); + assert.deepEqual(validateRetainedGalleryProvenance(provenance, entry, check), []); + assert.ok(validateRetainedGalleryProvenance(provenance, entry, { ...check, outputBytes: changed }).length); + assert.ok(validateRetainedGalleryProvenance(provenance, entry, { ...check, beforeBytes: changed }).length); + assert.equal('originalTaskId' in provenance.association, false); + if (workflowId.startsWith('HuggingFace')) { + assert.equal(entry.beforePath, undefined); + assert.equal(provenance.association.recipeObservation.input.galleryScope, 'private_source_hash_only'); + } else { + const review = json(stage, `public${entry.qualityReviewPath}`); + assert.match(entry.beforePath, /\.before\.webp$/u); + const sana = id === 'sana_sprint_monochrome_tiger'; + assert.equal(review.scores.promptAdherence, sana ? 4 : 3); + assert.equal(review.maintainerAcceptance.decision, 'accepted_with_disclosed_limitations'); + if (sana) { + const { observedEditControls, modelTerms } = provenance.association.recipeObservation; + assert.equal(observedEditControls.strength, 0.75); + assert.equal(modelTerms.textEncoder, 'Gemma-2-2B-IT'); + const stock = structuredClone(provenance); + stock.association.recipeObservation.observedEditControls.strength = 0.5; + assert.ok(validateRetainedGalleryProvenance(stock, entry, check).length); + } + } + } + }, +); + +const fluxSourceFixture = process.env.MODIFF_VERIFY_REUSED_FLUX_GALLERY; +test( + 'approved FLUX edits require their pinned shared Gallery source even when the bytes match', + { skip: !fluxSourceFixture }, + () => { + const registry = JSON.parse(readFileSync(join(fluxSourceFixture, 'public/template-gallery/manifest.json'), 'utf8')); + for (const [templateId, sourceFilename] of [ + ['flux_canny_black_ink_cube', 'joy_plus_lavender_on_limestone.before.png'], + ['flux_depth_marine_teal_bow_edit', 'flux_depth_marine_bow_repair.before.webp'], + ]) { + const entry = registry.examples.find((item) => item.templateId === templateId); + assert.equal(entry.beforePath, '/template-gallery/inputs/' + sourceFilename); + const read = (path) => readFileSync(join(fluxSourceFixture, 'public' + path)); + const provenance = JSON.parse(read(entry.provenancePath)); + const frozen = { + templateRevisionHash: entry.templateRevisionHash, + outputBytes: read(entry.outputPath), + beforeBytes: read(entry.beforePath), + }; + assert.deepEqual(validateRetainedGalleryProvenance(provenance, entry, frozen), []); + const substitute = { + ...entry, + beforePath: '/template-gallery/inputs/' + templateId + '.before.' + sourceFilename.split('.').at(-1), + }; + assert.ok( + validateRetainedGalleryProvenance(provenance, substitute, frozen).some((item) => item.includes('beforePath')), + ); + assert.ok( + validateRetainedGalleryProvenance(provenance, entry, { ...frozen, beforeBytes: Buffer.from('changed') }).some( + (item) => item.includes('source bytes'), + ), + ); + } + }, +); diff --git a/scripts/retained-gallery-templates.test.mjs b/scripts/retained-gallery-templates.test.mjs new file mode 100644 index 00000000..bc1d1f72 --- /dev/null +++ b/scripts/retained-gallery-templates.test.mjs @@ -0,0 +1,823 @@ +import assert from 'node:assert/strict'; +import { execFileSync } from 'node:child_process'; +import { createHash } from 'node:crypto'; +import { existsSync, readFileSync } from 'node:fs'; +import { after, before, test } from 'node:test'; +import { join, resolve } from 'node:path'; +import { createServer } from 'vite'; +import retainedGalleryAuthoringArchives from '../config/retained-gallery-authoring-archives.v1.json' with { type: 'json' }; +import { canonicalJsonHash } from './canonical-json.mjs'; +import { canonicalGraphIdentity } from './live-proof-provenance.mjs'; +import { readCanonicalEvidenceFile } from './release-contract-core.mjs'; +import { selectCanonicalWorkflowSources } from './workflow-library-manifest-state.mjs'; + +const client = resolve(import.meta.dirname, '..'); +const backend = resolve(process.env.MODIFF_BACKEND_DIR || join(client, '../MoDiff')); +const sha256 = (bytes) => createHash('sha256').update(bytes).digest('hex'); +let server, recipes, fixture, studio, flow, nodeStore, graphBridge, published, exactness, approvedBatchIds; + +before(async () => { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, value), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { + location: { origin: 'http://127.0.0.1:5191' }, + localStorage: globalThis.localStorage, + sessionStorage: globalThis.localStorage, + dispatchEvent: () => true, + setTimeout: globalThis.setTimeout, + }; + server = await createServer({ + root: client, + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, hmr: false, watch: null }, + appType: 'custom', + }); + ({ RETAINED_GALLERY_TEMPLATES: recipes } = await server.ssrLoadModule('/scripts/retained-gallery-recipes.ts')); + const { APPROVED_RETAINED_BATCH } = await server.ssrLoadModule('/scripts/retained-gallery-recipes.ts'); + approvedBatchIds = new Set(APPROVED_RETAINED_BATCH.map(({ template }) => template.id)); + ({ STUDIO_TEMPLATES: published } = await server.ssrLoadModule('/src/studio/templates.ts')); + exactness = await server.ssrLoadModule('/src/studio/templateExactness.ts'); + ({ useStudioStore: studio } = await server.ssrLoadModule('/src/stores/useStudioStore.ts')); + ({ useFlowStore: flow } = await server.ssrLoadModule('/src/stores/useFlowStore.ts')); + ({ useNodesStore: nodeStore } = await server.ssrLoadModule('/src/stores/useNodeStore.ts')); + graphBridge = await server.ssrLoadModule('/src/studio/graphBridge.ts'); + const python = + process.env.MODIFF_BACKEND_PYTHON || + join(backend, '.venv', process.platform === 'win32' ? 'Scripts/python.exe' : 'bin/python'); + const script = join(client, 'scripts/template-operation-fixtures.py'); + const args = [script, '--mock-cuda']; + fixture = JSON.parse( + execFileSync( + process.platform === 'win32' ? python : join(backend, 'scripts/with-runtime-env.sh'), + process.platform === 'win32' ? args : [python, ...args], + { + cwd: backend, + encoding: 'utf8', + maxBuffer: 64 * 1024 * 1024, + env: { ...process.env, MODIFF_BACKEND_DIR: backend }, + input: JSON.stringify( + recipes.map(({ template: { id, modelType, mode, executionSelection } }) => ({ + id, + studioSpecOnly: !executionSelection, + selection: executionSelection ?? { bindingSpec: { modelType, mode } }, + })), + ), + stdio: ['pipe', 'pipe', 'pipe'], + }, + ), + ); +}); + +after(async () => { + await server?.close(); +}); + +const authorsAudioFixture = 'review-source-audio.wav'; + +function retainedTemplateGraph(recipe, sourceValue = recipe.inputFileName ?? authorsAudioFixture) { + const manifest = JSON.parse(readFileSync(join(backend, 'data/workflow-library-manifest.json'), 'utf8')); + const { template } = recipe; + const row = manifest.workflows.find((item) => item.id === recipe.workflowId); + assert.equal(row.sourceTemplateId, recipe.sourceTaskTemplateId); + assert.equal(row.modelType, template.modelType); + assert.equal(row.mode, template.mode); + + const graph = JSON.parse(readFileSync(join(backend, 'data/graphs', row.graphPath), 'utf8')); + const api = flow.getState().exportGraph('retained-template-check', undefined, { + sourceGraph: graph, + randomizeSeeds: false, + }); + const nodes = Object.values(api.nodes); + if (recipe.inputSha256) { + const [binding] = template.inputBindings; + const audio = binding.mediaType === 'audio'; + assert.equal(binding.origin, 'user'); + assert.match(recipe.inputSha256, /^[a-f0-9]{64}$/u); + const source = nodes.find( + (node) => node.module === (audio ? 'modules.Audio' : 'modules.Image') && node.action === 'Load', + ); + assert.deepEqual(source.params.file.value, audio ? '' : []); + source.params.file.value = [sourceValue]; + } + if (recipe.promptSha256) { + assert.equal(recipe.promptSha256, sha256(template.prompt)); + const promptNode = nodes.find((node) => node.action === (template.mode === 'edit_image' ? 'Edit' : 'GenerateText')); + assert.equal(promptNode.params.prompt.value, ''); + promptNode.params.prompt.value = template.prompt; + if (template.modelType === 'SanaSprintPipeline' && template.mode === 'edit_image') { + assert.equal(promptNode.params.strength.value, 0.5); + assert.equal(template.example.lockedSettings.strength, 0.75); + promptNode.params.strength.value = template.example.lockedSettings.strength; + } + } + return canonicalGraphIdentity(api); +} + +test('retained Gallery recipes preserve the native graph identities and standalone skeletons', () => { + const skeletons = recipes.map(({ sourceTaskTemplateId, template }) => ({ + id: sourceTaskTemplateId, + modelType: template.modelType, + mode: template.mode, + })); + const sources = selectCanonicalWorkflowSources( + published, + skeletons, + new Set(recipes.map(({ template }) => template.id)), + ); + for (const recipe of recipes) { + const { template, reviewedCatalogLock } = recipe; + const settings = exactness.getTemplateLockedSettings(template); + assert.equal(published.filter((item) => item.id === template.id).length, 1); + assert.equal( + published.find((item) => item.id === template.id), + template, + ); + assert.equal(canonicalJsonHash({ template, settings }), recipe.reviewedTemplateSha256); + assert.equal(exactness.getTemplateLockHash(template), reviewedCatalogLock.templateLockHash); + assert.equal( + exactness.getTemplateLockHash(template, `${template.modelArtifact.value}@${template.modelArtifact.revision}`), + reviewedCatalogLock.galleryTemplateLockHash, + ); + assert.equal(exactness.getPromptSettingsHash(settings), reviewedCatalogLock.promptSettingsHash); + if (recipe.inputSha256) assert.equal(exactness.getTemplateInputContractHash(template), undefined); + const source = sources.get(`${template.modelType}|${template.mode}`); + const authored = published.find(({ id }) => id === recipe.sourceTaskTemplateId); + const task = skeletons.find(({ id }) => id === recipe.sourceTaskTemplateId); + assert.equal(source.id, recipe.sourceTaskTemplateId, recipe.workflowId); + assert.deepEqual(source, authored ?? { ...task, taskContract: true }); + if (approvedBatchIds.has(template.id)) { + const authoringArchive = retainedGalleryAuthoringArchives[recipe.workflowId]; + assert.equal(authoringArchive.descriptorSha256, recipe.originalReceiptSha256); + assert.ok(authoringArchive.bytes > 0); + assert.match(authoringArchive.sha256, /^[a-f0-9]{64}$/u); + const evidenceRoot = join( + backend, + 'data/qualification/release/canonical-workflow-evidence', + recipe.originalReceiptSha256, + ); + const evidenceFile = join(evidenceRoot, 'evidence.json'); + if (recipe.promptSha256 !== undefined) assert.equal(sha256(template.prompt), recipe.promptSha256); + if (existsSync(evidenceFile)) { + const originalAuthoring = readCanonicalEvidenceFile(evidenceRoot, { + path: 'authoring-spec.original.json', + bytes: authoringArchive.bytes, + sha256: authoringArchive.sha256, + }); + assert.equal(JSON.parse(originalAuthoring.bytes).canonicalWorkflowId, recipe.workflowId); + const bytes = readFileSync(evidenceFile); + assert.equal(sha256(bytes), recipe.originalReceiptSha256); + const descriptor = JSON.parse(bytes); + const capture = descriptor.capture + ? JSON.parse(readCanonicalEvidenceFile(evidenceRoot, descriptor.capture).bytes) + : descriptor; + if (descriptor.format === 'modiff.private.saved-vace-composite.v1') { + const run = JSON.parse(readCanonicalEvidenceFile(evidenceRoot, descriptor.run).bytes); + assert.equal(run.task.status, 'completed'); + assert.equal(canonicalGraphIdentity(run.outputs[0].apiGraphSnapshot).hash, recipe.retainedGraphHash); + assert.deepEqual( + [descriptor.sourceVideo.sha256, descriptor.maskVideo.sha256, descriptor.referenceImage.sha256], + [recipe.inputSha256, recipe.maskSha256, recipe.referenceImageSha256], + ); + continue; + } + const saved = JSON.parse( + readCanonicalEvidenceFile(evidenceRoot, capture.creatorPackage ?? capture.creator).bytes, + ); + const api = flow.getState().exportGraph('retained-batch-check', undefined, { + sourceGraph: saved.graph, + randomizeSeeds: false, + }); + assert.equal(canonicalGraphIdentity(api).hash, recipe.retainedGraphHash, template.id); + assert.deepEqual( + Object.values( + capture.inputs ?? (capture.input || capture.source ? [capture.input ?? { file: capture.source }] : []), + ) + .map(({ file }) => file.sha256) + .sort(), + [ + ...new Set([ + recipe.inputSha256, + recipe.maskSha256, + recipe.guideSha256, + recipe.lastFrameSha256, + recipe.secondaryReferenceSha256, + recipe.referenceImageSha256, + ...Object.values(recipe.videoConditionerHashes ?? {}), + ]), + ] + .filter(Boolean) + .sort(), + ); + } + } else if (recipe.inputLocatorSha256) { + const evidenceRoot = join( + backend, + 'data/qualification/release/canonical-workflow-evidence', + recipe.originalReceiptSha256, + ); + const evidenceFile = join(evidenceRoot, 'evidence.json'); + assert.match(recipe.inputLocatorSha256, /^[a-f0-9]{64}$/u); + assert.equal(recipe.inputFileName, undefined); + // Repository CI has no private source. The browser-form checks below + // can use a synthetic picker string without exposing the real locator. + if (existsSync(evidenceFile)) { + const bytes = readFileSync(evidenceFile); + assert.equal(sha256(bytes), recipe.originalReceiptSha256); + const { capture } = JSON.parse(bytes); + const { inputs } = JSON.parse(readCanonicalEvidenceFile(evidenceRoot, capture).bytes); + assert.equal(inputs.length, 1); + assert.equal(sha256(inputs[0].sourceValue), recipe.inputLocatorSha256); + assert.equal(retainedTemplateGraph(recipe, inputs[0].sourceValue).hash, recipe.retainedGraphHash, template.id); + } + } else { + assert.equal(retainedTemplateGraph(recipe).hash, recipe.retainedGraphHash, template.id); + } + } + const pag = published.find((item) => item.id === 'pixart_sigma_pag_pink_mascot'); + assert.equal(pag.modelType, 'PixArtSigmaPAGPipeline'); + assert.equal(pag.prompt, ''); + assert.equal(pag.example.lockedSettings.pagScale, 4); + assert.deepEqual( + published.filter((item) => item.modelType === 'ShapEPipeline').map(({ id }) => id), + ['shap_e_traffic_cone_turntable'], + ); +}); + +test('fresh Expert recipes prepare with current backend specs and without a generation request', async () => { + const previousFetch = globalThis.fetch; + const previousWebSocket = globalThis.WebSocket; + const previousStudio = studio.getState(); + const previousFlow = flow.getState(); + const previousNodes = nodeStore.getState(); + let contract; + let audioContract; + let videoContract; + const fieldActions = []; + try { + globalThis.WebSocket = undefined; + globalThis.fetch = async (request, options) => { + assert.ok( + String(request).endsWith('/fields/action'), + 'Only metadata actions belong in the offline authoring test.', + ); + const payload = JSON.parse(options.body); + fieldActions.push(payload.fn); + if (payload.module === 'modules.DiffusersAudio') { + assert.equal(payload.fn, 'update_audio_contract'); + assert.ok(audioContract); + if (payload.action === 'LoadPipeline') { + assert.equal(payload.values.pipeline_class, audioContract.pipelineClass); + assert.equal(payload.values.mode, audioContract.mode); + flow + .getState() + .setParam( + payload.node, + 'pipeline', + { direction: 'output', origin: 'audio_contract', value: audioContract }, + 'signal', + ); + } else { + assert.equal(payload.action, 'Generate'); + if (payload.values.audio_contract !== audioContract.pipelineClass) { + assert.deepEqual(payload.values.audio_contract, audioContract); + } + } + return Response.json({ error: false, nodes: [] }); + } + if (payload.module === 'modules.DiffusersVideo') { + assert.ok(videoContract); + if (payload.action === 'LoadPipeline') { + assert.equal(payload.fn, 'select_adapter'); + assert.equal(payload.values.pipeline_class, videoContract.pipelineClass); + flow.getState().setParam(payload.node, 'pipeline', { direction: 'output', value: videoContract }, 'signal'); + } else { + assert.ok(['Generate', 'GenerateVideoAudio'].includes(payload.action)); + assert.equal(payload.fn, 'update_adapter_modes'); + assert.deepEqual(payload.values.video_contract, videoContract); + } + return Response.json({ error: false, nodes: [] }); + } + assert.equal(payload.module, 'modules.DiffusersImage'); + assert.ok(contract); + if (payload.fn === 'update_pipeline_contract') { + assert.equal(payload.action, 'LoadPipeline'); + assert.equal(payload.values.pipeline_class, contract.pipelineClass); + assert.equal(payload.values.mode, contract.mode); + flow.getState().setParam(payload.node, 'pipeline', { direction: 'output', value: contract }, 'signal'); + } else { + assert.equal(payload.fn, 'update_image_contract'); + assert.ok( + [ + 'PredictMap', + 'Edit', + 'Generate', + 'Inpaint', + 'ControlGenerate', + 'ControlEdit', + 'ControlInpaint', + 'LayerDecompose', + 'UnconditionalGenerate', + ].includes(payload.action), + ); + assert.deepEqual(payload.values.image_contract, contract); + } + return Response.json({ error: false, nodes: [] }); + }; + nodeStore.setState({ + nodesRegistry: fixture.registry, + studioModelCapabilities: fixture.capabilities, + studioModelCapabilitiesAuthoritative: true, + studioExecutionSpecInvalid: false, + }); + for (const recipe of recipes) { + const { template } = recipe; + // FLF metadata changes the runtime ports. Exercise that transition with + // the real backend in the retained first/last-frame browser test. + if (recipe.lastFrameSha256) continue; + const row = fixture.recipes.find((item) => item.id === template.id); + if (template.workflowBlockSettings?.videoMaskedComposite) { + const { createTemplateOperationGraph } = await server.ssrLoadModule('/src/studio/templateOperationWorkflow.ts'); + const { parseOperationStarter } = await server.ssrLoadModule('/src/workflow/operationStarterRequest.ts'); + const { parseOperationContracts } = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + assert.ok(template.executionSelection, 'The composite requires its declared normal template graph.'); + studio.getState().createWorkflowTab(template.label, undefined, 'template', template.id); + studio.getState().applyTemplate(template, { + sourceVideo: 'review-source-video.mp4', + maskVideo: 'review-mask-video.mp4', + referenceImages: ['review-reference-image.png'], + }); + const form = studio.getState().form; + const selection = template.executionSelection; + const starter = parseOperationStarter( + row.starter, + selection.pipelineClass, + selection.task, + parseOperationContracts(fixture.publicPayload.operationContracts, 3), + selection, + ); + const capability = fixture.capabilities.find(({ modelType }) => modelType === selection.bindingSpec.modelType); + assert.ok(capability); + const graph = createTemplateOperationGraph(template, form, starter, fixture.registry, row.spec, capability); + const api = flow.getState().exportGraph('retained-video-composite', undefined, { + sourceGraph: graph, + randomizeSeeds: false, + }); + const actions = Object.entries(api.nodes); + const [compositeId, compose] = actions.find(([, node]) => node.action === 'MaskedComposite'); + const [alignedId, aligned] = actions.find(([, node]) => node.action === 'AlignMask'); + const [upscaleId, upscale] = actions.find(([, node]) => node.action === 'Upscaler'); + const [encoderId, encoder] = actions.find(([, node]) => node.action === 'EncodeInputs'); + const [generatedId, generated] = actions.find( + ([, node]) => node.module === 'modules.DiffusersVideo' && node.action === 'Generate', + ); + const output = actions.find(([, node]) => node.module === 'modules.Video' && node.action === 'Export')[1]; + const settings = template.workflowBlockSettings.videoMaskedComposite; + assert.equal(api.nodes[compose.params.source.sourceId].params.file.value, 'review-source-video.mp4'); + assert.equal(api.nodes[aligned.params.mask.sourceId].params.file.value, 'review-mask-video.mp4'); + assert.deepEqual(api.nodes[encoder.params.reference_images.sourceId].params.file.value, [ + 'review-reference-image.png', + ]); + assert.equal(encoder.params.mask.sourceId, alignedId); + assert.equal(generated.params.encoded_inputs.sourceId, encoderId); + assert.equal(upscale.params.image.sourceId, generatedId); + assert.equal(compose.params.generated.sourceId, upscaleId); + assert.equal(compose.params.mask.sourceId, alignedId); + assert.equal(compose.params.feather.value, settings.feather); + assert.equal(aligned.params.grow_pixels.value, settings.maskGrowPixels); + assert.equal(output.params.video.sourceId, compositeId); + continue; + } + const { spec, imageContract, audioContract: nextAudioContract, videoContract: nextVideoContract } = row; + contract = imageContract; + audioContract = nextAudioContract; + videoContract = nextVideoContract; + const inputBinding = template.inputBindings?.[0]; + const audio = inputBinding?.mediaType === 'audio'; + const sourceVideo = template.inputBindings?.some(({ field }) => field === 'sourceVideo'); + const controlVideo = template.inputBindings?.some(({ field }) => field === 'controlVideo'); + const guide = template.inputBindings?.some(({ field }) => field === 'controlImage') + ? 'review-control-image.png' + : undefined; + const input = + recipe.inputSha256 && ['referenceImages', 'sourceAudio'].includes(inputBinding?.field) + ? [ + recipe.inputFileName ?? (audio ? authorsAudioFixture : 'review-source-image.png'), + ...(recipe.secondaryReferenceSha256 ? ['review-second-reference.png'] : []), + ] + : []; + const mask = recipe.maskSha256 ? 'review-mask-image.png' : undefined; + const motionInputRoles = [ + ['face', 'faceVideo', 'loadFaceVideo', 'face_video'], + ['pose', 'poseVideo', 'loadPoseVideo', 'pose_video'], + ['background', 'backgroundVideo', 'loadBackgroundVideo', 'background_video'], + ['mask', 'maskVideo', 'loadMaskVideo', 'mask'], + ].filter(([role]) => recipe.videoConditionerHashes?.[role]); + const motionInputs = Object.fromEntries( + motionInputRoles.map(([role, field]) => [field, 'review-' + role + '.mp4']), + ); + const tabId = studio.getState().createWorkflowTab(template.label, undefined, 'template', template.id); + studio.getState().applyTemplate( + template, + audio + ? { sourceAudio: input[0] } + : { + referenceImages: input, + ...(mask && { maskImage: mask }), + ...(guide && { controlImage: guide }), + ...(sourceVideo && { sourceVideo: 'review-source-video.mp4' }), + ...(controlVideo && { controlVideo: 'review-control-video.mp4' }), + ...motionInputs, + }, + ); + const form = studio.getState().form; + assert.equal(form.device, template.example.lockedSettings.device ?? 'cuda:0'); + assert.equal(form.resourceMode, template.example.lockedSettings.resourceMode ?? 'expert'); + assert.equal(form.randomSeed, false); + await graphBridge.createOrUpdateStudioGraph(form, undefined, 3000).catch((error) => { + assert.fail( + `${template.id}: ${error.message}: ${JSON.stringify({ + finalization: studio.getState().graphFinalization, + nodes: flow.getState().nodes.map((node) => [node.data.studioRole, node.data.action]), + edges: flow.getState().edges.map(({ sourceHandle, targetHandle }) => [sourceHandle, targetHandle]), + })}`, + ); + }); + if (template.workflowBlockSettings?.videoPromptWindows) { + const { applyTemplateVideoPromptWindows } = await server.ssrLoadModule('/src/studio/templateWorkflow.ts'); + applyTemplateVideoPromptWindows(template); + } + const binding = studio.getState().graphBinding; + assert.equal(binding.executionSpec.contentHash, spec.contentHash); + assert.equal(studio.getState().activeWorkflowTabId, tabId); + const api = flow.getState().exportGraph('retained-template-check', undefined, { randomizeSeeds: false }); + const attentionBackend = template.example.lockedSettings.attentionBackend; + assert.equal(form.attentionBackend, attentionBackend, template.id); + if (attentionBackend !== undefined) { + const recipe = Object.values(api.nodes).find(({ action }) => action === 'DiffusersExecutionRecipe'); + assert.equal(recipe?.params.attention_backend.value, attentionBackend, template.id); + } + if (template.modelType === 'SpandrelImageUpscale') { + const source = api.nodes[binding.nodes.loadImage].params; + const upscaler = api.nodes[binding.nodes.imageUpscaler].params; + const preview = api.nodes[binding.nodes.preview].params; + assert.deepEqual(source.file.value, input); + assert.equal(source.alpha_channel.value, 'ignore'); + const { value, ...artifact } = template.modelArtifact; + assert.deepEqual(upscaler.model_id.value, { ...artifact, value: `${value}/RealESRGAN_x2plus.pth` }); + assert.equal(upscaler.tile_size.value, 256); + assert.equal(upscaler.tile_overlap.value, 32); + assert.equal(upscaler.downscale.value, 1); + assert.equal(upscaler.device.value, 'cuda:0'); + assert.equal(upscaler.image.sourceId, binding.nodes.loadImage); + assert.equal(upscaler.image.sourceKey, 'image'); + assert.equal(preview.image.sourceId, binding.nodes.imageUpscaler); + assert.equal(preview.image.sourceKey, 'output'); + const comparable = structuredClone(api); + comparable.nodes[binding.nodes.loadImage].params.file.value = [recipe.inputFileName]; + assert.deepEqual(canonicalGraphIdentity(comparable), retainedTemplateGraph(recipe)); + continue; + } + if (template.modelType === 'SpandrelVideoUpscale') { + const upscaler = api.nodes[binding.nodes.videoUpscaler].params; + const { value, ...artifact } = template.modelArtifact; + assert.deepEqual(upscaler.model_id.value, { ...artifact, value: `${value}/RealESRGAN_x2plus.pth` }); + assert.deepEqual([upscaler.video.value].flat(), ['review-source-video.mp4']); + assert.equal(upscaler.fps.value, template.example.lockedSettings.fps); + assert.equal(upscaler.tile_size.value, 256); + assert.equal(upscaler.tile_overlap.value, 32); + continue; + } + const loader = api.nodes[binding.nodes[spec.roles.find(([, key]) => key.endsWith('.' + spec.loaderAction))[0]]]; + if (template.mode === 'text_to_3d') { + const { lockedSettings, lockedSeed } = template.example; + const render = Object.entries(api.nodes).find( + ([, node]) => node.module === 'modules.DiffusersThreeD' && node.action === 'GenerateRenderedArtifact', + ); + assert.ok(render); + const [renderId, generation] = render; + const delivery = Object.values(api.nodes).find( + ({ module, action }) => module === 'modules.Video' && action === 'Export', + ); + assert.equal(loader.params.model_id.value.value, template.modelArtifact.value); + assert.equal(loader.params.revision.value, template.modelArtifact.revision); + assert.equal(generation.params.frame_size.value, lockedSettings.width); + assert.equal(generation.params.num_inference_steps.value, lockedSettings.steps); + assert.equal(generation.params.guidance_scale.value, lockedSettings.guidanceScale); + assert.equal(generation.params.prompt.value, template.prompt); + assert.equal(Number(generation.params.seed.value), lockedSeed); + assert.equal(delivery.params.fps.value, lockedSettings.fps); + assert.equal(delivery.params.video.sourceId, renderId); + continue; + } + if (template.example.retainedVideoPreview) { + const { lockedSettings, lockedSeed } = template.example; + const generation = api.nodes[binding.nodes.wanGenerate]; + assert.equal(generation.params.num_inference_steps.value, lockedSettings.steps); + assert.equal(generation.params.guidance_scale.value, lockedSettings.guidanceScale); + assert.equal(Number(generation.params.seed.value), lockedSeed); + assert.equal(generation.params.num_frames?.value, lockedSettings.numFrames); + assert.equal(generation.params.prompt.value, template.prompt); + assert.equal(loader.params.model_id.value.value, template.modelArtifact.value); + assert.equal(loader.params.revision.value, template.modelArtifact.revision); + const promptWindows = template.workflowBlockSettings?.videoPromptWindows; + if (promptWindows) { + assert.equal(generation.params.prompt_segments_json.value, promptWindows.promptsJson); + assert.equal(generation.params.segment_frame_length.value, promptWindows.segmentFrameLength); + assert.equal(generation.params.temporal_overlap.value, promptWindows.temporalOverlap); + assert.equal( + generation.params.temporal_overlap_condition_strength.value, + promptWindows.overlapConditionStrength, + ); + } + if (sourceVideo) { + const source = api.nodes[binding.nodes.loadVideo]; + assert.equal(source.params.file.value, 'review-source-video.mp4'); + assert.equal(generation.params.video.sourceId, binding.nodes.normalizeVideo); + const normalized = api.nodes[binding.nodes.normalizeVideo]; + assert.equal(normalized.module, 'modules.VideoConditioning'); + assert.equal(normalized.action, 'Normalize'); + assert.equal(normalized.params.video.sourceId, binding.nodes.loadVideo); + assert.equal(normalized.params.video.sourceKey, 'video'); + } + if (controlVideo) { + const source = api.nodes[binding.nodes.loadControlVideo]; + assert.equal(source.params.file.value, 'review-control-video.mp4'); + const guide = api.nodes[generation.params.control_video.sourceId]; + assert.equal(guide.module, 'modules.VideoConditioning'); + } + if (input.length) { + const reference = generation.params.reference_images; + const source = api.nodes[reference?.sourceId]; + assert.equal(source?.module, 'modules.Image', template.id); + assert.equal(source.action, 'Load', template.id); + assert.deepEqual([source.params.file.value].flat(), input); + assert.equal(reference.sourceKey, 'image', template.id); + } + for (const [, field, role, port] of motionInputRoles) { + const loaderId = binding.nodes[role]; + assert.equal(api.nodes[loaderId].params.file.value, motionInputs[field]); + assert.equal(generation.params[port].sourceId, loaderId); + assert.equal(generation.params[port].sourceKey, 'video'); + } + if (motionInputRoles.length) { + const { coerceStudioFormState } = await server.ssrLoadModule('/src/studio/outputContracts.ts'); + const { inferStudioFormFromWorkflow } = await server.ssrLoadModule('/src/studio/workflowInference.ts'); + const restored = coerceStudioFormState(JSON.parse(JSON.stringify(form))); + const inferred = inferStudioFormFromWorkflow(flow.getState().nodes, form, flow.getState().edges); + assert.equal(inferred.mode, template.mode); + assert.equal(inferred.sourceVideo, ''); + for (const [, field] of motionInputRoles) { + assert.equal(restored[field], motionInputs[field]); + assert.equal(inferred[field], motionInputs[field]); + } + } + continue; + } + assert.deepEqual(loader.params.model_id.value, { source: 'hub', value: template.modelArtifact.value }); + assert.equal(loader.params.revision.value, template.modelArtifact.revision, template.id); + assert.equal(loader.params.dtype.value, template.example.lockedSettings.dtype ?? 'float32'); + assert.equal(loader.params.device.value, form.device); + if (template.mode === 'text_to_audio' && binding.nodes.audioGenerate) { + const generation = api.nodes[binding.nodes.audioGenerate].params; + const output = api.nodes[binding.nodes.audioExport].params; + const locked = template.example.lockedSettings; + assert.equal(generation.prompt.value, template.prompt); + assert.equal(generation.stable_audio_steps.value, locked.steps); + assert.equal(generation.stable_audio_guidance.value, locked.guidanceScale); + assert.equal(generation.audio_duration.value, locked.audioDuration); + assert.equal(generation.sample_rate.value, template.example.expectedOutput.sampleRate); + assert.equal(Number(generation.seed.value), template.example.lockedSeed); + assert.equal(generation.pipeline.sourceId, binding.nodes.audioPipeline); + assert.equal(output.audio.sourceId, binding.nodes.audioGenerate); + continue; + } + if (approvedBatchIds.has(template.id) && !audio) { + const actions = Object.values(api.nodes); + const generation = actions.find(({ action }) => + [ + 'Generate', + 'Edit', + 'Inpaint', + 'ControlGenerate', + 'ControlEdit', + 'ControlInpaint', + 'LayerDecompose', + 'GenerateAnyToAny', + 'GenerateImageVideoText', + 'UnconditionalGenerate', + ].includes(action), + ); + assert.equal(generation.params.prompt?.value ?? '', template.prompt); + const locked = template.example.lockedSettings; + if (generation.action === 'LayerDecompose') { + assert.equal(generation.params.layers.value, locked.layers); + assert.equal(generation.params.cfg_normalize.value, false); + assert.equal(generation.params.use_en_prompt.value, false); + } + if (generation.action === 'UnconditionalGenerate') { + assert.equal(generation.params.num_inference_steps.value, locked.steps); + assert.equal(Number(generation.params.seed.value), template.example.lockedSeed); + assert.equal(generation.params.pipeline.sourceId, binding.nodes.diffusersImagePipeline); + assert.equal(generation.params.pipeline.sourceKey, 'pipeline'); + assert.equal(generation.params.prompt, undefined); + } else if (!['GenerateAnyToAny', 'GenerateImageVideoText'].includes(generation.action)) { + for (const [field, control] of [ + ['width', 'width'], + ['height', 'height'], + ['num_inference_steps', 'steps'], + ['guidance_scale', 'guidanceScale'], + ]) { + assert.equal(generation.params[field].value, locked[control], `${template.id} ${control}`); + } + assert.equal(Number(generation.params.seed.value), template.example.lockedSeed); + assert.equal(loader.params.quantization_mode.value, 'none'); + } + const sources = actions.filter(({ module, action }) => module === 'modules.Image' && action === 'Load'); + assert.equal(sources.length, Number(input.length > 0) + Number(Boolean(mask)) + Number(Boolean(guide))); + if (input.length) { + assert.ok( + sources.some(({ params }) => { + const files = [params.file.value].flat(); + return files.length === input.length && files.every((file, index) => file === input[index]); + }), + `${template.id} source inputs`, + ); + } + if (mask) assert.ok(sources.some(({ params }) => params.file.value?.includes(mask))); + if (guide) { + assert.ok(sources.some(({ params }) => params.file.value?.includes(guide))); + if (locked.conditioningScale !== undefined) { + assert.equal(generation.params.conditioning_scale.value, locked.conditioningScale); + } else { + assert.equal(generation.params.image_contract?.value.fieldParams?.conditioning_scale?.hidden, true); + } + if (generation.action === 'ControlEdit' && locked.strength !== undefined) { + assert.equal(generation.params.strength.value, locked.strength); + } + } + continue; + } + if (audio) { + const source = api.nodes[binding.nodes.loadAudio]; + // The interactive file picker supplies a local locator. The retained + // native file evidence records the same selected file as a one-item list. + const file = source.params.file.value; + assert.deepEqual(typeof file === 'string' ? [file] : file, input); + if (template.mode === 'speech_translation') { + const consumer = Object.values(api.nodes).find(({ action }) => action === 'TranscribeAudio'); + assert.equal(consumer.params.task.value, 'translate'); + assert.equal(consumer.params.language.value, template.example.lockedSettings.speechLanguage); + assert.equal(consumer.params.timestamps.value, 'segment'); + continue; + } + source.params.file.value = input; + const withIndependentInputsOrdered = ({ canonicalGraph }) => { + // The fresh form inserts the model before Audio Load. Both are + // independent suppliers to Transcribe Audio. + const { nodes, paths } = canonicalGraph; + assert.deepEqual( + nodes + .slice(0, 2) + .map(({ key }) => key) + .sort(), + ['modules.Audio.Load#1', 'modules.HuggingFaceSpeech.' + spec.loaderAction + '#1'], + ); + assert.equal(paths.length, 1); + return { + ...canonicalGraph, + nodes: [...nodes.slice(0, 2).sort((a, b) => a.key.localeCompare(b.key)), ...nodes.slice(2)], + paths: [[...paths[0].slice(0, 2).sort(), ...paths[0].slice(2)]], + }; + }; + assert.deepEqual( + withIndependentInputsOrdered(canonicalGraphIdentity(api)), + withIndependentInputsOrdered(retainedTemplateGraph(recipe)), + ); + continue; + } + assert.equal(loader.params.quantization_mode.value, 'none'); + if (template.mode === 'edit_image') { + const locked = template.example.lockedSettings; + const source = api.nodes[binding.nodes.loadImage].params; + assert.deepEqual(source.file.value, input); + assert.equal(source.alpha_channel.value, 'ignore'); + const edit = api.nodes[binding.nodes.diffusersImageEdit].params; + assert.deepEqual(edit.image_contract.value, contract); + const values = Object.fromEntries( + ['prompt', 'width', 'height', 'num_inference_steps', 'guidance_scale', 'strength', 'seed', 'output_type'].map( + (key) => [key, edit[key].value], + ), + ); + assert.deepEqual(values, { + prompt: template.prompt, + width: locked.width, + height: locked.height, + num_inference_steps: locked.steps, + guidance_scale: locked.guidanceScale, + strength: locked.strength, + seed: template.example.lockedSeed, + output_type: locked.outputType, + }); + assert.equal(edit.image.sourceId, binding.nodes.loadImage); + assert.equal(edit.pipeline.sourceId, binding.nodes.diffusersImagePipeline); + assert.equal(api.nodes[binding.nodes.preview].params.image.sourceId, binding.nodes.diffusersImageEdit); + const controls = api.nodes[binding.nodes.diffusersRecipe].params; + assert.equal(controls.offload_mode.value, locked.offloadMode); + assert.equal(controls.attention_backend.value, 'auto'); + assert.equal(controls.vae_slicing.value, true); + assert.equal(controls.vae_tiling.value, true); + continue; + } + if (recipe.inputSha256) { + assert.ok(fieldActions.includes('update_pipeline_contract')); + assert.ok(fieldActions.includes('update_image_contract')); + assert.deepEqual(api.nodes[binding.nodes.loadImage].params.file.value, input); + const params = api.nodes[binding.nodes.diffusersPredictMap].params; + assert.deepEqual(params.image_contract.value, contract); + assert.equal(params.seed.value, 42); + assert.equal(params.num_inference_steps.value, 1); + assert.equal(params.processing_resolution.value, 768); + assert.equal(params.match_input_resolution.value, true); + const controls = api.nodes[binding.nodes.diffusersRecipe].params; + assert.equal(controls.offload_mode.value, 'none'); + assert.equal(controls.attention_backend.value, 'auto'); + assert.equal(controls.vae_slicing.value, true); + assert.equal(controls.vae_tiling.value, true); + } else { + const params = api.nodes[binding.nodes.transformersTextGenerate].params; + assert.equal(params.prompt.value, template.prompt); + assert.deepEqual( + Object.fromEntries( + Object.entries(params) + .filter(([key]) => key !== 'model') + .map(([key, param]) => [key, param.value]), + ), + { + do_sample: false, + max_new_tokens: 256, + min_new_tokens: 0, + num_beams: 1, + prompt: template.prompt, + repetition_penalty: 1, + temperature: 1, + top_k: 50, + top_p: 1, + use_chat_template: true, + }, + ); + assert.deepEqual(JSON.parse(JSON.stringify(api.nodes[binding.nodes.transformersTextPreview].params.value)), { + display: 'input', + sourceId: binding.nodes.transformersTextGenerate, + sourceKey: 'result', + }); + } + const comparable = structuredClone(api); + if (recipe.inputSha256) { + // Delivery assigns a backend-specific upload identifier after checking + // source bytes. Compare the rest of the API using the archived picker. + comparable.nodes[binding.nodes.loadImage].params.file.value = [recipe.inputFileName]; + const model = comparable.nodes[binding.nodes.diffusersImagePipeline].params; + for (const name of ['control_components', 'image_prompt_adapter', 'prequantized_transformer']) { + assert.deepEqual(model[name], { display: 'input', value: undefined }, name); + delete model[name]; + } + assert.equal(model.execution_profile_id.value, ''); + delete model.execution_profile_id; + const preview = comparable.nodes[binding.nodes.preview].params; + // Preview uses its device only for latent decoding. PredictMap + // delivers decoded PIL images here and the VAE input is unconnected. + assert.equal(preview.image.sourceKey, 'preview_images'); + assert.equal(preview.vae.sourceId, undefined); + assert.equal(preview.device.value, 'cuda:0'); + preview.device.value = 'cpu:0'; + } else { + // This retained loader predates the two explicit placement controls. + // Verify the fresh graph uses the same defaults before comparing the + // remaining fields against the archived recipe. + const model = comparable.nodes[binding.nodes.transformersTextModel].params; + assert.equal(model.weight_loading_mode?.value, 'cpu', 'The fresh text loader defaults to CPU weight loading'); + assert.equal(model.quantization_mode?.value, 'none', 'The fresh text loader defaults to unquantized weights'); + delete model.weight_loading_mode; + delete model.quantization_mode; + } + const byRole = ({ nodes }) => Object.fromEntries(nodes.map((node) => [node.key, node.params])); + assert.deepEqual( + byRole(canonicalGraphIdentity(comparable).canonicalGraph), + byRole(retainedTemplateGraph(recipe).canonicalGraph), + template.id, + ); + } + } finally { + globalThis.fetch = previousFetch; + globalThis.WebSocket = previousWebSocket; + nodeStore.setState(previousNodes); + studio.setState(previousStudio); + flow.setState(previousFlow); + } +}); diff --git a/scripts/retained-layer-sheet.test.mjs b/scripts/retained-layer-sheet.test.mjs new file mode 100644 index 00000000..b53733e7 --- /dev/null +++ b/scripts/retained-layer-sheet.test.mjs @@ -0,0 +1,105 @@ +import assert from 'node:assert/strict'; +import { spawnSync } from 'node:child_process'; +import { existsSync, mkdtempSync, readFileSync, realpathSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { dirname, join, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { test } from 'node:test'; + +const script = fileURLToPath(new URL('./template-gallery-retained-layer-sheet.py', import.meta.url)); +const fixtureCode = `from pathlib import Path +from PIL import Image,ImageDraw +import sys,json,hashlib +r=Path(sys.argv[1]);layers=[];items=[] +for i in range(3): + image=Image.new('RGBA',(16,16),(20,30,40,255) if i==0 else (0,0,0,0)) + if i:ImageDraw.Draw(image).rectangle((i*3,i*3,i*3+4,i*3+4),fill=(40,130,60,255)) + image.save(r/f'layer-{i}.png');image.save(r/f'native-{i}.webp',format='WEBP',quality=100) + items.append({'encodedSha256':'sha256:'+hashlib.sha256((r/f'native-{i}.webp').read_bytes()).hexdigest(),'decodedSha256':f'test-layer-{i}','width':16,'height':16}) + layers.append(image) +source=Image.new('RGBA',(16,16)); +for layer in layers:source=Image.alpha_composite(source,layer) +source.save(r/'source.png');source_hash='sha256:bytes:'+hashlib.sha256((r/'source.png').read_bytes()).hexdigest() +p={'template':{'id':'test_layers','lockedSettings':{'layers':3,'dtype':'bfloat16','steps':30,'seed':1,'guidanceScale':4}},'graph':{'executionPlan':{'resourceMode':'auto','offloadMode':'model_cpu'}},'inputs':{'items':[{'contentHash':source_hash}]},'output':{'collectionHash':'test-collection','items':items}} +(r/'run.json').write_text(json.dumps(p)) +`; + +function fixture(run) { + const python = process.env.MODIFF_BACKEND_PYTHON; + assert(python, 'Set the declared ordinary CPU MODIFF_BACKEND_PYTHON for media checks.'); + const directory = mkdtempSync(join(tmpdir(), 'modiff-retained-layer-')); + try { + const made = spawnSync(python, ['-B', '-c', fixtureCode, directory], { + encoding: 'utf8', + env: { ...process.env, PYTHONUTF8: '1', PYTHONDONTWRITEBYTECODE: '1' }, + }); + assert.equal(made.status, 0, made.stderr); + run(directory, (suffix, extra = []) => + spawnSync( + python, + [ + '-B', + script, + '--source', + join(directory, 'source.png'), + '--layers', + ...[0, 1, 2].map((i) => join(directory, `layer-${i}.png`)), + '--run-provenance', + join(directory, 'run.json'), + '--output', + join(directory, suffix + '.png'), + '--derivative-provenance', + join(directory, suffix + '.json'), + ...extra, + ], + { encoding: 'utf8', env: { ...process.env, PYTHONUTF8: '1', PYTHONDONTWRITEBYTECODE: '1' } }, + ), + ); + } finally { + assert.equal(dirname(realpathSync(directory)), realpathSync(tmpdir())); + assert(resolve(directory).includes('modiff-retained-layer-')); + rmSync(directory, { recursive: true, force: true }); + } +} + +test('retained sheet processor binds native byte encodings and preserves the three lossless layers', () => + fixture((directory, execute) => { + const before = [0, 1, 2].map((i) => readFileSync(join(directory, `layer-${i}.png`))); + const result = execute('sheet'); + assert.equal(result.status, 0, result.stderr); + const metadata = JSON.parse(readFileSync(join(directory, 'sheet.json'), 'utf8')); + assert.equal(metadata.losslessExports.items.length, 3); + assert.equal(metadata.recomposition.maxMeanAbsoluteError, 0); + assert.equal(metadata.processor.role, 'byte-identical-retained-sheet-reproduction'); + assert.equal(metadata.creationTimeReviewCaptionPreserved, true); + for (const i of [0, 1, 2]) assert.deepEqual(readFileSync(join(directory, `layer-${i}.png`)), before[i]); + })); + +test('wrong native encoding or approved hash fails without writing an output or changing a source', () => + fixture((directory, execute) => { + const path = join(directory, 'run.json'), + original = readFileSync(path), + run = JSON.parse(original); + run.output.items[0].encodedSha256 = 'sha256:' + '0'.repeat(64); + writeFileSync(path, JSON.stringify(run)); + let result = execute('wrong-native'); + assert.notEqual(result.status, 0); + assert.match(result.stderr, /native quality-100 WebP bytes/); + assert(!existsSync(join(directory, 'wrong-native.png'))); + writeFileSync(path, original); + result = execute('wrong-approved', ['--expected-approved-sha256', '0'.repeat(64)]); + assert.notEqual(result.status, 0); + assert.match(result.stderr, /exact approved sheet/); + assert(!existsSync(join(directory, 'wrong-approved.png'))); + })); + +test('retained sheet refuses to overwrite an existing reviewed file', () => + fixture((directory, execute) => { + const path = join(directory, 'existing.png'), + original = Buffer.from('preserved original'); + writeFileSync(path, original); + const result = execute('existing'); + assert.notEqual(result.status, 0); + assert.match(result.stderr, /never overwritten/); + assert.deepEqual(readFileSync(path), original); + })); diff --git a/scripts/retained-native-direct-image-provenance.test.mjs b/scripts/retained-native-direct-image-provenance.test.mjs new file mode 100644 index 00000000..32b12e0c --- /dev/null +++ b/scripts/retained-native-direct-image-provenance.test.mjs @@ -0,0 +1,879 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import test from 'node:test'; +import { canonicalJsonHash } from './canonical-json.mjs'; +import { + backendContractIdentity, + canonicalizeApiGraph, + executionPlanIdentity, + executionReceiptIdentity, +} from './live-proof-provenance.mjs'; +import { + observedRetainedDirectImagePlan, + observedRetainedDirectImageProofMatches, + observedRetainedDirectImageResourceId, +} from './retained-native-direct-image-resource.mjs'; +import { redactPublicProvenance } from './template-gallery-harness.mjs'; + +const SOURCE = 'observed-retained-direct-image-resource-v1'; +const sha = (text) => createHash('sha256').update(text).digest('hex'); + +// Fictional records only. No private media, local runtime, model load or fit. +function witness({ control = false, canvas = false, embeddedGuidance = false, expert = false } = {}) { + const lit = (value) => ({ value }), + wire = (sourceId, sourceKey) => ({ sourceId, sourceKey }); + const form = { + mode: control ? 'control_image' : canvas ? 'outpaint' : 'inpaint', + modelType: 'LegacyExamplePipeline', + resourceMode: expert ? 'expert' : 'auto', + dtype: 'bfloat16', + quantizationMode: 'none', + trustRemoteCode: false, + randomSeed: false, + width: 64, + height: 64, + steps: 2, + maxSequenceLength: 512, + seed: 12, + guidanceScale: 4, + prompt: 'A fictional ceramic workshop.', + negativePrompt: 'Duplicate objects.', + strength: 1, + offloadMode: expert ? 'group_cpu' : 'model_cpu', + autoOffload: true, + referenceImages: ['/tmp/modiff-example/source.webp'], + maskImage: '/tmp/modiff-example/mask.png', + controlImage: '/tmp/modiff-example/control.png', + outpaintLeft: 8, + outpaintRight: 8, + outpaintTop: 0, + outpaintBottom: 0, + outpaintOverlap: 2, + outpaintFeather: 1, + outpaintFillColor: 'black', + }; + const n = (module, action, values) => ({ + module, + action, + params: Object.fromEntries(Object.entries(values).map(([k, v]) => [k, lit(v)])), + }); + const nodes = { + quant: n('modules.DiffusersRuntime', 'PipelineQuantizationConfigV2', { + backend: 'none', + dtype: 'bfloat16', + component_overrides: '{}', + }), + recipe: n('modules.DiffusersRuntime', 'DiffusersExecutionRecipe', { + device_map: 'none', + max_memory: '{}', + device_map_overrides: '{}', + device: 'cuda:0', + attention_backend: 'auto', + attention_components: '', + vae_slicing: true, + vae_tiling: true, + offload_mode: form.offloadMode, + layerwise_casting: false, + channels_last: false, + regional_compile: false, + denoiser_cache: 'none', + }), + owner: n('modules.DiffusersImage', 'LoadPipeline', { + model_id: { source: 'hub', value: 'example/model' }, + revision: 'a'.repeat(40), + pipeline_class: 'ExamplePipeline', + dtype: 'bfloat16', + device: 'cuda:0', + quantization_mode: 'none', + quantized_components: [], + conditioning_kind: 'none', + conditioning_model_id: '', + conditioning_revision: '', + device_map: 'none', + auto_offload: true, + offload_mode: form.offloadMode, + enable_vae_slicing: true, + enable_vae_tiling: true, + low_cpu_mem_usage: true, + mode: form.mode, + }), + generate: n('modules.DiffusersImage', control ? 'ControlGenerate' : 'Inpaint', { + prompt: form.prompt, + negative_prompt: form.negativePrompt, + width: 64, + height: 64, + num_inference_steps: 2, + max_sequence_length: 512, + seed: 12, + guidance_scale: 4, + output_type: 'pil', + ...(control ? {} : { strength: 1 }), + }), + preview: n('modules.Image', 'Preview', { device: 'cpu:0' }), + source: n('modules.Image', 'Load', { + file: [control ? form.controlImage : form.referenceImages[0]], + alpha_channel: 'ignore', + }), + }; + nodes.owner.params.execution_recipe = wire('recipe', 'execution_recipe'); + nodes.recipe.params.quantization_config = wire('quant', 'quantization_config'); + nodes.generate.params.pipeline = wire('owner', 'pipeline'); + nodes.preview.params.image = wire('generate', 'images'); + const sourceRole = control ? 'controlImage' : 'referenceImages[0]'; + const artifacts = [ + { + role: sourceRole, + path: control ? form.controlImage : form.referenceImages[0], + contentHash: 'sha256:bytes:' + 'd'.repeat(64), + byteSize: 100, + }, + ]; + const sourcePixel = { mode: 'RGB', size: [64, 64], sha256: '1'.repeat(64), decodedRgbaSha256: '2'.repeat(64) }; + const maskPixel = { mode: 'L', size: [64, 64], sha256: '3'.repeat(64), decodedRgbaSha256: '4'.repeat(64) }; + const preparedPixel = { ...sourcePixel, sha256: '5'.repeat(64), decodedRgbaSha256: '6'.repeat(64) }; + const sources = [ + { + role: sourceRole, + contentHash: artifacts[0].contentHash, + byteSize: 100, + originalContractRole: 'referenceImage1', + decodedRgbaSha256: sourcePixel.decodedRgbaSha256, + size: [64, 64], + }, + ]; + const policies = [{ role: 'referenceImage1', alphaChannel: 'ignore' }]; + let order = ['source', 'quant', 'recipe', 'owner', 'generate', 'preview']; + if (canvas) { + nodes.canvas = n('modules.DiffusersImage', 'OutpaintCanvas', { + width: 64, + height: 64, + left: 8, + right: 8, + top: 0, + bottom: 0, + overlap: 2, + feather: 1, + fill_color: 'black', + }); + nodes.canvas.params.image = wire('source', 'image'); + nodes.generate.params.image = wire('canvas', 'canvas'); + nodes.generate.params.mask_image = wire('canvas', 'mask_image'); + order = ['source', 'canvas', 'quant', 'recipe', 'owner', 'generate', 'preview']; + } else if (!control) { + // Scalar and one-item-array file values are distinct preserved legacy shapes. + nodes.mask = n('modules.Image', 'Load', { file: form.maskImage, alpha_channel: 'remove alpha' }); + nodes.generate.params.image = wire('source', 'image'); + nodes.generate.params.mask_image = wire('mask', 'image'); + artifacts.push({ + role: 'maskImage', + path: form.maskImage, + contentHash: 'sha256:bytes:' + 'e'.repeat(64), + byteSize: 80, + }); + sources.push({ + role: 'maskImage', + contentHash: artifacts[1].contentHash, + byteSize: 80, + originalContractRole: 'referenceImage2', + decodedRgbaSha256: maskPixel.decodedRgbaSha256, + size: [64, 64], + }); + policies.push({ role: 'referenceImage2', alphaChannel: 'remove alpha' }); + order = ['source', 'mask', 'quant', 'recipe', 'owner', 'generate', 'preview']; + } else nodes.generate.params.control_image = wire('source', 'image'); + const snapshot = { + studioForm: form, + nodes: Object.entries(nodes).map(([id, data]) => ({ id, data: structuredClone(data) })), + edges: [], + }; + const graph = { + sid: 'example-session', + nodes, + paths: [order], + runtimeHints: { + clientRunId: 'example-run', + workflowTabId: 'example-workflow', + runInputHash: 'example-input', + workflowSnapshot: snapshot, + }, + }; + if (!expert) Object.assign(graph.runtimeHints, { resourceMode: 'auto', workflowAutoPlan: {} }); + const files = [ + { path: 'main.py', sha256: '7'.repeat(64) }, + { path: 'modules/DiffusersImage/main.py', sha256: '8'.repeat(64) }, + ]; + const source = { + gitCommit: null, + files, + fingerprint: 'sha256:backend-source-v1:' + canonicalJsonHash({ gitCommit: null, files }), + }; + const task = { + task_id: 'example-task', + status: 'completed', + attempt_index: 0, + sid: graph.sid, + started_at: 1_000_000_000, + completed_at: 1_000_000_020, + client_run_id: 'example-run', + workflow_tab_id: 'example-workflow', + run_input_hash: 'example-input', + resourceCandidateId: null, + workflow_snapshot: snapshot, + runtimeFingerprint: { backendSource: { fingerprint: source.fingerprint, fileCount: 2, gitCommit: null } }, + runtimePreparation: { + resourceMode: form.resourceMode, + performed: false, + residentRecipeReusable: false, + cleanup: null, + }, + }; + if (!expert) + task.runtimePreparation.workflowAuto = { + strategy: 'dependency_order_retained_owners', + reusedOwnerIds: [], + releases: [], + resolvedFields: { + owner: { + model_id: { source: 'hub', value: 'example/model' }, + pipeline_class: 'ExamplePipeline', + revision: 'a'.repeat(40), + dtype: 'bfloat16', + device: 'cuda:0', + offload_mode: form.offloadMode, + auto_offload: true, + quantization_mode: 'none', + mode: form.mode, + }, + }, + }; + const output = { + taskId: task.task_id, + sid: task.sid, + workflowTabId: task.workflow_tab_id, + clientRunId: task.client_run_id, + runInputHash: task.run_input_hash, + attemptIndex: 0, + nodeId: 'preview', + formSnapshot: form, + apiGraphSnapshot: graph, + mediaItems: [{ width: 64, height: 64 }], + }; + const capture = (id, fields) => ({ + nodeId: id, + module: nodes[id].module, + action: nodes[id].action, + fields: Object.fromEntries(Object.entries(fields).map(([k, v]) => [k, { source: 'literal', value: v }])), + omittedFields: {}, + }); + const ownFields = { + model_id: 'example/model', + pipeline_class: 'ExamplePipeline', + revision: 'a'.repeat(40), + dtype: 'bfloat16', + device: 'cuda:0', + auto_offload: true, + offload_mode: form.offloadMode, + enable_vae_slicing: true, + enable_vae_tiling: true, + }; + const recipeFields = { + offload_mode: form.offloadMode, + device: 'cuda:0', + attention_backend: 'auto', + vae_slicing: true, + vae_tiling: true, + }; + const genFields = { + prompt: form.prompt, + negative_prompt: embeddedGuidance ? null : form.negativePrompt, + width: 64, + height: 64, + seed: 12, + num_inference_steps: 2, + max_sequence_length: 512, + output_type: 'pil', + guidance_scale: embeddedGuidance ? 4 : null, + ...(embeddedGuidance ? {} : { true_cfg_scale: 4 }), + ...(control ? {} : { strength: 1 }), + }; + output.resolvedExecutionInputs = { + schemaVersion: 1, + source: 'backend-execution', + taskId: task.task_id, + attemptIndex: 0, + nodeId: 'preview', + truncated: false, + uncapturedNodeIds: [], + nodes: order.map((id) => + capture( + id, + id === 'owner' + ? ownFields + : id === 'recipe' + ? recipeFields + : id === 'quant' + ? { dtype: 'bfloat16' } + : id === 'generate' + ? genFields + : id === 'preview' + ? { device: 'cpu:0' } + : {}, + ), + ), + }; + const at = (s) => new Date((task.started_at + s) * 1000).toISOString(); + const callTask = { + task_id: task.task_id, + attempt_index: 0, + current_node: 'generate', + current_node_name: 'modules.DiffusersImage.' + nodes.generate.action, + }; + const policy = { requested: null, applied: null, offloadMode: null, executionDevice: null }; + const call = { + event: 'officialCallStarted', + at: at(3), + callId: '9'.repeat(32), + task: callTask, + actualPipelineClass: 'diffusers.pipelines.example.ExamplePipeline', + pipelineClass: 'diffusers.pipelines.example.ExamplePipeline', + generator: { device: 'cuda:0', initialSeed: 12, type: 'Generator' }, + peftComponentAdapterNames: {}, + peftComponentBindings: {}, + peftLayerScaleHistograms: {}, + wholePipelineAdapterScales: null, + modiffLoraIdentities: null, + controlnetComponent: null, + callInputs: { + prompt: form.prompt, + width: 64, + height: 64, + num_inference_steps: 2, + max_sequence_length: 512, + output_type: 'pil', + return_dict: true, + callback_on_step_end_tensor_inputs: [], + ...(embeddedGuidance ? { guidance_scale: 4 } : { true_cfg_scale: 4, negative_prompt: form.negativePrompt }), + ...(control + ? { control_image: sourcePixel } + : { image: canvas ? preparedPixel : sourcePixel, mask_image: maskPixel, strength: 1 }), + }, + declaredSignatureDefaults: embeddedGuidance ? { guidance_scale: 4 } : { true_cfg_scale: 4, negative_prompt: null }, + appliedRuntimeConfig: { + attention: { + applied: [], + default_selection: true, + registry_default: 'native', + requested: 'auto', + reset: ['transformer'], + unsupported: [], + }, + cache: { applied: [], disabled: [], requested: 'none' }, + channelsLast: { applied: [], requested: false }, + compile: { applied: [], requested: false }, + layerwiseCasting: { applied: [], requested: false }, + vae: { + applied: [ + { enabled: true, feature: 'slicing' }, + { enabled: true, feature: 'tiling' }, + ], + unsupported: [], + }, + }, + componentRuntimePolicies: { transformer: { ...policy }, vae: { ...policy } }, + vaeMemoryFlags: { use_slicing: true, use_tiling: true }, + scheduler: { + class: 'diffusers.schedulers.scheduling_flow_match_euler_discrete.FlowMatchEulerDiscreteScheduler', + config: { shift: 1 }, + }, + }; + const journal = [call]; + for (let i = 0; i < 2; i++) + journal.push( + { event: 'schedulerStepStarted', at: at(4 + i), task: callTask, stepIndex: i === 0 ? null : i }, + { event: 'schedulerStepReturned', at: at(4.5 + i), task: callTask, stepIndex: i + 1 }, + ); + journal.push({ + event: 'officialCallReturned', + at: at(7), + task: callTask, + callId: call.callId, + images: [{ mode: 'RGB', size: [64, 64] }], + }); + const observer = { + installedAt: at(-1), + observerSha256: 'b'.repeat(64), + wrappedCalls: [{ kind: 'officialPipelineCall', class: call.pipelineClass, sourceSha256: 'c'.repeat(64) }], + }; + const derived = { + taskId: task.task_id, + evidenceHashes: {}, + actualOfficialCalls: [call], + actualDiffusersDirectUrl: { + value: { url: 'https://github.com/huggingface/diffusers.git', vcs_info: { commit_id: 'f'.repeat(40) } }, + }, + specializedWholePipelineAuthority: { + pipelineClass: call.pipelineClass, + diffusersCommit: 'f'.repeat(40), + sourceSha256: 'a'.repeat(64), + }, + }; + if (canvas) { + const t = { ...callTask, current_node: 'canvas', current_node_name: 'modules.DiffusersImage.OutpaintCanvas' }; + const start = { + event: 'outpaintCanvasStarted', + at: at(1), + callId: 'd'.repeat(32), + task: t, + nodeObjectId: 100, + actualInputs: { + kwargs: { + image: sourcePixel, + ...Object.fromEntries( + Object.entries(nodes.canvas.params) + .filter(([k]) => k !== 'image') + .map(([k, v]) => [k, v.value]), + ), + }, + }, + }; + const end = { + event: 'outpaintCanvasReturned', + at: at(2), + callId: start.callId, + task: t, + nodeObjectId: 100, + output: { canvas: preparedPixel, mask_image: maskPixel }, + }; + journal.unshift(start, end); + derived.imagePreparationProofs = { + outpaint: { actualStart: start, actualReturn: end, utilitySource: { sha256: files[1].sha256 } }, + }; + observer.wrappedCalls.push({ + kind: 'actualOutpaintCanvasCall', + class: 'modules.DiffusersImage.OutpaintCanvas.execute', + sourceSha256: files[1].sha256, + }); + } + return { + templateId: 'example-template', + graph, + task, + output, + source, + artifacts, + sources, + call, + journal, + observer, + derived, + models: [ + { + repoId: 'example/model', + selectedRevision: 'a'.repeat(40), + modelRevision: 'example/model@' + 'a'.repeat(40), + fingerprint: 'sha256:' + 'a'.repeat(64), + }, + ], + comparison: { + format: 'modiff.image-template-comparison-contract.v1', + templateId: 'example-template', + task: control ? 'control_image' : 'inpaint', + models: [{ repoId: 'example/model', revision: 'a'.repeat(40) }], + settings: { sourceImagePolicies: policies }, + inputs: sources.map((x) => ({ + role: x.originalContractRole, + sha256: x.contentHash.slice('sha256:bytes:'.length), + })), + }, + requests: [{ at: at(-0.1), path: '/graph', body: graph }], + responses: [ + { at: at(0.1), path: '/graph', status: 200, body: { error: false, sid: graph.sid, task_id: task.task_id } }, + ], + }; +} + +function context(w) { + const record = (text) => ({ text, sha256: sha(text) }); + const records = { + receipt: record(JSON.stringify({ task: w.task, outputs: [w.output] })), + requests: record(JSON.stringify(w.requests)), + responses: record(JSON.stringify(w.responses)), + journal: record(w.journal.map((x) => JSON.stringify(x)).join('\n') + '\n'), + observer: record(JSON.stringify(w.observer)), + comparison: record(JSON.stringify(w.comparison)), + inputs: record(JSON.stringify({ schemaVersion: 1, sources: w.sources })), + }; + w.derived.evidenceHashes = Object.fromEntries( + ['receipt', 'requests', 'responses'].map((k) => [ + k === 'receipt' ? 'run-receipt.json' : k + '.json', + records[k].sha256, + ]), + ); + records.derived = record(JSON.stringify(w.derived)); + const payload = Object.fromEntries(Object.values(w.graph.nodes).map((n) => [n.module + '.' + n.action, n])); + return { + templateId: w.templateId, + executionReceipt: w.task, + executedOutput: w.output, + taskId: w.task.task_id, + modelIdentities: w.models, + backendSource: w.source, + backendContract: backendContractIdentity(payload, canonicalizeApiGraph(w.graph)), + retainedNativeEvidence: records, + inputArtifacts: w.artifacts, + }; +} +function provenance(w, c) { + const locked = structuredClone(w.output.formSnapshot); + for (const k of ['trustRemoteCode', 'referenceImages', 'maskImage', 'controlImage']) delete locked[k]; + return { + taskId: w.task.task_id, + template: { id: w.templateId, lockedSettings: locked }, + graph: { canonicalGraph: canonicalizeApiGraph(w.graph) }, + runtime: { backendSource: w.source, backendContract: c.backendContract }, + models: { items: w.models }, + inputs: { items: w.artifacts }, + output: { items: [{ mediaType: 'image', width: 64, height: 64 }] }, + }; +} + +test('preserved direct-image records yield an observation instead of an invented manual candidate', () => { + const w = witness(), + c = context(w), + before = structuredClone({ w, c }); + const plan = executionPlanIdentity(w.graph, c).plan; + assert.equal(plan.source, SOURCE); + assert.match(executionReceiptIdentity(w.task, plan).resourceCandidateId, /^observed-retained-direct-image-v1:/u); + assert.equal(w.task.resourceCandidateId, null); + assert.deepEqual({ w, c }, before); +}); + +test('direct masked, prepared outpaint, embedded guidance and control routes preserve their actual distinctions', () => { + for (const options of [ + {}, + { canvas: true }, + { expert: true, embeddedGuidance: true }, + { control: true, expert: true, embeddedGuidance: true }, + ]) { + const w = witness(options), + c = context(w), + plan = observedRetainedDirectImagePlan(w.graph, c); + assert(plan); + assert(observedRetainedDirectImageProofMatches(plan, provenance(w, c))); + assert(observedRetainedDirectImageProofMatches(plan, redactPublicProvenance(provenance(w, c)))); + assert.equal(plan.resourceObservation.negativePromptPassed, !options.embeddedGuidance); + assert.equal(plan.resourceObservation.inputRoute, options.canvas ? 'outpaint_canvas' : 'direct'); + assert.equal( + plan.resourceObservation.guidanceKeyword, + options.embeddedGuidance ? 'guidance_scale' : 'true_cfg_scale', + ); + assert(Object.values(plan.resourceObservation.historicalLimits).every((x) => x === false)); + } +}); + +test('contradictory retained direct-image records remain rejected after their record hashes are recomputed', async (t) => { + const mutations = { + 'other response task': (w) => { + w.responses[0].body.task_id = 'other'; + }, + 'wrong response session': (w) => { + w.responses[0].body.sid = 'other'; + }, + 'failed task': (w) => { + w.task.status = 'failed'; + }, + 'retried task': (w) => { + w.task.attempt_index = 1; + }, + 'missing source count': (w) => { + w.task.runtimeFingerprint.backendSource.fileCount = 1; + }, + 'wrong source body': (w) => { + w.source.files[0].sha256 = '0'.repeat(64); + }, + 'native trace truncated': (w) => { + w.output.resolvedExecutionInputs.truncated = true; + }, + 'native leaf missing': (w) => { + w.output.resolvedExecutionInputs.nodes.pop(); + }, + 'native duplicate leaf': (w) => { + w.output.resolvedExecutionInputs.nodes[0] = w.output.resolvedExecutionInputs.nodes[1]; + }, + 'native omission': (w) => { + w.output.resolvedExecutionInputs.nodes[0].omittedFields = { file: 'omitted' }; + }, + 'different native prompt': (w) => { + w.output.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'generate').fields.prompt.value = 'Other'; + }, + 'different actual prompt': (w) => { + w.call.callInputs.prompt = 'Other'; + }, + 'different actual seed': (w) => { + w.call.generator.initialSeed = 13; + }, + 'different native guidance alias': (w) => { + w.output.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'generate').fields.true_cfg_scale.value = 5; + }, + 'two active guidance keywords': (w) => { + w.call.callInputs.guidance_scale = 3; + }, + 'missing original PIL hash': (w) => { + delete w.call.callInputs.image.decodedRgbaSha256; + }, + 'source bytes changed': (w) => { + w.artifacts[0].contentHash = 'sha256:bytes:' + '0'.repeat(64); + }, + 'source pixels changed': (w) => { + w.sources[0].decodedRgbaSha256 = '0'.repeat(64); + }, + 'mask pixels changed': (w) => { + w.call.callInputs.mask_image.decodedRgbaSha256 = '0'.repeat(64); + }, + 'mask substituted source role': (w) => { + w.sources[1].role = 'referenceImages[0]'; + }, + 'wrong positional original input': (w) => { + w.sources[1].originalContractRole = 'referenceImage1'; + }, + 'wrong source alpha policy': (w) => { + w.comparison.settings.sourceImagePolicies[1].alphaChannel = 'ignore'; + }, + 'unsupported alpha operation': (w) => { + w.graph.nodes.mask.params.alpha_channel.value = 'add alpha'; + }, + 'empty source list': (w) => { + w.sources = []; + }, + 'extra source descriptor': (w) => { + w.sources.push({ ...w.sources[0] }); + }, + 'unrecorded auxiliary owner': (w) => { + w.graph.nodes.owner.params.image_prompt_adapter = { sourceId: 'mask', sourceKey: 'image' }; + }, + 'unexpected execution loop': (w) => { + w.graph.loops = []; + }, + 'extra node': (w) => { + w.graph.nodes.extra = { ...w.graph.nodes.source }; + }, + 'different immutable model': (w) => { + w.models[0].selectedRevision = 'b'.repeat(40); + }, + 'missing full model identity': (w) => { + w.models = []; + }, + 'wrong comparison template': (w) => { + w.comparison.templateId = 'other'; + }, + 'wrong model repository': (w) => { + w.comparison.models[0].repoId = 'example/other'; + }, + 'hidden adapter': (w) => { + w.call.peftComponentAdapterNames = { transformer: ['hidden'] }; + }, + 'hidden bound adapter': (w) => { + w.call.peftComponentBindings = { transformer: { loadedAdapterNames: ['hidden'] } }; + }, + 'unowned conditioning supplier': (w) => { + w.call.controlnetComponent = { class: 'example.HiddenModel' }; + }, + 'hidden PEFT scale': (w) => { + w.call.peftLayerScaleHistograms = { transformer: { hidden: { 1: 2 } } }; + }, + 'hidden compile': (w) => { + w.call.appliedRuntimeConfig.compile.requested = true; + }, + 'missing applied VAE': (w) => { + w.call.appliedRuntimeConfig.vae.applied = []; + }, + 'invented observed hook': (w) => { + w.call.componentRuntimePolicies.transformer.offloadMode = 'group_cpu'; + }, + 'unknown runtime feature': (w) => { + w.call.appliedRuntimeConfig.hidden = true; + }, + 'unowned official class': (w) => { + w.call.actualPipelineClass = 'custom.ExamplePipeline'; + }, + 'different upstream library': (w) => { + w.derived.actualDiffusersDirectUrl.value.url = 'https://example.invalid/model.git'; + }, + 'mutable upstream commit': (w) => { + w.derived.actualDiffusersDirectUrl.value.vcs_info.commit_id = 'main'; + }, + 'reviewed source contradicts installed commit': (w) => { + w.derived.specializedWholePipelineAuthority.diffusersCommit = 'e'.repeat(40); + }, + 'observer installed too late': (w) => { + w.observer.installedAt = new Date((w.task.completed_at + 1) * 1000).toISOString(); + }, + 'missing wrapped call': (w) => { + w.observer.wrappedCalls = []; + }, + 'missing official return': (w) => { + w.journal = w.journal.filter((e) => e.event !== 'officialCallReturned'); + }, + 'duplicate official return': (w) => { + w.journal.push(structuredClone(w.journal.at(-1))); + }, + 'failed official call': (w) => { + w.journal.push({ event: 'officialCallFailed', task: w.call.task }); + }, + 'borrowed output geometry': (w) => { + w.journal.at(-1).images[0].size = [128, 64]; + }, + 'missing full step': (w) => { + w.journal = w.journal.filter((e) => e.event !== 'schedulerStepReturned' || e.stepIndex !== 2); + }, + 'invented first scheduler index': (w) => { + w.journal.find((e) => e.event === 'schedulerStepStarted').stepIndex = 0; + }, + 'other scheduler owner': (w) => { + w.journal.find((e) => e.event === 'schedulerStepReturned').task = { ...w.call.task, current_node: 'owner' }; + }, + 'step after returned call': (w) => { + w.journal.find((e) => e.event === 'schedulerStepReturned').at = new Date( + (w.task.completed_at + 1) * 1000, + ).toISOString(); + }, + }; + for (const [name, mutate] of Object.entries(mutations)) + await t.test(name, () => { + const w = witness(); + mutate(w); + const c = context(w); + assert.equal(observedRetainedDirectImagePlan(w.graph, c), null); + }); +}); + +test('outpaint preparation must join the original source pixels, utility, controls and consumed output', async (t) => { + const mutations = { + 'wrong canvas source': (w) => { + w.journal[0].actualInputs.kwargs.image.decodedRgbaSha256 = '0'.repeat(64); + }, + 'wrong consumed canvas': (w) => { + w.call.callInputs.image = { ...w.call.callInputs.image, sha256: '0'.repeat(64) }; + }, + 'wrong mask return': (w) => { + w.journal[1].output.mask_image = { ...w.journal[1].output.mask_image, sha256: '0'.repeat(64) }; + }, + 'wrong preparation controls': (w) => { + w.journal[0].actualInputs.kwargs.left = 9; + }, + 'wrong locked margins': (w) => { + w.output.formSnapshot.outpaintLeft = 9; + }, + 'wrong utility identity': (w) => { + w.derived.imagePreparationProofs.outpaint.utilitySource.sha256 = '0'.repeat(64); + }, + 'unobserved utility source': (w) => { + w.observer.wrappedCalls.pop(); + }, + 'utility ran after model call': (w) => { + w.journal[1].at = w.call.at; + w.journal[0].at = new Date((w.task.started_at + 4) * 1000).toISOString(); + }, + 'duplicate utility return': (w) => { + w.journal.push(structuredClone(w.journal[1])); + }, + }; + for (const [name, mutate] of Object.entries(mutations)) + await t.test(name, () => { + const w = witness({ canvas: true }); + mutate(w); + assert.equal(observedRetainedDirectImagePlan(w.graph, context(w)), null); + }); +}); + +test('invalid retained records cannot fall through to a declared or manual candidate', () => { + for (const mutate of [ + (c) => { + c.retainedNativeEvidence.receipt.text += ' '; + }, + (c) => { + delete c.retainedNativeEvidence.journal; + }, + (c) => { + c.retainedNativeEvidence.inputs = { text: ' '.repeat(1024 ** 2 + 1), sha256: '0'.repeat(64) }; + }, + (c) => { + c.retainedNativeEvidence.extra = { text: '{}', sha256: sha('{}') }; + }, + ]) { + const w = witness(), + c = context(w); + mutate(c); + const plan = executionPlanIdentity(w.graph, c).plan; + assert.notEqual(plan.source, SOURCE); + assert.equal(executionReceiptIdentity(w.task, plan).resourceCandidateId, null); + } +}); + +test('final proof rejects matching graph and form substitutions after ordinary graph hashes are recomputed', () => { + for (const mutate of [ + (w) => { + w.output.formSnapshot.prompt = 'Other'; + w.graph.nodes.generate.params.prompt.value = 'Other'; + }, + (w) => { + w.output.formSnapshot.seed = 13; + w.graph.nodes.generate.params.seed.value = 13; + }, + (w) => { + w.graph.nodes.owner.params.offload_mode.value = 'none'; + }, + (w) => { + w.artifacts[0].byteSize++; + }, + (w) => { + w.templateId = 'other'; + }, + (w) => { + w.models[0].selectedRevision = 'e'.repeat(40); + }, + ]) { + const w = witness(), + c = context(w), + plan = observedRetainedDirectImagePlan(w.graph, c); + assert(plan); + mutate(w); + assert.equal(observedRetainedDirectImageProofMatches(plan, provenance(w, c)), false); + } +}); + +test('resource observation remains bounded and cannot claim hardware or undocumented controls', () => { + const w = witness(), + plan = observedRetainedDirectImagePlan(w.graph, context(w)); + assert(plan); + for (const mutate of [ + (p) => { + p.resourceObservation.historicalLimits.independentMemoryMonitoring = true; + }, + (p) => { + p.resourceObservation.historicalLimits.nativeOffloadHookPlacementObserved = true; + }, + (p) => { + p.extra = 'invented'; + }, + (p) => { + p.resourceObservation.upstreamLibrary.commit = 'main'; + }, + (p) => { + p.resourceObservation.rawRecordHashes.journal = 'missing'; + }, + (p) => { + p.resourceObservation.recipe.geometry.width = Infinity; + }, + (p) => { + p.resourceObservation.inputPixels[0].size = [1, 2, 3]; + }, + (p) => { + p.resourceObservation.inputPixels[0].decodedRgbaSha256 = '0'.repeat(64); + }, + ]) { + const altered = structuredClone(plan); + mutate(altered); + assert.equal(observedRetainedDirectImageResourceId(altered), null); + } +}); diff --git a/scripts/retained-native-direct-image-resource.mjs b/scripts/retained-native-direct-image-resource.mjs new file mode 100644 index 00000000..c5fe8ace --- /dev/null +++ b/scripts/retained-native-direct-image-resource.mjs @@ -0,0 +1,883 @@ +// Maintainer evidence only. No execution, admission, benchmark or hardware proof. +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { canonicalJsonHash, stableJsonValue } from './canonical-json.mjs'; +import { assertFiniteObservedJson } from './observed-workflow-auto-resource.mjs'; + +export const OBSERVED_RETAINED_DIRECT_IMAGE_SOURCE = 'observed-retained-direct-image-resource-v1'; +const same = (a, b) => assert.deepEqual(stableJsonValue(a), stableJsonValue(b)); +const digest = (text) => createHash('sha256').update(text, 'utf8').digest('hex'); +const hash = (value) => assert.match(value, /^[a-f0-9]{64}$/u); +const keys = (value, expected) => same(Object.keys(value).sort(), [...expected].sort()); +const limits = { + independentMemoryMonitoring: false, + originalTimeInstalledInventory: false, + nativeOffloadHookPlacementObserved: false, + residencyOrHardwareFitClaimed: false, + unrecordedLoadingControlsReconstructed: false, + wrapperSourceProvesUnwrappedImplementation: false, +}; +const recordNames = ['receipt', 'requests', 'responses', 'derived', 'journal', 'observer', 'comparison', 'inputs']; +const scope = (node) => node.module + '.' + node.action; +const imageScope = 'modules.DiffusersImage.'; +const runtimeScope = 'modules.DiffusersRuntime.'; + +function project(entries, paths, form, artifacts) { + assert(['inpaint', 'outpaint', 'control_image'].includes(form.mode)); + assert(['auto', 'expert'].includes(form.resourceMode)); + same(form.dtype, 'bfloat16'); + same(form.quantizationMode, 'none'); + if (Object.hasOwn(form, 'trustRemoteCode')) assert.equal(form.trustRemoteCode, false); + assert.equal(form.randomSeed, false); + assert(Number.isSafeInteger(form.seed) && form.seed >= 0 && form.seed < 2 ** 32); + for (const field of ['width', 'height', 'steps', 'maxSequenceLength']) + assert(Number.isSafeInteger(form[field]) && form[field] > 0 && form[field] <= 4096); + assert(Number.isFinite(form.guidanceScale) && form.guidanceScale >= 0 && form.guidanceScale <= 100); + assert(typeof form.prompt === 'string' && typeof form.negativePrompt === 'string'); + assert(entries.length >= 6 && entries.length <= 7 && paths.length === 1); + same([...paths[0]].sort(), entries.map(([id]) => id).sort()); + assert.equal(new Set(paths[0]).size, entries.length); + const byId = new Map(entries), + labels = new Map(); + const single = (name, label) => { + const rows = entries.filter(([, n]) => scope(n) === name); + assert.equal(rows.length, 1, name); + const [id, node] = rows[0]; + labels.set(id, label); + return { id, node }; + }; + const owner = single(imageScope + 'LoadPipeline', 'owner'); + const recipe = single(runtimeScope + 'DiffusersExecutionRecipe', 'recipe'); + const quant = single(runtimeScope + 'PipelineQuantizationConfigV2', 'quant'); + const generator = single(imageScope + (form.mode === 'control_image' ? 'ControlGenerate' : 'Inpaint'), 'generate'); + const preview = single('modules.Image.Preview', 'preview'); + const canvases = entries.filter(([, n]) => scope(n) === imageScope + 'OutpaintCanvas'); + assert(canvases.length <= 1); + const canvas = canvases.length ? single(imageScope + 'OutpaintCanvas', 'canvas') : null; + if (canvas) assert.equal(form.mode, 'outpaint'); + const value = (role, field) => { + const p = role.node.params[field]; + assert(p && !p.sourceId && !p.sourceKey, role.node.action + '.' + field); + return p.value; + }; + const wires = new Map(entries.map(([id]) => [id, {}])); + const wire = (target, field, supplier, port) => { + const p = target.node.params[field]; + same({ sourceId: p?.sourceId, sourceKey: p?.sourceKey }, { sourceId: supplier.id, sourceKey: port }); + assert(!Object.hasOwn(p, 'value')); + assert(paths[0].indexOf(supplier.id) < paths[0].indexOf(target.id)); + wires.get(target.id)[field] = [supplier.id, port]; + }; + wire(owner, 'execution_recipe', recipe, 'execution_recipe'); + wire(recipe, 'quantization_config', quant, 'quantization_config'); + wire(generator, 'pipeline', owner, 'pipeline'); + wire(preview, 'image', generator, 'images'); + same(value(preview, 'device'), 'cpu:0'); + for (const [field, expected] of Object.entries({ + dtype: 'bfloat16', + device: 'cuda:0', + quantization_mode: 'none', + conditioning_kind: 'none', + conditioning_model_id: '', + conditioning_revision: '', + quantized_components: [], + device_map: 'none', + auto_offload: true, + low_cpu_mem_usage: true, + enable_vae_slicing: true, + enable_vae_tiling: true, + })) + same(value(owner, field), expected); + for (const field of ['prequantized_transformer', 'image_prompt_adapter', 'control_components']) { + const p = owner.node.params[field]; + assert(!p?.sourceId && !p?.sourceKey && p?.value == null); + } + for (const [field, expected] of Object.entries({ + device_map: 'none', + max_memory: '{}', + device_map_overrides: '{}', + device: 'cuda:0', + attention_backend: 'auto', + attention_components: '', + vae_slicing: true, + vae_tiling: true, + layerwise_casting: false, + channels_last: false, + regional_compile: false, + denoiser_cache: 'none', + })) + same(value(recipe, field), expected); + const offloadMode = value(recipe, 'offload_mode'); + assert(['model_cpu', 'group_cpu'].includes(offloadMode)); + same(form.offloadMode, offloadMode); + same(form.autoOffload, true); + same(value(quant, 'backend'), 'none'); + same(value(quant, 'dtype'), 'bfloat16'); + same(value(quant, 'component_overrides'), '{}'); + const repo = value(owner, 'model_id'); + same(repo.source, 'hub'); + assert.match(repo.value, /^[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*$/u); + const revision = value(owner, 'revision'); + assert.match(revision, /^[a-f0-9]{40}$/u); + const pipelineClass = value(owner, 'pipeline_class'); + assert.match(pipelineClass, /^[A-Za-z]\w*Pipeline$/u); + same(value(owner, 'mode'), form.mode); + for (const [field, formField] of [ + ['prompt', 'prompt'], + ['negative_prompt', 'negativePrompt'], + ['width', 'width'], + ['height', 'height'], + ['num_inference_steps', 'steps'], + ['seed', 'seed'], + ['guidance_scale', 'guidanceScale'], + ['max_sequence_length', 'maxSequenceLength'], + ]) + same(value(generator, field), form[formField]); + same(value(generator, 'output_type'), 'pil'); + if (generator.node.action === 'Inpaint') same(value(generator, 'strength'), form.strength); + const inputs = []; + const attach = (target, field, role) => { + const id = target.node.params[field]?.sourceId, + node = byId.get(id); + assert(node && scope(node) === 'modules.Image.Load' && !labels.has(id)); + const load = { id, node }; + labels.set(id, role); + wire(target, field, load, 'image'); + const alphaChannel = value(load, 'alpha_channel'); + assert(['ignore', 'remove alpha'].includes(alphaChannel)); + const originalFiles = value(load, 'file'); + const files = typeof originalFiles === 'string' ? [originalFiles] : originalFiles; + assert(Array.isArray(files) && files.length === 1); + assert(typeof files[0] === 'string' && files[0].length > 0 && files[0].length <= 16384); + const formPath = role === 'referenceImages[0]' ? form.referenceImages?.[0] : form[role]; + if (formPath !== undefined) same(files[0], formPath); + const matches = artifacts.filter((a) => a.role === role); + assert.equal(matches.length, 1); + const artifact = matches[0]; + same(artifact.path, files[0]); + assert.match(artifact.contentHash, /^sha256:bytes:[a-f0-9]{64}$/u); + assert(Number.isSafeInteger(artifact.byteSize) && artifact.byteSize > 0); + inputs.push({ role, contentHash: artifact.contentHash, byteSize: artifact.byteSize, alphaChannel }); + }; + if (canvas) { + wire(generator, 'image', canvas, 'canvas'); + wire(generator, 'mask_image', canvas, 'mask_image'); + attach(canvas, 'image', 'referenceImages[0]'); + for (const field of ['width', 'height']) same(value(canvas, field), form[field]); + for (const field of ['left', 'right', 'top', 'bottom', 'overlap', 'feather', 'fill_color']) + same( + value(canvas, field), + form[ + 'outpaint' + + field + .split('_') + .map((x) => x[0].toUpperCase() + x.slice(1)) + .join('') + ], + ); + } else if (generator.node.action === 'Inpaint') { + attach(generator, 'image', 'referenceImages[0]'); + attach(generator, 'mask_image', 'maskImage'); + } else attach(generator, 'control_image', 'controlImage'); + same(artifacts.map((a) => a.role).sort(), inputs.map((a) => a.role).sort()); + assert.equal(labels.size, entries.length); + for (const [id, node] of entries) { + const expected = wires.get(id); + for (const [field, param] of Object.entries(node.params)) { + if (param.sourceId) assert(Object.hasOwn(expected, field), 'Unexpected supplier: ' + field); + else if (param.sourceKey) + assert( + id === preview.id && field === 'preview' && param.sourceKey === 'output' && param.display === 'ui_image', + ); + } + } + // Bind every authored parameter, including inactive fallbacks, while making + // file paths and node IDs portable. Presentation values are not execution. + const projection = paths[0].map((id) => { + const node = byId.get(id); + const params = Object.fromEntries( + Object.entries(node.params) + .filter( + ([field, p]) => + !['label', 'preview', 'export', 'image_contract'].includes(field) && !p.display?.startsWith('ui_'), + ) + .map(([field, p]) => [ + field, + p.sourceId + ? { supplier: labels.get(p.sourceId), port: p.sourceKey } + : { value: field === 'file' && node.action === 'Load' ? labels.get(id) : (p.value ?? null) }, + ]), + ); + return { role: labels.get(id), scope: scope(node), params }; + }); + const recipeValue = { + pipelineClass, + formModelType: form.modelType, + mode: form.mode, + operation: generator.node.action, + repository: repo.value, + revision, + dtype: 'bfloat16', + device: 'cuda:0', + offloadMode, + autoOffload: true, + geometry: { width: form.width, height: form.height }, + }; + return { + owner, + recipe, + quant, + generator, + preview, + canvas, + value, + inputs, + recipeValue, + graphControlsHash: canonicalJsonHash(projection), + formControlsHash: canonicalJsonHash( + Object.fromEntries( + [ + 'mode', + 'modelType', + 'resourceMode', + 'dtype', + 'quantizationMode', + 'randomSeed', + 'seed', + 'width', + 'height', + 'steps', + 'guidanceScale', + 'prompt', + 'negativePrompt', + 'maxSequenceLength', + 'offloadMode', + 'autoOffload', + ...(generator.node.action === 'Inpaint' ? ['strength'] : []), + ].map((k) => [k, form[k]]), + ), + ), + }; +} + +function pixels(value) { + assert(value && typeof value === 'object'); + hash(value.sha256); + hash(value.decodedRgbaSha256); + assert(['RGB', 'RGBA', 'L'].includes(value.mode)); + assert(Array.isArray(value.size) && value.size.length === 2); + for (const n of value.size) assert(Number.isSafeInteger(n) && n > 0 && n <= 8192); + return { mode: value.mode, size: value.size, sha256: value.sha256, decodedRgbaSha256: value.decodedRgbaSha256 }; +} + +function deriveRetainedDirectImagePlan(api, context) { + const { + executionReceipt: task, + executedOutput: output, + backendSource: source, + backendContract: contract, + modelIdentities: models, + retainedNativeEvidence: records, + inputArtifacts: artifacts, + } = context; + keys(records, recordNames); + let total = 0; + const read = (name) => { + const record = records[name]; + assert(record && typeof record.text === 'string'); + const size = Buffer.byteLength(record.text); + total += size; + assert(size <= (name === 'journal' ? 64 : name === 'inputs' ? 1 : 16) * 1024 ** 2 && total <= 112 * 1024 ** 2); + same(digest(record.text), record.sha256); + return name === 'journal' + ? record.text + .trim() + .split('\n') + .map((line) => JSON.parse(line)) + : JSON.parse(record.text); + }; + const original = read('receipt'), + requests = read('requests'), + responses = read('responses'), + derived = read('derived'), + journal = read('journal'), + observer = read('observer'), + comparison = read('comparison'), + inputEvidence = read('inputs'); + same(original.task, task); + same(original.outputs, [output]); + same(task.status, 'completed'); + same(task.attempt_index, 0); + same(output.attemptIndex, 0); + same(task.resourceCandidateId, null); + if (context.taskId !== undefined) same(context.taskId, task.task_id); + assert( + Number.isFinite(task.started_at) && Number.isFinite(task.completed_at) && task.completed_at >= task.started_at, + ); + const submitted = requests.filter((r) => r.path === '/graph'), + accepted = responses.filter((r) => r.path === '/graph'); + assert.equal(submitted.length, 1); + assert.equal(accepted.length, 1); + same(submitted[0].body, api); + same(accepted[0].status, 200); + same(accepted[0].body.error, false); + same(accepted[0].body.task_id, task.task_id); + same(accepted[0].body.sid, api.sid); + assert( + Date.parse(submitted[0].at) <= task.started_at * 1000 && + Date.parse(accepted[0].at) >= Date.parse(submitted[0].at) && + Date.parse(accepted[0].at) <= task.completed_at * 1000, + ); + if (Object.hasOwn(output, 'apiGraphSnapshot')) same(output.apiGraphSnapshot, api); + assert(!Object.hasOwn(api, 'loops')); + for (const [hint, tk, ok] of [ + ['sid', 'sid', 'sid'], + ['workflowTabId', 'workflow_tab_id', 'workflowTabId'], + ['clientRunId', 'client_run_id', 'clientRunId'], + ['runInputHash', 'run_input_hash', 'runInputHash'], + ]) { + const value = hint === 'sid' ? api.sid : api.runtimeHints[hint]; + assert(typeof value === 'string' && value); + same(task[tk], value); + same(output[ok], value); + } + same(task.workflow_snapshot, api.runtimeHints.workflowSnapshot); + same(output.formSnapshot, task.workflow_snapshot.studioForm); + assert.equal(output.formSnapshot.trustRemoteCode, false); + const form = output.formSnapshot, + p = project(Object.entries(api.nodes), api.paths, form, artifacts); + same(task.runtimePreparation.resourceMode, form.resourceMode); + same(task.runtimePreparation.cleanup, null); + same(task.runtimePreparation.residentRecipeReusable, false); + if (form.resourceMode === 'expert') { + same(task.runtimePreparation.performed, false); + assert(!Object.hasOwn(api.runtimeHints, 'resourceMode') && !Object.hasOwn(api.runtimeHints, 'workflowAutoPlan')); + } else { + same(api.runtimeHints.resourceMode, 'auto'); + const auto = task.runtimePreparation.workflowAuto; + same(auto.strategy, 'dependency_order_retained_owners'); + same(auto.reusedOwnerIds, []); + same(auto.releases, []); + const resolved = auto.resolvedFields[p.owner.id]; + for (const [field, expected] of Object.entries({ + pipeline_class: p.recipeValue.pipelineClass, + revision: p.recipeValue.revision, + dtype: 'bfloat16', + device: 'cuda:0', + offload_mode: p.recipeValue.offloadMode, + auto_offload: true, + quantization_mode: 'none', + mode: form.mode, + })) + same(resolved[field], expected); + same(resolved.model_id, p.value(p.owner, 'model_id')); + } + same(output.taskId, task.task_id); + same(output.nodeId, p.preview.id); + same(source.fingerprint, task.runtimeFingerprint.backendSource.fingerprint); + same(source.files.length, task.runtimeFingerprint.backendSource.fileCount); + same(source.gitCommit, task.runtimeFingerprint.backendSource.gitCommit); + same( + source.fingerprint, + 'sha256:backend-source-v1:' + canonicalJsonHash({ gitCommit: source.gitCommit, files: source.files }), + ); + assert.match(contract.fingerprint, /^sha256:backend-contract-v1:[a-f0-9]{64}$/u); + const native = output.resolvedExecutionInputs; + same(native.schemaVersion, 1); + same(native.source, 'backend-execution'); + same(native.taskId, task.task_id); + same(native.attemptIndex, 0); + same(native.nodeId, output.nodeId); + same(native.truncated, false); + same(native.uncapturedNodeIds, []); + same(native.nodes.length, Object.keys(api.nodes).length); + const rows = new Map(native.nodes.map((n) => [n.nodeId, n])); + same(rows.size, native.nodes.length); + for (const [id, node] of Object.entries(api.nodes)) { + same(rows.get(id)?.module, node.module); + same(rows.get(id)?.action, node.action); + same(rows.get(id)?.omittedFields, {}); + } + const consumed = (role, field, expected) => + same(rows.get(role.id).fields[field], { source: 'literal', value: expected }); + for (const [field, expected] of Object.entries({ + model_id: p.recipeValue.repository, + pipeline_class: p.recipeValue.pipelineClass, + revision: p.recipeValue.revision, + dtype: 'bfloat16', + device: 'cuda:0', + auto_offload: true, + offload_mode: p.recipeValue.offloadMode, + enable_vae_slicing: true, + enable_vae_tiling: true, + })) + consumed(p.owner, field, expected); + for (const field of ['offload_mode', 'device', 'attention_backend', 'vae_slicing', 'vae_tiling']) + consumed(p.recipe, field, p.value(p.recipe, field)); + consumed(p.quant, 'dtype', 'bfloat16'); + consumed(p.preview, 'device', 'cpu:0'); + same(derived.taskId, task.task_id); + for (const name of ['receipt', 'requests', 'responses']) + same(derived.evidenceHashes[name === 'receipt' ? 'run-receipt.json' : name + '.json'], records[name].sha256); + const events = journal.filter((e) => e.task?.task_id === task.task_id), + calls = events.filter((e) => e.event === 'officialCallStarted'); + same(calls, derived.actualOfficialCalls); + same(calls.length, 1); + assert(!events.some((e) => e.event === 'officialCallFailed')); + const call = calls[0]; + assert.match(call.callId, /^[a-f0-9]{32}$/u); + same(call.task, { + task_id: task.task_id, + attempt_index: 0, + current_node: p.generator.id, + current_node_name: scope(p.generator.node), + }); + same(call.actualPipelineClass, call.pipelineClass); + assert( + call.actualPipelineClass.startsWith('diffusers.pipelines.') && + call.actualPipelineClass.endsWith('.' + p.recipeValue.pipelineClass), + ); + const returned = events.filter((e) => e.event === 'officialCallReturned' && e.callId === call.callId); + same(returned.length, 1); + same(returned[0].task, call.task); + assert( + Date.parse(call.at) >= task.started_at * 1000 && + Date.parse(returned[0].at) >= Date.parse(call.at) && + Date.parse(returned[0].at) <= task.completed_at * 1000, + ); + same(returned[0].images, [{ mode: 'RGB', size: [form.width, form.height] }]); + same(call.peftComponentAdapterNames, {}); + same(call.peftComponentBindings, {}); + same(call.peftLayerScaleHistograms, {}); + same(call.wholePipelineAdapterScales, null); + same(call.modiffLoraIdentities, null); + same(call.controlnetComponent, null); + same(call.generator, { device: 'cuda:0', initialSeed: form.seed, type: 'Generator' }); + consumed(p.generator, 'seed', form.seed); + for (const field of [ + 'prompt', + 'width', + 'height', + 'num_inference_steps', + 'max_sequence_length', + 'output_type', + ...(p.generator.node.action === 'Inpaint' ? ['strength'] : []), + ]) { + same(call.callInputs[field], p.value(p.generator, field)); + consumed(p.generator, field, call.callInputs[field]); + } + const guidance = ['guidance_scale', 'true_cfg_scale'].filter((k) => call.callInputs[k] != null); + same(guidance.length, 1); + const guidanceKeyword = guidance[0]; + same(call.callInputs[guidanceKeyword], form.guidanceScale); + consumed(p.generator, guidanceKeyword, form.guidanceScale); + if (guidanceKeyword === 'true_cfg_scale') consumed(p.generator, 'guidance_scale', null); + const negativePromptPassed = Object.hasOwn(call.callInputs, 'negative_prompt'); + consumed(p.generator, 'negative_prompt', negativePromptPassed ? form.negativePrompt : null); + if (negativePromptPassed) same(call.callInputs.negative_prompt, form.negativePrompt); + else assert(!Object.hasOwn(call.declaredSignatureDefaults, 'negative_prompt')); + const args = [ + 'callback_on_step_end_tensor_inputs', + 'height', + 'width', + 'prompt', + 'num_inference_steps', + 'max_sequence_length', + 'output_type', + 'return_dict', + guidanceKeyword, + ...(negativePromptPassed ? ['negative_prompt'] : []), + ...(p.generator.node.action === 'Inpaint' ? ['image', 'mask_image', 'strength'] : ['control_image']), + ]; + keys(call.callInputs, args); + same(call.callInputs.return_dict, true); + same(call.callInputs.callback_on_step_end_tensor_inputs, []); + const runtime = call.appliedRuntimeConfig; + same(runtime.attention, { + applied: [], + default_selection: true, + registry_default: 'native', + requested: 'auto', + reset: ['transformer'], + unsupported: [], + }); + same(runtime.cache, { applied: [], disabled: [], requested: 'none' }); + for (const field of ['channelsLast', 'compile', 'layerwiseCasting']) + same(runtime[field], { applied: [], requested: false }); + keys(runtime, [ + 'attention', + 'cache', + 'channelsLast', + 'compile', + 'layerwiseCasting', + 'vae', + ...(Object.hasOwn(runtime, 'rocmVisionAttention') ? ['rocmVisionAttention'] : []), + ]); + if (Object.hasOwn(runtime, 'rocmVisionAttention')) same(runtime.rocmVisionAttention, ['text_encoder']); + same(runtime.vae, { + applied: [ + { enabled: true, feature: 'slicing' }, + { enabled: true, feature: 'tiling' }, + ], + unsupported: [], + }); + same(call.vaeMemoryFlags, { use_slicing: true, use_tiling: true }); + assert( + Object.hasOwn(call.componentRuntimePolicies, 'transformer') && Object.hasOwn(call.componentRuntimePolicies, 'vae'), + ); + for (const policy of Object.values(call.componentRuntimePolicies)) + same(policy, { requested: null, applied: null, offloadMode: null, executionDevice: null }); + const started = events.filter((e) => e.event === 'schedulerStepStarted'), + finished = events.filter((e) => e.event === 'schedulerStepReturned'); + same(started.length, form.steps); + same(finished.length, form.steps); + same( + started.map((e) => e.stepIndex), + [null, ...Array.from({ length: form.steps - 1 }, (_, i) => i + 1)], + ); + same( + finished.map((e) => e.stepIndex), + Array.from({ length: form.steps }, (_, i) => i + 1), + ); + for (const [i, event] of started.entries()) { + same(event.task, call.task); + same(finished[i].task, call.task); + assert( + Date.parse(event.at) >= Date.parse(call.at) && + Date.parse(event.at) <= Date.parse(finished[i].at) && + Date.parse(finished[i].at) <= Date.parse(returned[0].at), + ); + if (i) assert(Date.parse(event.at) >= Date.parse(finished[i - 1].at)); + } + same( + call.scheduler.class, + 'diffusers.schedulers.scheduling_flow_match_euler_discrete.FlowMatchEulerDiscreteScheduler', + ); + assert(Date.parse(observer.installedAt) <= task.started_at * 1000); + hash(observer.observerSha256); + const wrapped = observer.wrappedCalls.filter( + (r) => r.kind === 'officialPipelineCall' && r.class === call.pipelineClass, + ); + same(wrapped.length, 1); + hash(wrapped[0].sourceSha256); + const upstream = derived.actualDiffusersDirectUrl.value; + same(upstream.url, 'https://github.com/huggingface/diffusers.git'); + const commit = upstream.vcs_info.commit_id; + assert.match(commit, /^[a-f0-9]{40}$/u); + const authority = derived.specializedWholePipelineAuthority; + same(authority.pipelineClass, call.actualPipelineClass); + same(authority.diffusersCommit, commit); + hash(authority.sourceSha256); + same(models.length, 1); + const model = models[0]; + same(model.repoId, p.recipeValue.repository); + same(model.selectedRevision, p.recipeValue.revision); + same(model.modelRevision, p.recipeValue.repository + '@' + p.recipeValue.revision); + assert(typeof model.fingerprint === 'string' && model.fingerprint); + same(comparison.format, 'modiff.image-template-comparison-contract.v1'); + same(comparison.templateId, context.templateId); + same(comparison.task, p.generator.node.action === 'Inpaint' ? 'inpaint' : 'control_image'); + same( + comparison.models.map((m) => [m.repoId, m.revision]), + [[model.repoId, model.selectedRevision]], + ); + same(inputEvidence.schemaVersion, 1); + same(inputEvidence.sources.length, p.inputs.length); + const inputs = p.inputs.map((input) => { + const current = inputEvidence.sources.filter((x) => x.role === input.role); + same(current.length, 1); + const row = current[0]; + same(row.contentHash, input.contentHash); + same(row.byteSize, input.byteSize); + hash(row.decodedRgbaSha256); + const old = comparison.inputs.filter((x) => x.sha256 === input.contentHash.slice('sha256:bytes:'.length)); + same(old.length, 1); + same(row.originalContractRole, old[0].role); + const policies = comparison.settings.sourceImagePolicies.filter((x) => x.role === old[0].role); + same(policies.length, 1); + same(policies[0].alphaChannel, input.alphaChannel); + assert( + Array.isArray(row.size) && + row.size.length === 2 && + row.size.every((n) => Number.isSafeInteger(n) && n > 0 && n <= 8192), + ); + return { ...input, originalContractRole: old[0].role, decodedRgbaSha256: row.decodedRgbaSha256, size: row.size }; + }); + const inputPixels = []; + if (p.canvas) { + const starts = events.filter((e) => e.event === 'outpaintCanvasStarted'), + ends = events.filter((e) => e.event === 'outpaintCanvasReturned'); + same(starts.length, 1); + same(ends.length, 1); + const start = starts[0], + end = ends[0]; + same(start.callId, end.callId); + same(start.nodeObjectId, end.nodeObjectId); + same(start.task, { ...call.task, current_node: p.canvas.id, current_node_name: scope(p.canvas.node) }); + same(end.task, start.task); + assert( + Date.parse(start.at) >= task.started_at * 1000 && + Date.parse(start.at) <= Date.parse(end.at) && + Date.parse(end.at) <= Date.parse(call.at), + ); + const kwargs = start.actualInputs.kwargs; + const controls = Object.fromEntries( + Object.entries(p.canvas.node.params) + .filter(([key]) => key !== 'image') + .map(([key]) => [key, p.value(p.canvas, key)]), + ); + same(Object.fromEntries(Object.entries(kwargs).filter(([key]) => key !== 'image')), controls); + same(pixels(kwargs.image).decodedRgbaSha256, inputs[0].decodedRgbaSha256); + same(kwargs.image.size, inputs[0].size); + for (const [role, port] of [ + ['image', 'canvas'], + ['mask_image', 'mask_image'], + ]) { + const prepared = pixels(end.output[port]); + same(prepared, pixels(call.callInputs[role])); + inputPixels.push({ role, ...prepared }); + } + const proof = derived.imagePreparationProofs.outpaint; + same(proof.actualStart, start); + same(proof.actualReturn, end); + const sourceFile = source.files.filter((f) => f.path === 'modules/DiffusersImage/main.py'); + same(sourceFile.length, 1); + same(sourceFile[0].sha256, proof.utilitySource.sha256); + const utility = observer.wrappedCalls.filter( + (r) => r.kind === 'actualOutpaintCanvasCall' && r.class === 'modules.DiffusersImage.OutpaintCanvas.execute', + ); + same(utility.length, 1); + same(utility[0].sourceSha256, sourceFile[0].sha256); + } else + for (const [role, inputRole] of p.generator.node.action === 'Inpaint' + ? [ + ['image', 'referenceImages[0]'], + ['mask_image', 'maskImage'], + ] + : [['control_image', 'controlImage']]) { + const actual = pixels(call.callInputs[role]), + input = inputs.find((x) => x.role === inputRole); + same(actual.decodedRgbaSha256, input.decodedRgbaSha256); + same(actual.size, input.size); + inputPixels.push({ role, ...actual }); + } + same(output.mediaItems.length, 1); + same(output.mediaItems[0].width, form.width); + same(output.mediaItems[0].height, form.height); + const observation = { + schemaVersion: 1, + templateId: context.templateId, + recipe: p.recipeValue, + graphControlsHash: p.graphControlsHash, + formControlsHash: p.formControlsHash, + backendSourceFingerprint: source.fingerprint, + backendContractFingerprint: contract.fingerprint, + taskId: task.task_id, + rawRecordHashes: Object.fromEntries(recordNames.map((name) => [name, records[name].sha256])), + rawOfficialCalls: 1, + rawSchedulerSteps: finished.length, + upstreamLibrary: { + url: upstream.url, + commit, + reviewedImplementationSourceSha256: authority.sourceSha256, + observerCallSourceSha256: wrapped[0].sourceSha256, + }, + inputs, + inputPixels, + inputRoute: p.canvas ? 'outpaint_canvas' : 'direct', + guidanceKeyword, + negativePromptPassed, + appliedRuntimeConfigHash: canonicalJsonHash(runtime), + historicalLimits: limits, + }; + const plan = { + source: OBSERVED_RETAINED_DIRECT_IMAGE_SOURCE, + modelType: p.recipeValue.pipelineClass, + pipelineClass: p.recipeValue.pipelineClass, + modelRepo: model.repoId, + modelRevision: model.selectedRevision, + dtype: 'bfloat16', + device: 'cuda:0', + offloadMode: p.recipeValue.offloadMode, + autoOffload: true, + resourceMode: form.resourceMode, + resolvedResourceMode: form.resourceMode, + quantizationMode: 'none', + quantizedComponents: [], + resourceObservation: observation, + }; + assert(observedRetainedDirectImageResourceId(plan)); + return plan; +} + +export function observedRetainedDirectImagePlan(api, context) { + try { + return deriveRetainedDirectImagePlan(api, context); + } catch { + return null; + } +} + +export function observedRetainedDirectImageResourceId(plan) { + try { + same(plan.source, OBSERVED_RETAINED_DIRECT_IMAGE_SOURCE); + assertFiniteObservedJson(plan); + assert(Buffer.byteLength(JSON.stringify(plan)) <= 65536); + keys( + plan, + 'source modelType pipelineClass modelRepo modelRevision dtype device offloadMode autoOffload resourceMode resolvedResourceMode quantizationMode quantizedComponents resourceObservation'.split( + ' ', + ), + ); + const o = plan.resourceObservation, + r = o.recipe; + keys( + o, + 'schemaVersion templateId recipe graphControlsHash formControlsHash backendSourceFingerprint backendContractFingerprint taskId rawRecordHashes rawOfficialCalls rawSchedulerSteps upstreamLibrary inputs inputPixels inputRoute guidanceKeyword negativePromptPassed appliedRuntimeConfigHash historicalLimits'.split( + ' ', + ), + ); + keys( + r, + 'pipelineClass formModelType mode operation repository revision dtype device offloadMode autoOffload geometry'.split( + ' ', + ), + ); + same(o.schemaVersion, 1); + assert(typeof o.templateId === 'string' && o.templateId.length > 0 && o.templateId.length <= 128); + same(o.rawOfficialCalls, 1); + assert(Number.isSafeInteger(o.rawSchedulerSteps) && o.rawSchedulerSteps > 0 && o.rawSchedulerSteps <= 4096); + for (const v of [o.graphControlsHash, o.formControlsHash, o.appliedRuntimeConfigHash]) hash(v); + assert.match(o.backendSourceFingerprint, /^sha256:backend-source-v1:[a-f0-9]{64}$/u); + assert.match(o.backendContractFingerprint, /^sha256:backend-contract-v1:[a-f0-9]{64}$/u); + assert(typeof o.taskId === 'string' && o.taskId.length > 0 && o.taskId.length <= 128); + keys(o.rawRecordHashes, recordNames); + Object.values(o.rawRecordHashes).forEach(hash); + same(o.historicalLimits, limits); + same(r.dtype, 'bfloat16'); + same(r.device, 'cuda:0'); + same(r.autoOffload, true); + assert(['model_cpu', 'group_cpu'].includes(r.offloadMode)); + assert(['inpaint', 'outpaint', 'control_image'].includes(r.mode)); + same(r.operation, r.mode === 'control_image' ? 'ControlGenerate' : 'Inpaint'); + assert.match(r.pipelineClass, /^[A-Za-z]\w*Pipeline$/u); + assert(typeof r.formModelType === 'string' && r.formModelType.length > 0 && r.formModelType.length <= 256); + assert.match(r.repository, /^[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*$/u); + assert.match(r.revision, /^[a-f0-9]{40}$/u); + keys(r.geometry, ['width', 'height']); + for (const n of Object.values(r.geometry)) assert(Number.isSafeInteger(n) && n > 0 && n <= 4096); + for (const [key, rkey] of Object.entries({ + modelType: 'pipelineClass', + pipelineClass: 'pipelineClass', + modelRepo: 'repository', + modelRevision: 'revision', + dtype: 'dtype', + device: 'device', + offloadMode: 'offloadMode', + autoOffload: 'autoOffload', + })) + same(plan[key], r[rkey]); + assert(['auto', 'expert'].includes(plan.resourceMode)); + same(plan.resourceMode, plan.resolvedResourceMode); + same(plan.quantizationMode, 'none'); + same(plan.quantizedComponents, []); + keys(o.upstreamLibrary, ['url', 'commit', 'reviewedImplementationSourceSha256', 'observerCallSourceSha256']); + same(o.upstreamLibrary.url, 'https://github.com/huggingface/diffusers.git'); + assert.match(o.upstreamLibrary.commit, /^[a-f0-9]{40}$/u); + hash(o.upstreamLibrary.reviewedImplementationSourceSha256); + hash(o.upstreamLibrary.observerCallSourceSha256); + assert(['direct', 'outpaint_canvas'].includes(o.inputRoute)); + assert(['guidance_scale', 'true_cfg_scale'].includes(o.guidanceKeyword)); + same(typeof o.negativePromptPassed, 'boolean'); + assert(Array.isArray(o.inputs) && o.inputs.length >= 1 && o.inputs.length <= 2); + assert(new Set(o.inputs.map((i) => i.role)).size === o.inputs.length); + for (const i of o.inputs) { + keys(i, ['role', 'contentHash', 'byteSize', 'alphaChannel', 'originalContractRole', 'decodedRgbaSha256', 'size']); + assert(['referenceImages[0]', 'maskImage', 'controlImage'].includes(i.role)); + assert(['ignore', 'remove alpha'].includes(i.alphaChannel)); + assert.match(i.contentHash, /^sha256:bytes:[a-f0-9]{64}$/u); + assert(Number.isSafeInteger(i.byteSize) && i.byteSize > 0); + hash(i.decodedRgbaSha256); + assert.match(i.originalContractRole, /^referenceImage[12]$/u); + assert(i.size.length === 2 && i.size.every((n) => Number.isSafeInteger(n) && n > 0 && n <= 8192)); + } + assert(Array.isArray(o.inputPixels) && o.inputPixels.length === (r.operation === 'Inpaint' ? 2 : 1)); + same( + o.inputPixels.map((i) => i.role).sort(), + r.operation === 'Inpaint' ? ['image', 'mask_image'] : ['control_image'], + ); + for (const i of o.inputPixels) { + keys(i, ['role', 'mode', 'size', 'sha256', 'decodedRgbaSha256']); + pixels(i); + } + same( + o.inputs.map((i) => i.role).sort(), + r.operation === 'ControlGenerate' + ? ['controlImage'] + : o.inputRoute === 'outpaint_canvas' + ? ['referenceImages[0]'] + : ['maskImage', 'referenceImages[0]'], + ); + if (o.inputRoute === 'outpaint_canvas') { + same(r.mode, 'outpaint'); + for (const i of o.inputPixels) same(i.size, [r.geometry.width, r.geometry.height]); + } else { + for (const i of o.inputPixels) { + const role = i.role === 'image' ? 'referenceImages[0]' : i.role === 'mask_image' ? 'maskImage' : 'controlImage'; + const source = o.inputs.find((item) => item.role === role); + same(i.decodedRgbaSha256, source.decodedRgbaSha256); + same(i.size, source.size); + } + } + return ( + 'observed-retained-direct-image-v1:' + + canonicalJsonHash({ + recipe: r, + upstreamLibrary: o.upstreamLibrary, + appliedRuntimeConfigHash: o.appliedRuntimeConfigHash, + backendSourceFingerprint: o.backendSourceFingerprint, + backendContractFingerprint: o.backendContractFingerprint, + }) + ); + } catch { + return null; + } +} + +export function observedRetainedDirectImageProofMatches(plan, provenance) { + try { + assert(observedRetainedDirectImageResourceId(plan)); + const o = plan.resourceObservation, + g = provenance.graph.canonicalGraph; + const p = project( + g.nodes.map((n) => [n.key, n]), + g.paths, + provenance.template.lockedSettings, + provenance.inputs.items, + ); + same(p.recipeValue, o.recipe); + same(p.graphControlsHash, o.graphControlsHash); + same(p.formControlsHash, o.formControlsHash); + same(o.inputRoute, p.canvas ? 'outpaint_canvas' : 'direct'); + same( + p.inputs, + o.inputs.map(({ role, contentHash, byteSize, alphaChannel }) => ({ role, contentHash, byteSize, alphaChannel })), + ); + same(provenance.template.id, o.templateId); + same(provenance.taskId, o.taskId); + same(provenance.template.lockedSettings.steps, o.rawSchedulerSteps); + same(provenance.runtime.backendSource.fingerprint, o.backendSourceFingerprint); + same(provenance.runtime.backendContract.fingerprint, o.backendContractFingerprint); + same(provenance.models.items.length, 1); + const m = provenance.models.items[0]; + same(m.repoId, o.recipe.repository); + same(m.selectedRevision, o.recipe.revision); + same(provenance.output.items.length, 1); + same(provenance.output.items[0].mediaType, 'image'); + same(provenance.output.items[0].width, o.recipe.geometry.width); + same(provenance.output.items[0].height, o.recipe.geometry.height); + return true; + } catch { + return false; + } +} diff --git a/scripts/retained-native-modular-image-provenance.test.mjs b/scripts/retained-native-modular-image-provenance.test.mjs new file mode 100644 index 00000000..c1acc8ac --- /dev/null +++ b/scripts/retained-native-modular-image-provenance.test.mjs @@ -0,0 +1,618 @@ +import assert from 'node:assert/strict'; +import test from 'node:test'; +import { createHash } from 'node:crypto'; +import { canonicalJsonHash } from './canonical-json.mjs'; +import { executionPlanIdentity, executionReceiptIdentity } from './live-proof-provenance.mjs'; +import { + observedRetainedModularImagePlan as derive, + observedRetainedModularImageResourceId as resourceId, + observedRetainedModularImageProofMatches as matches, +} from './retained-native-modular-image-resource.mjs'; + +// Entirely synthetic records. No real workflow, model, media, machine or owner ID. +function fixture({ adapter = false, previewDevice = 'cpu:0' } = {}) { + const sha = (s) => createHash('sha256').update(s).digest('hex'), + lit = (value) => ({ value }), + wire = (sourceId, sourceKey) => ({ sourceId, sourceKey }); + const node = (module, action, params) => ({ + module, + action, + params: Object.fromEntries(Object.entries(params).map(([k, v]) => [k, lit(v)])), + }); + const mod = (action, params) => node('modules.ModularDiffusers', action, params); + const form = { + mode: 'edit_image', + modelType: 'ExampleModularPipeline', + resourceMode: 'expert', + dtype: 'bfloat16', + quantizationMode: 'none', + randomSeed: false, + seed: 12, + width: 64, + height: 64, + steps: 2, + guidanceScale: adapter ? 1 : 4, + prompt: 'A fictional ceramic object.', + negativePrompt: '', + maxSequenceLength: 512, + offloadMode: 'none', + autoOffload: false, + strength: 0.8, + trustRemoteCode: false, + referenceImages: ['@data/example.webp'], + }; + const nodes = { + load: node('modules.Image', 'Load', { file: form.referenceImages, alpha_channel: 'ignore' }), + guide: mod('Guider', { + model_type: form.modelType, + guider: 'ClassifierFreeGuidance', + guidance_scale: form.guidanceScale, + guidance_rescale: 0, + use_original_formulation: false, + enabled: true, + start: 0, + stop: 1, + layers_config: null, + }), + owner: mod('ModelsLoader', { + model_type: form.modelType, + repo_id: { source: 'hub', value: 'example/base' }, + revision: 'a'.repeat(40), + dtype: 'bfloat16', + device: 'cuda:0', + auto_offload: false, + offload_mode: 'none', + attention_backend: 'inherit', + vae_slicing: null, + vae_tiling: null, + trust_remote_code: false, + workflow_id: 'image_conditioned', + unet: null, + vae: null, + controlnet: null, + lora_list: null, + quant_config: null, + }), + encode: mod('EncodePrompt', { prompt: form.prompt, negative_prompt: form.negativePrompt }), + image: mod('ImageEncode', { seed: 12, mask_image: null, padding_mask_crop: null, inpaint_compatibility: 'native' }), + denoise: mod('Denoise', { + width: 64, + height: 64, + seed: 12, + num_inference_steps: 2, + guidance_scale: form.guidanceScale, + }), + decode: mod('DecodeLatents', {}), + preview: node('modules.Image', 'Preview', { device: previewDevice }), + }; + const edges = [ + ['image', 'vae', 'owner', 'vae_out'], + ['image', 'image', 'load', 'image'], + ['encode', 'text_encoders', 'owner', 'text_encoders'], + ['encode', 'guider', 'guide', 'guider_out'], + ['encode', 'image', 'load', 'image'], + ['denoise', 'unet', 'owner', 'unet_out'], + ['denoise', 'scheduler', 'owner', 'scheduler'], + ['denoise', 'embeddings', 'encode', 'embeddings'], + ['denoise', 'image_latents', 'image', 'image_latents'], + ['denoise', 'route_state_in', 'image', 'route_state_out'], + ['denoise', 'guider', 'guide', 'guider_out'], + ['decode', 'vae', 'owner', 'vae_out'], + ['decode', 'latents', 'denoise', 'latents'], + ['decode', 'route_state_in', 'denoise', 'route_state_out'], + ['preview', 'image', 'decode', 'images'], + ]; + for (const [t, k, s, p] of edges) nodes[t].params[k] = wire(s, p); + const scheduler = { + class: 'diffusers.schedulers.scheduling_flow_match_euler_discrete.FlowMatchEulerDiscreteScheduler', + config: { shift: 1 }, + }; + const configuredName = 'reviewed-adapter'; + if (adapter) { + nodes.lora = mod('Lora', { + model: { source: 'hub', value: 'example/adapter' }, + revision: 'b'.repeat(40), + weight_name: 'example.safetensors', + expected_sha256: 'c'.repeat(64), + previous_loras: null, + scale: 1, + adapter_name: configuredName, + scheduler_class: 'FlowMatchEulerDiscreteScheduler', + scheduler_config: JSON.stringify(scheduler.config), + }); + nodes.owner.params.lora_list = wire('lora', 'lora'); + } + const paths = [ + ['load', 'guide', ...(adapter ? ['lora'] : []), 'owner', 'encode', 'image', 'denoise', 'decode', 'preview'], + ]; + const snapshot = { studioForm: form }; + const api = { + sid: 'synthetic-session', + nodes, + paths, + runtimeHints: { + resourceMode: 'expert', + workflowTabId: 'synthetic-workflow', + clientRunId: 'synthetic-client', + runInputHash: 'synthetic-input', + workflowSnapshot: snapshot, + }, + }; + const files = [{ path: 'modiff/example.py', sha256: 'd'.repeat(64) }], + gitCommit = 'e'.repeat(40); + const source = { + gitCommit, + files, + fingerprint: 'sha256:backend-source-v1:' + canonicalJsonHash({ gitCommit, files }), + }; + const contract = { + fingerprint: 'sha256:backend-contract-v1:' + 'f'.repeat(64), + contracts: [{ key: 'modules.ModularDiffusers.ModelsLoader', params: nodes.owner.params }], + }; + const task = { + task_id: 'synthetic-task', + status: 'completed', + attempt_index: 0, + resourceCandidateId: null, + sid: api.sid, + workflow_tab_id: api.runtimeHints.workflowTabId, + client_run_id: api.runtimeHints.clientRunId, + run_input_hash: api.runtimeHints.runInputHash, + workflow_snapshot: snapshot, + started_at: 1700000000, + completed_at: 1700000020, + runtimePreparation: { resourceMode: 'expert' }, + runtimeFingerprint: { backendSource: { fingerprint: source.fingerprint, fileCount: 1, gitCommit } }, + }; + const inputArtifacts = [ + { + role: 'referenceImages[0]', + path: form.referenceImages[0], + contentHash: 'sha256:bytes:' + '1'.repeat(64), + byteSize: 32, + }, + ]; + const pixel = { mode: 'RGB', size: [64, 64], sha256: '2'.repeat(64), decodedRgbaSha256: '3'.repeat(64) }; + const rowFor = (id, n) => ({ nodeId: id, module: n.module, action: n.action, fields: {}, omittedFields: {} }); + const captures = Object.entries(nodes).map(([id, n]) => rowFor(id, n)); + const consume = (id, keys) => { + const row = captures.find((n) => n.nodeId === id); + for (const k of keys.split(' ')) { + const v = nodes[id].params[k]?.value; + row.fields[k] = { source: 'literal', value: k === 'repo_id' ? v.value : (v ?? null) }; + } + }; + consume( + 'owner', + 'model_type repo_id revision dtype device auto_offload offload_mode quant_config attention_backend vae_slicing vae_tiling', + ); + consume('guide', 'model_type guider guidance_scale guidance_rescale use_original_formulation enabled start stop'); + consume('encode', 'prompt negative_prompt'); + consume('denoise', 'width height seed num_inference_steps guidance_scale'); + consume('image', 'seed'); + consume('preview', 'device'); + if (adapter) consume('lora', 'revision'); + const output = { + taskId: task.task_id, + attemptIndex: 0, + nodeId: 'preview', + sid: api.sid, + workflowTabId: api.runtimeHints.workflowTabId, + clientRunId: api.runtimeHints.clientRunId, + runInputHash: api.runtimeHints.runInputHash, + formSnapshot: form, + apiGraphSnapshot: api, + mediaItems: [{ width: 64, height: 64 }], + resolvedExecutionInputs: { + schemaVersion: 1, + source: 'backend-execution', + taskId: task.task_id, + attemptIndex: 0, + nodeId: 'preview', + truncated: false, + uncapturedNodeIds: [], + nodes: captures, + graphTasks: [{ loaderId: 'owner', pipelineClass: form.modelType, task: null }], + }, + }; + const models = [ + { + repoId: 'example/base', + selectedRevision: 'a'.repeat(40), + modelRevision: 'example/base@' + 'a'.repeat(40), + fingerprint: 'synthetic-base', + }, + ]; + if (adapter) + models.push({ + repoId: 'example/adapter', + selectedRevision: 'b'.repeat(40), + modelRevision: 'example/adapter@' + 'b'.repeat(40), + fingerprint: 'synthetic-adapter', + }); + const at = (seconds) => new Date((task.started_at + seconds) * 1000).toISOString(); + const scope = (id) => nodes[id].module + '.' + nodes[id].action; + const eventTask = (id) => ({ + task_id: task.task_id, + attempt_index: 0, + current_node: id, + current_node_name: scope(id), + }); + const guideConfig = Object.fromEntries( + 'guidance_scale guidance_rescale use_original_formulation enabled start stop' + .split(' ') + .map((k) => [k, nodes.guide.params[k].value]), + ); + const calls = ['encode', 'image', 'denoise', 'decode'].map((id, i) => ({ + event: 'officialCallStarted', + callId: String(i + 1).repeat(32), + at: at(i * 3 + 2), + task: eventTask(id), + pipelineClass: 'diffusers.modular_pipelines.modular_pipeline.ModularPipeline', + actualPipelineClass: 'diffusers.modular_pipelines.example.ExampleModularPipeline', + generator: ['image', 'denoise'].includes(id) ? { device: 'cuda:0', initialSeed: 12, type: 'Generator' } : null, + callInputs: + id === 'encode' + ? { prompt: form.prompt, negative_prompt: form.negativePrompt, image: pixel } + : id === 'image' + ? { image: pixel, mask_image: null, padding_mask_crop: null } + : id === 'denoise' + ? { num_inference_steps: 2, width: 64, height: 64 } + : {}, + ...(['encode', 'denoise'].includes(id) + ? { guider: { class: 'diffusers.guiders.classifier_free_guidance.ClassifierFreeGuidance', config: guideConfig } } + : {}), + ...(['image', 'decode'].includes(id) ? { vaeMemoryFlags: { use_slicing: false, use_tiling: false } } : {}), + ...(id === 'denoise' + ? { + scheduler, + peftComponentAdapterNames: adapter ? { transformer: [configuredName] } : {}, + peftLayerScaleHistograms: adapter ? { transformer: { [configuredName]: { 1: 1 } } } : {}, + wholePipelineAdapterScales: null, + } + : {}), + ...(adapter && id === 'denoise' + ? { peftComponentBindings: { transformer: { modelObjectId: 42, loadedAdapterNames: [configuredName] } } } + : {}), + })); + const returns = calls.map((c, i) => ({ + event: 'officialCallReturned', + callId: c.callId, + at: at(i * 3 + 4), + task: c.task, + ...(c.task.current_node === 'decode' ? { images: [{ mode: 'RGB', size: [64, 64] }] } : {}), + })); + let events = calls.flatMap((c, i) => [c, returns[i]]); + const den = calls[2]; + for (let i = 0; i < 2; i++) + events.push( + { event: 'schedulerStepStarted', task: den.task, at: at(8.2 + i * 0.5), stepIndex: i === 0 ? null : i }, + { event: 'schedulerStepReturned', task: den.task, at: at(8.4 + i * 0.5), stepIndex: i + 1 }, + ); + let adapterEvidence = null; + if (adapter) { + const actualWeight = { + adapterName: configuredName, + weightName: 'example.safetensors', + actualFile: { sha256: 'c'.repeat(64), byteSize: 32 }, + revision: null, + }; + const start = { + event: 'loraWeightLoadStarted', + at: at(0.1), + callId: 'lora-call', + pipelineObjectId: 99, + task: eventTask('owner'), + actualWeight, + }; + const loaded = { + event: 'loraWeightLoadReturned', + at: at(0.2), + callId: start.callId, + pipelineObjectId: 99, + task: start.task, + actualWeight, + runtimeAfter: { + peftComponentBindings: { transformer: { modelObjectId: 42, loadedAdapterNames: [configuredName] } }, + }, + }; + const active = { + event: 'loraSetAdaptersReturned', + at: at(0.3), + pipelineObjectId: 99, + task: start.task, + actualInputs: { adapter_names: [configuredName], adapter_weights: [1] }, + runtimeAfter: loaded.runtimeAfter, + }; + const forwards = [0, 1].map((i) => ({ + event: 'actualQwenModelAdapters', + at: at(8.25 + i * 0.5), + task: den.task, + modelObjectId: 42, + peftBinding: { + modelObjectId: 42, + loadedAdapterNames: [configuredName], + layers: [ + { + name: 'synthetic-layer', + activeAdapters: [configuredName], + disableAdapters: false, + mergedAdapters: [], + loraAKeys: [configuredName], + loraBKeys: [configuredName], + scaling: { [configuredName]: 1 }, + }, + ], + }, + })); + events.push(start, loaded, active, ...forwards); + adapterEvidence = { + rawDescriptors: [ + { + nodeId: 'lora', + rawName: configuredName, + rawNameFieldPresent: true, + sha256: 'c'.repeat(64), + weightName: 'example.safetensors', + scale: 1, + resolvedName: configuredName, + }, + ], + actualLoadedWeights: [loaded], + actualActivation: active, + actualConsumingForwards: forwards, + consumedTransformerObjectId: 42, + }; + } + const records = {}; + const record = (name, value, journal = false) => { + const text = journal ? value.map((x) => JSON.stringify(x)).join('\n') : JSON.stringify(value); + records[name] = { text, sha256: sha(text) }; + }; + record('receipt', { task, outputs: [output] }); + record('requests', [{ path: '/graph', at: at(-1), body: api }]); + record('responses', [ + { path: '/graph', status: 200, at: at(0.01), body: { error: false, task_id: task.task_id, sid: api.sid } }, + ]); + record('journal', events, true); + record('observer', { + installedAt: at(-2), + observerSha256: '4'.repeat(64), + wrappedCalls: [{ kind: 'officialPipelineCall', class: calls[0].pipelineClass, sourceSha256: '5'.repeat(64) }], + }); + record('comparison', { + format: 'modiff.image-template-comparison-contract.v1', + templateId: 'synthetic-template', + task: 'edit_image', + inputs: [{ sha256: '1'.repeat(64), role: 'referenceImage1' }], + models: models.map((m) => ({ + repoId: m.repoId, + revision: m.selectedRevision, + ...(m.repoId === 'example/adapter' ? { weightName: 'example.safetensors', sha256: 'c'.repeat(64) } : {}), + })), + settings: { scheduler }, + }); + record('inputs', { + schemaVersion: 1, + sources: [ + { + role: 'referenceImages[0]', + contentHash: inputArtifacts[0].contentHash, + byteSize: 32, + originalContractRole: 'referenceImage1', + decodedRgbaSha256: pixel.decodedRgbaSha256, + size: pixel.size, + }, + ], + }); + record('derived', { + taskId: task.task_id, + evidenceHashes: { + 'run-receipt.json': records.receipt.sha256, + 'requests.json': records.requests.sha256, + 'responses.json': records.responses.sha256, + }, + actualOfficialCalls: calls, + actualDiffusersDirectUrl: { + value: { url: 'https://github.com/huggingface/diffusers.git', vcs_info: { commit_id: '6'.repeat(40) } }, + }, + ...(adapter ? { generatedNamespaceLoadToConsumption: adapterEvidence } : {}), + }); + const context = { + executionReceipt: task, + executedOutput: output, + backendSource: source, + backendContract: contract, + modelIdentities: models, + inputArtifacts, + retainedNativeEvidence: records, + taskId: task.task_id, + templateId: 'synthetic-template', + }; + const provenance = { + graph: { canonicalGraph: { nodes: Object.entries(nodes).map(([key, n]) => ({ key, ...n })), paths } }, + template: { id: 'synthetic-template', lockedSettings: form }, + taskId: task.task_id, + runtime: { backendSource: source, backendContract: contract }, + inputs: { items: inputArtifacts, count: 1 }, + models: { items: models }, + output: { items: [{ mediaType: 'image', width: 64, height: 64 }] }, + }; + const alterRecord = (name, mutate) => { + const raw = records[name], + journal = name === 'journal', + value = journal ? raw.text.split('\n').map((x) => JSON.parse(x)) : JSON.parse(raw.text); + mutate(value); + record(name, value, journal); + }; + return { api, context, provenance, alterRecord }; +} + +for (const adapter of [false, true]) + for (const previewDevice of ['cpu:0', 'cuda:0']) + test( + 'retained modular ' + + (adapter ? 'adapter' : 'base') + + ' with ' + + previewDevice + + ' preview joins complete evidence', + () => { + const f = fixture({ adapter, previewDevice }), + p = derive(f.api, f.context); + assert(p); + assert(resourceId(p)); + assert.equal(matches(p, f.provenance), true); + }, + ); + +for (const [name, mutate] of [ + ['missing raw journal', (f) => delete f.context.retainedNativeEvidence.journal], + ['changed exact input body', (f) => (f.context.inputArtifacts[0].contentHash = 'sha256:bytes:' + '9'.repeat(64))], + ['unknown upstream graph supplier', (f) => (f.api.nodes.image.params.image.sourceId = 'other')], + ['invented historical loader control', (f) => (f.api.nodes.owner.params.weight_format = { value: 'native' })], + ['changed source files', (f) => (f.context.backendSource.files[0].sha256 = '0'.repeat(64))], + [ + 'missing native consumed control', + (f) => + delete f.context.executedOutput.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'denoise').fields + .num_inference_steps, + ], + [ + 'incomplete native capture', + (f) => (f.context.executedOutput.resolvedExecutionInputs.uncapturedNodeIds = ['image']), + ], + [ + 'reordered scheduler calls', + (f) => f.alterRecord('journal', (rows) => (rows.find((r) => r.event === 'schedulerStepReturned').stepIndex = 2)), + ], + [ + 'wrong official pipeline class', + (f) => + f.alterRecord( + 'journal', + (rows) => (rows.find((r) => r.event === 'officialCallStarted').pipelineClass = 'untrusted.Pipeline'), + ), + ], + [ + 'same role with different original pixels', + (f) => f.alterRecord('inputs', (v) => (v.sources[0].decodedRgbaSha256 = '9'.repeat(64))), + ], + ['incomplete native graph path', (f) => f.api.paths[0].pop()], + [ + 'later observer installation', + (f) => + f.alterRecord( + 'observer', + (v) => (v.installedAt = new Date((f.context.executionReceipt.started_at + 1) * 1000).toISOString()), + ), + ], +]) + test('retained modular rejects ' + name, () => { + const f = fixture(); + mutate(f); + assert.equal(derive(f.api, f.context), null); + }); + +for (const [name, mutate] of [ + [ + 'adapter was never activated', + (f) => + f.alterRecord('journal', (rows) => + rows.splice( + rows.findIndex((r) => r.event === 'loraSetAdaptersReturned'), + 1, + ), + ), + ], + [ + 'adapter scale changed at consuming layer', + (f) => + f.alterRecord( + 'journal', + (rows) => + (rows.find((r) => r.event === 'actualQwenModelAdapters').peftBinding.layers[0].scaling['reviewed-adapter'] = + 0.5), + ), + ], + [ + 'adapter forward outside native task interval', + (f) => { + const stamp = new Date((f.context.executionReceipt.completed_at + 1) * 1000).toISOString(); + f.alterRecord('journal', (rows) => (rows.find((r) => r.event === 'actualQwenModelAdapters').at = stamp)); + f.alterRecord('derived', (v) => (v.generatedNamespaceLoadToConsumption.actualConsumingForwards[0].at = stamp)); + }, + ], + [ + 'adapter body differs from pinned file', + (f) => + f.alterRecord( + 'journal', + (rows) => + (rows.find((r) => r.event === 'loraWeightLoadReturned').actualWeight.actualFile.sha256 = '9'.repeat(64)), + ), + ], +]) + test('retained modular rejects ' + name, () => { + const f = fixture({ adapter: true }); + mutate(f); + assert.equal(derive(f.api, f.context), null); + }); + +for (const [name, mutate] of [ + ['flat base identity contradiction', (p) => (p.modelRepo = 'example/different')], + ['flat pipeline contradiction', (p) => (p.pipelineClass = 'OtherModularPipeline')], + ['unknown hardware qualification flag', (p) => (p.hardwareQualified = true)], + [ + 'invented original installed inventory', + (p) => (p.resourceObservation.historicalLimits.originalTimeInstalledInventory = true), + ], + [ + 'wrong official library owner', + (p) => (p.resourceObservation.upstreamLibrary.url = 'https://example.test/diffusers'), + ], + ['invalid source pixel digest', (p) => (p.resourceObservation.inputs[0].sha256 = 'missing')], + ['unknown journal authority', (p) => (p.resourceObservation.rawRecordHashes.other = 'a'.repeat(64))], +]) + test('retained modular identifier rejects ' + name, () => { + const f = fixture(), + p = derive(f.api, f.context); + assert(p); + mutate(p); + assert.equal(resourceId(p), null); + assert.equal(matches(p, f.provenance), false); + }); + +for (const [name, mutate] of [ + ['unused form strength changed', (p) => (p.resourceObservation.configuredUnusedFields.formStrength = 0.1)], + [ + 'unused sequence control changed', + (p) => (p.resourceObservation.configuredUnusedFields.formMaxSequenceLength = 256), + ], + ['adapter pinned bytes changed', (p) => (p.resourceObservation.adapter.sha256 = '9'.repeat(64))], + ['adapter scale changed', (p) => (p.resourceObservation.adapter.scale = 0.5)], +]) + test('retained modular final matcher rejects ' + name, () => { + const f = fixture({ adapter: true }), + p = derive(f.api, f.context); + assert(p); + mutate(p); + assert.equal(matches(p, f.provenance), false); + }); + +test('ordinary provenance selects the retained modular factory and exact observation identity', () => { + const f = fixture({ adapter: true }), + observed = derive(f.api, f.context), + actual = executionPlanIdentity(f.api, f.context); + assert.deepEqual(actual.plan, observed); + assert.equal( + executionReceiptIdentity(f.context.executionReceipt, actual.plan).resourceCandidateId, + resourceId(observed), + ); +}); +test('invalid retained records cannot fall through to an Expert or manual identity', () => { + const f = fixture(); + delete f.context.retainedNativeEvidence.journal; + const p = executionPlanIdentity(f.api, f.context); + assert.deepEqual(p.plan, {}); + assert.equal(executionReceiptIdentity(f.context.executionReceipt, p.plan).resourceCandidateId, null); +}); diff --git a/scripts/retained-native-modular-image-resource.mjs b/scripts/retained-native-modular-image-resource.mjs new file mode 100644 index 00000000..96d93978 --- /dev/null +++ b/scripts/retained-native-modular-image-resource.mjs @@ -0,0 +1,1038 @@ +// Read-only maintainer evidence. No loading, execution, Auto admission or fit. +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { canonicalJsonHash, stableJsonValue } from './canonical-json.mjs'; +import { assertFiniteObservedJson } from './observed-workflow-auto-resource.mjs'; +const SOURCE = 'observed-retained-modular-image-resource-v1'; +const same = (a, b) => assert.deepEqual(stableJsonValue(a), stableJsonValue(b)); +const sha = (s) => createHash('sha256').update(s, 'utf8').digest('hex'); +const hash = (v) => assert.match(v, /^[a-f0-9]{64}$/u); +const names = ['receipt', 'requests', 'responses', 'derived', 'journal', 'observer', 'comparison', 'inputs']; +const scope = (n) => n.module + '.' + n.action; +const prefix = 'modules.ModularDiffusers.'; +const absent = ['weight_format', 'weight_loading_mode']; +const limits = { + independentMemoryMonitoring: false, + originalTimeInstalledInventory: false, + unrecordedLoadingControlsReconstructed: false, + residencyOrHardwareFitClaimed: false, +}; + +function project(entries, paths, form, artifacts) { + assert(['edit_image', 'multi_image_reference_edit'].includes(form.mode)); + assert(['auto', 'expert'].includes(form.resourceMode)); + same(form.dtype, 'bfloat16'); + same(form.quantizationMode, 'none'); + same(form.randomSeed, false); + if (Object.hasOwn(form, 'trustRemoteCode')) same(form.trustRemoteCode, false); + assert(Number.isSafeInteger(form.seed) && form.seed >= 0 && form.seed < 2 ** 32); + for (const k of ['width', 'height', 'steps', 'maxSequenceLength']) + assert(Number.isSafeInteger(form[k]) && form[k] > 0 && form[k] <= 4096); + assert(Number.isFinite(form.guidanceScale) && form.guidanceScale >= 0 && form.guidanceScale <= 100); + assert(Number.isFinite(form.strength) && form.strength >= 0 && form.strength <= 1); + assert(entries.length === 8 || entries.length === 9); + same(paths.length, 1); + same(new Set(paths[0]).size, entries.length); + same([...paths[0]].sort(), entries.map(([id]) => id).sort()); + const roles = new Map(entries.map(([id, node]) => [scope(node), { id, node }])); + same(roles.size, entries.length); + const role = (action) => { + const r = roles.get(prefix + action); + assert(r, action); + return r; + }; + const owner = role('ModelsLoader'), + guide = role('Guider'), + encode = role('EncodePrompt'), + image = role('ImageEncode'), + denoise = role('Denoise'), + decode = role('DecodeLatents'); + const load = roles.get('modules.Image.Load'), + preview = roles.get('modules.Image.Preview'), + lora = roles.get(prefix + 'Lora') ?? null; + assert(load && preview); + same(roles.size, lora ? 9 : 8); + const expectedScopes = [ + 'ModelsLoader', + 'Guider', + 'EncodePrompt', + 'ImageEncode', + 'Denoise', + 'DecodeLatents', + ...(lora ? ['Lora'] : []), + ] + .map((s) => prefix + s) + .concat('modules.Image.Load', 'modules.Image.Preview'); + same([...roles.keys()].sort(), expectedScopes.sort()); + const value = (r, k) => { + const p = r.node.params[k]; + assert(p && !p.sourceId && !p.sourceKey, r.node.action + '.' + k); + return p.value; + }; + for (const k of absent) assert(!Object.hasOwn(owner.node.params, k)); + const repo = value(owner, 'repo_id'); + same(repo.source, 'hub'); + assert.match(repo.value, /^[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*$/u); + const revision = value(owner, 'revision'); + assert.match(revision, /^[a-f0-9]{40}$/u); + const modelType = value(owner, 'model_type'); + assert.match(modelType, /^[A-Za-z]\w*ModularPipeline$/u); + same(modelType, form.modelType); + same(value(owner, 'dtype'), 'bfloat16'); + same(value(owner, 'device'), 'cuda:0'); + same(value(owner, 'auto_offload'), form.autoOffload); + same(value(owner, 'offload_mode'), form.offloadMode); + assert( + (form.autoOffload === false && form.offloadMode === 'none') || + (form.autoOffload === true && form.offloadMode === 'model_cpu'), + ); + same(value(owner, 'attention_backend'), 'inherit'); + same(value(owner, 'vae_slicing'), null); + same(value(owner, 'vae_tiling'), null); + if (Object.hasOwn(owner.node.params, 'trust_remote_code')) same(value(owner, 'trust_remote_code'), false); + const workflowId = value(owner, 'workflow_id'); + assert(['default', 'image_conditioned'].includes(workflowId)); + for (const k of [ + 'unet', + 'vae', + 'controlnet', + 'text_encoders', + 'pipeline_components', + 'image_encoder', + 'quant_config', + ]) { + const p = owner.node.params[k]; + assert(!p?.sourceId && !p?.sourceKey && p?.value == null, k); + } + if (!lora) { + const p = owner.node.params.lora_list; + assert(!p?.sourceId && !p?.sourceKey && p?.value == null); + } + const connections = new Set(); + const wire = (target, k, supplier, port) => { + const p = target.node.params[k]; + same({ id: p?.sourceId, port: p?.sourceKey }, { id: supplier.id, port }); + assert(!Object.hasOwn(p, 'value')); + assert(paths[0].indexOf(supplier.id) < paths[0].indexOf(target.id)); + connections.add(target.id + ':' + k); + }; + for (const [t, k, s, port] of [ + [image, 'vae', owner, 'vae_out'], + [image, 'image', load, 'image'], + [encode, 'text_encoders', owner, 'text_encoders'], + [encode, 'guider', guide, 'guider_out'], + [encode, 'image', load, 'image'], + [denoise, 'unet', owner, 'unet_out'], + [denoise, 'scheduler', owner, 'scheduler'], + [denoise, 'embeddings', encode, 'embeddings'], + [denoise, 'image_latents', image, 'image_latents'], + [denoise, 'route_state_in', image, 'route_state_out'], + [denoise, 'guider', guide, 'guider_out'], + [decode, 'vae', owner, 'vae_out'], + [decode, 'latents', denoise, 'latents'], + [decode, 'route_state_in', denoise, 'route_state_out'], + [preview, 'image', decode, 'images'], + ]) + wire(t, k, s, port); + if (lora) wire(owner, 'lora_list', lora, 'lora'); + for (const [id, n] of entries) + for (const [k, p] of Object.entries(n.params)) + if (p.sourceId) assert(connections.has(id + ':' + k), 'Unexpected supplier ' + k); + else if (p.sourceKey) + assert( + (id === preview.id && k === 'preview' && p.sourceKey === 'output' && p.display === 'ui_image') || + (id === image.id && + k === 'encode_summary' && + p.sourceKey === 'encode_summary_data' && + p.display === 'ui_text'), + ); + assert(['cpu:0', 'cuda:0'].includes(value(preview, 'device'))); + same(value(load, 'alpha_channel'), 'ignore'); + const files = value(load, 'file'); + assert(Array.isArray(files) && (files.length === 1 || files.length === 2)); + same(artifacts.length, files.length); + const inputs = files.map((file, i) => { + assert(typeof file === 'string' && file.length > 0 && file.length <= 16384); + const role = 'referenceImages[' + i + ']'; + const a = artifacts.filter((x) => x.role === role); + same(a.length, 1); + same(a[0].path, file); + assert.match(a[0].contentHash, /^sha256:bytes:[a-f0-9]{64}$/u); + assert(Number.isSafeInteger(a[0].byteSize) && a[0].byteSize > 0); + if (form.referenceImages) same(form.referenceImages[i], file); + return { role, contentHash: a[0].contentHash, byteSize: a[0].byteSize }; + }); + same(new Set(files).size, files.length); + for (const [field, key] of [ + ['prompt', 'prompt'], + ['negative_prompt', 'negativePrompt'], + ]) + same(value(encode, field), form[key]); + const dimensionPorts = ['width', 'height'].filter((k) => Object.hasOwn(denoise.node.params, k)); + assert(dimensionPorts.length === 0 || dimensionPorts.length === 2); + const geometryRoute = dimensionPorts.length ? 'literal_dimensions' : 'native_image_state'; + for (const [field, key] of [ + ...(dimensionPorts.length + ? [ + ['width', 'width'], + ['height', 'height'], + ] + : []), + ['seed', 'seed'], + ['num_inference_steps', 'steps'], + ['guidance_scale', 'guidanceScale'], + ]) + same(value(denoise, field), form[key]); + same(value(image, 'seed'), form.seed); + for (const k of ['mask_image', 'padding_mask_crop']) { + const p = image.node.params[k]; + assert(!p?.sourceId && !p?.sourceKey && p?.value == null, k); + } + if (Object.hasOwn(image.node.params, 'inpaint_compatibility')) same(value(image, 'inpaint_compatibility'), 'native'); + const guidance = Object.fromEntries( + 'model_type guider guidance_scale guidance_rescale use_original_formulation enabled start stop' + .split(' ') + .map((k) => [k, value(guide, k)]), + ); + same(guidance, { + model_type: modelType, + guider: 'ClassifierFreeGuidance', + guidance_scale: form.guidanceScale, + guidance_rescale: 0, + use_original_formulation: false, + enabled: true, + start: 0, + stop: 1, + }); + const labels = new Map(entries.map(([id, n]) => [id, n.action])); + const projection = paths[0].map((id) => { + const n = entries.find(([k]) => k === id)[1]; + return { + role: labels.get(id), + scope: scope(n), + params: Object.fromEntries( + Object.entries(n.params) + .filter(([k, p]) => !['label', 'preview', 'export'].includes(k) && !p.display?.startsWith('ui_')) + .map(([k, p]) => [ + k, + p.sourceId + ? { supplier: labels.get(p.sourceId), port: p.sourceKey } + : { value: n === load.node && k === 'file' ? inputs.map((i) => i.role) : (p.value ?? null) }, + ]), + ), + }; + }); + let adapter = null; + if (lora) { + const selected = value(lora, 'model'); + same(selected.source, 'hub'); + assert.match(selected.value, /^[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*$/u); + const rev = value(lora, 'revision'), + weight = value(lora, 'weight_name'), + body = value(lora, 'expected_sha256'); + assert.match(rev, /^[a-f0-9]{40}$/u); + assert.match(weight, /^[\w.-]+\.safetensors$/u); + hash(body); + const previous = lora.node.params.previous_loras; + assert(previous && !previous.sourceId && !previous.sourceKey && previous.value == null); + const scale = value(lora, 'scale'), + name = value(lora, 'adapter_name'); + assert(Number.isFinite(scale) && scale >= 0 && scale <= 2 && typeof name === 'string' && name.length <= 256); + same(form.guidanceScale, 1); + same(value(lora, 'scheduler_class'), 'FlowMatchEulerDiscreteScheduler'); + const scheduler = JSON.parse(value(lora, 'scheduler_config')); + adapter = { + repository: selected.value, + revision: rev, + weightName: weight, + sha256: body, + scale, + configuredName: name, + scheduler, + }; + } + const formKeys = [ + 'mode', + 'modelType', + 'resourceMode', + 'dtype', + 'quantizationMode', + 'randomSeed', + 'seed', + 'width', + 'height', + 'steps', + 'guidanceScale', + 'prompt', + 'negativePrompt', + 'maxSequenceLength', + 'offloadMode', + 'autoOffload', + 'strength', + ]; + return { + role, + owner, + guide, + encode, + image, + denoise, + decode, + load, + preview, + lora, + value, + inputs, + adapter, + graphControlsHash: canonicalJsonHash(projection), + formControlsHash: canonicalJsonHash(Object.fromEntries(formKeys.map((k) => [k, form[k]]))), + recipe: { + modelType, + repository: repo.value, + revision, + dtype: 'bfloat16', + device: 'cuda:0', + offloadMode: form.offloadMode, + autoOffload: form.autoOffload, + resourceMode: form.resourceMode, + formMode: form.mode, + originalWorkflowId: workflowId, + geometry: { width: form.width, height: form.height }, + geometryRoute, + absentLoaderControls: absent, + }, + }; +} + +function pil(value) { + assert(value && typeof value === 'object'); + hash(value.sha256); + hash(value.decodedRgbaSha256); + assert(['RGB', 'RGBA', 'L'].includes(value.mode)); + assert( + Array.isArray(value.size) && + value.size.length === 2 && + value.size.every((n) => Number.isSafeInteger(n) && n > 0 && n <= 8192), + ); + return { mode: value.mode, size: value.size, sha256: value.sha256, decodedRgbaSha256: value.decodedRgbaSha256 }; +} +const images = (value) => (Array.isArray(value) ? value : [value]).map(pil); +const schedulerValue = (s) => ({ + ...s, + config: Object.fromEntries( + Object.entries(s.config).map(([k, v]) => [k, k === '_use_default_values' ? [...v].sort() : v]), + ), +}); + +function proveAdapter(p, events, derived, call, task, models) { + if (!p.adapter) { + same(call.peftComponentAdapterNames, {}); + same(call.peftLayerScaleHistograms, {}); + same(call.wholePipelineAdapterScales, null); + same(models.length, 1); + return null; + } + const a = p.adapter, + records = derived.generatedNamespaceLoadToConsumption; + assert(records); + same(records.rawDescriptors.length, 1); + const descriptor = records.rawDescriptors[0]; + same(descriptor.nodeId, p.lora.id); + same(descriptor.rawName, a.configuredName); + same(descriptor.rawNameFieldPresent, true); + same(descriptor.sha256, a.sha256); + same(descriptor.weightName, a.weightName); + same(descriptor.scale, a.scale); + const slot = descriptor.resolvedName; + assert(typeof slot === 'string' && slot.length > 0 && slot.length <= 512); + if (a.configuredName) same(slot, a.configuredName); + else same(descriptor.generated, true); + const starts = events.filter((e) => e.event === 'loraWeightLoadStarted'), + loaded = events.filter((e) => e.event === 'loraWeightLoadReturned'), + activated = events.filter((e) => e.event === 'loraSetAdaptersReturned'); + same(starts.length, 1); + same(loaded.length, 1); + same(activated.length, 1); + const start = starts[0], + load = loaded[0], + active = activated[0]; + same(records.actualLoadedWeights, [load]); + same(records.actualActivation, active); + same(start.callId, load.callId); + same(start.pipelineObjectId, load.pipelineObjectId); + same(active.pipelineObjectId, load.pipelineObjectId); + same(load.task, { + task_id: task.task_id, + attempt_index: 0, + current_node: p.owner.id, + current_node_name: scope(p.owner.node), + }); + same(start.task, load.task); + same(active.task, load.task); + assert( + Date.parse(start.at) >= task.started_at * 1000 && + Date.parse(start.at) <= Date.parse(load.at) && + Date.parse(load.at) <= Date.parse(active.at) && + Date.parse(active.at) <= Date.parse(call.at), + ); + const weight = load.actualWeight; + same(weight, start.actualWeight); + same(weight.adapterName, slot); + same(weight.weightName, a.weightName); + same(weight.actualFile.sha256, a.sha256); + assert(Number.isSafeInteger(weight.actualFile.byteSize) && weight.actualFile.byteSize > 0); + same(active.actualInputs, { adapter_names: [slot], adapter_weights: [a.scale] }); + const loadedTransformer = load.runtimeAfter.peftComponentBindings.transformer; + assert(loadedTransformer && Number.isSafeInteger(loadedTransformer.modelObjectId)); + same(loadedTransformer.loadedAdapterNames, [slot]); + same(active.runtimeAfter.peftComponentBindings.transformer.modelObjectId, loadedTransformer.modelObjectId); + same(call.peftComponentAdapterNames, { transformer: [slot] }); + same(call.peftComponentBindings.transformer.modelObjectId, loadedTransformer.modelObjectId); + same(call.peftComponentBindings.transformer.loadedAdapterNames, [slot]); + same(call.wholePipelineAdapterScales, null); + const forwards = events.filter((e) => e.event === 'actualQwenModelAdapters' && e.task.current_node === p.denoise.id); + same(forwards, records.actualConsumingForwards); + same(forwards.length, p.value(p.denoise, 'num_inference_steps')); + same(records.consumedTransformerObjectId, loadedTransformer.modelObjectId); + const denoiseReturns = events.filter((e) => e.event === 'officialCallReturned' && e.callId === call.callId); + same(denoiseReturns.length, 1); + let lastForwardAt = Date.parse(call.at); + for (const forward of forwards) { + const at = Date.parse(forward.at); + assert(Number.isFinite(at) && at >= lastForwardAt && at <= Date.parse(denoiseReturns[0].at)); + lastForwardAt = at; + } + const rowNames = []; + let layerCount = null; + for (const forward of forwards) { + same(forward.task, call.task); + same(forward.modelObjectId, loadedTransformer.modelObjectId); + same(forward.peftBinding.modelObjectId, loadedTransformer.modelObjectId); + same(forward.peftBinding.loadedAdapterNames, [slot]); + assert(Date.parse(forward.at) >= Date.parse(call.at)); + const layers = forward.peftBinding.layers; + assert(Array.isArray(layers) && layers.length > 0 && layers.length <= 4096); + if (layerCount === null) layerCount = layers.length; + same(layers.length, layerCount); + same(new Set(layers.map((r) => r.name)).size, layerCount); + for (const layer of layers) { + same(layer.activeAdapters, [slot]); + same(layer.disableAdapters, false); + same(layer.mergedAdapters, []); + same(layer.loraAKeys, [slot]); + same(layer.loraBKeys, [slot]); + same(layer.scaling, { [slot]: a.scale }); + } + const names = layers.map((r) => r.name); + if (!rowNames.length) rowNames.push(...names); + else same(names, rowNames); + } + same(Object.keys(call.peftLayerScaleHistograms), ['transformer']); + same(Object.keys(call.peftLayerScaleHistograms.transformer), [slot]); + const histogram = call.peftLayerScaleHistograms.transformer[slot]; + same(Object.keys(histogram).length, 1); + const scaleLabel = Object.keys(histogram)[0]; + assert(/^-?(?:0|[1-9]\d*)(?:\.\d+)?$/u.test(scaleLabel)); + same(Number(scaleLabel), a.scale); + same(histogram[scaleLabel], layerCount); + same(models.length, 2); + const selected = models.filter((m) => m.repoId === a.repository); + same(selected.length, 1); + same(selected[0].selectedRevision, a.revision); + const actualConfig = Object.fromEntries(Object.entries(call.scheduler.config).filter(([k]) => !k.startsWith('_'))); + same(actualConfig, a.scheduler); + return { + ...a, + actualName: slot, + weightBytes: weight.actualFile.byteSize, + transformerObjectId: loadedTransformer.modelObjectId, + observedLayers: layerCount, + observedForwards: forwards.length, + originalLoadRevision: weight.revision, + }; +} + +function derive(api, context) { + const { + executionReceipt: task, + executedOutput: output, + backendSource: source, + backendContract: contract, + modelIdentities: models, + inputArtifacts: artifacts, + retainedNativeEvidence: records, + } = context; + same(Object.keys(records).sort(), [...names].sort()); + let total = 0; + const read = (name) => { + const r = records[name]; + assert(r && typeof r.text === 'string'); + const size = Buffer.byteLength(r.text); + total += size; + assert(size <= (name === 'journal' ? 64 : name === 'inputs' ? 1 : 16) * 1024 ** 2 && total <= 112 * 1024 ** 2); + same(sha(r.text), r.sha256); + return name === 'journal' + ? r.text + .trim() + .split('\n') + .map((x) => JSON.parse(x)) + : JSON.parse(r.text); + }; + const original = read('receipt'), + requests = read('requests'), + responses = read('responses'), + derived = read('derived'), + journal = read('journal'), + observer = read('observer'), + comparison = read('comparison'), + inputEvidence = read('inputs'); + same(original.task, task); + same(original.outputs, [output]); + same(task.status, 'completed'); + same(task.attempt_index, 0); + same(output.attemptIndex, 0); + same(task.resourceCandidateId, null); + same(task.task_id, context.taskId); + same(output.taskId, task.task_id); + const submitted = requests.filter((r) => r.path === '/graph'), + accepted = responses.filter((r) => r.path === '/graph'); + same(submitted.length, 1); + same(accepted.length, 1); + same(submitted[0].body, api); + same(accepted[0].status, 200); + same(accepted[0].body.error, false); + same(accepted[0].body.task_id, task.task_id); + same(accepted[0].body.sid, api.sid); + assert( + Date.parse(submitted[0].at) <= task.started_at * 1000 && + Date.parse(accepted[0].at) >= Date.parse(submitted[0].at) && + Date.parse(accepted[0].at) <= task.completed_at * 1000, + ); + if (Object.hasOwn(output, 'apiGraphSnapshot')) same(output.apiGraphSnapshot, api); + assert(!Object.hasOwn(api, 'loops')); + for (const [hint, tk, ok] of [ + ['sid', 'sid', 'sid'], + ['workflowTabId', 'workflow_tab_id', 'workflowTabId'], + ['clientRunId', 'client_run_id', 'clientRunId'], + ['runInputHash', 'run_input_hash', 'runInputHash'], + ]) { + const v = hint === 'sid' ? api.sid : api.runtimeHints[hint]; + assert(typeof v === 'string' && v); + same(task[tk], v); + same(output[ok], v); + } + same(task.workflow_snapshot, api.runtimeHints.workflowSnapshot); + same(output.formSnapshot, task.workflow_snapshot.studioForm); + same(output.formSnapshot.trustRemoteCode, false); + const form = output.formSnapshot, + p = project(Object.entries(api.nodes), api.paths, form, artifacts); + same(output.nodeId, p.preview.id); + same(task.runtimePreparation.resourceMode, form.resourceMode); + same(source.fingerprint, task.runtimeFingerprint.backendSource.fingerprint); + same(source.files.length, task.runtimeFingerprint.backendSource.fileCount); + same(source.gitCommit, task.runtimeFingerprint.backendSource.gitCommit); + same( + source.fingerprint, + 'sha256:backend-source-v1:' + canonicalJsonHash({ gitCommit: source.gitCommit, files: source.files }), + ); + assert.match(contract.fingerprint, /^sha256:backend-contract-v1:[a-f0-9]{64}$/u); + const ownerContract = contract.contracts.filter((c) => c.key === prefix + 'ModelsLoader'); + same(ownerContract.length, 1); + for (const key of absent) assert(!Object.hasOwn(ownerContract[0].params, key)); + const native = output.resolvedExecutionInputs; + same(native.schemaVersion, 1); + same(native.source, 'backend-execution'); + same(native.taskId, task.task_id); + same(native.attemptIndex, 0); + same(native.nodeId, output.nodeId); + same(native.truncated, false); + same(native.uncapturedNodeIds, []); + same(native.nodes.length, Object.keys(api.nodes).length); + const captures = new Map(native.nodes.map((n) => [n.nodeId, n])); + same(captures.size, native.nodes.length); + for (const [id, node] of Object.entries(api.nodes)) { + same(captures.get(id)?.module, node.module); + same(captures.get(id)?.action, node.action); + same(captures.get(id)?.omittedFields, {}); + } + const consumed = (r, k, v) => same(captures.get(r.id).fields[k], { source: 'literal', value: v }); + for (const key of absent) assert(!Object.hasOwn(captures.get(p.owner.id).fields, key)); + for (const key of 'model_type repo_id revision dtype device auto_offload offload_mode quant_config attention_backend vae_slicing vae_tiling'.split( + ' ', + )) + consumed( + p.owner, + key, + key === 'repo_id' + ? p.recipe.repository + : key === 'quant_config' + ? (p.value(p.owner, key) ?? null) + : p.value(p.owner, key), + ); + for (const key of 'model_type guider guidance_scale guidance_rescale use_original_formulation enabled start stop'.split( + ' ', + )) + consumed(p.guide, key, p.value(p.guide, key)); + for (const key of ['prompt', 'negative_prompt']) consumed(p.encode, key, p.value(p.encode, key)); + for (const key of [ + ...(p.recipe.geometryRoute === 'literal_dimensions' ? ['width', 'height'] : []), + 'seed', + 'num_inference_steps', + 'guidance_scale', + ...(Object.hasOwn(p.denoise.node.params, 'strength') ? ['strength'] : []), + ]) + consumed(p.denoise, key, p.value(p.denoise, key)); + if (p.recipe.geometryRoute === 'native_image_state') + for (const key of ['width', 'height']) assert(!Object.hasOwn(captures.get(p.denoise.id).fields, key)); + if (!Object.hasOwn(p.denoise.node.params, 'strength')) + assert(!Object.hasOwn(captures.get(p.denoise.id).fields, 'strength')); + consumed(p.image, 'seed', form.seed); + consumed(p.preview, 'device', p.value(p.preview, 'device')); + if (p.lora) { + same(Object.keys(captures.get(p.lora.id).fields), ['revision']); + consumed(p.lora, 'revision', p.adapter.revision); + } + same(native.graphTasks.length, 1); + const reportedTask = native.graphTasks[0].task; + assert(reportedTask === null || reportedTask === 'edit_image'); + same(native.graphTasks, [{ loaderId: p.owner.id, pipelineClass: p.recipe.modelType, task: reportedTask }]); + same(derived.taskId, task.task_id); + for (const name of ['receipt', 'requests', 'responses']) + same(derived.evidenceHashes[name === 'receipt' ? 'run-receipt.json' : name + '.json'], records[name].sha256); + const events = journal.filter((e) => e.task?.task_id === task.task_id), + calls = events.filter((e) => e.event === 'officialCallStarted'); + same(calls, derived.actualOfficialCalls); + same(calls.length, 4); + assert(!events.some((e) => e.event === 'officialCallFailed')); + const expectedOrder = api.paths[0].filter((id) => [p.encode.id, p.image.id, p.denoise.id, p.decode.id].includes(id)); + same( + calls.map((c) => c.task.current_node), + expectedOrder, + ); + same(new Set(calls.map((c) => c.callId)).size, 4); + const returns = []; + for (const call of calls) { + assert.match(call.callId, /^[a-f0-9]{32}$/u); + same(call.task, { + task_id: task.task_id, + attempt_index: 0, + current_node: call.task.current_node, + current_node_name: scope(api.nodes[call.task.current_node]), + }); + same(call.pipelineClass, 'diffusers.modular_pipelines.modular_pipeline.ModularPipeline'); + assert( + call.actualPipelineClass.startsWith('diffusers.modular_pipelines.') && + call.actualPipelineClass.endsWith('.' + p.recipe.modelType), + ); + const ret = events.filter((e) => e.event === 'officialCallReturned' && e.callId === call.callId); + same(ret.length, 1); + same(ret[0].task, call.task); + assert( + Date.parse(call.at) >= task.started_at * 1000 && + Date.parse(ret[0].at) >= Date.parse(call.at) && + Date.parse(ret[0].at) <= task.completed_at * 1000, + ); + if (returns.length) assert(Date.parse(call.at) >= Date.parse(returns.at(-1).at)); + returns.push(ret[0]); + } + const find = (r) => calls.find((c) => c.task.current_node === r.id), + enc = find(p.encode), + img = find(p.image), + den = find(p.denoise), + dec = find(p.decode); + const guideConfig = Object.fromEntries( + Object.entries(p.guide.node.params) + .filter(([k]) => !['model_type', 'guider', 'layers_config'].includes(k)) + .map(([k]) => [k, p.value(p.guide, k)]), + ); + for (const c of [enc, den]) { + same(c.guider.class, 'diffusers.guiders.classifier_free_guidance.ClassifierFreeGuidance'); + same(c.guider.config, guideConfig); + } + for (const c of [img, den]) same(c.generator, { device: 'cuda:0', initialSeed: form.seed, type: 'Generator' }); + same(enc.generator, null); + same(dec.generator, null); + same(enc.callInputs.prompt, form.prompt); + same(enc.callInputs.negative_prompt, form.negativePrompt); + same(den.callInputs.num_inference_steps, form.steps); + if (p.recipe.geometryRoute === 'native_image_state') + for (const key of ['width', 'height']) assert(!Object.hasOwn(den.callInputs, key)); + else for (const key of ['width', 'height']) same(den.callInputs[key], p.value(p.denoise, key)); + if (Object.hasOwn(den.callInputs, 'strength')) same(den.callInputs.strength, p.value(p.denoise, 'strength')); + else if (!Object.hasOwn(p.denoise.node.params, 'strength')) assert(!Object.hasOwn(den.callInputs, 'strength')); + for (const key of ['mask_image', 'padding_mask_crop']) + if (Object.hasOwn(img.callInputs, key)) same(img.callInputs[key], null); + for (const c of [img, dec]) same(c.vaeMemoryFlags, { use_slicing: false, use_tiling: false }); + const consumedPixels = images(img.callInputs.image); + same(consumedPixels, images(enc.callInputs.image)); + same(consumedPixels.length, p.inputs.length); + same(comparison.format, 'modiff.image-template-comparison-contract.v1'); + same(comparison.templateId, context.templateId); + same(comparison.task, 'edit_image'); + same(inputEvidence.schemaVersion, 1); + same(inputEvidence.sources.length, p.inputs.length); + const inputs = p.inputs.map((input, i) => { + const match = inputEvidence.sources.filter((x) => x.role === input.role); + same(match.length, 1); + const row = match[0]; + same(row.contentHash, input.contentHash); + same(row.byteSize, input.byteSize); + const old = comparison.inputs.filter((x) => x.sha256 === input.contentHash.slice('sha256:bytes:'.length)); + same(old.length, 1); + same(old[0].role, row.originalContractRole); + same(row.originalContractRole, 'referenceImage' + (i + 1)); + same(row.decodedRgbaSha256, consumedPixels[i].decodedRgbaSha256); + same(row.size, consumedPixels[i].size); + return { ...input, originalContractRole: row.originalContractRole, ...consumedPixels[i] }; + }); + const base = models.filter((m) => m.repoId === p.recipe.repository); + same(base.length, 1); + same(base[0].selectedRevision, p.recipe.revision); + same(base[0].modelRevision, p.recipe.repository + '@' + p.recipe.revision); + assert(base[0].fingerprint); + same( + models.map((m) => [m.repoId, m.selectedRevision]).sort(), + comparison.models.map((m) => [m.repoId, m.revision]).sort(), + ); + const adapter = proveAdapter(p, events, derived, den, task, models); + if (adapter) { + const declared = comparison.models.filter((m) => m.repoId === adapter.repository); + same(declared.length, 1); + same(declared[0].weightName, adapter.weightName); + same(declared[0].sha256, adapter.sha256); + } + same(schedulerValue(den.scheduler), schedulerValue(comparison.settings.scheduler)); + const starts = events.filter((e) => e.event === 'schedulerStepStarted'), + finished = events.filter((e) => e.event === 'schedulerStepReturned'); + same(starts.length, form.steps); + same(finished.length, form.steps); + same( + starts.map((e) => e.stepIndex), + [null, ...Array.from({ length: form.steps - 1 }, (_, i) => i + 1)], + ); + same( + finished.map((e) => e.stepIndex), + Array.from({ length: form.steps }, (_, i) => i + 1), + ); + const denReturn = returns.find((r) => r.callId === den.callId); + for (const [i, e] of starts.entries()) { + same(e.task, den.task); + same(finished[i].task, den.task); + assert( + Date.parse(e.at) >= Date.parse(den.at) && + Date.parse(e.at) <= Date.parse(finished[i].at) && + Date.parse(finished[i].at) <= Date.parse(denReturn.at), + ); + if (i) assert(Date.parse(e.at) >= Date.parse(finished[i - 1].at)); + } + same(returns.find((r) => r.callId === dec.callId).images, [{ mode: 'RGB', size: [form.width, form.height] }]); + same(output.mediaItems.length, 1); + same(output.mediaItems[0].width, form.width); + same(output.mediaItems[0].height, form.height); + assert(Date.parse(observer.installedAt) <= task.started_at * 1000); + hash(observer.observerSha256); + const wrapped = observer.wrappedCalls.filter( + (r) => r.kind === 'officialPipelineCall' && r.class === calls[0].pipelineClass, + ); + same(wrapped.length, 1); + hash(wrapped[0].sourceSha256); + const upstream = derived.actualDiffusersDirectUrl.value; + same(upstream.url, 'https://github.com/huggingface/diffusers.git'); + assert.match(upstream.vcs_info.commit_id, /^[a-f0-9]{40}$/u); + const observation = { + schemaVersion: 1, + templateId: context.templateId, + taskId: task.task_id, + recipe: p.recipe, + graphControlsHash: p.graphControlsHash, + formControlsHash: p.formControlsHash, + reportedGraphTask: reportedTask, + configuredUnusedFields: { + formStrength: form.strength, + genericDenoiserStrengthPresent: Object.hasOwn(p.denoise.node.params, 'strength'), + genericDenoiserStrength: Object.hasOwn(p.denoise.node.params, 'strength') ? p.value(p.denoise, 'strength') : null, + formMaxSequenceLength: form.maxSequenceLength, + }, + denoiserStrengthPassed: Object.hasOwn(den.callInputs, 'strength'), + actualInheritedVaeFlags: { use_slicing: false, use_tiling: false }, + actualGuider: guideConfig, + actualScheduler: den.scheduler, + inputs, + adapter, + rawOfficialCalls: 4, + rawSchedulerSteps: finished.length, + backendSourceFingerprint: source.fingerprint, + backendContractFingerprint: contract.fingerprint, + rawRecordHashes: Object.fromEntries(names.map((n) => [n, records[n].sha256])), + upstreamLibrary: { + url: upstream.url, + commit: upstream.vcs_info.commit_id, + callSourceSha256: wrapped[0].sourceSha256, + }, + historicalLimits: limits, + }; + const plan = { + source: SOURCE, + modelType: p.recipe.modelType, + pipelineClass: p.recipe.modelType, + modelRepo: p.recipe.repository, + modelRevision: p.recipe.revision, + dtype: 'bfloat16', + device: 'cuda:0', + offloadMode: p.recipe.offloadMode, + autoOffload: p.recipe.autoOffload, + resourceMode: form.resourceMode, + resolvedResourceMode: form.resourceMode, + quantizationMode: 'none', + quantizedComponents: [], + resourceObservation: observation, + }; + assert(resourceId(plan)); + return plan; +} + +function keys(value, expected) { + assert(value && typeof value === 'object' && !Array.isArray(value)); + same(Object.keys(value).sort(), expected.split(' ').sort()); +} +function boundedString(value, max = 512) { + assert(typeof value === 'string' && value.length > 0 && value.length <= max); +} +function repository(value) { + assert.match(value, /^[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*$/u); +} +function pin(value) { + assert.match(value, /^[a-f0-9]{40}$/u); +} +function positive(value, max = Number.MAX_SAFE_INTEGER) { + assert(Number.isSafeInteger(value) && value > 0 && value <= max); +} +function scalar(value, min, max) { + assert(Number.isFinite(value) && value >= min && value <= max); +} +function descriptor(adapter) { + return Object.fromEntries( + Object.entries(adapter).filter( + ([k]) => + ![ + 'actualName', + 'weightBytes', + 'transformerObjectId', + 'observedLayers', + 'observedForwards', + 'originalLoadRevision', + ].includes(k), + ), + ); +} + +function resourceId(plan) { + try { + assertFiniteObservedJson(plan); + assert(Buffer.byteLength(JSON.stringify(plan)) <= 65536); + keys( + plan, + 'source modelType pipelineClass modelRepo modelRevision dtype device offloadMode autoOffload resourceMode resolvedResourceMode quantizationMode quantizedComponents resourceObservation', + ); + same(plan.source, SOURCE); + const o = plan.resourceObservation; + keys( + o, + 'schemaVersion templateId taskId recipe graphControlsHash formControlsHash reportedGraphTask configuredUnusedFields denoiserStrengthPassed actualInheritedVaeFlags actualGuider actualScheduler inputs adapter rawOfficialCalls rawSchedulerSteps backendSourceFingerprint backendContractFingerprint rawRecordHashes upstreamLibrary historicalLimits', + ); + same(o.schemaVersion, 1); + boundedString(o.templateId, 256); + boundedString(o.taskId, 256); + hash(o.graphControlsHash); + hash(o.formControlsHash); + const r = o.recipe; + keys( + r, + 'modelType repository revision dtype device offloadMode autoOffload resourceMode formMode originalWorkflowId geometry geometryRoute absentLoaderControls', + ); + assert.match(r.modelType, /^[A-Za-z]\w*ModularPipeline$/u); + repository(r.repository); + pin(r.revision); + for (const [field, value] of Object.entries({ + modelType: r.modelType, + pipelineClass: r.modelType, + modelRepo: r.repository, + modelRevision: r.revision, + dtype: 'bfloat16', + device: 'cuda:0', + offloadMode: r.offloadMode, + autoOffload: r.autoOffload, + resourceMode: r.resourceMode, + resolvedResourceMode: r.resourceMode, + quantizationMode: 'none', + quantizedComponents: [], + })) + same(plan[field], value); + same(r.dtype, 'bfloat16'); + same(r.device, 'cuda:0'); + assert(['auto', 'expert'].includes(r.resourceMode)); + assert(['edit_image', 'multi_image_reference_edit'].includes(r.formMode)); + assert(['default', 'image_conditioned'].includes(r.originalWorkflowId)); + assert( + (r.offloadMode === 'none' && r.autoOffload === false) || + (r.offloadMode === 'model_cpu' && r.autoOffload === true), + ); + keys(r.geometry, 'width height'); + positive(r.geometry.width, 4096); + positive(r.geometry.height, 4096); + assert(['literal_dimensions', 'native_image_state'].includes(r.geometryRoute)); + same(r.absentLoaderControls, absent); + assert(o.reportedGraphTask === null || o.reportedGraphTask === 'edit_image'); + same(o.historicalLimits, limits); + keys( + o.configuredUnusedFields, + 'formStrength genericDenoiserStrengthPresent genericDenoiserStrength formMaxSequenceLength', + ); + const u = o.configuredUnusedFields; + scalar(u.formStrength, 0, 1); + positive(u.formMaxSequenceLength, 4096); + same(typeof u.genericDenoiserStrengthPresent, 'boolean'); + same(typeof o.denoiserStrengthPassed, 'boolean'); + if (u.genericDenoiserStrengthPresent) scalar(u.genericDenoiserStrength, 0, 1); + else { + same(u.genericDenoiserStrength, null); + same(o.denoiserStrengthPassed, false); + } + same(o.actualInheritedVaeFlags, { use_slicing: false, use_tiling: false }); + keys(o.actualGuider, 'guidance_scale guidance_rescale use_original_formulation enabled start stop'); + scalar(o.actualGuider.guidance_scale, 0, 100); + same(o.actualGuider.guidance_rescale, 0); + same(o.actualGuider.use_original_formulation, false); + same(o.actualGuider.enabled, true); + same(o.actualGuider.start, 0); + same(o.actualGuider.stop, 1); + keys(o.actualScheduler, 'class config'); + assert.match(o.actualScheduler.class, /^diffusers\.schedulers\.[A-Za-z0-9_.]+$/u); + assert( + o.actualScheduler.config && + typeof o.actualScheduler.config === 'object' && + !Array.isArray(o.actualScheduler.config), + ); + assert(Object.keys(o.actualScheduler.config).length <= 256); + same(o.rawOfficialCalls, 4); + positive(o.rawSchedulerSteps, 4096); + assert.match(o.backendSourceFingerprint, /^sha256:backend-source-v1:[a-f0-9]{64}$/u); + assert.match(o.backendContractFingerprint, /^sha256:backend-contract-v1:[a-f0-9]{64}$/u); + keys(o.rawRecordHashes, names.join(' ')); + for (const n of names) hash(o.rawRecordHashes[n]); + keys(o.upstreamLibrary, 'url commit callSourceSha256'); + same(o.upstreamLibrary.url, 'https://github.com/huggingface/diffusers.git'); + pin(o.upstreamLibrary.commit); + hash(o.upstreamLibrary.callSourceSha256); + assert(Array.isArray(o.inputs) && (o.inputs.length === 1 || o.inputs.length === 2)); + for (const [i, input] of o.inputs.entries()) { + keys(input, 'role contentHash byteSize originalContractRole mode size sha256 decodedRgbaSha256'); + same(input.role, 'referenceImages[' + i + ']'); + same(input.originalContractRole, 'referenceImage' + (i + 1)); + assert.match(input.contentHash, /^sha256:bytes:[a-f0-9]{64}$/u); + positive(input.byteSize, 256 * 1024 ** 2); + same(pil(input), { + mode: input.mode, + size: input.size, + sha256: input.sha256, + decodedRgbaSha256: input.decodedRgbaSha256, + }); + } + if (o.adapter !== null) { + const a = o.adapter; + keys( + a, + 'repository revision weightName sha256 scale configuredName scheduler actualName weightBytes transformerObjectId observedLayers observedForwards originalLoadRevision', + ); + repository(a.repository); + pin(a.revision); + assert.match(a.weightName, /^[\w.-]+\.safetensors$/u); + hash(a.sha256); + scalar(a.scale, 0, 2); + same(typeof a.configuredName, 'string'); + assert(a.configuredName.length <= 256); + boundedString(a.actualName, 512); + if (a.configuredName) same(a.actualName, a.configuredName); + positive(a.weightBytes); + positive(a.transformerObjectId); + positive(a.observedLayers, 4096); + same(a.observedForwards, o.rawSchedulerSteps); + assert(a.originalLoadRevision === null || /^[a-f0-9]{40}$/u.test(a.originalLoadRevision)); + same(o.actualGuider.guidance_scale, 1); + same( + Object.fromEntries(Object.entries(o.actualScheduler.config).filter(([k]) => !k.startsWith('_'))), + a.scheduler, + ); + } + return 'observed-retained-modular-image-v1:' + canonicalJsonHash(plan); + } catch { + return null; + } +} +function proofMatches(plan, provenance) { + try { + assert(resourceId(plan)); + const o = plan.resourceObservation, + g = provenance.graph.canonicalGraph, + form = provenance.template.lockedSettings; + const p = project( + g.nodes.map((n) => [n.key, n]), + g.paths, + form, + provenance.inputs.items, + ); + same(p.recipe, o.recipe); + same(p.graphControlsHash, o.graphControlsHash); + same(p.formControlsHash, o.formControlsHash); + same(provenance.template.id, o.templateId); + same(provenance.taskId, o.taskId); + same(provenance.runtime.backendSource.fingerprint, o.backendSourceFingerprint); + same(provenance.runtime.backendContract.fingerprint, o.backendContractFingerprint); + same( + p.inputs, + o.inputs.map(({ role, contentHash, byteSize }) => ({ role, contentHash, byteSize })), + ); + same(provenance.inputs.count, p.inputs.length); + same( + provenance.models.items.map((m) => [m.repoId, m.selectedRevision]).sort(), + [ + [p.recipe.repository, p.recipe.revision], + ...(p.adapter ? [[p.adapter.repository, p.adapter.revision]] : []), + ].sort(), + ); + same(p.adapter, o.adapter === null ? null : descriptor(o.adapter)); + same( + o.actualGuider, + Object.fromEntries( + Object.entries(p.guide.node.params) + .filter(([k]) => !['model_type', 'guider', 'layers_config'].includes(k)) + .map(([k]) => [k, p.value(p.guide, k)]), + ), + ); + same(o.configuredUnusedFields, { + formStrength: form.strength, + genericDenoiserStrengthPresent: Object.hasOwn(p.denoise.node.params, 'strength'), + genericDenoiserStrength: Object.hasOwn(p.denoise.node.params, 'strength') ? p.value(p.denoise, 'strength') : null, + formMaxSequenceLength: form.maxSequenceLength, + }); + same(provenance.output.items.length, 1); + same(provenance.output.items[0].mediaType, 'image'); + same(provenance.output.items[0].width, p.recipe.geometry.width); + same(provenance.output.items[0].height, p.recipe.geometry.height); + same(form.steps, o.rawSchedulerSteps); + return true; + } catch { + return false; + } +} + +export const OBSERVED_RETAINED_MODULAR_IMAGE_SOURCE = SOURCE; +export function observedRetainedModularImagePlan(api, context = {}) { + try { + return stableJsonValue(derive(api, context)); + } catch { + return null; + } +} +export const observedRetainedModularImageResourceId = resourceId; +export const observedRetainedModularImageProofMatches = proofMatches; diff --git a/scripts/retained-native-text-provenance.test.mjs b/scripts/retained-native-text-provenance.test.mjs new file mode 100644 index 00000000..c22dac3b --- /dev/null +++ b/scripts/retained-native-text-provenance.test.mjs @@ -0,0 +1,626 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import test from 'node:test'; +import { canonicalJsonHash } from './canonical-json.mjs'; +import { + backendContractIdentity, + canonicalizeApiGraph, + createRunProvenance, + executionPlanIdentity, + executionReceiptIdentity, +} from './live-proof-provenance.mjs'; +import { + observedRetainedExpertTextProofMatches, + observedRetainedExpertTextResourceId, +} from './retained-native-text-resource.mjs'; + +const SOURCE = 'observed-retained-expert-text-resource-v1'; +const sha = (text) => createHash('sha256').update(text).digest('hex'); +const scope = 'modules.ModularDiffusers.'; + +// Synthetic records only: no private files, model execution or hardware proof. +function witness() { + const literal = (value) => ({ value }); + const wire = (sourceId, sourceKey) => ({ sourceId, sourceKey }); + const form = { + mode: 'text_to_image', + modelType: 'LegacyExamplePipeline', + resourceMode: 'expert', + dtype: 'bfloat16', + quantizationMode: 'none', + trustRemoteCode: false, + device: 'cuda:0', + autoOffload: true, + offloadMode: 'group_cpu', + width: 64, + height: 64, + steps: 2, + seed: 12, + randomSeed: false, + guidanceScale: 3.5, + prompt: 'A fictional ceramic workshop.', + negativePrompt: '', + maxSequenceLength: 512, + }; + const node = (action, params) => ({ module: 'modules.ModularDiffusers', action, params }); + const guide = { + model_type: 'ExampleModularPipeline', + guider: 'ClassifierFreeGuidance', + guidance_scale: 3.5, + guidance_rescale: 0, + use_original_formulation: false, + enabled: true, + start: 0, + stop: 1, + }; + const graph = { + sid: 'example-session', + nodes: { + owner: node( + 'ModelsLoader', + Object.fromEntries( + Object.entries({ + model_type: 'ExampleModularPipeline', + repo_id: { source: 'hub', value: 'example/model' }, + revision: 'a'.repeat(40), + dtype: 'bfloat16', + device: 'cuda:0', + offload_mode: 'group_cpu', + auto_offload: true, + attention_backend: 'auto', + trust_remote_code: false, + workflow_id: '', + vae_slicing: true, + vae_tiling: true, + quant_config: null, + lora_list: null, + unet: null, + vae: null, + controlnet: null, + }).map(([k, v]) => [k, literal(v)]), + ), + ), + guide: node('Guider', Object.fromEntries(Object.entries(guide).map(([k, v]) => [k, literal(v)]))), + encode: node('EncodePrompt', { + prompt: literal(form.prompt), + negative_prompt: literal(''), + max_sequence_length: literal(512), + text_encoders: wire('owner', 'text_encoders'), + guider: wire('guide', 'guider_out'), + }), + denoise: node('Denoise', { + width: literal(64), + height: literal(64), + seed: literal(12), + num_inference_steps: literal(2), + guidance_scale: literal(3.5), + strength: literal(0.5), + image_latents: literal(null), + unet: wire('owner', 'unet_out'), + scheduler: wire('owner', 'scheduler'), + embeddings: wire('encode', 'embeddings'), + guider: wire('guide', 'guider_out'), + }), + decode: node('DecodeLatents', { + vae: wire('owner', 'vae_out'), + latents: wire('denoise', 'latents'), + width: wire('denoise', 'out_width'), + height: wire('denoise', 'out_height'), + }), + preview: { + module: 'modules.Image', + action: 'Preview', + params: { image: wire('decode', 'images'), device: literal('cpu:0') }, + }, + }, + paths: [['owner', 'guide', 'encode', 'denoise', 'decode', 'preview']], + }; + const ownerData = { + ...structuredClone(graph.nodes.owner), + operationAuthoring: { + schemaVersion: 1, + operation: { + pipelineClass: 'ExampleModularPipeline', + task: 'text_to_image', + nodeKey: scope + 'ModelsLoader', + binding: { pipelineClass: 'ExampleModularPipeline', values: { model_type: 'ExampleModularPipeline' } }, + }, + }, + }; + const snapshot = { studioForm: form, nodes: [{ id: 'owner', data: ownerData }], edges: [] }; + graph.runtimeHints = { + clientRunId: 'example-client', + runInputHash: 'example-input', + workflowTabId: 'example-workflow', + workflowSnapshot: snapshot, + }; + const files = [{ path: 'main.py', sha256: 'f'.repeat(64) }]; + const source = { + gitCommit: null, + files, + fingerprint: 'sha256:backend-source-v1:' + canonicalJsonHash({ gitCommit: null, files }), + }; + const task = { + task_id: 'example-task', + sid: graph.sid, + status: 'completed', + attempt_index: 0, + started_at: 1_000_000_000, + completed_at: 1_000_000_010, + resourceCandidateId: null, + workflow_tab_id: 'example-workflow', + client_run_id: 'example-client', + run_input_hash: 'example-input', + workflow_snapshot: snapshot, + runtimeFingerprint: { backendSource: { fingerprint: source.fingerprint, gitCommit: null, fileCount: 1 } }, + runtimePreparation: { resourceMode: 'expert', performed: false, residentRecipeReusable: false, cleanup: null }, + }; + const output = { + taskId: task.task_id, + sid: graph.sid, + workflowTabId: task.workflow_tab_id, + clientRunId: task.client_run_id, + runInputHash: task.run_input_hash, + attemptIndex: 0, + nodeId: 'preview', + formSnapshot: form, + mediaItems: [{ width: 64, height: 64 }], + }; + const captured = (action, fields) => ({ + nodeId: action, + module: graph.nodes[action].module, + action: graph.nodes[action].action, + fields: Object.fromEntries(Object.entries(fields).map(([k, v]) => [k, { source: 'literal', value: v }])), + omittedFields: {}, + }); + const ownerFields = Object.fromEntries( + 'model_type repo_id revision dtype device auto_offload offload_mode quant_config attention_backend vae_slicing vae_tiling' + .split(' ') + .map((k) => [k, k === 'repo_id' ? 'example/model' : graph.nodes.owner.params[k].value]), + ); + output.resolvedExecutionInputs = { + schemaVersion: 1, + source: 'backend-execution', + taskId: task.task_id, + attemptIndex: 0, + nodeId: 'preview', + truncated: false, + uncapturedNodeIds: [], + graphTasks: [{ loaderId: 'owner', pipelineClass: 'ExampleModularPipeline', task: 'text_to_image' }], + nodes: [ + captured('owner', ownerFields), + captured('guide', guide), + captured('encode', { prompt: form.prompt, negative_prompt: '', max_sequence_length: 512 }), + captured('denoise', { + width: 64, + height: 64, + seed: 12, + num_inference_steps: 2, + guidance_scale: 3.5, + strength: 0.5, + }), + { + ...captured('decode', {}), + fields: Object.fromEntries( + ['width', 'height'].map((k) => [ + k, + { source: 'connected', sourceNodeId: 'denoise', sourcePortId: 'out_' + k, value: 64 }, + ]), + ), + }, + captured('preview', { device: 'cpu:0' }), + ], + }; + const at = (seconds) => new Date((task.started_at + seconds) * 1000).toISOString(); + const nativeGuide = { + class: 'diffusers.guiders.classifier_free_guidance.ClassifierFreeGuidance', + config: Object.fromEntries(Object.entries(guide).filter(([k]) => !['model_type', 'guider'].includes(k))), + }; + const policy = (applied = {}) => ({ + executionDevice: 'cuda:0', + offloadMode: 'group_cpu', + applied, + requested: applied, + }); + const stages = ['EncodePrompt', 'Denoise', 'DecodeLatents']; + const ids = ['encode', 'denoise', 'decode']; + const calls = stages.map((stage, i) => ({ + event: 'officialCallStarted', + at: at(i + 1), + callId: String(i + 1).repeat(32), + pipelineClass: 'diffusers.modular_pipelines.modular_pipeline.ModularPipeline', + actualPipelineClass: 'diffusers.modular_pipelines.example.ExampleModularPipeline', + task: { task_id: task.task_id, attempt_index: 0, current_node: ids[i], current_node_name: scope + stage }, + callInputs: + i === 0 + ? { prompt: form.prompt, negative_prompt: '', max_sequence_length: 512 } + : i === 1 + ? { width: 64, height: 64, num_inference_steps: 2, guidance_scale: 3.5 } + : {}, + generator: i === 1 ? { device: 'cuda:0', initialSeed: 12, type: 'Generator' } : null, + guider: i < 2 ? nativeGuide : null, + peftComponentAdapterNames: {}, + peftLayerScaleHistograms: {}, + wholePipelineAdapterScales: null, + scheduler: + i === 1 + ? { + class: 'diffusers.schedulers.scheduling_flow_match_euler_discrete.FlowMatchEulerDiscreteScheduler', + config: { num_train_timesteps: 1000 }, + } + : null, + componentRuntimePolicies: + i === 0 + ? { text_encoder: policy(), text_encoder_2: policy() } + : i === 1 + ? { transformer: policy({ attention_backend: 'auto' }) } + : { vae: policy({ vae_slicing: true, vae_tiling: true }) }, + vaeMemoryFlags: i === 2 ? { use_slicing: true, use_tiling: true } : { use_slicing: null, use_tiling: null }, + })); + const journal = calls.flatMap((c, i) => [ + c, + { + event: 'officialCallReturned', + at: at(i + 1.5), + callId: c.callId, + task: c.task, + images: i === 2 ? [{ mode: 'RGB', size: [64, 64] }] : { type: 'NoneType' }, + }, + ]); + for (let i = 0; i < 2; i++) + journal.push( + { event: 'schedulerStepStarted', at: at(2.1 + i / 10), task: calls[1].task, stepIndex: i === 0 ? null : i }, + { event: 'schedulerStepReturned', at: at(2.15 + i / 10), task: calls[1].task, stepIndex: i + 1 }, + ); + const observer = { + installedAt: at(-1), + observerSha256: 'c'.repeat(64), + wrappedCalls: [{ kind: 'officialPipelineCall', class: calls[0].pipelineClass }], + }; + const model = { + repoId: 'example/model', + selectedRevision: 'a'.repeat(40), + modelRevision: 'example/model@' + 'a'.repeat(40), + fingerprint: 'sha256:' + 'e'.repeat(64), + }; + const w = { + graph, + task, + output, + source, + models: [model], + calls, + journal, + observer, + requests: [{ at: at(-0.1), path: '/graph', body: graph }], + responses: [ + { at: at(0.1), path: '/graph', status: 200, body: { error: false, sid: graph.sid, task_id: task.task_id } }, + ], + derived: { + taskId: task.task_id, + evidenceHashes: {}, + actualOfficialCalls: calls, + actualDiffusersDirectUrl: { + value: { url: 'https://github.com/huggingface/diffusers.git', vcs_info: { commit_id: 'b'.repeat(40) } }, + }, + }, + }; + return w; +} + +function context(w) { + const record = (text) => ({ text, sha256: sha(text) }); + const records = { + receipt: record(JSON.stringify({ task: w.task, outputs: [w.output] })), + requests: record(JSON.stringify(w.requests)), + responses: record(JSON.stringify(w.responses)), + journal: record(w.journal.map((x) => JSON.stringify(x)).join('\n') + '\n'), + observer: record(JSON.stringify(w.observer)), + }; + w.derived.evidenceHashes = { + 'run-receipt.json': records.receipt.sha256, + 'requests.json': records.requests.sha256, + 'responses.json': records.responses.sha256, + }; + records.derived = record(JSON.stringify(w.derived)); + const payload = Object.fromEntries(Object.values(w.graph.nodes).map((n) => [n.module + '.' + n.action, n])); + return { + executionReceipt: w.task, + executedOutput: w.output, + taskId: w.task.task_id, + modelIdentities: w.models, + backendSource: w.source, + backendContract: backendContractIdentity(payload, canonicalizeApiGraph(w.graph)), + retainedNativeEvidence: records, + }; +} + +test('retained Expert text records use their original request and native calls without fabricating missing fields', () => { + const w = witness(); + const c = context(w), + before = structuredClone({ w, c }); + const plan = executionPlanIdentity(w.graph, c).plan; + assert.equal(plan.source, SOURCE); + assert.equal(plan.resourceObservation.recipe.originalLoaderWorkflowId, ''); + assert.deepEqual(plan.resourceObservation.recipe.absentLoaderControls, ['weight_format', 'weight_loading_mode']); + assert.equal(Object.hasOwn(w.output, 'apiGraphSnapshot'), false); + assert.equal(w.task.resourceCandidateId, null); + assert.deepEqual({ w, c }, before); +}); + +test('retained text refuses contradictory original witnesses after their record hashes are recomputed', async (t) => { + const mutations = { + 'wrong original task response': (w) => { + w.responses[0].body.task_id = 'other-task'; + }, + 'wrong session': (w) => { + w.output.sid = 'other-session'; + }, + 'failed original task': (w) => { + w.task.status = 'failed'; + }, + 'retried original task': (w) => { + w.task.attempt_index = 1; + }, + 'borrowed VAE': (w) => { + w.graph.nodes.owner.params.vae = { sourceId: 'decode', sourceKey: 'images' }; + }, + 'invented loading port': (w) => { + w.graph.nodes.owner.params.weight_loading_mode = { value: 'cpu' }; + }, + 'invented weight format': (w) => { + w.graph.nodes.owner.params.weight_format = { value: 'native' }; + }, + 'invented form loading mode': (w) => { + w.output.formSnapshot.weightLoadingMode = 'cpu'; + }, + 'wrong Preview device': (w) => { + w.graph.nodes.preview.params.device.value = 'cpu'; + }, + 'wrong consumed Preview device': (w) => { + w.output.resolvedExecutionInputs.nodes.find((x) => x.nodeId === 'preview').fields.device.value = 'cpu'; + }, + 'wrong returned image size': (w) => { + w.journal.find((x) => x.event === 'officialCallReturned' && x.callId === w.calls[2].callId).images[0].size = [ + 128, 64, + ]; + }, + 'wrong returned image node': (w) => { + w.journal.find((x) => x.event === 'officialCallReturned').task = { ...w.calls[2].task }; + }, + 'scheduler borrowed from other node': (w) => { + w.journal.find((x) => x.event === 'schedulerStepStarted').task = { ...w.calls[0].task }; + }, + 'scheduler returned outside denoise': (w) => { + w.journal.find((x) => x.event === 'schedulerStepReturned').at = w.journal.find( + (x) => x.event === 'officialCallReturned' && x.callId === w.calls[2].callId, + ).at; + }, + 'missing durable owner binding': (w) => { + delete w.task.workflow_snapshot.nodes[0].data.operationAuthoring; + }, + 'missing decoder geometry origin': (w) => { + delete w.output.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'decode').fields.width.sourceNodeId; + }, + 'contradictory consumed geometry': (w) => { + w.output.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'denoise').fields.width.value = 128; + }, + 'missing official return': (w) => { + w.journal = w.journal.filter((e) => e.event !== 'officialCallReturned' || e.callId !== w.calls[2].callId); + }, + 'duplicated official return': (w) => { + w.journal.push(structuredClone(w.journal.find((e) => e.event === 'officialCallReturned'))); + }, + 'failed selected official call': (w) => { + w.journal.push({ event: 'officialCallFailed', task: w.calls[1].task }); + }, + 'wrong actual pipeline owner': (w) => { + w.calls[1].actualPipelineClass = 'custom.ExampleModularPipeline'; + }, + 'hidden applied adapter': (w) => { + w.calls[1].peftComponentAdapterNames = { transformer: ['hidden'] }; + }, + 'wrong actual placement': (w) => { + w.calls[1].componentRuntimePolicies.transformer.offloadMode = 'group_disk'; + }, + 'missing applied attention': (w) => { + w.calls[1].componentRuntimePolicies.transformer.applied = {}; + }, + 'contradictory requested VAE flags': (w) => { + w.calls[2].componentRuntimePolicies.vae.requested = { vae_slicing: false, vae_tiling: true }; + }, + 'wrong actual guider': (w) => { + w.calls[0].guider.config.guidance_scale = 2.5; + }, + 'missing scheduler step': (w) => { + w.journal = w.journal.filter((e) => e.event !== 'schedulerStepReturned' || e.stepIndex !== 2); + }, + 'invented zero initial scheduler index': (w) => { + w.journal.find((e) => e.event === 'schedulerStepStarted').stepIndex = 0; + }, + 'different immutable model': (w) => { + w.models[0].selectedRevision = 'b'.repeat(40); + }, + 'different source file count': (w) => { + w.task.runtimeFingerprint.backendSource.fileCount = 2; + }, + 'library ownership changed': (w) => { + w.derived.actualDiffusersDirectUrl.value.url = 'https://example.invalid/diffusers.git'; + }, + 'original output snapshot contradicts request': (w) => { + w.output.apiGraphSnapshot = { sid: 'other-session' }; + }, + 'observer installed after run': (w) => { + w.observer.installedAt = new Date((w.task.completed_at + 1) * 1000).toISOString(); + }, + 'native call outside task interval': (w) => { + w.calls[1].at = new Date((w.task.started_at - 1) * 1000).toISOString(); + }, + }; + for (const [name, mutate] of Object.entries(mutations)) + await t.test(name, () => { + const w = witness(); + mutate(w); + const c = context(w); + assert.notEqual(executionPlanIdentity(w.graph, c).plan.source, SOURCE); + }); +}); + +test('retained native records cannot be mixed with a different accounting proof route', () => { + assert.throws( + () => createRunProvenance({ canonicalAccountingProof: {}, retainedNativeEvidence: {} }), + /must be reviewed separately/u, + ); +}); + +test('missing or damaged records do not fall through to a fabricated manual candidate', () => { + for (const mutate of [ + (c) => { + delete c.retainedNativeEvidence; + }, + (c) => { + delete c.retainedNativeEvidence.responses; + }, + (c) => { + c.retainedNativeEvidence.requests.text += ' '; + }, + ]) { + const w = witness(), + c = context(w); + mutate(c); + const plan = executionPlanIdentity(w.graph, c).plan; + assert.notEqual(plan.source, SOURCE); + assert.equal(executionReceiptIdentity(w.task, plan).resourceCandidateId, null); + } + const w = witness(), + plan = executionPlanIdentity(w.graph, context(w)).plan; + plan.resourceObservation.historicalLimits.independentMemoryMonitoring = true; + assert.equal(observedRetainedExpertTextResourceId(plan), null); + assert.equal(executionReceiptIdentity(w.task, plan).resourceCandidateId, null); +}); + +test('retained text resource identity excludes creative content while keeping its record proof distinct', () => { + const a = witness(), + b = witness(); + b.output.formSnapshot.prompt = 'A different fictional workshop.'; + b.graph.nodes.encode.params.prompt.value = b.output.formSnapshot.prompt; + b.output.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'encode').fields.prompt.value = + b.output.formSnapshot.prompt; + b.calls[0].callInputs.prompt = b.output.formSnapshot.prompt; + b.output.formSnapshot.seed = 99; + b.graph.nodes.denoise.params.seed.value = 99; + b.output.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'denoise').fields.seed.value = 99; + b.calls[1].generator.initialSeed = 99; + const left = executionPlanIdentity(a.graph, context(a)), + right = executionPlanIdentity(b.graph, context(b)); + assert.equal(left.plan.source, SOURCE); + assert.equal(right.plan.source, SOURCE); + assert.equal(observedRetainedExpertTextResourceId(left.plan), observedRetainedExpertTextResourceId(right.plan)); + assert.notEqual(left.hash, right.hash); +}); + +function publicProof(w, c, plan) { + return { + taskId: w.task.task_id, + graph: { canonicalGraph: canonicalizeApiGraph(w.graph) }, + runtime: { backendSource: w.source, backendContract: c.backendContract }, + template: { lockedSettings: structuredClone(w.output.formSnapshot) }, + models: { items: w.models }, + inputs: { items: [] }, + output: { items: [{ mediaType: 'image', width: 64, height: 64 }] }, + execution: { resourceCandidateId: observedRetainedExpertTextResourceId(plan) }, + }; +} + +test('rehashed projections remain bound to the canonical source, owner, model and output', async (t) => { + const w = witness(), + c = context(w), + plan = executionPlanIdentity(w.graph, c).plan; + const p = publicProof(w, c, plan); + assert.equal(observedRetainedExpertTextProofMatches(plan, p), true); + for (const [name, mutate] of Object.entries({ + 'decoder port': (x) => { + x.graph.canonicalGraph.nodes.find((n) => n.action === 'DecodeLatents').params.width.sourceKey = 'wrong'; + }, + 'model pin': (x) => { + x.models.items[0].selectedRevision = 'b'.repeat(40); + }, + 'output geometry': (x) => { + x.output.items[0].width = 128; + }, + 'extra output': (x) => { + x.output.items.push({ ...x.output.items[0] }); + }, + 'external input': (x) => { + x.inputs.items.push({ role: 'referenceImages[0]' }); + }, + 'source fingerprint': (x) => { + x.runtime.backendSource.fingerprint = 'sha256:backend-source-v1:' + 'd'.repeat(64); + }, + 'old contract gains absent port': (x) => { + x.runtime.backendContract.contracts.find((n) => n.key === scope + 'ModelsLoader').params.weight_format = {}; + }, + 'locked step count': (x) => { + x.template.lockedSettings.steps = 3; + }, + })) + await t.test(name, () => { + const changed = structuredClone(p); + mutate(changed); + assert.equal(observedRetainedExpertTextProofMatches(plan, changed), false); + }); + for (const mutate of [ + (x) => { + x.resourceObservation.recipe.absentLoaderControls = []; + }, + (x) => { + x.resourceObservation.upstreamLibrary.url = 'https://example.invalid/'; + }, + (x) => { + x.resourceObservation.rawRecordHashes.extra = 'a'.repeat(64); + }, + (x) => { + x.resourceObservation.extra = 'x'.repeat(65537); + }, + (x) => { + x.self = x; + }, + ]) { + const changed = structuredClone(plan); + mutate(changed); + assert.equal(observedRetainedExpertTextResourceId(changed), null); + } +}); + +test('unrelated journal failures stay outside the selected task and Expert records never become Auto', () => { + const w = witness(); + w.journal.push({ event: 'officialCallFailed', task: { task_id: 'unrelated-task' } }); + assert.equal(executionPlanIdentity(w.graph, context(w)).plan.source, SOURCE); + w.output.formSnapshot.resourceMode = 'auto'; + w.task.runtimePreparation.resourceMode = 'auto'; + assert.notEqual(executionPlanIdentity(w.graph, context(w)).plan.source, SOURCE); +}); + +test('retained execution controls cannot be changed together in the graph and public settings', async (t) => { + const w = witness(), + c = context(w), + plan = executionPlanIdentity(w.graph, c).plan; + for (const [name, change] of Object.entries({ + prompt: (p) => { + p.template.lockedSettings.prompt = 'Changed scene'; + p.graph.canonicalGraph.nodes.find((n) => n.action === 'EncodePrompt').params.prompt.value = 'Changed scene'; + }, + seed: (p) => { + p.template.lockedSettings.seed = 27; + p.graph.canonicalGraph.nodes.find((n) => n.action === 'Denoise').params.seed.value = 27; + }, + VAE: (p) => { + p.graph.canonicalGraph.nodes.find((n) => n.action === 'ModelsLoader').params.vae_tiling.value = false; + }, + })) + await t.test(name, () => { + const p = publicProof(w, c, plan); + change(p); + assert.equal(observedRetainedExpertTextProofMatches(plan, p), false); + }); +}); diff --git a/scripts/retained-native-text-resource.mjs b/scripts/retained-native-text-resource.mjs new file mode 100644 index 00000000..42fc2525 --- /dev/null +++ b/scripts/retained-native-text-resource.mjs @@ -0,0 +1,640 @@ +// Maintainer evidence only. Preserved native records never grant execution or fit. +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { canonicalJsonHash, stableJsonValue } from './canonical-json.mjs'; +import { assertFiniteObservedJson } from './observed-workflow-auto-resource.mjs'; + +const same = (a, b) => assert.deepEqual(stableJsonValue(a), stableJsonValue(b)); +const sha = (text) => createHash('sha256').update(text, 'utf8').digest('hex'); +export const OBSERVED_RETAINED_EXPERT_TEXT_SOURCE = 'observed-retained-expert-text-resource-v1'; +const prefix = 'modules.ModularDiffusers.'; +const scopes = ['ModelsLoader', 'Guider', 'EncodePrompt', 'Denoise', 'DecodeLatents'] + .map((a) => prefix + a) + .concat('modules.Image.Preview'); +const absent = ['weight_format', 'weight_loading_mode']; + +function project(entries, paths, form) { + assert.equal(form.mode, 'text_to_image'); + assert.equal(form.resourceMode, 'expert'); + assert.equal(form.dtype, 'bfloat16'); + assert.equal(form.quantizationMode, 'none'); + if (Object.hasOwn(form, 'trustRemoteCode')) assert.equal(form.trustRemoteCode, false); + for (const key of ['weightFormat', 'weightLoadingMode']) assert(!Object.hasOwn(form, key)); + assert.equal(entries.length, 6); + assert.equal(paths.length, 1); + same([...paths[0]].sort(), entries.map(([id]) => id).sort()); + assert.equal(new Set(paths[0]).size, 6); + const roles = new Map(entries.map(([id, n]) => [n.module + '.' + n.action, { id, node: n }])); + same([...roles.keys()].sort(), [...scopes].sort()); + const role = (action) => roles.get(prefix + action); + const lit = (action, field) => { + const p = role(action).node.params[field]; + assert(p && !p.sourceId && !p.sourceKey, action + '.' + field); + return p.value; + }; + const owner = role('ModelsLoader'); + for (const field of absent) assert(!Object.hasOwn(owner.node.params, field)); + const modelType = lit('ModelsLoader', 'model_type'); + assert.equal(typeof modelType, 'string'); + const repo = lit('ModelsLoader', 'repo_id'); + assert.equal(repo?.source, 'hub'); + assert.match(repo.value, /^[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*$/u); + const revision = lit('ModelsLoader', 'revision'); + assert.match(revision, /^[a-f0-9]{40}$/u); + for (const [field, expected] of Object.entries({ + dtype: 'bfloat16', + device: 'cuda:0', + offload_mode: 'group_cpu', + auto_offload: true, + attention_backend: 'auto', + trust_remote_code: false, + })) + same(lit('ModelsLoader', field), expected); + assert(['', 'text2image'].includes(lit('ModelsLoader', 'workflow_id'))); + for (const field of [ + 'quant_config', + 'unet', + 'vae', + 'controlnet', + 'lora_list', + 'text_encoders', + 'pipeline_components', + 'image_encoder', + ]) { + const p = owner.node.params[field]; + assert(!p?.sourceId && !p?.sourceKey && p?.value == null); + } + for (const field of ['vae_slicing', 'vae_tiling']) assert.equal(typeof lit('ModelsLoader', field), 'boolean'); + if (Object.hasOwn(form, 'device')) same(form.device, lit('ModelsLoader', 'device')); + same(form.offloadMode, lit('ModelsLoader', 'offload_mode')); + same(form.autoOffload, lit('ModelsLoader', 'auto_offload')); + for (const field of ['width', 'height', 'steps', 'maxSequenceLength']) + assert(Number.isSafeInteger(form[field]) && form[field] > 0 && form[field] <= 4096); + assert(Number.isSafeInteger(form.seed) && form.seed >= 0 && form.seed < 2 ** 32 && form.randomSeed === false); + assert(Number.isFinite(form.guidanceScale) && form.guidanceScale >= 0 && form.guidanceScale <= 100); + for (const [field, key] of [ + ['width', 'width'], + ['height', 'height'], + ['seed', 'seed'], + ['num_inference_steps', 'steps'], + ['guidance_scale', 'guidanceScale'], + ]) + same(lit('Denoise', field), form[key]); + assert( + role('Denoise').node.params.image_latents?.value == null && !role('Denoise').node.params.image_latents?.sourceId, + ); + for (const [field, key] of [ + ['prompt', 'prompt'], + ['negative_prompt', 'negativePrompt'], + ['max_sequence_length', 'maxSequenceLength'], + ]) + same(lit('EncodePrompt', field), form[key]); + const guide = Object.fromEntries( + 'model_type guider guidance_scale guidance_rescale use_original_formulation enabled start stop' + .split(' ') + .map((key) => [key, lit('Guider', key)]), + ); + same(guide, { + model_type: modelType, + guider: 'ClassifierFreeGuidance', + guidance_scale: form.guidanceScale, + guidance_rescale: 0, + use_original_formulation: false, + enabled: true, + start: 0, + stop: 1, + }); + const allowed = new Set(); + for (const [target, field, supplier, port] of [ + ['EncodePrompt', 'text_encoders', 'ModelsLoader', 'text_encoders'], + ['EncodePrompt', 'guider', 'Guider', 'guider_out'], + ['Denoise', 'unet', 'ModelsLoader', 'unet_out'], + ['Denoise', 'scheduler', 'ModelsLoader', 'scheduler'], + ['Denoise', 'embeddings', 'EncodePrompt', 'embeddings'], + ['Denoise', 'guider', 'Guider', 'guider_out'], + ['DecodeLatents', 'vae', 'ModelsLoader', 'vae_out'], + ['DecodeLatents', 'latents', 'Denoise', 'latents'], + ['DecodeLatents', 'width', 'Denoise', 'out_width'], + ['DecodeLatents', 'height', 'Denoise', 'out_height'], + ]) { + const t = role(target), + s = role(supplier), + p = t.node.params[field]; + same({ sourceId: p?.sourceId, sourceKey: p?.sourceKey }, { sourceId: s.id, sourceKey: port }); + if (Object.hasOwn(p, 'value')) { + assert(target === 'DecodeLatents' && ['width', 'height'].includes(field)); + same(p.value, form[field]); + } + assert(paths[0].indexOf(s.id) < paths[0].indexOf(t.id)); + allowed.add(t.id + ':' + field); + } + const preview = roles.get('modules.Image.Preview'), + decode = role('DecodeLatents'); + same(preview.node.params.device, { value: 'cpu:0' }); + same( + { sourceId: preview.node.params.image?.sourceId, sourceKey: preview.node.params.image?.sourceKey }, + { sourceId: decode.id, sourceKey: 'images' }, + ); + allowed.add(preview.id + ':image'); + for (const [id, node] of entries) + for (const [key, p] of Object.entries(node.params)) if (p.sourceId) assert(allowed.has(id + ':' + key)); + return { + roles, + role, + lit, + guide, + preview, + executedControlsHash: canonicalJsonHash({ + prompt: lit('EncodePrompt', 'prompt'), + negativePrompt: lit('EncodePrompt', 'negative_prompt'), + maxSequenceLength: lit('EncodePrompt', 'max_sequence_length'), + seed: lit('Denoise', 'seed'), + steps: lit('Denoise', 'num_inference_steps'), + guidanceScale: lit('Denoise', 'guidance_scale'), + strength: lit('Denoise', 'strength'), + vaeSlicing: lit('ModelsLoader', 'vae_slicing'), + vaeTiling: lit('ModelsLoader', 'vae_tiling'), + }), + recipe: { + modelType, + repository: repo.value, + revision, + dtype: 'bfloat16', + device: 'cuda:0', + offloadMode: 'group_cpu', + autoOffload: true, + originalLoaderWorkflowId: lit('ModelsLoader', 'workflow_id'), + geometry: { width: form.width, height: form.height }, + absentLoaderControls: absent, + }, + }; +} + +function deriveRetainedTextPlan(api, context) { + const { + executionReceipt: task, + executedOutput: output, + backendSource: source, + backendContract: contract, + modelIdentities: models, + retainedNativeEvidence: records, + } = context; + assert.equal(output.formSnapshot.trustRemoteCode, false); + if (context.taskId !== undefined) assert.equal(context.taskId, task.task_id); + let total = 0; + const read = (name) => { + const r = records[name]; + assert(r && typeof r.text === 'string'); + const length = Buffer.byteLength(r.text); + total += length; + assert(length <= 16 * 1024 ** 2 && total <= 48 * 1024 ** 2); + assert.equal(sha(r.text), r.sha256); + return name === 'journal' + ? r.text + .trim() + .split('\n') + .map((line) => JSON.parse(line)) + : JSON.parse(r.text); + }; + const original = read('receipt'), + requests = read('requests'), + responses = read('responses'); + const derived = read('derived'), + journal = read('journal'), + observer = read('observer'); + same(original.task, task); + assert.equal(original.outputs.length, 1); + same(original.outputs[0], output); + assert.equal(task.status, 'completed'); + assert.equal(task.attempt_index, 0); + assert.equal(output.attemptIndex, 0); + assert.equal(task.resourceCandidateId, null); + for (const [key, expected] of Object.entries({ + resourceMode: 'expert', + performed: false, + residentRecipeReusable: false, + cleanup: null, + })) + same(task.runtimePreparation[key], expected); + const graphRequests = requests.filter((r) => r.path === '/graph'); + assert.equal(graphRequests.length, 1); + same(graphRequests[0].body, api); + const graphResponses = responses.filter((r) => r.path === '/graph'); + assert.equal(graphResponses.length, 1); + assert.equal(graphResponses[0].status, 200); + assert.equal(graphResponses[0].body.error, false); + assert.equal(graphResponses[0].body.task_id, task.task_id); + assert.equal(graphResponses[0].body.sid, api.sid); + assert( + Date.parse(graphRequests[0].at) <= task.started_at * 1000 && + Date.parse(graphResponses[0].at) <= task.completed_at * 1000, + ); + if (Object.hasOwn(output, 'apiGraphSnapshot')) same(output.apiGraphSnapshot, api); + assert(!Object.hasOwn(api.runtimeHints, 'resourceMode') && !Object.hasOwn(api, 'loops')); + for (const [hint, tk, ok] of [ + ['sid', 'sid', 'sid'], + ['workflowTabId', 'workflow_tab_id', 'workflowTabId'], + ['clientRunId', 'client_run_id', 'clientRunId'], + ['runInputHash', 'run_input_hash', 'runInputHash'], + ]) { + const v = hint === 'sid' ? api.sid : api.runtimeHints[hint]; + assert(typeof v === 'string' && v); + same(task[tk], v); + same(output[ok], v); + } + same(task.workflow_snapshot, api.runtimeHints.workflowSnapshot); + same(output.formSnapshot, task.workflow_snapshot.studioForm); + const form = output.formSnapshot, + p = project(Object.entries(api.nodes), api.paths, form); + const authoredOwners = task.workflow_snapshot.nodes.filter( + (n) => + n.id === p.role('ModelsLoader').id && + !n.data?.blockProjectionOwnerId && + n.data?.module === 'modules.ModularDiffusers' && + n.data?.action === 'ModelsLoader', + ); + assert.equal(authoredOwners.length, 1); + const authored = authoredOwners[0].data; + assert.equal(authored.operationAuthoring?.schemaVersion, 1); + assert.equal(authored.operationAuthoring.operation?.pipelineClass, p.recipe.modelType); + assert.equal(authored.operationAuthoring.operation.task, 'text_to_image'); + assert.equal(authored.operationAuthoring.operation.nodeKey, prefix + 'ModelsLoader'); + assert.equal(authored.operationAuthoring.operation.binding?.pipelineClass, p.recipe.modelType); + assert.equal(authored.operationAuthoring.operation.binding.values?.model_type, p.recipe.modelType); + assert.equal(authored.params.model_type?.value, p.recipe.modelType); + assert(!authored.params.model_type?.sourceId && !authored.params.model_type?.sourceKey); + assert.equal(output.taskId, task.task_id); + assert.equal(output.nodeId, p.preview.id); + assert.equal(source.fingerprint, task.runtimeFingerprint.backendSource.fingerprint); + assert.equal(source.files.length, task.runtimeFingerprint.backendSource.fileCount); + same(source.gitCommit, task.runtimeFingerprint.backendSource.gitCommit); + assert.equal( + source.fingerprint, + 'sha256:backend-source-v1:' + canonicalJsonHash({ gitCommit: source.gitCommit, files: source.files }), + ); + assert.match(contract.fingerprint, /^sha256:backend-contract-v1:[a-f0-9]{64}$/u); + const ownerContract = contract.contracts.filter((c) => c.key === prefix + 'ModelsLoader'); + assert.equal(ownerContract.length, 1); + for (const key of absent) assert(!Object.hasOwn(ownerContract[0].params, key)); + const receipt = output.resolvedExecutionInputs; + assert.equal(receipt.schemaVersion, 1); + assert.equal(receipt.source, 'backend-execution'); + assert.equal(receipt.taskId, task.task_id); + assert.equal(receipt.attemptIndex, 0); + assert.equal(receipt.nodeId, output.nodeId); + assert.equal(receipt.truncated, false); + same(receipt.uncapturedNodeIds, []); + assert.equal(receipt.nodes.length, 6); + const captured = new Map(receipt.nodes.map((r) => [r.nodeId, r])); + assert.equal(captured.size, 6); + for (const [id, node] of Object.entries(api.nodes)) { + assert.equal(captured.get(id).module, node.module); + assert.equal(captured.get(id).action, node.action); + same(captured.get(id).omittedFields, {}); + } + same(receipt.graphTasks, [ + { loaderId: p.role('ModelsLoader').id, pipelineClass: p.recipe.modelType, task: 'text_to_image' }, + ]); + const ownerRow = captured.get(p.role('ModelsLoader').id); + for (const key of absent) assert(!Object.hasOwn(ownerRow.fields, key)); + const consumed = (action, field, value) => { + const f = captured.get(p.role(action).id).fields[field]; + assert.equal(f.source, 'literal'); + same(f.value, value); + }; + same(captured.get(p.preview.id).fields.device, { source: 'literal', value: 'cpu:0' }); + for (const field of 'model_type repo_id revision dtype device auto_offload offload_mode quant_config attention_backend vae_slicing vae_tiling'.split( + ' ', + )) + consumed( + 'ModelsLoader', + field, + field === 'repo_id' + ? p.recipe.repository + : field === 'quant_config' && p.lit('ModelsLoader', field) == null + ? null + : p.lit('ModelsLoader', field), + ); + for (const field of ['prompt', 'negative_prompt', 'max_sequence_length']) + consumed('EncodePrompt', field, p.lit('EncodePrompt', field)); + for (const field of Object.keys(p.guide)) consumed('Guider', field, p.guide[field]); + for (const field of 'width height seed num_inference_steps guidance_scale strength'.split(' ')) + consumed('Denoise', field, p.lit('Denoise', field)); + for (const field of ['width', 'height']) { + const f = captured.get(p.role('DecodeLatents').id).fields[field]; + same(f.value, form[field]); + assert.equal(f.source, 'connected'); + assert.equal(f.sourceNodeId, p.role('Denoise').id); + assert.equal(f.sourcePortId, 'out_' + field); + } + assert.equal(derived.taskId, task.task_id); + for (const name of ['receipt', 'requests', 'responses']) + assert.equal( + derived.evidenceHashes[name === 'receipt' ? 'run-receipt.json' : name + '.json'], + records[name].sha256, + ); + const events = journal.filter((e) => e.task?.task_id === task.task_id), + calls = events.filter((e) => e.event === 'officialCallStarted'); + same(calls, derived.actualOfficialCalls); + assert.equal(calls.length, 3); + assert(!events.some((e) => e.event === 'officialCallFailed')); + const roleNames = ['EncodePrompt', 'Denoise', 'DecodeLatents']; + assert.equal(new Set(calls.map((call) => call.callId)).size, 3); + for (const [i, call] of calls.entries()) { + assert.match(call.callId, /^[a-f0-9]{32}$/u); + assert.equal(call.task.current_node, p.role(roleNames[i]).id); + assert.equal(call.task.current_node_name, prefix + roleNames[i]); + assert.equal(call.task.attempt_index, 0); + assert( + call.actualPipelineClass.startsWith('diffusers.modular_pipelines.') && + call.actualPipelineClass.endsWith('.' + p.recipe.modelType), + ); + assert.equal(call.pipelineClass, 'diffusers.modular_pipelines.modular_pipeline.ModularPipeline'); + const returned = events.filter((e) => e.event === 'officialCallReturned' && e.callId === call.callId); + assert.equal(returned.length, 1); + same(returned[0].task, call.task); + assert(Date.parse(returned[0].at) >= Date.parse(call.at)); + assert(Date.parse(call.at) >= task.started_at * 1000 && Date.parse(returned[0].at) <= task.completed_at * 1000); + if (i === 2) same(returned[0].images, [{ mode: 'RGB', size: [form.width, form.height] }]); + same(call.peftComponentAdapterNames, {}); + same(call.peftLayerScaleHistograms, {}); + same(call.wholePipelineAdapterScales, null); + const components = i === 0 ? ['text_encoder', 'text_encoder_2'] : i === 1 ? ['transformer'] : ['vae']; + for (const c of components) { + const policy = call.componentRuntimePolicies[c]; + assert.equal(policy.offloadMode, p.recipe.offloadMode); + assert.equal(policy.executionDevice, p.recipe.device); + const expected = + i === 0 + ? {} + : i === 1 + ? { attention_backend: 'auto' } + : { vae_slicing: p.lit('ModelsLoader', 'vae_slicing'), vae_tiling: p.lit('ModelsLoader', 'vae_tiling') }; + same(policy.applied, expected); + same(policy.requested, expected); + } + } + const denoise = calls[1]; + same(denoise.generator, { device: p.recipe.device, initialSeed: form.seed, type: 'Generator' }); + for (const [key, expected] of Object.entries({ + width: form.width, + height: form.height, + num_inference_steps: form.steps, + guidance_scale: form.guidanceScale, + })) + same(denoise.callInputs[key], expected); + for (const [key, expected] of Object.entries({ + prompt: form.prompt, + negative_prompt: form.negativePrompt, + max_sequence_length: form.maxSequenceLength, + })) + same(calls[0].callInputs[key], expected); + const expectedGuide = Object.fromEntries( + Object.entries(p.guide).filter(([key]) => !['model_type', 'guider'].includes(key)), + ); + for (const call of calls.slice(0, 2)) { + assert.equal(call.guider.class, 'diffusers.guiders.classifier_free_guidance.ClassifierFreeGuidance'); + same(call.guider.config, expectedGuide); + } + same(calls[2].vaeMemoryFlags, { + use_slicing: p.lit('ModelsLoader', 'vae_slicing'), + use_tiling: p.lit('ModelsLoader', 'vae_tiling'), + }); + assert.equal( + denoise.scheduler.class, + 'diffusers.schedulers.scheduling_flow_match_euler_discrete.FlowMatchEulerDiscreteScheduler', + ); + const schedStarted = events.filter((e) => e.event === 'schedulerStepStarted'); + const sched = events.filter((e) => e.event === 'schedulerStepReturned'); + assert.equal(schedStarted.length, form.steps); + assert.equal(sched.length, form.steps); + // The original scheduler initializes its index inside the first call and + // increments it before returning. Preserve both actual conventions. + same( + schedStarted.map((e) => e.stepIndex), + [null, ...Array.from({ length: form.steps - 1 }, (_, i) => i + 1)], + ); + same( + sched.map((e) => e.stepIndex), + Array.from({ length: form.steps }, (_, i) => i + 1), + ); + const denoiseReturned = events.find((e) => e.event === 'officialCallReturned' && e.callId === denoise.callId); + for (const [i, started] of schedStarted.entries()) { + same(started.task, denoise.task); + same(sched[i].task, denoise.task); + assert(Date.parse(started.at) >= Date.parse(denoise.at)); + assert(Date.parse(started.at) <= Date.parse(sched[i].at)); + assert(Date.parse(sched[i].at) <= Date.parse(denoiseReturned.at)); + if (i) assert(Date.parse(started.at) >= Date.parse(sched[i - 1].at)); + } + assert(Date.parse(observer.installedAt) <= task.started_at * 1000); + assert.match(observer.observerSha256, /^[a-f0-9]{64}$/u); + assert(observer.wrappedCalls.some((x) => x.kind === 'officialPipelineCall' && x.class === calls[0].pipelineClass)); + assert.equal(derived.actualDiffusersDirectUrl.value.url, 'https://github.com/huggingface/diffusers.git'); + assert.match(derived.actualDiffusersDirectUrl.value.vcs_info.commit_id, /^[a-f0-9]{40}$/u); + assert.equal(models.length, 1); + assert.equal(models[0].repoId, p.recipe.repository); + assert.equal(models[0].selectedRevision, p.recipe.revision); + assert.equal(models[0].modelRevision, p.recipe.repository + '@' + p.recipe.revision); + assert(models[0].fingerprint); + assert.equal(output.mediaItems.length, 1); + same(output.mediaItems[0].width, form.width); + same(output.mediaItems[0].height, form.height); + const observation = { + schemaVersion: 1, + recipe: p.recipe, + formModelType: form.modelType, + executedControlsHash: p.executedControlsHash, + actualScheduler: denoise.scheduler, + actualGuider: expectedGuide, + backendSourceFingerprint: source.fingerprint, + backendContractFingerprint: contract.fingerprint, + taskId: task.task_id, + outputGraphSnapshotOriginallyPresent: Object.hasOwn(output, 'apiGraphSnapshot'), + rawRecordHashes: Object.fromEntries(Object.entries(records).map(([name, r]) => [name, r.sha256])), + rawOfficialCalls: 3, + rawSchedulerSteps: sched.length, + upstreamLibrary: { + url: derived.actualDiffusersDirectUrl.value.url, + commit: derived.actualDiffusersDirectUrl.value.vcs_info.commit_id, + }, + historicalLimits: { + independentMemoryMonitoring: false, + originalTimeInstalledInventory: false, + unrecordedLoadingControlsReconstructed: false, + residencyOrHardwareFitClaimed: false, + }, + }; + const plan = { + source: OBSERVED_RETAINED_EXPERT_TEXT_SOURCE, + modelType: p.recipe.modelType, + pipelineClass: p.recipe.modelType, + modelRepo: p.recipe.repository, + modelRevision: p.recipe.revision, + dtype: p.recipe.dtype, + device: p.recipe.device, + offloadMode: p.recipe.offloadMode, + autoOffload: p.recipe.autoOffload, + resourceMode: 'expert', + resolvedResourceMode: 'expert', + quantizationMode: 'none', + quantizedComponents: [], + resourceObservation: observation, + }; + assert(observedRetainedExpertTextResourceId(plan)); + return plan; +} + +export function observedRetainedExpertTextPlan(api, context) { + try { + return deriveRetainedTextPlan(api, context); + } catch { + return null; + } +} + +export function observedRetainedExpertTextResourceId(plan) { + try { + assert.equal(plan?.source, OBSERVED_RETAINED_EXPERT_TEXT_SOURCE); + assertFiniteObservedJson(plan); + assert(Buffer.byteLength(JSON.stringify(plan)) <= 65536); + same( + Object.keys(plan).sort(), + 'source modelType pipelineClass modelRepo modelRevision dtype device offloadMode autoOffload resourceMode resolvedResourceMode quantizationMode quantizedComponents resourceObservation' + .split(' ') + .sort(), + ); + const o = plan.resourceObservation, + r = o.recipe; + same( + Object.keys(o).sort(), + 'schemaVersion recipe formModelType executedControlsHash actualScheduler actualGuider backendSourceFingerprint backendContractFingerprint taskId outputGraphSnapshotOriginallyPresent rawRecordHashes rawOfficialCalls rawSchedulerSteps upstreamLibrary historicalLimits' + .split(' ') + .sort(), + ); + same( + Object.keys(r).sort(), + 'modelType repository revision dtype device offloadMode autoOffload originalLoaderWorkflowId geometry absentLoaderControls' + .split(' ') + .sort(), + ); + assert.equal(o.schemaVersion, 1); + assert(typeof o.formModelType === 'string' && o.formModelType.length > 0 && o.formModelType.length <= 256); + assert.match(o.executedControlsHash, /^[a-f0-9]{64}$/u); + assert(typeof o.taskId === 'string' && o.taskId.length > 0 && o.taskId.length <= 128); + assert.equal(typeof o.outputGraphSnapshotOriginallyPresent, 'boolean'); + assert.equal(r.dtype, 'bfloat16'); + assert.equal(r.device, 'cuda:0'); + assert.equal(r.offloadMode, 'group_cpu'); + assert.equal(r.autoOffload, true); + assert(typeof r.modelType === 'string' && r.modelType.length > 0 && r.modelType.length <= 256); + assert.match(r.repository, /^[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*$/u); + assert.match(r.revision, /^[a-f0-9]{40}$/u); + assert(['', 'text2image'].includes(r.originalLoaderWorkflowId)); + same(r.absentLoaderControls, absent); + same(Object.keys(r.geometry).sort(), ['height', 'width']); + for (const n of Object.values(r.geometry)) assert(Number.isSafeInteger(n) && n > 0 && n <= 4096); + for (const [key, recipeKey] of Object.entries({ + modelType: 'modelType', + pipelineClass: 'modelType', + modelRepo: 'repository', + modelRevision: 'revision', + dtype: 'dtype', + device: 'device', + offloadMode: 'offloadMode', + autoOffload: 'autoOffload', + })) + same(plan[key], r[recipeKey]); + assert.equal(plan.resourceMode, 'expert'); + assert.equal(plan.resolvedResourceMode, 'expert'); + assert.equal(plan.quantizationMode, 'none'); + same(plan.quantizedComponents, []); + assert.match(o.backendSourceFingerprint, /^sha256:backend-source-v1:[a-f0-9]{64}$/u); + assert.match(o.backendContractFingerprint, /^sha256:backend-contract-v1:[a-f0-9]{64}$/u); + same(Object.keys(o.rawRecordHashes).sort(), ['derived', 'journal', 'observer', 'receipt', 'requests', 'responses']); + for (const hash of Object.values(o.rawRecordHashes)) assert.match(hash, /^[a-f0-9]{64}$/u); + assert.equal(o.rawOfficialCalls, 3); + assert(Number.isSafeInteger(o.rawSchedulerSteps) && o.rawSchedulerSteps > 0 && o.rawSchedulerSteps <= 4096); + same(o.historicalLimits, { + independentMemoryMonitoring: false, + originalTimeInstalledInventory: false, + unrecordedLoadingControlsReconstructed: false, + residencyOrHardwareFitClaimed: false, + }); + same(Object.keys(o.upstreamLibrary).sort(), ['commit', 'url']); + assert.equal(o.upstreamLibrary.url, 'https://github.com/huggingface/diffusers.git'); + assert.match(o.upstreamLibrary.commit, /^[a-f0-9]{40}$/u); + assert.equal( + o.actualScheduler.class, + 'diffusers.schedulers.scheduling_flow_match_euler_discrete.FlowMatchEulerDiscreteScheduler', + ); + same( + Object.keys(o.actualGuider).sort(), + 'guidance_scale guidance_rescale use_original_formulation enabled start stop'.split(' ').sort(), + ); + same( + { ...o.actualGuider, guidance_scale: 0 }, + { guidance_scale: 0, guidance_rescale: 0, use_original_formulation: false, enabled: true, start: 0, stop: 1 }, + ); + assert( + Number.isFinite(o.actualGuider.guidance_scale) && + o.actualGuider.guidance_scale >= 0 && + o.actualGuider.guidance_scale <= 100, + ); + return ( + 'observed-retained-expert-text-v1:' + + canonicalJsonHash({ + recipe: r, + actualScheduler: o.actualScheduler, + actualGuider: o.actualGuider, + backendSourceFingerprint: o.backendSourceFingerprint, + backendContractFingerprint: o.backendContractFingerprint, + upstreamLibrary: o.upstreamLibrary, + }) + ); + } catch { + return null; + } +} + +export function observedRetainedExpertTextProofMatches(plan, provenance) { + try { + assert(observedRetainedExpertTextResourceId(plan)); + const o = plan.resourceObservation, + graph = provenance.graph.canonicalGraph; + const p = project( + graph.nodes.map((node) => [node.key, node]), + graph.paths, + provenance.template.lockedSettings, + ); + same(p.recipe, o.recipe); + same(p.executedControlsHash, o.executedControlsHash); + same(provenance.template.lockedSettings.modelType, o.formModelType); + same( + Object.fromEntries(Object.entries(p.guide).filter(([key]) => !['model_type', 'guider'].includes(key))), + o.actualGuider, + ); + same(provenance.template.lockedSettings.steps, o.rawSchedulerSteps); + same(provenance.taskId, o.taskId); + same(o.backendSourceFingerprint, provenance.runtime.backendSource.fingerprint); + same(o.backendContractFingerprint, provenance.runtime.backendContract.fingerprint); + const ownerContracts = provenance.runtime.backendContract.contracts.filter( + (x) => x.key === prefix + 'ModelsLoader', + ); + assert.equal(ownerContracts.length, 1); + for (const key of absent) assert(!Object.hasOwn(ownerContracts[0].params, key)); + assert.equal(provenance.models.items.length, 1); + const model = provenance.models.items[0]; + same(model.repoId, p.recipe.repository); + same(model.selectedRevision, p.recipe.revision); + assert.equal(provenance.inputs.items.length, 0); + assert.equal(provenance.output.items.length, 1); + const media = provenance.output.items[0]; + assert.equal(media.mediaType, 'image'); + same(media.width, p.recipe.geometry.width); + same(media.height, p.recipe.geometry.height); + return true; + } catch { + return false; + } +} diff --git a/scripts/retained-speech-gallery-evidence.mjs b/scripts/retained-speech-gallery-evidence.mjs new file mode 100644 index 00000000..b1e2b009 --- /dev/null +++ b/scripts/retained-speech-gallery-evidence.mjs @@ -0,0 +1,168 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { canonicalJsonHash } from './canonical-json.mjs'; +import { backendContractIdentity, canonicalGraphIdentity } from './live-proof-provenance.mjs'; +import { MAX_SPEECH_TRANSCRIPT_BYTES, MAX_SPEECH_WAV_BYTES, speechRoute } from './private-speech-evidence.mjs'; +import { readCanonicalEvidenceFile } from './release-contract-core.mjs'; + +const digest = (bytes) => createHash('sha256').update(bytes).digest('hex'); + +const retainedSpeechTemplates = new Map([ + [ + 'whisper_small_an_open_door', + { + workflowId: 'HuggingFaceSpeechRecognitionModel:speech_translation', + sourceTaskTemplateId: 'task-template:whisper-tiny:speech-translation:v1', + }, + ], + [ + 'whisper_tiny_blue_cup_transcription', + { + workflowId: 'HuggingFaceSpeechRecognitionModel:speech_to_text', + sourceTaskTemplateId: 'task-template:whisper-tiny:speech-to-text:v1', + }, + ], + [ + 'wav2vec2_station_announcement', + { + workflowId: 'HuggingFaceCTCSpeechRecognitionModel:speech_to_text', + sourceTaskTemplateId: 'task-template:wav2vec2-base-960h:speech-to-text:v1', + }, + ], +]); + +function retainedBackendContract(evidenceRoot, files, graphHash, route) { + const readJson = (ref, maxBytes) => { + const { bytes } = readCanonicalEvidenceFile(evidenceRoot, ref, maxBytes); + return JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(bytes)); + }; + const graph = canonicalGraphIdentity(readJson(files.graphRequest)); + assert.equal(graph.hash, graphHash, 'Retained speech graph differs from the receipt.'); + const capture = readJson(files.capture, 64 * 1024); + const nodes = readJson(capture.nodes); + const { contracts, fingerprint } = backendContractIdentity(nodes, graph.canonicalGraph); + assert.ok( + contracts.length === 4 && contracts.every(({ params }) => Object.keys(params).length > 0), + 'Retained speech graph is missing a native node contract.', + ); + assert.deepEqual( + contracts.map(({ key }) => key).sort(), + [ + 'modules.Audio.Load', + 'modules.HuggingFaceSpeech.' + route.loader, + 'modules.HuggingFaceSpeech.' + route.consumer, + 'modules.Primitive.DataViewer', + ].sort(), + 'Retained speech graph differs from the reviewed node identities.', + ); + return fingerprint; +} + +// The caller has already revalidated the private native speech capture. Bind +// the exact archived WAV and transport to the separate Gallery JSON bytes. +export function verifyRetainedSpeechGalleryEvidence({ recipe, native, galleryOutput, galleryInput }) { + const template = retainedSpeechTemplates.get(recipe.template.id); + assert.ok(template, 'Unsupported retained speech template.'); + assert.equal(recipe.workflowId, template.workflowId, 'Retained speech workflow differs from the reviewed template.'); + assert.equal(recipe.sourceTaskTemplateId, template.sourceTaskTemplateId); + assert.equal(galleryInput, undefined, 'The retained speech audio source stays private.'); + const route = speechRoute(recipe.workflowId); + const mode = route.translation ? 'speech_translation' : 'speech_to_text'; + assert.equal(recipe.template.mode, mode); + assert.equal(recipe.template.modelType, route.modelType); + assert.deepEqual( + recipe.template.modelArtifact, + { source: 'hub', value: route.repo, revision: route.revision }, + 'Retained speech template model pin differs from the reviewed route.', + ); + const { receipt, provenance, evidenceRoot, descriptorBytes } = native; + assert.ok(Buffer.isBuffer(descriptorBytes), 'Retained speech requires the original evidence descriptor.'); + assert.equal(digest(descriptorBytes), recipe.originalReceiptSha256, 'Retained speech evidence descriptor differs.'); + assert.equal(receipt.schemaVersion, 1); + assert.equal(receipt.format, 'modiff.canonical-workflow-run-receipt.v1'); + assert.equal(receipt.proofKind, 'real_backend_input_bound_model_variant'); + assert.equal(receipt.workflowId, recipe.workflowId); + assert.equal(receipt.sourceTemplateId, recipe.sourceTaskTemplateId); + assert.equal(receipt.task, mode); + assert.equal(receipt.modelType, route.modelType); + assert.deepEqual( + receipt.modelSet, + [{ repoId: route.repo, revision: route.revision }], + 'Native speech model pin differs from the reviewed route.', + ); + assert.equal(receipt.graphHash, recipe.retainedGraphHash, 'Native speech graph differs from the reviewed recipe.'); + assert.equal(provenance.format, 'modiff.input-bound-model-variant-proof.v1'); + + const { input, output } = provenance.evidenceFiles; + const binding = receipt.inputBinding; + assert.equal(binding.field, 'file'); + assert.equal(typeof binding.sourceValue, 'string'); + assert.equal( + digest(binding.sourceValue), + recipe.inputLocatorSha256, + 'speech source locator differs from the retained recipe.', + ); + assert.equal(binding.converted, false); + assert.equal(binding.sha256, recipe.inputSha256, 'speech WAV differs from the exact recipe.'); + assert.equal(binding.sha256, input.sha256, 'Archived WAV differs from the native input binding.'); + assert.equal(binding.byteSize, input.bytes); + readCanonicalEvidenceFile(evidenceRoot, input, MAX_SPEECH_WAV_BYTES); + + const { bytes: transportBytes } = readCanonicalEvidenceFile(evidenceRoot, output, MAX_SPEECH_TRANSCRIPT_BYTES); + const sourceOutputHash = 'sha256:bytes:' + output.sha256; + assert.equal(sourceOutputHash, receipt.outputHash, 'Archived speech transport differs from the native run.'); + const text = new TextDecoder('utf-8', { fatal: true }).decode(transportBytes); + assert.ok(Buffer.from(text).equals(transportBytes), 'Native speech transport must use BOM-free UTF-8.'); + const transport = JSON.parse(text); + assert.ok( + Array.isArray(transport) && transport.length === 1 && typeof transport[0] === 'string', + 'Native speech transport must contain one structured result.', + ); + + const { bytes: structuredBytes, ref } = galleryOutput; + assert.ok( + Buffer.isBuffer(structuredBytes) && + structuredBytes.length > 0 && + structuredBytes.length <= MAX_SPEECH_TRANSCRIPT_BYTES, + 'Gallery transcript must be a nonempty bounded file.', + ); + assert.equal(structuredBytes.length, ref.bytes); + assert.equal(digest(structuredBytes), ref.sha256, 'Gallery transcript differs from the approved file.'); + assert.ok(Buffer.from(transport[0]).equals(structuredBytes), 'Gallery transcript must match the exact native JSON.'); + const transcript = JSON.parse(transport[0]); + assert.equal(transcript.schemaVersion, 1); + assert.equal(transcript.task, route.translation ? 'translate' : 'transcribe'); + assert.equal( + transcript.timestampMode, + route.timestamps, + 'Transcript timestamp mode differs from the reviewed route.', + ); + assert.ok(Array.isArray(transcript.segments) && transcript.segments.length > 0); + assert.deepEqual( + receipt.transcriptEvidence, + { + storage: 'native-text-json', + durationSeconds: transcript.durationSeconds, + timestampMode: transcript.timestampMode, + segmentCount: transcript.segments.length, + }, + 'Gallery transcript metadata differs from the verified speech receipt.', + ); + + return { + output: { + mediaType: 'json', + sourceOutputHash, + outputEncodedSha256: 'sha256:bytes:' + ref.sha256, + decodedMediaHash: 'sha256:canonical-json:' + canonicalJsonHash(transcript), + outputBytes: structuredBytes.length, + }, + inputSha256: input.sha256, + backendContractFingerprint: retainedBackendContract( + evidenceRoot, + provenance.evidenceFiles, + receipt.graphHash, + route, + ), + }; +} diff --git a/scripts/retained-speech-gallery-evidence.test.mjs b/scripts/retained-speech-gallery-evidence.test.mjs new file mode 100644 index 00000000..9d74ad34 --- /dev/null +++ b/scripts/retained-speech-gallery-evidence.test.mjs @@ -0,0 +1,296 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { mkdtempSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { test } from 'node:test'; +import { canonicalJsonHash } from './canonical-json.mjs'; +import { backendContractIdentity, canonicalGraphIdentity } from './live-proof-provenance.mjs'; +import { verifyRetainedSpeechGalleryEvidence } from './retained-speech-gallery-evidence.mjs'; + +const hash = (bytes) => createHash('sha256').update(bytes).digest('hex'); +const fileRecord = (path, bytes) => ({ path, bytes: bytes.length, sha256: hash(bytes) }); + +const whisper = { + modelType: 'HuggingFaceSpeechRecognitionModel', + templateId: 'whisper_tiny_blue_cup_transcription', + sourceTask: 'task-template:whisper-tiny:speech-to-text:v1', + repo: 'openai/whisper-tiny', + revision: '169d4a4341b33bc18d8881c4b69c2e104e1cc0af', + loader: 'LoadSpeechRecognitionModel', + consumer: 'TranscribeAudio', + timestamps: 'segment', +}; +const wav2vec = { + modelType: 'HuggingFaceCTCSpeechRecognitionModel', + templateId: 'wav2vec2_station_announcement', + sourceTask: 'task-template:wav2vec2-base-960h:speech-to-text:v1', + repo: 'facebook/wav2vec2-base-960h', + revision: '22aad52d435eb6dbaf354bdad9b0da84ce7d6156', + loader: 'LoadCTCSpeechRecognitionModel', + consumer: 'TranscribeCTCAudio', + timestamps: 'word', +}; + +function fixture(t, route = whisper) { + const evidenceRoot = mkdtempSync(join(tmpdir(), 'modiff-retained-speech-')); + t.after(() => rmSync(evidenceRoot, { recursive: true, force: true })); + const store = (path, bytes) => { + writeFileSync(join(evidenceRoot, path), bytes); + return fileRecord(path, bytes); + }; + const durationSeconds = 2 / 16000; + const transcript = { + schemaVersion: 1, + task: 'transcribe', + text: route === wav2vec ? 'READY' : 'Private verified recording.', + timestampMode: route.timestamps, + durationSeconds, + segments: [{ text: route === wav2vec ? 'READY' : 'Private verified recording.', start: 0, end: durationSeconds }], + }; + const structured = Buffer.from(JSON.stringify(transcript, null, 2)); + const wav = Buffer.from( + '524946462800000057415645666d74201000000001000100803e0000007d000002001000646174610400000000c00040', + 'hex', + ); + const input = store('private.source.wav', wav); + const output = store('native.output.txt', Buffer.from(JSON.stringify([structured.toString('utf8')]))); + const stages = [ + ['modules.Audio', 'Load'], + ['modules.HuggingFaceSpeech', route.loader], + ['modules.HuggingFaceSpeech', route.consumer], + ['modules.Primitive', 'DataViewer'], + ]; + const nodes = Object.fromEntries( + stages.map(([module, action], index) => [ + 'node-' + (index + 1), + { module, action, params: { sample: { value: index } } }, + ]), + ); + const submission = { nodes, paths: [Object.keys(nodes)] }; + const graph = canonicalGraphIdentity(submission); + const registry = { + nodes: Object.fromEntries( + Object.values(nodes).map(({ module, action }) => [ + module + '.' + action, + { module, action, params: { sample: { type: 'int', display: 'number' } } }, + ]), + ), + }; + const storeJson = (path, value) => store(path, Buffer.from(JSON.stringify(value))); + const storeCapture = () => storeJson('capture.json', { nodes: storeJson('nodes.json', registry) }); + const workflowId = route.modelType + ':speech_to_text'; + const descriptorBytes = Buffer.from(JSON.stringify({ schemaVersion: 1, workflowId, graphHash: graph.hash })); + const recipe = { + workflowId, + sourceTaskTemplateId: route.sourceTask, + template: { + id: route.templateId, + modelType: route.modelType, + mode: 'speech_to_text', + modelArtifact: { source: 'hub', value: route.repo, revision: route.revision }, + }, + originalReceiptSha256: hash(descriptorBytes), + retainedGraphHash: graph.hash, + inputLocatorSha256: hash('local.source.wav'), + inputSha256: input.sha256, + }; + const receipt = { + schemaVersion: 1, + format: 'modiff.canonical-workflow-run-receipt.v1', + proofKind: 'real_backend_input_bound_model_variant', + workflowId: recipe.workflowId, + task: 'speech_to_text', + sourceTemplateId: recipe.sourceTaskTemplateId, + modelType: route.modelType, + modelSet: [{ repoId: route.repo, revision: route.revision }], + inputBinding: { + field: 'file', + sourceValue: 'local.source.wav', + byteSize: input.bytes, + sha256: input.sha256, + converted: false, + }, + graphHash: graph.hash, + outputHash: 'sha256:bytes:' + output.sha256, + transcriptEvidence: { + storage: 'native-text-json', + durationSeconds, + timestampMode: route.timestamps, + segmentCount: 1, + }, + }; + const provenance = { + format: 'modiff.input-bound-model-variant-proof.v1', + evidenceFiles: { + input, + output, + capture: storeCapture(), + graphRequest: storeJson('graph-request.json', submission), + }, + }; + const galleryOutput = { bytes: structured, ref: fileRecord('transcript.json', structured) }; + return { + args: { recipe, native: { receipt, provenance, evidenceRoot, descriptorBytes }, galleryOutput }, + transcript, + store, + storeJson, + storeCapture, + registry, + submission, + wav, + backendContractFingerprint: backendContractIdentity(registry, graph.canonicalGraph).fingerprint, + }; +} + +test('Whisper Gallery proof rejects a changed private source locator', (t) => { + const { args } = fixture(t); + args.native.receipt.inputBinding.sourceValue = 'different.source.wav'; + assert.throws(() => verifyRetainedSpeechGalleryEvidence(args), /source locator differs/u); +}); + +test('verified Whisper Gallery proof binds exact output and original private WAV by hash', (t) => { + const { args, transcript, backendContractFingerprint } = fixture(t); + const proof = verifyRetainedSpeechGalleryEvidence(args); + assert.deepEqual(proof, { + output: { + mediaType: 'json', + sourceOutputHash: args.native.receipt.outputHash, + outputEncodedSha256: 'sha256:bytes:' + args.galleryOutput.ref.sha256, + decodedMediaHash: 'sha256:canonical-json:' + canonicalJsonHash(transcript), + outputBytes: args.galleryOutput.bytes.length, + }, + inputSha256: args.recipe.inputSha256, + backendContractFingerprint, + }); +}); + +test('rejects equal JSON content with different approved file bytes', (t) => { + const { args, transcript } = fixture(t); + const bytes = Buffer.from(JSON.stringify(transcript)); + args.galleryOutput = { bytes, ref: fileRecord('transcript.json', bytes) }; + assert.throws(() => verifyRetainedSpeechGalleryEvidence(args), /exact native JSON/u); +}); + +test('rejects matching changed transport and Gallery output against the saved receipt', (t) => { + const { args, transcript, store } = fixture(t); + transcript.text = 'Altered transcript.'; + transcript.segments[0].text = transcript.text; + const bytes = Buffer.from(JSON.stringify(transcript, null, 2)); + args.galleryOutput = { bytes, ref: fileRecord('transcript.json', bytes) }; + args.native.provenance.evidenceFiles.output = store( + 'native.output.txt', + Buffer.from(JSON.stringify([bytes.toString('utf8')])), + ); + assert.throws(() => verifyRetainedSpeechGalleryEvidence(args), /native run/u); +}); + +test('rejects a WAV altered on disk or replaced with a rehashed descriptor', (t) => { + const { args, store, wav } = fixture(t); + wav[wav.length - 1] ^= 1; + const changed = store('private.source.wav', wav); + assert.throws(() => verifyRetainedSpeechGalleryEvidence(args), /Evidence file hash differs/u); + args.native.provenance.evidenceFiles.input = changed; + assert.throws(() => verifyRetainedSpeechGalleryEvidence(args), /native input binding/u); + args.native.receipt.inputBinding.sha256 = changed.sha256; + assert.throws(() => verifyRetainedSpeechGalleryEvidence(args), /exact recipe/u); +}); + +test('rejects a mismatched decoded transcript observation', (t) => { + const { args } = fixture(t); + args.native.receipt.transcriptEvidence.segmentCount = 2; + assert.throws(() => verifyRetainedSpeechGalleryEvidence(args), /verified speech receipt/u); +}); + +test('rejects an attempt to provide the private WAV as Gallery input', (t) => { + const { args, wav } = fixture(t); + args.galleryInput = { bytes: wav, ref: fileRecord('input.wav', wav) }; + assert.throws(() => verifyRetainedSpeechGalleryEvidence(args), /audio source stays private/u); +}); + +test('rejects a rehashed graph that differs from the captured Whisper graph', (t) => { + const { args, submission, storeJson } = fixture(t); + submission.nodes['node-1'].params.sample.value = 999; + args.native.provenance.evidenceFiles.graphRequest = storeJson('graph-request.json', submission); + assert.throws(() => verifyRetainedSpeechGalleryEvidence(args), /graph differs from the receipt/u); +}); + +test('rejects a rehashed incomplete native node inventory', (t) => { + const { args, registry, storeCapture } = fixture(t); + delete registry.nodes['modules.Audio.Load']; + args.native.provenance.evidenceFiles.capture = storeCapture(); + assert.throws(() => verifyRetainedSpeechGalleryEvidence(args), /missing a native node contract/u); +}); + +test('verified Wav2Vec2 Gallery proof binds the pinned CTC word result and private WAV', (t) => { + const { args, transcript, backendContractFingerprint } = fixture(t, wav2vec); + const proof = verifyRetainedSpeechGalleryEvidence(args); + assert.deepEqual(proof, { + output: { + mediaType: 'json', + sourceOutputHash: args.native.receipt.outputHash, + outputEncodedSha256: 'sha256:bytes:' + args.galleryOutput.ref.sha256, + decodedMediaHash: 'sha256:canonical-json:' + canonicalJsonHash(transcript), + outputBytes: args.galleryOutput.bytes.length, + }, + inputSha256: args.recipe.inputSha256, + backendContractFingerprint, + }); +}); + +test('a Wav2Vec2 draft cannot substitute another checkpoint, route, or native descriptor', (t) => { + const { args } = fixture(t, wav2vec); + const { recipe, native } = args; + const wrongArtifact = { ...recipe.template.modelArtifact, revision: 'a'.repeat(40) }; + assert.throws( + () => + verifyRetainedSpeechGalleryEvidence({ + ...args, + recipe: { ...recipe, template: { ...recipe.template, modelArtifact: wrongArtifact } }, + }), + /template model pin differs/u, + ); + assert.throws( + () => + verifyRetainedSpeechGalleryEvidence({ + ...args, + recipe: { ...recipe, workflowId: whisper.modelType + ':speech_to_text' }, + }), + /workflow differs from the reviewed template/u, + ); + assert.throws( + () => + verifyRetainedSpeechGalleryEvidence({ ...args, native: { ...native, descriptorBytes: Buffer.from('changed') } }), + /descriptor differs/u, + ); +}); + +test('Wav2Vec2 rejects a consistently rehashed segment result and private audio publication', (t) => { + const { args, transcript, store, wav } = fixture(t, wav2vec); + assert.throws( + () => verifyRetainedSpeechGalleryEvidence({ ...args, galleryInput: { bytes: wav } }), + /audio source stays private/u, + ); + transcript.timestampMode = 'segment'; + const bytes = Buffer.from(JSON.stringify(transcript)); + args.galleryOutput = { bytes, ref: fileRecord('transcript.json', bytes) }; + const output = store('native.output.txt', Buffer.from(JSON.stringify([bytes.toString('utf8')]))); + args.native.provenance.evidenceFiles.output = output; + args.native.receipt.outputHash = 'sha256:bytes:' + output.sha256; + args.native.receipt.transcriptEvidence.timestampMode = 'segment'; + assert.throws(() => verifyRetainedSpeechGalleryEvidence(args), /timestamp mode differs from the reviewed route/u); +}); + +test('Wav2Vec2 rejects substituted Whisper nodes even if the edited graph and node registry agree', (t) => { + const { args, submission, registry, storeCapture, storeJson } = fixture(t, wav2vec); + const previous = 'modules.HuggingFaceSpeech.' + wav2vec.consumer; + const replacement = 'modules.HuggingFaceSpeech.' + whisper.consumer; + submission.nodes['node-3'].action = whisper.consumer; + registry.nodes[replacement] = { ...registry.nodes[previous], action: whisper.consumer }; + delete registry.nodes[previous]; + args.native.provenance.evidenceFiles.capture = storeCapture(); + args.native.provenance.evidenceFiles.graphRequest = storeJson('graph-request.json', submission); + args.native.receipt.graphHash = canonicalGraphIdentity(submission).hash; + args.recipe.retainedGraphHash = args.native.receipt.graphHash; + assert.throws(() => verifyRetainedSpeechGalleryEvidence(args), /differs from the reviewed node identities/u); +}); diff --git a/scripts/retained-structured-text-evidence.mjs b/scripts/retained-structured-text-evidence.mjs new file mode 100644 index 00000000..70703c8c --- /dev/null +++ b/scripts/retained-structured-text-evidence.mjs @@ -0,0 +1,97 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { canonicalJsonHash } from './canonical-json.mjs'; + +const MAX_TEXT_EVIDENCE_BYTES = 2 * 1024 * 1024; +const digest = (bytes) => createHash('sha256').update(bytes).digest('hex'); + +function parseJsonBytes(bytes, label) { + const text = new TextDecoder('utf-8', { fatal: true }).decode(bytes); + assert.ok(Buffer.from(text).equals(bytes), `${label} must use UTF-8 without a byte order mark.`); + return JSON.parse(text); +} + +// The caller must first verify the canonical workflow receipt against its +// original source and captures. This binds its exact text output to a separate, +// approved JSON file. Neither the native receipt nor its media hash changes. +export function verifyRetainedStructuredText({ receipt, transportBytes, structuredBytes, outputSha256 }) { + const textRoutes = { + 'HuggingFaceTextGenerationModel:text_generation': ['real_backend_prompt_bound_model_variant', 'text-generation'], + 'HuggingFaceAnyToAnyModel:text_generation': ['real_backend_prompt_bound_model_variant', 'any-to-any-generation'], + 'HuggingFaceAnyToAnyModel:image_to_text': ['real_backend_input_bound_model_variant', 'any-to-any-generation'], + 'HuggingFaceImageTextToTextModel:image_to_text': ['real_backend_input_bound_model_variant', 'image-video-to-text'], + }; + const route = Object.hasOwn(textRoutes, receipt?.workflowId) ? textRoutes[receipt.workflowId] : null; + assert.ok( + receipt?.schemaVersion === 1 && + receipt.format === 'modiff.canonical-workflow-run-receipt.v1' && + route && + receipt.proofKind === route[0] && + receipt.decodedOutput?.schemaVersion === 1 && + receipt.decodedOutput.kind === 'json', + 'A verified receipt for the reviewed text workflow is required.', + ); + for (const bytes of [transportBytes, structuredBytes]) { + assert.ok( + Buffer.isBuffer(bytes) && bytes.length > 0 && bytes.length <= MAX_TEXT_EVIDENCE_BYTES, + 'Retained text evidence requires a nonempty bounded file.', + ); + } + const sourceOutputHash = `sha256:bytes:${digest(transportBytes)}`; + assert.equal(sourceOutputHash, receipt.outputHash, 'Retained bytes differ from the original native transport.'); + assert.match(outputSha256, /^[a-f0-9]{64}$/u, 'An exact approved structured result hash is required.'); + assert.equal(digest(structuredBytes), outputSha256, 'Retained bytes differ from the approved structured result.'); + + const transport = parseJsonBytes(transportBytes, 'Native transport'); + assert.ok( + Array.isArray(transport) && transport.length === 1 && typeof transport[0] === 'string', + 'Native text transport must contain one encoded JSON result.', + ); + const native = JSON.parse(transport[0]); + const decoded = receipt.decodedOutput; + assert.ok( + native?.schemaVersion === 1 && + native.task === route[1] && + typeof native.text === 'string' && + native.text.trim() && + native.finishReason === decoded.finishReason && + native.inputTokens === decoded.inputTokens && + native.generatedTokens === decoded.generatedTokens && + native.modelReceipt?.receiptDigest === decoded.modelReceiptDigest && + /^sha256:[a-f0-9]{64}$/u.test(decoded.modelReceiptDigest), + 'Decoded result differs from the native text receipt.', + ); + if (native.task === 'any-to-any-generation') { + const source = receipt.inputBinding?.decodedImage; + const caption = receipt.workflowId === 'HuggingFaceAnyToAnyModel:image_to_text'; + assert.equal(Boolean(source), caption, 'Janus result has the wrong source evidence.'); + assert.equal(native.outputModality, 'text'); + assert.equal(native.inputImageCount, caption ? 1 : 0); + assert.equal(native.inputMediaPixels, caption ? source.width * source.height : 0); + } + if (native.task === 'image-video-to-text') { + const source = receipt.inputBinding?.decodedImage; + assert.ok(source, 'Caption result is missing its original source evidence.'); + assert.equal(native.imageCount, 1); + assert.equal(native.videoFrameCount, 0); + assert.equal(native.mediaPixels, source.width * source.height); + } + const { receiptDigest, ...model } = native.modelReceipt; + assert.equal(receiptDigest, `sha256:${canonicalJsonHash(model)}`, 'Native text model receipt digest differs.'); + assert.deepEqual( + receipt.modelSet, + [{ repoId: model.source?.repository, revision: model.source?.revision }], + 'Decoded model differs from the executed immutable model set.', + ); + const structured = parseJsonBytes(structuredBytes, 'Structured result'); + assert.deepEqual(structured, native, 'Approved JSON differs from the decoded native result.'); + return { + schemaVersion: 1, + format: 'modiff.gallery.retained-structured-text.v1', + sourceOutputHash, + sourceBytes: transportBytes.length, + outputEncodedSha256: `sha256:bytes:${outputSha256}`, + outputBytes: structuredBytes.length, + decodedMediaHash: `sha256:canonical-json:${canonicalJsonHash(structured)}`, + }; +} diff --git a/scripts/retained-template-association.mjs b/scripts/retained-template-association.mjs new file mode 100644 index 00000000..bbfb20a0 --- /dev/null +++ b/scripts/retained-template-association.mjs @@ -0,0 +1,859 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { existsSync, lstatSync, readFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { canonicalJsonHash } from './canonical-json.mjs'; +import { readCanonicalEvidenceFile } from './release-contract-core.mjs'; +import { verifyRetainedSpeechGalleryEvidence } from './retained-speech-gallery-evidence.mjs'; +import { verifyRetainedStructuredText } from './retained-structured-text-evidence.mjs'; +import { canonicalJsonHash as galleryJsonHash, validateQualityReview } from './template-gallery-harness.mjs'; + +const BOUND_REVIEW_SCOPES = { + marigold_depth_synthetic_ramp: { + folder: 'marigold', + proofKind: 'real_backend_input_bound_model_variant', + output: 'output.original.webp', + input: 'input.original.png', + decision: 'accepted_with_disclosed_limitations', + }, + smollm2_rain_gauge: { + folder: 'smollm2', + proofKind: 'real_backend_prompt_bound_model_variant', + output: 'output.original.json', + decision: 'approved', + }, +}; +const WHISPER_LCM_REVIEW_SCOPES = { + whisper_tiny_blue_cup_transcription: { + folder: 'whisper', + proofKind: 'real_backend_input_bound_model_variant', + output: 'output.original.json', + decision: 'approved', + technicalRecipe: 'speech_transcription', + }, + lcm_dawn_alpine_lake: { + folder: 'lcm', + proofKind: 'real_backend_input_bound_model_variant', + output: 'output.original.webp', + input: 'input.original.webp', + decision: 'accepted_with_disclosed_limitations', + technicalRecipe: 'source_bound_image_edit', + acceptanceStatement: + 'Accepted as a creative dawn reinterpretation with the disclosed terrain changes and stronger alpenglow.', + }, +}; +const WAV2VEC2_TEMPLATE_ID = 'wav2vec2_station_announcement'; +const WAV2VEC2_REVIEW_SCOPE = { + folder: 'wav2vec2', + proofKind: 'real_backend_input_bound_model_variant', + output: 'transcript.json', + reviewFile: 'review.json', + provenanceFile: 'technical-record.json', + decision: 'accepted_with_disclosed_limitations', + technicalRecipe: 'speech_transcription', + acceptanceStatement: + 'Accepted the exact saved station announcement transcript and word timestamps with the disclosed limitations.', +}; +const SANA_TEMPLATE_ID = 'sana_sprint_monochrome_tiger'; +const SANA_WORKFLOW_ID = 'SanaSprintPipeline:edit_image'; +const SANA_REVIEW_SCOPE_SHA256 = '09c91c7aa04229e591a86849d399dcf557ca61bdecfc3ac25e7b935795113263'; +const SANA_REVIEW_SCOPE = { + proofKind: 'real_backend_input_bound_model_variant', + input: `${SANA_TEMPLATE_ID}.before.webp`, + output: `${SANA_TEMPLATE_ID}.webp`, + decision: 'accepted_with_disclosed_limitations', + technicalRecipe: 'source_bound_image_edit', + acceptanceStatement: + 'Accepted as a creative monochrome edit with the disclosed changes to facial proportions, stripes, crop and background.', +}; +const SPANDREL_TEMPLATE_ID = 'spandrel_x2_synthetic_gradient'; +const SPANDREL_REVIEW_HASH = '357594a299efcda4b9b9e7c4fa65c3d016db3ffe1634fdfe8dfe360789c4d0d4'; +const SPANDREL_SCOPE = { + proofKind: 'real_backend_input_bound_model_variant', + input: true, + decision: 'accepted_with_disclosed_limitations', +}; +const digest = (bytes) => createHash('sha256').update(bytes).digest('hex'); + +function readBoundedRecord(path) { + const stat = lstatSync(path); + assert.ok( + stat.isFile() && !stat.isSymbolicLink() && stat.size > 0 && stat.size <= 65536, + 'Retained template review data must be a bounded regular file.', + ); + const bytes = readFileSync(path); + assert.equal(bytes.length, stat.size, 'Retained template review data changed while reading.'); + return { value: JSON.parse(bytes), sha256: digest(bytes) }; +} + +function verifiedSanaRecipe(draft, native, recipe) { + const { evidence, receipt, evidenceRoot } = native; + const capture = JSON.parse(readCanonicalEvidenceFile(evidenceRoot, evidence.capture).bytes); + const run = JSON.parse(readCanonicalEvidenceFile(evidenceRoot, capture.runDetail).bytes); + const [nativeOutput] = run.outputs; + const [source] = capture.inputs; + const original = nativeOutput.resolvedExecutionInputs.nodes; + const parameters = (action, disposition) => + Object.fromEntries( + Object.entries(original.find((node) => node.action === action).fieldAccounting.fields) + .filter(([, field]) => field.disposition === disposition) + .map(([key, field]) => [key, field.value]), + ); + const loaded = parameters('LoadPipeline', 'consumed'); + const execution = parameters('DiffusersExecutionRecipe', 'consumed'); + const submittedLoaderSettings = { + dtype: loaded.dtype, + device: execution.device, + device_map: execution.device_map, + attention_backend: execution.attention_backend, + offload_mode: execution.offload_mode, + quantization_mode: loaded.quantization_mode, + low_cpu_mem_usage: loaded.low_cpu_mem_usage, + vae_slicing: execution.vae_slicing, + vae_tiling: execution.vae_tiling, + }; + assert.equal(draft.format, 'modiff.gallery.retained-template-provenance-draft.v1'); + assert.equal(draft.verificationStatus, 'pending_maintainer_review'); + assert.equal(draft.evidenceDescriptorSha256, evidence.capture.sha256); + assert.equal(draft.nativeRuntimeFingerprint, run.task.runtimeFingerprint.fingerprint); + assert.equal(draft.originalGraphHash, receipt.graphHash); + assert.equal(`sha256:workflow-graph-v1:${draft.sourceGraphManifestSha256}`, receipt.canonicalWorkflowHash); + assert.equal(draft.verificationTimestamp, new Date(nativeOutput.createdAt).toISOString()); + assert.equal(draft.canonicalDefaultsExecuted, receipt.canonicalDefaultsExecuted); + assert.deepEqual(draft.qualificationClaims, receipt.qualificationClaims); + assert.deepEqual(draft.modelSet, receipt.modelSet); + assert.equal(draft.effectivePipelineClass, loaded.pipeline_class); + assert.deepEqual(draft.submittedLoading, submittedLoaderSettings); + assert.deepEqual(draft.observedEditControls, parameters('Edit', 'consumed')); + assert.deepEqual(draft.inactiveAuthoredEditControls, parameters('Edit', 'inactive')); + assert.equal(draft.observedEditControls.prompt, recipe.template.prompt); + assert.equal(draft.observedEditControls.strength, 0.75); + assert.deepEqual(draft.controlledVariant.strength, { field: 'strength', from: 0.5, to: 0.75 }); + const { width, height, mode, sha256 } = receipt.inputBinding.decodedImage; + assert.deepEqual( + [draft.source.width, draft.source.height, draft.source.decodedMode, draft.source.decodedSha256], + [width, height, mode, sha256], + ); + assert.equal(draft.source.bytes, source.file.bytes); + assert.equal(draft.source.encodedSha256, receipt.inputBinding.sha256); + assert.deepEqual( + [draft.output.width, draft.output.height], + [receipt.decodedOutput.width, receipt.decodedOutput.height], + ); + const { runtimeMeasurement } = run.task; + assert.equal(draft.runtime.backend, runtimeMeasurement.backend); + assert.equal(draft.runtime.resourceMode, run.task.runtimePreparation.resourceMode); + assert.equal(draft.runtime.executionDurationSeconds, receipt.executionDurationSeconds); + assert.equal(draft.runtime.peakAllocatedAcceleratorBytes, receipt.peakMemoryBytes); + assert.equal(draft.runtime.peakReservedAcceleratorBytes, runtimeMeasurement.peakReservedBytes); + return { + backendContractFingerprint: receipt.backendContractFingerprint, + recipeObservation: { + source: { + width, + height, + encodedSha256: draft.source.encodedSha256, + decodedSha256: sha256, + creation: draft.source.creation, + }, + observedEditControls: draft.observedEditControls, + inactiveAuthoredEditControls: draft.inactiveAuthoredEditControls, + submittedLoaderSettings, + modelTerms: { + license: 'Apache-2.0', + licenseUrl: + 'https://huggingface.co/Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers/blob/aa76e7f4f4928f378716b6716a2130fba3caf5b1/LICENSE', + textEncoder: 'Gemma-2-2B-IT', + textEncoderTermsUrl: 'https://ai.google.dev/gemma/terms', + textEncoderProhibitedUsePolicyUrl: 'https://ai.google.dev/gemma/prohibited_use_policy', + }, + }, + }; +} + +function verifiedWav2Vec2Recipe(draft, receipt, output, speech) { + assert.equal(draft.status, 'private_review_candidate'); + assert.equal(draft.workflowId, receipt.workflowId); + assert.deepEqual([{ repoId: draft.model.repoId, revision: draft.model.revision }], receipt.modelSet); + assert.equal(draft.model.publisherLicenseDeclaration, 'Apache-2.0'); + assert.equal(draft.platform, 'Windows CUDA'); + assert.equal(draft.graphHash, receipt.graphHash); + assert.equal(draft.runtimeFingerprint, receipt.runtimeFingerprint); + assert.equal(draft.measuredElapsedSeconds, receipt.executionDurationSeconds); + assert.equal(draft.measuredPeakAllocatedBytes, receipt.peakMemoryBytes); + assert.deepEqual(draft.observedSettings, { + timestamps: receipt.transcriptEvidence.timestampMode, + chunkLengthSeconds: 30, + chunkStrideSeconds: 5, + }); + assert.deepEqual(draft.input, { + origin: 'synthetic station announcement', + format: 'PCM16 WAV', + sampleRate: receipt.inputBinding.decodedAudio.sampleRate, + channels: receipt.inputBinding.decodedAudio.shape[1], + durationSeconds: receipt.transcriptEvidence.durationSeconds, + sha256: speech.inputSha256, + }); + assert.deepEqual(draft.output, { + path: WAV2VEC2_REVIEW_SCOPE.output, + mediaType: output.mediaType, + sha256: output.outputEncodedSha256.slice('sha256:bytes:'.length), + byteSize: output.outputBytes, + nativeTransportSha256: output.sourceOutputHash.slice('sha256:bytes:'.length), + projection: 'Exact UTF-8 bytes of the single JSON string in the native text result.', + }); + return { + backendContractFingerprint: speech.backendContractFingerprint, + recipeObservation: { + platform: draft.platform, + modelPublisherLicense: draft.model.publisherLicenseDeclaration, + input: { ...draft.input, galleryScope: 'private_source_hash_only' }, + settings: draft.observedSettings, + transcript: receipt.transcriptEvidence, + outputProjection: draft.output.projection, + }, + }; +} + +function verifiedTechnicalRecipe({ scope, recipe, candidate, native, reviewedRecipe, output, speech }) { + const { bytes, ref } = reviewedRecipe; + const { receipt } = native; + assert.equal(digest(bytes), ref.sha256); + assert.equal(ref.sha256, candidate.draftProvenanceSha256); + const draft = JSON.parse(bytes); + assert.equal(draft.schemaVersion, 1); + if (scope === WAV2VEC2_REVIEW_SCOPE) return verifiedWav2Vec2Recipe(draft, receipt, output, speech); + assert.equal(draft.templateId, recipe.template.id); + assert.equal(draft.workflowId, receipt.workflowId); + assert.equal(draft.sourceTaskContractId, receipt.sourceTemplateId); + assert.equal(draft.backendSourceFingerprint, receipt.backendSourceFingerprint); + assert.equal( + draft.output.decodedMediaHash ?? `sha256:decoded-rgba:${draft.output.decodedSha256}`, + output.decodedMediaHash, + ); + assert.equal(`sha256:bytes:${draft.output.sha256 ?? draft.output.encodedSha256}`, output.outputEncodedSha256); + assert.equal(draft.output.byteSize ?? draft.output.bytes, output.outputBytes); + if (scope === SANA_REVIEW_SCOPE) return verifiedSanaRecipe(draft, native, recipe); + assert.equal(draft.runtimeFingerprint, receipt.runtimeFingerprint); + assert.deepEqual(draft.observationLimits, receipt.observationLimits); + const { templateLockHash, galleryTemplateLockHash, promptSettingsHash } = recipe.reviewedCatalogLock; + if (scope.technicalRecipe === 'speech_transcription') { + assert.equal(draft.format, 'modiff.gallery.retained-speech-review-draft.v1'); + assert.equal(draft.reviewStatus, 'pending_review'); + assert.equal(draft.proposedTemplateRevisionSha256, recipe.reviewedTemplateSha256); + assert.deepEqual(draft.proposedCatalogLock, recipe.reviewedCatalogLock); + assert.equal(draft.canonicalWorkflowHash, receipt.canonicalWorkflowHash); + assert.equal(draft.graphHash, receipt.graphHash); + assert.equal(draft.backendContractFingerprint, speech.backendContractFingerprint); + assert.equal(draft.output.nativeTransportSha256, output.sourceOutputHash); + assert.equal( + draft.modelRevision, + receipt.modelSet.map(({ repoId, revision }) => `${repoId}@${revision}`).join(' | '), + ); + assert.equal(Date.parse(draft.capturedAt), Date.parse(receipt.capturedAt)); + assert.equal(draft.executionDurationSeconds, receipt.executionDurationSeconds); + assert.equal(draft.peakMemoryBytes, receipt.peakMemoryBytes); + assert.deepEqual(draft.input, { + origin: 'Synthetic English speech', + format: 'PCM16 WAV', + byteSize: receipt.inputBinding.byteSize, + sampleRate: receipt.inputBinding.decodedAudio.sampleRate, + channels: receipt.inputBinding.decodedAudio.shape[1], + durationSeconds: receipt.transcriptEvidence.durationSeconds, + sha256: speech.inputSha256, + galleryScope: 'private_source_hash_only', + }); + return { + backendContractFingerprint: speech.backendContractFingerprint, + recipeObservation: { input: draft.input, settings: draft.settings, transcript: receipt.transcriptEvidence }, + }; + } + assert.equal(draft.format, 'modiff.gallery.retained-template-provenance-draft.v1'); + assert.equal(draft.verificationStatus, 'pending_maintainer_review'); + assert.equal(draft.templateRevisionHash, recipe.reviewedTemplateSha256); + assert.equal(draft.templateLockHash, galleryTemplateLockHash); + assert.equal(draft.catalogTemplateLockHash, templateLockHash); + assert.equal(draft.promptSettingsHash, promptSettingsHash); + assert.equal(draft.originalCanonicalWorkflowHash, receipt.canonicalWorkflowHash); + assert.equal(draft.originalGraphHash, receipt.graphHash); + assert.equal(draft.evidenceDescriptorSha256, recipe.originalReceiptSha256); + assert.equal(draft.backendContractFingerprint, receipt.backendContractFingerprint); + assert.equal(Date.parse(draft.verificationTimestamp), Date.parse(receipt.capturedAt)); + assert.equal(draft.runtime.executionDurationSeconds, receipt.executionDurationSeconds); + assert.equal(draft.runtime.peakMemoryBytes, receipt.peakMemoryBytes); + assert.deepEqual(draft.modelSet, receipt.modelSet); + assert.deepEqual(draft.qualificationClaims, receipt.qualificationClaims); + assert.equal(draft.canonicalDefaultsExecuted, false); + const { width, height } = receipt.inputBinding.decodedImage; + assert.deepEqual([draft.source.width, draft.source.height], [width, height]); + assert.equal(draft.source.encodedSha256, recipe.inputSha256); + assert.equal(draft.source.decodedSha256, receipt.inputBinding.decodedImage.sha256); + assert.equal(draft.source.sourceFileName, recipe.inputFileName); + assert.deepEqual( + [draft.output.width, draft.output.height], + [receipt.decodedOutput.width, receipt.decodedOutput.height], + ); + assert.equal(draft.observedEditControls.prompt, recipe.template.prompt); + return { + backendContractFingerprint: receipt.backendContractFingerprint, + recipeObservation: { + source: { + width, + height, + encodedSha256: draft.source.encodedSha256, + decodedSha256: draft.source.decodedSha256, + creation: draft.source.creation, + }, + observedEditControls: draft.observedEditControls, + inactiveAuthoredEditControls: draft.inactiveAuthoredEditControls, + submittedLoaderSettings: draft.submittedLoaderSettings, + modelTerms: draft.modelTerms, + }, + }; +} + +export function assessRetainedTemplateAssociation({ + recipe, + candidate, + native, + galleryOutput, + galleryInput, + catalogLock, + reviewedRecipe, +}) { + const { template } = recipe; + const spandrel = template.id === SPANDREL_TEMPLATE_ID; + const scope = spandrel + ? SPANDREL_SCOPE + : template.id === SANA_TEMPLATE_ID + ? SANA_REVIEW_SCOPE + : template.id === WAV2VEC2_TEMPLATE_ID + ? WAV2VEC2_REVIEW_SCOPE + : (BOUND_REVIEW_SCOPES[template.id] ?? WHISPER_LCM_REVIEW_SCOPES[template.id]); + assert.ok(scope, 'Retained Gallery template scope is not reviewed.'); + const { evidence, receipt, evidenceRoot, descriptorBytes } = native; + assert.equal(candidate.templateId, template.id); + assert.equal(candidate.workflowId, recipe.workflowId); + assert.equal(recipe.sourceTaskTemplateId, receipt.sourceTemplateId); + assert.equal(candidate.sourceTaskContractId, receipt.sourceTemplateId); + assert.equal(candidate.qualityDecision, scope.decision); + assert.equal(candidate.redistributionConfirmed, true); + assert.equal(receipt.workflowId, recipe.workflowId); + assert.equal(receipt.proofKind, scope.proofKind); + assert.equal(receipt.modelType, template.modelType); + assert.equal(receipt.task, template.mode); + assert.deepEqual(receipt.modelSet, [ + { repoId: template.modelArtifact.value, revision: template.modelArtifact.revision }, + ]); + assert.equal(receipt.graphHash, recipe.retainedGraphHash); + assert.equal(receipt.resourceCandidateId, null); + assert.equal(receipt.canonicalDefaultsExecuted, false); + assert.ok(Number.isFinite(receipt.executionDurationSeconds) && receipt.executionDurationSeconds > 0); + assert.ok(Number.isSafeInteger(receipt.peakMemoryBytes) && receipt.peakMemoryBytes > 0); + assert.equal(template.example.lockedSettings.resourceMode, 'expert'); + assert.equal(receipt.qualificationClaims.publicTemplate, false); + assert.equal(receipt.qualificationClaims.modelResourceQualified, false); + assert.deepEqual( + catalogLock, + recipe.reviewedCatalogLock, + 'The staged release recipe differs from its reviewed locks.', + ); + assert.match(catalogLock.templateLockHash, /^tpl_[a-f0-9]{8}$/u); + assert.match(catalogLock.galleryTemplateLockHash, /^tpl_[a-f0-9]{8}$/u); + assert.match(catalogLock.promptSettingsHash, /^ps_[a-f0-9]{8}$/u); + assert.equal(digest(galleryOutput.bytes), galleryOutput.ref.sha256); + + if (spandrel) { + const reviewedRecipeBytes = reviewedRecipe?.bytes; + assert.ok( + Buffer.isBuffer(reviewedRecipeBytes) && reviewedRecipeBytes.length > 0 && reviewedRecipeBytes.length <= 65536, + ); + assert.equal(digest(reviewedRecipeBytes), reviewedRecipe.ref.sha256); + assert.equal(candidate.draftProvenanceSha256, reviewedRecipe.ref.sha256); + const { recipeReviewSha256, ...draft } = JSON.parse(reviewedRecipeBytes); + assert.equal(draft.format, 'modiff.private-technical-preview-recipe-review.v1'); + assert.equal(recipeReviewSha256, SPANDREL_REVIEW_HASH); + assert.equal(candidate.recipeReviewSha256, recipeReviewSha256); + assert.equal(canonicalJsonHash(draft), recipeReviewSha256); + assert.equal(draft.workflowId, receipt.workflowId); + assert.equal(draft.input.sha256, receipt.inputBinding.sha256); + assert.deepEqual( + [draft.input.width, draft.input.height], + [receipt.inputBinding.width, receipt.inputBinding.height], + ); + assert.equal(draft.output.fileHash, receipt.outputHash); + assert.equal(draft.output.decodedHash, receipt.decodedOutput.hash); + assert.deepEqual( + [draft.output.width, draft.output.height], + [receipt.decodedOutput.width, receipt.decodedOutput.height], + ); + assert.deepEqual(draft.controls.model, evidence.modelArtifact); + const { artifact, byteSize, descriptorSha256 } = receipt.modelArtifact; + assert.deepEqual(artifact, { + source: 'hub', + repository: template.modelArtifact.value, + revision: template.modelArtifact.revision, + weightName: 'RealESRGAN_x2plus.pth', + sha256: draft.controls.model.sha256, + }); + assert.equal(draft.controls.model.value, `${artifact.repository}/${artifact.weightName}`); + assert.equal(byteSize, draft.controls.model.byteSize); + assert.equal(template.modelArtifact.sha256, artifact.sha256); + assert.equal(template.modelArtifact.byteSize, byteSize); + assert.equal(template.modelArtifact.license, draft.controls.model.license); + assert.match(descriptorSha256, /^[a-f0-9]{64}$/u); + assert.equal(draft.proof.sourceTaskTemplateId, receipt.sourceTemplateId); + assert.equal(draft.proof.canonicalWorkflowHash, receipt.canonicalWorkflowHash); + assert.equal(draft.proof.populatedGraphHash, receipt.graphHash); + assert.equal(draft.proof.evidenceDescriptorSha256, recipe.originalReceiptSha256); + assert.equal(draft.proof.savedCreatorPackageSha256, evidence.creatorPackage.sha256); + const creator = JSON.parse(readCanonicalEvidenceFile(evidenceRoot, evidence.creatorPackage).bytes); + const upscaler = Object.values(creator.apiGraph.nodes).find( + (node) => node.module === 'modules.Spandrel' && node.action === 'Upscaler', + ); + assert.equal(creator.apiGraph.nodes[receipt.inputBinding.nodeId].params.alpha_channel.value, draft.input.alphaMode); + assert.deepEqual( + [upscaler.params.tile_size.value, upscaler.params.tile_overlap.value, upscaler.params.downscale.value], + [draft.controls.tileSize, draft.controls.tileOverlap, draft.controls.downscale], + ); + assert.deepEqual(receipt.observationLimits, { + fullConsumedFieldAccounting: false, + physicalPlatformQualification: false, + }); + } + + let output; + let speech; + if (scope.technicalRecipe === 'speech_transcription') { + speech = verifyRetainedSpeechGalleryEvidence({ recipe, native, galleryOutput, galleryInput }); + output = speech.output; + } else if (scope.input) { + assert.equal(digest(galleryInput.bytes), galleryInput.ref.sha256); + assert.equal(galleryInput.ref.sha256, receipt.inputBinding.sha256); + assert.equal(galleryInput.ref.sha256, recipe.inputSha256); + assert.deepEqual( + [template.example.expectedOutput.width, template.example.expectedOutput.height], + [receipt.decodedOutput.width, receipt.decodedOutput.height], + ); + const capture = + scope.technicalRecipe === 'source_bound_image_edit' + ? JSON.parse(readCanonicalEvidenceFile(evidenceRoot, evidence.capture).bytes) + : evidence; + const source = capture.inputs[0]; + assert.equal(capture.inputs.length, 1); + assert.equal(source.file.sha256, recipe.inputSha256); + assert.equal(source.sourceValue, recipe.inputFileName); + assert.equal(template.inputBindings.length, 1); + const [binding] = template.inputBindings; + assert.equal(binding.origin, 'user'); + assert.equal(binding.field, 'referenceImages'); + assert.equal(binding.count, 1); + assert.equal(`sha256:bytes:${galleryOutput.ref.sha256}`, receipt.outputHash); + if (scope.technicalRecipe === 'source_bound_image_edit') { + assert.equal(digest(template.prompt), recipe.promptSha256); + assert.equal(receipt.promptBinding.sha256, recipe.promptSha256); + } + output = { + mediaType: 'image', + sourceOutputHash: receipt.outputHash, + outputEncodedSha256: receipt.outputHash, + decodedMediaHash: receipt.decodedOutput.hash, + outputBytes: galleryOutput.bytes.length, + inputEncodedSha256: `sha256:bytes:${galleryInput.ref.sha256}`, + }; + } else { + assert.equal(receipt.promptBinding.sha256, recipe.promptSha256); + assert.equal(digest(template.prompt), recipe.promptSha256); + assert.ok(template.outputKinds.includes('json')); + assert.equal(evidence.outputs.length, 1); + const transport = readCanonicalEvidenceFile(evidenceRoot, evidence.outputs[0].file, 2 * 1024 * 1024); + output = { + mediaType: 'json', + ...verifyRetainedStructuredText({ + receipt, + transportBytes: transport.bytes, + structuredBytes: galleryOutput.bytes, + outputSha256: galleryOutput.ref.sha256, + }), + }; + } + assert.equal(digest(descriptorBytes), recipe.originalReceiptSha256); + const technicalRecipe = scope.technicalRecipe + ? verifiedTechnicalRecipe({ scope, recipe, candidate, native, reviewedRecipe, output, speech }) + : null; + const association = { + schemaVersion: 1, + format: 'modiff.retained-template-association.v1', + templateId: template.id, + workflowId: receipt.workflowId, + nativeSourceTaskContractId: receipt.sourceTemplateId, + catalogTemplateLockHash: catalogLock.templateLockHash, + galleryTemplateLockHash: catalogLock.galleryTemplateLockHash, + catalogPromptSettingsHash: catalogLock.promptSettingsHash, + originalTaskId: receipt.taskId, + originalGraphHash: receipt.graphHash, + ...(spandrel || technicalRecipe ? { originalCanonicalWorkflowHash: receipt.canonicalWorkflowHash } : {}), + originalTemplateLockHash: null, + originalResourceCandidateId: null, + originalEvidenceSha256: recipe.originalReceiptSha256, + observedExecution: { + modelSet: receipt.modelSet, + ...(spandrel ? { modelArtifact: receipt.modelArtifact } : {}), + runtimeFingerprint: receipt.runtimeFingerprint, + executionDurationSeconds: receipt.executionDurationSeconds, + peakMemoryBytes: receipt.peakMemoryBytes, + observationLimits: receipt.observationLimits, + ...(technicalRecipe ? { backendContractFingerprint: technicalRecipe.backendContractFingerprint } : {}), + }, + output, + ...(technicalRecipe ? { recipeObservation: technicalRecipe.recipeObservation } : {}), + review: { + qualityDecision: candidate.qualityDecision, + redistributionConfirmed: true, + draftReviewSha256: candidate.draftReviewSha256, + draftProvenanceSha256: candidate.draftProvenanceSha256, + ...(spandrel ? { recipeReviewSha256: candidate.recipeReviewSha256 } : {}), + }, + qualificationScope: 'exact_retained_recipe', + releaseApprovalGranted: false, + }; + return { + ...association, + associationHash: `sha256:retained-template-association-v1:${canonicalJsonHash(association)}`, + }; +} + +// Existing Gallery quality rules also apply to the approved technical preview. +// The final binding describes this reviewed association after execution. It +// does not supply template or resource fields to the original native run. +export function finalizeRetainedQualityReview({ association, draft, reviewer, reviewedAt }) { + const spandrel = association.templateId === SPANDREL_TEMPLATE_ID; + const wav2vec2 = association.templateId === WAV2VEC2_TEMPLATE_ID; + const qualitative = spandrel || wav2vec2; + if (qualitative) assert.equal(draft.ratingMethod, 'maintainer_qualitative_acceptance'); + const bindings = { + templateId: association.templateId, + templateLockHash: association.galleryTemplateLockHash, + promptSettingsHash: association.catalogPromptSettingsHash, + proofLockHash: association.associationHash, + modelRevision: association.observedExecution.modelSet + .map(({ repoId, revision }) => `${repoId}@${revision}`) + .join(' | '), + runtimeFingerprint: association.observedExecution.runtimeFingerprint, + graphHash: association.originalGraphHash, + decodedMediaHash: association.output.decodedMediaHash, + }; + const review = { + schemaVersion: 2, + ...bindings, + reviewStatus: 'approved_reviewed', + reviewer, + reviewedAt, + ...(qualitative ? { ratingMethod: draft.ratingMethod } : {}), + rubric: draft.rubric, + scores: draft.scores, + hardFailures: draft.hardFailures, + objectiveChecks: draft.objectiveChecks, + modalityReview: draft.modalityReview, + summary: draft.summary, + knownLimitations: draft.knownLimitations, + }; + if (association.review.qualityDecision === 'accepted_with_disclosed_limitations') { + review.maintainerAcceptance = { + schemaVersion: 1, + decision: 'accepted_with_disclosed_limitations', + reviewer, + acceptedAt: reviewedAt, + statement: + (association.templateId === SANA_TEMPLATE_ID + ? SANA_REVIEW_SCOPE.acceptanceStatement + : wav2vec2 + ? WAV2VEC2_REVIEW_SCOPE.acceptanceStatement + : WHISPER_LCM_REVIEW_SCOPES[association.templateId]?.acceptanceStatement) ?? + (spandrel + ? 'Accepted as a technical preview of the exact saved synthetic gradient and 2× delivery with the disclosed limitations.' + : 'Accepted as a technical depth preview with the reviewed scores and the disclosed limits of the synthetic ramp.'), + acceptedReviewHash: galleryJsonHash(review), + }; + } + const errors = validateQualityReview(review, bindings, 'approved_reviewed'); + assert.deepEqual(errors, [], 'The finalized review does not meet Gallery quality rules.'); + return review; +} + +function projectApprovedWav2Vec2Review(original, receipt, template) { + assert.equal(original.schemaVersion, 1); + assert.equal(original.reviewStatus, 'pending_review'); + assert.equal(original.approved, false); + assert.equal(original.redistributionApproved, false); + const [contentCheck, timingCheck, receiptCheck] = original.observations; + return { + schemaVersion: 2, + outputSha256: original.outputSha256, + graphHash: receipt.graphHash, + runtimeFingerprint: receipt.runtimeFingerprint, + modelRevision: template.modelArtifact.value + '@' + template.modelArtifact.revision, + ratingMethod: 'maintainer_qualitative_acceptance', + rubric: { taskAdherence: null, artifactControl: null, modalityQuality: null }, + scores: { promptAdherence: null, composition: null, technicalExecution: null, templateUsefulness: null }, + hardFailures: [], + objectiveChecks: { status: 'pass', checks: [receiptCheck] }, + modalityReview: { status: 'pass', checks: [contentCheck, timingCheck] }, + summary: original.observations.join(' '), + knownLimitations: original.limitations, + }; +} + +async function readReviewBatch({ approvalRoot, vite, nativeBySha, scopes, approvalSha256 }) { + const approvalPath = join(approvalRoot, 'approval.v1.json'); + if (!existsSync(approvalPath)) return []; + const { value: approval, sha256: approvalDigest } = readBoundedRecord(approvalPath); + if (approvalSha256) assert.equal(approvalDigest, approvalSha256, 'The retained batch approval differs.'); + assert.equal(approval.schemaVersion, 1); + assert.equal(approval.format, 'modiff.private.gallery-candidate-approval.v1'); + assert.equal(approval.publicationStatus, 'private_staging'); + assert.deepEqual(approval.excludedWorkflowIds, ['ShapEPipeline:text_to_3d']); + assert.ok( + typeof approval.reviewer === 'string' && + approval.reviewer.trim() && + Number.isFinite(Date.parse(approval.recordedAt)), + ); + assert.match(approval.reviewScopeSha256, /^[a-f0-9]{64}$/u); + assert.ok(Array.isArray(approval.candidates) && approval.candidates.length === Object.keys(scopes).length); + const reviewedScope = readBoundedRecord(join(approvalRoot, 'review-scope.json')); + assert.equal(reviewedScope.sha256, approval.reviewScopeSha256, 'Original review inventory hash differs.'); + assert.equal(reviewedScope.value.status, 'private_review_only'); + const indexedFiles = new Map(reviewedScope.value.files.map((item) => [item.path, item])); + assert.equal(indexedFiles.size, reviewedScope.value.files.length, 'Review inventory contains duplicate files.'); + + const { RETAINED_GALLERY_TEMPLATES } = await vite.ssrLoadModule('/scripts/retained-gallery-recipes.ts'); + const { getTemplateLockHash, getPromptSettingsHash, getTemplateLockedSettings } = await vite.ssrLoadModule( + '/src/studio/templateExactness.ts', + ); + const records = []; + for (const recipe of RETAINED_GALLERY_TEMPLATES.filter(({ template }) => Object.hasOwn(scopes, template.id))) { + const { template } = recipe; + const scope = scopes[template.id]; + const matches = approval.candidates.filter((item) => item.templateId === template.id); + assert.equal(matches.length, 1, 'Exact retained Gallery approval is missing or ambiguous.'); + const [candidate] = matches; + const settings = getTemplateLockedSettings(template); + assert.equal( + canonicalJsonHash({ template, settings }), + recipe.reviewedTemplateSha256, + 'The staged template definition differs from the reviewed recipe.', + ); + const reviewFile = scope.reviewFile ?? 'proposed-review.json'; + const provenanceFile = scope.provenanceFile ?? 'proposed-provenance.json'; + const names = [scope.output, reviewFile, provenanceFile]; + if (scope.input) names.push(scope.input); + assert.ok(Array.isArray(candidate.files) && candidate.files.length === names.length); + const files = new Map( + names.map((name) => { + const refs = candidate.files.filter((item) => item.path === `${scope.folder}/${name}`); + assert.equal(refs.length, 1, 'Approved Gallery file is missing or ambiguous.'); + const [ref] = refs; + assert.deepEqual( + ref, + indexedFiles.get(ref.path), + 'Approval refers to a file outside the exact review inventory.', + ); + return [name, { ref, ...readCanonicalEvidenceFile(join(approvalRoot, 'reviewed'), ref, 2 * 1024 * 1024) }]; + }), + ); + assert.equal(files.get(reviewFile).ref.sha256, candidate.draftReviewSha256); + assert.equal(files.get(provenanceFile).ref.sha256, candidate.draftProvenanceSha256); + const native = nativeBySha.get(recipe.originalReceiptSha256); + assert.ok(native, 'The approved original native receipt could not be verified.'); + const media = files.get(scope.output); + const original = JSON.parse(files.get(reviewFile).bytes); + const wav2vec2 = scope === WAV2VEC2_REVIEW_SCOPE; + const draft = wav2vec2 ? projectApprovedWav2Vec2Review(original, native.receipt, template) : original; + assert.equal(draft.outputSha256, media.ref.sha256); + assert.equal(draft.graphHash, native.receipt.graphHash); + assert.equal(draft.runtimeFingerprint, native.receipt.runtimeFingerprint); + assert.equal(draft.modelRevision, `${template.modelArtifact.value}@${template.modelArtifact.revision}`); + assert.ok( + !draft.reviewer && !draft.reviewedAt, + 'The reviewed draft must preserve original pending review metadata.', + ); + if (scope.technicalRecipe && !wav2vec2) { + assert.deepEqual(draft.scores, candidate.reviewedScores); + assert.equal(draft.schemaVersion, 2); + if (scope.input) { + assert.equal(draft.sourceSha256, files.get(scope.input).ref.sha256); + assert.equal(draft.proposedDecision, scope.decision); + } + } + const association = assessRetainedTemplateAssociation({ + recipe, + candidate, + native, + galleryOutput: media, + galleryInput: scope.input ? files.get(scope.input) : undefined, + reviewedRecipe: files.get(provenanceFile), + catalogLock: { + templateLockHash: getTemplateLockHash(template), + galleryTemplateLockHash: getTemplateLockHash(template, draft.modelRevision), + promptSettingsHash: getPromptSettingsHash(settings), + }, + }); + if (!wav2vec2) assert.equal(draft.decodedMediaHash, association.output.decodedMediaHash); + const qualityReview = finalizeRetainedQualityReview({ + association, + draft, + reviewer: approval.reviewer, + reviewedAt: approval.recordedAt, + }); + records.push({ + association: { ...association, qualityReviewHash: galleryJsonHash(qualityReview) }, + qualityReview, + recipe, + receipt: native.receipt, + outputBytes: media.bytes, + beforeBytes: scope.input ? files.get(scope.input).bytes : undefined, + }); + } + assert.equal(records.length, approval.candidates.length); + assert.equal( + indexedFiles.size, + approval.candidates.reduce((total, item) => total + item.files.length, 0), + ); + return records; +} + +// The retained native reader must already have revalidated the original +// evidence descriptor and all inputs, output, runtime and source receipts. +export function readApprovedWhisperLcmBatch(args) { + return readReviewBatch({ + ...args, + scopes: WHISPER_LCM_REVIEW_SCOPES, + approvalSha256: 'ba369c5fff89e379be66714d3ecbf1a0e3a9555e2b5ffbc9cb54210d862ec30b', + }); +} + +export function readApprovedWav2Vec2Review(args) { + return readReviewBatch({ + ...args, + scopes: { [WAV2VEC2_TEMPLATE_ID]: WAV2VEC2_REVIEW_SCOPE }, + approvalSha256: '5a790d4a6c9f82b2e00140b8d1c62fc3721c0b66856e4e2e7f2440890772b0e0', + }); +} + +export async function readApprovedSanaReview({ approvalRoot, vite, nativeBySha }) { + const approvalPath = join(approvalRoot, 'approval.v1.json'); + if (!existsSync(approvalPath)) return null; + const { value: approval, sha256: approvalHash } = readBoundedRecord(approvalPath); + assert.equal( + approvalHash, + '40060ba701188a6d287df07e0852c6497d109885495e6fc85a19e8371ef73906', + 'Sana Sprint approval digest differs.', + ); + assert.equal(approval.schemaVersion, 1); + assert.equal(approval.format, 'modiff.private.gallery-candidate-approval.v1'); + assert.ok(typeof approval.reviewer === 'string' && approval.reviewer.trim()); + assert.ok(Number.isFinite(Date.parse(approval.reviewedAt))); + assert.equal(approval.reviewScopeSha256, SANA_REVIEW_SCOPE_SHA256); + assert.equal(approval.candidates.length, 1); + const [candidate] = approval.candidates; + assert.equal(candidate.templateId, SANA_TEMPLATE_ID); + assert.equal(candidate.workflowId, SANA_WORKFLOW_ID); + const { value: scope, sha256: scopeHash } = readBoundedRecord(join(approvalRoot, 'review-scope.json')); + assert.equal(scopeHash, SANA_REVIEW_SCOPE_SHA256); + assert.equal(scope.status, 'pending_review_and_redistribution_rights'); + assert.deepEqual(candidate.files, scope.files); + const { RETAINED_GALLERY_TEMPLATES } = await vite.ssrLoadModule('/scripts/retained-gallery-recipes.ts'); + const { getTemplateLockHash, getPromptSettingsHash, getTemplateLockedSettings } = await vite.ssrLoadModule( + '/src/studio/templateExactness.ts', + ); + const matches = RETAINED_GALLERY_TEMPLATES.filter(({ template }) => template.id === SANA_TEMPLATE_ID); + assert.equal(matches.length, 1); + const [recipe] = matches; + const { template } = recipe; + const settings = getTemplateLockedSettings(template); + assert.equal(canonicalJsonHash({ template, settings }), recipe.reviewedTemplateSha256); + const native = nativeBySha.get(recipe.originalReceiptSha256); + assert.ok(native, 'The approved original Sana Sprint receipt could not be verified.'); + const before = SANA_REVIEW_SCOPE.input; + const after = SANA_REVIEW_SCOPE.output; + const review = `${SANA_TEMPLATE_ID}.proposed-review.json`; + const provenance = `${SANA_TEMPLATE_ID}.proposed-provenance.json`; + assert.equal(candidate.files.length, 4); + const files = new Map( + [before, after, review, provenance].map((name) => { + const refs = candidate.files.filter((item) => item.path === name); + assert.equal(refs.length, 1); + const [ref] = refs; + return [name, { ref, ...readCanonicalEvidenceFile(join(approvalRoot, 'reviewed'), ref, 2 * 1024 * 1024) }]; + }), + ); + const draftReview = JSON.parse(files.get(review).bytes); + assert.equal(draftReview.schemaVersion, 2); + assert.equal(draftReview.templateId, SANA_TEMPLATE_ID); + assert.equal(draftReview.reviewStatus, 'pending_maintainer_review'); + assert.equal(draftReview.proposedDecision, SANA_REVIEW_SCOPE.decision); + assert.ok(!draftReview.reviewer && !draftReview.reviewedAt); + assert.equal(draftReview.graphHash, native.receipt.graphHash); + const capture = JSON.parse(readCanonicalEvidenceFile(native.evidenceRoot, native.evidence.capture).bytes); + const run = JSON.parse(readCanonicalEvidenceFile(native.evidenceRoot, capture.runDetail).bytes); + assert.equal(draftReview.nativeRuntimeFingerprint, run.task.runtimeFingerprint.fingerprint); + assert.equal(draftReview.modelRevision, `${template.modelArtifact.value}@${template.modelArtifact.revision}`); + assert.equal(draftReview.outputSha256, files.get(after).ref.sha256); + assert.equal(draftReview.sourceSha256, files.get(before).ref.sha256); + const association = assessRetainedTemplateAssociation({ + recipe, + candidate: { + ...candidate, + sourceTaskContractId: recipe.sourceTaskTemplateId, + draftReviewSha256: files.get(review).ref.sha256, + draftProvenanceSha256: files.get(provenance).ref.sha256, + }, + native, + galleryOutput: files.get(after), + galleryInput: files.get(before), + reviewedRecipe: files.get(provenance), + catalogLock: { + templateLockHash: getTemplateLockHash(template), + galleryTemplateLockHash: getTemplateLockHash(template, draftReview.modelRevision), + promptSettingsHash: getPromptSettingsHash(settings), + }, + }); + assert.equal(draftReview.decodedMediaHash, association.output.decodedMediaHash); + const qualityReview = finalizeRetainedQualityReview({ + association, + draft: draftReview, + reviewer: approval.reviewer, + reviewedAt: approval.reviewedAt, + }); + return { + association: { ...association, qualityReviewHash: galleryJsonHash(qualityReview) }, + qualityReview, + recipe, + receipt: native.receipt, + outputBytes: files.get(after).bytes, + beforeBytes: files.get(before).bytes, + }; +} + +export async function readReviewedBoundTemplateAssociations({ approvalRoot, vite, nativeBySha }) { + const current = await readReviewBatch({ approvalRoot, vite, nativeBySha, scopes: BOUND_REVIEW_SCOPES }); + const audited = await readApprovedWhisperLcmBatch({ + approvalRoot: join(approvalRoot, 'whisper-lcm'), + vite, + nativeBySha, + }); + const sana = await readApprovedSanaReview({ approvalRoot: join(approvalRoot, 'sana-sprint'), vite, nativeBySha }); + const wav2vec2 = await readApprovedWav2Vec2Review({ + approvalRoot: join(approvalRoot, 'wav2vec2'), + vite, + nativeBySha, + }); + const records = [...current, ...audited, ...wav2vec2]; + if (sana) records.push(sana); + const associations = new Map(); + for (const { association } of records) { + assert.ok(!associations.has(association.workflowId), 'Retained Gallery workflow association is duplicated.'); + associations.set(association.workflowId, association); + } + return associations; +} diff --git a/scripts/retained-template-association.test.mjs b/scripts/retained-template-association.test.mjs new file mode 100644 index 00000000..d1804299 --- /dev/null +++ b/scripts/retained-template-association.test.mjs @@ -0,0 +1,170 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { test } from 'node:test'; +import { assessRetainedTemplateAssociation, finalizeRetainedQualityReview } from './retained-template-association.mjs'; +import { canonicalJsonHash, validateQualityReview } from './template-gallery-harness.mjs'; + +const sha = (bytes) => createHash('sha256').update(bytes).digest('hex'); + +function fixture() { + const templateId = 'marigold_depth_synthetic_ramp'; + const workflowId = 'MarigoldDepthPipeline:depth_estimation'; + const sourceTaskTemplateId = 'task-template:marigold-depth-lcm-v1-0:depth-estimation:v1'; + const model = { repoId: 'prs-eth/marigold-depth-lcm-v1-0', revision: 'a'.repeat(40) }; + const descriptorBytes = Buffer.from('verified descriptor'); + const input = Buffer.from('verified native input'); + const output = Buffer.from('verified native output'); + const inputSha256 = sha(input); + const retainedGraphHash = `sha256:canonical-graph-v1:${'b'.repeat(64)}`; + const catalogLock = { + templateLockHash: 'tpl_00000000', + galleryTemplateLockHash: 'tpl_11111111', + promptSettingsHash: 'ps_00000000', + }; + return { + recipe: { + workflowId, + sourceTaskTemplateId, + retainedGraphHash, + originalReceiptSha256: sha(descriptorBytes), + reviewedCatalogLock: { ...catalogLock }, + inputSha256, + inputFileName: 'marigold-depth-source.png', + template: { + id: templateId, + mode: 'depth_estimation', + modelType: 'MarigoldDepthPipeline', + modelArtifact: { value: model.repoId, revision: model.revision }, + example: { lockedSettings: { resourceMode: 'expert' }, expectedOutput: { width: 64, height: 48 } }, + inputBindings: [{ origin: 'user', field: 'referenceImages', count: 1 }], + }, + }, + candidate: { + templateId, + workflowId, + sourceTaskContractId: sourceTaskTemplateId, + qualityDecision: 'accepted_with_disclosed_limitations', + redistributionConfirmed: true, + draftReviewSha256: 'c'.repeat(64), + draftProvenanceSha256: 'd'.repeat(64), + }, + native: { + descriptorBytes, + evidence: { inputs: [{ sourceValue: 'marigold-depth-source.png', file: { sha256: inputSha256 } }] }, + receipt: { + workflowId, + sourceTemplateId: sourceTaskTemplateId, + proofKind: 'real_backend_input_bound_model_variant', + modelType: 'MarigoldDepthPipeline', + task: 'depth_estimation', + modelSet: [model], + graphHash: retainedGraphHash, + resourceCandidateId: null, + canonicalDefaultsExecuted: false, + taskId: 'retained-private-task', + outputHash: `sha256:bytes:${sha(output)}`, + runtimeFingerprint: `sha256:stable-runtime-v1:${'e'.repeat(64)}`, + inputBinding: { sha256: inputSha256 }, + decodedOutput: { width: 64, height: 48, hash: `sha256:decoded-rgba:${'f'.repeat(64)}` }, + executionDurationSeconds: 2.3, + peakMemoryBytes: 16000000, + observationLimits: { numericDepthPrediction: false, fullConsumedFieldAccounting: false }, + qualificationClaims: { publicTemplate: false, modelResourceQualified: false }, + }, + }, + galleryInput: { ref: { sha256: inputSha256 }, bytes: input }, + galleryOutput: { ref: { sha256: sha(output) }, bytes: output }, + catalogLock, + }; +} + +test('binds an accepted source image and result to the observed recipe without inventing run locks', () => { + const reviewed = fixture(); + const before = structuredClone(reviewed.native.receipt); + const result = assessRetainedTemplateAssociation(reviewed); + assert.equal(result.qualificationScope, 'exact_retained_recipe'); + assert.equal(result.originalTemplateLockHash, null); + assert.equal(result.originalResourceCandidateId, null); + assert.equal(result.releaseApprovalGranted, false); + assert.equal(result.output.decodedMediaHash, before.decodedOutput.hash); + assert.equal(result.observedExecution.peakMemoryBytes, before.peakMemoryBytes); + assert.equal(result.observedExecution.observationLimits.numericDepthPrediction, false); + assert.deepEqual(reviewed.native.receipt, before); +}); + +test('uses the normal Gallery verifier for the approved limited technical example', () => { + const association = assessRetainedTemplateAssociation(fixture()); + const review = finalizeRetainedQualityReview({ + association, + draft: { + rubric: { taskAdherence: 3, artifactControl: 4, modalityQuality: 3 }, + scores: { promptAdherence: 3, composition: 3, technicalExecution: 4, templateUsefulness: 2 }, + hardFailures: [], + objectiveChecks: { status: 'pass', checks: ['Image decodes at retained dimensions.'] }, + modalityReview: { status: 'pass', method: 'Review native output', findings: ['Preview is visible.'] }, + summary: 'The output demonstrates preview delivery at source size.', + knownLimitations: ['The ramp provides no relative depth ground truth.'], + }, + reviewer: 'Maintainer', + reviewedAt: '2026-11-19T13:00:00.000Z', + }); + const { maintainerAcceptance, ...accepted } = review; + assert.equal(maintainerAcceptance.acceptedReviewHash, canonicalJsonHash(accepted)); + assert.equal(review.scores.templateUsefulness, 2); + const changed = { ...review, scores: { ...review.scores, templateUsefulness: 3 } }; + assert.match( + validateQualityReview(changed, {}, 'approved_reviewed').join(' '), + /must bind the exact accepted review/u, + ); +}); + +test('rejects changed scope, approval, recipe, model or delivery', () => { + for (const alter of [ + (value) => { + value.recipe.template.id = 'shap_e_radio'; + }, + (value) => { + value.candidate.redistributionConfirmed = false; + }, + (value) => { + value.candidate.qualityDecision = 'approved'; + }, + (value) => { + value.recipe.retainedGraphHash += '-changed'; + }, + (value) => { + value.catalogLock.templateLockHash = 'tpl_22222222'; + }, + (value) => { + value.recipe.template.modelArtifact.revision = 'b'.repeat(40); + }, + (value) => { + value.recipe.template.example.lockedSettings.resourceMode = 'auto'; + }, + (value) => { + value.recipe.template.example.expectedOutput.width = 65; + }, + (value) => { + value.galleryInput.ref.sha256 = 'f'.repeat(64); + }, + (value) => { + value.galleryOutput.ref.sha256 = 'f'.repeat(64); + }, + (value) => { + value.galleryOutput.bytes = Buffer.from('different bytes'); + }, + (value) => { + value.native.descriptorBytes = Buffer.from('different descriptor'); + }, + (value) => { + value.native.receipt.resourceCandidateId = 'unobserved-candidate'; + }, + (value) => { + value.native.receipt.qualificationClaims.modelResourceQualified = true; + }, + ]) { + const value = fixture(); + alter(value); + assert.throws(() => assessRetainedTemplateAssociation(value)); + } +}); diff --git a/scripts/review-generation-campaign.mjs b/scripts/review-generation-campaign.mjs index 32e08189..cca0a43a 100644 --- a/scripts/review-generation-campaign.mjs +++ b/scripts/review-generation-campaign.mjs @@ -9,7 +9,18 @@ * Gallery-registered. */ import { spawnSync } from 'node:child_process'; -import { existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from 'node:fs'; +import { createHash, randomUUID } from 'node:crypto'; +import { + existsSync, + lstatSync, + mkdirSync, + readFileSync, + readdirSync, + renameSync, + rmSync, + statSync, + writeFileSync, +} from 'node:fs'; import { dirname, extname, join, resolve } from 'node:path'; import { fileURLToPath, pathToFileURL } from 'node:url'; import { chromium } from 'playwright'; @@ -22,6 +33,8 @@ import { requireAppDownloadsIdle, } from './template-gallery-runner.mjs'; import { classifyCampaignFailure, writeRetryLedger } from './generation-campaign-retry-ledger.mjs'; +import { writeJsonAtomic } from './example-generation-queue.mjs'; +import { sha256Value } from './live-proof-provenance.mjs'; const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url)); const CLIENT_ROOT = resolve(SCRIPT_DIR, '..'); @@ -323,73 +336,114 @@ export function isCampaignImagePayload(buffer) { ); } +function exactCampaignReceipt(receipt, taskId) { + const task = receipt?.task; + if (task?.task_id !== taskId || task.status !== 'completed' || !Array.isArray(receipt.outputs)) { + throw new Error(`Run receipt does not match completed task ${taskId}.`); + } + const snapshots = [receipt.workflow_snapshot, task.workflow_snapshot].filter((snapshot) => snapshot != null); + const snapshotHashes = snapshots.map((snapshot) => { + if (!Array.isArray(snapshot.nodes) || !Array.isArray(snapshot.edges)) { + throw new Error(`Run receipt has a malformed workflow snapshot for task ${taskId}.`); + } + return sha256Value('campaign-workflow-snapshot', snapshot); + }); + if (new Set(snapshotHashes).size > 1) throw new Error(`Run receipt workflow snapshots disagree for task ${taskId}.`); + const runtime = task.runtimeFingerprint; + const fingerprint = /^sha256:[a-f0-9]{64}$/u; + if (runtime != null && (!fingerprint.test(runtime.fingerprint) || !fingerprint.test(runtime.resourceFingerprint))) { + throw new Error(`Run receipt has malformed runtime identities for task ${taskId}.`); + } + return { + outputs: receipt.outputs, + workflowSnapshotHash: snapshotHashes[0] ?? null, + runtimeFingerprint: runtime + ? { fingerprint: runtime.fingerprint, resourceFingerprint: runtime.resourceFingerprint } + : null, + }; +} + export async function copyOutput(page, run, frontendUrl, destination, mediaKind, options = {}) { const fetchImpl = options.fetchImpl || fetch; const outputWaitMs = options.outputWaitMs ?? 20_000; const server = options.server || SERVER; + const kind = String(mediaKind || ''); + const wantImage = kind + ? /image/i.test(kind) && !/video|audio|caption/i.test(kind) + : /text_to_image|edit_image|inpaint|outpaint|control/i.test(String(destination)); + const expectedKind = wantImage ? 'image' : ['audio', 'video'].includes(kind) ? kind : null; + const receiptResponse = await fetchImpl(new URL(`/runs/${encodeURIComponent(run.taskId)}`, server), { + redirect: 'error', + signal: AbortSignal.timeout(30_000), + }); + if (!receiptResponse.ok && receiptResponse.status !== 404) + throw new Error(`Could not read run receipt for task ${run.taskId}: HTTP ${receiptResponse.status}.`); + const receipt = receiptResponse.ok ? exactCampaignReceipt(await receiptResponse.json(), run.taskId) : null; + let output = receipt?.outputs + .filter((item) => item?.url && (item.taskId ?? item.task_id) === run.taskId) + .filter((item) => !expectedKind || String(item.displayType || item.mediaKind || '').includes(expectedKind)) + .at(-1); + const captureSource = output ? 'run-receipt' : 'live-output'; const deadline = Date.now() + outputWaitMs; - let output = null; - const wantImage = - /image/i.test(String(mediaKind || '')) || - /text_to_image|edit_image|inpaint|outpaint|control/i.test(String(destination)); - while (Date.now() < deadline) { + while (!output && Date.now() < deadline) { output = await page.evaluate( - ({ taskId, startedAt, wantImage: preferImage }) => { + ({ taskId, expectedKind }) => { const outputs = window.__MODIFF_E2E__?.getState()?.studio?.outputs ?? []; const matches = outputs.filter((item) => { - if (!item?.url) return false; - if (item.taskId === taskId || item.task_id === taskId) return true; - return Number(item.createdAt ?? 0) >= startedAt; + return item?.url && (item.taskId ?? item.task_id) === taskId; }); - const isImage = (item) => { - const type = String(item.displayType || item.mediaKind || ''); - const url = String(item.url || ''); - return /image|png|jpe?g|webp/i.test(`${type} ${url}`); - }; - if (preferImage) { - const images = matches.filter(isImage); - if (images.length) return images.at(-1); - return null; - } - return matches.at(-1) ?? null; + return ( + matches + .filter((item) => !expectedKind || String(item.displayType || item.mediaKind || '').includes(expectedKind)) + .at(-1) ?? null + ); }, - { taskId: run.taskId, startedAt: run.startedAt, wantImage }, + { taskId: run.taskId, expectedKind }, ); - if (output?.url) break; + if (output?.url && (output.taskId ?? output.task_id) === run.taskId) break; + output = null; await new Promise((resolve) => setTimeout(resolve, 500)); } - if (!output?.url) { - const receiptResponse = await fetchImpl(new URL(`/runs/${encodeURIComponent(run.taskId)}`, server)); - if (receiptResponse.ok) { - const receipt = await receiptResponse.json(); - const outputs = Array.isArray(receipt?.outputs) - ? receipt.outputs - : Array.isArray(receipt?.run?.outputs) - ? receipt.run.outputs - : []; - const matches = outputs.filter( - (item) => item?.url && (item.taskId === run.taskId || item.task_id === run.taskId), - ); - if (wantImage) { - output = matches.filter((item) => /image/i.test(String(item.displayType || item.mediaKind || ''))).at(-1); - } else { - output = matches.at(-1); - } - } - } if (!output?.url) throw new Error(`No studio output URL for task ${run.taskId}.`); - const absoluteUrl = new URL(output.url, frontendUrl).toString(); - const response = await fetchImpl(absoluteUrl); + const location = new URL(output.url, captureSource === 'run-receipt' ? server : frontendUrl); + if ( + location.protocol !== 'data:' && + (location.username || + location.password || + ![new URL(server).origin, new URL(frontendUrl).origin].includes(location.origin)) + ) { + throw new Error(`Studio output for task ${run.taskId} is outside the app origin.`); + } + const absoluteUrl = location.href; + const response = await fetchImpl(absoluteUrl, { redirect: 'error', signal: AbortSignal.timeout(120_000) }); if (!response.ok) throw new Error(`Could not fetch output ${absoluteUrl}: HTTP ${response.status}`); const buffer = Buffer.from(await response.arrayBuffer()); + const mediaHash = `sha256:bytes:${createHash('sha256').update(buffer).digest('hex')}`; + if (output.mediaHash != null && output.mediaHash !== mediaHash) + throw new Error(`Studio output for task ${run.taskId} does not match its recorded media hash.`); if (wantImage && !isCampaignImagePayload(buffer)) { throw new Error( `Studio output for task ${run.taskId} was not a recognized campaign image (${buffer.length} bytes).`, ); } const extension = extensionForCampaignOutput(output, absoluteUrl, response.headers.get('content-type')); - writeFileSync(destination + extension, buffer); - return destination + extension; + const filePath = destination + extension; + if (existsSync(filePath)) throw new Error(`Campaign output already exists: ${filePath}.`); + const temporary = `${filePath}.${randomUUID()}.tmp`; + try { + writeFileSync(temporary, buffer, { flag: 'wx' }); + renameSync(temporary, filePath); + } finally { + rmSync(temporary, { force: true }); + } + return { + filePath, + captureSource, + mediaHash, + matchedRecordedHash: output.mediaHash === mediaHash, + workflowSnapshotHash: receipt?.workflowSnapshotHash ?? null, + runtimeFingerprint: receipt?.runtimeFingerprint ?? null, + }; } export function destinationStem(workflowId) { @@ -447,10 +501,7 @@ function mergeResults(previous, next) { function writeReport(results) { const merged = mergeResults(loadPreviousResults(), results); const completed = merged.filter((item) => item.status === 'completed').length; - writeFileSync( - CAMPAIGN_REPORT_PATH, - `${JSON.stringify({ server: SERVER, completed, total: merged.length, results: merged }, null, 2)}\n`, - ); + writeJsonAtomic(CAMPAIGN_REPORT_PATH, { server: SERVER, completed, total: merged.length, results: merged }); writeRetryLedger(CAMPAIGN_REPORT_PATH, CAMPAIGN_RETRY_PATH); return CAMPAIGN_REPORT_PATH; } @@ -680,18 +731,19 @@ async function runSkeleton(page, skeleton, args, results, capability) { timeoutMs: args.timeoutMs, }); mkdirSync(join(RAW_ROOT, workflowId.replace(/:/g, '__')), { recursive: true }); - const filePath = await copyOutput( + const retained = await copyOutput( page, run, args.frontendUrl, destinationStem(workflowId), skeleton.mediaKind || skeleton.mode, + { server: args.server }, ); results.push({ workflowId, skeletonId: skeleton.id, taskId: run.taskId, - filePath, + ...retained, status: 'completed', resourceMode: preferAuto ? 'auto' : 'expert', }); diff --git a/scripts/reviewed-value-ports-v2.test.mjs b/scripts/reviewed-value-ports-v2.test.mjs index f9ccd8f9..65f32860 100644 --- a/scripts/reviewed-value-ports-v2.test.mjs +++ b/scripts/reviewed-value-ports-v2.test.mjs @@ -4,7 +4,12 @@ import { createServer } from 'vite'; let server, add; before(async () => { - server = await createServer({ configFile: false, logLevel: 'silent', server: { middlewareMode: true, watch: null } }); + server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + }); ({ addReviewedValuePortsV2: add } = await server.ssrLoadModule('/src/studio/reviewedValuePortsV2.ts')); }); after(async () => { @@ -86,3 +91,138 @@ test('an input with the same upstream name as a media output gets a distinct soc assert.equal(params.state_input__images.display, 'input'); assert.equal('value' in params.state_input__images, false); }); + +const oldBlock = { + id: `diffusers.modular-block:Original:sha256:${'a'.repeat(64)}`, + contentHash: `sha256:${'a'.repeat(64)}`, +}; +const newBlock = { + id: `diffusers.modular-block:Added:sha256:${'b'.repeat(64)}`, + contentHash: `sha256:${'b'.repeat(64)}`, +}; + +function conflictingSchema(display = 'output', oldType = 'int', newType = 'latent') { + return { + type: newType, + display, + label: 'Positions', + description: 'new union description', + fieldOptions: { + unrelated: 'retained', + reviewedBlockFieldSchemasV1: { + schemaVersion: 1, + alternatives: [ + { + blockDefinitionId: oldBlock.id, + blockContractHash: oldBlock.contentHash, + params: { type: oldType, display, label: 'Positions', description: 'original description' }, + }, + { + blockDefinitionId: newBlock.id, + blockContractHash: newBlock.contentHash, + params: { type: newType, display, label: 'Positions', description: 'new description' }, + }, + ], + }, + }, + }; +} + +test('adding another block cannot change an existing immutable output socket type', () => { + const published = { state_output__positions: conflictingSchema() }; + const before = JSON.stringify(published); + const original = {}, + added = {}; + add(original, published, [], [{ name: 'positions' }], 'step', oldBlock); + add(added, published, [], [{ name: 'positions' }], 'step', newBlock); + assert.equal(original.state_output__positions.type, 'int'); + assert.equal(original.state_output__positions.description, 'original description'); + assert.equal(added.state_output__positions.type, 'latent'); + assert.deepEqual(original.state_output__positions.fieldOptions, { unrelated: 'retained' }); + assert.equal(JSON.stringify(published), before); +}); + +test('exact conditional input types preserve unconnected Pipeline State semantics', () => { + const published = { positions: { ...conflictingSchema('input'), default: 77, value: 77 } }; + const params = {}; + add(params, published, [{ name: 'positions', description: 'selected upstream field' }], [], 'step', oldBlock); + assert.equal(params.positions.type, 'int'); + assert.equal(params.positions.display, 'input'); + assert.equal('default' in params.positions, false); + assert.equal('value' in params.positions, false); + assert.equal(params.positions.required, false); + assert.equal( + params.positions.description, + 'selected upstream field Unconnected: use the upstream Pipeline State value.', + ); + assert.deepEqual(params.positions.fieldOptions, { unrelated: 'retained' }); +}); + +test('exact loop aliases preserve iteration wrappers rather than raw output types', () => { + const published = { + iteration_input__positions: conflictingSchema( + 'input', + ['int', 'modular_loop_value'], + ['latent', 'modular_loop_value'], + ), + iteration_output__positions: conflictingSchema('output', 'modular_loop_value', 'modular_loop_value'), + iteration_previous__positions: conflictingSchema('output', 'modular_loop_value', 'modular_loop_value'), + }; + const params = {}; + add(params, published, [{ name: 'positions' }], [{ name: 'positions' }], 'loop_member', oldBlock); + assert.deepEqual(params.iteration_input__positions.type, ['int', 'modular_loop_value']); + assert.equal(params.iteration_output__positions.type, 'modular_loop_value'); + assert.equal(params.iteration_previous__positions.type, 'modular_loop_value'); + assert.ok(Object.values(params).every((param) => !('reviewedBlockFieldSchemasV1' in param.fieldOptions))); +}); + +for (const [name, mutate, selection] of [ + ['missing selected block', () => {}, undefined], + ['foreign selected block', () => {}, { id: 'foreign', contentHash: oldBlock.contentHash }], + ['mismatched selected hash', () => {}, { ...oldBlock, contentHash: newBlock.contentHash }], + ['duplicate block identity', (value) => value.alternatives.push(structuredClone(value.alternatives[0])), oldBlock], + [ + 'mismatched published hash', + (value) => { + value.alternatives[0].blockContractHash = newBlock.contentHash; + }, + oldBlock, + ], + [ + 'unknown metadata version', + (value) => { + value.schemaVersion = 2; + }, + oldBlock, + ], + [ + 'executable field payload', + (value) => { + value.alternatives[0].params.onChange = 'foreign'; + }, + oldBlock, + ], + [ + 'invalid socket type', + (value) => { + value.alternatives[0].params.type = 77; + }, + oldBlock, + ], + [ + 'unbounded alternatives', + (value) => { + value.alternatives = Array(4097).fill(value.alternatives[0]); + }, + oldBlock, + ], +]) { + test(`exact field alternatives refuse ${name}`, () => { + const output = conflictingSchema(); + mutate(output.fieldOptions.reviewedBlockFieldSchemasV1); + assert.throws( + () => add({}, { state_output__positions: output }, [], [{ name: 'positions' }], 'step', selection), + /exact reviewed block field schema/u, + ); + }); +} diff --git a/scripts/run-activity.test.mjs b/scripts/run-activity.test.mjs index 337f15f2..84e8b45a 100644 --- a/scripts/run-activity.test.mjs +++ b/scripts/run-activity.test.mjs @@ -7,6 +7,9 @@ import { createServer } from 'vite'; const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); let activityModule; +let durationModule; +let modelInstallModule; +let outputContracts; let flowStoreModule; let issueStoreModule; let settingsStoreModule; @@ -16,6 +19,83 @@ let taskStoreModule; let server; let originalFetch; +test('Queue terminal details supersede stale progress while retaining failure diagnostics', () => { + const stale = { + message: 'Running modules.Primitive.DataViewer', + phase: 'executing', + current_step: 2, + total_steps: 4, + }; + assert.equal(activityModule.runActivityDetailForTask({ ...stale, status: 'completed' }), 'Completed'); + assert.equal(activityModule.runActivityDetailForTask({ ...stale, status: 'cancelled' }), 'Cancelled'); + assert.equal( + activityModule.runActivityDetailForTask({ ...stale, status: 'failed', error: 'Load failed' }), + 'Load failed', + ); + assert.equal( + activityModule.runActivityDetailForTask({ status: 'failed', message: 'Worker exited' }), + 'Worker exited', + ); + assert.match(activityModule.runActivityDetailForTask({ ...stale, status: 'running' }), /Running|2/u); +}); + +test('Queue accepts batch upscale frame progress through the existing phase contract', () => { + const detail = activityModule.runActivityDetailForTask({ + status: 'running', + phase: 'upscaling', + message: 'Upscaling frame 1/405', + current_step: 1, + total_steps: 405, + elapsed_seconds: 0.4, + average_step_seconds: 0.4, + eta_seconds: 161.6, + }); + assert.match(detail, /Upscaling frame 1\/405/u); + assert.match(detail, /Phase: upscaling/u); + assert.match(detail, /Step 1\/405/u); + assert.match(detail, /ETA/u); +}); + +test('Session and queue duration labels carry rounded seconds and preserve short or missing values', () => { + const { formatRunDuration } = durationModule; + for (const [milliseconds, expected] of [ + [0, '0ms'], + [425, '425ms'], + [2500, '2.5s'], + [60000, '1:00'], + [1559499, '25:59'], + [1559500, '26:00'], + [3599499, '59:59'], + [3599500, '60:00'], + [undefined, '-'], + [Number.NaN, '-'], + ]) { + assert.equal(formatRunDuration(milliseconds), expected); + } +}); + +test('Run progress details and download estimates carry across minute and hour boundaries', () => { + const detail = activityModule.runActivityDetailForTask({ + status: 'running', + current_step: 1, + total_steps: 2, + elapsed_seconds: 1559.5, + eta_seconds: 119.5, + phase_timings: { component_loading: 3599.5 }, + }); + assert.match(detail, /Elapsed 26m 0s · ETA 2m 0s · Phase timings: component loading 60m 0s/u); + assert.match(activityModule.runActivityDetailForTask({ status: 'running', elapsed_seconds: 0 }), /Elapsed 0s/u); + assert.doesNotMatch(activityModule.runActivityDetailForTask({ status: 'running' }), /Elapsed/u); + + const { formatDownloadEta, formatDownloadDuration } = modelInstallModule; + assert.equal(formatDownloadEta(7140), '1 hr 59 min'); + assert.equal(formatDownloadEta(7199.5), '2 hr 0 min'); + assert.equal(formatDownloadEta(7200), '2 hr 0 min'); + assert.equal(formatDownloadDuration(1, 7200.5), '2 hr 0 min'); + assert.equal(formatDownloadEta(0), ''); + assert.equal(formatDownloadEta(undefined), ''); +}); + before(async () => { const storage = new Map(); globalThis.localStorage = { @@ -28,8 +108,15 @@ before(async () => { removeItem: (key) => storage.delete(key), setItem: (key, value) => storage.set(key, String(value)), }; + const sessionValues = new Map(); + globalThis.sessionStorage = { + getItem: (key) => sessionValues.get(key) ?? null, + setItem: (key, value) => sessionValues.set(key, String(value)), + removeItem: (key) => sessionValues.delete(key), + }; globalThis.window = { localStorage: globalThis.localStorage, + sessionStorage: globalThis.sessionStorage, location: { origin: 'http://127.0.0.1:5191' }, }; server = await createServer({ @@ -41,6 +128,9 @@ before(async () => { appType: 'custom', }); activityModule = await server.ssrLoadModule('/src/studio/runActivity.ts'); + durationModule = await server.ssrLoadModule('/src/utils/formatExecutionTime.ts'); + modelInstallModule = await server.ssrLoadModule('/src/studio/modelInstall.ts'); + outputContracts = await server.ssrLoadModule('/src/studio/outputContracts.ts'); flowStoreModule = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); issueStoreModule = await server.ssrLoadModule('/src/stores/useRunIssueStore.ts'); settingsStoreModule = await server.ssrLoadModule('/src/stores/useSettingsStore.ts'); @@ -120,6 +210,39 @@ function output(overrides = {}) { }; } +test('run outputs preserve declared JSON with backend file URLs and structured, null and zero values', () => { + for (const value of [{ message: '', values: [false, 'हैलो'] }, null, 0]) { + for (const withMediaItem of [false, true]) { + const url = '/file?file=%40data%2Fstudio%2Foutputs%2Frecorded.json'; + const record = output({ + displayType: 'json', + url, + value, + mediaItems: withMediaItem ? [{ index: 0, displayType: 'json', url, value }] : undefined, + }); + const items = activityModule.mediaViewerItemsForRun([record]); + assert.equal(items.length, 1); + assert.equal(items[0].kind, 'text'); + assert.equal(items[0].text, JSON.stringify(value, null, 2)); + assert.equal(items[0].url, undefined); + } + } +}); + +test('run outputs retain explicit null from parsed JSON history and per-item captures', () => { + const url = '/file?file=recorded.json'; + for (const withMediaItem of [false, true]) { + const record = outputContracts.coerceStudioOutput({ + id: 'parsed-json', + displayType: 'json', + url, + value: withMediaItem ? { legacy: 'fallback' } : null, + mediaItems: withMediaItem ? [{ index: 0, displayType: 'json', url, value: null }] : undefined, + }); + assert.equal(activityModule.mediaViewerItemsForRun([record])[0].text, 'null'); + } +}); + function deferredResponse() { let resolve; const promise = new Promise((settle) => { @@ -256,7 +379,139 @@ test('same-text run notifications remain individually actionable by task', () => ); }); -test('the browser crash checkpoint remains bounded and always retains the active workflow', () => { +test('the browser checkpoint preserves every dirty document beyond twelve tabs', () => { + const tabs = Array.from({ length: 15 }, (_, index) => ({ + id: `unsaved-${index}`, + title: `Unsaved ${index}`, + createdAt: index, + updatedAt: index, + dirty: true, + source: 'manual', + snapshot: { + nodes: [ + { + id: `text-${index}`, + position: { x: index, y: 0 }, + type: 'custom', + data: { module: 'modules.Primitive', action: 'Text', params: { value: { value: `Keep ${index}` } } }, + }, + ], + edges: [{ id: `wire-${index}`, source: `text-${index}`, target: `viewer-${index}` }], + }, + })); + const checkpoint = studioStoreModule.workflowTabsForLocalCheckpoint(tabs, 'unsaved-14'); + assert.deepEqual(checkpoint, tabs); + const store = studioStoreModule.useStudioStore; + const before = store.getState(); + try { + store.setState({ workflowTabs: tabs, activeWorkflowTabId: 'unsaved-14' }); + assert.deepEqual(JSON.parse(sessionStorage.getItem('modiff.studio')).state.workflowTabs, tabs); + } finally { + store.setState(before); + } +}); + +test('checkpoint quota failure visibly requests preservation and clears only after a successful write', () => { + const write = sessionStorage.setItem; + const warn = console.warn; + const store = studioStoreModule.useStudioStore; + const messages = []; + try { + console.warn = (...args) => messages.push(args); + sessionStorage.setItem = () => { + throw new DOMException('Full', 'QuotaExceededError'); + }; + store.setState({ launcherDismissed: true }); + store.setState({ launcherDismissed: false }); + const warnings = snackbarModule.getToastItems().filter((item) => item.id === 'studio-checkpoint-write-failed'); + assert.equal(warnings.length, 1); + assert.equal(warnings[0].persist, true); + assert.match(warnings[0].message, /Save or export unsaved workflows before refreshing/); + sessionStorage.setItem = write; + store.setState({ launcherDismissed: true }); + assert.equal( + snackbarModule.getToastItems().some((item) => item.id === 'studio-checkpoint-write-failed'), + false, + ); + } finally { + sessionStorage.setItem = write; + console.warn = warn; + store.setState({ launcherDismissed: false }); + } +}); + +for (const label of ['flow', 'settings']) { + test(`${label} mutations survive checkpoint quota failures with a visible preservation warning`, () => { + const store = label === 'flow' ? flowStoreModule.useFlowStore : settingsStoreModule.useSettingsStore; + const before = store.getState(); + const targetStorage = label === 'flow' ? sessionStorage : localStorage; + const write = targetStorage.setItem; + const warn = console.warn; + const mutation = label === 'flow' ? { viewport: { x: 17, y: 19, zoom: 0.75 } } : { isRightPanelOpen: false }; + try { + console.warn = () => {}; + targetStorage.setItem = () => { + throw new DOMException('Full', 'QuotaExceededError'); + }; + assert.doesNotThrow(() => store.setState(mutation)); + for (const [key, value] of Object.entries(mutation)) assert.deepEqual(store.getState()[key], value); + assert.equal( + snackbarModule.getToastItems().filter((item) => item.id === 'studio-checkpoint-write-failed').length, + 1, + ); + } finally { + targetStorage.setItem = write; + console.warn = warn; + store.setState(before); + } + }); +} + +test('checkpoint warning clears only after every failed namespace has recovered', () => { + const flow = flowStoreModule.useFlowStore; + const settings = settingsStoreModule.useSettingsStore; + const studio = studioStoreModule.useStudioStore; + const before = [flow.getState(), settings.getState(), studio.getState()]; + const localWrite = localStorage.setItem; + const sessionWrite = sessionStorage.setItem; + const warn = console.warn; + const failed = new Set(['modiff.flow', 'modiff.settings']); + try { + console.warn = () => {}; + const failingWrite = (storage, write) => (name, value) => { + if (failed.has(name)) throw new DOMException('Full', 'QuotaExceededError'); + return write.call(storage, name, value); + }; + localStorage.setItem = failingWrite(localStorage, localWrite); + sessionStorage.setItem = failingWrite(sessionStorage, sessionWrite); + assert.doesNotThrow(() => flow.setState({ viewport: { x: 17, y: 19, zoom: 0.75 } })); + assert.doesNotThrow(() => settings.setState({ isRightPanelOpen: false })); + studio.setState({ launcherDismissed: true }); + assert.equal( + snackbarModule.getToastItems().filter((item) => item.id === 'studio-checkpoint-write-failed').length, + 1, + ); + failed.delete('modiff.flow'); + flow.setState(before[0]); + assert.equal( + snackbarModule.getToastItems().some((item) => item.id === 'studio-checkpoint-write-failed'), + true, + ); + failed.delete('modiff.settings'); + settings.setState(before[1]); + assert.equal( + snackbarModule.getToastItems().some((item) => item.id === 'studio-checkpoint-write-failed'), + false, + ); + } finally { + localStorage.setItem = localWrite; + sessionStorage.setItem = sessionWrite; + console.warn = warn; + [flow, settings, studio].forEach((store, index) => store.setState(before[index])); + } +}); + +test('the browser crash checkpoint bounds saved tabs and retains every dirty and active workflow', () => { const tabs = Array.from({ length: 40 }, (_, index) => ({ id: `workflow-${index}`, title: `Workflow ${index}`, @@ -268,8 +523,13 @@ test('the browser crash checkpoint remains bounded and always retains the active })); const checkpoint = studioStoreModule.workflowTabsForLocalCheckpoint(tabs, 'workflow-2'); - assert.equal(checkpoint.length, 12); + assert.equal(checkpoint.length, 15); assert.ok(checkpoint.some((tab) => tab.id === 'workflow-2')); + assert.ok(tabs.filter((tab) => tab.dirty).every((tab) => checkpoint.includes(tab))); + const savedTabs = tabs.map((tab) => ({ ...tab, dirty: false })); + const savedCheckpoint = studioStoreModule.workflowTabsForLocalCheckpoint(savedTabs, 'workflow-2'); + assert.equal(savedCheckpoint.length, 12); + assert.ok(savedCheckpoint.some((tab) => tab.id === 'workflow-2')); assert.deepEqual( checkpoint, tabs.filter((tab) => checkpoint.includes(tab)), @@ -280,6 +540,74 @@ test('the browser crash checkpoint remains bounded and always retains the active assert.equal(studioStoreModule.workflowTabsForLocalCheckpoint(Array(40).fill(tabs[0]), null).length, 12); }); +for (const intent of ['saved', 'draft']) { + test(`large inactive ${intent} graphs cannot crowd the active workflow out of its browser checkpoint`, () => { + const store = studioStoreModule.useStudioStore; + const before = store.getState(); + const originalWrite = sessionStorage.setItem; + const originalWarn = console.warn; + const tabs = Array.from({ length: 4 }, (_, index) => ({ + id: `large-saved-${index}`, + title: `Large saved ${index}`, + createdAt: index, + updatedAt: index, + dirty: false, + intent, + backendRevision: 1, + snapshot: { nodes: [{ text: 'x'.repeat(700_000) }], edges: [] }, + })); + const dirty = { ...tabs[0], id: 'unsaved-edit', dirty: true, snapshot: { nodes: [{ text: 'keep' }], edges: [] } }; + tabs.push(dirty); + try { + // Deterministic quota fault, without allocating or filling physical browser storage. + sessionStorage.setItem = (key, value) => { + if (key === 'modiff.studio' && value.length > 2_000_000) throw new Error('UNIT checkpoint quota'); + originalWrite(key, value); + }; + console.warn = () => {}; + store.setState({ workflowTabs: tabs, activeWorkflowTabId: 'large-saved-3' }); + const saved = JSON.parse(sessionStorage.getItem('modiff.studio')).state; + assert.equal(saved.activeWorkflowTabId, 'large-saved-3'); + assert.ok(saved.workflowTabs.some((tab) => tab.id === 'large-saved-3')); + assert.deepEqual( + saved.workflowTabs.find((tab) => tab.id === dirty.id), + dirty, + ); + assert.equal( + store.getState().workflowTabs, + tabs, + 'cache trimming must not close live tabs or change their documents', + ); + assert.ok(saved.workflowTabs.length < tabs.length); + } finally { + sessionStorage.setItem = originalWrite; + console.warn = originalWarn; + store.setState(before); + } + }); +} + +test('checkpoint size trimming preserves dirty, active and unacknowledged documents', () => { + const base = { + title: 'Large', + createdAt: 0, + updatedAt: 0, + dirty: false, + intent: 'saved', + backendRevision: 1, + snapshot: { nodes: [{ text: 'x'.repeat(1_200_000) }], edges: [] }, + }; + const tabs = [ + { ...base, id: 'old-saved' }, + { ...base, id: 'active' }, + { ...base, id: 'dirty', dirty: true }, + { ...base, id: 'unacknowledged', backendRevision: undefined }, + { ...base, id: 'draft', intent: 'draft' }, + ]; + const checkpoint = studioStoreModule.workflowTabsForLocalCheckpoint(tabs, 'active'); + assert.deepEqual(checkpoint, tabs.slice(1, 4)); +}); + test('reordering tabs changes only their order and persists that order', () => { const store = studioStoreModule.useStudioStore; store.getState().ensureWorkflowTabs(); @@ -297,7 +625,7 @@ test('reordering tabs changes only their order and persists that order', () => { } assert.equal(flowStoreModule.useFlowStore.getState(), flow); assert.deepEqual( - JSON.parse(localStorage.getItem('modiff.studio')).state.workflowTabs.map((tab) => tab.id), + JSON.parse(sessionStorage.getItem('modiff.studio')).state.workflowTabs.map((tab) => tab.id), after.workflowTabs.map((tab) => tab.id), ); after.moveWorkflowTab(source.id, target.id, 'after'); @@ -310,7 +638,7 @@ test('reordering tabs changes only their order and persists that order', () => { assert.equal(store.getState(), unchanged); }); -test('an open originating workflow is selected and its run node is requested for focus', async () => { +test('an explicit request to inspect the originating workflow selects the run node', async () => { const studio = studioStoreModule.useStudioStore.getState(); studio.ensureWorkflowTabs(); const originId = studioStoreModule.useStudioStore.getState().activeWorkflowTabId; @@ -319,6 +647,7 @@ test('an open originating workflow is selected and its run node is requested for const result = await activityModule.openRunActivity({ taskId: 'task-open', + preferWorkflow: true, workflowTabId: originId, nodeId: 'origin-node', status: 'completed', @@ -363,6 +692,23 @@ test('a workflow restoration error is contained and reveals the exact Queue task } }); +test('a completed run previews its exact output even when its workflow is still open', async () => { + const studio = studioStoreModule.useStudioStore.getState(); + studio.ensureWorkflowTabs(); + const workflowTabId = studioStoreModule.useStudioStore.getState().activeWorkflowTabId; + studioStoreModule.useStudioStore.setState({ outputs: [output()] }); + assert.equal( + await activityModule.openRunActivity({ + taskId: 'task-one', + clientRunId: 'client-one', + workflowTabId, + status: 'completed', + }), + 'preview', + ); + assert.equal(settingsStoreModule.useSettingsStore.getState().mediaViewerOpener.items[0].url, '/cache/output.png'); +}); + test('a completed closed workflow opens exact run output without recreating its tab', async () => { studioStoreModule.useStudioStore.setState({ outputs: [output()] }); const beforeIds = studioStoreModule.useStudioStore.getState().workflowTabs.map((tab) => tab.id); @@ -895,3 +1241,21 @@ test('a slower earlier lookup cannot replace the result of the latest activity c assert.equal(settingsStoreModule.useSettingsStore.getState().mediaViewerOpener.items[0].url, '/cache/latest.png'); assert.equal(settingsStoreModule.useSettingsStore.getState().runActivityPendingTaskId, null); }); + +test('gallery uses the saved workflow name before live tab names, with fallbacks for older outputs', () => { + const output = { prompt: 'Paint an amber cube', templateLabel: 'Image edit' }; + assert.equal( + outputContracts.outputWorkflowTitle( + { ...output, apiGraphSnapshot: { runtimeHints: { workflowTitle: 'Amber study' } } }, + 'Renamed tab', + ), + 'Amber study', + ); + assert.equal(outputContracts.outputWorkflowTitle(output, 'Saved filter'), 'Saved filter'); + assert.equal(outputContracts.outputWorkflowTitle(output), 'Image edit'); + assert.equal( + outputContracts.outputWorkflowTitle({ prompt: 'Paint an amber cube', apiGraphSnapshot: [] }), + 'Paint an amber cube', + ); + assert.equal(outputContracts.outputWorkflowTitle({ prompt: '' }), 'Workflow result'); +}); diff --git a/scripts/run-coordinator.test.mjs b/scripts/run-coordinator.test.mjs index 61b50944..d573685d 100644 --- a/scripts/run-coordinator.test.mjs +++ b/scripts/run-coordinator.test.mjs @@ -17,10 +17,13 @@ let flowStoreModule; let nodesStoreModule; let runIssueStoreModule; let runPreparationModule; +let snackbarModule; let studioStoreModule; let taskStoreModule; let websocketModule; let websocketStoreModule; +let memoryFormattingModule; +let serverActionsModule; let server; let originalFetch; @@ -62,14 +65,25 @@ before(async () => { nodesStoreModule = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); runIssueStoreModule = await server.ssrLoadModule('/src/stores/useRunIssueStore.ts'); runPreparationModule = await server.ssrLoadModule('/src/studio/runPreparation.ts'); + snackbarModule = await server.ssrLoadModule('/src/ui/snackbar.ts'); studioStoreModule = await server.ssrLoadModule('/src/stores/useStudioStore.ts'); + const connections = await server.ssrLoadModule('/src/stores/flowConnectionMutations.ts'); + connections.configureStageFieldRuntime({ + capture: studioStoreModule.captureWorkflowOperationContext, + isCurrent: studioStoreModule.workflowOperationContextIsCurrent, + field: (module, action, key) => + nodesStoreModule.useNodesStore.getState().nodesRegistry[`${module}.${action}`]?.params[key], + }); taskStoreModule = await server.ssrLoadModule('/src/stores/useTaskStore.ts'); websocketModule = await server.ssrLoadModule('/src/stores/websocketMessageHandler.ts'); websocketStoreModule = await server.ssrLoadModule('/src/stores/useWebsocketStore.ts'); + memoryFormattingModule = await server.ssrLoadModule('/src/utils/formatMemory.ts'); + serverActionsModule = await server.ssrLoadModule('/src/utils/serverActions.ts'); originalFetch = globalThis.fetch; }); beforeEach(() => { + snackbarModule.closeSnackbar(); flowStoreModule.useFlowStore.setState({ nodes: [ { @@ -647,6 +661,36 @@ test('Studio submission sends the same correlation identity that the store captu ); }); +test('prepared submission does not randomize an unused current export or change its captured canvas seed', async () => { + const flow = flowStoreModule.useFlowStore; + const nodes = structuredClone(flow.getState().nodes); + nodes[0].data.params.seed = { type: 'int', display: 'random', value: { value: 42, isRandom: true } }; + flow.setState({ nodes }); + const prepared = flow.getState().exportGraph('session-1', undefined, { randomizeSeeds: false }); + const before = structuredClone(flow.getState().nodes[0].data.params.seed); + let submitted; + globalThis.fetch = async (_url, init) => { + submitted = JSON.parse(init.body); + return jsonResponse({ task_id: 'prepared-seed', sid: 'session-1', message: 'queued' }); + }; + const random = Math.random; + Math.random = () => 0.25; + try { + const result = await coordinatorModule.coordinateGraphRun({ sid: 'session-1', preparedGraph: prepared }); + assert.deepEqual( + submitted.nodes.preview.params.seed, + JSON.parse(JSON.stringify(prepared.nodes.preview.params.seed)), + ); + assert.deepEqual(flow.getState().nodes[0].data.params.seed, before); + assert.deepEqual(result.context.graph.nodes[0].data.params.seed, before); + assert.equal(result.context.apiGraph.nodes.preview.params.seed.value, 42); + await coordinatorModule.coordinateGraphRun({ sid: 'session-1' }); + assert.equal(submitted.nodes.preview.params.seed.value, 1073741824, 'Ordinary Run still resolves a fresh seed.'); + } finally { + Math.random = random; + } +}); + test('Expert Studio submission retains its executed resource recipe while imported graphs stay generic', async () => { const baseForm = studioStoreModule.useStudioStore.getState().form; const expertForm = { @@ -1974,6 +2018,179 @@ test('dynamic field and completion messages mutate only their owning workflow ca assert.equal(flowStoreModule.useFlowStore.getState().getParam('preview', 'output', 'disabled'), false); }); +test('a whole-pipeline field update preserves old graph fields and accepts declared controls', async () => { + const context = { sid: 'session-1', ws: {}, getSid: () => 'session-1', setSid() {}, setLoopTimer() {} }; + studioStoreModule.useStudioStore.setState({ + activeWorkflowTabId: 'workflow-origin', + workflowCanvasEpoch: 12, + workflowTabs: [{ id: 'workflow-origin' }], + }); + const store = flowStoreModule.useFlowStore; + store.setState({ + nodes: [ + { + id: 'video', + type: 'custom', + position: { x: 0, y: 0 }, + data: { + type: 'custom', + module: 'modules.DiffusersVideo', + action: 'Generate', + label: 'Generate Video', + category: 'Video', + params: { + pipeline: { display: 'input', type: 'video_diffusion_pipeline' }, + stg_scale: { value: 2, hidden: false, type: 'float' }, + }, + }, + }, + ], + edges: [], + }); + const update = (field, params) => + websocketModule.handleWebsocketMessage( + { + type: 'set_field_params', + sid: 'session-1', + node: 'video', + field, + params, + workflow_tab_id: 'workflow-origin', + workflow_canvas_epoch: 12, + }, + context, + ); + update('audio_guidance_scale', { hidden: true }); + update('encoded_inputs', { hidden: false }); + update('stg_scale', { hidden: true }); + websocketModule.handleWebsocketMessage( + { + type: 'set_field_visibility', + sid: 'session-1', + node: 'video', + fields: { reference_video: true, stg_scale: false }, + workflow_tab_id: 'workflow-origin', + workflow_canvas_epoch: 12, + }, + context, + ); + await Promise.resolve(); + let params = store.getState().nodes[0].data.params; + assert.equal(Object.hasOwn(params, 'audio_guidance_scale'), false); + assert.equal(Object.hasOwn(params, 'encoded_inputs'), false); + assert.equal(Object.hasOwn(params, 'reference_video'), false); + assert.equal(params.stg_scale.hidden, true); + assert.equal(params.stg_scale.value, 2); + update('audio_guidance_scale', { hidden: false, value: 7 }); + update('encoded_inputs', { hidden: false, display: 'input', type: 'video_conditioning', required: true }); + await Promise.resolve(); + params = store.getState().nodes[0].data.params; + assert.equal(params.audio_guidance_scale.value, 7); + assert.deepEqual(params.encoded_inputs, { + disabled: false, + hidden: false, + display: 'input', + type: 'video_conditioning', + required: true, + }); +}); + +test('saved FLUX edit restores the real editors when its connected model introduces secondary guidance', async (t) => { + const saved = JSON.parse( + readFileSync(path.join(ROOT, '../MoDiff/data/graphs/studio/flux-dev-pipeline/edit-image.json'), 'utf8'), + ); + const node = saved.nodes.find((n) => n.data.action === 'Edit'); + const identity = node.data.module + '.' + node.data.action; + const toggle = 'use_guidance_scale_2'; + const amount = 'guidance_scale_2'; + assert.equal(Object.hasOwn(node.data.params, toggle), false); + assert.equal(Object.hasOwn(node.data.params, amount), false); + const catalog = nodesStoreModule.useNodesStore; + const previous = catalog.getState().nodesRegistry; + t.after(() => catalog.setState({ nodesRegistry: previous })); + const registered = { + [toggle]: { type: 'bool', default: false, hidden: true }, + [amount]: { type: 'float', display: 'slider', min: 0, max: 20, step: 0.1, default: 3.5, hidden: true }, + unrelated: { type: 'int', hidden: true }, + }; + catalog.setState({ nodesRegistry: { ...previous, [identity]: { params: registered } } }); + const store = flowStoreModule.useFlowStore; + store.getState().replaceGraph(saved); + const fields = () => store.getState().nodes.find((n) => n.id === node.id).data.params; + const edges = structuredClone(store.getState().edges); + const context = { sid: 'session-1', ws: {}, getSid: () => 'session-1', setSid() {}, setLoopTimer() {} }; + const update = (field, params) => + websocketModule.handleWebsocketMessage( + { type: 'set_field_params', sid: 'session-1', node: node.id, field, params }, + context, + ); + update(toggle, { hidden: false, label: 'Override Distilled Guidance', default: false }); + update(amount, { hidden: false, label: 'Distilled Guidance', default: 3.5 }); + update('unrelated', { hidden: true }); + await Promise.resolve(); + + assert.equal(fields()[toggle].type, 'bool'); + assert.equal(fields()[toggle].label, 'Override Distilled Guidance'); + assert.deepEqual( + [ + fields()[amount].type, + fields()[amount].display, + fields()[amount].min, + fields()[amount].max, + fields()[amount].step, + ], + ['float', 'slider', 0, 20, 0.1], + ); + assert.equal(Object.hasOwn(fields(), 'unrelated'), false); + const { nodeControlSwitches, visibleGatedNodeControls } = await server.ssrLoadModule( + '/src/workflow/gatedNodeControls.ts', + ); + const visible = (wired = '') => + visibleGatedNodeControls(nodeControlSwitches(identity), fields(), fields(), (key) => key === wired); + assert.equal(Object.hasOwn(visible(), amount), false); + assert.equal(Object.hasOwn(visible(amount), amount), true); + assert.equal(Object.hasOwn(visible(toggle), amount), true); + store.getState().setParam(node.id, toggle, true); + store.getState().setParam(node.id, amount, 7.5); + assert.equal(visible()[amount].value, 7.5); + store.getState().setParam(node.id, toggle, false); + update(amount, { hidden: false, default: 3.5 }); + await Promise.resolve(); + assert.equal(fields()[amount].value, 7.5); + assert.deepEqual(store.getState().edges, edges); + + // An explicit field type from an adapter or an authored schema wins. + update('unrelated', { type: 'string', label: 'Adapter input', hidden: false }); + assert.equal(fields().unrelated.type, 'string'); + update('unrelated', { hidden: false, label: 'Renamed adapter input' }); + assert.equal(fields().unrelated.type, 'string'); + store.getState().replaceGraph(JSON.parse(JSON.stringify(store.getState().toObject()))); + assert.equal(fields()[amount].value, 7.5); + assert.equal(fields()[toggle].value, false); + assert.equal(fields().unrelated.type, 'string'); + + // A previous client could save just the callback's partial metadata. + const broken = JSON.parse(JSON.stringify(store.getState().toObject())); + const brokenFields = broken.nodes.find((n) => n.id === node.id).data.params; + brokenFields[toggle] = { label: 'Override Distilled Guidance', hidden: false, default: false, value: false }; + brokenFields[amount] = { label: 'Distilled Guidance', hidden: false, default: 3.5, value: 8, max: 12 }; + store.getState().replaceGraph(structuredClone(broken)); + assert.equal(fields()[toggle].type, 'bool'); + assert.equal(fields()[amount].display, 'slider'); + assert.equal(fields()[amount].max, 12); + assert.equal(fields()[amount].value, 8); + + // A tab opened before its registry arrived repairs on the next active patch. + store.setState({ nodes: broken.nodes, edges: broken.edges }); + update(amount, { hidden: false }); + assert.equal(fields()[amount].type, undefined); + update(amount, { hidden: false, label: 'Distilled Guidance' }); + assert.equal(fields()[amount].type, 'float'); + assert.equal(fields()[amount].display, 'slider'); + assert.equal(fields()[amount].max, 12); + assert.equal(fields()[amount].value, 8); +}); + test('owned set_field_params messages reconcile opaque signals across connected generic fields', async () => { const context = { sid: 'session-1', @@ -2512,6 +2729,147 @@ test('a terminal event cannot borrow identity from a different current task', () assert.equal(completed?.client_run_id, undefined); }); +test('Auto cache preparation updates its running task message without changing progress or errors', () => { + const tasks = taskStoreModule.useTaskStore; + tasks.setState({ + currentTask: { + task_id: 'cache-preparation-task', + name: 'Graph execution', + status: 'running', + workflow_tab_id: 'workflow-origin', + client_run_id: 'cache-preparation-run', + progress: 37, + node_progress: 12, + current_node: 'preview', + error: 'Existing diagnostic', + message: 'Preparing the workflow', + }, + taskCount: 1, + }); + const context = { sid: 'session-1', ws: {}, getSid: () => 'session-1', setSid: () => {}, setLoopTimer: () => {} }; + websocketModule.handleWebsocketMessage( + { + type: 'auto_resource_cleanup', + sid: 'session-1', + task_id: 'cache-preparation-task', + performed: false, + message: 'Releasing previous model cache, then checking actual available memory.', + }, + context, + ); + const current = tasks.getState().currentTask; + assert.equal(current.message, 'Releasing previous model cache, then checking actual available memory.'); + assert.equal(current.progress, 37); + assert.equal(current.node_progress, 12); + assert.equal(current.current_node, 'preview'); + assert.equal(current.error, 'Existing diagnostic'); + assert.equal(current.status, 'running'); + assert.equal(current.client_run_id, 'cache-preparation-run'); + assert.equal(current.workflow_tab_id, 'workflow-origin'); + assert.equal(tasks.getState().sessionRuns[0].message, current.message); + assert.deepEqual( + snackbarModule.getToastItems().map((toast) => toast.message), + [current.message], + ); + assert.equal(flowStoreModule.useFlowStore.getState().nodes[0].data.progress, undefined); +}); + +test('Auto preparation cannot change another task or revive a terminal task', () => { + const tasks = taskStoreModule.useTaskStore; + const current = { + task_id: 'different-task', + name: 'Graph execution', + status: 'running', + progress: 42, + message: 'Denoising', + }; + tasks.setState({ currentTask: current, taskCount: 1 }); + const context = { sid: 'session-1', ws: {}, getSid: () => 'session-1', setSid: () => {}, setLoopTimer: () => {} }; + const event = { + type: 'auto_resource_cleanup', + task_id: 'previous-task', + performed: false, + message: 'Checking memory', + }; + websocketModule.handleWebsocketMessage(event, context); + assert.deepEqual(tasks.getState().currentTask, current); + assert.deepEqual(snackbarModule.getToastItems(), []); + for (const status of ['completed', 'failed', 'cancelled']) { + tasks.setState({ currentTask: { ...current, task_id: 'previous-task', status } }); + websocketModule.handleWebsocketMessage(event, context); + assert.equal(tasks.getState().currentTask.message, 'Denoising'); + assert.equal(tasks.getState().currentTask.status, status); + } + assert.deepEqual(tasks.getState().sessionRuns, []); +}); + +test('background cache preparation belongs to its task without notifying the active canvas', () => { + const tasks = taskStoreModule.useTaskStore; + tasks.setState({ + currentTask: { + task_id: 'background-task', + name: 'Background graph', + status: 'running', + workflow_tab_id: 'background-workflow', + progress: 20, + message: 'Preparing', + }, + }); + const context = { sid: 'session-1', ws: {}, getSid: () => 'session-1', setSid: () => {}, setLoopTimer: () => {} }; + websocketModule.handleWebsocketMessage( + { + type: 'auto_resource_cleanup', + task_id: 'background-task', + performed: false, + message: 'Checking actual available memory', + }, + context, + ); + assert.equal(tasks.getState().currentTask.message, 'Checking actual available memory'); + assert.deepEqual(snackbarModule.getToastItems(), []); + assert.equal(flowStoreModule.useFlowStore.getState().nodes[0].data.progress, undefined); + websocketModule.handleWebsocketMessage( + { + type: 'auto_resource_cleanup', + task_id: 'background-task', + performed: true, + reasons: ['previous model cache released'], + }, + context, + ); + assert.deepEqual( + snackbarModule.getToastItems().map((toast) => toast.message), + ['Released stale runtime resources: previous model cache released'], + ); +}); + +test('websocket parsing accepts a pre-node terminal failure without a null optional node name', () => { + // Producer contract: an ownership error can occur before execute_node supplies + // a node name. This is a serialized schema fixture, not a captured live frame. + const terminal = { + type: 'task_failed', + task_id: 'early-owner-failure', + sid: 'session-1', + node: null, + status: 'failed', + message: 'Ancillary owner boundary: foreign cached owner.', + exception_type: 'AncillaryOwnerError', + category: 'execution', + error_code: 'ancillary_owner_boundary', + oom: false, + current: null, + queued: {}, + }; + assert.deepEqual(websocketModule.parseWebsocketMessage(JSON.stringify(terminal)), terminal); + assert.equal(websocketModule.parseWebsocketMessage(JSON.stringify({ ...terminal, node_name: null })), null); + const knownNode = { + ...terminal, + node: 'provider', + node_name: 'modules.HuggingFaceTransformers.LoadImageTextToTextModel', + }; + assert.deepEqual(websocketModule.parseWebsocketMessage(JSON.stringify(knownNode)), knownNode); +}); + test('websocket parsing accepts handled Auto events and rejects malformed typed payloads', () => { assert.deepEqual( websocketModule.parseWebsocketMessage( @@ -2616,130 +2974,825 @@ test('websocket parsing accepts handled Auto events and rejects malformed typed assert.deepEqual(websocketModule.parseWebsocketMessage(JSON.stringify(exactBackendHeartbeat)), exactBackendHeartbeat); }); -test('exact backend heartbeats with null telemetry still update the task and node stores', () => { - const heartbeat = websocketModule.parseWebsocketMessage( - JSON.stringify({ - type: 'progress', - node: 'preview', - name: 'modules.Test.Preview', - task_id: 'task-heartbeat', - workflow_tab_id: 'workflow-origin', +test('native CPU executed frames retain unavailable memory measurements and node completion', () => { + // Exact execution messages captured from a native CPU service run on 2026-10-09. + // Prompt at 12:00:54.728Z; preview at 12:00:54.759Z. No model download was involved. + const frames = [ + { + type: 'executed', + node: 'prompt', + name: 'modules.Primitive.TextValue', + task_id: 'native-cpu-memory-task', attempt_index: 0, - status: 'running', - phase: 'decoding', - message: 'Decoding output', - component: null, - shard_current: null, - shard_total: null, - current_step: null, - total_steps: null, - elapsed_seconds: 12.5, - average_step_seconds: null, - eta_seconds: null, - last_heartbeat_at: 1_754_000_000, - updated_at: 1_754_000_000, - resource_snapshot: null, - phase_timings: { loading: 8.25 }, - progress: -1, - overall_progress: 42, - }), - ); - assert.ok(heartbeat); - taskStoreModule.useTaskStore.setState({ - currentTask: { - task_id: 'task-heartbeat', - workflow_tab_id: 'workflow-origin', - name: 'Graph execution', - status: 'running', - progress: 41, + status: 'succeeded', + phase: 'unknown', + progress: 100, + current_node: 'prompt', + hasChanged: true, + message: 'Recomputed: node inputs changed.', + executionTime: { last: 0, min: 0, max: 0.0009989738464355469 }, + memoryUsage: { last: null, min: null, max: null }, }, - taskCount: 1, - }); - websocketModule.handleWebsocketMessage(heartbeat, { - sid: 'session-1', - ws: {}, - getSid: () => 'session-1', - setSid: () => undefined, - setLoopTimer: () => undefined, - }); - - const task = taskStoreModule.useTaskStore.getState().currentTask; - assert.equal(task.progress, 42); - assert.equal(task.node_progress, -1); - assert.equal(task.current_node, 'preview'); - assert.equal(task.phase, 'decoding'); - assert.equal(task.elapsed_seconds, 12.5); - assert.equal(task.last_heartbeat_at, 1_754_000_000); - assert.deepEqual(task.phase_timings, { loading: 8.25 }); - const node = flowStoreModule.useFlowStore.getState().nodes[0]; - assert.equal(node.data.progress, -1); - assert.equal(node.data.executionStatus, 'running'); - assert.equal(node.data.executionProgress?.component, undefined); - assert.equal(node.data.executionProgress?.step, undefined); - assert.equal(node.data.executionProgress?.resourceSnapshot, undefined); -}); - -test('backend-captured output ids are reused when the frontend enriches history', () => { - globalThis.fetch = async () => jsonResponse({ error: false, outputs: [] }); - const identity = { clientRunId: 'backend-output-client', runInputHash: 'backend-output-hash' }; - studioStoreModule.useStudioStore.getState().captureRunContext(graph(), undefined, identity); - studioStoreModule.useStudioStore - .getState() - .attachRunResponse({ task_id: 'backend-output-task', sid: 'session-1' }, identity.clientRunId); - - websocketModule.handleWebsocketMessage( { - type: 'update_value', + type: 'executed', node: 'preview', - key: 'output', - value: 'backend-output.png', - data_type: 'image', - task_id: 'backend-output-task', - client_run_id: identity.clientRunId, - run_input_hash: identity.runInputHash, - workflow_tab_id: 'workflow-origin', - output_id: 'run-output-stable', - backend_persisted: true, + name: 'modules.Primitive.DataViewer', + task_id: 'native-cpu-memory-task', + attempt_index: 0, + status: 'succeeded', + phase: 'unknown', + progress: 100, + current_node: 'preview', + hasChanged: true, + message: 'Recomputed: output was invalidated by an upstream change or recompute request.', + executionTime: { last: 0, min: 0, max: 0 }, + memoryUsage: { last: null, min: null, max: null }, }, - { + ]; + const flow = flowStoreModule.useFlowStore; + const preview = flow.getState().nodes[0]; + flow.setState({ nodes: [{ ...preview, id: 'prompt' }, preview] }); + studioStoreModule.useStudioStore + .getState() + .captureRunContext(graph(), undefined, { clientRunId: 'native-memory-run' }); + studioStoreModule.useStudioStore + .getState() + .attachRunResponse({ task_id: 'native-cpu-memory-task', sid: 'session-1' }, 'native-memory-run'); + for (const frame of frames) { + const parsed = websocketModule.parseWebsocketMessage(JSON.stringify(frame)); + assert.deepEqual(parsed, frame); + websocketModule.handleWebsocketMessage(parsed, { sid: 'session-1', ws: {}, getSid: () => 'session-1', setSid: () => undefined, setLoopTimer: () => undefined, - }, - ); - - assert.equal(studioStoreModule.useStudioStore.getState().outputs[0].id, 'run-output-stable'); + }); + const node = flow.getState().nodes.find((item) => item.id === frame.node); + assert.equal(node.data.isCached, true); + assert.equal(node.data.progress, 100); + assert.equal(node.data.executionStatus, 'succeeded'); + assert.deepEqual(node.data.memoryUsage, { last: null, min: null, max: null }); + assert.deepEqual(node.data.executionTime, frame.executionTime); + } }); -test('graph completion refreshes backend outputs for collapsed composite preview nodes', async () => { - const requests = []; +test('service execution reconciles global cache without acquiring the visible workflow', async (testContext) => { + const previousFetch = globalThis.fetch; + testContext.after(() => { + globalThis.fetch = previousFetch; + }); + const flow = flowStoreModule.useFlowStore; + const studio = studioStoreModule.useStudioStore; + let cacheReads = 0; globalThis.fetch = async (url) => { - requests.push(String(url)); - return jsonResponse({ - error: false, - version: 1, - revision: 0, - updatedAt: 0, - previewSlots: [], - outputs: [], - }); + if (String(url).endsWith('/cache')) { + cacheReads += 1; + return jsonResponse({ error: false, instance: 'service-cache-worker', cachedNodes: ['preview', 'hidden-leaf'] }); + } + return jsonResponse({ instance: 'service-cache-worker', nodes: {}, outputs: [] }); + }; + nodesStoreModule.useNodesStore.setState({ instance: 'service-cache-worker' }); + const context = { + sid: 'cache-browser', + ws: { url: 'ws://127.0.0.1:5191/ws?sid=cache-browser' }, + getSid: () => 'cache-browser', + setSid: () => undefined, + setLoopTimer: () => undefined, }; - websocketModule.handleWebsocketMessage( { - type: 'graph_completed', - task_id: 'collapsed-cluster-task', - client_run_id: 'collapsed-cluster-client', - executionTime: 125, - }, - { - sid: 'session-1', - ws: {}, - getSid: () => 'session-1', - setSid: () => undefined, - setLoopTimer: () => undefined, + type: 'welcome', + sid: 'cache-browser', + instance: 'service-cache-worker', + cachedNodes: [], + current: { task_id: 'service-cache-task', sid: 'service_private', status: 'running', attempt_index: 0 }, + queued: {}, + }, + context, + ); + const before = structuredClone({ + params: flow.getState().nodes[0].data.params, + form: studio.getState().form, + tabs: studio.getState().workflowTabs, + past: flow.getState().past, + edges: flow.getState().edges, + activeTaskId: flow.getState().nodes[0].data.activeTaskId, + progress: flow.getState().nodes[0].data.progress, + }); + assert.equal(studio.getState().currentRunContext, null, 'service has no invented Studio ownership'); + websocketModule.handleWebsocketMessage( + { type: 'executed', node: 'preview', task_id: 'service-cache-task', attempt_index: 0, status: 'succeeded' }, + context, + ); + await new Promise((resolve) => setImmediate(resolve)); + assert.equal(cacheReads, 1, 'the successful service frame requests current backend cache membership'); + assert.deepEqual(flow.getState().runtimeCachedNodeIds, ['preview', 'hidden-leaf']); + assert.equal(flow.getState().nodes[0].data.isCached, true); + assert.equal(flow.getState().nodes[0].data.activeTaskId, before.activeTaskId); + assert.equal(flow.getState().nodes[0].data.progress, before.progress); + assert.deepEqual( + { + params: flow.getState().nodes[0].data.params, + form: studio.getState().form, + tabs: studio.getState().workflowTabs, + past: flow.getState().past, + edges: flow.getState().edges, + activeTaskId: flow.getState().nodes[0].data.activeTaskId, + progress: flow.getState().nodes[0].data.progress, + }, + before, + ); + assert.deepEqual(snackbarModule.getToastItems(), []); +}); + +function serviceCacheFixture(testContext, name, cached = []) { + const previousFetch = globalThis.fetch; + testContext.after(() => { + globalThis.fetch = previousFetch; + }); + const flow = flowStoreModule.useFlowStore; + const reads = []; + let cacheResponse = () => jsonResponse({ error: false, instance: name, cachedNodes: [] }); + let releaseResponse = () => jsonResponse({ error: false, nodes: ['preview'] }); + let sid = `${name}-browser`; + const context = { + sid, + ws: { url: `ws://127.0.0.1:5191/ws?sid=${sid}` }, + getSid: () => sid, + setSid: (next) => { + sid = next; + }, + setLoopTimer: () => undefined, + }; + globalThis.fetch = async (url, init = {}) => { + if (String(url).includes('/hf_cache/') && init.method === 'DELETE') return releaseResponse(); + if (String(url).endsWith('/runtime/gpu_cleanup') && init.method === 'POST') return releaseResponse(); + if (String(url).endsWith('/cache')) { + if (init.method === 'DELETE') return releaseResponse(); + reads.push(String(url)); + return cacheResponse(); + } + return jsonResponse({ instance: name, nodes: {}, outputs: [] }); + }; + nodesStoreModule.useNodesStore.setState({ instance: name }); + const welcome = (instance = name, ws = context.ws, nextSid = sid) => { + const nextContext = { ...context, ws }; + websocketModule.handleWebsocketMessage( + { + type: 'welcome', + sid: nextSid, + instance, + cachedNodes: cached, + current: { task_id: name, sid: `service_${name}`, status: 'running', attempt_index: 0 }, + queued: {}, + }, + nextContext, + ); + return nextContext; + }; + welcome(); + return { + flow, + reads, + context, + welcome, + respondCache: (callback) => { + cacheResponse = callback; + }, + respondRelease: (callback) => { + releaseResponse = callback; + }, + execute: (overrides = {}, owner = context) => + websocketModule.handleWebsocketMessage( + { + type: 'executed', + node: 'preview', + task_id: name, + attempt_index: 0, + status: 'succeeded', + ...overrides, + }, + owner, + ), + terminal: (type = 'task_completed') => + websocketModule.handleWebsocketMessage( + { + type, + task_id: name, + sid: `service_${name}`, + current: null, + queued: {}, + }, + context, + ), + }; +} + +const flushCacheReads = () => new Promise((resolve) => setImmediate(resolve)); + +test('service cache reads coalesce and retain hidden runtime IDs without clearing unrelated progress', async (t) => { + const f = serviceCacheFixture(t, 'service-cache-coalesced'); + const first = deferredResponse(); + const second = deferredResponse(); + const replies = [first, second]; + f.respondCache(() => replies.shift().promise); + const root = blockV2Root('service-cache-block'); + const runtimeId = blockRuntimeModule.blockProjectionNodeIdV2(root.id, 'generate'); + const node = f.flow.getState().nodes[0]; + f.flow.setState({ nodes: [{ ...node, data: { ...node.data, progress: 37, activeTaskId: 'another-task' } }] }); + f.execute({ node: runtimeId }); + f.execute({ node: 'another-hidden-leaf' }); + assert.equal(f.reads.length, 1); + first.resolve(jsonResponse({ error: false, instance: 'service-cache-coalesced', cachedNodes: [runtimeId] })); + await flushCacheReads(); + assert.equal(f.reads.length, 2, 'one follow-up covers the newer execution notification'); + assert.equal(f.flow.getState().nodes[0].data.progress, 37); + assert.equal(f.flow.getState().nodes[0].data.activeTaskId, 'another-task'); + second.resolve(jsonResponse({ error: false, instance: 'service-cache-coalesced', cachedNodes: [runtimeId] })); + await flushCacheReads(); + assert.deepEqual(f.flow.getState().runtimeCachedNodeIds, [runtimeId]); + f.flow.getState().replaceGraph({ nodes: [root], edges: [], viewport: { x: 0, y: 0, zoom: 1 } }); + assert.equal( + f.flow.getState().nodes[0].data.isCached, + true, + 'exact hidden leaf projects after its Block is restored', + ); + assert.equal(f.flow.getState().toObject().runtimeCachedNodeIds, undefined); +}); + +test('service cache reconciliation rejects unrelated, old-attempt and terminal execution frames', async (t) => { + const f = serviceCacheFixture(t, 'service-cache-guards'); + for (const overrides of [ + { task_id: 'other-task' }, + { attempt_index: -1 }, + { attempt_index: 1 }, + { attempt_index: undefined }, + { attempt_index: 0.5 }, + { status: 'running' }, + { status: 'failed' }, + ]) + f.execute(overrides); + assert.equal(f.reads.length, 0); + f.terminal(); + await flushCacheReads(); + assert.equal(f.reads.length, 1, 'terminal service state reconciles actual membership once'); + f.execute(); + await flushCacheReads(); + assert.equal(f.reads.length, 1, 'a late executed frame cannot revive a terminal task'); +}); + +for (const releaseKind of ['cache release', 'GPU cleanup', 'model deletion']) { + const invokeRelease = () => + releaseKind === 'cache release' + ? serverActionsModule.deleteNodeCache(['preview']) + : releaseKind === 'GPU cleanup' + ? serverActionsModule.cleanupGpuMemory() + : serverActionsModule.deleteHfCacheEntry('model', 'plan'); + test(`service cache snapshots cannot outrun ${releaseKind} dispatch or acknowledgement`, async (t) => { + const f = serviceCacheFixture(t, `service-cache-release-${releaseKind}`); + const beforeDispatch = deferredResponse(); + const whileReleasing = deferredResponse(); + const release = deferredResponse(); + const replies = [beforeDispatch, whileReleasing]; + f.respondCache(() => + replies.length + ? replies.shift().promise + : jsonResponse({ + error: false, + instance: `service-cache-release-${releaseKind}`, + cachedNodes: [], + }), + ); + f.respondRelease(() => release.promise); + f.execute(); + const deletion = invokeRelease(); + beforeDispatch.resolve( + jsonResponse({ error: false, instance: `service-cache-release-${releaseKind}`, cachedNodes: ['preview'] }), + ); + await flushCacheReads(); + assert.equal(Boolean(f.flow.getState().nodes[0].data.isCached), false, 'dispatch retires an older read'); + f.execute(); + release.resolve( + jsonResponse({ + error: false, + nodes: ['preview'], + deleted: true, + plan: {}, + runtimeRelease: { + released: { nodes: 1, models: 0, diffusers_components: 0, offload_files: 0 }, + allocatorTrimmed: true, + errors: [], + }, + }), + ); + const result = await deletion; + for (const id of result.nodes) f.flow.getState().setNodeCached(id, false); + whileReleasing.resolve( + jsonResponse({ error: false, instance: `service-cache-release-${releaseKind}`, cachedNodes: ['preview'] }), + ); + await flushCacheReads(); + assert.equal(Boolean(f.flow.getState().nodes[0].data.isCached), false, 'ACK retires reads begun during teardown'); + f.execute(); + await flushCacheReads(); + assert.equal(f.reads.length, 3); + assert.deepEqual( + f.flow.getState().runtimeCachedNodeIds, + [], + 'late frame requests truth rather than asserting cached', + ); + }); + + test(`failed ${releaseKind} also retires in-flight reads without optimistic cache clearing`, async (t) => { + const f = serviceCacheFixture(t, `service-cache-failed-${releaseKind}`, ['preview']); + const reading = deferredResponse(); + const release = deferredResponse(); + f.respondRelease(() => release.promise); + const deletion = invokeRelease(); + f.respondCache(() => reading.promise); + f.execute(); + release.resolve(jsonResponse({ error: true, message: 'Release failed.' }, 500)); + await assert.rejects(deletion, /Release failed/); + reading.resolve(jsonResponse({ error: false, instance: `service-cache-failed-${releaseKind}`, cachedNodes: [] })); + await flushCacheReads(); + assert.equal(f.flow.getState().nodes[0].data.isCached, true); + }); +} + +test('service cache responses require the same socket and welcome worker instance', async (t) => { + const f = serviceCacheFixture(t, 'service-cache-replacement'); + const oldRead = deferredResponse(); + f.respondCache(() => oldRead.promise); + f.execute(); + const replacement = f.welcome('replacement-worker', { url: f.context.ws.url }); + oldRead.resolve(jsonResponse({ error: false, instance: 'service-cache-replacement', cachedNodes: ['preview'] })); + await flushCacheReads(); + assert.equal(Boolean(f.flow.getState().nodes[0].data.isCached), false); + nodesStoreModule.useNodesStore.setState({ instance: 'replacement-worker' }); + f.execute({}, f.context); + assert.equal(f.reads.length, 1, 'retired socket cannot schedule a cache read even with the same SID'); + f.respondCache(() => jsonResponse({ error: false, instance: 'wrong-worker', cachedNodes: ['preview'] })); + f.execute({}, replacement); + await flushCacheReads(); + assert.equal(Boolean(f.flow.getState().nodes[0].data.isCached), false); + f.respondCache(() => jsonResponse({ error: false, instance: 'replacement-worker', cachedNodes: ['preview'] })); + f.execute({}, replacement); + await flushCacheReads(); + assert.equal(f.flow.getState().nodes[0].data.isCached, true); +}); + +test('service cache snapshots are retired by acknowledged registry changes on the same socket', async (t) => { + const f = serviceCacheFixture(t, 'service-cache-registry', ['preview']); + const oldRead = deferredResponse(); + f.respondCache(() => oldRead.promise); + f.execute(); + nodesStoreModule.useNodesStore.setState({ instance: 'custom-source-acknowledgement' }); + oldRead.resolve(jsonResponse({ error: false, instance: 'service-cache-registry', cachedNodes: [] })); + await flushCacheReads(); + assert.deepEqual( + f.flow.getState().runtimeCachedNodeIds, + ['preview'], + 'pre-ACK response cannot replace current truth', + ); + f.respondCache(() => jsonResponse({ error: false, instance: 'service-cache-registry', cachedNodes: [] })); + f.execute(); + await flushCacheReads(); + assert.deepEqual( + f.flow.getState().runtimeCachedNodeIds, + ['preview'], + 'old worker identity cannot satisfy the new ACK', + ); + f.respondCache(() => jsonResponse({ error: false, instance: 'custom-source-acknowledgement', cachedNodes: [] })); + f.execute(); + await flushCacheReads(); + assert.deepEqual( + f.flow.getState().runtimeCachedNodeIds, + [], + 'a new read can bind to the acknowledged same-socket identity', + ); +}); + +test('service cache snapshots fail closed while initial registry identity lags a new welcome', async (t) => { + const f = serviceCacheFixture(t, 'service-cache-registry-lag', ['preview']); + const owner = f.welcome('new-worker'); + await flushCacheReads(); + f.respondCache(() => jsonResponse({ error: false, instance: 'new-worker', cachedNodes: [] })); + f.execute({}, owner); + await flushCacheReads(); + assert.deepEqual(f.flow.getState().runtimeCachedNodeIds, ['preview']); + nodesStoreModule.useNodesStore.setState({ instance: 'new-worker' }); + f.execute({}, owner); + await flushCacheReads(); + assert.deepEqual(f.flow.getState().runtimeCachedNodeIds, []); +}); + +test('service cache snapshots require a nonempty welcome SID and reject disconnected reads', async (t) => { + const f = serviceCacheFixture(t, 'service-cache-null-sid', ['preview']); + const pending = deferredResponse(); + f.respondCache(() => pending.promise); + f.execute(); + f.context.setSid(null); + pending.resolve(jsonResponse({ error: false, instance: 'service-cache-null-sid', cachedNodes: [] })); + await flushCacheReads(); + assert.deepEqual(f.flow.getState().runtimeCachedNodeIds, ['preview']); + for (const invalidSid of [null, '', ' ']) { + const owner = f.welcome('service-cache-null-sid', f.context.ws, invalidSid); + f.execute({}, owner); + await flushCacheReads(); + assert.equal(f.reads.length, 1, 'null or blank welcome SID never owns a cache read'); + } +}); + +test('service cache snapshots cannot overwrite newer accepted workflow cache writes', async (t) => { + const f = serviceCacheFixture(t, 'service-cache-owned-race'); + const pending = deferredResponse(); + f.respondCache(() => pending.promise); + f.terminal(); + const studio = studioStoreModule.useStudioStore; + studio.getState().captureRunContext(graph(), undefined, { clientRunId: 'new-owned-cache-run' }); + studio.getState().attachRunResponse({ task_id: 'new-owned-cache-task', sid: 'session-1' }, 'new-owned-cache-run'); + taskStoreModule.useTaskStore.setState({ + currentTask: { task_id: 'new-owned-cache-task', status: 'running', attempt_index: 0 }, + }); + f.execute({ task_id: 'new-owned-cache-task', client_run_id: 'new-owned-cache-run' }); + assert.equal(f.flow.getState().nodes[0].data.isCached, true, 'accepted owned execution records its new cache fact'); + pending.resolve(jsonResponse({ error: false, instance: 'service-cache-owned-race', cachedNodes: [] })); + await flushCacheReads(); + assert.equal( + f.flow.getState().nodes[0].data.isCached, + true, + 'older service snapshot cannot clear the newer owned execution', + ); + assert.deepEqual(f.flow.getState().runtimeCachedNodeIds, ['preview']); +}); + +test('service cache snapshots cannot repopulate owners after a newer task starts and fails before execution', async (t) => { + const f = serviceCacheFixture(t, 'service-cache-start-failure'); + const pending = deferredResponse(); + f.respondCache(() => pending.promise); + f.terminal(); + const studio = studioStoreModule.useStudioStore; + studio.getState().captureRunContext(graph(), undefined, { clientRunId: 'new-start-failure-run' }); + studio.getState().attachRunResponse({ task_id: 'new-start-failure-task', sid: 'session-1' }, 'new-start-failure-run'); + websocketModule.handleWebsocketMessage( + { + type: 'task_started', + task_id: 'new-start-failure-task', + client_run_id: 'new-start-failure-run', + current: { task_id: 'new-start-failure-task', status: 'running', attempt_index: 0 }, + queued: {}, + }, + f.context, + ); + websocketModule.handleWebsocketMessage( + { + type: 'task_failed', + task_id: 'new-start-failure-task', + client_run_id: 'new-start-failure-run', + message: 'Preparation failed before any node executed.', + current: null, + queued: {}, + }, + f.context, + ); + pending.resolve(jsonResponse({ error: false, instance: 'service-cache-start-failure', cachedNodes: ['preview'] })); + await flushCacheReads(); + assert.deepEqual(f.flow.getState().runtimeCachedNodeIds, [], 'the pre-start roster cannot restore removed owners'); + assert.equal(Boolean(f.flow.getState().nodes[0].data.isCached), false); +}); + +test('service cache snapshots reject malformed and unbounded rosters without replacing cache truth', async (t) => { + const f = serviceCacheFixture(t, 'service-cache-parser', ['preview']); + const invalid = [ + null, + { error: true, instance: 'service-cache-parser', cachedNodes: [] }, + { error: false, cachedNodes: [] }, + { error: false, instance: 'service-cache-parser', cachedNodes: 'preview' }, + { error: false, instance: 'service-cache-parser', cachedNodes: [0] }, + { error: false, instance: 'service-cache-parser', cachedNodes: [''] }, + { error: false, instance: 'service-cache-parser', cachedNodes: ['x'.repeat(16_385)] }, + { error: false, instance: 'service-cache-parser', cachedNodes: Array(30_001).fill('x') }, + { error: false, instance: 'service-cache-parser', cachedNodes: Array(129).fill('x'.repeat(16_384)) }, + ]; + for (const payload of invalid) { + f.respondCache(() => jsonResponse(payload)); + f.execute(); + await flushCacheReads(); + assert.deepEqual(f.flow.getState().runtimeCachedNodeIds, ['preview']); + } + f.respondCache(() => jsonResponse({ error: false, instance: 'service-cache-parser', cachedNodes: [] })); + f.execute(); + await flushCacheReads(); + assert.deepEqual(f.flow.getState().runtimeCachedNodeIds, [], 'a later valid snapshot remains usable'); +}); + +for (const terminal of ['task_completed', 'task_cancelled', 'task_failed']) { + test(`service ${terminal} reconciles released cache without clearing a newer task's progress`, async (t) => { + const f = serviceCacheFixture(t, `cache-${terminal}`, ['preview']); + const node = f.flow.getState().nodes[0]; + f.flow.setState({ nodes: [{ ...node, data: { ...node.data, activeTaskId: 'newer-task', progress: 61 } }] }); + f.terminal(terminal); + await flushCacheReads(); + assert.deepEqual(f.flow.getState().runtimeCachedNodeIds, []); + assert.equal(f.flow.getState().nodes[0].data.progress, 61); + assert.equal(f.flow.getState().nodes[0].data.activeTaskId, 'newer-task'); + }); +} + +test('memory measurements permit mixed finite values and null without weakening other telemetry', () => { + const message = { + type: 'executed', + node: 'preview', + hasChanged: true, + memoryUsage: { last: 0, min: null, max: 1024 }, + executionTime: { last: 0, min: 0, max: 1 }, + }; + const parsed = websocketModule.parseWebsocketMessage(JSON.stringify(message)); + assert.deepEqual(parsed, message); + websocketModule.handleWebsocketMessage(parsed, { + sid: 'session-1', + ws: {}, + getSid: () => 'session-1', + setSid: () => undefined, + setLoopTimer: () => undefined, + }); + assert.deepEqual(flowStoreModule.useFlowStore.getState().nodes[0].data.memoryUsage, message.memoryUsage); + for (const memoryUsage of [ + null, + [], + 'unknown', + { last: '0' }, + { last: false }, + { last: {} }, + { last: [] }, + { last: undefined }, + { last: Number.NaN }, + { last: Number.POSITIVE_INFINITY }, + { last: Number.NEGATIVE_INFINITY }, + ]) { + assert.equal(websocketModule.parseWebsocketMessage({ ...message, memoryUsage }), null); + } + for (const executionTime of [ + { last: null }, + { last: '0' }, + { last: Number.NaN }, + { last: Number.POSITIVE_INFINITY }, + ]) { + assert.equal(websocketModule.parseWebsocketMessage({ ...message, executionTime }), null); + } + assert.equal(websocketModule.parseWebsocketMessage({ ...message, phase_timings: { loading: null } }), null); + assert.equal( + websocketModule.parseWebsocketMessage({ ...message, phase_timings: { loading: Number.POSITIVE_INFINITY } }), + null, + ); +}); + +test('memory formatting distinguishes unavailable readings from measured zero', () => { + assert.equal(memoryFormattingModule.formatMemory(null), '-'); + assert.equal(memoryFormattingModule.formatMemory(undefined), '-'); + assert.equal(memoryFormattingModule.formatMemory(0), '0 B'); + assert.equal(memoryFormattingModule.formatMemory(1024), '1.0 KB'); + assert.equal(memoryFormattingModule.formatMemory(Number.NaN), '-'); + assert.equal(memoryFormattingModule.formatMemory(Number.POSITIVE_INFINITY), '-'); +}); + +test('exact backend heartbeats with null telemetry still update the task and node stores', () => { + const heartbeat = websocketModule.parseWebsocketMessage( + JSON.stringify({ + type: 'progress', + node: 'preview', + name: 'modules.Test.Preview', + task_id: 'task-heartbeat', + workflow_tab_id: 'workflow-origin', + attempt_index: 0, + status: 'running', + phase: 'decoding', + message: 'Decoding output', + component: null, + shard_current: null, + shard_total: null, + current_step: null, + total_steps: null, + elapsed_seconds: 12.5, + average_step_seconds: null, + eta_seconds: null, + last_heartbeat_at: 1_754_000_000, + updated_at: 1_754_000_000, + resource_snapshot: null, + phase_timings: { loading: 8.25 }, + progress: -1, + overall_progress: 42, + }), + ); + assert.ok(heartbeat); + taskStoreModule.useTaskStore.setState({ + currentTask: { + task_id: 'task-heartbeat', + workflow_tab_id: 'workflow-origin', + name: 'Graph execution', + status: 'running', + progress: 41, + }, + taskCount: 1, + }); + websocketModule.handleWebsocketMessage(heartbeat, { + sid: 'session-1', + ws: {}, + getSid: () => 'session-1', + setSid: () => undefined, + setLoopTimer: () => undefined, + }); + + const task = taskStoreModule.useTaskStore.getState().currentTask; + assert.equal(task.progress, 42); + assert.equal(task.node_progress, -1); + assert.equal(task.current_node, 'preview'); + assert.equal(task.phase, 'decoding'); + assert.equal(task.elapsed_seconds, 12.5); + assert.equal(task.last_heartbeat_at, 1_754_000_000); + assert.deepEqual(task.phase_timings, { loading: 8.25 }); + const node = flowStoreModule.useFlowStore.getState().nodes[0]; + assert.equal(node.data.progress, -1); + assert.equal(node.data.executionStatus, 'running'); + assert.equal(node.data.executionProgress?.component, undefined); + assert.equal(node.data.executionProgress?.step, undefined); + assert.equal(node.data.executionProgress?.resourceSnapshot, undefined); +}); + +for (const type of ['progress', 'task_progress', 'task_started', 'http_queue']) { + test(`${type} clears loading telemetry when the backend explicitly sends null`, () => { + const stale = { + task_id: 'task-phase-reset', + workflow_tab_id: 'workflow-origin', + name: 'Video generation', + status: 'running', + phase: 'shard_loading', + component: 'vae', + shard_current: 2, + shard_total: 2, + current_step: 4, + total_steps: 4, + eta_seconds: 3, + average_step_seconds: 2, + elapsed_seconds: 8, + resource_snapshot: { obsolete: true }, + progress: 24, + }; + const clear = { + component: null, + shard_current: null, + shard_total: null, + current_step: null, + total_steps: null, + eta_seconds: null, + average_step_seconds: null, + resource_snapshot: null, + }; + const store = taskStoreModule.useTaskStore; + store.setState({ currentTask: stale, queuedTasks: {}, sessionRuns: [], taskCount: 1 }); + store.getState().recordTaskSnapshot(stale, 'running'); + const payload = { + type, + node: 'preview', + task_id: stale.task_id, + workflow_tab_id: 'workflow-origin', + status: 'running', + phase: 'denoising', + ...clear, + progress: type === 'progress' ? -1 : 24, + ...(type === 'progress' ? { overall_progress: 24 } : {}), + ...(type === 'task_started' ? { current: stale, queued: {} } : {}), + }; + if (type === 'http_queue') { + const current = taskStoreModule.coerceTask({ ...stale, ...clear, phase: 'denoising' }); + assert.ok(current); + store.getState().setTasks(current, {}, []); + } else { + const message = websocketModule.parseWebsocketMessage(payload); + assert.ok(message); + websocketModule.handleWebsocketMessage(message, { + sid: 'session-1', + ws: {}, + getSid: () => 'session-1', + setSid: () => undefined, + setLoopTimer: () => undefined, + }); + } + for (const task of [store.getState().currentTask, store.getState().sessionRuns[0]]) { + assert.equal(task.phase, 'denoising'); + for (const key of Object.keys(clear)) assert.equal(task[key], null, key); + } + // Older/partial events omit telemetry; omission must not erase real new steps. + store.getState().updateProgress(stale.task_id, 25, undefined, { current_step: 0, total_steps: 50 }); + websocketModule.handleWebsocketMessage( + { type: 'task_progress', task_id: stale.task_id, progress: 25 }, + { + sid: 'session-1', + ws: {}, + getSid: () => 'session-1', + setSid: () => undefined, + setLoopTimer: () => undefined, + }, + ); + assert.equal(store.getState().currentTask.current_step, 0); + assert.equal(store.getState().sessionRuns[0].total_steps, 50); + }); +} + +test('late task progress cannot overwrite a terminal session run', () => { + const store = taskStoreModule.useTaskStore; + store.setState({ currentTask: undefined, queuedTasks: {}, sessionRuns: [] }); + store.getState().markTaskCompleted({ + task_id: 'completed-phase-task', + name: 'Completed video', + phase: 'completed', + progress: 100, + component: null, + current_step: null, + }); + const before = structuredClone(store.getState().sessionRuns); + const message = websocketModule.parseWebsocketMessage( + JSON.stringify({ + type: 'task_progress', + task_id: 'completed-phase-task', + phase: 'shard_loading', + component: 'vae', + current_step: 3, + progress: 18, + }), + ); + assert.ok(message); + websocketModule.handleWebsocketMessage(message, { + sid: 'session-1', + ws: {}, + getSid: () => 'session-1', + setSid: () => undefined, + setLoopTimer: () => undefined, + }); + assert.deepEqual(store.getState().sessionRuns, before); +}); + +test('backend-captured output ids are reused when the frontend enriches history', () => { + globalThis.fetch = async () => jsonResponse({ error: false, outputs: [] }); + const identity = { clientRunId: 'backend-output-client', runInputHash: 'backend-output-hash' }; + studioStoreModule.useStudioStore.getState().captureRunContext(graph(), undefined, identity); + studioStoreModule.useStudioStore + .getState() + .attachRunResponse({ task_id: 'backend-output-task', sid: 'session-1' }, identity.clientRunId); + + websocketModule.handleWebsocketMessage( + { + type: 'update_value', + node: 'preview', + key: 'output', + value: 'backend-output.png', + data_type: 'image', + task_id: 'backend-output-task', + client_run_id: identity.clientRunId, + run_input_hash: identity.runInputHash, + workflow_tab_id: 'workflow-origin', + output_id: 'run-output-stable', + backend_persisted: true, + }, + { + sid: 'session-1', + ws: {}, + getSid: () => 'session-1', + setSid: () => undefined, + setLoopTimer: () => undefined, + }, + ); + + assert.equal(studioStoreModule.useStudioStore.getState().outputs[0].id, 'run-output-stable'); +}); + +test('graph completion refreshes backend outputs for collapsed composite preview nodes', async () => { + const requests = []; + globalThis.fetch = async (url) => { + requests.push(String(url)); + return jsonResponse({ + error: false, + version: 1, + revision: 0, + updatedAt: 0, + previewSlots: [], + outputs: [], + }); + }; + + websocketModule.handleWebsocketMessage( + { + type: 'graph_completed', + task_id: 'collapsed-cluster-task', + client_run_id: 'collapsed-cluster-client', + executionTime: 125, + }, + { + sid: 'session-1', + ws: {}, + getSid: () => 'session-1', + setSid: () => undefined, + setLoopTimer: () => undefined, }, ); await new Promise((resolve) => setImmediate(resolve)); @@ -3292,7 +4345,70 @@ function workflowPlan(ready) { available: {}, sharedMemory: false, }; -} +} + +test('managed Studio Auto checks the complete execution graph and refuses before submission', async () => { + studioStoreModule.useStudioStore.setState({ + form: { ...studioStoreModule.useStudioStore.getState().form, resourceMode: 'auto' }, + graphBinding: { + mode: 'text_to_image', + modelType: 'ZImageModularPipeline', + nodes: { preview: 'preview' }, + managedNodeIds: ['preview'], + managedEdgeIds: [], + fingerprint: 'managed-auto', + createdAt: 1, + updatedAt: 1, + }, + }); + const requests = []; + globalThis.fetch = async (url, init) => { + requests.push({ url: String(url), body: JSON.parse(init.body) }); + return String(url).endsWith('/auto_resource/workflow') + ? jsonResponse(workflowPlan(false)) + : jsonResponse({ task_id: 'must-not-submit', sid: 'session-1', message: 'queued' }); + }; + await assert.rejects( + coordinatorModule.coordinateGraphRun({ + sid: 'session-1', + preparedGraph: graph(), + studioContext: { clearChangedPreviews: false }, + }), + /No reviewed recipe/, + ); + assert.equal(requests.length, 1); + assert.ok(requests[0].url.endsWith('/auto_resource/workflow')); + assert.deepEqual(requests[0].body.graph.nodes, graph().nodes); + assert.equal(studioStoreModule.useStudioStore.getState().currentRunContext, null); + assert.equal(Object.keys(taskStoreModule.useTaskStore.getState().queuedTasks).length, 0); +}); + +test('managed Studio Auto retains the whole graph receipt and correlation through runtime metadata', async () => { + studioStoreModule.useStudioStore.setState({ + form: { ...studioStoreModule.useStudioStore.getState().form, resourceMode: 'auto' }, + }); + const requests = []; + globalThis.fetch = async (url, init) => { + requests.push({ url: String(url), body: JSON.parse(init.body) }); + return String(url).endsWith('/auto_resource/workflow') + ? jsonResponse(workflowPlan(true)) + : jsonResponse({ task_id: 'managed-whole-auto', sid: 'session-1', message: 'queued' }); + }; + const result = await coordinatorModule.coordinateGraphRun({ + sid: 'session-1', + preparedGraph: graph(), + studioContext: { clearChangedPreviews: false }, + }); + assert.equal(requests.length, 2); + assert.ok(requests[0].url.endsWith('/auto_resource/workflow')); + assert.ok(requests[1].url.endsWith('/graph')); + assert.equal(result.submittedGraph.runtimeHints.workflowAutoPlan.graphHash, workflowPlan(true).plannedGraphHash); + assert.equal(result.submittedGraph.runtimeHints.resourceMode, 'auto'); + assert.equal(result.submittedGraph.runtimeHints.source, 'studio'); + assert.equal(result.submittedGraph.runtimeHints.clientRunId, result.context.clientRunId); + assert.equal(result.submittedGraph.runtimeHints.runInputHash, result.context.runInputHash); + assert.equal(result.response.task_id, 'managed-whole-auto'); +}); test('Auto refuses a stale plan if the workflow changes while planning', async () => { studioStoreModule.useStudioStore.setState({ @@ -3406,7 +4522,8 @@ test('runtime resource-update messages reject non-resource fields and wrong valu assert.equal(websocketModule.parseWebsocketMessage(JSON.stringify(message)), null); }); -function resourceInputBlock(mirrored = false) { +function resourceInputBlock(mirrored = false, field = 'offload_mode', control = false) { + const initialValue = field === 'weight_loading_mode' ? 'cpu' : 'none'; const nodes = ['loader', ...(mirrored ? ['peer'] : [])].map((nodeId) => ({ nodeId, nodeType: 'custom', @@ -3415,7 +4532,7 @@ function resourceInputBlock(mirrored = false) { module: 'modules.Test', action: 'Loader', params: { - offload_mode: { type: 'string', value: 'none', isInput: true }, + [field]: { type: 'string', value: initialValue, isInput: true }, output: { type: 'pipeline', display: 'output' }, }, }, @@ -3436,13 +4553,26 @@ function resourceInputBlock(mirrored = false) { label: 'Offload', valueType: 'string', required: false, - binding: { nodeId: 'loader', fieldOrPortId: 'offload_mode' }, - ...(mirrored ? { mirrorBindings: [{ nodeId: 'peer', fieldOrPortId: 'offload_mode' }] } : {}), + binding: { nodeId: 'loader', fieldOrPortId: field }, + ...(mirrored ? { mirrorBindings: [{ nodeId: 'peer', fieldOrPortId: field }] } : {}), }, ], outputs: [], }, - controls: [], + controls: control + ? [ + { + controlId: 'resource', + label: 'Resource', + valueType: 'string', + defaultValue: initialValue, + required: false, + order: 0, + binding: { nodeId: 'loader', fieldId: field }, + ...(mirrored ? { mirrorBindings: [{ nodeId: 'peer', fieldId: field }] } : {}), + }, + ] + : [], previews: [], ownership: { kind: 'user', definitionMutable: true }, }; @@ -3452,7 +4582,7 @@ function resourceInputBlock(mirrored = false) { instanceId: 'resource-block', position: { x: 0, y: 0 }, size: { width: 400, height: 320 }, - values: { resource: 'none' }, + values: { resource: initialValue }, }), ); } @@ -3504,6 +4634,160 @@ test('Auto treats mirrored boundary resource inputs as one atomic resource group assert.deepEqual(exported(), before); }); +test('weight loading Auto plans accept only declared patch values', async () => { + const auto = await server.ssrLoadModule('/src/studio/workflowAutoExecutionV2.ts'); + for (const value of ['cpu', 'cuda', 'ssd_stream']) { + const plan = { ...workflowPlan(true), patches: [{ nodeId: 'loader', field: 'weight_loading_mode', value }] }; + assert.deepEqual(auto.parseWorkflowAutoPlanV2(plan), plan); + } + for (const value of ['auto', 'CUDA', '', true, null, 0, { value: 'cuda' }]) + assert.throws( + () => + auto.parseWorkflowAutoPlanV2({ + ...workflowPlan(true), + patches: [{ nodeId: 'loader', field: 'weight_loading_mode', value }], + }), + /invalid workflow Auto plan/, + ); + assert.throws( + () => + auto.parseWorkflowAutoPlanV2({ + ...workflowPlan(true), + patches: [{ nodeId: 'loader', field: 'weight_loading_device', value: 'cuda' }], + }), + /invalid workflow Auto plan/, + ); +}); + +test('weight loading runtime messages preserve the field-specific current and previous value contracts', () => { + const parsed = (update) => + websocketModule.parseWebsocketMessage( + JSON.stringify({ + type: 'auto_resource_plan_applied', + resourceUpdates: [{ nodeId: 'loader', ...update }], + }), + ); + for (const value of ['cpu', 'cuda', 'ssd_stream']) + for (const previousValue of [undefined, null, 'cpu', 'cuda', 'ssd_stream']) + assert.ok(parsed({ field: 'weight_loading_mode', value, previousValue })); + for (const value of ['auto', 'CUDA', '', true, null, 1]) + assert.equal(parsed({ field: 'weight_loading_mode', value }), null); + for (const previousValue of ['auto', 'CUDA', '', true, 1]) + assert.equal(parsed({ field: 'weight_loading_mode', value: 'cuda', previousValue }), null); + assert.equal(parsed({ field: 'offload_mode', value: 'none', previousValue: false }), null); + assert.equal(parsed({ field: 'auto_offload', value: true, previousValue: 'false' }), null); + assert.ok(parsed({ field: 'offload_mode', value: 'none', previousValue: 'model_cpu' })); + assert.ok(parsed({ field: 'auto_offload', value: true, previousValue: false })); +}); + +test('weight loading mirrored inputs and controls carry one runtime group and one Undo', async () => { + const auto = await server.ssrLoadModule('/src/studio/workflowAutoExecutionV2.ts'); + const flow = flowStoreModule.useFlowStore; + for (const control of [false, true]) { + flow.getState().replaceGraph({ nodes: [resourceInputBlock(true, 'weight_loading_mode', control)], edges: [] }); + const exported = () => flow.getState().exportGraph('', undefined, { randomizeSeeds: false }); + const before = exported(); + const definition = structuredClone(flow.getState().nodes[0].data.blockInstanceV2.definitionSnapshot); + const patches = ['loader', 'peer'].map((nodeId) => ({ + nodeId: blockRuntimeModule.blockProjectionNodeIdV2('resource-block', nodeId), + field: 'weight_loading_mode', + value: 'cuda', + })); + assert.throws(() => auto.applyWorkflowAutoSettingsV2(before, patches.slice(0, 1)), /shared resource control/); + assert.deepEqual(exported(), before); + assert.throws( + () => auto.applyWorkflowAutoSettingsV2(before, [patches[0], { ...patches[1], value: 'cpu' }]), + /shared resource control/, + ); + assert.deepEqual(exported(), before); + studioStoreModule.useStudioStore.setState({ + form: { ...studioStoreModule.useStudioStore.getState().form, resourceMode: 'auto' }, + }); + globalThis.fetch = async () => jsonResponse({ ...workflowPlan(true), patches }); + const historyCount = flow.getState().historyPast.length; + const submitted = await auto.prepareWorkflowAutoExecutionV2(before); + assert.deepEqual(exported().nodes, submitted.nodes); + assert.deepEqual(submitted.runtimeHints.workflowAutoPlan.resourceControlGroups, [ + patches.map(({ nodeId, field }) => ({ nodeId, field })), + ]); + assert.equal(flow.getState().historyPast.length, historyCount + 1); + assert.deepEqual(flow.getState().nodes[0].data.blockInstanceV2.definitionSnapshot, definition); + flow.getState().undo(); + assert.deepEqual(exported(), before); + flow.getState().redo(); + assert.deepEqual(exported().nodes, submitted.nodes); + auto.applyRuntimeWorkflowAutoSettingsV2( + patches.map((patch) => ({ ...patch, value: 'cpu', previousValue: 'cuda' })), + ); + assert.deepEqual(exported(), before); + const unchanged = flow.getState().toObject(); + assert.throws( + () => + auto.applyRuntimeWorkflowAutoSettingsV2( + patches.map((patch, index) => ({ + ...patch, + previousValue: index === 0 ? 'cpu' : 'cuda', + })), + ), + /newer workflow edits/, + ); + assert.deepEqual(flow.getState().toObject(), unchanged); + } +}); + +test('weight loading Auto settings roll back connected, missing and duplicate targets', async () => { + const auto = await server.ssrLoadModule('/src/studio/workflowAutoExecutionV2.ts'); + const flow = flowStoreModule.useFlowStore; + const node = (id, params) => ({ + id, + type: 'custom', + position: { x: 0, y: 0 }, + data: { type: 'custom', module: 'modules.Test', action: 'Loader', params }, + }); + const field = { type: 'string', value: 'cpu', isInput: true }; + const source = node('source', { output: { type: 'string', display: 'output', value: 'cpu' } }); + const loader = node('loader', { weight_loading_mode: field }); + const peer = node('peer', { weight_loading_mode: field }); + for (const invalid of ['connected', 'missing', 'duplicate']) { + const edges = + invalid === 'connected' + ? [ + { + id: 'connected-mode', + source: 'source', + sourceHandle: 'output', + target: 'peer', + targetHandle: 'weight_loading_mode', + }, + ] + : []; + flow.getState().replaceGraph({ + nodes: [ + structuredClone(loader), + node('peer', invalid === 'missing' ? {} : structuredClone(peer.data.params)), + source, + ], + edges, + }); + const before = flow.getState().toObject(); + const historyCount = flow.getState().historyPast.length; + const graph = flow.getState().exportGraph('', undefined, { randomizeSeeds: false }); + const patch = { nodeId: 'loader', field: 'weight_loading_mode', value: 'cuda' }; + assert.throws( + () => + auto.applyWorkflowAutoSettingsV2(graph, [ + patch, + invalid === 'duplicate' ? patch : { ...patch, nodeId: 'peer' }, + ]), + /missing, connected or repeated/, + ); + assert.deepEqual(flow.getState().toObject(), before); + assert.equal(flow.getState().historyPast.length, historyCount); + assert.equal(flow.getState().historyTransaction, null); + assert.deepEqual(graph.nodes.loader.params.weight_loading_mode.value, 'cpu'); + } +}); + test('mixed legacy and Modular Auto reaches planning without committing a rejected conversion', async () => { const users = await server.ssrLoadModule('/src/studio/userBlocks.ts'); const { useHuggingFaceNodeLibraryStore: catalog } = await server.ssrLoadModule( @@ -4023,3 +5307,510 @@ test('collapsed legacy inspector controls dispatch the same internal callback as assert.equal(calls[0].fieldKey, 'model'); assert.deepEqual(calls[0].values, { model: 'new', strength: 0.5 }); }); + +test('ordinary stage metadata exposes newly supported controls without rewriting their values or reusable definition', async () => { + const groups = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const flow = flowStoreModule.useFlowStore; + const graph = groups.groupVisualStages( + { + nodes: [ + { + id: 'generate', + type: 'custom', + position: { x: 0, y: 0 }, + data: { + type: 'custom', + module: 'modules.Test', + action: 'Generate', + operationAuthoring: { + schemaVersion: 1, + defaults: {}, + retained: [], + authored: [], + operation: { + pipelineClass: 'ExamplePipeline', + task: 'text_to_image', + operationId: 'diffusion.generate', + nodeKey: 'modules.Test.Generate', + nodeType: 'custom', + blockName: 'Generate', + decomposition: 'block', + support: 'declared', + workflowId: null, + binding: { pipelineClass: 'ExamplePipeline', values: {} }, + ports: [], + }, + }, + params: { + prompt: { type: 'string', value: 'Keep my prompt' }, + internal_backend_value: { type: 'int', value: 1, hidden: true }, + max_sequence_length: { + type: 'int', + label: 'Max Sequence Length', + value: 512, + default: 256, + hidden: true, + }, + }, + }, + }, + ], + edges: [], + }, + ['generate'], + 'generate', + ); + flow.getState().replaceGraph(graph); + const root = flow.getState().nodes.find((n) => n.data.blockInstanceV2); + const instance = root.data.blockInstanceV2; + const member = instance.effectiveGraph.nodes[0]; + const runtimeId = blockRuntimeModule.blockProjectionNodeIdV2(root.id, member.nodeId); + const definition = structuredClone(instance.definitionSnapshot); + const control = () => + flow + .getState() + .nodes.find((n) => n.id === root.id) + .data.blockInstanceV2.effectiveInterface.controls.find((c) => c.binding.fieldId === 'max_sequence_length'); + const publicParam = () => + blockRuntimeModule.blockControlParamsV2(flow.getState().nodes.find((n) => n.id === root.id).data.blockInstanceV2)[ + control().controlId + ]; + assert.equal(control(), undefined); + flow.getState().withHistory('Change model controls', () => { + flow.getState().setParam(runtimeId, 'max_sequence_length', false, 'hidden'); + flow.getState().setParam(runtimeId, 'max_sequence_length', 256, 'max'); + }); + assert.ok(control(), 'a newly unhidden native field must be editable in the collapsed stage'); + assert.equal( + flow.getState().getParam(runtimeId, 'max_sequence_length', 'value'), + 512, + 'preserve authored values; do not silently clamp them', + ); + assert.equal(publicParam().max, 256); + assert.deepEqual( + flow.getState().nodes.find((n) => n.id === root.id).data.blockInstanceV2.definitionSnapshot, + definition, + ); + const durable = flow.getState().toObject(); + flow.getState().undo(); + assert.equal(control(), undefined); + flow.getState().redo(); + assert.ok(control()); + flow.getState().replaceGraph(JSON.parse(JSON.stringify(durable))); + assert.ok(control()); + const settled = flow.getState().nodes; + flow.getState().setParam(runtimeId, 'max_sequence_length', false, 'hidden'); + assert.equal(flow.getState().nodes, settled, 'replayed metadata must remain a no-op'); + flow.getState().setParam(runtimeId, 'max_sequence_length', true, 'hidden'); + assert.ok(control(), 'retain the control identity and its authored value for a later compatible model'); + assert.equal(publicParam().hidden, true); + flow.getState().setParam(runtimeId, 'max_sequence_length', false, 'hidden'); + assert.equal(publicParam().value, 512); + const current = flow.getState().nodes.find((n) => n.id === root.id).data.blockInstanceV2; + const removed = blockRuntimeModule.replaceBlockEffectiveInterfaceV2( + current, + { + boundary: current.effectiveInterface.boundary, + controls: current.effectiveInterface.controls.filter((c) => c.binding.fieldId !== 'max_sequence_length'), + }, + { rememberRemovedControls: true }, + ); + flow.getState().replaceGraph({ nodes: [blockRuntimeModule.createBlockRootNodeV2(removed)], edges: [] }); + flow.getState().setParam(runtimeId, 'max_sequence_length', false, 'hidden'); + assert.equal(control(), undefined, 'backend metadata must respect a deliberately removed editor'); + flow.getState().setParam(runtimeId, 'internal_backend_value', 2); + const native = flow.getState().nodes.find((n) => n.id === root.id).data.blockInstanceV2.effectiveGraph.nodes[0]; + const hints = await server.ssrLoadModule('/src/workflow/operationAuthoringHint.ts'); + assert.ok( + hints.operationAuthoring({ id: native.nodeId, type: 'custom', position: { x: 0, y: 0 }, data: native.data }), + ); + assert.equal(native.data.params.internal_backend_value.value, 2); + assert.deepEqual( + native.data.operationAuthoring.authored, + [], + 'backend values must not masquerade as user-authored controls', + ); +}); + +test('ordinary visual stages dispatch native callbacks and retain hidden metadata through Undo and export', async () => { + const groups = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const flow = flowStoreModule.useFlowStore; + const native = { + id: 'loader', + type: 'custom', + position: { x: 0, y: 0 }, + data: { + type: 'custom', + module: 'modules.Test', + action: 'Loader', + params: { + model: { type: 'string', value: 'old', onChange: 'inspect' }, + revision: { type: 'string', value: 'old-pin' }, + output: { type: 'pipeline', display: 'output', signal: { direction: 'output', value: 'old' } }, + }, + }, + }; + const grouped = groups.groupVisualStages({ nodes: [native], edges: [] }, ['loader'], 'setup'); + const root = grouped.nodes.find((node) => node.data.blockInstanceV2); + const instance = root.data.blockInstanceV2; + const control = instance.effectiveInterface.controls.find((entry) => entry.binding.fieldId === 'model'); + const runtimeId = blockRuntimeModule.blockProjectionNodeIdV2(root.id, control.binding.nodeId); + flow.getState().replaceGraph(grouped); + const initial = flow.getState().toObject(); + const definition = structuredClone(instance.definitionSnapshot); + flow.getState().setBlockInstanceValueV2(root.id, control.controlId, 'new'); + const calls = []; + globalThis.fetch = async (_url, init) => { + const body = JSON.parse(init.body); + calls.push(body); + return jsonResponse({ error: false }); + }; + const props = { + nodeId: root.id, + fieldKey: control.controlId, + module: root.data.module, + action: root.data.action, + onChange: 'inspect', + updateStore: () => assert.fail('native callback must not write facade metadata'), + }; + assert.equal(fieldActionModule.fieldActionSource(props)?.node.id, runtimeId); + await fieldActionModule.default(props, 'new'); + assert.equal(calls.length, 1); + assert.equal(calls[0].node, runtimeId); + assert.equal(calls[0].module, 'modules.Test'); + assert.equal(calls[0].action, 'Loader'); + assert.deepEqual(calls[0].values, { model: 'new', revision: 'old-pin' }); + const context = { sid: 'session-1', ws: {}, getSid: () => 'session-1', setSid: () => {}, setLoopTimer: () => {} }; + const owned = { + node: runtimeId, + sid: 'session-1', + workflow_tab_id: 'workflow-origin', + workflow_canvas_epoch: 0, + workflow_form_epoch: 0, + }; + websocketModule.handleWebsocketMessage( + { ...owned, type: 'set_field_value', fields: { revision: 'new-pin' }, workflow_canvas_epoch: 99 }, + context, + ); + assert.equal(flow.getState().getParam(runtimeId, 'revision', 'value'), 'old-pin'); + websocketModule.handleWebsocketMessage( + { ...owned, type: 'set_field_value', fields: { revision: 'new-pin' } }, + context, + ); + websocketModule.handleWebsocketMessage( + { + ...owned, + type: 'set_field_params', + field: 'output', + params: { signal: { direction: 'output', value: 'new-contract' } }, + }, + context, + ); + assert.equal(flow.getState().getParam(runtimeId, 'revision', 'value'), 'new-pin'); + assert.equal(flow.getState().getParam(runtimeId, 'output', 'signal').value, 'new-contract'); + const settledNodes = flow.getState().nodes; + flow + .getState() + .setParam(runtimeId, 'output', { direction: 'output', value: 'new-contract', origin: undefined }, 'signal'); + assert.equal(flow.getState().nodes, settledNodes, 'JSON-equivalent signal metadata must be a durable no-op'); + const durable = flow.getState().toObject(); + assert.deepEqual(durable.nodes[0].data.blockInstanceV2.definitionSnapshot, definition); + flow.getState().replaceGraph(JSON.parse(JSON.stringify(durable))); + assert.equal(flow.getState().getParam(runtimeId, 'revision', 'value'), 'new-pin'); + flow.getState().undo(); + assert.deepEqual(flow.getState().toObject(), initial); + flow.getState().replaceGraph({ nodes: [], edges: [] }); + await fieldActionModule.default(props, 'late'); + websocketModule.handleWebsocketMessage({ ...owned, type: 'set_field_value', fields: { revision: 'late' } }, context); + assert.equal(calls.length, 1); + assert.deepEqual(flow.getState().nodes, []); +}); + +test('ordinary imported stage schemas recover registered hooks only for edits and solicited signal changes', async () => { + const groups = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const flow = flowStoreModule.useFlowStore; + const make = (id, action, params) => ({ + id, + type: 'custom', + position: { x: 0, y: 0 }, + data: { type: 'custom', module: 'modules.Test', action, params }, + }); + const loader = make('loader', 'Loader', { + model: { type: 'string', value: 'old' }, + output: { type: 'pipeline', display: 'output', signal: { direction: 'output', value: 'old' } }, + }); + const generate = make('generate', 'Generator', { + pipeline: { type: 'pipeline', display: 'input', disabled: true, signal: { direction: 'input' } }, + contract: { type: 'string', value: 'old' }, + }); + nodesStoreModule.useNodesStore.setState({ + nodesRegistry: { + 'modules.Test.Loader': { + ...loader.data, + params: { ...loader.data.params, model: { ...loader.data.params.model, onChange: 'inspect' } }, + }, + 'modules.Test.Generator': { + ...generate.data, + params: { + ...generate.data.params, + pipeline: { type: 'pipeline', display: 'input', onSignal: [{ action: 'value', target: 'contract' }] }, + }, + }, + }, + }); + let grouped = groups.groupVisualStages( + { + nodes: [loader, generate], + edges: [{ id: 'wire', source: 'loader', sourceHandle: 'output', target: 'generate', targetHandle: 'pipeline' }], + }, + ['loader'], + 'setup', + ); + grouped = groups.groupVisualStages(grouped, ['generate'], 'generate'); + flow.getState().replaceGraph(grouped); + const root = grouped.nodes.find((n) => + n.data.blockInstanceV2?.effectiveInterface.controls.some((c) => c.binding.fieldId === 'model'), + ); + const control = root.data.blockInstanceV2.effectiveInterface.controls.find((c) => c.binding.fieldId === 'model'); + const nativeId = blockRuntimeModule.blockProjectionNodeIdV2(root.id, control.binding.nodeId); + const consumer = grouped.nodes.find((n) => n.id !== root.id && n.data.blockInstanceV2); + const consumerId = blockRuntimeModule.blockProjectionNodeIdV2( + consumer.id, + consumer.data.blockInstanceV2.effectiveGraph.nodes[0].nodeId, + ); + const calls = []; + globalThis.fetch = async (_url, init) => { + calls.push(JSON.parse(init.body)); + return jsonResponse({ error: false }); + }; + flow.getState().updateSignalValues(flow.getState().edges); + await new Promise((resolve) => setImmediate(resolve)); + assert.deepEqual(calls, []); + assert.equal(flow.getState().getParam(consumerId, 'contract', 'value'), 'old'); + flow.getState().setBlockInstanceValueV2(root.id, control.controlId, 'new'); + await fieldActionModule.default( + { + nodeId: root.id, + fieldKey: control.controlId, + module: root.data.module, + action: root.data.action, + updateStore: () => {}, + }, + 'new', + ); + assert.equal(calls.length, 1); + assert.equal(calls[0].fn, 'inspect'); + const context = { sid: 'session-1', ws: {}, getSid: () => 'session-1', setSid: () => {}, setLoopTimer: () => {} }; + websocketModule.handleWebsocketMessage( + { + type: 'set_field_params', + node: nativeId, + field: 'output', + params: { signal: { direction: 'output', origin: 'model', value: 'new' } }, + sid: 'session-1', + workflow_tab_id: 'workflow-origin', + workflow_canvas_epoch: 0, + workflow_form_epoch: 0, + }, + context, + ); + await new Promise((resolve) => setImmediate(resolve)); + assert.equal(flow.getState().getParam(consumerId, 'contract', 'value'), 'new'); + assert.equal(calls.length, 1); + assert.equal(flow.getState().getParam(consumerId, 'pipeline', 'disabled'), true); +}); + +test('solicited stage signals refresh hookless or suppressed ordinary consumers without replaying on restore', async () => { + const groups = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const flow = flowStoreModule.useFlowStore; + const callback = [{ action: 'value', target: 'contract' }]; + for (const variant of [ + { hook: false, suppressed: false, registeredDisabled: false, refreshed: true }, + { hook: true, suppressed: true, registeredDisabled: false, refreshed: true }, + { hook: true, suppressed: false, registeredDisabled: false, refreshed: false }, + { hook: false, suppressed: false, registeredDisabled: true, refreshed: false }, + ]) { + const loader = { + id: 'loader', + type: 'custom', + position: { x: 0, y: 0 }, + data: { + type: 'custom', + module: 'modules.Test', + action: 'Loader', + params: { + model: { type: 'string', value: 'old' }, + output: { + type: 'pipeline', + display: 'output', + signal: { direction: 'output', origin: 'model', value: 'old' }, + }, + }, + }, + }; + const generate = { + id: 'generate', + type: 'custom', + position: { x: 500, y: 0 }, + data: { + type: 'custom', + module: 'modules.Test', + action: 'Generator', + params: { + pipeline: { + type: 'pipeline', + display: 'input', + disabled: true, + signal: { direction: 'input' }, + ...(variant.hook ? { onSignal: callback } : {}), + fieldOptions: { suppressAutomaticSignalAction: variant.suppressed }, + }, + contract: { type: 'string', value: 'old' }, + }, + }, + }; + nodesStoreModule.useNodesStore.setState({ + nodesRegistry: { + 'modules.Test.Generator': { + ...generate.data, + params: { + ...generate.data.params, + pipeline: { type: 'pipeline', display: 'input', onSignal: callback, disabled: variant.registeredDisabled }, + }, + }, + }, + }); + const grouped = groups.groupVisualStages( + { + nodes: [loader, generate], + edges: [{ id: 'wire', source: 'loader', sourceHandle: 'output', target: 'generate', targetHandle: 'pipeline' }], + }, + ['loader'], + 'setup', + ); + flow.getState().replaceGraph(grouped); + // Current construction may enrich a raw schema. Reproduce a later legacy + // or dynamic schema that omitted its hook, without inventing a new executor. + flow.getState().setParam('generate', 'pipeline', variant.hook ? callback : undefined, 'onSignal'); + flow + .getState() + .setParam('generate', 'pipeline', { suppressAutomaticSignalAction: variant.suppressed }, 'fieldOptions'); + const owner = grouped.nodes.find((node) => node.data.blockInstanceV2); + const nativeId = blockRuntimeModule.blockProjectionNodeIdV2( + owner.id, + owner.data.blockInstanceV2.effectiveGraph.nodes[0].nodeId, + ); + flow.getState().updateSignalValues(flow.getState().edges); + await new Promise((resolve) => setImmediate(resolve)); + assert.equal(flow.getState().getParam('generate', 'contract', 'value'), 'old', 'restore is not an action'); + flow.getState().setParam(nativeId, 'model', 'new'); + // A rendered relay can deliver first while its automatic action is absent + // or suppressed. The publisher's scoped reply must still refresh consumers. + flow.getState().setParam('generate', 'pipeline', { direction: 'output', value: 'new' }, 'signal'); + websocketModule.handleWebsocketMessage( + { + type: 'set_field_params', + node: nativeId, + field: 'output', + params: { signal: { direction: 'output', origin: 'model', value: 'new' } }, + sid: 'session-1', + workflow_tab_id: 'workflow-origin', + workflow_canvas_epoch: 0, + workflow_form_epoch: 0, + }, + { sid: 'session-1', ws: {}, getSid: () => 'session-1', setSid: () => {}, setLoopTimer: () => {} }, + ); + if (variant.refreshed) { + const deadline = Date.now() + 2000; + while (Date.now() < deadline && flow.getState().getParam('generate', 'contract', 'value') !== 'new') { + await new Promise((resolve) => setTimeout(resolve, 10)); + } + } else await new Promise((resolve) => setImmediate(resolve)); + assert.equal( + flow.getState().getParam('generate', 'contract', 'value'), + variant.refreshed ? 'new' : 'old', + JSON.stringify({ + variant, + source: flow.getState().getParam(nativeId, 'output', 'signal'), + target: flow.getState().getParam('generate', 'pipeline', 'signal'), + }), + ); + flow.getState().setParam('generate', 'contract', 'marker'); + flow.getState().updateSignalValues(flow.getState().edges, { dispatchStageActions: true }); + await new Promise((resolve) => setImmediate(resolve)); + assert.equal(flow.getState().getParam('generate', 'contract', 'value'), 'marker', 'equivalent signals are no-ops'); + flow.getState().updateSignalValues(flow.getState().edges, { + dispatchStageActions: true, + changedSignal: { nodeId: nativeId, fieldKey: 'output', value: 'old' }, + }); + await new Promise((resolve) => setImmediate(resolve)); + assert.equal( + flow.getState().getParam('generate', 'contract', 'value'), + 'marker', + 'superseded source replies are no-ops', + ); + } +}); + +test('shared visual controls dispatch each declared native callback and reject unrelated stage identities', async () => { + const groups = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const flow = flowStoreModule.useFlowStore; + const natives = ['left', 'right'].map((id) => ({ + id, + type: 'custom', + position: { x: 0, y: 0 }, + data: { + type: 'custom', + module: 'modules.Test', + action: 'Loader', + params: { model: { type: 'string', value: 'old', onChange: { action: 'exec', data: 'inspect' } } }, + }, + })); + const grouped = groups.groupVisualStages({ nodes: natives, edges: [] }, ['left', 'right'], 'setup'); + const root = grouped.nodes[0]; + const instance = root.data.blockInstanceV2; + const [left, right] = instance.effectiveInterface.controls; + const control = { ...left, mirrorBindings: [right.binding] }; + const shared = blockRuntimeModule.replaceBlockEffectiveInterfaceV2(instance, { + boundary: instance.effectiveInterface.boundary, + controls: [control], + }); + flow.getState().replaceGraph({ nodes: [blockRuntimeModule.createBlockRootNodeV2(shared)], edges: [] }); + flow.getState().setBlockInstanceValueV2(root.id, control.controlId, 'new'); + const calls = []; + globalThis.fetch = async (_url, init) => { + calls.push(JSON.parse(init.body)); + return jsonResponse({ error: false }); + }; + const props = { + nodeId: root.id, + fieldKey: control.controlId, + module: root.data.module, + action: root.data.action, + updateStore: () => {}, + }; + await fieldActionModule.default({ ...props, action: 'unrelated' }, 'new'); + assert.deepEqual(calls, []); + await fieldActionModule.default(props, 'new'); + assert.deepEqual( + calls.map((call) => call.node).sort(), + [left.binding, right.binding] + .map((binding) => blockRuntimeModule.blockProjectionNodeIdV2(root.id, binding.nodeId)) + .sort(), + ); + assert.ok(calls.every((call) => call.fn === 'inspect' && call.values.model === 'new')); + const unrelated = resourceInputBlock(false, 'model', true); + flow.getState().replaceGraph({ nodes: [unrelated], edges: [] }); + await fieldActionModule.default( + { + nodeId: unrelated.id, + fieldKey: 'resource', + module: unrelated.data.module, + action: unrelated.data.action, + onChange: 'inspect', + updateStore: () => {}, + }, + 'new', + ); + assert.equal(calls.length, 2); +}); diff --git a/scripts/run-issue-store.test.mjs b/scripts/run-issue-store.test.mjs index 12af3878..8e742b67 100644 --- a/scripts/run-issue-store.test.mjs +++ b/scripts/run-issue-store.test.mjs @@ -9,8 +9,21 @@ const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); let runIssueStoreModule; let modularRuntimeFailureIssue; let server; +const originalWindow = globalThis.window; +const originalStorage = globalThis.localStorage; before(async () => { + const values = new Map(); + globalThis.localStorage = { + getItem: (key) => values.get(key) ?? null, + setItem: (key, value) => values.set(key, String(value)), + removeItem: (key) => values.delete(key), + }; + globalThis.window = { + location: { origin: 'http://127.0.0.1:5191' }, + localStorage: globalThis.localStorage, + dispatchEvent: () => true, + }; server = await createServer({ root: ROOT, configFile: false, @@ -38,6 +51,109 @@ beforeEach(() => { after(async () => { await server?.close(); + if (originalWindow === undefined) delete globalThis.window; + else globalThis.window = originalWindow; + if (originalStorage === undefined) delete globalThis.localStorage; + else globalThis.localStorage = originalStorage; +}); + +test('Run recovery captures the workflow and graph that produced the issue dialog', async () => { + const { useStudioStore } = await server.ssrLoadModule('/src/stores/useStudioStore.ts'); + const { useFlowStore } = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + const { captureRunRecoveryOrigin, runRecoveryOriginIsCurrent } = + await server.ssrLoadModule('/src/studio/runRecovery.ts'); + const previousStudio = useStudioStore.getState(); + const previousFlow = useFlowStore.getState(); + try { + useStudioStore.setState({ + activeWorkflowTabId: 'recovery-origin', + workflowCanvasEpoch: 3, + workflowFormEpoch: 5, + }); + useFlowStore.setState({ nodes: [], edges: [] }); + runIssueStoreModule.useRunIssueStore + .getState() + .showIssues( + [{ id: 'blocked', category: 'user_input', severity: 'error', blocking: true, message: 'Choose an input' }], + captureRunRecoveryOrigin(), + ); + const origin = runIssueStoreModule.useRunIssueStore.getState().issueOrigin; + assert.deepEqual(origin?.workflow, { workflowTabId: 'recovery-origin', canvasEpoch: 3, formEpoch: 5 }); + assert.equal(typeof origin?.graphKey, 'string'); + assert.equal(runRecoveryOriginIsCurrent(origin), true); + useStudioStore.setState({ activeWorkflowTabId: 'another-workflow' }); + assert.equal(runIssueStoreModule.useRunIssueStore.getState().issueOrigin, origin); + assert.equal(runRecoveryOriginIsCurrent(origin), false); + } finally { + useStudioStore.setState(previousStudio); + useFlowStore.setState({ nodes: previousFlow.nodes, edges: previousFlow.edges }); + } +}); + +test('Run recovery ignores presentation and progress but rejects changed inputs and document epochs', async () => { + const { useStudioStore } = await server.ssrLoadModule('/src/stores/useStudioStore.ts'); + const { useFlowStore } = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + const { captureRunRecoveryOrigin, runRecoveryOriginIsCurrent } = + await server.ssrLoadModule('/src/studio/runRecovery.ts'); + const previousStudio = useStudioStore.getState(); + const previousFlow = useFlowStore.getState(); + const node = { + id: 'recovery-input', + type: 'custom', + position: { x: 0, y: 0 }, + data: { type: 'custom', module: 'Text', action: 'Value', params: { text: { value: 'original' } } }, + }; + try { + useStudioStore.setState({ activeWorkflowTabId: 'same-document', workflowCanvasEpoch: 1, workflowFormEpoch: 2 }); + useFlowStore.setState({ nodes: [node], edges: [] }); + const origin = captureRunRecoveryOrigin(); + const displayed = { + ...node, + selected: true, + position: { x: 120, y: 80 }, + measured: { width: 200, height: 100 }, + data: { ...node.data, executionProgress: 0.5, uiState: { collapsed: true } }, + }; + useFlowStore.setState({ nodes: [displayed] }); + assert.equal(runRecoveryOriginIsCurrent(origin), true); + useFlowStore.setState({ + nodes: [{ ...displayed, data: { ...displayed.data, params: { text: { value: 'new input' } } } }], + }); + assert.equal(runRecoveryOriginIsCurrent(origin), false); + useFlowStore.setState({ nodes: [node] }); + useStudioStore.setState({ workflowFormEpoch: 3 }); + assert.equal(runRecoveryOriginIsCurrent(origin), false); + useStudioStore.setState({ workflowFormEpoch: 2, workflowCanvasEpoch: 2 }); + assert.equal(runRecoveryOriginIsCurrent(origin), false); + useStudioStore.setState({ workflowCanvasEpoch: 1 }); + useFlowStore.setState({ + edges: [{ id: 'new-wire', source: node.id, target: node.id, sourceHandle: 'out', targetHandle: 'in' }], + }); + assert.equal(runRecoveryOriginIsCurrent(origin), false); + useFlowStore.setState({ edges: [], nodes: [{ ...node, data: { ...node.data, uiState: { disabled: true } } }] }); + assert.equal(runRecoveryOriginIsCurrent(origin), false); + } finally { + useStudioStore.setState(previousStudio); + useFlowStore.setState({ nodes: previousFlow.nodes, edges: previousFlow.edges }); + } +}); + +test('Run recovery focus is volatile and cannot be restored from persisted settings', async () => { + const { useSettingsStore } = await server.ssrLoadModule('/src/stores/useSettingsStore.ts'); + const { captureRunRecoveryOrigin } = await server.ssrLoadModule('/src/studio/runRecovery.ts'); + const previous = useSettingsStore.getState(); + try { + const request = { origin: captureRunRecoveryOrigin(), target: { kind: 'studio', fieldId: 'layers' } }; + useSettingsStore.getState().setRunRecoveryFocusRequest(request); + const options = useSettingsStore.persist.getOptions(); + assert.equal('runRecoveryFocusRequest' in options.partialize(useSettingsStore.getState()), false); + assert.equal( + options.merge({ runRecoveryFocusRequest: request }, useSettingsStore.getState()).runRecoveryFocusRequest, + null, + ); + } finally { + useSettingsStore.setState(previous); + } }); test('Modular runtime Fix advice is non-blocking and restricted to its active workflow and visible node', () => { diff --git a/scripts/runtime-resources.test.mjs b/scripts/runtime-resources.test.mjs index 75e29411..4280d290 100644 --- a/scripts/runtime-resources.test.mjs +++ b/scripts/runtime-resources.test.mjs @@ -57,3 +57,27 @@ test('idle and unknown allocator status cannot produce an invented paused explan assert.equal(snapshot.accelerators[0].allocatedBytes, 1024); } }); + +test('compact gauge names the highest measured resource and respects shared GPU accessibility', () => { + const snapshot = resources.parseRuntimeResourceSnapshot({ + activeDevice: 'cuda:0', + system: { ramPercent: 12 }, + accelerators: [ + { + device: 'cuda:0', + memoryKind: 'shared', + memoryTotalBytes: 2, + memoryUsedBytes: 1, + accessibleMemoryTotalBytes: 100, + accessibleMemoryFreeBytes: 91, + dedicatedMemoryTotalBytes: 2, + dedicatedMemoryFreeBytes: 1, + }, + ], + storage: { destinations: { modelCache: { path: '/models', freeBytes: 240 }, untrusted: { path: '/other' } } }, + }); + assert.equal(snapshot.accelerators[0].accessibleMemoryTotalBytes, 100); + assert.deepEqual(resources.runtimeResourceMetric(snapshot), { label: 'RAM', value: 12 }); + assert.equal(resources.runtimeResourcePressure(resources.parseRuntimeResourceSnapshot({})), null); + assert.deepEqual(snapshot.storage.destinations, { modelCache: { path: '/models', freeBytes: 240 } }); +}); diff --git a/scripts/saved-control-image-evidence.mjs b/scripts/saved-control-image-evidence.mjs new file mode 100644 index 00000000..8e161dd3 --- /dev/null +++ b/scripts/saved-control-image-evidence.mjs @@ -0,0 +1,659 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { readFileSync, realpathSync } from 'node:fs'; +import { dirname } from 'node:path'; +import { verifyConditioningModels } from './control-inpaint-evidence.mjs'; +import { + backendContractIdentity, + backendSourceEvidence, + canonicalGraphIdentity, + normalizeBackendRuntime, + selectBackendRuntimeFingerprintEvidence, + selectInstalledModelIdentity, +} from './live-proof-provenance.mjs'; +import { + verifyNativeCanny, + verifyNativeLoadedImage, + verifyRetainedHostImageFiles, +} from './native-image-load-evidence.mjs'; +import { + validateLateNativeSingleAssetRun, + validateNativeVariantOutput, + validateNativeVariantRun, + validateUnmodifiedExpertPreparation, +} from './native-variant-run-evidence.mjs'; +import { verifyRetainedPngUpload, verifyRetainedWebpUpload } from './private-image-edit-evidence.mjs'; +import { validateImagePromptPreparation } from './prompt-variant-evidence.mjs'; +import { + canonicalWorkflowAuthoringContract, + exportCanonicalWorkflowGraphs, + readCanonicalEvidenceFile, +} from './release-contract-core.mjs'; +import { decodedMediaHash, technicalMediaErrors } from './template-gallery-harness.mjs'; + +const format = 'modiff.private.saved-control-image-native-png.v1'; +const retainedHostFormat = 'modiff.private.saved-control-image-native-files.v1'; +const loadFieldsFormat = 'modiff.private.saved-control-image-native-load-fields.v1'; +export const integratedControlUploadFormat = 'modiff.private.integrated-control-edit-native-upload.v1'; +const linuxReplayRuntime = '8cbe038eeeb6d4a4c079783b8d7e4915d9f78faad9495cb8e354504c66925cf5'; +const windowsReplayRuntime = 'e5d045d5ecf997c0cfe8dba771fd92cfc1fef6d3e10d91791b2b5e747f384b3c'; +const commonSource = 'e3aea8f8d102572ad10fdd0700f0c42d92061e864ede89777efcd6a3269770a8'; +const sdxlSource = '371fd754663a95b1b06900df9a838042048466464b4bd5cfa7033c1b6eebe0e3'; +const sd15Repair = { + action: 'ControlInpaint', + pipelineClass: 'StableDiffusionControlNetInpaintPipeline', + componentClass: 'ControlNetModel', + source: 'fe1a57b8e352eb66a1a26ebbff5865aaafcf5d55326c4bbcbaf2132ec75f54a8', + canny: true, + windows: true, + additionalInputs: ['source', 'mask'], +}; +const fluxControl = { + action: 'ControlEdit', + pipelineClass: 'FluxControlImg2ImgPipeline', + source: '585997dc1146ec6effb20c260272babc01713ecdea4f78a0872c12ef2568ef83', + integratedControl: true, + additionalInputs: ['source'], +}; +const fluxControlInpaint = { + ...fluxControl, + action: 'ControlInpaint', + pipelineClass: 'FluxControlInpaintPipeline', + additionalInputs: ['source', 'mask'], +}; +const fluxControlUpload = { + source: '73c0d5622c9c305eb2c13478fbac4ca9ea09c71689c74d38679fa6af592c8964', + originalRegistryHash: '0c7eb754b1eec427474be513ff6bd7837ce77ceb5f05853361616e302962fef4', + previousExpertFamily: fluxControl.pipelineClass, + lateOutput: false, +}; +const sdxlWindowsControlEdit = { + action: 'ControlEdit', + pipelineClass: 'StableDiffusionXLControlNetImg2ImgPipeline', + componentClass: 'ControlNetModel', + source: '2faeaaa03b7902a03df5cd0cea38129b7419f6d844125c0ca7e29ccfaf635290', + originalRegistryHash: 'fd66c8907b4a7969c1a87757f4d9e629d62395c55b8b74f730432cf1ce47d13e', + canny: true, + cannyMediaWitness: true, + windows: true, + additionalInputs: ['source'], + previousExpertFamily: 'StableDiffusionXLImg2ImgPipeline', +}; +const routes = { + 'FluxCannyPipeline:control_edit_image': { + ...fluxControl, + lateOutput: true, + integratedUploadVariant: { ...fluxControlUpload, controls: [['strength', 0.8, 1]] }, + }, + 'FluxCannyPipeline:control_inpaint': { ...fluxControlInpaint, lateOutput: true }, + 'FluxDepthPipeline:control_edit_image': { + ...fluxControl, + integratedUploadVariant: { ...fluxControlUpload, controls: [['strength', 0.8, 0.64]] }, + }, + 'FluxDepthPipeline:control_inpaint': fluxControlInpaint, + 'StableDiffusionPipeline:control_image': { + pipelineClass: 'StableDiffusionControlNetPipeline', + componentClass: 'ControlNetModel', + source: commonSource, + canny: true, + }, + 'HunyuanDiTControlNetPipeline:control_image': { + pipelineClass: 'HunyuanDiTControlNetPipeline', + componentClass: 'HunyuanDiT2DControlNetModel', + source: '1aae04a8ad2e66aeb3eaacc065f2e111280bd8a64e7e6cb95cc927fed95d6b39', + canny: true, + guidanceWindowUnavailable: true, + lateOutput: true, + }, + 'QwenImageControlNetPipeline:control_image': { + pipelineClass: 'QwenImageControlNetPipeline', + componentClass: 'QwenImageControlNetModel', + source: commonSource, + canny: false, + trueCfg: true, + }, + 'StableDiffusionPAGPipeline:control_image': { + pipelineClass: 'StableDiffusionControlNetPAGPipeline', + componentClass: 'ControlNetModel', + source: commonSource, + canny: true, + lateOutput: true, + pagSettingsUnobserved: true, + }, + 'StableDiffusionXLControlNetPipeline:control_image': { + pipelineClass: 'StableDiffusionXLControlNetPipeline', + componentClass: 'ControlNetModel', + source: sdxlSource, + canny: true, + }, + 'StableDiffusionXLControlNetPipeline:control_edit_image': sdxlWindowsControlEdit, + 'StableDiffusionXLPAGPipeline:control_edit_image': { + ...sdxlWindowsControlEdit, + pipelineClass: 'StableDiffusionXLControlNetPAGImg2ImgPipeline', + previousExpertFamily: 'StableDiffusionXLControlNetImg2ImgPipeline', + pagSettingsUnobserved: true, + loadFieldsVariant: { + source: 'b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7', + originalRegistryHash: '194fdfe25573ca708535e0913337cfee8c1137a2b3860f5c5c5a7c5419951d46', + windows: false, + cannyMediaWitness: false, + controls: [ + ['strength', 0.8, 1], + ['conditioning_scale', 1, 0.85], + ['guidance_scale', 5, 6], + ], + }, + }, + 'StableDiffusionXLPAGPipeline:control_image': { + pipelineClass: 'StableDiffusionXLControlNetPAGPipeline', + componentClass: 'ControlNetModel', + source: commonSource, + canny: true, + pagSettingsUnobserved: true, + }, + 'StableDiffusionXLAdapterPipeline:control_image': { + pipelineClass: 'StableDiffusionXLAdapterPipeline', + componentClass: 'T2IAdapter', + conditioningKind: 't2i_adapter', + componentParameter: 'adapter', + source: sdxlSource, + canny: true, + guidanceWindowUnavailable: true, + }, + 'StableDiffusionPipeline:control_edit_image': { + ...sd15Repair, + action: 'ControlEdit', + pipelineClass: 'StableDiffusionControlNetImg2ImgPipeline', + source: '3227569ff822090d00a80a3a88213d76d5ca43092d2918cec2494962457865a5', + additionalInputs: ['source'], + }, + 'StableDiffusionPipeline:control_inpaint': sd15Repair, + 'StableDiffusionPAGPipeline:control_inpaint': { + ...sd15Repair, + pipelineClass: 'StableDiffusionControlNetPAGInpaintPipeline', + pagSettingsUnobserved: true, + }, +}; +const sha256 = (bytes) => createHash('sha256').update(bytes).digest('hex'); +const connected = (sourceId, sourceKey) => ({ display: 'input', sourceId, sourceKey }); +const literal = (value) => ({ value, source: 'literal' }); + +function owners(api, route) { + assert.equal(api.paths.length, 1); + const [path] = api.paths; + assert.deepEqual([...path].sort(), Object.keys(api.nodes).sort()); + const setup = [ + 'modules.DiffusersRuntime.PipelineQuantizationConfigV2', + 'modules.DiffusersRuntime.DiffusersExecutionRecipe', + 'modules.DiffusersImage.LoadPipeline', + ]; + const load = 'modules.Image.Load'; + const additionalInputs = route.additionalInputs ?? []; + assert.deepEqual( + path.map((id) => { + const { module, action } = api.nodes[id]; + return module + '.' + action; + }), + [ + ...(route.canny ? [load, 'modules.ImageFilters.Canny', ...setup] : [...setup, load]), + ...additionalInputs.map(() => load), + 'modules.DiffusersImage.' + (route.action ?? 'ControlGenerate'), + 'modules.Image.Preview', + ], + ); + const [guide, canny, loader] = route.canny ? [path[0], path[1], path[4]] : [path[3], null, path[2]]; + const afterInputs = route.canny ? 5 : 4; + const inputs = { + guide, + ...Object.fromEntries(additionalInputs.map((role, index) => [role, path[index + afterInputs]])), + }; + const [sampler, preview] = path.slice(-2); + return { path, inputs, canny, loader, sampler, preview }; +} + +function savedControlRoute(workflowId, evidenceFormat) { + const route = routes[workflowId]; + assert.ok(route, 'No reviewed saved control-image route.'); + if (evidenceFormat === integratedControlUploadFormat) { + assert.ok(route.integratedUploadVariant, 'No reviewed integrated control edit with native upload evidence.'); + return { ...route, ...route.integratedUploadVariant, loadFieldsOnly: true, integratedUpload: true }; + } + if (evidenceFormat === loadFieldsFormat) { + assert.ok(route.loadFieldsVariant, 'No reviewed control-image load evidence variant.'); + return { ...route, ...route.loadFieldsVariant, loadFieldsOnly: true }; + } + return route; +} + +export function verifySavedControlImageInputs(api, output, inputs, workflowId, evidenceFormat) { + const route = savedControlRoute(workflowId, evidenceFormat); + const { path, inputs: inputOwners, canny, loader, sampler, preview } = owners(api, route); + assert.equal(inputs.length, Object.keys(inputOwners).length); + const receipt = output.resolvedExecutionInputs; + assert.equal(receipt.schemaVersion, 1); + assert.equal(receipt.source, 'backend-execution'); + assert.equal(receipt.taskId, output.taskId); + assert.equal(receipt.nodeId, preview); + assert.equal(receipt.attemptIndex, 0); + assert.equal(receipt.truncated, false); + assert.deepEqual( + receipt.mediaEvidenceStatus, + route.loadFieldsOnly ? undefined : { schemaVersion: 1, truncated: false }, + ); + assert.deepEqual(receipt.unavailableFields, []); + assert.deepEqual(receipt.uncapturedNodeIds, []); + assert.deepEqual(receipt.nodes.map(({ nodeId }) => nodeId).sort(), [...path].sort()); + const record = (id) => { + const row = receipt.nodes.find(({ nodeId }) => nodeId === id); + assert.equal(row.module, api.nodes[id].module); + assert.equal(row.action, api.nodes[id].action); + assert.deepEqual(row.omittedFields, {}); + return row; + }; + const decoded = Object.entries(inputOwners).map(([role, id], index) => { + const input = inputs[index]; + if (route.loadFieldsOnly) { + const load = api.nodes[id]; + const row = record(id); + assert.equal(row.mediaEvidence, undefined); + const mode = role === 'mask' ? 'L' : 'RGB'; + const width = row.fields.source_widths?.value?.[0]; + const height = row.fields.source_heights?.value?.[0]; + assert.ok([width, height].every((size) => Number.isSafeInteger(size) && size > 0 && size <= 8192)); + assert.deepEqual(load.params.file, { display: 'filebrowser', value: [input.sourceValue] }); + assert.deepEqual( + row.fields, + { + alpha_channel: literal(load.params.alpha_channel.value), + source_hashes: literal([input.file.sha256]), + source_widths: literal([width]), + source_heights: literal([height]), + source_modes: literal([mode]), + }, + 'Saved image load fields differ for ' + role, + ); + return { width, height, mode }; + } + const { sourceFile, decodedImage } = verifyNativeLoadedImage( + api.nodes[id], + record(id), + role === 'mask' ? 'L' : 'RGB', + ); + assert.deepEqual( + sourceFile, + { + sourceValue: input.sourceValue, + sha256: input.file.sha256, + byteSize: input.file.bytes, + }, + 'Saved image bytes differ for ' + role, + ); + return decodedImage; + }); + const params = api.nodes[sampler].params; + assert.deepEqual(params.pipeline, connected(loader, 'pipeline')); + assert.deepEqual(params.control_image, connected(canny ?? inputOwners.guide, canny ? 'output' : 'image')); + if (inputOwners.source) assert.deepEqual(params.image, connected(inputOwners.source, 'image')); + if (inputOwners.mask) assert.deepEqual(params.mask_image, connected(inputOwners.mask, 'image')); + assert.deepEqual(api.nodes[preview].params.image, connected(sampler, 'images')); + if (canny) { + assert.deepEqual(api.nodes[canny].params.image, connected(inputOwners.guide, 'image')); + assert.deepEqual(record(canny).fields, { device: literal(api.nodes[canny].params.device.value) }); + if (route.cannyMediaWitness) { + verifyNativeCanny(api.nodes[canny].params, record(canny).mediaEvidence, decoded[0]); + } else { + assert.equal(record(canny).mediaEvidence, undefined); + } + } + const expected = Object.fromEntries( + [ + 'prompt', + 'negative_prompt', + 'output_type', + 'num_inference_steps', + 'width', + 'height', + 'conditioning_scale', + 'seed', + ].map((field) => [field, params[field].value]), + ); + Object.assign(expected, { + executed_task: workflowId.split(':')[1], + strength: inputOwners.source ? params.strength.value : null, + guidance_scale: route.trueCfg ? null : params.guidance_scale.value, + max_sequence_length: route.trueCfg || route.integratedControl ? params.max_sequence_length.value : null, + control_guidance_start: + route.guidanceWindowUnavailable || route.integratedControl ? null : params.control_guidance_start.value, + control_guidance_end: + route.guidanceWindowUnavailable || route.integratedControl ? null : params.control_guidance_end.value, + ...(route.trueCfg && { true_cfg_scale: params.guidance_scale.value }), + ...(route.integratedControl && { conditioning_scale: null, negative_prompt: null }), + }); + const nativeSampler = record(sampler); + assert.deepEqual( + nativeSampler.fields, + Object.fromEntries(Object.entries(expected).map(([field, value]) => [field, literal(value)])), + 'Saved control sampler fields differ from the graph.', + ); + assert.equal(nativeSampler.mediaEvidence, undefined); + return decoded; +} + +function verifyIntegratedControlCheckpoint({ loader, target, pipelineClass, completed, hints, runtime, observations }) { + assert.equal(target.modelSet.length, 1); + assert.equal(observations.length, 1); + const [{ repoId, revision }] = target.modelSet; + const [observation] = observations; + assert.equal(observation.error, false); + assert.equal(observation.runtimeFingerprint, runtime.fingerprint); + assert.equal(observation.models.length, 1); + const [record] = observation.models; + assert.equal(record.complete, true); + assert.equal(record.repairRequired, false); + const installed = selectInstalledModelIdentity(observation, repoId); + assert.equal(installed.selectedRevision, revision); + assert.equal(installed.modelRevision, repoId + '@' + revision); + assert.deepEqual(loader.model_id.value, { source: 'hub', value: repoId }); + assert.equal(loader.revision.value, revision); + assert.equal(loader.pipeline_class.value, pipelineClass); + assert.equal(loader.conditioning_kind.value, 'none'); + assert.deepEqual(completed.runtimeHints, { + ...hints, + controlledArtifacts: [], + loaderContract: ['modules.DiffusersImage.LoadPipeline'], + }); + return { repoId, revision, source: 'integrated_checkpoint' }; +} + +function validateDirectMutationPreparation(preparation, pipelineClass, { loader, sampler, preview }) { + const { availableRamBytes, availableVramBytes, mutationPreparation, ...status } = preparation; + assert.ok([availableRamBytes, availableVramBytes].every((bytes) => Number.isSafeInteger(bytes) && bytes > 0)); + assert.deepEqual(status, { + performed: true, + reasons: ['direct pipeline mutation policy changed'], + resourceMode: 'expert', + incomingModelFamily: pipelineClass, + previousModelFamily: pipelineClass, + residentRecipeReusable: false, + resourceRecipeChanged: false, + cleanup: null, + }); + const { memoryBefore, memoryAfter, ...release } = mutationPreparation; + assert.deepEqual(release, { + ownerIds: [loader], + releasedNodeIds: [sampler, loader, preview].sort(), + retainedOutputNodes: [sampler, preview].sort(), + releasedComponentCount: 0, + }); + for (const memory of [memoryBefore, memoryAfter]) { + assert.equal(memory.available, true); + assert.equal(memory.allocator_stats_status, 'paused_during_execution'); + assert.equal(memory.device_count, 1); + } +} + +export async function readSavedControlImageEvidence({ + clientRoot, + manifest, + graph, + authoring, + artifact, + evidencePath, +}) { + const target = canonicalWorkflowAuthoringContract(manifest, graph, authoring, artifact); + const descriptorBytes = readFileSync(evidencePath); + const evidence = JSON.parse(descriptorBytes); + const route = savedControlRoute(manifest.id, evidence.format); + assert.equal( + evidence.format, + route.integratedUpload + ? integratedControlUploadFormat + : route.loadFieldsOnly + ? loadFieldsFormat + : route.integratedControl + ? retainedHostFormat + : format, + ); + assert.equal(evidence.schemaVersion, 1); + assert.equal(evidence.workflowId, manifest.id); + const evidenceRoot = realpathSync(dirname(evidencePath)); + const retainedFiles = []; + const read = (ref) => { + const result = readCanonicalEvidenceFile(evidenceRoot, ref, 16 * 1024 * 1024); + retainedFiles.push({ ...ref, absolutePath: result.file }); + return result; + }; + const json = (ref) => JSON.parse(read(ref).bytes); + const creator = json(evidence.creatorPackage); + const outputPackage = json(evidence.outputPackage); + const run = json(evidence.runDetail); + const graphRequest = json(evidence.graphRequest); + const completed = json(evidence.graphCompleted); + const [expected, ...visual] = await exportCanonicalWorkflowGraphs(clientRoot, [ + graph, + creator.graph, + outputPackage.latestOutput.graphSnapshot, + run.workflow_snapshot, + ]); + const canonical = owners(expected, route); + const actual = owners(graphRequest, route); + assert.equal(canonicalGraphIdentity(expected).hash, evidence.originalGraphHash); + const inputs = evidence.inputs; + const roles = Object.keys(canonical.inputs); + assert.equal(inputs.length, roles.length); + assert.equal(new Set(inputs.map(({ file }) => file.sha256)).size, roles.length); + for (const [index, role] of roles.entries()) { + const { sourceValue } = inputs[index]; + const sourcePattern = + route.integratedControl && role === 'source' + ? /^@data\/images\/[\w-]{1,128}\.(?:png|webp)$/u + : /^@data\/images\/[\w-]{1,128}\.png$/u; + assert.match(sourceValue, sourcePattern); + const fileSlot = expected.nodes[canonical.inputs[role]].params.file; + assert.deepEqual(fileSlot, { display: 'filebrowser', value: role === 'source' ? [] : '' }); + fileSlot.value = [sourceValue]; + } + const prompt = graphRequest.nodes[actual.sampler].params.prompt.value; + assert.ok(typeof prompt === 'string' && prompt.length > 0 && prompt.length <= 4096 && prompt === prompt.trim()); + assert.ok(!/[\u0000-\u001f\u007f]/u.test(prompt)); + const promptSlot = expected.nodes[canonical.sampler].params.prompt; + assert.deepEqual(promptSlot, { display: 'textarea', value: '' }); + promptSlot.value = prompt; + if (route.loadFieldsOnly && !route.integratedUpload) { + const loader = expected.nodes[canonical.loader].params; + assert.equal(loader.execution_profile_id, undefined); + loader.execution_profile_id = { value: '' }; + } + for (const [key, original, retained] of route.controls ?? []) { + const parameter = expected.nodes[canonical.sampler].params[key]; + assert.equal(parameter.value, original); + parameter.value = retained; + } + const identity = canonicalGraphIdentity(expected); + for (const graphSource of [graphRequest, creator.apiGraph, ...visual]) { + assert.equal( + canonicalGraphIdentity(graphSource).hash, + identity.hash, + 'Saved graph differs outside its prompt, selected images, and reviewed controls.', + ); + } + const nativeStore = route.integratedControl ? read(evidence.persistedOutput) : undefined; + const storedOutputs = nativeStore ? JSON.parse(nativeStore.bytes).outputs : undefined; + const stored = route.integratedUpload + ? storedOutputs.filter(({ taskId }) => taskId === run.task.task_id) + : storedOutputs; + if (stored) assert.equal(stored.length, 1); + const validate = route.lateOutput ? validateLateNativeSingleAssetRun : validateNativeVariantRun; + const { task, output, hints } = validate({ + target, + outputNodeId: actual.preview, + displayType: 'image', + creator, + outputPackage, + run, + graphCompleted: completed, + graphRequest, + graphAcknowledgment: json(evidence.graphAcknowledgment), + validatePreparation: (value) => + route.loadFieldsOnly && !route.integratedUpload + ? validateDirectMutationPreparation(value, route.pipelineClass, actual) + : route.previousExpertFamily + ? validateImagePromptPreparation(value, { + modelType: route.pipelineClass, + previousExpertFamily: route.previousExpertFamily, + }) + : validateUnmodifiedExpertPreparation(value, route.pipelineClass), + ...(route.lateOutput && { persistedOutput: (stored ?? json(evidence.persistedOutput).outputs)[0] }), + }); + if (stored) { + assert.equal(stored[0].taskId, task.task_id); + assert.equal(stored[0].mediaHash, output.mediaHash); + assert.deepEqual(stored[0].apiGraphSnapshot, output.apiGraphSnapshot); + assert.deepEqual(stored[0].resolvedExecutionInputs, output.resolvedExecutionInputs); + if (!route.integratedUpload) { + verifyRetainedHostImageFiles(json(evidence.hostInputFiles), { + taskId: task.task_id, + persistedOutputSha256: sha256(nativeStore.bytes), + inputs, + }); + } + } + const decoded = verifySavedControlImageInputs(graphRequest, output, inputs, manifest.id, evidence.format); + const imageBindings = Object.fromEntries( + await Promise.all( + roles.map(async (role, index) => { + const input = inputs[index]; + const decodedImage = decoded[index]; + const file = read(input.file); + if (route.integratedControl || route.loadFieldsOnly) { + const dimensions = await decodedMediaHash(file.file, 'image'); + assert.deepEqual([dimensions.width, dimensions.height], [decodedImage.width, decodedImage.height]); + } + if (!route.integratedControl || route.integratedUpload) { + const verifyUpload = input.sourceValue.endsWith('.webp') ? verifyRetainedWebpUpload : verifyRetainedPngUpload; + verifyUpload(json(input.upload), input, decodedImage, file.bytes); + } + return [role, { nodeId: actual.inputs[role], field: 'file', sha256: input.file.sha256, decodedImage }]; + }), + ), + ); + const source = backendSourceEvidence({ + before: json(evidence.backendSourceBefore).identity, + after: json(evidence.backendSourceAfter).identity, + runtimeFingerprint: task.runtimeFingerprint, + }); + assert.deepEqual(source.blockers, []); + const expectedSource = 'sha256:backend-source-v1:' + route.source; + assert.equal(source.identity.fingerprint, expectedSource); + const { bytes: nodeBytes } = read(evidence.nodes); + if (route.originalRegistryHash) { + assert.equal(evidence.registryReplay, undefined); + assert.equal(sha256(nodeBytes), route.originalRegistryHash); + } else { + assert.deepEqual(json(evidence.registryReplay), { + scope: 'Original nodes handler only, with exact source and runtime contract', + modelRuns: 0, + fileCount: source.identity.files.length, + sourceFingerprint: expectedSource, + runtimeContract: route.windows ? windowsReplayRuntime : linuxReplayRuntime, + nodeHash: sha256(nodeBytes), + nodeBytes: nodeBytes.length, + }); + } + const backendContract = backendContractIdentity(JSON.parse(nodeBytes), identity.canonicalGraph); + assert.ok(backendContract.fingerprint); + const runtime = selectBackendRuntimeFingerprintEvidence([task.runtimeFingerprint]); + const verifyModels = route.integratedControl ? verifyIntegratedControlCheckpoint : verifyConditioningModels; + const control = verifyModels({ + loader: graphRequest.nodes[actual.loader].params, + target, + pipelineClass: route.pipelineClass, + componentClass: route.componentClass, + conditioningKind: route.conditioningKind, + componentParameter: route.componentParameter, + completed, + hints, + runtime, + observations: evidence.modelObservations.map(json), + }); + const measurement = task.runtimeMeasurement; + assert.match(runtime.packages.platform, route.windows ? /^Windows-/u : /^Linux-/u); + assert.equal(measurement.backend, route.windows ? 'cuda' : 'rocm'); + assert.equal(measurement.device, 'cuda:0'); + assert.equal(measurement.peakMeasurementVersion, 2); + assert.ok(measurement.elapsedSeconds > 0 && measurement.elapsedSeconds <= 7200); + assert.ok(measurement.peakAllocatedBytes > 0 && measurement.peakReservedBytes >= measurement.peakAllocatedBytes); + assert.equal(evidence.outputs.length, 1); + const [outputRef] = evidence.outputs; + const media = read(outputRef.file); + const item = validateNativeVariantOutput({ + output, + outputRef, + task, + bytes: media.bytes, + displayType: 'image', + contentType: 'image/webp', + }); + const decodedOutput = await decodedMediaHash(media.file, 'image'); + const params = graphRequest.nodes[actual.sampler].params; + assert.deepEqual(technicalMediaErrors(decodedOutput, { width: params.width.value, height: params.height.value }), []); + assert.deepEqual([item.width, item.height], [decodedOutput.width, decodedOutput.height]); + for (const ref of retainedFiles) readCanonicalEvidenceFile(evidenceRoot, ref, 16 * 1024 * 1024); + assert.ok(readFileSync(evidencePath).equals(descriptorBytes)); + const receipt = { + schemaVersion: 1, + format: 'modiff.canonical-workflow-run-receipt.v1', + proofKind: 'real_backend_input_bound_model_variant', + ...target, + graphHash: identity.hash, + capturedAt: new Date(task.completed_at * 1000).toISOString(), + taskId: task.task_id, + outputId: output.id, + runtimeFingerprint: normalizeBackendRuntime(runtime).lockFingerprint, + backendSourceFingerprint: source.identity.fingerprint, + backendContractFingerprint: backendContract.fingerprint, + resourceCandidateId: null, + outputHash: item.mediaHash, + executionDurationSeconds: measurement.elapsedSeconds, + peakMemoryBytes: measurement.peakAllocatedBytes, + canonicalDefaultsExecuted: false, + inputBinding: imageBindings.source ?? imageBindings.guide, + ...(imageBindings.source && { guideBinding: imageBindings.guide }), + ...(imageBindings.mask && { maskBinding: imageBindings.mask }), + conditioningModel: control, + promptBinding: { nodeId: actual.sampler, field: 'prompt', sha256: sha256(prompt) }, + decodedOutput: { hash: decodedOutput.hash, width: decodedOutput.width, height: decodedOutput.height }, + observationLimits: { + fullConsumedFieldAccounting: false, + processedControlPixelsObserved: false, + ...(route.loadFieldsOnly && { + nativeEdgeMapObserved: false, + sourceByteWitness: 'native-load-and-upload-with-typed-wire', + }), + ...(route.cannyMediaWitness && { nativeEdgeMapObserved: true }), + ...(route.integratedUpload && { originalUploadResponsesObserved: true }), + ...(route.integratedControl && + !route.integratedUpload && { + originalUploadResponsesObserved: false, + hostFilesMatchedNativeLoads: true, + }), + ...(route.pagSettingsUnobserved && { effectivePagSettingsObserved: false }), + physicalPlatformQualification: false, + }, + qualificationClaims: { + publicTemplate: false, + qualityApproved: false, + rightsApproved: false, + hardwareQualified: false, + modelResourceQualified: false, + }, + }; + return { + receipt, + descriptorBytes, + evidence, + evidenceRoot, + retainedFiles, + provenance: { format: 'modiff.input-bound-model-variant-proof.v1', receipt }, + }; +} diff --git a/scripts/saved-control-image-evidence.test.mjs b/scripts/saved-control-image-evidence.test.mjs new file mode 100644 index 00000000..5fca72d1 --- /dev/null +++ b/scripts/saved-control-image-evidence.test.mjs @@ -0,0 +1,254 @@ +import assert from 'node:assert/strict'; +import { dirname, join, resolve } from 'node:path'; +import test from 'node:test'; +import { fileURLToPath } from 'node:url'; +import { verifyConditioningModels } from './control-inpaint-evidence.mjs'; +import { selectBackendRuntimeFingerprintEvidence } from './live-proof-provenance.mjs'; +import { verifyRetainedHostImageFiles } from './native-image-load-evidence.mjs'; +import { readCanonicalEvidenceFile, readCanonicalWorkflowEvidence } from './release-contract-core.mjs'; +import { integratedControlUploadFormat, verifySavedControlImageInputs } from './saved-control-image-evidence.mjs'; + +const clientRoot = fileURLToPath(new URL('..', import.meta.url)); +const backendRoot = resolve(process.env.MODIFF_BACKEND_DIR ?? join(clientRoot, '../MoDiff')); +const root = process.env.MODIFF_SAVED_CONTROL_EVIDENCE_DIR; +const integratedRoot = process.env.MODIFF_SAVED_INTEGRATED_CONTROL_EVIDENCE_DIR; +const revisedFluxRoot = process.env.MODIFF_REVISED_FLUX_CONTROL_EVIDENCE_DIR; +const cases = [ + ['linux-sd15-control-fixed', 'StableDiffusionPipeline:control_image', 'ControlNetModel', 'qa0wL-hE_WwQ'], + [ + 'linux-hunyuan-control-rgb', + 'HunyuanDiTControlNetPipeline:control_image', + 'HunyuanDiT2DControlNetModel', + '9FZlS44JVBae', + ], + ['linux-qwen-control-cabin', 'QwenImageControlNetPipeline:control_image', 'QwenImageControlNetModel', 'G2OjPY6F4u5L'], + ['linux-sd15-pag-control-fixed', 'StableDiffusionPAGPipeline:control_image', 'ControlNetModel', 'npMHx5LR2lWq'], + [ + 'linux-sdxl-controlnet-checked', + 'StableDiffusionXLControlNetPipeline:control_image', + 'ControlNetModel', + 'UlftQtP0nIJk', + ], + ['linux-sdxl-pag-cabin-verified', 'StableDiffusionXLPAGPipeline:control_image', 'ControlNetModel', 'MVsWymJP8z5O'], + ['linux-canny-adapter-fixed', 'StableDiffusionXLAdapterPipeline:control_image', 'T2IAdapter', 'gWs5V9Dz1NY-'], + ['windows-sd15-control-print', 'StableDiffusionPipeline:control_edit_image', 'ControlNetModel', 'jlVMYFMnS--d'], + ['windows-sd15-control-inpaint-fixed', 'StableDiffusionPipeline:control_inpaint', 'ControlNetModel', '6TOEAhgF-bhi'], + [ + 'windows-sd15-pag-control-inpaint-fixed', + 'StableDiffusionPAGPipeline:control_inpaint', + 'ControlNetModel', + 'Hujzhp32JY-C', + ], +]; + +for (const [slug, workflowId, taskId, strength] of [ + ['canny-black-ink', 'FluxCannyPipeline:control_edit_image', '4gv8bcow7Kk7', 1], + ['depth-paint', 'FluxDepthPipeline:control_edit_image', 'GSYDNu2yTddj', 0.64], +]) { + test( + `the revised ${slug} capture binds both original uploads and its consumed strength`, + { skip: !revisedFluxRoot }, + async () => { + const evidencePath = resolve(revisedFluxRoot, `exact-${slug}-evidence`, 'evidence.json'); + const { receipt, evidence } = await readCanonicalWorkflowEvidence({ + clientRoot, + backendRoot, + workflowId, + evidencePath, + }); + assert.equal(evidence.format, integratedControlUploadFormat); + assert.equal(receipt.taskId, taskId); + assert.equal(receipt.conditioningModel.source, 'integrated_checkpoint'); + assert.equal(receipt.guideBinding.sha256, evidence.inputs[0].file.sha256); + assert.equal(receipt.inputBinding.sha256, evidence.inputs[1].file.sha256); + assert.equal(receipt.observationLimits.originalUploadResponsesObserved, true); + assert.equal(receipt.qualificationClaims.rightsApproved, false); + const read = (ref) => JSON.parse(readCanonicalEvidenceFile(dirname(evidencePath), ref).bytes); + const graph = read(evidence.graphRequest); + const { latestOutput: output } = read(evidence.outputPackage); + const sampler = output.resolvedExecutionInputs.nodes.find(({ action }) => action === 'ControlEdit'); + assert.equal(sampler.fields.strength.value, strength); + sampler.fields.strength.value = 0.8; + assert.throws( + () => verifySavedControlImageInputs(graph, output, evidence.inputs, workflowId, evidence.format), + /Saved control sampler fields differ/u, + ); + }, + ); +} + +test('the retained native host input witness is scoped to the task, output store and exact source files', () => { + const sourceValue = '@data/images/guide.png'; + const sha256 = 'd'.repeat(64); + const inputs = [{ sourceValue, file: { bytes: 41, sha256 } }]; + const task = { taskId: 'closed-task', persistedOutputSha256: '8'.repeat(64) }; + const witness = { ...task, files: [{ sourceValue, byteSize: 41, sha256 }] }; + verifyRetainedHostImageFiles(witness, { ...task, inputs }); + assert.throws( + () => verifyRetainedHostImageFiles({ ...witness, taskId: 'wrong' }, { ...task, inputs }), + assert.AssertionError, + ); + assert.throws( + () => verifyRetainedHostImageFiles({ ...witness, persistedOutputSha256: '0'.repeat(64) }, { ...task, inputs }), + assert.AssertionError, + ); + assert.throws( + () => + verifyRetainedHostImageFiles({ ...witness, files: [{ ...witness.files[0], byteSize: 42 }] }, { ...task, inputs }), + /Original host inputs differ/u, + ); +}); + +for (const [workflowId, variable] of [ + ['StableDiffusionXLControlNetPipeline:control_edit_image', 'MODIFF_SDXL_CONTROL_BOATHOUSE_EVIDENCE'], + ['StableDiffusionXLPAGPipeline:control_edit_image', 'MODIFF_SDXL_PAG_PORT_HOLE_EVIDENCE'], + ['StableDiffusionXLPAGPipeline:control_edit_image', 'MODIFF_SDXL_PAG_TIERED_GLASS_EVIDENCE'], +]) { + const fixture = process.env[variable]; + test(workflowId + ' binds its source, guide and native edge preparation', { skip: !fixture }, async () => { + const evidencePath = resolve(fixture); + const { receipt, evidence } = await readCanonicalWorkflowEvidence({ + clientRoot, + backendRoot, + workflowId, + evidencePath, + }); + const [guide, source] = evidence.inputs; + assert.equal(receipt.inputBinding.sha256, source.file.sha256); + assert.equal(receipt.guideBinding.sha256, guide.file.sha256); + const loadFieldsOnly = variable === 'MODIFF_SDXL_PAG_TIERED_GLASS_EVIDENCE'; + assert.equal(receipt.observationLimits.nativeEdgeMapObserved, !loadFieldsOnly); + assert.equal(receipt.observationLimits.processedControlPixelsObserved, false); + if (workflowId.startsWith('StableDiffusionXLPAG')) { + assert.equal(receipt.observationLimits.effectivePagSettingsObserved, false); + } + const read = (ref) => JSON.parse(readCanonicalEvidenceFile(dirname(evidencePath), ref).bytes); + const graph = read(evidence.graphRequest); + const { latestOutput: output } = read(evidence.outputPackage); + if (loadFieldsOnly) { + assert.equal(receipt.observationLimits.sourceByteWitness, 'native-load-and-upload-with-typed-wire'); + const load = output.resolvedExecutionInputs.nodes.find(({ nodeId }) => nodeId === receipt.guideBinding.nodeId); + load.fields.source_hashes.value[0] = 'b'.repeat(64); + } else { + const canny = output.resolvedExecutionInputs.nodes.find(({ action }) => action === 'Canny'); + canny.mediaEvidence.inputs.image[0].sha256 = 'b'.repeat(64); + } + assert.throws( + () => verifySavedControlImageInputs(graph, output, evidence.inputs, workflowId, evidence.format), + loadFieldsOnly ? /Saved image load fields differ for guide/u : /Canny guide bytes differ/u, + ); + }); +} + +for (const [slug, workflowId, taskId] of [ + ['linux-flux-canny-backdrop-mask-math', 'FluxCannyPipeline:control_inpaint', '6jBwgHT1CJzd'], + ['linux-flux-depth-boat-patch-math', 'FluxDepthPipeline:control_inpaint', 'fzHPC9ZCZoH-'], + ['linux-flux-canny-ink-cube-math', 'FluxCannyPipeline:control_edit_image', 'NSXOcA60DY5Q'], + ['linux-flux-depth-boat-paint-math', 'FluxDepthPipeline:control_edit_image', 'uJXjYkrtPtwr'], +]) { + test('recovers the original integrated control run for ' + workflowId, { skip: !integratedRoot }, async () => { + const evidencePath = resolve(integratedRoot, slug, 'exact-native-evidence.json'); + const { receipt, evidence } = await readCanonicalWorkflowEvidence({ + clientRoot, + backendRoot, + workflowId, + evidencePath, + }); + assert.equal(receipt.taskId, taskId); + assert.equal(receipt.conditioningModel.source, 'integrated_checkpoint'); + assert.equal(receipt.observationLimits.originalUploadResponsesObserved, false); + assert.equal(receipt.observationLimits.hostFilesMatchedNativeLoads, true); + assert.equal(receipt.observationLimits.processedControlPixelsObserved, false); + assert.equal(receipt.qualificationClaims.rightsApproved, false); + const [guide, source, mask] = evidence.inputs; + assert.equal(receipt.guideBinding.sha256, guide.file.sha256); + assert.equal(receipt.inputBinding.sha256, source.file.sha256); + assert.equal(receipt.maskBinding?.sha256, mask?.file.sha256); + const read = (ref) => JSON.parse(readCanonicalEvidenceFile(dirname(evidencePath), ref).bytes); + const graph = read(evidence.graphRequest); + const { latestOutput: output } = read(evidence.outputPackage); + const sampler = Object.values(graph.nodes).find(({ action }) => /^Control(?:Edit|Inpaint)$/u.test(action)); + sampler.params.control_image.sourceId = sampler.params.image.sourceId; + assert.throws( + () => verifySavedControlImageInputs(graph, output, evidence.inputs, workflowId), + assert.AssertionError, + ); + }); +} + +for (const [slug, workflowId, componentClass, taskId] of cases) { + test('recovers the historical guide and verified sampler for ' + workflowId, { skip: !root }, async () => { + const evidencePath = resolve(root, slug, 'exact-native-evidence.json'); + const { receipt, evidence } = await readCanonicalWorkflowEvidence({ + clientRoot, + backendRoot, + workflowId, + evidencePath, + }); + assert.equal(receipt.proofKind, 'real_backend_input_bound_model_variant'); + assert.equal(receipt.taskId, taskId); + assert.equal(receipt.observationLimits.processedControlPixelsObserved, false); + assert.equal(receipt.qualificationClaims.rightsApproved, false); + assert.equal((receipt.guideBinding ?? receipt.inputBinding).sha256, evidence.inputs[0].file.sha256); + const read = (ref) => JSON.parse(readCanonicalEvidenceFile(dirname(evidencePath), ref).bytes); + const graph = read(evidence.graphRequest); + const { latestOutput: output } = read(evidence.outputPackage); + const inputs = evidence.inputs; + const [input] = inputs; + const sampler = (api) => + Object.values(api.nodes).find(({ action }) => + ['ControlGenerate', 'ControlEdit', 'ControlInpaint'].includes(action), + ); + const disconnected = structuredClone(graph); + sampler(disconnected).params.control_image.sourceKey = 'width'; + assert.throws(() => verifySavedControlImageInputs(disconnected, output, inputs, workflowId), assert.AssertionError); + + const changedGuide = { ...input, file: { ...input.file, sha256: '0'.repeat(64) } }; + assert.throws( + () => verifySavedControlImageInputs(graph, output, [changedGuide, ...inputs.slice(1)], workflowId), + assert.AssertionError, + ); + + const changedSettings = structuredClone(output); + const action = sampler(graph).action; + const fields = changedSettings.resolvedExecutionInputs.nodes.find((row) => row.action === action).fields; + const guidance = fields.true_cfg_scale ?? fields.guidance_scale; + guidance.value += 1; + assert.throws( + () => verifySavedControlImageInputs(graph, changedSettings, inputs, workflowId), + /Saved control sampler fields differ/u, + ); + if (inputs.length > 1) { + const [guide, source, ...other] = inputs; + assert.equal(receipt.inputBinding.sha256, source.file.sha256); + assert.throws( + () => verifySavedControlImageInputs(graph, output, [source, guide, ...other], workflowId), + /Saved image bytes differ for guide/u, + ); + } + if (inputs.length === 3) { + assert.equal(receipt.maskBinding.sha256, inputs[2].file.sha256); + assert.equal(receipt.maskBinding.decodedImage.mode, 'L'); + } + + const completed = read(evidence.graphCompleted); + completed.runtimeHints.controlledArtifacts[0].componentClass = 'OtherComponent'; + const loader = Object.values(graph.nodes).find(({ action }) => action === 'LoadPipeline').params; + assert.throws( + () => + verifyConditioningModels({ + loader, + target: receipt, + pipelineClass: loader.pipeline_class.value, + componentClass, + conditioningKind: loader.conditioning_kind.value, + componentParameter: componentClass === 'T2IAdapter' ? 'adapter' : 'controlnet', + completed, + hints: output.apiGraphSnapshot.runtimeHints, + runtime: selectBackendRuntimeFingerprintEvidence([read(evidence.runDetail).task.runtimeFingerprint]), + observations: evidence.modelObservations.map(read), + }), + /OtherComponent/u, + ); + }); +} diff --git a/scripts/saved-vace-composite-evidence.mjs b/scripts/saved-vace-composite-evidence.mjs new file mode 100644 index 00000000..3d31891c --- /dev/null +++ b/scripts/saved-vace-composite-evidence.mjs @@ -0,0 +1,223 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { readFileSync, realpathSync } from 'node:fs'; +import { dirname } from 'node:path'; +import { canonicalJsonHash } from './canonical-json.mjs'; +import { backendContractIdentity, canonicalGraphIdentity, normalizeBackendRuntime } from './live-proof-provenance.mjs'; +import { validateNativeVariantOutput } from './native-variant-run-evidence.mjs'; +import { canonicalWorkflowAuthoringContract, readCanonicalEvidenceFile } from './release-contract-core.mjs'; +import { decodedMediaHash, technicalMediaErrors } from './template-gallery-harness.mjs'; + +const savedGraphHash = 'sha256:canonical-graph-v1:5b7ac5d2442e6c92e28ee9bff7e02847c3de46dc2570e5d7eb779583f186fc0c'; +const savedSourceFingerprint = + 'sha256:backend-source-v1:438519cbac050bb30e69d86506f4510f260d790899896038d9707a5edd488e95'; +const savedOutputHash = 'sha256:bytes:a90aff3b61c664b51073574cc6c12efa894f45b88226637b254c9d81a53aad87'; +const replayedRegistryHash = '9f1427b04388e4139fe0123f77bb4b01a312bff4554ea60c2495511ef6f00512'; +const sha256 = (bytes) => createHash('sha256').update(bytes).digest('hex'); + +export function verifySavedVaceTaskIdentity(queue, task, output) { + assert.equal(queue.status, 'running'); + assert.equal(task.status, 'completed'); + assert.ok(queue.started_at <= queue.updated_at && queue.updated_at < task.completed_at); + for (const field of [ + 'task_id', + 'sid', + 'attempt_index', + 'client_run_id', + 'run_input_hash', + 'workflow_tab_id', + 'workflow_canvas_epoch', + ]) { + assert.notEqual(queue[field], undefined, field); + assert.equal(queue[field], task[field], field); + } + assert.equal(output.taskId, task.task_id); + assert.equal(output.runInputHash, task.run_input_hash); + assert.equal(output.clientRunId, task.client_run_id); + assert.equal(output.attemptIndex, task.attempt_index); +} + +// The archived server records both ends of this specific task. They preserve +// the prepared graph and inputs. The original dispatch and event are absent. +export async function readSavedVaceCompositeEvidence({ manifest, graph, authoring, artifact, evidencePath }) { + const target = canonicalWorkflowAuthoringContract(manifest, graph, authoring, artifact); + assert.equal(target.workflowId, 'WanVACEPipeline:video_inpaint'); + const descriptorBytes = readFileSync(evidencePath); + const evidence = JSON.parse(descriptorBytes); + assert.equal(evidence.workflowId, target.workflowId); + const root = dirname(realpathSync(evidencePath)); + const retainedFiles = []; + const read = (ref, limit) => { + const result = readCanonicalEvidenceFile(root, ref, limit); + retainedFiles.push(ref); + return result; + }; + const json = (ref) => JSON.parse(read(ref).bytes); + const run = json(evidence.run); + const [output] = run.outputs; + assert.equal(run.outputs.length, 1); + const { task } = run; + verifySavedVaceTaskIdentity(json(evidence.queue).current, task, output); + assert.equal(output.modelType, target.modelType); + assert.equal(output.mode, target.task); + const source = task.runtimeFingerprint.backendSource; + assert.deepEqual(json(evidence.health).backend_source, source); + assert.equal(source.fingerprint, savedSourceFingerprint); + const sourceManifest = json(evidence.sourceManifest); + const sourceFiles = Object.entries(sourceManifest.files) + .filter( + ([path]) => + /^(main\.py|pyproject\.toml)$/u.test(path) || + (/^(modiff|modules|utils)\/.+\.(py|toml|ini)$/iu.test(path) && + path.split('/').every((part) => !part.startsWith('.') && part !== '__pycache__')), + ) + .map(([path, { sha256 }]) => ({ path, sha256 })) + .sort((left, right) => (left.path < right.path ? -1 : 1)); + assert.equal(sourceFiles.length, source.fileCount); + assert.equal( + 'sha256:backend-source-v1:' + canonicalJsonHash({ files: sourceFiles, gitCommit: source.gitCommit }), + savedSourceFingerprint, + ); + + const registry = read(evidence.nodes); + const replay = json(evidence.registryReplay); + assert.equal(replay.nodeHash, replayedRegistryHash); + assert.equal(sha256(registry.bytes), replayedRegistryHash); + assert.equal(replay.nodeBytes, registry.bytes.length); + assert.equal(replay.sourceFingerprint, savedSourceFingerprint); + assert.equal(replay.fileCount, source.fileCount); + assert.equal(replay.modelRuns, 0); + assert.equal(replay.python, task.runtimeFingerprint.packages.python); + assert.match(replay.accelerator, /MI300X/u); + for (const name of ['diffusers', 'transformers', 'peft', 'accelerate', 'safetensors', 'torch']) { + assert.equal(replay.versions[name], task.runtimeFingerprint.packages[name], name); + } + const api = output.apiGraphSnapshot; + const identity = canonicalGraphIdentity(api); + assert.equal(identity.hash, savedGraphHash); + const nodes = JSON.parse(registry.bytes); + assert.ok(identity.canonicalGraph.nodes.every(({ module, action }) => nodes.nodes[`${module}.${action}`])); + const backendContract = backendContractIdentity(nodes, identity.canonicalGraph); + const entry = (module, action) => { + const found = Object.entries(api.nodes).filter(([, node]) => node.module === module && node.action === action); + assert.equal(found.length, 1); + return found[0]; + }; + const [loaderId, loader] = entry('modules.DiffusersVideo', 'LoadPipeline'); + const [upscalerId, upscaler] = entry('modules.Spandrel', 'Upscaler'); + assert.deepEqual( + [loader, upscaler].map(({ params }) => ({ + repoId: params.model_id.value.value, + revision: params.revision?.value ?? params.model_id.value.revision, + })), + target.modelSet, + ); + const [encoderId, encoder] = entry('modules.DiffusersVideo', 'EncodeInputs'); + const sourceId = api.nodes[encoder.params.video.sourceId].params.video.sourceId; + const maskId = api.nodes[encoder.params.mask.sourceId].params.mask.sourceId; + const referenceId = encoder.params.reference_images.sourceId; + assert.equal(new Set([sourceId, maskId, referenceId]).size, 3); + const [compositeId, composite] = entry('modules.Video', 'MaskedComposite'); + assert.equal(composite.params.source.sourceId, sourceId); + assert.equal(composite.params.generated.sourceId, upscalerId); + assert.equal(composite.params.mask.sourceId, encoder.params.mask.sourceId); + const [exportId, exporter] = entry('modules.Video', 'Export'); + assert.equal(exporter.params.video.sourceId, compositeId); + assert.equal(output.nodeId, exportId); + + const resolved = output.resolvedExecutionInputs; + assert.equal(resolved.taskId, task.task_id); + assert.equal(resolved.attemptIndex, task.attempt_index); + assert.equal(resolved.truncated, false); + const fields = (id) => resolved.nodes.find(({ nodeId }) => nodeId === id).fields; + assert.equal(fields(loaderId).revision.value, target.modelSet[0].revision); + assert.equal(fields(loaderId).model_id.value, target.modelSet[0].repoId); + assert.equal(fields(upscalerId).model_id.value, target.modelSet[1].repoId); + assert.equal(fields(encoderId).prompt.value, encoder.params.prompt.value); + assert.equal(fields(encoderId).executed_task.value, target.task); + assert.equal(fields(exportId).fps.value, 16); + const sourceFile = read(evidence.sourceVideo, 128 * 1024 * 1024); + read(evidence.maskVideo); + read(evidence.referenceImage); + const inputLedger = json(evidence.inputLedger).inputs; + const proof = json(evidence.mediaReplay); + for (const [index, ref] of [evidence.sourceVideo, evidence.maskVideo, evidence.referenceImage].entries()) { + assert.equal(inputLedger[index].sha256, ref.sha256); + assert.equal(inputLedger[index].bytes, ref.bytes); + } + assert.deepEqual(fields(referenceId).source_hashes.value, [evidence.referenceImage.sha256]); + assert.equal(proof.sourceFileSha256, evidence.sourceVideo.sha256); + assert.equal(proof.maskFileSha256, evidence.maskVideo.sha256); + assert.equal(proof.referenceFileSha256, evidence.referenceImage.sha256); + assert.equal(proof.normalizedSourcePixelSha256, fields(encoderId).video_source_sha256.value); + assert.equal(proof.normalizedSourceFrames, fields(encoderId).video_source_frames.value); + assert.equal(proof.originalNormalizedInputVerified, true); + + const rendered = read(evidence.output, 64 * 1024 * 1024); + assert.equal(output.mediaHash, savedOutputHash); + assert.equal(proof.outputFileSha256, savedOutputHash); + assert.equal('sha256:bytes:' + evidence.output.sha256, savedOutputHash); + validateNativeVariantOutput({ + task, + output, + bytes: rendered.bytes, + displayType: 'video', + contentType: 'video/mp4', + outputRef: { file: evidence.output, mediaType: 'video', backendPath: output.backendMediaPath }, + }); + const decoded = await decodedMediaHash(rendered.file, 'video'); + const geometry = { width: 1664, height: 960, frames: 161, durationSeconds: 161 / 16 }; + assert.deepEqual(technicalMediaErrors(decoded, geometry, 'video'), []); + assert.equal(decoded.hasAudio, false); + assert.equal(decoded.fps, 16); + const measurement = task.runtimeMeasurement; + assert.equal(measurement.backend, 'rocm'); + assert.equal(measurement.peakMeasurementVersion, 2); + assert.ok(measurement.elapsedSeconds > 0 && measurement.peakAllocatedBytes > 0); + + const receipt = { + schemaVersion: 1, + format: 'modiff.canonical-workflow-run-receipt.v1', + proofKind: 'real_backend_input_bound_model_variant', + ...target, + taskId: task.task_id, + outputId: output.id, + capturedAt: new Date(task.completed_at * 1000).toISOString(), + graphHash: identity.hash, + resourceCandidateId: null, + runtimeFingerprint: normalizeBackendRuntime(task.runtimeFingerprint).lockFingerprint, + backendSourceFingerprint: source.fingerprint, + backendContractFingerprint: backendContract.fingerprint, + outputHash: output.mediaHash, + executionDurationSeconds: measurement.elapsedSeconds, + peakMemoryBytes: measurement.peakAllocatedBytes, + canonicalDefaultsExecuted: false, + inputBinding: { + nodeId: sourceId, + field: 'file', + sha256: evidence.sourceVideo.sha256, + byteSize: sourceFile.bytes.length, + normalizedVideoSha256: proof.normalizedSourcePixelSha256, + }, + maskBinding: { nodeId: maskId, field: 'file', sha256: evidence.maskVideo.sha256 }, + referenceBindings: [{ nodeId: referenceId, field: 'file', inputIndex: 0, sha256: evidence.referenceImage.sha256 }], + promptBinding: { nodeId: encoderId, field: 'prompt', sha256: sha256(encoder.params.prompt.value) }, + decodedOutput: { kind: 'video', ...geometry, fps: decoded.fps, hash: decoded.hash }, + observationLimits: { + originalRunningQueueMatched: true, + originalCompletionRecordMatched: true, + independentDispatchAcknowledgment: false, + independentCompletionEvent: false, + fullConsumedFieldAccounting: false, + physicalPlatformQualification: false, + }, + qualificationClaims: { + publicTemplate: false, + qualityApproved: false, + rightsApproved: false, + hardwareQualified: false, + modelResourceQualified: false, + }, + }; + return { descriptorBytes, retainedFiles, evidence, evidenceRoot: root, receipt }; +} diff --git a/scripts/saved-vace-composite-evidence.test.mjs b/scripts/saved-vace-composite-evidence.test.mjs new file mode 100644 index 00000000..2d6beba1 --- /dev/null +++ b/scripts/saved-vace-composite-evidence.test.mjs @@ -0,0 +1,31 @@ +import assert from 'node:assert/strict'; +import { test } from 'node:test'; +import { verifySavedVaceTaskIdentity } from './saved-vace-composite-evidence.mjs'; + +test('archived VACE output joins the same native task and attempt', () => { + const queue = { + task_id: 'original-task', + sid: 'worker-session', + attempt_index: 0, + client_run_id: 'client-run', + run_input_hash: 'ordered-inputs', + workflow_tab_id: 'original-workflow', + workflow_canvas_epoch: 4, + status: 'running', + started_at: 1, + updated_at: 2, + }; + const task = { ...queue, status: 'completed', completed_at: 3 }; + const output = { + taskId: task.task_id, + runInputHash: task.run_input_hash, + clientRunId: task.client_run_id, + attemptIndex: task.attempt_index, + }; + assert.doesNotThrow(() => verifySavedVaceTaskIdentity(queue, task, output)); + assert.throws(() => verifySavedVaceTaskIdentity({ ...queue, attempt_index: 1 }, task, output)); + assert.throws(() => verifySavedVaceTaskIdentity({ ...queue, sid: 'different-session' }, task, output)); + assert.throws(() => verifySavedVaceTaskIdentity({ ...queue, updated_at: 4 }, task, output)); + assert.throws(() => verifySavedVaceTaskIdentity(queue, { ...task, status: 'failed' }, output)); + assert.throws(() => verifySavedVaceTaskIdentity(queue, task, { ...output, runInputHash: 'different-inputs' })); +}); diff --git a/scripts/saved-workflow-compatibility.test.mjs b/scripts/saved-workflow-compatibility.test.mjs new file mode 100644 index 00000000..5c92f008 --- /dev/null +++ b/scripts/saved-workflow-compatibility.test.mjs @@ -0,0 +1,207 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { readFileSync } from 'node:fs'; +import { join, resolve } from 'node:path'; +import { after, before, test } from 'node:test'; +import { createServer } from 'vite'; +import { canonicalGraphIdentity } from './live-proof-provenance.mjs'; + +const backend = resolve(process.env.MODIFF_BACKEND_DIR ?? '../MoDiff'); +let server, flow, studio, packages, groups, blocks, specs, hash; +before(async () => { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, value), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { + location: { origin: 'http://127.0.0.1' }, + localStorage: globalThis.localStorage, + dispatchEvent: () => true, + }; + globalThis.fetch = () => { + throw new Error('Saved workflow compatibility tests cannot access the network.'); + }; + server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, hmr: false, watch: null }, + appType: 'custom', + }); + flow = (await server.ssrLoadModule('/src/stores/useFlowStore.ts')).useFlowStore; + studio = (await server.ssrLoadModule('/src/stores/useStudioStore.ts')).useStudioStore; + packages = await server.ssrLoadModule('/src/studio/workflowPackage.ts'); + groups = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + blocks = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); + specs = await server.ssrLoadModule('/src/studio/executionSpecs.ts'); + hash = await server.ssrLoadModule('/src/studio/stableHash.ts'); +}); +after(async () => server?.close()); + +const recipeAction = 'DiffusersExecutionRecipe'; +function attention(api) { + const recipe = Object.values(api.nodes).find(({ action }) => action === recipeAction); + assert.ok(recipe?.params.attention_backend); + return recipe.params.attention_backend; +} +function exportGraph(sourceGraph) { + return flow.getState().exportGraph('test', undefined, { sourceGraph, randomizeSeeds: false }); +} +function openWorkflow(value) { + const pkg = packages.parseWorkflowPackage(value); + assert.ok(pkg, 'The normal workflow parser must accept the saved document.'); + studio.getState().createWorkflowTab(pkg.title, pkg.snapshot, 'import', pkg.sourceLabel); + const { nodes, edges, viewport } = flow.getState(); + return { nodes, edges, viewport }; +} +function compareOnlyAttention(before, after) { + assert.equal(attention(before).value, '_native_math'); + assert.equal(attention(after).value, 'auto'); + const reverted = structuredClone(after); + attention(reverted).value = '_native_math'; + assert.equal(canonicalGraphIdentity(reverted).hash, canonicalGraphIdentity(before).hash); +} +function savedPreset(folder, modelType, options = {}) { + const graph = JSON.parse(readFileSync(join(backend, 'data/graphs/studio', folder, 'unconditional-image.json'))); + const recipe = graph.nodes.find(({ data }) => data.action === recipeAction); + const loader = graph.nodes.find(({ data }) => data.action === 'LoadPipeline'); + recipe.data.params.attention_backend.value = '_native_math'; + if (options.otherRevision) loader.data.params.revision.value = 'a'.repeat(40); + const grouped = groups.groupNewOperationGraph(graph); + if (options.explicit) { + const setup = grouped.nodes.find(({ data }) => + data.blockInstanceV2?.definitionSnapshot.source.provider.endsWith('/setup'), + ); + const instance = setup.data.blockInstanceV2; + const control = instance.effectiveInterface.controls.find(({ binding }) => binding.fieldId === 'attention_backend'); + setup.data.blockInstanceV2 = blocks.setBlockInstanceValueV2(instance, control.controlId, '_native_math'); + } + return { graph: grouped, metadata: { studio: { mode: 'unconditional_image', modelType, resourceMode: 'expert' } } }; +} + +test('older stages restore tested defaults while explicit attention and unreviewed pins are preserved', () => { + for (const [folder, modelType] of [ + ['ddpm-pipeline', 'DDPMPipeline'], + ['consistency-model-pipeline', 'ConsistencyModelPipeline'], + ]) { + const value = savedPreset(folder, modelType); + const restored = openWorkflow(value); + compareOnlyAttention(exportGraph(value.graph), exportGraph(restored)); + assert.equal( + canonicalGraphIdentity(exportGraph(openWorkflow({ ...value, graph: restored }))).hash, + canonicalGraphIdentity(exportGraph(restored)).hash, + ); + for (const options of [{ explicit: true }, { otherRevision: true }]) { + const custom = savedPreset(folder, modelType, options); + assert.equal(attention(exportGraph(openWorkflow(custom))).value, '_native_math'); + } + } +}); + +test('restored managed receipts use current authoring while keeping the original exact Run identity', () => { + const archives = ['unconditional', 'video-attention'].flatMap( + (kind) => JSON.parse(readFileSync(join(backend, `data/${kind}-studio-spec-compatibility.v1.json`))).specifications, + ); + const manifest = JSON.parse(readFileSync(join(backend, 'data/workflow-library-manifest.json'))); + const paths = new Map(manifest.workflows.map(({ id, graphPath }) => [id, graphPath])); + for (const { specification: previous } of archives) { + const { contentHash, ...semantic } = previous; + const current = { + ...semantic, + bindings: semantic.bindings.map(([role, field, source]) => [ + role, + field, + role === 'diffusersRecipe' && field === 'attention_backend' ? 'attentionBackend' : source, + ]), + }; + current.contentHash = `studio-spec-v1-${hash.hashString(hash.stableStringify(current))}`; + const capabilities = [ + { + modelType: previous.modelType, + studioExecutionSpecSchemaVersion: 1, + studioExecutionSpecModes: [previous.mode], + studioExecutionSpecs: [current], + }, + ]; + const graphPath = paths.get(`${previous.modelType}:${previous.mode}`); + assert.ok(graphPath, previous.id); + const graph = JSON.parse(readFileSync(join(backend, 'data/graphs', graphPath))); + graph.nodes.find(({ data }) => data.action === recipeAction).data.params.attention_backend.value = '_native_math'; + const device = graph.nodes.find(({ data }) => data.action === recipeAction).data.params.device.value; + const nodes = Object.fromEntries(graph.nodes.map(({ data, id }) => [data.studioRole, id])); + const form = { + mode: previous.mode, + modelType: previous.modelType, + resourceMode: 'expert', + quantizationMode: 'none', + device, + offloadMode: 'none', + }; + const identity = { + schemaVersion: 1, + id: previous.id, + contentHash, + executionProfileId: previous.executionProfileId, + }; + const binding = { + mode: form.mode, + modelType: form.modelType, + nodes, + executionSpec: identity, + managedNodeIds: graph.nodes.map(({ id }) => id), + managedEdgeIds: graph.edges.map(({ id }) => id), + fingerprint: `${form.mode}:${form.modelType}:${form.resourceMode}:${form.quantizationMode}:${previous.id}:${contentHash}`, + createdAt: 1, + updatedAt: 1, + }; + const value = { graph, metadata: { studio: form }, restore: { graphBindingSnapshot: binding } }; + const restored = openWorkflow(value); + const active = studio.getState().graphBinding; + assert.deepEqual(active.executionSpec, identity); + assert.equal(active.fingerprint, binding.fingerprint); + if (previous.mode === 'unconditional_image') { + compareOnlyAttention(exportGraph(graph), exportGraph(restored)); + } else { + const before = exportGraph(graph); + const after = exportGraph(restored); + assert.equal(attention(after).value, '_native_math'); + assert.equal(canonicalGraphIdentity(after).hash, canonicalGraphIdentity(before).hash); + } + assert.equal(specs.exactStudioExecutionSpecForBinding(capabilities, false, active), current); + assert.deepEqual(specs.studioExecutionSpecRuntimeReceipt(active, capabilities), { + schemaVersion: 1, + id: previous.id, + contentHash, + nodes, + }); + for (const changes of [{ contentHash: 'studio-spec-v1-ffffffff' }, { executionProfileId: 'unknown' }]) { + const unknown = { ...active, executionSpec: { ...identity, ...changes } }; + assert.throws(() => specs.studioExecutionSpecRuntimeReceipt(unknown, capabilities), /stale/); + } + const explicit = { ...value, metadata: { studio: { ...form, attentionBackend: '_native_math' } } }; + assert.equal(attention(exportGraph(openWorkflow(explicit))).value, '_native_math'); + } +}); + +const originalArchive = process.env.MODIFF_SAVED_ATTENTION_WORKFLOW; +test( + 'the original failing saved workflow opens, exports and reopens without changing the archive', + { skip: !originalArchive }, + () => { + const original = readFileSync(originalArchive); + const saved = JSON.parse(original); + const restored = openWorkflow(saved); + const current = exportGraph(restored); + compareOnlyAttention(saved.apiGraph, current); + assert.equal( + canonicalGraphIdentity(exportGraph(openWorkflow({ ...saved, graph: restored }))).hash, + canonicalGraphIdentity(current).hash, + ); + assert.equal( + createHash('sha256').update(readFileSync(originalArchive)).digest('hex'), + createHash('sha256').update(original).digest('hex'), + ); + }, +); diff --git a/scripts/select-browser-shard.mjs b/scripts/select-browser-shard.mjs new file mode 100644 index 00000000..f365eb23 --- /dev/null +++ b/scripts/select-browser-shard.mjs @@ -0,0 +1,34 @@ +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; +import { stripVTControlCharacters } from 'node:util'; + +// Playwright's list reporter emits selectors accepted by --test-list, including +// the suite path for parameterized tests declared on the same source line. +function selectors(filename) { + const listing = stripVTControlCharacters(readFileSync(filename, 'utf8')); + const total = listing.match(/^Total: (\d+) tests? in \d+ files?\s*$/m); + const tests = listing + .split(/\r?\n/) + .filter((line) => /^\s+.*:\d+:\d+ › /u.test(line)) + .map((line) => line.trim().replace(/:\d+:\d+(?= › )/u, '')); + assert.ok(total && tests.length && tests.length === Number(total[1]), 'Incomplete or empty Playwright discovery'); + assert.equal(new Set(tests).size, tests.length, 'Ambiguous Playwright test selectors'); + return tests; +} + +const [discoveryFile, shardValue, totalValue, resolvedFile] = process.argv.slice(2); +const shard = Number(shardValue); +const count = Number(totalValue); +assert.ok( + Number.isSafeInteger(count) && Number.isSafeInteger(shard) && shard >= 1 && shard <= count, + 'Expected a shard index between 1 and the shard count', +); +const all = selectors(discoveryFile); +assert.ok(all.length >= count, 'Every browser shard must have at least one test'); +const selected = all.filter((_, index) => index % count === shard - 1); +if (resolvedFile) { + assert.deepEqual(selectors(resolvedFile), selected, 'Playwright selection differs from the assigned test identities'); + console.log(`Verified browser shard ${shard}/${count}: ${selected.length} of ${all.length} Studio tests.`); +} else { + process.stdout.write(selected.join('\n') + '\n'); +} diff --git a/scripts/select-browser-shard.test.mjs b/scripts/select-browser-shard.test.mjs new file mode 100644 index 00000000..27bf22d3 --- /dev/null +++ b/scripts/select-browser-shard.test.mjs @@ -0,0 +1,50 @@ +import assert from 'node:assert/strict'; +import { spawnSync } from 'node:child_process'; +import { mkdtempSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import path from 'node:path'; +import test from 'node:test'; +import { fileURLToPath } from 'node:url'; + +const script = fileURLToPath(new URL('./select-browser-shard.mjs', import.meta.url)); + +test('Studio shard selection is balanced and rejects incomplete or ambiguous discovery', (t) => { + const dir = mkdtempSync(path.join(tmpdir(), 'browser-shard-')); + t.after(() => rmSync(dir, { recursive: true, force: true })); + const full = path.join(dir, 'full'); + const resolved = path.join(dir, 'resolved'); + const rows = ['alpha', 'beta', 'gamma', 'delta', 'epsilon'].map((title) => ` spec.ts:18:3 › parent › ${title}`); + const listing = (file, rows, count = rows.length) => + writeFileSync(file, ['Listing tests:', ...rows, `Total: ${count} tests in 1 file`].join('\n')); + const run = (...args) => spawnSync(process.execPath, [script, full, ...args], { encoding: 'utf8' }); + const rejected = (args, reason) => { + const result = run(...args); + assert.notEqual(result.status, 0); + assert.match(result.stderr, reason); + }; + + listing(full, rows); + const all = run('1', '1').stdout.trim().split('\n'); + const portions = ['1', '2', '3'].map((shard) => { + const result = run(shard, '3'); + assert.equal(result.status, 0, result.stderr); + return result.stdout.trim().split('\n'); + }); + assert.deepEqual( + portions.map((group) => group.length), + [2, 2, 1], + ); + assert.deepEqual(portions.flat().sort(), all.sort()); + listing(resolved, [rows[0], rows[3]]); + assert.equal(run('1', '3', resolved).status, 0); + listing(resolved, [rows[0], rows[1]]); + rejected(['1', '3', resolved], /selection differs/); + rejected(['0', '3'], /shard index/); + rejected(['1', '6'], /at least one test/); + listing(full, []); + rejected(['1', '1'], /empty Playwright discovery/); + listing(full, rows, 6); + rejected(['1', '1'], /Incomplete/); + listing(full, [rows[0], rows[0].replace(':18:3', ':19:3')]); + rejected(['1', '1'], /Ambiguous/); +}); diff --git a/scripts/server-actions.test.mjs b/scripts/server-actions.test.mjs index 684d9199..69982097 100644 --- a/scripts/server-actions.test.mjs +++ b/scripts/server-actions.test.mjs @@ -10,6 +10,8 @@ const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); let actionsModule; let originalFetch; let server; +let controlModule; +let cleanupFeedbackModule; before(async () => { globalThis.window = { @@ -25,11 +27,14 @@ before(async () => { appType: 'custom', }); actionsModule = await server.ssrLoadModule('/src/utils/serverActions.ts'); + cleanupFeedbackModule = await server.ssrLoadModule('/src/utils/runtimeCleanupFeedback.ts'); + controlModule = await server.ssrLoadModule('/src/utils/supervisorControl.ts'); originalFetch = globalThis.fetch; }); beforeEach(() => { globalThis.fetch = originalFetch; + controlModule.resetSupervisorControl(); }); after(async () => { @@ -44,6 +49,286 @@ function jsonResponse(value, status = 200) { }); } +test('advertised unsupervised workers stop directly without probing a missing control port', async () => { + controlModule.updateWorkerControl(controlModule.parseWorkerControl({ available: false, address: null })); + const requests = []; + globalThis.fetch = async (url) => { + requests.push(String(url)); + return jsonResponse({ error: false }); + }; + await actionsModule.requestExecutionStop(); + assert.deepEqual(requests, ['http://127.0.0.1:5191/stop']); +}); + +test('invalid legacy control configuration still permits the ordinary worker Stop fallback', async () => { + const config = (await server.ssrLoadModule('/app.config.ts')).default; + const previous = config.supervisorAddress; + const requests = []; + config.supervisorAddress = 'http://remote.example:8089'; + globalThis.fetch = async (url) => { + requests.push(String(url)); + return jsonResponse({ error: false }); + }; + try { + await actionsModule.requestExecutionStop(); + assert.deepEqual(requests, ['http://127.0.0.1:5191/stop']); + } finally { + config.supervisorAddress = previous; + } +}); + +test('explicit Stop retains a verified custom control address through metadata failure and polling backoff', async () => { + controlModule.updateWorkerControl( + controlModule.parseWorkerControl({ available: true, address: 'http://127.0.0.1:43001' }), + ); + controlModule.updateWorkerControl(undefined); + controlModule.supervisorControlFailed(); + assert.equal(controlModule.supervisorControlAddress(), null); + const requests = []; + globalThis.fetch = async (url) => { + requests.push(String(url)); + return jsonResponse({ error: false }); + }; + await actionsModule.requestExecutionStop(); + assert.deepEqual(requests, ['http://127.0.0.1:43001/stop']); +}); + +test('worker control metadata rejects malformed, remote, credentialed and non-origin destinations', () => { + assert.equal(controlModule.parseWorkerControl(undefined), undefined); + for (const value of [ + null, + [], + {}, + { available: 'true', address: null }, + { available: false, address: 'http://127.0.0.1:8089' }, + { available: true, address: null }, + { available: false, address: null, arbitrary: true }, + ...[ + 'http://example.com:9001', + 'http://127.0.0.2:9001', + 'https://127.0.0.1:9001', + 'http://user@127.0.0.1:9001', + 'http://127.0.0.1:9001/queue', + 'http://127.0.0.1:0', + 'http://127.0.0.1:65536', + 'http://127.0.0.1:9001?x=1', + 'http://2130706433:9001', + ].map((address) => ({ available: true, address })), + ]) { + assert.throws(() => controlModule.parseWorkerControl(value)); + } + assert.deepEqual(controlModule.parseWorkerControl({ available: true, address: 'http://127.0.0.1:43001/' }), { + available: true, + address: 'http://127.0.0.1:43001', + }); + assert.deepEqual(controlModule.parseWorkerControl({ available: true, address: 'http://127.0.0.1:80' }), { + available: true, + address: 'http://127.0.0.1', + }); +}); + +test('older health metadata cannot replace a newer verified supervisor destination', () => { + const older = controlModule.beginWorkerControlRead(); + const newer = controlModule.beginWorkerControlRead(); + controlModule.updateWorkerControl({ available: true, address: 'http://127.0.0.1:43001' }, newer); + controlModule.updateWorkerControl({ available: false, address: null }, older); + assert.equal(controlModule.supervisorControlAddress(), 'http://127.0.0.1:43001'); +}); + +async function withControlConfiguration(overrides, run) { + const config = (await server.ssrLoadModule('/app.config.ts')).default; + const previous = Object.fromEntries(Object.keys(overrides).map((key) => [key, config[key]])); + Object.assign(config, overrides); + try { + return await run(config); + } finally { + Object.assign(config, previous); + } +} + +const advertisedBackend = { host: '127.0.0.1', port: 8088, scheme: 'http' }; +const adjacentControl = { available: true, address: 'http://127.0.0.1:8089' }; + +test('production tunnel Stop uses the configured adjacent supervisor and never the remote-local port', async () => { + await withControlConfiguration( + { + serverAddress: 'http://127.0.0.1:18088', + backendAddress: 'http://127.0.0.1:18088', + supervisorAddress: 'http://127.0.0.1:18089', + supervisorAddressExplicit: false, + }, + async () => { + controlModule.updateWorkerControl(controlModule.parseWorkerControl(adjacentControl, advertisedBackend)); + const requests = []; + globalThis.fetch = async (url) => { + requests.push(String(url)); + return jsonResponse({ error: false }); + }; + await actionsModule.requestExecutionStop(); + assert.deepEqual(requests, ['http://127.0.0.1:18089/stop']); + requests.length = 0; + globalThis.fetch = async (url) => { + requests.push(String(url)); + if (requests.length === 1) throw new TypeError('Owned supervisor tunnel unavailable.'); + return jsonResponse({ error: false }); + }; + await actionsModule.requestExecutionStop(); + assert.deepEqual(requests, ['http://127.0.0.1:18089/stop', 'http://127.0.0.1:18088/stop']); + }, + ); +}); + +test('direct and DEV-proxied backend metadata preserve the actual custom supervisor port', async () => { + await withControlConfiguration( + { + serverAddress: 'http://127.0.0.1:5191', + backendAddress: 'http://127.0.0.1:8088', + supervisorAddress: 'http://127.0.0.1:8089', + supervisorAddressExplicit: false, + }, + () => { + assert.equal( + controlModule.parseWorkerControl(adjacentControl, advertisedBackend).address, + 'http://127.0.0.1:8089', + ); + assert.equal( + controlModule.parseWorkerControl({ available: true, address: 'http://127.0.0.1:43001' }, advertisedBackend) + .address, + 'http://127.0.0.1:43001', + ); + }, + ); +}); + +test('a nonadjacent tunneled supervisor requires a trusted explicit override and otherwise Stop uses only the worker', async () => { + await withControlConfiguration( + { + serverAddress: 'http://127.0.0.1:18088', + backendAddress: 'http://127.0.0.1:18088', + supervisorAddress: 'http://127.0.0.1:18089', + supervisorAddressExplicit: false, + }, + async (config) => { + const custom = { available: true, address: 'http://127.0.0.1:43001' }; + const unresolved = controlModule.parseWorkerControl(custom, advertisedBackend); + assert.deepEqual(unresolved, { available: true, address: null }); + controlModule.updateWorkerControl(unresolved); + assert.throws(() => controlModule.supervisorControlAddress(), /supervisor.*configured backend/i); + const requests = []; + globalThis.fetch = async (url) => { + requests.push(String(url)); + return jsonResponse({ error: false }); + }; + await actionsModule.requestExecutionStop(); + assert.deepEqual(requests, ['http://127.0.0.1:18088/stop']); + config.supervisorAddressExplicit = true; + config.supervisorAddress = 'http://127.0.0.1:19001'; + controlModule.updateWorkerControl(controlModule.parseWorkerControl(custom, advertisedBackend)); + assert.equal(controlModule.supervisorControlAddress(), 'http://127.0.0.1:19001'); + config.supervisorAddress = 'http://remote.example:19001'; + assert.throws( + () => controlModule.parseWorkerControl(custom, advertisedBackend), + /Invalid supervisor control address/, + ); + }, + ); +}); + +test('control translation rejects metadata authority outside a matching loopback adjacent pair', async () => { + await withControlConfiguration( + { + backendAddress: 'http://127.0.0.1:18088', + supervisorAddress: 'http://127.0.0.1:18089', + supervisorAddressExplicit: false, + }, + (config) => { + for (const metadata of [ + null, + [], + {}, + { ...advertisedBackend, host: 'example.com' }, + { ...advertisedBackend, host: '127.0.0.2' }, + { ...advertisedBackend, host: 'user@127.0.0.1' }, + { ...advertisedBackend, port: '8088' }, + { ...advertisedBackend, port: 0 }, + { ...advertisedBackend, port: 65536 }, + { ...advertisedBackend, scheme: 'file' }, + { ...advertisedBackend, host: '::1' }, + ]) { + assert.deepEqual(controlModule.parseWorkerControl(adjacentControl, metadata), { + available: true, + address: null, + }); + } + for (const address of [ + 'http://example.com:18088', + 'http://user@127.0.0.1:18088', + 'http://2130706433:18088', + 'http://127.0.0.1:65536', + ]) { + config.backendAddress = address; + assert.deepEqual(controlModule.parseWorkerControl(adjacentControl, advertisedBackend), { + available: true, + address: null, + }); + } + config.backendAddress = 'http://127.0.0.1:65535'; + assert.deepEqual(controlModule.parseWorkerControl(adjacentControl, advertisedBackend), { + available: true, + address: null, + }); + config.backendAddress = 'http://backend.example:18088'; + config.supervisorAddress = 'http://127.0.0.1:19001'; + config.supervisorAddressExplicit = true; + assert.equal( + controlModule.parseWorkerControl(adjacentControl, advertisedBackend).address, + 'http://127.0.0.1:19001', + ); + }, + ); +}); + +test('loopback IPv6, default ports and a custom health transport retain bounded control resolution', async () => { + await withControlConfiguration( + { + backendAddress: 'http://127.0.0.1:8088', + supervisorAddress: 'http://127.0.0.1:8089', + supervisorAddressExplicit: false, + }, + (config) => { + assert.equal( + controlModule.parseWorkerControl(adjacentControl, advertisedBackend, 'http://127.0.0.1:28088').address, + 'http://127.0.0.1:28089', + ); + config.backendAddress = 'http://[::1]:18088'; + config.supervisorAddress = 'http://[::1]:18089'; + assert.equal( + controlModule.parseWorkerControl( + { available: true, address: 'http://[::1]:8089' }, + { host: '::1', port: 8088, scheme: 'http' }, + ).address, + 'http://[::1]:18089', + ); + config.backendAddress = 'http://localhost'; + config.supervisorAddress = 'http://localhost:81'; + assert.equal( + controlModule.parseWorkerControl( + { available: true, address: 'http://127.0.0.1:43001' }, + { ...advertisedBackend, port: 80 }, + ).address, + 'http://127.0.0.1:43001', + ); + assert.equal( + controlModule.parseWorkerControl( + { available: false, address: null }, + { ...advertisedBackend, host: 'example.com' }, + ).address, + null, + ); + }, + ); +}); + test('execution stop uses the process-external supervisor before the backend worker', async () => { let request; globalThis.fetch = async (url, init) => { @@ -79,6 +364,7 @@ test('the real Vite config derives the supervisor from the backend rather than t loaded.config.define['import.meta.env.VITE_SUPERVISOR_CONTROL_ADDRESS'], JSON.stringify('http://127.0.0.1:65531'), ); + assert.equal(loaded.config.define['import.meta.env.MODIFF_SUPERVISOR_CONTROL_EXPLICIT'], 'false'); assert.equal(loaded.config.server.proxy['/huggingface'].target, 'http://127.0.0.1:65530'); } finally { if (priorBackend === undefined) delete process.env.VITE_BACKEND_PROXY_TARGET; @@ -88,6 +374,64 @@ test('the real Vite config derives the supervisor from the backend rather than t } }); +test('development configuration distinguishes proxy transport, direct backend and explicit supervisor overrides', async () => { + const priorBackend = process.env.VITE_BACKEND_PROXY_TARGET; + const priorSupervisor = process.env.VITE_SUPERVISOR_CONTROL_ADDRESS; + process.env.VITE_BACKEND_PROXY_TARGET = 'http://127.0.0.1:9000'; + try { + for (const [directBackend, supervisorOverride, expectedBackend, expectedSupervisor] of [ + [undefined, undefined, 'http://127.0.0.1:9000', 'http://127.0.0.1:9001'], + ['http://127.0.0.1:19000', undefined, 'http://127.0.0.1:19000', 'http://127.0.0.1:19001'], + [undefined, 'http://127.0.0.1:29001', 'http://127.0.0.1:9000', 'http://127.0.0.1:29001'], + ]) { + if (supervisorOverride) process.env.VITE_SUPERVISOR_CONTROL_ADDRESS = supervisorOverride; + else delete process.env.VITE_SUPERVISOR_CONTROL_ADDRESS; + const loaded = await loadConfigFromFile( + { command: 'serve', mode: 'test' }, + path.join(ROOT, 'vite.config.ts'), + ROOT, + 'silent', + ); + assert.ok(loaded); + assert.equal( + loaded.config.define['import.meta.env.MODIFF_SUPERVISOR_CONTROL_EXPLICIT'], + String(Boolean(supervisorOverride)), + ); + const bundle = await build({ + configFile: false, + root: ROOT, + logLevel: 'silent', + build: { + write: false, + minify: false, + lib: { entry: path.join(ROOT, 'app.config.ts'), formats: ['cjs'] }, + rollupOptions: { output: { exports: 'named' } }, + }, + define: { + 'import.meta.env.DEV': 'true', + 'import.meta.env.VITE_SERVER_ADDRESS': directBackend ? JSON.stringify(directBackend) : 'undefined', + ...loaded.config.define, + }, + }); + const module = { exports: {} }; + runInNewContext(bundle[0].output[0].code, { + module, + exports: module.exports, + window: { location: { origin: 'http://127.0.0.1:5191' } }, + URL, + }); + assert.equal(module.exports.default.backendAddress, expectedBackend); + assert.equal(module.exports.default.supervisorAddress, expectedSupervisor); + assert.equal(module.exports.default.supervisorAddressExplicit, Boolean(supervisorOverride)); + } + } finally { + if (priorBackend === undefined) delete process.env.VITE_BACKEND_PROXY_TARGET; + else process.env.VITE_BACKEND_PROXY_TARGET = priorBackend; + if (priorSupervisor === undefined) delete process.env.VITE_SUPERVISOR_CONTROL_ADDRESS; + else process.env.VITE_SUPERVISOR_CONTROL_ADDRESS = priorSupervisor; + } +}); + test('execution stop falls back to the worker endpoint when the supervisor is unavailable', async () => { const requests = []; globalThis.fetch = async (url, init) => { @@ -121,6 +465,7 @@ test('production recovery follows the serving backend port instead of the develo for (const [origin, override, expected] of [ ['http://127.0.0.1:8096', undefined, 'http://127.0.0.1:8097'], ['http://127.0.0.1:8088', undefined, 'http://127.0.0.1:8089'], + ['http://127.0.0.1:18088', undefined, 'http://127.0.0.1:18089'], ['http://127.0.0.1:8096', 'http://127.0.0.1:18000', 'http://127.0.0.1:18000'], ]) { const bundle = await build({ @@ -149,7 +494,9 @@ test('production recovery follows the serving backend port instead of the develo URL, }); assert.equal(module.exports.default.serverAddress, origin); + assert.equal(module.exports.default.backendAddress, origin); assert.equal(module.exports.default.supervisorAddress, expected); + assert.equal(module.exports.default.supervisorAddressExplicit, Boolean(override)); } } finally { if (priorBackend === undefined) delete process.env.VITE_BACKEND_PROXY_TARGET; @@ -199,6 +546,56 @@ test('node cache deletion deduplicates ids and validates the echoed node list', assert.deepEqual(result.nodes, ['node-a', 'node-b']); }); +test('full cache release survives the old deadline but retains a finite operation-specific timeout', async (t) => { + t.mock.timers.enable({ apis: ['setTimeout'] }); + let signal, complete; + globalThis.fetch = (_url, init) => + new Promise((resolve, reject) => { + signal = init.signal; + complete = () => resolve(jsonResponse({ error: false, nodes: ['setup', 'loader'] })); + signal.addEventListener('abort', () => reject(signal.reason), { once: true }); + }); + const pending = actionsModule.deleteNodeCache(['setup']).then( + (value) => ({ value }), + (error) => ({ error }), + ); + try { + t.mock.timers.tick(15_001); + assert.equal(signal.aborted, false, 'Actual component teardown can finish after the old generic deadline.'); + complete(); + assert.deepEqual((await pending).value, { error: false, nodes: ['setup', 'loader'] }); + const stalled = actionsModule.deleteNodeCache(['setup']).catch((error) => error); + t.mock.timers.tick(119_999); + assert.equal(signal.aborted, false); + t.mock.timers.tick(1); + const error = await stalled; + assert.equal(error.kind, 'timeout'); + assert.match(error.message, /120000ms/); + } finally { + complete(); + await pending; + } +}); + +test('cache release timeout does not alter recompute or generic requests and invalid acknowledgements reject', async (t) => { + t.mock.timers.enable({ apis: ['setTimeout'] }); + globalThis.fetch = (_url, init) => + new Promise((_resolve, reject) => { + init.signal.addEventListener('abort', () => reject(init.signal.reason), { once: true }); + }); + for (const action of [() => actionsModule.recomputeNodeOutputs(['setup']), () => actionsModule.cleanupGpuMemory()]) { + const pending = action().catch((error) => error); + t.mock.timers.tick(15_000); + const error = await pending; + assert.equal(error.kind, 'timeout'); + assert.match(error.message, /15000ms/); + } + for (const payload of [{ error: false }, { error: false, nodes: null }, { error: false, nodes: [1] }]) { + globalThis.fetch = async () => jsonResponse(payload); + await assert.rejects(actionsModule.deleteNodeCache(['setup']), /invalid node list/); + } +}); + test('empty cache deletion is a no-op and does not contact the backend', async () => { let calls = 0; globalThis.fetch = async () => { @@ -211,6 +608,67 @@ test('empty cache deletion is a no-op and does not contact the backend', async ( assert.deepEqual(result.nodes, []); }); +test('accelerator cleanup preserves partial-cleanup reasons and permits zero released files', async () => { + const clean = { + error: false, + message: 'Accelerator cleanup complete.', + released_node_count: 1, + released_model_count: 0, + released_diffusers_component_count: 0, + released_diffusers_offload_file_count: 0, + allocator_trimmed: false, + cleanup_errors: [], + before: null, + after: null, + }; + const partial = { + ...clean, + cleanup_errors: ['Diffusers disk offload cache: live hook storage was preserved.'], + }; + for (const receipt of [clean, partial, { error: false, message: 'Legacy cleanup complete.' }]) { + globalThis.fetch = async () => jsonResponse(receipt); + assert.deepEqual(await actionsModule.cleanupGpuMemory(), receipt); + } + assert.deepEqual(cleanupFeedbackModule.runtimeCleanupFeedback(clean), { + state: 'success', + message: clean.message, + }); + assert.deepEqual(cleanupFeedbackModule.runtimeCleanupFeedback(partial), { + state: 'warning', + message: `${partial.message}\n${partial.cleanup_errors[0]}`, + }); + assert.equal(cleanupFeedbackModule.runtimeCleanupFeedback({ ...clean, cleanup_errors: [' ', ''] }).state, 'success'); + assert.equal(cleanupFeedbackModule.runtimeCleanupFeedback({ error: false }).state, 'success'); +}); + +test('accelerator cleanup rejects invalid or unbounded cleanup details without treating them as success', () => { + for (const cleanup_errors of [ + null, + 'preserved', + [false], + [{}], + Array.from({ length: 65 }, () => 'warning'), + ['x'.repeat(8193)], + ]) { + assert.throws( + () => cleanupFeedbackModule.runtimeCleanupFeedback({ error: false, cleanup_errors }), + /cleanup details/, + ); + } +}); + +test('accelerator cleanup retains actual application and HTTP failures', async () => { + const message = 'Accelerator cleanup cannot run while model work or cache cleanup is active.'; + for (const status of [200, 409]) { + globalThis.fetch = async () => jsonResponse({ error: true, message, cleanup_errors: [] }, status); + await assert.rejects(actionsModule.cleanupGpuMemory(), (error) => { + assert.equal(error.kind, status === 200 ? 'application' : 'http'); + assert.equal(error.message, message); + return true; + }); + } +}); + test('GPU cleanup and Hugging Face deletion use hash-bound planning and mutation methods', async () => { const requests = []; globalThis.fetch = async (url, init) => { diff --git a/scripts/shared-stage-inputs.test.mjs b/scripts/shared-stage-inputs.test.mjs new file mode 100644 index 00000000..be7119a5 --- /dev/null +++ b/scripts/shared-stage-inputs.test.mjs @@ -0,0 +1,566 @@ +import assert from 'node:assert/strict'; +import { execFileSync } from 'node:child_process'; +import { readFileSync } from 'node:fs'; +import path from 'node:path'; +import { after, before, test } from 'node:test'; +import { createServer } from 'vite'; +import { canonicalGraphIdentity } from './live-proof-provenance.mjs'; + +let fixture, server, groups, drafts, authoring, exporter, schema, runtime, defaults, inference, examples; +const backend = process.env.MODIFF_BACKEND_DIR || path.resolve('../MoDiff'); +const selections = [ + ['HunyuanVideo15ModularPipeline', 'text_to_video'], + ['HunyuanVideo15ModularPipeline', 'image_to_video'], + ['MiniMaxH3ModularPipeline', 'text_to_video_with_audio'], + ['MiniMaxH3ModularPipeline', 'first_last_frame_to_video_with_audio'], + ['MiniMaxH3ModularPipeline', 'reference_to_video_with_audio'], + ['MiniMaxMusic3ModularPipeline', 'text_to_audio'], + ['QwenImageModularPipeline', 'text_to_image'], + ['MiniMaxH3ImageModularPipeline', 'text_to_image'], +]; +const switchSelections = [ + ['QwenImageEditPlusModularPipeline', 'edit_image'], + ['QwenImageEditPlusModularPipeline', 'multi_image_reference_edit'], +]; +before(async () => { + const python = process.env.MODIFF_BACKEND_PYTHON || path.join(backend, '.venv/Scripts/python.exe'); + fixture = JSON.parse( + execFileSync(python, [path.resolve('scripts/template-operation-fixtures.py')], { + cwd: backend, + encoding: 'utf8', + maxBuffer: 64 * 1024 ** 2, + timeout: 120_000, + input: JSON.stringify( + [...selections, ...switchSelections].map(([pipelineClass, task]) => ({ + id: `${pipelineClass}:${task}`, + selection: { pipelineClass, task }, + })), + ), + env: { + ...process.env, + MODIFF_BACKEND_DIR: backend, + PYTHONDONTWRITEBYTECODE: '1', + HF_HUB_OFFLINE: '1', + TRANSFORMERS_OFFLINE: '1', + CUDA_VISIBLE_DEVICES: '', + }, + }), + ); + fixture.switchRecipes = fixture.recipes.splice(selections.length); + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, value), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { dispatchEvent: () => true, location: { origin: 'http://127.0.0.1:5191' }, localStorage }; + server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + groups = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + drafts = await server.ssrLoadModule('/src/workflow/workflowDraft.ts'); + authoring = await server.ssrLoadModule('/src/workflow/operationAuthoring.ts'); + exporter = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + schema = await server.ssrLoadModule('/src/studio/blockSchemaV2.ts'); + runtime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); + ({ DEFAULT_STUDIO_FORM: defaults } = await server.ssrLoadModule('/src/studio/modelProfiles.ts')); + inference = await server.ssrLoadModule('/src/studio/workflowInference.ts'); + examples = await server.ssrLoadModule('/src/studio/exampleWorkflow.ts'); +}); +after(async () => server?.close()); + +function fresh(row) { + const graph = groups.unpackVisualOperationGroups( + drafts.createWorkflowDraft(row.starter, fixture.registry).graph, + ).graph; + for (const node of graph.nodes) { + if (node.data.params.offload_mode) node.data.params.offload_mode.value = 'none'; + if (node.data.params.auto_offload) node.data.params.auto_offload.value = false; + } + return groups.groupNewOperationGraph(graph); +} +function generate(graph) { + return graph.nodes.find((node) => groups.visualOperationGroup(node) === 'generate'); +} +function modelInputs(root) { + return root.data.blockInstanceV2.effectiveInterface.boundary.inputs.filter( + (port) => port.binding.fieldOrPortId === 'pipeline_components', + ); +} +function api(graph) { + return canonicalGraphIdentity( + exporter.useFlowStore + .getState() + .exportGraph('shared-stage-inputs', undefined, { sourceGraph: graph, randomizeSeeds: false }), + ); +} + +const sharedImageExamples = [ + 'QwenImageEditModularPipeline:edit_image', + 'QwenImageEditModularPipeline:inpaint', + 'QwenImageEditPlusModularPipeline:edit_image', + 'QwenImageEditPlusModularPipeline:edit_image:qwen_edit_plus_single_image', + 'QwenImageEditPlusModularPipeline:multi_image_reference_edit', + 'QwenImageLayeredModularPipeline:layer_decomposition', +]; +const sharedVideoExample = 'WanImage2VideoModularPipeline:image_to_video'; + +function exampleDocument(id) { + const manifest = JSON.parse(readFileSync(path.join(backend, 'data/workflow-library-manifest.json'), 'utf8')); + const row = [...manifest.workflows, ...manifest.experimentalWorkflows].find((row) => row.id === id); + assert.ok(row, id); + return JSON.parse(readFileSync(path.join(backend, 'data/graphs', row.graphPath), 'utf8')); +} + +function stageInputs(graph, kind, field) { + const stage = graph.nodes.find((node) => groups.visualOperationGroup(node) === kind); + return ( + stage?.data.blockInstanceV2.effectiveInterface.boundary.inputs.filter( + (port) => port.binding.fieldOrPortId === field, + ) ?? [] + ); +} + +test('same-source image, last image and VAE are one connection on the actual example graphs', async (t) => { + for (const id of [...sharedImageExamples, sharedVideoExample]) { + await t.test(id, () => { + const source = exampleDocument(id); + const before = inference.workflowSnapshotFromGraph(source, 'default', defaults); + const graph = examples.exampleWorkflowSnapshotFromGraph(source, 'default', defaults); + const fields = + id === sharedVideoExample + ? [ + ['inputs', 'image'], + ['inputs', 'last_image'], + ['generate', 'vae'], + ] + : [['inputs', 'image']]; + for (const [kind, field] of fields) { + const [port, ...repeated] = stageInputs(graph, kind, field); + assert.equal(repeated.length, 0, `${kind} has one ${field} socket`); + assert.equal(port.mirrorBindings?.length, 1); + assert.equal(port.mirrorBindings[0].fieldOrPortId, field); + } + assert.deepEqual(api(graph), api(before), 'the exact canonical execution and input order survive'); + assert.deepEqual(api(JSON.parse(JSON.stringify(graph))), api(before), 'save and reopen keep both real inputs'); + }); + } +}); + +test('image decisions follow a validated common wire and keep independent or disconnected ports', () => { + for (const fault of [ + 'different source', + 'different handle', + 'incompatible output type', + 'duplicate', + 'disconnected', + 'foreign role', + 'fallback', + 'conditional input', + 'active signal', + ]) { + const raw = inference.workflowSnapshotFromGraph(exampleDocument(sharedImageExamples[0]), 'default', defaults); + const prompt = raw.nodes.find((node) => node.data.action === 'EncodePrompt'); + const edge = raw.edges.find((edge) => edge.target === prompt.id && edge.targetHandle === 'image'); + const loader = raw.nodes.find((node) => node.id === edge.source); + if (fault === 'different source') { + raw.nodes.push({ ...structuredClone(loader), id: 'different-image-source' }); + edge.source = 'different-image-source'; + } + if (fault === 'different handle') { + loader.data.params.alternative = structuredClone(loader.data.params[edge.sourceHandle]); + edge.sourceHandle = 'alternative'; + } + if (fault === 'incompatible output type') loader.data.params[edge.sourceHandle].type = 'video'; + if (fault === 'duplicate') raw.edges.push({ ...edge, id: 'extra-image-wire' }); + if (fault === 'disconnected') raw.edges = raw.edges.filter((wire) => wire !== edge); + if (fault === 'foreign role') + prompt.data.operationAuthoring.operation.ports.find((port) => port.name === 'image').semanticName = 'other'; + if (fault === 'fallback') prompt.data.params.image.value = ['latent-reference.png']; + if (fault === 'conditional input') + prompt.data.params.image.requiredWhen = { field: 'model_type', equals: 'custom' }; + if (fault === 'active signal') prompt.data.params.image.signal = { direction: 'input', value: 'live-image' }; + const before = structuredClone(raw); + const grouped = groups.groupNewOperationGraph(raw); + assert.equal(stageInputs(grouped, 'inputs', 'image').length, 2, fault); + assert.deepEqual(raw, before); + } +}); + +test('saved image sockets with independently configured labels stay separate', () => { + const document = exampleDocument(sharedImageExamples[0]); + const current = examples.exampleWorkflowSnapshotFromGraph(document, 'default', defaults); + const graph = historicalSplit(current, 'inputs', ['image']); + const root = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'inputs'); + const instance = root.data.blockInstanceV2; + const surface = structuredClone(instance.effectiveInterface); + surface.boundary.inputs.find((port) => port.binding.fieldOrPortId === 'image').label = 'Alternate prompt reference'; + root.data.blockInstanceV2 = runtime.replaceBlockEffectiveInterfaceV2(instance, surface); + const before = structuredClone(graph); + assert.throws(() => groups.mergeVisualStageSharedInputs(graph, root.id), /No matching shared inputs/); + assert.deepEqual(graph, before); +}); + +test('saved shared image, closing frame and VAE inputs can be repaired independently', () => { + for (const [id, kind, fields] of [ + [sharedImageExamples[0], 'inputs', ['image']], + [sharedVideoExample, 'inputs', ['image', 'last_image']], + [sharedVideoExample, 'generate', ['vae']], + ]) { + const source = exampleDocument(id); + const current = examples.exampleWorkflowSnapshotFromGraph(source, 'default', defaults); + const saved = JSON.parse(JSON.stringify(historicalSplit(current, kind, fields))); + const before = structuredClone(saved); + const root = saved.nodes.find((node) => groups.visualOperationGroup(node) === kind); + const repaired = groups.mergeVisualStageSharedInputs(saved, root.id); + const changed = repaired.nodes.find((node) => node.id === root.id); + for (const field of fields) { + assert.equal(stageInputs(saved, kind, field).length, 2); + assert.equal(stageInputs(repaired, kind, field).length, 1); + } + assert.deepEqual(saved, before, 'repair is pure'); + assert.deepEqual(changed.data.blockInstanceV2.definitionSnapshot, root.data.blockInstanceV2.definitionSnapshot); + assert.deepEqual(changed.data.blockInstanceV2.presentation, root.data.blockInstanceV2.presentation); + assert.deepEqual(api(repaired), api(saved)); + assert.deepEqual(api(JSON.parse(JSON.stringify(repaired))), api(saved)); + } +}); + +test('rewiring one shared canvas input feeds both executable image consumers', () => { + const source = exampleDocument(sharedImageExamples[0]); + const graph = examples.exampleWorkflowSnapshotFromGraph(source, 'default', defaults); + const stage = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'inputs'); + const port = stageInputs(graph, 'inputs', 'image')[0]; + const edge = graph.edges.find((edge) => edge.target === stage.id && edge.targetHandle === port.portId); + const loader = graph.nodes.find((node) => node.id === edge.source); + const changed = structuredClone(graph); + const newSource = 'alternate-image-loader'; + changed.nodes.push({ ...structuredClone(loader), id: newSource }); + changed.edges.find((wire) => wire.id === edge.id).source = newSource; + const executable = exporter.useFlowStore + .getState() + .exportGraph('shared-image-rewire', undefined, { sourceGraph: changed, randomizeSeeds: false }); + const consumers = Object.values(executable.nodes).filter((node) => + ['EncodePrompt', 'ImageEncode'].includes(node.action), + ); + assert.equal(consumers.length, 2); + for (const node of consumers) + assert.deepEqual([node.params.image.sourceId, node.params.image.sourceKey], [newSource, edge.sourceHandle]); + assert.equal(graph.edges.find((wire) => wire.id === edge.id).source, loader.id); +}); + +test('the shared Wan VAE uses the enabled handle and disconnects both Generate leaves', () => { + const graph = examples.exampleWorkflowSnapshotFromGraph(exampleDocument(sharedVideoExample), 'default', defaults); + const stage = generate(graph); + const instance = stage.data.blockInstanceV2; + const [port] = stageInputs(graph, 'generate', 'vae'); + const member = (binding) => instance.effectiveGraph.nodes.find(({ nodeId }) => nodeId === binding.nodeId); + assert.equal(member(port.binding).data.action, 'Denoise'); + assert.equal(member(port.mirrorBindings[0]).data.params.vae.disabled, true); + assert.notEqual(runtime.blockConnectorParamsV2(instance).inputs[port.portId].disabled, true); + const disconnected = runtime.expandBlockGraphV2ForExecution( + graph.nodes, + graph.edges.filter((edge) => edge.target !== stage.id || edge.targetHandle !== port.portId), + ); + const suppliedVae = disconnected.edges.filter((edge) => edge.targetHandle === 'vae'); + assert.equal(suppliedVae.length, 1, 'separate Encode Inputs VAE is still connected'); + assert.equal(disconnected.nodes.find((node) => node.id === suppliedVae[0].target).data.action, 'ImageEncode'); +}); + +test('Qwen image task switching retains the one shared image source and leaves the source draft intact', () => { + const [single, multi] = fixture.switchRecipes; + assert.equal(multi.id, 'QwenImageEditPlusModularPipeline:multi_image_reference_edit'); + let graph = examples.exampleWorkflowSnapshotFromGraph(exampleDocument(sharedImageExamples[2]), 'default', defaults); + for (const row of [multi, single]) { + const before = structuredClone(graph); + const owner = groups + .unpackVisualOperationGroups(graph) + .graph.nodes.find((node) => node.data.action === 'ModelsLoader'); + const plan = authoring.planOperationChange(graph, owner.id, row.starter); + assert.deepEqual(graph, before); + graph = plan.graph; + const ports = stageInputs(graph, 'inputs', 'image'); + assert.equal(ports.length, 1); + assert.equal(ports[0].mirrorBindings?.length, 1); + assert.deepEqual(api(graph), api(groups.unpackVisualOperationGroups(graph).graph)); + assert.deepEqual(api(graph), api(JSON.parse(JSON.stringify(graph)))); + } +}); + +// Historical automatic Generate definitions exposed one socket per consumer. +// Preserve the old baseline itself, not a reference to today's planner output. +function historicalSplit(graph, kind = 'generate', fields = ['pipeline_components']) { + const result = structuredClone(graph), + root = result.nodes.find((node) => groups.visualOperationGroup(node) === kind), + instance = root.data.blockInstanceV2; + const definition = structuredClone(instance.definitionSnapshot); + const replacements = new Map(); + definition.boundary.inputs = definition.boundary.inputs.flatMap((port) => { + if (!fields.includes(port.binding.fieldOrPortId) || !port.mirrorBindings?.length) return [port]; + const ports = [port.binding, ...port.mirrorBindings].map((binding) => ({ + ...port, + binding, + portId: `${binding.nodeId}:${binding.fieldOrPortId}`, + })); + for (const p of ports) delete p.mirrorBindings; + replacements.set( + port.portId, + ports.map((p) => p.portId), + ); + return ports; + }); + definition.contentHash = schema.blockDefinitionContentHashV2(definition); + const baseline = schema.normalizeBlockDefinitionV2(definition); + const old = schema.createBlockInstanceV2(baseline, { + instanceId: root.id, + position: root.position, + size: instance.presentation.size, + internalLayout: instance.presentation.internalLayout, + }); + const node = runtime.createBlockRootNodeV2(old); + result.nodes = result.nodes + .map((n) => (n.id === root.id ? node : n)) + .filter((n) => n.data.blockProjectionOwnerId !== root.id); + result.edges = result.edges + .filter((edge) => edge.data?.blockProjectionOwnerId !== root.id) + .flatMap((edge) => + edge.target === root.id && replacements.has(edge.targetHandle) + ? replacements + .get(edge.targetHandle) + .map((targetHandle, i) => ({ ...edge, id: `${edge.id}-historical-${i}`, targetHandle })) + : [edge], + ); + return result; +} + +test('all seven affected routes and H3 Image expose one shared model input without changing execution', async (t) => { + for (const row of fixture.recipes) + await t.test(row.id, () => { + const graph = fresh(row), + root = generate(graph), + ports = modelInputs(root); + assert.equal(ports.length, 1, 'the visible stage needs one component input'); + assert.equal(ports[0].mirrorBindings.length, 1, 'that input must still feed both real consumers'); + assert.deepEqual(api(graph), api(groups.unpackVisualOperationGroups(graph).graph)); + assert.deepEqual( + api(JSON.parse(JSON.stringify(graph))), + api(graph), + 'save/reopen retains the same executable graph', + ); + }); +}); + +test('shared stage connectors label distinct outputs by their operation without changing saved bindings', () => { + let checked = 0; + for (const row of fixture.recipes) { + const graph = fresh(row); + const saved = JSON.stringify(graph); + for (const node of graph.nodes.filter(groups.visualOperationGroup)) { + const instance = node.data.blockInstanceV2; + const ports = instance.effectiveInterface.boundary.outputs; + const projected = runtime.blockConnectorParamsV2(instance).outputs; + assert.deepEqual( + Object.keys(projected), + ports.map(({ portId }) => portId), + ); + for (const port of ports) { + const collisions = ports.filter(({ label }) => label === port.label); + if (collisions.length < 2) { + assert.equal(projected[port.portId].label, port.label); + continue; + } + const owner = instance.effectiveGraph.nodes.find(({ nodeId }) => nodeId === port.binding.nodeId); + assert.equal(projected[port.portId].label, `${owner.data.label} · ${port.label}`); + assert.equal(projected[port.portId].fieldOptions.wrapConnectionLabel, true); + assert.equal(new Set(collisions.map(({ portId }) => projected[portId].label)).size, collisions.length); + checked++; + } + } + assert.equal(JSON.stringify(graph), saved, 'labels are only a view of the saved graph'); + assert.deepEqual(api(graph), api(JSON.parse(saved))); + } + assert.ok(checked > 0, 'the released node schemas exercise at least one repeated output label'); +}); + +test('saved automatic definitions repair locally, preserving baseline, values, preview, layout and Undo/Redo', async (t) => { + for (const row of fixture.recipes) + await t.test(row.id, () => { + const old = historicalSplit(fresh(row)), + original = structuredClone(old), + root = generate(old); + assert.equal(modelInputs(root).length, 2); + const baseline = structuredClone(root.data.blockInstanceV2.definitionSnapshot); + const next = groups.mergeVisualStageSharedInputs(old, root.id); + assert.deepEqual(old, original, 'planning is pure'); + assert.equal(modelInputs(generate(next)).length, 1); + assert.deepEqual( + generate(next).data.blockInstanceV2.definitionSnapshot, + baseline, + 'saved library baseline is immutable', + ); + assert.deepEqual(generate(next).data.blockInstanceV2.presentation, root.data.blockInstanceV2.presentation); + assert.deepEqual(api(next), api(old)); + assert.deepEqual(api(JSON.parse(JSON.stringify(next))), api(old)); + const store = exporter.useFlowStore, + previous = store.getState(); + try { + store.getState().replaceGraph(old); + store.getState().replaceGraph(next, { historyLabel: 'Merge shared model inputs' }); + store.getState().undo(); + assert.equal(modelInputs(generate(store.getState().toObject())).length, 2); + store.getState().redo(); + assert.equal(modelInputs(generate(store.getState().toObject())).length, 1); + assert.deepEqual(api(store.getState().toObject()), api(old)); + } finally { + store.setState(previous, true); + } + }); +}); + +test('Encode Inputs also shares model components across native encoders and repairs saved split ports', async (t) => { + for (const row of fixture.recipes) + await t.test(row.id, () => { + const graph = fresh(row); + const root = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'inputs'); + if (!root) { + assert.equal(row.starter.pipelineClass, 'MiniMaxMusic3ModularPipeline', 'Music encodes inside Generate'); + return; + } + const ports = modelInputs(root); + assert.ok(ports.length <= 1, 'Encode Inputs needs one socket for the same model supplier'); + if (!ports[0]?.mirrorBindings?.length) return; + const old = historicalSplit(graph, 'inputs'); + const baseline = structuredClone(old); + const next = groups.mergeVisualStageSharedInputs(old, root.id); + assert.deepEqual(old, baseline); + const repaired = next.nodes.find((node) => node.id === root.id); + assert.equal(modelInputs(repaired).length, 1); + assert.deepEqual( + repaired.data.blockInstanceV2.definitionSnapshot, + old.nodes.find((node) => node.id === root.id).data.blockInstanceV2.definitionSnapshot, + ); + assert.deepEqual(api(next), api(old)); + assert.deepEqual(api(JSON.parse(JSON.stringify(next))), api(old)); + }); +}); + +test('model/task switching keeps shared inputs merged, including repaired historical stages', async (t) => { + for (const pipeline of ['HunyuanVideo15ModularPipeline', 'MiniMaxH3ModularPipeline']) + await t.test(pipeline, () => { + const rows = fixture.recipes.filter((row) => row.starter.pipelineClass === pipeline); + let graph = fresh(rows[0]); + graph = groups.mergeVisualStageSharedInputs(historicalSplit(graph), generate(graph).id); + for (const row of [...rows.slice(1), rows[0]]) { + const owner = groups + .unpackVisualOperationGroups(graph) + .graph.nodes.find((node) => node.data.action === 'ModelsLoader'); + const plan = authoring.planOperationChange(graph, owner.id, row.starter); + graph = plan.graph; + assert.equal(modelInputs(generate(graph)).length, 1); + assert.equal(modelInputs(generate(graph))[0].mirrorBindings.length, 1); + const inputs = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'inputs'); + if (inputs) { + const flat = groups.unpackVisualOperationGroups(graph).graph; + const connected = modelInputs(inputs).filter((port) => + [port.binding, ...(port.mirrorBindings ?? [])].some((binding) => + flat.edges.some( + (edge) => + edge.target === `${inputs.id}/${binding.nodeId}` && edge.targetHandle === binding.fieldOrPortId, + ), + ), + ); + // The preservation planner may retain disconnected image encoders + // after returning to text-only. Those are not shared live suppliers. + assert.equal(connected.length, 1, 'The active model supplier stays one shared input'); + } + assert.deepEqual(api(graph), api(groups.unpackVisualOperationGroups(graph).graph)); + } + }); +}); + +test('changed-task encoder mirrors refuse partial bindings and a foreign declared task', () => { + const rows = fixture.recipes.filter((row) => row.starter.pipelineClass === 'HunyuanVideo15ModularPipeline'); + const initial = fresh(rows[0]); + const owner = groups + .unpackVisualOperationGroups(initial) + .graph.nodes.find((node) => node.data.action === 'ModelsLoader'); + const changed = authoring.planOperationChange(initial, owner.id, rows[1].starter).graph; + const inputs = changed.nodes.find((node) => groups.visualOperationGroup(node) === 'inputs'); + assert.equal(modelInputs(inputs)[0].mirrorBindings.length, 2); + for (const fault of ['partial', 'task']) { + const previous = structuredClone(inputs); + if (fault === 'partial') modelInputs(previous)[0].mirrorBindings.pop(); + else previous.data.blockInstanceV2.effectiveGraph.nodes[0].data.operationAuthoring.operation.task = 'foreign-task'; + const unpacked = groups.unpackVisualOperationGroups(changed); + assert.throws( + () => groups.groupVisualStages(unpacked.graph, unpacked.members.get(inputs.id), 'inputs', previous), + /mirrored custom interface/, + fault, + ); + } +}); + +test('different sources, duplicate incoming wires and unrelated value inputs are never merged', () => { + const row = fixture.recipes[0]; + for (const fault of ['source', 'ambiguous', 'type']) { + const graph = groups.unpackVisualOperationGroups(fresh(row)).graph; + const children = graph.nodes.filter((n) => /WorkflowHunyuanVideo15(Denoise|Decode)$/.test(n.data.action)); + const wire = graph.edges.find( + (edge) => edge.target === children[1].id && edge.targetHandle === 'pipeline_components', + ); + if (fault === 'source') wire.source += '-different'; + if (fault === 'ambiguous') graph.edges.push({ ...wire, id: 'ambiguous-owner' }); + if (fault === 'type') children[1].data.params.pipeline_components.type = 'string'; + const old = structuredClone(graph); + const result = groups.groupVisualStages( + graph, + children.map((n) => n.id), + 'generate', + ); + assert.equal(modelInputs(generate(result)).length, 2, fault); + assert.deepEqual(graph, old); + } +}); + +test('empty alternatives remain separate when required, authored or missing their common owner', () => { + const row = fixture.recipes.find((row) => row.starter.pipelineClass === 'QwenImageModularPipeline'); + for (const fault of ['required', 'authored', 'owner']) { + const graph = groups.unpackVisualOperationGroups(fresh(row)).graph; + const children = graph.nodes.filter( + (n) => n.data.module === 'modules.ModularDiffusers' && ['Denoise', 'DecodeLatents'].includes(n.data.action), + ); + if (fault === 'required') children[1].data.params.pipeline_components.required = true; + if (fault === 'authored') children[1].data.params.pipeline_components.value = { source: 'different' }; + if (fault === 'owner') graph.nodes = graph.nodes.filter((n) => n.data.action !== 'ModelsLoader'); + const result = groups.groupVisualStages( + graph, + children.map((n) => n.id), + 'generate', + ); + assert.equal(modelInputs(generate(result)).length, 2, fault); + } +}); + +test('Qwen and H3 Image model switching keeps one component input and an unchanged source draft', () => { + const rows = ['QwenImageModularPipeline', 'MiniMaxH3ImageModularPipeline'].map((name) => + fixture.recipes.find((row) => row.starter.pipelineClass === name), + ); + for (const [source, target] of [rows, [...rows].reverse()]) { + const graph = fresh(source), + before = structuredClone(graph); + const owner = groups + .unpackVisualOperationGroups(graph) + .graph.nodes.find((node) => node.data.action === 'ModelsLoader'); + const plan = authoring.planOperationChange(graph, owner.id, target.starter, { + replaceModel: true, + baseline: source.starter, + }); + assert.deepEqual(graph, before); + assert.equal(modelInputs(generate(plan.graph)).length, 1); + assert.deepEqual(api(plan.graph), api(groups.unpackVisualOperationGroups(plan.graph).graph)); + } +}); diff --git a/scripts/shared-store-requests.test.mjs b/scripts/shared-store-requests.test.mjs index 61d4314b..0916065b 100644 --- a/scripts/shared-store-requests.test.mjs +++ b/scripts/shared-store-requests.test.mjs @@ -12,6 +12,7 @@ let server; let taskStoreModule; let userBlockStoreModule; let originalFetch; +let controlModule; before(async () => { globalThis.window = { @@ -27,6 +28,7 @@ before(async () => { appType: 'custom', }); taskStoreModule = await server.ssrLoadModule('/src/stores/useTaskStore.ts'); + controlModule = await server.ssrLoadModule('/src/utils/supervisorControl.ts'); flowStoreModule = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); userBlockStoreModule = await server.ssrLoadModule('/src/stores/useUserBlockStore.ts'); autoResourceModule = await server.ssrLoadModule('/src/studio/autoResource.ts'); @@ -34,6 +36,7 @@ before(async () => { }); beforeEach(() => { + controlModule.resetSupervisorControl(); taskStoreModule.useTaskStore.setState({ queuedTasks: {}, currentTask: undefined, @@ -42,6 +45,7 @@ beforeEach(() => { taskCount: 0, queueRevision: 0, fetchState: { status: 'idle', error: null, requestId: null }, + supervisorControlError: null, }); flowStoreModule.useFlowStore.setState({ nodes: [], @@ -88,6 +92,104 @@ function userBlock(id, name = id) { }; } +test('known unsupervised worker metadata prevents background control requests', async () => { + controlModule.updateWorkerControl(controlModule.parseWorkerControl({ available: false, address: null })); + let requests = 0; + globalThis.fetch = async () => { + requests += 1; + throw new Error('An absent listener must not be probed.'); + }; + for (let index = 0; index < 20; index += 1) await taskStoreModule.useTaskStore.getState().fetchSupervisorTasks(); + assert.equal(requests, 0); + assert.equal(controlModule.supervisorControlCanPoll(), false); +}); + +test('invalid legacy control configuration has bounded diagnosable polling without an unhandled rejection', async () => { + const config = (await server.ssrLoadModule('/app.config.ts')).default; + const previous = config.supervisorAddress; + config.supervisorAddress = 'http://remote.example:8089'; + let requests = 0; + globalThis.fetch = async () => { + requests += 1; + throw new Error('Untrusted control destinations must not be requested.'); + }; + try { + await taskStoreModule.useTaskStore.getState().fetchSupervisorTasks(); + assert.match(taskStoreModule.useTaskStore.getState().supervisorControlError, /Invalid supervisor control address/); + for (let index = 0; index < 20; index += 1) await taskStoreModule.useTaskStore.getState().fetchSupervisorTasks(); + assert.equal(requests, 0); + } finally { + config.supervisorAddress = previous; + } +}); + +test('failed legacy control discovery backs off while retaining diagnosable failure and later recovery', async () => { + const originalNow = Date.now; + let now = 1000, + requests = 0; + Date.now = () => now; + globalThis.fetch = async () => { + requests += 1; + if (requests === 1) throw new TypeError('Control connection refused.'); + return jsonResponse({ current: null, queued: {}, recent: [] }); + }; + try { + await taskStoreModule.useTaskStore.getState().fetchSupervisorTasks(); + assert.match(taskStoreModule.useTaskStore.getState().supervisorControlError, /refused/); + for (let index = 0; index < 20; index += 1) await taskStoreModule.useTaskStore.getState().fetchSupervisorTasks(); + assert.equal(requests, 1); + now += 5000; + await taskStoreModule.useTaskStore.getState().fetchSupervisorTasks(); + assert.equal(requests, 2); + assert.equal(taskStoreModule.useTaskStore.getState().supervisorControlError, null); + } finally { + Date.now = originalNow; + } +}); + +test('supervisor queue reads use the verified bound port and preserve it while health is unavailable', async () => { + controlModule.updateWorkerControl( + controlModule.parseWorkerControl({ available: true, address: 'http://127.0.0.1:43001' }), + ); + controlModule.updateWorkerControl(undefined); + const requests = []; + globalThis.fetch = async (url) => { + requests.push(String(url)); + return jsonResponse({ current: null, queued: {}, recent: [] }); + }; + await taskStoreModule.useTaskStore.getState().fetchSupervisorTasks(); + assert.deepEqual(requests, ['http://127.0.0.1:43001/queue']); +}); + +test('an unmapped custom supervisor is diagnosed with bounded backoff and no local service request', async () => { + const config = (await server.ssrLoadModule('/app.config.ts')).default; + const previous = { ...config }; + Object.assign(config, { + backendAddress: 'http://127.0.0.1:18088', + supervisorAddress: 'http://127.0.0.1:18089', + supervisorAddressExplicit: false, + }); + let requests = 0; + globalThis.fetch = async () => { + requests++; + throw new Error('Unmapped supervisor must not request another local service.'); + }; + try { + controlModule.updateWorkerControl( + controlModule.parseWorkerControl( + { available: true, address: 'http://127.0.0.1:43001' }, + { host: '127.0.0.1', port: 8088, scheme: 'http' }, + ), + ); + await taskStoreModule.useTaskStore.getState().fetchSupervisorTasks(); + assert.match(taskStoreModule.useTaskStore.getState().supervisorControlError, /supervisor.*configured backend/i); + for (let index = 0; index < 20; index++) await taskStoreModule.useTaskStore.getState().fetchSupervisorTasks(); + assert.equal(requests, 0); + } finally { + Object.assign(config, previous); + } +}); + test('a delayed queue fetch cannot overwrite a newer websocket queue revision', async () => { const call = deferred(); globalThis.fetch = () => call.promise; diff --git a/scripts/shell-module-identity.test.mjs b/scripts/shell-module-identity.test.mjs index 65978fc9..ee09fead 100644 --- a/scripts/shell-module-identity.test.mjs +++ b/scripts/shell-module-identity.test.mjs @@ -67,3 +67,13 @@ test('the built shell has one versioned URL per emitted JavaScript and CSS modul assert.ok(references > 10, 'Inspect actual cross-chunk references, not an empty fixture.'); assert.equal(versions.size, 1, 'All static, dynamic and preload references must share one shell identity.'); }); + +test('the production bundle retains the H3 editorial card independently of private generated examples', () => { + const name = 'assets/minimax-h3-old-town.card-poster.png'; + const expected = readFileSync(new URL(`../public/${name}`, import.meta.url)); + const emitted = readFileSync(new URL(`../dist/${name}`, import.meta.url)); + assert.deepEqual(emitted, expected); + assert.equal(emitted.subarray(0, 8).toString('hex'), '89504e470d0a1a0a'); + assert.equal(emitted.readUInt32BE(16), 1536); + assert.equal(emitted.readUInt32BE(20), 864); +}); diff --git a/scripts/source-video-timing.test.mjs b/scripts/source-video-timing.test.mjs new file mode 100644 index 00000000..4bcf3701 --- /dev/null +++ b/scripts/source-video-timing.test.mjs @@ -0,0 +1,187 @@ +import assert from 'node:assert/strict'; +import { test } from 'node:test'; +import { sourceVideoTimingMatches } from '../src/studio/sourceVideoTiming.ts'; +import { + canonicalJsonHash, + decodedAudiovisualMediaHash, + loadTemplateRuntime, + technicalMediaErrors, + validateQualityReview, +} from './template-gallery-harness.mjs'; + +const sourceTiming = { schemaVersion: 1, sourceMediaHash: 'sha256:bytes:' + 'a'.repeat(64), frames: 25, fps: 7 }; +test('short source timing requires the original frame count and cadence', () => { + const media = { frames: 25, durationSeconds: 25 / 7, fps: 7 }; + assert.equal(sourceVideoTimingMatches(sourceTiming, media), true); + assert.equal(sourceVideoTimingMatches(sourceTiming, { ...media, durationSeconds: 3.57 }), true); + assert.equal(sourceVideoTimingMatches(sourceTiming, { frames: 25, durationSeconds: 3.57 }), false); + for (const change of [{ frames: 81 }, { durationSeconds: 5 }, { fps: 16 }]) + assert.equal(sourceVideoTimingMatches(sourceTiming, { ...media, ...change }), false); + assert.equal(sourceVideoTimingMatches({ ...sourceTiming, sourceMediaHash: 'unverified' }, media), false); + assert.equal(sourceVideoTimingMatches(undefined, media), false); +}); +test('ordinary video retains its minimum duration; a declared complete source keeps its timing', () => { + const decoded = { + frames: 25, + fps: 7, + durationSeconds: 25 / 7, + width: 1536, + height: 1024, + nearBlackRatio: 0, + lumaStdDev: 20, + uniqueFrameRatio: 1, + isolatedLumaFlashRatio: 0, + }; + assert(technicalMediaErrors(decoded, {}, 'video').some((x) => x.includes('at least 5 seconds'))); + assert(!technicalMediaErrors(decoded, { sourceTiming }, 'video').some((x) => x.includes('at least 5 seconds'))); + assert( + technicalMediaErrors({ ...decoded, frames: 24 }, { sourceTiming }, 'video').some((x) => + x.includes('at least 5 seconds'), + ), + ); +}); +test('audio delivery rate comes from the source stream, independently of normalized PCM comparison', () => { + const audio = { + sampleRate: 48000, + sourceSampleRate: 44100, + durationSeconds: 60, + peakAmplitude: 0.5, + silenceRatio: 0.1, + clippedSampleRatio: 0, + }; + assert.deepEqual(technicalMediaErrors(audio, { sampleRate: 44100 }, 'audio'), []); + assert(technicalMediaErrors(audio, { sampleRate: 48000 }, 'audio').some((x) => x.includes('got 44100'))); + assert.deepEqual(technicalMediaErrors({ ...audio, sourceSampleRate: undefined }, { sampleRate: 48000 }, 'audio'), []); +}); + +test('a retained audiovisual preview binds its original soundtrack and rejects a changed stream', () => { + const mediaHash = 'sha256:decoded-video-framemd5:' + 'b'.repeat(64); + const decodedAudioHash = 'sha256:decoded-audio-pcm-s16le-48000-stereo:' + 'c'.repeat(64); + const preview = { mediaHash, decodedAudioHash, frames: 121, fps: 24, width: 1280, height: 704 }; + const decoded = { + ...preview, + hash: mediaHash, + durationSeconds: 121 / 24, + codecName: 'h264', + pixelFormat: 'yuv420p', + hasAudio: true, + embeddedAudio: { hash: decodedAudioHash, peakAmplitude: 0.8, silenceRatio: 0.05, clippedSampleRatio: 0 }, + audiovisualMediaHash: decodedAudiovisualMediaHash(mediaHash, decodedAudioHash), + nearBlackRatio: 0, + lumaStdDev: 20, + uniqueFrameRatio: 1, + }; + const check = (result) => technicalMediaErrors(result, { requiresAudio: true }, 'video', preview); + assert.deepEqual(check(decoded), []); + assert.ok( + check({ ...decoded, embeddedAudio: { ...decoded.embeddedAudio, hash: 'changed' } }).some((e) => + e.includes('retained preview'), + ), + ); + assert.ok(check({ ...decoded, hasAudio: false, embeddedAudio: undefined }).some((e) => e.includes('embedded audio'))); + assert.ok(check({ ...decoded, isolatedLumaFlashRatio: 1 / 14 }).some((e) => e.includes('luminance flashes'))); +}); + +test('a reviewed native preview preserves its exact short clip and browser-safe playback', () => { + const hash = 'sha256:decoded-video-framemd5:' + 'b'.repeat(64); + const preview = { mediaHash: hash, frames: 25, fps: 8, width: 720, height: 480 }; + const decoded = { + ...preview, + hash, + durationSeconds: 3.13, + codecName: 'h264', + pixelFormat: 'yuv420p', + hasAudio: false, + nearBlackRatio: 0, + lumaStdDev: 20, + uniqueFrameRatio: 1, + }; + assert.deepEqual(technicalMediaErrors(decoded, {}, 'video', preview), []); + for (const change of [{ frames: 24 }, { width: 700 }, { fps: 7 }, { hash: 'different' }]) { + assert( + technicalMediaErrors({ ...decoded, ...change }, {}, 'video', preview).some((x) => + x.includes('at least 5 seconds'), + ), + ); + } + assert(technicalMediaErrors(decoded, {}, 'video').some((x) => x.includes('at least 5 seconds'))); + assert( + technicalMediaErrors({ ...decoded, hasAudio: true }, {}, 'video', preview).some((x) => x.includes('audio stream')), + ); + assert(technicalMediaErrors({ ...decoded, codecName: 'vp9' }, {}, 'video', preview).some((x) => x.includes('codec'))); +}); + +test('qualitative acceptance keeps absent scores absent and requires an exact maintainer binding', () => { + const expected = { + templateId: 'ace_step_audio_variation', + templateLockHash: 'tpl_test', + promptSettingsHash: 'ps_test', + modelRevision: 'example/model@' + 'a'.repeat(40), + runtimeFingerprint: 'runtime', + graphHash: 'graph', + proofLockHash: 'proof', + decodedMediaHash: 'decoded', + }; + const review = { + schemaVersion: 2, + ...expected, + reviewStatus: 'approved_reviewed', + reviewer: 'Test maintainer', + reviewedAt: '2026-11-13T00:00:00Z', + ratingMethod: 'maintainer_qualitative_acceptance', + rubric: { taskAdherence: null, artifactControl: null, modalityQuality: null }, + scores: { promptAdherence: null, composition: null, technicalExecution: null, templateUsefulness: null }, + hardFailures: [], + objectiveChecks: { status: 'pass' }, + modalityReview: { status: 'pass' }, + knownLimitations: ['No numeric scores were supplied by the maintainer.'], + summary: 'The maintainer accepted this exact asset and authorized its registration.', + }; + assert(validateQualityReview(review, expected, 'approved_reviewed').some((x) => x.includes('rubric'))); + review.maintainerAcceptance = { + schemaVersion: 1, + decision: 'accepted_with_disclosed_limitations', + reviewer: review.reviewer, + acceptedAt: review.reviewedAt, + statement: review.summary, + acceptedReviewHash: canonicalJsonHash(review), + }; + assert.deepEqual(validateQualityReview(review, expected, 'approved_reviewed'), []); + review.summary += ' Changed after acceptance.'; + assert(validateQualityReview(review, expected, 'approved_reviewed').some((x) => x.includes('maintainerAcceptance'))); +}); + +test('Gallery selection accepts a complete short source only with its matching source identity', async () => { + const runtime = await loadTemplateRuntime(); + const template = runtime.templates.find((item) => item.id === 'ltx_video_video_to_video'); + const entry = { + templateId: template.id, + modelRevision: 'example/model@' + 'a'.repeat(40), + promptSettingsHash: runtime.promptSettingsHash(template), + templateInputContractHash: runtime.templateInputContractHash(template), + qualityReviewStatus: 'approved_reviewed', + qualityReviewHash: 'quality', + provenanceHash: 'provenance', + graphHash: 'graph', + mediaHash: 'new-reviewed-source-video', + mediaType: 'video', + width: 1536, + height: 1024, + frames: 25, + durationSeconds: 25 / 7, + beforeSourceMediaHash: template.example.expectedOutput.sourceTiming.sourceMediaHash, + cardPreviewPath: '/template-gallery/example.card-preview.mp4', + cardPreviewSha256: 'card', + }; + entry.templateLockHash = runtime.templateLockHash(template, entry.modelRevision); + const selected = (candidate) => runtime.findManifestEntry(template, { schemaVersion: 2, examples: [candidate] }); + assert.ok(selected(entry)); + for (const change of [ + { beforeSourceMediaHash: 'sha256:bytes:' + 'b'.repeat(64) }, + { frames: 24 }, + { durationSeconds: 25 / 16 }, + { cardPreviewSha256: undefined }, + { width: 320, height: 240 }, + ]) + assert.equal(selected({ ...entry, ...change }), undefined); +}); diff --git a/scripts/studio-output-requests.test.mjs b/scripts/studio-output-requests.test.mjs index 74abba22..2d1a5bbd 100644 --- a/scripts/studio-output-requests.test.mjs +++ b/scripts/studio-output-requests.test.mjs @@ -14,6 +14,7 @@ let outputContracts; let outputUtils; const storageValues = new Map(); +const sessionValues = new Map(); const localStorageMock = { clear: () => storageValues.clear(), getItem: (key) => storageValues.get(key) ?? null, @@ -27,10 +28,16 @@ const localStorageMock = { before(async () => { globalThis.localStorage = localStorageMock; + globalThis.sessionStorage = { + getItem: (key) => sessionValues.get(key) ?? null, + setItem: (key, value) => sessionValues.set(key, String(value)), + removeItem: (key) => sessionValues.delete(key), + }; globalThis.window = { dispatchEvent: () => true, location: { origin: 'http://127.0.0.1:5191' }, localStorage: localStorageMock, + sessionStorage: globalThis.sessionStorage, }; server = await createServer({ root: ROOT, @@ -49,6 +56,7 @@ before(async () => { beforeEach(() => { storageValues.clear(); + sessionValues.clear(); studioStoreModule.useStudioStore.setState({ outputs: [], outputRevision: 0, @@ -149,7 +157,7 @@ test('an invalid backend output rejects the whole response instead of partially assert.match(state.galleryBackendError, /invalid output/); }); -test('backend-owned output history is not duplicated into localStorage', async () => { +test('backend-owned output history is not duplicated into the page checkpoint', async () => { globalThis.fetch = async () => jsonResponse({ error: false, outputs: [output('backend')] }); await studioStoreModule.useStudioStore.getState().fetchBackendOutputs(); @@ -157,7 +165,7 @@ test('backend-owned output history is not duplicated into localStorage', async ( studioStoreModule.useStudioStore.getState().outputs.map((item) => item.id), ['backend'], ); - const persisted = JSON.parse(storageValues.get('modiff.studio')); + const persisted = JSON.parse(sessionValues.get('modiff.studio')); assert.equal(Object.hasOwn(persisted.state, 'outputs'), false); }); @@ -190,6 +198,20 @@ test('refresh hydrates the durable current preview separately from previous outp ); }); +test('preview history never borrows an unscoped or another workflow output with reused node ids', () => { + const records = [ + { ...output('local'), workflowTabId: 'workflow-a' }, + { ...output('other'), workflowTabId: 'workflow-b' }, + output('legacy'), + ]; + const previous = (workflow) => + previewStateModule.previousOutputsForPreview(records, workflow, 'node-1', 'image', null).map((item) => item.id); + assert.deepEqual(previous('workflow-a'), ['local']); + assert.deepEqual(previous('fresh-workflow'), []); + assert.deepEqual(previous(null), ['legacy']); + assert.equal(records.length, 3, 'Unscoped historical outputs remain available in the gallery.'); +}); + test('a slower history response cannot replace a newer preview-state revision', async () => { const call = deferred(); globalThis.fetch = () => call.promise; @@ -211,9 +233,9 @@ test('a slower history response cannot replace a newer preview-state revision', assert.equal(state.previewSlots[key].currentOutputId, 'new-current'); }); -test('legacy localStorage output copies are discarded during hydration', async () => { +test('obsolete output copies in a page checkpoint are discarded during hydration', async () => { const state = studioStoreModule.useStudioStore.getState(); - storageValues.set( + sessionValues.set( 'modiff.studio', JSON.stringify({ state: { diff --git a/scripts/supervisor-startup.test.mjs b/scripts/supervisor-startup.test.mjs new file mode 100644 index 00000000..08481a8c --- /dev/null +++ b/scripts/supervisor-startup.test.mjs @@ -0,0 +1,227 @@ +import assert from 'node:assert/strict'; +import { after, before, beforeEach, test } from 'node:test'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { createServer } from 'vite'; + +const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); +let server, control, nodes, tasks, originalFetch; +before(async () => { + globalThis.window = { location: { origin: 'http://127.0.0.1:5191' }, dispatchEvent: () => true }; + server = await createServer({ + root: ROOT, + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, hmr: false, watch: null }, + appType: 'custom', + }); + control = await server.ssrLoadModule('/src/utils/supervisorControl.ts'); + nodes = (await server.ssrLoadModule('/src/stores/useNodeStore.ts')).useNodesStore; + tasks = (await server.ssrLoadModule('/src/stores/useTaskStore.ts')).useTaskStore; + originalFetch = globalThis.fetch; +}); +beforeEach(() => { + control.resetSupervisorControl(); + const discoveryRequests = { ...nodes.getState().discoveryRequests }; + for (const key of ['nodes', 'runtime']) discoveryRequests[key] = { status: 'idle', requestId: null, error: null }; + nodes.setState({ discoveryRequests, runtimeStatus: null, runtimeError: null }); + tasks.setState({ + currentTask: undefined, + queuedTasks: {}, + taskCount: 0, + queueRevision: 0, + supervisorControlError: null, + }); +}); +after(async () => { + globalThis.fetch = originalFetch; + await server?.close(); +}); +function status(key, state, requestId = 1) { + nodes.setState({ + discoveryRequests: { ...nodes.getState().discoveryRequests, [key]: { status: state, requestId, error: null } }, + }); +} +function countedStore() { + let subscriptions = 0; + return { + getState: nodes.getState, + subscribe(listener) { + subscriptions++; + const unsubscribe = nodes.subscribe(listener); + return () => { + subscriptions--; + unsubscribe(); + }; + }, + count: () => subscriptions, + }; +} +function deferred() { + let resolve; + const promise = new Promise((r) => { + resolve = r; + }); + return { promise, resolve }; +} +function response(x) { + return new Response(JSON.stringify(x), { headers: { 'Content-Type': 'application/json' } }); +} +async function background(store = nodes, signal, timeoutMs = 1000) { + if (await control.waitForSupervisorMetadata(store, signal, timeoutMs)) await tasks.getState().fetchSupervisorTasks(); +} + +test('startup waits through owned nodes-to-runtime discovery and avoids a standalone queue probe', async () => { + status('nodes', 'loading'); + const store = countedStore(); + const requests = []; + globalThis.fetch = async (url) => { + requests.push(String(url)); + return response({ ready: true, workerControl: { available: false, address: null } }); + }; + const pending = background(store); + status('nodes', 'success'); + await Promise.resolve(); + assert.equal(store.count(), 1, 'nodes success is not runtime metadata'); + await nodes.getState().fetchRuntimeStatus(); + await pending; + assert.equal(store.count(), 0); + assert.equal(requests.length, 1); + assert.match(requests[0], /runtime\/status$/); +}); + +test('supervised metadata before timeout restores the actual queue at its advertised address', async () => { + const health = deferred(); + status('runtime', 'loading'); + const requests = []; + globalThis.fetch = async (url) => { + requests.push(String(url)); + if (String(url).endsWith('/runtime/status')) return health.promise; + return response({ + current: { task_id: 'active-startup', status: 'running', name: 'Live native run' }, + queued: {}, + recent: [], + }); + }; + const runtime = nodes.getState().fetchRuntimeStatus(); + const pending = background(); + health.resolve(response({ ready: true, workerControl: { available: true, address: 'http://127.0.0.1:43001' } })); + await runtime; + await pending; + assert.equal(tasks.getState().currentTask.task_id, 'active-startup'); + assert.equal(requests.filter((x) => x.endsWith('/queue')).length, 1); + assert.equal(requests.at(-1), 'http://127.0.0.1:43001/queue'); +}); + +test('a busy metadata request falls back once after a bounded wait and later standalone metadata stops polling', async () => { + status('nodes', 'loading'); + const store = countedStore(); + const requests = []; + globalThis.fetch = async (url) => { + requests.push(String(url)); + return response({ current: { task_id: 'busy-worker', status: 'running' }, queued: {}, recent: [] }); + }; + await background(store, undefined, 5); + assert.equal(store.count(), 0); + assert.equal(tasks.getState().currentTask.task_id, 'busy-worker'); + assert.equal(requests.length, 1); + assert.match(requests[0], /^http:\/\/(127\.0\.0\.1|localhost):\d+\/queue$/); + control.updateWorkerControl({ available: false, address: null }); + status('runtime', 'success'); + await background(store); + assert.equal(requests.length, 1); +}); + +test('older successful metadata and failed discovery preserve legacy restoration and genuine errors', async () => { + status('runtime', 'loading'); + const pending = background(nodes, undefined, 1000); + globalThis.fetch = async () => { + throw new TypeError('Actual control connection refused.'); + }; + status('runtime', 'success'); + await pending; + assert.match(tasks.getState().supervisorControlError, /Actual control connection refused/); + control.resetSupervisorControl(); + status('runtime', 'error'); + await background(); + assert.match(tasks.getState().supervisorControlError, /Actual control connection refused/); +}); + +test('known control is immediate even when discovery is busy', async () => { + status('nodes', 'loading'); + control.updateWorkerControl({ available: true, address: 'http://127.0.0.1:43001' }); + const store = countedStore(); + globalThis.fetch = async (url) => { + assert.equal(String(url), 'http://127.0.0.1:43001/queue'); + return response({ current: null, queued: {}, recent: [] }); + }; + await background(store); + assert.equal(store.count(), 0); +}); + +test('cancelled periodic wait unsubscribes, clears its timer and never requests the queue', async () => { + status('nodes', 'loading'); + const store = countedStore(); + const abort = new AbortController(); + let requests = 0; + globalThis.fetch = async () => { + requests++; + throw new Error('Cancelled polling must not fetch.'); + }; + const pending = background(store, abort.signal, 5); + assert.equal(store.count(), 1); + abort.abort(); + await pending; + assert.equal(store.count(), 0); + await new Promise((resolve) => setTimeout(resolve, 10)); + assert.equal(requests, 0); + assert.equal(await control.waitForSupervisorMetadata(store, abort.signal), false); +}); + +test('metadata arriving between initial check and subscription cannot be lost', async () => { + status('runtime', 'loading'); + let subscriptions = 0; + const store = { + getState: nodes.getState, + subscribe(listener) { + subscriptions++; + control.updateWorkerControl({ available: false, address: null }); + status('runtime', 'success'); + const unsubscribe = nodes.subscribe(listener); + return () => { + subscriptions--; + unsubscribe(); + }; + }, + }; + assert.equal(await control.waitForSupervisorMetadata(store), true); + assert.equal(subscriptions, 0); +}); + +test('App uses the same bounded metadata wait for restoration and cancellable initial periodic polling', async () => { + const { readFile } = await import('node:fs/promises'); + const source = await readFile(path.join(ROOT, 'src/App.tsx'), 'utf8'); + assert.match(source, /await waitForSupervisorMetadata\(useNodesStore\)/); + assert.match(source, /await waitForSupervisorMetadata\(useNodesStore, abort\.signal\)/); + assert.match(source, /abort\.abort\(\)/); + assert.match(source, /SUPERVISOR_STARTUP_TIMEOUT_MS = 5_000/); +}); + +test('synchronous completion during registration removes the newly registered subscription', async () => { + status('runtime', 'loading'); + let subscriptions = 0; + const store = { + getState: nodes.getState, + subscribe(listener) { + subscriptions++; + control.updateWorkerControl({ available: false, address: null }); + listener(); + return () => { + subscriptions--; + }; + }, + }; + assert.equal(await control.waitForSupervisorMetadata(store), true); + assert.equal(subscriptions, 0); +}); diff --git a/scripts/task-template-contracts.test.mjs b/scripts/task-template-contracts.test.mjs index ad948ebd..b779425e 100644 --- a/scripts/task-template-contracts.test.mjs +++ b/scripts/task-template-contracts.test.mjs @@ -1,4 +1,5 @@ import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; import { after, before, test } from 'node:test'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; @@ -33,6 +34,204 @@ after(async () => { await server?.close(); }); +test('LTX long video starts with the exact distilled sampling controls', () => { + const model = 'LTXI2VLongMultiPromptPipeline'; + const defaults = modelProfilesModule.getFormDefaultsForRegisteredRoute('image_to_video', model); + assert.equal(defaults.modelType, model); + assert.equal(defaults.steps, 8); + assert.equal(defaults.guidanceScale, 1); + assert.equal(defaults.maxSequenceLength, 128); + assert.equal(modelProfilesModule.STUDIO_MODEL_PROFILES[model].lowVram.steps, 8); +}); + +test('required Diffusers providers are hash-covered and bound to the exact declared overlay profile', async () => { + const runtime = await server.ssrLoadModule('/src/studio/optionalRuntimes.ts'); + const modelType = 'DDPMPipeline'; + const mode = 'unconditional_image'; + const providerId = 'reviewed-diffusers-provider-v1'; + const profile = { + id: 'provider-fixture:direct', + modes: [mode], + loader_module: 'modules.DiffusersImage', + loader_action: 'LoadPipeline', + execution_path: 'diffusers-pipeline', + pipeline_class: modelType, + default_repo: modelProfilesModule.DDPM_CIFAR10_REPO, + optional_runtime_delivery: 'optional_overlay', + optional_runtime_profiles: [providerId], + required_diffusers_provider: providerId, + optionalRuntimeRequirement: { + schemaVersion: 1, + delivery: 'optional_overlay', + requiredNow: true, + profileIds: [providerId], + executionProfileIds: ['provider-fixture:direct'], + state: 'missing', + reason: 'optional_runtime_missing', + }, + }; + const semantic = { + schemaVersion: 1, + canonicalizationVersion: 1, + id: 'provider-fixture:unconditional:v1', + modelType, + mode, + executionProfileId: profile.id, + loaderModule: profile.loader_module, + loaderAction: profile.loader_action, + executionPath: profile.execution_path, + pipelineClass: modelType, + defaultRepo: profile.default_repo, + roles: [ + ['diffusersImagePipeline', 'modules.DiffusersImage.LoadPipeline', 0, 0], + ['diffusersUnconditionalGenerate', 'modules.DiffusersImage.UnconditionalGenerate', 400, 0], + ['preview', 'modules.Image.Preview', 800, 0], + ], + edges: [ + ['diffusersImagePipeline', 'pipeline', 'diffusersUnconditionalGenerate', 'pipeline'], + ['diffusersUnconditionalGenerate', 'images', 'preview', 'image'], + ], + bindings: [['diffusersImagePipeline', 'quantized_components', 'emptyList']], + autoFields: [], + actions: [], + requiredDiffusersProvider: providerId, + }; + const signed = (value) => ({ + ...value, + contentHash: `studio-spec-v1-${hashModule.hashString(hashModule.stableStringify(value))}`, + }); + const parseProfile = (value) => + runtime.parseOptionalRuntimeExecutionProfiles([structuredClone(value)], undefined, (item) => item === mode)[0]; + const parseSpec = (value, selected = profile) => + executionSpecsModule.parseStudioExecutionSpecs([value], modelType, [mode], [selected]); + const parsed = parseProfile(profile); + for (const item of [semantic, { ...semantic, auxiliaryTerminalRoles: [] }]) { + assert.deepEqual(parseSpec(signed(item), parsed), [signed(item)]); + } + + for (const change of [ + { required_diffusers_provider: null }, + { required_diffusers_provider: '' }, + { required_diffusers_provider: 'wrong:runtime' }, + { optional_runtime_profiles: [] }, + { optional_runtime_profiles: ['different-provider'] }, + { optional_runtime_profiles: [providerId, providerId] }, + { optional_runtime_delivery: 'base' }, + { optionalRuntimeRequirement: undefined }, + { optionalRuntimeRequirement: { ...profile.optionalRuntimeRequirement, requiredNow: false } }, + { optionalRuntimeRequirement: { ...profile.optionalRuntimeRequirement, profileIds: ['different-provider'] } }, + ]) { + assert.throws(() => parseProfile({ ...profile, ...change }), undefined, JSON.stringify(change)); + } + for (const value of [null, '', 'different-provider', 'wrong:runtime', undefined]) { + assert.throws(() => parseSpec(signed({ ...semantic, requiredDiffusersProvider: value }))); + } + const { requiredDiffusersProvider: _required, ...legacySemantic } = semantic; + assert.throws(() => parseSpec(signed(legacySemantic)), 'A required provider cannot be omitted from its spec'); + const { required_diffusers_provider: _provider, ...legacyProfile } = profile; + assert.throws(() => parseSpec(signed(semantic), legacyProfile), 'The spec cannot introduce undeclared authority'); + const otherProfile = { + ...profile, + required_diffusers_provider: 'different-provider', + optional_runtime_profiles: ['different-provider'], + }; + assert.throws( + () => parseSpec({ ...signed(semantic), requiredDiffusersProvider: 'different-provider' }, otherProfile), + 'Even a consistently changed profile cannot reuse the old specification hash', + ); + for (const item of [legacySemantic, { ...legacySemantic, auxiliaryTerminalRoles: [] }]) { + const old = signed(item); + assert.deepEqual(parseSpec(old, legacyProfile), [old], 'Both old key sets retain their original hash and meaning'); + } +}); + +test('empty multiple-choice bindings preserve an empty list while text bindings stay scalar', async () => { + const modelType = 'DDPMPipeline'; + const mode = 'unconditional_image'; + const profile = { + id: 'ddpm-cifar10:direct', + modes: [mode], + loader_module: 'modules.DiffusersImage', + loader_action: 'LoadPipeline', + execution_path: 'diffusers-pipeline', + pipeline_class: modelType, + default_repo: modelProfilesModule.DDPM_CIFAR10_REPO, + }; + const semantic = { + schemaVersion: 1, + canonicalizationVersion: 1, + id: 'ddpm-empty-component-fixture:v1', + modelType, + mode, + executionProfileId: profile.id, + loaderModule: profile.loader_module, + loaderAction: profile.loader_action, + executionPath: profile.execution_path, + pipelineClass: modelType, + defaultRepo: profile.default_repo, + roles: [ + ['diffusersImagePipeline', 'modules.DiffusersImage.LoadPipeline', 0, 0], + ['diffusersUnconditionalGenerate', 'modules.DiffusersImage.UnconditionalGenerate', 400, 0], + ['preview', 'modules.Image.Preview', 800, 0], + ], + edges: [ + ['diffusersImagePipeline', 'pipeline', 'diffusersUnconditionalGenerate', 'pipeline'], + ['diffusersUnconditionalGenerate', 'images', 'preview', 'image'], + ], + bindings: [['diffusersImagePipeline', 'quantized_components', 'emptyList']], + autoFields: [], + actions: [], + }; + const spec = { + ...semantic, + contentHash: `studio-spec-v1-${hashModule.hashString(hashModule.stableStringify(semantic))}`, + }; + assert.deepEqual(executionSpecsModule.parseStudioExecutionSpecs([spec], modelType, [mode], [profile]), [spec]); + const withWeightFormat = { ...semantic, bindings: [['diffusersImagePipeline', 'weight_format', 'weightFormat']] }; + const weightSpec = { + ...withWeightFormat, + contentHash: `studio-spec-v1-${hashModule.hashString(hashModule.stableStringify(withWeightFormat))}`, + }; + assert.deepEqual(executionSpecsModule.parseStudioExecutionSpecs([weightSpec], modelType, [mode], [profile]), [ + weightSpec, + ]); + for (const source of ['weight_format', 'WeightFormat', ['weightFormat'], null]) { + const invalid = { ...withWeightFormat, bindings: [['diffusersImagePipeline', 'weight_format', source]] }; + invalid.contentHash = `studio-spec-v1-${hashModule.hashString(hashModule.stableStringify(invalid))}`; + assert.throws(() => executionSpecsModule.parseStudioExecutionSpecs([invalid], modelType, [mode], [profile])); + } + globalThis.window ??= { location: { origin: 'http://127.0.0.1:5191' } }; + const valuesModule = await server.ssrLoadModule('/src/studio/executionSpecValues.ts'); + const form = { + ...modelProfilesModule.DEFAULT_STUDIO_FORM, + ...modelProfilesModule.getFormDefaultsForMode(mode, modelType), + }; + const before = structuredClone(form); + assert.equal( + valuesModule.resolveStudioExecutionSpecValues( + form, + weightSpec, + modelProfilesModule.STUDIO_MODEL_PROFILES[modelType], + ).weightFormat, + 'native', + ); + const first = valuesModule.resolveStudioExecutionSpecValues( + form, + spec, + modelProfilesModule.STUDIO_MODEL_PROFILES[modelType], + ); + assert.deepEqual(first.emptyList, []); + assert.equal(first.empty, ''); + first.emptyList.push('transformer'); + const second = valuesModule.resolveStudioExecutionSpecValues( + form, + spec, + modelProfilesModule.STUDIO_MODEL_PROFILES[modelType], + ); + assert.deepEqual(second.emptyList, [], 'Separate drafts must not share mutable component selections'); + assert.deepEqual(form, before); +}); + test('new outpaint forms fully repaint the extension without changing saved or inpaint settings', () => { for (const model of ['FluxFillPipeline', 'FluxKontextInpaintPipeline', 'Flux2KleinInpaintPipeline']) { const saved = { ...modelProfilesModule.getFormDefaultsForMode('outpaint', model), strength: 0.85 }; @@ -2371,3 +2570,88 @@ test('task contracts reject a loader or output identity that diverges from its e ); } }); +test('managed speech authoring uses exact backend timestamp options without rewriting a saved form', async (t) => { + const windowDescriptor = Object.getOwnPropertyDescriptor(globalThis, 'window'); + globalThis.window = { location: { origin: 'http://127.0.0.1' }, dispatchEvent: () => true }; + t.after(() => { + if (windowDescriptor) Object.defineProperty(globalThis, 'window', windowDescriptor); + else delete globalThis.window; + }); + const nodes = (await server.ssrLoadModule('/src/stores/useNodeStore.ts')).useNodesStore; + const studio = (await server.ssrLoadModule('/src/stores/useStudioStore.ts')).useStudioStore; + const originalNodes = nodes.getState(); + const originalStudio = studio.getState(); + t.after(() => { + nodes.setState(originalNodes, true); + studio.setState(originalStudio, true); + }); + const ctc = 'HuggingFaceCTCSpeechRecognitionModel'; + const whisper = 'HuggingFaceSpeechRecognitionModel'; + const ctcNodeKey = 'modules.HuggingFaceSpeech.TranscribeCTCAudio'; + const whisperNodeKey = 'modules.HuggingFaceSpeech.TranscribeAudio'; + const ctcFixture = JSON.parse(readFileSync(path.join(ROOT, 'tests/fixtures/ctc-catalog-insertion.v1.json'), 'utf8')); + const transcribeCtc = ctcFixture.compiledEntry.definition.graph.nodes.find( + (node) => node.data.action === 'TranscribeCTCAudio', + ).data; + const capability = (modelType, nodeKey, modes) => ({ + modelType, + studioExecutionSpecSchemaVersion: 1, + studioExecutionSpecModes: modes, + studioExecutionSpecs: modes.map((mode) => ({ + modelType, + mode, + roles: [['transcribeAudio', nodeKey, 0, 0]], + bindings: [['transcribeAudio', 'timestamps', 'speechTimestamps']], + })), + }); + nodes.setState({ + studioExecutionSpecInvalid: false, + studioModelCapabilities: [ + capability(ctc, ctcNodeKey, ['speech_to_text']), + capability(whisper, whisperNodeKey, ['speech_to_text', 'speech_translation']), + ], + nodesRegistry: { + [ctcNodeKey]: transcribeCtc, + [whisperNodeKey]: { params: { timestamps: { default: 'segment', options: ['none', 'segment', 'word'] } } }, + }, + }); + + studio.getState().updateForm(modelProfilesModule.getFormDefaultsForMode('speech_to_text', ctc)); + assert.equal(studio.getState().form.speechTimestamps, 'word', 'Fresh CTC Studio graph must author the node default'); + const { studioSpeechTimestampContract } = await server.ssrLoadModule('/src/studio/effectiveControls.ts'); + const contractForForm = (form) => studioSpeechTimestampContract(form, nodes.getState()); + assert.deepEqual(contractForForm(studio.getState().form), { options: ['none', 'word'], defaultValue: 'word' }); + + for (const value of ['none', 'word']) { + studio.getState().updateForm({ speechTimestamps: value }); + studio.getState().updateForm({ modelType: whisper }); + assert.equal(studio.getState().form.speechTimestamps, value); + studio.getState().updateForm({ modelType: ctc }); + assert.equal(studio.getState().form.speechTimestamps, value); + } + + studio.getState().selectMode('speech_translation'); + assert.equal(studio.getState().form.modelType, whisper); + assert.equal(studio.getState().form.speechTimestamps, 'segment'); + assert.deepEqual(contractForForm(studio.getState().form), { + options: ['none', 'segment', 'word'], + defaultValue: 'segment', + }); + studio.getState().selectMode('speech_to_text'); + assert.equal(studio.getState().form.speechTimestamps, 'segment'); + studio.getState().updateForm({ modelType: ctc }); + assert.equal(studio.getState().form.speechTimestamps, 'word'); + + const templateFor = (modelType) => ({ id: 'speech-template-fixture', modelType, mode: 'speech_to_text', prompt: '' }); + studio.getState().applyTemplate(templateFor(ctc), { sourceAudio: ['@data/audio/template-input.wav'] }); + assert.equal(studio.getState().form.speechTimestamps, 'word', 'Fresh CTC templates must use the CTC node default'); + assert.deepEqual(studio.getState().form.sourceAudio, ['@data/audio/template-input.wav']); + studio.getState().applyTemplate(templateFor(whisper)); + assert.equal(studio.getState().form.speechTimestamps, 'segment', 'Fresh Whisper templates retain segment timestamps'); + + // Loading a persisted draft does not take the explicit task/model authoring path. + studio.setState({ form: { ...studio.getState().form, speechTimestamps: 'segment' } }); + studio.getState().updateForm({ sourceAudio: ['@data/audio/old-input.wav'] }); + assert.equal(studio.getState().form.speechTimestamps, 'segment'); + assert.deepEqual(studio.getState().form.sourceAudio, ['@data/audio/old-input.wav']); +}); diff --git a/scripts/template-asset-release-contract.mjs b/scripts/template-asset-release-contract.mjs index a4db9825..c41fd8db 100644 --- a/scripts/template-asset-release-contract.mjs +++ b/scripts/template-asset-release-contract.mjs @@ -19,6 +19,43 @@ function readJson(path, label) { } } +// The authoring manifest can retain unavailable historical files. Only paths +// included in the public subset can expose a preview, including a renamed copy. +export function readPrivateGalleryReviews(clientRoot, source, manifest, gallery) { + const registry = readJson( + join(clientRoot, 'config', 'private-workflow-qualification.v1.json'), + 'Private workflow review registry', + ); + if (registry.schemaVersion !== 1 || !Array.isArray(registry.reviews)) { + throw new Error('Invalid private workflow review registry.'); + } + const privateHashes = new Set(); + const privateTemplates = new Set(); + for (const review of registry.reviews) { + if (!/^[a-f0-9]{64}$/u.test(review.outputSha256) || !review.sourceTemplateId) { + throw new Error('Invalid private workflow preview identity.'); + } + privateHashes.add(`sha256:bytes:${review.outputSha256}`); + privateTemplates.add(review.sourceTemplateId); + } + const unavailable = new Set(source.unavailableAssets ?? []); + for (const { path, sha256 } of manifest.assets) { + if (privateHashes.has(sha256) && !unavailable.has(path)) { + throw new Error(`Private workflow output is listed as a public Gallery file: ${path}`); + } + } + for (const entry of gallery.examples) { + if (!privateTemplates.has(entry.templateId)) continue; + for (const key of ['outputPath', 'thumbnailPath', 'cardPreviewPath', 'beforePath', 'afterPath', 'posterPath']) { + const path = entry[key]?.replace(/^\/+/, ''); + if (path && !unavailable.has(path)) { + throw new Error(`Private workflow preview is available in the Gallery: ${entry.templateId} (${key})`); + } + } + } + return registry.reviews; +} + export function verifyRemoteTemplateAssetBuild(distRoot, expectedSourceValue) { if (!existsSync(distRoot) || !statSync(distRoot).isDirectory()) { throw new Error(`Release build directory is missing: ${distRoot}`); @@ -60,7 +97,10 @@ export function validateTemplateAssetReleaseCheckoutSource(clientRoot = CLIENT_R 'Checked-in Template Gallery asset source', ); const manifest = readJson(join(clientRoot, 'config', 'template-assets.v1.json'), 'Template Gallery asset manifest'); - return validateTemplateAssetRelease(source, manifest); + const validatedSource = validateTemplateAssetRelease(source, manifest); + const gallery = readJson(join(clientRoot, 'public', 'template-gallery', 'manifest.json'), 'Template Gallery'); + readPrivateGalleryReviews(clientRoot, validatedSource, manifest, gallery); + return validatedSource; } export function verifyTemplateAssetReleaseCheckout(clientRoot = CLIENT_ROOT, distRoot = join(clientRoot, 'dist')) { diff --git a/scripts/template-asset-release-contract.test.mjs b/scripts/template-asset-release-contract.test.mjs index 7fd8804b..63c443fd 100644 --- a/scripts/template-asset-release-contract.test.mjs +++ b/scripts/template-asset-release-contract.test.mjs @@ -5,6 +5,7 @@ import { join } from 'node:path'; import test from 'node:test'; import { TEMPLATE_ASSET_BUILD_IDENTITY_PATH, + validateTemplateAssetReleaseCheckoutSource, verifyRemoteTemplateAssetBuild, verifyTemplateAssetReleaseCheckout, } from './template-asset-release-contract.mjs'; @@ -206,17 +207,49 @@ test('remote build inspection rejects missing and bundled Gallery payloads', (co assert.throws(() => verifyRemoteTemplateAssetBuild(distRoot, remoteSource), /contains a local Gallery payload/); }); -test('release checkout verification reads the checked source, manifest, and fresh build together', (context) => { +test('checked-in Gallery metadata withholds the restricted workflow previews', () => { + assert.equal(validateTemplateAssetReleaseCheckoutSource().mode, 'huggingface'); +}); + +test('release checkout rejects public private-output aliases and template previews without operator evidence', (context) => { const root = mkdtempSync(join(tmpdir(), 'modiff-template-checkout-')); context.after(() => rmSync(root, { recursive: true, force: true })); mkdirSync(join(root, 'src', 'studio'), { recursive: true }); mkdirSync(join(root, 'config')); + mkdirSync(join(root, 'public', 'template-gallery'), { recursive: true }); mkdirSync(join(root, 'dist')); writeFileSync(join(root, 'src', 'studio', 'templateAssetSource.json'), JSON.stringify(remoteSource)); - writeFileSync(join(root, 'config', 'template-assets.v1.json'), JSON.stringify(readyManifest)); + const restrictedHash = 'd'.repeat(64); + const reviews = [{ sourceTemplateId: 'private-recipe', outputSha256: restrictedHash }]; + writeFileSync( + join(root, 'config', 'private-workflow-qualification.v1.json'), + JSON.stringify({ schemaVersion: 1, reviews }), + ); + const galleryPath = join(root, 'public', 'template-gallery', 'manifest.json'); + writeFileSync(galleryPath, JSON.stringify({ examples: [] })); + const manifestPath = join(root, 'config', 'template-assets.v1.json'); + writeFileSync(manifestPath, JSON.stringify({ ...readyManifest, assets: [] })); writeFileSync(join(root, 'dist', 'index.html'), ''); mkdirSync(join(root, 'dist', 'assets')); writeFileSync(join(root, 'dist', TEMPLATE_ASSET_BUILD_IDENTITY_PATH), serializeTemplateAssetSource(remoteSource)); assert.equal(verifyTemplateAssetReleaseCheckout(root).assetSetId, assetSetId); + const alias = 'template-gallery/unrelated-title.mp4'; + writeFileSync( + manifestPath, + JSON.stringify({ ...readyManifest, assets: [{ path: alias, sha256: `sha256:bytes:${restrictedHash}` }] }), + ); + assert.throws(() => verifyTemplateAssetReleaseCheckout(root), /private workflow output/i); + + writeFileSync( + manifestPath, + JSON.stringify({ ...readyManifest, assets: [{ path: alias, sha256: `sha256:bytes:${'e'.repeat(64)}` }] }), + ); + writeFileSync(galleryPath, JSON.stringify({ examples: [{ templateId: 'private-recipe', posterPath: `/${alias}` }] })); + assert.throws(() => verifyTemplateAssetReleaseCheckout(root), /private workflow preview/i); + + const subsetSource = { ...remoteSource, completeAssetSetId: assetSetId, unavailableAssets: [alias] }; + writeFileSync(join(root, 'src', 'studio', 'templateAssetSource.json'), JSON.stringify(subsetSource)); + writeFileSync(join(root, 'dist', TEMPLATE_ASSET_BUILD_IDENTITY_PATH), serializeTemplateAssetSource(subsetSource)); + assert.equal(verifyTemplateAssetReleaseCheckout(root).assetSetId, assetSetId); }); diff --git a/scripts/template-assets.test.mjs b/scripts/template-assets.test.mjs index f7263550..8dbd90b4 100644 --- a/scripts/template-assets.test.mjs +++ b/scripts/template-assets.test.mjs @@ -81,6 +81,27 @@ test('rejects moving revisions and path traversal', () => { ); }); +test('validates approved and complete asset identities independently across repeated resolution', () => { + const source = { ...remoteSource, completeAssetSetId: `sha256:canonical-json:${'b'.repeat(64)}` }; + for (let attempt = 0; attempt < 3; attempt += 1) + assert.match(resolveTemplateAssetUrlFromSource('/template-gallery/example.webp', source), /\/resolve\//); + for (const invalid of [ + 'sha256:canonical-json:short', + `sha256:canonical-json:${'A'.repeat(64)}`, + 'other:' + 'a'.repeat(64), + ]) { + assert.throws( + () => resolveTemplateAssetUrlFromSource('/template-gallery/example.webp', { ...source, assetSetId: invalid }), + /asset-set identity/, + ); + assert.throws( + () => + resolveTemplateAssetUrlFromSource('/template-gallery/example.webp', { ...source, completeAssetSetId: invalid }), + /complete Template Gallery asset-set identity/, + ); + } +}); + test('build and runtime contracts agree on local and immutable remote source shapes', () => { assert.deepEqual(resolveTemplateAssetBuildSource(localSource), localSource); assert.deepEqual(resolveTemplateAssetBuildSource(remoteSource), remoteSource); diff --git a/scripts/template-card-coverage.mjs b/scripts/template-card-coverage.mjs index 731ea222..0511b798 100644 --- a/scripts/template-card-coverage.mjs +++ b/scripts/template-card-coverage.mjs @@ -97,14 +97,17 @@ const posterHashOwners = new Map(); const rows = runtime.templates.map((template) => { const entry = manifestByTemplate.get(template.id); const publishedOutput = resolvePublic(entry?.afterPath ?? entry?.outputPath); - const publishedThumbnail = resolvePublic(entry?.thumbnailPath ?? entry?.posterPath); const needsBefore = ['compareSlider', 'hoverDissolve'].includes(template.thumbnailVariant); const publishedBefore = resolvePublic(entry?.beforePath); const currentEntry = entry ? runtime.findManifestEntry(template, { ...manifest, examples: [entry] }) : undefined; + const nativePreview = runtime.isRetainedVideoPreview(template, currentEntry); + const motionPath = nativePreview ? currentEntry.outputPath : currentEntry?.cardPreviewPath; + const publishedPosterPath = nativePreview ? entry?.posterPath : (entry?.thumbnailPath ?? entry?.posterPath); + const publishedThumbnail = resolvePublic(publishedPosterPath); const motionPreview = template.example?.mediaType !== 'video' && template.outputKinds?.[0] !== 'video' ? true - : Boolean(currentEntry?.cardPreviewPath && resolvePublic(currentEntry.cardPreviewPath)); + : Boolean(motionPath && resolvePublic(motionPath)); const entryMatchesTemplate = Boolean( currentEntry && currentEntry.promptSettingsHash === runtime.promptSettingsHash(template) && @@ -161,10 +164,10 @@ const rows = runtime.templates.map((template) => { previewPath: completePublishedPreview && entry ? template.example?.mediaType === 'video' || template.outputKinds?.[0] === 'video' - ? entry.cardPreviewPath + ? motionPath : (entry.thumbnailPath ?? entry.posterPath ?? entry.afterPath ?? entry.outputPath) : publishedPoster && entry - ? (entry.thumbnailPath ?? entry.posterPath) + ? publishedPosterPath : (posterPath ?? null), errors, }; diff --git a/scripts/template-card-previews.mjs b/scripts/template-card-previews.mjs index 1a843eb7..7299fbea 100644 --- a/scripts/template-card-previews.mjs +++ b/scripts/template-card-previews.mjs @@ -74,6 +74,10 @@ for (const entry of manifest.examples ?? []) { }); continue; } + if (runtime.isRetainedVideoPreview(template, currentEntry)) { + skipped.push({ templateId: entry.templateId, reason: 'The approved native clip serves as its own preview.' }); + continue; + } const sourcePath = resolvePublicPath(entry.outputPath); if (!sourcePath) { skipped.push({ templateId: entry.templateId, reason: `Output is missing: ${entry.outputPath}` }); @@ -83,13 +87,19 @@ for (const entry of manifest.examples ?? []) { const publicPreviewPath = `/template-gallery/${entry.templateId}.card-preview.mp4`; const previewPath = join(publicRoot, publicPreviewPath.replace(/^\//, '')); const preview = templateGalleryContract.video.cardPreview; - const durationSeconds = Math.min(Number(entry.durationSeconds ?? preview.durationSeconds), preview.durationSeconds); + const loopShortSource = Boolean( + template.example?.expectedOutput?.sourceTiming && Number(entry.durationSeconds) < preview.minimumDurationSeconds, + ); + const durationSeconds = loopShortSource + ? preview.durationSeconds + : Math.min(Number(entry.durationSeconds ?? preview.durationSeconds), preview.durationSeconds); const result = spawnSync( ffmpeg, [ '-y', '-v', 'error', + ...(loopShortSource ? ['-stream_loop', '-1'] : []), '-i', sourcePath, '-t', diff --git a/scripts/template-default-input-overrides.json b/scripts/template-default-input-overrides.json index 49491baa..f10e0522 100644 --- a/scripts/template-default-input-overrides.json +++ b/scripts/template-default-input-overrides.json @@ -12,6 +12,35 @@ "byteSize": 14400044, "sourceTaskId": "6K8vnoVfgEEz", "selectionReason": "User-selected latest 75-second ACE-Step output at 170 BPM, C# minor, and 3/4 for the continuation template source." + }, + { + "templateId": "flux_kontext_multi_reference", + "role": "reference_image_1", + "bindingId": "flux-kontext-material-preservation-v2-inputs", + "bindingLabel": "Source bottle and material-only reference", + "assetId": "flux_kontext_multi_reference-reference-image-1", + "assetLabel": "Approved source bottle", + "fileName": "flux_kontext_multi_reference.reference_image_1.webp", + "path": "public/template-gallery/runtime-inputs/assets/a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b.webp", + "previewPath": "/template-gallery/inputs/flux_kontext_multi_reference.before.webp", + "contentHash": "sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b", + "byteSize": 196402, + "sourceTaskId": "h0n3A3uvEPX4", + "selectionReason": "Preserve the approved material-preservation v2 input identity, ordering and author labels; exact source bytes are unchanged." + }, + { + "templateId": "flux_kontext_multi_reference", + "role": "reference_image_2", + "bindingId": "flux-kontext-material-preservation-v2-inputs", + "bindingLabel": "Source bottle and material-only reference", + "assetId": "flux-kontext-cobalt-material-only-v2", + "assetLabel": "Cobalt surface colour and texture strip", + "fileName": "flux_kontext_multi_reference.material_strip_v2.png", + "path": "public/template-gallery/runtime-inputs/assets/70c74691e2bcd7cdb352b7e64e5af5a1a7f01d77112d32a8edadc0060a95ef34.png", + "contentHash": "sha256:bytes:70c74691e2bcd7cdb352b7e64e5af5a1a7f01d77112d32a8edadc0060a95ef34", + "byteSize": 3714, + "sourceTaskId": "h0n3A3uvEPX4", + "selectionReason": "Preserve the approved material-preservation v2 input identity, ordering and author labels; exact source bytes are unchanged." } ] } diff --git a/scripts/template-default-inputs.mjs b/scripts/template-default-inputs.mjs index 3fbc2d6c..7de18408 100644 --- a/scripts/template-default-inputs.mjs +++ b/scripts/template-default-inputs.mjs @@ -1,10 +1,11 @@ import { createHash } from 'node:crypto'; -import { copyFile, mkdir, readFile, readdir, rm, stat, writeFile } from 'node:fs/promises'; +import { copyFile, mkdir, mkdtemp, readFile, readdir, rename, rm, stat, writeFile } from 'node:fs/promises'; import { extname, isAbsolute, join, relative, resolve, sep } from 'node:path'; import { fileURLToPath } from 'node:url'; import { format } from 'prettier'; import ts from 'typescript'; +import { loadTemplateRuntime } from './template-gallery-harness.mjs'; const SCRIPT_PATH = fileURLToPath(import.meta.url); export const PROJECT_ROOT = resolve(SCRIPT_PATH, '..', '..'); @@ -191,7 +192,27 @@ function kebabCase(value) { .toLowerCase(); } +export function canonicalTemplateInputRole(role) { + if (typeof role !== 'string') return null; + const indexed = /^referenceImages\[(0|[1-9]\d*)\]$/.exec(role); + if (indexed) { + const index = Number(indexed[1]); + return Number.isSafeInteger(index) && index >= 0 && index < 64 ? `reference_image_${index + 1}` : null; + } + const aliases = { + maskImage: 'mask_image', + controlImage: 'control_image', + sourceVideo: 'source_video', + maskVideo: 'mask_video', + controlVideo: 'control_video', + sourceAudio: 'source_audio', + referenceAudio: 'reference_audio', + }; + return Object.hasOwn(aliases, role) ? aliases[role] : role; +} + function roleMetadata(role) { + role = canonicalTemplateInputRole(role); const referenceMatch = /^reference_image_(\d+)$/.exec(role); if (referenceMatch) { const index = Number(referenceMatch[1]); @@ -320,6 +341,32 @@ function inputItems(run) { return run?.inputs?.items ?? []; } +export function isGeneratedUpscaleComparison(item, run, entry) { + if ( + item?.role !== 'upscaleSourceComparison' || + !CONTENT_HASH_PATTERN.test(item.contentHash ?? '') || + !/^@data\/studio\/outputs\/[^/]+$/u.test(item.path ?? '') || + item.contentHash !== entry?.beforeMediaHash + ) + return false; + const nodes = run?.graph?.canonicalGraph?.nodes ?? []; + if (nodes.some((node) => node.module === 'modules.Image' && node.action === 'Load')) return false; + return nodes.some((node) => { + if (node.module !== 'modules.Spandrel' || node.action !== 'Upscaler') return false; + const input = node.params?.image; + const decoder = nodes.find((candidate) => candidate.key === input?.sourceId); + const denoiser = nodes.find((candidate) => candidate.key === decoder?.params?.latents?.sourceId); + return ( + input?.sourceKey === 'images' && + decoder?.module === 'modules.ModularDiffusers' && + decoder.action === 'DecodeLatents' && + decoder.params.latents.sourceKey === 'latents' && + denoiser?.module === 'modules.ModularDiffusers' && + denoiser.action === 'Denoise' + ); + }); +} + function inputExtension(artifact, sourcePath) { const declaredExtension = extname(artifact.path).toLowerCase(); if (/^\.[a-z0-9]{1,8}$/.test(declaredExtension)) return declaredExtension; @@ -429,10 +476,11 @@ async function collectRequirements(projectRoot) { for (const item of firstInputs) { const artifact = { ...item, + role: canonicalTemplateInputRole(item.role) ?? item.role, templateId: entry.templateId, ...(item === previewInputCandidates[0] ? { previewPath: entry.beforePath } : {}), }; - if (String(item.path).startsWith(GENERATED_INPUT_PREFIX)) { + if (String(item.path).startsWith(GENERATED_INPUT_PREFIX) || isGeneratedUpscaleComparison(item, runs[0], entry)) { excludedGenerated.push(artifact); continue; } @@ -510,6 +558,20 @@ async function collectRequirements(projectRoot) { }); continue; } + if ( + ['bindingId', 'assetId', 'fileName'].some( + (field) => + override[field] !== undefined && + (typeof override[field] !== 'string' || !/^[A-Za-z0-9][A-Za-z0-9_.-]{0,191}$/u.test(override[field])), + ) + ) { + issues.push({ + templateId: override.templateId, + role: override.role, + reason: 'Selected-input metadata ids and filenames must be bounded plain names.', + }); + continue; + } if (!CONTENT_HASH_PATTERN.test(override.contentHash ?? '') || !Number.isSafeInteger(override.byteSize)) { issues.push({ templateId: override.templateId, @@ -530,6 +592,9 @@ async function collectRequirements(projectRoot) { const artifact = { templateId: override.templateId, role: override.role, + bindingId: override.bindingId, + assetId: override.assetId, + fileName: override.fileName, bindingLabel: override.bindingLabel, assetLabel: override.assetLabel, path: override.path, @@ -582,6 +647,7 @@ async function resolveRequirementSources(projectRoot, requirements) { const sourceAssetsRoot = resolve(projectRoot, 'artifacts', 'template-gallery', 'source-assets'); const searchFiles = [ ...(await walkFiles(publicGalleryRoot, runtimeInputRoot)), + ...(await walkFiles(resolve(projectRoot, RUNTIME_ASSET_ROOT))), ...(await walkFiles(sourceAssetsRoot)), ]; const hashMatches = new Map(); @@ -635,13 +701,13 @@ function buildMapping(requirements, resolutions) { const assetRelativePath = toPosix(join('assets', `${hashHex}${extension}`)); const runtimePath = `${RUNTIME_PUBLIC_PREFIX}/${assetRelativePath}`; const defaultAsset = { - id: `${artifact.templateId}-${kebabCase(artifact.role)}`, + id: artifact.assetId ?? `${artifact.templateId}-${kebabCase(artifact.role)}`, label: artifact.assetLabel ?? metadata.label, mediaType: metadata.mediaType, ...(artifact.previewPath ? { previewPath: artifact.previewPath } : {}), runtimePath, runtimeSha256: artifact.contentHash, - fileName: `${artifact.templateId}.${artifact.role}${extension}`, + fileName: artifact.fileName ?? `${artifact.templateId}.${artifact.role}${extension}`, }; const templateFields = groupedByTemplate.get(artifact.templateId) ?? new Map(); @@ -684,14 +750,19 @@ function buildMapping(requirements, resolutions) { throw new Error(`${templateId} declares multiple reviewed defaults for singular field ${field}.`); } const fieldMetadata = FIELD_METADATA[field]; + for (const key of ['bindingId', 'bindingLabel']) { + const declarations = [ + ...new Set(assets.map(({ artifact }) => artifact[key]).filter((value) => value !== undefined)), + ]; + if (declarations.length > 1) throw new Error(`${templateId} has conflicting ${key} declarations for ${field}.`); + } bindings.push({ - id: `${templateId}-${kebabCase(field)}-defaults`, - label: - assets.length === 1 && assets[0].artifact.bindingLabel - ? assets[0].artifact.bindingLabel - : assets.length === 1 - ? fieldMetadata.singularLabel - : fieldMetadata.pluralLabel, + id: assets[0].artifact.bindingId ?? `${templateId}-${kebabCase(field)}-defaults`, + label: assets[0].artifact.bindingLabel + ? assets[0].artifact.bindingLabel + : assets.length === 1 + ? fieldMetadata.singularLabel + : fieldMetadata.pluralLabel, mediaType: fieldMetadata.mediaType, origin: 'template', requiredAt: 'workflow_start', @@ -729,7 +800,7 @@ function validateCoverage(requirements, mapping) { ); } for (const requirement of requirements) { - const expectedId = `${requirement.templateId}-${kebabCase(requirement.role)}`; + const expectedId = requirement.assetId ?? `${requirement.templateId}-${kebabCase(requirement.role)}`; if (!mappedAssetIds.has(expectedId)) { throw new Error( `Default input coverage is missing ${requirement.templateId} ${requirement.role} (${requirement.contentHash}).`, @@ -738,6 +809,41 @@ function validateCoverage(requirements, mapping) { } } +async function retainedRecipeRuntimeAssets(projectRoot, currentAssets) { + const retained = []; + const known = new Set(currentAssets.map((asset) => asset.relativePath)); + for (const path of await walkFiles(resolve(projectRoot, GALLERY_ROOT, 'recipes'))) { + if (extname(path) !== '.json') continue; + const recipe = await readJson(path); + if (recipe.kind !== 'retained-template-declaration') continue; + for (const binding of recipe.template?.inputBindings ?? []) { + for (const asset of binding.defaultAssets ?? []) { + const match = /^\/template-gallery\/runtime-inputs\/(assets\/[a-f0-9]{64}\.[a-z0-9]+)$/u.exec( + asset.runtimePath ?? '', + ); + if (!match || known.has(match[1])) continue; + const sourcePath = publicFilePath(projectRoot, asset.runtimePath); + if ( + !CONTENT_HASH_PATTERN.test(asset.runtimeSha256 ?? '') || + !sourcePath || + (await fileSha256(sourcePath)) !== asset.runtimeSha256 + ) { + throw new Error(`Retained recipe input bytes differ: ${recipe.template.id} ${asset.id}.`); + } + retained.push({ + relativePath: match[1], + sourcePath, + contentHash: asset.runtimeSha256, + byteSize: (await stat(sourcePath)).size, + retainedRecipe: toPosix(relative(projectRoot, path)), + }); + known.add(match[1]); + } + } + } + return retained; +} + export class TemplateDefaultInputResolutionError extends Error { constructor(issues) { super(`Could not resolve ${issues.length} approved template default input item(s).`); @@ -757,10 +863,46 @@ export async function buildTemplateDefaultInputPlan(projectRoot = PROJECT_ROOT) throw new TemplateDefaultInputResolutionError(resolved.issues); } - const { mapping, runtimeAssets } = buildMapping(collected.requirements, resolved.resolutions); - validateCoverage(collected.requirements, mapping); const templateIds = await readStudioTemplateIds(projectRoot); const templateIdSet = new Set(templateIds); + const generatedRequirements = collected.requirements.filter((item) => templateIdSet.has(item.templateId)); + const sourceOwnedRequirements = collected.requirements.filter((item) => !templateIdSet.has(item.templateId)); + const runtime = await loadTemplateRuntime(projectRoot, { includePlanning: true }); + if (sourceOwnedRequirements.length) { + for (const item of sourceOwnedRequirements) { + const template = runtime.templates.find((candidate) => candidate.id === item.templateId); + const metadata = roleMetadata(item.role); + const binding = template?.inputBindings?.find( + (candidate) => candidate.origin === 'template' && candidate.field === metadata.field, + ); + const asset = binding?.defaultAssets[metadata.field === 'referenceImages' ? metadata.order - 1 : 0]; + if (!asset || asset.runtimeSha256 !== item.contentHash) { + throw new Error( + `Source-owned template input differs from approved provenance: ${item.templateId} ${item.role}.`, + ); + } + } + } + // Appended templates author their bindings explicitly and do not use the + // BASE_STUDIO_TEMPLATES packed indexes. Verify them without rewriting them. + const { mapping, runtimeAssets } = buildMapping(generatedRequirements, resolved.resolutions); + const { mapping: completeMapping } = buildMapping(collected.requirements, resolved.resolutions); + const retainedRuntimeAssets = await retainedRecipeRuntimeAssets(projectRoot, runtimeAssets); + runtimeAssets.push(...retainedRuntimeAssets); + runtimeAssets.sort((left, right) => left.relativePath.localeCompare(right.relativePath)); + const inputContractHashes = Object.fromEntries( + Object.entries(completeMapping).map(([id, bindings]) => [ + id, + templateInputContractHash( + templateIdSet.has(id) + ? mapping[id] + : runtime.templates + .find((template) => template.id === id) + ?.inputBindings.filter((binding) => binding.origin === 'template'), + ), + ]), + ); + validateCoverage(generatedRequirements, mapping); const approvedTemplateIds = collected.approvedEntries.map((entry) => entry.templateId); const approvedTemplateIdSet = new Set(approvedTemplateIds); const unexpectedTemplateIds = Object.keys(mapping).filter((templateId) => !approvedTemplateIdSet.has(templateId)); @@ -776,7 +918,10 @@ export async function buildTemplateDefaultInputPlan(projectRoot = PROJECT_ROOT) projectRoot, templateIds, approvedTemplateIds, - requirements: collected.requirements, + requirements: generatedRequirements, + sourceOwnedRequirements, + inputContractHashes, + retainedRuntimeAssets, excludedGenerated: collected.excludedGenerated, resolutions: resolved.resolutions, mapping, @@ -829,12 +974,29 @@ export async function renderRuntimeInputTypescript(plan) { ? `Reviewed reference image ${assetIndex + 1}` : `Reviewed ${binding.field.replace(/[A-Z]/g, (letter) => ` ${letter.toLowerCase()}`)}`; const packedAsset = [`${Buffer.from(digest, 'hex').toString('base64')}.${extension}`]; - if (packedPreview || asset.label !== defaultAssetLabel) packedAsset.push(packedPreview ?? null); - if (asset.label !== defaultAssetLabel) packedAsset.push(asset.label); + const referenceImage = binding.field === 'referenceImages'; + const fieldName = binding.field.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`); + const fileField = binding.field.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`); + const defaultId = `${templateId}-${referenceImage ? 'reference-image' : fieldName}${referenceImage ? `-${assetIndex + 1}` : ''}`; + const defaultFileName = `${templateId}.${referenceImage ? `reference_image_${assetIndex + 1}` : fileField}.${extension}`; + const metadata = { + ...(asset.id !== defaultId ? { id: asset.id } : {}), + ...(asset.fileName !== defaultFileName ? { fileName: asset.fileName } : {}), + }; + const customMetadata = Object.keys(metadata).length > 0; + if (packedPreview || asset.label !== defaultAssetLabel || customMetadata) + packedAsset.push(packedPreview ?? null); + if (asset.label !== defaultAssetLabel || customMetadata) + packedAsset.push(asset.label !== defaultAssetLabel ? asset.label : null); + if (customMetadata) packedAsset.push(metadata); return packedAsset; }), ]; - if (binding.label !== defaultBindingLabel) packedBinding.push(binding.label); + const defaultBindingId = `${templateId}-${binding.field.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`)}-defaults`; + const customId = binding.id !== defaultBindingId; + if (binding.label !== defaultBindingLabel || customId) + packedBinding.push(binding.label !== defaultBindingLabel ? binding.label : null); + if (customId) packedBinding.push(binding.id); return packedBinding; }), ); @@ -853,8 +1015,8 @@ import type { } from '../types'; /** Generated by scripts/template-default-inputs.mjs. Do not edit by hand. */ -type PackedAsset = readonly [runtimePath: string, previewPath?: string | true | null, label?: string]; -type PackedBinding = readonly [fieldIndex: number, assets: readonly PackedAsset[], label?: string]; +type PackedAsset = readonly [runtimePath: string, previewPath?: string | true | null, label?: string | null, metadata?: { readonly id?: string; readonly fileName?: string }]; +type PackedBinding = readonly [fieldIndex: number, assets: readonly PackedAsset[], label?: string | null, id?: string]; const PACKED_INPUT_FIELDS = ${JSON.stringify(packedFields)} as const satisfies readonly StudioTemplateInputFormField[]; @@ -886,7 +1048,7 @@ function unpackAsset( packed: PackedAsset, index: number, ): StudioTemplateDefaultInputAsset { - const [runtimeFile, preview, label] = packed; + const [runtimeFile, preview, label, metadata] = packed; const separator = runtimeFile.lastIndexOf('.'); const digest = Array.from(atob(runtimeFile.slice(0, separator)), (byte) => byte.charCodeAt(0).toString(16).padStart(2, '0'), @@ -904,23 +1066,23 @@ function unpackAsset( const fileField = referenceImage ? 'reference_image' : camelToDelimited(field, '_'); const suffix = referenceImage ? String(index + 1) : ''; return { - id: templateId + '-' + assetField + (suffix ? '-' + suffix : ''), + id: metadata?.id ?? templateId + '-' + assetField + (suffix ? '-' + suffix : ''), label: label ?? (referenceImage ? 'Reviewed reference image ' + (index + 1) : reviewedLabel(field)), mediaType, ...(previewPath ? { previewPath } : {}), runtimePath, runtimeSha256: \`sha256:bytes:\${digest}\`, - fileName: templateId + '.' + fileField + (suffix ? '_' + suffix : '') + '.' + extension, + fileName: metadata?.fileName ?? templateId + '.' + fileField + (suffix ? '_' + suffix : '') + '.' + extension, }; } export function templateDefaultInputBindings(templateId: StudioTemplateId, index: number) { const bindings = PACKED_TEMPLATE_DEFAULT_INPUTS[index]; - return (bindings ?? []).map(([fieldIndex, assets, label]) => { + return (bindings ?? []).map(([fieldIndex, assets, label, id]) => { const field = PACKED_INPUT_FIELDS[fieldIndex]!; const mediaType = mediaTypeForField(field); return { - id: templateId + '-' + camelToDelimited(field, '-') + '-defaults', + id: id ?? templateId + '-' + camelToDelimited(field, '-') + '-defaults', label: label ?? (field === 'referenceImages' @@ -950,17 +1112,37 @@ export async function writeTemplateDefaultInputPlan(plan, destinationRoot = plan const jsonPath = resolve(destinationRoot, RUNTIME_JSON_PATH); const typescriptPath = resolve(destinationRoot, GENERATED_TYPESCRIPT_PATH); - await rm(runtimeRoot, { recursive: true, force: true }); - await mkdir(runtimeAssetRoot, { recursive: true }); - for (const asset of plan.runtimeAssets) { - const destination = resolve(runtimeRoot, asset.relativePath); - if (!isWithin(runtimeAssetRoot, destination)) { - throw new Error(`Refusing to write runtime input outside the asset root: ${asset.relativePath}`); + const galleryRoot = resolve(destinationRoot, GALLERY_ROOT); + if (!isWithin(galleryRoot, runtimeRoot) || runtimeRoot === galleryRoot) { + throw new Error('Runtime input replacement must remain inside the destination Gallery.'); + } + await mkdir(galleryRoot, { recursive: true }); + const staging = await mkdtemp(join(galleryRoot, '.runtime-inputs-staging-')); + // The verified installed cache can be the only remaining copy of an input. + // Preserve every source before replacing its destination tree. + try { + for (const asset of plan.runtimeAssets) { + const destination = resolve(staging, asset.relativePath); + if (!isWithin(resolve(staging, 'assets'), destination)) { + throw new Error(`Refusing to write runtime input outside the asset root: ${asset.relativePath}`); + } + if (!(await fileMatches(asset.sourcePath, asset))) + throw new Error(`Runtime input source changed: ${asset.relativePath}`); + await mkdir(resolve(destination, '..'), { recursive: true }); + await copyFile(asset.sourcePath, destination); + if (!(await fileMatches(destination, asset))) + throw new Error(`Runtime input staged copy changed: ${asset.relativePath}`); } - await mkdir(resolve(destination, '..'), { recursive: true }); - await copyFile(asset.sourcePath, destination); + await writeFile(join(staging, 'default-input-bindings.json'), renderRuntimeInputJson(plan)); + await rm(runtimeRoot, { recursive: true, force: true }); + await rename(staging, runtimeRoot); + } catch (error) { + // Keep staged originals for recovery if filesystem replacement failed. + error.message += ` Staged input copies are retained at ${staging}.`; + throw error; } - await writeFile(jsonPath, renderRuntimeInputJson(plan)); + if (!isWithin(runtimeAssetRoot, resolve(runtimeRoot, 'assets'))) throw new Error('Invalid runtime asset root.'); + if (jsonPath !== resolve(runtimeRoot, 'default-input-bindings.json')) throw new Error('Invalid runtime JSON target.'); await mkdir(resolve(typescriptPath, '..'), { recursive: true }); await writeFile(typescriptPath, await renderRuntimeInputTypescript(plan)); await syncManifestInputContracts(plan, destinationRoot); @@ -979,15 +1161,17 @@ export async function syncManifestInputContracts(plan, destinationRoot = plan.pr const manifestPath = resolve(destinationRoot, MANIFEST_PATH); const manifest = await readManifestIfPresent(destinationRoot); if (!manifest) return; + const before = stableJson(manifest); manifest.examples = (manifest.examples ?? []).map((entry) => { - const hash = templateInputContractHash(plan.mapping[entry.templateId]); + const hash = + plan.inputContractHashes?.[entry.templateId] ?? templateInputContractHash(plan.mapping[entry.templateId]); if (hash) return { ...entry, templateInputContractHash: hash }; const rest = { ...entry }; delete rest.templateInputContractHash; return rest; }); - await writeFile(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`); + if (stableJson(manifest) !== before) await writeFile(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`); } async function relativeFileInventory(root) { @@ -1043,7 +1227,8 @@ export async function verifyTemplateDefaultInputPlan(plan, destinationRoot = pla const manifest = await readManifestIfPresent(destinationRoot); if (manifest) { for (const entry of manifest.examples ?? []) { - const expectedHash = templateInputContractHash(plan.mapping[entry.templateId]); + const expectedHash = + plan.inputContractHashes?.[entry.templateId] ?? templateInputContractHash(plan.mapping[entry.templateId]); if (entry.templateInputContractHash !== expectedHash) { issues.push(`${entry.templateId} has a stale templateInputContractHash.`); } @@ -1081,6 +1266,7 @@ function bundleSummary(plan, verb) { `for ${Object.keys(plan.mapping).length} approved templates`, `as ${plan.runtimeAssets.length} unique runtime files (${(byteSize / 1024 / 1024).toFixed(2)} MiB)`, `and excluded ${plan.excludedGenerated.length} generated downstream input(s).`, + `Verified ${plan.sourceOwnedRequirements.length} separately authored input(s) without changing their bindings.`, ].join(' '); } diff --git a/scripts/template-default-inputs.test.mjs b/scripts/template-default-inputs.test.mjs index 4972bc8d..828e5504 100644 --- a/scripts/template-default-inputs.test.mjs +++ b/scripts/template-default-inputs.test.mjs @@ -53,7 +53,7 @@ test('approved provenance root inputs have complete typed Studio binding coverag assert.ok(approvedTemplateIds.has(templateId), `${templateId} is still approved by the public manifest`); } for (const requirement of plan.requirements) { - const expectedAssetId = `${requirement.templateId}-${requirement.role.replaceAll('_', '-')}`; + const expectedAssetId = requirement.assetId ?? `${requirement.templateId}-${requirement.role.replaceAll('_', '-')}`; const bindingAsset = mappedAssets.find( ({ templateId, asset }) => templateId === requirement.templateId && asset.id === expectedAssetId, ); @@ -78,7 +78,7 @@ test('approved provenance root inputs have complete typed Studio binding coverag ); assert.deepEqual( plan.excludedGenerated.map(({ templateId, role }) => [templateId, role]), - [['qwen_upscale_finish', 'generated_before_upscale']], + [['qwen_upscale_finish', 'upscaleSourceComparison']], 'generated intermediate outputs never become bundled root inputs', ); assert.equal(plan.mapping.qwen_upscale_finish, undefined); @@ -139,3 +139,24 @@ test('two clean generations produce byte-identical runtime and typed bundles', a await rm(secondRoot, { recursive: true, force: true }); } }); + +test('regeneration preserves sources owned by the installed runtime cache', async () => { + const plan = await buildTemplateDefaultInputPlan(); + const destinationRoot = await mkdtemp(join(tmpdir(), 'modiff-template-inputs-self-')); + try { + await writeTemplateDefaultInputPlan(plan, destinationRoot); + const before = await runtimeTreeDigest(destinationRoot); + const cachedPlan = { + ...plan, + runtimeAssets: plan.runtimeAssets.map((asset) => ({ + ...asset, + sourcePath: join(destinationRoot, 'public/template-gallery/runtime-inputs', asset.relativePath), + })), + }; + await writeTemplateDefaultInputPlan(cachedPlan, destinationRoot); + await verifyTemplateDefaultInputPlan(cachedPlan, destinationRoot); + assert.equal(await runtimeTreeDigest(destinationRoot), before); + } finally { + await rm(destinationRoot, { recursive: true, force: true }); + } +}); diff --git a/scripts/template-gallery-assets.py b/scripts/template-gallery-assets.py index cd330a47..7d32a445 100644 --- a/scripts/template-gallery-assets.py +++ b/scripts/template-gallery-assets.py @@ -13,7 +13,6 @@ import errno import hashlib import json -import mimetypes import os import re import shutil @@ -108,6 +107,27 @@ def durable_tooling_source_candidates() -> set[Path]: REPO_ID_PATTERN = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]*$") IGNORED_NAMES = {".DS_Store", "Thumbs.db"} BUFFER_SIZE = 1024 * 1024 +# This is serialized release metadata, not an operating-system registry lookup. +# Keep the existing WAV spelling so unchanged approved byte records stay stable. +ASSET_CONTENT_TYPES = { + ".json": "application/json", + ".png": "image/png", + ".webp": "image/webp", + ".jpg": "image/jpeg", + ".jpeg": "image/jpeg", + ".gif": "image/gif", + ".avif": "image/avif", + ".mp4": "video/mp4", + ".webm": "video/webm", + ".mov": "video/quicktime", + ".wav": "audio/x-wav", + ".mp3": "audio/mpeg", + ".flac": "audio/flac", + ".ogg": "audio/ogg", + ".oga": "audio/ogg", + ".opus": "audio/ogg", + ".m4a": "audio/mp4", +} WINDOWS_RESERVED_BASENAMES = { "aux", "clock$", @@ -458,8 +478,9 @@ def local_asset_paths() -> set[str]: def asset_record(relative_path: str, purposes: set[str]) -> dict[str, Any]: path = GALLERY_ROOT / relative_path - content_type, _ = mimetypes.guess_type(relative_path) - normalized_content_type = content_type or "application/octet-stream" + normalized_content_type = ASSET_CONTENT_TYPES.get( + path.suffix.lower(), "application/octet-stream" + ) record = { "path": f"template-gallery/{relative_path}", "size": path.stat().st_size, @@ -1011,8 +1032,10 @@ def provisional_dataset_card(held_paths: list[str]) -> str: DATASET_CARD_PATH.read_text(encoding="utf-8").rstrip() + "\n\n## Provisional publication\n\n" + "This revision contains only the rights-approved subset and is intentionally " - + "incomplete. It must not be activated as MoDiff's runtime Dataset. The complete " - + "local asset set remains authoritative until the pending permissions are resolved.\n\n" + + "incomplete. Do not use the complete-set `activate` command for this revision. " + + "Runtime use requires a separately reviewed source-descriptor update and full " + + "anonymous verification of the exact approved subset. The complete authoring " + + "manifest and all held-file decisions remain authoritative.\n\n" + "Files withheld from this revision:\n\n" + held_list + "\n" @@ -1034,8 +1057,17 @@ def stage_provisional_upload( if record["path"] not in approved_paths: continue repository_path = manifest_record_relative_path(record) + source = GALLERY_ROOT / repository_path + # Withheld files may already have been pruned. Approved files must + # still be regular, exact local bytes, with no redirected ancestor. + assert_safe_destination_tree(GALLERY_ROOT, source) + metadata, digest = inspect_regular_file(source, context="Approved Gallery asset") + if metadata.st_size != record["size"] or digest != record["sha256"]: + raise AssetPipelineError( + f"Approved Gallery asset does not match its manifest: {record['path']}" + ) copy_asset_bytes( - GALLERY_ROOT / repository_path, + source, destination / "template-gallery" / repository_path, ) write_json( @@ -1194,6 +1226,11 @@ def assert_remote_manifest_matches(repo_id: str, revision: str) -> dict[str, Any local_rights_by_path = { record["path"]: record for record in local_rights["records"] } + if any(local_rights_by_path[path].get("publishDecision") != "approved" + for path in expected_paths): + raise AssetPipelineError( + "The approved-subset Dataset includes a held rights record." + ) expected_remote_rights = { "schemaVersion": 1, "assetSetId": remote["assetSetId"], @@ -1608,7 +1645,10 @@ def command_upload_provisional(args: argparse.Namespace) -> int: "Provisional upload requires --confirm-redistribution-rights for the approved subset." ) validate_repo_id(args.repo_id) - manifest = verify_checked_manifest(require_ready=True) + # Validate the entire declared inventory and rights ledger without requiring + # local bodies for explicitly held files or re-guessing platform MIME types. + # The exact approved payload is materialized and verified before Hub access. + manifest = validate_checked_manifest_contract() # All local licensing and rights checks happen before authentication or # any other external Hub mutation. validate_dataset_licensing() @@ -1616,11 +1656,6 @@ def command_upload_provisional(args: argparse.Namespace) -> int: provisional_manifest, provisional_ledger, held_paths = ( build_provisional_publication(manifest, ledger) ) - HfApi, _, _ = require_hub() - api = HfApi() - ensure_public_repo( - api, args.repo_id, create=args.create, make_public=args.make_public - ) with tempfile.TemporaryDirectory( prefix="modiff-template-assets-provisional-" ) as temporary: @@ -1638,6 +1673,11 @@ def command_upload_provisional(args: argparse.Namespace) -> int: raise AssetPipelineError( "The provisional publication changed during staging." ) + HfApi, _, _ = require_hub() + api = HfApi() + ensure_public_repo( + api, args.repo_id, create=args.create, make_public=args.make_public + ) result = api.upload_folder( repo_id=args.repo_id, repo_type="dataset", @@ -1661,7 +1701,10 @@ def command_upload_provisional(args: argparse.Namespace) -> int: print(f"Withheld assets: {len(held_paths)}") for path in held_paths: print(f" WITHHELD {path}") - print("MoDiff remains in local asset mode; this provisional revision cannot be activated.") + print( + "The application source is unchanged. Runtime use of this approved subset " + "requires a separately reviewed source-descriptor update and full anonymous verification." + ) return 0 @@ -1679,7 +1722,8 @@ def command_verify_remote(args: argparse.Namespace) -> int: "No activated Dataset source exists; pass --repo-id and --revision." ) if args.full: - manifest = validate_checked_manifest_contract() + # The reviewed source may select the exact rights-approved subset. + manifest = assert_remote_manifest_matches(repo_id, revision) verify_public_remote_snapshot(repo_id, revision, manifest) else: manifest = assert_remote_manifest_matches(repo_id, revision) diff --git a/scripts/template-gallery-assets.test.py b/scripts/template-gallery-assets.test.py index 17ec4cb1..ea2eb455 100644 --- a/scripts/template-gallery-assets.test.py +++ b/scripts/template-gallery-assets.test.py @@ -46,6 +46,77 @@ def asset_record(path: str, payload: bytes) -> dict[str, object]: class TemplateGalleryAssetTests(unittest.TestCase): + def test_asset_metadata_does_not_depend_on_the_host_mime_registry(self) -> None: + with tempfile.TemporaryDirectory() as temporary: + gallery = Path(temporary) + (gallery / "sound.wav").write_bytes(b"fixture audio bytes") + (gallery / "data.json").write_bytes(b"{}") + (gallery / "download.unknown").write_bytes(b"opaque bytes") + with patch.object(assets, "GALLERY_ROOT", gallery): + for guessed in (None, "audio/wav", "application/x-host-specific"): + with patch("mimetypes.guess_type", return_value=(guessed, None)): + for name, expected in [ + ("sound.wav", "audio/x-wav"), + ("data.json", "application/json"), + ("download.unknown", "application/octet-stream"), + ]: + with self.subTest(registry=guessed, asset=name): + record = assets.asset_record(name, {"runtime"}) + self.assertEqual(record["contentType"], expected) + + def test_webp_geometry_is_detected_when_the_os_has_no_webp_registration( + self, + ) -> None: + with tempfile.TemporaryDirectory() as temporary: + gallery = Path(temporary) + # Bounded header fixture for the existing VP8X metadata reader. + chunk = ( + b"\x00" * 4 + (511).to_bytes(3, "little") + (255).to_bytes(3, "little") + ) + body = b"WEBPVP8X" + len(chunk).to_bytes(4, "little") + chunk + raw = b"RIFF" + len(body).to_bytes(4, "little") + body + (gallery / "poster.webp").write_bytes(raw) + with ( + patch.object(assets, "GALLERY_ROOT", gallery), + patch("mimetypes.guess_type", return_value=(None, None)), + ): + record = assets.asset_record("poster.webp", {"tooling"}) + self.assertEqual(record["contentType"], "image/webp") + self.assertEqual((record["width"], record["height"]), (512, 256)) + self.assertEqual( + record["sha256"], "sha256:bytes:" + assets.sha256_bytes(raw) + ) + + def test_invalid_known_image_cannot_hide_behind_a_missing_os_mime_type( + self, + ) -> None: + with tempfile.TemporaryDirectory() as temporary: + gallery = Path(temporary) + with ( + patch.object(assets, "GALLERY_ROOT", gallery), + patch("mimetypes.guess_type", return_value=(None, None)), + ): + for name in ("broken.webp", "broken.png"): + (gallery / name).write_bytes(b"not an image header") + with ( + self.subTest(asset=name), + self.assertRaises(assets.AssetPipelineError), + ): + assets.asset_record(name, {"runtime"}) + + def test_known_mime_selection_is_case_insensitive_and_preserves_payload_bytes( + self, + ) -> None: + with tempfile.TemporaryDirectory() as temporary: + gallery = Path(temporary) + raw = b"opaque deterministic fixture" + (gallery / "SOUND.WAV").write_bytes(raw) + with patch.object(assets, "GALLERY_ROOT", gallery): + record = assets.asset_record("SOUND.WAV", {"runtime"}) + self.assertEqual(record["contentType"], "audio/x-wav") + self.assertEqual(record["size"], len(raw)) + self.assertEqual((gallery / "SOUND.WAV").read_bytes(), raw) + def create_symlink_or_skip( self, link: Path, target: Path, *, target_is_directory: bool = False ) -> None: @@ -294,7 +365,7 @@ def test_every_durable_source_config_and_script_reference_is_classified( self.assertEqual(assets.unaudited_durable_reference_sources(), []) required = assets.required_assets_by_purpose() self.assertEqual(required["inputs/qwen-carton-layout-control.png"], {"tooling"}) - self.assertEqual(required["manifest.json"], {"runtime"}) + self.assertEqual(required["manifest.json"], {"runtime", "tooling"}) self.assertEqual( required["runtime-inputs/default-input-bindings.json"], {"tooling"} ) @@ -560,10 +631,10 @@ def test_provisional_staging_contains_only_approved_exact_bytes(self) -> None: provisional_ledger["assetSetId"], provisional_manifest["assetSetId"], ) - self.assertIn( - "must not be activated", - (staging / "README.md").read_text(encoding="utf-8"), - ) + card = (staging / "README.md").read_text(encoding="utf-8") + self.assertIn("Do not use the complete-set `activate` command", card) + self.assertIn("separately reviewed source-descriptor update", card) + self.assertIn("full anonymous verification", card) def test_provisional_upload_cli_has_no_activate_option(self) -> None: parsed = assets.parser().parse_args( @@ -578,6 +649,103 @@ def test_provisional_upload_cli_has_no_activate_option(self) -> None: self.assertIs(parsed.handler, assets.command_upload_provisional) self.assertFalse(hasattr(parsed, "activate")) + def test_provisional_command_stages_approved_bytes_before_hub_access(self) -> None: + for fault in (None, "missing", "changed", "link", "parent-link", "rights", "unsafe-held"): + with self.subTest(fault=fault), tempfile.TemporaryDirectory() as temporary: + root = Path(temporary) + gallery = root / "gallery" + gallery.mkdir() + payload = b"approved original bytes" + relative = "nested/approved.bin" + source = gallery / relative + source.parent.mkdir() + source.write_bytes(payload) + manifest = ready_manifest([ + asset_record("template-gallery/held.bin", b"withheld and absent"), + asset_record("template-gallery/" + relative, payload), + ]) + ledger = assets.build_rights_template(manifest) + ledger["records"][1].update({ + "publishDecision": "approved", + "creatorOrRightsholder": "Unit fixture author", + "creationMethod": "Original deterministic unit fixture", + "sourceLicense": "not-applicable", + "modelTerms": ["not-applicable"], + "aiGenerated": False, + "humanLikenessConsent": "not-applicable", + "marks": [], "requiredAttribution": [], + "assetLicense": "CC0-1.0", + "reviewedBy": "Unit fixture reviewer", "reviewedAt": "2026-10-31", + }) + if fault == "missing": + source.unlink() + elif fault == "changed": + source.write_bytes(b"unapproved replacement") + elif fault == "link": + target = root / "external.bin" + target.write_bytes(payload) + source.unlink() + self.create_symlink_or_skip(source, target) + elif fault == "parent-link": + target = root / "external" + target.mkdir() + (target / "approved.bin").write_bytes(payload) + source.unlink() + source.parent.rmdir() + self.create_symlink_or_skip(source.parent, target, target_is_directory=True) + elif fault == "rights": + ledger["records"][0]["sha256"] = "sha256:bytes:" + "a" * 64 + elif fault == "unsafe-held": + manifest["assets"][0]["path"] = "template-gallery/../held.bin" + checked_manifest, checked_rights = root / "manifest.json", root / "rights.json" + assets.write_json(checked_manifest, manifest) + assets.write_json(checked_rights, ledger) + card = root / "README.md" + card.write_text("---\nlicense: apache-2.0\n---\nFixture\n", encoding="utf-8") + calls = [] + + class FakeApi: + def upload_folder(self, **kwargs: object) -> SimpleNamespace: + staging = Path(kwargs["folder_path"]) + self_path = staging / "template-gallery" / relative + assert self_path.read_bytes() == payload + assert not (staging / "template-gallery/held.bin").exists() + calls.append(kwargs) + return SimpleNamespace(oid="0123456789abcdef0123456789abcdef01234567") + + def hub_after_staging(): + # The source must have been checked before authentication, + # even when the materialized approved set is rejected. + return FakeApi, None, None + + with ( + patch.object(assets, "GALLERY_ROOT", gallery), + patch.object(assets, "ASSET_MANIFEST_PATH", checked_manifest), + patch.object(assets, "ASSET_RIGHTS_PATH", checked_rights), + patch.object(assets, "DATASET_CARD_PATH", card), + patch.object(assets, "DATASET_LICENSE_PATH", root / "absent-license"), + patch.object(assets, "required_asset_paths", return_value={"held.bin", relative}), + patch.object(assets, "required_assets_by_purpose", + return_value={"held.bin": {"runtime"}, relative: {"runtime"}}), + patch.object(assets, "require_hub", side_effect=hub_after_staging) as hub, + patch.object(assets, "ensure_public_repo"), + patch.object(assets, "verify_public_provisional_snapshot"), + redirect_stdout(io.StringIO()), + ): + args = SimpleNamespace(public=True, confirm_redistribution_rights=True, + repo_id="unit-fixture/gallery", create=False, make_public=False) + if fault is None: + self.assertEqual(assets.command_upload_provisional(args), 0) + self.assertEqual(len(calls), 1) + with self.assertRaises(assets.AssetPipelineError): + assets.verify_checked_manifest(require_ready=True) + else: + with self.assertRaises(assets.AssetPipelineError): + assets.command_upload_provisional(args) + hub.assert_not_called() + self.assertEqual(json.loads(checked_manifest.read_text(encoding="utf-8")), manifest) + self.assertEqual(json.loads(checked_rights.read_text(encoding="utf-8")), ledger) + def test_upload_replaces_only_managed_dataset_prefixes(self) -> None: calls: list[dict[str, object]] = [] remote_verification = Mock() @@ -751,6 +919,115 @@ def test_public_snapshot_verification_is_full_and_unauthenticated(self) -> None: Path("/verified/snapshot"), manifest, reject_unexpected=True ) + def test_full_remote_verification_preserves_complete_and_exact_approved_subset_contracts(self) -> None: + repo = "modiff-project/template-gallery" + revision = "0123456789abcdef0123456789abcdef01234567" + cases = ("complete", "subset", "source-revision", "complete-identity", "missing-path", + "published-hold", "rights-mismatch", "asset-bytes", "unexpected-file") + for case in cases: + with self.subTest(case=case), tempfile.TemporaryDirectory() as temporary: + root = Path(temporary) + source_path, rights_path = root / "source.json", root / "rights.json" + manifest_path, snapshot = root / "manifest.json", root / "snapshot" + payloads = {"template-gallery/approved.bin": b"original public demo", + "template-gallery/held.bin": b"permission still pending"} + complete = ready_manifest([asset_record(path, body) for path, body in payloads.items()]) + with patch.object(assets, "ASSET_RIGHTS_PATH", rights_path): + ledger = assets.build_rights_template(complete) + for index, record in enumerate(ledger["records"]): + if index == 0 or case == "complete": + record.update({ + "publishDecision": "approved", "holdReason": None, + "creatorOrRightsholder": "Unit fixture author", + "creationMethod": "Original geometric unit fixture", + "sourceLicense": "not-applicable", "modelTerms": [], "aiGenerated": False, + "humanLikenessConsent": "not-applicable", "marks": [], "requiredAttribution": [], + "assetLicense": "Unit fixture terms", "reviewedBy": "Unit fixture reviewer", + "reviewedAt": "2026-10-25", + }) + if case == "complete": + remote, remote_rights, unavailable = complete, ledger, [] + else: + remote, remote_rights, unavailable = assets.build_provisional_publication(complete, ledger) + source = {"mode": "huggingface", "repoId": repo, "revision": revision, + "assetSetId": remote["assetSetId"]} + if case != "complete": + source.update(completeAssetSetId=complete["assetSetId"], unavailableAssets=unavailable) + if case == "source-revision": + source["revision"] = "f" * 40 + elif case == "complete-identity": + source["completeAssetSetId"] = "sha256:canonical-json:" + "0" * 64 + elif case == "missing-path": + source["unavailableAssets"] = [] + elif case == "published-hold": + # Independent local/remote copies prove matching held rights + # reach the approval guard, rather than the ledger-mismatch guard. + remote_rights = json.loads(json.dumps(remote_rights)) + for record in (ledger["records"][0], remote_rights["records"][0]): + record.update(publishDecision="hold", holdReason="Unit hold remains.") + self.assertIsNot(ledger["records"][0], remote_rights["records"][0]) + self.assertEqual(ledger["records"][0], remote_rights["records"][0]) + elif case == "rights-mismatch": + remote_rights = json.loads(json.dumps(remote_rights)) + remote_rights["records"][0]["sha256"] = "sha256:bytes:" + "0" * 64 + for record in remote["assets"]: + target = snapshot / record["path"] + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes(payloads[record["path"]]) + metadata = snapshot / "_modiff" + metadata.mkdir() + assets.write_json(metadata / "template-assets.v1.json", remote) + assets.write_json(metadata / "template-asset-rights.v1.json", remote_rights) + if case == "asset-bytes": + (snapshot / "template-gallery/approved.bin").write_bytes(b"changed") + elif case == "unexpected-file": + (metadata / "unreviewed.json").write_text("{}", encoding="utf-8") + assets.write_json(source_path, source) + assets.write_json(rights_path, ledger) + assets.write_json(manifest_path, complete) + source_before, rights_before = source_path.read_bytes(), rights_path.read_bytes() + api = Mock() + api.repo_info.return_value = SimpleNamespace(private=False) + api_factory = Mock(return_value=api) + snapshot_download = Mock(return_value=str(snapshot)) + output = io.StringIO() + with ( + patch.object(assets, "SOURCE_CONFIG_PATH", source_path), + patch.object(assets, "ASSET_RIGHTS_PATH", rights_path), + patch.object(assets, "ASSET_MANIFEST_PATH", manifest_path), + patch.object(assets, "required_asset_paths", return_value={"approved.bin", "held.bin"}), + patch.object(assets, "remote_manifest", return_value=remote), + patch.object(assets, "remote_rights_ledger", return_value=remote_rights), + patch.object(assets, "require_hub", return_value=(api_factory, None, snapshot_download)), + redirect_stdout(output), + ): + args = SimpleNamespace(repo_id=repo, revision=revision, full=True) + if case in {"complete", "subset"}: + self.assertEqual(assets.command_verify_remote(args), 0) + self.assertIn(f"for {remote['assetCount']} assets", output.getvalue()) + elif case == "published-hold": + with self.assertRaisesRegex(assets.AssetPipelineError, "includes a held rights record"): + assets.assert_remote_manifest_matches(repo, revision) + api_factory.assert_not_called() + snapshot_download.assert_not_called() + with self.assertRaisesRegex(assets.AssetPipelineError, "includes a held rights record"): + assets.command_verify_remote(args) + else: + with self.assertRaises(assets.AssetPipelineError): + assets.command_verify_remote(args) + self.assertEqual(source_path.read_bytes(), source_before) + self.assertEqual(rights_path.read_bytes(), rights_before) + if case in {"complete", "subset", "asset-bytes", "unexpected-file"}: + api_factory.assert_called_once_with(token=False) + api.repo_info.assert_called_once_with(repo_id=repo, repo_type="dataset", + revision=revision, token=False) + snapshot_download.assert_called_once_with( + repo_id=repo, repo_type="dataset", revision=revision, token=False, + allow_patterns=["template-gallery/**", "_modiff/**"]) + else: + api_factory.assert_not_called() + snapshot_download.assert_not_called() + def test_activation_writes_source_only_after_full_public_byte_verification( self, ) -> None: diff --git a/scripts/template-gallery-coverage.mjs b/scripts/template-gallery-coverage.mjs index 4d97b974..e7ba4eed 100644 --- a/scripts/template-gallery-coverage.mjs +++ b/scripts/template-gallery-coverage.mjs @@ -5,6 +5,7 @@ import { fileURLToPath } from 'node:url'; import { decodedMediaHash, + decodedMediaHashMatches, galleryExpectedOutput, loadTemplateRuntime, technicalMediaErrors, @@ -50,13 +51,22 @@ for (const template of runtime.templates) { const currentEvidence = evidence ? runtime.findManifestEntry(template, { ...manifest, examples: [evidence] }) : undefined; + const nativePreview = runtime.isRetainedVideoPreview(template, currentEvidence); let technicalErrors = []; if (template.example?.mediaType === 'video' && currentEvidence?.outputPath) { const outputPath = publicMediaPath(currentEvidence.outputPath); if (outputPath) { try { const decoded = await decodedMediaHash(outputPath, 'video'); - technicalErrors = technicalMediaErrors(decoded, galleryExpectedOutput(template), 'video'); + technicalErrors = technicalMediaErrors( + decoded, + galleryExpectedOutput(template), + 'video', + nativePreview ? template.example.retainedVideoPreview : undefined, + ); + if (nativePreview && !decodedMediaHashMatches(decoded, currentEvidence.mediaHash)) { + technicalErrors.push('The retained preview differs from the approved decoded video.'); + } } catch (error) { technicalErrors = [String(error)]; } @@ -65,9 +75,11 @@ for (const template of runtime.templates) { const motionPreview = template.example?.mediaType !== 'video' || Boolean( - currentEvidence?.cardPreviewPath && - publicMediaExists(currentEvidence.cardPreviewPath) && - currentEvidence.cardPreviewSha256 === publicMediaSha256(currentEvidence.cardPreviewPath), + nativePreview + ? publicMediaExists(currentEvidence.outputPath) + : currentEvidence?.cardPreviewPath && + publicMediaExists(currentEvidence.cardPreviewPath) && + currentEvidence.cardPreviewSha256 === publicMediaSha256(currentEvidence.cardPreviewPath), ); const evidenceChecks = { manifest: Boolean(currentEvidence), diff --git a/scripts/template-gallery-harness.mjs b/scripts/template-gallery-harness.mjs index eef4be3e..b27859a8 100644 --- a/scripts/template-gallery-harness.mjs +++ b/scripts/template-gallery-harness.mjs @@ -1,11 +1,30 @@ import { createHash } from 'node:crypto'; import { spawnSync } from 'node:child_process'; -import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync, copyFileSync } from 'node:fs'; -import { dirname, extname, join, resolve } from 'node:path'; +import { + existsSync, + lstatSync, + mkdirSync, + readdirSync, + readFileSync, + realpathSync, + writeFileSync, + copyFileSync, +} from 'node:fs'; +import { dirname, extname, isAbsolute, join, relative, resolve } from 'node:path'; import { fileURLToPath, pathToFileURL } from 'node:url'; import { createServer } from 'vite'; import { compareRunProvenance, runtimeLockFromProvenance } from './live-proof-provenance.mjs'; import templateGalleryContract from '../src/studio/templateGalleryContract.json' with { type: 'json' }; +import { canonicalJsonHash as storageJsonHash } from './canonical-json.mjs'; +import { + RETAINED_GALLERY_PROVENANCE_FORMAT, + decodedAudiovisualMediaHash, + retainedGalleryFileLimit, + validateRetainedGalleryProvenance, +} from './retained-gallery-provenance.mjs'; +import { validateTemplateAssetRelease, validateTemplateAssetSource } from './template-asset-source-contract.ts'; +import { sourceVideoTimingMatches } from '../src/studio/sourceVideoTiming.ts'; +import { retainedVideoPreviewMatches } from '../src/studio/retainedVideoPreview.ts'; const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..'); const PUBLIC_GALLERY_DIR = join(ROOT, 'public', 'template-gallery'); @@ -243,6 +262,11 @@ function parseArgs(argv) { args.publish = true; continue; } + if (entry === '--reviewed-history') { + if (args.mode !== 'verify') throw new Error('--reviewed-history only applies to Gallery verification.'); + args.reviewedHistory = true; + continue; + } if (entry.startsWith('--')) { const [key, inlineValue] = entry.slice(2).split('='); const value = inlineValue ?? argv[index + 1]; @@ -284,21 +308,60 @@ export function canonicalJsonHash(value) { return `sha256:canonical-json:${sha256(Buffer.from(stableStringify(value)))}`; } -export function decodedAudiovisualMediaHash(decodedMediaHash, decodedAudioHash) { - if (!decodedMediaHash || !decodedAudioHash) return null; - return `sha256:decoded-av-v1:${sha256( - Buffer.from( - stableStringify({ - decodedAudioHash, - decodedMediaHash, - }), - ), - )}`; +export { decodedAudiovisualMediaHash }; + +// Published v1 frame hashes include the muxer's software comment. These two +// reviewed producers emit identical frame records but different banner bytes. +// Retain the actual digest and reconstruct only this nonsemantic header for +// compatibility; all stream metadata, timestamps and frame checksums stay exact. +const REVIEWED_FRAMEMD5_MUXERS = ['Lavf61.1.100', 'Lavf61.7.100']; + +export function decodedVideoFrameHashCompatibility(bytes) { + const rawHash = `sha256:decoded-video-framemd5:${sha256(bytes)}`; + const text = bytes.toString('utf8'); + const software = [...text.matchAll(/^#software: (Lavf\d+\.\d+\.\d+)(?=\r?$)/gm)]; + const rows = text.split(/\r?\n/).filter((line) => line.trim() && !line.startsWith('#')); + const valid = + /^#format: frame checksums\r?$/m.test(text) && + /^#version: 2\r?$/m.test(text) && + /^#hash: MD5\r?$/m.test(text) && + software.length === 1 && + rows.length > 0 && + rows.every((line) => { + const fields = line.split(','); + return fields.length === 6 && /^[a-f0-9]{32}$/i.test(fields[5].trim()); + }); + return { + scheme: 'framemd5-software-header-v1', + rawHash, + observedMuxer: software.length === 1 ? software[0][1] : null, + variants: valid + ? [...new Set([software[0][1], ...REVIEWED_FRAMEMD5_MUXERS])].map((muxer) => ({ + muxer, + hash: `sha256:decoded-video-framemd5:${sha256( + Buffer.from(text.replace(software[0][0], `#software: ${muxer}`)), + )}`, + })) + : [], + }; +} + +export function decodedMediaHashMatches(decoded, expected) { + if (typeof expected !== 'string' || !decoded) return false; + if (decoded.hash === expected) return true; + const compatibility = decoded.frameHashCompatibility; + return ( + /^sha256:decoded-video-framemd5:[a-f0-9]{64}$/.test(decoded.hash ?? '') && + compatibility?.scheme === 'framemd5-software-header-v1' && + compatibility.rawHash === decoded.hash && + Array.isArray(compatibility.variants) && + compatibility.variants.some((variant) => variant.hash === expected) + ); } function redactLocalPath(value) { const isWindowsPath = /^[a-z]:[\\/]/i.test(value); - const isUserScopedPosixPath = /^\/(?:Users|home|tmp|private\/tmp|var\/tmp)\//.test(value); + const isUserScopedPosixPath = /^\/(?:Users|home|tmp|private\/tmp|var\/tmp|run\/media|media|mnt)\//.test(value); if (!isWindowsPath && !isUserScopedPosixPath) return value; const fileName = value.split(/[\\/]/).filter(Boolean).at(-1) ?? 'path'; return `/${fileName}`; @@ -482,6 +545,29 @@ export function validateReviewedDerivative(provenance, derivative, expected) { if (derivativeKind === 'layered_contact_sheet') { validateProcessor(); + if (derivative.losslessExports !== undefined) { + const exports = derivative.losslessExports; + const originals = provenance?.output?.items ?? []; + const valid = + exports?.schemaVersion === 1 && + exports.verification === 'native-webp-quality-100-byte-reproduction' && + Array.isArray(exports.items) && + exports.items.length === originals.length && + derivative.processor?.role === 'byte-identical-retained-sheet-reproduction' && + derivative.processor?.path === 'scripts/template-gallery-retained-layer-sheet.py' && + derivative.creationTimeReviewCaptionPreserved === true && + exports.items.every( + (item, index) => + item.index === index && + item.mode === 'RGBA' && + /^sha256:bytes:[a-f0-9]{64}$/u.test(item.encodedSha256 ?? '') && + /^[a-f0-9]{64}$/u.test(item.rgbaPixelSha256 ?? '') && + item.nativeEncodedSha256 === originals[index].encodedSha256 && + item.width === originals[index].width && + item.height === originals[index].height, + ); + if (!valid) errors.push('reviewed derivative lossless exports must reproduce every original native image'); + } const expectedItemHashes = (provenance?.output?.items ?? []).map((item) => item.decodedSha256); if (stableStringify(derivative.sourceItemHashes ?? []) !== stableStringify(expectedItemHashes)) { errors.push('reviewed derivative sourceItemHashes mismatch'); @@ -613,7 +699,7 @@ export function validateReviewedDerivative(provenance, derivative, expected) { return errors; } -function validateSingleProvenance(provenance, expected, derivative = null) { +export function validateSingleProvenance(provenance, expected, derivative = null) { const errors = []; const audioDerivative = ['audio_remux', 'audio_caption_timeline_replacement'].includes(derivative?.kind) || @@ -689,11 +775,97 @@ function loadSingleProvenance(args, template, expected) { } } -export function validateQualityReview(review, expected, requiredStatus = EXACT_QUALITY_REVIEW_STATUS) { +function validateMaintainerAcceptance(review) { + const acceptance = review.maintainerAcceptance; + if (acceptance === undefined) return { accepted: false, errors: [] }; + const invalid = { + accepted: false, + errors: ['quality review maintainerAcceptance must bind the exact accepted review'], + }; + if (!acceptance || typeof acceptance !== 'object' || Array.isArray(acceptance)) return invalid; + const fields = [ + 'schemaVersion', + 'decision', + 'reviewer', + 'acceptedAt', + 'statement', + 'acceptedReviewHash', + ...(acceptance.acceptedFindings === undefined ? [] : ['acceptedFindings']), + ]; + if ( + Object.keys(acceptance).length !== fields.length || + fields.some((key) => !Object.hasOwn(acceptance, key)) || + acceptance.schemaVersion !== 1 || + acceptance.decision !== 'accepted_with_disclosed_limitations' || + acceptance.reviewer !== review.reviewer || + acceptance.acceptedAt !== review.reviewedAt || + typeof acceptance.statement !== 'string' || + acceptance.statement.trim().length < 20 || + acceptance.statement.length > 4096 || + !Array.isArray(review.knownLimitations) || + !review.knownLimitations.some((line) => typeof line === 'string' && line.trim().length >= 10) + ) + return invalid; + if ( + acceptance.acceptedFindings !== undefined && + (!Array.isArray(acceptance.acceptedFindings) || + acceptance.acceptedFindings.length > 20 || + new Set(acceptance.acceptedFindings).size !== acceptance.acceptedFindings.length || + acceptance.acceptedFindings.some((finding) => !ACCEPTABLE_VISUAL_FINDINGS.has(finding))) + ) + return invalid; + const acceptedReview = { ...review }; + delete acceptedReview.maintainerAcceptance; + try { + if (acceptance.acceptedReviewHash !== canonicalJsonHash(acceptedReview)) return invalid; + } catch { + return invalid; + } + return { accepted: true, errors: [], acceptedFindings: acceptance.acceptedFindings ?? [] }; +} + +const ACCEPTABLE_VISUAL_FINDINGS = new Set([ + 'dynamic video review motionReview.status must be pass', + 'dynamic video review temporalDefects must be an empty array', + 'dynamic video review requires passing temporal geometry review', + ...['subjectMorphing', 'scaleDrift', 'contactSliding', 'frameGlitches'].map( + (field) => `dynamic video temporalGeometryReview.${field} must be none`, + ), + 'source-conditioned video requires passing source preservation review', + ...['subjectIdentity', 'unmaskedRegions'].map( + (field) => `source-conditioned video sourcePreservationReview.${field} must be preserved`, + ), + 'photoreal video requires passing photographic-realism review', + 'photoreal video requires plausible lighting, materials, and dynamics', +]); + +export function qualityReviewContractForTemplate(template) { + const lrc = template.workflowBlockSettings?.lyricVideo?.lrc; + return { + expectedDurationSeconds: template.example?.expectedOutput?.durationSeconds, + ...(template.id === 'ace_step_lyric_music_video' && typeof lrc === 'string' + ? { lyricOverlayEnabled: Boolean(lrc.trim()) } + : {}), + }; +} + +export function validateQualityReview( + review, + expected, + requiredStatus = EXACT_QUALITY_REVIEW_STATUS, + sourceTiming, + reviewContract = {}, +) { const errors = []; if (!review || typeof review !== 'object' || Array.isArray(review)) { return ['Quality review must be a JSON object.']; } + const acceptance = + requiredStatus === REVIEWED_QUALITY_REVIEW_STATUS + ? validateMaintainerAcceptance(review) + : { accepted: false, errors: [] }; + errors.push(...acceptance.errors); + const qualitativeAcceptance = acceptance.accepted && review.ratingMethod === 'maintainer_qualitative_acceptance'; const strictVisualReview = requiredStatus === REVIEWED_QUALITY_REVIEW_STATUS && (STRICT_VISUAL_REVIEW_TEMPLATES.has(expected.templateId) || @@ -748,6 +920,7 @@ export function validateQualityReview(review, expected, requiredStatus = EXACT_Q } else { for (const requiredScore of ['taskAdherence', 'artifactControl', 'modalityQuality']) { const score = review.rubric[requiredScore]; + if (qualitativeAcceptance && score === null) continue; if (!Number.isFinite(score) || score < 1 || score > 5) { errors.push(`quality review rubric.${requiredScore} must be between 1 and 5`); } @@ -760,10 +933,12 @@ export function validateQualityReview(review, expected, requiredStatus = EXACT_Q errors.push('quality review knownLimitations must be an array when supplied'); } if (requiredStatus === REVIEWED_QUALITY_REVIEW_STATUS) { + const minimumScore = acceptance.accepted ? 1 : 4; for (const field of ['promptAdherence', 'composition', 'technicalExecution', 'templateUsefulness']) { const score = review.scores?.[field]; - if (!Number.isFinite(score) || score < 4 || score > 5) { - errors.push(`reviewed quality review scores.${field} must be between 4 and 5`); + if (qualitativeAcceptance && score === null) continue; + if (!Number.isFinite(score) || score < minimumScore || score > 5) { + errors.push(`reviewed quality review scores.${field} must be between ${minimumScore} and 5`); } } if (!Array.isArray(review.hardFailures) || review.hardFailures.length > 0) { @@ -818,21 +993,42 @@ export function validateQualityReview(review, expected, requiredStatus = EXACT_Q if (review.motionReview?.fullPlaybackReviewed !== true) { errors.push('dynamic video review must confirm full playback review'); } - if (!Number.isFinite(review.motionReview?.frameCount) || review.motionReview.frameCount < 81) { + const sourceTimingPreserved = + acceptance.accepted && + stableStringify(review.sourceTimingReview) === stableStringify(sourceTiming) && + sourceVideoTimingMatches(sourceTiming, { + frames: review.motionReview?.frameCount, + durationSeconds: review.motionReview?.durationSeconds, + }); + if ( + !Number.isFinite(review.motionReview?.frameCount) || + (!sourceTimingPreserved && review.motionReview.frameCount < 81) + ) { errors.push('dynamic video review requires at least 81 reviewed frames'); } if ( !Number.isFinite(review.motionReview?.durationSeconds) || - review.motionReview.durationSeconds < MINIMUM_TEMPLATE_VIDEO_SECONDS + (!sourceTimingPreserved && review.motionReview.durationSeconds < MINIMUM_TEMPLATE_VIDEO_SECONDS) ) { errors.push('dynamic video review requires at least five seconds of reviewed output'); } if ( LONG_VIDEO_REVIEW_TEMPLATES.has(expected.templateId) && + reviewContract.expectedDurationSeconds === undefined && (review.motionReview?.durationSeconds < 20 || review.motionReview?.durationSeconds > 35) ) { errors.push('long-form video review requires a duration between 20 and 35 seconds'); } + if ( + reviewContract.expectedDurationSeconds !== undefined && + (!Number.isFinite(reviewContract.expectedDurationSeconds) || + reviewContract.expectedDurationSeconds <= 0 || + !Number.isFinite(review.motionReview?.durationSeconds) || + Math.abs(review.motionReview.durationSeconds - reviewContract.expectedDurationSeconds) > 0.2) + ) + errors.push( + `video review must match the declared ${reviewContract.expectedDurationSeconds}-second recipe duration`, + ); if ( !Number.isFinite(review.motionReview?.sceneMotionCoveragePercent) || review.motionReview.sceneMotionCoveragePercent < 50 @@ -916,7 +1112,14 @@ export function validateQualityReview(review, expected, requiredStatus = EXACT_Q } else { errors.push('dynamic video review visualIntent must be photoreal or animation'); } - if (expected.templateId === 'ace_step_lyric_music_video') { + if (expected.templateId === 'ace_step_lyric_music_video' && reviewContract.lyricOverlayEnabled === false) { + if ( + review.lyricSyncReview?.status !== 'not_applicable' || + review.lyricSyncReview.overlayEnabled !== false || + review.lyricSyncReview.emptyLrc !== true + ) + errors.push('disabled lyric overlay requires an explicit not-applicable caption review'); + } else if (expected.templateId === 'ace_step_lyric_music_video') { if (review.lyricSyncReview?.status !== 'pass' || review.lyricSyncReview?.fullPlaybackReviewed !== true) { errors.push('lyric music video requires a passing full-playback lyric sync review'); } @@ -1009,7 +1212,7 @@ export function validateQualityReview(review, expected, requiredStatus = EXACT_Q } } } - return errors; + return acceptance.accepted ? errors.filter((error) => !acceptance.acceptedFindings.includes(error)) : errors; } function loadQualityReview(args, template, expected, requiredStatus = EXACT_QUALITY_REVIEW_STATUS) { @@ -1022,7 +1225,13 @@ function loadQualityReview(args, template, expected, requiredStatus = EXACT_QUAL if (!existsSync(filePath)) return { errors: [`Quality review file is missing: ${filePath}`] }; try { const review = JSON.parse(readFileSync(filePath, 'utf8')); - const errors = validateQualityReview(review, expected, requiredStatus); + const errors = validateQualityReview( + review, + expected, + requiredStatus, + galleryExpectedOutput(template).sourceTiming, + qualityReviewContractForTemplate(template), + ); return { filePath, review, errors, hash: canonicalJsonHash(review) }; } catch (error) { return { errors: [`Could not read quality review ${filePath}: ${error instanceof Error ? error.message : error}`] }; @@ -1123,6 +1332,8 @@ export async function loadTemplateRuntime(root = ROOT, { includePlanning = false return exactnessModule.getPromptSettingsHash(exactnessModule.getTemplateLockedSettings(template)); }, findManifestEntry: exactnessModule.findManifestEntry, + findHistoricalTemplateRecipe: exactnessModule.findHistoricalTemplateRecipe, + isRetainedVideoPreview: exactnessModule.isRetainedVideoPreview, }; } finally { await server.close(); @@ -1216,57 +1427,81 @@ export function selectPrimaryRunFile(files, templateId, runIndex, extensions = M }); } -async function decodedImageHash(imagePath) { +async function decodedImageHash(imagePath, { measureImageFrames = false } = {}) { const { chromium } = await import('playwright'); const browser = await chromium.launch(); try { const page = await browser.newPage(); + // ImageDecoder needs a secure context. Serve the decoding page wholly in Chromium. + if (measureImageFrames) { + const decoderPage = 'https://modiff-gallery.invalid/'; + await page.route(decoderPage, (route) => + route.fulfill({ contentType: 'text/html', body: 'Gallery image decoding' }), + ); + await page.goto(decoderPage); + } const bytes = readFileSync(imagePath); const extension = extname(imagePath).toLowerCase().replace('.', ''); const mime = extension === 'jpg' || extension === 'jpeg' ? 'image/jpeg' : extension === 'webp' ? 'image/webp' : 'image/png'; const dataUrl = `data:${mime};base64,${bytes.toString('base64')}`; - const result = await page.evaluate(async (src) => { - const image = new Image(); - image.decoding = 'sync'; - image.src = src; - await image.decode(); - const canvas = document.createElement('canvas'); - canvas.width = image.naturalWidth; - canvas.height = image.naturalHeight; - const context = canvas.getContext('2d', { willReadFrequently: true }); - if (!context) throw new Error('Could not create canvas context for decoded image hash.'); - context.drawImage(image, 0, 0); - const imageData = context.getImageData(0, 0, canvas.width, canvas.height); - let lumaSum = 0; - let lumaSquaredSum = 0; - let nearBlackPixels = 0; - const pixelCount = imageData.data.length / 4; - for (let offset = 0; offset < imageData.data.length; offset += 4) { - const luma = - 0.2126 * imageData.data[offset] + 0.7152 * imageData.data[offset + 1] + 0.0722 * imageData.data[offset + 2]; - lumaSum += luma; - lumaSquaredSum += luma * luma; - if (luma < 4) nearBlackPixels += 1; - } - const meanLuma = pixelCount > 0 ? lumaSum / pixelCount : 0; - let binary = ''; - const chunkSize = 32768; - for (let offset = 0; offset < imageData.data.length; offset += chunkSize) { - binary += String.fromCharCode(...imageData.data.slice(offset, offset + chunkSize)); - } - return { - width: canvas.width, - height: canvas.height, - meanLuma, - lumaStdDev: Math.sqrt(Math.max(0, lumaSquaredSum / pixelCount - meanLuma * meanLuma)), - nearBlackRatio: pixelCount > 0 ? nearBlackPixels / pixelCount : 1, - rgbaBase64: btoa(binary), - }; - }, dataUrl); + const result = await page.evaluate( + async ({ src, type, measureImageFrames }) => { + const image = new Image(); + image.decoding = 'sync'; + image.src = src; + await image.decode(); + let frames; + if (measureImageFrames) { + const data = await (await fetch(src)).arrayBuffer(); + const decoder = new globalThis.ImageDecoder({ data, type, preferAnimation: true }); + try { + await decoder.tracks.ready; + frames = decoder.tracks.selectedTrack.frameCount; + } finally { + decoder.close(); + } + } + const canvas = document.createElement('canvas'); + canvas.width = image.naturalWidth; + canvas.height = image.naturalHeight; + const context = canvas.getContext('2d', { willReadFrequently: true }); + if (!context) throw new Error('Could not create canvas context for decoded image hash.'); + context.drawImage(image, 0, 0); + const imageData = context.getImageData(0, 0, canvas.width, canvas.height); + let lumaSum = 0; + let lumaSquaredSum = 0; + let nearBlackPixels = 0; + const pixelCount = imageData.data.length / 4; + for (let offset = 0; offset < imageData.data.length; offset += 4) { + const luma = + 0.2126 * imageData.data[offset] + 0.7152 * imageData.data[offset + 1] + 0.0722 * imageData.data[offset + 2]; + lumaSum += luma; + lumaSquaredSum += luma * luma; + if (luma < 4) nearBlackPixels += 1; + } + const meanLuma = pixelCount > 0 ? lumaSum / pixelCount : 0; + let binary = ''; + const chunkSize = 32768; + for (let offset = 0; offset < imageData.data.length; offset += chunkSize) { + binary += String.fromCharCode(...imageData.data.slice(offset, offset + chunkSize)); + } + return { + width: canvas.width, + height: canvas.height, + frames, + meanLuma, + lumaStdDev: Math.sqrt(Math.max(0, lumaSquaredSum / pixelCount - meanLuma * meanLuma)), + nearBlackRatio: pixelCount > 0 ? nearBlackPixels / pixelCount : 1, + rgbaBase64: btoa(binary), + }; + }, + { src: dataUrl, type: mime, measureImageFrames }, + ); return { width: result.width, height: result.height, + ...(measureImageFrames && { frames: result.frames }), meanLuma: result.meanLuma, lumaStdDev: result.lumaStdDev, nearBlackRatio: result.nearBlackRatio, @@ -1441,7 +1676,8 @@ function decodedVideoHash(videoPath, args) { isolatedLumaFlashes += 1; } } - const decodedMediaHash = `sha256:decoded-video-framemd5:${sha256(frameMd5)}`; + const frameHashCompatibility = decodedVideoFrameHashCompatibility(frameMd5); + const decodedMediaHash = frameHashCompatibility.rawHash; return { width: metadata.width, height: metadata.height, @@ -1449,6 +1685,7 @@ function decodedVideoHash(videoPath, args) { pixelFormat: metadata.pixelFormat, frames: frameCount, durationSeconds: metadata.durationSeconds || (metadata.fps > 0 ? frameCount / metadata.fps : 0), + fps: metadata.fps, hasAudio: metadata.hasAudio, embeddedAudio, uniqueFrameRatio: new Set(frameHashes).size / frameCount, @@ -1469,6 +1706,7 @@ function decodedVideoHash(videoPath, args) { nearBlackFrameRatios.filter((ratio) => ratio > 0.35).length / nearBlackFrameRatios.length, isolatedLumaFlashRatio: frameCount > 2 ? isolatedLumaFlashes / (frameCount - 2) : 0, hash: decodedMediaHash, + frameHashCompatibility, audiovisualMediaHash: decodedAudiovisualMediaHash(decodedMediaHash, embeddedAudio?.hash), }; } @@ -1541,7 +1779,7 @@ export async function decodedMediaHash(mediaPath, mediaType, args = {}) { if (mediaType === 'video') return decodedVideoHash(mediaPath, args); if (mediaType === 'audio') return decodedAudioHash(mediaPath, args); if (mediaType === 'json') return decodedJsonHash(mediaPath); - return decodedImageHash(mediaPath); + return decodedImageHash(mediaPath, args); } export async function finalizeReviewedDerivative(recordPath, mediaPath, mediaType = 'image', args = {}) { @@ -1595,11 +1833,21 @@ export function beforePreviewContractErrors(decoded, contract = templateGalleryC return errors; } -export function technicalMediaErrors(decoded, expected = {}, mediaType = 'image') { +export function technicalMediaErrors( + decoded, + expected = {}, + mediaType = 'image', + retainedVideoPreview, + nativeTurntable = false, +) { const errors = []; for (const field of ['width', 'height', 'frames', 'sampleRate']) { - if (expected[field] !== undefined && Number(decoded[field]) !== Number(expected[field])) { - errors.push(`${field} must be ${expected[field]}, got ${decoded[field] ?? 'missing'}`); + const measured = + field === 'sampleRate' && mediaType === 'audio' + ? (decoded.sourceSampleRate ?? decoded.sampleRate) + : decoded[field]; + if (expected[field] !== undefined && Number(measured) !== Number(expected[field])) { + errors.push(`${field} must be ${expected[field]}, got ${measured ?? 'missing'}`); } } if (expected.durationSeconds !== undefined) { @@ -1615,6 +1863,17 @@ export function technicalMediaErrors(decoded, expected = {}, mediaType = 'image' if (Number(decoded.lumaStdDev ?? 0) < 0.75) errors.push('decoded media has near-zero visual variance'); } if (mediaType === 'video') { + const retainedClip = retainedVideoPreviewMatches( + retainedVideoPreview, + { + ...decoded, + decodedAudioHash: decoded.embeddedAudio?.hash, + mediaHash: decodedMediaHashMatches(decoded, retainedVideoPreview?.mediaHash) + ? retainedVideoPreview.mediaHash + : decoded.hash, + }, + nativeTurntable, + ); const requestedMotionProfile = expected.motionReviewProfile ?? DEFAULT_MOTION_REVIEW_PROFILE; const hasKnownMotionProfile = Object.hasOwn(MOTION_REVIEW_PROFILES, requestedMotionProfile); if (!hasKnownMotionProfile) { @@ -1648,17 +1907,33 @@ export function technicalMediaErrors(decoded, expected = {}, mediaType = 'image' } } } - if (Number(decoded.durationSeconds ?? 0) < MINIMUM_TEMPLATE_VIDEO_SECONDS) { + if ( + Number(decoded.durationSeconds ?? 0) < MINIMUM_TEMPLATE_VIDEO_SECONDS && + !retainedClip && + !sourceVideoTimingMatches(expected.sourceTiming, decoded) + ) { errors.push(`video duration must be at least ${MINIMUM_TEMPLATE_VIDEO_SECONDS} seconds`); } const shortEdge = Math.min(Number(decoded.width ?? 0), Number(decoded.height ?? 0)); const longEdge = Math.max(Number(decoded.width ?? 0), Number(decoded.height ?? 0)); - if (shortEdge < MINIMUM_TEMPLATE_VIDEO_SHORT_EDGE || longEdge < MINIMUM_TEMPLATE_VIDEO_LONG_EDGE) { + if ( + !retainedClip && + (shortEdge < MINIMUM_TEMPLATE_VIDEO_SHORT_EDGE || longEdge < MINIMUM_TEMPLATE_VIDEO_LONG_EDGE) + ) { errors.push( `video delivery resolution must be at least ${MINIMUM_TEMPLATE_VIDEO_LONG_EDGE}x${MINIMUM_TEMPLATE_VIDEO_SHORT_EDGE}`, ); } if (Number(decoded.uniqueFrameRatio ?? 0) < 0.1) errors.push('video has fewer than 10% unique decoded frames'); + if (retainedVideoPreview && !retainedClip) errors.push('video differs from the reviewed retained preview'); + if (retainedClip) { + errors.push( + ...beforePreviewContractErrors(decoded, { + ...templateGalleryContract.video.beforePreview, + muted: !retainedVideoPreview.decodedAudioHash, + }), + ); + } if (Number(decoded.isolatedLumaFlashRatio ?? 0) > 0) { errors.push('video contains one or more isolated full-frame luminance flashes'); } @@ -1776,11 +2051,11 @@ function writeBrowserSafeBeforePreview(videoPath, previewPath, args) { ); } -function readManifest() { - if (!existsSync(PUBLIC_MANIFEST)) { +function readManifest(manifestPath = PUBLIC_MANIFEST) { + if (!existsSync(manifestPath)) { return { schemaVersion: 2, generatedAt: new Date(0).toISOString(), runtimeFingerprint: 'unverified', examples: [] }; } - return JSON.parse(readFileSync(PUBLIC_MANIFEST, 'utf8')); + return JSON.parse(readFileSync(manifestPath, 'utf8')); } function validateManifestShape(manifest) { @@ -1884,9 +2159,10 @@ async function generate(args, artifactDir) { }); continue; } - const left = await decodedMediaHash(media.run1, mediaType, args); - const right = exactPublication ? await decodedMediaHash(media.run2, mediaType, args) : left; const expectedOutput = galleryExpectedOutput(template); + const decodeOptions = expectedOutput.frames === undefined ? args : { ...args, measureImageFrames: true }; + const left = await decodedMediaHash(media.run1, mediaType, decodeOptions); + const right = exactPublication ? await decodedMediaHash(media.run2, mediaType, decodeOptions) : left; const technicalErrors = technicalMediaErrors(left, expectedOutput, mediaType); if (exactPublication) technicalErrors.push(...technicalMediaErrors(right, expectedOutput, mediaType)); if (technicalErrors.length > 0) { @@ -2178,43 +2454,236 @@ async function generate(args, artifactDir) { }; } -async function verify(args, artifactDir) { - const runtime = await loadTemplateRuntime(); +// This is a local verification of the checked-in immutable publication scope, +// not a rights approval or an anonymous verification of the remote Dataset. +function canonicalGalleryAssetPath(path) { + return ( + typeof path === 'string' && + path.startsWith('template-gallery/') && + !path.includes('\\') && + !path.split('/').some((part) => !part || part === '.' || part === '..' || part.includes(':')) + ); +} + +export function galleryVerificationScope(root) { + const read = (path) => JSON.parse(readFileSync(join(root, path), 'utf8')); + const source = validateTemplateAssetSource(read('src/studio/templateAssetSource.json')); + if (source.mode === 'local') return { source, assets: [], withheld: [] }; + const manifest = read('config/template-assets.v1.json'); + validateTemplateAssetRelease(source, manifest); + const rights = read('config/template-asset-rights.v1.json'); + const assets = manifest.assets; + const paths = Array.isArray(assets) ? assets.map((asset) => asset?.path) : []; + const identity = (rows) => + `sha256:canonical-json:${storageJsonHash({ schemaVersion: 1, assetVersion: manifest.assetVersion, assets: rows })}`; + if ( + !Array.isArray(assets) || + !assets.length || + paths.some((path) => !canonicalGalleryAssetPath(path)) || + new Set(paths.map((path) => path.toLowerCase())).size !== paths.length || + paths.join('\n') !== [...paths].sort().join('\n') || + assets.some( + (asset) => + !Number.isSafeInteger(asset.size) || asset.size < 0 || !/^sha256:bytes:[a-f0-9]{64}$/.test(asset.sha256), + ) || + manifest.assetCount !== assets.length || + manifest.totalBytes !== assets.reduce((sum, asset) => sum + asset.size, 0) || + !Array.isArray(manifest.missingAssets) || + manifest.missingAssets.length || + manifest.assetSetId !== identity(assets) + ) { + throw new Error('Gallery verification requires the exact complete storage manifest.'); + } + if ( + rights.schemaVersion !== 1 || + rights.assetSetId !== manifest.assetSetId || + !Array.isArray(rights.records) || + rights.records.length !== assets.length || + new Set(rights.records.map((row) => row.path)).size !== assets.length + ) { + throw new Error('Gallery verification rights ledger does not cover the exact storage manifest.'); + } + const rightsByPath = new Map(rights.records.map((row) => [row.path, row])); + const unavailable = new Set(source.unavailableAssets ?? []); + const withheld = []; + for (const asset of assets) { + const row = rightsByPath.get(asset.path); + if ( + !row || + row.sha256 !== asset.sha256 || + (unavailable.has(asset.path) + ? row.publishDecision !== 'hold' || typeof row.holdReason !== 'string' || !row.holdReason.trim() + : row.publishDecision !== 'approved') + ) { + throw new Error(`Gallery verification rights/source mismatch: ${asset.path}`); + } + if (unavailable.has(asset.path)) withheld.push({ path: asset.path, sha256: asset.sha256, reason: row.holdReason }); + } + const available = assets.filter((asset) => !unavailable.has(asset.path)); + if (!available.length || withheld.length !== unavailable.size || source.assetSetId !== identity(available)) { + throw new Error('Gallery verification source is not the exact nonempty approved asset subset.'); + } + return { source, assets: available, withheld }; +} + +export async function verifyGallery( + args, + artifactDir, + { root = ROOT, runtime: suppliedRuntime, decodeMedia = decodedMediaHash, templateIds } = {}, +) { + const runtime = suppliedRuntime ?? (await loadTemplateRuntime(root)); const templatesById = new Map(runtime.templates.map((template) => [template.id, template])); - const manifest = readManifest(); - const errors = validateManifestShape(manifest); + const completeManifest = readManifest(join(root, 'public', 'template-gallery', 'manifest.json')); + const errors = validateManifestShape(completeManifest); + if ( + templateIds !== undefined && + (!Array.isArray(templateIds) || + !templateIds.length || + new Set(templateIds).size !== templateIds.length || + templateIds.some( + (id) => typeof id !== 'string' || !completeManifest.examples.some((entry) => entry.templateId === id), + )) + ) { + throw new Error('Gallery verification scope must name distinct existing examples and cannot be empty.'); + } + const manifest = + templateIds === undefined + ? completeManifest + : { + ...completeManifest, + examples: completeManifest.examples.filter((entry) => templateIds.includes(entry.templateId)), + }; + const scope = galleryVerificationScope(root); + const historicalById = new Map(); + if (args.reviewedHistory === true) { + const { verifyTemplateRecipeRecords } = await import('./template-recipe-records.mjs'); + const history = JSON.parse(readFileSync(join(root, 'config/template-recipe-history.v1.json'), 'utf8')); + if (scope.source.mode === 'huggingface' && history.source?.repository !== scope.source.repoId) { + throw new Error('Reviewed Gallery history belongs to a different Dataset.'); + } + for (const record of verifyTemplateRecipeRecords(history, { root, runtime, manifest: completeManifest })) { + historicalById.set(record.templateId, record.template); + } + } + const decodedHashCompatibilityMatches = []; + const unavailable = new Set(scope.withheld.map((asset) => asset.path)); + const isWithheld = (path) => typeof path === 'string' && unavailable.has(path.replace(/^\//, '')); + const withheldExamples = []; + const publicRoot = join(realpathSync(root), 'public'); + if (lstatSync(publicRoot).isSymbolicLink()) throw new Error('Gallery public root must not be a link.'); + const assertContainedFile = (filename, label) => { + if (!existsSync(filename)) return; + const stat = lstatSync(filename); + const resolved = relative(publicRoot, realpathSync(filename)); + if ( + !stat.isFile() || + stat.isSymbolicLink() || + isAbsolute(resolved) || + resolved === '..' || + resolved.startsWith('..\\') || + resolved.startsWith('../') + ) { + throw new Error(`Gallery asset is not a contained regular file: ${label}`); + } + }; + const publishedPaths = new Set(scope.assets.map((asset) => asset.path)); + const storagePaths = new Set([...publishedPaths, ...unavailable]); + for (const entry of manifest.examples ?? []) { + for (const field of [ + 'outputPath', + 'thumbnailPath', + 'beforePath', + 'afterPath', + 'cardPreviewPath', + 'provenancePath', + 'qualityReviewPath', + ]) { + const path = entry[field]; + if (path == null && ['beforePath', 'afterPath', 'cardPreviewPath'].includes(field)) continue; + if (typeof path !== 'string' || !path.startsWith('/') || !canonicalGalleryAssetPath(path.slice(1))) { + throw new Error(`${entry.templateId} ${field} must be a canonical Gallery path.`); + } + if (scope.source.mode === 'huggingface') { + if (!storagePaths.has(path.slice(1))) + throw new Error(`${entry.templateId} ${field} is not listed in the complete storage manifest.`); + if (['provenancePath', 'qualityReviewPath'].includes(field) && !publishedPaths.has(path.slice(1))) { + throw new Error(`${entry.templateId} ${field} sidecar must be available in the approved subset.`); + } + } + assertContainedFile(join(publicRoot, path.slice(1)), `${entry.templateId} ${field}`); + } + } + for (const asset of scope.assets) { + const filename = join(publicRoot, asset.path); + if (!existsSync(filename)) { + errors.push(`Published asset missing: ${asset.path}`); + continue; + } + assertContainedFile(filename, asset.path); + if (lstatSync(filename).size !== asset.size || `sha256:bytes:${sha256(readFileSync(filename))}` !== asset.sha256) { + errors.push(`Published asset byte identity mismatch: ${asset.path}`); + } + } if ((manifest.examples?.length ?? 0) === 0) { errors.push('Gallery manifest is vacuous: at least one reviewed or exact runtime-generated example is required.'); } for (const entry of manifest.examples ?? []) { + const withheldPaths = [ + ...new Set( + ['outputPath', 'thumbnailPath', 'beforePath', 'afterPath', 'cardPreviewPath'] + .map((field) => entry[field]) + .filter(isWithheld) + .map((path) => path.replace(/^\//, '')), + ), + ].sort(); + if (withheldPaths.length) withheldExamples.push({ templateId: entry.templateId, assets: withheldPaths }); const verificationStatus = entry.verificationStatus ?? (entry.qualityReviewStatus === EXACT_QUALITY_REVIEW_STATUS ? 'exact' : 'reviewed'); const exactPublication = verificationStatus === 'exact'; const requiredReviewStatus = exactPublication ? EXACT_QUALITY_REVIEW_STATUS : REVIEWED_QUALITY_REVIEW_STATUS; - const outputPath = join(ROOT, 'public', entry.outputPath.replace(/^\//, '')); - if (!existsSync(outputPath)) { + const outputPath = join(root, 'public', entry.outputPath.replace(/^\//, '')); + if (!isWithheld(entry.outputPath) && !existsSync(outputPath)) { errors.push(`${entry.templateId} media file missing: ${entry.outputPath}`); continue; } - const thumbnailPath = join(ROOT, 'public', entry.thumbnailPath.replace(/^\//, '')); - if (!existsSync(thumbnailPath)) { + const thumbnailPath = join(root, 'public', entry.thumbnailPath.replace(/^\//, '')); + if (!isWithheld(entry.thumbnailPath) && !existsSync(thumbnailPath)) { errors.push(`${entry.templateId} thumbnail file missing: ${entry.thumbnailPath}`); } - const decoded = await decodedMediaHash(outputPath, entry.mediaType ?? 'image', args); - if (decoded.hash !== entry.mediaHash) { + const template = historicalById.get(entry.templateId) ?? templatesById.get(entry.templateId); + const decodeOptions = + galleryExpectedOutput(template).frames === undefined ? args : { ...args, measureImageFrames: true }; + const decoded = isWithheld(entry.outputPath) + ? null + : await decodeMedia(outputPath, entry.mediaType ?? 'image', decodeOptions); + const decodedIdentityMatches = decodedMediaHashMatches(decoded, entry.mediaHash); + if (decoded && !decodedIdentityMatches) { errors.push(`${entry.templateId} decoded hash mismatch: expected ${entry.mediaHash}, got ${decoded.hash}`); } - if (entry.decodedAudioHash && decoded.embeddedAudio?.hash !== entry.decodedAudioHash) { + if (decodedIdentityMatches && decoded.hash !== entry.mediaHash) { + decodedHashCompatibilityMatches.push({ + templateId: entry.templateId, + expected: entry.mediaHash, + actualRawHash: decoded.hash, + observedMuxer: decoded.frameHashCompatibility.observedMuxer, + matchingHistoricalMuxer: decoded.frameHashCompatibility.variants.find( + (variant) => variant.hash === entry.mediaHash, + ).muxer, + }); + } + if (decoded && entry.decodedAudioHash && decoded.embeddedAudio?.hash !== entry.decodedAudioHash) { errors.push( `${entry.templateId} decoded audio hash mismatch: expected ${entry.decodedAudioHash}, got ${decoded.embeddedAudio?.hash ?? 'missing'}`, ); } - if (entry.audiovisualMediaHash && decoded.audiovisualMediaHash !== entry.audiovisualMediaHash) { + const audiovisualMediaHash = decodedIdentityMatches + ? decodedAudiovisualMediaHash(entry.mediaHash, decoded?.embeddedAudio?.hash) + : decoded?.audiovisualMediaHash; + if (decoded && entry.audiovisualMediaHash && audiovisualMediaHash !== entry.audiovisualMediaHash) { errors.push( - `${entry.templateId} audiovisual hash mismatch: expected ${entry.audiovisualMediaHash}, got ${decoded.audiovisualMediaHash ?? 'missing'}`, + `${entry.templateId} audiovisual hash mismatch: expected ${entry.audiovisualMediaHash}, got ${audiovisualMediaHash ?? 'missing'}`, ); } - const template = templatesById.get(entry.templateId); if (!template) { errors.push(`${entry.templateId} is not present in the current template runtime`); } else { @@ -2228,7 +2697,10 @@ async function verify(args, artifactDir) { entry.mediaType === 'video' ? runtime.findManifestEntry(template, { ...manifest, examples: [entry] }, { requireCardPreview: false }) : undefined; - if (currentVideoEntry && (!entry.cardPreviewPath || !entry.cardPreviewSha256)) { + const retainedPreview = runtime.isRetainedVideoPreview?.(template, currentVideoEntry) + ? template.example.retainedVideoPreview + : undefined; + if (currentVideoEntry && !retainedPreview && (!entry.cardPreviewPath || !entry.cardPreviewSha256)) { errors.push(`${entry.templateId} current video entry requires cardPreviewPath and cardPreviewSha256`); } const currentPromptSettingsHash = runtime.promptSettingsHash(template); @@ -2244,18 +2716,33 @@ async function verify(args, artifactDir) { errors.push(`${entry.templateId} manifest template input contract is stale for the current bundled defaults`); } errors.push( - ...technicalMediaErrors(decoded, galleryExpectedOutput(template), entry.mediaType ?? 'image').map( - (error) => `${entry.templateId} technical media gate: ${error}`, - ), + ...(decoded + ? technicalMediaErrors( + decoded, + galleryExpectedOutput(template), + entry.mediaType ?? 'image', + retainedPreview, + template.mode === 'text_to_3d', + ) + : [] + ).map((error) => `${entry.templateId} technical media gate: ${error}`), ); + const sourceTiming = galleryExpectedOutput(template).sourceTiming; + if ( + sourceTiming && + (template.mode !== 'video_to_video' || + (entry.beforeSourceMediaHash ?? entry.beforeMediaHash) !== sourceTiming.sourceMediaHash) + ) { + errors.push(`${entry.templateId} short-source timing requires its exact published source input`); + } if (requiresBeforeMedia(template) && (!entry.beforePath || !entry.afterPath || !entry.beforeMediaHash)) { errors.push( `${entry.templateId} comparison publication requires genuine beforePath, afterPath and beforeMediaHash`, ); } } - if (entry.beforePath) { - const beforePath = join(ROOT, 'public', entry.beforePath.replace(/^\//, '')); + if (entry.beforePath && !isWithheld(entry.beforePath)) { + const beforePath = join(root, 'public', entry.beforePath.replace(/^\//, '')); if (!existsSync(beforePath)) { errors.push(`${entry.templateId} before media file missing: ${entry.beforePath}`); } else { @@ -2266,15 +2753,15 @@ async function verify(args, artifactDir) { ); } if (MEDIA_EXTENSIONS.video.has(extname(entry.beforePath).toLowerCase())) { - const decodedBeforePreview = await decodedMediaHash(beforePath, 'video', args); + const decodedBeforePreview = await decodeMedia(beforePath, 'video', args); errors.push( ...beforePreviewContractErrors(decodedBeforePreview).map((error) => `${entry.templateId} ${error}`), ); } } } - if (entry.mediaType === 'video' && entry.cardPreviewPath) { - const cardPreviewPath = join(ROOT, 'public', entry.cardPreviewPath.replace(/^\//, '')); + if (entry.mediaType === 'video' && entry.cardPreviewPath && !isWithheld(entry.cardPreviewPath)) { + const cardPreviewPath = join(root, 'public', entry.cardPreviewPath.replace(/^\//, '')); if (!existsSync(cardPreviewPath)) { errors.push(`${entry.templateId} card preview file missing: ${entry.cardPreviewPath}`); } else { @@ -2284,25 +2771,29 @@ async function verify(args, artifactDir) { `${entry.templateId} card preview hash mismatch: expected ${entry.cardPreviewSha256}, got ${cardPreviewSha256}`, ); } - const decodedCardPreview = await decodedMediaHash(cardPreviewPath, 'video', args); + const decodedCardPreview = await decodeMedia(cardPreviewPath, 'video', args); errors.push(...cardPreviewContractErrors(decodedCardPreview).map((error) => `${entry.templateId} ${error}`)); } } - const provenancePath = join(ROOT, 'public', String(entry.provenancePath ?? '').replace(/^\//, '')); + const provenancePath = join(root, 'public', String(entry.provenancePath ?? '').replace(/^\//, '')); + let retainedProvenance = false; if (!existsSync(provenancePath)) { errors.push(`${entry.templateId} provenance missing: ${entry.provenancePath}`); } else { try { const bundle = JSON.parse(readFileSync(provenancePath, 'utf8')); + retainedProvenance = bundle.format === RETAINED_GALLERY_PROVENANCE_FORMAT; const provenanceHash = canonicalJsonHash(bundle); if (provenanceHash !== entry.provenanceHash) { errors.push( `${entry.templateId} provenance hash mismatch: expected ${entry.provenanceHash}, got ${provenanceHash}`, ); } - const expectedFormat = exactPublication - ? 'modiff.gallery.duplicate-provenance.v1' - : 'modiff.gallery.reviewed-provenance.v1'; + const expectedFormat = retainedProvenance + ? RETAINED_GALLERY_PROVENANCE_FORMAT + : exactPublication + ? 'modiff.gallery.duplicate-provenance.v1' + : 'modiff.gallery.reviewed-provenance.v1'; if (bundle.schemaVersion !== 1 || bundle.format !== expectedFormat) { errors.push(`${entry.templateId} provenance bundle schema/format is invalid for ${verificationStatus}`); } @@ -2335,36 +2826,58 @@ async function verify(args, artifactDir) { } } const { runtimeFingerprint: _redactedRuntimeFingerprint, ...publiclyRecomputableBindings } = expectedBindings; - const pinnedRun = exactPublication ? bundle.run2 : bundle.run; - const provenanceErrors = exactPublication - ? validateDuplicateProvenance(bundle.run1, bundle.run2, publiclyRecomputableBindings).errors - : validateSingleProvenance(bundle.run, publiclyRecomputableBindings, bundle.derivative); - errors.push(...provenanceErrors.map((error) => `${entry.templateId} ${error}`)); - if (entry.beforeMediaHash) { - const inputHashes = (pinnedRun?.inputs?.items ?? []).map((item) => item?.contentHash); - const sourceMediaHash = entry.beforeSourceMediaHash ?? entry.beforeMediaHash; - if (!inputHashes.includes(sourceMediaHash)) { - errors.push(`${entry.templateId} before source media hash does not match pinned provenance inputs`); + if (retainedProvenance) { + const retainedBefore = entry.beforePath && join(publicRoot, entry.beforePath.slice(1)); + const readAvailable = (filename, assetPath) => { + if (!filename || isWithheld(assetPath) || !existsSync(filename)) return undefined; + const stat = lstatSync(filename); + return stat.isFile() && stat.size <= retainedGalleryFileLimit(assetPath) + ? readFileSync(filename) + : undefined; + }; + const provenanceErrors = validateRetainedGalleryProvenance(bundle, entry, { + templateRevisionHash: + template && + storageJsonHash({ + template, + settings: runtime.lockedSettingsForTemplate(template), + }), + outputBytes: readAvailable(outputPath, entry.outputPath), + beforeBytes: readAvailable(retainedBefore, entry.beforePath), + }); + errors.push(...provenanceErrors.map((error) => `${entry.templateId} ${error}`)); + } else { + const pinnedRun = exactPublication ? bundle.run2 : bundle.run; + const provenanceErrors = exactPublication + ? validateDuplicateProvenance(bundle.run1, bundle.run2, publiclyRecomputableBindings).errors + : validateSingleProvenance(bundle.run, publiclyRecomputableBindings, bundle.derivative); + errors.push(...provenanceErrors.map((error) => `${entry.templateId} ${error}`)); + if (entry.beforeMediaHash) { + const inputHashes = (pinnedRun?.inputs?.items ?? []).map((item) => item?.contentHash); + const sourceMediaHash = entry.beforeSourceMediaHash ?? entry.beforeMediaHash; + if (!inputHashes.includes(sourceMediaHash)) { + errors.push(`${entry.templateId} before source media hash does not match pinned provenance inputs`); + } } - } - for (const field of [ - 'graphHash', - 'proofLockHash', - 'backendSourceFingerprint', - 'backendContractFingerprint', - 'modelCommit', - 'templateRevisionHash', - ...(entry.modelSetHash ? ['modelSetHash'] : []), - ...(entry.inputArtifactsHash ? ['inputArtifactsHash'] : []), - ]) { - const provenanceValue = - field === 'modelSetHash' - ? pinnedRun?.models?.hash - : field === 'inputArtifactsHash' - ? pinnedRun?.inputArtifactsHash - : pinnedRun?.[field]; - if (provenanceValue !== entry[field]) { - errors.push(`${entry.templateId} manifest ${field} does not match pinned provenance`); + for (const field of [ + 'graphHash', + 'proofLockHash', + 'backendSourceFingerprint', + 'backendContractFingerprint', + 'modelCommit', + 'templateRevisionHash', + ...(entry.modelSetHash ? ['modelSetHash'] : []), + ...(entry.inputArtifactsHash ? ['inputArtifactsHash'] : []), + ]) { + const provenanceValue = + field === 'modelSetHash' + ? pinnedRun?.models?.hash + : field === 'inputArtifactsHash' + ? pinnedRun?.inputArtifactsHash + : pinnedRun?.[field]; + if (provenanceValue !== entry[field]) { + errors.push(`${entry.templateId} manifest ${field} does not match pinned provenance`); + } } } } catch (error) { @@ -2373,7 +2886,7 @@ async function verify(args, artifactDir) { ); } } - const qualityReviewPath = join(ROOT, 'public', String(entry.qualityReviewPath ?? '').replace(/^\//, '')); + const qualityReviewPath = join(root, 'public', String(entry.qualityReviewPath ?? '').replace(/^\//, '')); if (!existsSync(qualityReviewPath)) { errors.push(`${entry.templateId} quality review missing: ${entry.qualityReviewPath}`); continue; @@ -2399,10 +2912,13 @@ async function verify(args, artifactDir) { ...(entry.modelSetHash ? { modelSetHash: entry.modelSetHash } : {}), ...(entry.inputArtifactsHash ? { inputArtifactsHash: entry.inputArtifactsHash } : {}), decodedMediaHash: entry.mediaHash, + ...(retainedProvenance ? { reviewer: entry.reviewer, reviewedAt: entry.reviewedAt } : {}), ...(entry.decodedAudioHash ? { decodedAudioHash: entry.decodedAudioHash } : {}), ...(entry.audiovisualMediaHash ? { audiovisualMediaHash: entry.audiovisualMediaHash } : {}), }, requiredReviewStatus, + galleryExpectedOutput(template).sourceTiming, + qualityReviewContractForTemplate(template), ); errors.push(...reviewErrors.map((error) => `${entry.templateId} ${error}`)); } catch (error) { @@ -2412,10 +2928,37 @@ async function verify(args, artifactDir) { } } + const availableExamples = (manifest.examples?.length ?? 0) - withheldExamples.length; + if (availableExamples === 0) errors.push('Gallery verification has no available published examples.'); + const historicalEntries = (manifest.examples ?? []) + .filter(({ templateId }) => historicalById.has(templateId)) + .map(({ templateId }) => ({ templateId, withheld: withheldExamples.some((row) => row.templateId === templateId) })); + const availableHistorical = historicalEntries.filter(({ withheld }) => !withheld).length; return { mode: 'verify', artifactDir, examples: manifest.examples?.length ?? 0, + verificationScope: + scope.source.mode === 'huggingface' ? 'pinned-remote-assets-materialized-locally' : 'complete-local', + verifiedExamples: errors.length === 0 ? availableExamples : 0, + ...(args.reviewedHistory === true + ? { + historicalRecipeRecords: historicalEntries, + verifiedCurrentExamples: errors.length === 0 ? availableExamples - availableHistorical : 0, + verifiedHistoricalExamples: errors.length === 0 ? availableHistorical : 0, + } + : {}), + ...(templateIds === undefined + ? {} + : { + explicitlyScoped: true, + excludedExamples: completeManifest.examples + .filter((entry) => !templateIds.includes(entry.templateId)) + .map((entry) => entry.templateId), + }), + withheldExamples, + withheldAssets: scope.withheld, + decodedHashCompatibilityMatches, errors, ok: errors.length === 0, }; @@ -2425,7 +2968,7 @@ async function main() { const args = parseArgs(process.argv); const artifactDir = artifactDirFor(args.mode); mkdirSync(PUBLIC_GALLERY_DIR, { recursive: true }); - const result = args.mode === 'generate' ? await generate(args, artifactDir) : await verify(args, artifactDir); + const result = args.mode === 'generate' ? await generate(args, artifactDir) : await verifyGallery(args, artifactDir); writeFileSync(join(artifactDir, 'report.json'), JSON.stringify(result, null, 2)); console.log(JSON.stringify(result, null, 2)); if (result.errors?.length) { diff --git a/scripts/template-gallery-harness.test.mjs b/scripts/template-gallery-harness.test.mjs index 6eb5ba65..3ab6f60e 100644 --- a/scripts/template-gallery-harness.test.mjs +++ b/scripts/template-gallery-harness.test.mjs @@ -1,8 +1,19 @@ import assert from 'node:assert/strict'; import { createHash } from 'node:crypto'; -import { mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { + mkdirSync, + mkdtempSync, + readFileSync, + realpathSync, + renameSync, + rmdirSync, + rmSync, + symlinkSync, + unlinkSync, + writeFileSync, +} from 'node:fs'; import { tmpdir } from 'node:os'; -import { join } from 'node:path'; +import { basename, dirname, join } from 'node:path'; import { fileURLToPath } from 'node:url'; import { before, test } from 'node:test'; import { @@ -12,6 +23,9 @@ import { canonicalJsonHash, cardPreviewContractErrors, decodedAudiovisualMediaHash, + decodedMediaHash, + decodedMediaHashMatches, + decodedVideoFrameHashCompatibility, galleryExpectedOutput, loadTemplateRuntime, mergeManifestEntries, @@ -23,11 +37,674 @@ import { validateBeforeMedia, validateQualityReview, validateReviewedDerivative, + verifyGallery, } from './template-gallery-harness.mjs'; import { repairDuplicateOutputItems } from './live-proof-provenance.mjs'; +import { canonicalJsonHash as storageJsonHash } from './canonical-json.mjs'; +import { + buildRetainedGalleryProvenance, + RETAINED_GALLERY_PROVENANCE_FORMAT, + validateRetainedGalleryProvenance, +} from './retained-gallery-provenance.mjs'; let runtime; +test('decoded image media reports the actual frame count for a still-image release check', async () => { + const directory = mkdtempSync(join(tmpdir(), 'modiff-image-frames-')); + try { + const still = join(directory, 'still.webp'); + const animated = join(directory, 'animated.webp'); + writeFileSync(still, Buffer.from('UklGRhwAAABXRUJQVlA4TA8AAAAvA8AAAAcQ/Y/+ByKi/wEA', 'base64')); + writeFileSync( + animated, + Buffer.from( + 'UklGRoQAAABXRUJQVlA4WAoAAAACAAAAAwAAAwAAQU5JTQYAAAAAAAAAAABBTk1GKAAAAAAAAAAAAAMAAAMAAMgAAAJWUDhMDwAAAC8DwAAABxD9j/4HIqL/AQBBTk1GKAAAAAAAAAAAAAMAAAMAAMgAAABWUDhMDwAAAC8DwAAABxDR//4HIqL/AQA=', + 'base64', + ), + ); + const options = { measureImageFrames: true }; + const [single, multiple, historical] = await Promise.all([ + decodedMediaHash(still, 'image', options), + decodedMediaHash(animated, 'image', options), + decodedMediaHash(still, 'image'), + ]); + assert.deepEqual([single.frames, multiple.frames], [1, 2]); + assert.equal(historical.frames, undefined); + assert.equal(historical.hash, single.hash); + assert.ok(!technicalMediaErrors(single, { frames: 1 }, 'image').some((error) => error.includes('frames'))); + assert.ok(technicalMediaErrors(multiple, { frames: 1 }, 'image').some((error) => error.includes('frames'))); + } finally { + rmSync(directory, { recursive: true, force: true }); + } +}); + +test('retained Gallery provenance cannot grant approval to another workflow or a replacement association', async () => { + const fixture = subsetVerificationFixture(); + try { + const entry = fixture.manifest.examples.find(({ templateId }) => templateId === 'available'); + const association = { templateId: entry.templateId, qualificationScope: 'exact_retained_recipe' }; + const bundle = { + schemaVersion: 1, + format: RETAINED_GALLERY_PROVENANCE_FORMAT, + templateId: entry.templateId, + association, + }; + assert.throws(() => buildRetainedGalleryProvenance(association), /differs from the approved observation/); + assert.throws( + () => buildRetainedGalleryProvenance({ ...association, templateId: 'smollm2_rain_gauge' }), + /differs from the approved observation/, + ); + const encoded = JSON.stringify(bundle); + entry.provenanceHash = canonicalJsonHash(bundle); + const asset = fixture.storage.assets.find(({ path }) => path === entry.provenancePath.slice(1)); + asset.size = Buffer.byteLength(encoded); + asset.sha256 = `sha256:bytes:${createHash('sha256').update(encoded).digest('hex')}`; + fixture.rights.records.find(({ path }) => path === asset.path).sha256 = asset.sha256; + const identity = (assets) => + `sha256:canonical-json:${storageJsonHash({ schemaVersion: 1, assetVersion: 'fixture', assets })}`; + fixture.storage.assetSetId = identity(fixture.storage.assets); + fixture.storage.totalBytes = fixture.storage.assets.reduce((total, row) => total + row.size, 0); + fixture.source.completeAssetSetId = fixture.storage.assetSetId; + fixture.source.assetSetId = identity( + fixture.storage.assets.filter(({ path }) => !fixture.source.unavailableAssets.includes(path)), + ); + fixture.rights.assetSetId = fixture.storage.assetSetId; + fixture.write(`public${entry.provenancePath}`, encoded); + fixture.flush(); + fixture.options.runtime.lockedSettingsForTemplate = () => ({}); + const result = await verifyGallery({}, 'synthetic-retained', { + ...fixture.options, + templateIds: [entry.templateId], + }); + assert.equal(result.ok, false); + assert.ok( + result.errors.includes('available retained Gallery provenance is outside the exact approved association'), + result.errors.join('\n'), + ); + } finally { + fixture.dispose(); + } +}); + +test( + 'materialized retained examples bind the archived bytes, active recipe and reviewed scope', + { + skip: !process.env.MODIFF_VERIFY_RETAINED_GALLERY, + }, + async () => { + const client = fileURLToPath(new URL('../', import.meta.url)); + const runtime = await loadTemplateRuntime(client); + const root = process.env.MODIFF_VERIFY_RETAINED_GALLERY; + const manifest = JSON.parse(readFileSync(join(root, 'manifest.json'))); + for (const templateId of [ + 'marigold_depth_synthetic_ramp', + 'smollm2_rain_gauge', + 'spandrel_x2_synthetic_gradient', + ]) { + const entry = manifest.examples.find((candidate) => candidate.templateId === templateId); + assert.ok(entry, templateId); + const load = (assetPath) => readFileSync(join(root, assetPath.slice('/template-gallery/'.length))); + const template = runtime.templates.find((item) => item.id === templateId); + assert.ok(template, templateId); + const bundle = JSON.parse(load(entry.provenancePath)); + const options = { + templateRevisionHash: storageJsonHash({ template, settings: runtime.lockedSettingsForTemplate(template) }), + outputBytes: load(entry.outputPath), + beforeBytes: entry.beforePath && load(entry.beforePath), + }; + assert.deepEqual(validateRetainedGalleryProvenance(bundle, entry, options), []); + if (templateId === 'spandrel_x2_synthetic_gradient') { + assert.equal(entry.width, 128); + assert.equal(entry.height, 96); + assert.deepEqual(validateRetainedGalleryProvenance(bundle, { ...entry, width: 64, height: 48 }, options), [ + 'retained Gallery manifest width differs from the approved observation', + 'retained Gallery manifest height differs from the approved observation', + ]); + const quality = JSON.parse(load(entry.qualityReviewPath)); + assert.equal(quality.ratingMethod, 'maintainer_qualitative_acceptance'); + assert.equal(quality.maintainerAcceptance.decision, 'accepted_with_disclosed_limitations'); + assert.ok(Object.values(quality.scores).every((score) => score === null)); + } + assert.ok(validateRetainedGalleryProvenance(bundle, { ...entry, verificationStatus: 'exact' }, options).length); + assert.ok( + validateRetainedGalleryProvenance(bundle, { ...entry, verificationTimestamp: '2026-01-01T00:00:00Z' }, options) + .length, + ); + assert.ok( + validateRetainedGalleryProvenance(bundle, entry, { ...options, templateRevisionHash: 'changed' }).length, + ); + assert.ok( + validateRetainedGalleryProvenance(bundle, entry, { + ...options, + outputBytes: Buffer.concat([options.outputBytes, Buffer.from(' ')]), + }).length, + ); + assert.ok( + validateRetainedGalleryProvenance( + { + ...bundle, + association: { ...bundle.association, originalTaskId: 'must-remain-private' }, + }, + entry, + options, + ).length, + ); + if (options.beforeBytes) { + assert.ok( + validateRetainedGalleryProvenance(bundle, entry, { ...options, beforeBytes: Buffer.alloc(1) }).length, + ); + } + } + }, +); + +test('explicit Gallery selection keeps the default complete verification strict', async () => { + const fixture = subsetVerificationFixture(); + try { + const id = fixture.manifest.examples.find((entry) => entry.templateId !== 'withheld').templateId; + const result = await verifyGallery({}, 'synthetic-scope', { ...fixture.options, templateIds: [id] }); + assert.equal(result.ok, true); + assert.equal(result.examples, 1); + assert.equal(result.explicitlyScoped, true); + for (const templateIds of [[], [id, id], ['missing']]) { + await assert.rejects( + () => verifyGallery({}, 'synthetic-scope', { ...fixture.options, templateIds }), + /distinct existing examples/u, + ); + } + const complete = await verifyGallery({}, 'synthetic-complete', fixture.options); + assert.equal(complete.examples, fixture.manifest.examples.length); + assert.equal(complete.explicitlyScoped, undefined); + } finally { + fixture.dispose(); + } +}); + +test('reviewed history refuses a different source or a changed recipe ledger before decoding media', async () => { + const fixture = subsetVerificationFixture(); + try { + const body = { + schemaVersion: 1, + format: 'modiff.gallery.recipe-history.v1', + source: { repository: 'other/gallery', revision: fixture.source.revision }, + records: [], + }; + fixture.write('config/template-recipe-history.v1.json', { ...body, recordsHash: canonicalJsonHash(body) }); + await assert.rejects( + () => verifyGallery({ reviewedHistory: true }, 'synthetic-history', fixture.options), + /history belongs to a different Dataset/u, + ); + body.source.repository = fixture.source.repoId; + fixture.write('config/template-recipe-history.v1.json', { ...body, recordsHash: 'changed' }); + await assert.rejects( + () => verifyGallery({ reviewedHistory: true }, 'synthetic-history', fixture.options), + /history schema, immutable source or content hash is invalid/u, + ); + assert.deepEqual(fixture.decoded, []); + assert.equal((await verifyGallery({}, 'default-verification', fixture.options)).ok, true); + } finally { + fixture.dispose(); + } +}); + +test( + 'saved Wan media and withheld Ghibli records pass only the explicitly reviewed historical audit', + { skip: !process.env.MODIFF_VERIFY_REVIEWED_HISTORY }, + async () => { + const templateIds = ['flux_lora_ghibli_story', 'wan_22_ti2v_5b_seed_vault']; + const current = await verifyGallery({}, 'current-recipes', { templateIds }); + assert.deepEqual( + current.errors, + templateIds.map((id) => `${id} manifest templateLockHash is stale for the current template revision`), + ); + const saved = await verifyGallery({ reviewedHistory: true }, 'reviewed-recipes', { templateIds }); + assert.deepEqual(saved.errors, []); + assert.equal(saved.verifiedCurrentExamples, 0); + assert.equal(saved.verifiedHistoricalExamples, 1); + assert.deepEqual(saved.historicalRecipeRecords, [ + { templateId: templateIds[0], withheld: true }, + { templateId: templateIds[1], withheld: false }, + ]); + assert.equal(saved.withheldExamples[0].templateId, templateIds[0]); + }, +); + +test('decoded video identity tolerates only the reviewed FFmpeg software banner difference', () => { + const original = Buffer.from( + '#format: frame checksums\n#version: 2\n#hash: MD5\n#software: Lavf61.1.100\n' + + '#tb 0: 1/24\n#media_type 0: video\n#dimensions 0: 2x2\n' + + '#stream#, dts, pts, duration, size, hash\n0, 0, 0, 1, 6, 11111111111111111111111111111111\n', + ); + const expected = `sha256:decoded-video-framemd5:${createHash('sha256').update(original).digest('hex')}`; + const current = Buffer.from(original.toString().replace('Lavf61.1.100', 'Lavf61.7.100')); + const compatibility = decodedVideoFrameHashCompatibility(current); + const decoded = { hash: compatibility.rawHash, frameHashCompatibility: compatibility }; + assert.notEqual(decoded.hash, expected); + assert.equal(decodedMediaHashMatches(decoded, expected), true); + assert.equal(compatibility.observedMuxer, 'Lavf61.7.100'); + assert.equal(decodedMediaHashMatches({ hash: 'decoded:image' }, 'decoded:image'), true); + assert.equal( + decodedMediaHashMatches({ hash: 'decoded:image', frameHashCompatibility: compatibility }, expected), + false, + ); + assert.equal(decodedMediaHashMatches({ ...decoded, hash: 'wrong' }, expected), false); + assert.equal(decodedMediaHashMatches(decoded, undefined), false); + for (const changed of [ + current.toString().replace('11111111111111111111111111111111', '21111111111111111111111111111111'), + current.toString().replace('0, 0, 0, 1, 6,', '0, 0, 1, 1, 6,'), + current.toString().replace('#dimensions 0: 2x2', '#dimensions 0: 4x4'), + current.toString().replace('#tb 0: 1/24', '#tb 0: 1/25'), + current.toString().replace('#software: Lavf61.7.100', '#software: unknown'), + current.toString().replace('#hash: MD5', '#hash: SHA256'), + current.toString().replace('#software: Lavf61.7.100', '#software: Lavf61.7.100\n#software: Lavf61.7.100'), + ]) { + const candidate = decodedVideoFrameHashCompatibility(Buffer.from(changed)); + assert.equal( + decodedMediaHashMatches({ hash: candidate.rawHash, frameHashCompatibility: candidate }, expected), + false, + ); + } + assert.equal(decodedMediaHashMatches({ hash: compatibility.rawHash }, expected), false); +}); + +// Synthetic media and receipts exercise the verifier; they claim no model output or rights approval. +function subsetVerificationFixture() { + const root = mkdtempSync(join(tmpdir(), 'modiff-gallery-subset-')); + const assets = []; + const records = []; + const examples = []; + const write = (relative, value) => { + const filename = join(root, relative); + mkdirSync(dirname(filename), { recursive: true }); + writeFileSync(filename, typeof value === 'string' ? value : JSON.stringify(value)); + }; + const asset = (path, value, held = false) => { + const bytes = typeof value === 'string' ? value : JSON.stringify(value); + const sha256 = `sha256:bytes:${createHash('sha256').update(bytes).digest('hex')}`; + assets.push({ path, size: Buffer.byteLength(bytes), sha256, contentType: 'application/octet-stream' }); + records.push({ + path, + sha256, + publishDecision: held ? 'hold' : 'approved', + holdReason: held ? 'Synthetic permission hold' : null, + }); + if (!held) write(`public/${path}`, bytes); + }; + for (const id of ['available', 'withheld']) { + const bindings = { + templateId: id, + templateLockHash: 'tpl_fixture', + promptSettingsHash: 'ps_fixture', + modelRevision: `repo@${'a'.repeat(40)}`, + runtimeFingerprint: 'runtime_fixture', + graphHash: 'graph_fixture', + proofLockHash: 'proof_fixture', + decodedMediaHash: `decoded:${id}`, + }; + const run = { + template: { id, promptSettingsHash: bindings.promptSettingsHash }, + templateLockHash: bindings.templateLockHash, + modelRevision: bindings.modelRevision, + mediaHash: bindings.decodedMediaHash, + graphHash: bindings.graphHash, + proofLockHash: bindings.proofLockHash, + backendSourceFingerprint: 'backend_fixture', + backendContractFingerprint: 'contract_fixture', + modelCommit: 'a'.repeat(40), + templateRevisionHash: 'revision_fixture', + blockers: [], + }; + const bundle = { schemaVersion: 1, format: 'modiff.gallery.reviewed-provenance.v1', templateId: id, bindings, run }; + const review = { + schemaVersion: 2, + ...bindings, + reviewStatus: 'approved_reviewed', + reviewer: 'Synthetic test fixture', + reviewedAt: '2026-01-01T00:00:00Z', + rubric: { taskAdherence: 5, artifactControl: 5, modalityQuality: 5 }, + scores: { promptAdherence: 5, composition: 5, technicalExecution: 5, templateUsefulness: 5 }, + hardFailures: [], + objectiveChecks: { status: 'pass' }, + modalityReview: { status: 'pass' }, + summary: 'Synthetic verifier fixture with no actual publication approval.', + knownLimitations: [], + }; + const outputPath = `/template-gallery/${id}.webp`; + const provenancePath = `/template-gallery/reviews/${id}.json`; + const qualityReviewPath = `/template-gallery/reviews/${id}.review.json`; + asset(outputPath.slice(1), `synthetic ${id} media`, id === 'withheld'); + asset(provenancePath.slice(1), bundle); + asset(qualityReviewPath.slice(1), review); + examples.push({ + ...bindings, + ...Object.fromEntries( + ['backendSourceFingerprint', 'backendContractFingerprint', 'modelCommit', 'templateRevisionHash'].map((key) => [ + key, + run[key], + ]), + ), + verificationStatus: 'reviewed', + outputPath, + thumbnailPath: outputPath, + mediaHash: bindings.decodedMediaHash, + mediaType: 'image', + verificationTimestamp: review.reviewedAt, + provenancePath, + provenanceHash: canonicalJsonHash(bundle), + qualityReviewPath, + qualityReviewHash: canonicalJsonHash(review), + qualityReviewStatus: review.reviewStatus, + reviewer: review.reviewer, + reviewedAt: review.reviewedAt, + templateInputContractHash: 'inputs_fixture', + }); + } + assets.sort((a, b) => (a.path < b.path ? -1 : 1)); + records.sort((a, b) => (a.path < b.path ? -1 : 1)); + const identity = (rows) => + `sha256:canonical-json:${storageJsonHash({ schemaVersion: 1, assetVersion: 'fixture', assets: rows })}`; + const storage = { + schemaVersion: 1, + assetVersion: 'fixture', + assets, + assetSetId: identity(assets), + status: 'ready', + assetCount: assets.length, + totalBytes: assets.reduce((sum, row) => sum + row.size, 0), + missingAssets: [], + }; + const source = { + schemaVersion: 1, + mode: 'huggingface', + localBasePath: '/template-gallery', + repoType: 'dataset', + repoId: 'fixture/gallery', + revision: 'a'.repeat(40), + pathPrefix: 'template-gallery', + assetManifestPath: '_modiff/template-assets.v1.json', + assetSetId: identity(assets.filter((row) => !row.path.endsWith('/withheld.webp'))), + completeAssetSetId: storage.assetSetId, + unavailableAssets: ['template-gallery/withheld.webp'], + }; + const rights = { schemaVersion: 1, assetSetId: storage.assetSetId, records }; + const manifest = { schemaVersion: 2, examples }; + const flush = () => { + write('config/template-assets.v1.json', storage); + write('config/template-asset-rights.v1.json', rights); + write('src/studio/templateAssetSource.json', source); + write('public/template-gallery/manifest.json', manifest); + }; + flush(); + const decoded = []; + const options = { + root, + runtime: { + templates: examples.map((entry) => ({ + id: entry.templateId, + example: { expectedOutput: { width: 512, height: 512 } }, + })), + promptSettingsHash: () => 'ps_fixture', + templateLockHash: () => 'tpl_fixture', + templateInputContractHash: () => 'inputs_fixture', + }, + decodeMedia: async (filename) => { + decoded.push(filename); + return { hash: 'decoded:available', width: 512, height: 512, nearBlackRatio: 0, lumaStdDev: 20 }; + }, + }; + const dispose = () => { + const actual = realpathSync(root); + assert.equal(dirname(actual), realpathSync(tmpdir())); + assert.ok(basename(actual).startsWith('modiff-gallery-subset-')); + rmSync(actual, { recursive: true, force: true }); + }; + return { root, source, storage, rights, manifest, options, decoded, flush, write, dispose }; +} + +test('Gallery verification retains explicit remote rights holds without treating them as missing published media', async () => { + const fixture = subsetVerificationFixture(); + try { + const result = await verifyGallery({}, 'test-artifact', fixture.options); + assert.deepEqual(result.errors, []); + assert.equal(result.verifiedExamples, 1); + assert.deepEqual(result.withheldExamples, [{ templateId: 'withheld', assets: ['template-gallery/withheld.webp'] }]); + assert.equal(fixture.decoded.length, 1); + } finally { + fixture.dispose(); + } +}); + +test('Gallery verification keeps available media byte, decoded, provenance and review failures blocking', async (t) => { + for (const [label, mutate, expected] of [ + [ + 'missing published media', + (fixture) => unlinkSync(join(fixture.root, 'public/template-gallery/available.webp')), + /available media file missing/, + ], + [ + 'changed published media', + (fixture) => fixture.write('public/template-gallery/available.webp', 'changed media'), + /Published asset byte identity mismatch/, + ], + [ + 'changed decoded output', + (fixture) => { + fixture.options.decodeMedia = async () => ({ + hash: 'wrong', + width: 512, + height: 512, + nearBlackRatio: 0, + lumaStdDev: 20, + }); + }, + /available decoded hash mismatch/, + ], + [ + 'changed withheld entry provenance', + (fixture) => fixture.write('public/template-gallery/reviews/withheld.json', {}), + /withheld provenance hash mismatch/, + ], + [ + 'missing withheld entry review', + (fixture) => unlinkSync(join(fixture.root, 'public/template-gallery/reviews/withheld.review.json')), + /withheld quality review missing/, + ], + ]) { + await t.test(label, async () => { + const fixture = subsetVerificationFixture(); + try { + mutate(fixture); + const result = await verifyGallery({}, 'test-artifact', fixture.options); + assert.equal(result.ok, false); + assert.equal(result.verifiedExamples, 0); + assert.match(result.errors.join('\n'), expected); + } finally { + fixture.dispose(); + } + }); + } +}); + +test('Gallery verification rejects unbound or broadened remote exclusions', async (t) => { + for (const [label, mutate, expected] of [ + [ + 'mutable revision', + (fixture) => { + fixture.source.revision = 'main'; + }, + /immutable/, + ], + [ + 'unknown withheld path', + (fixture) => { + fixture.source.unavailableAssets = ['template-gallery/unknown.webp']; + }, + /rights\/source mismatch/, + ], + [ + 'approved file falsely withheld', + (fixture) => { + fixture.source.unavailableAssets.unshift('template-gallery/available.webp'); + }, + /rights\/source mismatch/, + ], + [ + 'stale rights hash', + (fixture) => { + fixture.rights.records[0].sha256 = `sha256:bytes:${'0'.repeat(64)}`; + }, + /rights\/source mismatch/, + ], + [ + 'duplicate rights rows', + (fixture) => { + fixture.rights.records[0] = fixture.rights.records[1]; + }, + /exact storage manifest/, + ], + [ + 'changed complete manifest', + (fixture) => { + fixture.storage.assets[0].size += 1; + }, + /exact complete storage manifest/, + ], + [ + 'changed subset identity', + (fixture) => { + fixture.source.assetSetId = `sha256:canonical-json:${'0'.repeat(64)}`; + }, + /exact nonempty approved asset subset/, + ], + [ + 'missing hold reason', + (fixture) => { + fixture.rights.records.find((row) => row.publishDecision === 'hold').holdReason = ''; + }, + /rights\/source mismatch/, + ], + [ + 'escape path', + (fixture) => { + fixture.source.unavailableAssets = ['template-gallery/../outside.webp']; + }, + /canonical/, + ], + ]) { + await t.test(label, async () => { + const fixture = subsetVerificationFixture(); + try { + mutate(fixture); + fixture.flush(); + await assert.rejects(verifyGallery({}, 'test-artifact', fixture.options), expected); + } finally { + fixture.dispose(); + } + }); + } +}); + +test('Gallery verification does not apply remote exclusions to a local complete Gallery', async () => { + const fixture = subsetVerificationFixture(); + try { + fixture.source.mode = 'local'; + fixture.flush(); + const result = await verifyGallery({}, 'test-artifact', fixture.options); + assert.equal(result.ok, false); + assert.match(result.errors.join('\n'), /withheld media file missing/); + assert.deepEqual(result.withheldAssets, []); + } finally { + fixture.dispose(); + } +}); + +test('Gallery verification binds every example reference to canonical published storage paths', async (t) => { + for (const [label, mutate, expected] of [ + ...['outputPath', 'thumbnailPath', 'provenancePath', 'qualityReviewPath'].map((field) => [ + `unlisted ${field}`, + (fixture) => { + const entry = fixture.manifest.examples[0]; + const original = readFileSync(join(fixture.root, 'public', entry[field].slice(1)), 'utf8'); + entry[field] = `/template-gallery/unlisted-${field}.json`; + fixture.write(`public${entry[field]}`, original); + }, + /not listed in the complete storage manifest/, + ]), + [ + 'dot alias', + (fixture) => { + fixture.manifest.examples[0].outputPath = '/template-gallery/./available.webp'; + }, + /canonical Gallery path/, + ], + [ + 'traversal alias', + (fixture) => { + fixture.manifest.examples[0].outputPath = '/template-gallery/../template-gallery/available.webp'; + }, + /canonical Gallery path/, + ], + [ + 'held sidecar', + (fixture) => { + fixture.manifest.examples[0].provenancePath = '/template-gallery/withheld.webp'; + }, + /sidecar must be available/, + ], + ]) { + await t.test(label, async () => { + const fixture = subsetVerificationFixture(); + try { + mutate(fixture); + fixture.flush(); + await assert.rejects(verifyGallery({}, 'test-artifact', fixture.options), expected); + assert.equal(fixture.decoded.length, 0); + } finally { + fixture.dispose(); + } + }); + } +}); + +test('Gallery verification rejects an all-withheld Gallery and does not approve held bytes found locally', async () => { + const fixture = subsetVerificationFixture(); + try { + fixture.write('public/template-gallery/withheld.webp', 'synthetic withheld media'); + const result = await verifyGallery({}, 'test-artifact', fixture.options); + assert.equal(result.ok, true); + assert.equal(result.verifiedExamples, 1); + assert.equal(result.withheldAssets[0].reason, 'Synthetic permission hold'); + assert.equal(fixture.decoded.length, 1); + fixture.manifest.examples = fixture.manifest.examples.filter((entry) => entry.templateId === 'withheld'); + fixture.flush(); + const empty = await verifyGallery({}, 'test-artifact', fixture.options); + assert.equal(empty.ok, false); + assert.match(empty.errors.join('\n'), /no available published examples/); + } finally { + fixture.dispose(); + } +}); + +test('Gallery verification refuses a linked directory escape before reading or decoding example media', async () => { + const fixture = subsetVerificationFixture(); + const linkedPath = join(fixture.root, 'public/template-gallery'); + const outsidePublic = join(fixture.root, 'outside-public'); + let linked = false; + try { + renameSync(linkedPath, outsidePublic); + symlinkSync(outsidePublic, linkedPath, process.platform === 'win32' ? 'junction' : 'dir'); + linked = true; + await assert.rejects(verifyGallery({}, 'test-artifact', fixture.options), /not a contained regular file/); + assert.equal(fixture.decoded.length, 0); + } finally { + if (linked) { + if (process.platform === 'win32') rmdirSync(linkedPath); + else unlinkSync(linkedPath); + } + fixture.dispose(); + } +}); + before(async () => { runtime = await loadTemplateRuntime(); }); @@ -415,6 +1092,29 @@ test('video delivery floor accepts native Wan resolution without weakening templ assert.match(lowResolution.join('\n'), /at least 768x480/); }); +test('a reviewed native 3D turntable retains its exact small render', () => { + const hash = 'sha256:decoded-video-framemd5:' + 'a'.repeat(64); + const preview = { mediaHash: hash, width: 256, height: 256, frames: 20, fps: 12 }; + const decoded = { + ...preview, + hash, + durationSeconds: 20 / 12, + uniqueFrameRatio: 1, + nearBlackRatio: 0, + lumaStdDev: 20, + codecName: 'h264', + pixelFormat: 'yuv420p', + }; + assert.deepEqual(technicalMediaErrors(decoded, {}, 'video', preview, true), []); + assert.match(technicalMediaErrors(decoded, {}, 'video', preview).join('\n'), /at least 768x480/); + assert.match( + technicalMediaErrors({ ...decoded, hash: hash.replace(/a+$/u, 'b'.repeat(64)) }, {}, 'video', preview, true).join( + '\n', + ), + /differs from the reviewed retained preview/, + ); +}); + test('public provenance redacts machine paths and source commit ids', () => { const redacted = redactPublicProvenance({ runtime: { @@ -443,9 +1143,40 @@ test('public provenance redacts machine paths and source commit ids', () => { }); }); +test('public provenance redacts removable Linux mounts while retaining public and logical media paths', () => { + assert.deepEqual( + redactPublicProvenance({ + cache: '/run/media/example/External SSD/MoDiff/cache', + source: '/media/example/Archive/source.png', + scratch: '/mnt/private/offload', + gallery: '/template-gallery/runtime-inputs/assets/example.png', + logical: '@data/images/source.png', + }), + { + cache: '/cache', + source: '/source.png', + scratch: '/offload', + gallery: '/template-gallery/runtime-inputs/assets/example.png', + logical: '@data/images/source.png', + }, + ); +}); + test('gallery harness loads all Studio templates from the TypeScript runtime', () => { - assert.equal(runtime.templates.length, 78); - assert.equal(new Set(runtime.templates.map((template) => template.id)).size, 78); + const retained = JSON.parse( + readFileSync(new URL('../config/retained-gallery-approved-batch.v1.json', import.meta.url), 'utf8'), + ); + const expectedCount = 98 + Object.keys(retained).length; + assert.equal(runtime.templates.length, expectedCount); + const ids = new Set(runtime.templates.map((template) => template.id)); + assert.equal(ids.size, expectedCount); + for (const id of Object.keys(retained)) assert.ok(ids.has(id), id); + assert.ok(ids.has('whisper_tiny_blue_cup_transcription')); + assert.ok(ids.has('wav2vec2_station_announcement')); + assert.ok(ids.has('lcm_dawn_alpine_lake')); + assert.ok(ids.has('sana_sprint_monochrome_tiger')); + assert.ok(ids.has('spandrel_x2_synthetic_gradient')); + assert.ok(runtime.templates.some((template) => template.id === 'minimax_h3_image_old_town_cat')); assert.ok(runtime.templates.some((template) => template.id === 'minimax_music3_chamber_pop')); assert.equal( runtime.templates.some((template) => template.id === 'wan_22_i2v_seed_vault'), @@ -454,24 +1185,30 @@ test('gallery harness loads all Studio templates from the TypeScript runtime', ( }); test('Qwen gallery candidates use the runtime locked settings and hashes', () => { + const creatorBaseline = JSON.parse( + readFileSync(new URL('../tests/fixtures/image-template-creator-contracts.v1.json', import.meta.url), 'utf8'), + ); const expectedHashes = { qwen_low_vram_text_rendering: { width: 1024, height: 1024, promptSettingsHash: 'ps_c32e6c86', - templateLockHash: 'tpl_6b3c93e2', + templateLockHash: 'tpl_eb899725', + historicalTemplateLockHash: 'tpl_76f378d2', }, qwen_low_vram_product_concept: { width: 1024, height: 768, promptSettingsHash: 'ps_2eeea545', - templateLockHash: 'tpl_b90c42f9', + templateLockHash: 'tpl_763e4b50', + historicalTemplateLockHash: 'tpl_b9f47949', }, qwen_low_vram_poster_layout: { width: 768, height: 1024, promptSettingsHash: 'ps_124204d1', - templateLockHash: 'tpl_bc67f109', + templateLockHash: 'tpl_b1b11c5a', + historicalTemplateLockHash: 'tpl_e5832679', }, }; @@ -480,6 +1217,37 @@ test('Qwen gallery candidates use the runtime locked settings and hashes', () => assert.ok(template, `${templateId} loaded from STUDIO_TEMPLATES`); const candidate = buildTemplateCandidate(runtime, template); + assert.deepEqual( + candidate.lockedSettings, + creatorBaseline.templates.find((item) => item.templateId === templateId).contract.lockedSettings, + 'the complete retained creative contract remains unchanged', + ); + assert.equal(template.executionSelection.authoringRecipeId, 'retained-qwen-image-text-to-image:v1'); + // The lock includes authoring metadata. Moving the preserved component + // policy into a backend recipe changes it without rebinding historical media. + const historicalTemplate = structuredClone(template); + delete historicalTemplate.executionSelection.authoringRecipeId; + historicalTemplate.executionSelection.componentPolicy = { + attentionBackend: 'auto', + vaeSlicing: true, + vaeTiling: true, + }; + assert.equal(runtime.templateLockHash(historicalTemplate), hashes.historicalTemplateLockHash); + const historicalEntry = { + templateId, + modelRevision: template.example.modelRevision, + templateLockHash: hashes.historicalTemplateLockHash, + promptSettingsHash: hashes.promptSettingsHash, + mediaType: 'image', + graphHash: 'sha256:canonical-graph-v1:test', + mediaHash: 'sha256:decoded-rgba:test', + provenanceHash: 'sha256:canonical-json:test', + qualityReviewHash: 'sha256:canonical-json:test', + qualityReviewStatus: 'approved_exact', + }; + const historicalManifest = { schemaVersion: 2, examples: [historicalEntry] }; + assert.equal(runtime.findManifestEntry(historicalTemplate, historicalManifest), historicalEntry); + assert.equal(runtime.findManifestEntry(template, historicalManifest), undefined); assert.deepEqual(candidate.lockedSettings, runtime.lockedSettingsForTemplate(template)); assert.equal(candidate.promptSettingsHash, runtime.promptSettingsHash(template)); assert.equal(candidate.templateLockHash, runtime.templateLockHash(template)); @@ -780,6 +1548,41 @@ test('lyric video approval cannot bypass listening-based cue alignment review', assert.match(errors.join('\n'), /at least six exact lyric overlay cues/); }); +test('a declared 45-second song with disabled lyric overlay needs no invented caption cues', () => { + const expected = { templateId: 'ace_step_lyric_music_video' }; + const review = { + motionReview: { durationSeconds: 45 }, + lyricSyncReview: { + status: 'not_applicable', + overlayEnabled: false, + emptyLrc: true, + }, + }; + const metadata = { expectedDurationSeconds: 45, lyricOverlayEnabled: false }; + const errors = validateQualityReview(review, expected, 'approved_reviewed', undefined, metadata); + assert.equal( + errors.some((e) => + /duration between 20 and 35|lyric sync|audio alignment|lyric overlay cues|preview-safe area/.test(e), + ), + false, + ); + assert( + validateQualityReview(review, expected, 'approved_reviewed', undefined, { + ...metadata, + lyricOverlayEnabled: true, + }).some((e) => /lyric overlay cues/.test(e)), + ); + assert( + validateQualityReview( + { ...review, motionReview: { durationSeconds: 30 } }, + expected, + 'approved_reviewed', + undefined, + metadata, + ).some((e) => /declared 45-second/.test(e)), + ); +}); + test('multi-reference product approval enforces human-scale bicycle geometry', () => { const expected = { templateId: 'qwen_multi_reference_product', @@ -1045,6 +1848,82 @@ test('layered gallery derivatives stay bound to every captured layer and the sou ); }); +test('retained lossless layer exports reproduce every native output without replacing its identity', () => { + const processorPath = fileURLToPath(new URL('./template-gallery-retained-layer-sheet.py', import.meta.url)); + const processorHash = 'sha256:bytes:' + createHash('sha256').update(readFileSync(processorPath)).digest('hex'); + const items = Array.from({ length: 3 }, (_, index) => ({ + width: 640, + height: 640, + encodedSha256: 'sha256:' + String(index + 1).repeat(64), + decodedSha256: 'sha256:layer:' + index, + })); + const provenance = { + template: { id: 'qwen_layered_portrait' }, + inputs: { items: [{ contentHash: 'sha256:bytes:source' }] }, + output: { collectionHash: 'sha256:collection:layers', items }, + }; + const derivative = { + schemaVersion: 1, + format: 'modiff.gallery.reviewed-derivative.v1', + templateId: 'qwen_layered_portrait', + kind: 'layered_contact_sheet', + layout: 'source-recomposition-three-layers-metrics-3x2', + sourceOutputCollectionHash: provenance.output.collectionHash, + sourceItemHashes: items.map((x) => x.decodedSha256), + sourceInputHash: 'sha256:bytes:source', + decodedMediaHash: 'sha256:decoded:sheet', + processor: { + path: 'scripts/template-gallery-retained-layer-sheet.py', + contentHash: processorHash, + role: 'byte-identical-retained-sheet-reproduction', + }, + recomposition: { maxMeanAbsoluteError: 4.3, threshold: 8, status: 'pass' }, + creationTimeReviewCaptionPreserved: true, + losslessExports: { + schemaVersion: 1, + verification: 'native-webp-quality-100-byte-reproduction', + items: items.map((item, index) => ({ + index, + width: 640, + height: 640, + mode: 'RGBA', + nativeEncodedSha256: item.encodedSha256, + encodedSha256: 'sha256:bytes:' + String(index + 5).repeat(64), + rgbaPixelSha256: 'a'.repeat(64), + })), + }, + }; + const expected = { templateId: 'qwen_layered_portrait', decodedMediaHash: derivative.decodedMediaHash }; + assert.deepEqual(validateReviewedDerivative(provenance, derivative, expected), []); + for (const mutate of [ + (x) => { + x.losslessExports.items.reverse(); + }, + (x) => { + x.losslessExports.items.pop(); + }, + (x) => { + x.losslessExports.items[0].nativeEncodedSha256 = 'sha256:' + '0'.repeat(64); + }, + (x) => { + x.losslessExports.items[0].rgbaPixelSha256 = 'invalid'; + }, + (x) => { + x.losslessExports.items[0].width = 1024; + }, + (x) => { + x.creationTimeReviewCaptionPreserved = false; + }, + (x) => { + x.processor.role = 'original-producer'; + }, + ]) { + const changed = structuredClone(derivative); + mutate(changed); + assert.match(validateReviewedDerivative(provenance, changed, expected).join('\n'), /lossless exports/); + } +}); + test('reviewed audio remux derivatives bind source video, replacement audio, operation, and final AV identity', () => { const processorPath = fileURLToPath(new URL('./align-subway-strum-review.py', import.meta.url)); const processorHash = `sha256:bytes:${createHash('sha256').update(readFileSync(processorPath)).digest('hex')}`; diff --git a/scripts/template-gallery-maintainer-acceptance.test.mjs b/scripts/template-gallery-maintainer-acceptance.test.mjs new file mode 100644 index 00000000..90747b96 --- /dev/null +++ b/scripts/template-gallery-maintainer-acceptance.test.mjs @@ -0,0 +1,217 @@ +import assert from 'node:assert/strict'; +import test from 'node:test'; +import { canonicalJsonHash, validateQualityReview } from './template-gallery-harness.mjs'; + +function fixture() { + const expected = { + templateId: 'example_image', + templateLockHash: 'tpl_example', + promptSettingsHash: 'ps_example', + modelRevision: 'example/model@' + 'a'.repeat(40), + runtimeFingerprint: 'sha256:stable-runtime-v1:' + 'b'.repeat(64), + graphHash: 'sha256:canonical-graph-v1:' + 'c'.repeat(64), + proofLockHash: 'sha256:live-proof-lock-v1:' + 'd'.repeat(64), + decodedMediaHash: 'sha256:decoded-rgba:' + 'e'.repeat(64), + }; + const review = { + schemaVersion: 2, + ...expected, + reviewStatus: 'approved_reviewed', + reviewer: 'Example maintainer', + reviewedAt: '2026-11-10T10:00:00.000Z', + rubric: { taskAdherence: 3, artifactControl: 4, modalityQuality: 4 }, + scores: { promptAdherence: 3, composition: 4, technicalExecution: 4, templateUsefulness: 3 }, + hardFailures: [], + objectiveChecks: { status: 'pass' }, + modalityReview: { status: 'pass' }, + summary: 'The maintainer accepts the useful example with its documented composition limitation.', + knownLimitations: ['The person stands centrally instead of in the requested right third.'], + }; + review.maintainerAcceptance = { + schemaVersion: 1, + decision: 'accepted_with_disclosed_limitations', + reviewer: review.reviewer, + acceptedAt: review.reviewedAt, + statement: 'I accept this reviewed asset and request its registration with the disclosed limitations.', + acceptedReviewHash: canonicalJsonHash(review), + }; + return { review, expected }; +} + +test('explicit maintainer acceptance retains the original below-threshold quality scores', () => { + const { review, expected } = fixture(); + assert.deepEqual(validateQualityReview(review, expected, 'approved_reviewed'), []); + assert.equal(review.scores.promptAdherence, 3); + assert.equal(review.rubric.taskAdherence, 3); +}); + +test('ordinary reviews retain the four-out-of-five minimum', () => { + const { review, expected } = fixture(); + delete review.maintainerAcceptance; + assert.match(validateQualityReview(review, expected, 'approved_reviewed').join('\n'), /between 4 and 5/); +}); + +for (const [name, mutate] of Object.entries({ + media: (r) => { + r.decodedMediaHash += 'changed'; + }, + graph: (r) => { + r.graphHash += 'changed'; + }, + score: (r) => { + r.scores.promptAdherence = 2; + }, + limitation: (r) => { + r.knownLimitations[0] = 'A different defect.'; + }, + reviewer: (r) => { + r.maintainerAcceptance.reviewer = 'Someone else'; + }, + timestamp: (r) => { + r.maintainerAcceptance.acceptedAt = '2026-11-11T10:00:00.000Z'; + }, + statement: (r) => { + r.maintainerAcceptance.statement = ''; + }, + decision: (r) => { + r.maintainerAcceptance.decision = 'automatic'; + }, + extra: (r) => { + r.maintainerAcceptance.skipTechnicalProof = true; + }, + missing: (r) => { + delete r.maintainerAcceptance.acceptedReviewHash; + }, +})) { + test(`maintainer acceptance rejects a changed ${name}`, () => { + const { review, expected } = fixture(); + mutate(review); + assert.notDeepEqual(validateQualityReview(review, expected, 'approved_reviewed'), []); + }); +} + +test('acceptance cannot waive invalid scores, hard failures or objective checks', () => { + for (const mutate of [ + (r) => { + r.scores.promptAdherence = 0; + }, + (r) => { + r.hardFailures = ['Missing requested output.']; + }, + (r) => { + r.objectiveChecks.status = 'fail'; + }, + (r) => { + r.modalityReview.status = 'fail'; + }, + (r) => { + r.knownLimitations = []; + }, + ]) { + const { review, expected } = fixture(); + mutate(review); + const acceptance = review.maintainerAcceptance; + delete review.maintainerAcceptance; + acceptance.acceptedReviewHash = canonicalJsonHash(review); + review.maintainerAcceptance = acceptance; + assert.notDeepEqual(validateQualityReview(review, expected, 'approved_reviewed'), []); + } +}); + +function videoFixture() { + const { review, expected } = fixture(); + expected.templateId = 'ltx_video_text_to_video'; + expected.decodedMediaHash = 'sha256:decoded-video:' + 'e'.repeat(64); + Object.assign(review, expected, { + schemaVersion: 4, + physicalConsistency: { status: 'pass', checks: ['Coherent track.', 'Stable forest.', 'Plausible horizon.'] }, + visualDiversity: { + status: 'pass', + themeId: 'forest-rail', + nearestTemplateId: 'other_video', + distinctFromNearest: true, + }, + visualIntent: 'photoreal', + realismReview: { + status: 'pass', + looksPhotographic: true, + physicallyPlausibleLighting: true, + physicallyPlausibleMaterials: true, + physicallyPlausibleDynamics: true, + }, + motionReview: { + status: 'limited', + fullPlaybackReviewed: true, + frameCount: 121, + durationSeconds: 5.041667, + sceneMotionCoveragePercent: 60, + visibleMotionMilestones: ['Sleepers pass.', 'Post passes.', 'Tunnel approaches.'], + temporalDefects: ['Minor overhead-wire deformation.'], + }, + temporalGeometryReview: { + status: 'limited', + subjectMorphing: 'visible', + scaleDrift: 'none', + contactSliding: 'none', + frameGlitches: 'none', + }, + cardPreviewReview: { + status: 'pass', + reviewedAtCardSize: true, + readsAsMovingVideo: true, + foregroundMotionMilestones: ['Sleepers pass.', 'Post passes.', 'Tunnel approaches.'], + }, + userFeedbackResolution: { + status: 'pass', + replacementOutput: true, + resolvedIssues: ['The replacement has continuous scene travel.', 'Foreground posts visibly pass the camera.'], + }, + }); + const acceptance = review.maintainerAcceptance; + delete review.maintainerAcceptance; + acceptance.acceptedFindings = [ + 'dynamic video review motionReview.status must be pass', + 'dynamic video review temporalDefects must be an empty array', + 'dynamic video review requires passing temporal geometry review', + 'dynamic video temporalGeometryReview.subjectMorphing must be none', + ]; + acceptance.acceptedReviewHash = canonicalJsonHash(review); + review.maintainerAcceptance = acceptance; + return { review, expected }; +} + +test('a maintainer can retain expressly accepted temporal findings in a reviewed video', () => { + const { review, expected } = videoFixture(); + assert.deepEqual(validateQualityReview(review, expected, 'approved_reviewed'), []); + assert.equal(review.temporalGeometryReview.subjectMorphing, 'visible'); + delete review.maintainerAcceptance; + assert.match(validateQualityReview(review, expected, 'approved_reviewed').join('\n'), /subjectMorphing/); +}); + +test('visual acceptance still requires playback, card review and technical duration evidence', () => { + for (const mutate of [ + (r) => { + r.motionReview.fullPlaybackReviewed = false; + }, + (r) => { + r.cardPreviewReview.reviewedAtCardSize = false; + }, + (r) => { + r.motionReview.frameCount = 1; + }, + (r) => { + r.motionReview.durationSeconds = 1; + }, + ]) { + const { review, expected } = videoFixture(); + mutate(review); + const acceptance = review.maintainerAcceptance; + delete review.maintainerAcceptance; + acceptance.acceptedReviewHash = canonicalJsonHash(review); + review.maintainerAcceptance = acceptance; + assert.notDeepEqual(validateQualityReview(review, expected, 'approved_reviewed'), []); + } + const { review, expected } = videoFixture(); + review.maintainerAcceptance.acceptedFindings.push('execution.resourceCandidateId is missing.'); + assert.notDeepEqual(validateQualityReview(review, expected, 'approved_reviewed'), []); +}); diff --git a/scripts/template-gallery-repair-contract.mjs b/scripts/template-gallery-repair-contract.mjs new file mode 100644 index 00000000..e0d03593 --- /dev/null +++ b/scripts/template-gallery-repair-contract.mjs @@ -0,0 +1,193 @@ +import { readdirSync } from 'node:fs'; +import { extname } from 'node:path'; +import { canonicalGraphIdentity, stableStringify } from './live-proof-provenance.mjs'; + +const MEDIA_EXTENSIONS = new Set([ + '.png', + '.webp', + '.jpg', + '.jpeg', + '.wav', + '.flac', + '.mp3', + '.m4a', + '.ogg', + '.mp4', + '.webm', + '.mov', + '.mkv', +]); + +export function retainedGalleryMediaFiles(mediaDir, base) { + return readdirSync(mediaDir, { withFileTypes: true }) + .filter( + (entry) => + entry.isFile() && + entry.name.startsWith(`${base}.`) && + !entry.name.includes('.before.') && + !entry.name.includes('.recomposed.') && + !entry.name.includes('.before-repair-') && + MEDIA_EXTENSIONS.has(extname(entry.name).toLowerCase()), + ) + .map((entry) => entry.name) + .sort((left, right) => { + const itemIndex = (name) => { + const match = name.match(/\.item(\d+)\./); + return match ? Number(match[1]) : 1; + }; + return itemIndex(left) - itemIndex(right) || left.localeCompare(right); + }); +} + +const MEDIA_FIELDS = new Map([ + ['sourceVideo', 'source_video'], + ['maskVideo', 'mask_video'], + ['controlVideo', 'control_video'], + ['sourceAudio', 'source_audio'], + ['referenceAudio', 'reference_audio'], +]); + +function record(value) { + return value && typeof value === 'object' && !Array.isArray(value) ? value : null; +} + +function inputIdentities(items = []) { + // The capture contract names references reference_image_1, _2, etc. Their + // indexed role preserves order even though provenance sorts records by role. + return items + .map(({ role, contentHash, sha256, byteSize }) => ({ role, contentHash: contentHash ?? sha256, byteSize })) + .sort((left, right) => stableStringify(left).localeCompare(stableStringify(right))); +} + +export function assertRetainedExecutionIdentity(original, repaired) { + for (const field of [ + 'taskId', + 'capturedAt', + 'backendSourceFingerprint', + 'backendContractFingerprint', + 'runtimeFingerprint', + 'graphHash', + 'modelRevision', + 'modelCommit', + 'inputArtifactsHash', + ]) { + if (!original?.[field] || original[field] !== repaired?.[field]) { + throw new Error(`Retained proof repair would change original execution identity ${field}.`); + } + } + if ( + !original?.runtime?.backendSource || + stableStringify(original.runtime.backendSource) !== stableStringify(repaired?.runtime?.backendSource) + ) { + throw new Error('Retained proof repair would replace the original backend source inventory.'); + } + if (!original?.model || stableStringify(original.model) !== stableStringify(repaired?.model)) { + throw new Error('Retained proof repair would change the original model artifact identity.'); + } + if ( + !Array.isArray(original?.models?.items) || + stableStringify(original.models.items) !== stableStringify(repaired?.models?.items) + ) { + throw new Error('Retained proof repair would replace the original complete model set.'); + } + const items = original?.output?.items; + if ( + !Array.isArray(items) || + items.length === 0 || + original.output.count !== items.length || + !original.output.collectionHash || + items.some( + (item, index) => item?.index !== index || !item?.mediaType || !item?.encodedSha256 || !item?.decodedSha256, + ) + ) { + throw new Error('Retained proof repair requires the original ordered output identities.'); + } + if (stableStringify(original.output) !== stableStringify(repaired?.output)) { + throw new Error('Retained proof repair would change the original ordered output identities.'); + } +} + +// Repair may recover metadata from the original execution. It cannot confer the +// current template's authority on a historical graph or changed creator recipe. +export function retainedTemplateBinding({ runtime, template, original, output, run, events, inputArtifacts }) { + const blockers = []; + const retained = record(original?.template); + const currentSettings = runtime.lockedSettingsForTemplate(template); + const retainedSettings = record(retained?.lockedSettings); + const form = record(output?.formSnapshot); + if (!retainedSettings) blockers.push('original template locked settings are missing'); + if (!form) blockers.push('the original executed form snapshot is missing'); + if (retained?.id !== template.id || output?.templateId !== template.id) { + blockers.push('original template identity does not match the selected template'); + } + if (!run?.taskId || original?.taskId !== run.taskId || output?.taskId !== run.taskId) { + blockers.push('original provenance and output do not identify the retained task'); + } + if (!Number.isFinite(Date.parse(original?.capturedAt))) blockers.push('original capture timestamp is missing'); + + for (const [field, expected] of Object.entries(currentSettings)) { + if (!retainedSettings || !Object.hasOwn(retainedSettings, field)) { + blockers.push(`original template setting ${field} is missing`); + } else if (stableStringify(retainedSettings[field]) !== stableStringify(expected)) { + blockers.push(`creator setting ${field} changed since the original run`); + } + const mediaRole = MEDIA_FIELDS.get(field); + const boundMedia = mediaRole && !expected && inputArtifacts?.some((item) => item.role === mediaRole); + if (!form || !Object.hasOwn(form, field)) { + blockers.push(`consumed form setting ${field} is missing`); + } else if (!boundMedia && stableStringify(form[field]) !== stableStringify(expected)) { + blockers.push(`consumed form setting ${field} differs from the creator recipe`); + } + } + if (stableStringify(retainedSettings) !== stableStringify(currentSettings)) { + blockers.push('the complete original locked settings differ from the current template'); + } + const revision = original?.models?.revisionLock ?? original?.modelRevision; + for (const [field, expected] of [ + ['promptSettingsHash', runtime.promptSettingsHash(template)], + ['catalogTemplateLockHash', runtime.templateLockHash(template)], + ['resolvedTemplateLockHash', runtime.templateLockHash(template, revision)], + ]) { + if (!retained?.[field] || retained[field] !== expected) { + blockers.push(`original ${field} differs from the current template; retain it as historical evidence`); + } + } + + const graph = canonicalGraphIdentity(output?.apiGraphSnapshot); + if ( + graph.canonicalGraph.nodes.length === 0 || + original?.graph?.hash !== graph.hash || + original?.graphHash !== graph.hash || + stableStringify(original?.graph?.canonicalGraph) !== stableStringify(graph.canonicalGraph) + ) { + blockers.push('the retained executed graph does not match the original provenance graph'); + } + for (const type of ['graph_completed', 'task_completed']) { + if (!events?.some((event) => event?.type === type && event?.task_id === run?.taskId)) { + blockers.push(`the original ${type} receipt is missing for the retained task`); + } + } + for (const nodeId of new Set(output?.apiGraphSnapshot?.paths?.flat() ?? [])) { + if ( + !events?.some( + (event) => + event?.type === 'executed' && + event?.task_id === run?.taskId && + event?.node === nodeId && + !['failed', 'cancelled', 'running'].includes(event?.status), + ) + ) { + blockers.push(`original execution receipt is missing for graph node ${nodeId}`); + } + } + if ( + !Array.isArray(original?.inputs?.items) || + stableStringify(inputIdentities(original.inputs.items)) !== stableStringify(inputIdentities(inputArtifacts)) + ) { + blockers.push('retained input media does not match the original pinned input identities'); + } + if (blockers.length > 0) { + throw new Error(`Retained proof repair cannot bind the current recipe: ${blockers.join('; ')}.`); + } + return { ...retained, capturedAt: original.capturedAt }; +} diff --git a/scripts/template-gallery-repair-evidence.mjs b/scripts/template-gallery-repair-evidence.mjs index 98686431..d7f6fa04 100644 --- a/scripts/template-gallery-repair-evidence.mjs +++ b/scripts/template-gallery-repair-evidence.mjs @@ -15,6 +15,11 @@ import { resolvedModelReposFromOutput, selectInstalledModelIdentity, } from './live-proof-provenance.mjs'; +import { + assertRetainedExecutionIdentity, + retainedGalleryMediaFiles, + retainedTemplateBinding, +} from './template-gallery-repair-contract.mjs'; const ROOT = process.cwd(); @@ -63,6 +68,13 @@ async function main() { ); } } + const provenancePath = join(evidenceDir, `${base}.provenance.json`); + if (!existsSync(provenancePath)) { + throw new Error( + 'Retained proof repair requires original run provenance; current template hashes cannot replace missing original template authority.', + ); + } + const originalProvenance = JSON.parse(readFileSync(provenancePath, 'utf8')); const outputEvidence = JSON.parse(readFileSync(outputPath, 'utf8')); const eventEvidence = JSON.parse(readFileSync(eventsPath, 'utf8')); const nodesPayload = JSON.parse(readFileSync(nodesPath, 'utf8')); @@ -71,21 +83,7 @@ async function main() { const backendSourceAfter = JSON.parse(readFileSync(backendSourceAfterPath, 'utf8')); const backendSource = backendSourceBefore?.identity; const { output, run, terminalTask } = outputEvidence; - const retainedMedia = readdirSync(mediaDir) - .filter( - (name) => - name.startsWith(`${base}.`) && - !name.includes('.before.') && - !name.includes('.recomposed.') && - !name.endsWith('.json'), - ) - .sort((left, right) => { - const itemIndex = (name) => { - const match = name.match(/\.item(\d+)\./); - return match ? Number(match[1]) : 1; - }; - return itemIndex(left) - itemIndex(right) || left.localeCompare(right); - }); + const retainedMedia = retainedGalleryMediaFiles(mediaDir, base); if (retainedMedia.length === 0) throw new Error(`Retained media for ${base} is missing.`); const runtime = await loadTemplateRuntime(ROOT); @@ -101,6 +99,19 @@ async function main() { return identity; }); const modelSet = modelSetIdentity(identities); + const inputArtifacts = inputArtifactsForOverrides(output.formSnapshot); + const originalBinding = retainedTemplateBinding({ + runtime, + template, + original: originalProvenance, + output, + run, + events, + inputArtifacts, + }); + if (modelSet.revisionLock !== originalProvenance.modelRevision) { + throw new Error('Retained model evidence does not match the original model revision lock.'); + } const mediaPaths = retainedMedia.map((mediaFile) => join(mediaDir, mediaFile)); const analyses = await Promise.all( mediaPaths.map(async (mediaPath, index) => { @@ -148,18 +159,17 @@ async function main() { outputCount: analyses.length, analyses, }; - const catalogLock = runtime.templateLockHash(template); const provenance = createRunProvenance({ templateId, - lockedSettings: runtime.lockedSettingsForTemplate(template), - promptSettingsHash: runtime.promptSettingsHash(template), - catalogTemplateLockHash: catalogLock, - resolvedTemplateLockHash: runtime.templateLockHash(template, modelSet.revisionLock), + lockedSettings: originalBinding.lockedSettings, + promptSettingsHash: originalBinding.promptSettingsHash, + catalogTemplateLockHash: originalBinding.catalogTemplateLockHash, + resolvedTemplateLockHash: originalBinding.resolvedTemplateLockHash, apiGraph: output.apiGraphSnapshot, nodesPayload, modelIdentity: identities[0], modelIdentities: identities, - inputArtifacts: inputArtifactsForOverrides(output.formSnapshot), + inputArtifacts, runtimeFingerprint: selectedRuntimeFingerprint, deterministicMode: deterministicEvent?.deterministicMode ?? output.apiGraphSnapshot?.deterministicMode, backendSource: sourceEvidence.identity, @@ -168,12 +178,27 @@ async function main() { executionReceipt: executionReceiptForProvenance(completionEvent, terminalTask), taskId: run.taskId, expectedOutput: template.example?.expectedOutput, + capturedAt: originalBinding.capturedAt, }); if (provenance.blockers.length) throw new Error(`Retained provenance is incomplete: ${provenance.blockers.join(' ')}`); + assertRetainedExecutionIdentity(originalProvenance, provenance); - writeFileSync(eventsPath, `${JSON.stringify({ taskId: run.taskId, executionReceipts, events }, null, 2)}\n`); - writeFileSync(join(evidenceDir, `${base}.provenance.json`), `${JSON.stringify(provenance, null, 2)}\n`); + for (const sidecar of [eventsPath, provenancePath]) { + const before = readFileSync(sidecar); + const digest = createHash('sha256').update(before).digest('hex'); + const backup = `${sidecar}.before-repair-${digest}`; + if (!existsSync(backup)) writeFileSync(backup, before, { flag: 'wx' }); + if (!readFileSync(backup).equals(before)) throw new Error('An immutable repair backup has different bytes.'); + } + const originalSidecars = [eventsPath, provenancePath].map((path) => ({ path, bytes: readFileSync(path) })); + try { + writeFileSync(eventsPath, `${JSON.stringify({ taskId: run.taskId, executionReceipts, events }, null, 2)}\n`); + writeFileSync(provenancePath, `${JSON.stringify(provenance, null, 2)}\n`); + } catch (error) { + for (const sidecar of originalSidecars) writeFileSync(sidecar.path, sidecar.bytes); + throw error; + } console.log( JSON.stringify( { diff --git a/scripts/template-gallery-retained-layer-sheet.py b/scripts/template-gallery-retained-layer-sheet.py new file mode 100644 index 00000000..378ef54b --- /dev/null +++ b/scripts/template-gallery-retained-layer-sheet.py @@ -0,0 +1,156 @@ +#!/usr/bin/env python3 +"""Reproduce retained review-sheet bytes and bind lossless layers to native media. + +The optional font is supplied by the operator. Its bytes are never bundled; +the receipt records its basename and hash. The portable default uses Pillow. +This processor neither runs a model nor changes an approved original file. +""" +from __future__ import annotations + +import argparse +import hashlib +import io +import json +from pathlib import Path + +from PIL import Image, ImageChops, ImageDraw, ImageFont, ImageOps, ImageStat, __version__, features + + +def digest(body: bytes) -> str: + return hashlib.sha256(body).hexdigest() + + +def rgba(path: Path, *, layer: bool = False) -> tuple[Image.Image, bytes]: + path = path.resolve(strict=True) + if not path.is_file() or not 0 < path.stat().st_size <= 64 * 1024**2: + raise ValueError("Review input is missing or exceeds its finite file limit") + body = path.read_bytes() + with Image.open(io.BytesIO(body)) as opened: + if opened.width * opened.height > 32 * 1024**2: + raise ValueError("Review input exceeds its finite pixel limit") + opened.load() + if layer and opened.mode != "RGBA": + raise ValueError("Lossless layers must retain their native RGBA channels") + image = ImageOps.exif_transpose(opened).convert("RGBA") + return image, body + + +def reproduce(source: Image.Image, layers: list[Image.Image], settings: dict, *, font: Path | None): + if len(layers) != 3 or any(layer.size != layers[0].size for layer in layers): + raise ValueError("This retained layout requires three equally sized RGBA layers") + recomposed = Image.new("RGBA", layers[0].size, (0, 0, 0, 0)) + for layer in layers: + recomposed = Image.alpha_composite(recomposed, layer) + resized_source = source.resize(recomposed.size, Image.Resampling.LANCZOS).convert("RGB") + errors = ImageStat.Stat(ImageChops.difference(resized_source, recomposed.convert("RGB"))).mean + maximum = max(errors) + if maximum > 8: + raise ValueError(f"Recomposition exceeds the 8/255 boundary: {maximum:.3f}") + main_font = ImageFont.truetype(str(font), 20) if font else ImageFont.load_default(size=20) + small_font = ImageFont.truetype(str(font), 19) if font else ImageFont.load_default(size=19) + canvas = Image.new("RGB", (1536, 1108), "#121820") + draw = ImageDraw.Draw(canvas) + + def tile(image: Image.Image, title: str, column: int, row: int): + image = image.convert("RGBA").resize((512, 512), Image.Resampling.LANCZOS) + checker = Image.new("RGBA", (512, 512)) + checker_draw = ImageDraw.Draw(checker) + for y in range(0, 512, 16): + for x in range(0, 512, 16): + checker_draw.rectangle((x, y, x + 15, y + 15), + fill="#d6d8dd" if (x // 16 + y // 16) % 2 else "#f4f5f7") + canvas.paste(Image.alpha_composite(checker, image).convert("RGB"), (column * 512, row * 554 + 42)) + draw.text((column * 512 + 12, row * 554 + 8), title, font=main_font, fill="white") + + tile(source, "Exact source · review resize", 0, 0) + tile(recomposed, "Recomposition · original layer order", 1, 0) + for index, layer in enumerate(layers): + column, row = ((2, 0), (0, 1), (1, 1))[index] + tile(layer, f"Layer {index} · checkerboard = transparent", column, row) + width, height = layers[0].size + lines = ["Current native template", f"{width} × {height} · 3 RGBA layers", + f"{settings['steps']} steps · seed {settings['seed']} · guidance {settings['guidanceScale']:g}", + "Full BF16 · Auto · model CPU offload", "", "Recomposition: PASS", "Maximum channel mean error:", + f"{maximum:.2f} / 255 (limit 8)", "", "Actual source pixels retained", + "before encoding and after completion.", "", "Generated layers are unchanged.", + "Display tiles resized for review only.", "Awaiting visual/rights approval."] + for index, line in enumerate(lines): + draw.text((1038, 570 + index * 30), line, font=small_font, + fill="#b3ddc2" if index in (5, 7) else "white") + return canvas, {"meanAbsoluteRgb": errors, "maxMeanAbsoluteError": maximum, "threshold": 8, "status": "pass"} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--source", required=True, type=Path) + parser.add_argument("--layers", required=True, nargs=3, type=Path) + parser.add_argument("--run-provenance", required=True, type=Path) + parser.add_argument("--output", required=True, type=Path) + parser.add_argument("--derivative-provenance", required=True, type=Path) + parser.add_argument("--font", type=Path) + parser.add_argument("--expected-approved-sha256") + args = parser.parse_args() + if args.output.exists() or args.derivative_provenance.exists(): + raise ValueError("Reproduction must use new paths; approved originals are never overwritten") + run_path = args.run_provenance.resolve(strict=True) + if not 0 < run_path.stat().st_size <= 16 * 1024**2: + raise ValueError("Run provenance exceeds its finite file limit") + run = json.loads(run_path.read_bytes()) + settings = run["template"]["lockedSettings"] + plan = run["graph"]["executionPlan"] + if (settings["layers"] != 3 or settings["dtype"] != "bfloat16" + or plan["resourceMode"] != "auto" or plan["offloadMode"] != "model_cpu"): + raise ValueError("Retained caption requires its actual three-layer BF16 Auto/model-CPU recipe") + source, source_body = rgba(args.source) + source_hash = "sha256:bytes:" + digest(source_body) + if source_hash not in {item["contentHash"] for item in run["inputs"]["items"]}: + raise ValueError("Source bytes are not bound to the native run") + items = run["output"]["items"] + if len(items) != 3: + raise ValueError("Native provenance must retain all three output images") + layers, exports = [], [] + for index, path in enumerate(args.layers): + image, body = rgba(path, layer=True) + encoded = io.BytesIO() + image.save(encoded, format="WEBP", quality=100) + native_hash = "sha256:" + digest(encoded.getvalue()) + if native_hash != items[index]["encodedSha256"]: + raise ValueError("Lossless layer does not reproduce the native quality-100 WebP bytes") + layers.append(image) + exports.append({"index": index, "encodedSha256": "sha256:bytes:" + digest(body), + "rgbaPixelSha256": digest(image.tobytes()), "nativeEncodedSha256": native_hash, + "width": image.width, "height": image.height, "mode": "RGBA"}) + font = args.font.resolve(strict=True) if args.font else None + if font and (not font.is_file() or not 0 < font.stat().st_size <= 32 * 1024**2): + raise ValueError("Selected font exceeds its finite file limit") + sheet, metrics = reproduce(source, layers, settings, font=font) + encoded_sheet = io.BytesIO() + sheet.save(encoded_sheet, format="PNG") + body = encoded_sheet.getvalue() + if args.expected_approved_sha256 and digest(body) != args.expected_approved_sha256: + raise ValueError("Reproduction differs from the exact approved sheet; original bytes remain untouched") + record = {"schemaVersion": 1, "format": "modiff.gallery.reviewed-derivative.v1", "templateId": run["template"]["id"], + "kind": "layered_contact_sheet", "layout": "source-recomposition-three-layers-metrics-3x2", + "sourceOutputCollectionHash": run["output"]["collectionHash"], + "sourceItemHashes": [item["decodedSha256"] for item in items], "sourceInputHash": source_hash, + "decodedMediaHash": None, "encodedMediaHash": "sha256:bytes:" + digest(body), + "processor": {"path": "scripts/template-gallery-retained-layer-sheet.py", + "contentHash": "sha256:bytes:" + digest(Path(__file__).read_bytes()), + "role": "byte-identical-retained-sheet-reproduction"}, + "losslessExports": {"schemaVersion": 1, "verification": "native-webp-quality-100-byte-reproduction", + "items": exports}, "recomposition": metrics, + "toolchain": {"pillow": __version__, "webp": features.version_module("webp"), + "font": {"name": font.name, "sha256": digest(font.read_bytes())} if font else {"name": "pillow-default"}}, + "creationTimeReviewCaptionPreserved": True} + args.output.parent.mkdir(parents=True, exist_ok=True) + args.derivative_provenance.parent.mkdir(parents=True, exist_ok=True) + with args.output.open("xb") as handle: + handle.write(body) + with args.derivative_provenance.open("x", encoding="utf-8") as handle: + json.dump(record, handle, indent=2, ensure_ascii=False) + print(json.dumps({"encodedMediaHash": record["encodedMediaHash"], "losslessLayers": len(exports), + "maxMeanAbsoluteError": metrics["maxMeanAbsoluteError"], "approvedBytesMatched": bool(args.expected_approved_sha256)})) + + +if __name__ == "__main__": + main() diff --git a/scripts/template-gallery-runner.mjs b/scripts/template-gallery-runner.mjs index 835fdae7..c759035b 100644 --- a/scripts/template-gallery-runner.mjs +++ b/scripts/template-gallery-runner.mjs @@ -394,8 +394,9 @@ Use --allow-non-exact only to capture a currently non-exact template after all o its model and input locks have been supplied. The resulting evidence must still pass the normal two-run comparison and manual quality review before publishing. -Use --allow-blocked-probe only for bounded qualification evidence. It never -permits direct publishing of a blocked template. +Use --allow-blocked-probe only for bounded qualification evidence. Combine it +with --record-qualification to retain a successful locked proof while the card +remains blocked. It never permits direct publishing of a blocked template. Options: --server Backend URL. Default: ${DEFAULT_SERVER} @@ -655,6 +656,9 @@ export async function installEphemeralGalleryStorage(page) { for (const key of persistentKeys) { localStorage.removeItem(key); + sessionStorage.removeItem(key); + // Keep legacy recovery bytes intact without hydrating foreign graphs in this owned test page. + originalSetItem.call(sessionStorage, `${key}.legacy-recovered.v1`, '1'); } }); } @@ -1176,7 +1180,136 @@ export async function clearRuntimeBetweenRuns(server, fetchImpl = fetch) { return payload; } +function executionReceiptForNode(node, taskId, websocketEvents, allowCached = false) { + const name = `${node.module}.${node.action}`; + const receipts = websocketEvents.filter( + (event) => event?.type === 'executed' && event?.task_id === taskId && event?.node === node.id, + ); + if (receipts.length === 0) throw new Error(`No execution receipt was captured for ${name} (${node.id}).`); + const receipt = receipts.find((event) => event.status !== 'cached' && event.hasChanged !== false); + if (!receipt && !allowCached) + throw new Error(`${name} returned cached output; this is not an independent duplicate run.`); + return { module: node.module, action: node.action, nodeId: node.id, receipt: receipt ?? receipts[0] }; +} + +function stagedVideoExecutionReceipts(template, output, graphNodes, websocketEvents) { + const paths = output.apiGraphSnapshot?.paths; + if (Array.isArray(paths)) { + const active = new Set(paths.flat()); + graphNodes = graphNodes.filter((node) => active.has(node.id)); + } + const video = graphNodes.filter((node) => node.module === 'modules.DiffusersVideo'); + const encoders = video.filter((node) => node.action === 'EncodeInputs'); + const samplers = video.filter( + (node) => node.action === 'Denoise' || (node.action === 'Generate' && node.params?.encoded_inputs?.sourceId), + ); + const decoders = video.filter((node) => node.action === 'DecodeLatents'); + const quality = template.workflowBlocks?.includes('quality_video_sequence'); + const storyboard = quality + ? template.workflowBlockSettings?.qualityVideoSequence?.shotsJson + : template.workflowBlocks?.includes('lyric_video') + ? template.workflowBlockSettings?.lyricVideo?.promptsJson + : template.workflowBlockSettings?.videoSequence?.promptsJson; + let count = 1; + if (storyboard !== undefined) { + if (typeof storyboard !== 'string' || Buffer.byteLength(storyboard, 'utf8') > 1024 * 1024) + throw new Error('The staged video receipt requires the bounded authored storyboard.'); + const shots = JSON.parse(storyboard); + if (!Array.isArray(shots) || shots.length < 1 || shots.length > 64) + throw new Error('The staged video receipt requires one to 64 authored shots.'); + count = shots.length; + } else if ( + quality || + template.workflowBlocks?.includes('video_sequence') || + template.workflowBlocks?.includes('lyric_video') + ) + throw new Error('The staged video receipt is missing its authored storyboard.'); + if (encoders.length !== count || samplers.length !== count) + throw new Error(`The staged video receipt requires all ${count} authored shots.`); + const source = (node, field) => node.params?.[field]?.sourceId; + const byId = new Map(graphNodes.map((node) => [node.id, node])); + for (const encoder of encoders) { + const owner = byId.get(source(encoder, 'pipeline')); + const consumers = samplers.filter((node) => source(node, 'encoded_inputs') === encoder.id); + if ( + owner?.module !== 'modules.DiffusersVideo' || + owner.action !== 'LoadPipeline' || + consumers.length !== 1 || + source(consumers[0], 'pipeline') !== owner.id + ) + throw new Error('The staged video receipt has an incomplete or foreign encoding owner.'); + const sampler = consumers[0]; + const decoded = decoders.filter((node) => source(node, 'latents') === sampler.id); + if (sampler.action === 'Denoise') { + if ( + decoded.length !== 1 || + source(decoded[0], 'latent_binding') !== sampler.id || + source(decoded[0], 'pipeline') !== owner.id + ) + throw new Error('The staged video receipt is missing its owned latent decode.'); + } else if (decoded.length) throw new Error('The rendered-frame stage cannot claim a separate latent decode.'); + } + if (decoders.length !== samplers.filter((node) => node.action === 'Denoise').length) + throw new Error('The staged video receipt contains an unrelated latent decode.'); + const action = (module, name) => graphNodes.filter((node) => node.module === module && node.action === name); + const delivery = graphNodes.filter( + (node) => + node.module === 'modules.Video' && + ['Export', 'ExportWithAudio', 'ExportAsset', 'ConcatenateAssets'].includes(node.action), + ); + if (quality) { + if ( + action('modules.Video', 'ExportAsset').length !== count || + action('modules.Video', 'ConcatenateAssets').length !== 1 + ) + throw new Error('The quality sequence receipt requires every saved shot and its final assembly.'); + } else if (!delivery.some((node) => ['Export', 'ExportWithAudio'].includes(node.action))) + throw new Error('The staged video receipt is missing its final video delivery.'); + const assembly = action('modules.Video', 'Concatenate'); + if (!quality && count > 1 && assembly.length !== 1) + throw new Error('The staged video receipt is missing its authored shot assembly.'); + const audio = action('modules.DiffusersAudio', 'Generate'); + if (template.workflowBlocks?.some((block) => ['lyric_video', 'soundtrack'].includes(block)) && !audio.length) + throw new Error('The staged video receipt is missing its authored soundtrack.'); + const upscale = action('modules.Spandrel', 'Upscaler'); + if ((quality && upscale.length !== count) || (template.workflowBlocks?.includes('upscaler') && !upscale.length)) + throw new Error('The staged video receipt is missing its authored upscale stage.'); + // Encoding, decoding and upscaling are deterministic and may reuse valid + // resident results. Every sampler, saved shot and final delivery must prove + // fresh execution; checking only the first repeated action misses partial runs. + const required = [ + ...encoders, + ...samplers, + ...decoders, + ...upscale, + ...audio, + ...action('modules.Audio', 'Export'), + ...assembly, + ...delivery, + ]; + const deterministic = new Set([...encoders, ...decoders, ...upscale].map((node) => node.id)); + return required.map((node) => + executionReceiptForNode(node, output.taskId, websocketEvents, deterministic.has(node.id)), + ); +} + export function executionReceiptsForRun(template, output, websocketEvents) { + const graphNodes = Array.isArray(output?.apiGraphSnapshot?.nodes) + ? output.apiGraphSnapshot.nodes + : Object.entries(output?.apiGraphSnapshot?.nodes ?? {}).map(([id, node]) => ({ id, ...node })); + const paths = output?.apiGraphSnapshot?.paths; + const active = Array.isArray(paths) ? new Set(paths.flat()) : null; + // Receipt repair reads the recorded execution, rather than relabelling it + // with today's authoring recipe. Preserve genuine historical whole runs. + if ( + graphNodes.some( + (node) => + (!active || active.has(node.id)) && + node.module === 'modules.DiffusersVideo' && + ['EncodeInputs', 'Denoise', 'DecodeLatents'].includes(node.action), + ) + ) + return stagedVideoExecutionReceipts(template, output, graphNodes, websocketEvents); const requiredActionGroups = template.workflowBlocks?.includes('quality_video_sequence') ? [ [['modules.DiffusersVideo', 'GenerateShotJob']], @@ -1202,9 +1335,6 @@ export function executionReceiptsForRun(template, output, websocketEvents) { ? [[['modules.DiffusersAudio', 'Generate']], [['modules.Audio', 'Export']]] : []; if (requiredActionGroups.length === 0) return []; - const graphNodes = Array.isArray(output?.apiGraphSnapshot?.nodes) - ? output.apiGraphSnapshot.nodes - : Object.entries(output?.apiGraphSnapshot?.nodes ?? {}).map(([id, node]) => ({ id, ...node })); return requiredActionGroups.map((alternatives) => { const matchedAction = alternatives.find(([moduleName, actionName]) => graphNodes.some((item) => item?.module === moduleName && item?.action === actionName), @@ -1218,19 +1348,11 @@ export function executionReceiptsForRun(template, output, websocketEvents) { } const [moduleName, actionName] = matchedAction; const node = graphNodes.find((item) => item?.module === moduleName && item?.action === actionName); - const receipts = websocketEvents.filter( - (event) => event?.type === 'executed' && event?.task_id === output?.taskId && event?.node === node.id, - ); - if (receipts.length === 0) throw new Error(`No execution receipt was captured for ${moduleName}.${actionName}.`); // A branched graph can visit the same upstream node twice in one task: the // first visit executes it and a later branch reuses that result. That is // valid within-run graph reuse, not a vacuous gallery proof. Require at // least one genuinely changed execution for this task and retain it. - const receipt = receipts.find((event) => event.status !== 'cached' && event.hasChanged !== false); - if (!receipt) { - throw new Error(`${moduleName}.${actionName} returned cached output; this is not an independent duplicate run.`); - } - return { module: moduleName, action: actionName, nodeId: node.id, receipt }; + return executionReceiptForNode(node, output.taskId, websocketEvents); }); } @@ -1388,6 +1510,13 @@ async function findRunOutputByStudioRole(page, { templateId, taskId, startedAt, ); } +export function templateQualificationArgs(args) { + return [ + join(ROOT, 'scripts', 'template-qualification.mjs'), + ...(args.allowBlockedProbe === true ? ['--allow-blocked-probe'] : []), + ]; +} + export function formOverridesForTemplate(template, args) { if (template.exampleStatus === 'blocked' && !args.allowBlockedProbe) { return { skipReason: `Template is ${template.exampleStatus}.` }; @@ -1494,6 +1623,7 @@ export function preferredOutputRoleForTemplate(template) { } if (template.mediaType === 'video') return 'videoExport'; if (template.workflowBlocks?.includes('upscaler')) return 'upscalePreview'; + if (template.workflowBlocks?.includes('masked_composite')) return 'compositeOutput'; if (template.modelType === 'AceStepAudioPipeline') return 'audioExport'; return ''; } @@ -2494,7 +2624,7 @@ async function main() { if (!provenancePath) { throw new Error(`Template ${template.id} completed without a provenance file to record.`); } - const qualification = spawnSync(process.execPath, [join(ROOT, 'scripts', 'template-qualification.mjs')], { + const qualification = spawnSync(process.execPath, templateQualificationArgs(args), { cwd: ROOT, encoding: 'utf8', env: { diff --git a/scripts/template-gallery-runner.test.mjs b/scripts/template-gallery-runner.test.mjs index 31fd9ccb..85b38173 100644 --- a/scripts/template-gallery-runner.test.mjs +++ b/scripts/template-gallery-runner.test.mjs @@ -1,5 +1,7 @@ +import { runInNewContext } from 'node:vm'; import assert from 'node:assert/strict'; import { spawnSync } from 'node:child_process'; +import { createHash } from 'node:crypto'; import { EventEmitter } from 'node:events'; import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; import { createServer } from 'node:net'; @@ -36,6 +38,7 @@ import { runWithGalleryBrowserRecovery, shouldPrepareRuntimeForTemplate, taskProgressFingerprint, + templateQualificationArgs, waitForQueueIdle, waitForTaskTerminal, } from './template-gallery-runner.mjs'; @@ -50,11 +53,226 @@ import { parseCampaignArgs, qualityBlockedWorkflowsFromResearch, } from './review-generation-campaign.mjs'; +import { + assertRetainedExecutionIdentity, + retainedGalleryMediaFiles, + retainedTemplateBinding, +} from './template-gallery-repair-contract.mjs'; +import { canonicalGraphIdentity, stableStringify } from './live-proof-provenance.mjs'; const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..'); const portablePath = (value) => value.split(sep).join('/'); // Unit tests check fixture selection without requiring local review media. const availableFixtureOverrides = (workflowId, media) => fixtureOverrides(workflowId, media, () => true); +const fetchWithoutRunReceipt = (url) => + String(url).includes('/runs/') ? Promise.resolve(new Response(null, { status: 404 })) : fetch(url); + +function retainedRepairFixture() { + const settings = { mode: 'text_to_image', modelType: 'ExamplePipeline', prompt: 'original brief', seed: 73 }; + const template = { id: 'original_template' }; + const revision = 'original-model-revision'; + const runtime = { + lockedSettingsForTemplate: () => ({ ...settings }), + promptSettingsHash: () => `prompt:${stableStringify(settings)}`, + templateLockHash: (_template, modelRevision = 'catalog') => + `template:${modelRevision}:${stableStringify(settings)}`, + }; + const apiGraphSnapshot = { + nodes: { denoise: { module: 'modules.Diffusers', action: 'Denoise', params: { seed: { value: 73 } } } }, + paths: [['denoise']], + }; + const graph = canonicalGraphIdentity(apiGraphSnapshot); + const original = { + taskId: 'original-task', + capturedAt: '2026-10-06T12:00:00.000Z', + template: { + id: template.id, + lockedSettings: { ...settings }, + promptSettingsHash: runtime.promptSettingsHash(template), + catalogTemplateLockHash: runtime.templateLockHash(template), + resolvedTemplateLockHash: runtime.templateLockHash(template, revision), + }, + models: { revisionLock: revision }, + graphHash: graph.hash, + graph, + inputs: { items: [] }, + }; + const output = { taskId: original.taskId, templateId: template.id, formSnapshot: { ...settings }, apiGraphSnapshot }; + const events = [ + { type: 'executed', task_id: original.taskId, node: 'denoise', status: 'succeeded', hasChanged: true }, + { type: 'graph_completed', task_id: original.taskId }, + { type: 'task_completed', task_id: original.taskId }, + ]; + return { + runtime, + template, + original, + output, + run: { taskId: original.taskId }, + events, + inputArtifacts: [], + settings, + }; +} + +test('retained proof repair preserves original template and capture identities after exact recipe corroboration', () => { + const fixture = retainedRepairFixture(); + assert.deepEqual(retainedTemplateBinding(fixture), { + ...fixture.original.template, + capturedAt: fixture.original.capturedAt, + }); +}); + +test('retained proof repair rejects changed creator defaults before relabelling a historical graph', () => { + const fixture = retainedRepairFixture(); + fixture.settings.prompt = 'a different creative brief'; + assert.throws(() => retainedTemplateBinding(fixture), /creator setting prompt changed/); +}); + +test('equal retained settings cannot establish parity for a changed workflow admission', () => { + const fixture = retainedRepairFixture(); + fixture.original.template.catalogTemplateLockHash = 'legacy-template-admission'; + assert.throws(() => retainedTemplateBinding(fixture), /catalogTemplateLockHash differs/); +}); + +test('retained hashes alone cannot hide different submitted graph contents or consumed values', () => { + const graphFixture = retainedRepairFixture(); + graphFixture.output.apiGraphSnapshot.nodes.denoise.params.seed.value = 999; + assert.throws(() => retainedTemplateBinding(graphFixture), /executed graph does not match/); + const formFixture = retainedRepairFixture(); + formFixture.output.formSnapshot.seed = 999; + assert.throws(() => retainedTemplateBinding(formFixture), /consumed form setting seed differs/); +}); + +test('retained proof repair rejects mismatched tasks and missing executed-node receipts', () => { + const taskFixture = retainedRepairFixture(); + taskFixture.run.taskId = 'another-task'; + assert.throws(() => retainedTemplateBinding(taskFixture), /do not identify the retained task/); + const eventFixture = retainedRepairFixture(); + eventFixture.events = eventFixture.events.filter((event) => event.type !== 'executed'); + assert.throws(() => retainedTemplateBinding(eventFixture), /execution receipt is missing for graph node/); +}); + +test('retained proof repair correlates original pinned media, allowing only proven source bindings', () => { + const fixture = retainedRepairFixture(); + fixture.settings.sourceVideo = ''; + fixture.original.template = { + ...fixture.original.template, + lockedSettings: { ...fixture.settings }, + promptSettingsHash: fixture.runtime.promptSettingsHash(fixture.template), + catalogTemplateLockHash: fixture.runtime.templateLockHash(fixture.template), + resolvedTemplateLockHash: fixture.runtime.templateLockHash(fixture.template, fixture.original.models.revisionLock), + }; + fixture.output.formSnapshot.sourceVideo = 'retained-video'; + fixture.inputArtifacts = [ + { role: 'source_video', path: 'retained-video', contentHash: 'sha256:original', byteSize: 5 }, + ]; + fixture.original.inputs.items = [{ ...fixture.inputArtifacts[0] }]; + assert.equal(retainedTemplateBinding(fixture).capturedAt, fixture.original.capturedAt); + fixture.inputArtifacts[0].contentHash = 'sha256:replacement'; + assert.throws(() => retainedTemplateBinding(fixture), /input media does not match/); +}); + +test('retained proof repair requires the original authority instead of recovering it from current hashes', () => { + const fixture = retainedRepairFixture(); + fixture.original = null; + assert.throws(() => retainedTemplateBinding(fixture), /original template locked settings are missing/); +}); + +test('repeat retained-media discovery excludes repair backups, sidecars and directories and preserves item order', () => { + const mediaDir = mkdtempSync(resolve(tmpdir(), 'modiff-repair-media-discovery-')); + const base = 'high_quality.run1'; + try { + const images = [`${base}.item10.png`, `${base}.item2.png`, `${base}.item1.webp`]; + for (const name of images) writeFileSync(resolve(mediaDir, name), 'retained-media'); + const expected = [`${base}.item1.webp`, `${base}.item2.png`, `${base}.item10.png`]; + assert.deepEqual(retainedGalleryMediaFiles(mediaDir, base), expected); + const evidenceDir = resolve(mediaDir, 'evidence'); + mkdirSync(evidenceDir); + mkdirSync(resolve(mediaDir, `${base}.directory.png`)); + for (const directory of [mediaDir, evidenceDir]) { + for (const name of [ + `${base}.provenance.json`, + `${base}.websocket-events.json.before-repair-original`, + `${base}.before-repair-original.png`, + `${base}.before.png`, + `${base}.recomposed.png`, + `${base}.debug.log`, + ]) + writeFileSync(resolve(directory, name), 'metadata'); + } + assert.deepEqual(retainedGalleryMediaFiles(mediaDir, base), expected); + assert.deepEqual(retainedGalleryMediaFiles(mediaDir, base), expected); + } finally { + rmSync(mediaDir, { recursive: true, force: true }); + } +}); + +test('retained proof repair preserves reference order through indexed input roles', () => { + const fixture = retainedRepairFixture(); + fixture.inputArtifacts = [ + { role: 'reference_image_1', contentHash: 'sha256:first', byteSize: 5 }, + { role: 'reference_image_2', contentHash: 'sha256:second', byteSize: 6 }, + ]; + fixture.original.inputs.items = structuredClone(fixture.inputArtifacts); + assert.equal(retainedTemplateBinding(fixture).id, fixture.template.id); + fixture.inputArtifacts = [ + { ...fixture.inputArtifacts[1], role: 'reference_image_1' }, + { ...fixture.inputArtifacts[0], role: 'reference_image_2' }, + ]; + assert.throws(() => retainedTemplateBinding(fixture), /input media does not match/); +}); + +test('retained proof repair forbids runtime or source substitution while permitting metadata reconstruction', () => { + const original = { + taskId: 'original-task', + capturedAt: '2026-10-06T12:00:00.000Z', + backendSourceFingerprint: 'original-source', + backendContractFingerprint: 'original-contract', + runtimeFingerprint: 'original-runtime', + graphHash: 'original-graph', + modelRevision: 'original-model', + modelCommit: 'original-commit', + inputArtifactsHash: 'original-inputs', + runtime: { backendSource: { fingerprint: 'original-source', gitCommit: 'original-commit', files: ['original'] } }, + model: { repoId: 'original-model', fingerprint: 'original-artifacts' }, + models: { items: [{ repoId: 'original-model', fingerprint: 'original-artifacts' }] }, + output: { + count: 2, + collectionHash: 'original-output-collection', + backendCollectionHash: 'original-backend-collection', + items: [ + { index: 0, mediaType: 'image', encodedSha256: 'first-bytes', decodedSha256: 'first-pixels' }, + { index: 1, mediaType: 'image', encodedSha256: 'second-bytes', decodedSha256: 'second-pixels' }, + ], + }, + }; + assert.doesNotThrow(() => assertRetainedExecutionIdentity(original, structuredClone(original))); + assert.throws( + () => assertRetainedExecutionIdentity(original, { ...original, runtimeFingerprint: 'current-runtime' }), + /execution identity runtimeFingerprint/, + ); + const replacement = structuredClone(original); + replacement.runtime.backendSource.files = ['replacement']; + assert.throws(() => assertRetainedExecutionIdentity(original, replacement), /original backend source inventory/); + const wrongWeights = structuredClone(original); + wrongWeights.model.fingerprint = 'different-artifacts'; + assert.throws(() => assertRetainedExecutionIdentity(original, wrongWeights), /original model artifact identity/); + const differentImage = structuredClone(original); + differentImage.output.items[0].encodedSha256 = 'unrelated-image-bytes'; + differentImage.output.items[0].decodedSha256 = 'unrelated-image-pixels'; + assert.throws(() => assertRetainedExecutionIdentity(original, differentImage), /original ordered output identities/); + const reversedOutput = structuredClone(original); + reversedOutput.output.items.reverse(); + reversedOutput.output.items = reversedOutput.output.items.map((item, index) => ({ ...item, index })); + assert.throws(() => assertRetainedExecutionIdentity(original, reversedOutput), /original ordered output identities/); + const missingOriginalBytes = structuredClone(original); + delete missingOriginalBytes.output.items[0].encodedSha256; + assert.throws( + () => assertRetainedExecutionIdentity(missingOriginalBytes, structuredClone(missingOriginalBytes)), + /requires the original ordered output identities/, + ); +}); test('gallery capture and resume paths have no unresolved variables', () => { const messages = new Linter().verify(readFileSync(resolve(ROOT, 'scripts/template-gallery-runner.mjs'), 'utf8'), { @@ -100,9 +318,7 @@ test('campaign refuses generic two-second audio fixtures for showcase workflows' /reviewed workflow-specific sourceAudio fixture/, ); const reviewedFixture = resolve( - ROOT, - '..', - 'MoDiff', + process.env.MODIFF_BACKEND_DIR || resolve(ROOT, '..', 'MoDiff'), 'web', 'template-gallery', 'ace_step_text_to_audio.current.wav', @@ -305,12 +521,13 @@ test('review campaign writes extensionless Studio image output with its fetched }; const page = { evaluate: async () => output }; - const filePath = await copyOutput( + const { filePath } = await copyOutput( page, { taskId: 'task-webp', startedAt: Date.now() }, 'http://127.0.0.1:5192', resolve(root, 'campaign-output'), 'image', + { fetchImpl: fetchWithoutRunReceipt }, ); assert.equal(filePath, resolve(root, 'campaign-output.webp')); @@ -339,12 +556,13 @@ test('review campaign writes inline text output without treating its payload as }; const page = { evaluate: async () => output }; - const filePath = await copyOutput( + const { filePath } = await copyOutput( page, { taskId: 'task-text', startedAt: Date.now() }, 'http://127.0.0.1:5192', resolve(root, 'campaign-output'), 'json', + { fetchImpl: fetchWithoutRunReceipt }, ); assert.equal(filePath, resolve(root, 'campaign-output.txt')); @@ -361,11 +579,24 @@ test('review campaign recovers a late Studio output from the authoritative run r bytes.write('RIFF', 0, 'ascii'); bytes.write('WEBP', 8, 'ascii'); const mediaUrl = `data:image/webp;base64,${bytes.toString('base64')}`; + const mediaHash = `sha256:bytes:${createHash('sha256').update(bytes).digest('hex')}`; + const runtimeFingerprint = { + fingerprint: `sha256:${'1'.repeat(64)}`, + resourceFingerprint: `sha256:${'2'.repeat(64)}`, + }; + const workflowSnapshot = { nodes: [{ id: 'export' }], edges: [] }; const fetchImpl = async (input) => { - if (String(input).includes('/runs/task-late')) { + if (String(input) === 'http://127.0.0.1:8088/runs/task-late') { return new Response( JSON.stringify({ - outputs: [{ url: mediaUrl, displayType: 'image', taskId: 'task-late' }], + task: { + task_id: 'task-late', + status: 'completed', + runtimeFingerprint, + workflow_snapshot: workflowSnapshot, + }, + workflow_snapshot: workflowSnapshot, + outputs: [{ url: mediaUrl, displayType: 'image', taskId: 'task-late', mediaHash }], }), { headers: { 'content-type': 'application/json' } }, ); @@ -373,17 +604,132 @@ test('review campaign recovers a late Studio output from the authoritative run r return fetch(input); }; - const filePath = await copyOutput( - { evaluate: async () => null }, + const result = await copyOutput( + { evaluate: async () => ({ taskId: 'other-newer-run', url: mediaUrl, displayType: 'image' }) }, { taskId: 'task-late', startedAt: Date.now() }, 'http://127.0.0.1:5192', resolve(root, 'campaign-output'), 'image', - { fetchImpl, outputWaitMs: 0, server: 'http://127.0.0.1:8088' }, + { fetchImpl, outputWaitMs: 20, server: 'http://127.0.0.1:8088' }, ); - assert.equal(filePath, resolve(root, 'campaign-output.webp')); - assert.deepEqual(readFileSync(filePath), bytes); + assert.equal(result.filePath, resolve(root, 'campaign-output.webp')); + assert.equal(result.mediaHash, mediaHash); + assert.deepEqual(result.runtimeFingerprint, runtimeFingerprint); + assert.match(result.workflowSnapshotHash, /^sha256:campaign-workflow-snapshot:/); + assert.deepEqual(readFileSync(result.filePath), bytes); + } finally { + rmSync(root, { recursive: true, force: true }); + } +}); + +test('review campaign rejects a mismatched receipt, invalid snapshot or changed media before saving', async () => { + const root = mkdtempSync(resolve(tmpdir(), 'modiff-review-campaign-identity-')); + const fixture = { + task: { task_id: 'task-exact', status: 'completed' }, + workflow_snapshot: { nodes: [{ id: 'export' }], edges: [] }, + outputs: [ + { + url: 'data:text/plain,original', + displayType: 'text', + taskId: 'task-exact', + mediaHash: `sha256:bytes:${createHash('sha256').update('original').digest('hex')}`, + }, + ], + }; + try { + for (const [change, message] of [ + [ + (receipt) => { + receipt.task.task_id = 'unrelated-task'; + }, + /does not match completed task/, + ], + [ + (receipt) => { + receipt.workflow_snapshot = { graph: [] }; + }, + /snapshot/, + ], + [ + (receipt) => { + receipt.task.runtimeFingerprint = 'sha256:wrong'; + }, + /runtime identities/, + ], + [ + (receipt) => { + receipt.outputs[0].url = 'data:text/plain,changed'; + }, + /media hash/, + ], + ]) { + const receipt = structuredClone(fixture); + change(receipt); + await assert.rejects( + copyOutput( + { evaluate: async () => null }, + { taskId: 'task-exact' }, + 'http://127.0.0.1:5192', + resolve(root, 'candidate'), + 'text', + { + fetchImpl: (input) => + String(input).includes('/runs/') ? Promise.resolve(Response.json(receipt)) : fetch(input), + outputWaitMs: 0, + }, + ), + message, + ); + assert.equal(existsSync(resolve(root, 'candidate.txt')), false); + } + } finally { + rmSync(root, { recursive: true, force: true }); + } +}); + +test('review campaign ignores other live tasks even when no retained receipt is available', async () => { + const output = { taskId: 'newer-task', url: 'data:text/plain,newer', displayType: 'text' }; + await assert.rejects( + copyOutput( + { evaluate: async () => output }, + { taskId: 'requested-task' }, + 'http://127.0.0.1:5192', + 'unused-output', + 'text', + { fetchImpl: fetchWithoutRunReceipt, outputWaitMs: 20 }, + ), + /No studio output URL for task requested-task/, + ); +}); + +test('review campaign retains the video export of a control-video workflow and preserves existing bytes', async () => { + const root = mkdtempSync(resolve(tmpdir(), 'modiff-review-campaign-control-video-')); + const bytes = 'retained video bytes'; + const receipt = { + task: { task_id: 'task-video', status: 'completed' }, + outputs: [ + { taskId: 'task-video', displayType: 'video', url: `data:video/mp4,${encodeURIComponent(bytes)}` }, + { taskId: 'task-video', displayType: 'image', url: 'data:image/png,unrelated-preview' }, + ], + }; + const capture = () => + copyOutput( + { evaluate: async () => null }, + { taskId: 'task-video' }, + 'http://127.0.0.1:5192', + resolve(root, 'control-video'), + 'video', + { + fetchImpl: (input) => + String(input).includes('/runs/') ? Promise.resolve(Response.json(receipt)) : fetch(input), + }, + ); + try { + const result = await capture(); + assert.equal(result.filePath, resolve(root, 'control-video.mp4')); + await assert.rejects(capture(), /Campaign output already exists/); + assert.equal(readFileSync(result.filePath, 'utf8'), bytes); } finally { rmSync(root, { recursive: true, force: true }); } @@ -605,6 +951,41 @@ test('offline evidence repair refuses to substitute current state for a missing } }); +test('offline evidence repair leaves every sidecar untouched when original template authority is missing', () => { + const artifactDir = mkdtempSync(resolve(tmpdir(), 'modiff-retained-template-proof-')); + try { + const mediaDir = resolve(artifactDir, 'media'); + const evidenceDir = resolve(mediaDir, 'evidence'); + mkdirSync(evidenceDir, { recursive: true }); + const evidencePaths = ['backend-source-before.json'].map((name) => resolve(artifactDir, name)); + for (const suffix of ['output', 'websocket-events', 'nodes', 'model-fingerprint', 'backend-source-after']) { + evidencePaths.push(resolve(evidenceDir, `high_quality.run1.${suffix}.json`)); + } + for (const path of evidencePaths) writeFileSync(path, '{}\n'); + const before = evidencePaths.map((path) => readFileSync(path)); + const repaired = spawnSync( + process.execPath, + [ + resolve(ROOT, 'scripts/template-gallery-repair-evidence.mjs'), + '--media-dir', + mediaDir, + '--template', + 'high_quality', + ], + { cwd: ROOT, encoding: 'utf8' }, + ); + assert.notEqual(repaired.status, 0); + assert.match(repaired.stderr, /requires original run provenance/); + assert.deepEqual( + evidencePaths.map((path) => readFileSync(path)), + before, + ); + assert.equal(existsSync(resolve(evidenceDir, 'high_quality.run1.provenance.json')), false); + } finally { + rmSync(artifactDir, { recursive: true, force: true }); + } +}); + test('gallery output waits can distinguish backend progress from an unchanged receipt', () => { const loading = { status: 'running', @@ -723,6 +1104,54 @@ test('gallery runner refuses to reuse an occupied implicit frontend port', async } }); +test('gallery runner suppresses workspace checkpoints in both browser storage scopes', async () => { + let initialize; + await installEphemeralGalleryStorage({ + addInitScript: async (script) => { + initialize = script; + }, + route: async () => {}, + }); + class MemoryStorage { + values = new Map(); + getItem(key) { + return this.values.get(key) ?? null; + } + setItem(key, value) { + this.values.set(key, String(value)); + } + removeItem(key) { + this.values.delete(key); + } + } + const shared = new MemoryStorage(); + const session = new MemoryStorage(); + const workspaceKeys = ['modiff.studio', 'modiff.flow']; + for (const target of [shared, session]) { + for (const key of workspaceKeys) target.setItem(key, 'previous test workspace'); + target.setItem('modiff.settings', 'preserved preferences'); + } + shared.setItem('studio', 'legacy recovery retained'); + shared.setItem('reactflow', 'legacy flow retained'); + runInNewContext(`(${initialize.toString()})()`, { + Storage: MemoryStorage, + localStorage: shared, + sessionStorage: session, + }); + for (const target of [shared, session]) { + for (const key of workspaceKeys) { + assert.equal(target.getItem(key), null, 'remove prior owned-test workspace bytes'); + target.setItem(key, 'generated graph must stay ephemeral'); + assert.equal(target.getItem(key), null, 'block generated workspace writes in both scopes'); + } + assert.equal(target.getItem('modiff.settings'), 'preserved preferences'); + target.setItem('modiff.settings', 'updated preferences'); + assert.equal(target.getItem('modiff.settings'), 'updated preferences'); + } + assert.equal(shared.getItem('studio'), 'legacy recovery retained'); + assert.equal(shared.getItem('reactflow'), 'legacy flow retained'); +}); + test('gallery runner disables large persisted graph state before page navigation', async () => { let initScript = null; await installEphemeralGalleryStorage({ @@ -817,6 +1246,19 @@ test('gallery runner can retain successful locked runs without publishing galler assert.match(source, /!result\.sourceOnly && !result\.skipped/); }); +test('blocked-template registrar lookup is forwarded only by explicit qualification opt-in', () => { + const ordinary = parseArgs(['node', 'runner', '--record-qualification']); + const explicit = parseArgs(['node', 'runner', '--record-qualification', '--allow-blocked-probe']); + const script = resolve(ROOT, 'scripts/template-qualification.mjs'); + assert.deepEqual(templateQualificationArgs(ordinary), [script]); + assert.deepEqual(templateQualificationArgs(explicit), [script, '--allow-blocked-probe']); + assert.equal(explicit.publish, false); + assert.throws( + () => parseArgs(['node', 'runner', '--record-qualification', '--allow-blocked-probe', '--publish']), + /qualification-only and cannot be combined with --publish/, + ); +}); + test('resource qualification capture is a single non-publishing locked-workload run', () => { const args = parseArgs([ 'node', @@ -845,7 +1287,7 @@ test('resource qualification requires an explicit recipe override', () => { }); test('gallery runner prevents two capture processes from sharing one app execution session', () => { - const directory = mkdtempSync('/tmp/modiff-gallery-lock-'); + const directory = mkdtempSync(resolve(tmpdir(), 'modiff-gallery-lock-')); const lockPath = resolve(directory, '.runner.lock'); const release = acquireRunnerLock(lockPath, process.pid); assert.throws(() => acquireRunnerLock(lockPath, process.pid), /Another template-gallery runner is active/); @@ -874,6 +1316,10 @@ test('gallery runner selects the generated audio export instead of the source lo 'upscalePreview', ); assert.equal(preferredOutputRoleForTemplate({ modelType: 'QwenImageModularPipeline' }), ''); + assert.equal( + preferredOutputRoleForTemplate({ mediaType: 'image', workflowBlocks: ['masked_composite'] }), + 'compositeOutput', + ); }); test('gallery runner reuses runtime only for an explicit matching loader-contract key', () => { @@ -1224,7 +1670,9 @@ test('gallery runner rejects cached audio/video generation receipts as vacuous d test('gallery runner accepts generic Diffusers video receipts for Wan and LTX graphs', () => { for (const modelType of ['WanVACEPipeline', 'WanVideoPipeline', 'LTXVideoPipeline']) { - const template = { modelType }; + // Today's stage-authoring metadata must not rewrite retained whole-run + // evidence during receipt repair. Its original executed graph is authority. + const template = { modelType, executionSelection: { authoringRecipeId: 'generic-video-stages:v1' } }; const output = { taskId: `task-${modelType}`, apiGraphSnapshot: { diff --git a/scripts/template-input-preview.test.mjs b/scripts/template-input-preview.test.mjs index 816fa4be..6b034e9f 100644 --- a/scripts/template-input-preview.test.mjs +++ b/scripts/template-input-preview.test.mjs @@ -5,7 +5,13 @@ import { createServer } from 'vite'; import { PROJECT_ROOT, readStudioTemplateIds, renderRuntimeInputTypescript } from './template-default-inputs.mjs'; -const server = await createServer({ server: { middlewareMode: true, watch: null }, appType: 'custom' }); +const server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, hmr: false, watch: null }, + appType: 'custom', +}); const { bundledTemplateInputPreviewUrl } = await server.ssrLoadModule('/src/studio/templateInputPreview.ts'); const { resolveTemplateAssetUrl } = await server.ssrLoadModule('/src/studio/templateAssets.ts'); const { templateDefaultInputBindings } = await server.ssrLoadModule( @@ -19,6 +25,11 @@ test.after(async () => { const continuationAudioPath = '/template-gallery/runtime-inputs/assets/3807d712e24a94c4b445c2fa950a784bba334f5f665e74964fe4d47a43856230.wav'; +test('static input-preview imports keep filesystem watching disabled', () => { + assert.equal(server.config.server.watch, null); + assert.deepEqual(server.watcher.getWatched(), {}); +}); + test('resolves an exact template input filename through the configured asset source', () => { assert.equal( bundledTemplateInputPreviewUrl('audio/ace_step_audio_continuation.source_audio.wav'), @@ -66,3 +77,35 @@ test('tracked default-input JSON and generated packed bindings stay deterministi 'the checked-in packed artifact matches the tracked JSON and template order', ); }); + +test('packed defaults preserve custom binding IDs, asset IDs and filenames without changing their bytes', async () => { + const { stripTypeScriptTypes } = await import('node:module'); + const digest = 'ab'.repeat(32); + const asset = { + id: 'material-only-v2', + label: 'Reviewed reference image 1', + mediaType: 'image', + runtimePath: `/template-gallery/runtime-inputs/assets/${digest}.png`, + runtimeSha256: `sha256:bytes:${digest}`, + fileName: 'accepted-material-strip.png', + }; + const mapping = { + sample: [ + { + id: 'preserved-custom-binding', + label: 'Reviewed reference image', + mediaType: 'image', + origin: 'template', + requiredAt: 'workflow_start', + field: 'referenceImages', + defaultAssets: [asset], + }, + ], + }; + const rendered = await renderRuntimeInputTypescript({ mapping, templateIds: ['unused', 'sample'] }); + const module = await import( + `data:text/javascript;base64,${Buffer.from(stripTypeScriptTypes(rendered)).toString('base64')}` + ); + assert.deepEqual(module.templateDefaultInputBindings('sample', 1), mapping.sample); + assert.deepEqual(module.templateDefaultInputBindings('unused', 0), []); +}); diff --git a/scripts/template-input-roles.test.mjs b/scripts/template-input-roles.test.mjs new file mode 100644 index 00000000..73308bfa --- /dev/null +++ b/scripts/template-input-roles.test.mjs @@ -0,0 +1,71 @@ +import assert from 'node:assert/strict'; +import test from 'node:test'; +import { canonicalTemplateInputRole, isGeneratedUpscaleComparison } from './template-default-inputs.mjs'; + +test('native input roles preserve ordered references and canonical media fields', () => { + for (const [native, expected] of Object.entries({ + sourceAudio: 'source_audio', + sourceVideo: 'source_video', + referenceAudio: 'reference_audio', + maskVideo: 'mask_video', + controlVideo: 'control_video', + maskImage: 'mask_image', + controlImage: 'control_image', + 'referenceImages[0]': 'reference_image_1', + 'referenceImages[5]': 'reference_image_6', + })) { + assert.equal(canonicalTemplateInputRole(native), expected); + assert.equal(canonicalTemplateInputRole(expected), expected); + } + for (const value of [ + 'referenceImages[-1]', + 'referenceImages[64]', + 'referenceImages[x]', + 'referenceImages', + 'madeUp', + ]) { + assert.doesNotMatch(canonicalTemplateInputRole(value) ?? '', /^(?:reference_image_\d+|source_audio|mask_image)$/u); + } + assert.equal(canonicalTemplateInputRole(null), null); +}); + +test('a comparison-only upscale input is excluded only with its actual generated graph ancestry', () => { + const item = { + role: 'upscaleSourceComparison', + path: '@data/studio/outputs/original.webp', + contentHash: `sha256:bytes:${'a'.repeat(64)}`, + }; + const entry = { beforeMediaHash: item.contentHash }; + const run = { + graph: { + canonicalGraph: { + nodes: [ + { key: 'generate', module: 'modules.ModularDiffusers', action: 'Denoise' }, + { + key: 'decode', + module: 'modules.ModularDiffusers', + action: 'DecodeLatents', + params: { latents: { sourceId: 'generate', sourceKey: 'latents' } }, + }, + { + key: 'upscale', + module: 'modules.Spandrel', + action: 'Upscaler', + params: { image: { sourceId: 'decode', sourceKey: 'images' } }, + }, + ], + }, + }, + }; + assert.equal(isGeneratedUpscaleComparison(item, run, entry), true); + assert.equal(isGeneratedUpscaleComparison(item, run, { beforeMediaHash: 'different' }), false); + assert.equal(isGeneratedUpscaleComparison({ ...item, path: '@data/images/input.webp' }, run, entry), false); + for (const index of [0, 1, 2]) { + const changed = structuredClone(run); + changed.graph.canonicalGraph.nodes.splice(index, 1); + assert.equal(isGeneratedUpscaleComparison(item, changed, entry), false); + } + const loaded = structuredClone(run); + loaded.graph.canonicalGraph.nodes.push({ module: 'modules.Image', action: 'Load' }); + assert.equal(isGeneratedUpscaleComparison(item, loaded, entry), false); +}); diff --git a/scripts/template-operation-fixtures.py b/scripts/template-operation-fixtures.py new file mode 100644 index 00000000..38987994 --- /dev/null +++ b/scripts/template-operation-fixtures.py @@ -0,0 +1,178 @@ +"""Pure, selected backend schemas for image-template authoring tests; no weights.""" + +import contextlib +import io +import json +import os +import sys +import tempfile +from pathlib import Path +from unittest.mock import patch + +sys.dont_write_bytecode = True +sys.path.insert(0, os.environ.get("MODIFF_BACKEND_DIR", str(Path(__file__).resolve().parents[2] / "MoDiff"))) +selections = json.load(sys.stdin) +mock_cuda = "--mock-cuda" in sys.argv[1:] +studio_spec_only = "--studio-spec-only" in sys.argv[1:] + +with tempfile.TemporaryDirectory(prefix="modiff-template-schema-") as temporary: + isolated = Path(temporary) + os.environ["MODIFF_MANAGED_ROOT"] = str(isolated / "managed") + os.environ["HF_HUB_OFFLINE"] = "1" + from modiff import secret_config + + # Import the configuration with no operator config/token or directory writes. + with patch("configparser.ConfigParser.read", return_value=[]), patch("os.makedirs"), \ + patch.object(secret_config, "huggingface_token", return_value=(None, None)): + from modiff.config import CONFIG + for key in CONFIG.paths: + if key != "app_root": + CONFIG.paths[key] = str(isolated / key) + Path(CONFIG.paths[key]).mkdir(parents=True, exist_ok=True) + CONFIG.hf["cache_dir"] = str(isolated / "hub") + + from modiff.custom_extensions import ExtensionStore + from modiff import hardware + + # Transport tests may describe a CUDA-equipped host without probing or + # constructing a GPU runtime. The ordinary schema and option describers + # still derive all fields; this supplies only their hardware boundary. + fixture_devices = [{ + "type": "cuda", "device": "cuda:0", "index": 0, + "name": "Mock CUDA transport device", "backend": "cuda", + "vendor": "nvidia", "memory_kind": "dedicated", "vram_total": 16 * 1024**3, + }, {"type": "cpu", "device": "cpu:0", "index": 0}] if mock_cuda else None + + with contextlib.ExitStack() as patches, contextlib.redirect_stdout(io.StringIO()): + patches.enter_context(patch.object(ExtensionStore, "load_enabled", return_value=None)) + if fixture_devices is not None: + patches.enter_context(patch.object(hardware, "get_normalized_devices", return_value=fixture_devices)) + import torch + patches.enter_context(patch.object(torch.cuda, "is_bf16_supported", return_value=True)) + from modules import MODULE_MAP + from modiff.operation_catalog import build_operation_catalog + from modiff.operation_starters import resolve_operation_starter + from modiff.server import WebServer, STUDIO_MODEL_CAPABILITIES + from modiff.studio_execution_specs import studio_execution_spec_for_pair + + assert not any(key.startswith("custom.") for key in MODULE_MAP) + contracts, _ = build_operation_catalog(MODULE_MAP, [], catalog_resolver=lambda: {}) + describer = object.__new__(WebServer) + describer.modules = MODULE_MAP + if fixture_devices is not None: + describer._available_runtime_devices = lambda: ["cuda:0", "cpu", "cpu:0"] + describer._optimization_runtime_context = lambda: ( + "schema-fixture", {"devices": fixture_devices or [], "platform": sys.platform}, + {"detected": "cuda" if mock_cuda else "cpu", "status": "ready", "execution_ready": True}, + ) + rows, registry, historical_cosmos_image = [], {}, None + + def describe(key): + module, action = key.rsplit(".", 1) + registry[key] = describer._describe_registered_node(module, action, MODULE_MAP[module][action]) + + with patch("modiff.NodeBase.NodeBase.__init__", side_effect=AssertionError("Constructed executable node")): + public_payload = describer._build_model_capabilities_payload() + public_capabilities = public_payload["capabilities"] + for item in selections: + selection = item["selection"] + binding = selection.get("bindingSpec") + spec = studio_execution_spec_for_pair(binding["modelType"], binding["mode"]) if binding else None + if binding and spec is None: + raise ValueError(f"Missing template semantic bindings: {binding}") + if studio_spec_only or item.get("studioSpecOnly", False): + if spec is None: + raise ValueError("A Studio-only fixture needs an exact binding specification.") + for _, key, _, _ in spec["roles"]: + describe(key) + row = {"id": item["id"], "spec": spec} + if spec["executionPath"] == "direct-diffusers-image": + from modules.DiffusersImage.main import get_image_pipeline_adapter, image_pipeline_contract + + row["imageContract"] = image_pipeline_contract( + get_image_pipeline_adapter(spec["pipelineClass"]), spec["mode"] + ) + if any(key == "modules.DiffusersAudio.LoadPipeline" for _, key, _, _ in spec["roles"]): + from modules.DiffusersAudio.main import _audio_contract_signal, get_audio_pipeline_adapter + + adapter = get_audio_pipeline_adapter(spec["pipelineClass"]) + row["audioContract"] = _audio_contract_signal(adapter, spec["mode"], adapter.default_repo) + if any(key == "modules.DiffusersVideo.LoadPipeline" for _, key, _, _ in spec["roles"]): + from modules.DiffusersVideo.main import _adapter_signal, get_video_pipeline_adapter + + row["videoContract"] = _adapter_signal(get_video_pipeline_adapter(spec["pipelineClass"])) + rows.append(row) + continue + starter = resolve_operation_starter(MODULE_MAP, contracts, { + "pipelineClass": selection["pipelineClass"], + "task": selection["task"], + **({"executionProfileId": selection["executionProfileId"]} + if "executionProfileId" in selection else {}), + **({"repository": selection["repository"]} if selection.get("repository") else {}), + **({"authoringRecipeId": selection["authoringRecipeId"]} + if selection.get("authoringRecipeId") else {}), + }) + starter["nodes"] = [{ + "operation": node["operation"], + "node": describer._describe_registered_node(node["module"], node["action"], node), + } for node in starter["nodes"]] + for node in starter["nodes"]: + describe(node["operation"]["nodeKey"]) + for _, key, _, _ in starter.get("authoring", spec or {"roles": []})["roles"]: + describe(key) + rows.append({"id": item["id"], "starter": starter, "spec": spec, + "capability": STUDIO_MODEL_CAPABILITIES[binding["modelType"]] if binding else None}) + for key in ("modules.Text.ProcessText", "modules.ImageOperations.ProcessImage", "modules.ModularDiffusers.Lora", + "modules.ModularDiffusers.QuantizationConfigNode", + "modules.DiffusersImage.LoadAdapter", "modules.DiffusersImage.Generate", + "modules.HuggingFaceTransformers.GenerateImageVideoText", "modules.ModularDiffusers.ModelsLoader", + "modules.Spandrel.Upscaler", "modules.Image.Preview", "modules.Image.Resize", + "modules.Image.Save", "modules.ImageOperations.CropImage", "modules.ImageOperations.MaskComposite", + "modules.DiffusersImage.OutpaintCanvas", "modules.Audio.Export", "modules.Audio.Load", "modules.Image.Load", + "modules.DiffusersAudio.LoadAdapter", "modules.Video.Load", "modules.Video.Export", "modules.Video.ExportWithAudio", "modules.Video.ExportAsset", + "modules.Audio.FitDuration", "modules.Audio.ProcessAudio", "modules.Video.ProcessVideo", + "modules.DiffusersAudio.LoadPipeline", "modules.DiffusersAudio.Generate", + "modules.DiffusersVideo.LoadPipeline", "modules.DiffusersVideo.GenerateSequence", + "modules.Video.Compose", "modules.Video.LyricOverlay", + "modules.VideoConditioning.Storyboard", "modules.VideoConditioning.ShotPrompt", + "modules.VideoConditioning.ShotInputs", "modules.VideoConditioning.OutpaintCanvas", + "modules.Video.MaskedComposite", "modules.Primitive.ToList", + "modules.Video.Concatenate", "modules.Video.ConcatenateAssets", "modules.Video.Trim", + "modules.DiffusersRuntime.PipelineQuantizationConfigV2", "modules.DiffusersRuntime.DiffusersExecutionRecipe"): + describe(key) + if not studio_spec_only and any(item["selection"].get("pipelineClass") == "Cosmos3OmniModularPipeline" for item in selections): + from modiff.modular_whole_workflow_contracts import ( + PINNED_WHOLE_WORKFLOW_GRAPH_ADAPTERS, reviewed_whole_workflow_action_adapter, + ) + + # Retain an independent old image declaration for saved-graph + # preservation tests. This patch is isolated to this schema-only + # fixture process; the current public catalog remains unchanged. + legacy_adapter = reviewed_whole_workflow_action_adapter( + "Cosmos3OmniModularPipeline", "text2image", "workflow_cosmos3_omni_after_decode", + ) + with patch.dict(PINNED_WHOLE_WORKFLOW_GRAPH_ADAPTERS, { + ("Cosmos3OmniModularPipeline", "text2image"): legacy_adapter, + }): + legacy_contracts, _ = build_operation_catalog(MODULE_MAP, [], catalog_resolver=lambda: {}) + legacy_starter = resolve_operation_starter(MODULE_MAP, legacy_contracts, { + "pipelineClass": "Cosmos3OmniModularPipeline", "task": "text_to_image", + "executionProfileId": "cosmos3-super-text-to-image:official-modular-workflow", + }) + legacy_starter["nodes"] = [{ + "operation": node["operation"], + "node": describer._describe_registered_node(node["module"], node["action"], node), + } for node in legacy_starter["nodes"]] + legacy_spec = studio_execution_spec_for_pair( + "Cosmos3OmniModularPipeline", "text_to_image", content_hash="studio-spec-v1-91ed105d", + ) + for _, key, _, _ in legacy_spec["roles"]: + describe(key) + historical_cosmos_image = { + "starter": legacy_starter, "spec": legacy_spec, + "operationContracts": [c for c in legacy_contracts + if c["pipelineClass"] == "Cosmos3OmniModularPipeline" + and c["task"] == "text_to_image"], + } + json.dump({"recipes": rows, "registry": registry, "capabilities": public_capabilities, + "publicPayload": public_payload, "historicalCosmosImage": historical_cosmos_image}, sys.stdout) diff --git a/scripts/template-operation-workflows.test.mjs b/scripts/template-operation-workflows.test.mjs new file mode 100644 index 00000000..c51432c2 --- /dev/null +++ b/scripts/template-operation-workflows.test.mjs @@ -0,0 +1,2724 @@ +import { canonicalGraphIdentity } from './live-proof-provenance.mjs'; +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { readFile } from 'node:fs/promises'; +import { execFileSync } from 'node:child_process'; +import path from 'node:path'; +import { after, before, test } from 'node:test'; +import { createServer } from 'vite'; +import { technicalMediaErrors } from './template-gallery-harness.mjs'; + +test('accepted Moonflower garden motion keeps a local-subject gate and rejects a still film', () => { + const template = templates.find((item) => item.id === 'ace_step_lyric_music_video'); + const expected = template.example.expectedOutput; + assert.equal(expected.motionReviewProfile, 'localized_subject'); + const decoded = { + width: 1536, + height: 1024, + frames: 720, + durationSeconds: 45, + hasAudio: true, + embeddedAudio: { hash: 'pcm', peakAmplitude: 0.8, silenceRatio: 0.04, clippedSampleRatio: 0 }, + audiovisualMediaHash: 'av', + lumaStdDev: 56, + nearBlackRatio: 0.05, + uniqueFrameRatio: 1, + isolatedLumaFlashRatio: 0, + cumulativeChangedPixelRatio: 1, + adjacentChangedPixelRatio: 0.049, + endToEndChangedPixelRatio: 0.91, + motionMetricsByProfile: { + localized_subject: { activeMotionWindowRatio: 1, strongMotionWindowRatio: 1, lowMotionFrameRatio: 0.01 }, + }, + }; + assert.deepEqual(technicalMediaErrors(decoded, expected, 'video'), []); + assert.ok( + technicalMediaErrors( + { ...decoded, adjacentChangedPixelRatio: 0, cumulativeChangedPixelRatio: 0, uniqueFrameRatio: 0 }, + expected, + 'video', + ).length >= 3, + ); + assert.ok( + technicalMediaErrors(decoded, { ...expected, minimumAdjacentMotionCoverage: 0.08 }, 'video').some((error) => + error.includes('adjacent-frame'), + ), + ); +}); + +let server, + templates, + exactness, + builder, + groups, + values, + defaults, + fixture, + flowStore, + nodeStore, + studioStore, + lifecycle; +let publicOperations, starterRequests, qwenInpaintCandidate, qwenInpaintCandidateFixture; +function recipeSelection(row) { + return templates.find((template) => template.id === row.id).executionSelection; +} +function initialValue(row, role, field) { + return row.starter.authoring?.initialValues.find( + ([targetRole, targetField]) => targetRole === role && targetField === field, + )?.[2]; +} +function componentPolicy(row) { + const attentionBackend = initialValue(row, 'models', 'attention_backend'); + return attentionBackend === undefined + ? null + : { + attentionBackend, + vaeSlicing: initialValue(row, 'models', 'vae_slicing'), + vaeTiling: initialValue(row, 'models', 'vae_tiling'), + }; +} +function declaredFixtureDevice(row) { + const field = row.starter.nodes.find((item) => item.operation.decomposition === 'loader').node.params.device; + const device = field.value ?? field.default; + assert.equal(typeof device, 'string', 'Author against the device declared by the native metadata fixture.'); + return device; +} +function fixtureRuntimeSettings(row, form) { + const device = declaredFixtureDevice(row); + return { + device, + ...(!device.startsWith('cuda') + ? { autoOffload: false, offloadMode: 'none' } + : { autoOffload: form.autoOffload, offloadMode: form.offloadMode }), + }; +} +const automaticAttentionZTemplates = new Set([ + 'z_image_quick_concept', + 'z_image_product_mockup', + 'z_image_poster', + 'z_image_lora_style', + 'z_image_cinematic_contact_sheet', + 'low_vram', + 'fast_lora', +]); +test('fresh Z recipes use automatic attention without changing VAE or adapter controls', () => { + for (const id of automaticAttentionZTemplates) { + const template = templates.find((item) => item.id === id); + assert.deepEqual(componentPolicy(fixture.recipes.find((row) => row.id === id)), { + attentionBackend: 'auto', + vaeSlicing: true, + vaeTiling: true, + }); + } +}); +before(async () => { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, value), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { + location: { origin: 'http://127.0.0.1:5191' }, + localStorage: globalThis.localStorage, + dispatchEvent: () => true, + }; + server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + const { STUDIO_TEMPLATES: currentTemplates } = await server.ssrLoadModule('/src/studio/templates.ts'); + // This closed migration fixture protects the original 54 creator contracts. + // Additional native SDK image recipes have full coverage in the independent + // image-full-native-template-candidates and flux3-public-template-planning tests. + const baseline = JSON.parse(await readFile('tests/fixtures/image-template-creator-contracts.v1.json', 'utf8')); + const historicalImageIds = new Set(baseline.templates.map((row) => row.templateId)); + templates = currentTemplates.filter((item) => item.example?.mediaType !== 'image' || historicalImageIds.has(item.id)); + exactness = await server.ssrLoadModule('/src/studio/templateExactness.ts'); + builder = await server.ssrLoadModule('/src/studio/templateOperationWorkflow.ts'); + qwenInpaintCandidate = await server.ssrLoadModule('/src/studio/qwenInpaintNativeCandidate.ts'); + groups = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + values = await server.ssrLoadModule('/src/studio/executionSpecValues.ts'); + ({ DEFAULT_STUDIO_FORM: defaults } = await server.ssrLoadModule('/src/studio/modelProfiles.ts')); + ({ useFlowStore: flowStore } = await server.ssrLoadModule('/src/stores/useFlowStore.ts')); + ({ useNodesStore: nodeStore } = await server.ssrLoadModule('/src/stores/useNodeStore.ts')); + studioStore = await server.ssrLoadModule('/src/stores/useStudioStore.ts'); + lifecycle = await server.ssrLoadModule('/src/studio/templateWorkflow.ts'); + starterRequests = await server.ssrLoadModule('/src/workflow/operationStarterRequest.ts'); + const backend = path.resolve('../MoDiff'); + const python = + process.env.MODIFF_BACKEND_PYTHON || + path.join(backend, '.venv', process.platform === 'win32' ? 'Scripts/python.exe' : 'bin/python'); + const script = path.resolve('scripts/template-operation-fixtures.py'); + fixture = JSON.parse( + execFileSync( + process.platform === 'win32' ? python : path.join(backend, 'scripts/with-runtime-env.sh'), + process.platform === 'win32' ? [script] : [python, script], + { + cwd: backend, + encoding: 'utf8', + maxBuffer: 64 * 1024 * 1024, + input: JSON.stringify( + templates + .filter((item) => item.executionSelection && item.example?.mediaType === 'image') + .map((item) => ({ id: item.id, selection: item.executionSelection })), + ), + stdio: ['pipe', 'pipe', 'pipe'], + }, + ), + ); + defaults = { ...defaults, ...fixtureRuntimeSettings(fixture.recipes[0], defaults) }; + const { qwenInpaintNativeCandidateSelection } = await server.ssrLoadModule( + '/src/studio/templateOperationSelections.ts', + ); + qwenInpaintCandidateFixture = JSON.parse( + execFileSync( + process.platform === 'win32' ? python : path.join(backend, 'scripts/with-runtime-env.sh'), + process.platform === 'win32' ? [script] : [python, script], + { + cwd: backend, + encoding: 'utf8', + maxBuffer: 64 * 1024 * 1024, + input: JSON.stringify( + [ + 'qwen_inpaint_object_replace', + 'qwen_inpaint_mask_draft', + 'qwen_outpaint_aspect_template', + 'qwen_outpaint_draft', + ].map((id) => ({ id, selection: qwenInpaintNativeCandidateSelection(id) })), + ), + stdio: ['pipe', 'pipe', 'pipe'], + }, + ), + ); +}); +after(async () => server?.close()); + +test('four fresh Qwen masked templates preserve creator settings and use actual native stages', async (t) => { + const operations = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + const payload = qwenInpaintCandidateFixture.publicPayload; + const contracts = operations.parseOperationContracts( + payload.operationContracts, + payload.operationContractSchemaVersion, + ); + for (const row of qwenInpaintCandidateFixture.recipes) + await t.test(row.id, () => { + const template = templates.find((item) => item.id === row.id); + const before = structuredClone(template); + const form = selectedForm(template); + const starter = starterRequests.parseOperationStarter( + row.starter, + row.starter.pipelineClass, + row.starter.task, + contracts, + recipeSelection(row), + ); + for (const action of ['ModelsLoader', 'ImageEncode']) { + const field = starter.nodes.find((item) => item.node.action === action).node.params.inpaint_compatibility; + assert.equal(field.value ?? field.default, 'native', 'generic starter retains its native policy'); + } + const graph = builder.createTemplateOperationGraph( + template, + form, + starter, + { ...fixture.registry, ...qwenInpaintCandidateFixture.registry }, + row.spec, + row.capability, + ); + assert.deepEqual(template, before); + assert.equal( + template.executionSelection.implementation, + 'native_stages', + 'fresh templates select the reviewed native masked recipe', + ); + const flat = groups.unpackVisualOperationGroups(graph).graph; + const api = flowStore + .getState() + .exportGraph('qwen-native-candidate', undefined, { sourceGraph: graph, randomizeSeeds: false }); + const nodes = Object.values(api.nodes); + for (const action of ['ModelsLoader', 'EncodePrompt', 'ImageEncode', 'Denoise', 'DecodeLatents', 'Guider']) + assert.equal( + nodes.filter((node) => node.module === 'modules.ModularDiffusers' && node.action === action).length, + 1, + action, + ); + assert.equal( + nodes.some((node) => ['LoadPipeline', 'Inpaint', 'DiffusersExecutionRecipe'].includes(node.action)), + false, + ); + const encode = nodes.find((node) => node.action === 'ImageEncode'); + const denoise = nodes.find((node) => node.action === 'Denoise'); + const prompt = nodes.find((node) => node.action === 'EncodePrompt'); + const loader = nodes.find((node) => node.action === 'ModelsLoader'); + assert.equal(loader.params.inpaint_compatibility.value, 'whole_v1'); + assert.equal(encode.params.inpaint_compatibility.value, 'whole_v1'); + assert.equal(denoise.params.width.value, form.width); + assert.equal(denoise.params.height.value, form.height); + assert.equal(denoise.params.num_inference_steps.value, form.steps); + assert.equal(denoise.params.strength.value, form.strength); + assert.equal(prompt.params.prompt.value, form.prompt); + assert.equal(prompt.params.negative_prompt.value, form.negativePrompt); + assert.ok(nodes.filter((node) => node.params.seed).every((node) => node.params.seed.value === form.seed)); + assert.equal(new Set(flat.edges.map((edge) => `${edge.target}:${edge.targetHandle}`)).size, flat.edges.length); + const canvas = nodes.find((node) => node.action === 'OutpaintCanvas'); + if (row.id.startsWith('qwen_outpaint_')) { + assert.ok(canvas); + assert.equal(denoise.params.width.value, canvas.params.width.value); + assert.equal(denoise.params.height.value, canvas.params.height.value); + assert.deepEqual( + [denoise.params.width.value, denoise.params.height.value], + [1344, 768], + 'the original rectangular canvas and denoising noise use the same geometry', + ); + for (const [field, formField] of Object.entries({ + width: 'width', + height: 'height', + left: 'outpaintLeft', + right: 'outpaintRight', + top: 'outpaintTop', + bottom: 'outpaintBottom', + overlap: 'outpaintOverlap', + feather: 'outpaintFeather', + fill_color: 'outpaintFillColor', + })) + assert.deepEqual(canvas.params[field].value, form[formField]); + for (const [node, field, output] of [ + [encode, 'image', 'canvas'], + [encode, 'mask_image', 'mask_image'], + [prompt, 'image', 'canvas'], + ]) { + assert.equal(api.nodes[node.params[field].sourceId], canvas); + assert.equal(node.params[field].sourceKey, output); + } + } else assert.equal(canvas, undefined); + }); +}); + +test('private Qwen candidate inherits authored crop padding and honors explicit overrides including null', async () => { + const row = qwenInpaintCandidateFixture.recipes.find((item) => item.id === 'qwen_inpaint_object_replace'); + const operations = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + const payload = qwenInpaintCandidateFixture.publicPayload; + const contracts = operations.parseOperationContracts( + payload.operationContracts, + payload.operationContractSchemaVersion, + ); + const starter = starterRequests.parseOperationStarter( + row.starter, + row.starter.pipelineClass, + row.starter.task, + contracts, + recipeSelection(row), + ); + const template = templates.find((item) => item.id === row.id); + const form = { ...selectedForm(template), paddingMaskCrop: 96 }; + for (const [options, expected] of [ + [{}, 96], + [{ paddingMaskCrop: 24 }, 24], + [{ paddingMaskCrop: null }, null], + ]) { + const graph = groups.unpackVisualOperationGroups( + qwenInpaintCandidate.createQwenInpaintNativeCandidateGraph( + template, + form, + starter, + { ...fixture.registry, ...qwenInpaintCandidateFixture.registry }, + row.spec, + row.capability, + options, + ), + ).graph; + const encode = graph.nodes.find((node) => node.data.action === 'ImageEncode'); + assert.equal(encode.data.params.padding_mask_crop.value, expected); + const api = flowStore + .getState() + .exportGraph('qwen-native-crop', undefined, { sourceGraph: graph, randomizeSeeds: false }); + const packetEncode = Object.values(api.nodes).find((node) => node.action === 'ImageEncode'); + assert.equal(packetEncode.params.padding_mask_crop.value ?? null, expected); + } +}); + +test('fresh masked authoring rejects mismatched authoritative workflow identities', async () => { + const row = qwenInpaintCandidateFixture.recipes.find((item) => item.id === 'qwen_inpaint_object_replace'); + const operations = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + const contracts = operations.parseOperationContracts(qwenInpaintCandidateFixture.publicPayload.operationContracts, 3); + for (const workflowId of [null, 'image_conditioned']) { + const value = structuredClone(row.starter); + value.workflowId = workflowId; + const before = structuredClone(value); + assert.throws(() => + starterRequests.parseOperationStarter(value, value.pipelineClass, value.task, contracts, recipeSelection(row)), + ); + assert.deepEqual(value, before); + } + const value = structuredClone(row.starter); + value.nodes.find((item) => item.operation.nodeType === 'loader').operation.binding.values.workflow_id = + 'image_conditioned'; + assert.throws(() => + starterRequests.parseOperationStarter(value, value.pipelineClass, value.task, contracts, recipeSelection(row)), + ); +}); + +test('the real public capability and every selected starter response pass production wire parsers', async () => { + const nodes = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); + const operations = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + const support = await server.ssrLoadModule('/src/workflow/operationCatalog.ts'); + const choices = await server.ssrLoadModule('/src/workflow/workflowChoices.ts'); + const payload = fixture.publicPayload; + const capabilities = nodes.parseStudioModelCapabilities(payload); + publicOperations = operations.parseOperationContracts( + payload.operationContracts, + payload.operationContractSchemaVersion, + ); + const pipelines = support.parsePipelineSupport( + payload.pipelineSupport, + payload.pipelineSupportSchemaVersion, + publicOperations, + ); + choices.parseWorkflowModelDescriptors(payload, pipelines, capabilities.capabilities); + for (const row of fixture.recipes) { + const parsed = starterRequests.parseOperationStarter( + row.starter, + row.starter.pipelineClass, + row.starter.task, + publicOperations, + recipeSelection(row), + ); + assert.equal(parsed.nodes.length, row.starter.nodes.length, row.id); + } +}); + +test('the 54 image templates preserve creator contracts except explicit versioned creative revisions', async () => { + const baseline = JSON.parse(await readFile('tests/fixtures/image-template-creator-contracts.v1.json', 'utf8')); + const revisions = JSON.parse(await readFile('tests/fixtures/image-template-creative-revisions.v1.json', 'utf8')); + const gallery = JSON.parse(await readFile('public/template-gallery/manifest.json', 'utf8')); + assert.equal(revisions.schemaVersion, 1); + assert.deepEqual( + revisions.revisions.map((row) => row.templateId), + [ + 'flux_lora_cinematic_octane_3d', + 'z_image_cinematic_contact_sheet', + 'flux_kontext_multi_reference', + 'flux_redux_multi_reference', + ], + ); + const images = templates.filter((template) => template.example?.mediaType === 'image'); + assert.equal(images.length, 54); + for (const expected of baseline.templates) { + const template = images.find((item) => item.id === expected.templateId); + assert.ok(template, expected.templateId); + const expectedContract = structuredClone(expected.contract); + const revision = revisions.revisions.find((row) => row.templateId === template.id); + if (revision) { + const digest = (text) => createHash('sha256').update(text).digest('hex'); + assert.equal(digest(expected.contract.lockedSettings.prompt), revision.previousPromptSha256); + assert.equal(digest(template.prompt), revision.promptSha256); + if (template.id === 'flux_lora_cinematic_octane_3d') { + assert.equal(revision.recipeVersion, 3); + assert.deepEqual(revision.lockedSettings, { guidanceScale: 1, resourceMode: 'expert' }); + assert.doesNotMatch(template.prompt, /\b(?:scar|wound|blood|bruise)\b/iu); + assert.match(template.prompt, /healthy unmarked face/u); + } else if (template.id === 'flux_kontext_multi_reference') { + assert.equal(revision.recipeVersion, 2); + assert.deepEqual( + revision.lockedSettings, + {}, + 'the accepted preservation revision changes no generation control', + ); + assert.match(template.prompt, /narrow RIGHT reference strip only/); + assert.match(template.prompt, /ASTERMIST and LAVENDER SLEEP SPRAY/); + assert.equal(revision.inputBindings[0].defaultAssets.length, 2); + assert.equal( + revision.inputBindings[0].defaultAssets[1].runtimeSha256, + 'sha256:bytes:70c74691e2bcd7cdb352b7e64e5af5a1a7f01d77112d32a8edadc0060a95ef34', + ); + expectedContract.inputBindings = revision.inputBindings; + } else if (template.id === 'flux_redux_multi_reference') { + assert.equal(revision.recipeVersion, 2); + assert.deepEqual(revision.lockedSettings, { seed: 8414, guidanceScale: 3.5 }); + assert.deepEqual(revision.workflowBlockSettings, template.workflowBlockSettings); + assert.equal(revision.approvedOutputSha256, 'c50df8d364a6065443d8f790a347ad7baf84e8bacf91a15245d28619a9f54bd9'); + expectedContract.workflowBlockSettings = revision.workflowBlockSettings; + } else { + assert.equal(template.id, 'z_image_cinematic_contact_sheet'); + assert.equal(revision.recipeVersion, 2); + assert.deepEqual(revision.lockedSettings, {}, 'the exit revision changes no generation control'); + assert.match(template.prompt, /first three frames where his face is visible/iu); + assert.match(template.prompt, /Frame four, lower right: a REAR-VIEW LONG SHOT from directly BEHIND/iu); + } + if (template.id !== 'flux_redux_multi_reference') + assert.equal(template.example.status, 'unverified', 'creative review never grants public qualification'); + expectedContract.lockedSettings.prompt = template.prompt; + Object.assign(expectedContract.lockedSettings, revision.lockedSettings); + } + // Registration can add a browser preview for the exact already-frozen input. + // Preserve the original snapshot, and allow only this additive presentation + // field after joining the approved Before path and unchanged source hash. + for (const binding of expectedContract.inputBindings) { + for (const asset of binding.defaultAssets ?? []) { + const current = template.inputBindings + ?.find((item) => item.id === binding.id) + ?.defaultAssets?.find((item) => item.id === asset.id); + if (asset.previewPath === undefined && current?.previewPath !== undefined) { + const entry = gallery.examples.find((item) => item.templateId === template.id); + assert.equal(current.previewPath, entry?.beforePath); + assert.equal(asset.runtimeSha256, entry?.beforeMediaHash); + assert.equal(current.runtimeSha256, asset.runtimeSha256); + asset.previewPath = current.previewPath; + } + } + } + assert.deepEqual( + { + lockedSettings: exactness.getTemplateLockedSettings(template), + inputBindings: template.inputBindings ?? [], + workflowBlocks: template.workflowBlocks ?? [], + workflowBlockSettings: template.workflowBlockSettings ?? {}, + }, + expectedContract, + `${template.id} retains every setting outside its declared creative revision`, + ); + assert.equal(template.executionSelection?.schemaVersion, 1, `${template.id} selects a reviewed operation recipe`); + assert.ok(template.executionSelection.executionProfileId); + assert.ok(template.executionSelection.pipelineClass); + if (template.executionSelection.implementation === 'native_stages') + assert.deepEqual( + componentPolicy(fixture.recipes.find((row) => row.id === template.id)), + automaticAttentionZTemplates.has(template.id) + ? { ...expected.originalComponentPolicy, attentionBackend: 'auto' } + : expected.originalComponentPolicy, + `${template.id} retains its reviewed component policy`, + ); + } +}); + +test('execution selection changes invalidate current exactness while preserving the historical example', () => { + const template = templates.find((item) => item.id === 'z_image_quick_concept'); + const historical = { ...template, executionSelection: undefined }; + assert.notEqual(exactness.getTemplateLockHash(template), exactness.getTemplateLockHash(historical)); +}); + +test('only the seven converted Z recipes declare their observed CFG formulation in the backend', () => { + const images = templates.filter((template) => template.example?.mediaType === 'image'); + const converted = images.filter( + (template) => template.executionSelection.authoringRecipeId === 'retained-z-image-text-to-image:v1', + ); + assert.equal(converted.length, 7); + for (const template of converted) { + const row = fixture.recipes.find((item) => item.id === template.id); + assert.equal(initialValue(row, 'guider', 'enabled'), true); + assert.equal(initialValue(row, 'guider', 'use_original_formulation'), true); + const previous = { + ...template, + executionSelection: { ...template.executionSelection, authoringRecipeId: undefined }, + }; + assert.notEqual(exactness.getTemplateLockHash(template), exactness.getTemplateLockHash(previous)); + const guider = row.starter.nodes.find((node) => node.operation.operationId === 'diffusion.guidance'); + assert.equal(guider.node.params.enabled.value, false, 'ordinary upstream developer starter remains disabled'); + assert.equal(guider.node.params.use_original_formulation.value, false); + } +}); + +test('historical approved image remains visible without becoming proof of the current execution selection', async () => { + const template = templates.find((item) => item.id === 'z_image_quick_concept'); + // Keep the original published previous-recipe record independent of later registrations. + const manifest = JSON.parse(await readFile('tests/fixtures/historical-z-gallery-entry.v1.json', 'utf8')); + assert.equal(exactness.findManifestEntry(template, manifest), undefined); + const historical = exactness.findHistoricalTemplateManifestEntry(template, manifest); + assert.ok(historical); + const state = exactness.getTemplateExampleUiState(template, selectedForm(template), null, manifest); + assert.equal(state.status, 'historical'); + assert.equal(state.tone, 'neutral'); + assert.ok(exactness.getTemplateCardMedia(template, manifest).mediaPath); + const changedPrompt = { ...template, prompt: `${template.prompt} different scene` }; + assert.equal(exactness.findHistoricalTemplateManifestEntry(changedPrompt, manifest), undefined); +}); + +test('registered Z examples use their current reviewed recipe without granting duplicate exactness', async () => { + const manifest = JSON.parse(await readFile('public/template-gallery/manifest.json', 'utf8')); + for (const id of [ + 'z_image_quick_concept', + 'z_image_product_mockup', + 'z_image_poster', + 'low_vram', + 'fast_lora', + 'z_image_lora_style', + ]) { + const template = templates.find((item) => item.id === id); + const entry = exactness.findManifestEntry(template, manifest); + assert.ok(entry, id); + assert.equal(entry.verificationStatus, 'reviewed', id); + assert.equal(entry.qualityReviewStatus, 'approved_reviewed', id); + assert.equal(exactness.findHistoricalTemplateManifestEntry(template, manifest), undefined, id); + assert.equal( + exactness.getTemplateExampleUiState(template, selectedForm(template), null, manifest).status, + 'reviewed', + id, + ); + assert.ok(exactness.getTemplateCardMedia(template, manifest).mediaPath, id); + assert.equal( + exactness.findManifestEntry({ ...template, prompt: `${template.prompt} different scene` }, manifest), + undefined, + ); + const changedRecipe = { + ...template, + executionSelection: { ...template.executionSelection, authoringRecipeId: 'different-reviewed-recipe:v1' }, + }; + assert.equal(exactness.findManifestEntry(changedRecipe, manifest), undefined, id); + } +}); + +test('historical adapter examples retain their recorded immutable pin when authoring adds that revision', async () => { + const manifest = JSON.parse(await readFile('scripts/fixtures/historical-qwen-adapter-gallery.json', 'utf8')); + const current = JSON.parse(await readFile('public/template-gallery/manifest.json', 'utf8')); + for (const id of [ + 'qwen_product_ad_composite', + 'qwen_product_relight', + 'qwen_logo_texture', + 'character_edit', + 'reference_fusion', + 'qwen_multi_reference_product', + ]) { + const template = templates.find((item) => item.id === id); + const before = structuredClone(template); + assert.equal( + exactness.getTemplateExampleUiState(template, selectedForm(template), null, current).status, + 'reviewed', + id, + ); + assert.equal(exactness.findManifestEntry(template, manifest), undefined); + const previous = exactness.findHistoricalTemplateManifestEntry(template, manifest); + assert.ok(previous, id); + assert.equal(previous.templateLockHash, manifest.examples.find((item) => item.templateId === id).templateLockHash); + assert.equal( + exactness.getTemplateExampleUiState(template, selectedForm(template), null, manifest).status, + 'historical', + ); + assert.deepEqual(template, before, 'historical lookup never rewrites the current template'); + for (const change of [ + { revision: 'a'.repeat(40) }, + { revision: 'main' }, + { value: 'another/adapter' }, + { sha256: 'b'.repeat(64) }, + { byteSize: 1 }, + { source: 'local' }, + ]) { + const changed = structuredClone(template); + Object.assign(changed.workflowBlockSettings.lora.model, change); + assert.equal(exactness.findHistoricalTemplateManifestEntry(changed, manifest), undefined, JSON.stringify(change)); + } + const changedScale = structuredClone(template); + changedScale.workflowBlockSettings.lora.scale = 0.5; + assert.equal(exactness.findHistoricalTemplateManifestEntry(changedScale, manifest), undefined); + const changedPrompt = { ...template, prompt: template.prompt + ' changed scene' }; + assert.equal(exactness.findHistoricalTemplateManifestEntry(changedPrompt, manifest), undefined); + for (const field of ['modelCommit', 'modelRevision']) { + const unbound = structuredClone(manifest); + unbound.examples.find((item) => item.templateId === id)[field] = 'another/adapter@' + 'a'.repeat(40); + assert.equal(exactness.findHistoricalTemplateManifestEntry(template, unbound), undefined, field); + } + } +}); + +function selectedForm(template) { + const authored = { ...defaults, ...exactness.getTemplateLockedSettings(template) }; + return { + ...authored, + ...fixtureRuntimeSettings( + fixture.recipes.find((row) => row.id === template.id), + authored, + ), + referenceImages: ['source.png', 'reference-second.png', 'reference-third.png'], + maskImage: 'mask.png', + controlImage: 'control.png', + }; +} + +test('fresh encoding presets share one JSON supplier inside Encode Inputs and preserve existing source declarations', () => { + const source = templates.find((t) => t.id === 'flux_redux_multi_reference'); + const template = structuredClone(source); + template.workflowBlockSettings = { + ...template.workflowBlockSettings, + encodingInputs: { + role: 'imageEncode', + values: { prompt_embeds_scale: [0.8, 0.2], pooled_prompt_embeds_scale: [0.8, 0.2] }, + }, + }; + const original = structuredClone(template), + row = fixture.recipes.find((r) => r.id === source.id); + const form = selectedForm(template); + const graph = builder.createTemplateOperationGraph( + template, + form, + row.starter, + fixture.registry, + row.spec, + row.capability, + ); + const flat = groups.unpackVisualOperationGroups(graph).graph; + const weights = flat.nodes.filter((n) => n.data.module === 'modules.Text' && n.data.action === 'ProcessText'); + assert.equal(weights.length, 1); + assert.equal(weights[0].data.params.source.value, '[0.8,0.2]'); + const encode = flat.nodes.find((n) => n.data.module === 'modules.DiffusersImage' && n.data.action === 'EncodeInputs'); + for (const targetHandle of ['prompt_embeds_scale', 'pooled_prompt_embeds_scale']) + assert( + flat.edges.some((e) => e.source === weights[0].id && e.target === encode.id && e.targetHandle === targetHandle), + ); + const stage = graph.nodes.find((n) => n.data.label === 'Encode Inputs'); + assert(stage?.data.blockInstanceV2); + assert(stage.data.blockInstanceV2.effectiveGraph.nodes.some((n) => n.data.action === 'ProcessText')); + assert.deepEqual(template, original); + const changedWeights = structuredClone(template); + changedWeights.workflowBlockSettings.encodingInputs.values.prompt_embeds_scale = [0.6, 0.4]; + assert.notEqual(exactness.getTemplateLockHash(template), exactness.getTemplateLockHash(changedWeights)); + for (const values of [{ nonexistent_input: [1] }, { prompt_embeds_scale: [Infinity] }, { prompt_embeds_scale: [] }]) { + const invalid = structuredClone(template); + invalid.workflowBlockSettings.encodingInputs.values = values; + assert.throws(() => + builder.createTemplateOperationGraph(invalid, form, row.starter, fixture.registry, row.spec, row.capability), + ); + } +}); + +test('shared execution bindings do not infer forced flash from a CUDA device', async () => { + const cluster = await server.ssrLoadModule('/src/studio/huggingFaceClusterRuntime.ts'); + const form = { ...defaults, device: 'cuda:0', attentionBackend: 'auto' }; + const spec = { bindings: [], autoFields: [], defaultRepo: 'reviewed/model' }; + const admission = { executionParameterSources: ['nativeFlashAttention', 'transformer', 'dualTransformer'] }; + for (const policy of ['auto', '_native_math', '_native_flash']) { + const authored = { ...form, attentionBackend: policy }; + const expected = { + nativeFlashAttention: policy, + transformer: policy === '_native_flash' ? 'transformer' : '', + dualTransformer: policy === '_native_flash' ? 'transformer,transformer_2' : '', + }; + const resolved = values.resolveStudioExecutionSpecValues(authored, spec, undefined); + assert.deepEqual(Object.fromEntries(Object.keys(expected).map((key) => [key, resolved[key]])), expected); + assert.deepEqual( + cluster.huggingFaceClusterExecutionParameterValues(admission, authored, null, ['transformer'], '', false), + expected, + ); + } + const candidate = { attentionBackend: 'native' }; + assert.equal( + values.resolveStudioExecutionSpecValues(form, spec, undefined, { candidate }).nativeFlashAttention, + 'native', + ); + assert.equal( + cluster.huggingFaceClusterExecutionParameterValues(admission, form, candidate).nativeFlashAttention, + 'native', + ); +}); + +test('all seven converted Z recipes bind the authored negative text to the real guided encoder', async (t) => { + const converted = templates.filter( + (template) => template.executionSelection?.pipelineClass === 'ZImageModularPipeline', + ); + assert.equal(converted.length, 7); + for (const template of converted) + await t.test(template.id, () => { + const row = fixture.recipes.find((item) => item.id === template.id); + for (const negativePrompt of [template.negativePrompt ?? '', `exclude duplicate objects for ${template.id}`]) { + const form = { ...selectedForm(template), negativePrompt }; + const graph = builder.createTemplateOperationGraph( + template, + form, + row.starter, + fixture.registry, + row.spec, + row.capability, + ); + const api = flowStore + .getState() + .exportGraph('z-negative-conditioning', undefined, { sourceGraph: graph, randomizeSeeds: false }); + const entries = Object.entries(api.nodes); + const encoders = entries.filter(([, node]) => node.action === 'EncodePrompt'); + assert.equal(encoders.length, 1); + const [encoderId, encoder] = encoders[0]; + assert.equal( + encoder.params.negative_prompt?.value, + negativePrompt, + 'the actual encoder retains original and changed nonempty negative text', + ); + const [guiderId, guider] = entries.find(([, node]) => node.action === 'Guider'); + assert.equal(guider.params.enabled.value, true); + assert.equal(guider.params.use_original_formulation.value, true); + assert.equal(encoder.params.guider.sourceId, guiderId); + const denoiser = entries.find(([, node]) => node.action === 'Denoise')[1]; + assert.equal(denoiser.params.guider.sourceId, guiderId); + assert.equal(denoiser.params.embeddings.sourceId, encoderId); + } + }); +}); + +test('only the two converted single-LoRA Z recipes preserve the original whole-pipeline default adapter identity', async () => { + const preserved = new Set(['z_image_lora_style', 'fast_lora']); + assert.equal(fixture.registry['modules.DiffusersImage.LoadAdapter'].params.adapter_name.default, 'default'); + const images = templates.filter((template) => template.example?.mediaType === 'image'); + assert.equal(images.filter((template) => template.executionSelection.loraPolicy).length, 2); + for (const template of images) { + if (!preserved.has(template.id)) { + assert.equal(template.executionSelection.loraPolicy, undefined, template.id); + continue; + } + assert.deepEqual(template.executionSelection.loraPolicy, { defaultAdapterName: 'default' }); + assert.equal( + template.workflowBlockSettings.lora.adapterName, + undefined, + 'the immutable creator literal stays omitted', + ); + assert.equal(template.workflowBlockSettings.lora.additionalAdapters?.length ?? 0, 0); + const previous = { + ...template, + executionSelection: { ...template.executionSelection, loraPolicy: undefined }, + }; + assert.notEqual(exactness.getTemplateLockHash(template), exactness.getTemplateLockHash(previous)); + assert.deepEqual(template.example, previous.example, 'historical output is retained without a new approval'); + } + for (const template of images.filter((item) => item.workflowBlocks?.includes('lora'))) { + const row = fixture.recipes.find((item) => item.id === template.id); + const graph = builder.createTemplateOperationGraph( + template, + selectedForm(template), + row.starter, + fixture.registry, + row.spec, + row.capability, + ); + const api = flowStore + .getState() + .exportGraph('exact-adapter-names', undefined, { sourceGraph: graph, randomizeSeeds: false }); + const loraEntries = Object.entries(api.nodes).filter( + ([, node]) => node.action === 'Lora' || node.action === 'LoadAdapter', + ); + const loras = []; + if (loraEntries.some(([, node]) => node.action === 'Lora')) { + let sourceId = Object.values(api.nodes).find((node) => node.action === 'ModelsLoader').params.lora_list.sourceId; + const visited = new Set(); + while (sourceId) { + assert.equal(visited.has(sourceId), false, 'the actual adapter supplier chain cannot cycle'); + visited.add(sourceId); + const node = api.nodes[sourceId]; + assert.equal(node.action, 'Lora'); + loras.unshift(node); + sourceId = node.params.previous_loras.sourceId; + } + } else { + let sourceId = Object.entries(api.nodes).find(([, node]) => node.action === 'LoadPipeline')[0]; + while (true) { + const next = loraEntries.find(([, node]) => node.params.pipeline.sourceId === sourceId); + if (!next) break; + assert.equal(loras.includes(next[1]), false, 'the actual adapter supplier chain cannot cycle'); + loras.push(next[1]); + sourceId = next[0]; + } + } + assert.equal(loras.length, loraEntries.length, 'every adapter participates in the actual ordered supplier chain'); + const settings = template.workflowBlockSettings.lora; + const adapters = [settings, ...(settings.additionalAdapters ?? [])]; + assert.equal(loras.length, adapters.length, template.id); + adapters.forEach((adapter, index) => { + assert.equal( + loras[index].params.adapter_name.value, + adapter.adapterName ?? (preserved.has(template.id) || loras[index].action === 'LoadAdapter' ? 'default' : ''), + `${template.id} retains its exact authored or original default adapter identity`, + ); + }); + } +}); + +test('a default adapter identity policy fails closed on malformed names, extra adapters and incompatible owners', () => { + const source = templates.find((item) => item.id === 'z_image_lora_style'); + const row = fixture.recipes.find((item) => item.id === source.id); + const build = (template, selected = row) => + builder.createTemplateOperationGraph( + template, + selectedForm(template), + selected.starter, + fixture.registry, + selected.spec, + selected.capability, + ); + for (const defaultAdapterName of ['', ' default', 'default ', 'bad\nname', 'x'.repeat(257), 1]) { + const template = structuredClone(source); + template.executionSelection.loraPolicy = { defaultAdapterName }; + assert.throws(() => build(template), /adapter identity policy/); + } + const extra = structuredClone(source); + extra.executionSelection.loraPolicy = { defaultAdapterName: 'default' }; + extra.workflowBlockSettings.lora.additionalAdapters = [structuredClone(source.workflowBlockSettings.lora)]; + assert.throws(() => build(extra), /adapter identity policy/); + const conflict = structuredClone(source); + conflict.executionSelection.loraPolicy = { defaultAdapterName: 'default' }; + conflict.workflowBlockSettings.lora.adapterName = 'authored-other'; + assert.throws(() => build(conflict), /adapter identity policy/); + for (const templateId of ['z_image_quick_concept', 'qwen_layered_portrait']) { + const template = structuredClone(templates.find((item) => item.id === templateId)); + template.executionSelection.loraPolicy = { defaultAdapterName: 'default' }; + assert.throws( + () => + build( + template, + fixture.recipes.find((item) => item.id === templateId), + ), + /adapter identity policy/, + ); + } + const whole = structuredClone(templates.find((item) => item.id === 'flux_fill_inpaint')); + whole.executionSelection.loraPolicy = { defaultAdapterName: 'default' }; + whole.workflowBlocks = ['lora']; + whole.workflowBlockSettings = { lora: structuredClone(source.workflowBlockSettings.lora) }; + assert.throws( + () => + build( + whole, + fixture.recipes.find((item) => item.id === whole.id), + ), + /adapter identity policy/, + ); +}); + +// These are the original whole-pipeline wrapper's separate embedded guidance +// defaults, independently observed in frozen standard-pipeline API recipes. +function preservedEmbeddedGuidance(template) { + return { FluxSchnellPipeline: 0, FluxDevPipeline: 3.5, FluxKreaPipeline: 3.5, FluxKontextPipeline: 3.5 }[ + template.modelType + ]; +} + +test('the thirteen converted Flux recipes preserve true CFG separately from original embedded guidance', () => { + const images = templates.filter((template) => template.example?.mediaType === 'image'); + const converted = images.filter((template) => preservedEmbeddedGuidance(template) !== undefined); + assert.equal(converted.length, 13); + for (const template of converted) { + const row = fixture.recipes.find((item) => item.id === template.id); + assert.equal(initialValue(row, 'guider', 'enabled'), template.id !== 'flux_schnell_text_to_image'); + assert.equal(initialValue(row, 'guider', 'use_original_formulation'), false); + assert.equal(initialValue(row, 'denoise', 'guidance_scale'), preservedEmbeddedGuidance(template)); + const ordinary = row.starter.nodes.find((item) => item.operation.operationId === 'diffusion.guidance'); + assert.ok(ordinary, 'the actual selected backend starter declares a CFG owner'); + assert.equal( + ordinary.node.params.enabled.value, + false, + 'ordinary upstream developer authoring retains its conditional-only default', + ); + assert.equal(ordinary.node.params.guidance_scale.value, 1.0); + const graph = builder.createTemplateOperationGraph( + template, + selectedForm(template), + row.starter, + fixture.registry, + row.spec, + row.capability, + ); + const api = flowStore + .getState() + .exportGraph('separate-flux-guidance', undefined, { sourceGraph: graph, randomizeSeeds: false }); + const guide = Object.values(api.nodes).find((node) => node.action === 'Guider'); + const denoise = Object.values(api.nodes).find((node) => node.action === 'Denoise'); + assert.equal( + guide.params.guidance_scale.value, + exactness.getTemplateLockedSettings(template).guidanceScale, + 'actual CFG retains the creator scalar', + ); + assert.equal( + denoise.params.guidance_scale.value, + preservedEmbeddedGuidance(template), + 'actual model forward retains the separate original embedded scalar', + ); + for (const action of ['EncodePrompt', 'Denoise']) { + const consumer = Object.values(api.nodes).find((node) => node.action === action); + assert.equal(api.nodes[consumer.params.guider.sourceId], guide, 'the real same CFG owner feeds both stages'); + } + } +}); + +test('native Schnell exports the creator 512-token recipe rather than the ordinary starter default', () => { + const template = templates.find((item) => item.id === 'flux_schnell_text_to_image'); + const row = fixture.recipes.find((item) => item.id === template.id); + const form = selectedForm(template); + assert.equal(form.maxSequenceLength, 512); + const starterPrompt = row.starter.nodes.find((item) => item.node.action === 'EncodePrompt'); + assert.equal(starterPrompt.node.params.max_sequence_length.value, 256); + const graph = builder.createTemplateOperationGraph( + template, + form, + row.starter, + fixture.registry, + row.spec, + row.capability, + ); + const api = flowStore + .getState() + .exportGraph('schnell-recipe', undefined, { sourceGraph: graph, randomizeSeeds: false }); + const prompt = Object.values(api.nodes).find((node) => node.action === 'EncodePrompt'); + assert.equal(prompt.params.max_sequence_length.value, 512); + assert.equal(prompt.params.prompt.value, template.prompt); + const denoise = Object.values(api.nodes).find((node) => node.action === 'Denoise'); + assert.equal(denoise.params.num_inference_steps.value, 4); + assert.equal(denoise.params.guidance_scale.value, 0); + assert.equal(denoise.params.seed.value, 8427); + const owner = Object.values(api.nodes).find((node) => node.action === 'ModelsLoader'); + assert.equal(owner.params.repo_id.value.value, 'black-forest-labs/FLUX.1-schnell'); + assert.equal(owner.params.revision.value, '741f7c3ce8b383c54771c7003378a50191e9efe9'); +}); + +test('Strength is offered only when the selected image task has a reviewed execution binding', async (t) => { + const { parseStudioModelCapabilities } = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); + const { studioSupportsStrength } = await server.ssrLoadModule('/src/studio/effectiveControls.ts'); + const { capabilities } = parseStudioModelCapabilities(fixture.publicPayload); + const expected = { + qwen_tile_extract: false, + qwen_character_angles: false, + qwen_edit_strength_sweep: false, + character_edit: false, + reference_fusion: false, + qwen_layered_portrait: false, + flux2_klein_edit: false, + flux2_klein_multi_reference: false, + flux_kontext_edit: false, + flux_redux_edit: false, + qwen_inpaint_object_replace: true, + qwen_inpaint_mask_draft: true, + flux_fill_inpaint: true, + flux_fill_outpaint: true, + }; + for (const [id, supported] of Object.entries(expected)) { + await t.test(id, () => { + const template = templates.find((item) => item.id === id); + assert.ok(template, id); + const capability = capabilities.find((item) => item.modelType === template.modelType); + assert.ok(capability, template.modelType); + assert.equal(studioSupportsStrength(template, capabilities, template), supported); + assert.equal( + studioSupportsStrength(template, [], template), + false, + 'missing reviewed execution metadata must not advertise a functional control', + ); + }); + } + for (const modelType of ['FluxReduxPipeline', 'FluxKontextPipeline', 'Flux2KleinPipeline']) { + for (const mode of ['edit_image', 'multi_image_reference_edit']) { + await t.test(`${modelType}/${mode} legacy selection`, () => { + assert.equal(studioSupportsStrength({ modelType, mode }, capabilities), false); + }); + } + } + const oldId = templates.find((item) => item.id === 'qwen_edit_strength_sweep'); + assert.match(oldId.description, /single-image reference edit/i); + assert.doesNotMatch(oldId.label, /strength|sweep/i); +}); + +test('unsupported Strength does not appear in parameter notes or executable variations', async () => { + const { createElement } = await import('react'); + const { renderToStaticMarkup } = await import('react-dom/server'); + const { StudioVariationPlanner } = await server.ssrLoadModule('/src/components/StudioVariationPlanner.tsx'); + const { StudioParameterExplainers } = await server.ssrLoadModule('/src/components/StudioParameterExplainers.tsx'); + const form = { ...defaults, mode: 'edit_image' }; + for (const supported of [false, true]) { + const planner = renderToStaticMarkup( + createElement(StudioVariationPlanner, { + form, + supportsStrength: supported, + onChange() {}, + onRunSweep() {}, + }), + ); + const notes = renderToStaticMarkup( + createElement(StudioParameterExplainers, { + form, + supportsStrength: supported, + }), + ); + assert.equal(planner.includes('Lower strength'), supported); + assert.equal(planner.includes('Higher strength'), supported); + assert.equal(notes.includes('Strength:'), supported); + assert.ok(planner.includes('Next seed'), 'other actual variations remain available'); + } +}); + +test('all54 image recipes construct and export the exact backend developer stages with every declared creator binding', async (t) => { + assert.equal(fixture.recipes.length, 54); + assert.equal( + fixture.recipes.filter( + (row) => templates.find((item) => item.id === row.id).executionSelection.implementation === 'native_stages', + ).length, + 48, + ); + for (const row of fixture.recipes) + await t.test(row.id, () => { + const template = templates.find((item) => item.id === row.id); + const form = selectedForm(template); + const before = structuredClone(row.starter); + const graph = builder.createTemplateOperationGraph( + template, + form, + starterRequests.parseOperationStarter( + row.starter, + row.starter.pipelineClass, + row.starter.task, + publicOperations, + recipeSelection(row), + ), + fixture.registry, + row.spec, + row.capability, + ); + assert.deepEqual(row.starter, before, 'construction never changes the resolved backend contract'); + const flat = groups.unpackVisualOperationGroups(graph).graph; + const operations = flat.nodes.filter((node) => node.data.operationAuthoring); + assert.equal(operations.length, row.starter.nodes.length); + assert.deepEqual( + operations.map((node) => node.data.operationAuthoring.operation.operationId).sort(), + row.starter.nodes.map((node) => node.operation.operationId).sort(), + ); + assert.ok( + flat.nodes.every((node) => !node.data.studioOwned), + 'ordinary graph has no stale managed owner', + ); + const owner = operations.find((node) => node.data.operationAuthoring.operation.nodeType === 'loader'); + assert.ok(owner); + const backendOwner = row.starter.nodes.find((node) => node.operation.nodeType === 'loader').node; + for (const field of ['model_id', 'repo_id', 'revision', 'pipeline_class', 'model_type', 'execution_profile_id']) { + if (backendOwner.params[field]) + assert.deepEqual( + owner.data.params[field].value ?? owner.data.params[field].default, + backendOwner.params[field].value ?? backendOwner.params[field].default, + `${field} retains the selected artifact identity`, + ); + } + const revision = owner.data.params.revision?.value ?? owner.data.params.revision?.default; + const expected = values.resolveStudioExecutionSpecValues(form, row.spec, row.capability, { + defaultModelRevision: revision, + }); + const declarations = row.starter.authoring ?? row.spec; + const claimed = new Set(); + for (const [role, key] of declarations.roles) { + const node = flat.nodes.find( + (item) => `${item.data.module}.${item.data.action}` === key && !claimed.has(item.id), + ); + assert.ok(node, role); + claimed.add(node.id); + for (const [boundRole, field, source] of declarations.bindings) + if (boundRole === role) { + if ( + node.id === owner.id && + ['artifact', 'defaultRevision', 'pipelineClass', 'executionProfileId', 'modelVariant'].includes(source) + ) + continue; + const value = + field === 'guidance_scale' && + node.data.action === 'Denoise' && + preservedEmbeddedGuidance(template) !== undefined + ? preservedEmbeddedGuidance(template) + : node.data.params[field].type === 'model' && typeof expected[source] === 'string' + ? { source: 'hub', value: expected[source] } + : expected[source]; + assert.deepEqual(node.data.params[field].value, value, `${role}.${field} retains ${source}`); + } + } + assert.equal( + new Set(flat.edges.map((edge) => `${edge.target}:${edge.targetHandle}`)).size, + flat.edges.length, + 'each port has one supplier', + ); + const api = flowStore + .getState() + .exportGraph('test-template', undefined, { sourceGraph: graph, randomizeSeeds: false }); + assert.equal( + Object.values(api.nodes).filter((node) => node.module === 'modules.ModularDiffusers').length, + flat.nodes.filter((node) => node.data.module === 'modules.ModularDiffusers').length, + 'Encode Inputs lowers the same actual stages', + ); + const seedConsumers = Object.values(api.nodes).filter((node) => 'seed' in node.params); + assert.ok(seedConsumers.length); + assert.ok( + seedConsumers.every((node) => node.params.seed.value === form.seed), + 'every generator initialization retains the locked seed', + ); + if (template.executionSelection.implementation === 'native_stages') { + assert.ok( + graph.nodes.some((node) => groups.visualOperationGroup(node) === 'inputs'), + 'real encoders are grouped as Encode Inputs', + ); + assert.ok( + !flat.nodes.some((node) => node.data.action === 'DiffusersExecutionRecipe'), + 'native fields are inline rather than inherited unknown utility owners', + ); + } + const guider = operations.find( + (node) => node.data.operationAuthoring.operation.operationId === 'diffusion.guidance', + ); + assert.equal( + graph.nodes.some((node) => groups.visualOperationGroup(node) === 'guidance'), + false, + 'fresh guidance is grouped inside the meaningful input stage', + ); + if (guider) { + assert.equal(guider.data.params.guider.value, 'ClassifierFreeGuidance'); + assert.equal(guider.data.params.guidance_scale.value, form.guidanceScale); + const original = row.starter.nodes.find((node) => node.operation.operationId === 'diffusion.guidance').node + .params; + const policy = { + enabled: initialValue(row, 'guider', 'enabled'), + useOriginalFormulation: initialValue(row, 'guider', 'use_original_formulation'), + }; + assert.equal(guider.data.params.enabled.value, policy?.enabled ?? original.enabled.value); + const exportedGuider = Object.values(api.nodes).find((node) => node.action === 'Guider'); + assert.ok(exportedGuider, 'the actual guidance owner is exported for execution'); + assert.equal(exportedGuider.params.enabled.value, policy?.enabled ?? original.enabled.value); + assert.equal( + exportedGuider.params.use_original_formulation.value, + policy?.useOriginalFormulation ?? original.use_original_formulation.value, + ); + for (const [field, value] of Object.entries({ + guidance_rescale: 0, + use_original_formulation: policy?.useOriginalFormulation ?? original.use_original_formulation.value, + start: 0, + stop: 1, + })) + assert.equal(guider.data.params[field].value, value, `preserved upstream ${field}`); + const targets = flat.edges.filter((edge) => edge.source === guider.id && edge.sourceHandle === 'guider_out'); + assert.deepEqual(targets.map((edge) => flat.nodes.find((node) => node.id === edge.target).data.action).sort(), [ + 'Denoise', + 'EncodePrompt', + ]); + } + const policy = componentPolicy(row); + if (policy) { + assert.equal(owner.data.params.attention_backend.value, policy.attentionBackend); + assert.equal(owner.data.params.vae_slicing.value, policy.vaeSlicing); + assert.equal(owner.data.params.vae_tiling.value, policy.vaeTiling); + } else if (owner.data.action === 'ModelsLoader') { + assert.equal( + owner.data.params.attention_backend.value ?? owner.data.params.attention_backend.default, + 'inherit', + ); + assert.equal(owner.data.params.vae_slicing.value ?? owner.data.params.vae_slicing.default, null); + assert.equal(owner.data.params.vae_tiling.value ?? owner.data.params.vae_tiling.default, null); + } + const loras = flat.nodes.filter((node) => node.data.action === 'Lora' || node.data.action === 'LoadAdapter'); + const settings = template.workflowBlockSettings?.lora; + const adapters = settings ? [settings, ...(settings.additionalAdapters ?? [])] : []; + assert.equal(loras.length, adapters.length); + adapters.forEach((adapter, index) => { + const node = loras[index]; + const params = node.data.params; + assert.deepEqual((params.model ?? params.adapter_path).value, { + source: adapter.model.source, + value: adapter.model.value, + }); + assert.equal(params.revision.value, adapter.model.revision); + assert.equal(params.expected_sha256.value, adapter.model.sha256); + assert.equal(params.scale.value, adapter.scale); + if (adapter.adapterName) assert.equal(params.adapter_name.value, adapter.adapterName); + if (adapter.weightName) assert.equal(params.weight_name.value, adapter.weightName); + if (index && node.data.action === 'Lora') + assert.ok( + flat.edges.some( + (edge) => + edge.source === loras[index - 1].id && + edge.target === node.id && + edge.targetHandle === 'previous_loras', + ), + ); + if (index === 0 && adapter.schedulerClass) assert.equal(params.scheduler_class.value, adapter.schedulerClass); + if (index === 0 && adapter.schedulerConfig) + assert.deepEqual(JSON.parse(params.scheduler_config.value), adapter.schedulerConfig); + }); + const upscaler = flat.nodes.find((node) => node.data.module === 'modules.Spandrel'); + if (template.workflowBlocks?.includes('upscaler')) { + assert.ok(upscaler); + assert.deepEqual(upscaler.data.params.model_id.value, template.workflowBlockSettings.upscaler.model); + assert.equal(upscaler.data.params.downscale.value, template.workflowBlockSettings.upscaler.downscale); + assert.equal( + flat.nodes.filter((node) => node.data.action === 'Preview').length, + 2, + 'retains original and upscaled image outputs', + ); + } else assert.equal(upscaler, undefined); + }); +}); + +test('all54 exported image consumers independently retain the preserved creator recipe', async (t) => { + const fields = { + prompt: 'prompt', + negative_prompt: 'negativePrompt', + max_sequence_length: 'maxSequenceLength', + num_inference_steps: 'steps', + guidance_scale: 'guidanceScale', + width: 'width', + height: 'height', + batch_size: 'batchSize', + seed: 'seed', + dtype: 'dtype', + offload_mode: 'offloadMode', + }; + const consumers = new Set([ + 'EncodePrompt', + 'ImageEncode', + 'Denoise', + 'Generate', + 'Edit', + 'Inpaint', + 'ControlGenerate', + 'LoadPipeline', + 'ModelsLoader', + 'AutoModelLoader', + 'Guider', + ]); + for (const row of fixture.recipes) + await t.test(row.id, () => { + const template = templates.find((item) => item.id === row.id); + const form = selectedForm(template); + const graph = builder.createTemplateOperationGraph( + template, + form, + row.starter, + fixture.registry, + row.spec, + row.capability, + ); + const api = flowStore + .getState() + .exportGraph('independent-creator-recipe', undefined, { sourceGraph: graph, randomizeSeeds: false }); + let checked = 0; + for (const node of Object.values(api.nodes)) { + if (!consumers.has(node.action)) continue; + for (const [field, formField] of Object.entries(fields)) { + const param = node.params[field]; + if (!param || param.display === 'output') continue; + if ( + field === 'guidance_scale' && + node.action === 'Denoise' && + node.params.guider?.sourceId && + preservedEmbeddedGuidance(template) === undefined + ) { + const guiderId = node.params.guider.sourceId; + assert.equal(api.nodes[guiderId].action, 'Guider'); + assert.equal(api.nodes[guiderId].params.guidance_scale.value, form.guidanceScale); + const encoder = Object.values(api.nodes).find((item) => item.action === 'EncodePrompt'); + assert.equal(encoder.params.guider.sourceId, guiderId, 'both genuine CFG consumers share the same Guider'); + continue; + } + if (param.sourceId) { + assert.ok( + ['width', 'height'].includes(field) && template.mode === 'outpaint', + `${node.action}.${field} cannot replace the creator recipe with an unexpected supplier`, + ); + assert.equal(api.nodes[param.sourceId].action, 'OutpaintCanvas'); + assert.equal(param.sourceKey, field, 'outpaint generation uses the actual computed canvas geometry'); + continue; + } + const expected = + field === 'guidance_scale' && node.action === 'Denoise' && preservedEmbeddedGuidance(template) !== undefined + ? preservedEmbeddedGuidance(template) + : form[formField]; + assert.equal(param.value, expected, `${node.action}.${field} consumes the preserved creator ${formField}`); + checked++; + } + } + assert.ok(checked >= 8, 'checks actual consumer fields independently of execution spec declarations'); + }); +}); + +test('changed profile, missing LoRA descriptor schema and conflicting suppliers fail without mutating an existing graph', () => { + const row = fixture.recipes.find((item) => item.id === 'flux_lora_cinematic_octane_3d'); + const template = templates.find((item) => item.id === row.id); + const starter = structuredClone(row.starter); + starter.pipelineClass = 'Flux2KleinModularPipeline'; + assert.throws( + () => + builder.createTemplateOperationGraph( + template, + selectedForm(template), + starter, + fixture.registry, + row.spec, + row.capability, + ), + /does not match its backend execution contract/, + ); + const registry = structuredClone(fixture.registry); + delete registry['modules.ModularDiffusers.Lora'].params.previous_loras; + assert.throws( + () => + builder.createTemplateOperationGraph( + template, + selectedForm(template), + row.starter, + registry, + row.spec, + row.capability, + ), + /incompatible/, + ); +}); + +function prepareLifecycleFixture(templateId) { + const row = fixture.recipes.find((item) => item.id === templateId); + const template = templates.find((item) => item.id === templateId); + const studio = studioStore.useStudioStore; + studio.setState({ workflowCanvasHydrated: true }); + const tabId = studio.getState().createWorkflowTab(template.label, undefined, 'template', template.id); + studio.getState().applyTemplate(template); + studio.getState().updateForm(fixtureRuntimeSettings(row, studio.getState().form)); + nodeStore.setState({ + nodesRegistry: fixture.registry, + operationContracts: row.starter.nodes.map((item) => item.operation), + studioModelCapabilities: [ + { + ...row.capability, + studioExecutionSpecSchemaVersion: 1, + studioExecutionSpecModes: [row.spec.mode], + studioExecutionSpecs: [row.spec], + }, + ], + studioExecutionSpecInvalid: false, + }); + return { row, template, tabId, studio, context: studioStore.captureWorkflowOperationContext() }; +} + +test('both Z default adapter identities survive ordinary template creation and workflow import', async (t) => { + if (!publicOperations) { + const operations = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + publicOperations = operations.parseOperationContracts( + fixture.publicPayload.operationContracts, + fixture.publicPayload.operationContractSchemaVersion, + ); + } + for (const templateId of ['z_image_lora_style', 'fast_lora']) + await t.test(templateId, async () => { + const previous = [flowStore.getState(), nodeStore.getState(), studioStore.useStudioStore.getState()]; + const originalFetch = globalThis.fetch; + try { + const { row, template, studio } = prepareLifecycleFixture(templateId); + const nodeModule = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); + nodeStore.setState({ nodesRegistry: nodeModule.parseNodesResponse({ nodes: fixture.registry }).nodes }); + const form = structuredClone(studio.getState().form); + globalThis.fetch = async () => Response.json(row.starter); + await lifecycle.createImageTemplateOperationWorkflow( + template, + form, + studioStore.captureWorkflowOperationContext(), + ); + assert.equal(studio.getState().graphBinding, null); + const beforeImport = flowStore + .getState() + .exportGraph('z-default-adapter', undefined, { randomizeSeeds: false }); + const loras = Object.values(beforeImport.nodes).filter((node) => node.action === 'Lora'); + assert.equal(loras.length, 1); + assert.equal(loras[0].params.adapter_name.value, 'default'); + const owner = Object.values(beforeImport.nodes).find((node) => node.action === 'ModelsLoader'); + assert.equal(owner.params.lora_list.sourceKey, 'lora'); + const graph = flowStore.getState().toObject(); + const packageModule = await server.ssrLoadModule('/src/studio/workflowPackage.ts'); + const parsed = packageModule.parseWorkflowPackage({ + metadata: { studio: form }, + graph, + restore: { formSnapshot: form, graphSnapshot: graph, graphBindingSnapshot: null }, + }); + assert.ok(parsed); + studio.getState().createWorkflowTab('Imported Z adapter recipe', parsed.snapshot, 'import', 'private'); + assert.equal(studio.getState().graphBinding, null); + assert.equal(studio.getState().graphFinalization, null); + assert.deepEqual( + flowStore.getState().exportGraph('z-default-adapter', undefined, { randomizeSeeds: false }), + beforeImport, + 'normal import retains the complete API packet, identity and model-owner wire', + ); + } finally { + globalThis.fetch = originalFetch; + flowStore.setState(previous[0]); + nodeStore.setState(previous[1]); + studioStore.useStudioStore.setState(previous[2]); + } + }); +}); + +test('both Qwen ControlNet templates retain the exact creator API packet through ordinary creation and import', async (t) => { + if (!publicOperations) { + const operations = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + publicOperations = operations.parseOperationContracts( + fixture.publicPayload.operationContracts, + fixture.publicPayload.operationContractSchemaVersion, + ); + } + for (const templateId of ['qwen_control_image_layout', 'qwen_packaging_dieline']) + await t.test(templateId, async () => { + const previous = [flowStore.getState(), nodeStore.getState(), studioStore.useStudioStore.getState()]; + const originalFetch = globalThis.fetch; + try { + const { row, template, studio } = prepareLifecycleFixture(templateId); + const nodeModule = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); + const parsedRegistry = nodeModule.parseNodesResponse({ nodes: fixture.registry }); + nodeStore.setState({ nodesRegistry: parsedRegistry.nodes }); + assert.deepEqual( + parsedRegistry.nodes['modules.ModularDiffusers.AutoModelLoader'].params.model.connectionRoleSelector, + { field: 'model_type', values: { controlnet: 'controlnet_component' } }, + ); + studio.getState().updateForm({ controlImage: 'byte-verified-control.png', resourceMode: 'expert' }); + const form = structuredClone(studio.getState().form); + const context = studioStore.captureWorkflowOperationContext(); + const expectedGraph = builder.createTemplateOperationGraph( + template, + form, + starterRequests.parseOperationStarter( + row.starter, + row.starter.pipelineClass, + row.starter.task, + publicOperations, + recipeSelection(row), + ), + fixture.registry, + row.spec, + row.capability, + ); + const flatExpected = groups.unpackVisualOperationGroups(expectedGraph).graph; + const expected = flowStore + .getState() + .exportGraph('control-recipe', undefined, { sourceGraph: expectedGraph, randomizeSeeds: false }); + globalThis.fetch = async () => Response.json(row.starter); + await lifecycle.createImageTemplateOperationWorkflow(template, form, context); + assert.equal(studio.getState().graphBinding, null); + const committed = groups.unpackVisualOperationGroups(flowStore.getState().toObject()).graph; + const standalone = committed.nodes.find((node) => node.data.action === 'AutoModelLoader'); + const preparation = committed.nodes.find((node) => node.data.action === 'Controlnet'); + assert.ok(standalone && preparation); + assert.ok( + committed.edges.some( + (edge) => + edge.source === standalone.id && + edge.sourceHandle === 'model' && + edge.target === preparation.id && + edge.targetHandle === 'controlnet', + ), + 'ordinary creation must retain the required ControlNet component wire', + ); + function canonicalApi(api) { + const names = new Map(Object.entries(api.nodes).map(([id, node]) => [id, `${node.module}.${node.action}`])); + assert.equal( + new Set(names.values()).size, + names.size, + 'this recipe has unique executable operation identities', + ); + return Object.fromEntries( + Object.entries(api.nodes).map(([id, node]) => [ + names.get(id), + { + ...node, + params: Object.fromEntries( + Object.entries(node.params).map(([key, param]) => [ + key, + { ...param, ...(param.sourceId ? { sourceId: names.get(param.sourceId) } : {}) }, + ]), + ), + }, + ]), + ); + } + assert.deepEqual( + canonicalApi( + flowStore.getState().exportGraph('control-recipe', undefined, { randomizeSeeds: false }), + committed, + ), + canonicalApi(expected, flatExpected), + 'ordinary transaction must retain every original setting and typed supplier', + ); + const graph = flowStore.getState().toObject(); + const packageModule = await server.ssrLoadModule('/src/studio/workflowPackage.ts'); + const parsed = packageModule.parseWorkflowPackage({ + metadata: { studio: form }, + graph, + restore: { formSnapshot: form, graphSnapshot: graph, graphBindingSnapshot: null }, + }); + assert.ok(parsed); + const beforeImport = flowStore.getState().exportGraph('control-recipe', undefined, { randomizeSeeds: false }); + studio.getState().createWorkflowTab('Imported ControlNet recipe', parsed.snapshot, 'import', 'private'); + assert.equal(studio.getState().graphBinding, null); + assert.equal(studio.getState().graphFinalization, null); + assert.deepEqual( + flowStore.getState().exportGraph('control-recipe', undefined, { randomizeSeeds: false }), + beforeImport, + 'normal import must preserve every API field and source wire', + ); + const wrongKind = groups.unpackVisualOperationGroups(flowStore.getState().toObject()).graph; + wrongKind.nodes.find((node) => node.data.action === 'AutoModelLoader').data.params.model_type.value = 'vae'; + flowStore.getState().replaceGraph(wrongKind); + assert.equal( + flowStore + .getState() + .edges.some( + (edge) => + edge.source === standalone.id && edge.target === preparation.id && edge.targetHandle === 'controlnet', + ), + false, + 'real reconciliation rejects a different standalone component kind', + ); + } finally { + globalThis.fetch = originalFetch; + flowStore.setState(previous[0]); + nodeStore.setState(previous[1]); + studioStore.useStudioStore.setState(previous[2]); + } + }); +}); + +test('fresh developer template commits once, preserves creator provenance, and restores the same ordinary graph after save/undo/redo', async () => { + const previous = [flowStore.getState(), nodeStore.getState(), studioStore.useStudioStore.getState()]; + const originalFetch = globalThis.fetch; + try { + const { row, template, tabId, studio, context } = prepareLifecycleFixture('z_image_quick_concept'); + globalThis.fetch = async (_url, options) => { + assert.deepEqual(JSON.parse(options.body), { + pipelineClass: template.executionSelection.pipelineClass, + task: template.executionSelection.task, + executionProfileId: template.executionSelection.executionProfileId, + authoringRecipeId: template.executionSelection.authoringRecipeId, + }); + return Response.json(row.starter); + }; + await lifecycle.createImageTemplateOperationWorkflow(template, studio.getState().form, context); + assert.equal(studio.getState().graphBinding, null); + assert.equal(studio.getState().graphFinalization, null); + assert.equal(studio.getState().activeTemplateId, template.id); + const graph = flowStore.getState().toObject(); + assert.ok(graph.nodes.length); + const saved = studio.getState().workflowTabs.find((tab) => tab.id === tabId); + assert.equal(saved.source, 'template'); + assert.equal(saved.snapshot.activeTemplateId, template.id); + assert.equal(saved.snapshot.studioGraphBinding, null); + flowStore.getState().undo(); + assert.equal(flowStore.getState().nodes.length, 0); + flowStore.getState().redo(); + assert.deepEqual(flowStore.getState().toObject(), graph); + studio.getState().createWorkflowTab('Other document'); + studio.getState().switchWorkflowTab(tabId); + studio.getState().hydrateActiveWorkflowCanvas(); + assert.equal(studio.getState().graphBinding, null); + assert.equal(studio.getState().activeTemplateId, template.id); + assert.equal(flowStore.getState().nodes.length, graph.nodes.length); + assert.deepEqual( + flowStore.getState().exportGraph('test-template', undefined, { randomizeSeeds: false }), + flowStore.getState().exportGraph('test-template', undefined, { sourceGraph: graph, randomizeSeeds: false }), + ); + } finally { + globalThis.fetch = originalFetch; + flowStore.setState(previous[0]); + nodeStore.setState(previous[1]); + studioStore.useStudioStore.setState(previous[2]); + } +}); + +test('a delayed template starter cannot overwrite a switched document or edited form', async (t) => { + for (const edit of ['document', 'form']) + await t.test(edit, async () => { + const previous = [flowStore.getState(), nodeStore.getState(), studioStore.useStudioStore.getState()]; + const originalFetch = globalThis.fetch; + let finish; + let requestEntered; + const requestStarted = new Promise((resolve) => (requestEntered = resolve)); + try { + const { row, template, studio, context } = prepareLifecycleFixture('z_image_quick_concept'); + globalThis.fetch = async () => + await new Promise((resolve) => { + finish = () => resolve(Response.json(row.starter)); + requestEntered(); + }); + const pending = lifecycle.createImageTemplateOperationWorkflow(template, studio.getState().form, context); + await requestStarted; + if (edit === 'document') studio.getState().createWorkflowTab('Newer document'); + else studio.getState().updateForm({ prompt: 'An explicit newer prompt' }); + finish(); + await assert.rejects(pending, (error) => studioStore.isWorkflowOperationCancelled(error)); + assert.equal(flowStore.getState().nodes.length, 0); + if (edit === 'form') assert.equal(studio.getState().form.prompt, 'An explicit newer prompt'); + } finally { + globalThis.fetch = originalFetch; + flowStore.setState(previous[0]); + nodeStore.setState(previous[1]); + studioStore.useStudioStore.setState(previous[2]); + } + }); +}); + +test('template creation waits for the latest already-loading runtime without fetching or changing its owned form', async () => { + const previous = [nodeStore.getState(), studioStore.useStudioStore.getState()]; + try { + const { studio, context } = prepareLifecycleFixture('z_image_quick_concept'); + const originalForm = structuredClone(studio.getState().form); + let runtimeFetches = 0; + nodeStore.setState({ + runtimeStatus: null, + fetchRuntimeStatus: async () => { + runtimeFetches++; + }, + discoveryRequests: { + ...nodeStore.getState().discoveryRequests, + runtime: { status: 'loading', requestId: 100, error: null }, + }, + }); + let completed = false; + const pending = lifecycle.waitForTemplateRuntimeDiscovery(context).then(() => { + completed = true; + }); + await Promise.resolve(); + assert.equal(completed, false); + nodeStore.setState({ + discoveryRequests: { + ...nodeStore.getState().discoveryRequests, + runtime: { status: 'loading', requestId: 101, error: null }, + }, + }); + await Promise.resolve(); + assert.equal(completed, false, 'a replacement request is still pending'); + nodeStore.setState({ + runtimeStatus: { packages: { torch: { cuda_available: false } } }, + discoveryRequests: { + ...nodeStore.getState().discoveryRequests, + runtime: { status: 'success', requestId: 101, error: null }, + }, + }); + await pending; + assert.equal(runtimeFetches, 0); + assert.deepEqual(studio.getState().form, originalForm); + studioStore.assertWorkflowOperationContext(context); + } finally { + nodeStore.setState(previous[0]); + studioStore.useStudioStore.setState(previous[1]); + } +}); + +test('runtime waiting cancels promptly on document, canvas or explicit form edits and does not adopt the newer context', async (t) => { + for (const edit of ['document', 'canvas', 'form']) + await t.test(edit, async () => { + const previous = [nodeStore.getState(), studioStore.useStudioStore.getState()]; + try { + const { studio, context } = prepareLifecycleFixture('z_image_quick_concept'); + nodeStore.setState({ + discoveryRequests: { + ...nodeStore.getState().discoveryRequests, + runtime: { status: 'loading', requestId: 110, error: null }, + }, + }); + const pending = lifecycle.waitForTemplateRuntimeDiscovery(context); + const cancelled = assert.rejects(pending, (error) => studioStore.isWorkflowOperationCancelled(error)); + if (edit === 'document') studio.getState().createWorkflowTab('An explicitly newer document'); + else if (edit === 'canvas') studio.setState({ workflowCanvasEpoch: studio.getState().workflowCanvasEpoch + 1 }); + else studio.getState().updateForm({ prompt: 'An explicitly newer prompt' }); + await cancelled; + if (edit === 'form') assert.equal(studio.getState().form.prompt, 'An explicitly newer prompt'); + assert.throws(() => studioStore.assertWorkflowOperationContext(context), /workflow changed/i); + } finally { + nodeStore.setState(previous[0]); + studioStore.useStudioStore.setState(previous[1]); + } + }); +}); + +test('runtime waiting fails explicitly on a failed pending read or bounded timeout and releases subscriptions', async (t) => { + for (const outcome of ['error', 'timeout', 'success-during-subscribe']) + await t.test(outcome, async () => { + const previous = [nodeStore.getState(), studioStore.useStudioStore.getState()]; + const originalNodesSubscribe = nodeStore.subscribe; + const originalStudioSubscribe = studioStore.useStudioStore.subscribe; + let subscriptions = 0; + try { + const { context } = prepareLifecycleFixture('z_image_quick_concept'); + nodeStore.setState({ + runtimeStatus: null, + discoveryRequests: { + ...nodeStore.getState().discoveryRequests, + runtime: { status: 'loading', requestId: 120, error: null }, + }, + }); + const track = (subscribe) => (listener) => { + subscriptions++; + const unsubscribe = subscribe(listener); + return () => { + subscriptions--; + unsubscribe(); + }; + }; + nodeStore.subscribe = track(originalNodesSubscribe); + studioStore.useStudioStore.subscribe = track(originalStudioSubscribe); + if (outcome === 'success-during-subscribe') { + nodeStore.subscribe = (listener) => { + const unsubscribe = track(originalNodesSubscribe)(listener); + nodeStore.setState({ + runtimeStatus: { packages: { torch: { cuda_available: false } } }, + discoveryRequests: { + ...nodeStore.getState().discoveryRequests, + runtime: { status: 'success', requestId: 120, error: null }, + }, + }); + return unsubscribe; + }; + } + const pending = lifecycle.waitForTemplateRuntimeDiscovery(context, 20); + if (outcome === 'error') { + const failed = assert.rejects(pending, /runtime.*read failed/i); + nodeStore.setState({ + discoveryRequests: { + ...nodeStore.getState().discoveryRequests, + runtime: { status: 'error', requestId: 120, error: 'Runtime read failed' }, + }, + }); + await failed; + } else if (outcome === 'timeout') await assert.rejects(pending, /runtime.*timed out.*retry/i); + else await pending; + assert.equal(subscriptions, 0, 'both store subscriptions and the timeout are cleaned up'); + studioStore.assertWorkflowOperationContext(context); + } finally { + nodeStore.subscribe = originalNodesSubscribe; + studioStore.useStudioStore.subscribe = originalStudioSubscribe; + nodeStore.setState(previous[0]); + studioStore.useStudioStore.setState(previous[1]); + } + }); +}); + +test('template-owned normalization preserves available devices and explicit XPU or MPS choices without guessing on unknown runtime', async (t) => { + for (const scenario of [ + { device: 'cuda:0', runtime: null, expected: 'cuda:0' }, + { + device: 'cuda:0', + runtime: { + packages: { + torch: { cuda_available: true, cuda_device_count: 1, cuda_devices: [{ index: 0, name: 'Reviewed GPU' }] }, + }, + }, + expected: 'cuda:0', + }, + { device: 'xpu:0', runtime: { packages: { torch: { cuda_available: false } } }, expected: 'xpu:0' }, + { device: 'mps:0', runtime: { packages: { torch: { cuda_available: false } } }, expected: 'mps:0' }, + { device: 'unknown:0', runtime: { packages: { torch: { cuda_available: false } } }, expected: 'unknown:0' }, + { + device: 'cuda:2', + runtime: { + packages: { torch: { cuda_available: true, cuda_device_count: 3, cuda_devices: [{ index: 2 }] } }, + }, + expected: 'cuda:2', + }, + { device: 'cuda:0', runtime: { packages: { torch: { cuda_available: false } } }, expected: 'cpu:0' }, + ]) + await t.test(`${scenario.device} → ${scenario.expected}`, () => { + const previous = [nodeStore.getState(), studioStore.useStudioStore.getState()]; + try { + const { studio } = prepareLifecycleFixture('z_image_quick_concept'); + studio.setState({ form: { ...studio.getState().form, device: scenario.device } }); + const context = studioStore.captureWorkflowOperationContext(); + const before = structuredClone(studio.getState().form); + nodeStore.setState({ runtimeStatus: scenario.runtime }); + lifecycle.normalizeTemplateRuntimeDevice(context); + assert.equal(studio.getState().form.device, scenario.expected); + if (scenario.expected === 'cpu:0') assert.equal(studio.getState().form.offloadMode, 'none'); + else assert.deepEqual(studio.getState().form, before); + studioStore.assertWorkflowOperationContext(context); + } finally { + nodeStore.setState(previous[0]); + studioStore.useStudioStore.setState(previous[1]); + } + }); +}); + +test('owned runtime normalization never adopts a newer document or creative edit', async (t) => { + for (const edit of ['document', 'form']) + await t.test(edit, () => { + const previous = [flowStore.getState(), nodeStore.getState(), studioStore.useStudioStore.getState()]; + try { + const { studio, context } = prepareLifecycleFixture('z_image_quick_concept'); + nodeStore.setState({ runtimeStatus: { packages: { torch: { cuda_available: false } } } }); + if (edit === 'document') studio.getState().createWorkflowTab('Newer document'); + else studio.getState().updateForm({ prompt: 'An explicit newer prompt' }); + const form = structuredClone(studio.getState().form); + const captured = { ...context }; + assert.throws( + () => lifecycle.normalizeTemplateRuntimeDevice(context), + (error) => studioStore.isWorkflowOperationCancelled(error), + ); + assert.deepEqual(studio.getState().form, form); + assert.deepEqual(context, captured, 'a stale caller cannot advance into the newer operation'); + } finally { + flowStore.setState(previous[0]); + nodeStore.setState(previous[1]); + studioStore.useStudioStore.setState(previous[2]); + } + }); +}); + +test('ordinary Auto ControlNet creation keeps the auxiliary component resident while the base uses model CPU offload', async (t) => { + if (!publicOperations) { + const operations = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + publicOperations = operations.parseOperationContracts( + fixture.publicPayload.operationContracts, + fixture.publicPayload.operationContractSchemaVersion, + ); + } + for (const templateId of ['qwen_control_image_layout', 'qwen_packaging_dieline']) + await t.test(templateId, async () => { + const previous = [flowStore.getState(), nodeStore.getState(), studioStore.useStudioStore.getState()]; + const originalFetch = globalThis.fetch; + try { + const { row, template, studio } = prepareLifecycleFixture(templateId); + studio.getState().updateForm({ + controlImage: 'original-byte-bound-control.png', + resourceMode: 'auto', + autoOffload: true, + offloadMode: 'model_cpu', + dtype: 'bfloat16', + device: declaredFixtureDevice(row), + }); + const form = structuredClone(studio.getState().form); + assert.equal(form.autoOffload, form.device.startsWith('cuda')); + assert.equal(form.offloadMode, form.device.startsWith('cuda') ? 'model_cpu' : 'none'); + globalThis.fetch = async () => Response.json(row.starter); + await lifecycle.createImageTemplateOperationWorkflow( + template, + form, + studioStore.captureWorkflowOperationContext(), + ); + // Verify placement semantics independently from the host form policy. + // This authors a requested offload plan, never a fabricated GPU device. + const placementGraph = builder.createTemplateOperationGraph( + template, + { ...form, autoOffload: true, offloadMode: 'model_cpu' }, + starterRequests.parseOperationStarter( + row.starter, + row.starter.pipelineClass, + row.starter.task, + publicOperations, + template.executionSelection, + ), + fixture.registry, + row.spec, + row.capability, + ); + const authoredGraph = groups.unpackVisualOperationGroups(placementGraph).graph; + const authoredBase = authoredGraph.nodes.find((node) => node.data.action === 'ModelsLoader'); + const authoredAuxiliary = authoredGraph.nodes.find((node) => node.data.action === 'AutoModelLoader'); + assert.equal(authoredBase.data.params.auto_offload.value, true); + assert.equal(authoredBase.data.params.offload_mode.value, 'model_cpu'); + assert.equal(authoredAuxiliary.data.params.auto_offload.value, false); + assert.equal(authoredAuxiliary.data.params.offload_mode.value, 'none'); + // CPU metadata cannot prove GPU offload execution. The ordinary form + // normalizes the plan, and export also rejects an unnormalized request. + if (!form.device.startsWith('cuda')) { + assert.throws( + () => + flowStore.getState().exportGraph('control-auto-component-placement', undefined, { + sourceGraph: placementGraph, + randomizeSeeds: false, + }), + /execution cannot use model_cpu offload/, + ); + } + const api = flowStore.getState().exportGraph('control-auto-component-placement', undefined, { + randomizeSeeds: false, + }); + const base = Object.values(api.nodes).find((node) => node.action === 'ModelsLoader'); + const auxiliary = Object.values(api.nodes).find((node) => node.action === 'AutoModelLoader'); + assert.ok(base && auxiliary); + assert.equal(base.params.auto_offload.value, form.device.startsWith('cuda')); + assert.equal(base.params.offload_mode.value, form.device.startsWith('cuda') ? 'model_cpu' : 'none'); + assert.equal(auxiliary.params.auto_offload.value, false); + assert.equal(auxiliary.params.offload_mode.value, 'none'); + for (const field of ['device', 'dtype']) assert.equal(auxiliary.params[field].value, base.params[field].value); + assert.equal(auxiliary.params.model_type.value, 'controlnet'); + assert.equal( + api.nodes[Object.values(api.nodes).find((node) => node.action === 'Controlnet').params.controlnet.sourceId] + .action, + 'AutoModelLoader', + ); + assert.equal(studio.getState().graphBinding, null); + assert.equal(studio.getState().form.resourceMode, 'auto'); + } finally { + globalThis.fetch = originalFetch; + flowStore.setState(previous[0]); + nodeStore.setState(previous[1]); + studioStore.useStudioStore.setState(previous[2]); + } + }); +}); + +test('actual Qwen Edit and T2I contracts retain exact API inputs through ordinary creation and workflow import', async (t) => { + const operations = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + publicOperations ??= operations.parseOperationContracts( + fixture.publicPayload.operationContracts, + fixture.publicPayload.operationContractSchemaVersion, + ); + const nodeModule = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); + const packageModule = await server.ssrLoadModule('/src/studio/workflowPackage.ts'); + const canonical = (api) => { + const names = new Map(Object.entries(api.nodes).map(([id, node]) => [id, `${node.module}.${node.action}`])); + assert.equal(new Set(names.values()).size, names.size, 'this fixture needs unique executable node roles'); + return Object.fromEntries( + Object.entries(api.nodes).map(([id, node]) => [ + names.get(id), + { + ...node, + params: Object.fromEntries( + Object.entries(node.params).map(([field, param]) => [ + field, + { ...param, ...(param.sourceId ? { sourceId: names.get(param.sourceId) } : {}) }, + ]), + ), + }, + ]), + ); + }; + for (const templateId of ['qwen_character_angles', 'qwen_text_rendering']) + await t.test(templateId, async () => { + const previous = [flowStore.getState(), nodeStore.getState(), studioStore.useStudioStore.getState()]; + const originalFetch = globalThis.fetch; + try { + const { row, template, studio } = prepareLifecycleFixture(templateId); + nodeStore.setState({ nodesRegistry: nodeModule.parseNodesResponse({ nodes: fixture.registry }).nodes }); + const form = structuredClone(studio.getState().form); + const expectedGraph = builder.createTemplateOperationGraph( + template, + form, + row.starter, + fixture.registry, + row.spec, + row.capability, + ); + const expected = flowStore + .getState() + .exportGraph('qwen-hydration', undefined, { sourceGraph: expectedGraph, randomizeSeeds: false }); + globalThis.fetch = async () => Response.json(row.starter); + await lifecycle.createImageTemplateOperationWorkflow( + template, + form, + studioStore.captureWorkflowOperationContext(), + ); + const created = flowStore.getState().exportGraph('qwen-hydration', undefined, { randomizeSeeds: false }); + assert.deepEqual(canonical(created), canonical(expected), 'hydration retains the exact selected starter API'); + const flat = groups.unpackVisualOperationGroups(flowStore.getState().toObject()).graph; + for (const node of flat.nodes) { + if (node.data.module !== 'modules.ModularDiffusers') continue; + const operation = operations.parseOperationContracts([node.data.operationAuthoring?.operation], 3)[0]; + assert.equal( + Object.hasOwn(node.data.params, 'pipeline_components'), + operation.ports.some((port) => port.name === 'pipeline_components'), + `${node.data.action}: bundle socket applicability follows this route's actual contract`, + ); + } + const graph = flowStore.getState().toObject(); + const parsed = packageModule.parseWorkflowPackage({ + metadata: { studio: form }, + graph, + restore: { formSnapshot: form, graphSnapshot: graph, graphBindingSnapshot: null }, + }); + assert.ok(parsed); + studio.getState().createWorkflowTab('Imported exact Qwen recipe', parsed.snapshot, 'import', 'private'); + assert.deepEqual( + flowStore.getState().exportGraph('qwen-hydration', undefined, { randomizeSeeds: false }), + created, + 'normal workflow import preserves every API setting, component and media source', + ); + if (templateId === 'qwen_text_rendering') { + const bundle = await server.ssrLoadModule('/src/workflow/operationComponentBundle.ts'); + const owner = flat.nodes.find((node) => node.data.action === 'ModelsLoader'); + const bundled = bundle.setOperationComponentBundle(graph, owner.id, 'bundle'); + const expectedBundle = flowStore + .getState() + .exportGraph('qwen-hydration', undefined, { sourceGraph: bundled, randomizeSeeds: false }); + flowStore.getState().replaceGraph(bundled); + assert.deepEqual( + flowStore.getState().exportGraph('qwen-hydration', undefined, { randomizeSeeds: false }), + expectedBundle, + 'declared bundle inputs and every supplier remain intact during graph replacement', + ); + const bundledGraph = flowStore.getState().toObject(); + const parsedBundle = packageModule.parseWorkflowPackage({ + metadata: { studio: form }, + graph: bundledGraph, + restore: { formSnapshot: form, graphSnapshot: bundledGraph, graphBindingSnapshot: null }, + }); + assert.ok(parsedBundle); + studio + .getState() + .createWorkflowTab('Imported bundled Qwen recipe', parsedBundle.snapshot, 'import', 'private'); + assert.deepEqual( + flowStore.getState().exportGraph('qwen-hydration', undefined, { randomizeSeeds: false }), + expectedBundle, + 'normal import retains all declared aggregate connections', + ); + } + } finally { + globalThis.fetch = originalFetch; + flowStore.setState(previous[0]); + nodeStore.setState(previous[1]); + studioStore.useStudioStore.setState(previous[2]); + } + }); +}); + +test('all four actual Qwen native inpaint candidates preserve their full API packets through normal import', async (t) => { + const operations = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + const payload = qwenInpaintCandidateFixture.publicPayload; + const contracts = operations.parseOperationContracts( + payload.operationContracts, + payload.operationContractSchemaVersion, + ); + const nodeModule = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); + const packageModule = await server.ssrLoadModule('/src/studio/workflowPackage.ts'); + for (const row of qwenInpaintCandidateFixture.recipes) + await t.test(row.id, () => { + const previous = [flowStore.getState(), nodeStore.getState(), studioStore.useStudioStore.getState()]; + try { + const template = templates.find((item) => item.id === row.id); + const form = selectedForm(template); + const registry = { ...fixture.registry, ...qwenInpaintCandidateFixture.registry }; + const starter = starterRequests.parseOperationStarter( + row.starter, + row.starter.pipelineClass, + row.starter.task, + contracts, + recipeSelection(row), + ); + const candidate = qwenInpaintCandidate.createQwenInpaintNativeCandidateGraph( + template, + form, + starter, + registry, + row.spec, + row.capability, + ); + const expected = flowStore + .getState() + .exportGraph('qwen-native-import', undefined, { sourceGraph: candidate, randomizeSeeds: false }); + nodeStore.setState({ nodesRegistry: nodeModule.parseNodesResponse({ nodes: registry }).nodes }); + flowStore.getState().replaceGraph(candidate); + assert.deepEqual( + flowStore.getState().exportGraph('qwen-native-import', undefined, { randomizeSeeds: false }), + expected, + 'initial replacement retains the complete actual native API packet', + ); + const graph = flowStore.getState().toObject(); + const parsed = packageModule.parseWorkflowPackage({ + metadata: { studio: form }, + graph, + restore: { formSnapshot: form, graphSnapshot: graph, graphBindingSnapshot: null }, + }); + assert.ok(parsed); + studioStore.useStudioStore + .getState() + .createWorkflowTab('Imported Qwen native candidate', parsed.snapshot, 'import', 'private'); + assert.deepEqual( + flowStore.getState().exportGraph('qwen-native-import', undefined, { randomizeSeeds: false }), + expected, + 'normal import retains whole_v1 owner/encoder settings, every media source and exact geometry', + ); + } finally { + flowStore.setState(previous[0]); + nodeStore.setState(previous[1]); + studioStore.useStudioStore.setState(previous[2]); + } + }); +}); + +test('all four actual Qwen native recipes recover their coherent runtime settings after switching tasks and returning', async (t) => { + const operations = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + const authoring = await server.ssrLoadModule('/src/workflow/operationAuthoring.ts'); + const contracts = operations.parseOperationContracts( + qwenInpaintCandidateFixture.publicPayload.operationContracts, + qwenInpaintCandidateFixture.publicPayload.operationContractSchemaVersion, + ); + const awayRow = fixture.recipes.find((item) => item.id === 'qwen_character_angles'); + const awayContracts = operations.parseOperationContracts( + fixture.publicPayload.operationContracts, + fixture.publicPayload.operationContractSchemaVersion, + ); + const awayStarter = starterRequests.parseOperationStarter( + awayRow.starter, + awayRow.starter.pipelineClass, + awayRow.starter.task, + awayContracts, + recipeSelection(awayRow), + ); + for (const row of qwenInpaintCandidateFixture.recipes) + await t.test(row.id, () => { + const template = templates.find((item) => item.id === row.id); + const starter = starterRequests.parseOperationStarter( + row.starter, + row.starter.pipelineClass, + row.starter.task, + contracts, + recipeSelection(row), + ); + const candidate = qwenInpaintCandidate.createQwenInpaintNativeCandidateGraph( + template, + { ...selectedForm(template), device: 'cpu:0', autoOffload: false, offloadMode: 'none' }, + starter, + { ...fixture.registry, ...qwenInpaintCandidateFixture.registry }, + row.spec, + row.capability, + ); + const source = structuredClone(candidate); + const originalApi = flowStore + .getState() + .exportGraph('qwen-task-return', undefined, { sourceGraph: candidate, randomizeSeeds: false }); + const owner = groups + .unpackVisualOperationGroups(candidate) + .graph.nodes.find((node) => operations.operationOwnsModel(node.data.operationAuthoring?.operation)); + const away = authoring.planOperationChange(candidate, owner.id, awayStarter).graph; + const archived = structuredClone(away); + const awayOwner = groups + .unpackVisualOperationGroups(away) + .graph.nodes.find((node) => operations.operationOwnsModel(node.data.operationAuthoring?.operation)); + const returned = authoring.planOperationChange(away, awayOwner.id, starter); + const flat = groups.unpackVisualOperationGroups(returned.graph).graph; + for (const action of ['ModelsLoader', 'ImageEncode']) + assert.equal( + flat.nodes.find((node) => node.data.action === action).data.params.inpaint_compatibility.value, + 'whole_v1', + `${action}: exact task return restores the authored compatibility setting as one coherent set`, + ); + assert.ok(returned.review.preserved.some((message) => /runtime settings.*inactive draft/i.test(message))); + assert.deepEqual(candidate, source, 'the original recipe remains immutable'); + assert.deepEqual(away, archived, 'the inactive draft remains immutable'); + const returnedApi = flowStore + .getState() + .exportGraph('qwen-task-return', undefined, { sourceGraph: returned.graph, randomizeSeeds: false }); + assert.deepEqual(returnedApi, originalApi, 'the exact task return retains the full valid CPU-host API packet'); + const previous = flowStore.getState(); + try { + flowStore.getState().replaceGraph(returned.graph); + assert.deepEqual( + flowStore.getState().exportGraph('qwen-task-return', undefined, { randomizeSeeds: false }), + returnedApi, + 'normal graph replacement and export retain the recovered runtime settings', + ); + } finally { + flowStore.setState(previous); + } + const reset = groups.unpackVisualOperationGroups( + authoring.planOperationChange(away, awayOwner.id, starter, { restoreDefaults: true }).graph, + ).graph; + for (const action of ['ModelsLoader', 'ImageEncode']) + assert.equal( + authoring.operationFieldValue( + reset.nodes.find((node) => node.data.action === action).data.params.inpaint_compatibility, + ), + 'native', + `${action}: explicit defaults reset retains the selected starter's runtime setting`, + ); + }); +}); + +test('six pipeline-stage image selections describe real encoding and latent output without claiming native modular execution', () => { + const expected = [ + 'flux_fill_inpaint', + 'flux_control_canny', + 'flux_fill_outpaint', + 'flux_depth_control', + 'flux_redux_edit', + 'flux_redux_multi_reference', + ]; + const selected = templates.filter( + (template) => + template.example?.mediaType === 'image' && template.executionSelection?.implementation === 'pipeline_stages', + ); + assert.deepEqual(selected.map((template) => template.id).sort(), [...expected].sort()); + for (const template of selected) { + const row = fixture.recipes.find((item) => item.id === template.id); + assert.ok(row); + const owner = row.starter.nodes.find((item) => item.operation.decomposition === 'loader').node; + assert.equal(owner.params.execution_profile_id.value, template.executionSelection.executionProfileId); + assert.equal(row.starter.pipelineClass, template.executionSelection.pipelineClass); + const actions = row.starter.nodes.map((item) => item.node.action); + for (const action of ['LoadPipeline', 'EncodeInputs', 'Denoise', 'DecodeLatents']) + assert.equal(actions.filter((item) => item === action).length, 1); + assert.equal( + actions.some((action) => ['Inpaint', 'ControlGenerate', 'Edit'].includes(action)), + false, + ); + assert.match(template.executionSelection.note, /Encode Inputs/); + if (template.id.startsWith('flux_fill_')) assert.match(template.executionSelection.note, /text only/); + assert.equal(template.executionSelection.memoryPolicy, undefined); + } +}); + +const stagedImageStarterIds = [ + 'flux_fill_inpaint', + 'flux_fill_outpaint', + 'flux_control_canny', + 'flux_depth_control', + 'flux_redux_edit', + 'flux_redux_multi_reference', +]; + +let currentImageStarterAlternativesValue; +async function currentImageStarterAlternatives() { + if (currentImageStarterAlternativesValue) return currentImageStarterAlternativesValue; + const selected = stagedImageStarterIds.map((id) => fixture.recipes.find((row) => row.id === id)); + assert.ok(selected.every(Boolean)); + const backend = path.resolve('../MoDiff'); + const python = + process.env.MODIFF_BACKEND_PYTHON || + path.join(backend, '.venv', process.platform === 'win32' ? 'Scripts/python.exe' : 'bin/python'); + const script = path.resolve('scripts/template-operation-fixtures.py'); + const whole = JSON.parse( + execFileSync( + process.platform === 'win32' ? python : path.join(backend, 'scripts/with-runtime-env.sh'), + process.platform === 'win32' ? [script] : [python, script], + { + cwd: backend, + encoding: 'utf8', + maxBuffer: 64 * 1024 * 1024, + timeout: 90_000, + env: { ...process.env, PYTHONDONTWRITEBYTECODE: '1' }, + input: JSON.stringify( + selected.map((row) => ({ + id: row.id, + selection: { + pipelineClass: row.starter.pipelineClass, + task: row.starter.task, + }, + })), + ), + }, + ), + ); + const module = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + const operations = module.parseOperationContracts(fixture.publicPayload.operationContracts, 3); + assert.deepEqual(whole.publicPayload.operationContracts, fixture.publicPayload.operationContracts); + currentImageStarterAlternativesValue = { selected, whole: whole.recipes, operations }; + return currentImageStarterAlternativesValue; +} + +test('current image catalogs retain both complete staged and historical whole starters under exact authority', async (t) => { + const { selected, whole, operations } = await currentImageStarterAlternatives(); + for (const row of selected) + await t.test(row.id, () => { + const selectedRoute = starterRequests.parseOperationStarter( + row.starter, + row.starter.pipelineClass, + row.starter.task, + operations, + recipeSelection(row), + ); + assert.equal(selectedRoute.nodes.length, 4); + assert.equal(selectedRoute.edges.length, 8); + const legacy = whole.find((item) => item.id === row.id).starter; + const wholeRoute = starterRequests.parseOperationStarter(legacy, legacy.pipelineClass, legacy.task, operations); + assert.equal(wholeRoute.nodes.length, 2); + assert.equal(wholeRoute.edges.length, 1); + for (const route of [selectedRoute, wholeRoute]) { + const ids = new Set(route.nodes.map((item) => item.operation.operationId)); + assert.ok(route.requiredInputs.every((input) => ids.has(input.operationId))); + assert.ok(route.sharedInputs.every((group) => group.members.every((member) => ids.has(member.operationId)))); + } + assert.equal( + operations.filter( + (operation) => operation.pipelineClass === row.starter.pipelineClass && operation.task === row.starter.task, + ).length, + 5, + ); + }); +}); + +test('alternate image starter membership rejects partial mixed foreign and noncurrent routes before authoring', async (t) => { + const { selected, whole, operations } = await currentImageStarterAlternatives(); + for (const row of selected) { + const original = structuredClone(row.starter); + const legacy = whole.find((item) => item.id === row.id).starter; + const deny = async (name, mutate) => + t.test(`${row.id}/${name}`, () => { + const value = structuredClone(original), + metadata = structuredClone(operations); + mutate(value, metadata); + assert.throws(() => + starterRequests.parseOperationStarter(value, value.pipelineClass, value.task, metadata, recipeSelection(row)), + ); + assert.deepEqual(row.starter, original); + }); + for (const kind of ['image_encoder', 'denoise', 'decoder']) + await deny(`missing ${kind}`, (value) => { + const id = value.nodes.find((item) => item.operation.nodeType === kind).operation.operationId; + value.nodes = value.nodes.filter((item) => item.operation.operationId !== id); + value.edges = value.edges.filter((edge) => edge.source !== id && edge.target !== id); + value.requiredInputs = value.requiredInputs.filter((input) => input.operationId !== id); + value.sharedInputs = value.sharedInputs.filter((group) => + group.members.every((member) => member.operationId !== id), + ); + }); + await deny('duplicate stage', (value) => value.nodes.push(structuredClone(value.nodes[1]))); + await deny('extra owner', (value) => + value.nodes.push(structuredClone(value.nodes.find((item) => item.operation.decomposition === 'loader'))), + ); + await deny('whole mixed with complete stages', (value) => + value.nodes.push(structuredClone(legacy.nodes.find((item) => item.operation.decomposition === 'pipeline'))), + ); + for (const handle of ['encoded_inputs', 'latents', 'latent_binding', 'width', 'height']) + await deny(`missing ${handle}`, (value) => { + const edge = value.edges.find((item) => item.targetHandle === handle); + assert.ok(edge); + value.edges.splice(value.edges.indexOf(edge), 1); + }); + await deny('competing width', (value) => + value.edges.push(structuredClone(value.edges.find((edge) => edge.targetHandle === 'width'))), + ); + await deny('stale stage DTO', (value) => { + value.nodes.find((item) => item.operation.nodeType === 'denoise').operation.support = 'unsupported'; + }); + await deny('foreign node task', (value) => { + value.nodes.find((item) => item.operation.nodeType === 'denoise').operation.task = 'foreign_image_task'; + }); + await deny('partial catalog', (value, metadata) => { + const index = metadata.findIndex( + (item) => item.pipelineClass === value.pipelineClass && item.task === value.task && item.nodeType === 'decoder', + ); + metadata.splice(index, 1); + }); + await deny('duplicate catalog authority', (value, metadata) => + metadata.push( + structuredClone( + metadata.find( + (item) => + item.pipelineClass === value.pipelineClass && item.task === value.task && item.nodeType === 'decoder', + ), + ), + ), + ); + await deny('extra catalog operation', (value, metadata) => { + const extra = structuredClone( + metadata.find( + (item) => + item.pipelineClass === value.pipelineClass && item.task === value.task && item.nodeType === 'decoder', + ), + ); + extra.operationId = 'extra.decode'; + metadata.push(extra); + }); + await t.test(`${row.id}/wrong selected profile`, () => + assert.throws(() => + starterRequests.parseOperationStarter(original, original.pipelineClass, original.task, operations, { + executionProfileId: 'foreign:direct', + }), + ), + ); + await t.test(`${row.id}/whole plus partial stage`, () => { + const mixed = structuredClone(legacy); + mixed.nodes.push(structuredClone(original.nodes.find((item) => item.operation.nodeType === 'denoise'))); + assert.throws(() => starterRequests.parseOperationStarter(mixed, mixed.pipelineClass, mixed.task, operations)); + }); + } +}); + +const canonicalImageStageRoleTemplates = [ + 'flux_control_canny', + 'flux_depth_control', + 'flux_fill_inpaint', + 'flux_fill_outpaint', + 'flux_redux_edit', + 'flux_redux_multi_reference', +]; + +let declaredImageRoleOperations; +async function declaredImageRoleInputs(id) { + if (!declaredImageRoleOperations) { + const current = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + declaredImageRoleOperations = current.parseOperationContracts( + fixture.publicPayload.operationContracts, + fixture.publicPayload.operationContractSchemaVersion, + ); + } + const row = fixture.recipes.find((item) => item.id === id); + const template = templates.find((item) => item.id === id); + assert.ok(row && template); + return { + row, + template, + starter: starterRequests.parseOperationStarter( + structuredClone(row.starter), + row.starter.pipelineClass, + row.starter.task, + declaredImageRoleOperations, + recipeSelection(row), + ), + spec: structuredClone(row.spec), + }; +} + +function buildDeclaredImageRoles(input) { + return builder.createTemplateOperationGraph( + input.template, + selectedForm(input.template), + input.starter, + fixture.registry, + input.spec, + input.row.capability, + ); +} + +for (const id of canonicalImageStageRoleTemplates) + test(`declared role join preserves ${id} through actual factory, grouping and canonical leaves`, async () => { + const input = await declaredImageRoleInputs(id); + const original = structuredClone(input); + const grouped = buildDeclaredImageRoles(input); + assert.ok(grouped.nodes.some((node) => node.data.blockInstanceV2)); + const flat = groups.unpackVisualOperationGroups(grouped).graph; + const declaration = input.starter.authoring ?? input.spec; + const actual = new Map(); + for (const node of flat.nodes) { + if (node.data.studioRole === undefined) continue; + assert.ok(!actual.has(node.data.studioRole), 'Declared roles remain unique after flattening.'); + actual.set(node.data.studioRole, node); + } + assert.equal(actual.size, declaration.roles.length); + for (const [role, key] of declaration.roles) { + const node = actual.get(role); + assert.ok(node, `Missing exact declared role ${role}`); + assert.equal(`${node.data.module}.${node.data.action}`, key); + assert.notEqual(node.data.studioOwned, true, 'A role annotation grants no managed runtime ownership.'); + } + assert.deepEqual(input, original, 'Factory role assignment cannot mutate source declarations.'); + const persisted = groups.unpackVisualOperationGroups(JSON.parse(JSON.stringify(grouped))).graph; + assert.deepEqual( + persisted.nodes.map((node) => [node.id, node.data.studioRole]), + flat.nodes.map((node) => [node.id, node.data.studioRole]), + ); + assert.deepEqual(persisted.edges, flat.edges); + }); + +test('declared role join refuses duplicate role rows without altering source inputs', async () => { + for (const id of canonicalImageStageRoleTemplates) { + const input = await declaredImageRoleInputs(id); + const declaration = input.starter.authoring ?? input.spec; + declaration.roles.push(structuredClone(declaration.roles[0])); + const original = structuredClone(input); + assert.throws(() => buildDeclaredImageRoles(input), /role .*duplicated|operation role .*missing/); + assert.deepEqual(input, original); + } +}); + +test('declared role join refuses a foreign role annotation on an otherwise exact resolved owner', async () => { + for (const id of canonicalImageStageRoleTemplates) { + const input = await declaredImageRoleInputs(id); + const owner = input.starter.nodes.find((node) => node.operation.decomposition === 'loader'); + owner.node.studioRole = 'foreign_role'; + const original = structuredClone(input); + assert.throws(() => buildDeclaredImageRoles(input), /role does not match its backend declaration/); + assert.deepEqual(input, original); + } +}); + +test('ordinary image template hydration preserves provenance without recovering a managed receipt', async (t) => { + for (const id of ['flux_schnell_text_to_image', 'z_image_quick_concept']) + await t.test(id, async () => { + const previous = [flowStore.getState(), nodeStore.getState(), studioStore.useStudioStore.getState()]; + const originalFetch = globalThis.fetch; + try { + const { row, template, tabId, studio, context } = prepareLifecycleFixture(id); + globalThis.fetch = async () => Response.json(row.starter); + await lifecycle.createTemplateOperationWorkflow(template, studio.getState().form, context); + const graph = flowStore.getState().toObject(); + const expectedApi = flowStore.getState().exportGraph('restored-template', undefined, { randomizeSeeds: false }); + const saved = structuredClone(studio.getState().workflowTabs.find((tab) => tab.id === tabId)); + assert.equal(saved.source, 'template'); + assert.equal(saved.snapshot.activeTemplateId, id); + assert.equal(saved.snapshot.studioGraphBinding, null); + // A fresh page reads this persisted document through the ordinary backend merge. + studio.setState({ workflowTabs: [], activeWorkflowTabId: tabId }); + studio.getState().mergeBackendWorkflow({ ...saved, revision: 1 }); + assert.equal(studio.getState().graphBinding, null); + assert.equal(studio.getState().activeTemplateId, id); + const restored = studio.getState().workflowTabs.find((tab) => tab.id === tabId); + assert.equal(restored.source, 'template'); + assert.equal(restored.sourceLabel, id); + assert.deepEqual( + flowStore.getState().toObject(), + graph, + 'hydration must not promote role labels into ownership', + ); + assert.deepEqual( + flowStore.getState().exportGraph('restored-template', undefined, { randomizeSeeds: false }), + expectedApi, + 'all creator values and supplier wires survive the backend hydration path', + ); + } finally { + globalThis.fetch = originalFetch; + flowStore.setState(previous[0]); + nodeStore.setState(previous[1]); + studioStore.useStudioStore.setState(previous[2]); + } + }); +}); + +test('native image sampling and decoding share Generate without changing executable values or edges', async (t) => { + let covered = 0; + for (const row of fixture.recipes) { + const template = templates.find((item) => item.id === row.id); + if (!template || template.executionSelection?.implementation !== 'native_stages') continue; + const graph = builder.createTemplateOperationGraph( + template, + selectedForm(template), + row.starter, + fixture.registry, + row.spec, + row.capability, + ); + const flat = groups.unpackVisualOperationGroups(graph).graph; + if (!flat.nodes.some((node) => node.data.module === 'modules.ModularDiffusers' && node.data.action === 'Denoise')) + continue; + covered++; + await t.test(row.id, () => { + assert.equal(graph.nodes.filter((node) => groups.visualOperationGroup(node) === 'generate').length, 1); + assert( + !graph.nodes.some((node) => node.data.module === 'modules.ModularDiffusers' && node.data.action === 'Denoise'), + ); + const generated = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'generate'); + assert.deepEqual(generated.data.blockInstanceV2.effectiveGraph.nodes.map((node) => node.data.action).sort(), [ + 'DecodeLatents', + 'Denoise', + ]); + const exportAPI = (sourceGraph) => + flowStore.getState().exportGraph('image-stage-parity', undefined, { sourceGraph, randomizeSeeds: false }); + const semantic = (api) => { + const canonical = canonicalGraphIdentity(api).canonicalGraph; + return { + ...canonical, + nodes: [...canonical.nodes].sort((a, b) => a.key.localeCompare(b.key)), + paths: canonical.paths + .map((ids) => [...ids].sort()) + .sort((a, b) => JSON.stringify(a).localeCompare(JSON.stringify(b))), + }; + }; + assert.deepEqual(semantic(exportAPI(graph)), semantic(exportAPI(flat))); + }); + } + assert.equal(covered, 48, 'Cover every retained component-based image template.'); +}); + +test('component image Generate requires one matching owner and preserves latent fanout and saved layouts', () => { + const fresh = () => { + const template = templates.find((item) => item.id === 'flux_lora_cinematic_octane_3d'); + const row = fixture.recipes.find((item) => item.id === template.id); + return groups.unpackVisualOperationGroups( + builder.createTemplateOperationGraph( + template, + selectedForm(template), + row.starter, + fixture.registry, + row.spec, + row.capability, + ), + ).graph; + }; + const missing = fresh(); + const decoder = missing.nodes.find((node) => node.data.action === 'DecodeLatents'); + missing.edges = missing.edges.filter((edge) => !(edge.target === decoder.id && edge.targetHandle === 'vae')); + const missingBefore = structuredClone(missing); + assert( + !groups.groupNewOperationGraph(missing).nodes.some((node) => groups.visualOperationGroup(node) === 'generate'), + ); + assert.deepEqual(missing, missingBefore, 'a missing owner is never repaired by visual grouping'); + + const ambiguous = fresh(); + const originalDecoder = ambiguous.nodes.find((node) => node.data.action === 'DecodeLatents'); + const extra = { ...structuredClone(originalDecoder), id: 'another-decoder' }; + ambiguous.nodes.push(extra); + ambiguous.edges.push( + ...ambiguous.edges + .filter((edge) => edge.target === originalDecoder.id) + .map((edge) => ({ ...edge, id: edge.id + '-copy', target: extra.id })), + ); + const ambiguousBefore = structuredClone(ambiguous); + assert.throws(() => groups.groupNewOperationGraph(ambiguous), /several instances of one stage/u); + assert.deepEqual(ambiguous, ambiguousBefore, 'ambiguous ownership is rejected without changing the graph'); + + const fanout = fresh(); + const sampler = fanout.nodes.find((node) => node.data.action === 'Denoise'); + const consumer = { + id: 'keep-latents', + type: 'custom', + position: { x: 2000, y: 400 }, + data: { + type: 'custom', + module: 'modules.Example', + action: 'KeepLatents', + label: 'Keep latents', + category: 'Example', + params: { latents: { ...structuredClone(sampler.data.params.latents), display: 'input', isInput: true } }, + }, + }; + fanout.nodes.push(consumer); + fanout.edges.push({ + id: 'latent-fanout', + source: sampler.id, + sourceHandle: 'latents', + target: consumer.id, + targetHandle: 'latents', + }); + const generated = groups.groupNewOperationGraph(fanout); + const generate = generated.nodes.find((node) => groups.visualOperationGroup(node) === 'generate'); + assert( + generate.data.blockInstanceV2.effectiveInterface.boundary.outputs.some( + (port) => port.binding.fieldOrPortId === 'latents', + ), + ); + const flattened = groups.unpackVisualOperationGroups(generated).graph; + const retained = flattened.edges.find((edge) => edge.target === consumer.id && edge.targetHandle === 'latents'); + assert.equal(flattened.nodes.find((node) => node.id === retained.source).data.action, 'Denoise'); + assert.equal(retained.sourceHandle, 'latents'); + + const prior = fresh(); + const owner = prior.nodes.find((node) => node.data.action === 'ModelsLoader'); + const legacy = groups.groupOperationStages(prior, owner.id, ['setup', 'inputs', 'output'], true); + assert(legacy.nodes.some((node) => node.data.action === 'Denoise')); + assert.deepEqual( + groups.groupNewOperationGraph(legacy), + legacy, + 'opening an existing stage layout does not migrate it', + ); +}); + +test('direct image Fill, Control and Redux use the same Generate stage with exact executable parity', async (t) => { + for (const id of [ + 'flux_fill_inpaint', + 'flux_fill_outpaint', + 'flux_control_canny', + 'flux_depth_control', + 'flux_redux_edit', + 'flux_redux_multi_reference', + ]) + await t.test(id, () => { + const row = fixture.recipes.find((item) => item.id === id); + const template = templates.find((item) => item.id === id); + assert.ok(row && template, id); + const graph = builder.createTemplateOperationGraph( + template, + selectedForm(template), + row.starter, + fixture.registry, + row.spec, + row.capability, + ); + const generated = graph.nodes.filter((node) => groups.visualOperationGroup(node) === 'generate'); + assert.equal(generated.length, 1); + assert.deepEqual(generated[0].data.blockInstanceV2.effectiveGraph.nodes.map((node) => node.data.action).sort(), [ + 'DecodeLatents', + 'Denoise', + ]); + const flat = groups.unpackVisualOperationGroups(graph).graph; + const semantic = (sourceGraph) => { + const api = flowStore + .getState() + .exportGraph('direct-image-stage-parity', undefined, { sourceGraph, randomizeSeeds: false }); + const canonical = canonicalGraphIdentity(api).canonicalGraph; + return { + ...canonical, + nodes: [...canonical.nodes].sort((a, b) => a.key.localeCompare(b.key)), + paths: canonical.paths + .map((ids) => [...ids].sort()) + .sort((a, b) => JSON.stringify(a).localeCompare(JSON.stringify(b))), + }; + }; + assert.deepEqual(semantic(graph), semantic(flat)); + }); +}); diff --git a/scripts/template-qualification.mjs b/scripts/template-qualification.mjs index a73c2726..a5aea813 100644 --- a/scripts/template-qualification.mjs +++ b/scripts/template-qualification.mjs @@ -4,11 +4,90 @@ import { basename, dirname, join, relative, resolve } from 'node:path'; import { fileURLToPath } from 'node:url'; import { loadTemplateRuntime } from './template-gallery-harness.mjs'; -import { canonicalWorkflowContract, findCanonicalWorkflowRecord } from './release-contract-core.mjs'; +import { validateRunProvenance } from './live-proof-provenance.mjs'; +import { selectReviewedExperimentalWorkflows } from './workflow-library-manifest-state.mjs'; +import { + canonicalWorkflowContract, + canonicalEvidenceWritePath, + findCanonicalWorkflowRecord, + readCanonicalWorkflowEvidence, +} from './release-contract-core.mjs'; const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url)); const CLIENT_ROOT = resolve(SCRIPT_DIR, '..'); const BACKEND_ROOT = resolve(process.env.MODIFF_BACKEND_DIR || join(CLIENT_ROOT, '..', 'MoDiff')); +const qualificationArgs = process.argv.slice(2); +if (qualificationArgs[0] === '--workflow' && qualificationArgs.length === 2 && qualificationArgs[1]) { + if (!process.env.MODIFF_CANONICAL_WORKFLOW_EVIDENCE) { + throw new Error('Set MODIFF_CANONICAL_WORKFLOW_EVIDENCE to the retained original canonical evidence descriptor.'); + } + const evidencePath = resolve(process.env.MODIFF_CANONICAL_WORKFLOW_EVIDENCE); + const result = await readCanonicalWorkflowEvidence({ + clientRoot: CLIENT_ROOT, + backendRoot: BACKEND_ROOT, + workflowId: qualificationArgs[1], + evidencePath, + }); + const descriptorBytes = result.descriptorBytes; + const descriptorHash = sha256Bytes(descriptorBytes); + const retainedDirectory = canonicalEvidenceWritePath( + BACKEND_ROOT, + `data/qualification/release/canonical-workflow-evidence/${descriptorHash}`, + ); + if (existsSync(retainedDirectory)) + throw new Error('Canonical evidence destination already exists; retain and inspect the existing receipt.'); + for (const ref of result.retainedFiles) { + if (['evidence.json', 'derived-provenance.json'].includes(ref.path)) + throw new Error('Evidence file uses a reserved retention name.'); + } + const registryPath = canonicalEvidenceWritePath( + BACKEND_ROOT, + 'data/qualification/release/canonical-workflow-run-receipts.v1.json', + ); + const previous = existsSync(registryPath) + ? readJson(registryPath) + : { schemaVersion: 1, format: 'modiff.canonical-workflow-run-receipt-registry.v1', receipts: [] }; + if ( + previous.schemaVersion !== 1 || + previous.format !== 'modiff.canonical-workflow-run-receipt-registry.v1' || + !Array.isArray(previous.receipts) + ) { + throw new Error('Canonical workflow receipt registry has an invalid schema.'); + } + mkdirSync(retainedDirectory, { recursive: true }); + for (const ref of result.retainedFiles) { + const destination = canonicalEvidenceWritePath(retainedDirectory, ref.path); + mkdirSync(dirname(destination), { recursive: true }); + if (!existsSync(destination)) copyFileSync(ref.absolutePath, destination); + if (sha256Bytes(readFileSync(destination)) !== ref.sha256) + throw new Error('Retained original evidence hash differs.'); + } + writeFileSync(join(retainedDirectory, 'evidence.json'), descriptorBytes, { flag: 'wx' }); + writeFileSync(join(retainedDirectory, 'derived-provenance.json'), `${JSON.stringify(result.provenance, null, 2)}\n`, { + flag: 'wx', + }); + const receipt = { + ...result.receipt, + evidencePath: relative(BACKEND_ROOT, join(retainedDirectory, 'evidence.json')).split('\\').join('/'), + evidenceSha256: descriptorHash, + evidenceBytes: descriptorBytes.length, + }; + const receipts = [...previous.receipts, receipt].sort( + (a, b) => a.workflowId.localeCompare(b.workflowId) || a.capturedAt.localeCompare(b.capturedAt), + ); + writeFileSync(registryPath, `${JSON.stringify({ ...previous, receipts }, null, 2)}\n`); + const scopes = { + real_backend_input_bound_model_variant: 'input-bound', + real_backend_prompt_bound_model_variant: 'prompt-bound', + }; + const scope = scopes[receipt.proofKind] ?? 'exact canonical'; + console.log(`Retained ${scope} execution evidence for ${receipt.workflowId}. This records technical execution only.`); + process.exit(0); +} +if (qualificationArgs.length > 1 || qualificationArgs.some((value) => value !== '--allow-blocked-probe')) { + throw new Error('Template qualification accepts only one optional --allow-blocked-probe argument.'); +} +const allowBlockedProbe = qualificationArgs.length === 1; const ARTIFACT_ROOT = process.env.MODIFF_LIVE_PROOF_ARTIFACT ? resolve(process.env.MODIFF_LIVE_PROOF_ARTIFACT) : null; const DIRECT_PROVENANCE_PATH = process.env.MODIFF_TEMPLATE_PROVENANCE ? resolve(process.env.MODIFF_TEMPLATE_PROVENANCE) @@ -79,15 +158,32 @@ if (Number(provenance.schemaVersion) < 2 || provenance.format !== 'modiff.live-p if ((provenance.blockers ?? []).length > 0) { throw new Error(`Template proof contains blocker(s): ${provenance.blockers.join(' ')}`); } +// Optional applied-state claims must authenticate their own observations and +// lock. Historical proofs without this extension keep their original scope. +if (provenance.adapterApplications !== undefined || provenance.adapterApplicationsHash !== undefined) { + const blockers = validateRunProvenance(provenance); + if (blockers.length) throw new Error(`Applied adapter proof is invalid: ${blockers.join(' ')}`); +} -const runtime = await loadTemplateRuntime(CLIENT_ROOT); +const runtime = await loadTemplateRuntime(CLIENT_ROOT, { includePlanning: allowBlockedProbe }); const templateId = provenance.template?.id ?? status.templateId; const template = runtime.templates.find((item) => item.id === templateId); if (!template) throw new Error(`Template ${String(templateId)} is not in the runtime catalog.`); const workflowManifest = readJson( required(join(BACKEND_ROOT, 'data', 'workflow-library-manifest.json'), 'Canonical workflow manifest'), ); -const workflowRecords = (workflowManifest.workflows ?? []).map((manifest) => { +// Explicit blocked probes may retain execution evidence against an experimental +// canonical graph. This lookup never promotes its catalog or qualification state. +const scopedWorkflows = [ + ...(workflowManifest.workflows ?? []), + ...(allowBlockedProbe + ? (workflowManifest.experimentalWorkflows ?? []) + : selectReviewedExperimentalWorkflows( + workflowManifest.experimentalWorkflows ?? [], + readJson(join(CLIENT_ROOT, 'config/canonical-template-variants.v1.json')), + )), +]; +const workflowRecords = scopedWorkflows.map((manifest) => { const graph = readJson(required(join(BACKEND_ROOT, 'data', 'graphs', manifest.graphPath), manifest.id)); return { manifest, graph }; }); @@ -96,6 +192,10 @@ if (!canonicalWorkflow) { throw new Error(`Template ${String(templateId)} has no current canonical workflow.`); } const canonicalWorkflowHash = canonicalWorkflowContract(canonicalWorkflow.manifest, canonicalWorkflow.graph).graphHash; +if (canonicalWorkflow.manifest.experimentalRecipe) { + const blockers = validateRunProvenance(provenance); + if (blockers.length) throw new Error(`Reviewed experimental recipe proof is incomplete: ${blockers.join(' ')}`); +} const expectedCatalogLock = runtime.templateLockHash(template); const expectedPromptHash = runtime.promptSettingsHash(template); diff --git a/scripts/template-qualification.test.mjs b/scripts/template-qualification.test.mjs index 8b8e3caa..f8fb3e37 100644 --- a/scripts/template-qualification.test.mjs +++ b/scripts/template-qualification.test.mjs @@ -1,17 +1,45 @@ import assert from 'node:assert/strict'; -import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { + existsSync, + lstatSync, + mkdirSync, + mkdtempSync, + readFileSync, + realpathSync, + rmSync, + symlinkSync, + writeFileSync, +} from 'node:fs'; import { tmpdir } from 'node:os'; -import { join, resolve } from 'node:path'; +import { basename, dirname, join, resolve } from 'node:path'; import { spawnSync } from 'node:child_process'; +import { createHash } from 'node:crypto'; import test from 'node:test'; import { canonicalJsonHash } from './canonical-json.mjs'; +import { + canonicalWorkflowContract, + canonicalEvidenceWritePath, + exportCanonicalWorkflowGraphs, + readCanonicalEvidenceFile, + readCanonicalWorkflowEvidence, + validateCanonicalWorkflowEvidence, +} from './release-contract-core.mjs'; +import { canonicalGraphIdentity, sha256Value } from './live-proof-provenance.mjs'; +import { hintedCanonicalHookCase, mockedDdimAccountingFixture } from './canonical-provenance-fixtures.mjs'; import { loadTemplateRuntime } from './template-gallery-harness.mjs'; const ROOT = resolve(import.meta.dirname, '..'); const SCRIPT = join(ROOT, 'scripts', 'template-qualification.mjs'); -function writeBackendFixture(directory) { +function disposeFixture(directory) { + const actual = realpathSync(directory); + assert.equal(dirname(actual), realpathSync(tmpdir())); + assert.ok(basename(actual).startsWith('modiff-template-qualification-')); + rmSync(actual, { recursive: true, force: true }); +} + +function writeBackendFixture(directory, templateId = 'qwen_low_vram_product_concept') { const backendDirectory = join(directory, 'backend'); const graphPath = 'studio/qwen-image-modular-pipeline/text-to-image.json'; const graph = { @@ -36,7 +64,7 @@ function writeBackendFixture(directory) { id: 'QwenImageModularPipeline:text_to_image', modelType: 'QwenImageModularPipeline', mode: 'text_to_image', - sourceTemplateId: 'qwen_low_vram_product_concept', + sourceTemplateId: templateId, graphPath, graphHash: canonicalJsonHash(graph), }, @@ -48,9 +76,10 @@ function writeBackendFixture(directory) { return backendDirectory; } -async function fixture() { - const runtime = await loadTemplateRuntime(ROOT); - const template = runtime.templates.find((candidate) => candidate.id === 'qwen_low_vram_product_concept'); +async function fixture(templateId = 'qwen_low_vram_product_concept') { + const runtime = await loadTemplateRuntime(ROOT, { includePlanning: true }); + const template = runtime.templates.find((candidate) => candidate.id === templateId); + assert.ok(template, templateId); const expectedOutput = template.example?.expectedOutput; return { schemaVersion: 2, @@ -78,9 +107,10 @@ async function fixture() { output: { items: [ { - mediaType: 'image', + mediaType: template.example.mediaType, width: expectedOutput.width, height: expectedOutput.height, + ...(expectedOutput.frames ? { frames: expectedOutput.frames } : {}), decodedSha256: 'sha256:decoded-rgba:test', }, ], @@ -119,7 +149,7 @@ test('locked v2 template proofs become immutable execution receipts', async () = JSON.parse(readFileSync(join(retainedDirectory, registry.receipts[0].proofPath.split('/').at(-1)), 'utf8')).taskId, 'qualification-task', ); - rmSync(directory, { recursive: true, force: true }); + disposeFixture(directory); }); test('stale template locks are rejected before a receipt is written', async () => { @@ -144,7 +174,7 @@ test('stale template locks are rejected before a receipt is written', async () = }); assert.notEqual(result.status, 0); assert.match(result.stderr, /catalog lock is stale/i); - rmSync(directory, { recursive: true, force: true }); + disposeFixture(directory); }); test('template proofs with output dimensions that violate the locked contract are rejected', async () => { @@ -169,5 +199,905 @@ test('template proofs with output dimensions that violate the locked contract ar }); assert.notEqual(result.status, 0); assert.match(result.stderr, /output contract mismatch for width/i); - rmSync(directory, { recursive: true, force: true }); + disposeFixture(directory); +}); + +// Synthetic registrar fixtures test evidence retention, never model output quality. +const BLOCKED_TEMPLATE_ID = 'wan_vace_direct_text_to_video'; + +function qualificationFixtureProcess( + directory, + provenance, + argv = [], + { canonical = true, experimental = false, staleGraph = false, reviewedExperimental = false } = {}, +) { + const provenancePath = join(directory, 'proof.json'); + const registryPath = join(directory, 'registry.json'); + const backendDirectory = canonical + ? writeBackendFixture(directory, provenance.template.id) + : join(directory, 'backend'); + if (!canonical) { + mkdirSync(join(backendDirectory, 'data'), { recursive: true }); + writeFileSync(join(backendDirectory, 'data', 'workflow-library-manifest.json'), '{"workflows":[]}\n'); + } + if (canonical && experimental) { + const manifestPath = join(backendDirectory, 'data', 'workflow-library-manifest.json'); + const manifest = JSON.parse(readFileSync(manifestPath, 'utf8')); + const ordinary = manifest.workflows[0]; + const graphFile = join(backendDirectory, 'data', 'graphs', ordinary.graphPath); + const graph = JSON.parse(readFileSync(graphFile, 'utf8')); + const modelType = provenance.template.id.startsWith('flux3_klein_base_') + ? 'Flux3ModularPipeline' + : provenance.template.id.startsWith('flux3_klein_') + ? 'Flux3DistilledModularPipeline' + : 'QwenImageModularPipeline'; + const generic = { + ...ordinary, + id: `${modelType}:text_to_image`, + modelType, + sourceTemplateId: provenance.template.id.replace('lora_style', 'text_to_image'), + supportTier: 'experimental', + runtimeQualificationStatus: 'unqualified', + optimizationQualificationStatus: 'unqualified', + qualifiedRuntimeProfiles: [], + }; + const variantGraph = { + ...graph, + nodes: [...graph.nodes, { id: 'synthetic-lora', data: { module: 'modules.ModularDiffusers', action: 'Lora' } }], + }; + const variant = { + ...generic, + id: `${modelType}:text_to_image:${provenance.template.id}`, + sourceTemplateId: provenance.template.id, + variant: 'lora-theme', + ...(reviewedExperimental + ? { + experimentalRecipe: JSON.parse( + readFileSync(join(ROOT, 'config', 'canonical-template-variants.v1.json'), 'utf8'), + ).templates.find((row) => row.id === provenance.template.id).experimentalRecipe, + } + : {}), + graphPath: 'experimental/fixture/selected-lora.json', + graphHash: staleGraph ? '0'.repeat(64) : canonicalJsonHash(variantGraph), + }; + const variantFile = join(backendDirectory, 'data', 'graphs', variant.graphPath); + mkdirSync(resolve(variantFile, '..'), { recursive: true }); + writeFileSync(variantFile, `${JSON.stringify(variantGraph, null, 2)}\n`); + manifest.workflows = []; + manifest.experimentalWorkflows = [generic, variant]; + writeFileSync(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`); + } + writeFileSync(provenancePath, `${JSON.stringify(provenance, null, 2)}\n`); + const result = spawnSync(process.execPath, [SCRIPT, ...argv], { + cwd: ROOT, + encoding: 'utf8', + timeout: 30_000, + env: { + ...process.env, + MODIFF_BACKEND_DIR: backendDirectory, + MODIFF_TEMPLATE_PROVENANCE: provenancePath, + MODIFF_TEMPLATE_RECEIPT_REGISTRY: registryPath, + MODIFF_TEMPLATE_PROVENANCE_DIR: join(directory, 'retained'), + }, + }); + return { result, registryPath, backendDirectory }; +} + +test('experimental LoRA variants without a reviewed declaration require explicit lookup and retain their exact graph hash', async (t) => { + for (const templateId of ['flux3_klein_fp8r512_lora_style', 'flux3_klein_base_fp8r512_lora_style']) { + await t.test(templateId, async () => { + const directory = mkdtempSync(join(tmpdir(), 'modiff-template-qualification-experimental-')); + const provenance = await fixture(templateId); + assert.equal(provenance.adapterApplications, undefined, 'Historical submitted-graph proofs remain optional.'); + try { + const ordinary = qualificationFixtureProcess(directory, provenance, [], { experimental: true }); + assert.notEqual(ordinary.result.status, 0); + assert.match(ordinary.result.stderr, /Reviewed experimental association differs from its declaration/); + assert.equal(existsSync(ordinary.registryPath), false); + const explicit = qualificationFixtureProcess(directory, provenance, ['--allow-blocked-probe'], { + experimental: true, + }); + assert.equal(explicit.result.status, 0, explicit.result.stderr); + const manifest = JSON.parse( + readFileSync(join(explicit.backendDirectory, 'data', 'workflow-library-manifest.json'), 'utf8'), + ); + const variant = manifest.experimentalWorkflows.find((record) => record.sourceTemplateId === templateId); + const graph = JSON.parse( + readFileSync(join(explicit.backendDirectory, 'data', 'graphs', variant.graphPath), 'utf8'), + ); + const registry = JSON.parse(readFileSync(explicit.registryPath, 'utf8')); + assert.equal(registry.receipts.length, 1); + assert.equal(registry.receipts[0].templateId, templateId); + assert.equal(registry.receipts[0].canonicalWorkflowHash, canonicalWorkflowContract(variant, graph).graphHash); + assert.deepEqual(manifest.workflows, []); + assert.ok( + manifest.experimentalWorkflows.every((record) => record.runtimeQualificationStatus === 'unqualified'), + ); + assert.ok(manifest.experimentalWorkflows.every((record) => record.qualifiedRuntimeProfiles.length === 0)); + const runtime = await loadTemplateRuntime(ROOT, { includePlanning: true }); + assert.equal(runtime.templates.find((item) => item.id === templateId).example.status, 'unverified'); + } finally { + disposeFixture(directory); + } + }); + } +}); + +test('reviewed experimental recording rejects a thin synthetic proof before retention', async (t) => { + for (const templateId of ['flux3_klein_fp8r512_lora_style', 'flux3_klein_base_fp8r512_lora_style']) { + await t.test(templateId, async () => { + const directory = mkdtempSync(join(tmpdir(), 'modiff-template-qualification-reviewed-experimental-')); + try { + const { result, registryPath } = qualificationFixtureProcess(directory, await fixture(templateId), [], { + experimental: true, + reviewedExperimental: true, + }); + assert.notEqual(result.status, 0); + assert.match(result.stderr, /Reviewed experimental recipe proof is incomplete/); + assert.equal(existsSync(registryPath), false); + assert.equal(existsSync(join(directory, 'retained')), false); + } finally { + disposeFixture(directory); + } + }); + } +}); + +test('optional applied adapter observations cannot bypass validation at recording time', async () => { + const directory = mkdtempSync(join(tmpdir(), 'modiff-template-qualification-applied-adapters-')); + try { + const provenance = await fixture(); + provenance.adapterApplications = { schemaVersion: 1, source: 'invented' }; + provenance.adapterApplicationsHash = `sha256:adapter-applications-v1:${'a'.repeat(64)}`; + const { result, registryPath } = qualificationFixtureProcess(directory, provenance); + assert.notEqual(result.status, 0); + assert.match(result.stderr, /Applied adapter proof is invalid/); + assert.equal(existsSync(registryPath), false); + assert.equal(existsSync(join(directory, 'retained')), false); + } finally { + disposeFixture(directory); + } +}); + +test('blocked-probe lookup rejects a stale experimental canonical graph before retaining evidence', async () => { + const directory = mkdtempSync(join(tmpdir(), 'modiff-template-qualification-experimental-stale-')); + try { + const provenance = await fixture('flux3_klein_fp8r512_lora_style'); + const { result, registryPath } = qualificationFixtureProcess(directory, provenance, ['--allow-blocked-probe'], { + experimental: true, + staleGraph: true, + }); + assert.notEqual(result.status, 0); + assert.match(result.stderr, /graph hash does not match its manifest/); + assert.equal(existsSync(registryPath), false); + assert.equal(existsSync(join(directory, 'retained')), false); + } finally { + disposeFixture(directory); + } +}); + +test('ordinary public recording never falls back to an experimental canonical record', async () => { + const directory = mkdtempSync(join(tmpdir(), 'modiff-template-qualification-public-scope-')); + try { + const { result, registryPath } = qualificationFixtureProcess(directory, await fixture(), [], { + experimental: true, + }); + assert.notEqual(result.status, 0); + assert.match(result.stderr, /no current canonical workflow/); + assert.equal(existsSync(registryPath), false); + assert.equal(existsSync(join(directory, 'retained')), false); + } finally { + disposeFixture(directory); + } +}); + +test('blocked template lookup requires explicit opt-in and retaining a receipt cannot promote its source', async () => { + const directory = mkdtempSync(join(tmpdir(), 'modiff-template-qualification-blocked-')); + const sourcePaths = [ + join(ROOT, 'src/studio/templates.ts'), + join(ROOT, 'src/studio/templateOperationSelections.ts'), + join(ROOT, 'public/template-gallery/manifest.json'), + ]; + const sourceBefore = sourcePaths.map((file) => readFileSync(file)); + const provenance = await fixture(BLOCKED_TEMPLATE_ID); + try { + const ordinary = qualificationFixtureProcess(directory, provenance); + assert.notEqual(ordinary.result.status, 0); + assert.match(ordinary.result.stderr, /not in the runtime catalog/); + assert.equal(existsSync(ordinary.registryPath), false); + const explicit = qualificationFixtureProcess(directory, provenance, ['--allow-blocked-probe']); + assert.equal(explicit.result.status, 0, explicit.result.stderr); + const registry = JSON.parse(readFileSync(explicit.registryPath, 'utf8')); + assert.equal(registry.receipts.length, 1); + assert.equal(registry.receipts[0].templateId, BLOCKED_TEMPLATE_ID); + assert.equal(registry.receipts[0].catalogTemplateLockHash, provenance.template.catalogTemplateLockHash); + assert.equal(registry.receipts[0].promptSettingsHash, provenance.template.promptSettingsHash); + assert.equal(registry.receipts[0].outputHash, provenance.mediaHash); + const runtime = await loadTemplateRuntime(ROOT, { includePlanning: true }); + assert.equal(runtime.templates.find((item) => item.id === BLOCKED_TEMPLATE_ID).example.status, 'blocked'); + sourcePaths.forEach((file, index) => assert.deepEqual(readFileSync(file), sourceBefore[index], file)); + } finally { + disposeFixture(directory); + } +}); + +test('blocked lookup opt-in retains every receipt prerequisite', async (t) => { + const provenance = await fixture(BLOCKED_TEMPLATE_ID); + const cases = [ + [ + 'proof blockers', + (value) => { + value.blockers = ['unresolved source identity']; + }, + /contains blocker/, + ], + [ + 'catalog lock', + (value) => { + value.template.catalogTemplateLockHash = 'tpl_stale'; + }, + /catalog lock is stale/i, + ], + [ + 'prompt lock', + (value) => { + value.template.promptSettingsHash = 'prompt_stale'; + }, + /prompt\/settings lock is stale/i, + ], + ['canonical workflow', () => {}, /no current canonical workflow/i, { canonical: false }], + [ + 'output contract', + (value) => { + value.output.items[0].width += 16; + }, + /output contract mismatch for width/i, + ], + [ + 'immutable model', + (value) => { + value.modelRevision = 'model@main'; + }, + /missing modelRevision/, + ], + [ + 'resource identity', + (value) => { + value.execution.resourceCandidateId = null; + }, + /missing resourceCandidateId/, + ], + [ + 'timing', + (value) => { + value.execution.elapsedSeconds = null; + }, + /missing executionDurationSeconds/, + ], + [ + 'memory', + (value) => { + value.execution.peakMemoryBytes = 0; + }, + /missing peakMemoryBytes/, + ], + ]; + for (const [name, change, expected, options] of cases) { + await t.test(name, () => { + const directory = mkdtempSync(join(tmpdir(), 'modiff-template-qualification-blocked-negative-')); + try { + const candidate = structuredClone(provenance); + change(candidate); + const { result, registryPath } = qualificationFixtureProcess( + directory, + candidate, + ['--allow-blocked-probe'], + options, + ); + assert.notEqual(result.status, 0); + assert.match(result.stderr, expected); + assert.equal(existsSync(registryPath), false); + } finally { + disposeFixture(directory); + } + }); + } +}); + +test('template qualification rejects unknown or repeated lookup options', () => { + for (const argv of [['--include-planning'], ['--publish'], ['--allow-blocked-probe', '--allow-blocked-probe']]) { + const result = spawnSync(process.execPath, [SCRIPT, ...argv], { cwd: ROOT, encoding: 'utf8', timeout: 30_000 }); + assert.notEqual(result.status, 0); + assert.match(result.stderr, /only one optional --allow-blocked-probe argument/); + } +}); + +test('standalone canonical recording has an explicit evidence boundary without a public template lookup', () => { + const result = spawnSync(process.execPath, [SCRIPT, '--workflow', 'AllegroPipeline:text_to_video'], { + cwd: ROOT, + encoding: 'utf8', + timeout: 30_000, + env: { ...process.env, MODIFF_CANONICAL_WORKFLOW_EVIDENCE: '' }, + }); + assert.notEqual(result.status, 0); + assert.match(result.stderr, /MODIFF_CANONICAL_WORKFLOW_EVIDENCE/); + assert.doesNotMatch(result.stderr, /not in the runtime catalog/); +}); + +async function writeStandaloneEvidence(directory, { input = false, accounting = false, hinted = false } = {}) { + const nativeFixture = accounting ? mockedDdimAccountingFixture() : null; + const hintedFixture = hinted ? await hintedCanonicalHookCase() : null; + const backendRoot = join(directory, 'backend'); + const evidenceRoot = join(directory, 'originals'); + mkdirSync(evidenceRoot, { recursive: true }); + const write = (path, value) => { + mkdirSync(dirname(path), { recursive: true }); + const bytes = Buffer.isBuffer(value) ? value : Buffer.from(`${JSON.stringify(value, null, 2)}\n`); + writeFileSync(path, bytes); + return { + path: path.slice(evidenceRoot.length + 1).replaceAll('\\', '/'), + bytes: bytes.length, + sha256: createHash('sha256').update(bytes).digest('hex'), + }; + }; + const revision = nativeFixture?.apiGraph.nodes['node-01'].params.revision.value ?? 'a'.repeat(40); + const modelRepo = nativeFixture?.apiGraph.nodes['node-01'].params.model_id.value.value ?? 'synthetic/model'; + const value = (x, type = 'string') => ({ value: x, type }); + let graph = { + nodes: [ + { + id: 'loader', + type: 'custom', + position: { x: 0, y: 0 }, + data: { + module: 'modules.DiffusersImage', + action: 'LoadPipeline', + params: { + model_id: { ...value({ source: 'hub', value: 'synthetic/model' }), display: 'modelselect' }, + revision: value(revision), + dtype: value('float32'), + auto_offload: value(false, 'bool'), + offload_mode: value('none'), + pipeline: { display: 'output', type: 'pipeline' }, + }, + }, + }, + { + id: 'generate', + type: 'custom', + position: { x: 200, y: 0 }, + data: { + module: 'modules.DiffusersImage', + action: 'Generate', + params: { + pipeline: { display: 'input', type: 'pipeline' }, + prompt: value('Synthetic metadata-only protocol test'), + seed: { ...value({ value: 7, isRandom: false }, 'int'), display: 'random' }, + width: value(1, 'int'), + height: value(1, 'int'), + image: { display: 'output', type: 'image' }, + }, + }, + }, + { + id: 'preview', + type: 'custom', + position: { x: 400, y: 0 }, + data: { module: 'modules.Image', action: 'Preview', params: { image: { display: 'input', type: 'image' } } }, + }, + ], + edges: [ + { id: 'e1', source: 'loader', target: 'generate', sourceHandle: 'pipeline', targetHandle: 'pipeline' }, + { id: 'e2', source: 'generate', target: 'preview', sourceHandle: 'image', targetHandle: 'image' }, + ], + }; + if (nativeFixture) graph = nativeFixture.graph; + if (input) + graph.nodes[1].data.params.input_image = { + ...value(input === true ? '@data/images/synthetic.png' : input), + display: 'filebrowser', + }; + const manifest = { + id: accounting ? 'DDIMPipeline:unconditional_image' : 'SyntheticPipeline:text_to_image', + modelType: accounting ? 'DDIMPipeline' : 'SyntheticPipeline', + mode: accounting ? 'unconditional_image' : 'text_to_image', + sourceTemplateId: 'task-template:synthetic:text-to-image:v1', + graphPath: 'studio/synthetic.json', + graphHash: canonicalJsonHash(graph), + requiredArtifacts: [modelRepo], + }; + write(join(backendRoot, 'data/graphs', manifest.graphPath), graph); + write(join(backendRoot, 'data/workflow-library-manifest.json'), { workflows: [manifest] }); + write(join(backendRoot, 'data/model-artifact-catalog.json'), { + models: [{ modelType: manifest.modelType, baseRepo: modelRepo, baseRevision: revision }], + }); + write(join(backendRoot, 'data/template-authoring-specs.v1.json'), { + specifications: [ + { + id: 'template-authoring:synthetic', + canonicalWorkflowId: manifest.id, + modelType: manifest.modelType, + mode: manifest.mode, + canonicalGraph: { path: manifest.graphPath, sha256: manifest.graphHash }, + defaultsPlan: { sourceGraphSha256: manifest.graphHash }, + artifactPlan: { requiredArtifacts: manifest.requiredArtifacts }, + outputPlan: { minimumAssetCount: 1, mediaKinds: ['image'] }, + }, + ], + }); + let [api] = await exportCanonicalWorkflowGraphs(ROOT, [graph]); + if (nativeFixture) + assert.equal(canonicalGraphIdentity(api).hash, canonicalGraphIdentity(nativeFixture.apiGraph).hash); + else + api.runtimeHints = { + modelType: manifest.modelType, + dtype: 'float32', + offloadMode: 'none', + autoOffload: false, + quantizationMode: 'none', + }; + if (hintedFixture) api = hintedFixture.apiGraph; + const source = { gitCommit: 'b'.repeat(40), files: [{ path: 'main.py', sha256: 'c'.repeat(64) }] }; + source.fingerprint = sha256Value('backend-source-v1', source); + const runtime = { + fingerprint: 'sha256:synthetic-runtime', + packages: { torch: 'synthetic-test-only' }, + torch: { version: 'synthetic-test-only' }, + work_dir: '/synthetic/work', + data_dir: '/synthetic/data', + backendSource: { + schemaVersion: 1, + claim: 'process_start_backend_source_identity', + gitCommit: source.gitCommit, + fingerprint: source.fingerprint, + fileCount: 1, + capturedAt: '2026-10-27T00:00:00.000Z', + }, + }; + const form = hintedFixture?.executedOutput.formSnapshot ?? { + modelType: manifest.modelType, + mode: manifest.mode, + prompt: 'Synthetic metadata-only protocol test', + seed: 7, + }; + const task = { + ...(hintedFixture ? hintedFixture.executionReceipt : {}), + task_id: nativeFixture?.receipt.taskId ?? 'synthetic-task', + status: 'completed', + attempt_index: 0, + started_at: 100, + completed_at: 101, + runtimeFingerprint: runtime, + runtimeMeasurement: { elapsedSeconds: 1, processRssBytes: 4096 }, + }; + // A one-pixel PNG fixture, not generated model output. + const media = write( + join(evidenceRoot, 'output.png'), + Buffer.from( + 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+jhvcAAAAASUVORK5CYII=', + 'base64', + ), + ); + const output = { + id: 'synthetic-output', + taskId: task.task_id, + clientRunId: hintedFixture?.executedOutput.clientRunId ?? 'synthetic-run', + runInputHash: hintedFixture?.executedOutput.runInputHash ?? 'run_synthetic', + workflowTabId: hintedFixture?.executedOutput.workflowTabId ?? 'synthetic-owned', + attemptIndex: 0, + nodeId: nativeFixture?.receipt.nodeId ?? 'preview', + fieldKey: 'image', + formSnapshot: form, + graphSnapshot: hintedFixture?.executedOutput.graphSnapshot ?? graph, + apiGraphSnapshot: api, + mediaHash: `sha256:bytes:${media.sha256}`, + mediaItems: [ + { + backendPath: '@data/studio/outputs/synthetic.png', + mediaHash: `sha256:bytes:${media.sha256}`, + byteSize: media.bytes, + }, + ], + resolvedExecutionInputs: nativeFixture?.receipt ?? { + source: 'backend-execution', + taskId: task.task_id, + attemptIndex: 0, + truncated: false, + uncapturedNodeIds: [], + nodes: Object.entries(api.nodes).map(([nodeId, node]) => ({ + nodeId, + module: node.module, + action: node.action, + fields: Object.fromEntries( + Object.entries(node.params) + .filter(([, p]) => Object.hasOwn(p, 'value') && !p.sourceId) + .map(([key, p]) => [ + key, + { source: 'literal', value: p.value?.source === 'hub' ? p.value.value : p.value }, + ]), + ), + })), + }, + }; + const creator = { + manifest: { packageType: 'modiff-workflow-share' }, + metadata: { studio: form }, + graph, + apiGraph: api, + }; + const outputPackage = { manifest: { packageType: 'modiff-output-package' }, apiGraph: api, latestOutput: output }; + const descriptor = { + schemaVersion: 1, + format: 'modiff.canonical-workflow-evidence.v1', + workflowId: manifest.id, + creatorPackage: write(join(evidenceRoot, 'creator.json'), creator), + outputPackage: write(join(evidenceRoot, 'output.json'), outputPackage), + runDetail: write(join(evidenceRoot, 'run.json'), { + workflow_id: output.workflowTabId, + task, + outputs: [output], + ...(hintedFixture ? { workflow_title: task.workflow_title, workflow_snapshot: task.workflow_snapshot } : {}), + }), + ...(hintedFixture + ? { + graphCompleted: write(join(evidenceRoot, 'graph-completed.json'), { + ...hintedFixture.canonicalAccountingProof.graphCompleted, + runtimeFingerprint: runtime, + runtimeMeasurement: task.runtimeMeasurement, + }), + } + : {}), + nodes: write(join(evidenceRoot, 'nodes.json'), { + nodes: Object.fromEntries( + Object.values(api.nodes).map((node) => [ + `${node.module}.${node.action}`, + { module: node.module, action: node.action, params: {} }, + ]), + ), + }), + backendSourceBefore: write(join(evidenceRoot, 'source-before.json'), { identity: source }), + backendSourceAfter: write(join(evidenceRoot, 'source-after.json'), { identity: source }), + modelObservations: [ + write(join(evidenceRoot, 'models.json'), { + error: false, + models: [ + { + installed: true, + repoId: modelRepo, + selectedRevision: revision, + modelRevision: `${modelRepo}@${revision}`, + fingerprint: 'sha256:synthetic-model', + revisions: [], + }, + ], + }), + ], + inputs: input ? [{ role: 'input_image', sourceValue: '@data/images/synthetic.png', file: media }] : [], + outputs: [{ backendPath: output.mediaItems[0].backendPath, mediaType: 'image', file: media }], + }; + const evidencePath = join(evidenceRoot, 'input.json'); + write(evidencePath, descriptor); + return { backendRoot, evidenceRoot, evidencePath, descriptor, manifest, write }; +} + +test('canonical recorder retains original packages and revalidates exact physical evidence through the same projection reader', async () => { + const directory = mkdtempSync(join(tmpdir(), 'modiff-template-qualification-canonical-')); + try { + const fixture = await writeStandaloneEvidence(directory); + const original = readFileSync(join(fixture.evidenceRoot, 'output.json')); + const result = spawnSync(process.execPath, [SCRIPT, '--workflow', fixture.manifest.id], { + cwd: ROOT, + encoding: 'utf8', + timeout: 30_000, + env: { + ...process.env, + MODIFF_BACKEND_DIR: fixture.backendRoot, + MODIFF_CANONICAL_WORKFLOW_EVIDENCE: fixture.evidencePath, + }, + }); + assert.equal(result.status, 0, result.stderr); + const registryPath = join( + fixture.backendRoot, + 'data/qualification/release/canonical-workflow-run-receipts.v1.json', + ); + const registry = JSON.parse(readFileSync(registryPath, 'utf8')); + assert.equal(registry.receipts.length, 1); + const receipt = registry.receipts[0]; + assert.equal(receipt.workflowId, fixture.manifest.id); + assert.deepEqual(receipt.qualificationClaims, { + publicTemplate: false, + qualityApproved: false, + rightsApproved: false, + hardwareQualified: false, + }); + const retained = join(fixture.backendRoot, receipt.evidencePath); + assert.deepEqual(readFileSync(join(dirname(retained), 'output.json')), original); + const repeated = await readCanonicalWorkflowEvidence({ + clientRoot: ROOT, + backendRoot: fixture.backendRoot, + workflowId: fixture.manifest.id, + evidencePath: retained, + }); + assert.equal(repeated.receipt.outputHash, receipt.outputHash); + assert.equal(repeated.receipt.authoringHash, receipt.authoringHash); + assert.deepEqual(repeated.descriptorBytes, readFileSync(fixture.evidencePath)); + assert.equal( + existsSync(join(fixture.backendRoot, 'data/qualification/release/template-run-receipts.v2.json')), + false, + ); + const bytes = readFileSync(join(dirname(retained), 'output.png')); + bytes[bytes.length - 1] ^= 1; + writeFileSync(join(dirname(retained), 'output.png'), bytes); + await assert.rejects( + readCanonicalWorkflowEvidence({ + clientRoot: ROOT, + backendRoot: fixture.backendRoot, + workflowId: fixture.manifest.id, + evidencePath: retained, + }), + /hash differs/, + ); + } finally { + disposeFixture(directory); + } +}); + +test('actual mocked DDIM accounting records through the shared factory and revalidates from retained originals', async () => { + const directory = mkdtempSync(join(tmpdir(), 'modiff-template-qualification-canonical-ddim-')); + try { + const fixture = await writeStandaloneEvidence(directory, { accounting: true }); + const original = readFileSync(join(fixture.evidenceRoot, 'output.json')); + const result = spawnSync(process.execPath, [SCRIPT, '--workflow', fixture.manifest.id], { + cwd: ROOT, + encoding: 'utf8', + timeout: 30_000, + env: { + ...process.env, + MODIFF_BACKEND_DIR: fixture.backendRoot, + MODIFF_CANONICAL_WORKFLOW_EVIDENCE: fixture.evidencePath, + }, + }); + assert.equal(result.status, 0, result.stderr); + const registry = JSON.parse( + readFileSync( + join(fixture.backendRoot, 'data/qualification/release/canonical-workflow-run-receipts.v1.json'), + 'utf8', + ), + ); + assert.equal(registry.receipts.length, 1); + const retained = join(fixture.backendRoot, registry.receipts[0].evidencePath); + assert.deepEqual(readFileSync(join(dirname(retained), 'output.json')), original); + const resultAgain = await readCanonicalWorkflowEvidence({ + clientRoot: ROOT, + backendRoot: fixture.backendRoot, + workflowId: fixture.manifest.id, + evidencePath: retained, + }); + assert.equal(resultAgain.provenance.graph.executionPlan.source, 'executed-canonical-accounting-v1'); + assert.equal(resultAgain.provenance.graph.executionPlan.device, 'cuda:0'); + assert.equal(resultAgain.provenance.graph.executionPlan.deviceMap, 'cuda'); + assert.equal( + resultAgain.provenance.execution.resourceCandidateId, + 'manual-resource-v1:DDIMPipeline|float32|none|none', + ); + // Registry adds retained-file references to the same receipt identity. + for (const [key, value] of Object.entries(resultAgain.receipt)) + assert.deepEqual(registry.receipts[0][key], value, key); + assert.ok(Object.values(resultAgain.receipt.qualificationClaims).every((value) => value === false)); + assert.equal(JSON.parse(original).apiGraph.runtimeHints, undefined); + const validation = { + target: resultAgain.receipt, + expectedApiGraph: mockedDdimAccountingFixture().apiGraph, + creator: JSON.parse(readFileSync(join(fixture.evidenceRoot, 'creator.json'), 'utf8')), + outputPackage: JSON.parse(original), + run: JSON.parse(readFileSync(join(fixture.evidenceRoot, 'run.json'), 'utf8')), + provenance: resultAgain.provenance, + }; + assert.deepEqual(validateCanonicalWorkflowEvidence(validation), resultAgain.receipt); + const wrongOwner = structuredClone(validation); + wrongOwner.outputPackage.latestOutput.nodeId = wrongOwner.run.outputs[0].nodeId = 'node-04'; + assert.throws(() => validateCanonicalWorkflowEvidence(wrongOwner), /output owner differs/); + const inventedHints = structuredClone(validation); + inventedHints.run.task.runtimeHints = { autoResourceCandidateId: 'invented' }; + assert.throws(() => validateCanonicalWorkflowEvidence(inventedHints), /unreviewed runtime hints/); + const omitted = structuredClone(validation); + for (const output of [omitted.outputPackage.latestOutput, omitted.run.outputs[0]]) { + delete output.resolvedExecutionInputs.fieldAccountingStatus; + for (const row of output.resolvedExecutionInputs.nodes) delete row.fieldAccounting; + } + assert.throws(() => validateCanonicalWorkflowEvidence(omitted), /Consumed literal is missing/); + } finally { + disposeFixture(directory); + } +}); + +test('hinted DDIM descriptor retains and revalidates the hash-bound original completion without adding GET hints', async () => { + const directory = mkdtempSync(join(tmpdir(), 'modiff-template-qualification-ddim-hints-')); + try { + const fixture = await writeStandaloneEvidence(directory, { accounting: true, hinted: true }); + const completionPath = join(fixture.evidenceRoot, 'graph-completed.json'); + const runPath = join(fixture.evidenceRoot, 'run.json'); + const originals = [fixture.evidencePath, completionPath, runPath].map((path) => readFileSync(path)); + const readEvidence = () => + readCanonicalWorkflowEvidence({ + clientRoot: ROOT, + backendRoot: fixture.backendRoot, + workflowId: fixture.manifest.id, + evidencePath: fixture.evidencePath, + }); + const result = await readEvidence(); + assert.equal(result.provenance.graph.executionPlan.runtimeHintAccounting.policy, 'canonical-ddim-runtime-hints-v1'); + assert.ok( + result.retainedFiles.some( + (ref) => ref.path === 'graph-completed.json' && ref.sha256 === fixture.descriptor.graphCompleted.sha256, + ), + ); + assert.ok(Object.values(result.receipt.qualificationClaims).every((value) => value === false)); + assert.equal(JSON.parse(readFileSync(runPath, 'utf8')).task.runtimeHints, undefined); + [fixture.evidencePath, completionPath, runPath].forEach((path, index) => + assert.deepEqual(readFileSync(path), originals[index]), + ); + const descriptor = structuredClone(fixture.descriptor); + delete descriptor.graphCompleted; + fixture.write(fixture.evidencePath, descriptor); + await assert.rejects(readEvidence, /completion/); + fixture.write(fixture.evidencePath, fixture.descriptor); + writeFileSync(completionPath, Buffer.concat([originals[1], Buffer.from(' ')])); + await assert.rejects(readEvidence, /size|hash/); + writeFileSync(completionPath, originals[1]); + const wrongTask = JSON.parse(originals[1]); + wrongTask.task_id = 'another-task'; + descriptor.graphCompleted = fixture.write(completionPath, wrongTask); + fixture.write(fixture.evidencePath, descriptor); + await assert.rejects(readEvidence, /another task/); + } finally { + disposeFixture(directory); + } +}); + +test('canonical descriptor rejects top-level loop and service authority even when every original API snapshot agrees', async () => { + const directory = mkdtempSync(join(tmpdir(), 'modiff-template-qualification-authority-')); + try { + const fixture = await writeStandaloneEvidence(directory, { accounting: true, hinted: true }); + const original = Object.fromEntries( + ['creator', 'output', 'run'].map((name) => [ + name, + JSON.parse(readFileSync(join(fixture.evidenceRoot, `${name}.json`), 'utf8')), + ]), + ); + const authorities = { + loops: [ + { id: 'unreviewed-loop', bodyNodeIds: ['node-05'], resultNodeId: 'node-05', iterations: 2, maxRetries: 1 }, + ], + servicePackage: { package: {}, values: {} }, + futureExecutionAuthority: {}, + }; + for (const [key, authority] of Object.entries(authorities)) { + const bodies = structuredClone(original); + for (const graph of [ + bodies.creator.apiGraph, + bodies.output.apiGraph, + bodies.output.latestOutput.apiGraphSnapshot, + bodies.run.outputs[0].apiGraphSnapshot, + ]) + graph[key] = structuredClone(authority); + const descriptor = structuredClone(fixture.descriptor); + descriptor.creatorPackage = fixture.write(join(fixture.evidenceRoot, 'creator.json'), bodies.creator); + descriptor.outputPackage = fixture.write(join(fixture.evidenceRoot, 'output.json'), bodies.output); + descriptor.runDetail = fixture.write(join(fixture.evidenceRoot, 'run.json'), bodies.run); + fixture.write(fixture.evidencePath, descriptor); + await assert.rejects( + () => + readCanonicalWorkflowEvidence({ + clientRoot: ROOT, + backendRoot: fixture.backendRoot, + workflowId: fixture.manifest.id, + evidencePath: fixture.evidencePath, + }), + /Unsupported canonical graph/, + ); + } + const creatorOnly = structuredClone(original); + creatorOnly.creator.apiGraph.loops = authorities.loops; + const descriptor = structuredClone(fixture.descriptor); + descriptor.creatorPackage = fixture.write(join(fixture.evidenceRoot, 'creator.json'), creatorOnly.creator); + descriptor.outputPackage = fixture.write(join(fixture.evidenceRoot, 'output.json'), creatorOnly.output); + descriptor.runDetail = fixture.write(join(fixture.evidenceRoot, 'run.json'), creatorOnly.run); + fixture.write(fixture.evidencePath, descriptor); + await assert.rejects( + () => + readCanonicalWorkflowEvidence({ + clientRoot: ROOT, + backendRoot: fixture.backendRoot, + workflowId: fixture.manifest.id, + evidencePath: fixture.evidencePath, + }), + /Unsupported canonical graph/, + ); + } finally { + disposeFixture(directory); + } +}); + +test('canonical input bytes cannot be authenticated by a path and post-run copy alone', async () => { + for (const input of [true, 'https://example.invalid/image.png', 'C:/runtime/image.png', 'relative/image.png']) { + const directory = mkdtempSync(join(tmpdir(), 'modiff-template-qualification-input-hold-')); + try { + const fixture = await writeStandaloneEvidence(directory, { input }); + await assert.rejects( + readCanonicalWorkflowEvidence({ + clientRoot: ROOT, + backendRoot: fixture.backendRoot, + workflowId: fixture.manifest.id, + evidencePath: fixture.evidencePath, + }), + /Input-backed canonical qualification is unsupported/, + ); + assert.equal(existsSync(join(fixture.backendRoot, 'data/qualification/release')), false); + } finally { + disposeFixture(directory); + } + } +}); + +test('canonical evidence paths reject traversal, aliases, absolute paths and missing measured bodies before reading', () => { + const directory = mkdtempSync(join(tmpdir(), 'modiff-template-qualification-paths-')); + try { + const file = join(directory, 'safe.json'); + writeFileSync(file, '{}'); + const ref = { path: 'safe.json', bytes: 2, sha256: createHash('sha256').update('{}').digest('hex') }; + assert.equal(readCanonicalEvidenceFile(directory, ref).bytes.toString(), '{}'); + for (const path of ['../outside.json', './safe.json', 'nested/../safe.json', file, 'nested\\safe.json']) { + assert.throws(() => readCanonicalEvidenceFile(directory, { ...ref, path }), /canonical|relative/); + } + assert.throws(() => readCanonicalEvidenceFile(directory, { ...ref, bytes: 3 }), /size\/type/); + assert.throws(() => readCanonicalEvidenceFile(directory, { ...ref, sha256: '0'.repeat(64) }), /hash differs/); + mkdirSync(join(directory, 'outside')); + symlinkSync(join(directory, 'outside'), join(directory, 'linked'), 'junction'); + assert.throws(() => canonicalEvidenceWritePath(directory, 'linked/receipt.json'), /symlinks/); + assert.equal( + canonicalEvidenceWritePath(directory, 'new/receipt.json'), + join(realpathSync(directory), 'new/receipt.json'), + ); + } finally { + disposeFixture(directory); + } +}); + +test('canonical retention rejects dangling registry links and directory links before writing', async (t) => { + const directory = mkdtempSync(join(tmpdir(), 'modiff-template-qualification-dangling-')); + try { + const root = join(directory, 'backend'); + const outside = join(directory, 'outside'); + mkdirSync(root); + mkdirSync(outside); + const cases = [ + { + name: 'registry leaf', + link: 'registry.json', + target: join(outside, 'missing-registry.json'), + type: 'file', + suffix: '', + }, + { + name: 'directory ancestor', + link: 'retained', + target: join(outside, 'missing-directory'), + type: 'junction', + suffix: '/evidence.json', + }, + ]; + for (const row of cases) { + await t.test(row.name, () => { + const link = join(root, row.link); + symlinkSync(row.target, link, row.type); + assert.equal(existsSync(link), false, 'This reproduction needs a dangling link.'); + assert.equal(lstatSync(link).isSymbolicLink(), true); + assert.throws(() => canonicalEvidenceWritePath(root, `${row.link}${row.suffix}`), /Retention symlinks/); + assert.equal(existsSync(row.target), false, 'No target outside the retained root may be created.'); + }); + } + } finally { + disposeFixture(directory); + } }); diff --git a/scripts/template-quality.test.mjs b/scripts/template-quality.test.mjs index 0b0564ec..d966a4d6 100644 --- a/scripts/template-quality.test.mjs +++ b/scripts/template-quality.test.mjs @@ -9,6 +9,7 @@ const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); let server; let qualityModule; let templatesModule; +let retainedRecipeIds; before(async () => { server = await createServer({ @@ -24,6 +25,8 @@ before(async () => { }); qualityModule = await server.ssrLoadModule('/src/studio/templateQuality.ts'); templatesModule = await server.ssrLoadModule('/src/studio/templates.ts'); + const { APPROVED_RETAINED_BATCH } = await server.ssrLoadModule('/scripts/retained-gallery-recipes.ts'); + retainedRecipeIds = new Set(APPROVED_RETAINED_BATCH.map(({ template }) => template.id)); }); after(async () => { @@ -45,10 +48,125 @@ function sampleTemplate(overrides = {}) { }; } -test('the complete runtime template catalog passes the modality-aware semantic audit', () => { +test('the contact-sheet identity brief permits the rear-view exit and declares four panels', () => { + const template = templatesModule.STUDIO_TEMPLATES.find((item) => item.id === 'z_image_cinematic_contact_sheet'); + assert.ok(template); + assert.match(template.prompt, /first three frames where his face is visible/i); + assert.doesNotMatch(template.prompt, /same face[^.]*all four frames/i); + const exit = template.prompt.split('Frame four, lower right:')[1]?.split('Each frame')[0]; + assert.match(exit, /from directly behind/i); + assert.match(exit, /back of his head/i); + assert.match(exit, /strides away from camera/i); + assert.doesNotMatch(template.description, /3x3/i); + assert.equal(template.example.lockedSeed, 4301); + assert.equal(template.example.expectedOutput.width, 1344); + assert.equal(template.example.expectedOutput.height, 768); +}); + +test('the accepted material-transfer revision preserves the bottle and uses an ordered material-only strip', () => { + const template = templatesModule.STUDIO_TEMPLATES.find((item) => item.id === 'flux_kontext_multi_reference'); + assert.match(template.prompt, /ASTERMIST and LAVENDER SLEEP SPRAY/); + assert.match(template.description, /material-only reference strip/); + assert.equal(template.inputBindings.length, 1); + const assets = template.inputBindings[0].defaultAssets; + assert.equal(assets.length, 2); + assert.equal( + assets[0].runtimeSha256, + 'sha256:bytes:a7b61f36043354596eb01e702474300b222cb32e304bcf259506cad03917ce9b', + ); + assert.equal( + assets[1].runtimeSha256, + 'sha256:bytes:70c74691e2bcd7cdb352b7e64e5af5a1a7f01d77112d32a8edadc0060a95ef34', + ); + assert.equal(template.example.lockedSeed, 8407); +}); + +test('reviewed FLUX3 blank conditioning is scoped to its exact public profile', () => { + for (const [id, declaration] of [ + ['flux3_klein_fp8r512_text_to_image', 'flux3-distilled-no-negative-input'], + ['flux3_klein_base_fp8r512_text_to_image', 'flux3-base-empty-negative-recipe'], + ]) { + const template = templatesModule.STUDIO_TEMPLATES.find((item) => item.id === id); + assert.ok(template); + assert.equal(qualityModule.auditTemplateQuality(template).negative.policy.declarationId, declaration); + const foreign = { + ...template, + executionSelection: { ...template.executionSelection, executionProfileId: 'unreviewed-profile' }, + }; + assert.ok( + qualityModule.auditTemplateQuality(foreign).issues.some((issue) => issue.code === 'blank_negative_not_allowed'), + ); + } +}); + +test('the ACE Base source-cover contract keeps blank negative input without claiming distilled CFG', () => { + const template = templatesModule.STUDIO_TEMPLATES.find((item) => item.id === 'ace_step_audio_variation'); + assert.equal(template.example.lockedSettings.guidanceScale, 7); + const audit = qualityModule.auditTemplateQuality(template); + assert.equal(audit.passed, true); + assert.equal(audit.negative.policy.declarationId, 'ace-no-negative-input'); + assert.doesNotMatch(audit.negative.policy.reason, /guidance-distilled|CFG 1/); + assert.equal( + qualityModule.getTemplateNegativePolicy({ ...template, modelType: 'StableAudioPipeline' }).requirement, + 'required', + ); +}); + +test('literal layout prompts require a complete bounded caption, box and visual description', () => { + const template = templatesModule.STUDIO_TEMPLATES.find( + (item) => item.id === 'flux3_klein_fp8r512_raw_coordinate_prompt', + ); + assert.ok(template); + assert.equal(template.promptQualityPolicy, 'raw_layout_reference'); + assert.equal(qualityModule.auditTemplateQuality(template).passed, true); + const caption = 'A still life with .'; + const item = { id: 'apple_1', bbox: [250, 125, 750, 875], desc: 'A red apple, with a green leaf.' }; + const invalid = [ + 'A still life with .\n' + JSON.stringify([item]), + caption + '\n' + JSON.stringify([{ ...item, bbox: [750, 125, 250, 875] }]), + caption + '\n' + JSON.stringify([{ ...item, bbox: [250, 125, 1001, 875] }]), + caption + '\n' + JSON.stringify([{ ...item, bbox: [250, 125, 750] }]), + caption + '\n' + JSON.stringify([{ ...item, bbox: [250, 125, 750, 875.5] }]), + caption + '\n' + JSON.stringify([{ ...item, desc: 'x' }]), + caption + '\n' + JSON.stringify([{ ...item, extra: 'undeclared' }]), + caption + '\n' + JSON.stringify([item, item]), + caption + '\n[]', + caption + '\n' + JSON.stringify([item]) + '\ntrailing text', + ]; + for (const prompt of invalid) { + assert.equal(qualityModule.auditTemplateQuality({ ...template, prompt }).passed, false, prompt); + } + const untreated = caption + '\n' + JSON.stringify([{ ...item, desc: 'An apple resting beside a leaf.' }]); + const missingTreatment = qualityModule.auditTemplateQuality({ ...template, prompt: untreated }); + assert.ok(missingTreatment.issues.some((issue) => issue.semanticGroup === 'visual_treatment')); +}); + +test('a habitat is concrete focal content without rewriting an accepted prompt', () => { + const template = templatesModule.STUDIO_TEMPLATES.find((item) => item.id === 'flux3_klein_fp8r512_lora_style'); + const audit = qualityModule.auditTemplateQuality(template); + assert.ok(audit.matchedSemanticGroups.includes('focal_content')); + assert.equal(audit.passed, true); +}); + +test('the complete catalog audits authored prompts and reports backend defaults as unresolved', () => { const audits = qualityModule.auditTemplateCatalog(templatesModule.STUDIO_TEMPLATES); + const unresolved = audits.filter((audit) => audit.promptResolution === 'unresolved_backend_default'); + assert.deepEqual( + unresolved.map((audit) => audit.templateId), + ['cosmos3_super_text_to_image'], + ); + for (const audit of unresolved) { + assert.equal(audit.passed, false); + assert.deepEqual( + audit.issues.map((issue) => issue.code), + ['unresolved_backend_default'], + ); + } const failures = audits - .filter((audit) => !audit.passed) + .filter((audit) => !audit.passed && audit.promptResolution !== 'unresolved_backend_default') + // Retained recipes keep the approved conditioning byte for byte. Their + // media, prompt and settings bindings are verified by the retained tests. + .filter(({ templateId }) => !retainedRecipeIds.has(templateId)) .map((audit) => `${audit.templateId}: ${audit.issues.map((issue) => issue.message).join(' | ')}`); assert.deepEqual(failures, []); @@ -61,12 +179,100 @@ test('the complete runtime template catalog passes the modality-aware semantic a 'image_outpaint', 'image_control', 'image_layers', + 'image_upscale', + 'depth_estimation', + 'text_generation', + 'speech_recognition', 'video', 'audio', ]), ); }); +test('depth, upscale, and text audits follow the input contracts of their own tasks', () => { + const depth = templatesModule.STUDIO_TEMPLATES.find((item) => item.id === 'marigold_depth_synthetic_ramp'); + const upscale = templatesModule.STUDIO_TEMPLATES.find((item) => item.id === 'spandrel_x2_synthetic_gradient'); + const text = templatesModule.STUDIO_TEMPLATES.find((item) => item.id === 'smollm2_rain_gauge'); + assert.equal(qualityModule.auditTemplateQuality(depth).passed, true); + assert.equal(qualityModule.auditTemplateQuality(upscale).passed, true); + assert.equal(qualityModule.auditTemplateQuality(text).passed, true); + assert.deepEqual( + qualityModule.auditTemplateQuality({ ...depth, prompt: 'Estimate depth.' }).issues.map((issue) => issue.code), + ['unsupported_prompt_input'], + ); + assert.deepEqual( + qualityModule.auditTemplateQuality({ ...upscale, prompt: 'Upscale this image.' }).issues.map((issue) => issue.code), + ['unsupported_prompt_input'], + ); + assert.deepEqual( + qualityModule.auditTemplateQuality({ ...text, prompt: '' }).issues.map((issue) => issue.code), + ['missing_semantic_group'], + ); +}); + +test('the Whisper Tiny audio-to-text template needs an audio source and no prompt', () => { + const template = templatesModule.STUDIO_TEMPLATES.find((item) => item.id === 'whisper_tiny_blue_cup_transcription'); + assert.ok(template); + const audit = qualityModule.auditTemplateQuality(template); + assert.equal(audit.kind, 'speech_recognition'); + assert.deepEqual(audit.requiredSemanticGroups, []); + assert.equal(audit.passed, true); + assert.deepEqual( + qualityModule + .auditTemplateQuality({ ...template, prompt: 'Transcribe the uploaded audio.' }) + .issues.map((issue) => issue.code), + ['unsupported_prompt_input'], + ); +}); + +test('the LCM Edit audit recognizes a target caption with a bound source and no negative input', () => { + const template = templatesModule.STUDIO_TEMPLATES.find((item) => item.id === 'lcm_dawn_alpine_lake'); + assert.ok(template); + const audit = qualityModule.auditTemplateQuality(template); + assert.equal(audit.passed, true); + assert.equal(audit.negative.policy.declarationId, 'lcm-edit-no-negative-input'); + assert.deepEqual(audit.matchedSemanticGroups, ['source_role', 'transformation', 'preservation', 'integration']); + + const missingSource = qualityModule.auditTemplateQuality({ ...template, inputBindings: [] }); + assert.ok(missingSource.issues.some((issue) => issue.semanticGroup === 'source_role')); + const noTarget = qualityModule.auditTemplateQuality({ + ...template, + prompt: 'Photograph of this alpine lake. Keep the shoreline, rocky foreground and pine forest composition.', + }); + assert.ok(noTarget.issues.some((issue) => issue.semanticGroup === 'transformation')); + const instructionEdit = qualityModule.auditTemplateQuality({ + ...template, + modelType: 'QwenImageEditModularPipeline', + }); + assert.ok(instructionEdit.issues.some((issue) => issue.semanticGroup === 'transformation')); + assert.ok(instructionEdit.issues.some((issue) => issue.code === 'blank_negative_not_allowed')); + assert.equal(qualityModule.getTemplateNegativePolicy({ ...template, mode: 'text_to_image' }).requirement, 'required'); +}); + +test('the retained Sana Sprint Edit requires a target caption and exactly one required source', () => { + const template = templatesModule.STUDIO_TEMPLATES.find((item) => item.id === 'sana_sprint_monochrome_tiger'); + assert.ok(template); + const audit = qualityModule.auditTemplateQuality(template); + assert.equal(audit.passed, true); + assert.equal(audit.negative.policy.declarationId, 'sana-sprint-edit-no-negative-input'); + assert.deepEqual(audit.matchedSemanticGroups, ['source_role', 'focal_content', 'spatial_design', 'visual_treatment']); + const noSource = qualityModule.auditTemplateQuality({ ...template, inputBindings: [] }); + assert.ok(noSource.issues.some((issue) => issue.semanticGroup === 'source_role')); + const noCaption = qualityModule.auditTemplateQuality({ ...template, prompt: '' }); + assert.ok(noCaption.issues.some((issue) => issue.semanticGroup === 'visual_treatment')); + assert.equal(qualityModule.getTemplateNegativePolicy({ ...template, mode: 'text_to_image' }).requirement, 'required'); +}); + +test('the Cosmos publisher blank-negative declaration does not extend to other same-class recipes', () => { + const template = templatesModule.STUDIO_TEMPLATES.find((item) => item.id === 'cosmos3_super_text_to_image'); + assert.equal(qualityModule.getTemplateNegativePolicy(template).declarationId, 'cosmos3-super-publisher-conditioning'); + const other = { + ...template, + executionSelection: { ...template.executionSelection, executionProfileId: 'another-profile' }, + }; + assert.equal(qualityModule.getTemplateNegativePolicy(other).requirement, 'required'); +}); + test('semantic coverage rejects long but content-free prompt padding', () => { const audit = qualityModule.auditTemplateQuality( sampleTemplate({ @@ -151,3 +357,35 @@ test('blank negative prompts are accepted only by a declared model-aware policy' false, ); }); + +test('backend-owned prompts remain unresolved until their actual default is supplied to the semantic audit', () => { + const template = sampleTemplate({ prompt: '', executionSelection: { backendDefaultInputs: ['prompt'] } }); + const unresolved = qualityModule.auditTemplateQuality(template); + assert.equal(unresolved.promptResolution, 'unresolved_backend_default'); + assert.equal(unresolved.passed, false); + assert.deepEqual( + unresolved.issues.map((issue) => issue.code), + ['unresolved_backend_default'], + ); + const resolved = qualityModule.auditTemplateQuality(template, { prompt: sampleTemplate().prompt }); + assert.equal(resolved.promptResolution, 'backend_default'); + assert.equal(resolved.passed, true); + const weak = qualityModule.auditTemplateQuality(template, { prompt: 'high quality '.repeat(100) }); + assert.equal(weak.passed, false); + assert.equal( + weak.issues.some((issue) => issue.code === 'missing_semantic_group'), + true, + ); + const undeclared = qualityModule.auditTemplateQuality(sampleTemplate({ prompt: '' }), { + prompt: sampleTemplate().prompt, + }); + assert.equal(undeclared.passed, false, 'A caller cannot replace an undeclared empty template prompt.'); + const authored = qualityModule.auditTemplateQuality( + sampleTemplate({ + executionSelection: { backendDefaultInputs: ['prompt'] }, + }), + { prompt: 'high quality' }, + ); + assert.equal(authored.promptResolution, 'template'); + assert.equal(authored.passed, true, 'Authored text takes precedence over a fresh backend default.'); +}); diff --git a/scripts/template-recipe-history.test.mjs b/scripts/template-recipe-history.test.mjs new file mode 100644 index 00000000..01d27678 --- /dev/null +++ b/scripts/template-recipe-history.test.mjs @@ -0,0 +1,314 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { mkdirSync, mkdtempDisposableSync, readFileSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { resolve } from 'node:path'; +import test from 'node:test'; +import { createServer } from 'vite'; +import { canonicalJsonHash, decodedAudiovisualMediaHash } from './template-gallery-harness.mjs'; +import { verifyTemplateRecipeRecords } from './template-recipe-records.mjs'; + +const root = resolve(import.meta.dirname, '..'); +const server = await createServer({ + root, + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', +}); +const exactness = await server.ssrLoadModule('/src/studio/templateExactness.ts'); +const { STUDIO_TEMPLATES: templates } = await server.ssrLoadModule('/src/studio/templates.ts'); +test.after(() => server.close()); + +const manifest = JSON.parse(readFileSync(resolve(root, 'public/template-gallery/manifest.json'), 'utf8')); +const history = JSON.parse(readFileSync(resolve(root, 'config/template-recipe-history.v1.json'), 'utf8')); +const selectionIndex = JSON.parse(readFileSync(resolve(root, 'src/studio/templateHistoricalSelections.json'), 'utf8')); + +test('an empty active historical ledger is valid after all examples have current replacements', () => { + const body = { + schemaVersion: 1, + format: 'modiff.gallery.recipe-history.v1', + source: { repository: 'example/gallery', revision: 'a'.repeat(40) }, + records: [], + }; + const accepted = { ...body, recordsHash: canonicalJsonHash(body) }; + assert.deepEqual(verifyTemplateRecipeRecords(accepted, { runtime: {}, manifest: {} }), []); + for (const changed of [ + { ...accepted, recordsHash: 'invalid' }, + { ...accepted, records: null }, + { ...accepted, source: { ...body.source, revision: 'main' } }, + ]) { + assert.throws(() => verifyTemplateRecipeRecords(changed, {}), /invalid/); + } +}); + +test('registered native video recipe identities survive presentation-only regrouping', () => { + const originalNote = + 'Encode Inputs reuses official text encoding and owns source media; the official Denoise call prepares media latents and Video Output decodes and exports the matching result.'; + for (const id of ['ltx_video_text_to_video', 'ltx_video_image_to_video', 'ltx_video_multi_reference']) { + const template = templates.find((item) => item.id === id); + const entry = manifest.examples.find((item) => item.templateId === id); + const registered = { + ...template, + executionSelection: { ...template.executionSelection, note: originalNote }, + }; + assert.equal(exactness.getTemplateLockHash(registered, entry.modelRevision), entry.templateLockHash, id); + assert.deepEqual(template.executionSelection, registered.executionSelection, id); + assert.equal(exactness.findManifestEntry(template, manifest), entry, id); + for (const patch of [ + { note: originalNote + ' changed' }, + { executionProfileId: 'different-video:direct' }, + { authoringRecipeId: 'different-recipe:v1' }, + ]) { + assert.equal( + exactness.findManifestEntry( + { ...template, executionSelection: { ...template.executionSelection, ...patch } }, + manifest, + ), + undefined, + `${id}: altered descriptor must still be rejected`, + ); + } + } +}); + +test('the compact browser index exactly projects reviewed historical selections', () => { + assert.deepEqual( + selectionIndex.records, + history.records + .filter((record) => record.creator.executionSelection) + .map((record) => ({ + templateId: record.templateId, + currentTemplateLockHash: record.currentTemplateLockHash, + templateLockHash: record.bindings.templateLockHash, + executionSelection: record.creator.executionSelection, + })), + ); +}); + +test('registered native LTX examples match the current recipe after visual regrouping', () => { + for (const id of ['ltx_video_text_to_video', 'ltx_video_image_to_video', 'ltx_video_multi_reference']) { + const template = templates.find((item) => item.id === id); + const entry = manifest.examples.find((item) => item.templateId === id); + assert.ok(entry); + assert.equal(exactness.findManifestEntry(template, manifest), entry, id); + assert.equal(exactness.findHistoricalTemplateManifestEntry(template, manifest), undefined, id); + assert.notEqual(exactness.getTemplateExampleUiState(template, {}, null, manifest).status, 'historical'); + } +}); + +test('all reconciled records reproduce their original locks and preserve historical scope', () => { + for (const record of history.records) { + const template = templates.find((item) => item.id === record.templateId); + const entry = manifest.examples.find((item) => item.templateId === record.templateId); + const recipe = exactness.findHistoricalTemplateRecipe(template, manifest); + assert.equal(recipe?.entry, entry, record.templateId); + assert.equal(exactness.getTemplateLockHash(recipe.template, entry.modelRevision), record.bindings.templateLockHash); + assert.equal(exactness.getTemplateLockHash(template, entry.modelRevision), record.currentTemplateLockHash); + assert.equal(exactness.findManifestEntry(template, manifest), undefined); + assert.equal(record.currentGraphExecutionProved, false); + if (record.creator.executionSelection) { + assert.notDeepEqual(recipe.template.executionSelection, template.executionSelection); + } + } +}); + +test('approved audio remux history binds the derivative and its original run independently', () => { + using temporary = mkdtempDisposableSync(resolve(tmpdir(), 'modiff-historical-remux-')); + const gallery = resolve(temporary.path, 'public/template-gallery'); + mkdirSync(gallery, { recursive: true }); + const templateId = 'reviewed_music_video'; + const currentTemplateLockHash = 'tpl_12345555'; + const templateLockHash = 'tpl_12344444'; + const sourceTemplateLockHash = 'tpl_12343333'; + const promptSettingsHash = 'ps_12340000'; + const modelRevision = `example/wan@${'a'.repeat(40)}`; + const decodedMediaHash = 'sha256:decoded-video:original'; + const decodedAudioHash = 'sha256:decoded-audio:replacement'; + const audiovisualMediaHash = decodedAudiovisualMediaHash(decodedMediaHash, decodedAudioHash); + const modelSetHash = 'sha256:model-set:original'; + const inputArtifactsHash = 'sha256:input-artifacts:original'; + const proofFields = { + graphHash: 'sha256:graph:original', + proofLockHash: 'sha256:proof-lock:original', + backendSourceFingerprint: 'sha256:backend-source:original', + backendContractFingerprint: 'sha256:backend-contract:original', + modelCommit: modelRevision, + templateRevisionHash: 'sha256:template-revision:original', + }; + const processorPath = 'scripts/align-subway-strum-review.py'; + const processorHash = createHash('sha256') + .update(readFileSync(resolve(root, processorPath))) + .digest('hex'); + const operation = { name: 'audio_delay_fit_and_stream_copy_remux', parameters: { delayVideoFrames: 4 } }; + const expected = { + templateId, + templateLockHash, + promptSettingsHash, + modelRevision, + runtimeFingerprint: 'sha256:runtime:original', + decodedMediaHash, + decodedAudioHash, + audiovisualMediaHash, + modelSetHash, + inputArtifactsHash, + }; + const prototype = { + schemaVersion: 1, + format: 'modiff.gallery.reviewed-provenance.v1', + templateId, + bindings: expected, + run: { + ...proofFields, + template: { id: templateId, promptSettingsHash }, + templateLockHash: sourceTemplateLockHash, + modelRevision, + models: { hash: modelSetHash, revisionLock: modelRevision, count: 1, items: [{ modelRevision }] }, + inputArtifactsHash, + mediaHash: decodedMediaHash, + output: { collectionHash: 'sha256:output-collection:original' }, + blockers: [], + }, + derivative: { + ...expected, + schemaVersion: 1, + format: 'modiff.gallery.reviewed-derivative.v1', + kind: 'audio_remux', + sourceOutputCollectionHash: 'sha256:output-collection:original', + sourceVideoHash: decodedMediaHash, + sourceTemplateLockHash, + sourcePromptSettingsHash: promptSettingsHash, + replacementAudio: { encodedSha256: 'encoded', decodedSha256: 'decoded', provenanceSha256: 'provenance' }, + processor: { path: processorPath, contentHash: `sha256:bytes:${processorHash}` }, + operation, + operationHash: canonicalJsonHash(operation), + }, + }; + const review = { status: 'approved_reviewed' }; + writeFileSync(resolve(gallery, 'review.json'), JSON.stringify(review)); + const template = { id: templateId, executionSelection: { implementation: 'pipeline_stages' } }; + const historical = { id: templateId }; + const runtime = { + templates: [template], + templateLockHash: () => currentTemplateLockHash, + promptSettingsHash: () => promptSettingsHash, + findHistoricalTemplateRecipe: () => ({ template: historical }), + findManifestEntry: () => undefined, + }; + const verify = (bundle) => { + writeFileSync(resolve(gallery, 'provenance.json'), JSON.stringify(bundle)); + const entry = { + ...expected, + ...proofFields, + mediaHash: decodedMediaHash, + provenancePath: '/template-gallery/provenance.json', + provenanceHash: canonicalJsonHash(bundle), + qualityReviewPath: '/template-gallery/review.json', + qualityReviewHash: canonicalJsonHash(review), + }; + const body = { + schemaVersion: 1, + format: 'modiff.gallery.recipe-history.v1', + source: { repository: 'example/gallery', revision: 'b'.repeat(40) }, + records: [ + { + templateId, + currentTemplateLockHash, + evidenceScope: 'approved_historical_recipe', + currentGraphExecutionProved: false, + creator: { executionSelection: null, workflowBlockSettings: {} }, + bindings: { templateLockHash, provenanceHash: entry.provenanceHash }, + }, + ], + }; + return verifyTemplateRecipeRecords( + { ...body, recordsHash: canonicalJsonHash(body) }, + { root: temporary.path, runtime, manifest: { schemaVersion: 2, examples: [entry] } }, + ); + }; + + const [record] = verify(prototype); + assert.equal(record.template, historical); + assert.equal(record.evidenceScope, 'approved_historical_recipe'); + assert.equal(record.currentGraphExecutionProved, false); + for (const mutate of [ + (bundle) => delete bundle.derivative, + (bundle) => (bundle.derivative.sourceTemplateLockHash = templateLockHash), + (bundle) => (bundle.derivative.templateLockHash = currentTemplateLockHash), + (bundle) => (bundle.derivative.operation.parameters.delayVideoFrames = 5), + (bundle) => (bundle.derivative.decodedAudioHash = 'different audio'), + (bundle) => (bundle.derivative.sourceOutputCollectionHash = 'different source'), + (bundle) => (bundle.bindings.runtimeFingerprint = 'different runtime'), + (bundle) => (bundle.run.graphHash = 'different graph'), + (bundle) => (bundle.run.inputArtifactsHash = 'different inputs'), + (bundle) => (bundle.run.models.count = 0), + (bundle) => (bundle.run.models.items = 'x'), + ]) { + const changed = structuredClone(prototype); + mutate(changed); + assert.throws(() => verify(changed), /original creator, graph or complete model-set proof/u); + } +}); + +test('the seven accepted native replacements use current recipes and retire active historical associations', () => { + const replaced = [ + 'ltx_video_animated_story', + 'ltx_video_long_showcase', + 'wan_vace_grayscale_control', + 'wan_vace_outpaint_reframe', + 'wan_vace_cinematic_text_to_video', + 'wan_vace_video_color_grade', + 'wan_vace_video_to_video', + ]; + for (const id of replaced) { + const template = templates.find((item) => item.id === id); + const entry = manifest.examples.find((item) => item.templateId === id); + assert.ok(entry, id); + assert.equal(exactness.findManifestEntry(template, manifest), entry, id); + assert.equal(exactness.findHistoricalTemplateManifestEntry(template, manifest), undefined, id); + assert.equal( + history.records.some((record) => record.templateId === id), + false, + id, + ); + } +}); + +test('restored native file identity cannot ignore changed weights, models, inputs or creator settings', () => { + const template = templates.find((item) => item.id === 'ltx_video_image_to_video'); + const entry = manifest.examples.find((item) => item.templateId === template.id); + const isolated = { ...manifest, examples: [entry] }; + for (const mutate of [ + (value) => { + value.prompt += ' changed'; + }, + (value) => { + value.workflowBlockSettings.upscaler.model.sha256 = 'a'.repeat(64); + }, + (value) => { + value.workflowBlockSettings.upscaler.model.revision = 'a'.repeat(40); + }, + (value) => { + value.workflowBlockSettings.upscaler.model.value = 'nateraw/real-esrgan-other/RealESRGAN_x2plus.pth'; + }, + (value) => { + value.workflowBlockSettings.upscaler.model.value = 'nateraw/real-esrgan/../other.pth'; + }, + (value) => { + value.inputBindings[0].defaultAssets[0].runtimeSha256 = `sha256:bytes:${'a'.repeat(64)}`; + }, + ]) { + const changed = structuredClone(template); + mutate(changed); + assert.equal(exactness.findManifestEntry(changed, isolated), undefined); + assert.equal(exactness.findHistoricalTemplateManifestEntry(changed, isolated), undefined); + } + assert.equal( + exactness.findHistoricalTemplateManifestEntry(template, { + ...manifest, + examples: [{ ...entry, modelCommit: 'unrecorded' }], + }), + undefined, + ); +}); diff --git a/scripts/template-recipe-records.mjs b/scripts/template-recipe-records.mjs new file mode 100644 index 00000000..894241ad --- /dev/null +++ b/scripts/template-recipe-records.mjs @@ -0,0 +1,133 @@ +import { readFileSync, realpathSync } from 'node:fs'; +import { isAbsolute, join, relative, resolve } from 'node:path'; +import { pathToFileURL } from 'node:url'; +import { canonicalJsonHash, loadTemplateRuntime, validateSingleProvenance } from './template-gallery-harness.mjs'; + +function publicJson(root, path) { + if ( + typeof path !== 'string' || + !path.startsWith('/template-gallery/') || + path.includes('\\') || + path.includes('..') + ) { + throw new Error('Recipe record requires a contained canonical Gallery sidecar.'); + } + const publicRoot = realpathSync(join(root, 'public')); + const filename = realpathSync(join(publicRoot, path.slice(1))); + const within = relative(publicRoot, filename); + if (isAbsolute(within) || within === '..' || within.startsWith('../') || within.startsWith('..\\')) { + throw new Error('Recipe record sidecar escapes the public root.'); + } + return JSON.parse(readFileSync(filename, 'utf8')); +} + +/** Reconcile historical metadata only. The returned declaration is for + * verification of existing media, never for dispatch or current qualification. */ +export function verifyTemplateRecipeRecords(history, { root, runtime, manifest }) { + const { recordsHash, ...body } = history; + if ( + history.schemaVersion !== 1 || + history.format !== 'modiff.gallery.recipe-history.v1' || + recordsHash !== canonicalJsonHash(body) || + !/^[a-f0-9]{40}$/u.test(history.source?.revision ?? '') || + !Array.isArray(history.records) + ) { + throw new Error('Recipe history schema, immutable source or content hash is invalid.'); + } + const seen = new Set(); + return history.records.map((record) => { + const fail = (reason) => { + throw new Error(`${record.templateId}: ${reason}`); + }; + if (seen.has(record.templateId)) fail('duplicate historical recipe'); + seen.add(record.templateId); + if (record.currentGraphExecutionProved !== false || record.evidenceScope !== 'approved_historical_recipe') { + fail('historical evidence cannot qualify the current graph'); + } + const current = runtime.templates.find((template) => template.id === record.templateId); + const entry = manifest.examples.find((candidate) => candidate.templateId === record.templateId); + if (!current || !entry || !Object.entries(record.bindings).every(([key, value]) => entry[key] === value)) { + fail('published media, recipe, provenance or review binding changed'); + } + if (runtime.templateLockHash(current, entry.modelRevision) !== record.currentTemplateLockHash) { + fail('current template declaration changed after reconciliation'); + } + const historical = runtime.findHistoricalTemplateRecipe(current, { ...manifest, examples: [entry] }); + if (!historical || runtime.findManifestEntry(current, { ...manifest, examples: [entry] })) { + fail('the original historical creator declaration did not reproduce'); + } + if ( + JSON.stringify(historical.template.executionSelection ?? null) !== + JSON.stringify(record.creator.executionSelection) || + JSON.stringify(historical.template.workflowBlockSettings ?? {}) !== + JSON.stringify(record.creator.workflowBlockSettings) + ) { + fail('historical declaration differs from the recorded creator'); + } + const bundle = publicJson(root, entry.provenancePath); + const proof = bundle.run; + const expected = { + templateId: entry.templateId, + templateLockHash: entry.templateLockHash, + promptSettingsHash: entry.promptSettingsHash, + modelRevision: entry.modelRevision, + decodedMediaHash: entry.mediaHash, + ...(entry.decodedAudioHash ? { decodedAudioHash: entry.decodedAudioHash } : {}), + ...(entry.audiovisualMediaHash ? { audiovisualMediaHash: entry.audiovisualMediaHash } : {}), + ...(entry.modelSetHash ? { modelSetHash: entry.modelSetHash } : {}), + ...(entry.inputArtifactsHash ? { inputArtifactsHash: entry.inputArtifactsHash } : {}), + }; + // The public run's local runtime metadata is redacted. Verify the sealed + // runtime binding without trying to derive it from that redacted payload. + const publicBindings = { ...expected, runtimeFingerprint: entry.runtimeFingerprint }; + if ( + canonicalJsonHash(bundle) !== entry.provenanceHash || + bundle.schemaVersion !== 1 || + bundle.format !== 'modiff.gallery.reviewed-provenance.v1' || + bundle.templateId !== record.templateId || + !proof || + (bundle.bindings && Object.entries(publicBindings).some(([key, value]) => bundle.bindings[key] !== value)) || + proof.template?.promptSettingsHash !== runtime.promptSettingsHash(historical.template) || + proof.graphHash !== entry.graphHash || + proof.proofLockHash !== entry.proofLockHash || + proof.backendSourceFingerprint !== entry.backendSourceFingerprint || + proof.backendContractFingerprint !== entry.backendContractFingerprint || + proof.modelCommit !== entry.modelCommit || + proof.templateRevisionHash !== entry.templateRevisionHash || + proof.models?.hash !== entry.modelSetHash || + proof.models?.revisionLock !== entry.modelRevision || + !Array.isArray(proof.models?.items) || + !proof.models.items.length || + proof.models.count !== proof.models.items.length || + validateSingleProvenance(proof, expected, bundle.derivative).length + ) { + fail('the unchanged original creator, graph or complete model-set proof did not match'); + } + if (canonicalJsonHash(publicJson(root, entry.qualityReviewPath)) !== entry.qualityReviewHash) { + fail('original quality review changed'); + } + return { + templateId: record.templateId, + entry, + template: historical.template, + evidenceScope: record.evidenceScope, + currentGraphExecutionProved: false, + }; + }); +} + +async function main() { + const root = resolve(import.meta.dirname, '..'); + const history = JSON.parse(readFileSync(join(root, 'config/template-recipe-history.v1.json'), 'utf8')); + const manifest = JSON.parse(readFileSync(join(root, 'public/template-gallery/manifest.json'), 'utf8')); + const records = verifyTemplateRecipeRecords(history, { root, manifest, runtime: await loadTemplateRuntime(root) }); + console.log( + JSON.stringify({ verifiedHistoricalRecipes: records.length, currentGraphProofsAdded: 0, approvedMediaRerun: 0 }), + ); +} +if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href) { + main().catch((error) => { + console.error(error.message); + process.exitCode = 1; + }); +} diff --git a/scripts/template-showcases.test.mjs b/scripts/template-showcases.test.mjs new file mode 100644 index 00000000..5b233816 --- /dev/null +++ b/scripts/template-showcases.test.mjs @@ -0,0 +1,131 @@ +import assert from 'node:assert/strict'; +import fs from 'node:fs'; +import { test } from 'node:test'; +import { createServer } from 'vite'; + +test('accepted showcase bytes have unique, immutable review identities and only two featured recipes', () => { + const registry = JSON.parse(fs.readFileSync('src/studio/templateShowcases.json', 'utf8')); + const assets = JSON.parse(fs.readFileSync('config/template-assets.v1.json', 'utf8')); + const rights = JSON.parse(fs.readFileSync('config/template-asset-rights.v1.json', 'utf8')); + assert.equal(registry.assets.length, 15); + assert.equal(new Set(registry.assets.map((a) => a.id)).size, registry.assets.length); + assert.equal(registry.assets.filter((a) => a.featuredTemplateId).length, 2); + assert.deepEqual( + registry.featured, + registry.assets.filter((a) => a.featuredTemplateId), + ); + for (const row of registry.assets) { + assert.equal(row.status, 'approved'); + const base = `/template-gallery/showcases/${row.id}`; + assert.equal(row.outputPath, base + '.webp'); + assert.equal(row.recordPath, base + '.json'); + for (const [path, hash] of [ + [row.outputPath, row.mediaSHA256], + [row.recordPath, row.recordSHA256], + ]) { + assert.match(hash, /^[a-f0-9]{64}$/u); + assert.match(path, /^\/template-gallery\/showcases\/[a-z0-9.-]+\.(webp|json)$/u); + const record = assets.assets.find((a) => a.path === path.slice(1)); + assert.equal(record?.sha256, `sha256:bytes:${hash}`); + const accepted = rights.records.find((a) => a.path === path.slice(1)); + assert.equal(accepted?.sha256, record.sha256); + assert.equal(accepted?.publishDecision, 'approved'); + } + } + const workflowIds = registry.workflowAssets.map((row) => row.id); + assert.equal(new Set(workflowIds).size, workflowIds.length); + for (const row of registry.workflowAssets) { + assert.equal(row.status, 'approved'); + assert.equal(row.mediaKind, 'video'); + assert.match(row.id, /^[a-z0-9][a-z0-9.-]*$/u); + assert.ok(row.title.trim() && row.modelLabel.trim()); + assert.match(row.workflowExecutionSpecId, /^[a-z0-9_-]+:[a-z0-9_-]+:v[1-9][0-9]*$/u); + assert.ok([row.width, row.height].every((size) => Number.isInteger(size) && size > 0)); + const base = `/template-gallery/showcases/${row.id}`; + assert.equal(row.outputPath, base + '.mp4'); + assert.ok([base + '.poster.png', base + '.poster.webp'].includes(row.posterPath)); + assert.equal(row.recordPath, base + '.json'); + for (const [path, hash] of [ + [row.outputPath, row.mediaSHA256], + [row.posterPath, row.posterSHA256], + [row.recordPath, row.recordSHA256], + ]) { + assert.match(hash, /^[a-f0-9]{64}$/u); + const record = assets.assets.find((asset) => asset.path === path.slice(1)); + assert.equal(record?.sha256, `sha256:bytes:${hash}`); + const accepted = rights.records.find((asset) => asset.path === path.slice(1)); + assert.equal(accepted?.sha256, record.sha256); + assert.equal(accepted?.publishDecision, 'approved'); + } + } +}); + +test('featured media never replaces current-template exactness or the actual default prompt', async () => { + const server = await createServer({ + configFile: false, + logLevel: 'silent', + appType: 'custom', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + }); + try { + const { STUDIO_TEMPLATES } = await server.ssrLoadModule('/src/studio/templates.ts'); + const exact = await server.ssrLoadModule('/src/studio/templateExactness.ts'); + const { getTemplateShowcase } = await server.ssrLoadModule('/src/studio/templateShowcases.ts'); + const manifest = exact.parseTemplateGalleryManifest( + JSON.parse(fs.readFileSync('public/template-gallery/manifest.json', 'utf8')), + ); + for (const [id, file, prompt] of [ + ['flux3_klein_fp8r512_text_to_image', 'flux3-pine-lake-mountains-pup.v1.webp', /radio/i], + ['minimax_h3_image_old_town_cat', 'h3-emerald-material-transfer.webp', /orange tabby/i], + ]) { + const template = STUDIO_TEMPLATES.find((t) => t.id === id); + assert.match(template.prompt, prompt); + assert.ok(getTemplateShowcase(template.id).mediaPath.endsWith(file)); + assert.deepEqual(exact.getTemplateCardMedia(template, null, { currentRecipeOnly: true }), {}); + const card = exact.getTemplateCardMedia(template, manifest, { currentRecipeOnly: true }); + const entry = exact.findManifestEntry(template, manifest); + if (entry) assert.equal(card.mediaPath, exact.templateManifestPath(entry.afterPath ?? entry.outputPath)); + else assert.deepEqual(card, {}); + assert.ok(!Object.values(card).some((path) => path?.endsWith(file))); + assert.equal(exact.findManifestEntry(template, null), undefined); + assert.equal(exact.getTemplateExampleUiState(template, {}, null, null).status, 'unverified'); + } + const other = STUDIO_TEMPLATES.find((t) => t.id === 'flux2_dev_text_to_image'); + assert.equal(getTemplateShowcase(other.id), undefined); + } finally { + await server.close(); + } +}); + +test('approved workflow videos are searchable and resolve through the pinned Gallery source', async () => { + const server = await createServer({ + configFile: false, + logLevel: 'silent', + appType: 'custom', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + }); + try { + const { getWorkflowShowcases } = await server.ssrLoadModule('/src/studio/templateShowcases.ts'); + const { getTemplateAssetSource, resolveTemplateAssetUrl } = await server.ssrLoadModule( + '/src/studio/templateAssets.ts', + ); + const registry = JSON.parse(fs.readFileSync('src/studio/templateShowcases.json', 'utf8')); + const asset = registry.workflowAssets.find((row) => row.id === 'ltx25-monday-morning-brisk-crossing.v1'); + const resolved = getWorkflowShowcases('LTX-2.5 Full').find((row) => row.id === asset.id); + assert.equal(resolved.workflowExecutionSpecId, 'ltx25-full-av:image_to_video_with_audio:v1'); + const { revision, mode } = getTemplateAssetSource(); + for (const [actual, original] of [ + [resolved.mediaPath, asset.outputPath], + [resolved.posterPath, asset.posterPath], + [resolved.recordPath, asset.recordPath], + ]) { + assert.equal(actual, resolveTemplateAssetUrl(original)); + if (mode === 'huggingface') assert.ok(actual.includes(`/resolve/${revision}/`)); + } + assert.deepEqual(getWorkflowShowcases('unrelated model'), []); + } finally { + await server.close(); + } +}); diff --git a/scripts/template-stage-coverage.test.mjs b/scripts/template-stage-coverage.test.mjs new file mode 100644 index 00000000..f30533c5 --- /dev/null +++ b/scripts/template-stage-coverage.test.mjs @@ -0,0 +1,64 @@ +import assert from 'node:assert/strict'; +import { after, before, test } from 'node:test'; +import { createServer } from 'vite'; + +let server, templates, selections, retained; +before(async () => { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, value), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { + location: { origin: 'http://127.0.0.1:5191' }, + dispatchEvent: () => true, + localStorage, + }; + server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + ({ STUDIO_TEMPLATES: templates } = await server.ssrLoadModule('/src/studio/templates.ts')); + ({ RETAINED_GALLERY_TEMPLATES: retained } = await server.ssrLoadModule('/scripts/retained-gallery-recipes.ts')); + selections = await server.ssrLoadModule('/src/studio/templateOperationSelections.ts'); +}); +after(async () => server?.close()); + +test('every fresh template has an explicit operation or retained standalone authoring route', async (t) => { + assert.ok(templates.length >= 93, 'Audit the complete current catalogue, including later additions.'); + const nativeTemplates = new Set(retained.map(({ template }) => template)); + for (const template of templates) { + await t.test(template.id, () => { + if (selections.hasTemplateOperationRecipe(template)) return; + assert.ok(nativeTemplates.has(template), `${template.label} still falls back to the legacy flat graph builder`); + assert.equal(template.example.lockedSettings.resourceMode, 'expert'); + assert.ok(template.requiredBackendCapabilities.length > 0); + }); + } +}); + +test('coverage reads normalized delivery operations rather than source literals', () => { + for (const id of [ + 'wan_vace_cinematic_text_to_video', + 'wan_vace_video_color_grade', + 'wan_vace_masked_object_replace', + 'wan_vace_outpaint_reframe', + 'wan_vace_grayscale_control', + 'wan_vace_video_to_video', + 'wan_video_long_showcase', + 'ltx_video_animated_story', + ]) { + const template = templates.find((item) => item.id === id); + assert.ok(template.workflowBlocks.includes('upscaler'), `${id}: actual delivery includes an upscaler`); + assert.equal(template.workflowBlockSettings.upscaler.model.value, 'nateraw/real-esrgan/RealESRGAN_x2plus.pth'); + } + for (const id of ['wan_22_i2v_seed_vault', 'wan_22_ti2v_5b_seed_vault']) { + const template = templates.find((item) => item.id === id); + assert.equal(template.videoDelivery, 'native'); + assert.ok(!template.workflowBlocks?.includes('upscaler'), `${id}: retain native delivery`); + } +}); diff --git a/scripts/verify-builtin-media.py b/scripts/verify-builtin-media.py new file mode 100644 index 00000000..e0aa023f --- /dev/null +++ b/scripts/verify-builtin-media.py @@ -0,0 +1,223 @@ +"""Independent small-fixture oracles; never imports MoDiff or runs a graph/model. + +Input filenames have already passed the canonical recorder's containment/hash +checks. Decoding and numerical limits below bound verification, not user media. +""" +import hashlib +import io +import json +import math +import sys + +import imageio.v2 as imageio +import numpy as np +from PIL import Image, ImageEnhance, ImageFilter, ImageOps +from scipy.io import wavfile + + +def digest_image(image): + body = image.tobytes() + return dict(kind='image', sha256=hashlib.sha256(body).hexdigest(), byteSize=len(body), + width=image.width, height=image.height, mode=image.mode) + + +def audio(path): + rate, samples = wavfile.read(path) + assert samples.dtype == np.int16 and 8000 <= rate <= 96000 + assert samples.shape[0] <= 960_000 + samples = samples.astype(np.float32) / 32768 + if samples.ndim == 1: + samples = samples[:, None] + assert samples.ndim == 2 and samples.shape[1] <= 8 and np.isfinite(samples).all() + return samples, int(rate) + + +def digest_audio(samples, rate): + data = np.ascontiguousarray(samples, dtype=' { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, value), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { location: { origin: 'http://127.0.0.1:5191' }, dispatchEvent: () => true, localStorage }; + server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + ({ STUDIO_TEMPLATES: templates } = await server.ssrLoadModule('/src/studio/templates.ts')); + builder = await server.ssrLoadModule('/src/studio/templateOperationWorkflow.ts'); + exactness = await server.ssrLoadModule('/src/studio/templateExactness.ts'); + ({ DEFAULT_STUDIO_FORM: defaults } = await server.ssrLoadModule('/src/studio/modelProfiles.ts')); + flow = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + shared = await server.ssrLoadModule('/src/workflow/operationSharedInputs.ts'); + secondary = await server.ssrLoadModule('/src/studio/templateSecondaryStages.ts'); + runtime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); + fieldActions = await server.ssrLoadModule('/src/studio/visualStageFieldActions.ts'); + ({ MOONFLOWER_SCENES: moonflowerScenes } = await server.ssrLoadModule('/src/studio/moonflowerRecipe.ts')); + controlConnections = await server.ssrLoadModule('/src/studio/blockControlConnectionsV2.ts'); + const parser = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); + const backend = process.env.MODIFF_BACKEND_DIR || path.resolve('../MoDiff'); + const python = process.env.MODIFF_BACKEND_PYTHON || path.join(backend, '.venv', 'Scripts/python.exe'); + fixture = JSON.parse( + execFileSync(python, [path.resolve('scripts/template-operation-fixtures.py')], { + cwd: backend, + encoding: 'utf8', + timeout: 120000, + maxBuffer: 64 * 1024 ** 2, + input: JSON.stringify([ + ...cases.map(([id]) => ({ id, selection: templates.find((row) => row.id === id).executionSelection })), + { + id: 'moonflower-visual', + selection: { + pipelineClass: 'LTXConditionPipeline', + task: 'image_to_video', + executionProfileId: 'ltx-video:direct', + authoringRecipeId: 'generic-video-stages:v1', + bindingSpec: { modelType: 'LTXVideoPipeline', mode: 'image_to_video' }, + }, + }, + ]), + env: { + ...process.env, + MODIFF_BACKEND_DIR: backend, + HF_HUB_OFFLINE: '1', + TRANSFORMERS_OFFLINE: '1', + PYTHONDONTWRITEBYTECODE: '1', + CUDA_VISIBLE_DEVICES: '', + }, + }), + ); + capabilities = parser.parseStudioModelCapabilities(fixture.publicPayload).capabilities; +}); +after(async () => server?.close()); + +test('secondary visuals use the exact pinned backend starter and reject a foreign model', async () => { + const template = templates.find((row) => row.id === 'ace_step_lyric_music_video'); + const visual = fixture.recipes.find((row) => row.id === 'moonflower-visual').starter; + const requests = []; + const resolved = await secondary.templateSecondaryVideoStages( + template, + fixture.registry, + capabilities, + [], + async (...args) => { + requests.push(args); + return structuredClone(visual); + }, + ); + assert.equal(requests.length, 1); + assert.equal(requests[0][0], 'LTXConditionPipeline'); + assert.equal(requests[0][1], 'image_to_video'); + assert.equal(requests[0][5], 'generic-video-stages:v1'); + assert.equal(resolved.video.starter.pipelineClass, visual.pipelineClass); + assert.notEqual(resolved.registry, fixture.registry); + await assert.rejects( + () => + secondary.templateSecondaryVideoStages(template, fixture.registry, capabilities, [], async () => { + const wrong = structuredClone(visual); + wrong.nodes.find((row) => row.node.action === 'LoadPipeline').node.params.revision.value = 'f'.repeat(40); + return wrong; + }), + /different immutable visual model/, + ); +}); + +function create(id, revise = (template) => template) { + const template = revise(structuredClone(templates.find((row) => row.id === id))), + row = fixture.recipes.find((row) => row.id === id); + const capability = capabilities.find((row) => row.modelType === template.modelType); + const spec = capability.studioExecutionSpecs.find((row) => row.mode === template.executionSelection.bindingSpec.mode); + const form = { + ...defaults, + ...exactness.getTemplateLockedSettings(template), + device: 'cpu:0', + offloadMode: 'none', + autoOffload: false, + referenceImages: Array.from({ length: 10 }, (_, index) => `images/shot-${index + 1}.png`), + }; + const visual = fixture.recipes.find((row) => row.id === 'moonflower-visual'); + const visualCapability = capabilities.find((row) => row.modelType === 'LTXVideoPipeline'); + return { + template, + form, + graph: builder.createTemplateOperationGraph( + template, + form, + row.starter, + fixture.registry, + spec, + capability, + undefined, + { + secondaryVideo: { + starter: visual.starter, + spec: visualCapability.studioExecutionSpecs.find((row) => row.mode === 'image_to_video'), + capability: visualCapability, + }, + }, + ), + }; +} + +test('all sequence templates arrange their shots in story order independently of generated IDs', async (t) => { + const { arrangeGraphNodes } = await server.ssrLoadModule('/src/workflow/graphLayout.ts'); + for (const [id, count] of cases) + await t.test(id, () => { + const { graph } = create(id); + const shots = graph.nodes.filter((node) => node.data.label.startsWith('Shot ')); + const identities = new Map(shots.map((node, index) => [node.id, `shot-${count - index}`])); + const nodes = graph.nodes.map((node) => ({ ...node, id: identities.get(node.id) ?? node.id })); + const edges = graph.edges.map((edge) => ({ + ...edge, + source: identities.get(edge.source) ?? edge.source, + target: identities.get(edge.target) ?? edge.target, + })); + const arranged = arrangeGraphNodes(nodes, edges); + const shotIds = new Set(identities.values()); + const ordered = arranged.filter((node) => shotIds.has(node.id)); + ordered.sort((left, right) => left.position.y - right.position.y); + assert.deepEqual( + ordered.map((node) => node.data.label), + shots.map((node) => node.data.label), + ); + assert.deepEqual(arrangeGraphNodes(arranged, edges), arranged); + assert.deepEqual( + arranged.map((node) => node.data), + nodes.map((node) => node.data), + ); + }); +}); + +test('every sequence has actual separate shot groups and one shared primary model', async (t) => { + const { visualOperationGroup } = await server.ssrLoadModule('/src/workflow/visualOperationGroupProjection.ts'); + const { isFocusedStageNode } = await server.ssrLoadModule('/src/workflow/encodingNodePresentation.ts'); + for (const [id, count] of cases) + await t.test(id, () => { + const { graph, template } = create(id); + const shots = graph.nodes.filter((node) => node.data.label.startsWith('Shot ')); + assert.equal(shots.length, count); + assert.equal( + graph.nodes.filter((node) => node.data.label === 'Model Setup').length, + id === 'ace_step_lyric_music_video' ? 2 : 1, + ); + assert.equal(graph.nodes.filter((node) => node.data.action === 'Storyboard').length, 1); + const assembly = graph.nodes.filter((node) => + ['assemble', 'assembleExport'].includes(visualOperationGroup(node)), + ); + assert.equal(assembly.length, 1, 'ordering and concatenation share one assembly stage'); + assert.ok(isFocusedStageNode(assembly[0].data.blockInstanceV2), 'assembly uses the ordinary stage renderer'); + assert.ok( + !graph.nodes.some((node) => node.data.action === 'ToList'), + 'ordering bookkeeping stays inside Assemble', + ); + for (const shot of shots) { + assert.equal( + shot.data.blockInstanceV2.effectiveInterface.controls.length, + 0, + 'shot overview expands to the actual editable stages', + ); + assert.equal( + shot.data.blockInstanceV2.effectiveInterface.boundary.outputs.length, + 1, + 'only the real delivered shot crosses its outer boundary', + ); + const supplied = graph.edges + .filter((edge) => edge.target === shot.id) + .map((edge) => `${edge.source}:${edge.sourceHandle}`); + assert.equal(new Set(supplied).size, supplied.length, 'common external inputs have one public socket'); + } + const flat = flow.expandFlowExecutionGraph(graph.nodes, graph.edges); + const video = flat.nodes.filter((node) => node.data.module === 'modules.DiffusersVideo'); + assert.equal(video.filter((node) => node.data.action === 'LoadPipeline').length, 1); + assert.ok( + !graph.nodes.some((node) => node.data.module === 'modules.DiffusersRuntime'), + 'resource controls belong inside shared Model Setup', + ); + const owner = video.find((node) => node.data.action === 'LoadPipeline'); + const recipe = flat.nodes.find( + (node) => + node.data.action === 'DiffusersExecutionRecipe' && + flat.edges.some( + (edge) => edge.source === node.id && edge.target === owner.id && edge.targetHandle === 'execution_recipe', + ), + ); + assert.ok(recipe, 'the shared loader must retain its genuine execution recipe'); + assert.ok( + flat.edges.some((edge) => edge.target === recipe.id && edge.targetHandle === 'quantization_config'), + 'the genuine quantization config must remain wired', + ); + for (const action of ['EncodeInputs', 'Denoise', 'DecodeLatents']) + assert.equal(video.filter((node) => node.data.action === action).length, count, `${id}:${action}`); + assert.ok( + !video.some((node) => ['GenerateSequence', 'GenerateShotJob', 'BuildShotJobs'].includes(node.data.action)), + ); + assert.ok(!flat.nodes.some((node) => node.data.module === 'modules.WorkflowControl')); + assert.equal(flat.nodes.filter((node) => node.data.action === 'ExportAsset').length, count); + if (template.mode === 'image_to_video') + for (const shot of shots) + assert.equal( + shot.data.blockInstanceV2.effectiveGraph.nodes.filter( + (node) => node.data.module === 'modules.Image' && node.data.action === 'Load', + ).length, + 1, + ); + const api = flow.useFlowStore + .getState() + .exportGraph('explicit-shots', undefined, { sourceGraph: graph, randomizeSeeds: false }); + const restored = flow.useFlowStore.getState().exportGraph('explicit-shots', undefined, { + sourceGraph: JSON.parse(JSON.stringify(graph)), + randomizeSeeds: false, + }); + assert.deepEqual(restored, api); + assert.ok(!api.loops); + const events = Object.keys(api.nodes).map((node) => ({ + type: 'executed', + task_id: 'explicit-receipts', + node, + status: 'succeeded', + hasChanged: true, + })); + const output = { taskId: 'explicit-receipts', apiGraphSnapshot: api }; + const receipts = executionReceiptsForRun(template, output, events); + assert.equal(receipts.filter((row) => row.action === 'Denoise').length, count); + const last = receipts.filter((row) => row.action === 'Denoise').at(-1); + assert.throws( + () => + executionReceiptsForRun( + template, + output, + events.filter((event) => event.node !== last.nodeId), + ), + /No execution receipt/, + ); + assert.throws( + () => + executionReceiptsForRun( + template, + output, + events.map((event) => + event.node === last.nodeId ? { ...event, status: 'cached', hasChanged: false } : event, + ), + ), + /cached output/, + ); + const warm = events.map((event) => + Object.entries(api.nodes).some(([id, node]) => id === event.node && node.action === 'EncodeInputs') + ? { ...event, status: 'cached', hasChanged: false } + : event, + ); + assert.equal(executionReceiptsForRun(template, output, warm).length, receipts.length); + const partial = structuredClone(output); + partial.apiGraphSnapshot.paths = partial.apiGraphSnapshot.paths.map((route) => + route.filter((id) => id !== last.nodeId), + ); + assert.throws(() => executionReceiptsForRun(template, partial, events), /all .* authored shots/); + }); +}); + +test('every template shot uses the shared visual-stage field-action identity', async (t) => { + for (const [id] of cases) + await t.test(id, () => { + const { graph } = create(id); + for (const shot of graph.nodes.filter((node) => node.data.label.startsWith('Shot '))) { + const instance = shot.data.blockInstanceV2; + assert.equal(instance.definitionSnapshot.source.provider, 'modiff.visual-stages.storyboard.v1'); + const view = runtime.materializeBlockProjectionV2( + runtime.createBlockRootNodeV2( + runtime.setBlockPresentationV2(instance, { expanded: true, collapsedContainerNodeIds: [] }), + ), + ); + let controls = 0; + for (const node of view.nodes) + for (const [fieldKey, param] of Object.entries(node.data.params)) { + if (param.hidden || !param.fieldOptions?.blockContainerControlV1) continue; + controls++; + const sources = fieldActions.visualStageFieldSources(view.nodes, { + nodeId: node.id, + fieldKey, + module: node.data.module, + action: node.data.action, + }); + assert.ok(sources?.length, `${id}: ${node.data.label}.${fieldKey} needs its native owner`); + assert.ok(sources.every((source) => source.node.data.module && source.node.data.action)); + } + assert.ok(controls > 0, `${id} needs real editable inner-stage controls`); + } + }); +}); + +test('Moonflower retains nine accepted scene records, ten ordered images and a 45-second song', () => { + const { graph } = create('ace_step_lyric_music_video'); + const flat = flow.expandFlowExecutionGraph(graph.nodes, graph.edges); + const audio = flat.nodes.find( + (node) => node.data.module === 'modules.DiffusersAudio' && node.data.action === 'Generate', + ); + assert.equal(audio.data.params.audio_duration.value, 45); + assert.equal(audio.data.params.seed.value.value, 20261106); + assert.equal(audio.data.params.bpm.value, 96); + assert.equal(audio.data.params.keyscale.value, 'D major'); + assert.equal(audio.data.params.timesignature.value, '4', 'retain the accepted song’s literal conditioning text'); + assert.equal(audio.data.params.num_inference_steps.value, 8); + assert.equal(audio.data.params.guidance_scale.value, 1); + assert.equal(audio.data.params.shift.value, 3); + assert.equal(audio.data.params.vocal_language.value, 'en'); + const overlay = flat.nodes.find((node) => node.data.action === 'LyricOverlay'); + assert.equal(overlay.data.params.enabled.value, false); + const trim = flat.nodes.find((node) => node.data.action === 'Trim'); + assert.equal(trim.data.params.range_mode.value, 'frames'); + assert.equal(trim.data.params.end.value, 720); + assert.equal(trim.data.params.fps.value, 16); + const shots = graph.nodes + .filter((node) => node.data.label.startsWith('Shot ')) + .sort((a, b) => Number(a.data.label.match(/^Shot (\d+)/)[1]) - Number(b.data.label.match(/^Shot (\d+)/)[1])); + let offset = 0; + for (const [index, shot] of shots.entries()) { + const native = runtime.blockOperationGraphV2(shot.data.blockInstanceV2); + const images = native.nodes.filter((node) => node.data.module === 'modules.Image' && node.data.action === 'Load'); + const count = moonflowerScenes[index].reference_count; + const expected = Array.from({ length: count }, (_, index) => `images/shot-${offset + index + 1}.png`); + const paths = images.flatMap((node) => node.data.params.file.value); + assert.equal(images.length, 1, 'one ordered reference collection belongs to each shot'); + assert.deepEqual(paths, expected, `ordered references belong to ${shot.data.label}`); + assert.ok(native.edges.some((edge) => edge.source === images[0].id && edge.targetHandle === 'reference_images')); + offset += count; + } + assert.equal(offset, 10); + assert.ok(flat.nodes.some((node) => node.data.module === 'modules.Audio' && node.data.action === 'Export')); +}); + +test('Run Shot retains its actual model and storyboard without rendering other shots', () => { + const { graph } = create('wan_21_t2v_13b_seed_vault'); + const shot = graph.nodes.find((node) => node.data.label.startsWith('Shot 2 ')); + const api = flow.useFlowStore + .getState() + .exportGraph('one-shot', shot.id, { sourceGraph: graph, randomizeSeeds: false }); + const nodes = Object.values(api.nodes); + assert.equal(nodes.filter((node) => node.action === 'Denoise').length, 1); + assert.equal(nodes.filter((node) => node.action === 'LoadPipeline').length, 1); + assert.equal(nodes.filter((node) => node.action === 'Storyboard').length, 1); + assert.equal(nodes.filter((node) => node.action === 'ExportAsset').length, 1); + assert.ok(!nodes.some((node) => ['ConcatenateAssets', 'Concatenate'].includes(node.action))); +}); + +test('frame count and conditioning edits use the actual sampler without storyboard overrides', () => { + const { graph } = create('ltx_video_long_showcase'); + const flat = flow.expandFlowExecutionGraph(graph.nodes, graph.edges); + const samplers = flat.nodes.filter((node) => node.data.action === 'Denoise'); + assert.equal(samplers.length, 6); + for (const node of samplers) { + assert.ok( + !flat.edges.some((edge) => edge.target === node.id && ['num_frames', 'strength'].includes(edge.targetHandle)), + ); + assert.equal(node.data.params.num_frames.value, 81); + } + const original = new Map( + samplers.map((node) => [node.id, [node.data.params.num_frames.value, node.data.params.strength.value]]), + ); + const store = flow.useFlowStore; + store.getState().replaceGraph(JSON.parse(JSON.stringify(graph))); + const shot = store.getState().nodes.find((node) => node.data.label.startsWith('Shot 1 ')); + const samplerId = runtime + .blockOperationGraphV2(shot.data.blockInstanceV2) + .nodes.find((node) => node.data.action === 'Denoise').id; + store.getState().toggleUserBlockExpanded(shot.id); + const generate = store.getState().nodes.find((node) => node.parentId === shot.id && node.data.label === 'Generate'); + for (const [label, value] of [ + ['Frames', 121], + ['Condition strength', 0.85], + ]) { + const [field] = Object.entries(generate.data.params).find( + ([, param]) => !param.hidden && param.label === label && param.display !== 'output', + ); + store.getState().setParamWithHistory(generate.id, field, value); + } + const api = flow.useFlowStore.getState().exportGraph('edited-shot-controls', undefined, { + sourceGraph: JSON.parse(JSON.stringify(store.getState().toObject())), + randomizeSeeds: false, + }); + assert.equal(api.nodes[samplerId].params.num_frames.value, 121); + assert.equal(api.nodes[samplerId].params.strength.value, 0.85); + for (const [id, node] of Object.entries(api.nodes).filter(([, node]) => node.action === 'Denoise')) { + if (id !== samplerId) + assert.deepEqual([node.params.num_frames.value, node.params.strength.value], original.get(id)); + } + const storyboard = flat.nodes.find((node) => node.data.action === 'Storyboard'); + assert.ok( + JSON.parse(storyboard.data.params.shots_json.value).every( + (shot) => !('duration_seconds' in shot) && !('conditioning_strength' in shot), + ), + ); +}); + +test('assembly preserves numeric shot order when storage canonicalizes object keys', () => { + const { graph } = create('wan_21_t2v_13b_seed_vault', (template) => { + template.workflowBlockSettings.qualityVideoSequence.shotsJson = JSON.stringify( + Array.from({ length: 12 }, (_, index) => ({ + title: `Scene ${index + 1}`, + prompt: `A railway scene ${index + 1}`, + duration_seconds: 5.4, + })), + ); + return template; + }); + const flat = flow.expandFlowExecutionGraph(graph.nodes, graph.edges); + const list = flat.nodes.find((node) => node.data.module === 'modules.Primitive' && node.data.action === 'ToList'); + const labels = Object.keys(list.data.params) + .sort() + .filter((key) => key === 'item' || key.startsWith('item>>>')) + .map((key) => list.data.params[key].label); + assert.deepEqual( + labels, + Array.from({ length: 12 }, (_, index) => `Shot ${index + 1}`), + ); +}); + +test('guidance remains paired inside one shot under a shared model, including save/reopen', () => { + const { graph } = create('wan_21_t2v_13b_seed_vault'); + const reopened = JSON.parse(JSON.stringify(graph)); + const flat = flow.expandFlowExecutionGraph(reopened.nodes, reopened.edges); + const samplers = flat.nodes.filter((node) => node.data.action === 'Denoise'); + const groups = samplers.map((node) => shared.sharedOperationInput(flat.nodes, flat.edges, node.id, 'guidance_scale')); + assert.ok( + groups.every((group) => group?.members.length === 2), + JSON.stringify( + samplers.slice(0, 1).map((node) => ({ + id: node.id, + shared: node.data.operationAuthoring.sharedInputs, + owners: flat.nodes.filter((row) => row.data.action === 'LoadPipeline').map((row) => row.id), + encoders: flat.nodes + .filter((row) => row.data.action === 'EncodeInputs') + .slice(0, 1) + .map((row) => ({ id: row.id, shared: row.data.operationAuthoring.sharedInputs })), + })), + ), + ); + assert.equal(new Set(groups.map((group) => group.key)).size, 6); + const original = groups + .slice(1) + .map((group) => group.members.map(({ node, field }) => node.data.params[field].value)); + for (const { node, field } of groups[0].members) node.data.params[field].value = 8; + shared.assertSharedOperationInput(groups[0], flat.edges); + assert.deepEqual( + groups.slice(1).map((group) => group.members.map(({ node, field }) => node.data.params[field].value)), + original, + ); + groups[0].members[0].node.data.params[groups[0].members[0].field].value = 9; + assert.throws(() => shared.assertSharedOperationInput(groups[0], flat.edges), /controls disagree/); + const binding = samplers[0].data.operationAuthoring.sharedInputs.find((row) => row.field === 'guidance_scale'); + binding.scopeNodeIds.push(samplers[1].id); + assert.equal(shared.sharedOperationInput(flat.nodes, flat.edges, samplers[0].id, 'guidance_scale'), null); +}); + +async function nestedGuidanceFixture(id, action, { plain = false, sealed = false } = {}) { + const { graph } = create(id); + const get = flow.useFlowStore.getState; + get().replaceGraph(JSON.parse(JSON.stringify(graph))); + const shot = get().nodes.find((node) => /^Shot 2\b/.test(node.data.label)); + assert.ok(shot); + if (plain || sealed) { + const schema = await server.ssrLoadModule('/src/studio/blockSchemaV2.ts'); + let instance = shot.data.blockInstanceV2; + if (plain) { + const definition = structuredClone(instance.definitionSnapshot); + delete definition.source.provider; + definition.contentHash = schema.blockDefinitionContentHashV2(definition); + instance = schema.normalizeBlockInstanceV2({ + ...instance, + definitionSnapshot: definition, + definitionRef: { ...instance.definitionRef, contentHash: definition.contentHash }, + }); + } + if (sealed) { + const effective = structuredClone(instance.effectiveGraph); + const encoder = effective.nodes.find((node) => node.data.action === 'EncodeInputs'); + const control = effective.nodes + .flatMap((node) => node.containerInterface?.controls ?? []) + .find((control) => control.binding.nodeId === encoder.nodeId && control.binding.fieldId === 'guidance_scale'); + assert.ok(control); + control.sealed = true; + instance = runtime.replaceBlockEffectiveGraphV2(instance, effective); + } + get().replaceGraph({ + nodes: get() + .toObject() + .nodes.map((node) => + node.id === shot.id ? { ...node, data: { ...node.data, blockInstanceV2: instance } } : node, + ), + edges: get().edges, + }); + } + get().toggleUserBlockExpanded(shot.id); + get().resetHistory(); + const instance = get().nodes.find((node) => node.id === shot.id).data.blockInstanceV2; + const choices = get() + .nodes.filter((node) => node.data.blockProjectionOwnerId === shot.id) + .flatMap((node) => + Object.entries(node.data.params).flatMap(([field, param]) => { + if (param.hidden || param.disabled || !param.fieldOptions?.blockContainerControlV1) return []; + const binding = controlConnections.blockControlBindingV2(node, field, param, get().nodes)?.control.binding; + const member = binding && instance.effectiveGraph.nodes.find((member) => member.nodeId === binding.nodeId); + return binding?.fieldId === 'guidance_scale' && member?.data.action === action + ? [{ node, field, binding }] + : []; + }), + ); + assert.equal(choices.length, 1); + return { get, instance, chosen: choices[0] }; +} + +test('native nested guidance edits retain the external loader and only update their own shot', async (t) => { + for (const id of ['wan_video_long_showcase', 'wan_21_t2v_13b_seed_vault']) { + for (const action of ['Denoise', 'EncodeInputs']) + await t.test(`${id} via ${action}`, async () => { + const { get, instance, chosen } = await nestedGuidanceFixture(id, action); + const before = get().exportGraph('nested-guidance-edit'); + const native = runtime.blockProjectionNodeIdV2(instance.instanceId, chosen.binding.nodeId); + const flat = flow.expandFlowExecutionGraph(get().nodes, get().edges); + const group = shared.sharedOperationInput(flat.nodes, flat.edges, native, 'guidance_scale'); + assert.equal(group?.members.length, 2, 'the real shared loader reaches this encoder and sampler'); + const allowed = new Set(group.members.map(({ node, field }) => `${node.id}\0${field}`)); + const next = Number(before.nodes[native].params.guidance_scale.value) + 1; + get().setParamWithHistory(chosen.node.id, chosen.field, next); + const after = get().exportGraph('nested-guidance-edit'); + for (const [nodeId, node] of Object.entries(after.nodes)) + for (const [field, param] of Object.entries(node.params)) { + if (allowed.has(`${nodeId}\0${field}`)) assert.equal(param.value, next); + else assert.deepEqual(param, before.nodes[nodeId].params[field], `${nodeId}.${field} stays unchanged`); + } + assert.equal(get().historyPast.length, 1); + get().undo(); + assert.deepEqual(get().exportGraph('nested-guidance-edit'), before); + get().redo(); + assert.deepEqual(get().exportGraph('nested-guidance-edit'), after); + get().replaceGraph(JSON.parse(JSON.stringify(get().toObject()))); + assert.deepEqual(get().exportGraph('nested-guidance-edit'), after); + }); + } +}); + +test('ordinary user Blocks retain the same scoped shared editing without a presentation provider', async () => { + const { get, chosen } = await nestedGuidanceFixture('wan_video_long_showcase', 'Denoise', { plain: true }); + get().setParamWithHistory(chosen.node.id, chosen.field, 6); + const api = get().exportGraph('plain-user-block-shared-edit'); + const changed = Object.values(api.nodes).filter((node) => Number(node.params.guidance_scale?.value) === 6); + assert.deepEqual(changed.map((node) => node.action).sort(), ['Denoise', 'EncodeInputs']); +}); + +test('a sealed shared partner rejects a nested edit atomically before history changes', async () => { + const { get, chosen } = await nestedGuidanceFixture('wan_video_long_showcase', 'Denoise', { sealed: true }); + const before = JSON.parse(JSON.stringify(get().toObject())); + assert.throws(() => get().setParamWithHistory(chosen.node.id, chosen.field, 6), /sealed Block control/); + assert.deepEqual(get().toObject(), before); + assert.equal(get().historyPast.length, 0); +}); diff --git a/scripts/video-stage-groups.test.mjs b/scripts/video-stage-groups.test.mjs new file mode 100644 index 00000000..88723828 --- /dev/null +++ b/scripts/video-stage-groups.test.mjs @@ -0,0 +1,1295 @@ +import assert from 'node:assert/strict'; +import { canonicalGraphIdentity } from './live-proof-provenance.mjs'; +import { executionReceiptsForRun } from './template-gallery-runner.mjs'; +import { execFileSync } from 'node:child_process'; +import path from 'node:path'; +import { after, before, test } from 'node:test'; +import { createServer } from 'vite'; + +let fixture, + server, + authoring, + groups, + projection, + exporter, + templates, + builder, + exactness, + defaults, + nodes, + contracts, + starterParser, + drafts, + setupAdapters, + secondaryStages, + secondaryFixture; +before(async () => { + const backend = process.env.MODIFF_BACKEND_DIR || path.resolve('../MoDiff'); + const python = + process.env.MODIFF_BACKEND_PYTHON || + path.join(backend, '.venv', process.platform === 'win32' ? 'Scripts/python.exe' : 'bin/python'); + const selections = [ + ['WanModularPipeline', 'text_to_video'], + ['MiniMaxH3ModularPipeline', 'text_to_video_with_audio'], + ['MiniMaxH3ModularPipeline', 'first_last_frame_to_video_with_audio'], + ['MiniMaxH3ModularPipeline', 'reference_to_video_with_audio'], + ['PikaH3FlexModularPipeline', 'text_to_video_with_audio'], + ['PikaH3FlexModularPipeline', 'first_last_frame_to_video_with_audio'], + ['PikaH3FlexModularPipeline', 'reference_to_video_with_audio'], + ].map(([pipelineClass, task]) => ({ id: `${pipelineClass}:${task}`, selection: { pipelineClass, task } })); + for (const [id, modelType, pipelineClass, profile, task] of [ + ['ltx_video_text_to_video', 'LTXVideoPipeline', 'LTXConditionPipeline', 'ltx-video:direct', 'text_to_video'], + ['ltx_video_image_to_video', 'LTXVideoPipeline', 'LTXConditionPipeline', 'ltx-video:direct', 'image_to_video'], + ['ltx_video_video_to_video', 'LTXVideoPipeline', 'LTXConditionPipeline', 'ltx-video:direct', 'video_to_video'], + ['ltx_video_multi_reference', 'LTXVideoPipeline', 'LTXConditionPipeline', 'ltx-video:direct', 'reference_to_video'], + ['wan_22_ti2v_5b_seed_vault', 'WanTI2VPipeline', 'WanTI2VPipeline', 'wan-22-ti2v-5b:direct', 'text_to_video'], + [ + 'wan_vace_cinematic_text_to_video', + 'WanVideoPipeline', + 'WanPipeline', + 'wan-text-to-video:direct', + 'text_to_video', + ], + [ + 'wan_vace_video_color_grade', + 'WanVideoPipeline', + 'WanVideoToVideoPipeline', + 'wan-video-to-video:direct', + 'video_color_edit', + ], + [ + 'wan_vace_video_to_video', + 'WanVideoPipeline', + 'WanVideoToVideoPipeline', + 'wan-video-to-video:direct', + 'video_to_video', + ], + ['wan_vace_masked_object_replace', 'WanVACEPipeline', 'WanVACEPipeline', 'wan-vace:direct', 'video_inpaint'], + ['wan_vace_outpaint_reframe', 'WanVACEPipeline', 'WanVACEPipeline', 'wan-vace:direct', 'video_outpaint'], + ['wan_vace_grayscale_control', 'WanVACEPipeline', 'WanVACEPipeline', 'wan-vace:direct', 'control_to_video'], + [ + 'wan_22_i2v_seed_vault', + 'WanImageToVideoPipeline', + 'WanImageToVideoPipeline', + 'wan-22-image-to-video:direct', + 'image_to_video', + ], + ]) + selections.push({ + id, + selection: { + pipelineClass, + task, + executionProfileId: profile, + bindingSpec: { modelType, mode: task }, + authoringRecipeId: 'generic-video-stages:v1', + }, + }); + selections.push({ + id: 'unbound-vace-whole', + selection: { pipelineClass: 'WanVACEPipeline', task: 'control_to_video' }, + }); + for (const [suffix, task] of [ + ['t2v', 'text_to_video'], + ['i2v', 'image_to_video'], + ]) { + selections.push({ + id: `native-hunyuan720-${suffix}`, + selection: { + pipelineClass: 'HunyuanVideo15ModularPipeline', + task, + executionProfileId: `hunyuan-video15-720p-${suffix}:official-modular-workflow`, + }, + }); + } + fixture = JSON.parse( + execFileSync(python, [path.resolve('scripts/template-operation-fixtures.py')], { + cwd: backend, + encoding: 'utf8', + maxBuffer: 64 * 1024 ** 2, + timeout: 120_000, + input: JSON.stringify(selections), + env: { + ...process.env, + MODIFF_BACKEND_DIR: backend, + HF_HUB_OFFLINE: '1', + TRANSFORMERS_OFFLINE: '1', + PYTHONDONTWRITEBYTECODE: '1', + CUDA_VISIBLE_DEVICES: '', + }, + }), + ); + fixture.unboundVace = fixture.recipes.find((row) => row.id === 'unbound-vace-whole'); + fixture.nativeModularVideo = fixture.recipes.filter((row) => row.id.startsWith('native-hunyuan720-')); + fixture.recipes = fixture.recipes.filter( + (row) => row !== fixture.unboundVace && !fixture.nativeModularVideo.includes(row), + ); + secondaryFixture = JSON.parse( + execFileSync(python, [path.resolve('scripts/template-operation-fixtures.py')], { + cwd: backend, + encoding: 'utf8', + maxBuffer: 64 * 1024 ** 2, + timeout: 120_000, + input: JSON.stringify([ + { + id: 'soundtrack', + selection: { + pipelineClass: 'AceStepPipeline', + task: 'text_to_audio', + executionProfileId: 'ace-step-audio:direct', + repository: 'ACE-Step/acestep-v15-xl-turbo-diffusers', + }, + }, + ]), + env: { + ...process.env, + MODIFF_BACKEND_DIR: backend, + HF_HUB_OFFLINE: '1', + TRANSFORMERS_OFFLINE: '1', + PYTHONDONTWRITEBYTECODE: '1', + CUDA_VISIBLE_DEVICES: '', + }, + }), + ); + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, value), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { dispatchEvent: () => true, location: { origin: 'http://127.0.0.1:5191' }, localStorage }; + server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + authoring = await server.ssrLoadModule('/src/workflow/operationAuthoring.ts'); + groups = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + projection = await server.ssrLoadModule('/src/workflow/visualOperationGroupProjection.ts'); + exporter = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + nodes = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); + contracts = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + starterParser = await server.ssrLoadModule('/src/workflow/operationStarterRequest.ts'); + drafts = await server.ssrLoadModule('/src/workflow/workflowDraft.ts'); + setupAdapters = await server.ssrLoadModule('/src/workflow/modelSetupAdapters.ts'); + ({ STUDIO_TEMPLATES: templates } = await server.ssrLoadModule('/src/studio/templates.ts')); + secondaryStages = await server.ssrLoadModule('/src/studio/templateSecondaryStages.ts'); + const operations = contracts.parseOperationContracts( + fixture.publicPayload.operationContracts, + fixture.publicPayload.operationContractSchemaVersion, + ); + const resolved = secondaryFixture.recipes[0].starter; + const soundtrackStarter = starterParser.parseOperationStarter( + resolved, + resolved.pipelineClass, + resolved.task, + operations, + { executionProfileId: 'ace-step-audio:direct', repository: 'ACE-Step/acestep-v15-xl-turbo-diffusers' }, + ); + fixture.registry = await secondaryStages.templateSecondaryStageRegistry( + templates.find((item) => item.id === 'wan_22_ti2v_5b_seed_vault'), + fixture.registry, + nodes.parseStudioModelCapabilities(fixture.publicPayload).capabilities, + operations, + async () => soundtrackStarter, + ); + builder = await server.ssrLoadModule('/src/studio/templateOperationWorkflow.ts'); + exactness = await server.ssrLoadModule('/src/studio/templateExactness.ts'); + ({ DEFAULT_STUDIO_FORM: defaults } = await server.ssrLoadModule('/src/studio/modelProfiles.ts')); +}); +after(async () => server?.close()); + +test('native Modular video sampling and decoding share one Generate stage with unchanged export', async (t) => { + for (const row of fixture.nativeModularVideo) { + await t.test(row.id, () => { + const result = drafts.createWorkflowDraft(row.starter, fixture.registry); + const generated = result.graph.nodes.filter((node) => groups.visualOperationGroup(node) === 'generate'); + assert.equal(generated.length, 1); + if (row.starter.task === 'image_to_video') { + assert.equal(result.graph.nodes.filter((node) => groups.visualOperationGroup(node) === 'imageInput').length, 1); + } + const children = generated[0].data.blockInstanceV2.effectiveGraph.nodes; + assert.ok(children.some((node) => node.data.action === 'WorkflowHunyuanVideo15Denoise')); + assert.ok(children.some((node) => node.data.action === 'WorkflowHunyuanVideo15Decode')); + const flat = groups.unpackVisualOperationGroups(result.graph).graph; + assert.equal(flat.nodes.filter((node) => node.data.action === 'WorkflowHunyuanVideo15Denoise').length, 1); + assert.equal(flat.nodes.filter((node) => node.data.action === 'WorkflowHunyuanVideo15Decode').length, 1); + // This no-weight fixture describes a CPU host. Use its valid plain-CPU + // placement for export comparison; retain the real runtime guard. + for (const node of flat.nodes) { + if (String(node.data.params.device?.value ?? node.data.params.device?.default).startsWith('cpu')) { + if (node.data.params.offload_mode) node.data.params.offload_mode.value = 'none'; + for (const key of ['auto_offload', 'enable_auto_offload']) + if (node.data.params[key]) node.data.params[key].value = false; + } + } + const regrouped = groups.groupNewOperationGraph(flat); + assert.ok( + Object.keys( + exporter.useFlowStore + .getState() + .exportGraph('native-stage-proof', undefined, { sourceGraph: flat, randomizeSeeds: false }).nodes, + ).length >= 5, + ); + assert.deepEqual( + canonicalGraphIdentity( + exporter.useFlowStore + .getState() + .exportGraph('native-stage-proof', undefined, { sourceGraph: flat, randomizeSeeds: false }), + ), + canonicalGraphIdentity( + exporter.useFlowStore + .getState() + .exportGraph('native-stage-proof', undefined, { sourceGraph: regrouped, randomizeSeeds: false }), + ), + ); + }); + } +}); + +test('native Generate grouping refuses mismatched task, state type or component owner', () => { + const row = fixture.nativeModularVideo.find((row) => row.starter.task === 'text_to_video'); + for (const fault of ['task', 'type', 'owner']) { + const graph = authoring.createOperationStarter(structuredClone(row.starter), { x: 0, y: 0 }); + const owner = graph.nodes.find((node) => node.data.action === 'ModelsLoader'); + const decoder = graph.nodes.find((node) => node.data.action === 'WorkflowHunyuanVideo15Decode'); + if (fault === 'task') decoder.data.operationAuthoring.operation.task = 'image_to_video'; + else if (fault === 'type') decoder.data.params.state_in.type = 'image'; + else + graph.edges.find((edge) => edge.target === decoder.id && edge.targetHandle === 'pipeline_components').source = + 'different-owner'; + const result = groups.groupOperationStages(graph, owner.id, ['generate']); + assert.equal(result.nodes.filter((node) => groups.visualOperationGroup(node) === 'generate').length, 0, fault); + } +}); + +test('joint video/audio presentation retains both declared families without granting qualification', () => { + const parsed = nodes.parseStudioModelCapabilities(fixture.publicPayload); + for (const model of ['MiniMaxH3ModularPipeline', 'PikaH3FlexModularPipeline']) { + const capability = parsed.capabilities.find((item) => item.modelType === model); + assert.ok(capability, `${model} must survive presentation parsing`); + assert.deepEqual(capability.modes, [ + 'text_to_video_with_audio', + 'first_last_frame_to_video_with_audio', + 'reference_to_video_with_audio', + ]); + assert.equal(capability.autoEligible, false); + assert.equal(capability.templateEligible, false); + assert.equal(capability.galleryEligible, false); + assert.equal(capability.liveProof, false); + } +}); + +test('fresh joint video/audio drafts attach one typed joined exporter and Video Output stage', async (t) => { + for (const row of fixture.recipes.filter((item) => item.starter.task.endsWith('_with_audio'))) + await t.test(row.id, () => { + const result = drafts.createWorkflowDraft(row.starter, fixture.registry); + const flat = groups.unpackVisualOperationGroups(result.graph).graph; + const outputs = flat.nodes.filter( + (node) => node.data.module === 'modules.Video' && node.data.action === 'ExportWithAudio', + ); + assert.equal(outputs.length, 1, 'the ordinary creation path must retain the joint soundtrack'); + const wires = flat.edges.filter((edge) => edge.target === outputs[0].id); + assert.deepEqual(wires.map((edge) => edge.targetHandle).sort(), ['audio', 'video']); + assert.equal(new Set(wires.map((edge) => edge.source)).size, 1, 'both streams come from the same producer'); + assert.equal(result.graph.nodes.filter((node) => groups.visualOperationGroup(node) === 'output').length, 1); + assert.ok(!flat.nodes.some((node) => node.data.module === 'modules.Audio' && node.data.action === 'Preview')); + }); +}); + +test('a missing or incompatible joined exporter never creates a partial audio/video connection', () => { + const row = fixture.recipes.find((item) => item.id === 'MiniMaxH3ModularPipeline:text_to_video_with_audio'); + const original = structuredClone(fixture.registry); + for (const incompatible of [false, true]) { + const registry = structuredClone(fixture.registry); + if (incompatible) registry['modules.Video.ExportWithAudio'].params.audio.type = 'image'; + else delete registry['modules.Video.ExportWithAudio']; + const result = drafts.createWorkflowDraft(row.starter, registry); + const flat = groups.unpackVisualOperationGroups(result.graph).graph; + assert.ok(!flat.nodes.some((node) => node.data.action === 'ExportWithAudio')); + assert.ok(result.notices.some((notice) => notice.includes('joined video/audio'))); + } + assert.deepEqual(fixture.registry, original); +}); + +test('one ambiguous union output is not treated as two simultaneous media streams', () => { + const starter = structuredClone( + fixture.recipes.find((item) => item.id === 'MiniMaxH3ModularPipeline:text_to_video_with_audio').starter, + ); + const producer = starter.nodes.find((node) => + node.operation.ports.some((port) => port.direction === 'output' && port.types.includes('audio')), + ); + producer.operation.ports = producer.operation.ports.filter( + (port) => port.direction !== 'output' || !port.types.includes('audio'), + ); + producer.operation.ports.find((port) => port.direction === 'output' && port.types.includes('video')).types = [ + 'video', + 'audio', + ]; + const result = drafts.createWorkflowDraft(starter, fixture.registry); + const flat = groups.unpackVisualOperationGroups(result.graph).graph; + assert.ok(!flat.nodes.some((node) => node.data.action === 'ExportWithAudio')); +}); + +function graphFor(row) { + const graph = authoring.createOperationStarter(structuredClone(row.starter), { x: 0, y: 0 }); + for (const node of graph.nodes) + if (String(node.data.params.device?.value ?? node.data.params.device?.default).startsWith('cpu')) { + if (node.data.params.offload_mode) node.data.params.offload_mode.value = 'none'; + if (node.data.params.auto_offload) node.data.params.auto_offload.value = false; + } + const audio = row.starter.task.includes('audio'); + graph.nodes.push({ + id: 'video-export', + type: 'custom', + position: { x: 1800, y: 0 }, + data: structuredClone(fixture.registry[`modules.Video.${audio ? 'ExportWithAudio' : 'Export'}`]), + }); + for (const media of audio ? ['video', 'audio'] : ['video']) { + const sources = graph.nodes.filter( + (node) => + node.id !== 'video-export' && + Object.values(node.data.params).some((field) => field.display === 'output' && field.type === media), + ); + assert.equal(sources.length, 1, `one real final ${media} producer`); + const port = Object.entries(sources[0].data.params).find( + ([, field]) => field.display === 'output' && field.type === media, + )[0]; + graph.edges.push({ + id: `export-${media}`, + source: sources[0].id, + sourceHandle: port, + target: 'video-export', + targetHandle: media, + }); + } + return graph; +} + +test('encoded video stages require their real encoding instead of duplicate raw media, including restored schemas', async () => { + const { inspectRequiredGraphInputs } = await server.ssrLoadModule('/src/studio/requiredGraphInputs.ts'); + const { inspectBlockMediaInputsV2 } = await server.ssrLoadModule('/src/studio/blockMediaReadinessV2.ts'); + const operations = contracts.parseOperationContracts(fixture.publicPayload.operationContracts, 3); + for (const row of fixture.recipes.filter((item) => item.starter.pipelineClass === 'WanVACEPipeline')) { + const graph = graphFor(row); + const render = graph.nodes.find( + (node) => node.data.operationAuthoring?.operation.operationId === 'diffusion.render_video', + ); + assert.ok(render, row.id); + // An old saved instance still has the whole-operation raw-media overlay. + for (const name of ['video', 'mask']) render.data.params[name].required = true; + const before = structuredClone(graph); + const required = () => + inspectRequiredGraphInputs(graph.nodes, graph, fixture.registry, operations).filter( + (issue) => issue.nodeId === render.id, + ); + const media = () => + inspectBlockMediaInputsV2(graph.nodes, graph, operations, fixture.registry).filter( + (issue) => issue.nodeId === render.id, + ); + assert.deepEqual(required(), [], row.id); + assert.deepEqual(media(), [], row.id); + assert.deepEqual(graph, before, 'inspection must not rewrite a restored workflow'); + const wire = graph.edges.find((edge) => edge.target === render.id && edge.targetHandle === 'encoded_inputs'); + assert.ok(wire); + graph.edges = graph.edges.filter((edge) => edge !== wire); + assert.deepEqual( + required().map((issue) => issue.fieldId), + ['encoded_inputs'], + ); + graph.edges.push(wire); + const encoder = graph.nodes.find((node) => node.id === wire.source); + encoder.data.uiState = { disabled: true }; + assert.deepEqual( + required().map((issue) => issue.fieldId), + ['encoded_inputs'], + ); + delete encoder.data.uiState; + const output = encoder.data.params[wire.sourceHandle]; + const type = output.type; + output.type = 'image'; + assert.deepEqual( + required().map((issue) => issue.fieldId), + ['encoded_inputs'], + ); + output.type = type; + assert.deepEqual(required(), []); + const strictRegistry = structuredClone(fixture.registry); + strictRegistry['modules.DiffusersVideo.Generate'].params.video.required = true; + assert.ok( + inspectRequiredGraphInputs(graph.nodes, graph, strictRegistry, []).some( + (issue) => issue.nodeId === render.id && issue.fieldId === 'video', + ), + 'saved hints cannot narrow registry requirements without current backend authority', + ); + render.data.operationAuthoring.operation.ports.find((port) => port.name === 'encoded_inputs').required = false; + graph.edges = graph.edges.filter((edge) => edge !== wire); + assert.deepEqual( + required().map((issue) => issue.fieldId), + ['encoded_inputs'], + 'saved port metadata cannot relax current backend requiredness', + ); + graph.edges.push(wire); + render.data.params.mode.isConnected = true; + assert.ok( + inspectRequiredGraphInputs(graph.nodes, graph, strictRegistry, operations).some( + (issue) => issue.nodeId === render.id && issue.fieldId === 'video', + ), + 'computed selectors do not establish a literal bundle selection', + ); + } +}); + +function api(graph) { + const result = exporter.useFlowStore + .getState() + .exportGraph('video-stage-contract', undefined, { sourceGraph: graph, randomizeSeeds: false }); + const keys = Object.values(result.nodes).map((node) => `${node.module}.${node.action}`); + const names = new Map( + Object.entries(result.nodes).map(([id, node]) => { + const key = `${node.module}.${node.action}`; + const consumers = Object.values(result.nodes) + .flatMap((consumer) => + Object.entries(consumer.params ?? {}) + .filter(([, value]) => value?.sourceId === id) + .map(([field]) => `${consumer.module}.${consumer.action}.${field}`), + ) + .sort(); + return [id, keys.filter((item) => item === key).length === 1 ? key : `${key}:${consumers.join(',')}`]; + }), + ); + assert.equal(new Set(names.values()).size, names.size); + const normalize = (value) => + Array.isArray(value) + ? value.map(normalize) + : value && typeof value === 'object' + ? Object.fromEntries( + Object.entries(value).map(([key, item]) => [ + key, + key === 'sourceId' ? (names.get(item) ?? item) : normalize(item), + ]), + ) + : value; + // Presentation may choose another valid ordering of independent suppliers. + // Compare every exact node input/connection and scope membership, and require + // actual dependencies to precede their consumers in both exported orders. + const suppliers = (value) => + Array.isArray(value) + ? value.flatMap(suppliers) + : value && typeof value === 'object' + ? [...(typeof value.sourceId === 'string' ? [value.sourceId] : []), ...Object.values(value).flatMap(suppliers)] + : []; + for (const route of result.paths) + for (const id of route) + for (const source of suppliers(result.nodes[id])) { + assert.ok( + route.indexOf(source) >= 0 && route.indexOf(source) < route.indexOf(id), + 'connected supplier precedes its consumer', + ); + } + return { + nodes: Object.fromEntries( + [...names].map(([id, name]) => [name, normalize(result.nodes[id])]).sort(([a], [b]) => a.localeCompare(b)), + ), + paths: result.paths + .map((route) => route.map((id) => names.get(id) ?? id).sort()) + .sort((a, b) => JSON.stringify(a).localeCompare(JSON.stringify(b))), + }; +} + +test('actual video workflows group real encoders and decoder/export without changing execution', async (t) => { + for (const row of fixture.recipes) + await t.test(row.id, () => { + const graph = graphFor(row), + original = structuredClone(graph); + const grouped = groups.groupNewOperationGraph(graph); + const inputs = grouped.nodes.filter((node) => groups.visualOperationGroup(node) === 'inputs'); + const outputs = grouped.nodes.filter((node) => groups.visualOperationGroup(node) === 'output'); + assert.equal(inputs.length, 1); + assert.equal(outputs.length, 1); + assert.equal(outputs[0].data.label, 'Video Output'); + assert.equal(projection.visualOperationGroupMedia(outputs[0]), 'video'); + assert.equal(outputs[0].data.blockInstanceV2.previewStates[0].binding.mediaType, 'video'); + assert.equal( + inputs[0].data.blockInstanceV2.effectiveGraph.nodes.some( + (node) => node.data.operationAuthoring.operation.nodeType === 'denoise', + ), + false, + ); + const expectedEncoders = graph.nodes.filter((node) => + ['text_encoder', 'vae_encoder', 'before_encode', 'video_encoder'].includes( + node.data.operationAuthoring?.operation.nodeType, + ), + ); + assert.equal(inputs[0].data.blockInstanceV2.effectiveGraph.nodes.length, expectedEncoders.length); + assert.deepEqual(api(grouped), api(original)); + assert.deepEqual(api(groups.unpackVisualOperationGroups(grouped).graph), api(original)); + assert.deepEqual(graph, original); + const restored = JSON.parse(JSON.stringify(grouped)); + assert.deepEqual(api(restored), api(original), 'ordinary saved graph reopens with exact values and connections'); + }); +}); + +test('direct video Model Setup explains unavailable inline adapters without blaming valid consumers', () => { + for (const id of ['ltx_video_text_to_video', 'wan_22_ti2v_5b_seed_vault']) { + const row = fixture.recipes.find((item) => item.id === id); + assert.ok(row, id); + const graph = groups.groupNewOperationGraph(graphFor(row)); + const setup = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'setup'); + assert.ok(setup, id); + const before = api(graph); + assert.throws( + () => setupAdapters.modelSetupAdapterChain(graph, setup.id), + /LoRA editing is not available for this pipeline type/, + ); + assert.deepEqual(api(graph), before, 'read-only limitation leaves the complete video graph intact'); + } +}); + +test('fresh ordinary native video keeps sampling and decode in Generate and delivery in Video Output', () => { + const row = fixture.recipes.find((item) => item.id === 'ltx_video_text_to_video'); + const original = graphFor(row); + const graph = groups.groupNewOperationGraph(original); + const generate = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'generate'); + const output = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'output'); + assert.ok(generate, 'an adjacent native decoder must not be consumed by Output before Generate is built'); + assert.deepEqual(generate.data.blockInstanceV2.effectiveGraph.nodes.map((node) => node.data.action).sort(), [ + 'DecodeLatents', + 'Denoise', + ]); + assert.deepEqual( + output.data.blockInstanceV2.effectiveGraph.nodes.map((node) => node.data.action), + ['Export'], + ); + assert.deepEqual(api(graph), api(original)); +}); + +test('soundtrack secondary owner receives the same Model Setup grouping as standalone audio', () => { + const template = templates.find((item) => item.id === 'wan_22_ti2v_5b_seed_vault'); + const row = fixture.recipes.find((item) => item.id === template.id); + const parsed = nodes.parseStudioModelCapabilities(fixture.publicPayload); + const operations = contracts.parseOperationContracts( + fixture.publicPayload.operationContracts, + fixture.publicPayload.operationContractSchemaVersion, + ); + const capability = parsed.capabilities.find((item) => item.modelType === template.modelType); + const spec = capability.studioExecutionSpecs.find((item) => item.mode === template.mode); + const starter = starterParser.parseOperationStarter( + row.starter, + row.starter.pipelineClass, + row.starter.task, + operations, + { executionProfileId: row.spec.executionProfileId, authoringRecipeId: 'generic-video-stages:v1' }, + ); + const form = { + ...defaults, + ...exactness.getTemplateLockedSettings(template), + device: 'cpu:0', + offloadMode: 'none', + autoOffload: false, + }; + const graph = builder.createTemplateOperationGraph(template, form, starter, fixture.registry, spec, capability, { + operationContracts: operations, + studioModelCapabilities: parsed.capabilities, + }); + const setups = graph.nodes.filter((node) => groups.visualOperationGroup(node) === 'setup'); + assert.equal(setups.length, 2, 'video and soundtrack need independent declared Model Setup stages'); + const audioSetup = setups.find((node) => + node.data.blockInstanceV2.effectiveGraph.nodes.some( + (leaf) => leaf.data.module === 'modules.DiffusersAudio' && leaf.data.action === 'LoadPipeline', + ), + ); + assert.ok(audioSetup, 'the actual ACE loader and its exclusive recipe must be grouped'); + assert.deepEqual(audioSetup.data.blockInstanceV2.effectiveGraph.nodes.map((node) => node.data.action).sort(), [ + 'DiffusersExecutionRecipe', + 'LoadPipeline', + 'PipelineQuantizationConfigV2', + ]); + const flattened = groups.unpackVisualOperationGroups(graph).graph; + assert.equal(flattened.nodes.filter((node) => node.data.action === 'LoadPipeline').length, 2); + const compiled = exporter.useFlowStore + .getState() + .exportGraph('video-stage-contract', undefined, { sourceGraph: graph, randomizeSeeds: false }); + const soundtrackOwner = Object.values(compiled.nodes).find( + ({ module, action }) => module === 'modules.DiffusersAudio' && action === 'LoadPipeline', + ); + assert.equal(soundtrackOwner?.params.mode.value, 'text_to_audio'); + assert.equal(flattened.nodes.filter((node) => node.data.action === 'FitDuration').length, 1); + assert.equal(flattened.nodes.filter((node) => node.data.action === 'ExportWithAudio').length, 1); +}); + +test('secondary stage resolution rejects a different immutable model without changing registry data', async () => { + const template = templates.find((item) => item.id === 'wan_22_ti2v_5b_seed_vault'); + const capability = nodes.parseStudioModelCapabilities(fixture.publicPayload).capabilities; + const operations = contracts.parseOperationContracts( + fixture.publicPayload.operationContracts, + fixture.publicPayload.operationContractSchemaVersion, + ); + const before = structuredClone(secondaryFixture.registry); + const row = secondaryFixture.recipes[0].starter; + const starter = starterParser.parseOperationStarter(row, row.pipelineClass, row.task, operations, { + executionProfileId: 'ace-step-audio:direct', + repository: template.workflowBlockSettings.soundtrack.model.value, + }); + const foreign = structuredClone(starter); + const owner = foreign.nodes.find((item) => contracts.operationOwnsModel(item.operation)); + owner.node.params.revision.value = '0'.repeat(40); + await assert.rejects( + secondaryStages.templateSecondaryStageRegistry( + template, + secondaryFixture.registry, + capability, + operations, + async () => foreign, + ), + /different immutable soundtrack model/, + ); + assert.deepEqual(secondaryFixture.registry, before); +}); + +test('retained video template factories preserve creative settings on their exact latent starters', () => { + const parsed = nodes.parseStudioModelCapabilities(fixture.publicPayload); + const operations = contracts.parseOperationContracts( + fixture.publicPayload.operationContracts, + fixture.publicPayload.operationContractSchemaVersion, + ); + for (const row of fixture.recipes.filter( + (row) => row.spec && !row.id.startsWith('wan_vace_') && row.id !== 'wan_22_i2v_seed_vault', + )) { + const template = templates.find((template) => template.id === row.id); + assert.ok(template?.executionSelection, row.id); + const capability = parsed.capabilities.find((capability) => capability.modelType === template.modelType); + const spec = capability.studioExecutionSpecs.find((spec) => spec.mode === template.mode); + const starter = starterParser.parseOperationStarter( + row.starter, + row.starter.pipelineClass, + row.starter.task, + operations, + { executionProfileId: row.spec.executionProfileId, authoringRecipeId: 'generic-video-stages:v1' }, + ); + const form = { + ...defaults, + ...exactness.getTemplateLockedSettings(template), + device: 'cpu:0', + offloadMode: 'none', + autoOffload: false, + referenceImages: ['images/reference.webp'], + sourceVideo: 'videos/source.mp4', + }; + const graph = builder.createTemplateOperationGraph(template, form, starter, fixture.registry, spec, capability); + const generate = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'generate'); + const newStages = graph.nodes.filter((node) => + ['generate', 'videoInput'].includes(groups.visualOperationGroup(node)), + ); + const ordinary = groups.unpackVisualOperationGroups(graph, new Set(newStages.map((node) => node.id))).graph; + const identity = (sourceGraph) => + canonicalGraphIdentity( + exporter.useFlowStore.getState().exportGraph('presentation', undefined, { sourceGraph, randomizeSeeds: false }), + ).hash; + assert.equal( + identity(graph), + identity(ordinary), + `${row.id} must preserve execution order as well as values and wires`, + ); + assert.ok(generate, `${row.id} should show Generate before the upscaler or joined delivery`); + assert.deepEqual(generate.data.blockInstanceV2.effectiveGraph.nodes.map((n) => n.data.action).sort(), [ + 'DecodeLatents', + 'Denoise', + ]); + assert.ok( + !generate.data.blockInstanceV2.effectiveInterface.boundary.outputs.some((p) => + ['latents_out', 'latent_binding'].includes(p.binding.fieldOrPortId), + ), + ); + assert.equal( + generate.data.blockInstanceV2.effectiveInterface.boundary.inputs.filter( + (p) => p.binding.fieldOrPortId === 'pipeline', + ).length, + 1, + ); + if (row.id === 'ltx_video_video_to_video') { + const input = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'videoInput'); + assert.ok(input); + assert.deepEqual(input.data.blockInstanceV2.effectiveGraph.nodes.map((n) => n.data.action).sort(), [ + 'Load', + 'Normalize', + ]); + const fields = input.data.blockInstanceV2.effectiveInterface.controls.map((c) => c.binding.fieldId); + for (const field of ['file', 'width', 'height', 'num_frames', 'fit']) assert.ok(fields.includes(field), field); + const flatInput = groups.unpackVisualOperationGroups(graph).graph; + assert.deepEqual(api(JSON.parse(JSON.stringify(graph))), api(flatInput)); + } + const flat = groups.unpackVisualOperationGroups(graph).graph; + for (const recipe of flat.nodes.filter((node) => node.data.action === 'DiffusersExecutionRecipe')) + assert.equal(recipe.data.params.attention_backend.value, 'auto', `${row.id}:fresh attention`); + for (const attentionBackend of ['_native_math', '_native_flash']) { + const authoredGraph = builder.createTemplateOperationGraph( + template, + { ...form, attentionBackend }, + starter, + fixture.registry, + spec, + capability, + ); + const authoredRecipes = groups + .unpackVisualOperationGroups(authoredGraph) + .graph.nodes.filter((node) => node.data.action === 'DiffusersExecutionRecipe'); + for (const authoredRecipe of authoredRecipes) + assert.equal(authoredRecipe.data.params.attention_backend.value, attentionBackend); + } + assert.ok( + !flat.nodes.some((node) => node.data.module === 'modules.DiffusersVideo' && node.data.action === 'Generate'), + ); + const encoder = flat.nodes.find((node) => node.data.action === 'EncodeInputs'); + const denoiser = flat.nodes.find((node) => node.data.action === 'Denoise'); + assert.equal(encoder.data.params.prompt.value, form.prompt); + assert.deepEqual(denoiser.data.params.seed.value, { value: form.seed, isRandom: false }); + for (const [key, value] of [ + ['width', form.width], + ['height', form.height], + ['num_frames', form.numFrames], + ['num_inference_steps', form.steps], + ]) + assert.equal(denoiser.data.params[key].value, value, `${row.id}:${key}`); + const decoder = flat.nodes.find((node) => node.data.action === 'DecodeLatents'); + const exportNode = flat.nodes.find( + (node) => node.data.module === 'modules.Video' && node.data.action.startsWith('Export'), + ); + assert.ok(decoder && exportNode, 'real video decode and delivery are retained'); + const videoWire = flat.edges.find((edge) => edge.target === exportNode.id && edge.targetHandle === 'video'); + if (template.workflowBlocks?.includes('upscaler')) { + const upscale = flat.nodes.find((node) => node.data.module === 'modules.Spandrel'); + assert.deepEqual(upscale.data.params.model_id.value, template.workflowBlockSettings.upscaler.model); + assert.equal(videoWire.source, upscale.id); + assert.ok(flat.edges.some((edge) => edge.source === decoder.id && edge.target === upscale.id)); + assert.equal( + graph.nodes.filter((node) => groups.visualOperationGroup(node) === 'output').length, + 1, + 'an interposed upscale keeps its own stage before Video Output', + ); + } else assert.equal(videoWire.source, decoder.id); + if (template.workflowBlocks?.includes('soundtrack')) { + assert.equal(exportNode.data.action, 'ExportWithAudio'); + const soundtrack = flat.nodes.find( + (node) => node.data.module === 'modules.DiffusersAudio' && node.data.action === 'Generate', + ); + const fit = flat.nodes.find((node) => node.data.module === 'modules.Audio' && node.data.action === 'FitDuration'); + const audioOwner = flat.nodes.find( + (node) => node.data.module === 'modules.DiffusersAudio' && node.data.action === 'LoadPipeline', + ); + const settings = template.workflowBlockSettings.soundtrack; + assert.equal(soundtrack.data.params.prompt.value, settings.prompt); + assert.equal(soundtrack.data.params.seed.value, settings.seed); + assert.deepEqual(audioOwner.data.params.model_id.value, { + source: settings.model.source, + value: settings.model.value, + }); + assert.equal(audioOwner.data.params.revision.value, settings.model.revision); + assert.equal(fit.data.params.target_duration_seconds.value, settings.audioFit.targetDurationSeconds); + assert.ok( + flat.edges.some( + (edge) => edge.source === soundtrack.id && edge.target === fit.id && edge.targetHandle === 'audio', + ), + ); + assert.ok( + flat.edges.some( + (edge) => edge.source === fit.id && edge.target === exportNode.id && edge.targetHandle === 'audio', + ), + ); + assert.equal( + graph.nodes.filter((node) => groups.visualOperationGroup(node) === 'output').length, + 0, + 'independently generated audio is not presented as a joint decoder', + ); + } + } +}); + +test('new single-shot templates expose the agreed source, mask, generate and delivery stages', () => { + const parsed = nodes.parseStudioModelCapabilities(fixture.publicPayload); + for (const row of fixture.recipes.filter( + (row) => row.spec && (row.id.startsWith('wan_vace_') || row.id === 'wan_22_i2v_seed_vault'), + )) { + const template = templates.find((item) => item.id === row.id); + const capability = parsed.capabilities.find((item) => item.modelType === template.modelType); + const spec = capability.studioExecutionSpecs.find((item) => item.mode === template.mode); + const form = { + ...defaults, + ...exactness.getTemplateLockedSettings(template), + device: 'cpu:0', + offloadMode: 'none', + autoOffload: false, + referenceImages: ['images/reference.png'], + sourceVideo: 'videos/source.mp4', + controlVideo: 'videos/control.mp4', + maskVideo: 'videos/mask.mp4', + }; + const graph = builder.createTemplateOperationGraph(template, form, row.starter, fixture.registry, spec, capability); + const kinds = graph.nodes.map((node) => groups.visualOperationGroup(node)); + for (const kind of ['setup', 'inputs', 'output']) assert.ok(kinds.includes(kind), `${row.id}:${kind}`); + const groupedGenerate = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'generate'); + const ordinaryGenerate = graph.nodes.find( + (node) => node.data.module === 'modules.DiffusersVideo' && node.data.action === 'Generate', + ); + if (ordinaryGenerate) { + assert.equal(template.modelType, 'WanVACEPipeline'); + assert.equal(ordinaryGenerate.data.blockInstanceV2, undefined); + assert.equal(groupedGenerate, undefined); + } else { + assert.ok(groupedGenerate, `${row.id}:generate`); + assert.ok(groupedGenerate.data.blockInstanceV2.effectiveGraph.nodes.length > 1); + } + if ( + ['video_color_edit', 'video_to_video', 'video_inpaint', 'video_outpaint', 'control_to_video'].includes( + template.mode, + ) + ) { + const input = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'videoInput'); + assert.ok(input, row.id); + const file = input.data.blockInstanceV2.effectiveInterface.controls.find( + (control) => control.binding.fieldId === 'file', + ); + assert.ok(file, `${row.id}: the source picker and its inline preview remain available`); + const load = input.data.blockInstanceV2.effectiveGraph.nodes.find((node) => node.nodeId === file.binding.nodeId); + assert.ok(load.data.params.file.fieldOptions.fileTypes.includes('video')); + } + if (['video_inpaint', 'video_outpaint'].includes(template.mode)) assert.ok(kinds.includes('mask'), row.id); + if (template.mode === 'video_inpaint') assert.ok(kinds.includes('references'), row.id); + if (template.mode === 'image_to_video') assert.ok(kinds.includes('imageInput'), row.id); + const flat = groups.unpackVisualOperationGroups(graph).graph; + if (template.mode === 'video_outpaint') { + const canvas = flat.nodes.find((node) => node.data.action === 'OutpaintCanvas'); + assert.equal(canvas.data.params.preparation.value, 'prepared'); + assert.equal(canvas.data.params.prepared_mask_file.value, form.maskVideo); + for (const field of ['preparation', 'prepared_mask_file', 'left', 'right', 'top', 'bottom']) + assert.ok( + graph.nodes + .find((node) => groups.visualOperationGroup(node) === 'mask') + .data.blockInstanceV2.effectiveInterface.controls.some((control) => control.binding.fieldId === field), + ); + const encoder = flat.nodes.find((node) => node.data.action === 'EncodeInputs'); + assert.ok( + flat.edges.some( + (edge) => + edge.source === canvas.id && + edge.sourceHandle === 'canvas' && + edge.target === encoder.id && + edge.targetHandle === 'video', + ), + ); + } + const actual = flat.nodes.find( + (node) => node.data.action === (template.modelType === 'WanVACEPipeline' ? 'Generate' : 'Denoise'), + ); + const seed = actual.data.params.seed.value; + assert.equal(typeof seed === 'object' ? seed.value : seed, form.seed); + assert.equal(actual.data.params.num_inference_steps.value, form.steps); + assert.deepEqual(api(JSON.parse(JSON.stringify(graph))), api(flat)); + } +}); + +test('soundtrack field projection preserves managed selector metadata and exact fresh-field revision', async () => { + const values = await server.ssrLoadModule('/src/studio/controlledWorkflowValues.ts'); + const settings = templates.find((item) => item.id === 'wan_22_ti2v_5b_seed_vault').workflowBlockSettings.soundtrack; + const fresh = values.soundtrackWorkflowFieldValues(settings, defaults); + const managed = values.soundtrackWorkflowFieldValues(settings, defaults, { retainSelectorMetadata: true }); + const value = (set, field) => set.pipeline.find((row) => row.fields.includes(field)).value; + assert.deepEqual(value(managed, 'model_id'), settings.model); + assert.equal(value(managed, 'model_id').revision, '200ba991ae448051e14b0183157e35c2d27c9fb0'); + assert.deepEqual(value(fresh, 'model_id'), { source: settings.model.source, value: settings.model.value }); + assert.equal(value(fresh, 'revision'), settings.model.revision); + assert.equal(value(managed, 'revision'), settings.model.revision); +}); + +test('joint video output keeps audio connected and refuses an independently supplied soundtrack', () => { + const row = fixture.recipes.find((row) => row.starter.task.includes('audio')); + const graph = graphFor(row); + graph.edges.find((edge) => edge.target === 'video-export' && edge.targetHandle === 'audio').source = 'external-audio'; + const result = groups.groupNewOperationGraph(graph); + assert.equal( + result.nodes.some((node) => groups.visualOperationGroup(node) === 'output'), + false, + ); +}); + +test('the exact VACE catalog keeps whole-operation drafts separate from encoded-stage alternatives', () => { + const operations = contracts.parseOperationContracts(fixture.publicPayload.operationContracts, 3); + const original = fixture.unboundVace.starter; + const parse = (value) => starterParser.parseOperationStarter(value, value.pipelineClass, value.task, operations); + assert.equal(parse(original).nodes.length, 2); + const whole = original.nodes.find((node) => node.node.action === 'Generate'); + assert.equal(whole.operation.operationId, 'diffusion.generate_video'); + assert.equal(whole.operation.decomposition, 'pipeline'); + const mixed = structuredClone(original); + const staged = fixture.recipes.find((row) => row.id === 'wan_vace_grayscale_control').starter; + mixed.nodes.push(structuredClone(staged.nodes.find((node) => node.operation.nodeType === 'video_encoder'))); + mixed.edges.push(structuredClone(staged.edges.find((edge) => edge.targetHandle === 'pipeline'))); + assert.throws(() => parse(mixed), 'a partial mixture never becomes either declared route'); + assert.deepEqual(fixture.unboundVace.starter, original); +}); + +test('selected video starters reject missing ownership wires, partial stages and foreign task metadata', () => { + const operations = contracts.parseOperationContracts(fixture.publicPayload.operationContracts, 3); + for (const row of fixture.recipes.filter((item) => item.spec)) { + const rendered = row.starter.pipelineClass === 'WanVACEPipeline'; + const parse = (value) => + starterParser.parseOperationStarter(value, value.pipelineClass, value.task, operations, { + executionProfileId: row.spec.executionProfileId, + authoringRecipeId: 'generic-video-stages:v1', + }); + for (const field of rendered + ? ['encoded_inputs', 'pipeline'] + : ['encoded_inputs', 'latent_binding', 'latents', 'pipeline']) { + const value = structuredClone(row.starter); + const index = value.edges.findIndex((edge) => edge.targetHandle === field); + assert.ok(index >= 0); + value.edges.splice(index, 1); + assert.throws(() => parse(value), `${row.id}: missing ${field}`); + } + for (const change of [ + (value) => value.nodes.push(structuredClone(value.nodes[0])), + (value) => + (value.nodes.find((item) => item.operation.nodeType === 'denoise').operation.task = 'foreign_video_task'), + (value) => + value.edges.push( + structuredClone( + value.edges.find((edge) => edge.targetHandle === (rendered ? 'encoded_inputs' : 'latent_binding')), + ), + ), + ]) { + const value = structuredClone(row.starter); + change(value); + assert.throws(() => parse(value)); + } + } +}); + +test('the same video stages preserve authored prompt and sampling values across LTX and Wan model changes', () => { + const rows = ['ltx_video_text_to_video', 'wan_22_ti2v_5b_seed_vault'].map((id) => + fixture.recipes.find((row) => row.id === id), + ); + for (const [source, target] of [rows, [...rows].reverse()]) { + const graph = graphFor(source); + const encoder = graph.nodes.find((node) => node.data.action === 'EncodeInputs'); + const denoiser = graph.nodes.find((node) => node.data.action === 'Denoise'); + encoder.data.params.prompt.value = 'An amber paper boat travels slowly across a quiet pond.'; + denoiser.data.params.seed.value = { value: 714, isRandom: false }; + denoiser.data.params.num_frames.value = 81; + // Ordinary setParam records an explicit edit even when the chosen value + // equals the old model's default. Preserve that real authoring intent. + authoring.operationAuthoring(denoiser).authored = ['seed', 'num_frames']; + const owner = graph.nodes.find((node) => node.data.action === 'LoadPipeline'); + const original = structuredClone(graph); + const changed = authoring.planOperationChange(graph, owner.id, target.starter, { + replaceModel: true, + baseline: source.starter, + }); + assert.deepEqual(graph, original); + for (const action of ['EncodeInputs', 'Denoise', 'DecodeLatents']) + assert.equal(changed.graph.nodes.filter((node) => node.data.action === action).length, 1); + assert.equal( + changed.graph.nodes.find((node) => node.data.action === 'EncodeInputs').data.params.prompt.value, + encoder.data.params.prompt.value, + ); + assert.deepEqual( + changed.graph.nodes.find((node) => node.data.action === 'Denoise').data.params.seed.value, + denoiser.data.params.seed.value, + ); + assert.equal(changed.graph.nodes.find((node) => node.data.action === 'Denoise').data.params.num_frames.value, 81); + assert.ok(changed.graph.edges.some((edge) => edge.target === 'video-export' && edge.targetHandle === 'video')); + } +}); + +test('video output requires a real file-backed video exporter', () => { + for (const mutate of [ + (sink) => { + sink.data.module = 'modules.Unknown'; + }, + (sink) => { + sink.data.params.preview.display = 'ui_image'; + }, + (sink) => { + sink.data.params.file.type = 'image'; + }, + (sink) => { + sink.data.params.preview.dataSource = 'unrelated'; + }, + ]) { + const graph = graphFor(fixture.recipes[0]); + mutate(graph.nodes.find((node) => node.id === 'video-export')); + assert.equal( + groups.groupNewOperationGraph(graph).nodes.some((node) => groups.visualOperationGroup(node) === 'output'), + false, + ); + } +}); + +test('video output wording follows the declared decoder after removing the preview', () => { + const result = groups.groupNewOperationGraph( + graphFor(fixture.recipes.find((row) => row.starter.task.includes('audio'))), + ); + const output = result.nodes.find((node) => groups.visualOperationGroup(node) === 'output'); + assert.ok(output); + output.data.blockInstanceV2.effectiveGraph.nodes = output.data.blockInstanceV2.effectiveGraph.nodes.filter( + (node) => node.data.module !== 'modules.Video', + ); + assert.deepEqual(projection.visualStagePresentation('output', projection.visualOperationGroupMedia(output)), { + label: 'Video Output', + name: 'video output', + }); +}); + +test('fresh task drafts retain the real exporter and the adjacent decoder in their selected stages', () => { + for (const row of fixture.recipes.filter((item) => item.spec && item.starter.task === 'text_to_video')) { + const starter = structuredClone(row.starter); + for (const { node } of starter.nodes) + if (String(node.params.device?.value ?? node.params.device?.default).startsWith('cpu')) { + if (node.params.offload_mode) node.params.offload_mode.value = 'none'; + if (node.params.auto_offload) node.params.auto_offload.value = false; + } + const { graph } = drafts.createWorkflowDraft(starter, fixture.registry); + const output = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'output'); + assert.ok(output, row.id); + const leaves = output.data.blockInstanceV2.effectiveGraph.nodes; + const generate = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'generate'); + assert.ok(generate.data.blockInstanceV2.effectiveGraph.nodes.some((node) => node.data.action === 'DecodeLatents')); + assert.ok(!leaves.some((node) => node.data.action === 'DecodeLatents')); + assert.ok(leaves.some((node) => node.data.module === 'modules.Video' && node.data.action === 'ExportAsset')); + assert.equal(output.data.blockInstanceV2.previewStates[0].binding.mediaType, 'video'); + assert.deepEqual(api(graph), api(groups.unpackVisualOperationGroups(graph).graph)); + } +}); + +test('fresh video drafts connect declared image and video sources without changing the starter', () => { + for (const row of fixture.recipes.filter((item) => item.spec && item.starter.task !== 'text_to_video')) { + const starter = structuredClone(row.starter); + // The no-weight fixture is CPU-only; retain the ordinary export boundary. + for (const { node } of starter.nodes) + if (String(node.params.device?.value ?? node.params.device?.default).startsWith('cpu')) { + if (node.params.offload_mode) node.params.offload_mode.value = 'none'; + if (node.params.auto_offload) node.params.auto_offload.value = false; + } + const original = structuredClone(starter); + const { graph, notices } = drafts.createWorkflowDraft(starter, fixture.registry); + assert.deepEqual(starter, original); + assert.deepEqual(notices, [], row.id); + const flat = groups.unpackVisualOperationGroups(graph).graph; + for (const node of flat.nodes) { + const source = original.nodes.find( + (item) => item.operation.operationId === node.data.operationAuthoring?.operation.operationId, + ); + for (const field of ['guidance_scale', 'num_inference_steps']) + if (source && node.data.params[field]) + assert.equal( + node.data.params[field].value ?? node.data.params[field].default, + source.node.params[field].value ?? source.node.params[field].default, + `${row.id}/${node.data.action}/${field}`, + ); + } + const kinds = new Set(); + for (const input of row.starter.requiredInputs) { + const target = flat.nodes.find( + (node) => node.data.operationAuthoring?.operation.operationId === input.operationId, + ); + const types = + target?.data.operationAuthoring.operation.ports.find((port) => port.name === input.field)?.types ?? []; + const kind = types.includes('image') ? 'image' : types.includes('video') ? 'video' : null; + if (!kind) continue; + kinds.add(kind); + const wires = flat.edges.filter((edge) => edge.target === target.id && edge.targetHandle === input.field); + assert.equal(wires.length, 1, `${row.id}:${input.field}`); + const source = flat.nodes.find((node) => node.id === wires[0].source); + assert.equal(source.data.module, kind === 'video' ? 'modules.Video' : 'modules.Image'); + assert.equal(source.data.action, 'Load'); + assert.equal(target.data.action, 'EncodeInputs'); + } + assert.deepEqual(api(graph), api(flat)); + for (const kind of kinds) { + const unavailable = { ...fixture.registry }; + const module = kind === 'video' ? 'modules.Video' : 'modules.Image'; + delete unavailable[`${module}.Load`]; + const missing = drafts.createWorkflowDraft(starter, unavailable); + assert.ok(missing.notices.some((message) => message.includes('loader is unavailable or incompatible'))); + assert.ok( + !groups + .unpackVisualOperationGroups(missing.graph) + .graph.nodes.some((node) => node.data.module === module && node.data.action === 'Load'), + ); + } + } +}); + +test('existing video stages offer declared media attachment and lower a video loader to the same graph', async () => { + const attachment = await server.ssrLoadModule('/src/workflow/mediaAttachment.ts'); + const sources = await server.ssrLoadModule('/src/workflow/mediaAttachmentSources.ts'); + const row = fixture.recipes.find((item) => item.id === 'ltx_video_video_to_video'); + const operations = row.starter.nodes.map((item) => item.operation); + const choices = attachment.mediaAttachmentChoices(operations, row.starter.pipelineClass); + const choice = choices.find((item) => item.kind === 'video' && item.role === 'video'); + assert.ok(choice, 'a declared video task must not disappear from Add media'); + const graph = graphFor(row); + const owner = graph.nodes.find((node) => contracts.operationOwnsModel(node.data.operationAuthoring?.operation)); + const original = structuredClone(graph); + const next = attachment.planMediaAttachment(graph, owner.id, row.starter, choice, fixture.registry); + assert.deepEqual(graph, original, 'planning never mutates the retained workflow'); + const input = next.nodes.find((node) => node.data.module === 'modules.Video' && node.data.action === 'Load'); + assert.ok(input); + const encode = next.nodes.find((node) => node.data.action === 'EncodeInputs'); + assert.ok( + next.edges.some( + (edge) => + edge.source === input.id && + edge.sourceHandle === 'video' && + edge.target === encode.id && + edge.targetHandle === 'video', + ), + ); + assert.ok( + sources + .mediaAttachmentSources(next.nodes, next.edges, 'video') + .some((source) => source.value === JSON.stringify([input.id, 'video'])), + ); + const repeated = attachment.planMediaAttachment(next, owner.id, row.starter, choice, fixture.registry, { + nodeId: input.id, + handleId: 'video', + }); + assert.deepEqual(repeated, next, 'choosing the already-connected source is idempotent'); + assert.throws( + () => + attachment.planMediaAttachment(next, owner.id, row.starter, choice, fixture.registry, { + nodeId: 'video-export', + handleId: 'file', + }), + /already connected/u, + ); + assert.throws( + () => + attachment.planMediaAttachment(graph, owner.id, row.starter, choice, fixture.registry, { + nodeId: 'video-export', + handleId: 'file', + }), + /cycle/u, + ); + assert.deepEqual(graph, original, 'failed attachment leaves all values and wires intact'); +}); + +test('video task media discovery includes real image roles but excludes components and hidden ports', async () => { + const attachment = await server.ssrLoadModule('/src/workflow/mediaAttachment.ts'); + const row = fixture.recipes.find((item) => item.id === 'ltx_video_image_to_video'); + const operations = row.starter.nodes.map((item) => item.operation); + const original = structuredClone(operations); + const choices = attachment.mediaAttachmentChoices(operations, row.starter.pipelineClass); + assert.ok(choices.some((item) => item.kind === 'image')); + assert.ok(!choices.some((item) => /pipeline|latent|encoded/u.test(item.role))); + assert.deepEqual(operations, original); + assert.deepEqual(attachment.mediaAttachmentChoices(operations, 'foreign'), []); +}); + +test('ordinary video template creation reaches real stages and checkpoints their exact saved graph', async (t) => { + const lifecycle = await server.ssrLoadModule('/src/studio/templateWorkflow.ts'); + const studioModule = await server.ssrLoadModule('/src/stores/useStudioStore.ts'); + const studio = studioModule.useStudioStore; + const flow = exporter.useFlowStore; + const registry = nodes.useNodesStore; + const parsed = nodes.parseStudioModelCapabilities(fixture.publicPayload); + const operations = contracts.parseOperationContracts( + fixture.publicPayload.operationContracts, + fixture.publicPayload.operationContractSchemaVersion, + ); + for (const row of fixture.recipes.filter((item) => item.spec)) + await t.test(row.id, async () => { + const previous = [studio.getState(), flow.getState(), registry.getState()]; + const originalFetch = globalThis.fetch; + try { + const template = templates.find((item) => item.id === row.id); + studio.setState({ workflowCanvasHydrated: true }); + const tabId = studio.getState().createWorkflowTab(template.label, undefined, 'template', template.id); + studio.getState().applyTemplate(template); + studio.getState().updateForm({ + device: 'cpu:0', + offloadMode: 'none', + autoOffload: false, + referenceImages: ['images/reference.webp'], + sourceVideo: 'videos/source.mp4', + }); + registry.setState({ + nodesRegistry: fixture.registry, + operationContracts: operations, + studioModelCapabilities: parsed.capabilities, + studioExecutionSpecInvalid: false, + }); + const requests = []; + globalThis.fetch = async (url, init) => { + if (String(url).endsWith('/operations/starter')) { + const request = JSON.parse(init.body); + requests.push(request); + const selected = [row, ...secondaryFixture.recipes].find( + (item) => item.starter.pipelineClass === request.pipelineClass && item.starter.task === request.task, + ); + assert.ok(selected, 'the actual primary or secondary model must be explicitly requested'); + return Response.json(selected.starter); + } + return Response.json(row.starter); + }; + const form = structuredClone(studio.getState().form); + await lifecycle.createTemplateOperationWorkflow(template, form, studioModule.captureWorkflowOperationContext()); + assert.equal(requests.length, template.workflowBlocks?.includes('soundtrack') ? 2 : 1); + const graph = flow.getState().toObject(); + const flat = groups.unpackVisualOperationGroups(graph).graph; + const rendered = row.starter.pipelineClass === 'WanVACEPipeline'; + for (const action of rendered + ? ['LoadPipeline', 'EncodeInputs', 'Generate'] + : ['LoadPipeline', 'EncodeInputs', 'Denoise', 'DecodeLatents']) + assert.equal( + flat.nodes.filter((node) => node.data.module === 'modules.DiffusersVideo' && node.data.action === action) + .length, + 1, + ); + assert.ok( + rendered || + !flat.nodes.some( + (node) => node.data.module === 'modules.DiffusersVideo' && node.data.action === 'Generate', + ), + ); + const encoder = flat.nodes.find((node) => node.data.action === 'EncodeInputs'); + assert.equal(encoder.data.params.prompt.value, form.prompt); + assert.equal(studio.getState().graphBinding, null); + const saved = structuredClone(studio.getState().workflowTabs.find((tab) => tab.id === tabId)); + assert.equal(saved.source, 'template'); + assert.equal(saved.snapshot.activeTemplateId, template.id); + assert.equal(saved.snapshot.studioGraphBinding, null); + const before = flow.getState().exportGraph('saved-video-template', undefined, { randomizeSeeds: false }); + const events = Object.keys(before.nodes).map((node) => ({ + type: 'executed', + task_id: 'video-receipt-contract', + node, + status: 'succeeded', + hasChanged: true, + })); + const output = { taskId: 'video-receipt-contract', apiGraphSnapshot: before }; + const receipts = executionReceiptsForRun(template, output, events); + assert.equal(receipts.filter((item) => item.action === (rendered ? 'Generate' : 'Denoise')).length, 1); + const tampered = structuredClone(output); + const sampler = Object.values(tampered.apiGraphSnapshot.nodes).find( + (node) => node.action === (rendered ? 'Generate' : 'Denoise'), + ); + sampler.params.pipeline.sourceId = 'foreign-owner'; + assert.throws(() => executionReceiptsForRun(template, tampered, events), /foreign encoding owner/); + studio.setState({ workflowTabs: [], activeWorkflowTabId: tabId }); + studio.getState().mergeBackendWorkflow({ ...saved, revision: 1 }); + studio.getState().hydrateActiveWorkflowCanvas(); + assert.deepEqual( + flow.getState().exportGraph('saved-video-template', undefined, { randomizeSeeds: false }), + before, + ); + assert.equal(studio.getState().form.prompt, form.prompt); + } finally { + globalThis.fetch = originalFetch; + studio.setState(previous[0], true); + flow.setState(previous[1], true); + registry.setState(previous[2], true); + } + }); +}); diff --git a/scripts/video-upscale-evidence.mjs b/scripts/video-upscale-evidence.mjs new file mode 100644 index 00000000..2754988f --- /dev/null +++ b/scripts/video-upscale-evidence.mjs @@ -0,0 +1,287 @@ +import assert from 'node:assert/strict'; +import { readFileSync, realpathSync } from 'node:fs'; +import { dirname } from 'node:path'; +import { validateSpandrelArtifact } from './input-bound-model-evidence.mjs'; +import { validateNativeVariantOutput, validateNativeVariantRun } from './native-variant-run-evidence.mjs'; +import { + canonicalWorkflowAuthoringContract, + exportCanonicalWorkflowGraphs, + readCanonicalEvidenceFile, +} from './release-contract-core.mjs'; +import { + backendSourceEvidence, + canonicalGraphIdentity, + normalizeBackendRuntime, + selectBackendRuntimeFingerprintEvidence, + stableStringify, +} from './live-proof-provenance.mjs'; + +const same = (actual, expected, label) => assert.equal(stableStringify(actual), stableStringify(expected), label); +const keys = (value, allowed) => + same(Object.keys(value).sort(), [...allowed].sort(), 'Unexpected upscale evidence fields.'); +const fileIdentity = ({ sha256, bytes }) => ({ kind: 'file', sha256, byteSize: bytes }); + +export function verifyVideoUpscaleFileChain({ resolved, taskId, upscaleId, exportId, upscale, exporter, files }) { + assert.equal(resolved.schemaVersion, 1); + assert.equal(resolved.source, 'backend-execution'); + assert.equal(resolved.taskId, taskId); + assert.equal(resolved.attemptIndex, 0); + assert.equal(resolved.nodeId, exportId); + assert.equal(resolved.truncated, false); + same(resolved.mediaEvidenceStatus, { schemaVersion: 1, truncated: false }); + for (const list of ['ambiguousFields', 'unavailableFields', 'uncapturedNodeIds']) same(resolved[list], []); + const byId = new Map(resolved.nodes.map((node) => [node.nodeId, node])); + assert.equal(resolved.nodes.length, 2); + same([...byId.keys()].sort(), [upscaleId, exportId].sort()); + const check = (id, action, expected) => { + const node = byId.get(id); + assert.equal(node.action, action); + assert.equal(node.module, 'modules.Video'); + same(node.omittedFields, {}); + same( + node.mediaEvidence, + { schemaVersion: 1, status: 'complete', source: 'native-builtin-media-v1', ...expected }, + `The native ${action} bytes or controls differ.`, + ); + }; + const input = fileIdentity(files.source); + const intermediate = fileIdentity(files.intermediate); + const controlValues = (params, names) => Object.fromEntries(names.map((name) => [name, params[name].value])); + check(upscaleId, 'UpscaleVideo', { + controls: controlValues(upscale, ['pipeline_class', 'operation', 'tile_size', 'tile_overlap', 'device', 'fps']), + inputs: { video: [input] }, + outputs: { video_out: [intermediate] }, + files: { video: [{ sourceValue: upscale.video.value[0], sha256: input.sha256, byteSize: input.byteSize }] }, + }); + check(exportId, 'Export', { + controls: controlValues(exporter, ['filename', 'quality', 'fps']), + inputs: { video: [intermediate] }, + outputs: { file: [fileIdentity(files.output)] }, + files: {}, + }); +} + +export async function readVideoUpscaleEvidence({ clientRoot, manifest, graph, authoring, artifact, evidencePath }) { + const target = canonicalWorkflowAuthoringContract(manifest, graph, authoring, artifact); + assert.equal(target.workflowId, 'SpandrelVideoUpscale:video_upscale'); + const descriptorBytes = readFileSync(evidencePath); + const evidence = JSON.parse(descriptorBytes); + keys(evidence, [ + 'schemaVersion', + 'format', + 'workflowId', + 'creator', + 'outputPackage', + 'run', + 'persisted', + 'request', + 'acknowledgment', + 'completion', + 'backendSource', + 'modelObservation', + 'upload', + 'source', + 'intermediate', + 'output', + ]); + assert.equal(evidence.schemaVersion, 1); + assert.equal(evidence.workflowId, target.workflowId); + assert.equal(evidence.format, 'modiff.private.video-upscale-native-files.v1'); + const root = realpathSync(dirname(evidencePath)); + const retainedFiles = []; + const read = (ref) => { + const retained = readCanonicalEvidenceFile(root, ref, 16 * 1024 * 1024); + retainedFiles.push({ ...ref, absolutePath: retained.file }); + return retained; + }; + const json = (ref) => JSON.parse(read(ref).bytes); + const creator = json(evidence.creator); + const outputPackage = json(evidence.outputPackage); + const run = json(evidence.run); + const persisted = json(evidence.persisted); + const request = json(evidence.request); + const graphCompleted = json(evidence.completion); + const upload = json(evidence.upload); + const sourceValue = upload.path; + assert.match(sourceValue, /^@data\/videos\/[a-zA-Z0-9_-][\w.-]{0,200}\.mp4$/u); + assert.equal(upload.error, false); + assert.equal(upload.media.kind, 'video'); + assert.equal(upload.media.mimeType, 'video/mp4'); + assert.equal(upload.media.sha256, evidence.source.sha256); + assert.equal(upload.media.sizeBytes, evidence.source.bytes); + + const [canonical, ...visualGraphs] = await exportCanonicalWorkflowGraphs(clientRoot, [ + graph, + creator.graph, + outputPackage.latestOutput.graphSnapshot, + run.workflow_snapshot, + ]); + const find = (api, action) => { + const nodes = Object.entries(api.nodes).filter( + ([, node]) => node.module === 'modules.Video' && node.action === action, + ); + assert.equal(nodes.length, 1, `Expected one ${action} owner.`); + return nodes[0]; + }; + const [baseId, base] = find(canonical, 'UpscaleVideo'); + assert.equal(Object.keys(canonical.nodes).length, 2); + same(base.params.video, { display: 'filebrowser', value: '' }); + const [upscaleId, { params: upscale }] = find(request, 'UpscaleVideo'); + const [exportId, { params: exporter }] = find(request, 'Export'); + same(exporter.video, { display: 'input', sourceId: upscaleId, sourceKey: 'video_out' }); + same(request.paths, [[upscaleId, exportId]]); + const boundApi = structuredClone(canonical); + boundApi.nodes[baseId].params.video.value = [sourceValue]; + const boundHash = canonicalGraphIdentity(boundApi).hash; + for (const api of [request, creator.apiGraph, ...visualGraphs]) + assert.equal( + canonicalGraphIdentity(api).hash, + boundHash, + 'A saved upscale recipe differs from the captured graph.', + ); + + assert.equal(run.outputs.length, 2); + assert.equal(persisted.outputs.length, 2); + const [final, intermediate] = [exportId, upscaleId].map((id) => { + const rows = run.outputs.filter((row) => row.nodeId === id); + assert.equal(rows.length, 1); + const stored = persisted.outputs.find((row) => row.id === rows[0].id); + same(rows[0], stored, 'Original task output differs from the saved native record.'); + return stored; + }); + // Older clients omitted this section from the package. The original run and + // output store must independently hold identical native witnesses. + const packaged = outputPackage.latestOutput; + if (packaged.resolvedExecutionInputs !== undefined) + same(packaged.resolvedExecutionInputs, final.resolvedExecutionInputs); + const packageWithNativeInputs = { + ...outputPackage, + latestOutput: { ...packaged, resolvedExecutionInputs: final.resolvedExecutionInputs }, + }; + const { task, output, hints } = validateNativeVariantRun({ + target, + outputNodeId: exportId, + displayType: 'video', + creator, + outputPackage: packageWithNativeInputs, + run: { ...run, outputs: [final] }, + graphCompleted, + graphRequest: request, + graphAcknowledgment: json(evidence.acknowledgment), + }); + const source = json(evidence.backendSource); + const sourceProof = backendSourceEvidence({ ...source, runtimeFingerprint: task.runtimeFingerprint }); + same(sourceProof.blockers, []); + const runtime = selectBackendRuntimeFingerprintEvidence([task.runtimeFingerprint]); + assert.ok(runtime); + const measurement = task.runtimeMeasurement; + assert.equal(measurement.backend, 'cuda'); + assert.equal(measurement.device, upscale.device.value); + assert.equal(measurement.peakMeasurementVersion, 2); + assert.ok(measurement.elapsedSeconds > 0 && measurement.peakAllocatedBytes > 0); + const modelArtifact = validateSpandrelArtifact({ + bound: { api: request, upscaleId }, + modelSet: target.modelSet, + modelArtifact: upscale.model_id.value, + graphCompleted, + submissionHints: hints, + observation: json(evidence.modelObservation), + }); + verifyVideoUpscaleFileChain({ + resolved: output.resolvedExecutionInputs, + taskId: task.task_id, + upscaleId, + exportId, + upscale, + exporter, + files: { source: evidence.source, intermediate: evidence.intermediate, output: evidence.output }, + }); + const validateMedia = (record, file, physical) => + validateNativeVariantOutput({ + output: record, + task, + bytes: physical.bytes, + displayType: 'video', + contentType: 'video/mp4', + outputRef: { backendPath: record.backendMediaPath, mediaType: 'video', file }, + }); + const outputVideo = read(evidence.output); + const item = validateMedia(output, evidence.output, outputVideo); + validateMedia(intermediate, evidence.intermediate, read(evidence.intermediate)); + const { decodedMediaHash } = await import('./template-gallery-harness.mjs'); + const before = await decodedMediaHash(read(evidence.source).file, 'video'); + const after = await decodedMediaHash(outputVideo.file, 'video'); + same([before.width, before.height], [upload.media.width, upload.media.height]); + same([after.width, after.height], [before.width * 2, before.height * 2]); + same( + [after.width, after.height, after.frames], + [item.mediaMetadata.width, item.mediaMetadata.height, item.mediaMetadata.frame_count], + ); + assert.equal(after.frames, before.frames); + assert.equal(after.fps, before.fps); + assert.equal(after.fps, upscale.fps.value); + assert.equal(after.durationSeconds, before.durationSeconds); + assert.equal(after.hasAudio, before.hasAudio); + assert.ok(after.lumaStdDev >= 0.75 && after.severeNearBlackFrameRatio < 0.5); + assert.notEqual(after.hash, before.hash); + const decodedIdentity = after.frameHashCompatibility.variants.find(({ muxer }) => muxer === 'Lavf61.1.100'); + assert.ok(decodedIdentity, 'The frame checksums could not be normalized across reviewed FFmpeg versions.'); + for (const ref of retainedFiles) readCanonicalEvidenceFile(root, ref, 16 * 1024 * 1024); + assert.ok(readFileSync(evidencePath).equals(descriptorBytes)); + const receipt = { + schemaVersion: 1, + format: 'modiff.canonical-workflow-run-receipt.v1', + proofKind: 'real_backend_input_bound_model_variant', + workflowId: target.workflowId, + sourceTemplateId: target.sourceTemplateId, + authoringId: target.authoringId, + authoringHash: target.authoringHash, + canonicalWorkflowHash: target.canonicalWorkflowHash, + modelType: target.modelType, + task: target.task, + outputPlan: target.outputPlan, + taskId: task.task_id, + outputId: output.id, + capturedAt: new Date(task.completed_at * 1000).toISOString(), + graphHash: boundHash, + modelSet: target.modelSet, + resourceCandidateId: null, + runtimeFingerprint: normalizeBackendRuntime(runtime).lockFingerprint, + backendSourceFingerprint: sourceProof.identity.fingerprint, + outputHash: item.mediaHash, + executionDurationSeconds: measurement.elapsedSeconds, + peakMemoryBytes: measurement.peakAllocatedBytes, + canonicalDefaultsExecuted: false, + inputBinding: { + nodeId: upscaleId, + field: 'video', + sha256: evidence.source.sha256, + width: before.width, + height: before.height, + }, + modelArtifact, + decodedOutput: { + hash: decodedIdentity.hash, + width: after.width, + height: after.height, + fps: after.fps, + frameCount: after.frames, + }, + observationLimits: { fullConsumedFieldAccounting: false, physicalPlatformQualification: false }, + qualificationClaims: { + publicTemplate: false, + qualityApproved: false, + rightsApproved: false, + hardwareQualified: false, + modelResourceQualified: false, + }, + }; + return { + descriptorBytes, + retainedFiles, + evidence, + evidenceRoot: root, + receipt, + provenance: { format: 'modiff.input-bound-model-variant-proof.v1', receipt }, + }; +} diff --git a/scripts/video-upscale-evidence.test.mjs b/scripts/video-upscale-evidence.test.mjs new file mode 100644 index 00000000..0b5fe031 --- /dev/null +++ b/scripts/video-upscale-evidence.test.mjs @@ -0,0 +1,60 @@ +import assert from 'node:assert/strict'; +import { test } from 'node:test'; +import { copyFileSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { basename, join, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { readCanonicalWorkflowEvidence } from './release-contract-core.mjs'; +import { verifyVideoUpscaleFileChain } from './video-upscale-evidence.mjs'; + +const evidencePath = process.env.MODIFF_VIDEO_UPSCALE_EVIDENCE; +test( + 'native upscale receipt binds both original output owners, the checkpoint and the source', + { skip: !evidencePath }, + async () => { + const clientRoot = fileURLToPath(new URL('..', import.meta.url)); + const backendRoot = resolve(process.env.MODIFF_BACKEND_DIR ?? join(clientRoot, '..', 'MoDiff')); + const args = { clientRoot, backendRoot, evidencePath, workflowId: 'SpandrelVideoUpscale:video_upscale' }; + const result = await readCanonicalWorkflowEvidence(args); + assert.deepEqual(result.receipt.decodedOutput, { + hash: 'sha256:decoded-video-framemd5:cb31cd0903f5e394e21f0ac8bd6373e0e67fb0a93a3191fef43e628bec0f17ed', + width: 1024, + height: 576, + fps: 16, + frameCount: 54, + }); + assert.equal( + result.receipt.inputBinding.sha256, + '5c24b2b67f893f48e4dbf0d893e0aa4308852592f30f8179b44298cca4ce197e', + ); + assert.ok(Object.values(result.receipt.qualificationClaims).every((claim) => claim === false)); + const temp = mkdtempSync(join(tmpdir(), 'modiff-video-evidence-')); + try { + for (const file of result.retainedFiles) { + assert.equal(basename(file.path), file.path); + copyFileSync(file.absolutePath, join(temp, file.path)); + } + const changed = JSON.parse(result.descriptorBytes.toString('utf8')); + changed.intermediate = changed.output; + const changedPath = join(temp, 'changed.json'); + writeFileSync(changedPath, JSON.stringify(changed)); + await assert.rejects( + readCanonicalWorkflowEvidence({ ...args, evidencePath: changedPath }), + /UpscaleVideo bytes or controls differ/u, + ); + } finally { + rmSync(temp, { recursive: true, force: true }); + } + }, +); + +test('upscale input and export must belong to the same observed run', () => { + assert.throws( + () => + verifyVideoUpscaleFileChain({ + resolved: { schemaVersion: 1, source: 'backend-execution', taskId: 'other' }, + taskId: 'reviewed', + }), + /other/u, + ); +}); diff --git a/scripts/visual-node-catalog.test.mjs b/scripts/visual-node-catalog.test.mjs new file mode 100644 index 00000000..7ae2485e --- /dev/null +++ b/scripts/visual-node-catalog.test.mjs @@ -0,0 +1,315 @@ +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; +import { after, before, test } from 'node:test'; +import { createServer } from 'vite'; +const metadata = JSON.parse( + readFileSync(new URL('../../MoDiff/modiff/visual_node_catalog.v1.json', import.meta.url), 'utf8'), +); +let server, api, guide, registry, catalog; +before(async () => { + const values = new Map(); + globalThis.localStorage = { + getItem: (key) => values.get(key) ?? null, + setItem: (key, value) => values.set(key, value), + removeItem: (key) => values.delete(key), + }; + globalThis.window = { localStorage, location: { origin: 'http://127.0.0.1:8088' }, dispatchEvent: () => true }; + server = await createServer({ + configFile: false, + logLevel: 'silent', + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + api = await server.ssrLoadModule('/src/studio/visualNodeCatalog.ts'); + guide = (await server.ssrLoadModule('/src/studio/imageStageGuidance.ts')).imageStageGuidance; + catalog = api.parseVisualCatalog(metadata); + registry = {}; + for (const stage of catalog.stages) + for (const mode of stage.modes) { + const parts = mode.node.split('.'); + const n = (registry[mode.node] ??= { + module: parts.slice(0, 2).join('.'), + action: parts[2], + label: parts[2], + params: {}, + }); + for (const [field, value] of Object.entries(mode.settings ?? {})) { + const p = (n.params[field] ??= { options: [] }); + if (!p.options.includes(value)) p.options.push(value); + } + } +}); +after(async () => await server?.close()); +test('stock runtime cards show their actual jobs in saved graphs and preserve custom headings', () => { + const source = JSON.parse( + readFileSync(new URL('../../MoDiff/data/graphs/studio/lumina2-pipeline/text-to-image.json', import.meta.url)), + ); + const actual = source.nodes.filter(({ data }) => data.module === 'modules.DiffusersRuntime'); + const titles = actual.map(({ data }) => { + const registered = { ...data }; + assert.equal(api.visualNodeTitle(catalog, { ...data, label: 'My placement' }, registered), 'My placement'); + return api.visualNodeTitle(catalog, data, registered); + }); + assert.deepEqual(titles.sort(), ['Execution Settings', 'Pipeline Quantization']); + for (const stage of catalog.stages.filter((stage) => stage.tier === 'advanced')) { + for (const mode of stage.modes) { + const data = registry[mode.node]; + assert.equal(api.visualNodeTitle(catalog, data, data), mode.label); + } + } +}); +test('an exact decomposed action can be located before model selection without becoming insertable', () => { + const node = 'modules.ModularDiffusers.WorkflowImageDenoise'; + const definitions = { + ...registry, + [node]: { module: 'modules.ModularDiffusers', action: 'WorkflowImageDenoise', label: 'Denoise', params: {} }, + }; + const search = (query, options) => api.visualStageMatches(catalog, definitions, query, options); + for (const query of [node, 'WorkflowImageDenoise']) { + const hits = search(query, { showModelHints: true }).filter((hit) => hit.requiresModel); + assert.deepEqual( + hits.map((hit) => hit.stage.id), + ['generate-image', 'edit-image', 'inpaint-image'], + ); + for (const hit of hits) { + assert.deepEqual(hit.choices, []); + assert.equal(api.stageFromDrag(api.stageDragKey(hit.stage, hit.mode), catalog, definitions), null); + } + assert.equal(search(query, { showModelHints: false }).length, 0); + assert.equal(search(query, { showModelHints: true, operations: [] }).length, 0); + } +}); +test('shipped image, video, and caption stages use picker titles after reopening and preserve user titles', async () => { + const { exampleWorkflowSnapshotFromGraph } = await server.ssrLoadModule('/src/studio/exampleWorkflow.ts'); + const { normalizePersistedFlowState } = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + const { DEFAULT_STUDIO_FORM } = await server.ssrLoadModule('/src/studio/modelProfiles.ts'); + for (const [file, expected] of [ + ['z-image-modular-pipeline/text-to-image', 'Generate Image'], + ['wan-video-pipeline/text-to-video', 'Generate Video'], + ['hugging-face-image-text-to-text-model/image-to-text', 'Generate Text'], + ]) { + const raw = JSON.parse(readFileSync(new URL('../../MoDiff/data/graphs/studio/' + file + '.json', import.meta.url))); + const fresh = exampleWorkflowSnapshotFromGraph(raw, 'default', DEFAULT_STUDIO_FORM); + for (const state of [fresh, normalizePersistedFlowState(structuredClone(fresh))]) { + const generate = state.nodes.find((n) => n.data.label === 'Generate'); + assert.ok(generate, file); + const before = JSON.stringify(generate.data); + assert.equal(api.visualNodeTitle(catalog, generate.data), expected); + assert.equal(api.visualNodeTitle(null, generate.data), 'Generate'); + assert.equal(api.visualNodeTitle(catalog, { ...generate.data, label: 'Opening shot' }), 'Opening shot'); + assert.equal(JSON.stringify(generate.data), before); + } + } +}); +test('projected video inputs identify source and control roles after reopening', async () => { + const { exampleWorkflowSnapshotFromGraph } = await server.ssrLoadModule('/src/studio/exampleWorkflow.ts'); + const { normalizePersistedFlowState } = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + const { DEFAULT_STUDIO_FORM } = await server.ssrLoadModule('/src/studio/modelProfiles.ts'); + const file = + '../../MoDiff/data/graphs/studio/animate-diff-video-to-video-control-net-pipeline/control-video-to-video.json'; + const raw = JSON.parse(readFileSync(new URL(file, import.meta.url))); + const fresh = exampleWorkflowSnapshotFromGraph(raw, 'default', DEFAULT_STUDIO_FORM); + for (const state of [fresh, normalizePersistedFlowState(structuredClone(fresh))]) { + const inputs = state.nodes.filter((node) => node.data.label === 'Video Input'); + assert.equal(inputs.length, 2); + assert.deepEqual(inputs.map((node) => api.visualNodeTitle(catalog, node.data)).sort(), [ + 'Control Video', + 'Source Video', + ]); + const data = { ...inputs[0].data, label: 'Opening plate' }; + assert.equal(api.visualNodeTitle(catalog, data), 'Opening plate'); + } +}); +test('shipped media processors and upscaler display their picker titles without changing saved labels', async () => { + const { normalizePersistedFlowState } = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + const cases = [ + ['builtin-image-operation/image-crop', 'modules.ImageOperations.ProcessImage', 'Image.Process', 'Process Image'], + ['builtin-video-operation/video-trim', 'modules.Video.ProcessVideo', 'Video.Process', 'Process Video'], + ['builtin-audio-operation/audio-trim', 'modules.Audio.ProcessAudio', 'Audio.Process', 'Process Audio'], + ['spandrel-image-upscale/image-upscale', 'modules.Spandrel.Upscaler', 'Image.Upscale', 'Upscale'], + ]; + for (const [file, identity, oldTitle, expected] of cases) { + const graph = JSON.parse( + readFileSync(new URL('../../MoDiff/data/graphs/studio/' + file + '.json', import.meta.url)), + ); + for (const state of [graph, normalizePersistedFlowState(structuredClone(graph))]) { + const data = state.nodes.find((node) => node.data.module + '.' + node.data.action === identity).data; + const before = JSON.stringify(data); + assert.equal(data.label, oldTitle); + assert.equal(api.visualNodeTitle(catalog, data, registry[identity]), expected); + assert.equal( + api.visualNodeTitle(catalog, { ...data, label: 'My finishing pass' }, registry[identity]), + 'My finishing pass', + ); + assert.equal(api.visualNodeTitle(catalog, { ...data, module: 'custom.MyModule' }), oldTitle); + assert.equal(api.visualNodeTitle(null, data, registry[identity]), oldTitle); + assert.equal(JSON.stringify(data), before); + } + } +}); +test('35 stages, tiered browsing and every published alias and exact ID can reach its stage', () => { + const results = (query, options) => api.visualStageMatches(catalog, registry, query, options); + assert.equal(results('').length, 15); + assert.equal(results('', { targeted: true }).length, 29); + assert.equal(results('', { all: true }).length, 35); + for (const stage of catalog.stages) { + assert.equal(results(stage.label)[0].stage.id, stage.id, stage.label); + for (const mode of stage.modes) { + for (const query of [mode.node, mode.label, ...(mode.terms ?? [])]) { + const hits = results(query); + assert.equal(new Set(hits.map((hit) => hit.stage.id)).size, hits.length); + assert.ok( + hits.some((hit) => hit.stage.id === stage.id), + query + ' → ' + stage.id, + ); + } + } + } + assert.deepEqual(results('!!!'), []); + assert.equal(results('Canny')[0].stage.label, 'Control Map'); + assert.equal(results('CheckpointLoaderSimple')[0].stage.label, 'Model Setup'); + assert.equal(results('KSampler')[0].stage.label, 'Generate Image'); + assert.equal(results('VAEDecode')[0].stage.label, 'Generate Image'); + assert.equal(results('last extract frame')[0].stage.label, 'Process Video'); +}); +test('search, drag, insertion and reopening agree on preset values without rewriting the saved graph', () => { + const hit = api.visualStageMatches(catalog, registry, 'Gaussian blur')[0]; + assert.equal(hit.stage.id, 'process-image'); + assert.equal(hit.definition.params.filter_operation.value, 'gaussian_blur'); + const token = api.stageDragKey(hit.stage, hit.mode); + assert.deepEqual(api.stageFromDrag(token, catalog, registry), hit.definition); + assert.equal(api.stageFromDrag(token.replace('Gaussian blur', 'unknown'), catalog, registry), null); + assert.equal(registry[hit.mode.node].params.operation.value, undefined); + const saved = JSON.stringify(hit.definition); + assert.equal(api.visualStageForNode(catalog, JSON.parse(saved)).mode.label, 'Gaussian blur'); + assert.equal(api.visualNodeTitle(catalog, hit.definition, registry[hit.mode.node]), 'Process Image'); + assert.equal( + api.visualNodeTitle(catalog, { ...hit.definition, label: 'My optical finish' }, registry[hit.mode.node]), + 'My optical finish', + ); + assert.equal(JSON.stringify(hit.definition), saved); +}); +test('selected model, required wire and disabled preset narrow insertable choices', () => { + const key = 'modules.DiffusersImage.ControlGenerate'; + const operation = { nodeKey: key, pipelineClass: 'ControlModel', task: 'text_to_image' }; + const hits = api.visualStageMatches(catalog, registry, '', { operations: [operation] }); + const hit = hits.find((h) => h.stage.id === 'generate-image'); + assert.deepEqual( + hit.choices.map((c) => c.operation), + [operation], + ); + assert.ok(!hits.some((h) => h.stage.id === 'edit-image')); + assert.ok(!api.visualStageMatches(catalog, registry, 'KSampler', { operations: [] }).length); + const decode = api.visualStageMatches(catalog, registry, 'VAE Decode', { + compatible: (n) => n.action === 'DecodeLatents', + }); + assert.equal(decode[0].mode.node, 'modules.DiffusersImage.DecodeLatents'); + const mode = { node: key, label: 'unsafe preset', settings: { choice: 'off' } }; + assert.equal( + api.stageDefinition(mode, { + [key]: { ...registry[key], params: { choice: { options: [{ value: 'off', disabled: true }] } } }, + }), + null, + ); + assert.equal(api.parseVisualCatalog(undefined), null); + assert.throws(() => api.parseVisualCatalog({ ...metadata, stages: [metadata.stages[0], metadata.stages[0]] })); +}); +test('multiple compatible bindings share one stage result and the exact operation selects its own binding', () => { + const base = { nodeKey: 'modules.DiffusersImage.Generate', pipelineClass: 'Image', task: 'text_to_image' }; + const guided = { ...base, nodeKey: 'modules.DiffusersImage.ControlGenerate', operationId: 'image.control.generate' }; + const plain = { ...base, operationId: 'image.base.generate' }; + const operations = [plain, guided]; + const visible = api.visualStageMatches(catalog, registry, '', { operations }); + assert.equal(visible.filter((hit) => hit.stage.id === 'generate-image').length, 1); + assert.ok(operations.every((op) => api.representedStageOperations(visible).has(op))); + const matching = api.visualStageMatches(catalog, registry, guided.operationId, { operations }); + assert.equal(matching[0].operation, guided); + assert.equal(matching[0].stage.id, 'generate-image'); + assert.ok( + !api + .visualStageMatches(catalog, registry, guided.operationId, { + operations, + compatible: (_node, op) => op === plain, + }) + .some((hit) => hit.operation === guided), + ); +}); +test('control guidance preserves identity, compatible values and guide wires across model changes', () => { + const make = (action, more = {}) => ({ + module: 'modules.DiffusersImage', + action, + label: action, + params: { + pipeline: { type: 'pipeline', display: 'input', signalCompatibility: { required: true, action: '$node' } }, + steps: { type: 'int', value: 12 }, + ...more, + }, + }); + const plain = make('Edit'), + controlled = make('ControlEdit', { + control_image: { type: 'image', display: 'input', required: true }, + conditioning_scale: { type: 'float', default: 1 }, + }); + const defs = { 'modules.DiffusersImage.Edit': plain, 'modules.DiffusersImage.ControlEdit': controlled }; + const edge = { source: 'model', sourceHandle: 'out', target: 'edit', targetHandle: 'pipeline' }; + const context = (data, actions, extra = []) => { + const edit = { id: 'edit', data }; + const source = { + id: 'model', + data: { params: { out: { type: 'pipeline', display: 'output', signal: { value: { actions } } } } }, + }; + return guide(edit, [source, edit], [edge, ...extra], defs, catalog); + }; + const both = { Edit: ['edit'], ControlEdit: ['edit'] }; + const enabled = context(plain, both).next; + assert.equal(enabled.action, 'ControlEdit'); + assert.equal(enabled.params.steps.value, 12); + enabled.params.conditioning_scale = { ...enabled.params.conditioning_scale, value: 0.73 }; + assert.match(context(enabled, { ControlEdit: ['edit'] }).reason, /requires/); + assert.match(context(enabled, { Edit: ['edit'] }).reason, /does not support/); + assert.match( + context(enabled, both, [{ source: 'guide', target: 'edit', targetHandle: 'control_image' }]).reason, + /Disconnect/, + ); + const disabled = context(enabled, both).next; + assert.equal(context(disabled, both).next.params.conditioning_scale.value, 0.73); + assert.equal(context(plain, { Edit: ['edit'] }), null); +}); + +test('changing a manual stage restores action-specific settings and refuses an incompatible live wire', async () => { + const { changeStageAction } = await server.ssrLoadModule('/src/studio/stageActionChange.ts'); + const stage = catalog.stages.find((s) => s.id === 'media-input'), + loadImage = stage.modes.find((m) => m.node === 'modules.Image.Load'), + loadAudio = stage.modes.find((m) => m.node === 'modules.Audio.Load'); + const defs = {}; + for (const [m, type] of [ + [loadImage, 'image'], + [loadAudio, 'audio'], + ]) + defs[m.node] = { + ...registry[m.node], + label: 'Load', + params: { path: { type: 'string', default: '' }, out: { type, display: 'output' } }, + }; + const image = { + id: 'source', + data: { + ...defs[loadImage.node], + params: { ...defs[loadImage.node].params, path: { type: 'string', value: 'example.png' } }, + }, + }; + const sound = changeStageAction(image, loadAudio, catalog, defs, [image], []); + assert.equal(sound.params.path.value, undefined); + const reopened = { id: 'source', data: JSON.parse(JSON.stringify(sound)) }; + assert.equal(changeStageAction(reopened, loadImage, catalog, defs, [reopened], []).params.path.value, 'example.png'); + const viewer = { + id: 'viewer', + data: { module: 'custom.Test', action: 'Show', params: { input: { display: 'input', type: 'image' } } }, + }; + const edge = { source: 'source', sourceHandle: 'out', target: 'viewer', targetHandle: 'input' }; + assert.throws( + () => changeStageAction(image, loadAudio, catalog, defs, [image, viewer], [edge]), + /connection is incompatible/, + ); + assert.equal(image.data.params.path.value, 'example.png'); +}); diff --git a/scripts/wan-first-last-evidence.mjs b/scripts/wan-first-last-evidence.mjs new file mode 100644 index 00000000..0811fc51 --- /dev/null +++ b/scripts/wan-first-last-evidence.mjs @@ -0,0 +1,311 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { readFileSync, realpathSync } from 'node:fs'; +import { dirname } from 'node:path'; +import { + backendContractIdentity, + backendSourceEvidence, + canonicalGraphIdentity, + normalizeBackendRuntime, + selectBackendRuntimeFingerprintEvidence, + selectInstalledModelIdentity, +} from './live-proof-provenance.mjs'; +import { + validateNativeVariantOutput, + validateNativeVariantRun, + validateUnmodifiedExpertPreparation, +} from './native-variant-run-evidence.mjs'; +import { verifyRetainedPngUpload } from './private-image-edit-evidence.mjs'; +import { validateNativeVideoDelivery } from './prompt-variant-evidence.mjs'; +import { + canonicalWorkflowAuthoringContract, + exportCanonicalWorkflowGraphs, + readCanonicalEvidenceFile, +} from './release-contract-core.mjs'; +import { decodedMediaHash } from './template-gallery-harness.mjs'; + +const modelType = 'WanImage2VideoModularPipeline'; +const workflowId = `${modelType}:image_to_video`; +const repoId = 'Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers'; +const revision = '17c30769b1e0b5dcaa1799b117bf20a9c31f59d7'; +const correctedSource = 'sha256:backend-source-v1:b29a5b0d317aaa781ae2a5205b46b518eea5a3d68a214eb0968dba4ac0660af7'; +const format = 'modiff.private.wan-first-last-frame-variant.v1'; +const digest = (value) => createHash('sha256').update(value).digest('hex'); +const literal = (value) => ({ value, source: 'literal' }); +const loaderDefaults = { + weight_loading_mode: 'cpu', + attention_backend: 'inherit', + vae_slicing: null, + vae_tiling: null, +}; +const stages = [ + ['first', 'Image.Load'], + ['last', 'Image.Load'], + [ + 'loader', + 'ModularDiffusers.ModelsLoader', + 'model_type repo_id revision dtype device auto_offload offload_mode quant_config weight_loading_mode attention_backend vae_slicing vae_tiling', + ], + ['embed', 'ModularDiffusers.ImageEmbeddings', 'height width'], + ['encode', 'ModularDiffusers.ImageEncode', 'height num_frames seed width'], + ['prompt', 'ModularDiffusers.EncodePrompt', 'prompt negative_prompt'], + ['denoise', 'ModularDiffusers.Denoise', 'guidance_scale height num_frames num_inference_steps seed width'], + ['decode', 'ModularDiffusers.DecodeLatents', 'output_type'], + ['export', 'Video.Export', 'fps'], +]; +function owners(api) { + assert.equal(api.paths.length, 1); + const [path] = api.paths; + assert.deepEqual([...path].sort(), Object.keys(api.nodes).sort()); + assert.equal(path.length, stages.length); + return Object.fromEntries( + stages.map(([role, action, fields], index) => { + const id = path[index]; + const node = api.nodes[id]; + assert.equal(`${node.module}.${node.action}`, `modules.${action}`); + return [role, { id, node, fields }]; + }), + ); +} + +export function verifyFirstLastFields(output, api, inputs) { + const actual = owners(api); + const receipt = output.resolvedExecutionInputs; + assert.equal(receipt.schemaVersion, 1); + assert.equal(receipt.source, 'backend-execution'); + assert.equal(receipt.taskId, output.taskId); + assert.equal(receipt.nodeId, actual.export.id); + assert.equal(receipt.attemptIndex, 0); + assert.equal(receipt.truncated, false); + assert.deepEqual(receipt.uncapturedNodeIds, []); + assert.deepEqual(receipt.unavailableFields, []); + assert.deepEqual(receipt.ambiguousFields, ['imageSourceHashes']); + assert.deepEqual(receipt.nodes.map(({ nodeId }) => nodeId).sort(), [...api.paths[0]].sort()); + for (const [role, { id, node, fields }] of Object.entries(actual)) { + const observed = receipt.nodes.find(({ nodeId }) => id === nodeId); + assert.equal(observed.module, node.module); + assert.equal(observed.action, node.action); + assert.deepEqual(observed.omittedFields, {}); + if (fields) { + const settings = Object.fromEntries( + fields.split(' ').map((key) => { + const field = + node.params[key] ?? + (role === 'loader' && Object.hasOwn(loaderDefaults, key) ? { value: loaderDefaults[key] } : undefined); + assert.ok(field, `No literal for ${role}.${key}.`); + assert.equal(field.sourceId, undefined); + if (role === 'loader' && key === 'quant_config') { + assert.deepEqual(field, { display: 'input' }); + return [key, literal(null)]; + } + return [key, literal(key === 'repo_id' ? field.value.value : field.value)]; + }), + ); + assert.deepEqual(observed.fields, settings, `Observed ${role} controls differ.`); + continue; + } + const input = inputs[role]; + assert.deepEqual(node.params.file, { display: 'filebrowser', value: [input.sourceValue] }); + assert.deepEqual( + observed.fields, + { + alpha_channel: literal('ignore'), + source_hashes: literal([input.file.sha256]), + source_widths: literal([input.geometry.width]), + source_heights: literal([input.geometry.height]), + source_modes: literal(['RGB']), + }, + `Observed ${role} frame differs.`, + ); + for (const processor of [actual.embed, actual.encode]) { + assert.deepEqual(processor.node.params[role === 'first' ? 'image' : 'last_image'], { + display: 'input', + sourceId: id, + sourceKey: 'image', + }); + } + } +} + +export async function readWanFirstLastEvidence({ clientRoot, manifest, graph, authoring, artifact, evidencePath }) { + assert.equal(manifest.id, workflowId); + const target = canonicalWorkflowAuthoringContract(manifest, graph, authoring, artifact); + assert.deepEqual(target.modelSet, [{ repoId, revision }]); + const descriptorBytes = readFileSync(evidencePath); + const evidence = JSON.parse(descriptorBytes); + assert.equal(evidence.format, format); + assert.equal(evidence.schemaVersion, 1); + assert.equal(evidence.workflowId, workflowId); + const evidenceRoot = realpathSync(dirname(evidencePath)); + const retainedFiles = []; + const read = (ref) => { + const result = readCanonicalEvidenceFile(evidenceRoot, ref, 16 * 1024 * 1024); + retainedFiles.push({ ...ref, absolutePath: result.file }); + return result; + }; + const json = (ref) => JSON.parse(read(ref).bytes); + const creator = json(evidence.creatorPackage); + const outputPackage = json(evidence.outputPackage); + const run = json(evidence.runDetail); + const graphRequest = json(evidence.graphRequest); + const completion = json(evidence.graphCompleted); + const [expected, ...visual] = await exportCanonicalWorkflowGraphs(clientRoot, [ + graph, + creator.graph, + outputPackage.latestOutput.graphSnapshot, + run.workflow_snapshot, + ]); + assert.equal(canonicalGraphIdentity(expected).hash, evidence.originalGraphHash); + const canonical = owners(expected); + const actual = owners(graphRequest); + const [first, last] = evidence.inputs; + assert.equal(evidence.inputs.length, 2); + assert.notEqual(first.file.sha256, last.file.sha256); + const inputs = { first, last }; + for (const [role, input] of Object.entries(inputs)) { + assert.match(input.sourceValue, /^@data\/images\/[\w-]{1,128}\.png$/u); + const field = canonical[role].node.params.file; + assert.deepEqual(field, { display: 'filebrowser', value: role === 'first' ? [] : '' }); + field.value = [input.sourceValue]; + } + const prompts = {}; + for (const field of ['prompt', 'negative_prompt']) { + const value = actual.prompt.node.params[field].value; + assert.ok(typeof value === 'string' && value.length > 0 && value.length <= 4096 && value === value.trim()); + assert.ok(!/[\u0000-\u001f\u007f]/u.test(value)); + assert.deepEqual(canonical.prompt.node.params[field], { value: '', display: 'textarea' }); + canonical.prompt.node.params[field].value = value; + prompts[field] = digest(value); + } + assert.deepEqual(canonical.denoise.node.params.guidance_scale, { display: 'slider', value: 3 }); + canonical.denoise.node.params.guidance_scale.value = 5.5; + const identity = canonicalGraphIdentity(expected); + for (const value of [graphRequest, creator.apiGraph, ...visual]) { + assert.equal( + canonicalGraphIdentity(value).hash, + identity.hash, + 'The supplied frame recipe differs from the reviewed variant.', + ); + } + const { task, output, hints } = validateNativeVariantRun({ + // This archived form used the older task label. The graph and authoring + // contract above verify the canonical two-frame operation independently. + target: { ...target, task: 'single_image_to_video' }, + outputNodeId: actual.export.id, + displayType: 'video', + creator, + outputPackage, + run, + graphCompleted: completion, + graphRequest, + graphAcknowledgment: json(evidence.graphAcknowledgment), + validatePreparation: (value) => validateUnmodifiedExpertPreparation(value, modelType), + }); + assert.deepEqual(hints.workflowSnapshot.studioForm, output.formSnapshot); + assert.deepEqual(completion.runtimeHints, { + ...hints, + loaderContract: ['modules.ModularDiffusers.ModelsLoader'], + controlledArtifacts: [], + }); + const geometry = { width: actual.denoise.node.params.width.value, height: actual.denoise.node.params.height.value }; + for (const input of Object.values(inputs)) { + const { bytes, file } = read(input.file); + const decoded = await decodedMediaHash(file, 'image'); + assert.deepEqual({ width: decoded.width, height: decoded.height }, geometry); + verifyRetainedPngUpload(json(input.upload), input, geometry, bytes); + input.geometry = geometry; + } + verifyFirstLastFields(output, graphRequest, inputs); + const backend = backendSourceEvidence({ + before: json(evidence.backendSourceBefore).identity, + after: json(evidence.backendSourceAfter).identity, + runtimeFingerprint: task.runtimeFingerprint, + }); + assert.deepEqual(backend.blockers, []); + assert.equal(backend.identity.fingerprint, correctedSource); + const backendContract = backendContractIdentity(json(evidence.nodes), identity.canonicalGraph); + assert.ok(backendContract.fingerprint); + const runtime = selectBackendRuntimeFingerprintEvidence([task.runtimeFingerprint]); + assert.equal(evidence.modelObservations.length, 1); + const observation = json(evidence.modelObservations[0]); + assert.equal(observation.error, false); + assert.equal(observation.runtimeFingerprint, runtime.fingerprint); + assert.equal(observation.models.length, 1); + assert.equal(observation.models[0].complete, true); + assert.equal(observation.models[0].repairRequired, false); + assert.equal(selectInstalledModelIdentity(observation, repoId)?.selectedRevision, revision); + const measurement = task.runtimeMeasurement; + assert.match(runtime.packages.platform, /^Linux-/u); + assert.equal(measurement.backend, 'rocm'); + assert.equal(measurement.device, 'cuda:0'); + assert.equal(measurement.peakMeasurementVersion, 2); + assert.ok(measurement.elapsedSeconds > 0 && measurement.elapsedSeconds <= 7200); + assert.ok(measurement.peakAllocatedBytes > 0 && measurement.peakReservedBytes >= measurement.peakAllocatedBytes); + assert.equal(evidence.outputs.length, 1); + const [outputRef] = evidence.outputs; + const media = read(outputRef.file); + const item = validateNativeVariantOutput({ + output, + outputRef, + task, + bytes: media.bytes, + displayType: 'video', + contentType: 'video/mp4', + }); + const decodedOutput = validateNativeVideoDelivery(await decodedMediaHash(media.file, 'video'), item, { + ...geometry, + frames: actual.denoise.node.params.num_frames.value, + fps: actual.export.node.params.fps.value, + }); + for (const ref of retainedFiles) readCanonicalEvidenceFile(evidenceRoot, ref, 16 * 1024 * 1024); + assert.ok(readFileSync(evidencePath).equals(descriptorBytes)); + const frameBinding = (role) => ({ + nodeId: actual[role].id, + field: 'file', + sha256: inputs[role].file.sha256, + ...geometry, + }); + const receipt = { + schemaVersion: 1, + format: 'modiff.canonical-workflow-run-receipt.v1', + proofKind: 'real_backend_input_bound_model_variant', + ...target, + graphHash: identity.hash, + taskId: task.task_id, + outputId: output.id, + capturedAt: new Date(task.completed_at * 1000).toISOString(), + runtimeFingerprint: normalizeBackendRuntime(runtime).lockFingerprint, + backendSourceFingerprint: backend.identity.fingerprint, + backendContractFingerprint: backendContract.fingerprint, + resourceCandidateId: null, + outputHash: item.mediaHash, + executionDurationSeconds: measurement.elapsedSeconds, + peakMemoryBytes: measurement.peakAllocatedBytes, + canonicalDefaultsExecuted: false, + inputBinding: frameBinding('first'), + lastFrameBinding: frameBinding('last'), + promptBinding: { nodeId: actual.prompt.id, field: 'prompt', sha256: prompts.prompt }, + negativePromptBinding: { nodeId: actual.prompt.id, field: 'negative_prompt', sha256: prompts.negative_prompt }, + decodedOutput, + observationLimits: { + fullConsumedFieldAccounting: false, + independentEncoderPixelSnapshots: false, + physicalPlatformQualification: false, + }, + qualificationClaims: { + publicTemplate: false, + qualityApproved: false, + rightsApproved: false, + hardwareQualified: false, + modelResourceQualified: false, + }, + }; + return { + receipt, + descriptorBytes, + evidence, + evidenceRoot, + retainedFiles, + provenance: { format: 'modiff.input-bound-model-variant-proof.v1', receipt }, + }; +} diff --git a/scripts/wan-first-last-evidence.test.mjs b/scripts/wan-first-last-evidence.test.mjs new file mode 100644 index 00000000..422ca086 --- /dev/null +++ b/scripts/wan-first-last-evidence.test.mjs @@ -0,0 +1,47 @@ +import assert from 'node:assert/strict'; +import { dirname, join, resolve } from 'node:path'; +import test from 'node:test'; +import { fileURLToPath } from 'node:url'; +import { readCanonicalEvidenceFile, readCanonicalWorkflowEvidence } from './release-contract-core.mjs'; +import { verifyFirstLastFields } from './wan-first-last-evidence.mjs'; + +const clientRoot = fileURLToPath(new URL('..', import.meta.url)); +const backendRoot = resolve(process.env.MODIFF_BACKEND_DIR ?? join(clientRoot, '../MoDiff')); +const fixture = process.env.MODIFF_WAN_FIRST_LAST_EVIDENCE; +const workflowId = 'WanImage2VideoModularPipeline:image_to_video'; + +test( + 'the corrected Wan save retains both frame roles and the original encoder and sampler settings', + { + skip: !fixture, + }, + async () => { + const { receipt, evidence } = await readCanonicalWorkflowEvidence({ + clientRoot, + backendRoot, + workflowId, + evidencePath: resolve(fixture), + }); + assert.equal(receipt.decodedOutput.frames, 81); + assert.equal(receipt.decodedOutput.fps, 24); + assert.equal(receipt.observationLimits.independentEncoderPixelSnapshots, false); + const read = (reference) => JSON.parse(readCanonicalEvidenceFile(dirname(fixture), reference).bytes); + const graph = read(evidence.graphRequest); + const output = read(evidence.outputPackage).latestOutput; + const [first, last] = evidence.inputs; + const geometry = { width: receipt.decodedOutput.width, height: receipt.decodedOutput.height }; + const inputs = { first: { ...first, geometry }, last: { ...last, geometry } }; + verifyFirstLastFields(output, graph, inputs); + const exchanged = structuredClone(output); + const loads = exchanged.resolvedExecutionInputs.nodes.filter((node) => node.action === 'Load'); + [loads[0].fields.source_hashes, loads[1].fields.source_hashes] = [ + loads[1].fields.source_hashes, + loads[0].fields.source_hashes, + ]; + assert.throws(() => verifyFirstLastFields(exchanged, graph, inputs), /Observed first frame differs/u); + const rewired = structuredClone(graph); + const encoder = Object.values(rewired.nodes).find((node) => node.action === 'ImageEncode'); + encoder.params.last_image.sourceId = receipt.inputBinding.nodeId; + assert.throws(() => verifyFirstLastFields(output, rewired, inputs), /sourceId/u); + }, +); diff --git a/scripts/websocket-connection.test.mjs b/scripts/websocket-connection.test.mjs new file mode 100644 index 00000000..851a0a46 --- /dev/null +++ b/scripts/websocket-connection.test.mjs @@ -0,0 +1,451 @@ +import assert from 'node:assert/strict'; +import { after, before, beforeEach, test } from 'node:test'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { createServer } from 'vite'; + +const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); +const originalFetch = globalThis.fetch; +const originalWebSocket = globalThis.WebSocket; +const originalXhr = globalThis.XMLHttpRequest; +const originalSetTimeout = globalThis.setTimeout; +const originalClearTimeout = globalThis.clearTimeout; +let server; +let store; +let sockets; +let probes; +let timers; +let nextTimer; +let nodeStore, originalRuntimeRead, runtimeReads; +let control; +let config; + +class FakeSocket { + static CONNECTING = 0; + static OPEN = 1; + static CLOSING = 2; + static CLOSED = 3; + readyState = FakeSocket.CONNECTING; + closeCalls = 0; + constructor(url) { + this.url = url; + sockets.push(this); + } + close() { + this.closeCalls += 1; + this.readyState = FakeSocket.CLOSED; + } + fail() { + this.readyState = FakeSocket.CLOSED; + this.onclose?.(); + } + open() { + this.readyState = FakeSocket.OPEN; + this.onopen?.(); + } +} + +class LegacyProbe { + open(_method, url) { + this.url = url; + } + send() { + probes.push({ + url: this.url, + signal: undefined, + respond: (status) => { + this.status = status; + this.onload?.(); + }, + }); + } +} + +before(async () => { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, String(value)), + removeItem: (key) => storage.delete(key), + clear: () => storage.clear(), + key: (index) => [...storage.keys()][index] ?? null, + get length() { + return storage.size; + }, + }; + globalThis.window = { dispatchEvent: () => true, localStorage, location: { origin: 'http://127.0.0.1:5191' } }; + server = await createServer({ + root: ROOT, + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + store = (await server.ssrLoadModule('/src/stores/useWebsocketStore.ts')).useWebsocketStore; + nodeStore = (await server.ssrLoadModule('/src/stores/useNodeStore.ts')).useNodesStore; + originalRuntimeRead = nodeStore.getState().fetchRuntimeStatus; + control = await server.ssrLoadModule('/src/utils/supervisorControl.ts'); + config = (await server.ssrLoadModule('/app.config.ts')).default; +}); + +beforeEach(() => { + store.getState().disconnect(); + store.setState({ address: null }); + control.resetSupervisorControl(); + sockets = []; + probes = []; + timers = new Map(); + nextTimer = 0; + runtimeReads = 0; + nodeStore.setState({ + fetchRuntimeStatus: async () => { + runtimeReads += 1; + }, + }); + globalThis.WebSocket = FakeSocket; + globalThis.XMLHttpRequest = LegacyProbe; + globalThis.setTimeout = (callback, delay) => { + const id = ++nextTimer; + timers.set(id, { callback, delay }); + return id; + }; + globalThis.clearTimeout = (id) => timers.delete(id); + globalThis.fetch = (url, init) => + new Promise((resolve) => { + probes.push({ + url: String(url), + signal: init.signal, + respond: (status, body = { error: false, ready: true }) => + resolve(new Response(JSON.stringify(body), { status, headers: { 'Content-Type': 'application/json' } })), + }); + }); +}); + +after(async () => { + store?.getState().disconnect(); + nodeStore?.setState({ fetchRuntimeStatus: originalRuntimeRead }); + globalThis.fetch = originalFetch; + globalThis.WebSocket = originalWebSocket; + globalThis.XMLHttpRequest = originalXhr; + globalThis.setTimeout = originalSetTimeout; + globalThis.clearTimeout = originalClearTimeout; + await server?.close(); +}); + +async function settle() { + await new Promise((resolve) => originalSetTimeout(resolve, 0)); +} + +function enterHealthRecovery() { + const previousProbes = probes.length; + store.getState().connect(); + store.setState({ reconnectAttempts: 5 }); + sockets.at(-1).fail(); + assert.equal(probes.length, previousProbes + 1); + return probes.at(-1); +} + +test('disconnect retires a pending handshake without closing it early or changing its replacement', () => { + store.getState().connect(); + const retired = sockets.at(-1); + store.getState().disconnect(); + assert.equal(retired.closeCalls, 0, 'Closing CONNECTING sockets creates a browser console warning'); + assert.equal(retired.onclose, null); + assert.equal(retired.onmessage, null); + assert.equal(store.getState().ws, null); + + store.getState().connect(); + const replacement = sockets.at(-1); + replacement.open(); + retired.open(); + assert.equal(retired.closeCalls, 1, 'The retired socket must close once its handshake completes'); + assert.equal(store.getState().ws, replacement); + assert.equal(store.getState().isConnected, true); + assert.equal(runtimeReads, 0); + assert.equal(timers.size, 0); +}); + +test('replacing a stale pending socket uses the same handshake retirement', () => { + store.getState().connect(); + const retired = sockets.at(-1); + store.setState({ isConnecting: false }); + store.getState().connect(); + const replacement = sockets.at(-1); + assert.equal(retired.closeCalls, 0); + retired.open(); + assert.equal(retired.closeCalls, 1); + assert.equal(store.getState().ws, replacement); + assert.equal(store.getState().isConnected, false); + replacement.open(); + assert.equal(store.getState().isConnected, true); +}); + +test('retirement closes open sockets but does not close terminal sockets or retry retired failures', () => { + for (const state of [FakeSocket.OPEN, FakeSocket.CLOSING, FakeSocket.CLOSED]) { + store.getState().connect(); + const retired = sockets.at(-1); + retired.readyState = state; + store.getState().disconnect(); + assert.equal(retired.closeCalls, state === FakeSocket.OPEN ? 1 : 0); + assert.equal(retired.onopen, null); + } + store.getState().connect(); + const retired = sockets.at(-1); + store.getState().disconnect(); + retired.fail(); + assert.equal(timers.size, 0); + assert.equal(probes.length, 0); + assert.equal(store.getState().ws, null); +}); + +test('recovery checks backend health instead of a frontend favicon and rejects HTTP failures', async () => { + const probe = enterHealthRecovery(); + probe.respond(502); + await settle(); + assert.match(probe.url, /\/health$/); + assert.equal(sockets.length, 1); + assert.equal(store.getState().reconnectAttempts, 5); + assert.ok([...timers.values()].some(({ delay }) => delay >= 2000 && delay <= 3000)); +}); + +test('a successful response with an unready or malformed health payload does not reconnect', async () => { + for (const payload of [{ error: false, ready: false }, { ready: true }, { error: false, ready: 'true' }]) { + const previous = sockets.length; + const probe = enterHealthRecovery(); + probe.respond(200, payload); + await settle(); + assert.equal(sockets.length, previous + 1); + store.getState().disconnect(); + } +}); + +test('an unready replacement health instance refreshes runtime once without reconnecting', async () => { + const probe = enterHealthRecovery(); + probe.respond(200, { error: false, ready: false, instance: 'broken-worker' }); + await settle(); + assert.equal(runtimeReads, 1); + assert.equal(sockets.length, 1); + const retry = [...timers.entries()].find(([, timer]) => timer.delay >= 2000 && timer.delay <= 3000); + timers.delete(retry[0]); + retry[1].callback(); + probes.at(-1).respond(200, { error: false, ready: false, instance: 'broken-worker' }); + await settle(); + assert.equal(runtimeReads, 1, 'Repeated unready probes must not repeatedly read runtime metadata'); + assert.equal(sockets.length, 1); +}); + +test('a stale unready health response cannot refresh runtime for a newer connection', async () => { + const probe = enterHealthRecovery(); + store.getState().disconnect(); + store.getState().connect(); + sockets.at(-1).open(); + probe.respond(200, { error: false, ready: false, instance: 'stale-worker' }); + await settle(); + assert.equal(runtimeReads, 0); + assert.equal(store.getState().isConnected, true); +}); + +test('disconnect aborts its health probe and a late successful response cannot reconnect', async () => { + const probe = enterHealthRecovery(); + store.getState().disconnect(); + probe.respond(200); + await settle(); + assert.equal(probe.signal?.aborted, true); + assert.equal(sockets.length, 1); + assert.equal(store.getState().ws, null); + assert.equal(store.getState().isConnecting, false); + assert.equal(timers.size, 0); +}); + +test('healthy recovery retains the retry budget until the websocket actually opens', async () => { + const probe = enterHealthRecovery(); + probe.respond(200); + await settle(); + assert.equal(sockets.length, 2); + assert.equal(store.getState().reconnectAttempts, 5); + sockets.at(-1).open(); + assert.equal(store.getState().reconnectAttempts, 0); + assert.equal(store.getState().isConnected, true); +}); + +test('stale recovery callbacks cannot replace a newer manually connected socket', async () => { + const probe = enterHealthRecovery(); + store.getState().disconnect(); + store.getState().connect(); + const current = sockets.at(-1); + current.open(); + probe.respond(200); + await settle(); + assert.equal(sockets.length, 2); + assert.equal(store.getState().ws, current); + assert.equal(store.getState().isConnected, true); +}); + +test('health discovery binds a custom websocket tunnel to its own supervisor and ignores stale metadata', async () => { + const previous = { ...config }; + Object.assign(config, { + backendAddress: 'http://127.0.0.1:8088', + supervisorAddress: 'http://127.0.0.1:8089', + supervisorAddressExplicit: false, + }); + try { + const metadata = { + error: false, + ready: true, + server: { host: '127.0.0.1', port: 8088, scheme: 'http' }, + workerControl: { available: true, address: 'http://127.0.0.1:8089' }, + }; + store.setState({ address: 'ws://127.0.0.1:18088' }); + const older = enterHealthRecovery(); + assert.equal(older.url, 'http://127.0.0.1:18088/health'); + store.getState().disconnect(); + store.setState({ address: 'ws://127.0.0.1:28088' }); + const newer = enterHealthRecovery(); + newer.respond(200, metadata); + await settle(); + assert.equal(control.supervisorControlAddress(), 'http://127.0.0.1:28089'); + older.respond(200, metadata); + await settle(); + assert.equal(control.supervisorControlAddress(), 'http://127.0.0.1:28089'); + assert.equal(older.signal.aborted, true); + } finally { + Object.assign(config, previous); + } +}); + +test('default Vite websocket recovery retains the configured backend transport and its custom supervisor', async () => { + const previous = { ...config }; + const previousNodes = nodeStore.getState(); + Object.assign(config, { + serverAddress: 'http://127.0.0.1:5191', + backendAddress: 'http://127.0.0.1:8088', + supervisorAddress: 'http://127.0.0.1:8089', + supervisorAddressExplicit: false, + }); + nodeStore.setState({ fetchRuntimeStatus: originalRuntimeRead }); + try { + for (const port of [8089, 43001]) { + store.getState().disconnect(); + store.setState({ address: null }); + control.resetSupervisorControl(); + const previousSockets = sockets.length; + const probe = enterHealthRecovery(); + assert.equal(store.getState().address, 'ws://127.0.0.1:5191'); + assert.equal(probe.url, 'http://127.0.0.1:5191/health'); + const metadata = { + error: false, + ready: true, + instance: 'proxy-worker', + server: { host: '127.0.0.1', port: 8088, scheme: 'http' }, + workerControl: { available: true, address: `http://127.0.0.1:${port}` }, + }; + probe.respond(200, metadata); + await settle(); + const runtime = probes.at(-1); + assert.equal(runtime.url, 'http://127.0.0.1:5191/runtime/status'); + runtime.respond(200, metadata); + await settle(); + assert.equal(control.supervisorControlAddress(), `http://127.0.0.1:${port}`); + assert.equal(nodeStore.getState().runtimeStatus.ready, true); + assert.equal(sockets.length, previousSockets + 2); + } + } finally { + Object.assign(config, previous); + nodeStore.setState(previousNodes); + } +}); + +test('custom websocket recovery and welcome refresh the same runtime transport and fence the older status', async () => { + const previous = { ...config }; + const previousNodes = nodeStore.getState(); + Object.assign(config, { + serverAddress: 'http://127.0.0.1:5191', + backendAddress: 'http://127.0.0.1:8088', + supervisorAddress: 'http://127.0.0.1:8089', + supervisorAddressExplicit: false, + }); + nodeStore.setState({ fetchRuntimeStatus: originalRuntimeRead, instance: 'custom-worker' }); + try { + store.setState({ address: 'ws://127.0.0.1:18088' }); + const health = enterHealthRecovery(); + const metadata = { + error: false, + ready: true, + instance: 'custom-worker', + server: { host: '127.0.0.1', port: 8088, scheme: 'http' }, + workerControl: { available: true, address: 'http://127.0.0.1:8089' }, + }; + health.respond(200, metadata); + await settle(); + const older = probes.find((probe) => probe.url.endsWith('/runtime/status')); + assert.equal(older?.url, 'http://127.0.0.1:18088/runtime/status'); + assert.equal(control.supervisorControlAddress(), 'http://127.0.0.1:18089'); + + const replacement = sockets.at(-1); + replacement.open(); + replacement.onmessage({ + data: JSON.stringify({ + type: 'welcome', + sid: store.getState().sid, + instance: 'custom-worker', + current: null, + queued: {}, + recent: [], + }), + }); + await settle(); + const runtimeProbes = probes.filter((probe) => probe.url.endsWith('/runtime/status')); + assert.deepEqual( + runtimeProbes.map((probe) => probe.url), + ['http://127.0.0.1:18088/runtime/status', 'http://127.0.0.1:18088/runtime/status'], + ); + assert.equal(older.signal.aborted, true); + runtimeProbes[1].respond(200, { ...metadata, packages: { transformers: { available: true } } }); + await settle(); + older.respond(200, { + ...metadata, + ready: false, + packages: { transformers: { available: false } }, + workerControl: { available: true, address: 'http://127.0.0.1:43001' }, + }); + await settle(); + assert.equal(nodeStore.getState().runtimeStatus.ready, true); + assert.equal(nodeStore.getState().runtimeStatus.packages.transformers.available, true); + assert.equal(control.supervisorControlAddress(), 'http://127.0.0.1:18089'); + for (const probe of probes.filter((probe) => probe.url.includes('/studio_outputs'))) + probe.respond(200, { error: false, outputs: [] }); + await settle(); + } finally { + Object.assign(config, previous); + nodeStore.setState(previousNodes); + } +}); + +test('disconnect cancels a retry timer even when its callback was already queued', () => { + store.getState().connect(); + sockets.at(-1).fail(); + const timer = [...timers.values()][0]; + assert.ok(timer); + store.getState().disconnect(); + timer.callback(); + assert.equal(sockets.length, 1); + assert.equal(store.getState().ws, null); +}); + +test('a stalled backend health request times out and retries without starting another socket', async () => { + globalThis.fetch = (url, init) => + new Promise((_resolve, reject) => { + probes.push({ url: String(url), signal: init.signal }); + init.signal.addEventListener('abort', () => reject(new Error('cancelled')), { once: true }); + }); + enterHealthRecovery(); + const [timeoutId, timeout] = [...timers.entries()].find(([, timer]) => timer.delay === 5000); + timers.delete(timeoutId); + timeout.callback(); + await settle(); + assert.equal(probes[0].signal.aborted, true); + assert.equal(sockets.length, 1); + assert.equal(store.getState().reconnectAttempts, 5); + assert.equal(timers.size, 1); +}); diff --git a/scripts/weight-format-template-binding.test.mjs b/scripts/weight-format-template-binding.test.mjs new file mode 100644 index 00000000..6b1cfa2f --- /dev/null +++ b/scripts/weight-format-template-binding.test.mjs @@ -0,0 +1,1070 @@ +import assert from 'node:assert/strict'; +import { readFile } from 'node:fs/promises'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { after, before, test } from 'node:test'; +import { createServer } from 'vite'; + +const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); +const original = Object.fromEntries( + ['window', 'localStorage', 'sessionStorage', 'fetch'].map((key) => [key, globalThis[key]]), +); +let server, fixture; +const load = (name) => server.ssrLoadModule(`/src/${name}.ts`); + +before(async () => { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, String(value)), + removeItem: (key) => storage.delete(key), + }; + const sessionValues = new Map(); + globalThis.sessionStorage = { + getItem: (key) => sessionValues.get(key) ?? null, + setItem: (key, value) => sessionValues.set(key, String(value)), + removeItem: (key) => sessionValues.delete(key), + }; + globalThis.window = { + location: { origin: 'http://127.0.0.1:5191' }, + localStorage: globalThis.localStorage, + sessionStorage: globalThis.sessionStorage, + dispatchEvent: () => true, + }; + globalThis.fetch = async (url, options) => { + assert.match(String(url), /\/cache$/u, 'these units may only simulate normal cache eviction'); + assert.equal(options?.method, 'DELETE'); + return new Response(JSON.stringify({ error: false, nodes: JSON.parse(options.body).nodes }), { + headers: { 'Content-Type': 'application/json' }, + }); + }; + fixture = JSON.parse(await readFile(path.join(ROOT, 'tests/fixtures/public-flux3-missing-provider.v1.json'), 'utf8')); + server = await createServer({ + root: ROOT, + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); +}); +after(async () => { + await server?.close(); + for (const [key, value] of Object.entries(original)) { + if (value === undefined) delete globalThis[key]; + else globalThis[key] = value; + } +}); + +function selectedCase(modelType = 'Flux3DistilledModularPipeline') { + const capability = fixture.capabilitiesPayload.capabilities.find((item) => item.modelType === modelType); + assert.ok(capability, modelType); + const spec = capability.studioExecutionSpecs.find((item) => item.mode === 'text_to_image'); + assert.ok(spec); + return { + capability, + spec, + profile: capability.executionProfiles.find((item) => item.id === spec.executionProfileId), + }; +} + +async function formFor(capability, values = {}) { + const { DEFAULT_STUDIO_FORM } = await load('studio/modelProfiles'); + return { + ...DEFAULT_STUDIO_FORM, + mode: 'text_to_image', + modelType: capability.modelType, + modelRepo: capability.defaultRepo, + resourceMode: 'expert', + dtype: 'bfloat16', + quantizationMode: 'none', + autoOffload: false, + offloadMode: 'none', + width: 512, + height: 512, + randomSeed: false, + ...values, + }; +} + +// Keep this first and import only pre-existing modules: old source must fail on +// its actual dropped/hardcoded value, never on absence of the new helper file. +test('persisted explicit FP8r reaches the declared semantic weight-format binding', async () => { + const { capability, spec } = selectedCase(); + const contracts = await load('studio/outputContracts'); + const values = await load('studio/executionSpecValues'); + const form = await formFor(capability, { weightFormat: 'fp8r' }); + const restored = contracts.coerceStudioFormState(form); + const resolved = values.resolveStudioExecutionSpecValues({ ...restored, weightFormat: 'fp8r' }, spec, capability); + assert.deepEqual([restored.weightFormat, resolved.weightFormat], ['fp8r', 'fp8r']); + assert.deepEqual([resolved.dtype, resolved.quantizationMode], ['bfloat16', 'none']); +}); + +async function descriptors() { + const operations = await load('workflow/operationContracts'); + const catalog = await load('workflow/operationCatalog'); + const choices = await load('workflow/workflowChoices'); + const payload = fixture.capabilitiesPayload; + const contracts = operations.parseOperationContracts( + payload.operationContracts, + payload.operationContractSchemaVersion, + ); + const support = catalog.parsePipelineSupport( + payload.pipelineSupport, + payload.pipelineSupportSchemaVersion, + contracts, + ); + return { contracts, rows: choices.parseWorkflowModelDescriptors(payload, support) }; +} + +async function loaderFor(capability, spec) { + const { contracts } = await descriptors(); + const requests = await load('workflow/operationStarterRequest'); + const operations = await load('workflow/operationAuthoring'); + const source = fixture.starters.find( + (item) => + item.pipelineClass === spec.pipelineClass && + item.task === spec.mode && + item.authoring.executionProfileIds.includes(spec.executionProfileId) && + item.authoring.id.endsWith(':prompt-preview-append-fp32:v1'), + ); + assert.ok(source, spec.executionProfileId); + const raw = structuredClone(source); + const selection = { executionProfileId: spec.executionProfileId, authoringRecipeId: raw.authoring.id }; + const starter = requests.parseOperationStarter(raw, spec.pipelineClass, spec.mode, contracts, selection); + const graph = operations.createOperationStarter(starter, { x: 80, y: 120 }); + const loader = graph.nodes.find( + (node) => node.data.module === 'modules.ModularDiffusers' && node.data.action === 'ModelsLoader', + ); + assert.ok(loader); + assert.equal(loader.data.params.repo_id.value.value, capability.defaultRepo); + return { loader, raw, starter }; +} + +function withFormat(loader, format = 'fp8r') { + const node = structuredClone(loader); + node.data.params.weight_format = { ...node.data.params.weight_format, value: format }; + return node; +} + +test('format values are closed and current loader options are required for non-native edits', async () => { + const formats = await load('studio/weightFormat'); + assert.equal(formats.studioWeightFormat(undefined), 'native'); + for (const value of ['native', 'fp8r', 'nvfp4']) assert.equal(formats.studioWeightFormat(value), value); + for (const value of [null, true, 1, [], {}, 'FP8R', 'bnb_4bit']) + assert.throws(() => formats.studioWeightFormat(value), /backend-declared weight format/); + assert.equal(formats.assertStudioWeightFormatOptions(undefined), 'native'); + assert.throws(() => formats.assertStudioWeightFormatOptions('fp8r'), /current loader fields/); + assert.throws( + () => formats.assertStudioWeightFormatOptions('fp8r', { options: ['native'] }), + /current loader fields/, + ); + assert.equal(formats.assertStudioWeightFormatOptions('fp8r', { options: ['native', 'fp8r'] }), 'fp8r'); +}); + +test('native absence preserves historical template and prompt lock shapes while explicit formats bind new locks', async () => { + const exactness = await load('studio/templateExactness'); + const templates = await load('studio/templates'); + const hashes = await load('studio/stableHash'); + const template = structuredClone( + templates.STUDIO_TEMPLATES.find((item) => item.id === 'qwen_low_vram_product_concept'), + ); + assert.ok(template); + const before = structuredClone(template); + const native = { + ...template, + example: { ...template.example, lockedSettings: { ...template.example.lockedSettings, weightFormat: 'native' } }, + }; + const oldSettings = exactness.getTemplateLockedSettings(template); + assert.equal(Object.hasOwn(oldSettings, 'weightFormat'), false); + assert.deepEqual(exactness.getTemplateLockedSettings(native), oldSettings); + assert.equal(exactness.getTemplateLockHash(native), exactness.getTemplateLockHash(template)); + assert.equal( + exactness.getPromptSettingsHash({ ...oldSettings, weightFormat: 'native' }), + exactness.getPromptSettingsHash(oldSettings), + ); + assert.equal( + exactness.getPromptSettingsHash(oldSettings), + `ps_${hashes.hashString(hashes.stableStringify(oldSettings))}`, + ); + const fp8 = { + ...native, + example: { ...native.example, lockedSettings: { ...native.example.lockedSettings, weightFormat: 'fp8r' } }, + }; + const fp4 = { + ...fp8, + example: { ...fp8.example, lockedSettings: { ...fp8.example.lockedSettings, weightFormat: 'nvfp4' } }, + }; + assert.equal(exactness.getTemplateLockedSettings(fp8).weightFormat, 'fp8r'); + assert.notEqual(exactness.getTemplateLockHash(fp8), exactness.getTemplateLockHash(template)); + assert.notEqual(exactness.getTemplateLockHash(fp4), exactness.getTemplateLockHash(fp8)); + assert.notEqual( + exactness.getPromptSettingsHash(exactness.getTemplateLockedSettings(fp8)), + exactness.getPromptSettingsHash(oldSettings), + ); + assert.deepEqual(template, before); +}); + +test('each real public owner joins only its declared immutable weight-format inventory', async () => { + const formats = await load('studio/weightFormat'); + const { rows } = await descriptors(); + const fixtureBefore = structuredClone(fixture); + for (const modelType of ['Flux3DistilledModularPipeline', 'Flux3ModularPipeline']) { + const { capability, spec } = selectedCase(modelType); + const { loader } = await loaderFor(capability, spec); + assert.equal(formats.selectedNodeWeightFormatArtifact(loader, rows), null); + for (const format of ['fp8r', 'nvfp4']) { + const node = withFormat(loader, format); + const selected = formats.selectedNodeWeightFormatArtifact(node, rows); + const expected = capability.weightFormatSelections.find((item) => item.weightFormat === format); + assert.ok(expected); + assert.deepEqual(selected.selection, expected); + assert.equal(selected.descriptor.profileId, spec.executionProfileId); + assert.deepEqual(selected.options, ['native', 'fp8r', 'nvfp4']); + assert.equal( + Object.hasOwn(node.data.params, 'execution_profile_id'), + false, + 'actual ordinary loader does not carry a fabricated profile parameter', + ); + for (const [field, value] of [ + ['revision', '0'.repeat(40)], + ['model_type', 'ForeignPipeline'], + ]) { + const invalid = structuredClone(node); + invalid.data.params[field].value = value; + const before = structuredClone(invalid); + assert.throws(() => formats.selectedNodeWeightFormatArtifact(invalid, rows), /exact backend|do not declare/); + assert.deepEqual(invalid, before); + } + assert.throws( + () => + formats.selectedNodeWeightFormatArtifact( + node, + rows.filter((row) => row.profileId !== spec.executionProfileId), + ), + /exact backend|do not declare/, + ); + const descriptor = rows.find((row) => row.profileId === spec.executionProfileId); + const ambiguous = [...rows, { ...descriptor, profileId: 'ambiguous-same-artifact' }]; + assert.throws(() => formats.selectedNodeWeightFormatArtifact(node, ambiguous), /exact backend|do not declare/); + assert.equal( + formats.selectedNodeWeightFormatArtifact(node, ambiguous, spec.executionProfileId).descriptor.profileId, + spec.executionProfileId, + 'a verified template selection can disambiguate its exact profile', + ); + assert.throws( + () => formats.selectedNodeWeightFormatArtifact(node, [...rows, descriptor], spec.executionProfileId), + /exact backend|do not declare/, + 'the same explicit profile cannot have duplicate authorities', + ); + const local = structuredClone(node); + local.data.params.repo_id.value = { source: 'local', value: 'local-file.safetensors' }; + assert.throws(() => formats.selectedNodeWeightFormatArtifact(local, rows), /immutable Hub/); + const foreign = structuredClone(node); + foreign.data.module = 'modules.Foreign'; + assert.throws(() => formats.selectedNodeWeightFormatArtifact(foreign, rows), /does not declare/); + } + } + assert.deepEqual(fixture, fixtureBefore, 'source metadata and dormant qualification flags must remain unchanged'); +}); + +test('the public template creator binds FP8r from exact metadata without changing the shared registry', async () => { + const { createTemplateOperationGraph } = await load('studio/templateOperationWorkflow'); + const { expandFlowExecutionGraph } = await load('stores/useFlowStore'); + const { STUDIO_TEMPLATES } = await load('studio/templates'); + const { rows } = await descriptors(); + const originalFixture = structuredClone(fixture); + // This CPU source capture omits the ordinary Preview leaf. Reuse its real + // maintained definition without changing either shared metadata fixture. + const ancillary = JSON.parse(await readFile(path.join(ROOT, 'tests/fixtures/ancillary-authoring.v1.json'), 'utf8')); + const preview = ancillary.parents[0].registry['modules.Image.Preview']; + assert.deepEqual([preview.module, preview.action], ['modules.Image', 'Preview']); + const registry = { ...structuredClone(fixture.registry), 'modules.Image.Preview': structuredClone(preview) }; + const registryBefore = structuredClone(registry); + for (const modelType of ['Flux3DistilledModularPipeline', 'Flux3ModularPipeline']) { + const { capability, spec } = selectedCase(modelType); + const { starter } = await loaderFor(capability, spec); + const rawOwner = starter.nodes.find((item) => item.node.action === 'ModelsLoader'); + const declaredDevice = rawOwner.node.params.device.value; + assert.equal(declaredDevice, 'cpu:0', 'this source fixture declares only CPU devices'); + // A legitimate initial static field can still be native-only. Current + // descriptor metadata supplies choices to this instance, not to the registry. + rawOwner.node.params.weight_format.options = ['native']; + rawOwner.node.params.weight_format.hidden = true; + const template = structuredClone(STUDIO_TEMPLATES.find((item) => item.id === 'qwen_low_vram_product_concept')); + Object.assign(template, { + id: 'unit-format-template', + modelType, + mode: 'text_to_image', + workflowBlocks: [], + modelArtifact: { source: 'hub', value: capability.defaultRepo, revision: capability.revisionCandidates[0] }, + executionSelection: { + schemaVersion: 1, + pipelineClass: spec.pipelineClass, + task: spec.mode, + executionProfileId: spec.executionProfileId, + bindingSpec: { modelType, mode: spec.mode }, + implementation: 'native_stages', + memoryPolicy: 'custom_experimental', + authoringRecipeId: starter.authoring.id, + }, + }); + template.example = { ...template.example, mediaType: 'image', modelRevision: capability.revisionCandidates[0] }; + const graph = createTemplateOperationGraph( + template, + await formFor(capability, { weightFormat: 'fp8r', device: declaredDevice }), + starter, + registry, + spec, + capability, + { workflowModelDescriptors: rows }, + ); + const effective = expandFlowExecutionGraph(graph.nodes, graph.edges); + const owner = effective.nodes.find((node) => node.data.action === 'ModelsLoader'); + assert.ok(owner, 'inspect the declared executable owner inside the normal grouped template'); + assert.equal(owner.data.params.weight_format.value, 'fp8r'); + assert.deepEqual(owner.data.params.weight_format.options, ['native', 'fp8r', 'nvfp4']); + assert.equal(owner.data.params.weight_format.hidden, false); + assert.equal(Object.hasOwn(owner.data.params, 'execution_profile_id'), false); + assert.deepEqual(owner.data.params.repo_id.value, { source: 'hub', value: capability.defaultRepo }); + assert.equal(owner.data.params.revision.value, capability.revisionCandidates[0]); + } + assert.deepEqual(registry, registryBefore); + assert.deepEqual(fixture, originalFixture); + assert.equal(fixture.activeProvider, null, 'graph construction does not install or qualify the missing provider'); +}); + +test('native-only cache cannot satisfy a distinct variant and deduplication preserves both exact file selections', async () => { + const formats = await load('studio/weightFormat'); + const artifacts = await load('studio/artifactRequirements'); + const { capability, spec } = selectedCase(); + const { loader } = await loaderFor(capability, spec); + const { rows } = await descriptors(); + const selected = formats.selectedNodeWeightFormatArtifact(withFormat(loader), rows).selection; + const reference = (files) => ({ + nodeId: loader.id, + kind: 'repo', + value: selected.repo, + revision: selected.revision, + paramKey: 'repo_id', + downloadFiles: files, + }); + const baseCache = { + id: selected.repo, + complete: true, + installed: true, + planned_revision: selected.revision, + planned_files: [...capability.downloadFiles], + }; + const requirements = artifacts.getGraphWorkflowArtifactRequirements({ + references: [ + reference(capability.downloadFiles), + reference(selected.downloadFiles), + reference(selected.downloadFiles), + ], + hfCache: [baseCache], + localModels: [], + modelCacheDiagnostics: null, + }); + assert.equal( + requirements.length, + 2, + 'native and variant manifests are distinct, duplicate exact variant is one target', + ); + const missing = requirements.find((item) => item.installTarget?.files?.includes('variants/fp8r/model.safetensors')); + assert.ok(missing); + assert.equal(missing.status.runnable, false); + assert.equal(missing.primaryAction, 'Repair'); + assert.deepEqual(missing.installTarget.files, selected.downloadFiles); + assert.equal(missing.installTarget.revision, selected.revision); + assert.notEqual(missing.installTarget.files, selected.downloadFiles); + const installed = artifacts.getGraphWorkflowArtifactRequirements({ + references: [reference(selected.downloadFiles)], + hfCache: [{ ...baseCache, planned_files: [...selected.downloadFiles] }], + localModels: [], + modelCacheDiagnostics: null, + }); + assert.equal(installed[0].status.runnable, true); + assert.equal(installed[0].installTarget, undefined); + const separateInstalled = artifacts.getGraphWorkflowArtifactRequirements({ + references: [ + reference(capability.downloadFiles), + reference(selected.downloadFiles), + reference(selected.downloadFiles), + ], + hfCache: [{ ...baseCache, planned_files: [...new Set([...capability.downloadFiles, ...selected.downloadFiles])] }], + localModels: [], + modelCacheDiagnostics: null, + }); + assert.equal( + separateInstalled.every((item) => item.status.runnable && item.installTarget === undefined), + true, + ); + assert.equal(separateInstalled.length, 2); + assert.equal( + new Set(separateInstalled.map((item) => item.id)).size, + 2, + 'exact manifest identity must survive deduplication after Ready drops installTarget', + ); +}); + +test('AnimateDiff readiness requires the standard motion file at the pinned revision', async () => { + const { ANIMATEDIFF_MOTION_REQUIREMENT: motion, ANIMATELCM_MOTION_REQUIREMENT: lcm } = + await load('studio/modelProfiles'); + const { getRepoCacheStatus } = await load('studio/modelCache'); + const files = ['.gitattributes', 'README.md', 'config.json', 'diffusion_pytorch_model.safetensors']; + assert.deepEqual(motion.downloadFiles, files); + assert.notEqual(lcm.repo, motion.repo); + const cachedSelection = (weight) => ({ + id: motion.repo, + installed: true, + complete: true, + observed_selections: [{ revision: motion.revision, files: [...files.slice(0, -1), weight], complete: true }], + }); + const status = (weight) => + getRepoCacheStatus(motion.repo, [cachedSelection(weight)], [], null, { + revision: motion.revision, + files: motion.downloadFiles, + }); + assert.equal(status('diffusion_pytorch_model.fp16.safetensors').runnable, false); + assert.equal(status('diffusion_pytorch_model.safetensors').runnable, true); +}); + +test('observed exact cached selections supersede native receipts without confusing variants or repository prefixes', async () => { + const { getRepoCacheStatus, getStudioModelCacheStatus } = await load('studio/modelCache'); + const { getGraphWorkflowArtifactRequirements } = await load('studio/artifactRequirements'); + const repo = 'example/image'; + const revision = 'a'.repeat(40); + const native = ['model_index.json', 'native.safetensors']; + const files = ['model_index.json', 'variants/fp8r/model.safetensors']; + const entry = { + id: repo, + installed: true, + complete: true, + planned_revision: revision, + planned_files: native, + observed_selections: [{ revision, files, complete: true }], + }; + const status = (cache, expectation = { revision, files }) => getRepoCacheStatus(repo, cache, [], null, expectation); + assert.equal(status([entry]).runnable, true, 'a stale receipt is not an inventory of all cached files'); + assert.equal(status([{ ...entry, installed: false, complete: false, repair_required: true }]).runnable, true); + const incompleteNative = { ...entry, installed: false, complete: false, repair_required: true }; + assert.equal(status([incompleteNative], { revision }).runnable, false, 'a revision alone does not select FP8r'); + assert.equal(status([incompleteNative], { files }).runnable, false, 'files alone do not select a revision'); + assert.equal(status([entry], { revision, files: native }).runnable, false); + assert.equal(status([entry], { revision: 'b'.repeat(40), files }).runnable, false); + assert.equal(status([entry], { revision, files: ['variants/nvfp4/model.safetensors'] }).runnable, false); + assert.equal(status([{ ...entry, id: `${repo}-base` }]).runnable, false); + assert.equal(status([{ ...entry, id: `${repo}-base` }, entry]).runnable, true); + for (const observed_selections of [ + [{ revision, files, complete: false }], + [{ revision, files, complete: 'true' }], + [{ revision, files: [...files, '../escape'], complete: true }], + [], + null, + ]) { + assert.equal(status([{ ...entry, planned_files: files, observed_selections }]).runnable, false); + } + const { observed_selections: _observations, ...legacy } = entry; + assert.equal(status([{ ...legacy, planned_files: files }]).runnable, true, 'older backend compatibility'); + assert.equal(status([legacy]).runnable, false); + assert.equal(getRepoCacheStatus(repo, [{ ...legacy, id: `${repo}-base` }], [], null).runnable, false); + const profile = { defaultRepo: repo, revisionCandidates: [revision], downloadFiles: files }; + assert.equal(getStudioModelCacheStatus(profile, [entry], [], null).runnable, true); + const requirements = getGraphWorkflowArtifactRequirements({ + references: [{ nodeId: 'owner', kind: 'repo', value: repo, revision, paramKey: 'repo_id', downloadFiles: files }], + hfCache: [entry], + localModels: [], + modelCacheDiagnostics: null, + }); + assert.equal(requirements[0].status.runnable, true); + assert.equal(requirements[0].installTarget, undefined); +}); + +test('incompatible model or execution changes require an explicit Native choice without mutating the draft', async () => { + const formats = await load('studio/weightFormat'); + const values = await load('studio/executionSpecValues'); + const { rows } = await descriptors(); + const { capability, spec } = selectedCase(); + const form = await formFor(capability, { weightFormat: 'fp8r' }); + const before = structuredClone(form); + assert.doesNotThrow(() => formats.assertFormWeightFormatSelection(form, spec, capability, rows)); + const noBinding = { ...spec, bindings: spec.bindings.filter(([, , source]) => source !== 'weightFormat') }; + assert.throws(() => values.resolveStudioExecutionSpecValues(form, noBinding, capability), /does not declare/); + for (const [selectedSpec, selectedCapability, selectedRows] of [ + [noBinding, capability, rows], + [spec, { ...capability, modelType: 'ForeignPipeline' }, rows], + [spec, { ...capability, revisionCandidates: ['0'.repeat(40)] }, rows], + [spec, capability, []], + ]) + assert.throws( + () => formats.assertFormWeightFormatSelection(form, selectedSpec, selectedCapability, selectedRows), + /Choose Native explicitly; the graph is unchanged/, + ); + assert.deepEqual(form, before); + assert.doesNotThrow(() => + formats.assertFormWeightFormatSelection( + { ...form, weightFormat: 'native' }, + noBinding, + { ...capability, modelType: 'ForeignPipeline' }, + [], + ), + ); +}); + +test('managed weight-format aliases validate every current target before changing form or siblings', async () => { + const sync = await load('studio/managedControlSync'); + const { useFlowStore } = await load('stores/useFlowStore'); + const { useStudioStore } = await load('stores/useStudioStore'); + const { capability, spec } = selectedCase(); + const { loader } = await loaderFor(capability, spec); + const originalFlow = useFlowStore.getState(); + const originalStudio = useStudioStore.getState(); + try { + const node = (id) => { + const value = withFormat(loader, 'native'); + value.id = id; + value.data.studioRole = 'models'; + value.data.params.weight_format.options = ['native', 'fp8r', 'nvfp4']; + return value; + }; + const a = node('format-a'), + b = node('format-b'), + ordinary = node('format-manual'); + const binding = { + mode: 'text_to_image', + modelType: capability.modelType, + nodes: { models: a.id }, + managedNodeIds: [a.id, b.id], + managedEdgeIds: [], + fingerprint: 'unit-weight-format', + createdAt: 1, + updatedAt: 1, + }; + useFlowStore.setState({ nodes: [a, b, ordinary], edges: [] }); + useStudioStore.setState({ form: await formFor(capability), graphBinding: binding }); + sync.syncManagedNodeControlChange(a.id, 'weight_format', 'fp8r'); + assert.equal(useStudioStore.getState().form.weightFormat, 'fp8r'); + for (const id of [a.id, b.id]) + assert.equal( + useFlowStore.getState().nodes.find((item) => item.id === id).data.params.weight_format.value, + 'fp8r', + ); + assert.equal( + useFlowStore.getState().nodes.find((item) => item.id === ordinary.id).data.params.weight_format.value, + 'native', + ); + const restricted = structuredClone(useFlowStore.getState().nodes); + restricted.find((item) => item.id === b.id).data.params.weight_format.options = ['native']; + useFlowStore.setState({ nodes: restricted }); + const formBefore = structuredClone(useStudioStore.getState().form); + const nodesBefore = structuredClone(useFlowStore.getState().nodes); + assert.throws(() => sync.syncManagedNodeControlChange(a.id, 'weight_format', 'nvfp4'), /current loader fields/); + assert.deepEqual(useStudioStore.getState().form, formBefore); + assert.deepEqual(useFlowStore.getState().nodes, nodesBefore); + sync.syncManagedNodeControlChange(ordinary.id, 'weight_format', 'nvfp4'); + assert.deepEqual( + useStudioStore.getState().form, + formBefore, + 'ordinary graph fields are not managed form authority', + ); + assert.deepEqual(useFlowStore.getState().nodes, nodesBefore); + } finally { + useFlowStore.setState(originalFlow, true); + useStudioStore.setState(originalStudio, true); + } +}); + +test('applying a historical native template clears a prior explicit format without rewriting its locks', async () => { + const { useStudioStore } = await load('stores/useStudioStore'); + const { STUDIO_TEMPLATES } = await load('studio/templates'); + const formats = await load('studio/weightFormat'); + const exactness = await load('studio/templateExactness'); + const template = STUDIO_TEMPLATES.find((item) => item.id === 'qwen_low_vram_product_concept'); + assert.ok(template); + const before = structuredClone(template); + const hash = exactness.getTemplateLockHash(template); + const originalStudio = useStudioStore.getState(); + try { + useStudioStore.setState({ form: { ...originalStudio.form, weightFormat: 'fp8r' } }); + useStudioStore.getState().applyTemplate(template); + assert.equal(formats.studioWeightFormat(useStudioStore.getState().form.weightFormat), 'native'); + assert.equal(Object.hasOwn(exactness.getTemplateLockedSettings(template), 'weightFormat'), false); + assert.equal(exactness.getTemplateLockHash(template), hash); + assert.deepEqual(template, before); + } finally { + useStudioStore.setState(originalStudio, true); + } +}); + +test('actual managed sync entry points refuse an unsupported format before graph, form or binding mutation', async () => { + const bridge = await load('studio/graphBridge'); + const { useFlowStore } = await load('stores/useFlowStore'); + const { useStudioStore } = await load('stores/useStudioStore'); + const { useNodesStore } = await load('stores/useNodeStore'); + const { STUDIO_TEMPLATES } = await load('studio/templates'); + const { getTemplateLockedSettings } = await load('studio/templateExactness'); + const legacy = STUDIO_TEMPLATES.find((item) => item.id === 'qwen_low_vram_product_concept'); + assert.ok(legacy); + const { capability, spec } = selectedCase(); + const { rows } = await descriptors(); + const { loader } = await loaderFor(capability, spec); + const current = await formFor(capability, { weightFormat: 'fp8r' }); + const requested = { + ...current, + ...getTemplateLockedSettings(legacy), + modelType: legacy.modelType, + mode: legacy.mode, + resourceMode: 'expert', + weightFormat: 'fp8r', + }; + const binding = { + mode: current.mode, + modelType: current.modelType, + nodes: { models: loader.id }, + managedNodeIds: [loader.id], + managedEdgeIds: [], + fingerprint: 'unit-unchanged-before-refusal', + createdAt: 1, + updatedAt: 1, + }; + const oldFlow = useFlowStore.getState(), + oldStudio = useStudioStore.getState(), + oldNodes = useNodesStore.getState(); + try { + useFlowStore.setState({ nodes: [loader], edges: [], historyPast: [], historyFuture: [] }); + useStudioStore.setState({ form: current, graphBinding: binding, graphFinalization: null }); + useNodesStore.setState({ + studioModelCapabilities: fixture.capabilitiesPayload.capabilities, + studioExecutionSpecInvalid: false, + workflowModelDescriptors: rows, + }); + const snapshot = () => + structuredClone({ + form: useStudioStore.getState().form, + binding: useStudioStore.getState().graphBinding, + finalization: useStudioStore.getState().graphFinalization, + nodes: useFlowStore.getState().nodes, + edges: useFlowStore.getState().edges, + historyPast: useFlowStore.getState().historyPast, + historyFuture: useFlowStore.getState().historyFuture, + }); + const before = snapshot(); + for (const action of [bridge.syncStudioGraphValues, bridge.syncStudioGraphDefinition]) { + assert.throws(() => action(requested), /Choose Native explicitly; the graph is unchanged/); + assert.deepEqual(snapshot(), before); + } + } finally { + useFlowStore.setState(oldFlow, true); + useStudioStore.setState(oldStudio, true); + useNodesStore.setState(oldNodes, true); + } +}); + +test('the model-change owner preflight preserves explicit formats only for exact compatible target artifacts', async () => { + const { studioModelChangeWeightFormatPatch } = await load('studio/useStudioRunActions'); + const { rows } = await descriptors(); + const metadata = { + studioModelCapabilities: fixture.capabilitiesPayload.capabilities, + studioExecutionSpecInvalid: false, + workflowModelDescriptors: rows, + }; + const metadataBefore = structuredClone(metadata); + for (const [sourceType, targetType] of [ + ['Flux3DistilledModularPipeline', 'Flux3ModularPipeline'], + ['Flux3ModularPipeline', 'Flux3DistilledModularPipeline'], + ]) { + const { capability } = selectedCase(sourceType); + const target = selectedCase(targetType).capability; + const current = await formFor(capability, { weightFormat: 'fp8r' }); + const before = structuredClone(current); + assert.deepEqual(studioModelChangeWeightFormatPatch(current, targetType, metadata), { + modelRepo: target.defaultRepo, + }); + assert.deepEqual(current, before); + for (const [model, authority] of [ + ['QwenImageModularPipeline', metadata], + [targetType, { ...metadata, studioExecutionSpecInvalid: true }], + [ + targetType, + { ...metadata, workflowModelDescriptors: [...rows, rows.find((row) => row.repo === target.defaultRepo)] }, + ], + ]) { + assert.throws( + () => studioModelChangeWeightFormatPatch(current, model, authority), + /Choose Native explicitly; the graph is unchanged/, + ); + assert.deepEqual(current, before); + } + assert.deepEqual( + studioModelChangeWeightFormatPatch({ ...current, weightFormat: 'native' }, 'QwenImageModularPipeline', metadata), + {}, + 'an explicit Native reset retains the historical model-change path', + ); + } + assert.deepEqual(metadata, metadataBefore); +}); + +test('an explicit weight format cannot reuse or request a native-only Auto resource plan', async () => { + const auto = await load('studio/autoResource'); + const values = await load('studio/executionSpecValues'); + const formats = await load('studio/weightFormat'); + const { capability, spec } = selectedCase(); + const native = await formFor(capability, { resourceMode: 'auto' }); + const explicit = { ...native, weightFormat: 'fp8r' }; + // Exercise the existing legacy-plan path; this is a client fixture, not a + // fabricated backend hardware receipt for the newly selected format. + const candidate = { + id: 'legacy-native', + dtype: 'bfloat16', + quantizationMode: 'none', + offloadMode: 'none', + autoOffload: false, + installed: true, + }; + const plan = { selectedCandidate: candidate, candidates: [candidate], error: false }; + const before = structuredClone({ native, explicit, plan }); + assert.equal(auto.selectedAutoCandidate(plan, native), candidate); + assert.equal(auto.autoPlanIsReady(plan, native), true); + assert.equal(auto.autoResourceHealthBadge(plan, native), 'This should work'); + assert.equal(auto.autoResourceCompatibility(plan, native).source, 'backend_auto_planner'); + assert.equal(auto.formPatchForAutoCandidate(candidate, native).resourceMode, 'auto'); + assert.equal(values.resolveStudioExecutionSpecValues(native, spec, capability).weightFormat, 'native'); + assert.equal(auto.selectedAutoCandidate(plan, explicit), null); + assert.equal(auto.autoPlanIsReady(plan, explicit), false); + assert.equal( + auto.autoResourceInstallTarget({ ...plan, selectedInstallTarget: { repo: capability.defaultRepo } }, explicit), + null, + ); + assert.equal(auto.autoResourceHealthBadge(plan, explicit), 'Expert only'); + const refusal = auto.autoResourceCompatibility(plan, explicit); + assert.equal(refusal.state, 'expert_only'); + assert.equal(refusal.code, 'weight_format_auto_contract_unavailable'); + assert.equal(refusal.source, 'client_contract_guard'); + assert.equal(refusal.action, null); + const unavailable = (error) => error instanceof Error && error.message === formats.WEIGHT_FORMAT_AUTO_UNAVAILABLE; + assert.throws(() => auto.formPatchForAutoCandidate(candidate, explicit), unavailable); + assert.deepEqual(auto.formPatchForAutoCandidate(null, explicit), {}); + assert.throws(() => values.resolveStudioExecutionSpecValues(explicit, spec, capability), unavailable); + const expert = { ...explicit, resourceMode: 'expert' }; + assert.equal(values.resolveStudioExecutionSpecValues(expert, spec, capability).weightFormat, 'fp8r'); + const { rows } = await descriptors(); + assert.equal(formats.assertFormWeightFormatSelection(expert, spec, capability, rows).selection.weightFormat, 'fp8r'); + const originalFetch = globalThis.fetch; + let calls = 0; + globalThis.fetch = async () => { + calls += 1; + throw new Error('unexpected Auto request'); + }; + try { + await assert.rejects(auto.fetchAutoResourcePlan(explicit), unavailable); + await assert.rejects(auto.fetchAutoResourcePlans([native, explicit]), unavailable); + assert.equal(calls, 0, 'refuse before any native-only backend plan request'); + } finally { + globalThis.fetch = originalFetch; + } + assert.deepEqual({ native, explicit, plan }, before); +}); + +test('selected-format summaries and graph requirements use exact files without a native readiness fallback', async () => { + const formats = await load('studio/weightFormat'); + const cache = await load('studio/modelCache'); + const artifacts = await load('studio/artifactRequirements'); + const { capability, spec } = selectedCase(); + const { rows } = await descriptors(); + const { loader } = await loaderFor(capability, spec); + const form = await formFor(capability, { weightFormat: 'fp8r' }); + const selected = formats.selectedNodeWeightFormatArtifact(withFormat(loader), rows).selection; + const capabilities = fixture.capabilitiesPayload.capabilities; + const before = structuredClone({ form, capability, rows, capabilities }); + const nativeCache = [ + { + id: capability.defaultRepo, + installed: true, + complete: true, + planned_revision: capability.revisionCandidates[0], + planned_files: [...capability.downloadFiles], + }, + ]; + const options = { hfCache: nativeCache, localModels: [], modelCacheDiagnostics: null }; + const native = { ...form, weightFormat: 'native' }; + assert.equal(formats.studioWeightFormatProfile(native, capability, [], [], true), capability); + assert.equal(cache.getStudioModelCacheStatus(capability, nativeCache, [], null).runnable, true); + const profile = formats.studioWeightFormatProfile(form, capability, capabilities, rows); + assert.ok(profile); + assert.deepEqual( + [profile.defaultRepo, profile.revisionCandidates, profile.downloadFiles], + [selected.repo, [selected.revision], selected.downloadFiles], + ); + assert.match(profile.label, /FP8R/u); + assert.notEqual(profile.downloadFiles, selected.downloadFiles); + for (const key of ['templateEligible', 'galleryEligible', 'autoEligible']) + assert.equal(profile[key], capability[key]); + const status = cache.getStudioModelCacheStatus(profile, nativeCache, [], null); + assert.equal(status.runnable, false); + assert.equal(status.repairRequired, true); + assert.equal( + cache.reviewedExpertInstallTarget(profile, status), + null, + 'the fixture has no active required provider; summary projection cannot grant installation readiness', + ); + const requirements = artifacts.getStudioWorkflowArtifactRequirements({ + ...options, + form, + backendCapabilities: capabilities, + workflowModelDescriptors: rows, + }); + const pipeline = requirements.find((item) => item.repo === selected.repo); + assert.ok(pipeline); + assert.equal(pipeline.primaryAction, 'Repair'); + assert.equal(pipeline.status.runnable, false); + assert.deepEqual( + [pipeline.installTarget.revision, pipeline.installTarget.files], + [selected.revision, selected.downloadFiles], + ); + for (const [caps, declarations, invalid] of [ + [[], rows, false], + [capabilities, [], false], + [capabilities, rows, true], + ]) { + assert.equal(formats.studioWeightFormatProfile(form, capability, caps, declarations, invalid), null); + const missing = artifacts.getStudioWorkflowArtifactRequirements({ + ...options, + form, + backendCapabilities: caps, + workflowModelDescriptors: declarations, + studioExecutionSpecInvalid: invalid, + }); + assert.equal(missing.length, 1); + assert.equal(missing[0].primaryAction, 'Details'); + assert.equal(missing[0].status.runnable, false); + assert.equal(missing[0].installTarget, undefined); + } + const diagnostic = cache.getStudioModelCacheStatus(null, nativeCache, [], null); + assert.equal(diagnostic.runnable, false); + assert.equal(diagnostic.repairRequired, false); + assert.match(diagnostic.reason, /no native installation is selected/u); + const reference = { nodeId: loader.id, kind: 'repo', value: selected.repo, paramKey: 'repo_id' }; + const unrelated = { nodeId: 'unrelated-native', kind: 'repo', value: 'unrelated/native', paramKey: 'repo_id' }; + const unrelatedBaseline = artifacts.getGraphWorkflowArtifactRequirements({ ...options, references: [unrelated] })[0]; + const graph = artifacts.getGraphWorkflowArtifactRequirements({ + ...options, + references: [reference, unrelated], + nodes: [withFormat(loader)], + workflowModelDescriptors: rows, + }); + assert.equal(graph[0].primaryAction, 'Repair'); + assert.deepEqual( + [graph[0].installTarget.revision, graph[0].installTarget.files], + [selected.revision, selected.downloadFiles], + ); + assert.deepEqual(graph[1], unrelatedBaseline); + const invalidGraph = artifacts.getGraphWorkflowArtifactRequirements({ + ...options, + references: [reference, unrelated], + nodes: [withFormat(loader)], + workflowModelDescriptors: [], + }); + assert.equal(invalidGraph[0].primaryAction, 'Details'); + assert.equal(invalidGraph[0].status.runnable, false); + assert.equal(invalidGraph[0].installTarget, undefined); + assert.deepEqual(invalidGraph[1], unrelatedBaseline); + assert.deepEqual({ form, capability, rows, capabilities }, before); +}); + +test('actual persistence hydration retains unsupported format documents as blocked and recoverable', async () => { + const { useStudioStore } = await load('stores/useStudioStore'); + const { useFlowStore } = await load('stores/useFlowStore'); + const contracts = await load('studio/outputContracts'); + const formats = await load('studio/weightFormat'); + const exact = await load('studio/templateExactness'); + const auto = await load('studio/autoResource'); + const artifacts = await load('studio/artifactRequirements'); + const values = await load('studio/executionSpecValues'); + const { STUDIO_TEMPLATES } = await load('studio/templates'); + const { capability, spec } = selectedCase(); + const { loader } = await loaderFor(capability, spec); + const unknown = await formFor(capability, { + weightFormat: 'future-unsupported-format', + prompt: 'Retain authored wording.', + referenceImages: ['images/retained-unit-source.png'], + }); + const nullForm = { ...unknown, prompt: 'Retain the other document.', weightFormat: null }; + // A saved manual graph contains authored values, not registry callbacks or + // generated pipeline-identity signal values (durableFlowNodeSnapshot removes + // those intentionally). Keep every authored field in this realistic fixture. + const graphNode = { + id: loader.id, + type: loader.type, + position: { x: 80, y: 120 }, + data: { + module: loader.data.module, + action: loader.data.action, + type: loader.data.type, + label: 'Retain authored model label', + params: Object.fromEntries( + ['model_type', 'repo_id', 'revision', 'weight_format'].map((key) => [ + key, + { + type: loader.data.params[key].type, + label: loader.data.params[key].label, + value: + key === 'weight_format' ? 'future-unsupported-format' : structuredClone(loader.data.params[key].value), + }, + ]), + ), + }, + }; + const snapshot = (form) => ({ + nodes: [graphNode], + edges: [], + viewport: { x: 10, y: 20, zoom: 1 }, + studioForm: form, + selectedMode: form.mode, + activeTemplateId: null, + studioGraphBinding: null, + sourceOutputId: null, + pinnedGraphInputIds: [], + autoFieldOverrides: {}, + }); + const tabs = [ + { + id: 'blocked-saved', + title: 'Saved authoring', + intent: 'saved', + dirty: false, + source: 'manual', + createdAt: 1, + updatedAt: 2, + backendRevision: 7, + snapshot: snapshot(unknown), + }, + { + id: 'blocked-draft', + title: 'Dirty authoring', + intent: 'draft', + dirty: true, + source: 'manual', + createdAt: 3, + updatedAt: 4, + snapshot: snapshot(nullForm), + }, + ]; + const oldStudio = useStudioStore.getState(), + oldFlow = useFlowStore.getState(); + const oldStorage = sessionStorage.getItem('modiff.studio'), + oldFetch = globalThis.fetch; + let requests = 0; + globalThis.fetch = async () => { + requests += 1; + throw new Error('hydration must not contact the backend'); + }; + try { + sessionStorage.setItem( + 'modiff.studio', + JSON.stringify({ + version: 0, + state: { + form: unknown, + selectedMode: unknown.mode, + activeWorkflowTabId: tabs[0].id, + workflowTabs: tabs, + savedSnippets: ['Keep this authored snippet.'], + promptHistory: ['Keep this prompt.'], + }, + }), + ); + await useStudioStore.persist.rehydrate(); + assert.equal(useStudioStore.persist.hasHydrated(), true); + const state = useStudioStore.getState(); + assert.equal(state.form.weightFormat, null); + assert.equal(state.form.prompt, unknown.prompt); + assert.deepEqual(state.form.referenceImages, unknown.referenceImages); + assert.deepEqual( + state.workflowTabs.map((tab) => [ + tab.id, + tab.title, + tab.intent, + tab.dirty, + tab.snapshot.studioForm.prompt, + tab.snapshot.studioForm.weightFormat, + ]), + tabs.map((tab) => [tab.id, tab.title, tab.intent, tab.dirty, tab.snapshot.studioForm.prompt, null]), + ); + assert.deepEqual( + state.workflowTabs.map((tab) => tab.snapshot.nodes), + tabs.map((tab) => tab.snapshot.nodes), + ); + assert.deepEqual( + state.workflowTabs.map((tab) => tab.snapshot.edges), + [[], []], + ); + assert.deepEqual( + state.workflowTabs.map((tab) => tab.snapshot.viewport), + tabs.map((tab) => tab.snapshot.viewport), + ); + assert.deepEqual( + state.workflowTabs.map((tab) => tab.snapshot.studioForm.referenceImages), + [unknown.referenceImages, nullForm.referenceImages], + ); + assert.deepEqual(useFlowStore.getState().nodes, [graphNode]); + assert.deepEqual(state.savedSnippets, ['Keep this authored snippet.']); + assert.deepEqual(state.promptHistory, ['Keep this prompt.']); + const template = STUDIO_TEMPLATES.find((item) => item.id === 'qwen_low_vram_product_concept'); + assert.ok(template); + const blockedTemplate = { + ...template, + example: { ...template.example, lockedSettings: { ...template.example.lockedSettings, weightFormat: null } }, + }; + assert.doesNotThrow(() => exact.getTemplateLockHash(blockedTemplate)); + assert.notEqual( + exact.getPromptSettingsHash(state.form), + exact.getPromptSettingsHash({ ...state.form, weightFormat: 'native' }), + ); + assert.equal( + exact.getTemplateModifiedFields(blockedTemplate, { ...state.form, weightFormat: null }).includes('weightFormat'), + true, + ); + assert.throws( + () => values.resolveStudioExecutionSpecValues(state.form, spec, capability), + /backend-declared weight format/, + ); + const plan = { selectedCandidate: { id: 'legacy-native', installed: true }, candidates: [] }; + assert.equal(auto.selectedAutoCandidate(plan, state.form), null); + assert.equal(auto.autoPlanIsReady(plan, state.form), false); + assert.equal(auto.autoResourceInstallTarget(plan, state.form), null); + const requirement = artifacts.getStudioWorkflowArtifactRequirements({ + form: state.form, + hfCache: [], + localModels: [], + modelCacheDiagnostics: null, + }); + assert.equal(requirement[0].primaryAction, 'Details'); + assert.equal(requirement[0].installTarget, undefined); + await assert.rejects(auto.fetchAutoResourcePlan(state.form), /no backend Auto resource contract/); + const output = contracts.coerceStudioOutput({ + id: 'blocked-output', + url: '/source-metadata-only.png', + formSnapshot: unknown, + graphSnapshot: { nodes: [graphNode], edges: [] }, + promptSettingsHash: 'previous-native-proof', + exactTemplateCompatible: true, + }); + assert.ok(output); + assert.equal(output.formSnapshot.weightFormat, null); + assert.equal(output.promptSettingsHash, undefined); + assert.equal(output.exactTemplateCompatible, false); + assert.deepEqual(output.graphSnapshot.nodes, [graphNode]); + assert.equal(requests, 0); + useStudioStore.getState().updateForm({ weightFormat: 'native' }); + assert.equal(formats.studioWeightFormat(useStudioStore.getState().form.weightFormat), 'native'); + assert.equal(useStudioStore.getState().form.prompt, unknown.prompt); + assert.equal(requests, 0); + } finally { + globalThis.fetch = oldFetch; + useFlowStore.setState(oldFlow, true); + useStudioStore.setState(oldStudio, true); + if (oldStorage === null) sessionStorage.removeItem('modiff.studio'); + else sessionStorage.setItem('modiff.studio', oldStorage); + } +}); diff --git a/scripts/workflow-auto-audio-provenance.test.mjs b/scripts/workflow-auto-audio-provenance.test.mjs new file mode 100644 index 00000000..e5d24394 --- /dev/null +++ b/scripts/workflow-auto-audio-provenance.test.mjs @@ -0,0 +1,551 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { test } from 'node:test'; +import { canonicalizeApiGraph, executionPlanIdentity, executionReceiptIdentity } from './live-proof-provenance.mjs'; +import { canonicalJsonHash, stableJsonValue } from './canonical-json.mjs'; +import { + observedWorkflowAutoAudioProofMatches, + observedWorkflowAutoResourceId, +} from './observed-workflow-auto-resource.mjs'; + +const literal = (value) => ({ value }); +const connect = (sourceId, sourceKey) => ({ sourceId, sourceKey }); +function workerHash(graph) { + const text = JSON.stringify(stableJsonValue({ nodes: graph.nodes, paths: graph.paths })).replace( + /[\u007f-\uffff]/gu, + (c) => '\\u' + c.charCodeAt(0).toString(16).padStart(4, '0'), + ); + return 'sha256:workflow-auto-v1:' + createHash('sha256').update(text).digest('hex'); +} + +// Synthetic receipts describe no installed model, real execution, qualification or publication. +function audioWitness({ continuation = false, prefix = '', seed = 41, prompt = 'A three-beat song' } = {}) { + const id = Object.fromEntries( + ['quant', 'recipe', 'owner', 'generate', 'export', 'load', 'match', 'join'].map((key) => [key, prefix + key]), + ); + const mode = continuation ? 'audio_continuation' : 'text_to_audio'; + const contract = { + schemaVersion: 1, + library: 'diffusers', + mediaKind: 'audio', + pipelineClass: 'ExampleAudioPipeline', + repository: 'example/audio', + mode, + actions: { Generate: [mode] }, + sourceAudio: continuation ? 'required' : 'forbidden', + referenceAudio: 'forbidden', + }; + const form = { + resourceMode: 'auto', + mode, + modelType: 'LegacyAudioDisplayAlias', + quantizationMode: 'none', + dtype: 'bfloat16', + device: 'cuda:0', + autoOffload: true, + offloadMode: 'model_cpu', + trustRemoteCode: false, + audioDuration: 75, + extensionDuration: 15, + steps: 8, + guidanceScale: 1, + seed, + prompt, + lyrics: 'MoDiff—three beats', + vocalLanguage: 'en', + shift: 3, + bpm: 170, + keyscale: 'C# minor', + timesignature: '3', + sourceAudio: continuation ? '@data/audio/source.wav' : '', + }; + const recipe = { + device_map: 'none', + max_memory: '{}', + device_map_overrides: '{}', + offload_mode: 'model_cpu', + device: 'cuda:0', + attention_backend: 'auto', + attention_components: '', + vae_slicing: true, + vae_tiling: true, + layerwise_casting: false, + layerwise_casting_components: 'transformer', + layerwise_storage_dtype: 'float8_e4m3fn', + layerwise_compute_dtype: 'bfloat16', + channels_last: false, + channels_last_components: 'unet,vae', + regional_compile: false, + compile_components: 'transformer', + compile_backend: 'inductor', + compile_mode: 'default', + compile_fullgraph: false, + compile_dynamic: false, + denoiser_cache: 'none', + cache_threshold: 0.05, + cache_options: '{}', + }; + const owner = { + model_id: { source: 'hub', value: 'example/audio' }, + pipeline_class: 'ExampleAudioPipeline', + mode, + audio_contract: contract, + revision: 'a'.repeat(40), + dtype: 'bfloat16', + device: 'cuda:0', + auto_offload: true, + offload_mode: 'model_cpu', + enable_vae_tiling: true, + low_cpu_mem_usage: true, + }; + const generate = { + audio_contract: contract, + task_type: continuation ? 'continuation' : 'text2music', + prompt, + lyrics: form.lyrics, + audio_duration: 75, + extension_duration: 15, + vocal_language: 'en', + num_inference_steps: 8, + guidance_scale: 1, + shift: 3, + seed, + bpm: 170, + keyscale: 'C# minor', + timesignature: '3', + sample_rate: 48000, + return_continuation_tail: continuation, + }; + const node = (module, action, values) => ({ + module, + action, + params: Object.fromEntries(Object.entries(values).map(([k, v]) => [k, literal(v)])), + }); + const nodes = { + [id.quant]: node('modules.DiffusersRuntime', 'PipelineQuantizationConfigV2', { + backend: 'none', + components: ['transformer'], + dtype: 'bfloat16', + excluded_modules: '', + component_overrides: '{}', + }), + [id.recipe]: node('modules.DiffusersRuntime', 'DiffusersExecutionRecipe', recipe), + [id.owner]: node('modules.DiffusersAudio', 'LoadPipeline', owner), + [id.generate]: node('modules.DiffusersAudio', 'Generate', generate), + [id.export]: node('modules.Audio', 'Export', { filename: '{PATH:audio}/example.wav', sample_rate: 48000 }), + }; + nodes[id.recipe].params.quantization_config = connect(id.quant, 'quantization_config'); + nodes[id.owner].params.execution_recipe = connect(id.recipe, 'execution_recipe'); + nodes[id.generate].params.pipeline = connect(id.owner, 'pipeline'); + nodes[id.export].params.audio = connect(id.generate, 'audio'); + nodes[id.export].params.preview = { display: 'ui_audio', sourceKey: 'file' }; + let order = [id.quant, id.recipe, id.owner, id.generate, id.export]; + if (continuation) { + nodes[id.load] = node('modules.Audio', 'Load', { file: '@data/audio/source.wav' }); + nodes[id.load].params.preview = { + display: 'ui_audio', + sourceKey: 'filename', + value: ['/file?file=%40data/audio/source.wav'], + }; + nodes[id.generate].params.source_audio = connect(id.load, 'audio'); + nodes[id.match] = { + module: 'modules.Audio', + action: 'MatchLoudness', + params: { audio: connect(id.generate, 'audio'), reference: connect(id.load, 'audio') }, + }; + nodes[id.join] = { + module: 'modules.Audio', + action: 'Join', + params: { + source: connect(id.load, 'audio'), + continuation: connect(id.match, 'output'), + boundary_fade_seconds: literal(0.01), + }, + }; + nodes[id.export].params.audio = connect(id.join, 'output'); + order = [id.load, id.quant, id.recipe, id.owner, id.generate, id.match, id.join, id.export]; + } + const graph = { + sid: 'session', + nodes, + paths: [order], + runtimeHints: { + resourceMode: 'auto', + workflowTabId: 'workflow', + clientRunId: 'client', + runInputHash: 'input', + workflowSnapshot: { studioForm: form }, + }, + }; + graph.runtimeHints.workflowAutoPlan = { schemaVersion: 1, graphHash: workerHash(graph) }; + const capture = (values) => + Object.fromEntries(Object.entries(values).map(([key, value]) => [key, { source: 'literal', value }])); + const ownerFields = Object.fromEntries( + [ + 'model_id', + 'pipeline_class', + 'revision', + 'dtype', + 'device', + 'auto_offload', + 'offload_mode', + 'enable_vae_tiling', + ].map((key) => [key, key === 'model_id' ? owner.model_id.value : owner[key]]), + ); + const rows = order.map((nodeId) => ({ + nodeId, + module: nodes[nodeId].module, + action: nodes[nodeId].action, + fields: {}, + omittedFields: {}, + })); + const byId = new Map(rows.map((row) => [row.nodeId, row])); + byId.get(id.owner).fields = capture(ownerFields); + byId.get(id.quant).fields = capture({ dtype: 'bfloat16' }); + byId.get(id.recipe).fields = capture( + Object.fromEntries( + ['device', 'offload_mode', 'attention_backend', 'vae_slicing', 'vae_tiling'].map((key) => [key, recipe[key]]), + ), + ); + byId.get(id.generate).fields = capture({ + ...Object.fromEntries( + [ + 'prompt', + 'lyrics', + 'vocal_language', + 'num_inference_steps', + 'guidance_scale', + 'shift', + 'seed', + 'bpm', + 'keyscale', + 'timesignature', + 'sample_rate', + ].map((key) => [key, generate[key]]), + ), + audio_duration: continuation ? 90 : 75, + }); + byId.get(id.export).fields = capture({ sample_rate: 48000 }); + const resolvedFields = { + [id.owner]: Object.fromEntries( + ['model_id', 'pipeline_class', 'revision', 'dtype', 'device', 'offload_mode', 'auto_offload', 'mode'].map( + (key) => [key, owner[key]], + ), + ), + [id.recipe]: Object.fromEntries( + [ + 'attention_backend', + 'regional_compile', + 'layerwise_casting', + 'channels_last', + 'device_map', + 'denoiser_cache', + 'max_memory', + 'device_map_overrides', + 'vae_slicing', + 'vae_tiling', + 'offload_mode', + 'device', + ].map((key) => [key, recipe[key]]), + ), + [id.quant]: { backend: 'none', component_overrides: '{}' }, + [id.generate]: { num_inference_steps: 8, guidance_scale: 1, audio_duration: 75 }, + }; + const task = { + task_id: 'task', + status: 'completed', + attempt_index: 0, + sid: graph.sid, + workflow_tab_id: 'workflow', + client_run_id: 'client', + run_input_hash: 'input', + workflow_snapshot: structuredClone(graph.runtimeHints.workflowSnapshot), + resourceCandidateId: null, + runtimePreparation: { + resourceMode: 'auto', + workflowAuto: { + strategy: 'dependency_order_retained_owners', + schedule: null, + cachePreparation: null, + reusedOwnerIds: [], + preparedDataNodes: [], + appliedUpdates: [], + releases: [], + resolvedFields, + }, + }, + runtimeMeasurement: { elapsedSeconds: 10, peakAllocatedBytes: 1024, backend: 'rocm', device: 'cuda:0' }, + }; + const output = { + taskId: 'task', + attemptIndex: 0, + sid: graph.sid, + workflowTabId: 'workflow', + clientRunId: 'client', + runInputHash: 'input', + nodeId: id.export, + apiGraphSnapshot: structuredClone(graph), + formSnapshot: structuredClone(form), + resolvedExecutionInputs: { + schemaVersion: 1, + source: 'backend-execution', + taskId: 'task', + attemptIndex: 0, + nodeId: id.export, + truncated: false, + uncapturedNodeIds: [], + nodes: rows, + }, + }; + const context = { + taskId: 'task', + executionReceipt: task, + executedOutput: output, + modelIdentities: [ + { + repoId: 'example/audio', + selectedRevision: 'a'.repeat(40), + modelRevision: 'example/audio@' + 'a'.repeat(40), + fingerprint: 'sha256:' + 'b'.repeat(64), + }, + ], + }; + return { graph, context, id, task, output }; +} + +for (const continuation of [false, true]) { + test(`ordinary Auto audio derives only the executed resource identity (${continuation ? 'joined continuation' : 'text'})`, () => { + const w = audioWitness({ continuation }); + const before = JSON.stringify(w); + const plan = executionPlanIdentity(w.graph, w.context).plan; + assert.equal(plan.source, 'observed-workflow-auto-audio-resource-v1'); + assert.equal(plan.resourceMode, 'auto'); + assert.equal(plan.modelType, 'ExampleAudioPipeline'); + assert.equal(plan.modelRepo, 'example/audio'); + assert.equal(plan.modelRevision, 'a'.repeat(40)); + assert.equal(plan.resourceObservation.workload.effectiveAudioDuration, continuation ? 90 : 75); + assert.match( + executionReceiptIdentity(w.task, plan).resourceCandidateId, + /^observed-workflow-auto-audio-resource-v1:/u, + ); + assert.equal(w.task.resourceCandidateId, null); + assert.equal(JSON.stringify(w), before, 'do not retrofit raw task or graph fields'); + assert.equal(plan.qualified, undefined); + }); +} + +test('Auto audio resource identity ignores node labels, prompt and seed but retains effective duration', () => { + const a = audioWitness(), + b = audioWitness({ prefix: 'renamed-', seed: 52, prompt: 'A different song' }); + const first = executionPlanIdentity(a.graph, a.context).plan; + const second = executionPlanIdentity(b.graph, b.context).plan; + assert.equal(first.source, 'observed-workflow-auto-audio-resource-v1'); + assert.equal(first.observedResourceCandidateId, second.observedResourceCandidateId); + const continuation = audioWitness({ continuation: true }); + assert.notEqual( + first.observedResourceCandidateId, + executionPlanIdentity(continuation.graph, continuation.context).plan.observedResourceCandidateId, + ); +}); + +test('missing or conflicting raw Auto audio authority stays held', () => { + for (const mutate of [ + (w) => { + w.task.status = 'failed'; + }, + (w) => { + w.task.attempt_index = 1; + }, + (w) => { + w.output.taskId = 'other'; + }, + (w) => { + w.output.sid = 'other'; + }, + (w) => { + delete w.task.runtimePreparation; + }, + (w) => { + w.task.runtimePreparation.workflowAuto.reusedOwnerIds = [w.id.owner]; + }, + (w) => { + w.task.runtimePreparation.workflowAuto.preparedDataNodes = [w.id.load]; + }, + (w) => { + w.task.runtimePreparation.workflowAuto.appliedUpdates = [{}]; + }, + (w) => { + delete w.output.resolvedExecutionInputs.nodes.find((row) => row.nodeId === w.id.generate).fields.lyrics; + }, + (w) => { + w.output.resolvedExecutionInputs.nodes.find((row) => row.nodeId === w.id.generate).fields.seed.value++; + }, + (w) => { + w.task.runtimePreparation.workflowAuto.resolvedFields[w.id.owner].revision = 'b'.repeat(40); + }, + (w) => { + w.context.modelIdentities = []; + }, + (w) => { + w.task.resourceCandidateId = 'contradictory-primary-candidate'; + }, + (w) => { + w.output.resolvedExecutionInputs.schemaVersion = 2; + }, + (w) => { + w.output.resolvedExecutionInputs.truncated = true; + }, + (w) => { + w.output.resolvedExecutionInputs.nodes.push(w.output.resolvedExecutionInputs.nodes[0]); + }, + (w) => { + w.task.runtimePreparation.workflowAuto.schedule = {}; + }, + (w) => { + w.task.runtimePreparation.workflowAuto.cachePreparation = {}; + }, + (w) => { + w.task.runtimePreparation.workflowAuto.releases = [w.id.owner]; + }, + (w) => { + w.graph.runtimeHints.workflowAutoPlan.graphHash = 'sha256:other'; + }, + ]) { + const w = audioWitness({ continuation: true }); + mutate(w); + assert.notEqual(executionPlanIdentity(w.graph, w.context).plan.source, 'observed-workflow-auto-audio-resource-v1'); + } +}); + +test('Auto audio refuses unsupported authored controls even with matching task snapshots', () => { + for (const mutate of [ + (w) => { + w.graph.nodes[w.id.recipe].params.attention_backend.value = '_native_math'; + }, + (w) => { + w.graph.nodes[w.id.recipe].params.regional_compile.value = true; + }, + (w) => { + w.graph.nodes[w.id.recipe].params.max_memory.value = '{"0":100}'; + }, + (w) => { + w.graph.nodes[w.id.quant].params.backend.value = 'bitsandbytes'; + }, + (w) => { + w.graph.nodes[w.id.generate].params.return_continuation_tail.value = false; + }, + (w) => { + w.graph.nodes[w.id.export].params.audio.sourceId = w.id.generate; + }, + (w) => { + w.graph.nodes[w.id.generate].params.source_audio.sourceId = w.id.export; + }, + (w) => { + w.graph.nodes[w.id.load].params.file = { sourceId: w.id.export, sourceKey: 'file' }; + }, + (w) => { + w.graph.nodes[w.id.load].params.file.value = '@data/audio/other.wav'; + }, + (w) => { + w.graph.runtimeHints.workflowSnapshot.studioForm.extensionDuration = 30; + }, + (w) => { + w.graph.nodes[w.id.owner].params.revision.value = 'main'; + }, + (w) => { + w.graph.loops = []; + }, + ]) { + const w = audioWitness({ continuation: true }); + mutate(w); + w.graph.runtimeHints.workflowAutoPlan.graphHash = workerHash(w.graph); + w.output.apiGraphSnapshot = structuredClone(w.graph); + w.output.formSnapshot = structuredClone(w.graph.runtimeHints.workflowSnapshot.studioForm); + w.task.workflow_snapshot = structuredClone(w.graph.runtimeHints.workflowSnapshot); + assert.notEqual(executionPlanIdentity(w.graph, w.context).plan.source, 'observed-workflow-auto-audio-resource-v1'); + } +}); + +function projection(w) { + const plan = executionPlanIdentity(w.graph, w.context).plan; + const provenance = { + graph: { canonicalGraph: canonicalizeApiGraph(w.graph) }, + models: { items: w.context.modelIdentities }, + output: { + items: [{ durationSeconds: plan.resourceObservation.workload.effectiveAudioDuration, sampleRate: 48000 }], + }, + }; + return { plan, provenance }; +} + +test('rehashed incomplete or contradictory audio observations cannot supply resource IDs', () => { + for (const mutate of [ + (p) => { + p.resourceObservation.controls[0].fields = {}; + }, + (p) => { + p.resourceObservation.controls.pop(); + }, + (p) => { + p.resourceObservation.controls[0].fields.extra = true; + }, + (p) => { + p.resourceObservation.workload.steps++; + }, + (p) => { + p.resourceObservation.workload.effectiveAudioDuration++; + }, + (p) => { + p.resourceObservation.controls.find((c) => c.scope.endsWith('.Generate')).fields.audio_duration = 90; + }, + (p) => { + p.resourceObservation.controls.find((c) => c.scope.endsWith('.LoadPipeline')).fields.revision = 'b'.repeat(40); + }, + (p) => { + p.resourceObservation.controls.find((c) => + c.scope.endsWith('.DiffusersExecutionRecipe'), + ).fields.regional_compile = true; + }, + (p) => { + p.resourceObservation.controls.find((c) => c.scope.endsWith('.PipelineQuantizationConfigV2')).fields.backend = + 'other'; + }, + ]) { + const { plan } = projection(audioWitness({ continuation: true })); + mutate(plan); + plan.observedResourceCandidateId = plan.source + ':' + canonicalJsonHash(plan.resourceObservation); + assert.equal(observedWorkflowAutoResourceId(plan), null); + } +}); + +test('audio projection remains bound to canonical controls, model pin and delivery duration', () => { + for (const continuation of [false, true]) { + const { plan: validPlan, provenance: validProof } = projection(audioWitness({ continuation })); + assert.equal(observedWorkflowAutoAudioProofMatches(validPlan, validProof), true); + for (const mutate of [ + (p) => { + p.models.items[0].selectedRevision = 'b'.repeat(40); + }, + (p) => { + p.output.items[0].durationSeconds = 15; + }, + (p) => { + p.output.items[0].sampleRate = 44100; + }, + (p) => { + p.graph.canonicalGraph.nodes.find((n) => n.action === 'Generate').params.audio_duration.value = 15; + }, + (p) => { + p.graph.canonicalGraph.nodes.find((n) => n.action === 'Export').params.sample_rate.value = 44100; + }, + (p) => { + p.graph.canonicalGraph.nodes.find((n) => n.action === 'DiffusersExecutionRecipe').params.offload_mode.value = + 'none'; + }, + ]) { + const { plan, provenance } = projection(audioWitness({ continuation })); + mutate(provenance); + assert.equal(observedWorkflowAutoAudioProofMatches(plan, provenance), false); + } + } +}); diff --git a/scripts/workflow-auto-control-provenance.test.mjs b/scripts/workflow-auto-control-provenance.test.mjs new file mode 100644 index 00000000..4bd76be5 --- /dev/null +++ b/scripts/workflow-auto-control-provenance.test.mjs @@ -0,0 +1,345 @@ +import assert from 'node:assert/strict'; +import test from 'node:test'; +import { canonicalizeApiGraph, executionPlanIdentity, executionReceiptIdentity } from './live-proof-provenance.mjs'; +import { workerGraphHash } from './observed-workflow-auto-resource.mjs'; +import { + observedWorkflowAutoControlPlan, + observedWorkflowAutoControlProofMatches, + observedWorkflowAutoControlResourceId, +} from './observed-workflow-auto-control-resource.mjs'; +function fixture() { + const lit = (value) => ({ value }), + wire = (sourceId, sourceKey) => ({ sourceId, sourceKey }); + const form = { + mode: 'control_image', + resourceMode: 'auto', + quantizationMode: 'none', + trustRemoteCode: false, + randomSeed: false, + modelType: 'ExampleModularPipeline', + dtype: 'bfloat16', + width: 64, + height: 64, + seed: 12, + steps: 2, + guidanceScale: 4, + strength: 0.8, + prompt: 'A fictional carton.', + negativePrompt: '', + maxSequenceLength: 512, + conditioningScale: 1.2, + offloadMode: 'none', + autoOffload: false, + controlImage: '@data/control.png', + }; + const node = (action, values, module = 'modules.ModularDiffusers') => ({ + module, + action, + params: Object.fromEntries(Object.entries(values).map(([k, v]) => [k, lit(v)])), + }); + const nodes = { + input: node('Load', { file: form.controlImage, alpha_channel: 'ignore' }, 'modules.Image'), + aux: node('AutoModelLoader', { + model_type: 'controlnet', + model_id: { source: 'hub', value: 'example/control' }, + revision: 'b'.repeat(40), + dtype: 'bfloat16', + device: 'cuda:0', + auto_offload: false, + offload_mode: 'none', + trust_remote_code: false, + subfolder: '', + variant: '', + component_class: '', + }), + owner: node('ModelsLoader', { + model_type: form.modelType, + repo_id: { source: 'hub', value: 'example/base' }, + revision: 'a'.repeat(40), + dtype: 'bfloat16', + device: 'cuda:0', + workflow_id: 'controlnet_text2image', + trust_remote_code: false, + weight_format: 'native', + weight_loading_mode: 'cpu', + auto_offload: true, + offload_mode: 'group_cpu', + attention_backend: 'inherit', + vae_slicing: null, + vae_tiling: null, + quant_config: null, + unet: null, + vae: null, + lora_list: null, + }), + control: node('Controlnet', { + model_type: form.modelType, + width: 64, + height: 64, + seed: 12, + controlnet_conditioning_scale: 1.2, + control_guidance_start: 0, + control_guidance_end: 1, + }), + guide: node('Guider', { + model_type: form.modelType, + guider: 'ClassifierFreeGuidance', + guidance_scale: 4, + guidance_rescale: 0, + use_original_formulation: false, + enabled: true, + start: 0, + stop: 1, + }), + encode: node('EncodePrompt', { prompt: form.prompt, max_sequence_length: 512 }), + denoise: node('Denoise', { + width: 64, + height: 64, + seed: 12, + num_inference_steps: 2, + guidance_scale: 4.5, + strength: 0.8, + }), + decode: node('DecodeLatents', {}), + output: node('Preview', {}, 'modules.Image'), + }; + for (const [t, k, s, p] of [ + ['owner', 'controlnet', 'aux', 'model'], + ['control', 'control_image', 'input', 'image'], + ['control', 'controlnet', 'aux', 'model'], + ['control', 'vae', 'owner', 'vae_out'], + ['encode', 'text_encoders', 'owner', 'text_encoders'], + ['encode', 'guider', 'guide', 'guider_out'], + ['denoise', 'unet', 'owner', 'unet_out'], + ['denoise', 'embeddings', 'encode', 'embeddings'], + ['denoise', 'controlnet_bundle', 'control', 'controlnet_bundle'], + ['denoise', 'route_state_in', 'control', 'route_state_out'], + ['denoise', 'guider', 'guide', 'guider_out'], + ['denoise', 'scheduler', 'owner', 'scheduler'], + ['decode', 'vae', 'owner', 'vae_out'], + ['decode', 'latents', 'denoise', 'latents'], + ['decode', 'route_state_in', 'denoise', 'route_state_out'], + ['output', 'image', 'decode', 'images'], + ]) + nodes[t].params[k] = wire(s, p); + const graph = { + sid: 'example-session', + nodes, + paths: [['input', 'aux', 'owner', 'control', 'guide', 'encode', 'denoise', 'decode', 'output']], + }; + graph.runtimeHints = { + resourceMode: 'auto', + workflowSnapshot: { studioForm: form, nodes: [], edges: [] }, + workflowTabId: 'example-workflow', + clientRunId: 'example-run', + runInputHash: 'example-input', + }; + graph.runtimeHints.workflowAutoPlan = { schemaVersion: 1, graphHash: workerGraphHash(graph) }; + const rows = Object.entries(nodes).map(([nodeId, n]) => ({ + nodeId, + module: n.module, + action: n.action, + omittedFields: {}, + fields: Object.fromEntries( + Object.entries(n.params) + .filter(([, p]) => !p.sourceId) + .map(([k, p]) => [ + k, + { source: 'literal', value: ['repo_id', 'model_id'].includes(k) ? p.value.value : p.value }, + ]), + ), + })); + delete rows.find((r) => r.nodeId === 'control').fields.controlnet_conditioning_scale; + rows.find((r) => r.nodeId === 'input').fields.source_hashes = { source: 'literal', value: ['c'.repeat(64)] }; + const output = { + taskId: 'example-task', + attemptIndex: 0, + nodeId: 'output', + sid: graph.sid, + workflowTabId: 'example-workflow', + clientRunId: 'example-run', + runInputHash: 'example-input', + apiGraphSnapshot: graph, + formSnapshot: form, + resolvedExecutionInputs: { + schemaVersion: 1, + source: 'backend-execution', + taskId: 'example-task', + attemptIndex: 0, + nodeId: 'output', + truncated: false, + uncapturedNodeIds: [], + nodes: rows, + graphTasks: [{ loaderId: 'owner', pipelineClass: form.modelType, task: null }], + }, + }; + const auto = { + strategy: 'dependency_order_retained_owners', + schedule: null, + cachePreparation: null, + reusedOwnerIds: [], + preparedDataNodes: [], + appliedUpdates: [], + releases: [], + resolvedFields: Object.fromEntries( + ['owner', 'encode', 'guide', 'denoise', 'control', 'aux'].map((id) => [ + id, + Object.fromEntries( + Object.entries(nodes[id].params) + .filter(([, p]) => !p.sourceId) + .map(([k, p]) => [k, p.value]), + ), + ]), + ), + }; + const task = { + task_id: 'example-task', + status: 'completed', + attempt_index: 0, + resourceCandidateId: null, + sid: graph.sid, + workflow_tab_id: 'example-workflow', + client_run_id: 'example-run', + run_input_hash: 'example-input', + workflow_snapshot: graph.runtimeHints.workflowSnapshot, + runtimePreparation: { + resourceMode: 'auto', + performed: false, + residentRecipeReusable: false, + cleanup: null, + workflowAuto: auto, + }, + }; + const models = [ + ['example/base', 'a'], + ['example/control', 'b'], + ].map(([repoId, h]) => ({ + repoId, + selectedRevision: h.repeat(40), + modelRevision: repoId + '@' + h.repeat(40), + fingerprint: 'sha256:example', + })); + const inputs = [ + { role: 'controlImage', path: form.controlImage, contentHash: 'sha256:bytes:' + 'c'.repeat(64), byteSize: 100 }, + ]; + return { + graph, + form, + task, + output, + models, + inputs, + context: { + executionReceipt: task, + executedOutput: output, + taskId: task.task_id, + modelIdentities: models, + inputArtifacts: inputs, + }, + }; +} +function proof(f) { + return { + graph: { canonicalGraph: canonicalizeApiGraph(f.graph) }, + template: { lockedSettings: f.form }, + inputs: { count: 1, items: f.inputs }, + models: { items: f.models }, + output: { items: [{ mediaType: 'image', width: 64, height: 64 }] }, + }; +} +test('control proof retains actual loading, original null task and uncaptured control-scale telemetry', () => { + const f = fixture(), + before = structuredClone(f), + plan = observedWorkflowAutoControlPlan(f.graph, f.context); + assert(plan); + assert.equal(plan.resourceObservation.nativeControlScaleObserved, false); + assert.equal(plan.resourceObservation.originalGraphTask, null); + assert.equal(plan.resourceObservation.guiderScale, 4); + assert.equal(plan.resourceObservation.denoiserGuidanceScale, 4.5); + assert(observedWorkflowAutoControlProofMatches(plan, proof(f))); + assert.equal(executionPlanIdentity(f.graph, f.context).plan.source, plan.source); + assert.equal(executionReceiptIdentity(f.task, plan).resourceCandidateId, observedWorkflowAutoControlResourceId(plan)); + assert.deepEqual(f, before); + const p = proof(f); + p.template.lockedSettings = { ...f.form, autoOffload: true, offloadMode: 'model_cpu' }; + assert(observedWorkflowAutoControlProofMatches(plan, p)); + assert.equal(plan.offloadMode, 'group_cpu'); +}); +for (const [name, mutate] of Object.entries({ + session: (f) => { + f.task.sid = 'wrong'; + }, + input: (f) => { + f.inputs[0].contentHash = 'sha256:bytes:' + 'd'.repeat(64); + }, + auxiliary: (f) => { + f.models[1].selectedRevision = 'd'.repeat(40); + }, + scale: (f) => { + f.graph.nodes.control.params.controlnet_conditioning_scale.value = 0.8; + }, + inventedTelemetry: (f) => { + f.output.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'control').fields.controlnet_conditioning_scale = { + source: 'literal', + value: 1.2, + }; + }, + guider: (f) => { + f.output.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'guide').fields.guidance_scale.value = 4.5; + }, + sourceRole: (f) => { + f.inputs[0].role = 'referenceImages[0]'; + }, + supplier: (f) => { + f.graph.nodes.denoise.params.controlnet_bundle.sourceKey = 'unet_out'; + }, + candidate: (f) => { + f.task.resourceCandidateId = 'invented'; + }, +})) + test('control proof rejects changed ' + name, () => { + const f = fixture(); + mutate(f); + assert.equal(observedWorkflowAutoControlPlan(f.graph, f.context), null); + }); +test('published control projection rejects graph, model, input and output substitutions', () => { + const f = fixture(), + plan = observedWorkflowAutoControlPlan(f.graph, f.context); + assert(plan); + for (const mutate of [ + (p) => { + p.inputs.items[0].contentHash += 'changed'; + }, + (p) => { + p.models.items[1].selectedRevision = 'd'.repeat(40); + }, + (p) => { + p.output.items[0].width = 128; + }, + (p) => { + p.template.lockedSettings.prompt = 'Changed scene.'; + }, + ]) { + const p = structuredClone(proof(f)); + mutate(p); + assert.equal(observedWorkflowAutoControlProofMatches(plan, p), false); + } + for (const mutate of [ + (p) => { + p.resourceObservation.nativeControlScaleObserved = true; + }, + (p) => { + p.resourceObservation.originalGraphTask = 'control_image'; + }, + (p) => { + p.resourceObservation.extra = true; + }, + (p) => { + p.modelRevision = 'main'; + }, + ]) { + const p = structuredClone(plan); + mutate(p); + assert.equal(observedWorkflowAutoControlResourceId(p), null); + } +}); diff --git a/scripts/workflow-auto-masked-image-provenance.test.mjs b/scripts/workflow-auto-masked-image-provenance.test.mjs new file mode 100644 index 00000000..82ac3e42 --- /dev/null +++ b/scripts/workflow-auto-masked-image-provenance.test.mjs @@ -0,0 +1,361 @@ +import assert from 'node:assert/strict'; +import test from 'node:test'; +import { workerGraphHash } from './observed-workflow-auto-resource.mjs'; +import { executionPlanIdentity, executionReceiptIdentity } from './live-proof-provenance.mjs'; +import { + observedWorkflowAutoMaskedImagePlan as derive, + observedWorkflowAutoMaskedImageResourceId as resourceId, + observedWorkflowAutoMaskedImageProofMatches as matches, +} from './observed-workflow-auto-masked-image-resource.mjs'; +function fixture(actualOffload = 'group_cpu') { + const lit = (value) => ({ value }), + wire = (sourceId, sourceKey) => ({ sourceId, sourceKey }), + mod = (action, params, module = 'modules.ModularDiffusers') => ({ + module, + action, + params: Object.fromEntries(Object.entries(params).map(([k, v]) => [k, lit(v)])), + }); + const form = { + mode: 'inpaint', + resourceMode: 'auto', + modelType: 'ExampleModularPipeline', + dtype: 'bfloat16', + quantizationMode: 'none', + randomSeed: false, + seed: 12, + width: 64, + height: 64, + steps: 2, + guidanceScale: 4, + strength: 1, + prompt: 'A fictional replacement chest.', + negativePrompt: '', + maxSequenceLength: 512, + offloadMode: 'model_cpu', + autoOffload: true, + trustRemoteCode: false, + referenceImages: ['@data/source.webp'], + maskImage: '@data/mask.png', + }; + const nodes = { + source: mod('Load', { file: form.referenceImages, alpha_channel: 'ignore' }, 'modules.Image'), + mask: mod('Load', { file: form.maskImage, alpha_channel: 'remove alpha' }, 'modules.Image'), + guide: mod('Guider', { + model_type: form.modelType, + guider: 'ClassifierFreeGuidance', + guidance_scale: 4, + guidance_rescale: 0, + use_original_formulation: false, + enabled: true, + start: 0, + stop: 1, + layers_config: null, + }), + owner: mod('ModelsLoader', { + model_type: form.modelType, + repo_id: { source: 'hub', value: 'example/base' }, + revision: 'a'.repeat(40), + dtype: 'bfloat16', + device: 'cuda:0', + attention_backend: 'auto', + vae_slicing: true, + vae_tiling: true, + inpaint_compatibility: 'whole_v1', + trust_remote_code: false, + workflow_id: 'image_conditioned_inpainting', + auto_offload: true, + offload_mode: actualOffload, + weight_loading_mode: 'cpu', + weight_format: 'native', + unet: null, + vae: null, + controlnet: null, + lora_list: null, + quant_config: null, + }), + encode: mod('EncodePrompt', { prompt_input: null, prompt: form.prompt, negative_prompt: form.negativePrompt }), + image: mod('ImageEncode', { seed: 12, padding_mask_crop: null, inpaint_compatibility: 'whole_v1' }), + denoise: mod('Denoise', { + width: 64, + height: 64, + seed: 12, + num_inference_steps: 2, + guidance_scale: 4, + strength: 1, + }), + decode: mod('DecodeLatents', {}), + preview: mod('Preview', { vae: null, device: 'cuda:0' }, 'modules.Image'), + }; + const edges = [ + ['image', 'vae', 'owner', 'vae_out'], + ['image', 'image', 'source', 'image'], + ['image', 'mask_image', 'mask', 'image'], + ['encode', 'text_encoders', 'owner', 'text_encoders'], + ['encode', 'guider', 'guide', 'guider_out'], + ['encode', 'image', 'source', 'image'], + ['denoise', 'unet', 'owner', 'unet_out'], + ['denoise', 'scheduler', 'owner', 'scheduler'], + ['denoise', 'embeddings', 'encode', 'embeddings'], + ['denoise', 'image_latents', 'image', 'image_latents'], + ['denoise', 'route_state_in', 'image', 'route_state_out'], + ['denoise', 'guider', 'guide', 'guider_out'], + ['decode', 'vae', 'owner', 'vae_out'], + ['decode', 'latents', 'denoise', 'latents'], + ['decode', 'route_state_in', 'denoise', 'route_state_out'], + ['preview', 'image', 'decode', 'images'], + ]; + for (const [t, k, s, p] of edges) nodes[t].params[k] = wire(s, p); + const snapshot = { studioForm: form }; + const api = { + sid: 'synthetic-session', + nodes, + paths: [['source', 'mask', 'guide', 'owner', 'encode', 'image', 'denoise', 'decode', 'preview']], + runtimeHints: { + resourceMode: 'auto', + workflowTabId: 'synthetic-workflow', + clientRunId: 'synthetic-client', + runInputHash: 'synthetic-input', + workflowSnapshot: snapshot, + }, + }; + api.runtimeHints.workflowAutoPlan = { schemaVersion: 1, graphHash: workerGraphHash(api) }; + const artifacts = [ + { + role: 'referenceImages[0]', + path: form.referenceImages[0], + contentHash: 'sha256:bytes:' + 'b'.repeat(64), + byteSize: 32, + }, + { role: 'maskImage', path: form.maskImage, contentHash: 'sha256:bytes:' + 'c'.repeat(64), byteSize: 32 }, + ]; + const rows = Object.entries(nodes).map(([nodeId, n]) => ({ + nodeId, + module: n.module, + action: n.action, + fields: {}, + omittedFields: {}, + })); + for (const [id, keys] of [ + [ + 'owner', + 'model_type repo_id revision dtype device auto_offload offload_mode quant_config weight_loading_mode attention_backend vae_slicing vae_tiling', + ], + ['guide', 'model_type guider guidance_scale guidance_rescale use_original_formulation enabled start stop'], + ['encode', 'prompt negative_prompt'], + ['denoise', 'width height seed num_inference_steps guidance_scale strength'], + ['image', 'seed'], + ['preview', 'device'], + ]) + for (const k of keys.split(' ')) { + const v = nodes[id].params[k].value; + rows.find((r) => r.nodeId === id).fields[k] = { source: 'literal', value: k === 'repo_id' ? v.value : v }; + } + for (const [id, i, mode] of [ + ['source', 0, 'RGB'], + ['mask', 1, 'L'], + ]) + for (const [k, value] of Object.entries({ + alpha_channel: nodes[id].params.alpha_channel.value, + source_hashes: [artifacts[i].contentHash.slice(13)], + source_widths: [64], + source_heights: [64], + source_modes: [mode], + })) + rows.find((r) => r.nodeId === id).fields[k] = { source: 'literal', value }; + const auto = { + strategy: 'dependency_order_retained_owners', + schedule: null, + cachePreparation: null, + reusedOwnerIds: [], + preparedDataNodes: [], + appliedUpdates: [], + releases: [], + resolvedFields: { + owner: { inpaint_compatibility: 'whole_v1', offload_mode: actualOffload }, + guide: { guidance_scale: 4 }, + denoise: { width: 64, height: 64, num_inference_steps: 2, guidance_scale: 4, strength: 1 }, + }, + }; + const task = { + task_id: 'synthetic-task', + status: 'completed', + attempt_index: 0, + resourceCandidateId: null, + sid: api.sid, + workflow_tab_id: api.runtimeHints.workflowTabId, + client_run_id: api.runtimeHints.clientRunId, + run_input_hash: api.runtimeHints.runInputHash, + workflow_snapshot: snapshot, + runtimePreparation: { + resourceMode: 'auto', + performed: false, + residentRecipeReusable: false, + cleanup: null, + workflowAuto: auto, + }, + }; + const output = { + taskId: task.task_id, + attemptIndex: 0, + nodeId: 'preview', + sid: api.sid, + workflowTabId: api.runtimeHints.workflowTabId, + clientRunId: api.runtimeHints.clientRunId, + runInputHash: api.runtimeHints.runInputHash, + apiGraphSnapshot: api, + formSnapshot: form, + resolvedExecutionInputs: { + schemaVersion: 1, + source: 'backend-execution', + taskId: task.task_id, + attemptIndex: 0, + nodeId: 'preview', + truncated: false, + uncapturedNodeIds: [], + nodes: rows, + graphTasks: [{ loaderId: 'owner', pipelineClass: form.modelType, task: 'inpaint' }], + }, + }; + const models = [ + { + repoId: 'example/base', + selectedRevision: 'a'.repeat(40), + modelRevision: 'example/base@' + 'a'.repeat(40), + fingerprint: 'synthetic-model', + }, + ]; + const context = { + executionReceipt: task, + executedOutput: output, + taskId: task.task_id, + modelIdentities: models, + inputArtifacts: artifacts, + }; + const provenance = { + graph: { canonicalGraph: { nodes: Object.entries(nodes).map(([key, n]) => ({ key, ...n })), paths: api.paths } }, + template: { lockedSettings: form }, + inputs: { count: 2, items: artifacts }, + models: { items: models }, + output: { items: [{ mediaType: 'image', width: 64, height: 64 }] }, + }; + return { api, context, provenance, rows, auto }; +} +test('whole-compatible native masked receipt preserves the actual graph and saved form loading distinction', () => { + const f = fixture(), + p = derive(f.api, f.context); + assert(p); + assert(resourceId(p)); + assert.equal(p.offloadMode, 'group_cpu'); + assert.equal(p.resourceObservation.requestedOffloadMode, 'model_cpu'); + assert.equal(matches(p, f.provenance), true); + const ordinary = executionPlanIdentity(f.api, f.context); + assert.deepEqual(ordinary.plan, p); + assert.equal(executionReceiptIdentity(f.context.executionReceipt, p).resourceCandidateId, resourceId(p)); +}); +test('model CPU masked receipts retain their distinct fully observed loading recipe', () => { + const f = fixture('model_cpu'), + p = derive(f.api, f.context); + assert(p); + assert.equal(p.offloadMode, 'model_cpu'); + assert.equal(matches(p, f.provenance), true); + const grouped = fixture(); + assert.notEqual(resourceId(p), resourceId(derive(grouped.api, grouped.context))); + assert.deepEqual(executionPlanIdentity(f.api, f.context).plan, p); + assert.equal(executionReceiptIdentity(f.context.executionReceipt, p).resourceCandidateId, resourceId(p)); + const changed = structuredClone(p); + changed.offloadMode = 'group_cpu'; + assert.equal(matches(changed, f.provenance), false); +}); +for (const [name, mutate] of [ + [ + 'submitted mode', + (f) => { + f.api.nodes.owner.params.offload_mode.value = 'group_cpu'; + f.api.runtimeHints.workflowAutoPlan.graphHash = workerGraphHash(f.api); + }, + ], + ['consumed mode', (f) => (f.rows.find((r) => r.nodeId === 'owner').fields.offload_mode.value = 'group_cpu')], + ['resolved mode', (f) => (f.auto.resolvedFields.owner.offload_mode = 'group_cpu')], +]) + test('model CPU masked reader rejects a mismatched ' + name, () => { + const f = fixture('model_cpu'); + assert(derive(f.api, f.context)); + mutate(f); + assert.equal(derive(f.api, f.context), null); + }); +test('masked reader rejects unsupported loading modes even with internally consistent observations', () => { + for (const mode of ['none', 'group_ssd', 'sequential_cpu', true, {}]) { + const f = fixture(mode); + assert.equal(derive(f.api, f.context), null); + } +}); +for (const [name, mutate] of [ + ['wrong mask connection', (f) => (f.api.nodes.image.params.mask_image.sourceId = 'source')], + [ + 'swapped input roles', + (f) => { + f.context.inputArtifacts[0].role = 'maskImage'; + f.context.inputArtifacts[1].role = 'referenceImages[0]'; + }, + ], + [ + 'different consumed source body', + (f) => (f.rows.find((r) => r.nodeId === 'source').fields.source_hashes.value = ['d'.repeat(64)]), + ], + [ + 'different consumed mask body', + (f) => (f.rows.find((r) => r.nodeId === 'mask').fields.source_hashes.value = ['d'.repeat(64)]), + ], + ['changed native seed', (f) => (f.rows.find((r) => r.nodeId === 'denoise').fields.seed.value = 13)], + [ + 'changed native compatibility task', + (f) => (f.context.executedOutput.resolvedExecutionInputs.graphTasks[0].task = null), + ], + [ + 'missing native mask capture', + (f) => (f.context.executedOutput.resolvedExecutionInputs.uncapturedNodeIds = ['mask']), + ], + ['unsupported extra node', (f) => (f.api.nodes.extra = structuredClone(f.api.nodes.source))], + [ + 'unknown connected graph control', + (f) => (f.api.nodes.denoise.params.unreviewed = { sourceId: 'owner', sourceKey: 'unet_out' }), + ], + ['changed resolved compatibility', (f) => (f.auto.resolvedFields.owner.inpaint_compatibility = 'native')], + ['changed resolved actual loading', (f) => (f.auto.resolvedFields.owner.offload_mode = 'model_cpu')], + ['different model revision', (f) => (f.context.modelIdentities[0].selectedRevision = 'd'.repeat(40))], + ['incomplete source geometry', (f) => (f.rows.find((r) => r.nodeId === 'source').fields.source_widths.value = [32])], + ['different mask mode', (f) => (f.rows.find((r) => r.nodeId === 'mask').fields.source_modes.value = ['RGB'])], + ['wrong output task', (f) => (f.context.executedOutput.taskId = 'other-task')], + ['changed plan graph hash', (f) => (f.api.runtimeHints.workflowAutoPlan.graphHash = 'different')], +]) + test('native masked reader rejects ' + name, () => { + const f = fixture(); + mutate(f); + assert.equal(derive(f.api, f.context), null); + }); +for (const [name, mutate] of [ + ['unknown hardware authority', (p) => (p.hardwareQualified = true)], + ['unsupported root loading', (p) => (p.offloadMode = 'group_ssd')], + ['invented compatibility basis', (p) => (p.resourceObservation.compatibilityBasis = 'native_official_call')], + ['invalid mask digest', (p) => (p.resourceObservation.inputs[1].contentHash = 'missing')], +]) + test('native masked identifier rejects ' + name, () => { + const f = fixture(), + p = derive(f.api, f.context); + assert(p); + mutate(p); + assert.equal(resourceId(p), null); + assert.equal(matches(p, f.provenance), false); + }); +for (const [name, mutate] of [ + ['changed protected input', (p) => (p.inputs.items[0].contentHash = 'sha256:bytes:' + 'd'.repeat(64))], + ['changed strength', (p) => (p.template.lockedSettings.strength = 0.5)], + ['changed output size', (p) => (p.output.items[0].height = 32)], +]) + test('native masked final matcher rejects ' + name, () => { + const f = fixture(), + p = derive(f.api, f.context); + assert(p); + mutate(f.provenance); + assert.equal(matches(p, f.provenance), false); + }); diff --git a/scripts/workflow-auto-provenance.test.mjs b/scripts/workflow-auto-provenance.test.mjs new file mode 100644 index 00000000..37e310a1 --- /dev/null +++ b/scripts/workflow-auto-provenance.test.mjs @@ -0,0 +1,2059 @@ +import assert from 'node:assert/strict'; +import { createHash } from 'node:crypto'; +import { test } from 'node:test'; +import { spawnSync } from 'node:child_process'; +import { dirname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { + canonicalizeApiGraph, + executionPlanIdentity, + executionReceiptIdentity, + validateRunProvenance, + backendContractIdentity, +} from './live-proof-provenance.mjs'; +import { createAppliedAdapterProof } from './applied-adapter-provenance.mjs'; +import { + observedWorkflowAutoLoraProofMatches, + observedWorkflowAutoImageProofMatches, + observedWorkflowAutoLegacyProofMatches, + observedWorkflowAutoTextGeometryProofMatches, + observedWorkflowAutoResourceId, +} from './observed-workflow-auto-resource.mjs'; +import { canonicalJsonHash, stableJsonValue } from './canonical-json.mjs'; + +const literal = (value) => ({ value }); +function graphHash(graph) { + const material = JSON.stringify(stableJsonValue({ nodes: graph.nodes, paths: graph.paths })).replace( + /[\u007f-\uffff]/gu, + (c) => '\\u' + c.charCodeAt(0).toString(16).padStart(4, '0'), + ); + return 'sha256:workflow-auto-v1:' + createHash('sha256').update(material).digest('hex'); +} +function witness({ prefix = '', width = 1024, prompt = 'A product photograph', seed = 4202, guider = false } = {}) { + const ids = Object.fromEntries(['owner', 'encode', 'denoise', 'decode', 'preview'].map((k) => [k, prefix + k])); + const connect = (id, key) => ({ sourceId: ids[id], sourceKey: key }); + const values = { + reviewed_variant: 'example/native-image', + workflow_id: 'text2image', + revision: 'a'.repeat(40), + repo_id: { source: 'hub', value: 'example/native-image' }, + model_type: 'ExampleModularPipeline', + dtype: 'bfloat16', + device: 'cuda:0', + offload_mode: 'model_cpu', + auto_offload: true, + weight_loading_mode: 'cpu', + attention_backend: 'auto', + vae_slicing: true, + vae_tiling: true, + weight_format: 'native', + inpaint_compatibility: 'native', + }; + const form = { + mode: 'text_to_image', + modelType: values.model_type, + resourceMode: 'auto', + dtype: values.dtype, + quantizationMode: 'none', + trustRemoteCode: false, + prompt, + negativePrompt: '', + width, + height: 1024, + seed, + }; + const nodes = { + [ids.owner]: { + module: 'modules.ModularDiffusers', + action: 'ModelsLoader', + params: { + ...Object.fromEntries(Object.entries(values).map(([k, v]) => [k, literal(v)])), + trust_remote_code: literal(false), + quant_config: literal(null), + unet: literal(null), + vae: literal(null), + controlnet: literal(null), + lora_list: literal(null), + }, + }, + [ids.encode]: { + module: 'modules.ModularDiffusers', + action: 'EncodePrompt', + params: { + text_encoders: connect('owner', 'text_encoders'), + prompt: literal(prompt), + negative_prompt: literal(''), + }, + }, + [ids.denoise]: { + module: 'modules.ModularDiffusers', + action: 'Denoise', + params: { + unet: connect('owner', 'unet_out'), + scheduler: connect('owner', 'scheduler'), + embeddings: connect('encode', 'embeddings'), + width: literal(width), + height: literal(1024), + seed: literal(seed), + num_inference_steps: literal(8), + guidance_scale: literal(1), + strength: literal(0.5), + }, + }, + [ids.decode]: { + module: 'modules.ModularDiffusers', + action: 'DecodeLatents', + params: { vae: connect('owner', 'vae_out'), latents: connect('denoise', 'latents') }, + }, + [ids.preview]: { + module: 'modules.Image', + action: 'Preview', + params: { image: connect('decode', 'images'), device: literal('cuda:0') }, + }, + }; + const apiGraph = { + sid: 'genuine-session', + nodes, + paths: [[ids.owner, ids.encode, ids.denoise, ids.decode, ids.preview]], + runtimeHints: { + resourceMode: 'auto', + workflowTabId: 'workflow', + clientRunId: 'client-run', + runInputHash: 'run-input', + workflowSnapshot: { nodes: [], edges: [], studioForm: form, activeTemplateId: 'example-template' }, + }, + }; + apiGraph.runtimeHints.workflowAutoPlan = { schemaVersion: 1, graphHash: graphHash(apiGraph) }; + const captured = (node, fields) => ({ + nodeId: node, + module: nodes[node].module, + action: nodes[node].action, + fields: Object.fromEntries(Object.entries(fields).map(([k, v]) => [k, { value: v, source: 'literal' }])), + }); + const ownerTrace = { ...values, repo_id: values.repo_id.value, quant_config: null }; + delete ownerTrace.reviewed_variant; + delete ownerTrace.workflow_id; + delete ownerTrace.weight_format; + delete ownerTrace.inpaint_compatibility; + const denoiseTrace = Object.fromEntries( + ['width', 'height', 'seed', 'num_inference_steps', 'guidance_scale', 'strength'].map((k) => [ + k, + nodes[ids.denoise].params[k].value, + ]), + ); + const receipt = { + source: 'backend-execution', + taskId: 'task', + attemptIndex: 0, + nodeId: ids.preview, + truncated: false, + uncapturedNodeIds: [], + graphTasks: [{ loaderId: ids.owner, pipelineClass: values.model_type, task: 'text_to_image' }], + nodes: [ + captured(ids.owner, ownerTrace), + captured(ids.encode, { prompt, negative_prompt: '' }), + captured(ids.denoise, denoiseTrace), + captured(ids.decode, {}), + captured(ids.preview, { device: 'cuda:0' }), + ], + }; + const executionReceipt = { + task_id: 'task', + status: 'completed', + attempt_index: 0, + sid: apiGraph.sid, + workflow_tab_id: 'workflow', + client_run_id: 'client-run', + run_input_hash: 'run-input', + workflow_snapshot: apiGraph.runtimeHints.workflowSnapshot, + resourceCandidateId: null, + runtimeMeasurement: { + elapsedSeconds: 54, + peakMeasurementVersion: 2, + peakAllocatedBytes: 24_000_000_000, + backend: 'rocm', + device: 'cuda:0', + }, + runtimePreparation: { + resourceMode: 'auto', + workflowAuto: { + strategy: 'dependency_order_retained_owners', + schedule: null, + cachePreparation: null, + reusedOwnerIds: [], + preparedDataNodes: [], + appliedUpdates: [], + releases: [], + resolvedFields: { + [ids.owner]: values, + [ids.denoise]: Object.fromEntries(Object.entries(denoiseTrace).filter(([k]) => k !== 'seed')), + }, + }, + }, + }; + const executedOutput = { + taskId: 'task', + attemptIndex: 0, + sid: apiGraph.sid, + workflowTabId: 'workflow', + clientRunId: 'client-run', + runInputHash: 'run-input', + nodeId: ids.preview, + apiGraphSnapshot: apiGraph, + formSnapshot: form, + resolvedExecutionInputs: receipt, + }; + if (guider) { + const id = prefix + 'guider'; + nodes[id] = { module: 'modules.ModularDiffusers', action: 'Guider', params: { guidance_scale: literal(1) } }; + apiGraph.paths[0].splice(1, 0, id); + nodes[ids.denoise].params.guider = { sourceId: id, sourceKey: 'guider' }; + receipt.nodes.push(captured(id, { guidance_scale: 1 })); + executionReceipt.runtimePreparation.workflowAuto.resolvedFields[id] = { guidance_scale: 1 }; + apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(apiGraph); + } + return { apiGraph, executionReceipt, executedOutput, ids }; +} +const planFor = (w) => executionPlanIdentity(w.apiGraph, w).plan; + +function nativeExpertWitness({ guider = false } = {}) { + const w = witness({ guider }), + form = w.executedOutput.formSnapshot; + if (guider) w.apiGraph.nodes[w.ids.denoise].params.guider.sourceKey = 'guider_out'; + Object.assign(form, { resourceMode: 'expert', device: 'cuda:0', autoOffload: true, offloadMode: 'model_cpu' }); + delete w.apiGraph.runtimeHints.resourceMode; + delete w.apiGraph.runtimeHints.workflowAutoPlan; + w.executionReceipt.runtimePreparation = { + resourceMode: 'expert', + performed: false, + residentRecipeReusable: false, + cleanup: null, + }; + w.modelIdentities = [ + { + repoId: 'example/native-image', + selectedRevision: 'a'.repeat(40), + modelRevision: 'example/native-image@' + 'a'.repeat(40), + fingerprint: 'sha256:example', + }, + ]; + const parent = { + pipelineClass: form.modelType, + task: form.mode, + executionProfileId: 'example:modular', + authoringRecipeId: 'example-native:v1', + baseSpecId: 'example:modular:spec', + baseSpecContentHash: 'studio-spec-v1-12345678', + authoringContentHash: 'studio-authoring-v1-12345678', + }; + w.apiGraph.runtimeHints.workflowSnapshot.nodes = [ + { + id: w.ids.encode, + data: { + module: 'modules.ModularDiffusers', + action: 'EncodePrompt', + operationAuthoring: { + operation: { pipelineClass: form.modelType, task: form.mode }, + ancillaryParent: { + schemaVersion: 1, + parent, + parentRoleNodes: { + models: w.ids.owner, + prompt: w.ids.encode, + denoise: w.ids.denoise, + decode: w.ids.decode, + }, + }, + }, + }, + }, + ]; + const capture = w.executedOutput.resolvedExecutionInputs; + capture.schemaVersion = 1; + capture.appliedAdaptersStatus = { schemaVersion: 1, truncated: false }; + capture.nodes.find((row) => row.nodeId === w.ids.owner).appliedAdapters = { + schemaVersion: 1, + status: 'complete', + source: 'backend-adapter-application', + applicationId: '1'.repeat(32), + observation: 'activated', + adapters: [], + stateSha256: 'sha256:applied-adapters-v1:' + canonicalJsonHash({ adapters: [] }), + }; + return w; +} + +test('native Expert identity requires a fresh completed owner capture and preserves absent form weight format', () => { + for (const guider of [false, true]) { + const w = nativeExpertWitness({ guider }), + before = structuredClone(w), + plan = planFor(w); + assert.equal(plan.source, 'executed-expert-modular-graph-v1'); + assert.equal(plan.weightFormat, 'native'); + assert.equal(plan.resourceMode, 'expert'); + assert.equal( + executionReceiptIdentity(w.executionReceipt, plan).resourceCandidateId, + 'manual-resource-v1:ExampleModularPipeline|bfloat16|model_cpu|none', + ); + assert.deepEqual(w, before); + assert.equal(Object.hasOwn(w.executedOutput.formSnapshot, 'weightFormat'), false); + assert.equal(w.executionReceipt.resourceCandidateId, null); + assert.equal(executionPlanIdentity(w.apiGraph).plan.source, undefined, 'An authored graph alone is insufficient.'); + const ordinary = structuredClone(w); + ordinary.apiGraph.runtimeHints.workflowSnapshot.nodes = []; + delete ordinary.apiGraph.nodes[ordinary.ids.owner].params.quant_config.value; + assert.equal( + planFor(ordinary).source, + 'executed-expert-modular-graph-v1', + 'Fresh native execution does not invent missing ancillary authoring metadata.', + ); + for (const mutate of [ + (x) => { + x.executionReceipt.status = 'cancelled'; + }, + (x) => { + x.executionReceipt.attempt_index = 1; + }, + (x) => { + x.executedOutput.taskId = 'other'; + }, + (x) => { + x.executionReceipt.runtimePreparation.residentRecipeReusable = true; + }, + (x) => { + x.executedOutput.resolvedExecutionInputs.truncated = true; + }, + (x) => { + x.modelIdentities = []; + }, + (x) => { + x.executedOutput.resolvedExecutionInputs.nodes.find( + (row) => row.nodeId === x.ids.owner, + ).fields.offload_mode.value = 'group_cpu'; + }, + (x) => { + x.executedOutput.resolvedExecutionInputs.nodes.find( + (row) => row.nodeId === x.ids.owner, + ).appliedAdapters.observation = 'inherited'; + }, + (x) => { + x.apiGraph.nodes[x.ids.denoise].params.scheduler.sourceId = x.ids.decode; + }, + ]) { + const changed = structuredClone(w); + mutate(changed); + assert.equal(executionReceiptIdentity(changed.executionReceipt, planFor(changed)).resourceCandidateId, null); + } + } +}); + +test('native Expert upscale identity binds both installed models and the selected output ancestry', () => { + const w = nativeExpertWitness({ guider: true }), + g = w.apiGraph, + output = w.executedOutput; + g.nodes['base-preview'] = structuredClone(g.nodes[w.ids.preview]); + g.nodes.upscaler = { + module: 'modules.Spandrel', + action: 'Upscaler', + params: { + image: { sourceId: w.ids.decode, sourceKey: 'images' }, + model_id: literal({ source: 'hub', value: 'example/upscaler/weights.pth' }), + device: literal('cuda:0'), + downscale: literal(0.5), + tile_size: literal(256), + tile_overlap: literal(32), + }, + }; + g.nodes[w.ids.preview].params.image = { sourceId: 'upscaler', sourceKey: 'output' }; + const common = g.paths[0].slice(0, -1); + g.paths = [ + [...common, 'base-preview'], + [...common, 'upscaler', w.ids.preview], + ]; + output.resolvedExecutionInputs.nodes.push({ + nodeId: 'upscaler', + module: 'modules.Spandrel', + action: 'Upscaler', + fields: { + model_id: { source: 'literal', value: 'example/upscaler/weights.pth' }, + device: { source: 'literal', value: 'cuda:0' }, + }, + }); + w.modelIdentities.push({ + repoId: 'example/upscaler', + selectedRevision: 'b'.repeat(40), + modelRevision: 'example/upscaler@' + 'b'.repeat(40), + fingerprint: 'sha256:auxiliary', + }); + assert.equal(planFor(w).source, 'executed-expert-modular-graph-v1'); + for (const mutate of [ + (x) => { + x.modelIdentities.pop(); + }, + (x) => { + x.executedOutput.resolvedExecutionInputs.nodes.find((r) => r.nodeId === 'upscaler').fields.model_id.value = + 'other/model/weights.pth'; + }, + (x) => { + x.apiGraph.nodes['base-preview'].params.image.sourceId = 'upscaler'; + }, + (x) => { + x.executedOutput.resolvedExecutionInputs.nodes = x.executedOutput.resolvedExecutionInputs.nodes.filter( + (r) => r.nodeId !== 'upscaler', + ); + }, + ]) { + const changed = structuredClone(w); + mutate(changed); + assert.equal(executionReceiptIdentity(changed.executionReceipt, planFor(changed)).resourceCandidateId, null); + } +}); + +test('native text Auto preserves an unexposed empty negative prompt without fabricating a capture', () => { + const w = witness(); + delete w.apiGraph.nodes[w.ids.encode].params.negative_prompt; + const row = w.executedOutput.resolvedExecutionInputs.nodes.find((r) => r.nodeId === w.ids.encode); + delete row.fields.negative_prompt; + w.apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(w.apiGraph); + assert.equal(planFor(w).source, 'observed-workflow-auto-resource-v1'); + const nonempty = structuredClone(w); + nonempty.executedOutput.formSnapshot.negativePrompt = 'different'; + assert.notEqual(planFor(nonempty).source, 'observed-workflow-auto-resource-v1'); + row.fields.negative_prompt = { source: 'literal', value: '' }; + assert.notEqual(planFor(w).source, 'observed-workflow-auto-resource-v1'); +}); + +test('native text Auto retains a legacy form label only with matching durable owner authoring', () => { + const w = witness(), + form = w.executedOutput.formSnapshot; + form.modelType = 'LegacyExamplePipeline'; + w.apiGraph.runtimeHints.workflowSnapshot.nodes = [ + { + id: w.ids.owner, + data: { + module: 'modules.ModularDiffusers', + action: 'ModelsLoader', + params: structuredClone(w.apiGraph.nodes[w.ids.owner].params), + operationAuthoring: { + schemaVersion: 1, + operation: { + pipelineClass: 'ExampleModularPipeline', + task: 'text_to_image', + nodeKey: 'modules.ModularDiffusers.ModelsLoader', + binding: { pipelineClass: 'ExampleModularPipeline', values: { model_type: 'ExampleModularPipeline' } }, + }, + }, + }, + }, + ]; + Object.assign(w.apiGraph.runtimeHints.workflowSnapshot.nodes[0].data.params.model_type, { + label: 'Pipeline Type', + options: { ExampleModularPipeline: { label: 'Example' } }, + }); + const before = structuredClone(w), + plan = planFor(w); + assert.equal(plan.source, 'observed-workflow-auto-resource-v1'); + assert.equal(plan.modelType, 'ExampleModularPipeline'); + assert.equal(plan.resourceObservation.formModelType, 'LegacyExamplePipeline'); + assert.deepEqual(w, before); + for (const mutate of [ + (g) => { + delete g.runtimeHints.workflowSnapshot.nodes[0].data.operationAuthoring; + }, + (g) => { + g.runtimeHints.workflowSnapshot.nodes[0].data.operationAuthoring.operation.binding.values.model_type = + 'OtherPipeline'; + }, + (g) => { + g.runtimeHints.workflowSnapshot.nodes[0].id = 'foreign-owner'; + }, + ]) { + const changed = structuredClone(w); + mutate(changed.apiGraph); + assert.notEqual(planFor(changed).source, 'observed-workflow-auto-resource-v1'); + } +}); + +function imageConditionedWitness(options = {}) { + const w = witness(options); + const { apiGraph: graph, executionReceipt: task, executedOutput: output, ids } = w; + ids.images = (options.prefix ?? '') + 'images'; + ids.imageEncode = (options.prefix ?? '') + 'image-encode'; + const form = output.formSnapshot; + form.mode = 'multi_image_reference_edit'; + form.modelType = 'LegacyExamplePipeline'; // Presentation label is not loader authority. + Object.assign(form, { device: 'cuda:0', offloadMode: 'model_cpu', autoOffload: true, steps: 8, guidanceScale: 1 }); + graph.nodes[ids.owner].params.workflow_id = literal('image_conditioned'); + task.runtimePreparation.workflowAuto.resolvedFields[ids.owner].workflow_id = 'image_conditioned'; + graph.nodes[ids.images] = { + module: 'modules.Image', + action: 'Load', + params: { + file: literal(['@data/images/first.webp', '@data/images/second.webp']), + alpha_channel: literal('ignore'), + }, + }; + graph.nodes[ids.imageEncode] = { + module: 'modules.ModularDiffusers', + action: 'ImageEncode', + params: { + image: { sourceId: ids.images, sourceKey: 'image' }, + vae: { sourceId: ids.owner, sourceKey: 'vae_out' }, + seed: literal(form.seed), + encode_summary: { display: 'ui_text', sourceKey: 'encode_summary_data' }, + }, + }; + graph.nodes[ids.denoise].params.image_latents = { sourceId: ids.imageEncode, sourceKey: 'image_latents' }; + delete graph.nodes[ids.denoise].params.strength; + delete task.runtimePreparation.workflowAuto.resolvedFields[ids.denoise].strength; + delete graph.nodes[ids.encode].params.negative_prompt; + graph.paths[0].unshift(ids.images); + graph.paths[0].splice(2, 0, ids.imageEncode); + const receipt = output.resolvedExecutionInputs; + receipt.schemaVersion = 1; + receipt.appliedAdaptersStatus = { schemaVersion: 1, truncated: false }; + receipt.graphTasks[0].task = null; // Retain the historical capture's missing task classification. + delete receipt.nodes.find((row) => row.nodeId === ids.encode).fields.negative_prompt; + delete receipt.nodes.find((row) => row.nodeId === ids.denoise).fields.strength; + const captured = (value) => ({ value, source: 'literal' }); + receipt.nodes.push({ + nodeId: ids.imageEncode, + module: 'modules.ModularDiffusers', + action: 'ImageEncode', + fields: { seed: captured(form.seed) }, + omittedFields: {}, + }); + receipt.nodes.push({ + nodeId: ids.images, + module: 'modules.Image', + action: 'Load', + fields: { + alpha_channel: captured('ignore'), + source_hashes: captured(['1'.repeat(64), '2'.repeat(64)]), + source_widths: captured([1024, 1024]), + source_heights: captured([1024, 1024]), + source_modes: captured(['RGB', 'RGB']), + }, + omittedFields: {}, + }); + receipt.nodes.find((row) => row.nodeId === ids.owner).appliedAdapters = { + schemaVersion: 1, + status: 'complete', + source: 'backend-adapter-application', + applicationId: '1'.repeat(32), + observation: 'activated', + adapters: [], + stateSha256: 'sha256:applied-adapters-v1:' + canonicalJsonHash({ adapters: [] }), + }; + graph.runtimeHints.workflowAutoPlan.graphHash = graphHash(graph); + return w; +} + +test('two-image Auto observation retains original null IDs and binds the consumed image-conditioned owner', () => { + const w = imageConditionedWitness(), + before = structuredClone(w), + plan = planFor(w); + assert.equal(plan.source, 'observed-workflow-auto-image-resource-v1'); + assert.equal(plan.modelType, 'ExampleModularPipeline'); + assert.equal(plan.task, 'multi_image_reference_edit'); + assert.equal(plan.resourceObservation.reportedGraphTask, null); + assert.equal(plan.resourceObservation.references.length, 2); + assert.match( + executionReceiptIdentity(w.executionReceipt, plan).resourceCandidateId, + /^observed-workflow-auto-image-resource-v1:[a-f0-9]{64}$/u, + ); + assert.deepEqual(w, before); + assert.equal(w.executionReceipt.resourceCandidateId, null); + assert.equal(w.executedOutput.resolvedExecutionInputs.graphTasks[0].task, null); +}); + +test('two-image observed recipes retain ordered source hashes without manufacturing IDs from prompts or node labels', () => { + const first = imageConditionedWitness(), + renamed = imageConditionedWitness({ prefix: 'renamed-', prompt: 'Another material', seed: 15 }); + const id = (w) => executionReceiptIdentity(w.executionReceipt, planFor(w)).resourceCandidateId; + assert.equal(id(first), id(renamed)); + const swapped = imageConditionedWitness(); + swapped.executedOutput.resolvedExecutionInputs.nodes + .find((row) => row.nodeId === swapped.ids.images) + .fields.source_hashes.value.reverse(); + assert.notEqual(id(first), id(swapped)); +}); + +test('two-image observations reject incomplete, conflicting, borrowed or nonfresh evidence', () => { + const mutations = { + candidateClaim: (w) => { + w.executionReceipt.resourceCandidateId = 'claimed-primary'; + }, + missingCandidate: (w) => { + delete w.executionReceipt.resourceCandidateId; + }, + missingTaskClass: (w) => { + delete w.executedOutput.resolvedExecutionInputs.graphTasks[0].task; + }, + wrongTaskClass: (w) => { + w.executedOutput.resolvedExecutionInputs.graphTasks[0].task = 'text_to_image'; + }, + wrongWorkflow: (w) => { + w.apiGraph.nodes[w.ids.owner].params.workflow_id.value = 'text2image'; + }, + wrongOwner: (w) => { + w.executedOutput.resolvedExecutionInputs.graphTasks[0].loaderId = w.ids.imageEncode; + }, + wrongAttempt: (w) => { + w.executionReceipt.attempt_index = 1; + }, + wrongSession: (w) => { + w.executionReceipt.sid = 'other'; + }, + wrongOutput: (w) => { + w.executedOutput.taskId = 'other'; + }, + truncated: (w) => { + w.executedOutput.resolvedExecutionInputs.truncated = true; + }, + missingInputCapture: (w) => { + w.executedOutput.resolvedExecutionInputs.nodes = w.executedOutput.resolvedExecutionInputs.nodes.filter( + (r) => r.nodeId !== w.ids.images, + ); + }, + omittedHashes: (w) => { + w.executedOutput.resolvedExecutionInputs.nodes.find( + (r) => r.nodeId === w.ids.images, + ).omittedFields.source_hashes = 'unavailable'; + }, + badHash: (w) => { + w.executedOutput.resolvedExecutionInputs.nodes.find( + (r) => r.nodeId === w.ids.images, + ).fields.source_hashes.value[0] = 'unknown'; + }, + duplicateImage: (w) => { + const f = w.executedOutput.resolvedExecutionInputs.nodes.find((r) => r.nodeId === w.ids.images).fields; + f.source_hashes.value[1] = f.source_hashes.value[0]; + }, + missingImage: (w) => { + w.apiGraph.nodes[w.ids.images].params.file.value.pop(); + }, + extraImage: (w) => { + w.apiGraph.nodes[w.ids.images].params.file.value.push('@data/images/third.webp'); + }, + missingGeometry: (w) => { + delete w.executedOutput.resolvedExecutionInputs.nodes.find((r) => r.nodeId === w.ids.images).fields.source_widths; + }, + invalidGeometry: (w) => { + w.executedOutput.resolvedExecutionInputs.nodes.find( + (r) => r.nodeId === w.ids.images, + ).fields.source_heights.value[0] = 0; + }, + wrongMode: (w) => { + w.executedOutput.resolvedExecutionInputs.nodes.find( + (r) => r.nodeId === w.ids.images, + ).fields.source_modes.value[0] = 'RGBA'; + }, + wrongImageSeed: (w) => { + w.executedOutput.resolvedExecutionInputs.nodes.find((r) => r.nodeId === w.ids.imageEncode).fields.seed.value++; + }, + borrowedVae: (w) => { + w.apiGraph.nodes[w.ids.imageEncode].params.vae.sourceId = w.ids.decode; + }, + bypassImageEncode: (w) => { + w.apiGraph.nodes[w.ids.denoise].params.image_latents.sourceId = w.ids.images; + }, + extraWire: (w) => { + w.apiGraph.nodes[w.ids.encode].params.prompt_input = { sourceId: w.ids.images, sourceKey: 'image' }; + }, + unknownControl: (w) => { + w.apiGraph.nodes[w.ids.imageEncode].params.unreviewed = literal(true); + }, + negativePrompt: (w) => { + w.executedOutput.formSnapshot.negativePrompt = 'unsupported'; + }, + changedForm: (w) => { + w.executedOutput.formSnapshot.steps = 7; + }, + ambiguous: (w) => { + w.executedOutput.resolvedExecutionInputs.ambiguousFields = ['width']; + }, + conflictingSummary: (w) => { + w.executedOutput.resolvedExecutionInputs.summary = { imageSourceHashes: [] }; + }, + staleApplication: (w) => { + w.executedOutput.resolvedExecutionInputs.nodes.find((r) => r.nodeId === w.ids.owner).appliedAdapters.observation = + 'reused'; + }, + badApplicationHash: (w) => { + w.executedOutput.resolvedExecutionInputs.nodes.find((r) => r.nodeId === w.ids.owner).appliedAdapters.stateSha256 = + 'sha256:applied-adapters-v1:' + '0'.repeat(64); + }, + reusedOwner: (w) => { + w.executionReceipt.runtimePreparation.workflowAuto.reusedOwnerIds = [w.ids.owner]; + }, + deferred: (w) => { + w.executionReceipt.runtimePreparation.workflowAuto.preparedDataNodes = [w.ids.images]; + }, + patched: (w) => { + w.executionReceipt.runtimePreparation.workflowAuto.appliedUpdates = [{}]; + }, + connectedIdentity: (w) => { + w.apiGraph.nodes[w.ids.owner].params.repo_id.sourceId = w.ids.images; + }, + quantized: (w) => { + w.apiGraph.nodes[w.ids.owner].params.quant_config = literal({ backend: 'bnb_4bit' }); + }, + remoteCode: (w) => { + w.apiGraph.nodes[w.ids.owner].params.trust_remote_code.value = true; + }, + mutableRevision: (w) => { + w.apiGraph.nodes[w.ids.owner].params.revision.value = 'main'; + }, + }; + for (const [name, mutate] of Object.entries(mutations)) { + const w = imageConditionedWitness(); + mutate(w); + w.apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(w.apiGraph); + assert.notEqual(planFor(w).source, 'observed-workflow-auto-image-resource-v1', name); + } +}); + +function imageProof(w) { + const plan = planFor(w), + canonicalGraph = canonicalizeApiGraph(w.apiGraph); + const applied = createAppliedAdapterProof({ + apiGraph: w.apiGraph, + canonicalGraph, + executedOutput: w.executedOutput, + executionReceipt: w.executionReceipt, + taskId: 'task', + }); + return { + schemaVersion: 2, + taskId: 'task', + graph: { canonicalGraph, executionPlan: plan }, + execution: executionReceiptIdentity(w.executionReceipt, plan), + models: { + items: [ + { + repoId: 'example/native-image', + selectedRevision: 'a'.repeat(40), + modelRevision: 'example/native-image@' + 'a'.repeat(40), + }, + ], + }, + template: { lockedSettings: structuredClone(w.executedOutput.formSnapshot) }, + inputs: { + items: [0, 1].map((index) => ({ + role: `referenceImages[${index}]`, + path: w.apiGraph.nodes[w.ids.images].params.file.value[index], + contentHash: 'sha256:bytes:' + String(index + 1).repeat(64), + byteSize: 1000 + index, + })), + }, + output: { items: [{ width: 1024, height: 1024 }] }, + adapterApplications: applied.proof, + adapterApplicationsHash: applied.hash, + }; +} + +function singleReferenceWitness({ requestedOffloadMode = 'model_cpu' } = {}) { + const w = imageConditionedWitness(); + w.executedOutput.formSnapshot.mode = 'edit_image'; + w.executedOutput.formSnapshot.offloadMode = requestedOffloadMode; + w.apiGraph.nodes[w.ids.images].params.file.value.pop(); + const fields = w.executedOutput.resolvedExecutionInputs.nodes.find((row) => row.nodeId === w.ids.images).fields; + for (const key of ['source_hashes', 'source_widths', 'source_heights', 'source_modes']) fields[key].value.pop(); + w.apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(w.apiGraph); + return w; +} + +function routedSingleReferenceWitness() { + const w = singleReferenceWitness(), + g = w.apiGraph, + receipt = w.executedOutput.resolvedExecutionInputs; + const id = 'routed-guider'; + w.ids.guider = id; + const fields = { + model_type: 'ExampleModularPipeline', + guider: 'ClassifierFreeGuidance', + guidance_scale: 1, + guidance_rescale: 0, + use_original_formulation: false, + enabled: true, + start: 0, + stop: 1, + }; + g.nodes[id] = { + module: 'modules.ModularDiffusers', + action: 'Guider', + params: { + ...Object.fromEntries(Object.entries(fields).map(([k, v]) => [k, literal(v)])), + layers_config: literal(null), + }, + }; + receipt.nodes.push({ + nodeId: id, + module: 'modules.ModularDiffusers', + action: 'Guider', + fields: Object.fromEntries(Object.entries(fields).map(([k, v]) => [k, { source: 'literal', value: v }])), + }); + Object.assign(g.nodes[w.ids.encode].params, { + guider: { sourceId: id, sourceKey: 'guider_out' }, + image: { sourceId: w.ids.images, sourceKey: 'image' }, + negative_prompt: literal('avoid identity drift'), + }); + w.executedOutput.formSnapshot.negativePrompt = 'avoid identity drift'; + receipt.nodes.find((r) => r.nodeId === w.ids.encode).fields.negative_prompt = { + source: 'literal', + value: 'avoid identity drift', + }; + Object.assign(g.nodes[w.ids.imageEncode].params, { + mask_image: literal(null), + padding_mask_crop: literal(null), + inpaint_compatibility: literal('native'), + }); + Object.assign(g.nodes[w.ids.denoise].params, { + guider: { sourceId: id, sourceKey: 'guider_out' }, + route_state_in: { sourceId: w.ids.imageEncode, sourceKey: 'route_state_out' }, + strength: literal(0.5), + }); + g.nodes[w.ids.decode].params.route_state_in = { sourceId: w.ids.denoise, sourceKey: 'route_state_out' }; + receipt.nodes.find((r) => r.nodeId === w.ids.denoise).fields.strength = { source: 'literal', value: 0.5 }; + w.executionReceipt.runtimePreparation.workflowAuto.resolvedFields[id] = { guidance_scale: 1 }; + w.executionReceipt.runtimePreparation.workflowAuto.resolvedFields[w.ids.denoise].strength = 0.5; + g.paths[0].splice(2, 0, id); + receipt.graphTasks[0].task = 'edit_image'; + g.runtimeHints.workflowAutoPlan.graphHash = graphHash(g); + return w; +} + +test('single-reference native route retains its actual task, Guider, route state and negative prompt', () => { + const w = routedSingleReferenceWitness(), + before = structuredClone(w), + plan = planFor(w); + assert.equal(plan.source, 'observed-workflow-auto-image-resource-v1'); + assert.equal(plan.resourceObservation.reportedGraphTask, 'edit_image'); + assert.equal(plan.resourceObservation.imageRoute, 'native_state'); + assert.equal( + plan.resourceObservation.controls.find((c) => c.scope === 'modules.ModularDiffusers.Guider').fields.guidance_scale, + 1, + ); + assert.deepEqual(w, before); + const emptyLayerSlot = structuredClone(w); + delete emptyLayerSlot.apiGraph.nodes[emptyLayerSlot.ids.guider].params.layers_config.value; + emptyLayerSlot.apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(emptyLayerSlot.apiGraph); + assert.equal(planFor(emptyLayerSlot).source, 'observed-workflow-auto-image-resource-v1'); + const proof = imageProof(w); + proof.inputs.items = proof.inputs.items.slice(0, 1); + assert(observedWorkflowAutoImageProofMatches(plan, proof)); + proof.graph.canonicalGraph.nodes.find((n) => n.action === 'Guider').params.enabled.value = false; + assert.equal(observedWorkflowAutoImageProofMatches(plan, proof), false); +}); + +test('single-reference native route rejects missing state, hidden masks and conflicting native controls', () => { + for (const mutate of [ + (w) => { + w.apiGraph.nodes[w.ids.denoise].params.route_state_in.sourceId = w.ids.owner; + }, + (w) => { + delete w.apiGraph.nodes[w.ids.decode].params.route_state_in; + }, + (w) => { + w.apiGraph.nodes[w.ids.imageEncode].params.mask_image = { sourceId: w.ids.images, sourceKey: 'image' }; + }, + (w) => { + w.executedOutput.resolvedExecutionInputs.graphTasks[0].task = null; + }, + (w) => { + w.executedOutput.resolvedExecutionInputs.nodes.find( + (r) => r.nodeId === w.ids.guider, + ).fields.guidance_scale.value = 2; + }, + (w) => { + delete w.executedOutput.resolvedExecutionInputs.nodes.find((r) => r.nodeId === w.ids.guider).fields.enabled; + }, + (w) => { + w.executedOutput.resolvedExecutionInputs.nodes.find( + (r) => r.nodeId === w.ids.encode, + ).fields.negative_prompt.value = 'different'; + }, + ]) { + const w = routedSingleReferenceWitness(); + mutate(w); + w.apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(w.apiGraph); + assert.notEqual(planFor(w).source, 'observed-workflow-auto-image-resource-v1'); + } +}); + +test('single-reference Auto edit binds the consumed owner and preserves an explicit requested loading policy', () => { + for (const requestedOffloadMode of ['model_cpu', 'group_cpu']) { + const w = singleReferenceWitness({ requestedOffloadMode }), + before = structuredClone(w), + plan = planFor(w); + assert.equal(plan.source, 'observed-workflow-auto-image-resource-v1'); + assert.equal(plan.task, 'edit_image'); + assert.equal(plan.offloadMode, 'model_cpu'); + assert.equal(plan.resourceObservation.requestedOffloadMode, requestedOffloadMode); + assert.equal(plan.resourceObservation.references.length, 1); + assert.equal(w.executionReceipt.resourceCandidateId, null); + assert.deepEqual(w, before); + const proof = imageProof(w); + proof.inputs.items = proof.inputs.items.slice(0, 1); + assert(observedWorkflowAutoImageProofMatches(plan, proof)); + proof.template.lockedSettings.offloadMode = 'group_disk'; + assert.equal(observedWorkflowAutoImageProofMatches(plan, proof), false); + } +}); + +test('single-reference Auto edit rejects incomplete, unjoined, borrowed and altered source evidence', () => { + const mutations = [ + (w) => { + w.executionReceipt.attempt_index = 1; + }, + (w) => { + w.executedOutput.taskId = 'another-task'; + }, + (w) => { + w.executionReceipt.runtimePreparation.workflowAuto.reusedOwnerIds = [w.ids.owner]; + }, + (w) => { + w.apiGraph.nodes[w.ids.imageEncode].params.vae.sourceId = w.ids.decode; + }, + (w) => { + w.apiGraph.nodes[w.ids.images].params.file.value.push('@data/images/extra.webp'); + }, + (w) => { + delete w.executedOutput.resolvedExecutionInputs.nodes.find((row) => row.nodeId === w.ids.images).fields + .source_hashes; + }, + (w) => { + w.executedOutput.resolvedExecutionInputs.nodes.find( + (row) => row.nodeId === w.ids.images, + ).fields.source_modes.value = ['L']; + }, + ]; + for (const mutate of mutations) { + const w = singleReferenceWitness(); + mutate(w); + w.apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(w.apiGraph); + assert.notEqual(planFor(w).source, 'observed-workflow-auto-image-resource-v1'); + } + const w = singleReferenceWitness(), + proof = imageProof(w); + proof.inputs.items = proof.inputs.items.slice(0, 1); + proof.inputs.items[0].contentHash = 'sha256:bytes:' + 'f'.repeat(64); + assert.equal(observedWorkflowAutoImageProofMatches(planFor(w), proof), false); +}); + +test('rehashed two-image observations stay bound to original canonical model, controls, ordered inputs and output', () => { + const proof = imageProof(imageConditionedWitness()), + plan = proof.graph.executionPlan; + delete proof.template.lockedSettings.device; + delete proof.template.lockedSettings.trustRemoteCode; + assert(observedWorkflowAutoImageProofMatches(plan, proof)); + const message = 'execution image resource observation does not match the original graph/model/input/output proof.'; + assert(!validateRunProvenance(proof).includes(message)); + const mutations = { + reorderedInputs: (p) => { + p.inputs.items.reverse(); + }, + changedSource: (p) => { + p.inputs.items[0].contentHash = 'sha256:bytes:' + 'f'.repeat(64); + }, + swappedFiles: (p) => { + p.graph.canonicalGraph.nodes.find((n) => n.action === 'Load').params.file.value.reverse(); + }, + inventedReportedTask: (p) => { + p.graph.executionPlan.resourceObservation.reportedGraphTask = 'multi_image_reference_edit'; + }, + differentModel: (p) => { + p.models.items[0].repoId = 'example/other'; + }, + forgedPrecision: (p) => { + const plan = p.graph.executionPlan; + plan.dtype = plan.resourceObservation.dtype = 'float32'; + }, + wrongOutput: (p) => { + p.output.items[0].width = 512; + }, + missingInputs: (p) => { + p.inputs.items.pop(); + }, + missingApplication: (p) => { + p.adapterApplications = null; + }, + staleForm: (p) => { + p.template.lockedSettings.modelType = 'different-label'; + }, + unsafeOwner: (p) => { + p.graph.canonicalGraph.nodes.find((node) => node.action === 'ModelsLoader').params.trust_remote_code.value = true; + }, + wrongLockedDtype: (p) => { + p.template.lockedSettings.dtype = 'float32'; + }, + }; + for (const [name, mutate] of Object.entries(mutations)) { + const p = structuredClone(proof); + mutate(p); + const plan = p.graph.executionPlan; + plan.observedResourceCandidateId = plan.source + ':' + canonicalJsonHash(plan.resourceObservation); + p.execution.resourceCandidateId = plan.observedResourceCandidateId; + assert.equal(observedWorkflowAutoImageProofMatches(plan, p), false, name); + assert(validateRunProvenance(p).includes(message), name); + } +}); + +function loraWitness(options = {}) { + const w = witness({ ...options, guider: options.guider ?? true }); + const id = (options.prefix ?? '') + 'lora'; + w.ids.lora = id; + const artifact = { + source: 'hub', + repository: 'example/style-adapter', + revision: 'b'.repeat(40), + weightName: 'style.safetensors', + sha256: 'c'.repeat(64), + }; + const adapter = { adapterName: 'style', scale: 0.65, descriptorSha256: 'd'.repeat(64), artifact, scheduler: null }; + w.modelIdentities = [ + { + repoId: 'example/native-image', + selectedRevision: 'a'.repeat(40), + modelRevision: 'example/native-image@' + 'a'.repeat(40), + }, + { + repoId: artifact.repository, + selectedRevision: artifact.revision, + modelRevision: artifact.repository + '@' + artifact.revision, + }, + ]; + w.apiGraph.nodes[id] = { + module: 'modules.ModularDiffusers', + action: 'Lora', + params: { + model: literal({ source: 'hub', value: artifact.repository }), + revision: literal(artifact.revision), + weight_name: literal(artifact.weightName), + expected_sha256: literal(artifact.sha256), + scale: literal(adapter.scale), + adapter_name: literal(adapter.adapterName), + previous_loras: {}, + scheduler_class: literal(''), + scheduler_config: literal('{}'), + }, + }; + w.apiGraph.paths[0].unshift(id); + w.apiGraph.nodes[w.ids.owner].params.lora_list = { sourceId: id, sourceKey: 'lora' }; + const receipt = w.executedOutput.resolvedExecutionInputs; + receipt.schemaVersion = 1; + receipt.appliedAdaptersStatus = { schemaVersion: 1, truncated: false }; + receipt.nodes.push({ + nodeId: id, + module: 'modules.ModularDiffusers', + action: 'Lora', + fields: { revision: { value: artifact.revision, source: 'literal' } }, + omittedFields: {}, + }); + receipt.nodes.find((row) => row.nodeId === w.ids.owner).appliedAdapters = { + schemaVersion: 1, + status: 'complete', + source: 'backend-adapter-application', + applicationId: '1'.repeat(32), + observation: 'activated', + adapters: [adapter], + stateSha256: 'sha256:applied-adapters-v1:' + canonicalJsonHash({ adapters: [adapter] }), + }; + w.apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(w.apiGraph); + return w; +} + +test('a fresh pinned single-LoRA Auto observation retains its separate resource identity without raw rewrites', () => { + const w = loraWitness(), + before = structuredClone(w), + plan = planFor(w); + assert.equal(plan.source, 'observed-workflow-auto-lora-resource-v1'); + assert.equal(plan.resourceObservation.adapters[0].artifact.revision, 'b'.repeat(40)); + const execution = executionReceiptIdentity(w.executionReceipt, plan); + assert.match(execution.resourceCandidateId, /^observed-workflow-auto-lora-resource-v1:[0-9a-f]{64}$/u); + assert.equal(w.executionReceipt.resourceCandidateId, null); + assert.deepEqual(w, before); + const withoutGuider = loraWitness({ guider: false }); + assert.equal(planFor(withoutGuider).source, plan.source); + assert.notEqual( + executionReceiptIdentity(withoutGuider.executionReceipt, planFor(withoutGuider)).resourceCandidateId, + execution.resourceCandidateId, + 'optional guidance remains part of the observed resource controls', + ); + const renamed = loraWitness({ prefix: 'other-', prompt: 'Another photograph', seed: 9 }); + assert.equal( + executionReceiptIdentity(renamed.executionReceipt, planFor(renamed)).resourceCandidateId, + execution.resourceCandidateId, + ); + const anotherApplication = loraWitness(); + anotherApplication.executedOutput.resolvedExecutionInputs.nodes.find( + (r) => r.nodeId === anotherApplication.ids.owner, + ).appliedAdapters.applicationId = '2'.repeat(32); + assert.equal( + executionReceiptIdentity(anotherApplication.executionReceipt, planFor(anotherApplication)).resourceCandidateId, + execution.resourceCandidateId, + ); +}); + +test('the single-LoRA observation rejects missing native state, mismatched artifacts and unsupported descriptor authority', () => { + const application = (w) => + w.executedOutput.resolvedExecutionInputs.nodes.find((r) => r.nodeId === w.ids.owner).appliedAdapters; + const mutations = { + absent: (w) => { + delete w.executedOutput.resolvedExecutionInputs.nodes.find((r) => r.nodeId === w.ids.owner).appliedAdapters; + }, + reused: (w) => { + application(w).observation = 'reused'; + }, + truncated: (w) => { + w.executedOutput.resolvedExecutionInputs.appliedAdaptersStatus.truncated = true; + }, + wrongPin: (w) => { + application(w).adapters[0].artifact.revision = 'e'.repeat(40); + }, + wrongScale: (w) => { + application(w).adapters[0].scale = 0.8; + }, + wrongName: (w) => { + application(w).adapters[0].adapterName = 'other'; + }, + wrongSha: (w) => { + application(w).adapters[0].artifact.sha256 = 'f'.repeat(64); + }, + wrongPort: (w) => { + w.apiGraph.nodes[w.ids.owner].params.lora_list.sourceKey = 'other'; + }, + ambiguousList: (w) => { + w.apiGraph.nodes[w.ids.owner].params.lora_list.value = []; + }, + unconnected: (w) => { + w.apiGraph.nodes[w.ids.owner].params.lora_list = literal(null); + }, + opaquePredecessor: (w) => { + w.apiGraph.nodes[w.ids.lora].params.previous_loras = literal([]); + }, + scheduler: (w) => { + w.apiGraph.nodes[w.ids.lora].params.scheduler_class.value = 'OtherScheduler'; + }, + schedulerConfig: (w) => { + w.apiGraph.nodes[w.ids.lora].params.scheduler_config.value = '{"shift":2}'; + }, + custom: (w) => { + w.apiGraph.nodes[w.ids.lora].module = 'custom.ModularDiffusers'; + }, + connectedControl: (w) => { + w.apiGraph.nodes[w.ids.lora].params.revision.sourceId = w.ids.encode; + }, + omittedPin: (w) => { + w.executedOutput.resolvedExecutionInputs.nodes.find((r) => r.nodeId === w.ids.lora).omittedFields.revision = + 'unsupported-value'; + }, + unknownControl: (w) => { + w.apiGraph.nodes[w.ids.lora].params.unknown = literal(true); + }, + missingBaseObservation: (w) => { + w.modelIdentities = w.modelIdentities.slice(1); + }, + missingAdapterObservation: (w) => { + w.modelIdentities = w.modelIdentities.slice(0, 1); + }, + }; + for (const [name, mutate] of Object.entries(mutations)) { + const w = loraWitness(); + mutate(w); + const app = application(w); + if (app) app.stateSha256 = 'sha256:applied-adapters-v1:' + canonicalJsonHash({ adapters: app.adapters }); + w.apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(w.apiGraph); + assert.notEqual(planFor(w).source, 'observed-workflow-auto-lora-resource-v1', name); + } +}); + +test('LoRA resource projections bind to the existing strict proof even after a self-hashed forgery', () => { + const w = loraWitness(), + plan = planFor(w); + const canonicalGraph = canonicalizeApiGraph(w.apiGraph); + const applied = createAppliedAdapterProof({ + apiGraph: w.apiGraph, + canonicalGraph, + executedOutput: w.executedOutput, + executionReceipt: w.executionReceipt, + taskId: 'task', + }); + const provenance = { + schemaVersion: 2, + taskId: 'task', + models: { items: w.modelIdentities }, + graph: { canonicalGraph, executionPlan: plan }, + adapterApplications: applied.proof, + adapterApplicationsHash: applied.hash, + execution: executionReceiptIdentity(w.executionReceipt, plan), + }; + assert(observedWorkflowAutoLoraProofMatches(plan, provenance)); + const blockers = validateRunProvenance(provenance); + assert(!blockers.includes('execution LoRA resource observation does not match the original applied adapter proof.')); + const missingBase = structuredClone(provenance); + missingBase.models.items = missingBase.models.items.slice(1); + assert.equal(observedWorkflowAutoLoraProofMatches(plan, missingBase), false); + const forgedBase = structuredClone(provenance); + forgedBase.graph.executionPlan.modelRepo = 'example/forged-base'; + forgedBase.graph.executionPlan.resourceObservation.repo = 'example/forged-base'; + forgedBase.graph.executionPlan.resourceObservation.controls.find( + (control) => control.scope === 'modules.ModularDiffusers.ModelsLoader', + ).fields.repo_id.value = 'example/forged-base'; + forgedBase.models.items[0] = { + ...forgedBase.models.items[0], + repoId: 'example/forged-base', + modelRevision: 'example/forged-base@' + 'a'.repeat(40), + }; + assert.equal(observedWorkflowAutoLoraProofMatches(forgedBase.graph.executionPlan, forgedBase), false); + const forgedPrecision = structuredClone(plan); + forgedPrecision.dtype = forgedPrecision.resourceObservation.dtype = 'float32'; + forgedPrecision.observedResourceCandidateId = + forgedPrecision.source + ':' + canonicalJsonHash(forgedPrecision.resourceObservation); + assert.equal(executionReceiptIdentity(w.executionReceipt, forgedPrecision).resourceCandidateId, null); + forgedPrecision.resourceObservation.controls.find( + (control) => control.scope === 'modules.ModularDiffusers.ModelsLoader', + ).fields.dtype = 'float32'; + assert.equal(observedWorkflowAutoLoraProofMatches(forgedPrecision, provenance), false); + plan.resourceObservation.adapters[0].artifact.revision = 'f'.repeat(40); + plan.observedResourceCandidateId = plan.source + ':' + canonicalJsonHash(plan.resourceObservation); + provenance.execution.resourceCandidateId = plan.observedResourceCandidateId; + assert.equal(observedWorkflowAutoLoraProofMatches(plan, provenance), false); + assert( + validateRunProvenance(provenance).includes( + 'execution LoRA resource observation does not match the original applied adapter proof.', + ), + ); +}); + +test('LoRA resource identity uses native numeric scale, preserves decimal source text and rejects a corrupt projection', () => { + const first = loraWitness(), + changed = loraWitness(); + const id = (w) => executionReceiptIdentity(w.executionReceipt, planFor(w)).resourceCandidateId; + const before = id(first); + first.apiGraph.nodes[first.ids.lora].params.scale.value = '6.5e-1'; + first.apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(first.apiGraph); + assert.equal(id(first), before); + const application = changed.executedOutput.resolvedExecutionInputs.nodes.find( + (r) => r.nodeId === changed.ids.owner, + ).appliedAdapters; + changed.apiGraph.nodes[changed.ids.lora].params.scale.value = application.adapters[0].scale = 0.8; + application.stateSha256 = 'sha256:applied-adapters-v1:' + canonicalJsonHash({ adapters: application.adapters }); + changed.apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(changed.apiGraph); + assert.notEqual(id(changed), before); + const plan = planFor(changed); + plan.resourceObservation.adapters[0].scale = '0.8'; + plan.observedResourceCandidateId = plan.source + ':' + canonicalJsonHash(plan.resourceObservation); + assert.equal( + executionReceiptIdentity(changed.executionReceipt, plan).resourceCandidateId, + null, + 'no manual fallback for a corrupt observed plan', + ); +}); + +test('a completed whole-workflow Auto trace retains its actual resource identity without rewriting the raw candidate', () => { + const w = witness(), + before = structuredClone(w), + plan = planFor(w); + assert.equal(plan.modelType, 'ExampleModularPipeline'); + assert.equal(plan.modelRepo, 'example/native-image'); + assert.equal(plan.modelRevision, 'a'.repeat(40)); + assert.equal(plan.offloadMode, 'model_cpu'); + assert.equal(plan.weightLoadingMode, 'cpu'); + assert.equal(plan.resourceMode, 'auto'); + assert.equal(plan.source, 'observed-workflow-auto-resource-v1'); + assert.equal(plan.autoResourceCandidateId, undefined, 'An observed recipe is not a primary catalog Auto candidate.'); + const execution = executionReceiptIdentity(w.executionReceipt, plan); + assert.match(execution.resourceCandidateId, /^observed-workflow-auto-resource-v1:[0-9a-f]{64}$/u); + assert.deepEqual(w, before); + assert.equal(w.executionReceipt.resourceCandidateId, null); +}); + +test('resource observation ignores node IDs, prompt and seed, while retaining geometry', () => { + const first = witness(), + second = witness({ prefix: 'other-', prompt: 'A different photograph', seed: 1234 }); + const id = (w) => executionReceiptIdentity(w.executionReceipt, planFor(w)).resourceCandidateId; + assert.ok(id(first)); + assert.equal(id(first), id(second)); + assert.notEqual(id(first), id(witness({ width: 1536 }))); +}); + +test('client Auto hints alone cannot manufacture the backend execution observation', () => { + const w = witness(); + assert.equal(executionPlanIdentity(w.apiGraph).plan.source, undefined); + assert.equal(executionReceiptIdentity({}, executionPlanIdentity(w.apiGraph).plan).resourceCandidateId, null); +}); + +test('incomplete, conflicting, connected or reused execution evidence remains held', () => { + const mutations = { + missingTask: (w) => { + delete w.executionReceipt; + }, + wrongFactoryTask: (w) => { + w.taskId = 'other'; + }, + missingResolvedDtype: (w) => { + delete w.executionReceipt.runtimePreparation.workflowAuto.resolvedFields[w.ids.owner].dtype; + }, + unfinished: (w) => { + w.executionReceipt.status = 'running'; + }, + wrongOutputTask: (w) => { + w.executedOutput.taskId = 'other'; + }, + wrongOutputAttempt: (w) => { + w.executedOutput.attemptIndex = 1; + }, + wrongSession: (w) => { + w.executionReceipt.sid = 'other'; + }, + wrongWorkflow: (w) => { + w.executedOutput.workflowTabId = 'other'; + }, + wrongClientRun: (w) => { + w.executionReceipt.client_run_id = 'other'; + }, + wrongInputHash: (w) => { + w.executionReceipt.run_input_hash = 'other'; + }, + truncated: (w) => { + w.executedOutput.resolvedExecutionInputs.truncated = true; + }, + missingNode: (w) => { + w.executedOutput.resolvedExecutionInputs.nodes.pop(); + }, + uncaptured: (w) => { + w.executedOutput.resolvedExecutionInputs.uncapturedNodeIds = [w.ids.owner]; + }, + wrongTaskMode: (w) => { + w.executedOutput.resolvedExecutionInputs.graphTasks[0].task = 'edit_image'; + }, + wrongPipeline: (w) => { + w.executedOutput.resolvedExecutionInputs.graphTasks[0].pipelineClass = 'OtherPipeline'; + }, + wrongOwner: (w) => { + w.executedOutput.resolvedExecutionInputs.graphTasks[0].loaderId = w.ids.encode; + }, + noBackendPlan: (w) => { + delete w.executionReceipt.runtimePreparation.workflowAuto; + }, + changedStrategy: (w) => { + w.executionReceipt.runtimePreparation.workflowAuto.strategy = 'unknown'; + }, + ownerReuse: (w) => { + w.executionReceipt.runtimePreparation.workflowAuto.reusedOwnerIds = [w.ids.owner]; + }, + deferredData: (w) => { + w.executionReceipt.runtimePreparation.workflowAuto.preparedDataNodes = [w.ids.encode]; + }, + runtimePatches: (w) => { + w.executionReceipt.runtimePreparation.workflowAuto.appliedUpdates = [{}]; + }, + changedTrace: (w) => { + w.executedOutput.resolvedExecutionInputs.nodes[0].fields.dtype.value = 'float32'; + }, + changedResolved: (w) => { + w.executionReceipt.runtimePreparation.workflowAuto.resolvedFields[w.ids.owner].offload_mode = 'none'; + }, + mutableRevision: (w) => { + w.apiGraph.nodes[w.ids.owner].params.revision.value = 'main'; + }, + connectedIdentity: (w) => { + w.apiGraph.nodes[w.ids.owner].params.repo_id.sourceId = w.ids.encode; + }, + unsafeCode: (w) => { + w.apiGraph.nodes[w.ids.owner].params.trust_remote_code.value = true; + }, + borrowedComponent: (w) => { + w.apiGraph.nodes[w.ids.owner].params.vae.sourceId = w.ids.decode; + }, + quantized: (w) => { + w.apiGraph.nodes[w.ids.owner].params.quant_config.value = { backend: 'other' }; + }, + forgedHash: (w) => { + w.apiGraph.runtimeHints.workflowAutoPlan.graphHash = 'sha256:workflow-auto-v1:' + '0'.repeat(64); + }, + nonfinite: (w) => { + w.apiGraph.nodes[w.ids.owner].params.extra = { value: NaN }; + w.apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(w.apiGraph); + }, + unknownResolvedField: (w) => { + w.apiGraph.nodes[w.ids.owner].params.unknown = { value: true }; + w.executionReceipt.runtimePreparation.workflowAuto.resolvedFields[w.ids.owner].unknown = true; + w.apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(w.apiGraph); + }, + clientCustomMode: (w) => { + w.apiGraph.runtimeHints.resourceMode = 'expert'; + }, + backendCustomMode: (w) => { + w.executionReceipt.runtimePreparation.resourceMode = 'expert'; + }, + }; + for (const [name, mutate] of Object.entries(mutations)) { + const w = witness(); + mutate(w); + assert.notEqual(planFor(w).source, 'observed-workflow-auto-resource-v1', name); + } +}); + +test('a changed observed recipe cannot fall back to a manual candidate', () => { + const w = witness(), + plan = planFor(w); + assert.equal(plan.source, 'observed-workflow-auto-resource-v1'); + plan.offloadMode = 'none'; + assert.equal(executionReceiptIdentity(w.executionReceipt, plan).resourceCandidateId, null); +}); + +test('a self-hashed incomplete observation cannot manufacture an executed resource identity', () => { + for (const change of [ + (p) => { + delete p.resourceObservation.geometry; + }, + (p) => { + p.resourceObservation.revision = p.modelRevision = 'main'; + }, + (p) => { + p.pipelineClass = 'OtherPipeline'; + }, + (p) => { + p.quantizedComponents = ['transformer']; + }, + (p) => { + p.resourceObservation.controls = []; + }, + ]) { + const w = witness(), + plan = planFor(w); + change(plan); + plan.observedResourceCandidateId = + 'observed-workflow-auto-resource-v1:' + canonicalJsonHash(plan.resourceObservation); + assert.equal(executionReceiptIdentity(w.executionReceipt, plan).resourceCandidateId, null); + } +}); + +test('optional guidance remains part of the exact backend resource observation', () => { + const w = witness({ guider: true }); + const plan = planFor(w); + assert.equal(plan.source, 'observed-workflow-auto-resource-v1'); + assert.equal(plan.resourceObservation.controls.length, 3); +}); + +function withPromptLength(w, length = 512) { + w.apiGraph.nodes[w.ids.encode].params.max_sequence_length = literal(length); + w.executedOutput.formSnapshot.maxSequenceLength = length; + w.executedOutput.resolvedExecutionInputs.nodes.find((row) => row.nodeId === w.ids.encode).fields.max_sequence_length = + { + value: length, + source: 'literal', + }; + w.executionReceipt.runtimePreparation.workflowAuto.resolvedFields[w.ids.encode] = { max_sequence_length: length }; + w.apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(w.apiGraph); + return w; +} + +test('native prompt length remains part of the observed text-to-image recipe with optional guidance', () => { + for (const guider of [false, true]) { + const w = withPromptLength(witness({ guider })), + before = structuredClone(w), + plan = planFor(w); + assert.equal(plan.source, 'observed-workflow-auto-resource-v1'); + assert.equal(plan.resourceObservation.controls.length, guider ? 4 : 3); + assert.deepEqual( + plan.resourceObservation.controls.find((c) => c.scope === 'modules.ModularDiffusers.EncodePrompt'), + { + scope: 'modules.ModularDiffusers.EncodePrompt', + fields: { max_sequence_length: 512 }, + }, + ); + const id = executionReceiptIdentity(w.executionReceipt, plan).resourceCandidateId; + assert(id); + assert.notEqual(id, executionReceiptIdentity(w.executionReceipt, planFor(witness({ guider }))).resourceCandidateId); + const longer = withPromptLength(witness({ guider }), 1024); + assert.notEqual(id, executionReceiptIdentity(longer.executionReceipt, planFor(longer)).resourceCandidateId); + assert.deepEqual(w, before, 'original native task and graph remain unchanged'); + } +}); + +test('prompt-length observations require exact literal graph, native capture and requested-form agreement', () => { + const mutations = { + missingCapture: (w, row) => { + delete row.fields.max_sequence_length; + }, + omittedCapture: (w, row) => { + row.omittedFields = { max_sequence_length: 'uncaptured' }; + }, + connectedCapture: (w, row) => { + row.fields.max_sequence_length.source = 'connection'; + }, + changedCapture: (w, row) => { + row.fields.max_sequence_length.value = 256; + }, + changedForm: (w) => { + w.executedOutput.formSnapshot.maxSequenceLength = 256; + }, + missingForm: (w) => { + delete w.executedOutput.formSnapshot.maxSequenceLength; + }, + changedGraph: (w) => { + w.apiGraph.nodes[w.ids.encode].params.max_sequence_length.value = 256; + }, + connectedGraph: (w) => { + w.apiGraph.nodes[w.ids.encode].params.max_sequence_length.sourceId = w.ids.owner; + }, + unknownField: (w) => { + w.executionReceipt.runtimePreparation.workflowAuto.resolvedFields[w.ids.encode].unknown = true; + }, + emptyFields: (w) => { + w.executionReceipt.runtimePreparation.workflowAuto.resolvedFields[w.ids.encode] = {}; + }, + wrongScope: (w) => { + const fields = w.executionReceipt.runtimePreparation.workflowAuto.resolvedFields; + fields[w.ids.denoise].max_sequence_length = fields[w.ids.encode].max_sequence_length; + delete fields[w.ids.encode]; + }, + }; + for (const [name, mutate] of Object.entries(mutations)) { + const w = withPromptLength(witness({ guider: true })); + const row = w.executedOutput.resolvedExecutionInputs.nodes.find((r) => r.nodeId === w.ids.encode); + mutate(w, row); + w.apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(w.apiGraph); + assert.notEqual(planFor(w).source, 'observed-workflow-auto-resource-v1', name); + } + for (const length of [0, -1, 1.5, '512', true, null, Number.MAX_SAFE_INTEGER + 1]) { + assert.notEqual( + planFor(withPromptLength(witness(), length)).source, + 'observed-workflow-auto-resource-v1', + String(length), + ); + } + assert.notEqual( + planFor(withPromptLength(imageConditionedWitness())).source, + 'observed-workflow-auto-image-resource-v1', + ); +}); + +test('a pinned single-adapter text recipe retains the same strict prompt-length capture', () => { + const w = withPromptLength(loraWitness()), + before = structuredClone(w), + plan = planFor(w); + assert.equal(plan.source, 'observed-workflow-auto-lora-resource-v1'); + assert.equal(plan.maxSequenceLength, 512); + assert(executionReceiptIdentity(w.executionReceipt, plan).resourceCandidateId); + assert.equal(plan.resourceObservation.adapters[0].artifact.revision, 'b'.repeat(40)); + assert.deepEqual(w, before); +}); + +test('self-hashed prompt-length projections reject unsupported scope, fields and values', () => { + for (const change of [ + (c) => { + c.scope = 'modules.ModularDiffusers.DecodeLatents'; + }, + (c) => { + c.fields.prompt = 'unrelated'; + }, + (c) => { + c.fields = {}; + }, + (c) => { + c.fields.max_sequence_length = 1024; + }, + ...[0, -1, 1.5, '512', true, null, Number.MAX_SAFE_INTEGER + 1].map((v) => (c) => { + c.fields.max_sequence_length = v; + }), + ]) { + const w = withPromptLength(witness({ guider: true })), + plan = planFor(w); + assert.equal(plan.source, 'observed-workflow-auto-resource-v1'); + change(plan.resourceObservation.controls.find((c) => c.scope === 'modules.ModularDiffusers.EncodePrompt')); + plan.observedResourceCandidateId = plan.source + ':' + canonicalJsonHash(plan.resourceObservation); + assert.equal(executionReceiptIdentity(w.executionReceipt, plan).resourceCandidateId, null); + } +}); + +test('ordinary and Unicode requests use the actual worker hash protocol', () => { + const python = process.env.MODIFF_BACKEND_PYTHON; + assert(python, 'Set the declared ordinary CPU MODIFF_BACKEND_PYTHON for backend protocol checks.'); + const backend = resolve( + process.env.MODIFF_BACKEND_DIR || resolve(dirname(fileURLToPath(import.meta.url)), '../../MoDiff'), + ); + const witnesses = [witness(), witness({ prompt: 'Café 🌅 — tabletop photograph' }), witness({ guider: true })]; + const code = `import ast,hashlib,json,pathlib,sys +p=pathlib.Path(sys.argv[1]); parsed=ast.parse(p.read_text(encoding='utf8')) +functions=[n for n in parsed.body if isinstance(n,ast.FunctionDef) and n.name in {'graph_material','workflow_graph_hash'}] +assert len(functions)==2 +namespace={'hashlib':hashlib,'json':json} +exec(compile(ast.Module(body=functions,type_ignores=[]),str(p),'exec'),namespace) +print(json.dumps([namespace['workflow_graph_hash'](g) for g in json.load(sys.stdin)]))`; + const result = spawnSync( + python, + ['-X', 'utf8', '-B', '-c', code, resolve(backend, 'modiff/workflow_auto_resource.py')], + { encoding: 'utf8', input: JSON.stringify(witnesses.map((w) => w.apiGraph)), timeout: 30000 }, + ); + assert.equal(result.status, 0, result.stderr); + const hashes = JSON.parse(result.stdout); + for (const [i, w] of witnesses.entries()) { + w.apiGraph.runtimeHints.workflowAutoPlan.graphHash = hashes[i]; + assert.equal(planFor(w).source, 'observed-workflow-auto-resource-v1'); + } +}); + +function legacyTextWitness() { + const w = witness(); + for (const field of ['reviewed_variant', 'workflow_id', 'inpaint_compatibility']) { + delete w.executionReceipt.runtimePreparation.workflowAuto.resolvedFields[w.ids.owner][field]; + } + for (const field of ['weight_format', 'weight_loading_mode']) { + delete w.apiGraph.nodes[w.ids.owner].params[field]; + delete w.executionReceipt.runtimePreparation.workflowAuto.resolvedFields[w.ids.owner][field]; + delete w.executedOutput.resolvedExecutionInputs.nodes.find((n) => n.nodeId === w.ids.owner).fields[field]; + } + Object.assign(w.executedOutput.formSnapshot, { steps: 8, guidanceScale: 1 }); + Object.assign(w.executionReceipt.runtimePreparation, { performed: false, residentRecipeReusable: false }); + w.backendSource = { + fingerprint: 'sha256:backend-source-v1:' + 'b'.repeat(64), + gitCommit: null, + files: [{ path: 'main.py', sha256: 'c'.repeat(64) }], + }; + w.executionReceipt.runtimeFingerprint = { + backendSource: { fingerprint: w.backendSource.fingerprint, gitCommit: null, fileCount: 1 }, + }; + w.apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(w.apiGraph); + const payload = Object.fromEntries(Object.values(w.apiGraph.nodes).map((n) => [n.module + '.' + n.action, n])); + w.backendContract = backendContractIdentity(payload, canonicalizeApiGraph(w.apiGraph)); + return w; +} +function legacyTextProof(w, plan) { + return { + runtime: { backendSource: w.backendSource, backendContract: w.backendContract }, + graph: { canonicalGraph: canonicalizeApiGraph(w.apiGraph) }, + models: { items: [{ repoId: plan.modelRepo, selectedRevision: plan.modelRevision }] }, + template: { lockedSettings: w.executedOutput.formSnapshot }, + inputs: { items: [] }, + output: { items: [{ mediaType: 'image', width: 1024, height: 1024 }] }, + }; +} +test('historical text observations preserve absent loader controls and bind the recovered source contract', () => { + const w = legacyTextWitness(), + plan = planFor(w); + assert.equal(plan.source, 'observed-workflow-auto-legacy-resource-v1'); + assert(!Object.hasOwn(plan, 'weightLoadingMode')); + assert(!Object.hasOwn(plan.resourceObservation, 'weightLoadingMode')); + assert.deepEqual(plan.resourceObservation.absentLoaderControls, ['weight_format', 'weight_loading_mode']); + assert(observedWorkflowAutoResourceId(plan)); + assert(observedWorkflowAutoLegacyProofMatches(plan, legacyTextProof(w, plan))); +}); +test('historical text observations reject missing authority, partial controls, reuse and contradictory captures', () => { + for (const mutate of [ + (w) => { + delete w.backendSource; + }, + (w) => { + delete w.backendContract; + }, + (w) => { + w.backendSource.fingerprint = 'sha256:backend-source-v1:' + 'd'.repeat(64); + }, + (w) => { + w.backendSource.gitCommit = 'a'.repeat(40); + }, + (w) => { + w.executionReceipt.runtimeFingerprint.backendSource.fileCount = 2; + }, + (w) => { + w.backendContract.contracts.find((n) => n.key.endsWith('.ModelsLoader')).params.weight_format = {}; + }, + (w) => { + w.apiGraph.nodes[w.ids.owner].params.weight_format = literal('native'); + }, + (w) => { + w.executionReceipt.runtimePreparation.workflowAuto.resolvedFields[w.ids.owner].weight_loading_mode = 'cpu'; + }, + (w) => { + w.executedOutput.resolvedExecutionInputs.nodes.find((n) => n.nodeId === w.ids.owner).fields.weight_loading_mode = + { source: 'literal', value: 'cpu' }; + }, + (w) => { + w.executedOutput.formSnapshot.weightFormat = 'native'; + }, + (w) => { + w.executionReceipt.runtimePreparation.residentRecipeReusable = true; + }, + (w) => { + w.executionReceipt.runtimePreparation.workflowAuto.reusedOwnerIds = [w.ids.owner]; + }, + (w) => { + w.executionReceipt.runtimePreparation.performed = true; + }, + (w) => { + w.executionReceipt.resourceCandidateId = 'invented'; + }, + ]) { + const w = legacyTextWitness(); + mutate(w); + assert.notEqual(planFor(w).source, 'observed-workflow-auto-legacy-resource-v1'); + } +}); +test('rehashing a historical observation cannot replace its graph, source, contract, model or output', () => { + const w = legacyTextWitness(), + plan = planFor(w), + proof = legacyTextProof(w, plan); + for (const mutate of [ + (p) => { + p.runtime.backendSource.fingerprint = 'sha256:backend-source-v1:' + 'd'.repeat(64); + }, + (p) => { + p.runtime.backendContract.fingerprint = 'sha256:backend-contract-v1:' + 'd'.repeat(64); + }, + (p) => { + p.runtime.backendContract.contracts.find((n) => n.key.endsWith('.ModelsLoader')).params.weight_loading_mode = {}; + }, + (p) => { + p.models.items[0].selectedRevision = 'd'.repeat(40); + }, + (p) => { + p.output.items[0].width = 512; + }, + (p) => { + p.template.lockedSettings.steps = 4; + }, + (p) => { + p.graph.canonicalGraph.nodes.find((n) => n.action === 'Denoise').params.embeddings.sourceKey = 'wrong'; + }, + (p) => { + p.inputs.items.push({ role: 'referenceImages[0]' }); + }, + ]) { + const altered = structuredClone(proof); + mutate(altered); + assert.equal(observedWorkflowAutoLegacyProofMatches(plan, altered), false); + } + const altered = structuredClone(plan); + altered.device = altered.resourceObservation.device = 'cpu'; + altered.observedResourceCandidateId = altered.source + ':' + canonicalJsonHash(altered.resourceObservation); + assert.equal(observedWorkflowAutoResourceId(altered), null); +}); + +function legacyDecoderWitness() { + const w = legacyTextWitness(); + const decode = w.apiGraph.nodes[w.ids.decode]; + const fields = {}; + for (const field of ['width', 'height']) { + decode.params[field] = { value: 1024, display: 'input', sourceId: w.ids.denoise, sourceKey: 'out_' + field }; + fields[field] = { value: 1024, source: 'connected', sourceNodeId: w.ids.denoise, sourcePortId: 'out_' + field }; + } + w.executedOutput.resolvedExecutionInputs.nodes.find((n) => n.nodeId === w.ids.decode).fields = fields; + w.executionReceipt.runtimePreparation.workflowAuto.resolvedFields[w.ids.decode] = { width: 1024, height: 1024 }; + w.apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(w.apiGraph); + return w; +} + +function nativeDecoderWitness(w = witness()) { + const decode = w.apiGraph.nodes[w.ids.decode]; + const fields = {}; + for (const field of ['width', 'height']) { + const actual = w.apiGraph.nodes[w.ids.denoise].params[field].value; + decode.params[field] = { value: actual, display: 'input', sourceId: w.ids.denoise, sourceKey: 'out_' + field }; + fields[field] = { value: actual, source: 'connected', sourceNodeId: w.ids.denoise, sourcePortId: 'out_' + field }; + } + w.executedOutput.resolvedExecutionInputs.nodes.find((n) => n.nodeId === w.ids.decode).fields = fields; + w.executionReceipt.runtimePreparation.workflowAuto.resolvedFields[w.ids.decode] = Object.fromEntries( + Object.entries(fields).map(([key, field]) => [key, field.value]), + ); + w.apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(w.apiGraph); + return w; +} + +test('fresh native Auto decoder retains connected geometry for plain and single-adapter text graphs', () => { + for (const w of [nativeDecoderWitness(), nativeDecoderWitness(loraWitness())]) { + const before = structuredClone(w); + const plan = planFor(w); + assert.equal( + plan.source, + w.ids.lora ? 'observed-workflow-auto-lora-resource-v1' : 'observed-workflow-auto-resource-v1', + ); + assert.equal(plan.resourceObservation.decoderGeometryRoute, 'denoiser_dimensions'); + assert(observedWorkflowAutoResourceId(plan)); + assert(observedWorkflowAutoTextGeometryProofMatches(plan, legacyTextProof(w, plan))); + assert.deepEqual(w, before); + } +}); + +test('fresh connected decoder geometry rejects missing, stale and substituted native values', () => { + for (const make of [() => nativeDecoderWitness(), () => nativeDecoderWitness(loraWitness())]) + for (const mutate of [ + (w) => { + w.apiGraph.nodes[w.ids.decode].params.width.sourceKey = 'latents'; + }, + (w) => { + w.apiGraph.nodes[w.ids.decode].params.width.value = 512; + }, + (w) => { + delete w.executedOutput.resolvedExecutionInputs.nodes.find((n) => n.nodeId === w.ids.decode).fields.width; + }, + (w) => { + w.executedOutput.resolvedExecutionInputs.nodes.find( + (n) => n.nodeId === w.ids.decode, + ).fields.width.sourcePortId = 'width'; + }, + (w) => { + w.executionReceipt.runtimePreparation.workflowAuto.resolvedFields[w.ids.decode].height = 512; + }, + ]) { + const w = make(); + mutate(w); + w.apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(w.apiGraph); + assert( + !['observed-workflow-auto-resource-v1', 'observed-workflow-auto-lora-resource-v1'].includes(planFor(w).source), + ); + } +}); + +test('rehashed text decoder observations remain bound to canonical geometry and cannot hide their route', () => { + const w = nativeDecoderWitness(), + plan = planFor(w), + proof = legacyTextProof(w, plan); + for (const mutate of [ + (p) => { + p.graph.canonicalGraph.nodes.find((n) => n.action === 'DecodeLatents').params.width.sourceKey = 'latents'; + }, + (p) => { + p.output.items[0].width = 512; + }, + (p) => { + p.template.lockedSettings.height = 512; + }, + (p) => { + p.inputs.items.push({ role: 'referenceImages[0]' }); + }, + ]) { + const changed = structuredClone(proof); + mutate(changed); + assert.equal(observedWorkflowAutoTextGeometryProofMatches(plan, changed), false); + } + const hidden = structuredClone(proof); + hidden.schemaVersion = 2; + hidden.graph.executionPlan = structuredClone(plan); + delete hidden.graph.executionPlan.resourceObservation.decoderGeometryRoute; + hidden.graph.executionPlan.observedResourceCandidateId = + plan.source + ':' + canonicalJsonHash(hidden.graph.executionPlan.resourceObservation); + hidden.execution = { resourceCandidateId: observedWorkflowAutoResourceId(hidden.graph.executionPlan) }; + assert(hidden.execution.resourceCandidateId); + assert( + validateRunProvenance(hidden).includes( + 'execution text decoder geometry observation does not match the original connected graph/output proof.', + ), + ); +}); +test('historical decoder geometry requires the exact connected denoiser output and native values', () => { + const w = legacyDecoderWitness(), + plan = planFor(w), + proof = legacyTextProof(w, plan); + assert.equal(plan.resourceObservation.decoderGeometryRoute, 'denoiser_dimensions'); + assert(observedWorkflowAutoLegacyProofMatches(plan, proof)); + delete proof.template.lockedSettings.trustRemoteCode; + assert(observedWorkflowAutoLegacyProofMatches(plan, proof)); + for (const mutate of [ + (w) => { + w.apiGraph.nodes[w.ids.decode].params.width.sourceKey = 'latents'; + }, + (w) => { + w.apiGraph.nodes[w.ids.decode].params.width.value = 512; + }, + (w) => { + w.executedOutput.resolvedExecutionInputs.nodes.find((n) => n.nodeId === w.ids.decode).fields.width.sourcePortId = + 'width'; + }, + (w) => { + delete w.executedOutput.resolvedExecutionInputs.nodes.find((n) => n.nodeId === w.ids.decode).fields.width; + }, + (w) => { + w.executionReceipt.runtimePreparation.workflowAuto.resolvedFields[w.ids.decode].width = 512; + }, + ]) { + const altered = legacyDecoderWitness(); + mutate(altered); + altered.apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(altered.apiGraph); + assert.notEqual(planFor(altered).source, 'observed-workflow-auto-legacy-resource-v1'); + } + proof.graph.canonicalGraph.nodes.find((n) => n.action === 'Denoise').params.hidden_route = { + sourceId: proof.graph.canonicalGraph.nodes.find((n) => n.action === 'EncodePrompt').key, + sourceKey: 'embeddings', + }; + assert.equal(observedWorkflowAutoLegacyProofMatches(plan, proof), false); +}); +function legacyGuiderWitness() { + const w = legacyTextWitness(), + id = 'guider'; + const values = { + model_type: 'ExampleModularPipeline', + guider: 'ClassifierFreeGuidance', + guidance_scale: 1, + guidance_rescale: 0, + use_original_formulation: false, + enabled: true, + start: 0, + stop: 1, + }; + w.apiGraph.nodes[id] = { + module: 'modules.ModularDiffusers', + action: 'Guider', + params: Object.fromEntries(Object.entries(values).map(([k, v]) => [k, literal(v)])), + }; + for (const role of ['encode', 'denoise']) + w.apiGraph.nodes[w.ids[role]].params.guider = { sourceId: id, sourceKey: 'guider_out' }; + w.apiGraph.paths[0].splice(1, 0, id); + w.executedOutput.resolvedExecutionInputs.nodes.push({ + nodeId: id, + module: 'modules.ModularDiffusers', + action: 'Guider', + fields: Object.fromEntries(Object.entries(values).map(([k, v]) => [k, { source: 'literal', value: v }])), + }); + w.executionReceipt.runtimePreparation.workflowAuto.resolvedFields[id] = { guidance_scale: 1 }; + w.apiGraph.runtimeHints.workflowAutoPlan.graphHash = graphHash(w.apiGraph); + return w; +} +test('historical Guider configurations require all native controls and both consuming paths', () => { + const w = legacyGuiderWitness(), + plan = planFor(w), + proof = legacyTextProof(w, plan); + assert.equal(plan.source, 'observed-workflow-auto-legacy-resource-v1'); + assert(observedWorkflowAutoLegacyProofMatches(plan, proof)); + const bad = legacyGuiderWitness(); + delete bad.executedOutput.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'guider').fields.enabled; + assert.notEqual(planFor(bad).source, 'observed-workflow-auto-legacy-resource-v1'); + const changed = structuredClone(proof); + changed.graph.canonicalGraph.nodes.find((n) => n.action === 'Guider').params.enabled.value = false; + assert.equal(observedWorkflowAutoLegacyProofMatches(plan, changed), false); + delete proof.graph.canonicalGraph.nodes.find((n) => n.action === 'EncodePrompt').params.guider; + assert.equal(observedWorkflowAutoLegacyProofMatches(plan, proof), false); +}); + +function nativeExpertOrderedAdapterWitness({ count = 2, legacyChooser = true } = {}) { + const w = nativeExpertWitness({ guider: true }); + if (legacyChooser) w.executedOutput.formSnapshot.modelType = 'ExampleLegacyChooser'; + const receipt = w.executedOutput.resolvedExecutionInputs; + const application = receipt.nodes.find((r) => r.nodeId === w.ids.owner).appliedAdapters; + for (let index = 0; index < count; index++) { + const id = 'native-adapter-' + index; + const artifact = { + source: 'hub', + repository: 'example/style-adapter-' + index, + revision: String(index + 2).repeat(40), + weightName: 'style-' + index + '.safetensors', + sha256: String(index + 3).repeat(64), + }; + const adapter = { + adapterName: 'style_' + index, + scale: index === 0 ? 0.8 : 0.18, + descriptorSha256: String(index + 4).repeat(64), + artifact, + scheduler: null, + }; + w.apiGraph.nodes[id] = { + module: 'modules.ModularDiffusers', + action: 'Lora', + params: { + model: literal({ source: 'hub', value: artifact.repository }), + revision: literal(artifact.revision), + weight_name: literal(artifact.weightName), + expected_sha256: literal(artifact.sha256), + scale: literal(adapter.scale), + adapter_name: literal(adapter.adapterName), + previous_loras: index ? { sourceId: 'native-adapter-' + (index - 1), sourceKey: 'lora' } : {}, + scheduler_class: literal(''), + scheduler_config: literal('{}'), + }, + }; + w.apiGraph.paths[0].splice(index, 0, id); + receipt.nodes.push({ + nodeId: id, + module: 'modules.ModularDiffusers', + action: 'Lora', + fields: { revision: { value: artifact.revision, source: 'literal' } }, + omittedFields: {}, + }); + application.adapters.push(adapter); + w.modelIdentities.push({ + repoId: artifact.repository, + selectedRevision: artifact.revision, + modelRevision: artifact.repository + '@' + artifact.revision, + fingerprint: 'sha256:adapter-' + index, + }); + } + if (count) + w.apiGraph.nodes[w.ids.owner].params.lora_list = { sourceId: 'native-adapter-' + (count - 1), sourceKey: 'lora' }; + application.stateSha256 = 'sha256:applied-adapters-v1:' + canonicalJsonHash({ adapters: application.adapters }); + return w; +} + +test('native Expert ordered adapters bind the actual loader and preserve the legacy chooser without raw rewrites', () => { + for (const count of [0, 1, 2]) + for (const legacyChooser of [false, true]) { + const w = nativeExpertOrderedAdapterWitness({ count, legacyChooser }), + before = structuredClone(w), + plan = planFor(w); + assert.equal(plan.source, 'executed-expert-modular-graph-v1'); + assert.equal(plan.modelType, 'ExampleModularPipeline'); + assert.equal(plan.pipelineClass, 'ExampleModularPipeline'); + assert.equal( + executionReceiptIdentity(w.executionReceipt, plan).resourceCandidateId, + 'manual-resource-v1:ExampleModularPipeline|bfloat16|model_cpu|none', + ); + assert.deepEqual(w, before); + assert.equal( + w.executedOutput.formSnapshot.modelType, + legacyChooser ? 'ExampleLegacyChooser' : 'ExampleModularPipeline', + ); + } +}); + +test('native Expert ordered adapters reject missing contradictory reordered and unactivated proof', () => { + for (const mutate of [ + (w) => { + w.apiGraph.nodes[w.ids.owner].params.model_type.value = 'UnknownPipeline'; + w.executedOutput.resolvedExecutionInputs.nodes.find((r) => r.nodeId === w.ids.owner).fields.model_type.value = + 'UnknownPipeline'; + w.executedOutput.resolvedExecutionInputs.graphTasks[0].pipelineClass = 'UnknownPipeline'; + }, + (w) => { + w.modelIdentities.pop(); + }, + (w) => { + w.executedOutput.resolvedExecutionInputs.nodes.pop(); + }, + (w) => { + w.apiGraph.nodes['native-adapter-1'].params.previous_loras.sourceId = w.ids.decode; + }, + (w) => { + w.apiGraph.nodes['native-adapter-0'].params.scale.value = 0.7; + }, + (w) => { + w.executedOutput.resolvedExecutionInputs.nodes.find((r) => r.nodeId === w.ids.owner).fields.model_type.value = + 'OtherModularPipeline'; + }, + (w) => { + w.executedOutput.formSnapshot.offloadMode = 'group_cpu'; + }, + (w) => { + w.executedOutput.resolvedExecutionInputs.nodes.find((r) => r.nodeId === w.ids.owner).appliedAdapters.observation = + 'reused'; + }, + (w) => { + w.executedOutput.resolvedExecutionInputs.nodes + .find((r) => r.nodeId === w.ids.owner) + .appliedAdapters.adapters.reverse(); + }, + (w) => { + w.executedOutput.resolvedExecutionInputs.nodes + .find((r) => r.nodeId === w.ids.owner) + .appliedAdapters.adapters.pop(); + }, + ]) { + const w = nativeExpertOrderedAdapterWitness(); + mutate(w); + const app = w.executedOutput.resolvedExecutionInputs.nodes.find((r) => r.nodeId === w.ids.owner).appliedAdapters; + app.stateSha256 = 'sha256:applied-adapters-v1:' + canonicalJsonHash({ adapters: app.adapters }); + assert.equal(executionReceiptIdentity(w.executionReceipt, planFor(w)).resourceCandidateId, null); + } +}); diff --git a/scripts/workflow-auto-video-provenance.test.mjs b/scripts/workflow-auto-video-provenance.test.mjs new file mode 100644 index 00000000..d2dc486e --- /dev/null +++ b/scripts/workflow-auto-video-provenance.test.mjs @@ -0,0 +1,702 @@ +import assert from 'node:assert/strict'; +import test from 'node:test'; +import { createHash } from 'node:crypto'; +import { canonicalizeApiGraph, executionPlanIdentity, executionReceiptIdentity } from './live-proof-provenance.mjs'; +import { workerGraphHash } from './observed-workflow-auto-resource.mjs'; +import { + OBSERVED_WORKFLOW_AUTO_VIDEO_SOURCE, + observedWorkflowAutoVideoPlan, + observedWorkflowAutoVideoProofMatches, + observedWorkflowAutoVideoResourceId, +} from './observed-workflow-auto-video-resource.mjs'; + +// Synthetic contract fixture. It is not a model run or hardware observation. +function fixture() { + const v = (value) => ({ value }); + const wire = (sourceId, sourceKey) => ({ sourceId, sourceKey, display: 'input' }); + const form = { + mode: 'text_to_video', + modelType: 'LTXVideoPipeline', + resourceMode: 'auto', + dtype: 'bfloat16', + quantizationMode: 'none', + device: 'cuda:0', + autoOffload: true, + offloadMode: 'model_cpu', + trustRemoteCode: false, + prompt: 'Travel toward a tunnel in rain.', + negativePrompt: '', + width: 768, + height: 512, + numFrames: 121, + fps: 24, + steps: 8, + seed: 8301, + strength: 0.8, + guidanceScale: 1, + maxSequenceLength: 512, + }; + const contract = { + schemaVersion: 1, + library: 'diffusers', + mediaKind: 'video', + pipelineClass: 'LTXConditionPipeline', + actions: Object.fromEntries(['EncodeInputs', 'Denoise', 'DecodeLatents'].map((k) => [k, ['text_to_video']])), + }; + const upscaler = { + source: 'hub', + value: 'nateraw/real-esrgan/RealESRGAN_x2plus.pth', + revision: '42efb9c3eeed1f5c0c8a626cf5f7f4481dfbb094', + sha256: '49fafd45f8fd7aa8d31ab2a22d14d91b536c34494a5cfe31eb5d89c2fa266abb', + byteSize: 67061725, + license: 'bsd-3-clause', + }; + const node = (module, action, params) => ({ module: 'modules.' + module, action, params }); + const graph = { + sid: 'fixture-session', + nodes: { + quant: node('DiffusersRuntime', 'PipelineQuantizationConfigV2', { + backend: v('none'), + dtype: v('bfloat16'), + component_overrides: v('{}'), + }), + recipe: node('DiffusersRuntime', 'DiffusersExecutionRecipe', { + quantization_config: wire('quant', 'quantization_config'), + ...Object.fromEntries( + Object.entries({ + device: 'cuda:0', + offload_mode: 'group_cpu', + attention_backend: 'auto', + vae_slicing: true, + vae_tiling: true, + device_map: 'none', + max_memory: '{}', + device_map_overrides: '{}', + layerwise_casting: false, + channels_last: false, + regional_compile: false, + denoiser_cache: 'none', + }).map(([k, value]) => [k, v(value)]), + ), + }), + loader: node('DiffusersVideo', 'LoadPipeline', { + execution_recipe: wire('recipe', 'execution_recipe'), + model_id: v({ source: 'hub', value: 'Lightricks/LTX-Video-0.9.8-13B-distilled' }), + revision: v('7c64400e1861cc0d7b98d570a1926d5408ec60cd'), + pipeline_class: v('LTXConditionPipeline'), + execution_profile_id: v('ltx-video:direct'), + dtype: v('bfloat16'), + device: v('cuda:0'), + offload_mode: v('group_cpu'), + auto_offload: v(true), + low_cpu_mem_usage: v(true), + ...Object.fromEntries( + ['motion_adapter_id', 'motion_adapter_revision', 'ic_lora_id', 'ic_lora_revision', 'ic_lora_weight_name'].map( + (k) => [k, v('')], + ), + ), + }), + encode: node('DiffusersVideo', 'EncodeInputs', { + pipeline: wire('loader', 'pipeline'), + video: { display: 'input' }, + reference_images: { display: 'input' }, + video_contract: v(contract), + mode: v('text_to_video'), + prompt: v(form.prompt), + negative_prompt: v(''), + guidance_scale: v(1), + max_sequence_length: v(512), + }), + denoise: node('DiffusersVideo', 'Denoise', { + pipeline: wire('loader', 'pipeline'), + encoded_inputs: wire('encode', 'encoded_inputs'), + video_contract: v(contract), + mode: v('text_to_video'), + width: v(768), + height: v(512), + num_frames: v(121), + frame_rate: v(24), + num_inference_steps: v(8), + seed: v(8301), + guidance_scale: v(1), + guidance_scale_2: v(0), + use_guidance_scale_2: v(false), + conditioning_scale: v(1), + attention_kwargs_json: v(''), + strength: v(0.8), + denoise_strength: v(0.8), + reference_strength: v(1), + scheduler_flow_shift: v(0), + }), + decode: node('DiffusersVideo', 'DecodeLatents', { + pipeline: wire('loader', 'pipeline'), + latents: wire('denoise', 'latents_out'), + latent_binding: wire('denoise', 'latent_binding'), + output_type: v('pil'), + }), + upscale: node('Spandrel', 'Upscaler', { + image: wire('decode', 'video_out'), + model_id: v(upscaler), + device: v('cuda:0'), + downscale: v(1), + tile_size: v(256), + tile_overlap: v(32), + }), + export: node('Video', 'Export', { video: wire('upscale', 'output'), fps: v(24) }), + }, + paths: [['quant', 'recipe', 'loader', 'encode', 'denoise', 'decode', 'upscale', 'export']], + }; + const snapshot = { studioForm: form, nodes: [], edges: [] }; + graph.runtimeHints = { + resourceMode: 'auto', + workflowSnapshot: snapshot, + workflowTabId: 'fixture-workflow', + clientRunId: 'fixture-client', + runInputHash: 'fixture-input', + workflowAutoPlan: { schemaVersion: 1, graphHash: workerGraphHash(graph) }, + }; + const row = (id, fields) => ({ + nodeId: id, + module: graph.nodes[id].module, + action: graph.nodes[id].action, + fields: Object.fromEntries(Object.entries(fields).map(([k, value]) => [k, { source: 'literal', value }])), + omittedFields: {}, + }); + const output = { + taskId: 'fixture-task', + attemptIndex: 0, + nodeId: 'export', + sid: graph.sid, + workflowTabId: 'fixture-workflow', + clientRunId: 'fixture-client', + runInputHash: 'fixture-input', + apiGraphSnapshot: graph, + formSnapshot: form, + mediaItems: [{ displayType: 'video', mediaMetadata: { width: 1536, height: 1024, frame_count: 121, fps: 24 } }], + resolvedExecutionInputs: { + schemaVersion: 1, + source: 'backend-execution', + taskId: 'fixture-task', + attemptIndex: 0, + nodeId: 'export', + truncated: false, + uncapturedNodeIds: [], + graphTasks: [{ loaderId: 'loader', pipelineClass: 'LTXConditionPipeline', task: 'text_to_video' }], + nodes: [ + row('quant', { dtype: 'bfloat16' }), + row('recipe', { + device: 'cuda:0', + offload_mode: 'group_cpu', + attention_backend: 'auto', + vae_slicing: true, + vae_tiling: true, + }), + row('loader', { + model_id: 'Lightricks/LTX-Video-0.9.8-13B-distilled', + revision: '7c64400e1861cc0d7b98d570a1926d5408ec60cd', + pipeline_class: 'LTXConditionPipeline', + dtype: 'bfloat16', + device: 'cuda:0', + offload_mode: 'group_cpu', + auto_offload: true, + }), + row('encode', { + executed_task: 'text_to_video', + prompt: form.prompt, + negative_prompt: null, + guidance_scale: 1, + max_sequence_length: 128, + }), + row('denoise', { + executed_task: 'text_to_video', + width: 768, + height: 512, + num_frames: 121, + frame_rate: 24, + num_inference_steps: 8, + guidance_scale: 1, + seed: 8301, + max_sequence_length: 128, + }), + row('decode', { executed_task: 'text_to_video', output_type: 'pil' }), + row('upscale', { model_id: upscaler.value, device: 'cuda:0' }), + row('export', { fps: 24 }), + ], + }, + }; + const task = { + task_id: 'fixture-task', + status: 'completed', + attempt_index: 0, + resourceCandidateId: null, + sid: graph.sid, + workflow_tab_id: 'fixture-workflow', + client_run_id: 'fixture-client', + run_input_hash: 'fixture-input', + workflow_snapshot: snapshot, + runtimePreparation: { + resourceMode: 'auto', + performed: false, + residentRecipeReusable: false, + cleanup: null, + workflowAuto: { + strategy: 'dependency_order_retained_owners', + schedule: null, + cachePreparation: null, + reusedOwnerIds: [], + preparedDataNodes: [], + appliedUpdates: [], + releases: [], + resolvedFields: { + loader: Object.fromEntries( + ['revision', 'dtype', 'device', 'auto_offload', 'offload_mode', 'pipeline_class'].map((k) => [ + k, + graph.nodes.loader.params[k].value, + ]), + ), + recipe: Object.fromEntries( + ['offload_mode', 'device', 'attention_backend', 'vae_slicing', 'vae_tiling'].map((k) => [ + k, + graph.nodes.recipe.params[k].value, + ]), + ), + }, + }, + }, + }; + const models = [ + ['Lightricks/LTX-Video-0.9.8-13B-distilled', '7c64400e1861cc0d7b98d570a1926d5408ec60cd'], + ['nateraw/real-esrgan', upscaler.revision], + ].map(([repoId, selectedRevision]) => ({ + repoId, + selectedRevision, + modelRevision: repoId + '@' + selectedRevision, + fingerprint: 'sha256:fixture', + })); + return { + graph, + context: { executionReceipt: task, executedOutput: output, taskId: task.task_id, modelIdentities: models }, + form, + task, + output, + models, + }; +} + +test('ordinary full native video retains an observed resource identity without rewriting its null task candidate', () => { + const f = fixture(), + before = structuredClone(f); + const identity = executionPlanIdentity(f.graph, f.context); + assert.equal(identity.plan.source, OBSERVED_WORKFLOW_AUTO_VIDEO_SOURCE); + assert.equal(identity.plan.resourceObservation.requestedMaxSequenceLength, 512); + assert.equal(identity.plan.resourceObservation.maxSequenceLength, 128); + assert.equal( + executionReceiptIdentity(f.task, identity.plan).resourceCandidateId, + observedWorkflowAutoVideoResourceId(identity.plan), + ); + assert.equal(f.task.resourceCandidateId, null); + assert.deepEqual(f, before); +}); + +function conditionedFixture(mode) { + const f = fixture(); + const count = mode === 'image_to_video' ? 1 : 2; + f.form.mode = mode; + f.form.referenceImages = Array.from({ length: count }, (_, i) => `@data/reference-${i}.png`); + const v = (value) => ({ value }); + f.graph.nodes.source = { + module: 'modules.Image', + action: 'Load', + params: { file: v(f.form.referenceImages), alpha_channel: v('ignore') }, + }; + f.graph.paths[0].unshift('source'); + f.graph.nodes.encode.params.reference_images = { sourceId: 'source', sourceKey: 'image' }; + for (const name of ['encode', 'denoise']) { + f.graph.nodes[name].params.mode.value = mode; + for (const action of ['EncodeInputs', 'Denoise', 'DecodeLatents']) + f.graph.nodes[name].params.video_contract.value.actions[action] = [mode]; + } + f.graph.nodes.denoise.params.conditioning_scale.value = mode === 'image_to_video' ? f.form.strength : 1; + const rows = f.output.resolvedExecutionInputs; + rows.graphTasks[0].task = mode; + for (const row of rows.nodes) if (row.fields.executed_task) row.fields.executed_task.value = mode; + rows.nodes.find((row) => row.nodeId === 'denoise').fields.conditioning_strength = { + source: 'literal', + value: f.form.strength, + }; + f.context.inputArtifacts = f.form.referenceImages.map((path, index) => ({ + role: `referenceImages[${index}]`, + path, + byteSize: 100 + index, + contentHash: 'sha256:bytes:' + String(index + 1).repeat(64), + })); + rows.nodes.push({ + nodeId: 'source', + module: 'modules.Image', + action: 'Load', + omittedFields: {}, + fields: { + alpha_channel: { source: 'literal', value: 'ignore' }, + source_hashes: { source: 'literal', value: f.context.inputArtifacts.map((i) => i.contentHash.slice(13)) }, + }, + }); + f.graph.runtimeHints.workflowAutoPlan.graphHash = workerGraphHash(f.graph); + return f; +} + +function remasterFixture() { + const f = fixture(), + v = (value) => ({ value }), + wire = (sourceId, sourceKey) => ({ sourceId, sourceKey }); + f.form.mode = 'video_to_video'; + f.form.sourceVideo = '@data/source.mp4'; + f.graph.nodes.source = { module: 'modules.Video', action: 'Load', params: { file: v(f.form.sourceVideo) } }; + f.graph.nodes.normalize = { + module: 'modules.VideoConditioning', + action: 'Normalize', + params: { video: wire('source', 'video'), width: v(768), height: v(512), num_frames: v(121), fit: v('cover') }, + }; + f.graph.paths[0].unshift('source', 'normalize'); + f.graph.nodes.encode.params.video = wire('normalize', 'output'); + for (const name of ['encode', 'denoise']) { + f.graph.nodes[name].params.mode.value = 'video_to_video'; + for (const action of ['EncodeInputs', 'Denoise', 'DecodeLatents']) + f.graph.nodes[name].params.video_contract.value.actions[action] = ['video_to_video']; + } + f.graph.nodes.denoise.params.strength.value = 1; + const native = f.output.resolvedExecutionInputs; + native.graphTasks[0].task = 'video_to_video'; + for (const row of native.nodes) if (row.fields.executed_task) row.fields.executed_task.value = 'video_to_video'; + f.context.inputArtifacts = [ + { role: 'sourceVideo', path: f.form.sourceVideo, contentHash: 'sha256:bytes:' + '1'.repeat(64), byteSize: 100 }, + ]; + const paths = [ + 'modules/Video/main.py', + 'modules/VideoConditioning/main.py', + 'modules/DiffusersImage/stage_execution.py', + 'modules/DiffusersVideo/stage_execution.py', + ]; + const files = paths.map((path, i) => ({ path, sha256: String(i + 1).repeat(64) })); + f.context.backendSource = { fingerprint: 'sha256:backend-source-v1:' + '8'.repeat(64), files }; + const descriptors = Array.from({ length: 121 }, () => ['RGB', [768, 512], 'a'.repeat(64)]); + const digest = createHash('sha256') + .update('modiff-video-source-pixels-v1\0') + .update(JSON.stringify(descriptors)) + .digest('hex'); + f.context.videoNormalizationEvidence = { + schemaVersion: 1, + sourceContentHash: f.context.inputArtifacts[0].contentHash, + sourceByteSize: 100, + sourceFrames: 25, + sourceWidth: 1024, + sourceHeight: 576, + sourceFps: 7, + normalizedWidth: 768, + normalizedHeight: 512, + normalizedFrames: 121, + fit: 'cover', + descriptors, + normalizedPixelHash: digest, + backendSourceFingerprint: f.context.backendSource.fingerprint, + implementationFiles: structuredClone(files), + decoder: { imageioVersion: 'unit-test', imageioFfmpegVersion: 'unit-test', executableSHA256: 'b'.repeat(64) }, + }; + native.nodes.push( + { nodeId: 'source', module: 'modules.Video', action: 'Load', fields: {}, omittedFields: {} }, + { + nodeId: 'normalize', + module: 'modules.VideoConditioning', + action: 'Normalize', + fields: Object.fromEntries( + Object.entries({ width: 768, height: 512, num_frames: 121 }).map(([k, value]) => [ + k, + { source: 'literal', value }, + ]), + ), + omittedFields: {}, + }, + ); + const enc = native.nodes.find((n) => n.nodeId === 'encode').fields; + enc.video_source_sha256 = { source: 'connected', value: digest, sourceNodeId: 'normalize', sourcePortId: 'output' }; + enc.video_source_frames = { source: 'connected', value: 121, sourceNodeId: 'normalize', sourcePortId: 'output' }; + const den = native.nodes.find((n) => n.nodeId === 'denoise').fields; + den.conditioning_strength = { source: 'literal', value: 1 }; + den.denoise_strength = { source: 'literal', value: f.form.strength }; + f.graph.runtimeHints.workflowAutoPlan.graphHash = workerGraphHash(f.graph); + return f; +} + +test('video remaster binds the exact source body through replayed normalization to the original frozen pixels', () => { + const f = remasterFixture(), + before = structuredClone(f), + plan = observedWorkflowAutoVideoPlan(f.graph, f.context); + assert(plan); + assert.equal(plan.task, 'video_to_video'); + assert.equal(plan.resourceObservation.denoiseStrength, 0.8); + assert.equal(plan.resourceObservation.unusedDenoiserStrength, 1); + assert.equal(plan.resourceObservation.conditioningStrength, 1); + const provenance = { + graph: { canonicalGraph: canonicalizeApiGraph(f.graph) }, + template: { lockedSettings: f.form }, + runtime: { backendSource: f.context.backendSource }, + models: { items: f.models }, + inputs: { count: 1, items: f.context.inputArtifacts }, + output: { items: [{ width: 1536, height: 1024, frames: 121 }] }, + }; + assert(observedWorkflowAutoVideoProofMatches(plan, provenance)); + assert.equal(executionPlanIdentity(f.graph, f.context).plan.source, OBSERVED_WORKFLOW_AUTO_VIDEO_SOURCE); + assert.deepEqual(f, before); + for (const mutate of [ + (p) => (p.inputs.items[0].contentHash = 'sha256:bytes:' + 'f'.repeat(64)), + (p) => (p.runtime.backendSource.fingerprint = 'sha256:backend-source-v1:' + 'f'.repeat(64)), + (p) => (p.graph.canonicalGraph.nodes.find((n) => n.action === 'Normalize').params.fit.value = 'contain'), + ]) { + const changed = structuredClone(provenance); + mutate(changed); + assert.equal(observedWorkflowAutoVideoProofMatches(plan, changed), false); + } +}); +for (const [name, mutate] of [ + ['missing normalized-pixel evidence', (f) => delete f.context.videoNormalizationEvidence], + [ + 'different source body', + (f) => (f.context.videoNormalizationEvidence.sourceContentHash = 'sha256:bytes:' + 'f'.repeat(64)), + ], + [ + 'different original pixel sequence', + (f) => (f.context.videoNormalizationEvidence.descriptors[0][2] = 'f'.repeat(64)), + ], + [ + 'different source implementation', + (f) => (f.context.videoNormalizationEvidence.implementationFiles[0].sha256 = 'f'.repeat(64)), + ], + [ + 'different native normalized hash', + (f) => + (f.output.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'encode').fields.video_source_sha256.value = + 'f'.repeat(64)), + ], + [ + 'different connected normalized supplier', + (f) => + (f.output.resolvedExecutionInputs.nodes.find( + (n) => n.nodeId === 'encode', + ).fields.video_source_sha256.sourceNodeId = 'source'), + ], + [ + 'different consumed remaster strength', + (f) => + (f.output.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'denoise').fields.denoise_strength.value = 0.1), + ], + [ + 'different consumed conditioning strength', + (f) => + (f.output.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'denoise').fields.conditioning_strength.value = + 0.1), + ], + ['different crop policy', (f) => (f.graph.nodes.normalize.params.fit.value = 'contain')], +]) + test('video remaster refuses ' + name, () => { + const f = remasterFixture(); + mutate(f); + assert.equal(observedWorkflowAutoVideoPlan(f.graph, f.context), null); + }); + +for (const mode of ['image_to_video', 'reference_to_video']) { + test(`${mode} binds ordered original image bytes and consumed conditioning strength`, () => { + const f = conditionedFixture(mode); + const plan = observedWorkflowAutoVideoPlan(f.graph, f.context); + assert(plan); + assert.equal(plan.task, mode); + assert.equal(f.task.resourceCandidateId, null); + const p = { + graph: { canonicalGraph: canonicalizeApiGraph(f.graph) }, + template: { lockedSettings: f.form }, + models: { items: f.models }, + inputs: { count: f.context.inputArtifacts.length, items: f.context.inputArtifacts }, + output: { items: [{ width: 1536, height: 1024, frames: 121 }] }, + }; + assert(observedWorkflowAutoVideoProofMatches(plan, p)); + const locked = structuredClone(p); + delete locked.template.lockedSettings.referenceImages; + assert(observedWorkflowAutoVideoProofMatches(plan, locked)); + for (const mutate of [ + (x) => { + x.inputs.items[0].contentHash = 'sha256:bytes:' + 'f'.repeat(64); + }, + (x) => { + x.template.lockedSettings.strength = 0.1; + }, + (x) => { + x.graph.canonicalGraph.nodes.find((n) => n.action === 'EncodeInputs').params.reference_images.sourceKey = + 'mask'; + }, + ]) { + const changed = structuredClone(p); + mutate(changed); + assert.equal(observedWorkflowAutoVideoProofMatches(plan, changed), false); + } + for (const mutate of [ + (x) => { + x.context.inputArtifacts = []; + }, + (x) => { + x.output.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'source').fields.source_hashes.value[0] = + 'f'.repeat(64); + }, + (x) => { + x.output.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'denoise').fields.conditioning_strength.value = + 0.1; + }, + ]) { + const changed = structuredClone(f); + mutate(changed); + assert.equal(observedWorkflowAutoVideoPlan(changed.graph, changed.context), null); + } + }); +} + +test('native video refuses a missing or contradictory original witness', async (t) => { + for (const [name, mutate] of Object.entries({ + 'wrong session': (f) => { + f.task.sid = 'other'; + }, + 'undeclared loading argument': (f) => { + f.graph.nodes.loader.params.trust_remote_code = { value: true }; + }, + 'changed attention kwargs': (f) => { + f.graph.nodes.denoise.params.attention_kwargs_json.value = '{}'; + }, + 'invented 512-token dispatch': (f) => { + f.output.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'encode').fields.max_sequence_length.value = 512; + }, + 'invented blank consumed negative': (f) => { + f.output.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'encode').fields.negative_prompt.value = ''; + }, + 'reused owner': (f) => { + f.task.runtimePreparation.workflowAuto.reusedOwnerIds = ['loader']; + }, + 'uncaptured owner': (f) => { + f.output.resolvedExecutionInputs.nodes = f.output.resolvedExecutionInputs.nodes.filter( + (n) => n.nodeId !== 'loader', + ); + }, + 'missing consumed frame count': (f) => { + delete f.output.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'denoise').fields.num_frames; + }, + 'contradictory consumed fps': (f) => { + f.output.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'denoise').fields.frame_rate.value = 16; + }, + 'wrong backend-resolved offload': (f) => { + f.task.runtimePreparation.workflowAuto.resolvedFields.loader.offload_mode = 'none'; + }, + 'wrong delivered frame count': (f) => { + f.output.mediaItems[0].mediaMetadata.frame_count = 81; + }, + 'missing installed upscaler': (f) => { + f.models.pop(); + }, + })) + await t.test(name, () => { + const f = fixture(); + mutate(f); + // A recomputed browser-side hash cannot repair an unsupported graph or + // substitute for its original native consumed controls. + f.graph.runtimeHints.workflowAutoPlan.graphHash = workerGraphHash(f.graph); + assert.equal(observedWorkflowAutoVideoPlan(f.graph, f.context), null); + }); +}); + +test('video resource identity excludes prompt, seed and labels but retains delivered geometry', () => { + const original = fixture(); + const changed = fixture(); + changed.form.prompt = 'A different fictional rail journey.'; + changed.form.seed = 42; + changed.graph.nodes.encode.params.prompt.value = changed.form.prompt; + changed.graph.nodes.denoise.params.seed.value = 42; + changed.graph.nodes.denoise.label = 'Renamed sampling stage'; + changed.output.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'encode').fields.prompt.value = + changed.form.prompt; + changed.output.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'denoise').fields.seed.value = 42; + changed.graph.runtimeHints.workflowAutoPlan.graphHash = workerGraphHash(changed.graph); + const a = observedWorkflowAutoVideoPlan(original.graph, original.context); + const b = observedWorkflowAutoVideoPlan(changed.graph, changed.context); + assert(a && b); + assert.equal(observedWorkflowAutoVideoResourceId(a), observedWorkflowAutoVideoResourceId(b)); + changed.form.width = 1024; + changed.graph.nodes.denoise.params.width.value = 1024; + changed.output.resolvedExecutionInputs.nodes.find((n) => n.nodeId === 'denoise').fields.width.value = 1024; + changed.output.mediaItems[0].mediaMetadata.width = 2048; + changed.graph.runtimeHints.workflowAutoPlan.graphHash = workerGraphHash(changed.graph); + const geometry = observedWorkflowAutoVideoPlan(changed.graph, changed.context); + assert(geometry); + assert.notEqual(observedWorkflowAutoVideoResourceId(a), observedWorkflowAutoVideoResourceId(geometry)); +}); + +test('video resource IDs reject incomplete, oversized, cyclic and inconsistent projections', () => { + assert.equal(observedWorkflowAutoVideoResourceId({ source: OBSERVED_WORKFLOW_AUTO_VIDEO_SOURCE }), null); + const f = fixture(), + plan = observedWorkflowAutoVideoPlan(f.graph, f.context); + assert(plan); + for (const mutate of [ + (p) => { + p.self = p; + }, + (p) => { + p.resourceObservation.extra = 'x'.repeat(65537); + }, + (p) => { + p.resourceObservation.maxSequenceLength = 512; + }, + (p) => { + p.resourceObservation.delivery.width = 768; + }, + (p) => { + p.resourceObservation.upscaler.sha256 = '0'.repeat(64); + }, + (p) => { + p.resourceObservation.base.fps = '24'; + }, + (p) => { + delete p.requestedOffloadMode; + }, + ]) { + const changed = structuredClone(plan); + mutate(changed); + assert.equal(observedWorkflowAutoVideoResourceId(changed), null); + } +}); + +test('video proof rejects rehashed graph, model and geometry substitutions', async (t) => { + const f = fixture(), + plan = observedWorkflowAutoVideoPlan(f.graph, f.context); + assert(plan); + const p = { + graph: { canonicalGraph: canonicalizeApiGraph(f.graph) }, + template: { lockedSettings: f.form }, + models: { items: f.models }, + inputs: { count: 0 }, + output: { items: [{ width: 1536, height: 1024, frames: 121 }] }, + }; + assert(observedWorkflowAutoVideoProofMatches(plan, p)); + for (const [name, mutate] of Object.entries({ + 'changed tile policy': (v) => { + v.graph.canonicalGraph.nodes.find((n) => n.action === 'Upscaler').params.tile_size.value = 512; + }, + 'changed latent binding': (v) => { + v.graph.canonicalGraph.nodes.find((n) => n.action === 'DecodeLatents').params.latent_binding.sourceKey = + 'latents_out'; + }, + 'changed immutable model': (v) => { + v.models.items[0].selectedRevision = 'a'.repeat(40); + }, + 'false full delivery': (v) => { + v.output.items[0].frames = 81; + }, + })) + await t.test(name, () => { + const changed = structuredClone(p); + mutate(changed); + assert.equal(observedWorkflowAutoVideoProofMatches(plan, changed), false); + }); +}); diff --git a/scripts/workflow-auto-weight-loading.test.mjs b/scripts/workflow-auto-weight-loading.test.mjs new file mode 100644 index 00000000..2bbcd3d6 --- /dev/null +++ b/scripts/workflow-auto-weight-loading.test.mjs @@ -0,0 +1,659 @@ +import assert from 'node:assert/strict'; +import { execFileSync } from 'node:child_process'; +import path from 'node:path'; +import { after, before, beforeEach, test } from 'node:test'; +import { createServer } from 'vite'; + +const selection = { + pipelineClass: 'ZImageModularPipeline', + task: 'text_to_image', + executionProfileId: 'z-image:modular', + authoringRecipeId: 'retained-z-image-text-to-image:v1', + bindingSpec: { modelType: 'ZImageModularPipeline', mode: 'modular_text_to_image' }, +}; +const publicSelections = ['Flux3DistilledModularPipeline', 'Flux3ModularPipeline'].flatMap((pipelineClass) => + ['text_to_image', 'edit_image'].map((task) => ({ + id: `${pipelineClass}:${task}`, + selection: { + pipelineClass, + task, + executionProfileId: `${pipelineClass === 'Flux3DistilledModularPipeline' ? 'flux3-klein' : 'flux3-klein-base'}:official-provider:v1`, + }, + })), +); +let server, fixture, row, starter, template, form, modules, originalFetch; + +before(async () => { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, String(value)), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { + localStorage: globalThis.localStorage, + location: { origin: 'http://127.0.0.1:5191' }, + dispatchEvent: () => true, + }; + server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, hmr: false, watch: null }, + appType: 'custom', + }); + const paths = { + operations: '/src/workflow/operationContracts.ts', + requests: '/src/workflow/operationStarterRequest.ts', + factory: '/src/workflow/nodeFactory.ts', + authoring: '/src/studio/templateOperationWorkflow.ts', + drafts: '/src/workflow/workflowDraft.ts', + choices: '/src/workflow/workflowChoices.ts', + catalog: '/src/workflow/operationCatalog.ts', + groups: '/src/workflow/visualOperationGroups.ts', + templates: '/src/studio/templates.ts', + profiles: '/src/studio/modelProfiles.ts', + exactness: '/src/studio/templateExactness.ts', + flow: '/src/stores/useFlowStore.ts', + studio: '/src/stores/useStudioStore.ts', + tasks: '/src/stores/useTaskStore.ts', + coordinator: '/src/studio/runCoordinator.ts', + auto: '/src/studio/workflowAutoExecutionV2.ts', + schema: '/src/studio/blockSchemaV2.ts', + block: '/src/studio/blockRuntimeV2.ts', + }; + modules = Object.fromEntries( + await Promise.all(Object.entries(paths).map(async ([name, file]) => [name, await server.ssrLoadModule(file)])), + ); + const backend = path.resolve('../MoDiff'); + const python = process.env.MODIFF_BACKEND_PYTHON || path.join(backend, '.venv', 'Scripts/python.exe'); + fixture = JSON.parse( + execFileSync(python, [path.resolve('scripts/template-operation-fixtures.py')], { + cwd: backend, + encoding: 'utf8', + maxBuffer: 64 * 1024 * 1024, + input: JSON.stringify([{ id: 'z_image_quick_concept', selection }, ...publicSelections]), + }), + ); + row = fixture.recipes[0]; + const contracts = modules.operations.parseOperationContracts( + fixture.publicPayload.operationContracts, + fixture.publicPayload.operationContractSchemaVersion, + ); + starter = modules.requests.parseOperationStarter( + row.starter, + selection.pipelineClass, + selection.task, + contracts, + selection, + ); + template = structuredClone(modules.templates.STUDIO_TEMPLATES.find((item) => item.id === row.id)); + const device = row.starter.nodes.find((node) => node.operation.decomposition === 'loader').node.params.device; + form = { + ...modules.profiles.DEFAULT_STUDIO_FORM, + ...modules.exactness.getTemplateLockedSettings(template), + modelType: selection.bindingSpec.modelType, + mode: selection.bindingSpec.mode, + device: device.value ?? device.default, + autoOffload: false, + offloadMode: 'none', + resourceMode: 'auto', + }; + originalFetch = globalThis.fetch; +}); + +beforeEach(() => { + modules.studio.useStudioStore.setState({ + form, + activeWorkflowTabId: 'weight-loading-workflow', + workflowTabs: [], + workflowCanvasHydrated: true, + workflowCanvasEpoch: 0, + workflowFormEpoch: 0, + graphBinding: null, + currentRunContext: null, + runContextsByClientRunId: {}, + runContextsByTaskId: {}, + outputs: [], + }); + modules.tasks.useTaskStore.setState({ + queuedTasks: {}, + currentTask: undefined, + failedTasks: {}, + sessionRuns: [], + taskCount: 0, + }); +}); + +after(async () => { + globalThis.fetch = originalFetch; + await server?.close(); +}); + +function freshGraph() { + return modules.authoring.createTemplateOperationGraph( + template, + form, + starter, + fixture.registry, + row.spec, + row.capability, + ); +} +const flow = () => modules.flow.useFlowStore.getState(); +const exported = () => flow().exportGraph('', undefined, { randomizeSeeds: false }); +const loaderId = (graph) => Object.keys(graph.nodes).find((id) => graph.nodes[id].action === 'ModelsLoader'); +const response = (body) => + new Response(JSON.stringify(body), { status: 200, headers: { 'Content-Type': 'application/json' } }); +const plan = (patches) => ({ + schemaVersion: 1, + graphHash: `sha256:workflow-auto-v1:${'a'.repeat(64)}`, + plannedGraphHash: `sha256:workflow-auto-v1:${'b'.repeat(64)}`, + canAutoRun: true, + issues: [], + message: 'Transport fixture, not a hardware admission', + patches, + loaders: [], + requirements: {}, + available: {}, + sharedMemory: false, +}); + +function freshPublicGraph(id) { + const selected = publicSelections.find((item) => item.id === id).selection; + const source = fixture.recipes.find((item) => item.id === id).starter; + const contracts = modules.operations.parseOperationContracts( + fixture.publicPayload.operationContracts, + fixture.publicPayload.operationContractSchemaVersion, + ); + const resolved = modules.requests.parseOperationStarter( + structuredClone(source), + selected.pipelineClass, + selected.task, + contracts, + selected, + ); + const draft = modules.drafts.createWorkflowDraft(resolved, fixture.registry); + assert.deepEqual(draft.notices, []); + return draft.graph; +} + +function explicitPublicTextEncoderNf4Graph(id, referenceCount = 1) { + const graph = modules.groups.unpackVisualOperationGroups(freshPublicGraph(id)).graph; + const owner = graph.nodes.find((node) => node.data.action === 'ModelsLoader'); + const encoder = graph.nodes.find((node) => node.data.action === 'EncodePrompt'); + const denoise = graph.nodes.find((node) => node.data.action === 'Denoise'); + const quantization = modules.factory.createNodeFromRegistry( + 'modules.ModularDiffusers.QuantizationConfigNode', + fixture.registry, + { x: -600, y: -300 }, + ); + assert.ok(quantization, 'Use the real generic backend node schema.'); + const values = { + model_id: structuredClone(owner.data.params.repo_id.value), + subfolder: 'text_encoder', + component: 'text_encoder', + quant_type: 'bnb_4bit', + bnb_4bit_quant_type: 'nf4', + bnb_4bit_compute_dtype: 'bfloat16', + bnb_4bit_use_double_quant: true, + llm_int8_skip_modules: [], + llm_int8_has_fp16_weight: false, + llm_int8_threshold: 6, + skip_module_names: 'model.visual,lm_head', + }; + for (const [field, value] of Object.entries(values)) { + assert.ok(quantization.data.params[field], `The backend must publish ${field}.`); + quantization.data.params[field].value = value; + } + owner.data.params.weight_format.value = 'nvfp4'; + owner.data.params.device.value = 'cuda:0'; + owner.data.params.weight_loading_mode.value = 'cpu'; + owner.data.params.offload_mode.value = 'model_cpu'; + owner.data.params.auto_offload.value = true; + encoder.data.params.prompt.value = `Authored explicit text-encoder NF4 ${id}`; + denoise.data.params.seed.value = { value: 4109, random: false }; + const image = graph.nodes.find((node) => node.data.module === 'modules.Image' && node.data.action === 'Load'); + if (image) + image.data.params.file.value = ['unit-managed-inputs/cobalt.png', 'unit-managed-inputs/layout.png'].slice( + 0, + referenceCount, + ); + graph.nodes.push(quantization); + graph.edges.push({ + id: `edge-${quantization.id}-quantization_config-${owner.id}-quant_config`, + source: quantization.id, + sourceHandle: 'quantization_config', + target: owner.id, + targetHandle: 'quant_config', + type: 'default', + }); + return { graph, owner, quantization, values }; +} + +test('current public profiles seed bounded defaults through ordinary backend starters without changing authored graphs', () => { + const contracts = modules.operations.parseOperationContracts( + fixture.publicPayload.operationContracts, + fixture.publicPayload.operationContractSchemaVersion, + ); + const support = modules.catalog.parsePipelineSupport( + fixture.publicPayload.pipelineSupport, + fixture.publicPayload.pipelineSupportSchemaVersion, + contracts, + ); + const descriptors = modules.choices.parseWorkflowModelDescriptors(fixture.publicPayload, support); + for (const { id, selection: selected } of publicSelections) { + const before = flow().toObject(); + const graph = freshPublicGraph(id); + assert.deepEqual(flow().toObject(), before, 'creating a new draft cannot rewrite the current document'); + const descriptor = descriptors.find((item) => item.profileId === selected.executionProfileId); + assert.equal(descriptor.inventory.defaultWeightFormat, 'fp8r'); + const effective = modules.flow.expandFlowExecutionGraph(graph.nodes, graph.edges); + const owner = effective.nodes.find((node) => node.data.action === 'ModelsLoader'); + const denoise = effective.nodes.find((node) => node.data.action === 'Denoise'); + const value = (node, field) => node.data.params[field].value ?? node.data.params[field].default; + assert.equal(value(owner, 'model_type'), selected.pipelineClass); + assert.equal(value(owner, 'weight_format'), 'fp8r'); + assert.equal(value(owner, 'dtype'), 'bfloat16'); + assert.equal( + effective.nodes.some((node) => node.data.action === 'QuantizationConfigNode'), + false, + ); + assert.deepEqual([value(denoise, 'width'), value(denoise, 'height')], [512, 512]); + assert.equal(value(denoise, 'num_inference_steps'), id.includes('Distilled') ? 16 : 50); + if (selected.pipelineClass === 'Flux3ModularPipeline') { + const guider = effective.nodes.find((node) => node.data.action === 'Guider'); + assert.equal(value(guider, 'guidance_scale'), 3.5); + assert.equal(value(guider, 'guidance_rescale'), 0); + } + assert.equal( + effective.nodes.some((node) => node.data.action === 'ImageEncode'), + selected.task === 'edit_image', + ); + } +}); + +test('explicit public text-encoder NF4 remains an authored derivative through accepted and refused Auto transport', async () => { + const registryBefore = structuredClone(fixture.registry); + for (const { id } of publicSelections) { + for (const accepted of [true, false]) { + const { graph, owner, quantization, values } = explicitPublicTextEncoderNf4Graph(id, 2); + flow().replaceGraph(graph); + const before = exported(); + const snapshot = structuredClone(flow().toObject()); + const submissions = [], + requests = []; + globalThis.fetch = async (url, init) => { + const body = JSON.parse(init.body); + requests.push(String(url)); + if (String(url).endsWith('/auto_resource/workflow')) { + assert.deepEqual(body.graph.nodes, JSON.parse(JSON.stringify(before.nodes))); + return response({ + ...plan([]), + canAutoRun: accepted, + issues: accepted ? [] : ['The exact NVFP4/text-encoder NF4 cold recipe exceeds available memory'], + }); + } + assert.ok(accepted, 'A refused plan cannot reach Graph.'); + assert.ok(String(url).endsWith('/graph')); + submissions.push(body); + return response({ task_id: `mock-nf4-${id}`, sid: 'session-1', message: 'queued' }); + }; + modules.studio.useStudioStore.setState({ form: { ...form, resourceMode: 'auto' } }); + if (accepted) { + const result = await modules.coordinator.coordinateGraphRun({ sid: 'session-1' }); + assert.equal(submissions.length, 1); + assert.deepEqual(result.submittedGraph.nodes, before.nodes); + assert.deepEqual(result.submittedGraph.paths, before.paths); + assert.equal(result.submittedGraph.runtimeHints.workflowAutoPlan.graphHash, plan([]).plannedGraphHash); + } else { + await assert.rejects(modules.coordinator.coordinateGraphRun({ sid: 'session-1' }), /NVFP4\/text-encoder NF4/); + assert.equal(submissions.length, 0); + } + assert.equal(requests.length, accepted ? 2 : 1); + assert.deepEqual(exported(), before); + assert.deepEqual(flow().toObject(), snapshot); + assert.deepEqual(before.nodes[owner.id].params.quant_config, { + value: undefined, + display: 'input', + sourceId: quantization.id, + sourceKey: 'quantization_config', + }); + for (const [field, value] of Object.entries(values)) + assert.deepEqual(before.nodes[quantization.id].params[field].value, value, `${id}:${field}`); + assert.equal(before.nodes[owner.id].params.weight_format.value, 'nvfp4'); + flow().replaceGraph(JSON.parse(JSON.stringify(snapshot))); + assert.deepEqual(exported(), before, 'Save-shaped round trips retain the exact producer and connection.'); + } + } + assert.deepEqual(fixture.registry, registryBefore, 'Explicit instance edits cannot change registry defaults.'); +}); + +test('a pending explicit text-encoder NF4 Auto plan cannot submit after a producer control changes', async () => { + const { graph, quantization } = explicitPublicTextEncoderNf4Graph(publicSelections[0].id); + flow().replaceGraph(graph); + let started, release; + const ready = new Promise((resolve) => { + started = resolve; + }); + const pending = new Promise((resolve) => { + release = resolve; + }); + const requests = []; + globalThis.fetch = async (url) => { + requests.push(String(url)); + assert.ok(String(url).endsWith('/auto_resource/workflow')); + started(); + return pending; + }; + const run = modules.coordinator.coordinateGraphRun({ sid: 'session-1' }); + await ready; + flow().setParamWithHistory(quantization.id, 'skip_module_names', 'model.visual'); + const changed = structuredClone(flow().toObject()); + release(response(plan([]))); + await assert.rejects(run, /workflow or mode changed/); + assert.equal(requests.length, 1); + assert.deepEqual(flow().toObject(), changed); + assert.equal(modules.studio.useStudioStore.getState().currentRunContext, null); +}); + +test('real public ordinary graphs retain authored values through one accepted Auto submission and Expert bypass', async () => { + for (const { id } of publicSelections) { + const graph = modules.groups.unpackVisualOperationGroups(freshPublicGraph(id)).graph; + const owner = graph.nodes.find((node) => node.data.action === 'ModelsLoader'); + const encoder = graph.nodes.find((node) => node.data.action === 'EncodePrompt'); + const denoise = graph.nodes.find((node) => node.data.action === 'Denoise'); + // This is mocked transport, not a CUDA/runtime claim. The pure fixture + // intentionally reports CPU only, which cannot export CPU-offload hooks. + owner.data.params.device.value = 'cuda'; + encoder.data.params.prompt.value = `Authored ${id} prompt`; + denoise.data.params.seed.value = { value: 4109, random: false }; + const image = graph.nodes.find((node) => node.data.module === 'modules.Image' && node.data.action === 'Load'); + if (image) image.data.params.file.value = ['unit-managed-inputs/cobalt.png', 'unit-managed-inputs/layout.png']; + flow().replaceGraph(graph); + const before = exported(); + const submissions = [], + requests = []; + globalThis.fetch = async (url, init) => { + requests.push(String(url)); + const body = JSON.parse(init.body); + if (String(url).endsWith('/auto_resource/workflow')) { + assert.deepEqual(body.graph.nodes, JSON.parse(JSON.stringify(before.nodes))); + return response({ + ...plan([]), + loaders: [ + { + nodeId: owner.id, + modelType: owner.data.params.model_type.value, + repository: owner.data.params.repo_id.value.value, + consumers: [denoise.id], + candidateId: 'mock-public-fp8r-transport', + }, + ], + requirements: { ramGb: 24, vramGb: 8, diskGb: 0 }, + available: { ramGb: 28, vramGb: 12, diskGb: 64 }, + }); + } + assert.ok(String(url).endsWith('/graph')); + submissions.push(body); + return response({ task_id: `mock-transport-${id}`, sid: 'session-1', message: 'queued' }); + }; + modules.studio.useStudioStore.setState({ form: { ...form, resourceMode: 'auto' } }); + const result = await modules.coordinator.coordinateGraphRun({ sid: 'session-1' }); + assert.equal(requests.length, 2); + assert.equal(submissions.length, 1); + assert.deepEqual(result.submittedGraph.nodes, before.nodes); + assert.deepEqual(result.submittedGraph.paths, before.paths); + assert.equal(result.submittedGraph.runtimeHints.resourceMode, 'auto'); + assert.equal(result.submittedGraph.runtimeHints.workflowAutoPlan.graphHash, plan([]).plannedGraphHash); + assert.deepEqual(exported(), before); + modules.studio.useStudioStore.setState({ form: { ...form, resourceMode: 'expert' } }); + await modules.coordinator.coordinateGraphRun({ sid: 'session-1' }); + assert.equal(requests.length, 3, 'Expert adds one submission and never requests an Auto plan'); + assert.equal(submissions.length, 2); + assert.deepEqual(submissions[1].nodes, JSON.parse(JSON.stringify(before.nodes))); + } +}); + +test('public Auto refusal retains exact authored graph and creates no task or submission', async () => { + for (const { id } of publicSelections) { + const graph = modules.groups.unpackVisualOperationGroups(freshPublicGraph(id)).graph; + const owner = graph.nodes.find((node) => node.data.action === 'ModelsLoader'); + owner.data.params.device.value = 'cuda'; + flow().replaceGraph(graph); + const before = exported(); + const requests = []; + globalThis.fetch = async (url) => { + requests.push(String(url)); + assert.ok(String(url).endsWith('/auto_resource/workflow')); + return response({ + ...plan([]), + canAutoRun: false, + issues: ['No exact qualified FP8r recipe fits this preserved reference workload'], + available: { ramGb: 28, vramGb: 0, diskGb: 64 }, + }); + }; + await assert.rejects( + modules.coordinator.coordinateGraphRun({ sid: 'session-1' }), + /No exact qualified FP8r recipe/, + ); + assert.equal(requests.length, 1); + assert.deepEqual(exported(), before); + assert.equal(modules.studio.useStudioStore.getState().currentRunContext, null); + assert.deepEqual(modules.tasks.useTaskStore.getState().queuedTasks, {}); + } +}); + +for (const change of ['graph', 'tab', 'policy', 'cancelled-request']) + test(`a pending public Auto plan cannot submit after ${change}`, async () => { + const graph = modules.groups.unpackVisualOperationGroups(freshPublicGraph(publicSelections[0].id)).graph; + const owner = graph.nodes.find((node) => node.data.action === 'ModelsLoader'); + const encoder = graph.nodes.find((node) => node.data.action === 'EncodePrompt'); + owner.data.params.device.value = 'cuda'; + flow().replaceGraph(graph); + let release, reject, started; + const pending = new Promise((resolve, fail) => { + release = resolve; + reject = fail; + }); + const ready = new Promise((resolve) => { + started = resolve; + }); + let requests = 0; + globalThis.fetch = async (url) => { + requests++; + assert.ok(String(url).endsWith('/auto_resource/workflow')); + started(); + return pending; + }; + const run = modules.coordinator.coordinateGraphRun({ sid: 'session-1' }); + await ready; + if (change === 'graph') flow().setParamWithHistory(encoder.id, 'prompt', 'A newer authored prompt'); + if (change === 'tab') modules.studio.useStudioStore.setState({ activeWorkflowTabId: 'newer-workflow' }); + if (change === 'policy') modules.studio.useStudioStore.setState({ form: { ...form, resourceMode: 'expert' } }); + const current = flow().toObject(); + if (change === 'cancelled-request') reject(new DOMException('Planning cancelled', 'AbortError')); + else release(response(plan([]))); + await assert.rejects(run, change === 'cancelled-request' ? /abort|cancel/iu : /workflow or mode changed/); + assert.equal(requests, 1); + assert.deepEqual(flow().toObject(), current); + assert.equal(modules.studio.useStudioStore.getState().currentRunContext, null); + assert.deepEqual(modules.tasks.useTaskStore.getState().queuedTasks, {}); + }); + +test('actual backend weight-loading descriptor survives factory, fresh Model Setup and API serialization', () => { + const key = 'modules.ModularDiffusers.ModelsLoader'; + const descriptor = fixture.registry[key].params.weight_loading_mode; + assert.ok(descriptor, 'The backend must publish the descriptor; no synthetic substitute is accepted.'); + assert.equal(descriptor.type, 'string'); + assert.equal(descriptor.value ?? descriptor.default, 'cpu'); + assert.deepEqual( + Array.isArray(descriptor.options) + ? descriptor.options.map((option) => (typeof option === 'string' ? option : option.value)) + : Object.keys(descriptor.options), + ['cpu', 'cuda', 'ssd_stream'], + ); + assert.equal(descriptor.fieldOptions.controlTier, 'advanced'); + const node = modules.factory.createNodeFromRegistry(key, fixture.registry, { x: 0, y: 0 }); + assert.deepEqual(node.data.params.weight_loading_mode, descriptor); + node.data.params.weight_loading_mode.value = 'ssd_stream'; + assert.equal(descriptor.value ?? descriptor.default, 'cpu'); + const graph = freshGraph(); + assert.equal(graph.nodes.filter((node) => !node.data.blockProjectionOwnerId).length, 4); + flow().replaceGraph(graph); + const api = exported(); + const id = loaderId(api); + assert.equal(api.nodes[id].params.weight_loading_mode.value, 'cpu'); + assert.equal(JSON.parse(JSON.stringify(api)).nodes[id].params.weight_loading_mode.value, 'cpu'); + const owner = modules.groups + .unpackVisualOperationGroups(graph) + .graph.nodes.find((node) => node.data.action === 'ModelsLoader'); + const declared = row.starter.nodes.find((node) => node.operation.decomposition === 'loader').node.params + .weight_loading_mode; + // Ordinary Block projection applies its instance value and prevents the + // mounted field from overwriting the already-resolved starter contract. + assert.deepEqual(owner.data.params.weight_loading_mode, { + ...declared, + value: 'cpu', + fieldOptions: { ...declared.fieldOptions, suppressInitialFieldAction: true }, + }); +}); + +test('fresh image coordinator serializes the enum patch and preserves model and creative fields with one Undo', async () => { + flow().replaceGraph(freshGraph()); + const before = exported(), + id = loaderId(before), + requests = []; + const originalDefinition = structuredClone( + flow().nodes.find((node) => + node.data.blockInstanceV2?.effectiveGraph.nodes.some((child) => child.data.action === 'ModelsLoader'), + ).data.blockInstanceV2.definitionSnapshot, + ); + globalThis.fetch = async (url, init) => { + const body = JSON.parse(init.body); + requests.push({ url: String(url), body }); + if (String(url).endsWith('/auto_resource/workflow')) + return response(plan([{ nodeId: id, field: 'weight_loading_mode', value: 'ssd_stream' }])); + assert.ok(String(url).endsWith('/graph')); + return response({ task_id: 'metadata-transport-only', sid: 'session-1', message: 'queued' }); + }; + const result = await modules.coordinator.coordinateGraphRun({ + sid: 'session-1', + preparedGraph: before, + studioContext: { applyRuntimeMetadata: false, clearChangedPreviews: false }, + }); + assert.equal(requests.length, 2); + assert.equal(requests[0].body.graph.nodes[id].params.weight_loading_mode.value, 'cpu'); + assert.equal(requests[1].body.nodes[id].params.weight_loading_mode.value, 'ssd_stream'); + const expected = structuredClone(before.nodes); + expected[id].params.weight_loading_mode.value = 'ssd_stream'; + assert.deepEqual(result.submittedGraph.nodes, expected); + assert.deepEqual(exported().nodes, expected); + assert.equal(result.submittedGraph.runtimeHints.workflowAutoPlan.graphHash, plan([]).plannedGraphHash); + assert.deepEqual( + flow().nodes.find((node) => + node.data.blockInstanceV2?.effectiveGraph.nodes.some((child) => child.data.action === 'ModelsLoader'), + ).data.blockInstanceV2.definitionSnapshot, + originalDefinition, + ); + flow().undo(); + assert.deepEqual(exported(), before); + flow().redo(); + assert.deepEqual(exported().nodes, expected); +}); + +test('actual loader descriptor supports atomic mirrored controls and runtime previous-value agreement', async () => { + const realLoader = modules.groups + .unpackVisualOperationGroups(freshGraph()) + .graph.nodes.find((node) => node.data.action === 'ModelsLoader'); + const nodes = ['loader', 'peer'].map((nodeId) => ({ + nodeId, + nodeType: 'custom', + data: structuredClone(realLoader.data), + })); + const graph = { nodes, edges: [], executionOrder: ['loader', 'peer'] }; + graph.graphHash = modules.schema.blockGraphHashV2(graph); + const definition = { + schemaVersion: 2, + definitionId: 'user:weight-loading', + displayName: 'Weight loading', + source: { kind: 'user' }, + graph, + boundary: { mode: 'explicit', inputs: [], outputs: [] }, + controls: [ + { + controlId: 'weight-loading', + label: 'Weight loading', + valueType: 'string', + defaultValue: 'cpu', + required: false, + order: 0, + binding: { nodeId: 'loader', fieldId: 'weight_loading_mode' }, + mirrorBindings: [{ nodeId: 'peer', fieldId: 'weight_loading_mode' }], + }, + ], + previews: [], + ownership: { kind: 'user', definitionMutable: true }, + }; + definition.contentHash = modules.schema.blockDefinitionContentHashV2(definition); + const root = modules.block.createBlockRootNodeV2( + modules.schema.createBlockInstanceV2(definition, { + instanceId: 'mirrored-weight-loading', + position: { x: 0, y: 0 }, + size: { width: 400, height: 320 }, + values: { 'weight-loading': 'cpu' }, + }), + ); + flow().replaceGraph({ nodes: [root], edges: [] }); + const before = exported(); + const patches = ['loader', 'peer'].map((nodeId) => ({ + nodeId: modules.block.blockProjectionNodeIdV2(root.id, nodeId), + field: 'weight_loading_mode', + value: 'cuda', + })); + globalThis.fetch = async () => response(plan(patches)); + const submitted = await modules.auto.prepareWorkflowAutoExecutionV2(before); + assert.deepEqual(submitted.runtimeHints.workflowAutoPlan.resourceControlGroups, [ + patches.map(({ nodeId, field }) => ({ nodeId, field })), + ]); + assert.deepEqual(exported().nodes, submitted.nodes); + assert.throws( + () => + modules.auto.applyRuntimeWorkflowAutoSettingsV2( + patches.map((patch, index) => ({ ...patch, value: index ? 'cpu' : 'cuda', previousValue: 'cuda' })), + ), + /shared resource control/, + ); + assert.deepEqual(exported().nodes, submitted.nodes); + flow().undo(); + assert.deepEqual(exported(), before); +}); + +test('legacy missing and connected actual loader settings are preserved before any mock Graph submission', async () => { + for (const connected of [false, true]) { + const graph = modules.groups.unpackVisualOperationGroups(freshGraph()).graph; + const owner = graph.nodes.find((node) => node.data.action === 'ModelsLoader'); + if (!connected) delete owner.data.params.weight_loading_mode; + flow().replaceGraph(graph); + const before = exported(), + id = loaderId(before), + requests = []; + if (connected) before.nodes[id].params.weight_loading_mode = { sourceId: 'external-author', sourceKey: 'mode' }; + const snapshot = structuredClone(flow().toObject()); + globalThis.fetch = async (url) => { + requests.push(String(url)); + assert.ok(String(url).endsWith('/auto_resource/workflow')); + return response(plan([{ nodeId: id, field: 'weight_loading_mode', value: 'cuda' }])); + }; + await assert.rejects( + modules.coordinator.coordinateGraphRun({ + sid: 'session-1', + preparedGraph: before, + studioContext: { applyRuntimeMetadata: false, clearChangedPreviews: false }, + }), + /missing, connected or repeated/, + ); + assert.equal(requests.length, 1); + assert.deepEqual(flow().toObject(), snapshot); + } +}); diff --git a/scripts/workflow-backend-sync.test.mjs b/scripts/workflow-backend-sync.test.mjs index 62e399d0..7cb46398 100644 --- a/scripts/workflow-backend-sync.test.mjs +++ b/scripts/workflow-backend-sync.test.mjs @@ -5,6 +5,8 @@ import { fileURLToPath } from 'node:url'; import { createServer } from 'vite'; const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); +const HOOK_EFFECTS = '\0workflow-sync-hook-effects'; +const HOOK_STORE = '\0workflow-sync-hook-store'; const storage = () => { const values = new Map(); return { @@ -17,6 +19,8 @@ const storage = () => { let server; let studio; let sync; +let flow; +let nodes; before(async () => { globalThis.location = { origin: 'http://127.0.0.1:5191' }; @@ -24,6 +28,8 @@ before(async () => { localStorage: storage(), sessionStorage: storage(), location: globalThis.location, + addEventListener() {}, + removeEventListener() {}, }; globalThis.localStorage = globalThis.window.localStorage; globalThis.sessionStorage = globalThis.window.sessionStorage; @@ -34,9 +40,39 @@ before(async () => { optimizeDeps: { entries: [], noDiscovery: true }, server: { middlewareMode: true, watch: null }, appType: 'custom', + plugins: [ + { + name: 'workflow-sync-controlled-hook-effects', + enforce: 'pre', + transform(code, id) { + if (id.replaceAll('\\', '/').endsWith('/src/studio/useWorkflowBackendSync.ts')) + return code.replace("from 'react'", "from 'workflow-sync-controlled-react'"); + }, + resolveId(id, importer) { + if (!importer?.replaceAll('\\', '/').endsWith('/src/studio/useWorkflowBackendSync.ts')) return; + if (id === 'workflow-sync-controlled-react') return HOOK_EFFECTS; + if (id === '../stores/useStudioStore') return HOOK_STORE; + }, + load(id) { + if (id === HOOK_EFFECTS) + return `export const useEffect = effect => globalThis.workflowSyncHook.effects.push(effect); + export const useMemo = read => read(); + export const useState = initial => [initial === false ? globalThis.workflowSyncHook.hydrated : initial, + value => { if (initial === false) { globalThis.workflowSyncHook.hydrated = value; + if (value) globalThis.workflowSyncHook.finish(); } }];`; + if (id === HOOK_STORE) + return `import {useStudioStore as actual} from '/src/stores/useStudioStore.ts'; + export const useStudioStore = selector => selector(actual.getState()); + useStudioStore.getState = actual.getState; + useStudioStore.setState = actual.setState;`; + }, + }, + ], }); studio = await server.ssrLoadModule('/src/stores/useStudioStore.ts'); sync = await server.ssrLoadModule('/src/studio/useWorkflowBackendSync.ts'); + flow = await server.ssrLoadModule('/src/stores/useFlowStore.ts'); + nodes = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); }); beforeEach(() => { @@ -141,6 +177,70 @@ test('explicit saves share one in-flight chain per workflow', async () => { } }); +for (const { editedWhileSaving, rejectedSave } of [ + { editedWhileSaving: false, rejectedSave: false }, + { editedWhileSaving: true, rejectedSave: false }, + { editedWhileSaving: false, rejectedSave: true }, +]) { + const outcome = rejectedSave + ? 'retries a rejected save' + : editedWhileSaving + ? 'retains a newer edit' + : 'skips a duplicate'; + test(`queued autosave ${outcome} after waiting for an explicit save`, async () => { + const originalFetch = globalThis.fetch; + const calls = []; + const errors = []; + globalThis.fetch = (_url, options) => + new Promise((resolve, reject) => { + const body = JSON.parse(options.body); + calls.push({ + body, + fail: () => reject(new Error('Explicit Save failed')), + finish: () => + resolve( + new Response(JSON.stringify({ ...body, id: 'workflow-sync-test', revision: calls.length + 7 }), { + headers: { 'Content-Type': 'application/json' }, + }), + ), + }); + }); + const saved = { ...workflowTab({ dirty: true, prompt: 'Explicit document' }), intent: 'saved' }; + studio.useStudioStore.setState({ workflowTabs: [saved], activeWorkflowTabId: null }); + const explicit = sync.saveWorkflowNow(saved, { merge: false }); + const rejected = rejectedSave ? assert.rejects(explicit, /Explicit Save failed/u) : null; + await new Promise((resolve) => setImmediate(resolve)); + const latest = editedWhileSaving + ? { ...saved, snapshot: { ...saved.snapshot, studioForm: { prompt: 'Newer local edit' } } } + : saved; + studio.useStudioStore.setState({ workflowTabs: [latest] }); + sync.queueWorkflowPut(latest, (error) => errors.push(error)); + try { + assert.equal(calls.length, 1); + if (rejectedSave) calls[0].fail(); + else calls[0].finish(); + await (rejected ?? explicit); + await new Promise((resolve) => setImmediate(resolve)); + assert.equal(calls.length, editedWhileSaving || rejectedSave ? 2 : 1); + if (editedWhileSaving || rejectedSave) { + assert.equal( + calls[1].body.snapshot.studioForm.prompt, + editedWhileSaving ? 'Newer local edit' : 'Explicit document', + ); + assert.equal(studio.useStudioStore.getState().workflowTabs[0].dirty, true); + } else { + assert.equal(studio.useStudioStore.getState().workflowTabs[0].dirty, false); + } + assert.deepEqual(errors, []); + } finally { + calls.forEach((call) => call.finish()); + await (rejected ?? explicit); + await new Promise((resolve) => setImmediate(resolve)); + globalThis.fetch = originalFetch; + } + }); +} + test('a delayed own-save acknowledgement never replaces a newer clean document', () => { const newer = workflowTab({ dirty: false, prompt: 'Restored by Redo' }); studio.useStudioStore.setState({ workflowTabs: [newer], activeWorkflowTabId: null }); @@ -252,3 +352,600 @@ test('legacy documents stay saved and new explicit saves promote a draft', async globalThis.fetch = originalFetch; } }); + +function startupHydrationFixture({ dirty = false } = {}) { + const tab = workflowTab({ dirty, prompt: 'Original form' }); + tab.snapshot.nodes = [ + { + id: 'hydration-text', + type: 'custom', + position: { x: 10, y: 20 }, + data: { + type: 'custom', + module: 'modules.Primitive', + action: 'TextValue', + label: 'Text', + category: 'Value', + params: { text: { type: 'string', value: 'Old text' }, output: { type: 'string', display: 'output' } }, + }, + }, + { + id: 'hydration-preview', + type: 'custom', + position: { x: 300, y: 20 }, + data: { + type: 'custom', + module: 'modules.Image', + action: 'Preview', + label: 'Preview', + category: 'Image', + params: { image: { type: 'image', display: 'input' } }, + }, + }, + ]; + const registry = { + 'modules.Image.Preview': { + ...tab.snapshot.nodes[1].data, + params: { + ...tab.snapshot.nodes[1].data.params, + selected_image: { type: 'image', display: 'ui_image', value: [] }, + }, + }, + }; + nodes.useNodesStore.setState({ nodesRegistry: registry }); + studio.useStudioStore.setState({ workflowTabs: [], activeWorkflowTabId: null, currentRunContext: null }); + studio.useStudioStore.getState().mergeBackendWorkflow(tab); + const normalized = structuredClone(studio.useStudioStore.getState().workflowTabs[0]); + normalized.dirty = dirty; + flow.useFlowStore.getState().replaceGraph(normalized.snapshot); + studio.useStudioStore.setState({ + workflowTabs: [normalized], + activeWorkflowTabId: normalized.id, + workflowCanvasEpoch: 25, + form: normalized.snapshot.studioForm, + graphBinding: normalized.snapshot.studioGraphBinding, + selectedMode: normalized.snapshot.selectedMode, + activeTemplateId: normalized.snapshot.activeTemplateId, + sourceOutputId: normalized.snapshot.sourceOutputId, + pinnedGraphInputIds: normalized.snapshot.pinnedGraphInputIds, + autoFieldOverrides: normalized.snapshot.autoFieldOverrides, + outputs: [], + previewSlots: {}, + }); + const incoming = structuredClone(normalized); + incoming.backendRevision = 12; + incoming.snapshot.nodes[0].data.params.text.value = 'New backend text'; + return { + baseline: structuredClone(normalized), + incoming, + registry, + options: { hydrationBaseline: { tab: structuredClone(normalized), canvasEpoch: 25, registry } }, + }; +} + +async function delayedHydration({ dirty = true, beforeRead, duringRead, backendFor, autosave = false }) { + const fixture = startupHydrationFixture({ dirty }); + // Start with the normal materialized checkpoint already on the backend: + // registry-populated empty previews/connection flags are a separate contract. + studio.useStudioStore.getState().saveActiveWorkflowTab(true); + const checkpoint = structuredClone(studio.useStudioStore.getState().workflowTabs[0]); + checkpoint.dirty = dirty; + fixture.baseline = structuredClone(checkpoint); + fixture.incoming = structuredClone(checkpoint); + fixture.incoming.backendRevision = 12; + fixture.incoming.snapshot.nodes[0].data.params.text.value = 'New backend text'; + studio.useStudioStore.setState({ workflowTabs: [checkpoint] }); + studio.useStudioStore.setState({ workflowCanvasHydrated: true }); + const originalFetch = globalThis.fetch; + const writes = []; + const timers = []; + let finish; + let finishRead; + let failRead; + let fail; + const finished = new Promise((resolve, reject) => { + finish = resolve; + fail = reject; + }); + const deadline = setTimeout(() => fail(new Error('Controlled hydration did not settle.')), 5000); + const read = new Promise((resolve, reject) => { + finishRead = resolve; + failRead = reject; + }); + globalThis.workflowSyncHook = { effects: [], hydrated: false, finish }; + globalThis.window.setTimeout = (callback, delay) => { + timers.push({ callback, delay }); + return timers.length; + }; + globalThis.window.clearTimeout = () => {}; + globalThis.fetch = async (_url, options = {}) => { + if (options.method !== 'PUT') { + options.signal?.addEventListener('abort', () => failRead(options.signal.reason), { once: true }); + return read; + } + const body = JSON.parse(options.body); + writes.push(body); + return new Response(JSON.stringify({ ...body, id: fixture.baseline.id, revision: 30 })); + }; + let cleanup; + try { + await beforeRead?.(fixture); + sync.useWorkflowBackendSync(); + cleanup = globalThis.workflowSyncHook.effects[0](); + await duringRead?.(fixture); + const backend = backendFor ? backendFor(fixture) : fixture.baseline; + finishRead( + backend + ? new Response(JSON.stringify({ ...backend, revision: backend.backendRevision })) + : new Response(JSON.stringify({ error: true }), { status: 404 }), + ); + await finished; + if (autosave) { + globalThis.workflowSyncHook.effects = []; + sync.useWorkflowBackendSync(); + globalThis.workflowSyncHook.effects[1](); + for (const timer of timers) if (timer.delay === 500) timer.callback(); + await new Promise((resolve) => setImmediate(resolve)); + } + return { fixture, writes, current: structuredClone(studio.useStudioStore.getState().workflowTabs[0]) }; + } finally { + clearTimeout(deadline); + cleanup?.(); + globalThis.fetch = originalFetch; + delete globalThis.workflowSyncHook; + delete globalThis.window.setTimeout; + delete globalThis.window.clearTimeout; + } +} + +test('delayed hydration never republishes its captured snapshot over a newer checkpoint', async () => { + let latest; + const result = await delayedHydration({ + duringRead() { + flow.useFlowStore.getState().setParamWithHistory('hydration-text', 'text', 'New local text'); + studio.useStudioStore.getState().updateForm({ prompt: 'New local form' }); + studio.useStudioStore.getState().saveActiveWorkflowTab(true); + latest = structuredClone(studio.useStudioStore.getState().workflowTabs[0]); + }, + }); + assert.equal(result.writes.length, 1); + assert.notDeepEqual( + result.writes[0].snapshot, + result.fixture.baseline.snapshot, + 'no metadata-only echo of old content', + ); + assert.deepEqual(result.writes[0].snapshot, latest.snapshot, 'the actual current checkpoint owns the PUT'); + assert.deepEqual(result.current.snapshot, latest.snapshot, 'acknowledgement retains the current graph and form'); +}); + +test('delayed hydration cannot replace a newer acknowledgement signature with an older read', async () => { + let acknowledged; + const result = await delayedHydration({ + dirty: false, + duringRead(fixture) { + acknowledged = structuredClone(fixture.baseline); + acknowledged.backendRevision = 29; + acknowledged.snapshot.nodes[0].data.params.text.value = 'New acknowledged text'; + sync.markBackendWorkflow(acknowledged); + studio.useStudioStore.getState().mergeBackendWorkflow(acknowledged); + }, + autosave: true, + }); + assert.equal(result.current.backendRevision, 29); + assert.deepEqual(result.current.snapshot, acknowledged.snapshot); + assert.equal(result.writes.length, 0, 'an old GET must not trigger an autosave of already acknowledged content'); +}); + +test('delayed hydration cannot republish a newer acknowledgement after an overtaken missing read', async () => { + let acknowledged; + const result = await delayedHydration({ + dirty: false, + backendFor: () => null, + duringRead(fixture) { + acknowledged = structuredClone(fixture.baseline); + acknowledged.backendRevision = 29; + acknowledged.snapshot.nodes[0].data.params.text.value = 'New acknowledged text'; + sync.markBackendWorkflow(acknowledged); + studio.useStudioStore.getState().mergeBackendWorkflow(acknowledged); + }, + autosave: true, + }); + assert.equal(result.current.backendRevision, 29); + assert.deepEqual(result.current.snapshot, acknowledged.snapshot); + assert.equal(result.writes.length, 0, 'an overtaken 404 must not republish already acknowledged content'); +}); + +test('delayed hydration uploads a newer dirty checkpoint after an acknowledgement and missing read', async () => { + let latest; + const result = await delayedHydration({ + dirty: false, + backendFor: () => null, + duringRead(fixture) { + const acknowledged = structuredClone(fixture.baseline); + acknowledged.backendRevision = 29; + sync.markBackendWorkflow(acknowledged); + studio.useStudioStore.getState().mergeBackendWorkflow(acknowledged); + flow.useFlowStore.getState().setParamWithHistory('hydration-text', 'text', 'New unacknowledged text'); + studio.useStudioStore.getState().saveActiveWorkflowTab(true); + latest = structuredClone(studio.useStudioStore.getState().workflowTabs[0]); + }, + }); + assert.equal(result.writes.length, 1); + assert.deepEqual(result.writes[0].snapshot, latest.snapshot); + assert.deepEqual(result.current.snapshot, latest.snapshot); +}); + +test('delayed hydration recreates a genuinely missing document acknowledged before its read', async () => { + let acknowledged; + const result = await delayedHydration({ + dirty: false, + backendFor: () => null, + beforeRead(fixture) { + acknowledged = structuredClone(fixture.baseline); + acknowledged.backendRevision = 29; + sync.markBackendWorkflow(acknowledged); + studio.useStudioStore.getState().mergeBackendWorkflow(acknowledged); + }, + autosave: true, + }); + assert.equal(result.writes.length, 1, 'an acknowledgement predating this GET cannot waive a genuine 404'); + assert.deepEqual(result.writes[0].snapshot, acknowledged.snapshot); + assert.deepEqual(result.current.snapshot, acknowledged.snapshot); +}); + +test('delayed hydration acknowledges an exact restored dirty document without a PUT', async () => { + const result = await delayedHydration({ autosave: true }); + assert.equal(result.writes.length, 0); + assert.equal(result.current.dirty, false); + assert.deepEqual(result.current.snapshot, result.fixture.baseline.snapshot); +}); + +test('delayed hydration creates a missing document from the current checkpoint', async () => { + let latest; + const result = await delayedHydration({ + backendFor: () => null, + duringRead() { + flow.useFlowStore.getState().setParamWithHistory('hydration-text', 'text', 'Current new draft'); + studio.useStudioStore.getState().saveActiveWorkflowTab(true); + latest = structuredClone(studio.useStudioStore.getState().workflowTabs[0]); + }, + }); + assert.equal(result.writes.length, 1); + assert.deepEqual(result.writes[0].snapshot, latest.snapshot); + assert.deepEqual(result.current.snapshot, latest.snapshot); +}); + +test('delayed hydration retains a genuinely dirty document against a newer remote document', async () => { + const result = await delayedHydration({ backendFor: (fixture) => fixture.incoming }); + assert.equal(result.writes.length, 1); + assert.deepEqual(result.writes[0].snapshot, result.fixture.baseline.snapshot); + assert.deepEqual(result.current.snapshot, result.fixture.baseline.snapshot); +}); + +test('delayed hydration accepts a newer remote document for an unchanged clean tab', async () => { + const result = await delayedHydration({ dirty: false, backendFor: (fixture) => fixture.incoming, autosave: true }); + assert.equal(result.writes.length, 0); + assert.equal(result.current.dirty, false); + assert.deepEqual(result.current.snapshot, result.fixture.incoming.snapshot); +}); + +function checkpointedSavedWorkflow() { + startupHydrationFixture(); + // Persist the passive registry/connection metadata once, as a successful PUT would. + studio.useStudioStore.getState().saveActiveWorkflowTab(true); + const saved = { ...studio.useStudioStore.getState().workflowTabs[0], dirty: false, updatedAt: 1234 }; + studio.useStudioStore.setState({ workflowTabs: [saved] }); + sync.markBackendWorkflow(saved); + return saved; +} + +test('unchanged canvas checkpoints preserve the saved marker and document timestamp', () => { + const saved = checkpointedSavedWorkflow(); + for (let index = 0; index < 5; index += 1) { + studio.useStudioStore.getState().saveActiveWorkflowTab(true); + const current = studio.useStudioStore.getState().workflowTabs[0]; + assert.equal(current.dirty, false); + assert.equal(current.updatedAt, saved.updatedAt); + assert.equal(current, saved, 'an identical checkpoint must retain the document'); + } +}); + +test('an unchanged checkpoint preserves an unsaved edit until its exact acknowledgement', () => { + checkpointedSavedWorkflow(); + flow.useFlowStore.getState().setParamWithHistory('hydration-text', 'text', 'Keep this unsaved edit'); + studio.useStudioStore.getState().saveActiveWorkflowTab(true); + const edited = studio.useStudioStore.getState().workflowTabs[0]; + assert.equal(edited.dirty, true); + assert.equal(edited.snapshot.nodes[0].data.params.text.value, 'Keep this unsaved edit'); + assert.equal(sync.clearDirtyMarkerForExactBackendDocument(edited.id), false); + studio.useStudioStore.getState().saveActiveWorkflowTab(true); + assert.equal(studio.useStudioStore.getState().workflowTabs[0], edited); +}); + +test('switching away from an unchanged saved canvas does not mark it unsaved', () => { + const saved = checkpointedSavedWorkflow(); + const other = { ...structuredClone(saved), id: 'other-clean-workflow', title: 'Other workflow' }; + studio.useStudioStore.setState({ workflowTabs: [saved, other] }); + studio.useStudioStore.getState().switchWorkflowTab(other.id); + assert.equal(studio.useStudioStore.getState().workflowTabs[0], saved); + assert.equal(studio.useStudioStore.getState().workflowTabs[0].dirty, false); +}); + +test('startup hydration replaces a clean baseline after only passive registry and connection metadata', () => { + const fixture = startupHydrationFixture(); + studio.useStudioStore.getState().saveActiveWorkflowTab(true); + const checkpoint = studio.useStudioStore.getState().workflowTabs[0]; + assert.equal(checkpoint.dirty, true); + assert.equal(checkpoint.snapshot.nodes[0].data.params.output.isConnected, false); + assert.deepEqual(checkpoint.snapshot.nodes[1].data.params.selected_image, { + type: 'image', + display: 'ui_image', + value: [], + }); + const unchangedBaseline = structuredClone(fixture.options.hydrationBaseline); + + studio.useStudioStore.getState().mergeBackendWorkflow(fixture.incoming, fixture.options); + + assert.equal( + studio.useStudioStore.getState().workflowTabs[0].snapshot.nodes[0].data.params.text.value, + 'New backend text', + ); + assert.equal(flow.useFlowStore.getState().nodes[0].data.params.text.value, 'New backend text'); + assert.equal(studio.useStudioStore.getState().workflowTabs[0].dirty, false); + assert.deepEqual( + fixture.options.hydrationBaseline, + unchangedBaseline, + 'comparison must not rewrite the baseline or registry', + ); +}); + +const pendingHydrationEdits = [ + [ + 'authored text before the checkpoint', + () => flow.useFlowStore.getState().setParamWithHistory('hydration-text', 'text', 'Operator edit'), + ], + ['form', () => studio.useStudioStore.getState().updateForm({ prompt: 'Operator form edit' })], + ['title', () => studio.useStudioStore.getState().renameWorkflowTab('workflow-sync-test', 'Operator title')], + [ + 'intent', + () => + studio.useStudioStore.setState((state) => ({ + workflowTabs: state.workflowTabs.map((tab) => ({ ...tab, intent: 'draft' })), + })), + ], + [ + 'position', + () => + flow.useFlowStore + .getState() + .onNodesChange([{ type: 'position', id: 'hydration-text', position: { x: 99, y: 20 }, dragging: true }]), + ], + ['dimensions', () => flow.useFlowStore.getState().setNodeSize('hydration-text', 500, 400)], + ['viewport', () => flow.useFlowStore.getState().setViewport({ x: 17, y: 23, zoom: 2 })], + ['binding', () => studio.useStudioStore.setState({ graphBinding: { fingerprint: 'operator-binding' } })], + [ + 'topology', + () => + flow.useFlowStore.getState().onEdgesChange([ + { + type: 'add', + item: { + id: 'new-wire', + source: 'hydration-text', + sourceHandle: 'output', + target: 'hydration-preview', + targetHandle: 'image', + }, + }, + ]), + ], + [ + 'node definition', + () => + flow.useFlowStore.setState((state) => ({ + nodes: state.nodes.map((node) => + node.id === 'hydration-text' ? { ...node, data: { ...node.data, action: 'OtherTextValue' } } : node, + ), + })), + ], + ['schema', () => flow.useFlowStore.getState().setParamWithHistory('hydration-text', 'text', 'int', 'type')], + [ + 'true connection state', + () => flow.useFlowStore.getState().setParam('hydration-text', 'output', true, 'isConnected'), + ], + [ + 'wrong-type connection state', + () => flow.useFlowStore.getState().setParam('hydration-text', 'output', 'false', 'isConnected'), + ], + [ + 'nonempty preview', + () => flow.useFlowStore.getState().setParam('hydration-preview', 'selected_image', ['@data/current.png']), + ], + [ + 'extra preview schema', + () => flow.useFlowStore.getState().setParam('hydration-preview', 'selected_image', 'Authored preview', 'label'), + ], +]; + +for (const [label, edit] of pendingHydrationEdits) { + test(`startup hydration preserves a pending ${label} change`, async () => { + const fixture = startupHydrationFixture(); + await edit(); + // Capture the actual live document, including an edit made before the delayed checkpoint. + studio.useStudioStore.getState().saveActiveWorkflowTab(true); + const expected = structuredClone(studio.useStudioStore.getState().workflowTabs[0]); + studio.useStudioStore.getState().mergeBackendWorkflow(fixture.incoming, fixture.options); + const retained = studio.useStudioStore.getState().workflowTabs[0]; + assert.deepEqual(retained.snapshot, expected.snapshot); + assert.equal(retained.title, expected.title); + assert.equal(retained.dirty, true); + assert.equal(retained.backendRevision, 12); + }); +} + +test('startup hydration protects a real live edit even before its checkpoint marks dirty', () => { + const fixture = startupHydrationFixture(); + flow.useFlowStore.getState().setParamWithHistory('hydration-text', 'text', 'Uncheckpointed operator edit'); + assert.equal(studio.useStudioStore.getState().workflowTabs[0].dirty, false); + studio.useStudioStore.getState().mergeBackendWorkflow(fixture.incoming, fixture.options); + assert.equal( + studio.useStudioStore.getState().workflowTabs[0].snapshot.nodes[0].data.params.text.value, + 'Uncheckpointed operator edit', + ); + assert.equal(flow.useFlowStore.getState().nodes[0].data.params.text.value, 'Uncheckpointed operator edit'); +}); + +test('startup hydration never overrides an originally dirty restored document', () => { + const fixture = startupHydrationFixture({ dirty: true }); + studio.useStudioStore.getState().saveActiveWorkflowTab(true); + const expected = structuredClone(studio.useStudioStore.getState().workflowTabs[0].snapshot); + studio.useStudioStore.getState().mergeBackendWorkflow(fixture.incoming, fixture.options); + assert.deepEqual(studio.useStudioStore.getState().workflowTabs[0].snapshot, expected); + assert.equal(studio.useStudioStore.getState().workflowTabs[0].dirty, true); +}); + +for (const [label, change] of [ + [ + 'undeclared field', + (fixture) => { + delete fixture.registry['modules.Image.Preview'].params.selected_image; + }, + ], + [ + 'mismatched registry schema', + (fixture) => { + fixture.registry['modules.Image.Preview'].params.selected_image.type = 'video'; + }, + ], + [ + 'missing registry', + (fixture) => { + fixture.options.hydrationBaseline.registry = {}; + }, + ], + [ + 'own acknowledgement', + (fixture) => { + fixture.options.acknowledgement = true; + }, + ], + [ + 'changed canvas context', + () => { + studio.useStudioStore.setState({ workflowCanvasEpoch: 26 }); + }, + ], + [ + 'changed active tab context', + () => { + studio.useStudioStore.setState({ activeWorkflowTabId: 'another-tab' }); + }, + ], + [ + 'advanced local revision', + () => { + studio.useStudioStore.setState((state) => ({ + workflowTabs: state.workflowTabs.map((tab) => ({ ...tab, backendRevision: 9 })), + })); + }, + ], +]) { + test(`startup hydration does not waive ${label}`, () => { + const fixture = startupHydrationFixture(); + studio.useStudioStore.getState().saveActiveWorkflowTab(true); + change(fixture); + const expected = structuredClone(studio.useStudioStore.getState().workflowTabs[0].snapshot); + studio.useStudioStore.getState().mergeBackendWorkflow(fixture.incoming, fixture.options); + assert.deepEqual(studio.useStudioStore.getState().workflowTabs[0].snapshot, expected); + assert.equal(studio.useStudioStore.getState().workflowTabs[0].dirty, true); + }); +} + +for (const revision of [6, 7]) { + test(`startup hydration does not replace with stale or equal revision ${revision}`, () => { + const fixture = startupHydrationFixture(); + studio.useStudioStore.getState().saveActiveWorkflowTab(true); + fixture.incoming.backendRevision = revision; + const expected = structuredClone(studio.useStudioStore.getState().workflowTabs[0]); + studio.useStudioStore.getState().mergeBackendWorkflow(fixture.incoming, fixture.options); + assert.deepEqual(studio.useStudioStore.getState().workflowTabs[0], expected); + }); +} + +test('startup hydration retains the active run and current preview authority', () => { + const fixture = startupHydrationFixture(); + studio.useStudioStore.getState().saveActiveWorkflowTab(true); + const context = { workflowTabId: fixture.baseline.id, clientRunId: 'active-local-run', status: 'running' }; + const slots = { + current: { workflowTabId: fixture.baseline.id, taskId: 'actual-current-task', value: '@data/current.png' }, + }; + studio.useStudioStore.setState({ currentRunContext: context, previewSlots: slots }); + const expected = structuredClone(studio.useStudioStore.getState().workflowTabs[0].snapshot); + studio.useStudioStore.getState().mergeBackendWorkflow(fixture.incoming, fixture.options); + assert.deepEqual(studio.useStudioStore.getState().workflowTabs[0].snapshot, expected); + assert.equal(studio.useStudioStore.getState().currentRunContext, context); + assert.equal(studio.useStudioStore.getState().previewSlots, slots); + assert.equal(studio.useStudioStore.getState().workflowTabs[0].dirty, true); +}); + +test('reopening a backend-owned document does not autosave passive preview and connection hydration', async () => { + const fixture = startupHydrationFixture(); + sync.markBackendWorkflow(fixture.baseline); + const baseline = structuredClone(fixture.baseline); + studio.useStudioStore.getState().saveActiveWorkflowTab(true); + const checkpoint = studio.useStudioStore.getState().workflowTabs[0]; + assert.equal(checkpoint.snapshot.nodes[0].data.params.output.isConnected, false); + assert.deepEqual(checkpoint.snapshot.nodes[1].data.params.selected_image.value, []); + const originalFetch = globalThis.fetch; + const writes = []; + globalThis.fetch = async (_url, options) => { + const body = JSON.parse(options.body); + writes.push(body); + return new Response(JSON.stringify({ ...body, id: checkpoint.id, revision: 8 }), { + headers: { 'Content-Type': 'application/json' }, + }); + }; + try { + sync.queueWorkflowPut(checkpoint, (error) => assert.fail(String(error))); + await new Promise((resolve) => setImmediate(resolve)); + await new Promise((resolve) => setImmediate(resolve)); + assert.equal(writes.length, 0, 'passive canvas hydration must not create a backend revision'); + assert.equal(studio.useStudioStore.getState().workflowTabs[0].dirty, false); + assert.deepEqual(fixture.baseline, baseline, 'acknowledgement comparison must not mutate its source'); + } finally { + globalThis.fetch = originalFetch; + } +}); + +for (const [label, edit] of pendingHydrationEdits) { + test(`a backend acknowledgement never clears an authored ${label} change as passive hydration`, async () => { + const fixture = startupHydrationFixture(); + sync.markBackendWorkflow(fixture.baseline); + await edit(); + studio.useStudioStore.getState().saveActiveWorkflowTab(true); + assert.equal(sync.clearDirtyMarkerForExactBackendDocument(fixture.baseline.id), false); + assert.equal(studio.useStudioStore.getState().workflowTabs[0].dirty, true); + }); +} + +test('passive save comparison does not trust later registry mutations', () => { + const fixture = startupHydrationFixture(); + delete fixture.registry['modules.Image.Preview'].params.selected_image; + sync.markBackendWorkflow(fixture.baseline); + fixture.registry['modules.Image.Preview'].params.selected_image = { type: 'image', display: 'ui_image', value: [] }; + studio.useStudioStore.getState().saveActiveWorkflowTab(true); + assert.equal(sync.clearDirtyMarkerForExactBackendDocument(fixture.baseline.id), false); +}); + +for (const rawNodes of [undefined, null, [null, {}]]) { + test(`backend acknowledgement tolerates historical unnormalized node data: ${JSON.stringify(rawNodes)}`, () => { + const tab = workflowTab({ dirty: false, prompt: 'Backend legacy document' }); + tab.snapshot.nodes = rawNodes; + assert.doesNotThrow(() => sync.markBackendWorkflow(tab)); + studio.useStudioStore.setState({ + workflowTabs: [workflowTab({ dirty: true, prompt: 'Actual new document' })], + activeWorkflowTabId: null, + }); + assert.equal(sync.clearDirtyMarkerForExactBackendDocument(tab.id), false); + }); +} diff --git a/scripts/workflow-document-origin.test.mjs b/scripts/workflow-document-origin.test.mjs new file mode 100644 index 00000000..7d7c343b --- /dev/null +++ b/scripts/workflow-document-origin.test.mjs @@ -0,0 +1,1023 @@ +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; +import { after, before, beforeEach, test } from 'node:test'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { createServer } from 'vite'; +import React from 'react'; +import { renderToStaticMarkup } from 'react-dom/server'; +const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); +let server, origin, sync, studio, flow, drops, packages, notifications, defaultForm, originalFetch; +const values = new Map(); +const storage = { + getItem: (key) => values.get(key) ?? null, + setItem: (key, value) => values.set(key, String(value)), + removeItem: (key) => values.delete(key), +}; +before(async () => { + globalThis.localStorage = globalThis.sessionStorage = storage; + globalThis.window = { + localStorage: storage, + sessionStorage: storage, + location: { origin: 'http://127.0.0.1:5191' }, + dispatchEvent: () => true, + }; + server = await createServer({ + root: ROOT, + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, hmr: false, watch: null }, + appType: 'custom', + }); + origin = await server.ssrLoadModule('/src/studio/workflowDocumentOrigin.ts'); + studio = (await server.ssrLoadModule('/src/stores/useStudioStore.ts')).useStudioStore; + sync = await server.ssrLoadModule('/src/studio/useWorkflowBackendSync.ts'); + flow = (await server.ssrLoadModule('/src/stores/useFlowStore.ts')).useFlowStore; + drops = await server.ssrLoadModule('/src/workflow/useWorkflowDrop.ts'); + packages = await server.ssrLoadModule('/src/studio/workflowPackage.ts'); + notifications = await server.ssrLoadModule('/src/ui/snackbar.ts'); + defaultForm = (await server.ssrLoadModule('/src/studio/modelProfiles.ts')).DEFAULT_STUDIO_FORM; + originalFetch = globalThis.fetch; +}); +beforeEach(() => { + for (const tab of studio.getState().workflowTabs) origin.forgetFreshWorkflowId(tab.id); + studio.setState({ workflowTabs: [], activeWorkflowTabId: null }); +}); +after(async () => { + globalThis.fetch = originalFetch; + await server?.close(); + delete globalThis.localStorage; + delete globalThis.sessionStorage; + delete globalThis.window; +}); +test('example filename fallback names the workflow and preserves authored labels', async () => { + const { workflowExampleDisplayName } = await server.ssrLoadModule('/src/workflow/readWorkflowJson.ts'); + assert.equal(workflowExampleDisplayName('examples/image-filter.json', 'image-filter'), 'Image filter'); + assert.equal(workflowExampleDisplayName('examples/image-filter.json', 'Image filter · 調色'), 'Image filter · 調色'); + assert.equal(workflowExampleDisplayName('examples/video_outpaint.json'), 'Video outpaint'); + assert.equal(workflowExampleDisplayName('examples/image-filter.json', 'Studio Premiere'), 'Studio Premiere'); +}); + +test('portable imports reflow only untouched generated geometry, including a renamed example', async () => { + const { importedWorkflow } = await server.ssrLoadModule('/src/workflow/readWorkflowJson.ts'); + const backend = process.env.MODIFF_BACKEND_DIR || path.join(ROOT, '..', 'MoDiff'); + const graph = JSON.parse( + readFileSync(path.join(backend, 'data/graphs/studio/builtin-audio-operation/audio-join.json'), 'utf8'), + ); + const read = (value) => importedWorkflow(value, 'My copy', 'default', defaultForm); + const pristine = await read(graph); + assert.equal(pristine.title, 'My copy'); + assert.equal(pristine.measureLayout, true); + const { arrangeGraphNodes } = await server.ssrLoadModule('/src/workflow/graphLayout.ts'); + const measured = pristine.snapshot.nodes.map((node) => ({ ...node, measured: { width: 380, height: 440 } })); + const arranged = arrangeGraphNodes(measured, pristine.snapshot.edges); + assert.notDeepEqual( + arranged.map((n) => n.position), + pristine.snapshot.nodes.map((n) => n.position), + ); + const execution = (nodes) => + flow.getState().exportGraph('layout-regression', undefined, { + sourceGraph: { nodes, edges: pristine.snapshot.edges }, + randomizeSeeds: false, + }); + assert.deepEqual(execution(arranged), execution(pristine.snapshot.nodes)); + const original = structuredClone(graph); + for (const edit of [ + (g) => (g.nodes[0].position.y += 12), + (g) => (g.nodes[0].width = 410), + (g) => (g.nodes[0].style = { height: 712 }), + (g) => (g.nodes[0].origin = [0.5, 0.5]), + (g) => + (g.nodes[0].extent = [ + [0, 0], + [520, 720], + ]), + (g) => (g.nodes[0].parentNode = g.nodes[1].id), + (g) => delete g.layout, + (g) => (g.studioForm = defaultForm), + (g) => (g.layout.algorithm = 'future-layout'), + ]) { + const authored = structuredClone(graph); + edit(authored); + const result = await read(authored); + assert.equal(result.measureLayout, false); + assert.deepEqual( + result.snapshot.nodes.map((n) => n.position), + authored.nodes.map((n) => n.position), + ); + } + const packaged = await read({ graph, restore: { formSnapshot: defaultForm } }); + assert.equal(packaged.measureLayout, false); + assert.deepEqual(graph, original); +}); + +test('a generated import measures behind Preparing workflow and cannot clear another tab’s transition', async () => { + const { openImportedWorkflow } = await server.ssrLoadModule('/src/workflow/readWorkflowJson.ts'); + const backend = process.env.MODIFF_BACKEND_DIR || path.join(ROOT, '..', 'MoDiff'); + const graph = JSON.parse( + readFileSync(path.join(backend, 'data/graphs/studio/ace-step-audio-pipeline/audio-repaint.json'), 'utf8'), + ); + const previousFrame = window.requestAnimationFrame; + try { + const frame = new Promise((resolve) => { + window.requestAnimationFrame = (callback) => { + resolve(callback); + return 1; + }; + }); + const open = openImportedWorkflow( + () => graph, + 'ACE repaint', + 'audio-repaint.json', + 'default', + studio.getState().createWorkflowTab, + ); + const checkGeometry = await frame; + assert.equal(studio.getState().canvasTransition.workflowTabId, studio.getState().activeWorkflowTabId); + assert.equal(studio.getState().canvasTransition.type, 'task_graph_building'); + const other = studio.getState().createWorkflowTab('Another document'); + const preparing = { type: 'task_graph_building', workflowTabId: other, startedAt: Date.now(), keepLauncher: false }; + studio.getState().setCanvasTransition(preparing); + checkGeometry(); + assert.equal(await open, false); + assert.equal(studio.getState().canvasTransition, preparing); + } finally { + studio.getState().setCanvasTransition(null); + window.requestAnimationFrame = previousFrame; + } +}); + +test('rapid file imports open in gesture order and a bad file does not block the next one', async () => { + const { openWorkflowFile } = await server.ssrLoadModule('/src/workflow/readWorkflowJson.ts'); + const content = JSON.stringify({ nodes: [], edges: [], studioForm: defaultForm }); + let releaseRead; + const firstRead = new Promise((resolve) => { + releaseRead = resolve; + }); + const opened = []; + const create = (title, ...args) => { + opened.push(title); + return studio.getState().createWorkflowTab(title, ...args); + }; + const first = openWorkflowFile({ name: 'Slow.json', text: () => firstRead }, 'default', create); + const bad = openWorkflowFile({ name: 'Bad.json', text: async () => 'wrong' }, 'default', create); + const rejected = assert.rejects(bad, SyntaxError); + const last = openWorkflowFile({ name: 'Fast.json', text: async () => content }, 'default', create); + await new Promise((resolve) => setImmediate(resolve)); + releaseRead(content); + assert.deepEqual(await Promise.all([first, rejected, last]), [true, undefined, true]); + assert.deepEqual(opened, ['Slow', 'Fast']); +}); + +test('an unfinished file read cannot replace the document selected in the meantime', async () => { + const { openWorkflowFile } = await server.ssrLoadModule('/src/workflow/readWorkflowJson.ts'); + const started = Promise.withResolvers(); + const contents = Promise.withResolvers(); + const opened = openWorkflowFile( + { + name: 'Slow.json', + text: () => { + started.resolve(); + return contents.promise; + }, + }, + 'default', + studio.getState().createWorkflowTab, + ); + const queued = openWorkflowFile( + { name: 'Queued.json', text: async () => '{"nodes":[],"edges":[]}' }, + 'default', + studio.getState().createWorkflowTab, + ); + await started.promise; + const other = studio.getState().createWorkflowTab('User selection'); + contents.resolve('{"nodes":[],"edges":[]}'); + assert.equal(await opened, false); + assert.equal(await queued, false); + assert.equal(studio.getState().activeWorkflowTabId, other); +}); + +function tab(id) { + return studio.getState().workflowTabs.find((x) => x.id === id); +} +function response(value) { + return new Response(JSON.stringify(value), { headers: { 'Content-Type': 'application/json' } }); +} +function record(t) { + return { ...t, revision: 1 }; +} + +for (const mode of [ + 'text_to_video_with_audio', + 'first_last_frame_to_video_with_audio', + 'reference_to_video_with_audio', +]) + test(`Pika saved forms retain model and authored values through ${mode} restore`, () => { + const form = { + ...defaultForm, + modelType: 'PikaH3FlexModularPipeline', + mode, + prompt: 'Keep this authored reference and sound description.', + seed: 713, + width: 832, + height: 480, + numFrames: 124, + fps: 24, + resourceMode: 'expert', + autoOffload: true, + offloadMode: 'group_disk', + }; + const id = studio.getState().createWorkflowTab( + 'Saved Pika candidate', + { + nodes: [], + edges: [], + viewport: { x: 0, y: 0, zoom: 1 }, + studioForm: form, + selectedMode: mode, + activeTemplateId: null, + studioGraphBinding: null, + }, + 'manual', + undefined, + 'restore', + ); + const saved = structuredClone(tab(id)); + assert.equal(saved.snapshot.studioForm.modelType, form.modelType); + studio.setState({ workflowTabs: [], activeWorkflowTabId: id }); + studio.getState().mergeBackendWorkflow(record(saved)); + studio.getState().hydrateActiveWorkflowCanvas(); + for (const field of ['modelType', 'mode', 'prompt', 'seed', 'width', 'height', 'numFrames', 'fps', 'offloadMode']) + assert.deepEqual(studio.getState().form[field], form[field], field); + }); + +function ordinaryImageSnapshot(module, action, resourceMode) { + const node = (id, module, action, params) => ({ + id, + type: 'custom', + position: { x: 40, y: 80 }, + data: { type: 'custom', module, action, label: action, params }, + }); + const studioForm = { ...defaultForm, resourceMode, prompt: 'Saved form summary' }; + if (resourceMode === undefined) delete studioForm.resourceMode; + return { + nodes: [ + node('source', 'modules.Image', 'Load', { image: { type: 'image', display: 'output', isConnected: true } }), + node('operation', module, action, { + operation: { type: 'string', value: 'image_upscale' }, + images: { type: 'image', display: 'input', isConnected: true }, + output: { type: 'image', display: 'output', isConnected: false }, + }), + node('model', 'modules.ModularDiffusers', 'ModelsLoader', { + model_type: { type: 'string', value: 'SyntheticPipeline' }, + dtype: { type: 'string', value: 'bfloat16' }, + device: { type: 'string', value: 'cpu' }, + offload_mode: { type: 'string', value: 'none' }, + auto_offload: { type: 'boolean', value: false }, + }), + node('prompt', 'modules.ModularDiffusers', 'EncodePrompt', { + prompt: { type: 'string', value: 'Current graph caption' }, + }), + ], + edges: [ + { id: 'source-wire', source: 'source', sourceHandle: 'image', target: 'operation', targetHandle: 'images' }, + ], + viewport: { x: -20, y: 30, zoom: 0.75 }, + studioForm, + selectedMode: studioForm.mode, + studioGraphBinding: null, + activeTemplateId: null, + sourceOutputId: null, + }; +} + +test('saved and imported Automatic forms retain authored precision and offload through restore', async (t) => { + const previousFlow = flow.getState(); + const previousStudio = studio.getState(); + const previousFetch = globalThis.fetch; + try { + globalThis.fetch = async () => assert.fail('Document restore cannot execute or replan a model.'); + for (const [modelType, mode, offloadMode, dtype] of [ + ['Flux2KleinPipeline', 'multi_image_reference_edit', 'group_cpu', 'float16'], + ['Flux2KleinPipeline', 'multi_image_reference_edit', 'group_disk', 'bfloat16'], + ['LTXVideoPipeline', 'video_to_video', 'group_cpu', 'float32'], + ['WanTI2VPipeline', 'text_to_video', 'none', 'bfloat16'], + ]) { + await t.test(`${modelType}: ${offloadMode}/${dtype}`, async () => { + studio.setState({ workflowTabs: [], activeWorkflowTabId: null }); + const form = { + ...defaultForm, + modelType, + mode, + prompt: 'Keep this authored Automatic recipe.', + resourceMode: 'auto', + dtype, + quantizationMode: 'none', + device: 'cuda:0', + autoOffload: offloadMode !== 'none', + offloadMode, + }; + const snapshot = { + nodes: [], + edges: [], + studioForm: form, + selectedMode: mode, + studioGraphBinding: null, + activeTemplateId: null, + sourceOutputId: null, + }; + const original = structuredClone(snapshot); + const parsed = packages.parseWorkflowPackage(packages.buildWorkflowPackage({ form, graph: snapshot })); + assert(parsed); + const id = studio.getState().createWorkflowTab('Authored Automatic document', parsed.snapshot, 'import'); + const assertForm = () => { + assert.deepEqual(tab(id).snapshot.studioForm, form); + assert.deepEqual(studio.getState().form, form); + }; + assertForm(); + studio.getState().createWorkflowTab('Unrelated draft'); + studio.getState().switchWorkflowTab(id); + assertForm(); + const saved = structuredClone({ ...tab(id), dirty: false, intent: 'saved', backendRevision: 1 }); + studio.setState({ workflowTabs: [], activeWorkflowTabId: id }); + studio.getState().mergeBackendWorkflow({ ...saved, revision: 1 }); + studio.getState().hydrateActiveWorkflowCanvas(); + assertForm(); + const persisted = studio.persist.getOptions().partialize(studio.getState()); + storage.setItem('modiff.studio', JSON.stringify({ state: persisted, version: 0 })); + await studio.persist.rehydrate(); + assertForm(); + assert.deepEqual(snapshot, original); + }); + } + } finally { + globalThis.fetch = previousFetch; + flow.setState(previousFlow); + studio.setState(previousStudio); + } +}); + +test('ordinary image document normalization preserves memory policy through import, switching and hydration', async (t) => { + const previousFlow = flow.getState(); + const previousStudio = studio.getState(); + const previousFetch = globalThis.fetch; + const wire = (edge) => [edge.id, edge.source, edge.sourceHandle, edge.target, edge.targetHandle]; + try { + globalThis.fetch = async () => assert.fail('Document normalization must not dispatch a request.'); + for (const [module, action] of [ + ['modules.ImageOperations', 'ProcessImage'], + ['modules.DiffusersImage', 'LoadPipeline'], + ['modules.Spandrel', 'Upscaler'], + ]) { + for (const [label, value, expected] of [ + ['Custom', 'expert', 'expert'], + ['Automatic', 'auto', 'auto'], + ['legacy manual', 'manual', 'expert'], + ['absent', undefined, 'auto'], + ['invalid', 'unrecognized-policy', 'auto'], + ]) { + await t.test(`${action}: ${label}`, () => { + studio.setState({ workflowTabs: [], activeWorkflowTabId: null }); + const snapshot = ordinaryImageSnapshot(module, action, value); + const original = structuredClone(snapshot); + const id = studio.getState().createWorkflowTab('Saved image graph', snapshot, 'import'); + const assertDocument = (expectedPrompt = 'Current graph caption') => { + const saved = tab(id).snapshot; + assert.equal(saved.studioForm.resourceMode, expected); + assert.equal(studio.getState().form.resourceMode, expected); + assert.equal( + saved.studioForm.prompt, + expectedPrompt, + 'Explicit import infers a summary; passive hydration retains the saved form.', + ); + assert.equal(saved.studioGraphBinding, null); + assert.deepEqual( + saved.nodes.map(({ id, data }) => [id, data.params]), + snapshot.nodes.map(({ id, data }) => [id, data.params]), + ); + assert.deepEqual(saved.edges.map(wire), snapshot.edges.map(wire)); + assert.deepEqual(saved.viewport, snapshot.viewport); + }; + assertDocument(); + studio.getState().createWorkflowTab('Another document'); + studio.getState().switchWorkflowTab(id); + assertDocument(); + studio.setState({ workflowTabs: [], activeWorkflowTabId: id }); + studio.getState().mergeBackendWorkflow({ + id, + title: 'Saved image graph', + source: 'import', + createdAt: 1, + updatedAt: 2, + revision: 1, + snapshot, + }); + assertDocument('Saved form summary'); + assert.deepEqual(snapshot, original, 'Normalization cannot mutate the input document.'); + }); + } + } + } finally { + globalThis.fetch = previousFetch; + flow.setState(previousFlow); + studio.setState(previousStudio); + } +}); + +test('fresh ordinary graph inference still defaults to Automatic without a saved memory choice', async () => { + const inference = await server.ssrLoadModule('/src/studio/workflowInference.ts'); + const snapshot = ordinaryImageSnapshot('modules.ImageOperations', 'ProcessImage', 'expert'); + assert.equal(inference.inferStudioFormFromWorkflow(snapshot.nodes, snapshot.studioForm).resourceMode, 'auto'); +}); + +test('an exact SDXL direct task keeps its own model identity despite a same-checkpoint modular form', async () => { + const { workflowSnapshotFromGraph, restoreReviewedDirectImageModelType } = await server.ssrLoadModule( + '/src/studio/workflowInference.ts', + ); + const { useNodesStore } = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); + const originalRegistry = useNodesStore.getState(); + const selection = { source: 'hub', value: 'stabilityai/stable-diffusion-xl-base-1.0' }; + const routes = [ + ['edit_image', 'Edit', 'diffusersImageEdit', 'StableDiffusionXLImg2ImgPipeline'], + ['inpaint', 'Inpaint', 'diffusersImageInpaint', 'StableDiffusionXLInpaintPipeline'], + ]; + useNodesStore.setState({ + studioModelCapabilitiesAuthoritative: true, + studioExecutionSpecInvalid: false, + studioModelCapabilities: [ + { + modelType: 'StableDiffusionXLPipeline', + studioExecutionSpecs: routes.map(([mode, action, role, pipelineClass]) => ({ + modelType: 'StableDiffusionXLPipeline', + mode, + pipelineClass, + defaultRepo: selection.value, + loaderModule: 'modules.DiffusersImage', + loaderAction: 'LoadPipeline', + executionPath: 'direct-diffusers-image', + roles: [[role, `modules.DiffusersImage.${action}`]], + edges: [['diffusersImagePipeline', 'pipeline', role, 'pipeline']], + })), + }, + ], + }); + try { + for (const [mode, action, role, pipelineClass] of routes) { + const form = { ...defaultForm, mode, modelType: 'StableDiffusionXLModularPipeline' }; + const graph = ordinaryImageSnapshot('modules.DiffusersImage', action, 'expert'); + const loader = graph.nodes.find((node) => node.id === 'model'); + const consumer = graph.nodes.find((node) => node.id === 'operation'); + Object.assign(loader.data, { + module: 'modules.DiffusersImage', + action: 'LoadPipeline', + studioOwned: true, + studioRole: 'diffusersImagePipeline', + params: { + model_id: { value: selection }, + pipeline_class: { value: pipelineClass }, + mode: { value: mode }, + }, + }); + Object.assign(consumer.data, { + studioOwned: true, + studioRole: role, + params: { image_contract: { value: { pipelineClass, mode } } }, + }); + graph.edges.push({ + id: 'model-wire', + source: 'model', + sourceHandle: 'pipeline', + target: 'operation', + targetHandle: 'pipeline', + }); + const original = structuredClone(graph); + const reopened = workflowSnapshotFromGraph(graph, 'default', form); + assert.equal(reopened.studioForm.modelType, 'StableDiffusionXLPipeline'); + assert.equal(reopened.studioForm.mode, mode); + assert.deepEqual(restoreReviewedDirectImageModelType(graph.nodes, graph.edges, form), { + ...form, + modelType: 'StableDiffusionXLPipeline', + }); + assert.deepEqual(graph, original); + assert.equal(restoreReviewedDirectImageModelType(graph.nodes, [], form), form); + const authored = { ...form, modelType: 'StableDiffusionXLInstructPix2PixPipeline' }; + assert.equal(restoreReviewedDirectImageModelType(graph.nodes, graph.edges, authored), authored); + loader.data.module = 'modules.ModularDiffusers'; + loader.data.action = 'ModelsLoader'; + assert.equal(restoreReviewedDirectImageModelType(graph.nodes, graph.edges, form), form); + } + } finally { + useNodesStore.setState(originalRegistry); + } +}); + +test('passive ordinary image restore preserves the complete saved form and does not autosave an inferred summary', async (t) => { + const previousFlow = flow.getState(); + const previousStudio = studio.getState(); + const previousFetch = globalThis.fetch; + try { + for (const [module, action] of [ + ['modules.ImageOperations', 'ProcessImage'], + ['modules.DiffusersImage', 'LoadPipeline'], + ['modules.Spandrel', 'Upscaler'], + ['modules.HuggingFaceTransformers', 'LoadDepthEstimationModel'], + ['modules.HuggingFaceTransformers', 'LoadImageTextToTextModel'], + ]) { + for (const transition of ['switch', 'close', 'backend hydration', 'reload']) { + await t.test(`${action}: ${transition}`, async () => { + studio.setState({ workflowTabs: [], activeWorkflowTabId: null }); + const snapshot = ordinaryImageSnapshot(module, action, 'expert'); + snapshot.nodes[1].data.params.operation.value = 'image_stitch'; + snapshot.nodes[1].data.retainedAuthoring = { version: 3, labels: ['keep', 'unchanged'] }; + const id = studio.getState().createWorkflowTab('Retained ordinary document', snapshot, 'import'); + // Author after explicit import so the retained form deliberately differs + // from the existing graph-derived summary, as in the Linux reproduction. + studio.getState().updateForm({ + ...defaultForm, + resourceMode: 'expert', + prompt: 'Keep this authored form summary', + negativePrompt: 'Retained negative caption', + dtype: 'float16', + device: 'cuda:0', + autoOffload: true, + offloadMode: 'group_disk', + steps: 17, + guidanceScale: 6.25, + seed: 123, + randomSeed: false, + width: 768, + height: 512, + aspectRatio: 'custom', + referenceImages: ['images/retained-reference.png'], + }); + studio.getState().saveActiveWorkflowTab(true); + const original = structuredClone({ ...tab(id), dirty: false, intent: 'saved', backendRevision: 2 }); + studio.setState({ workflowTabs: [structuredClone(original)] }); + sync.markBackendWorkflow(original); + const requests = []; + globalThis.fetch = async (url, options) => { + requests.push([String(url), options?.method ?? 'GET']); + return response(record(tab(id))); + }; + + if (transition === 'switch' || transition === 'close') { + const otherId = studio.getState().createWorkflowTab('Another document'); + const other = structuredClone(tab(otherId)); + if (transition === 'switch') studio.getState().switchWorkflowTab(id); + else studio.getState().closeWorkflowTab(otherId); + if (transition === 'switch') assert.deepEqual(tab(otherId), other, 'Unrelated tab remains exact.'); + } else if (transition === 'backend hydration') { + studio.setState({ workflowTabs: [], activeWorkflowTabId: id }); + studio.getState().mergeBackendWorkflow({ ...original, revision: 2 }); + } else { + const persisted = studio.persist.getOptions().partialize(studio.getState()); + storage.setItem('modiff.studio', JSON.stringify({ state: persisted, version: 0 })); + await studio.persist.rehydrate(); + } + + assert.deepEqual(studio.getState().form, original.snapshot.studioForm); + assert.equal(studio.getState().selectedMode, original.snapshot.selectedMode); + studio.getState().saveActiveWorkflowTab(true); + assert.deepEqual(tab(id).snapshot, original.snapshot, 'Passive checkpoint retains the complete snapshot.'); + assert.equal(tab(id).dirty, false, 'Passive restore is not an authored edit.'); + sync.queueWorkflowPut(tab(id), (error) => assert.fail(String(error))); + await new Promise(setImmediate); + assert.deepEqual(requests, [], 'The autosave chain must not PUT a replacement summary.'); + }); + } + } + } finally { + globalThis.fetch = previousFetch; + flow.setState(previousFlow); + studio.setState(previousStudio); + } +}); + +test('saved ordinary image copies and output restores preserve their authored form', async (t) => { + const previousFlow = flow.getState(); + const previousStudio = studio.getState(); + try { + for (const [module, action] of [ + ['modules.ImageOperations', 'ProcessImage'], + ['modules.DiffusersImage', 'LoadPipeline'], + ['modules.Spandrel', 'Upscaler'], + ]) { + for (const source of ['manual', 'gallery']) { + await t.test(`${action}: ${source}`, () => { + studio.setState({ workflowTabs: [], activeWorkflowTabId: null }); + const snapshot = ordinaryImageSnapshot(module, action, 'expert'); + snapshot.studioForm = { + ...snapshot.studioForm, + prompt: 'Keep the saved copy caption', + seed: 123, + randomSeed: false, + width: 768, + height: 512, + aspectRatio: 'custom', + }; + const original = structuredClone(snapshot); + if (source === 'manual') { + // Both Save As and My workflows Duplicate pass this explicit source. + studio.getState().createWorkflowTab('Saved workflow copy', snapshot, 'manual'); + } else { + studio.getState().restoreWorkflowFromOutput({ + id: 'retained-output', + prompt: snapshot.studioForm.prompt, + formSnapshot: snapshot.studioForm, + graphSnapshot: snapshot, + }); + } + const restored = tab(studio.getState().activeWorkflowTabId).snapshot; + assert.deepEqual(restored.studioForm, original.studioForm); + assert.equal(restored.selectedMode, original.studioForm.mode); + assert.deepEqual(restored.nodes, original.nodes); + assert.deepEqual(restored.edges, original.edges); + assert.deepEqual(snapshot, original, 'Copy and restore cannot mutate their source snapshot.'); + }); + } + } + } finally { + flow.setState(previousFlow); + studio.setState(previousStudio); + } +}); + +test('legacy ordinary output restores still infer a missing or unrecognized original form', async (t) => { + const previousFlow = flow.getState(); + const previousStudio = studio.getState(); + try { + for (const [module, action] of [ + ['modules.ImageOperations', 'ProcessImage'], + ['modules.DiffusersImage', 'LoadPipeline'], + ['modules.Spandrel', 'Upscaler'], + ]) { + for (const formSnapshot of [undefined, { mode: 'unknown-mode', modelType: 'unknown-model' }]) { + await t.test(`${action}: ${formSnapshot ? 'unrecognized' : 'missing'}`, () => { + studio.setState({ workflowTabs: [], activeWorkflowTabId: null }); + const graphSnapshot = ordinaryImageSnapshot(module, action, 'expert'); + studio.getState().restoreWorkflowFromOutput({ + id: 'legacy-output', + prompt: '', + formSnapshot, + graphSnapshot, + }); + const form = studio.getState().form; + assert.equal(form.prompt, 'Current graph caption'); + assert.equal(tab(studio.getState().activeWorkflowTabId).source, 'gallery'); + }); + } + } + } finally { + flow.setState(previousFlow); + studio.setState(previousStudio); + } +}); + +test('legacy ordinary snapshots without a recognized form still infer their graph summary', async (t) => { + const previousFlow = flow.getState(); + const previousStudio = studio.getState(); + try { + for (const supplied of [undefined, { mode: 'unknown-mode', modelType: 'unknown-model' }]) { + await t.test(supplied ? 'unrecognized legacy form' : 'bare graph', () => { + const snapshot = ordinaryImageSnapshot('modules.ImageOperations', 'ProcessImage', 'expert'); + if (supplied) snapshot.studioForm = supplied; + else delete snapshot.studioForm; + delete snapshot.selectedMode; + studio.setState({ workflowTabs: [], activeWorkflowTabId: 'legacy-image' }); + studio.getState().mergeBackendWorkflow({ + id: 'legacy-image', + title: 'Legacy image graph', + source: 'import', + createdAt: 1, + updatedAt: 2, + revision: 1, + snapshot, + }); + assert.equal(studio.getState().form.modelType, 'BuiltinImageOperation'); + assert.equal(studio.getState().form.mode, 'image_upscale'); + assert.equal(studio.getState().form.prompt, 'Current graph caption'); + assert.equal(studio.getState().graphBinding, null); + }); + } + } finally { + flow.setState(previousFlow); + studio.setState(previousStudio); + } +}); + +test('restored selectedMode remains the existing mirror of its saved form mode', () => { + const previousFlow = flow.getState(); + const previousStudio = studio.getState(); + try { + const id = studio + .getState() + .createWorkflowTab( + 'Legacy mode mirror', + ordinaryImageSnapshot('modules.ImageOperations', 'ProcessImage', 'expert'), + 'import', + ); + const original = structuredClone(tab(id)); + original.snapshot.selectedMode = 'text_to_image'; + assert.notEqual(original.snapshot.selectedMode, original.snapshot.studioForm.mode); + studio.setState({ workflowTabs: [], activeWorkflowTabId: id }); + studio.getState().mergeBackendWorkflow({ ...original, revision: 2 }); + assert.deepEqual(tab(id).snapshot.studioForm, original.snapshot.studioForm); + assert.equal(studio.getState().selectedMode, original.snapshot.studioForm.mode); + assert.equal(tab(id).snapshot.selectedMode, original.snapshot.studioForm.mode); + } finally { + flow.setState(previousFlow); + studio.setState(previousStudio); + } +}); + +test('explicit ordinary model, task and form edits still persist through the autosave chain', async () => { + const previousFlow = flow.getState(); + const previousStudio = studio.getState(); + const previousFetch = globalThis.fetch; + try { + const id = studio + .getState() + .createWorkflowTab( + 'Editable ordinary document', + ordinaryImageSnapshot('modules.ImageOperations', 'ProcessImage', 'expert'), + 'import', + ); + studio.getState().saveActiveWorkflowTab(false); + sync.markBackendWorkflow(tab(id)); + const originalGraph = structuredClone({ nodes: tab(id).snapshot.nodes, edges: tab(id).snapshot.edges }); + const requests = []; + globalThis.fetch = async (_url, options) => { + requests.push(JSON.parse(options.body)); + return response({ ...record(tab(id)), revision: 2 }); + }; + studio.getState().updateForm({ + modelType: 'BuiltinImageOperation', + mode: 'image_stitch', + prompt: 'An intentional new caption', + seed: 987, + steps: 23, + }); + studio.getState().saveActiveWorkflowTab(true); + const authoredForm = structuredClone(studio.getState().form); + sync.queueWorkflowPut(tab(id), (error) => assert.fail(String(error))); + await new Promise(setImmediate); + assert.equal(requests.length, 1); + assert.deepEqual(requests[0].snapshot.studioForm, authoredForm); + assert.equal(requests[0].snapshot.studioForm.mode, 'image_stitch'); + assert.equal(requests[0].snapshot.selectedMode, 'image_stitch'); + assert.deepEqual({ nodes: tab(id).snapshot.nodes, edges: tab(id).snapshot.edges }, originalGraph); + assert.equal(tab(id).dirty, false); + } finally { + globalThis.fetch = previousFetch; + flow.setState(previousFlow); + studio.setState(previousStudio); + } +}); + +test('a genuinely new tab skips its first GET and consumes its marker before the ordinary PUT', async () => { + const id = studio.getState().createWorkflowTab(); + const t = tab(id); + const calls = []; + globalThis.fetch = async (url, options) => { + calls.push([String(url), options?.method ?? 'GET']); + assert.equal(origin.isFreshWorkflowId(id), false); + return response(record(t)); + }; + assert.equal(origin.isFreshWorkflowId(id), true); + assert.equal(await sync.readWorkflowForHydration(t), null); + assert.deepEqual(calls, []); + await sync.saveDetachedWorkflowNow(t); + assert.deepEqual( + calls.map((x) => x[1]), + ['PUT'], + ); + assert.equal(origin.isFreshWorkflowId(id), false); +}); + +test('restored legacy revision-zero/source-new documents still read remote authority', async () => { + studio.getState().ensureWorkflowTabs(); + const fresh = tab(studio.getState().activeWorkflowTabId); + const restored = { ...fresh, id: 'restored-document', backendRevision: 0, source: 'new' }; + studio.setState({ workflowTabs: [restored], activeWorkflowTabId: restored.id }); + const calls = []; + globalThis.fetch = async (url, options) => { + calls.push(options?.method ?? 'GET'); + return response({ ...record(restored), title: 'Actual remote title' }); + }; + assert.equal(origin.isFreshWorkflowId(restored.id), false); + assert.equal((await sync.readWorkflowForHydration(restored)).title, 'Actual remote title'); + assert.deepEqual(calls, ['GET']); +}); + +test('lost PUT response consumes fresh authority so retry reads the document the server may have saved', async () => { + const id = studio.getState().createWorkflowTab(); + const t = tab(id); + const calls = []; + globalThis.fetch = async (url, options) => { + calls.push(options?.method ?? 'GET'); + if (options?.method === 'PUT') throw new TypeError('PUT response lost after server save'); + return response({ ...record(t), title: 'Saved by first PUT' }); + }; + assert.equal(await sync.readWorkflowForHydration(t), null); + await assert.rejects(sync.saveDetachedWorkflowNow(t), /PUT response lost/); + assert.equal(origin.isFreshWorkflowId(id), false); + assert.equal((await sync.readWorkflowForHydration(t)).title, 'Saved by first PUT'); + assert.deepEqual(calls, ['PUT', 'GET']); +}); + +test('cancel before first PUT retains fresh authority; aborted dispatch makes StrictMode retry read', async () => { + const id = studio.getState().createWorkflowTab(); + const t = tab(id); + const abort = new AbortController(); + abort.abort(); + assert.equal(await sync.readWorkflowForHydration(t, abort.signal), null); + assert.equal(origin.isFreshWorkflowId(id), true); + const calls = []; + globalThis.fetch = async (url, options) => { + calls.push(options?.method ?? 'GET'); + if (options?.method === 'PUT') throw new DOMException('Page lifecycle ended', 'AbortError'); + return response(record(t)); + }; + await assert.rejects(sync.saveDetachedWorkflowNow(t)); + await sync.readWorkflowForHydration(t); + assert.deepEqual(calls, ['PUT', 'GET']); +}); + +test('all three fresh creation paths mark IDs, while closing, deletion and acknowledgement clear them', () => { + studio.getState().ensureWorkflowTabs(); + const first = studio.getState().activeWorkflowTabId; + assert.equal(origin.isFreshWorkflowId(first), true); + studio.getState().closeWorkflowTab(first); + const replacement = studio.getState().activeWorkflowTabId; + assert.notEqual(replacement, first); + assert.equal(origin.isFreshWorkflowId(first), false); + assert.equal(origin.isFreshWorkflowId(replacement), true); + const created = studio.getState().createWorkflowTab(); + assert.equal(origin.isFreshWorkflowId(created), true); + sync.markBackendWorkflow(tab(created)); + assert.equal(origin.isFreshWorkflowId(created), false); + sync.forgetBackendWorkflow(replacement); + assert.equal(origin.isFreshWorkflowId(replacement), false); +}); + +test('a restored current-document ID never acquires freshness from backendRevision or local serialization', () => { + const id = studio.getState().createWorkflowTab(); + const serialized = JSON.stringify(tab(id)); + origin.forgetFreshWorkflowId(id); + const restored = JSON.parse(serialized); + studio.setState({ workflowTabs: [restored], activeWorkflowTabId: id }); + assert.equal(origin.isFreshWorkflowId(id), false); + assert.equal(serialized.includes('FreshWorkflow'), false); +}); + +for (const scenario of [ + { name: 'bare graph without viewport', format: 'graph', expected: { x: 0, y: 0, zoom: 1 } }, + { name: 'saved snapshot without viewport', format: 'snapshot' }, + { name: 'normal export package without viewport', format: 'package' }, + { name: 'saved snapshot with a valid viewport', format: 'snapshot', viewport: { x: -50, y: 80, zoom: 0.6 } }, + { name: 'saved snapshot with null viewport', format: 'snapshot', viewport: null }, + { name: 'saved snapshot with invalid zoom', format: 'snapshot', viewport: { x: 10, y: 20, zoom: 0 } }, +]) { + test(`workflow import viewport: ${scenario.name} retains the graph and reports success`, async () => { + const previousFlow = flow.getState(); + const previousStudio = studio.getState(); + const previousFetch = globalThis.fetch; + const currentViewport = { x: 25, y: -30, zoom: 0.75 }; + const operationAuthoring = { + schemaVersion: 1, + operation: { pipelineClass: 'TestPipeline', task: 'edit_image', operationId: 'image.load' }, + authored: ['file'], + }; + // Import preserves opaque operation provenance; it grants no execution. + const graph = { + nodes: [ + { + id: 'retained-source', + type: 'custom', + position: { x: 10, y: 20 }, + data: { + type: 'custom', + module: 'modules.Image', + action: 'Load', + label: 'Retained source', + params: { + file: { type: 'str', display: 'filebrowser', value: ['images/retained.png'] }, + device: { type: 'string', value: 'cpu:0', default: 'cpu' }, + image: { type: 'image', display: 'output' }, + }, + operationAuthoring, + }, + }, + { + id: 'retained-preview', + type: 'custom', + position: { x: 300, y: 20 }, + data: { + type: 'custom', + module: 'modules.Image', + action: 'Preview', + label: 'Retained preview', + params: { + image: { type: 'image', display: 'input' }, + device: { type: 'string', value: 'cpu:0', default: 'cpu' }, + }, + }, + }, + ], + edges: [ + { + id: 'retained-wire', + source: 'retained-source', + sourceHandle: 'image', + target: 'retained-preview', + targetHandle: 'image', + }, + ], + ...(Object.hasOwn(scenario, 'viewport') ? { viewport: scenario.viewport } : {}), + }; + const originalGraph = structuredClone(graph); + const form = { ...defaultForm, resourceMode: 'expert' }; + const value = + scenario.format === 'snapshot' + ? { + ...graph, + studioForm: form, + studioGraphBinding: null, + selectedMode: form.mode, + activeTemplateId: null, + sourceOutputId: null, + } + : scenario.format === 'package' + ? packages.buildWorkflowPackage({ graph, form }) + : graph; + const requests = []; + try { + globalThis.fetch = async (...args) => { + requests.push(args); + throw new Error('Import must not dispatch.'); + }; + flow.setState({ nodes: [], edges: [], viewport: { ...currentViewport } }); + studio.setState({ form: { ...studio.getState().form, device: 'cuda:0' } }); + const previousViewport = flow.getState().viewport; + for (const toast of notifications.getToastItems()) notifications.closeSnackbar(toast.id); + let handleDrop; + function ImportProbe() { + ({ handleDrop } = drops.useWorkflowDrop({ + addNode: () => assert.fail('A workflow import must not insert an unrelated node.'), + createWorkflowTab: studio.getState().createWorkflowTab, + edgeType: 'default', + nodesRegistry: {}, + screenToFlowPosition: (position) => position, + })); + return null; + } + renderToStaticMarkup(React.createElement(ImportProbe)); + const before = studio.getState().workflowTabs.length; + await handleDrop({ + preventDefault() {}, + dataTransfer: { + files: { + length: 1, + item: () => new File([JSON.stringify(value)], 'Imported.json', { type: 'application/json' }), + }, + }, + }); + assert.equal(studio.getState().workflowTabs.length, before + 1); + assert.deepEqual( + notifications.getToastItems().map(({ message, variant }) => ({ message, variant })), + [{ message: 'Workflow opened as a new tab', variant: 'success' }], + ); + assert.deepEqual( + flow.getState().nodes.map((node) => node.id), + graph.nodes.map((node) => node.id), + ); + assert.deepEqual(flow.getState().nodes[0].data.operationAuthoring, operationAuthoring); + assert.deepEqual(flow.getState().nodes[0].data.params.file.value, ['images/retained.png']); + for (const node of flow.getState().nodes) { + assert.deepEqual(node.data.params.device, graph.nodes.find(({ id }) => id === node.id).data.params.device); + } + assert.deepEqual( + flow.getState().edges.map(({ id, source, sourceHandle, target, targetHandle }) => ({ + id, + source, + sourceHandle, + target, + targetHandle, + })), + graph.edges, + ); + assert.deepEqual( + flow.getState().viewport, + scenario.expected ?? (scenario.viewport?.zoom > 0 ? scenario.viewport : currentViewport), + ); + assert.notEqual(flow.getState().viewport, previousViewport); + assert.deepEqual(graph, originalGraph); + assert.deepEqual(requests, []); + } finally { + flow.setState(previousFlow); + studio.setState(previousStudio); + globalThis.fetch = previousFetch; + } + }); +} diff --git a/scripts/workflow-hydration-lifecycle.test.mjs b/scripts/workflow-hydration-lifecycle.test.mjs new file mode 100644 index 00000000..26dbb9cf --- /dev/null +++ b/scripts/workflow-hydration-lifecycle.test.mjs @@ -0,0 +1,155 @@ +import assert from 'node:assert/strict'; +import { after, before, test } from 'node:test'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { createServer } from 'vite'; +import { chromium } from 'playwright'; + +const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); +const PROBE = '\0workflow-hydration-lifecycle-test'; +let frontend; +let browser; +let origin; + +before(async () => { + frontend = await createServer({ + root: ROOT, + configFile: false, + logLevel: 'silent', + cacheDir: path.join(ROOT, 'node_modules/.vite-workflow-hydration-lifecycle'), + optimizeDeps: { include: ['react', 'react-dom/client'], entries: [], noDiscovery: true }, + server: { host: '127.0.0.1', port: 0, watch: null, hmr: false }, + appType: 'custom', + plugins: [ + { + name: 'mounted-workflow-hydration-lifecycle-test', + enforce: 'pre', + resolveId(id, importer) { + if (id === '/workflow-hydration-test.js') return PROBE; + if (!importer?.replaceAll('\\', '/').endsWith('/src/studio/useWorkflowBackendSync.ts')) return; + if (id === '../stores/useStudioStore') return '\0hydration-test-studio'; + if (id === '../stores/useNodeStore') return '\0hydration-test-nodes'; + if (id === './templateExactness') return '\0hydration-test-signature'; + }, + load(id) { + // Keep the actual hook, React effects and requestJson transport. These selector/merge + // stubs isolate lifecycle ownership from the separately tested document merge rules. + if (id === '\0hydration-test-studio') + return `export const useStudioStore = selector => selector(window.hydrationTest.state); + useStudioStore.getState = () => window.hydrationTest.state; + useStudioStore.setState = () => { throw Error('Unexpected document state write'); };`; + if (id === '\0hydration-test-nodes') + return `export const useNodesStore = {getState: () => ({nodesRegistry:{}})};`; + if (id === '\0hydration-test-signature') return `export {stableStringify} from '/src/studio/stableHash.ts';`; + if (id !== PROBE) return; + return ` + import React from 'react'; + import { createRoot } from 'react-dom/client'; + import { useWorkflowBackendSync } from '/src/studio/useWorkflowBackendSync.ts'; + const state = window.hydrationTest = { requests: [], warnings: [], merges: [] }; + const originalWarn = console.warn; + console.warn = (...args) => { state.warnings.push(args.map(String)); originalWarn(...args); }; + state.tab = {id:'lifecycle-test',title:'Lifecycle test',createdAt:1,updatedAt:2,dirty:true, + source:'manual',backendRevision:7,snapshot:{nodes:[],edges:[], + studioForm:{prompt:'Keep local dirty prompt'},selectedMode:'text_to_image'}}; + state.state = {workflowTabs:[state.tab],workflowCanvasHydrated:true,workflowCanvasEpoch:1, + mergeBackendWorkflow: tab => state.merges.push(tab)}; + window.fetch = (url, init = {}) => new Promise((resolve, reject) => { + const request = {url:String(url),method:init.method || 'GET',signal:init.signal, + fail: () => reject(new TypeError('Failed to fetch'))}; + state.requests.push(request); + if (init.signal?.aborted) reject(init.signal.reason); + else init.signal?.addEventListener('abort', () => reject(init.signal.reason), {once:true}); + }); + function Probe() { useWorkflowBackendSync(); return React.createElement('p',null,'mounted'); } + const owner = createRoot(document.getElementById('root')); + owner.render(React.createElement(Probe)); + state.unmount = () => owner.unmount(); + `; + }, + configureServer(server) { + server.middlewares.use((request, response, next) => { + if (request.url !== '/hydration-test') return next(); + response.setHeader('Content-Type', 'text/html'); + response.end('
'); + }); + }, + }, + ], + }); + await frontend.listen(); + origin = `http://127.0.0.1:${frontend.httpServer.address().port}`; + browser = await chromium.launch({ headless: true }); +}); + +after(async () => { + await browser?.close(); + await frontend?.close(); +}); + +for (const kind of [ + 'nonpersisted-pagehide', + 'effect-unmount', + 'live-failure', + 'persisted-pagehide', + 'failure-before-pagehide', + 'failure-before-unmount', +]) { + test(`mounted workflow hydration handles ${kind} without losing its dirty document`, async () => { + const page = await browser.newPage(); + const errors = []; + page.on('pageerror', (error) => errors.push(String(error))); + try { + await page.goto(`${origin}/hydration-test`); + await page.waitForFunction(() => window.hydrationTest?.requests.length === 1); + const before = await page.evaluate(() => JSON.stringify(window.hydrationTest.tab)); + if (kind === 'nonpersisted-pagehide') { + await page.evaluate(() => { + window.dispatchEvent(new PageTransitionEvent('pagehide', { persisted: false })); + window.hydrationTest.requests[0].fail(); + }); + } else if (kind === 'effect-unmount') { + await page.evaluate(() => window.hydrationTest.unmount()); + } else if (kind === 'persisted-pagehide') { + await page.evaluate(() => { + window.dispatchEvent(new PageTransitionEvent('pagehide', { persisted: true })); + window.hydrationTest.requests[0].fail(); + }); + } else { + await page.evaluate(() => window.hydrationTest.requests[0].fail()); + if (kind === 'failure-before-pagehide' || kind === 'failure-before-unmount') { + await page.waitForFunction(() => window.hydrationTest.warnings.length === 1); + if (kind === 'failure-before-pagehide') + await page.evaluate(() => window.dispatchEvent(new PageTransitionEvent('pagehide', { persisted: false }))); + else await page.evaluate(() => window.hydrationTest.unmount()); + } + } + // Observe the real two-second retry deadline, including teardown after it was scheduled. + await page.waitForTimeout(2200); + const observed = await page.evaluate(() => ({ + requests: window.hydrationTest.requests.length, + warnings: window.hydrationTest.warnings, + aborted: window.hydrationTest.requests[0].signal.aborted, + merges: window.hydrationTest.merges, + document: JSON.stringify(window.hydrationTest.tab), + })); + assert.deepEqual(errors, []); + assert.equal(observed.document, before); + assert.deepEqual(observed.merges, []); + const expectsWarning = [ + 'live-failure', + 'persisted-pagehide', + 'failure-before-pagehide', + 'failure-before-unmount', + ].includes(kind); + const expectsRetry = ['live-failure', 'persisted-pagehide'].includes(kind); + assert.equal(observed.warnings.length, expectsWarning ? 1 : 0); + if (expectsWarning) assert.match(observed.warnings[0][1], /RequestError: Failed to fetch/u); + assert.equal(observed.requests, expectsRetry ? 2 : 1, 'a retired hydration must not start another request'); + // A settled failed transport has already removed its forwarded-abort listener. + assert.equal(observed.aborted, ['nonpersisted-pagehide', 'effect-unmount'].includes(kind)); + } finally { + await page.close(); + } + }); +} diff --git a/scripts/workflow-library-auxiliary-sources.mjs b/scripts/workflow-library-auxiliary-sources.mjs new file mode 100644 index 00000000..9699407e --- /dev/null +++ b/scripts/workflow-library-auxiliary-sources.mjs @@ -0,0 +1,44 @@ +import { canonicalAuxiliaryTerminalBinding } from './workflow-library-dead-nodes.mjs'; + +/** Parse independent backend source declarations; never use manifest metadata + * as authority for an auxiliary execution terminal. */ +export async function parseCanonicalAuxiliarySources(payload, selectedCapabilities, moduleServer) { + const selected = new Set(selectedCapabilities.map((capability) => capability.modelType)); + const capabilities = payload.capabilities.filter( + (capability) => + selected.has(capability.modelType) && + capability.studioExecutionSpecs?.some((spec) => spec.auxiliaryTerminalRoles?.length), + ); + if (capabilities.length === 0) return { sources: new Map(), unpackGraph: (graph) => graph }; + const specParser = await moduleServer.ssrLoadModule('/src/studio/executionSpecs.ts'); + const operationParser = await moduleServer.ssrLoadModule('/src/workflow/operationContracts.ts'); + const { unpackVisualOperationGroups } = await moduleServer.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + const operationContracts = operationParser.parseOperationContracts( + payload.operationContracts, + payload.operationContractSchemaVersion, + ); + const sources = new Map( + capabilities.flatMap((capability) => + specParser + .parseStudioExecutionSpecs( + capability.studioExecutionSpecs, + capability.modelType, + capability.runnableModes, + capability.executionProfiles, + ) + .filter((executionSpec) => executionSpec.auxiliaryTerminalRoles?.length) + .map((executionSpec) => [ + `${executionSpec.modelType}|${executionSpec.mode}`, + { executionSpec, operationContracts }, + ]), + ), + ); + return { sources, unpackGraph: (graph) => unpackVisualOperationGroups(graph).graph }; +} + +export function attachCanonicalAuxiliaryBinding(record, graph, parsed) { + const source = parsed.sources.get(`${record.modelType}|${record.mode}`); + if (source) + record.auxiliaryTerminalBinding = canonicalAuxiliaryTerminalBinding(record, parsed.unpackGraph(graph), source); + return record; +} diff --git a/scripts/workflow-library-canonical-export.test.mjs b/scripts/workflow-library-canonical-export.test.mjs new file mode 100644 index 00000000..31339aa1 --- /dev/null +++ b/scripts/workflow-library-canonical-export.test.mjs @@ -0,0 +1,1257 @@ +import assert from 'node:assert/strict'; +import { execFileSync } from 'node:child_process'; +import { readFileSync } from 'node:fs'; +import path from 'node:path'; +import { after, before, test } from 'node:test'; +import { createServer } from 'vite'; +import { + applyPortableContracts, + sanitizeCanonicalWorkflowGraph, + canonicalizeGraphIds, +} from './workflow-library-generator.mjs'; +import { retainExistingCanonicalDeviceDefaults } from './workflow-library-contract.mjs'; +import { canonicalGraphIdentity } from './live-proof-provenance.mjs'; +import { selectReviewedExperimentalWorkflows } from './workflow-library-manifest-state.mjs'; + +test('portable workflow export preserves the independent tasks of model stages', () => { + const stage = (module, action, value) => ({ + data: { module, action, params: value ? { mode: { value } } : {} }, + }); + const graph = { + nodes: [ + stage('modules.DiffusersAudio', 'LoadPipeline', 'text_to_audio'), + stage('modules.DiffusersVideo', 'Generate', 'text_to_video'), + stage('modules.DiffusersVideo', 'Generate', 'image_to_video'), + stage('modules.DiffusersVideo', 'GenerateVideoAudio'), + ], + }; + const output = applyPortableContracts(graph, 'text_to_video'); + assert.deepEqual( + output.nodes.map(({ data }) => data.params.mode.value), + ['text_to_audio', 'text_to_video', 'image_to_video', 'text_to_video'], + ); + const soundtrack = stage('modules.DiffusersAudio', 'LoadPipeline'); + soundtrack.data.params.mode = { default: 'text_to_audio', options: ['text_to_audio', 'audio_variation'] }; + applyPortableContracts({ nodes: [soundtrack] }, 'text_to_video'); + assert.equal(soundtrack.data.params.mode.value, 'text_to_audio'); + soundtrack.data.params.mode.value = 'text_to_video'; + assert.throws(() => applyPortableContracts({ nodes: [soundtrack] }, 'text_to_video'), /Invalid portable task/u); +}); + +test('repeated shot processors retain only unanimous fallback defaults with unchanged multiplicity', () => { + const make = (id, fallback) => ({ + id, + data: { + module: 'modules.Images', + action: 'Upscale', + params: { device: { value: 'cuda:0', default: fallback, options: ['cpu', 'cuda:0'] } }, + }, + }); + const original = { nodes: [make('old-a', 'cpu'), make('old-b', 'cpu')] }; + const fresh = { nodes: [make('new-b', 'cuda:0'), make('new-a', 'cuda:0')] }; + retainExistingCanonicalDeviceDefaults(fresh, original); + assert.deepEqual( + fresh.nodes.map((n) => n.data.params.device.default), + ['cpu', 'cpu'], + ); + assert.deepEqual( + fresh.nodes.map((n) => n.data.params.device.value), + ['cuda:0', 'cuda:0'], + ); + assert.throws( + () => retainExistingCanonicalDeviceDefaults({ nodes: [make('one', 'cuda:0')] }, original), + /unambiguous/, + ); + assert.throws( + () => retainExistingCanonicalDeviceDefaults(fresh, { nodes: [make('a', 'cpu'), make('b', 'cuda:0')] }), + /unambiguous/, + ); +}); +import { canonicalExecutableWorkflowGraph, loadCanonicalWorkflowExpander } from './canonical-workflow-execution.mjs'; + +let server, hooks, flowStore, groups, blockSchema, blockRuntime, graphNodeControlParams; +let modelSetupControlGroupLabel, modelSetupControlPresentation; +const modelSetupControlParams = (...args) => modelSetupControlPresentation(...args).params; +let fixture, templates, builder, defaults, exactness, operations; +let requests; +let shared; +const ids = ['qwen_text_rendering', 'cosmos3_super_text_to_image', 'qwen_outpaint_aspect_template']; + +before(async () => { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, value), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { + location: { origin: 'http://127.0.0.1:5191' }, + localStorage: globalThis.localStorage, + dispatchEvent: () => true, + }; + server = await createServer({ + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + const all = (await server.ssrLoadModule('/src/studio/templates.ts')).STUDIO_TEMPLATES; + templates = ids.map((id) => all.find((item) => item.id === id)); + assert.ok(templates.every(Boolean)); + ({ useFlowStore: flowStore } = await server.ssrLoadModule('/src/stores/useFlowStore.ts')); + groups = await server.ssrLoadModule('/src/workflow/visualOperationGroups.ts'); + blockRuntime = await server.ssrLoadModule('/src/studio/blockRuntimeV2.ts'); + ({ modelSetupControlGroupLabel, modelSetupControlPresentation } = await server.ssrLoadModule( + '/src/workflow/modelSetupControlPresentation.ts', + )); + ({ graphNodeControlParams } = await server.ssrLoadModule('/src/studio/graphNodeControls.ts')); + shared = await server.ssrLoadModule('/src/workflow/operationSharedInputs.ts'); + blockSchema = await server.ssrLoadModule('/src/studio/blockSchemaV2.ts'); + builder = await server.ssrLoadModule('/src/studio/templateOperationWorkflow.ts'); + exactness = await server.ssrLoadModule('/src/studio/templateExactness.ts'); + requests = await server.ssrLoadModule('/src/workflow/operationStarterRequest.ts'); + operations = await server.ssrLoadModule('/src/workflow/operationContracts.ts'); + ({ DEFAULT_STUDIO_FORM: defaults } = await server.ssrLoadModule('/src/studio/modelProfiles.ts')); + const e2e = await server.ssrLoadModule('/src/utils/e2eHooks.ts'); + e2e.installE2EHooks(); + hooks = window.__MODIFF_E2E__; + assert.ok(hooks); + const python = process.env.MODIFF_BACKEND_PYTHON; + assert.ok(python, 'Use the declared ordinary CPU schema fixture environment.'); + fixture = JSON.parse( + execFileSync(python, [path.resolve('scripts/template-operation-fixtures.py')], { + cwd: path.resolve('../MoDiff'), + encoding: 'utf8', + maxBuffer: 64 * 1024 * 1024, + input: JSON.stringify(templates.map((item) => ({ id: item.id, selection: item.executionSelection }))), + env: { ...process.env, PYTHONDONTWRITEBYTECODE: '1' }, + }), + ); +}); +after(async () => server?.close()); + +test('pair regeneration preserves canonical device defaults without changing authored controls or identities', () => { + const loader = (device) => ({ + id: 'loader', + data: { + module: 'modules.ModularDiffusers', + action: 'ModelsLoader', + params: { device: { type: 'str', value: 'cuda:0', options: { 'cpu:0': {}, 'cuda:0': {} } } }, + operationAuthoring: { + operation: { operationId: 'diffusion.load_models', binding: { values: { model_type: 'Example' } } }, + defaults: { device, dtype: 'bfloat16' }, + }, + }, + }); + const preview = (device) => ({ + id: 'preview', + data: { + module: 'modules.Image', + action: 'Preview', + params: { device: { type: 'str', default: device, options: { 'cpu:0': {}, 'cuda:0': {} } } }, + }, + }); + const original = { nodes: [loader('cpu:0'), preview('cpu:0')], edges: [] }; + const regenerated = { nodes: [preview('cuda:0'), loader('cuda:0')], edges: [] }; + const before = structuredClone(regenerated); + const retained = retainExistingCanonicalDeviceDefaults(regenerated, original); + assert.equal(retained.nodes[0].data.params.device.default, 'cpu:0'); + assert.equal(retained.nodes[1].data.operationAuthoring.defaults.device, 'cpu:0'); + assert.equal(retained.nodes[1].data.params.device.value, 'cuda:0', 'The authored CUDA selection is retained.'); + assert.deepEqual( + retained.nodes[1].data.operationAuthoring.operation, + before.nodes[1].data.operationAuthoring.operation, + ); + assert.deepEqual(retained.nodes[1].data.params, before.nodes[1].data.params); + assert.deepEqual(retained.nodes[0].data.params.device.options, before.nodes[0].data.params.device.options); + assert.deepEqual( + original.nodes.map((node) => node.id), + ['loader', 'preview'], + 'The existing graph is not mutated.', + ); + const changedIdentity = structuredClone(before); + changedIdentity.nodes[1].data.operationAuthoring.operation.binding.values.model_type = 'Different'; + retainExistingCanonicalDeviceDefaults(changedIdentity, original); + assert.equal(changedIdentity.nodes[1].data.operationAuthoring.defaults.device, 'cuda:0'); + const ambiguous = structuredClone(before); + ambiguous.nodes.push(structuredClone(ambiguous.nodes[0])); + assert.throws(() => retainExistingCanonicalDeviceDefaults(ambiguous, original), /unambiguous/); + assert.deepEqual(ambiguous.nodes[0], before.nodes[0], 'A rejected migration must not partially alter defaults.'); + const incompatible = structuredClone(before); + incompatible.nodes[0].data.params.device.options = { 'cuda:0': {} }; + assert.throws(() => retainExistingCanonicalDeviceDefaults(incompatible, original), /unavailable/); + assert.equal(incompatible.nodes[1].data.operationAuthoring.defaults.device, 'cuda:0'); + const added = preview('cuda:0'); + added.data.action = 'NewPreview'; + const freshStage = { nodes: [added], edges: [] }; + retainExistingCanonicalDeviceDefaults(freshStage, original); + assert.equal(added.data.params.device.default, 'cuda:0', 'New stages retain their declared fresh defaults.'); +}); + +test('canonical sanitization preserves weight-loading selectors and existing portable device semantics', () => { + for (const mode of ['cpu', 'cuda']) { + const selector = { + type: 'string', + default: mode, + value: mode, + options: [ + { schemaVersion: 1, value: 'cpu', label: 'cpu', compatibility: 'compatible' }, + { schemaVersion: 1, value: 'cuda', label: 'cuda', compatibility: 'compatible' }, + ], + fieldOptions: { controlTier: 'advanced' }, + }; + const graph = { + nodes: [ + { + id: 'models', + data: { + module: 'modules.ModularDiffusers', + action: 'ModelsLoader', + params: { + weight_loading_mode: selector, + device: { default: 'cuda:1', value: 'cuda:1', options: ['cpu:0', 'cuda:1'] }, + device_map: { default: 'cpu', value: 'cuda', options: ['cpu', 'cuda'] }, + unrelated: { value: 'cuda:1' }, + }, + operationAuthoring: { defaults: { weight_loading_mode: mode, device: 'cuda:1' } }, + }, + }, + ], + edges: [], + }; + const before = structuredClone(graph); + const data = sanitizeCanonicalWorkflowGraph(graph).nodes[0].data; + assert.deepEqual(data.params.weight_loading_mode, selector, 'Enum values/defaults/options are not device IDs.'); + assert.deepEqual(data.operationAuthoring.defaults, graph.nodes[0].data.operationAuthoring.defaults); + assert.deepEqual(data.params.device, graph.nodes[0].data.params.device); + assert.deepEqual(data.params.device_map, graph.nodes[0].data.params.device_map); + assert.equal(data.params.unrelated.value, 'cpu:0', 'Existing unrelated device-token normalization is retained.'); + assert.deepEqual(graph, before, 'Canonical sanitization does not mutate the saved graph.'); + } +}); + +function build(id) { + const template = templates.find((item) => item.id === id); + const row = fixture.recipes.find((item) => item.id === id); + const contracts = operations.parseOperationContracts( + fixture.publicPayload.operationContracts, + fixture.publicPayload.operationContractSchemaVersion, + ); + const starter = requests.parseOperationStarter( + row.starter, + row.starter.pipelineClass, + row.starter.task, + contracts, + template.executionSelection, + ); + const device = starter.nodes.find((item) => item.operation.decomposition === 'loader').node.params.device; + const form = { + ...defaults, + ...exactness.getTemplateLockedSettings(template), + device: device.value ?? device.default, + autoOffload: false, + offloadMode: 'none', + }; + return builder.createTemplateOperationGraph( + template, + form, + starter, + fixture.registry, + row.spec, + fixture.capabilities.find((item) => item.modelType === template.modelType), + ); +} + +function semanticApi(graph) { + const api = flowStore + .getState() + .exportGraph('canonical-export-contract', undefined, { sourceGraph: graph, randomizeSeeds: false }); + const names = new Map(Object.entries(api.nodes).map(([id, node]) => [id, `${node.module}.${node.action}`])); + assert.equal(new Set(names.values()).size, names.size, 'These independently chosen witnesses have unique actions.'); + return Object.entries(api.nodes) + .map(([id, node]) => ({ + identity: names.get(id), + params: Object.fromEntries( + Object.entries(node.params).map(([key, param]) => [ + key, + param && typeof param === 'object' && 'sourceId' in param + ? { ...param, sourceId: names.get(param.sourceId) } + : param, + ]), + ), + })) + .sort((a, b) => a.identity.localeCompare(b.identity)); +} + +test('canonical library regrouping preserves ordered executable identity for independent inputs', () => { + const backend = path.resolve(process.env.MODIFF_BACKEND_DIR || '../MoDiff'); + const manifest = JSON.parse(readFileSync(path.join(backend, 'data/workflow-library-manifest.json'), 'utf8')); + const witnesses = [ + 'AceStepAudioPipeline:audio_continuation', + 'FluxCannyPipeline:control_image', + 'FluxFillPipeline:inpaint', + 'FluxReduxPipeline:multi_image_reference_edit', + ]; + for (const id of witnesses) { + const row = manifest.workflows.find((item) => item.id === id); + assert.ok(row, id); + const graph = JSON.parse(readFileSync(path.join(backend, 'data/graphs', row.graphPath), 'utf8')); + const original = structuredClone(graph); + const grouped = groups.groupNewOperationGraph(graph); + const identity = (sourceGraph) => + canonicalGraphIdentity( + flowStore + .getState() + .exportGraph('library-presentation-regression', undefined, { sourceGraph, randomizeSeeds: false }), + ); + assert.deepEqual(identity(grouped), identity(graph), `${id}: inputs, references and execution order must survive`); + assert.deepEqual(graph, original, `${id}: the shipped source must not be mutated`); + } +}); + +test('whole-pipeline examples fold connected runtime settings into the shared Model Setup', () => { + const backend = path.resolve(process.env.MODIFF_BACKEND_DIR || '../MoDiff'); + for (const relative of [ + 'studio/sana-sprint-pipeline/text-to-image.json', + 'studio/stable-diffusion-pipeline/text-to-image.json', + ]) { + const graph = JSON.parse(readFileSync(path.join(backend, 'data/graphs', relative), 'utf8')); + const original = structuredClone(graph); + const grouped = groups.groupNewOperationGraph(graph); + const setup = grouped.nodes.find((node) => groups.visualOperationGroup(node) === 'setup'); + assert.ok(setup, relative); + assert.deepEqual(setup.data.blockInstanceV2.effectiveGraph.nodes.map((node) => node.data.action).sort(), [ + 'DiffusersExecutionRecipe', + 'LoadPipeline', + 'PipelineQuantizationConfigV2', + ]); + const identity = (sourceGraph) => + canonicalGraphIdentity( + flowStore + .getState() + .exportGraph('whole-pipeline-presentation', undefined, { sourceGraph, randomizeSeeds: false }), + ); + assert.deepEqual(identity(grouped), identity(graph)); + assert.equal( + setup.data.blockInstanceV2.effectiveInterface.boundary.outputs.some((port) => + ['execution_recipe', 'quantization_config'].includes(port.binding.fieldOrPortId), + ), + false, + 'Connections used only inside Model Setup are not duplicate public sockets.', + ); + const recipe = setup.data.blockInstanceV2.effectiveGraph.nodes.find( + (node) => node.data.action === 'DiffusersExecutionRecipe', + ); + assert.ok( + setup.data.blockInstanceV2.effectiveInterface.controls.some( + (control) => control.binding.nodeId === recipe.nodeId && control.binding.fieldId === 'offload_mode', + ), + ); + const shared = structuredClone(graph); + shared.edges.push({ + ...shared.edges.find((edge) => edge.source === 'node-04'), + id: 'shared-recipe', + target: 'node-01', + targetHandle: 'other_recipe', + }); + const sharedSetup = groups + .groupNewOperationGraph(shared) + .nodes.find((node) => groups.visualOperationGroup(node) === 'setup'); + assert.ok(sharedSetup); + assert.deepEqual( + sharedSetup.data.blockInstanceV2.effectiveGraph.nodes.map((node) => node.data.action), + ['LoadPipeline'], + 'A shared supplier and its own supplier remain outside.', + ); + const invalid = structuredClone(graph); + invalid.nodes.find((node) => node.data.action === 'LoadPipeline').data.params.pipeline.type = 'unreviewed_pipeline'; + assert.equal( + groups.groupNewOperationGraph(invalid).nodes.some((node) => groups.visualOperationGroup(node) === 'setup'), + false, + ); + assert.deepEqual(graph, original); + } +}); + +test('Model Setup subsections name built-in runtime controls and preserve authored group names', () => { + const backend = path.resolve(process.env.MODIFF_BACKEND_DIR || '../MoDiff'); + const pathToEdit = 'data/graphs/studio/stable-diffusion-xl-pipeline/edit-image.json'; + const source = JSON.parse(readFileSync(path.join(backend, pathToEdit), 'utf8')); + const grouped = groups.groupNewOperationGraph(source); + const setup = grouped.nodes.find((node) => groups.visualOperationGroup(node) === 'setup'); + assert.ok(setup); + const instance = setup.data.blockInstanceV2; + const graph = blockRuntime.blockOperationGraphV2(instance); + const before = structuredClone(instance); + const title = 'Diffusers.LoadPipeline'; + const controls = instance.effectiveInterface.controls.filter((control) => control.group === title); + assert.ok(controls.length > 0); + assert.equal(modelSetupControlGroupLabel(title, controls, graph), 'Runtime settings'); + assert.equal(modelSetupControlGroupLabel('My loader settings', controls, graph), 'My loader settings'); + const renamed = structuredClone(graph); + renamed.nodes.find((node) => node.data.blockProjectionNodeId === controls[0].binding.nodeId).data.label = + 'My loader settings'; + assert.equal(modelSetupControlGroupLabel('My loader settings', controls, renamed), 'My loader settings'); + const modularSource = JSON.parse( + readFileSync(path.join(backend, 'data/graphs/studio/flux-dev-pipeline/text-to-image.json'), 'utf8'), + ); + const modular = groups + .groupNewOperationGraph(modularSource) + .nodes.find((node) => groups.visualOperationGroup(node) === 'setup').data.blockInstanceV2; + const modularControls = modular.effectiveInterface.controls.filter((control) => control.group === 'Load Models'); + assert.ok(modularControls.some((control) => control.binding.fieldId === 'device')); + assert.equal( + modelSetupControlGroupLabel('Load Models', modularControls, blockRuntime.blockOperationGraphV2(modular)), + 'Runtime settings', + ); + const other = instance.effectiveInterface.controls.find((control) => control.group !== title); + assert.ok(other); + assert.equal(modelSetupControlGroupLabel(title, [...controls, other], graph), title); + assert.deepEqual(instance, before); + const api = (sourceGraph) => + canonicalGraphIdentity( + flowStore.getState().exportGraph('model-setup-subsections', undefined, { sourceGraph, randomizeSeeds: false }), + ); + assert.deepEqual(api(grouped), api(source)); +}); + +test('older audio, image and video examples give the runtime subsection its own heading', () => { + const backend = path.resolve(process.env.MODIFF_BACKEND_DIR || '../MoDiff'); + for (const name of [ + 'ace-step-audio-pipeline/audio-repaint', + 'lumina2-pipeline/text-to-image', + 'wan-vace-pipeline/control-to-video', + ]) { + const source = JSON.parse(readFileSync(path.join(backend, 'data/graphs/studio', name + '.json'), 'utf8')); + const graph = groups.groupNewOperationGraph(source); + const setup = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'setup'); + const instance = setup.data.blockInstanceV2; + const loader = instance.effectiveGraph.nodes.find((node) => node.data.action === 'LoadPipeline'); + assert.ok(loader, name); + const controls = instance.effectiveInterface.controls.filter((control) => control.binding.nodeId === loader.nodeId); + assert.ok(controls.length, name); + assert.equal( + modelSetupControlGroupLabel(controls[0].group, controls, blockRuntime.blockOperationGraphV2(instance)), + 'Runtime settings', + name, + ); + } +}); + +test('direct image, audio, video and 3D setup shows effective recipe placement and restores saved loader fallbacks', () => { + const backend = path.resolve(process.env.MODIFF_BACKEND_DIR || '../MoDiff'); + for (const pathToGraph of [ + 'ace-step-audio-pipeline/text-to-audio', + 'ddim-pipeline/unconditional-image', + 'long-cat-audio-di-t-pipeline/text-to-audio', + 'wan-vace-pipeline/control-to-video', + 'shap-e-pipeline/text-to-3d', + ]) { + const saved = JSON.parse(readFileSync(path.join(backend, 'data/graphs/studio', `${pathToGraph}.json`), 'utf8')); + const grouped = groups.groupNewOperationGraph(saved); + const setup = grouped.nodes.find((node) => groups.visualOperationGroup(node) === 'setup'); + assert.ok(setup, pathToGraph); + const original = structuredClone(setup); + const instance = setup.data.blockInstanceV2; + const graph = blockRuntime.blockOperationGraphV2(instance); + const recipe = graph.nodes.find((node) => node.data.action === 'DiffusersExecutionRecipe'); + const loader = graph.nodes.find((node) => node.data.action === 'LoadPipeline'); + const params = blockRuntime.blockViewModelV2(instance).controlParams; + const control = (node, key) => + instance.effectiveInterface.controls.find( + (entry) => entry.binding.nodeId === node.data.blockProjectionNodeId && entry.binding.fieldId === key, + ).controlId; + const visible = (g, edges = []) => modelSetupControlParams(instance, g, params, edges); + const recipeWire = graph.edges.find( + (edge) => edge.source === recipe.id && edge.target === loader.id && edge.targetHandle === 'execution_recipe', + ); + assert.ok(recipeWire, pathToGraph); + const unplugged = { ...graph, edges: graph.edges.filter((edge) => edge !== recipeWire) }; + const unknown = { + ...graph, + nodes: graph.nodes.map((node) => + node !== recipe + ? node + : { + ...node, + data: { ...node.data, module: 'custom.local', action: 'UserRecipe' }, + }, + ), + }; + const inspector = graphNodeControlParams(setup); + const placementIds = ['offload_mode', 'device'].map((key) => control(recipe, key)); + for (const surface of [visible(graph), inspector]) { + assert.deepEqual( + Object.keys(surface).slice(0, 2), + placementIds, + `${pathToGraph}: effective placement comes first`, + ); + } + assert.deepEqual([...modelSetupControlPresentation(instance, graph, params).placementIds], placementIds); + assert.equal(modelSetupControlPresentation(instance, unplugged, params).placementIds.size, 0); + assert.equal(modelSetupControlPresentation(instance, unknown, params).placementIds.size, 0); + const custom = structuredClone(instance); + custom.effectiveInterface.controls.find((entry) => entry.controlId === placementIds[0]).group = 'My settings'; + assert.deepEqual([...modelSetupControlPresentation(custom, graph, params).placementIds], [placementIds[1]]); + for (const [raw, effective] of [ + ['auto_offload', 'offload_mode'], + ['offload_mode', 'offload_mode'], + ['device', 'device'], + ]) { + const rawId = control(loader, raw); + const effectiveId = control(recipe, effective); + assert.equal(visible(graph)[rawId], undefined, `${pathToGraph}: ${raw}`); + assert.equal(inspector[rawId], undefined); + assert.deepEqual(visible(graph)[effectiveId], params[effectiveId]); + assert.equal(inspector[effectiveId].label, params[effectiveId].label); + assert.deepEqual(visible(unplugged)[rawId], params[rawId], 'disconnect restores the stored value'); + assert.deepEqual(visible(unknown)[rawId], params[rawId], 'an unknown supplier cannot hide the loader field'); + const customWire = { + id: 'custom-placement', + source: 'custom', + sourceHandle: 'value', + target: recipe.id, + targetHandle: effective, + }; + assert.deepEqual( + visible({ ...graph, edges: [...graph.edges, customWire] })[rawId], + params[rawId], + 'a connected custom placement value keeps the original control available', + ); + assert.deepEqual(visible({ ...unplugged, edges: [...unplugged.edges, recipeWire] }), visible(graph)); + } + assert.deepEqual(setup, original, 'presenting any of these states preserves the durable graph'); + const reopened = JSON.parse(JSON.stringify(grouped)); + const savedSetup = reopened.nodes.find((node) => node.id === setup.id); + assert.deepEqual(graphNodeControlParams(savedSetup), inspector); + const exported = (sourceGraph) => + canonicalGraphIdentity( + flowStore.getState().exportGraph('placement-presentation', undefined, { sourceGraph, randomizeSeeds: false }), + ); + assert.deepEqual(exported(reopened), exported(saved)); + } +}); + +test('Mochi required tiling reflects the connected loader and preserves the original recipe through sharing and reopen', async () => { + const saved = JSON.parse( + readFileSync(path.resolve('../MoDiff/data/graphs/studio/mochi-pipeline/text-to-video.json'), 'utf8'), + ); + const grouped = groups.groupNewOperationGraph(saved); + const setup = grouped.nodes.find((node) => groups.visualOperationGroup(node) === 'setup'); + const instance = setup.data.blockInstanceV2; + const graph = blockRuntime.blockOperationGraphV2(instance); + const recipe = graph.nodes.find((node) => node.data.action === 'DiffusersExecutionRecipe'); + const loader = graph.nodes.find((node) => node.data.action === 'LoadPipeline'); + const wire = graph.edges.find((edge) => edge.source === recipe.id && edge.target === loader.id); + const control = instance.effectiveInterface.controls.find((c) => c.binding.fieldId === 'vae_tiling'); + const params = blockRuntime.blockViewModelV2(instance).controlParams; + const capability = { + requiresVaeTiling: true, + defaultRepo: loader.data.params.model_id.value.value, + revisionCandidates: [loader.data.params.revision.value], + executionProfiles: [ + { + pipeline_class: loader.data.params.pipeline_class.value, + loader_module: loader.data.module, + loader_action: loader.data.action, + default_repo: loader.data.params.model_id.value.value, + }, + ], + }; + const catalog = { workflowModelDescriptors: [], studioModelCapabilities: [capability] }; + const shown = (g, authority = catalog) => + modelSetupControlParams(instance, g, params, [], authority)[control.controlId]; + const unmodified = structuredClone(grouped); + assert.equal(params[control.controlId].value, false, 'ship the recorded request exactly'); + assert.equal(shown(graph).value, true); + assert.equal(shown(graph).disabled, true); + assert.match(shown(graph).label, /required/u); + const renamed = structuredClone(instance); + const renamedControl = renamed.effectiveInterface.controls.find((field) => field.controlId === control.controlId); + renamedControl.label = 'Tile the decoder'; + renamedControl.group = 'My custom settings'; + const renamedParams = { + ...params, + [control.controlId]: { ...params[control.controlId], label: renamedControl.label }, + }; + const effective = modelSetupControlParams(renamed, graph, renamedParams, [], catalog)[control.controlId]; + assert.equal(effective.label, 'Tile the decoder (required by model)'); + assert.equal(effective.value, true); + assert.deepEqual(shown(graph, { ...catalog, studioModelCapabilities: [] }), params[control.controlId]); + assert.deepEqual(shown({ ...graph, edges: graph.edges.filter((e) => e !== wire) }), params[control.controlId]); + const other = structuredClone(loader); + other.id += '-other'; + other.data.params.pipeline_class.value = 'AllegroPipeline'; + const shared = shown({ + ...graph, + nodes: [...graph.nodes, other], + edges: [...graph.edges, { ...wire, id: 'secondary-consumer', target: other.id }], + }); + assert.equal(shared.value, false); + assert.ok(!shared.disabled, 'the shared recipe continues to control the other model'); + assert.match(shared.label, /optional/u); + const switched = structuredClone(graph); + const replacement = switched.nodes.find((node) => node.id === loader.id); + replacement.data.params.revision.value = '0'.repeat(40); + assert.deepEqual( + shown(switched), + params[control.controlId], + 'an unreviewed revision cannot claim the model behavior', + ); + assert.deepEqual(grouped, unmodified); + const reopened = JSON.parse(JSON.stringify(setup)); + assert.equal(graphNodeControlParams(reopened, [], catalog)[control.controlId].value, true); + // A previously pinned recipe leaf is still readable while Model Setup is collapsed. + const { graphParamInputCandidates } = await server.ssrLoadModule('/src/studio/graphNodeControls.ts'); + const { useNodesStore } = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); + const previous = useNodesStore.getState().studioModelCapabilities; + const pinId = `graph:${recipe.id}:vae_tiling`; + try { + useNodesStore.setState({ studioModelCapabilities: [capability] }); + const pin = graphParamInputCandidates(grouped.nodes, [pinId], grouped.edges).find( + (candidate) => candidate.id === pinId, + ); + assert.equal(pin.param.value, true); + assert.equal(pin.param.disabled, true); + } finally { + useNodesStore.setState({ studioModelCapabilities: previous }); + } + const exported = (sourceGraph) => + canonicalGraphIdentity( + flowStore.getState().exportGraph('mochi-tiling', undefined, { sourceGraph, randomizeSeeds: false }), + ); + assert.deepEqual(exported(JSON.parse(JSON.stringify(grouped))), exported(saved)); +}); + +test('execution recipe switches govern only their own literal settings in raw nodes, Model Setup and inspector', () => { + const backend = path.resolve(process.env.MODIFF_BACKEND_DIR || '../MoDiff'); + const original = JSON.parse( + readFileSync(path.join(backend, 'data/graphs/studio/ddim-pipeline/unconditional-image.json'), 'utf8'), + ); + const sections = { + layerwise_casting: ['layerwise_casting_components', 'layerwise_storage_dtype', 'layerwise_compute_dtype'], + channels_last: ['channels_last_components'], + }; + for (const selected of [null, 'channels_last', 'layerwise_casting']) { + const saved = structuredClone(original); + const raw = saved.nodes.find((node) => node.data.action === 'DiffusersExecutionRecipe'); + for (const name of Object.keys(sections)) { + const field = raw.data.params[name]; + delete raw.data.params[name]; + raw.data.params[name] = { ...field, value: name === selected }; + } + const before = structuredClone(raw); + const grouped = groups.groupNewOperationGraph(saved); + const setup = grouped.nodes.find((node) => groups.visualOperationGroup(node) === 'setup'); + const instance = setup.data.blockInstanceV2; + const graph = blockRuntime.blockOperationGraphV2(instance); + const recipe = graph.nodes.find((node) => node.data.action === raw.data.action); + const id = (name) => + instance.effectiveInterface.controls.find( + (control) => control.binding.nodeId === recipe.data.blockProjectionNodeId && control.binding.fieldId === name, + ).controlId; + const params = blockRuntime.blockViewModelV2(instance).controlParams; + const rawView = graphNodeControlParams(raw); + const stageView = modelSetupControlParams(instance, graph, params); + const inspector = graphNodeControlParams(setup); + for (const [gate, fields] of Object.entries(sections)) { + assert.equal(rawView[gate].value, selected === gate); + assert.equal(stageView[id(gate)].value, selected === gate); + const knownGate = { + id: 'external-switch', + source: 'switch', + sourceHandle: 'value', + target: recipe.id, + targetHandle: gate, + }; + const unknown = modelSetupControlParams(instance, { ...graph, edges: [...graph.edges, knownGate] }, params); + const rawUnknown = graphNodeControlParams(raw, [{ ...knownGate, target: raw.id }]); + for (const key of fields) { + for (const [view, switchId, keyId] of [ + [rawView, gate, key], + [stageView, id(gate), id(key)], + [inspector, id(gate), id(key)], + ]) { + assert.equal(Object.hasOwn(view, keyId), selected === gate, `${gate}: ${key}`); + if (selected === gate) assert.ok(Object.keys(view).indexOf(switchId) < Object.keys(view).indexOf(keyId)); + } + assert.ok(unknown[id(key)] && rawUnknown[key], 'a connected external switch keeps its options accessible'); + const connectedOption = { ...knownGate, targetHandle: key }; + assert.ok(graphNodeControlParams(raw, [{ ...connectedOption, target: raw.id }])[key]); + assert.ok( + modelSetupControlParams(instance, { ...graph, edges: [...graph.edges, connectedOption] }, params)[id(key)], + ); + } + } + assert.deepEqual(raw, before, 'opening or editing disclosure must not change authored values'); + assert.deepEqual(graphNodeControlParams(JSON.parse(JSON.stringify(setup))), inspector); + const custom = { ...raw, data: { ...raw.data, module: 'custom.user' } }; + assert.ok( + graphNodeControlParams(custom).layerwise_storage_dtype, + 'a similarly shaped custom node keeps its own policy', + ); + } +}); + +test('Model Setup shows connected VAE recipe controls and retains each loader fallback', () => { + const backend = path.resolve(process.env.MODIFF_BACKEND_DIR || '../MoDiff'); + const examples = [ + ['studio/ddim-pipeline/unconditional-image.json', ['slicing', 'tiling']], + ['studio/long-cat-audio-di-t-pipeline/text-to-audio.json', ['tiling']], + ]; + for (const [relative, modes] of examples) { + const source = JSON.parse(readFileSync(path.join(backend, 'data/graphs', relative), 'utf8')); + const grouped = groups.groupNewOperationGraph(source); + const setup = grouped.nodes.find((node) => groups.visualOperationGroup(node) === 'setup'); + assert.ok(setup, relative); + const instance = setup.data.blockInstanceV2; + const before = structuredClone(instance); + const graph = blockRuntime.blockOperationGraphV2(instance); + const view = blockRuntime.blockViewModelV2(instance); + const visible = modelSetupControlParams(instance, graph, view.controlParams); + const inspector = graphNodeControlParams(setup); + const disconnected = { + ...graph, + edges: graph.edges.filter((edge) => edge.targetHandle !== 'execution_recipe'), + }; + const fallback = modelSetupControlParams(instance, disconnected, view.controlParams); + const competing = { + ...graph, + edges: [...graph.edges, ...graph.edges.filter((edge) => edge.targetHandle === 'execution_recipe')], + }; + const unresolved = modelSetupControlParams(instance, competing, view.controlParams); + for (const mode of modes) { + const direct = instance.effectiveInterface.controls.find( + (control) => control.binding.fieldId === `enable_vae_${mode}`, + ); + const recipe = instance.effectiveInterface.controls.find((control) => control.binding.fieldId === `vae_${mode}`); + assert.equal(view.controlParams[direct.controlId].value ?? view.controlParams[direct.controlId].default, true); + assert.equal(visible[recipe.controlId].value ?? visible[recipe.controlId].default, false); + assert.equal(Object.hasOwn(visible, direct.controlId), false, relative); + assert.equal(Object.hasOwn(inspector, direct.controlId), false, relative); + assert.equal(inspector[recipe.controlId].label, visible[recipe.controlId].label, relative); + assert.equal(fallback[direct.controlId], view.controlParams[direct.controlId], relative); + assert.equal(unresolved[direct.controlId], view.controlParams[direct.controlId], relative); + const customInterface = { + ...instance, + effectiveInterface: { + ...instance.effectiveInterface, + controls: instance.effectiveInterface.controls.map((control) => + control.controlId === direct.controlId ? { ...control, label: 'My fallback' } : control, + ), + }, + }; + assert.ok( + modelSetupControlParams(customInterface, graph, view.controlParams)[direct.controlId], + `${relative}: retain explicitly named controls`, + ); + } + assert.deepEqual(instance, before, `${relative}: render must preserve saved values, graph and interface`); + const api = (sourceGraph) => + canonicalGraphIdentity( + flowStore.getState().exportGraph('model-setup-precedence', undefined, { sourceGraph, randomizeSeeds: false }), + ); + assert.deepEqual(api(grouped), api(source), relative); + } +}); + +test('Model Setup hides the stock conditioning controls only when the loader declares it inactive', () => { + const backend = path.resolve(process.env.MODIFF_BACKEND_DIR || '../MoDiff'); + const graphName = 'stable-diffusion-xl-pipeline/text-to-image'; + const load = (name) => JSON.parse(readFileSync(path.join(backend, `data/graphs/studio/${name}.json`), 'utf8')); + const projection = (source) => { + const grouped = groups.groupNewOperationGraph(source); + const setup = grouped.nodes.find((node) => groups.visualOperationGroup(node) === 'setup'); + assert.ok(setup); + const instance = setup.data.blockInstanceV2; + const graph = blockRuntime.blockOperationGraphV2(instance); + const loader = graph.nodes.find( + ({ data }) => data.module === 'modules.DiffusersImage' && data.action === 'LoadPipeline', + ); + assert.ok(loader); + const field = (fieldId) => { + const found = instance.effectiveInterface.controls.find( + (control) => + control.binding.nodeId === loader.data.blockProjectionNodeId && control.binding.fieldId === fieldId, + ); + assert.ok(found, fieldId); + return found; + }; + const { controlParams } = blockRuntime.blockViewModelV2(instance); + const conditioning = field('conditioning_model_id'); + return { + grouped, + setup, + instance, + graph, + loader, + controlParams, + conditioning, + conditioningRevision: field('conditioning_revision'), + modelId: field('model_id').controlId, + }; + }; + const active = (context, graph = context.graph, edges = [], root = context.setup) => { + const projected = modelSetupControlParams(context.instance, graph, context.controlParams, edges); + assert.ok(projected[context.modelId], 'Base model picker remains available'); + const inspector = graphNodeControlParams(root, edges); + const stageVisible = Object.hasOwn(projected, context.conditioning.controlId); + const inspectorVisible = Object.hasOwn(inspector, context.conditioning.controlId); + assert.equal(Object.hasOwn(projected, context.conditioningRevision.controlId), stageVisible); + assert.equal(Object.hasOwn(inspector, context.conditioningRevision.controlId), inspectorVisible); + return { stage: stageVisible, inspector: inspectorVisible }; + }; + const source = load(graphName); + const inactive = projection(source); + const before = structuredClone(inactive.grouped); + assert.equal(inactive.loader.data.params.conditioning_kind.value, 'none'); + assert.equal(inactive.controlParams[inactive.conditioning.controlId].display, 'modelselect'); + assert.equal(inactive.controlParams[inactive.conditioning.controlId].hidden, false); + assert.deepEqual(active(inactive), { stage: false, inspector: false }); + const api = (sourceGraph) => + canonicalGraphIdentity( + flowStore + .getState() + .exportGraph('model-setup-conditioning-visibility', undefined, { sourceGraph, randomizeSeeds: false }), + ); + assert.deepEqual(inactive.grouped, before, 'Projection must preserve the entire saved graph and interface.'); + assert.deepEqual(api(inactive.grouped), api(source)); + + for (const [name, kind] of [ + ['stable-diffusion-xl-control-net-pipeline/control-image', 'controlnet'], + ['stable-diffusion-xl-adapter-pipeline/control-image', 't2i_adapter'], + ]) { + const enabled = projection(load(name)); + assert.equal(enabled.loader.data.params.conditioning_kind.value, kind); + assert.deepEqual(active(enabled), { stage: true, inspector: true }, name); + } + + const supplier = { + id: 'typed-value-source', + type: 'basic', + position: { x: 0, y: 0 }, + data: { + module: 'modules.Primitive', + action: 'TextValue', + label: 'Text Value', + params: { + text: { type: 'string', display: 'text', value: 'a value supplied at execution' }, + output: { type: 'string', display: 'output' }, + }, + }, + }; + for (const fieldOrPortId of ['conditioning_kind', 'conditioning_model_id', 'conditioning_revision']) { + const edge = { + id: `dynamically-supplied-${fieldOrPortId}`, + source: supplier.id, + sourceHandle: 'output', + target: inactive.setup.id, + targetHandle: `block-crossing:input:${encodeURIComponent(inactive.loader.data.blockProjectionNodeId)}:${fieldOrPortId}`, + }; + const wired = { + ...inactive.grouped, + nodes: [...inactive.grouped.nodes, supplier], + edges: [...inactive.grouped.edges, edge], + }; + const exportWithSupplier = api(wired); + const consumer = exportWithSupplier.canonicalGraph.nodes.find(({ action }) => action === 'LoadPipeline'); + assert.equal(consumer.params[fieldOrPortId].sourceKey, 'output'); + assert.deepEqual(active(inactive, inactive.graph, wired.edges), { stage: true, inspector: true }, fieldOrPortId); + assert.deepEqual(api(wired), exportWithSupplier); + assert.deepEqual( + active(inactive), + { stage: false, inspector: false }, + `Revert after disconnecting ${fieldOrPortId}`, + ); + assert.deepEqual(inactive.grouped, before); + } + + const unresolved = load(graphName); + const unresolvedSelector = unresolved.nodes.find(({ data }) => data.action === 'LoadPipeline').data.params + .conditioning_kind; + delete unresolvedSelector.value; + delete unresolvedSelector.default; + assert.deepEqual(active(projection(unresolved)), { stage: true, inspector: true }, 'No literal selector authority'); + + const interfaceControl = { ...inactive.conditioning, group: 'My loader settings' }; + const customInstance = blockRuntime.replaceBlockEffectiveInterfaceV2(inactive.instance, { + ...inactive.instance.effectiveInterface, + controls: inactive.instance.effectiveInterface.controls.map((control) => + control.controlId === interfaceControl.controlId ? interfaceControl : control, + ), + }); + const custom = { ...inactive.setup, data: { ...inactive.setup.data, blockInstanceV2: customInstance } }; + const customParams = blockRuntime.blockViewModelV2(customInstance).controlParams; + const customGraph = blockRuntime.blockOperationGraphV2(customInstance); + const customView = modelSetupControlParams(customInstance, customGraph, customParams); + assert.equal(customView[interfaceControl.controlId].label, interfaceControl.label); + assert.equal(graphNodeControlParams(custom)[interfaceControl.controlId].label, interfaceControl.label); + assert.equal( + modelSetupControlGroupLabel(interfaceControl.group, [interfaceControl], customGraph), + interfaceControl.group, + ); +}); + +test('Model Setup scopes VAE precedence to each owner and distinguishes base model revision', () => { + const backend = path.resolve(process.env.MODIFF_BACKEND_DIR || '../MoDiff'); + const stageControls = (relative) => { + const source = JSON.parse(readFileSync(path.join(backend, 'data/graphs', relative), 'utf8')); + return groups + .groupNewOperationGraph(source) + .nodes.filter((node) => groups.visualOperationGroup(node) === 'setup') + .map((node) => { + const instance = node.data.blockInstanceV2; + const before = structuredClone(instance); + const graph = blockRuntime.blockOperationGraphV2(instance); + const { controlParams } = blockRuntime.blockViewModelV2(instance); + const visible = modelSetupControlParams(instance, graph, controlParams); + assert.deepEqual(instance, before, relative); + return { instance, graph, controlParams, visible }; + }); + }; + const movie = stageControls('studio/wan-ti2-v-pipeline/text-to-video.json'); + assert.equal(movie.length, 2); + const audio = movie.find(({ graph }) => graph.nodes.some((node) => node.data.module === 'modules.DiffusersAudio')); + const video = movie.find(({ graph }) => graph.nodes.some((node) => node.data.module === 'modules.DiffusersVideo')); + const audioFallback = audio.instance.effectiveInterface.controls.find( + (control) => control.binding.fieldId === 'enable_vae_tiling', + ); + assert.equal(Object.hasOwn(audio.visible, audioFallback.controlId), false); + const videoLoader = video.instance.effectiveGraph.nodes.find((node) => node.data.action === 'LoadPipeline'); + const placementFallbackIds = video.instance.effectiveInterface.controls + .filter( + (control) => + control.binding.nodeId === videoLoader.nodeId && + ['auto_offload', 'offload_mode', 'device'].includes(control.binding.fieldId), + ) + .map((control) => control.controlId); + assert.equal(placementFallbackIds.length, 3); + const disabledRecipeFields = [ + 'layerwise_casting_components', + 'layerwise_storage_dtype', + 'layerwise_compute_dtype', + 'channels_last_components', + 'compile_components', + 'compile_backend', + 'compile_mode', + 'compile_fullgraph', + 'compile_dynamic', + 'cache_threshold', + 'cache_options', + 'device_map_overrides', + ]; + const recipe = video.instance.effectiveGraph.nodes.find((node) => node.data.action === 'DiffusersExecutionRecipe'); + const inactiveRecipeIds = video.instance.effectiveInterface.controls + .filter( + (control) => control.binding.nodeId === recipe.nodeId && disabledRecipeFields.includes(control.binding.fieldId), + ) + .map((control) => control.controlId); + assert.equal(inactiveRecipeIds.length, disabledRecipeFields.length); + const otherVideoControls = Object.fromEntries( + Object.entries(video.controlParams).filter( + ([id]) => !placementFallbackIds.includes(id) && !inactiveRecipeIds.includes(id), + ), + ); + assert.deepEqual(video.visible, otherVideoControls); + + const [adapterExample] = stageControls('studio/flux-dev-pipeline/text-to-image--flux-lora-ghibli-story.json'); + const revisionControls = adapterExample.instance.effectiveInterface.controls.filter( + (control) => control.binding.fieldId === 'revision', + ); + assert.equal(revisionControls.length, 2); + assert.deepEqual(revisionControls.map(({ controlId }) => adapterExample.visible[controlId].label).sort(), [ + 'Base model revision', + 'Revision', + ]); + assert.notEqual(...revisionControls.map(({ controlId }) => adapterExample.visible[controlId].value)); +}); + +test('whole-pipeline video inputs combine their actual Load and Normalize operations', () => { + const backend = path.resolve(process.env.MODIFF_BACKEND_DIR || '../MoDiff'); + for (const relative of [ + 'studio/cog-video-x-video-to-video-pipeline/video-to-video.json', + 'studio/animate-diff-video-to-video-pipeline/video-to-video.json', + ]) { + const graph = JSON.parse(readFileSync(path.join(backend, 'data/graphs', relative), 'utf8')); + const grouped = groups.groupNewOperationGraph(graph); + const input = grouped.nodes.find((node) => groups.visualOperationGroup(node) === 'videoInput'); + assert.ok(input, relative); + assert.deepEqual(input.data.blockInstanceV2.effectiveGraph.nodes.map((node) => node.data.action).sort(), [ + 'Load', + 'Normalize', + ]); + const identity = (sourceGraph) => + canonicalGraphIdentity( + flowStore.getState().exportGraph('video-input-presentation', undefined, { sourceGraph, randomizeSeeds: false }), + ); + assert.deepEqual(identity(grouped), identity(graph)); + const shared = structuredClone(graph); + const loader = shared.nodes.find((node) => node.data.module === 'modules.Video' && node.data.action === 'Load'); + const wire = shared.edges.find((edge) => edge.source === loader.id); + shared.edges.push({ ...wire, id: 'shared-video', target: 'external-consumer' }); + assert.equal( + groups.groupNewOperationGraph(shared).nodes.some((node) => groups.visualOperationGroup(node) === 'videoInput'), + false, + 'A separately consumed original clip stays visible.', + ); + } +}); + +test('whole-pipeline Generate retains its authored executable fields during live canvas replacement', async () => { + const backend = path.resolve(process.env.MODIFF_BACKEND_DIR || '../MoDiff'); + const graph = JSON.parse( + readFileSync(path.join(backend, 'data/graphs/studio/aura-flow-pipeline/text-to-image.json'), 'utf8'), + ); + const { useNodesStore } = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); + const previous = useNodesStore.getState().nodesRegistry; + const identity = (sourceGraph) => + canonicalGraphIdentity( + flowStore.getState().exportGraph('live-legacy-fields', undefined, { sourceGraph, randomizeSeeds: false }), + ); + const expected = identity(graph); + try { + assert.equal(fixture.registry['modules.DiffusersImage.Generate'].params.use_guidance_scale_2.hidden, true); + useNodesStore.setState({ nodesRegistry: fixture.registry }); + flowStore.getState().replaceGraph(groups.groupNewOperationGraph(graph), { clearRemovedCache: false }); + const live = { nodes: flowStore.getState().nodes, edges: flowStore.getState().edges }; + assert.deepEqual(identity(live), expected, 'Opening a reviewed example must not add inactive guidance overrides.'); + const generate = live.nodes.find( + (node) => node.data.module === 'modules.DiffusersImage' && node.data.action === 'Generate', + ); + assert.ok(generate, 'Whole native generation has the same editable Generate stage.'); + assert.equal(generate.data.blockInstanceV2, undefined); + } finally { + useNodesStore.setState({ nodesRegistry: previous }); + } +}); + +test('legacy modular setup and native caption stages retain their authored fields during canvas hydration', async () => { + const backend = path.resolve(process.env.MODIFF_BACKEND_DIR || '../MoDiff'); + const { useNodesStore } = await server.ssrLoadModule('/src/stores/useNodeStore.ts'); + const previous = useNodesStore.getState().nodesRegistry; + const identity = (sourceGraph) => + canonicalGraphIdentity( + flowStore.getState().exportGraph('live-legacy-controls', undefined, { sourceGraph, randomizeSeeds: false }), + ); + try { + useNodesStore.setState({ nodesRegistry: fixture.registry }); + for (const file of [ + 'hugging-face-image-text-to-text-model/image-to-text.json', + 'mini-max-music3-modular-pipeline/text-to-audio.json', + 'wan-image2-video-modular-pipeline/image-to-video.json', + ]) { + const graph = JSON.parse(readFileSync(path.join(backend, 'data/graphs/studio', file), 'utf8')); + const expected = identity(graph); + flowStore.getState().replaceGraph(groups.groupNewOperationGraph(graph), { clearRemovedCache: false }); + assert.deepEqual( + identity({ nodes: flowStore.getState().nodes, edges: flowStore.getState().edges }), + expected, + `${file}: opening must not introduce absent schema defaults`, + ); + } + } finally { + useNodesStore.setState({ nodesRegistry: previous }); + } +}); + +test('every bundled example opens as stages without changing its ordered API or rewriting saved presentation', async () => { + const backend = path.resolve(process.env.MODIFF_BACKEND_DIR || '../MoDiff'); + const manifest = JSON.parse(readFileSync(path.join(backend, 'data/workflow-library-manifest.json'), 'utf8')); + const variants = JSON.parse(readFileSync(path.resolve('config/canonical-template-variants.v1.json'), 'utf8')); + const rows = [ + ...manifest.workflows, + ...selectReviewedExperimentalWorkflows(manifest.experimentalWorkflows, variants), + ]; + const { exampleWorkflowSnapshotFromGraph } = await server.ssrLoadModule('/src/studio/exampleWorkflow.ts'); + const { workflowSnapshotFromGraph } = await server.ssrLoadModule('/src/studio/workflowInference.ts'); + const { materializeBlockProjectionV2, setBlockPresentationV2, storyboardStageKindV2 } = await server.ssrLoadModule( + '/src/studio/blockRuntimeV2.ts', + ); + const { isFocusedStageNode } = await server.ssrLoadModule('/src/workflow/encodingNodePresentation.ts'); + const identity = (sourceGraph) => + canonicalGraphIdentity( + flowStore.getState().exportGraph('library-stage-restore', undefined, { sourceGraph, randomizeSeeds: false }), + ); + assert.equal(rows.length, 220, 'Audit the full current library, including declared experimental examples.'); + for (const row of rows) { + const graph = JSON.parse(readFileSync(path.join(backend, 'data/graphs', row.graphPath), 'utf8')); + const original = structuredClone(graph); + const expected = identity(graph); + let opened = exampleWorkflowSnapshotFromGraph(graph, 'default', defaults); + for (const node of opened.nodes.filter((node) => node.data.blockInstanceV2)) + assert.deepEqual( + node.position, + node.data.blockInstanceV2.presentation.position, + `${row.id}: one durable position authority`, + ); + assert.deepEqual(identity(opened), expected, row.id); + for (const stage of opened.nodes.filter(groups.visualOperationGroup)) { + assert.ok(isFocusedStageNode(stage.data.blockInstanceV2), `${row.id}: ${stage.data.label} opens as a node`); + const exposed = groups.unpackVisualOperationGroups(opened, new Set([stage.id])).graph; + assert.deepEqual( + identity(exposed), + expected, + `${row.id}: exposing ${stage.data.label} preserves all remaining groups' order`, + ); + } + const saved = JSON.parse(JSON.stringify(opened)); + for (let reload = 0; reload < 3; reload++) { + opened = workflowSnapshotFromGraph(JSON.parse(JSON.stringify(opened)), 'default', defaults); + assert.deepEqual(identity(opened), expected, `${row.id}: reload ${reload + 1}`); + assert.deepEqual(opened.nodes, saved.nodes, `${row.id}: saved nodes retain their presentation`); + assert.deepEqual(opened.edges, saved.edges, `${row.id}: saved wires retain their presentation`); + } + assert.deepEqual(graph, original, `${row.id}: shipped bytes retain their identity`); + if (row.id.includes('long_showcase') || row.id.includes('animated_story') || row.id.includes('lyric_music_video')) { + const shots = opened.nodes.filter((node) => /^Shot \d+/.test(node.data.label ?? '')); + assert.ok(shots.length > 1, `${row.id}: separate Shot groups`); + for (const shot of shots) { + // An older saved instance could have expanded the inner stages. + const previous = shot.data.blockInstanceV2; + const instance = setBlockPresentationV2(previous, { expanded: true, collapsedContainerNodeIds: [] }); + const projection = materializeBlockProjectionV2({ + ...shot, + data: { ...shot.data, blockInstanceV2: instance }, + }); + const stages = projection.nodes.filter((node) => + storyboardStageKindV2(instance, node.data.blockProjectionNodeId), + ); + assert.deepEqual( + stages.map((node) => node.data.label).sort(), + [ + 'Encode Inputs', + 'Generate', + ...(previous.effectiveGraph.nodes.some( + (node) => node.data.module === 'modules.Image' && node.data.action === 'Load', + ) + ? ['Image Input'] + : []), + ], + `${row.id}: one compact card per stage inside ${shot.data.label}`, + ); + assert.ok(stages.every((node) => node.data.blockProjectionContainerExpanded === false)); + assert.ok(projection.nodes.every((node) => stages.every((stage) => stage.id !== node.parentId))); + assert.deepEqual( + identity({ + ...opened, + nodes: opened.nodes.flatMap((node) => (node.id === shot.id ? projection.nodes : [node])), + edges: [...opened.edges, ...projection.edges], + }), + expected, + `${row.id}: shot disclosure keeps the executable recipe`, + ); + } + } + } +}); + +test('canonical library projection preserves real Cosmos/Qwen controls, wires and owner identity without rewriting grouped saves', async () => { + for (const id of ids) { + const graph = build(id); + const expectedApi = semanticApi(graph); + const expectedOwners = groups + .unpackVisualOperationGroups(graph) + .graph.nodes.filter((node) => node.data.operationAuthoring?.operation.decomposition === 'loader') + .map((node) => node.data.operationAuthoring.operation.binding); + assert.ok(graph.nodes.some(groups.visualOperationGroup)); + flowStore.setState({ nodes: structuredClone(graph.nodes), edges: structuredClone(graph.edges) }); + const ordinarySave = await hooks.prepareWorkflowGraphForExport(); + const definitionHashes = ordinarySave.nodes + .filter(groups.visualOperationGroup) + .map((node) => node.data.blockInstanceV2.definitionSnapshot.contentHash); + const exported = await hooks.prepareWorkflowGraphForExport({ canonicalLibrary: true }); + assert.equal(exported.nodes.some(groups.visualOperationGroup), false, id); + assert.deepEqual(semanticApi(exported), expectedApi, id); + assert.deepEqual( + exported.nodes + .filter((node) => node.data.operationAuthoring?.operation.decomposition === 'loader') + .map((node) => node.data.operationAuthoring.operation.binding), + expectedOwners, + id, + ); + const sanitized = sanitizeCanonicalWorkflowGraph(exported); + assert.deepEqual(semanticApi(sanitized), expectedApi, 'Only transient UI/preview state may be removed.'); + if (id === ids[2]) { + const encoder = sanitized.nodes.find((node) => node.data.action === 'ImageEncode'); + assert.equal( + shared.sharedOperationInput(sanitized.nodes, sanitized.edges, encoder.id, 'seed')?.members.length, + 2, + 'The actual masked workflow exposes its single state-owned seed before ID canonicalization.', + ); + } + const canonical = canonicalizeGraphIds(structuredClone(sanitized), shared.remapOperationAuthoring); + assert.deepEqual( + semanticApi(canonical), + expectedApi, + 'Canonical IDs preserve every executable parameter and wire.', + ); + for (const node of canonical.nodes) { + for (const binding of node.data.operationAuthoring?.sharedInputs ?? []) { + assert.ok( + canonical.nodes.some((owner) => owner.id === binding.loaderId), + 'The editing owner must use its canonical ID.', + ); + } + } + if (id === ids[2]) { + const encoder = canonical.nodes.find((node) => node.data.action === 'ImageEncode'); + assert.equal( + shared.sharedOperationInput(canonical.nodes, canonical.edges, encoder.id, 'seed')?.members.length, + 2, + ); + } + assert.deepEqual( + flowStore + .getState() + .nodes.filter(groups.visualOperationGroup) + .map((node) => node.data.blockInstanceV2.definitionSnapshot.contentHash), + definitionHashes, + ); + assert.ok((await hooks.prepareWorkflowGraphForExport()).nodes.some(groups.visualOperationGroup)); + } +}); + +test('canonical projection leaves user Blocks intact and rejects malformed visual definition hashes', async () => { + const graph = build(ids[0]); + const root = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'inputs'); + const definition = structuredClone(root.data.blockInstanceV2.definitionSnapshot); + definition.source.provider = 'operator-authored-example'; + definition.contentHash = blockSchema.blockDefinitionContentHashV2(definition); + root.data.blockInstanceV2.definitionSnapshot = blockSchema.normalizeBlockDefinitionV2(definition); + root.data.blockInstanceV2.definitionRef.contentHash = definition.contentHash; + flowStore.setState({ nodes: structuredClone(graph.nodes), edges: structuredClone(graph.edges) }); + const exported = await hooks.prepareWorkflowGraphForExport({ canonicalLibrary: true }); + const retained = exported.nodes.find((node) => node.id === root.id); + assert.ok(retained?.data.blockInstanceV2); + assert.deepEqual(retained.data.blockInstanceV2.definitionSnapshot, definition); + const malformed = build(ids[0]); + flowStore.setState({ nodes: malformed.nodes, edges: malformed.edges }); + flowStore.getState().nodes.find(groups.visualOperationGroup).data.blockInstanceV2.definitionSnapshot.contentHash = + 'block-definition-v2-00000000'; + await assert.rejects(hooks.prepareWorkflowGraphForExport({ canonicalLibrary: true }), /contentHash/); +}); + +test('portable canonical IDs preserve executable Blocks without changing the grouped source or its definition', async () => { + const graph = build(ids[0]); + const root = graph.nodes.find((node) => groups.visualOperationGroup(node) === 'inputs'); + const definition = structuredClone(root.data.blockInstanceV2.definitionSnapshot); + definition.source.provider = 'operator-authored-example'; + definition.contentHash = blockSchema.blockDefinitionContentHashV2(definition); + root.data.blockInstanceV2.definitionSnapshot = blockSchema.normalizeBlockDefinitionV2(definition); + root.data.blockInstanceV2.definitionRef.contentHash = definition.contentHash; + const before = structuredClone(graph); + const expectedApi = semanticApi(graph); + const expand = await loadCanonicalWorkflowExpander(server); + const portable = canonicalExecutableWorkflowGraph(graph, expand); + const canonical = canonicalizeGraphIds(sanitizeCanonicalWorkflowGraph(portable), shared.remapOperationAuthoring); + assert.deepEqual(semanticApi(canonical), expectedApi); + assert.equal( + canonical.nodes.some((node) => node.data.blockInstanceV2), + false, + ); + assert.deepEqual(graph, before, 'Canonical publication does not rewrite the ordinary grouped canvas.'); + const broken = structuredClone(graph); + broken.nodes.find((node) => node.data.blockInstanceV2).data.blockInstanceV2.instanceId = 'wrong-root'; + assert.throws(() => canonicalExecutableWorkflowGraph(broken, expand), /canvas id/); +}); diff --git a/scripts/workflow-library-contract.mjs b/scripts/workflow-library-contract.mjs index e901c35b..1269a4f2 100644 --- a/scripts/workflow-library-contract.mjs +++ b/scripts/workflow-library-contract.mjs @@ -1,7 +1,53 @@ +import { stableJsonValue } from './canonical-json.mjs'; + +export function hasMachineSpecificWorkflowState(raw) { + // Do not read the final letter of an https: provenance URL as a drive. + // Real drive paths, local URLs, home/cache paths and UNC shares stay blocked. + return /(?:file:\/\/|\/(?:home|Users|root|tmp|mnt|workspace)(?:\/|$)|(? 0) + artifacts.add(value.value); + } + } + if (artifacts.size === 0 && capability.defaultRepo) artifacts.add(capability.defaultRepo); + for (const requirement of [ + ...(capability.inputContracts?.[mode]?.modelRequirements ?? []), + ...(capability.modeRequirements?.[mode]?.modelRequirements ?? []), + ...(capability.additionalRequirements ?? []), + ]) { + if (Array.isArray(requirement.requiredForModes) && !requirement.requiredForModes.includes(mode)) continue; + if (typeof requirement.repo !== 'string' || !requirement.repo.trim()) + throw new Error('A required canonical workflow dependency has no repository.'); + artifacts.add(requirement.repo); + } + return [...artifacts]; +} + const FORBIDDEN_ATTENTION_BACKENDS = new Set(['aiter', 'aiter_fa2_hub']); const APP_DATA_COLLISION_REFERENCE = /^(@data\/(?:audio|images|videos)\/[^/]+?)_[A-Za-z0-9_-]{6}(\.[A-Za-z0-9]+)$/; @@ -23,7 +69,18 @@ export function workflowNodeAttentionBackendError(node) { ? attention.options.map((option) => (typeof option === 'string' ? option : option?.value)) : Object.keys(attention.options ?? {}); const stale = [attention.value, ...savedOptions].filter((value) => FORBIDDEN_ATTENTION_BACKENDS.has(value)); - return stale.length > 0 ? `persists unsupported attention backends: ${[...new Set(stale)].join(', ')}` : null; + if (stale.length > 0) return `persists unsupported attention backends: ${[...new Set(stale)].join(', ')}`; + const backend = attention.value; + const device = paramValue(node, 'device'); + // PyTorch's math SDPA is portable; the other native kernels still require + // an accelerator. Keep the exception exact, not a native-prefix exemption. + if ( + backend !== '_native_math' && + String(backend ?? '').startsWith('_native_') && + String(device ?? '').startsWith('cpu') + ) + return `selects accelerator attention ${backend} on ${device}`; + return null; } export function workflowNodeDeviceOffloadError(node) { @@ -48,3 +105,136 @@ export function normalizePortableWorkflowNodeOffload(node) { if (params.offload_mode) params.offload_mode = { ...params.offload_mode, value: 'none' }; return node; } + +function canonicalDeviceOwnerIdentity(node) { + const data = node?.data; + if (typeof data?.module !== 'string' || typeof data.action !== 'string') return null; + const operation = data.operationAuthoring?.operation; + return JSON.stringify( + stableJsonValue({ + module: data.module, + action: data.action, + operationId: operation?.operationId ?? null, + decomposition: operation?.decomposition ?? null, + pipelineClass: operation?.pipelineClass ?? null, + workflowId: operation?.workflowId ?? null, + binding: operation?.binding ?? null, + }), + ); +} + +/** Pair regeneration must not replace published fallback device defaults with + * the generator host's defaults. Authored values and fresh schemas stay intact. */ +export function retainExistingCanonicalDeviceDefaults(graph, existingGraph) { + const existingByIdentity = new Map(); + const freshByIdentity = new Map(); + for (const [nodes, index] of [ + [existingGraph?.nodes ?? [], existingByIdentity], + [graph?.nodes ?? [], freshByIdentity], + ]) { + for (const node of nodes) { + const identity = canonicalDeviceOwnerIdentity(node); + if (identity !== null) index.set(identity, [...(index.get(identity) ?? []), node]); + } + } + const updates = []; + for (const [identity, existingNodes] of existingByIdentity) { + const freshNodes = freshByIdentity.get(identity); + if (!freshNodes) continue; + const defaults = existingNodes.flatMap((node) => [ + [node.data.params?.device, 'default'], + [node.data.operationAuthoring?.defaults, 'device'], + ]); + if (!defaults.some(([owner, key]) => owner && Object.hasOwn(owner, key))) continue; + // Repeated shot processors need no positional pairing when every old + // fallback agrees. A changed count or conflicting fallback remains + // ambiguous; never transfer authored device values or match by ordinal. + const fallbackSignatures = new Set( + existingNodes.map((node) => + JSON.stringify([node.data.params?.device?.default, node.data.operationAuthoring?.defaults?.device]), + ), + ); + if (existingNodes.length !== freshNodes.length || fallbackSignatures.size !== 1) + throw new Error('Canonical device defaults require an unambiguous unchanged executable node identity.'); + const existing = existingNodes[0]; + for (const fresh of freshNodes) { + const field = fresh.data.params?.device; + for (const [previousOwner, key, owner] of [ + [existing.data.params?.device, 'default', field], + [existing.data.operationAuthoring?.defaults, 'device', fresh.data.operationAuthoring?.defaults], + ]) { + if (!previousOwner || !Object.hasOwn(previousOwner, key)) continue; + const value = previousOwner[key]; + if (!owner || !field || typeof value !== 'string' || !/^(?:cuda|mps|cpu|xpu)(?::\d+)?$/i.test(value)) + throw new Error('An existing canonical device default has no compatible declared destination.'); + const options = Array.isArray(field.options) + ? field.options.map((option) => (typeof option === 'string' ? option : option?.value)) + : Object.keys(field.options ?? {}); + if (options.length > 0 && !options.includes(value)) + throw new Error('An existing canonical device default is unavailable in the fresh field schema.'); + updates.push([owner, key, value]); + } + } + } + for (const [owner, key, value] of updates) owner[key] = value; + return graph; +} + +/** Verify the existing declared image-stage contract against the actual saved + * graph. Reachability and a graph hash do not prove required owner links. */ +export function verifyCanonicalImagePipelineStages(workflow, graph, contracts) { + if (workflow.mediaKind !== 'image') return; + const nodes = (graph.nodes ?? []).map((node) => ({ + id: node.id, + nodeKey: `${node.data?.module}.${node.data?.action}`, + operation: node.data?.operationAuthoring?.operation, + params: node.data?.params ?? {}, + })); + const stageKeys = { + image_encoder: 'modules.DiffusersImage.EncodeInputs', + denoise: 'modules.DiffusersImage.Denoise', + decoder: 'modules.DiffusersImage.DecodeLatents', + }; + const stages = nodes.filter( + (node) => + ['modules.DiffusersImage.EncodeInputs', 'modules.DiffusersImage.Denoise'].includes(node.nodeKey) || + (node.operation?.decomposition === 'bundle' && + Object.hasOwn(stageKeys, node.operation.nodeType) && + node.operation.ports.some( + (port) => port.direction === 'input' && port.types.includes('image_diffusion_pipeline'), + )), + ); + if (stages.length === 0) return; + const owners = nodes.filter( + (node) => + contracts.operationOwnsModel(node.operation) && + node.operation.ports.some( + (port) => port.direction === 'output' && port.types.includes('image_diffusion_pipeline'), + ), + ); + const owner = owners[0]; + const stageIds = new Set(stages.map((node) => node.id)); + const edges = graph.edges ?? []; + const supplying = edges.filter( + (edge) => + stageIds.has(edge.target) && + nodes.find((node) => node.id === edge.target)?.params[edge.targetHandle]?.type === 'image_diffusion_pipeline', + ); + if ( + owners.length !== 1 || + stages.length !== 3 || + owner.operation.nodeKey !== owner.nodeKey || + owner.operation.task !== workflow.mode || + stages.some( + (node) => + !node.operation || + node.operation.nodeKey !== node.nodeKey || + node.nodeKey !== stageKeys[node.operation.nodeType] || + node.operation.task !== workflow.mode, + ) || + new Set(nodes.map((node) => node.id)).size !== nodes.length || + supplying.some((edge) => edge.source !== owner.id) || + contracts.declaredImagePipelineStageContracts(nodes, owner.id, edges, supplying) === null + ) + throw new Error(`${workflow.id} is missing its exact declared owned image pipeline stage route.`); +} diff --git a/scripts/workflow-library-dead-nodes.mjs b/scripts/workflow-library-dead-nodes.mjs index 134504f7..00e348ee 100644 --- a/scripts/workflow-library-dead-nodes.mjs +++ b/scripts/workflow-library-dead-nodes.mjs @@ -1,9 +1,15 @@ +import { canonicalJsonHash } from './canonical-json.mjs'; + const OUTPUT_NODE_KEYS = new Set([ 'modules.Audio.Export', 'modules.Image.Preview', + 'modules.Image.Save', 'modules.Primitive.DataViewer', 'modules.Primitive.ExportData', + // This native operation writes the assembled asset and its delivered preview. + 'modules.Video.ConcatenateAssets', 'modules.Video.Export', + 'modules.Video.ExportAsset', 'modules.Video.ExportWithAudio', ]); @@ -94,7 +100,134 @@ function intentionalDisabledManagedFallbackNodeIds(graph) { return new Set([fallback.id]); } -export function verifyNoDeadWorkflowNodes(workflow, graph) { +/** Bind an auxiliary terminal to independently supplied backend source + * declarations. Manifest metadata alone can never declare an output root. */ +export function canonicalAuxiliaryTerminalBinding(workflow, graph, source) { + const spec = source?.executionSpec; + if ( + !spec || + spec.schemaVersion !== 1 || + spec.modelType !== workflow.modelType || + spec.mode !== workflow.mode || + !Array.isArray(spec.auxiliaryTerminalRoles) || + spec.auxiliaryTerminalRoles.length === 0 || + !Array.isArray(source.operationContracts) + ) + throw new Error(`${workflow.id} has no matching authoritative auxiliary-terminal source contract.`); + const nodes = graph.nodes ?? [], + edges = graph.edges ?? []; + const roles = new Map(); + for (const [role, key] of spec.roles) { + const candidates = nodes.filter((node) => nodeKey(node) === key); + if (candidates.length !== 1) + throw new Error(`${workflow.id} auxiliary source role ${role} is missing or ambiguous.`); + roles.set(role, candidates[0]); + } + const owner = nodes.find((node) => nodeKey(node) === `${spec.loaderModule}.${spec.loaderAction}`); + const ownerClass = owner?.data?.params?.model_type ?? owner?.data?.params?.pipeline_class; + if ( + ownerClass?.value !== spec.pipelineClass || + owner?.data?.operationAuthoring?.operation?.pipelineClass !== spec.pipelineClass + ) + throw new Error(`${workflow.id} auxiliary workflow changes its declared model owner.`); + for (const [from, sourceHandle, to, targetHandle] of spec.edges) + if ( + edges.filter((edge) => edge.target === roles.get(to)?.id && edge.targetHandle === targetHandle).length !== 1 || + !edges.some( + (edge) => + edge.source === roles.get(from)?.id && + edge.sourceHandle === sourceHandle && + edge.target === roles.get(to)?.id && + edge.targetHandle === targetHandle, + ) + ) + throw new Error(`${workflow.id} is missing an authoritative auxiliary-workflow dependency.`); + const terminals = spec.auxiliaryTerminalRoles.map((role) => { + const node = roles.get(role), + key = nodeKey(node); + const contracts = source.operationContracts.filter( + (contract) => + contract.nodeKey === key && + contract.pipelineClass === spec.pipelineClass && + contract.task === spec.mode && + contract.support === 'declared', + ); + if (contracts.length !== 1) + throw new Error(`${workflow.id} auxiliary stage has no unique authoritative operation contract.`); + const contract = contracts[0], + actual = node.data?.operationAuthoring?.operation; + for (const field of [ + 'operationId', + 'nodeKey', + 'nodeType', + 'blockName', + 'decomposition', + 'pipelineClass', + 'task', + 'support', + ]) + if (actual?.[field] !== contract[field]) + throw new Error(`${workflow.id} auxiliary stage differs from its authoritative operation.`); + const statePort = contract.ports.find( + (port) => + port.direction === 'input' && + port.required && + port.semantics?.kind === 'state' && + port.semantics.owner === 'same_loader', + ); + const componentPort = contract.ports.find( + (port) => + port.direction === 'input' && + port.required && + port.semantics?.kind === 'component' && + port.semantics.owner === 'same_loader', + ); + const prefix = `${spec.pipelineClass}:`; + if ( + !statePort?.semantics.scope?.startsWith(prefix) || + componentPort?.semantics.scope !== spec.pipelineClass || + contract.decomposition !== 'block' + ) + throw new Error(`${workflow.id} auxiliary stage has no declared owned SDK state dependency.`); + const workflowId = statePort.semantics.scope.slice(prefix.length); + const expected = { pipeline_class: spec.pipelineClass, workflow_id: workflowId, block_path: contract.blockName }; + if ( + actual.workflowId !== workflowId || + actual.binding?.pipelineClass !== spec.pipelineClass || + owner.data.params?.workflow_id?.value !== workflowId + ) + throw new Error(`${workflow.id} auxiliary stage changes its SDK workflow context.`); + for (const [field, value] of Object.entries(expected)) + if (node.data.params?.[field]?.value !== value || actual.binding?.values?.[field] !== value) + throw new Error(`${workflow.id} auxiliary stage changes a declared SDK binding.`); + const expectedIncoming = spec.edges + .filter(([, , target]) => target === role) + .map(([from, sourceHandle, , targetHandle]) => `${roles.get(from).id}\0${sourceHandle}\0${targetHandle}`) + .sort(); + const actualIncoming = edges + .filter((edge) => edge.target === node.id) + .map((edge) => `${edge.source}\0${edge.sourceHandle}\0${edge.targetHandle}`) + .sort(); + if ( + canonicalJsonHash(actualIncoming) !== canonicalJsonHash(expectedIncoming) || + edges.some((edge) => edge.source === node.id) + ) + throw new Error(`${workflow.id} auxiliary stage is not its exact declared terminal.`); + return { + role, + nodeId: node.id, + nodeKey: key, + operationId: contract.operationId, + pipelineClass: spec.pipelineClass, + task: spec.mode, + workflowId, + blockName: contract.blockName, + }; + }); + return { schemaVersion: 1, executionSpecId: spec.id, executionSpecContentHash: spec.contentHash, terminals }; +} + +export function verifyNoDeadWorkflowNodes(workflow, graph, authoritativeSource) { const nodes = graph.nodes ?? []; const edges = graph.edges ?? []; const nodesById = new Map(nodes.map((node) => [node.id, node])); @@ -113,7 +246,14 @@ export function verifyNoDeadWorkflowNodes(workflow, graph) { throw new Error(`${workflow.id} has no preview, export, or data output node.`); } - const used = new Set(outputNodes.map((node) => node.id)); + let auxiliaryIds = []; + if (Object.prototype.hasOwnProperty.call(workflow, 'auxiliaryTerminalBinding')) { + const expected = canonicalAuxiliaryTerminalBinding(workflow, graph, authoritativeSource); + if (canonicalJsonHash(workflow.auxiliaryTerminalBinding) !== canonicalJsonHash(expected)) + throw new Error(`${workflow.id} auxiliary-terminal metadata differs from its authoritative source binding.`); + auxiliaryIds = expected.terminals.map((terminal) => terminal.nodeId); + } + const used = new Set([...outputNodes.map((node) => node.id), ...auxiliaryIds]); const pending = [...used]; while (pending.length > 0) { const nodeId = pending.pop(); diff --git a/scripts/workflow-library-dependency-contracts.test.mjs b/scripts/workflow-library-dependency-contracts.test.mjs new file mode 100644 index 00000000..f113bb32 --- /dev/null +++ b/scripts/workflow-library-dependency-contracts.test.mjs @@ -0,0 +1,132 @@ +import assert from 'node:assert/strict'; +import { execFileSync } from 'node:child_process'; +import path from 'node:path'; +import { before, test } from 'node:test'; +import { + canonicalWorkflowRequiredArtifacts, + hasMachineSpecificWorkflowState, + workflowVideoAttentionRecipeError, +} from './workflow-library-contract.mjs'; + +test('portable video attention accepts Auto without claiming Flash availability', () => { + const recipe = (backend, components) => ({ + attention_backend: { value: backend }, + attention_components: { value: components }, + }); + for (const pipeline of ['WanPipeline', 'Wan22Pipeline', 'WanTI2VPipeline']) { + assert.equal(workflowVideoAttentionRecipeError(pipeline, recipe('auto', '')), null); + assert.equal(workflowVideoAttentionRecipeError(pipeline, recipe('_native_flash', 'transformer')), null); + assert.match(workflowVideoAttentionRecipeError(pipeline, recipe('_native_flash', '')), /transformer/); + assert.match(workflowVideoAttentionRecipeError(pipeline, recipe('arbitrary_backend', 'transformer')), /attention/); + assert.match(workflowVideoAttentionRecipeError(pipeline, {}), /attention/); + } +}); + +test('portable workflow provenance links are not Windows drive paths', () => { + for (const link of [ + 'https://huggingface.co/black-forest-labs/FLUX.2-klein-4B', + 'https://huggingface.co/black-forest-labs/FLUX.1-schnell', + 'https://huggingface.co/Tongyi-MAI/Z-Image-Turbo', + 'http://example.org/model-guidance', + ]) + assert.equal(hasMachineSpecificWorkflowState(JSON.stringify({ exampleSource: link })), false, link); + for (const reference of [ + 'C:/Users/operator/model', + 'D:\\weights\\model', + 'file:///weights/model', + '/home/operator/model', + '/Users/operator/model', + '/tmp/model', + '/mnt/models', + '\\\\server\\models', + 'https://localhost/model', + 'http://127.0.0.1:8088/model', + 'path /cache/models', + 'model path: E:/weights/model', + ]) + assert.equal(hasMachineSpecificWorkflowState(JSON.stringify({ value: reference })), true, reference); +}); + +const hub = (repository) => ({ value: { source: 'hub', value: repository } }); +const graph = (repositories) => ({ + nodes: repositories.map((repository) => ({ data: { params: { model: hub(repository) } } })), +}); +let capabilities; + +before(() => { + assert.ok(process.env.MODIFF_BACKEND_PYTHON, 'Use the declared ordinary native CPU schema-fixture environment.'); + const fixture = JSON.parse( + execFileSync(process.env.MODIFF_BACKEND_PYTHON, [path.resolve('scripts/template-operation-fixtures.py')], { + cwd: path.resolve('../MoDiff'), + encoding: 'utf8', + input: '[]', + maxBuffer: 64 * 1024 * 1024, + env: { ...process.env, PYTHONDONTWRITEBYTECODE: '1' }, + }), + ); + capabilities = fixture.capabilities; +}); + +test('visible owner and adapter artifacts retain their order and suppress a same-family default fallback', () => { + const input = graph(['publisher/selected-model', 'publisher/adapter', 'publisher/selected-model']); + assert.deepEqual( + canonicalWorkflowRequiredArtifacts(input, { defaultRepo: 'publisher/family-default' }, 'edit_image'), + ['publisher/selected-model', 'publisher/adapter'], + ); + assert.deepEqual( + canonicalWorkflowRequiredArtifacts({ nodes: [] }, { defaultRepo: 'publisher/default' }, 'text_to_image'), + ['publisher/default'], + ); +}); + +test('canonical Cosmos Super metadata retains both exact backend-required safety dependencies', () => { + const capability = capabilities.find((item) => item.modelType === 'Cosmos3OmniModularPipeline'); + const requirements = capability.inputContracts.text_to_image.modelRequirements; + assert.equal(requirements.length, 2); + assert.ok(requirements.every((item) => /^[a-f0-9]{40}$/u.test(item.revision))); + assert.deepEqual( + canonicalWorkflowRequiredArtifacts(graph(['nvidia/Cosmos3-Super-Text2Image']), capability, 'text_to_image'), + ['nvidia/Cosmos3-Super-Text2Image', ...requirements.map((item) => item.repo)], + ); + assert.equal(capability.autoEligible, false); + assert.equal(capability.galleryEligible, false); + assert.equal(capability.liveProof, false); + assert.deepEqual(capability.qualifiedModes, []); +}); + +test('declarations for other tasks are excluded and missing dependency identities fail closed', () => { + const capability = { + inputContracts: { + edit_image: { modelRequirements: [{ repo: 'publisher/edit-required' }] }, + text_to_image: { modelRequirements: [{ repo: 'publisher/text-required' }] }, + }, + modeRequirements: { + edit_image: { + modelRequirements: [{ repo: 'publisher/edit-required' }, { repo: 'publisher/legacy-edit-required' }], + }, + text_to_image: { modelRequirements: [{ repo: 'publisher/legacy-text-required' }] }, + }, + additionalRequirements: [ + { repo: 'publisher/shared' }, + { repo: 'publisher/edit-only', requiredForModes: ['edit_image'] }, + { repo: 'publisher/not-required', requiredForModes: [] }, + { repo: 'publisher/shared', requiredForModes: ['edit_image'] }, + ], + }; + assert.deepEqual(canonicalWorkflowRequiredArtifacts(graph(['publisher/selected']), capability, 'edit_image'), [ + 'publisher/selected', + 'publisher/edit-required', + 'publisher/legacy-edit-required', + 'publisher/shared', + 'publisher/edit-only', + ]); + assert.throws( + () => + canonicalWorkflowRequiredArtifacts( + graph(['publisher/selected']), + { additionalRequirements: [{}] }, + 'text_to_image', + ), + /dependency has no repository/, + ); +}); diff --git a/scripts/workflow-library-ephemeral-storage.mjs b/scripts/workflow-library-ephemeral-storage.mjs index 0bea599e..b647da81 100644 --- a/scripts/workflow-library-ephemeral-storage.mjs +++ b/scripts/workflow-library-ephemeral-storage.mjs @@ -62,12 +62,15 @@ export async function installEphemeralWorkflowStorage(page) { const originalSetItem = Storage.prototype.setItem; Storage.prototype.setItem = function setEphemeralWorkflowItem(key, value) { - if (this === localStorage && generatedGraphKeys.has(String(key))) return; + if ((this === localStorage || this === sessionStorage) && generatedGraphKeys.has(String(key))) return; return originalSetItem.call(this, key, value); }; for (const key of generatedGraphKeys) { localStorage.removeItem(key); + sessionStorage.removeItem(key); + // Keep legacy recovery bytes intact without hydrating foreign graphs in this owned test page. + originalSetItem.call(sessionStorage, `${key}.legacy-recovered.v1`, '1'); } }); } diff --git a/scripts/workflow-library-generator.mjs b/scripts/workflow-library-generator.mjs index 20096a0c..bffe3f8c 100644 --- a/scripts/workflow-library-generator.mjs +++ b/scripts/workflow-library-generator.mjs @@ -1,7 +1,11 @@ -import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { existsSync, mkdirSync, readFileSync, rmSync, statSync, writeFileSync } from 'node:fs'; +import { createHash } from 'node:crypto'; +import { GENERATED_LAYOUT_ALGORITHM, graphLayoutSignature } from '../src/workflow/generatedWorkflowLayout.ts'; import { homedir } from 'node:os'; import { dirname, join, resolve } from 'node:path'; +import { pathToFileURL } from 'node:url'; import { chromium } from 'playwright'; +import { createServer } from 'vite'; import { canonicalJsonHash as hash, stableJsonValue as stable } from './canonical-json.mjs'; import { closeWorkflowBrowser, @@ -13,11 +17,26 @@ import { } from './workflow-library-browser-session.mjs'; import { installEphemeralWorkflowStorage } from './workflow-library-ephemeral-storage.mjs'; import { + canonicalWorkflowRequiredArtifacts, normalizePortableWorkflowDataReference, normalizePortableWorkflowFieldState, normalizePortableWorkflowNodeOffload, + retainExistingCanonicalDeviceDefaults, } from './workflow-library-contract.mjs'; -import { retainUnselectedCurrentWorkflowRecords } from './workflow-library-manifest-state.mjs'; +import { + compareCanonicalWorkflowRecordIds, + retainUnselectedCurrentWorkflowRecords, + selectCanonicalWorkflowVariantTemplates, + canonicalWorkflowVariantTemplateIds, + parseCanonicalWorkflowGenerationScope, + selectCanonicalWorkflowCapabilities, + selectCanonicalWorkflowSources, +} from './workflow-library-manifest-state.mjs'; +import { + attachCanonicalAuxiliaryBinding, + parseCanonicalAuxiliarySources, +} from './workflow-library-auxiliary-sources.mjs'; +import { canonicalExecutableWorkflowGraph, loadCanonicalWorkflowExpander } from './canonical-workflow-execution.mjs'; const ROOT = process.cwd(); const BACKEND_ROOT = resolve(process.env.MODIFF_BACKEND_DIR || join(ROOT, '..', 'MoDiff')); @@ -37,16 +56,14 @@ function qualificationDimensions(qualificationStatus) { } const BACKEND_URL = process.env.MODIFF_SERVER || 'http://127.0.0.1:8088'; const FRONTEND_URL = process.env.MODIFF_FRONTEND || 'http://127.0.0.1:5173'; -const LAYOUT_ALGORITHM = 'modiff-layered-v1'; const LAYOUT_HORIZONTAL_GAP = 140; const LAYOUT_VERTICAL_GAP = 72; const WORKFLOW_BROWSER_BATCH_SIZE = parseWorkflowBrowserBatchSize(process.env.MODIFF_WORKFLOW_BROWSER_BATCH_SIZE); const WORKFLOW_BROWSER_RECOVERY_ATTEMPTS = 2; -const pairArgument = process.argv.find((argument) => argument.startsWith('--pair=')); -const requestedPair = pairArgument?.slice('--pair='.length) ?? null; -if (requestedPair && !/^[A-Za-z\d_]+\|[a-z\d_]+$/.test(requestedPair)) { - throw new Error('The workflow pair must use --pair=ModelType|mode.'); -} +const directCLI = process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href; +const { requestedPair, requestedTemplateId } = parseCanonicalWorkflowGenerationScope( + directCLI ? process.argv.slice(2) : [], +); function slug(value) { return String(value) @@ -91,8 +108,10 @@ function sanitize(value, key = '', ancestors = []) { key === 'options' || key === 'device' || key === 'device_map' || + key === 'weight_loading_mode' || ancestors.includes('device') || - ancestors.includes('device_map') + ancestors.includes('device_map') || + ancestors.includes('weight_loading_mode') ) return value; return 'cpu:0'; @@ -118,23 +137,23 @@ function sanitize(value, key = '', ancestors = []) { function applyPortableContracts(graph, mode) { for (const node of graph?.nodes ?? []) { normalizePortableWorkflowNodeOffload(node); - if (node?.data?.module === 'modules.DiffusersImage' && node?.data?.action === 'LoadPipeline') { - node.data.params = node.data.params ?? {}; - node.data.params.mode = { ...(node.data.params.mode ?? {}), value: mode }; - } - if ( - ['modules.DiffusersAudio', 'modules.DiffusersThreeD'].includes(node?.data?.module) && - node?.data?.action === 'LoadPipeline' - ) { - node.data.params = node.data.params ?? {}; - node.data.params.mode = { ...(node.data.params.mode ?? {}), value: mode }; - } - if ( - node?.data?.module === 'modules.DiffusersVideo' && - ['Generate', 'GenerateVideoAudio'].includes(node?.data?.action) - ) { - node.data.params = node.data.params ?? {}; - node.data.params.mode = { ...(node.data.params.mode ?? {}), value: mode }; + const { module, action } = node?.data ?? {}; + const ownsMode = + (['modules.DiffusersImage', 'modules.DiffusersAudio', 'modules.DiffusersThreeD'].includes(module) && + action === 'LoadPipeline') || + (module === 'modules.DiffusersVideo' && ['Generate', 'GenerateVideoAudio'].includes(action)); + if (ownsMode) { + const params = (node.data.params ??= {}); + const field = params.mode ?? {}; + const choices = Array.isArray(field.options) ? field.options.map((option) => option?.value ?? option) : []; + // A secondary stage, such as the soundtrack in a video workflow, owns + // its own task. The workflow task is a fallback for unset fields only. + const fallback = choices.length && !choices.includes(mode) ? field.default : mode; + const value = field.value || fallback; + if (typeof value !== 'string' || !value || (choices.length && !choices.includes(value))) { + throw new Error(`Invalid portable task ${String(value)} for ${module}.${action}.`); + } + params.mode = { ...field, value }; } if ( node?.data?.module === 'modules.DiffusersRuntime' && @@ -147,7 +166,9 @@ function applyPortableContracts(graph, mode) { return graph; } -function canonicalizeGraphIds(graph) { +function canonicalizeGraphIds(graph, remapOperationAuthoring) { + if (typeof remapOperationAuthoring !== 'function') + throw new Error('Canonical export requires the existing operation-authoring remapper.'); const nodes = [...(graph?.nodes ?? [])].sort((left, right) => { const leftKey = `${left?.data?.studioRole ?? ''}|${left?.data?.module ?? ''}|${left?.data?.action ?? ''}|${left?.position?.y ?? 0}|${left?.position?.x ?? 0}`; const rightKey = `${right?.data?.studioRole ?? ''}|${right?.data?.module ?? ''}|${right?.data?.action ?? ''}|${right?.position?.y ?? 0}|${right?.position?.x ?? 0}`; @@ -158,6 +179,14 @@ function canonicalizeGraphIds(graph) { ...node, id: ids.get(node.id), ...(node.parentId ? { parentId: ids.get(node.parentId) } : {}), + ...(node.data.operationAuthoring + ? { + data: { + ...node.data, + operationAuthoring: remapOperationAuthoring(node.data.operationAuthoring, (id) => ids.get(id) ?? id), + }, + } + : {}), })); graph.edges = [...(graph?.edges ?? [])] .map((edge) => ({ ...edge, source: ids.get(edge.source), target: ids.get(edge.target) })) @@ -170,27 +199,12 @@ function canonicalizeGraphIds(graph) { return graph; } -function graphLayoutSignature(graph) { - return stable( - [...(graph?.nodes ?? [])] - .map((node) => ({ - id: node.id, - parentId: node.parentId ?? null, - position: node.position, - width: node.width ?? null, - height: node.height ?? null, - measured: node.measured ?? null, - })) - .sort((left, right) => String(left.id).localeCompare(String(right.id))), - ); -} - function addLayoutMetadata(graph) { graph.layout = { - algorithm: LAYOUT_ALGORITHM, + algorithm: GENERATED_LAYOUT_ALGORITHM, horizontalGap: LAYOUT_HORIZONTAL_GAP, verticalGap: LAYOUT_VERTICAL_GAP, - positionHash: hash(graphLayoutSignature(graph)), + positionHash: createHash('sha256').update(graphLayoutSignature(graph)).digest('hex'), }; return graph; } @@ -274,25 +288,41 @@ function applyCatalogArtifactPins(graph, artifactPins) { return graph; } -function requiredArtifactsForGraph(graph, defaultRepo) { - const artifacts = new Set(); - for (const node of graph?.nodes ?? []) { - for (const repository of hubRepositoriesForNode(node)) artifacts.add(repository); - } - if (artifacts.size === 0 && defaultRepo) artifacts.add(defaultRepo); - return [...artifacts]; -} - async function main() { + const policyPath = join(ROOT, 'config', 'canonical-template-variants.v1.json'); + if (!statSync(policyPath).isFile() || statSync(policyPath).size > 65536) + throw new Error('Canonical template variant policy must be a bounded JSON file.'); + const variantPolicy = JSON.parse(readFileSync(policyPath, 'utf8')); + const reviewedVariantIds = canonicalWorkflowVariantTemplateIds(variantPolicy); const capabilities = await loadCapabilities(); const artifactPins = await loadArtifactPins(); - const selectedCapabilities = requestedPair - ? capabilities.capabilities.filter((capability) => - (capability.runnableModes ?? []).some((mode) => `${capability.modelType}|${mode}` === requestedPair), - ) - : capabilities.capabilities; - if (requestedPair && selectedCapabilities.length !== 1) { - throw new Error(`The requested workflow pair is not uniquely runnable: ${requestedPair}.`); + let selectedCapabilities; + const parserServer = await createServer({ + root: ROOT, + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + let auxiliarySources, remapOperationAuthoring, expandCanonicalBlocks, retainedTemplateIds; + try { + const { RETAINED_GALLERY_TEMPLATES } = await parserServer.ssrLoadModule('/scripts/retained-gallery-recipes.ts'); + retainedTemplateIds = new Set(RETAINED_GALLERY_TEMPLATES.map(({ template }) => template.id)); + const templates = requestedTemplateId + ? (await parserServer.ssrLoadModule('/src/studio/templates.ts')).STUDIO_TEMPLATES + : []; + selectedCapabilities = selectCanonicalWorkflowCapabilities( + capabilities.capabilities, + templates, + reviewedVariantIds, + { requestedPair, requestedTemplateId }, + ); + ({ remapOperationAuthoring } = await parserServer.ssrLoadModule('/src/workflow/operationSharedInputs.ts')); + expandCanonicalBlocks = await loadCanonicalWorkflowExpander(parserServer); + auxiliarySources = await parseCanonicalAuxiliarySources(capabilities, selectedCapabilities, parserServer); + } finally { + await parserServer.close(); } const installedChrome = join( process.env.PLAYWRIGHT_BROWSERS_PATH || join(homedir(), '.cache', 'ms-playwright'), @@ -341,18 +371,7 @@ async function main() { taskTemplates = await pageOperation('reading Studio task-template skeletons', (page) => page.evaluate(() => window.__MODIFF_E2E__?.listTaskTemplateSkeletons() ?? []), ); - byPair = new Map(); - for (const template of templates) { - const pair = `${template.modelType}|${template.mode}`; - const current = byPair.get(pair); - const isLoraVariant = template.category === 'lora'; - const currentIsLoraVariant = current?.category === 'lora'; - if (!current || (currentIsLoraVariant && !isLoraVariant)) byPair.set(pair, template); - } - for (const template of taskTemplates) { - const pair = `${template.modelType}|${template.mode}`; - if (!byPair.has(pair)) byPair.set(pair, { ...template, taskContract: true }); - } + byPair = selectCanonicalWorkflowSources(templates, taskTemplates, retainedTemplateIds); missingPairs = selectedCapabilities.flatMap((capability) => (capability.runnableModes ?? []) .map((mode) => `${capability.modelType}|${mode}`) @@ -437,19 +456,25 @@ async function main() { try { await ensureBrowserSession(); const initialTemplates = [...browserSession.catalog.templates]; + const variantTemplates = selectCanonicalWorkflowVariantTemplates(initialTemplates, reviewedVariantIds, { + requestedPair, + requestedTemplateId, + }); let records = []; let experimentalRecords = []; - if (requestedPair && existsSync(MANIFEST_PATH)) { + if ((requestedPair || requestedTemplateId) && existsSync(MANIFEST_PATH)) { const existingManifest = JSON.parse(readFileSync(MANIFEST_PATH, 'utf8')); records = retainUnselectedCurrentWorkflowRecords( existingManifest.workflows, capabilities.capabilities, requestedPair, + requestedTemplateId, ); experimentalRecords = retainUnselectedCurrentWorkflowRecords( existingManifest.experimentalWorkflows, capabilities.capabilities, requestedPair, + requestedTemplateId, ); } @@ -465,10 +490,10 @@ async function main() { const finalizeCanonicalGraph = async (graph) => { const arrangedBeforeCanonicalIds = await arrangeSnapshot(graph); - const canonical = canonicalizeGraphIds(arrangedBeforeCanonicalIds); + const canonical = canonicalizeGraphIds(arrangedBeforeCanonicalIds, remapOperationAuthoring); const arranged = await arrangeSnapshot(canonical); const repeated = await arrangeSnapshot(arranged); - if (JSON.stringify(graphLayoutSignature(arranged)) !== JSON.stringify(graphLayoutSignature(repeated))) { + if (graphLayoutSignature(arranged) !== graphLayoutSignature(repeated)) { throw new Error('Canonical graph layout did not reach a deterministic fixed point.'); } return stable(addLayoutMetadata(repeated)); @@ -501,13 +526,16 @@ async function main() { ); } const exported = await pageOperation(`exporting ${description}`, (page) => - page.evaluate(() => window.__MODIFF_E2E__?.prepareWorkflowGraphForExport()), + page.evaluate(() => window.__MODIFF_E2E__?.prepareWorkflowGraphForExport({ canonicalLibrary: true })), ); if (!exported || !Array.isArray(exported.nodes) || !Array.isArray(exported.edges)) { throw new Error(`Could not export a completed graph for ${description}.`); } return finalizeCanonicalGraph( - applyCatalogArtifactPins(applyPortableContracts(sanitize(exported), mode), artifactPins), + applyCatalogArtifactPins( + applyPortableContracts(sanitize(canonicalExecutableWorkflowGraph(exported, expandCanonicalBlocks)), mode), + artifactPins, + ), ); }; @@ -542,26 +570,30 @@ async function main() { ); }; - if (!requestedPair) { + if (!requestedPair && !requestedTemplateId) { rmSync(OUTPUT_ROOT, { recursive: true, force: true }); rmSync(EXPERIMENTAL_OUTPUT_ROOT, { recursive: true, force: true }); } for (const capability of selectedCapabilities) { for (const mode of capability.runnableModes ?? []) { + if (requestedTemplateId) continue; const pair = `${capability.modelType}|${mode}`; if (requestedPair && pair !== requestedPair) continue; const template = browserSession.catalog.byPair.get(pair); if (!template) throw new Error(`No Studio template can build ${pair}.`); + const isSupported = capability.supportTier === 'supported'; + const libraryTier = isSupported ? 'studio' : 'experimental'; + const relativePath = join(libraryTier, slug(capability.modelType), `${slug(mode)}.json`).replaceAll('\\', '/'); + const outputPath = join(BACKEND_ROOT, 'data', 'graphs', relativePath); + const existingGraph = + requestedPair && existsSync(outputPath) ? JSON.parse(readFileSync(outputPath, 'utf8')) : null; const graph = await buildTemplateGraphWithRecovery( (catalog) => catalog.byPair.get(pair), mode, `canonical workflow ${pair}`, ); + if (existingGraph) retainExistingCanonicalDeviceDefaults(graph, existingGraph); const graphHash = hash(graph); - const isSupported = capability.supportTier === 'supported'; - const libraryTier = isSupported ? 'studio' : 'experimental'; - const relativePath = join(libraryTier, slug(capability.modelType), `${slug(mode)}.json`).replaceAll('\\', '/'); - const outputPath = join(BACKEND_ROOT, 'data', 'graphs', relativePath); mkdirSync(dirname(outputPath), { recursive: true }); writeFileSync(outputPath, `${JSON.stringify(graph, null, 2)}\n`); const qualificationStatus = Array.isArray(capability.qualifiedModes) @@ -578,7 +610,7 @@ async function main() { supportTier: capability.supportTier, qualificationStatus, ...qualificationDimensions(qualificationStatus), - requiredArtifacts: requiredArtifactsForGraph(graph, capability.defaultRepo), + requiredArtifacts: canonicalWorkflowRequiredArtifacts(graph, capability, mode), requiredInputs: capability.inputContracts?.[mode] ?? [], pipelineClasses: capability.pipelineClasses ?? [], sourceTemplateId: template.id, @@ -587,6 +619,7 @@ async function main() { graphPath: relativePath, graphHash, }; + attachCanonicalAuxiliaryBinding(record, graph, auxiliarySources); (isSupported ? records : experimentalRecords).push(record); } } @@ -594,32 +627,42 @@ async function main() { const capabilitiesByType = new Map( capabilities.capabilities.map((capability) => [capability.modelType, capability]), ); - const loraTemplates = initialTemplates.filter( - (candidate) => - candidate.category === 'lora' && - (!requestedPair || `${candidate.modelType}|${candidate.mode}` === requestedPair), - ); - for (const template of loraTemplates) { + for (const template of variantTemplates) { + const isLoraVariant = template.category === 'lora'; const capability = capabilitiesByType.get(template.modelType); if (!capability?.runnableModes?.includes(template.mode)) { throw new Error( - `LoRA template ${template.id} has no runnable capability for ${template.modelType}|${template.mode}.`, + `Template ${template.id} has no runnable capability for ${template.modelType}|${template.mode}.`, ); } - const graph = await buildTemplateGraphWithRecovery( - (catalog) => catalog.templates.find((candidate) => candidate.id === template.id), - template.mode, - `LoRA workflow variant ${template.id}`, - ); - const graphHash = hash(graph); const isSupported = capability.supportTier === 'supported'; const libraryTier = isSupported ? 'studio' : 'experimental'; + const experimentalRecipe = variantPolicy.templates.find((row) => row.id === template.id)?.experimentalRecipe; + if ( + experimentalRecipe && + (isSupported || + experimentalRecipe.modelType !== capability.modelType || + experimentalRecipe.mode !== template.mode || + !capability.optionalRuntimeProfileIds?.includes(experimentalRecipe.runtimeProfileId)) + ) + throw new Error(`Reviewed experimental recipe differs from its backend runtime declaration: ${template.id}.`); const relativePath = join( libraryTier, slug(capability.modelType), `${slug(template.mode)}--${slug(template.id)}.json`, ).replaceAll('\\', '/'); const outputPath = join(BACKEND_ROOT, 'data', 'graphs', relativePath); + const existingGraph = + (requestedPair || requestedTemplateId) && existsSync(outputPath) + ? JSON.parse(readFileSync(outputPath, 'utf8')) + : null; + const graph = await buildTemplateGraphWithRecovery( + (catalog) => catalog.templates.find((candidate) => candidate.id === template.id), + template.mode, + `Template workflow variant ${template.id}`, + ); + if (existingGraph) retainExistingCanonicalDeviceDefaults(graph, existingGraph); + const graphHash = hash(graph); mkdirSync(dirname(outputPath), { recursive: true }); writeFileSync(outputPath, `${JSON.stringify(graph, null, 2)}\n`); const adapterNode = graph.nodes.find( @@ -641,8 +684,13 @@ async function main() { supportTier: capability.supportTier, qualificationStatus, ...qualificationDimensions(qualificationStatus), - variant: 'lora-theme', - requiredArtifacts: requiredArtifactsForGraph(graph, capability.defaultRepo || adapterRepo), + variant: isLoraVariant ? 'lora-theme' : 'template-recipe', + ...(experimentalRecipe ? { experimentalRecipe } : {}), + requiredArtifacts: canonicalWorkflowRequiredArtifacts( + graph, + { ...capability, defaultRepo: capability.defaultRepo || adapterRepo }, + template.mode, + ), requiredInputs: capability.inputContracts?.[template.mode] ?? [], pipelineClasses: capability.pipelineClasses ?? [], sourceTemplateId: template.id, @@ -651,11 +699,12 @@ async function main() { graphPath: relativePath, graphHash, }; + attachCanonicalAuxiliaryBinding(record, graph, auxiliarySources); (isSupported ? records : experimentalRecords).push(record); } browserSession?.guard.assertHealthy('publishing the canonical workflow manifest'); - records.sort((left, right) => left.id.localeCompare(right.id)); + records.sort(compareCanonicalWorkflowRecordIds); const manifest = { schemaVersion: 1, generatedAt: new Date().toISOString(), @@ -681,23 +730,28 @@ async function main() { } } -if (process.argv.includes('--help') || process.argv.includes('-h')) { - process.stdout.write( - [ - 'Generate portable Studio workflows from a running MoDiff capability registry.', - '', - 'Environment:', - ' MODIFF_SERVER Backend URL (default http://127.0.0.1:8088)', - ' MODIFF_FRONTEND Client URL (default http://127.0.0.1:5173)', - ' MODIFF_BACKEND_DIR Backend repository root (default ../MoDiff)', - ' MODIFF_WORKFLOW_BROWSER_BATCH_SIZE Workflows per fresh browser (default 20)', - '', - 'Options:', - ' --pair=ModelType|mode Regenerate one canonical pair and its variants, then merge them into the manifest.', - '', - 'Full generation replaces both graph catalogs and the workflow manifest; --pair updates only that model/mode pair.', - ].join('\n') + '\n', - ); -} else { - await main(); +export { applyPortableContracts, sanitize as sanitizeCanonicalWorkflowGraph, canonicalizeGraphIds }; + +if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href) { + if (process.argv.includes('--help') || process.argv.includes('-h')) { + process.stdout.write( + [ + 'Generate portable Studio workflows from a running MoDiff capability registry.', + '', + 'Environment:', + ' MODIFF_SERVER Backend URL (default http://127.0.0.1:8088)', + ' MODIFF_FRONTEND Client URL (default http://127.0.0.1:5173)', + ' MODIFF_BACKEND_DIR Backend repository root (default ../MoDiff)', + ' MODIFF_WORKFLOW_BROWSER_BATCH_SIZE Workflows per fresh browser (default 20)', + '', + 'Options:', + ' --pair=ModelType|mode Regenerate one canonical pair and its variants, then merge them into the manifest.', + ' --template=id Regenerate one declared template variant without replacing the default pair.', + '', + 'Full generation includes reviewed recipe and LoRA variants. Scoped generation preserves unrelated current records.', + ].join('\n') + '\n', + ); + } else { + await main(); + } } diff --git a/scripts/workflow-library-image-stages.test.mjs b/scripts/workflow-library-image-stages.test.mjs new file mode 100644 index 00000000..8f575141 --- /dev/null +++ b/scripts/workflow-library-image-stages.test.mjs @@ -0,0 +1,179 @@ +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; +import path from 'node:path'; +import { after, before, test } from 'node:test'; +import { createServer } from 'vite'; +import { verifyCanonicalImagePipelineStages } from './workflow-library-contract.mjs'; + +const backend = path.resolve(process.env.MODIFF_BACKEND_DIR || '../MoDiff'); +const manifest = JSON.parse(readFileSync(path.join(backend, 'data/workflow-library-manifest.json'), 'utf8')); +const selected = new Set([ + 'FluxCannyPipeline:control_image', + 'FluxDepthPipeline:control_image', + 'FluxFillPipeline:inpaint', + 'FluxFillPipeline:outpaint', + 'FluxReduxPipeline:edit_image', + 'FluxReduxPipeline:multi_image_reference_edit', +]); +const rows = manifest.workflows.filter((row) => selected.has(row.id)); +assert.equal(rows.length, 6); +let server, contracts; + +before(async () => { + server = await createServer({ + root: process.cwd(), + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + appType: 'custom', + }); + contracts = { + ...(await server.ssrLoadModule('/src/workflow/imagePipelineStageContracts.ts')), + ...(await server.ssrLoadModule('/src/workflow/operationContracts.ts')), + }; +}); +after(async () => server?.close()); + +function graphFor(row) { + return JSON.parse(readFileSync(path.join(backend, 'data/graphs', row.graphPath), 'utf8')); +} + +function stageNodes(graph) { + return Object.fromEntries( + graph.nodes.filter((node) => node.data.module === 'modules.DiffusersImage').map((node) => [node.data.action, node]), + ); +} + +/** A local mutation fixture supplies the complete required route solely to + * exercise refusal controls. It is never written back as a canonical graph. */ +function completeMutationFixture(graph) { + const result = structuredClone(graph); + const nodes = stageNodes(result); + for (const action of ['EncodeInputs', 'Denoise', 'DecodeLatents']) { + if ( + !result.edges.some( + (edge) => + edge.source === nodes.LoadPipeline.id && + edge.sourceHandle === 'pipeline' && + edge.target === nodes[action].id && + edge.targetHandle === 'pipeline', + ) + ) + result.edges.push({ + id: `fixture-owner-${action}`, + source: nodes.LoadPipeline.id, + sourceHandle: 'pipeline', + target: nodes[action].id, + targetHandle: 'pipeline', + }); + } + return result; +} + +for (const row of rows) { + test(`current canonical ${row.id} preserves all required owned image-stage links`, () => { + const graph = graphFor(row); + assert.doesNotThrow(() => verifyCanonicalImagePipelineStages(row, graph, contracts)); + }); + + test(`${row.id} stage verifier accepts complete local topology and rejects omitted, foreign and duplicate suppliers`, () => { + const graph = completeMutationFixture(graphFor(row)); + const pristine = structuredClone(graph); + const nodes = stageNodes(graph); + assert.doesNotThrow(() => verifyCanonicalImagePipelineStages(row, graph, contracts)); + assert.deepEqual(graph, pristine, 'Verification does not modify authoring or persisted graph data.'); + const required = [ + ...['EncodeInputs', 'Denoise', 'DecodeLatents'].map((action) => [ + nodes.LoadPipeline.id, + 'pipeline', + nodes[action].id, + 'pipeline', + ]), + [nodes.EncodeInputs.id, 'encoded_inputs', nodes.Denoise.id, 'encoded_inputs'], + [nodes.Denoise.id, 'latents_out', nodes.DecodeLatents.id, 'latents'], + [nodes.Denoise.id, 'latent_binding', nodes.DecodeLatents.id, 'latent_binding'], + [nodes.Denoise.id, 'width_out', nodes.DecodeLatents.id, 'width'], + [nodes.Denoise.id, 'height_out', nodes.DecodeLatents.id, 'height'], + ]; + for (const expected of required) { + const index = graph.edges.findIndex( + (edge) => + edge.source === expected[0] && + edge.sourceHandle === expected[1] && + edge.target === expected[2] && + edge.targetHandle === expected[3], + ); + assert.ok(index >= 0); + const missing = structuredClone(graph); + missing.edges.splice(index, 1); + assert.throws( + () => verifyCanonicalImagePipelineStages(row, missing, contracts), + /owned image pipeline stage route/, + ); + const duplicate = structuredClone(graph); + duplicate.edges.push({ ...duplicate.edges[index], id: `duplicate-${index}` }); + assert.throws( + () => verifyCanonicalImagePipelineStages(row, duplicate, contracts), + /owned image pipeline stage route/, + ); + } + const undeclared = structuredClone(graph); + for (const node of Object.values(stageNodes(undeclared))) delete node.data.operationAuthoring; + assert.throws( + () => verifyCanonicalImagePipelineStages(row, undeclared, contracts), + /owned image pipeline stage route/, + ); + for (const action of ['EncodeInputs', 'Denoise', 'DecodeLatents']) { + const missingDeclaration = structuredClone(graph); + delete stageNodes(missingDeclaration)[action].data.operationAuthoring; + assert.throws( + () => verifyCanonicalImagePipelineStages(row, missingDeclaration, contracts), + /owned image pipeline stage route/, + ); + const forgedDeclaration = structuredClone(graph); + stageNodes(forgedDeclaration)[action].data.operationAuthoring.operation.nodeKey = + 'modules.DiffusersImage.Generate'; + assert.throws( + () => verifyCanonicalImagePipelineStages(row, forgedDeclaration, contracts), + /owned image pipeline stage route/, + ); + for (const field of ['module', 'action']) { + const wrongExecutable = structuredClone(graph); + stageNodes(wrongExecutable)[action].data[field] = field === 'module' ? 'modules.ForeignImage' : 'Generate'; + assert.throws( + () => verifyCanonicalImagePipelineStages(row, wrongExecutable, contracts), + /owned image pipeline stage route/, + ); + } + } + const wrongTask = structuredClone(graph); + for (const node of Object.values(stageNodes(wrongTask))) + node.data.operationAuthoring.operation.task = 'foreign_task'; + assert.throws( + () => verifyCanonicalImagePipelineStages(row, wrongTask, contracts), + /owned image pipeline stage route/, + ); + const foreign = structuredClone(graph); + const another = structuredClone(nodes.LoadPipeline); + another.id = 'foreign-loader'; + foreign.nodes.push(another); + foreign.edges.find((edge) => edge.target === nodes.EncodeInputs.id && edge.targetHandle === 'pipeline').source = + another.id; + assert.throws( + () => verifyCanonicalImagePipelineStages(row, foreign, contracts), + /owned image pipeline stage route/, + ); + const foreignScope = structuredClone(graph); + stageNodes(foreignScope).DecodeLatents.data.operationAuthoring.operation.pipelineClass = 'ForeignPipeline'; + assert.throws( + () => verifyCanonicalImagePipelineStages(row, foreignScope, contracts), + /owned image pipeline stage route/, + ); + }); +} + +test('unrelated current canonical image, audio and video routes retain ordinary verifier behavior', () => { + for (const row of manifest.workflows.filter((item) => !selected.has(item.id))) + assert.doesNotThrow(() => verifyCanonicalImagePipelineStages(row, graphFor(row), contracts)); +}); diff --git a/scripts/workflow-library-manifest-state.mjs b/scripts/workflow-library-manifest-state.mjs index dfe21d4f..930802fa 100644 --- a/scripts/workflow-library-manifest-state.mjs +++ b/scripts/workflow-library-manifest-state.mjs @@ -1,5 +1,153 @@ -export function retainUnselectedCurrentWorkflowRecords(records, capabilities, requestedPair) { - if (!requestedPair) return []; +export function compareCanonicalWorkflowRecordIds(left, right) { + // Published IDs use codepoint order so host locale never rewrites unrelated pairs. + return left.id < right.id ? -1 : left.id > right.id ? 1 : 0; +} + +export function selectCanonicalWorkflowSources(templates, taskTemplates, retainedTemplateIds) { + const byPair = new Map(); + for (const template of templates) { + // A retained Gallery example belongs to the catalog, but its explicit + // input/prompt cannot replace the standalone task's editable defaults. + if (retainedTemplateIds.has(template.id)) continue; + const pair = `${template.modelType}|${template.mode}`; + const current = byPair.get(pair); + if (!current || (current.category === 'lora' && template.category !== 'lora')) byPair.set(pair, template); + } + for (const template of taskTemplates) { + const pair = `${template.modelType}|${template.mode}`; + if (!byPair.has(pair)) byPair.set(pair, { ...template, taskContract: true }); + } + return byPair; +} + +export function selectCanonicalWorkflowVariantTemplates(templates, reviewedTemplateIds = [], scope = {}) { + if (scope.requestedPair && scope.requestedTemplateId) throw new Error('Choose one canonical generation scope.'); + const reviewed = new Set(reviewedTemplateIds); + for (const id of reviewed) { + if (templates.filter((template) => template.id === id).length !== 1) + throw new Error(`Reviewed canonical template is missing or ambiguous: ${id}.`); + } + const variants = templates.filter( + (template) => + (template.category === 'lora' || reviewed.has(template.id)) && + (!scope.requestedPair || `${template.modelType}|${template.mode}` === scope.requestedPair) && + (!scope.requestedTemplateId || template.id === scope.requestedTemplateId), + ); + if (new Set(variants.map((template) => template.id)).size !== variants.length) + throw new Error('Canonical template variant identities are ambiguous.'); + if (scope.requestedTemplateId && variants.length !== 1) + throw new Error('The requested template has no reviewed canonical variant declaration.'); + return variants; +} + +export function canonicalWorkflowVariantTemplateIds(policy) { + if ( + policy?.schemaVersion !== 1 || + policy.format !== 'modiff.canonical-template-variants.v1' || + !Array.isArray(policy.templates) || + policy.templates.length > 64 + ) + throw new Error('Canonical template variant policy is invalid.'); + const ids = policy.templates.map((row) => { + if ( + !row || + !/^[a-z0-9][a-z0-9_-]{0,127}$/.test(row.id ?? '') || + typeof row.reason !== 'string' || + !row.reason.trim() || + row.reason.length > 400 + ) + throw new Error('Canonical template variant declaration is invalid.'); + if (Object.hasOwn(row, 'experimentalRecipe')) { + const value = row.experimentalRecipe; + if ( + !value || + typeof value !== 'object' || + Array.isArray(value) || + Object.keys(value).sort().join(',') !== 'mode,modelType,runtimeProfileId' || + !/^[A-Za-z][A-Za-z0-9_]{0,127}$/.test(value.modelType ?? '') || + !/^[a-z][a-z0-9_]{0,63}$/.test(value.mode ?? '') || + !/^[a-z0-9][a-z0-9:-]{0,127}$/.test(value.runtimeProfileId ?? '') + ) + throw new Error('Reviewed experimental recipe declaration is invalid.'); + } + return row.id; + }); + if (new Set(ids).size !== ids.length) throw new Error('Canonical template variant declarations are duplicated.'); + return ids; +} + +// A reviewed fixed recipe may have an ordinary execution receipt without +// promoting its experimental model family, optional runtime or Auto policy. +export function selectReviewedExperimentalWorkflows(records, policy) { + canonicalWorkflowVariantTemplateIds(policy); + return policy.templates + .filter((row) => row.experimentalRecipe) + .flatMap((row) => { + const matches = records.filter((record) => record.sourceTemplateId === row.id && record.variant); + if (matches.length > 1) throw new Error('Reviewed experimental association is ambiguous.'); + if (!matches.length) return []; + const [record] = matches; + const expected = row.experimentalRecipe; + if ( + record.id !== `${expected.modelType}:${expected.mode}:${row.id}` || + record.modelType !== expected.modelType || + record.mode !== expected.mode || + record.supportTier !== 'experimental' || + !/^experimental\/[a-z0-9][a-z0-9-]{0,127}\/[a-z0-9][a-z0-9-]{0,255}\.json$/u.test(record.graphPath ?? '') || + !['template-recipe', 'lora-theme'].includes(record.variant) || + !record.experimentalRecipe || + Object.keys(record.experimentalRecipe).sort().join(',') !== 'mode,modelType,runtimeProfileId' || + ['modelType', 'mode', 'runtimeProfileId'].some((key) => record.experimentalRecipe[key] !== expected[key]) + ) + throw new Error(`Reviewed experimental association differs from its declaration: ${row.id}.`); + return [record]; + }); +} + +export function parseCanonicalWorkflowGenerationScope(args) { + let requestedPair = null; + let requestedTemplateId = null; + for (const arg of args) { + if (arg === '--help' || arg === '-h') continue; + if (arg.startsWith('--pair=') && !requestedPair && /^[A-Za-z\d_]+\|[a-z\d_]+$/.test(arg.slice(7))) { + requestedPair = arg.slice(7); + } else if ( + arg.startsWith('--template=') && + !requestedTemplateId && + /^[a-z0-9][a-z0-9_-]{0,127}$/.test(arg.slice(11)) + ) { + requestedTemplateId = arg.slice(11); + } else throw new Error('Use one --pair=ModelType|mode or --template=reviewed_template_id scope.'); + } + if (requestedPair && requestedTemplateId) throw new Error('Choose one canonical generation scope.'); + return { requestedPair, requestedTemplateId }; +} + +export function selectCanonicalWorkflowCapabilities(capabilities, templates, reviewedTemplateIds, scope) { + let pair = scope.requestedPair; + if (scope.requestedTemplateId) { + const [template] = selectCanonicalWorkflowVariantTemplates(templates, reviewedTemplateIds, scope); + pair = `${template.modelType}|${template.mode}`; + } + if (!pair) return capabilities; + const selected = capabilities.filter((capability) => + (capability.runnableModes ?? []).some((mode) => `${capability.modelType}|${mode}` === pair), + ); + if (selected.length !== 1) throw new Error(`The requested workflow pair is not uniquely runnable: ${pair}.`); + return selected.map((capability) => ({ + ...capability, + runnableModes: capability.runnableModes.filter((mode) => `${capability.modelType}|${mode}` === pair), + })); +} + +export function retainUnselectedCurrentWorkflowRecords( + records, + capabilities, + requestedPair, + requestedTemplateId = null, +) { + if (requestedPair && requestedTemplateId) throw new Error('Choose one canonical generation scope.'); + if (!requestedPair && !requestedTemplateId) return []; const currentPairs = new Set( capabilities.flatMap((capability) => (capability.runnableModes ?? []).map((mode) => `${capability.modelType}|${mode}`), @@ -7,6 +155,11 @@ export function retainUnselectedCurrentWorkflowRecords(records, capabilities, re ); return (records ?? []).filter((record) => { const pair = `${record.modelType}|${record.mode}`; - return pair !== requestedPair && currentPairs.has(pair); + return ( + currentPairs.has(pair) && + (requestedTemplateId + ? !(record.variant && record.sourceTemplateId === requestedTemplateId) + : pair !== requestedPair) + ); }); } diff --git a/scripts/workflow-library-verify.mjs b/scripts/workflow-library-verify.mjs index b30cf1f0..e022fa1d 100644 --- a/scripts/workflow-library-verify.mjs +++ b/scripts/workflow-library-verify.mjs @@ -1,14 +1,23 @@ import { createHash } from 'node:crypto'; +import { execFileSync } from 'node:child_process'; import { existsSync, readFileSync } from 'node:fs'; import { join, resolve } from 'node:path'; import { createServer } from 'vite'; -import { canonicalJsonHash, stableJsonValue as stable } from './canonical-json.mjs'; -import { workflowNodeAttentionBackendError, workflowNodeDeviceOffloadError } from './workflow-library-contract.mjs'; +import { canonicalJsonHash } from './canonical-json.mjs'; +import { GENERATED_LAYOUT_ALGORITHM, graphLayoutSignature } from '../src/workflow/generatedWorkflowLayout.ts'; +import { + workflowNodeAttentionBackendError, + hasMachineSpecificWorkflowState, + workflowVideoAttentionRecipeError, + workflowNodeDeviceOffloadError, + verifyCanonicalImagePipelineStages, +} from './workflow-library-contract.mjs'; import { verifyNoDeadWorkflowNodes } from './workflow-library-dead-nodes.mjs'; +import { parseCanonicalAuxiliarySources } from './workflow-library-auxiliary-sources.mjs'; +import { canonicalExecutableWorkflowGraph, loadCanonicalWorkflowExpander } from './canonical-workflow-execution.mjs'; const ROOT = process.cwd(); const BACKEND_ROOT = resolve(process.env.MODIFF_BACKEND_DIR || join(ROOT, '..', 'MoDiff')); -const LAYOUT_ALGORITHM = 'modiff-layered-v1'; const LAYOUT_HORIZONTAL_GAP = 140; const LAYOUT_VERTICAL_GAP = 72; const LAYOUT_EPSILON = 0.01; @@ -33,46 +42,29 @@ if (!Array.isArray(manifest.workflows) || manifest.workflows.length !== expected } const pairs = new Set(); - -function graphLayoutSignature(graph) { - return stable( - [...(graph?.nodes ?? [])] - .map((node) => ({ - id: node.id, - parentId: node.parentId ?? null, - position: node.position, - width: node.width ?? null, - height: node.height ?? null, - measured: node.measured ?? null, - })) - .sort((left, right) => String(left.id).localeCompare(String(right.id))), - ); -} +let authoritativeAuxiliarySources = new Map(); +let unpackCanonicalGraph; +let expandCanonicalBlocks; function graphLayoutHash(graph) { - return createHash('sha256') - .update(JSON.stringify(graphLayoutSignature(graph))) - .digest('hex'); + return createHash('sha256').update(graphLayoutSignature(graph)).digest('hex'); } function verifyCanonicalLayout(workflow, graph, graphLayout) { const metadata = graph.layout; if ( - metadata?.algorithm !== LAYOUT_ALGORITHM || + metadata?.algorithm !== GENERATED_LAYOUT_ALGORITHM || metadata?.horizontalGap !== LAYOUT_HORIZONTAL_GAP || metadata?.verticalGap !== LAYOUT_VERTICAL_GAP ) { - throw new Error(`${workflow.id} is missing canonical ${LAYOUT_ALGORITHM} layout metadata.`); + throw new Error(`${workflow.id} is missing canonical ${GENERATED_LAYOUT_ALGORITHM} layout metadata.`); } if (metadata.positionHash !== graphLayoutHash(graph)) { throw new Error(`${workflow.id} canonical layout position hash does not match its nodes.`); } const rearranged = graphLayout.arrangeGraphNodes(graph.nodes ?? [], graph.edges ?? []); - if ( - JSON.stringify(graphLayoutSignature({ nodes: rearranged })) !== - JSON.stringify(graphLayoutSignature({ nodes: graph.nodes ?? [] })) - ) { + if (graphLayoutSignature({ nodes: rearranged }) !== graphLayoutSignature(graph)) { throw new Error(`${workflow.id} does not equal a deterministic re-layout of its persisted nodes.`); } @@ -109,7 +101,7 @@ function verifyCanonicalLayout(workflow, graph, graphLayout) { } } -function verifyWorkflow(workflow, expectedTier, graphLayout) { +function verifyWorkflow(workflow, expectedTier, graphLayout, imageStageContracts) { if (pairs.has(workflow.id)) throw new Error(`Duplicate canonical workflow: ${workflow.id}`); pairs.add(workflow.id); if (workflow.supportTier !== expectedTier) throw new Error(`${workflow.id} is not in the ${expectedTier} tier.`); @@ -133,7 +125,14 @@ function verifyWorkflow(workflow, expectedTier, graphLayout) { const raw = readFileSync(graphPath, 'utf8'); const graph = JSON.parse(raw); verifyCanonicalLayout(workflow, graph, graphLayout); - verifyNoDeadWorkflowNodes(workflow, graph); + verifyCanonicalImagePipelineStages(workflow, graph, imageStageContracts); + const executableGraph = canonicalExecutableWorkflowGraph(graph, expandCanonicalBlocks); + const dependencyGraph = workflow.auxiliaryTerminalBinding ? unpackCanonicalGraph(executableGraph) : executableGraph; + verifyNoDeadWorkflowNodes( + workflow, + dependencyGraph, + authoritativeAuxiliarySources.get(`${workflow.modelType}|${workflow.mode}`), + ); const nodeIds = new Set((graph.nodes ?? []).map((node) => node.id)); for (const node of graph.nodes ?? []) { if (node.parentId && !nodeIds.has(node.parentId)) { @@ -146,14 +145,8 @@ function verifyWorkflow(workflow, expectedTier, graphLayout) { } } if (node?.data?.action === 'DiffusersExecutionRecipe') { - const params = node.data.params ?? {}; - const attentionBackend = params.attention_backend?.value; - const device = params.device?.value; const attentionError = workflowNodeAttentionBackendError(node); if (attentionError) throw new Error(`${workflow.id} ${attentionError}.`); - if (String(attentionBackend ?? '').startsWith('_native_') && String(device ?? '').startsWith('cpu')) { - throw new Error(`${workflow.id} selects accelerator attention ${attentionBackend} on ${device}.`); - } } const offloadError = workflowNodeDeviceOffloadError(node); if (offloadError) throw new Error(`${workflow.id} ${offloadError}.`); @@ -395,6 +388,9 @@ function verifyWorkflow(workflow, expectedTier, graphLayout) { revision: '3d4d00fc113225e1040f4d3bec504b6ec750c10c', }, }; + if (pipelineClass === 'AnimateDiffPAGPipeline' && recipeParams.attention_backend?.value !== 'auto') { + throw new Error(`${workflow.id} AnimateDiff PAG graph must use its automatic attention default.`); + } const animateMotion = animateMotionArtifacts[pipelineClass]; if (animateMotion) { const base = pipeline.data.params?.model_id?.value; @@ -410,14 +406,14 @@ function verifyWorkflow(workflow, expectedTier, graphLayout) { motionRevision !== animateMotion.revision || !workflow.requiredArtifacts.includes(base.value) || !workflow.requiredArtifacts.includes(motion.value) || - recipeParams.attention_backend?.value !== '_native_math' || + recipeParams.attention_backend?.value !== 'auto' || recipeParams.attention_components?.value !== '' || recipeParams.vae_tiling?.value !== false ) { throw new Error(`${workflow.id} AnimateDiff graph is missing its exact base, motion, or scheduler recipe.`); } } - if (pipelineClass === 'CogVideoXPipeline') { + if (['CogVideoXPipeline', 'CogVideoXVideoToVideoPipeline'].includes(pipelineClass)) { const base = pipeline.data.params?.model_id?.value; const revision = pipeline.data.params?.revision?.value; const quantizationParams = quantization.data.params ?? {}; @@ -426,8 +422,8 @@ function verifyWorkflow(workflow, expectedTier, graphLayout) { base.value !== 'zai-org/CogVideoX-2b' || revision !== '1137dacfc2c9c012bed6a0793f4ecf2ca8e7ba01' || !workflow.requiredArtifacts.includes(base.value) || - quantizationParams.components?.value !== '' || - recipeParams.attention_backend?.value !== '_native_math' || + JSON.stringify(quantizationParams.components?.value) !== '[]' || + recipeParams.attention_backend?.value !== 'auto' || recipeParams.attention_components?.value !== '' || recipeParams.vae_slicing?.value !== true || recipeParams.vae_tiling?.value !== false @@ -435,6 +431,19 @@ function verifyWorkflow(workflow, expectedTier, graphLayout) { throw new Error(`${workflow.id} CogVideoX graph is missing its exact artifact or safe execution recipe.`); } } + if (pipelineClass === 'LTXI2VLongMultiPromptPipeline') { + const generate = (graph.nodes ?? []).find( + (node) => node?.data?.module === 'modules.DiffusersVideo' && node?.data?.action === 'Generate', + ); + const settings = generate?.data?.params ?? {}; + if ( + settings.num_inference_steps?.value !== 8 || + settings.guidance_scale?.value !== 1 || + settings.max_sequence_length?.value !== 128 + ) { + throw new Error(`${workflow.id} LTX long graph must use its pinned distilled sampler defaults.`); + } + } if (pipelineClass === 'AllegroPipeline') { const base = pipeline.data.params?.model_id?.value; const revision = pipeline.data.params?.revision?.value; @@ -448,9 +457,9 @@ function verifyWorkflow(workflow, expectedTier, graphLayout) { base.value !== 'rhymes-ai/Allegro' || revision !== 'c1b9207bb5cb79e2aa08f3d139c17d26c0de55b6' || !workflow.requiredArtifacts.includes(base.value) || - quantizationParams.components?.value !== '' || + JSON.stringify(quantizationParams.components?.value) !== '[]' || recipeParams.offload_mode?.value !== 'sequential_cpu' || - recipeParams.attention_backend?.value !== '_native_math' || + recipeParams.attention_backend?.value !== 'auto' || recipeParams.attention_components?.value !== '' || recipeParams.vae_slicing?.value !== true || recipeParams.vae_tiling?.value !== false || @@ -477,9 +486,9 @@ function verifyWorkflow(workflow, expectedTier, graphLayout) { base.value !== 'maxin-cn/Latte-1' || revision !== '0653024365272f061fc44d1078134df22842b687' || !workflow.requiredArtifacts.includes(base.value) || - quantizationParams.components?.value !== '' || + JSON.stringify(quantizationParams.components?.value) !== '[]' || recipeParams.offload_mode?.value !== 'sequential_cpu' || - recipeParams.attention_backend?.value !== '_native_math' || + recipeParams.attention_backend?.value !== 'auto' || recipeParams.attention_components?.value !== '' || recipeParams.vae_slicing?.value !== true || recipeParams.vae_tiling?.value !== false || @@ -506,9 +515,9 @@ function verifyWorkflow(workflow, expectedTier, graphLayout) { base.value !== 'genmo/mochi-1-preview' || revision !== '14be5fcea23095ed330cb214647916a451e38b6e' || !workflow.requiredArtifacts.includes(base.value) || - quantizationParams.components?.value !== '' || + JSON.stringify(quantizationParams.components?.value) !== '[]' || recipeParams.offload_mode?.value !== 'sequential_cpu' || - recipeParams.attention_backend?.value !== '_native_math' || + recipeParams.attention_backend?.value !== 'auto' || recipeParams.attention_components?.value !== '' || recipeParams.vae_slicing?.value !== true || recipeParams.vae_tiling?.value !== false || @@ -543,9 +552,9 @@ function verifyWorkflow(workflow, expectedTier, graphLayout) { base.value !== 'Efficient-Large-Model/SANA-Video_2B_480p_diffusers' || revision !== 'db5f398b13ca086d09a50ce156c20527773841b1' || !workflow.requiredArtifacts.includes(base.value) || - quantizationParams.components?.value !== '' || + JSON.stringify(quantizationParams.components?.value) !== '[]' || recipeParams.offload_mode?.value !== 'sequential_cpu' || - recipeParams.attention_backend?.value !== '_native_math' || + recipeParams.attention_backend?.value !== 'auto' || recipeParams.attention_components?.value !== '' || recipeParams.vae_slicing?.value !== true || recipeParams.vae_tiling?.value !== false || @@ -570,14 +579,8 @@ function verifyWorkflow(workflow, expectedTier, graphLayout) { throw new Error(`${workflow.id} video generator ${generate.id} does not preserve mode ${workflow.mode}.`); } } - if (['WanPipeline', 'Wan22Pipeline', 'WanTI2VPipeline'].includes(pipelineClass)) { - if ( - recipeParams.attention_backend?.value !== '_native_flash' || - recipeParams.attention_components?.value !== 'transformer' - ) { - throw new Error(`${workflow.id} Wan text pipeline must select native flash on the transformer.`); - } - } + const attentionError = workflowVideoAttentionRecipeError(pipelineClass, recipeParams); + if (attentionError) throw new Error(`${workflow.id} ${attentionError}.`); } } if (workflow.mediaKind === 'image' || workflow.mediaKind === 'audio') { @@ -704,11 +707,7 @@ function verifyWorkflow(workflow, expectedTier, graphLayout) { } const digest = canonicalJsonHash(graph); if (digest !== workflow.graphHash) throw new Error(`${workflow.id} graph hash does not match its manifest.`); - if ( - /(?:file:\/\/|\/(?:home|Users|root|tmp|mnt|workspace)(?:\/|$)|[A-Za-z]:[\\/]|\\\\|localhost|127\.0\.0\.1|\/cache\/)/i.test( - raw, - ) - ) { + if (hasMachineSpecificWorkflowState(raw)) { throw new Error(`${workflow.id} contains machine-specific state.`); } if (/modules\.WanVACE\.(?:LoadPipeline|Generate)/.test(raw)) { @@ -725,7 +724,40 @@ const layoutModuleServer = await createServer({ appType: 'custom', }); try { + expandCanonicalBlocks = await loadCanonicalWorkflowExpander(layoutModuleServer); const graphLayout = await layoutModuleServer.ssrLoadModule('/src/workflow/graphLayout.ts'); + const imageStageContracts = { + ...(await layoutModuleServer.ssrLoadModule('/src/workflow/imagePipelineStageContracts.ts')), + ...(await layoutModuleServer.ssrLoadModule('/src/workflow/operationContracts.ts')), + }; + const sourceBoundWorkflows = [...manifest.workflows, ...(manifest.experimentalWorkflows ?? [])].filter((workflow) => + Object.prototype.hasOwnProperty.call(workflow, 'auxiliaryTerminalBinding'), + ); + if (sourceBoundWorkflows.length > 0) { + const python = process.env.MODIFF_BACKEND_PYTHON; + if (!python) + throw new Error( + 'Auxiliary-terminal verification requires the declared native MODIFF_BACKEND_PYTHON schema environment.', + ); + const fixture = JSON.parse( + execFileSync(python, [join(ROOT, 'scripts', 'template-operation-fixtures.py')], { + // The fixture imports the paired first-party source. The manifest's + // graph root may be a separate review tree and is not source authority. + cwd: resolve(ROOT, '..', 'MoDiff'), + input: '[]', + encoding: 'utf8', + maxBuffer: 64 * 1024 * 1024, + env: { ...process.env, PYTHONDONTWRITEBYTECODE: '1' }, + }), + ); + const parsed = await parseCanonicalAuxiliarySources( + fixture.publicPayload, + sourceBoundWorkflows, + layoutModuleServer, + ); + authoritativeAuxiliarySources = parsed.sources; + unpackCanonicalGraph = parsed.unpackGraph; + } const selectedSupported = requestedPair ? manifest.workflows.filter((workflow) => `${workflow.modelType}|${workflow.mode}` === requestedPair) : manifest.workflows; @@ -740,7 +772,7 @@ try { if (requestedPair && selectedCanonicalCount !== 1) { throw new Error(`The requested canonical workflow pair is not unique: ${requestedPair}.`); } - for (const workflow of selectedSupported) verifyWorkflow(workflow, 'supported', graphLayout); + for (const workflow of selectedSupported) verifyWorkflow(workflow, 'supported', graphLayout, imageStageContracts); const expectedExperimentalCount = Number(manifest.experimentalWorkflowCount ?? 0); if (!Number.isInteger(expectedExperimentalCount) || expectedExperimentalCount < 0) { @@ -754,7 +786,8 @@ try { `Expected ${expectedExperimentalCount} qualified experimental workflows, found ${manifest.experimentalWorkflows?.length ?? 0}.`, ); } - for (const workflow of selectedExperimental) verifyWorkflow(workflow, 'experimental', graphLayout); + for (const workflow of selectedExperimental) + verifyWorkflow(workflow, 'experimental', graphLayout, imageStageContracts); process.stdout.write( `Verified ${selectedSupported.length} supported and ${selectedExperimental.length} qualified experimental portable workflows with deterministic canonical layouts.\n`, diff --git a/scripts/workflow-package-import-title.test.mjs b/scripts/workflow-package-import-title.test.mjs new file mode 100644 index 00000000..14cf7289 --- /dev/null +++ b/scripts/workflow-package-import-title.test.mjs @@ -0,0 +1,90 @@ +import assert from 'node:assert/strict'; +import { after, before, test } from 'node:test'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { createServer } from 'vite'; + +const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); +let server; +let packages; + +before(async () => { + server = await createServer({ + root: ROOT, + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, hmr: false, watch: null }, + appType: 'custom', + }); + packages = await server.ssrLoadModule('/src/studio/workflowPackage.ts'); +}); + +after(async () => { + await server?.close(); +}); + +function parse({ prompt = '', templateLabel } = {}) { + const graph = { + nodes: [{ id: 'retained-text', data: { params: { text: { value: prompt } } } }], + edges: [], + viewport: { x: 12, y: -8, zoom: 0.75 }, + }; + const input = { + graph, + metadata: { studio: { prompt } }, + intent: 'draft', + ...(templateLabel !== undefined + ? { + latestOutput: { + id: 'retained-output', + url: '/retained-output.png', + prompt, + templateLabel, + graphSnapshot: graph, + }, + } + : {}), + }; + const before = structuredClone(input); + const parsed = packages.parseWorkflowPackage(input); + assert.ok(parsed); + assert.deepEqual(input, before, 'Title normalization must not rewrite the imported package or its intent.'); + assert.equal(parsed.packageData, input); + assert.deepEqual(parsed.snapshot.nodes, graph.nodes); + assert.deepEqual(parsed.snapshot.edges, graph.edges); + assert.deepEqual(parsed.snapshot.viewport, graph.viewport); + return parsed; +} + +test('prompt-derived import titles trim a truncated boundary without changing the authored prompt or graph', () => { + const prompt = + 'Give the a vivid blue knitted scarf while retaining the fox, mossy rock, forest, lighting, and composition from the reference image.'; + assert.equal(prompt.slice(0, 28), 'Give the a vivid blue '); + const parsed = parse({ prompt }); + assert.equal(parsed.title, 'Give the a vivid blue'); + assert.equal(parsed.snapshot.studioForm.prompt, prompt); +}); + +test('template import labels retain their full text and interior spaces while trimming their boundaries', () => { + const templateLabel = ' \nA full template title longer than twenty-eight characters\t '; + const parsed = parse({ prompt: 'A different prompt', templateLabel }); + assert.equal(parsed.title, 'A full template title longer than twenty-eight characters'); + assert.equal(parsed.output.templateLabel, templateLabel, 'The retained output receipt remains unchanged.'); + assert.notEqual(parsed.title, parse({ templateLabel: 'Another genuine title' }).title); +}); + +test('blank imported title candidates use the existing Imported workflow fallback', () => { + assert.equal(parse({ prompt: ' \n\t ' }).title, 'Imported workflow'); + assert.equal(parse({ prompt: 'Other wording', templateLabel: ' \t ' }).title, 'Imported workflow'); + assert.equal(parse().title, 'Imported workflow'); +}); + +test('prompt titles retain the existing prefix limit and distinct authored wording', () => { + const prompt = ' A distinct caption that continues beyond the title boundary'; + const parsed = parse({ prompt }); + assert.equal(parsed.title, 'A distinct caption that c'); + assert.equal(parsed.snapshot.studioForm.prompt, prompt); + assert.notEqual(parsed.title, parse({ prompt: 'A genuinely different caption' }).title); + assert.equal(parse({ prompt: 'Prompt fallback', templateLabel: '' }).title, 'Prompt fallback'); +}); diff --git a/scripts/workflow-png-package.test.mjs b/scripts/workflow-png-package.test.mjs new file mode 100644 index 00000000..4ac3ff93 --- /dev/null +++ b/scripts/workflow-png-package.test.mjs @@ -0,0 +1,111 @@ +import assert from 'node:assert/strict'; +import { after, before, test } from 'node:test'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { createServer } from 'vite'; +import { chromium } from 'playwright'; + +const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); +let server; +let browser; +let page; + +before(async () => { + server = await createServer({ + root: ROOT, + configFile: false, + logLevel: 'silent', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { host: '127.0.0.1', port: 0, watch: null, hmr: false }, + appType: 'custom', + plugins: [ + { + name: 'png-package-codec-probe', + configureServer(vite) { + vite.middlewares.use('/png-package-probe', (_request, response) => { + response.setHeader('Content-Type', 'text/html'); + response.end('PNG package codec regression'); + }); + }, + }, + ], + }); + await server.listen(); + browser = await chromium.launch(); + page = await browser.newPage(); + await page.goto(`http://127.0.0.1:${server.httpServer.address().port}/png-package-probe`); +}); + +after(async () => { + await browser?.close(); + await server?.close(); +}); + +for (const mime of ['image/webp', 'image/jpeg', 'image/png']) { + test(`${mime} exports a real PNG preserving decoded pixels and exact workflow metadata`, async () => { + const proof = await page.evaluate(async (mime) => { + const { createPngWithWorkflowMetadata, extractWorkflowPackageFromPngBytes } = + await import('/src/studio/workflowPackage.ts'); + const canvas = document.createElement('canvas'); + canvas.width = 32; + canvas.height = 16; + const context = canvas.getContext('2d'); + context.fillStyle = '#1463a0'; + context.fillRect(0, 0, 32, 16); + context.fillStyle = '#e7ad3a'; + context.fillRect(3, 4, 15, 9); + const sourceUrl = canvas.toDataURL(mime); + const sourceBlob = await (await fetch(sourceUrl)).blob(); + const sourceBytes = new Uint8Array(await sourceBlob.arrayBuffer()); + const sourceImage = await createImageBitmap(sourceBlob); + context.clearRect(0, 0, 32, 16); + context.drawImage(sourceImage, 0, 0); + const expectedPixels = [...context.getImageData(0, 0, 32, 16).data]; + sourceImage.close(); + const metadata = { graph: { nodes: [], edges: [] }, marker: 'Preserve café / 日本語 / seed 173' }; + const png = await createPngWithWorkflowMetadata(sourceUrl, metadata); + const bytes = new Uint8Array(await png.arrayBuffer()); + const image = await createImageBitmap(png); + context.clearRect(0, 0, 32, 16); + context.drawImage(image, 0, 0); + const actualPixels = [...context.getImageData(0, 0, 32, 16).data]; + const dimensions = [image.width, image.height]; + image.close(); + return { + mime: sourceBlob.type, + exportedType: png.type, + signature: [...bytes.slice(0, 8)], + metadata: extractWorkflowPackageFromPngBytes(bytes), + expectedMetadata: metadata, + expectedPixels, + actualPixels, + dimensions, + sourceBytes: [...sourceBytes], + exportedBytes: [...bytes], + }; + }, mime); + assert.equal(proof.mime, mime); + assert.equal(proof.exportedType, 'image/png'); + assert.deepEqual(proof.signature, [137, 80, 78, 71, 13, 10, 26, 10]); + assert.deepEqual(proof.dimensions, [32, 16]); + assert.deepEqual(proof.actualPixels, proof.expectedPixels); + assert.deepEqual(proof.metadata, proof.expectedMetadata); + if (mime === 'image/png') { + assert.deepEqual(proof.exportedBytes.slice(0, proof.sourceBytes.length - 12), proof.sourceBytes.slice(0, -12)); + assert.deepEqual(proof.exportedBytes.slice(-12), proof.sourceBytes.slice(-12)); + } + }); +} + +test('an undecodable source remains an export failure', async () => { + const error = await page.evaluate(async () => { + const { createPngWithWorkflowMetadata } = await import('/src/studio/workflowPackage.ts'); + try { + await createPngWithWorkflowMetadata('data:image/webp;base64,aW52YWxpZA==', {}); + return null; + } catch (error) { + return String(error); + } + }); + assert.ok(error, 'Invalid image bytes must not produce a successful package'); +}); diff --git a/scripts/workflow-setup.test.mjs b/scripts/workflow-setup.test.mjs new file mode 100644 index 00000000..0a39ef4c --- /dev/null +++ b/scripts/workflow-setup.test.mjs @@ -0,0 +1,231 @@ +import assert from 'node:assert/strict'; +import { after, before, test } from 'node:test'; +import { createServer } from 'vite'; + +let server, runtimes, setup, flow, nodes, studio; +before(async () => { + const storage = new Map(); + globalThis.localStorage = { + getItem: (key) => storage.get(key) ?? null, + setItem: (key, value) => storage.set(key, String(value)), + removeItem: (key) => storage.delete(key), + }; + globalThis.window = { + localStorage, + sessionStorage: localStorage, + dispatchEvent: () => true, + location: { origin: 'http://127.0.0.1:5191' }, + }; + server = await createServer({ + configFile: false, + logLevel: 'silent', + appType: 'custom', + optimizeDeps: { entries: [], noDiscovery: true }, + server: { middlewareMode: true, watch: null }, + }); + runtimes = await server.ssrLoadModule('/src/studio/optionalRuntimes.ts'); + setup = await server.ssrLoadModule('/src/studio/workflowSetup.ts'); + ({ useFlowStore: flow } = await server.ssrLoadModule('/src/stores/useFlowStore.ts')); + ({ useNodesStore: nodes } = await server.ssrLoadModule('/src/stores/useNodeStore.ts')); + ({ useStudioStore: studio } = await server.ssrLoadModule('/src/stores/useStudioStore.ts')); +}); + +const base = { + schemaVersion: 1, + delivery: 'base', + requiredNow: false, + profileIds: [], + executionProfileIds: [], + state: 'base_satisfied', + reason: 'base_runtime', +}; +const hash = 'sha256:workflow-auto-v1:' + 'a'.repeat(64); +const model = (revision) => ({ + module: 'modules.Test', + action: 'Load', + params: { + model_id: { value: { source: 'hub', value: 'owner/model' } }, + revision: { value: revision }, + }, +}); + +test('shared artifacts deduplicate by exact revision while a second immutable selection stays separate', () => { + const graph = { + nodes: { a: model('a'.repeat(40)), b: model('a'.repeat(40)), c: model('b'.repeat(40)) }, + paths: [['a'], ['b'], ['c']], + }; + const requirements = setup.workflowSetupArtifacts(graph); + assert.equal(requirements.length, 2); + assert.deepEqual( + requirements.map((row) => row.installTarget.revision), + ['a'.repeat(40), 'b'.repeat(40)], + ); + graph.nodes.c.params.model_id = { sourceId: 'a', sourceKey: 'model', value: 'unrelated/default' }; + assert.equal(setup.workflowSetupArtifacts(graph).length, 1); +}); + +test('malformed, duplicate and unbounded setup observations never become ready', () => { + const good = { + schemaVersion: 1, + instance: 'worker', + graphHash: hash, + requirements: [{ nodeIds: ['a'], requirement: base }], + }; + assert.equal(setup.parseWorkflowSetup(good).requirements[0].requirement.delivery, 'base'); + for (const bad of [ + { ...good, instance: '' }, + { ...good, graphHash: 'forged' }, + { ...good, requirements: [...good.requirements, ...good.requirements] }, + { ...good, requirements: [{ nodeIds: ['a'], requirement: { ...base, state: 'active' } }] }, + ]) + assert.throws(() => setup.parseWorkflowSetup(bad)); +}); + +test('exact cached artifacts remain ready and another revision retains its repair requirement', () => { + const graph = { nodes: { a: model('a'.repeat(40)) }, paths: [['a']] }; + const previous = nodes.getState().hfCache; + nodes.setState({ hfCache: [{ id: 'owner/model', planned_revision: 'a'.repeat(40), complete: true }] }); + try { + const ready = setup.workflowSetupArtifacts(graph)[0]; + assert.equal(ready.status.runnable, true); + assert.equal(ready.primaryAction, 'Ready'); + assert.equal(ready.revision, 'a'.repeat(40)); + graph.nodes.a.params.revision.value = 'b'.repeat(40); + const incomplete = setup.workflowSetupArtifacts(graph)[0]; + assert.equal(incomplete.status.runnable, false); + assert.equal(incomplete.primaryAction, 'Repair'); + assert.equal(incomplete.installTarget.revision, 'b'.repeat(40)); + } finally { + nodes.setState({ hfCache: previous }); + } +}); + +test('a repository job is never relabelled as another revision or unreported file selection', () => { + const job = { repo_id: 'owner/model', status: 'downloading', revision: 'a'.repeat(40), total_bytes: 123 }; + assert.deepEqual(setup.workflowSetupDownload({ revision: 'a'.repeat(40) }, job), { progress: job, blocked: false }); + for (const requirement of [{ revision: 'b'.repeat(40) }, { revision: 'a'.repeat(40), files: ['one.safetensors'] }]) { + assert.deepEqual(setup.workflowSetupDownload(requirement, job), { progress: undefined, blocked: true }); + assert.equal(setup.workflowSetupDownload(requirement, { ...job, status: 'complete' }).blocked, false); + } +}); + +test('inspection uses selected Run dependency closure without seeds, installs, field actions or graph submission', async () => { + const make = (id, params = {}, disabled = false) => ({ + id, + position: { x: 0, y: 0 }, + type: 'custom', + data: { + type: 'custom', + module: 'modules.Test', + action: 'Load', + label: id, + category: '', + params, + uiState: { disabled }, + }, + }); + flow.getState().replaceGraph({ + nodes: [ + make('input', { seed: { value: { value: 17, isRandom: true } }, output: { display: 'output' } }), + make('output', { input: { display: 'input' } }), + make('unrelated', model('b'.repeat(40)).params), + make('disabled', {}, true), + ], + edges: [{ id: 'wire', source: 'input', sourceHandle: 'output', target: 'output', targetHandle: 'input' }], + }); + studio.setState({ form: { ...studio.getState().form, resourceMode: 'expert' } }); + nodes.setState({ instance: 'worker' }); + const original = JSON.stringify(flow.getState().toObject()); + const oldFetch = globalThis.fetch; + const requests = []; + globalThis.fetch = async (url, options) => { + assert.match(String(url), /\/runtime\/workflow-setup$/); + requests.push(JSON.parse(options.body)); + return new Response( + JSON.stringify({ + schemaVersion: 1, + instance: 'worker', + graphHash: hash, + requirements: [{ nodeIds: Object.keys(requests.at(-1).graph.nodes), requirement: base }], + }), + { headers: { 'content-type': 'application/json' } }, + ); + }; + try { + const result = await setup.inspectWorkflowSetup('output'); + assert.deepEqual(Object.keys(result.graph.nodes).sort(), ['input', 'output']); + assert.equal(requests.length, 1); + assert.equal(JSON.stringify(flow.getState().toObject()), original); + globalThis.fetch = async () => { + nodes.setState({ instance: 'another-worker' }); + return new Response( + JSON.stringify({ + schemaVersion: 1, + instance: 'worker', + graphHash: hash, + requirements: [{ nodeIds: ['input', 'output'], requirement: base }], + }), + ); + }; + await assert.rejects(() => setup.inspectWorkflowSetup('output'), /backend or execution scope changed/); + } finally { + globalThis.fetch = oldFetch; + } +}); +after(async () => server?.close()); + +const digest = 'sha256:' + 'a'.repeat(64); +const profile = (id, overlayStatus = 'active') => ({ + id, + specDigest: digest, + overlayStatus, + contractState: 'qualified', + cutoverReady: true, + status: 'missing', +}); + +test('runtime status prioritizes recovery and does not call an unqualified stage installed and ready', () => { + const staged = profile('codec', 'staged'); + assert.match( + runtimes.optionalRuntimeSetupStatus( + staged, + { processLoadStatus: 'repair_required', activeOptionalRuntimeSpecs: [] }, + true, + ), + /repair required/, + ); + assert.match( + runtimes.optionalRuntimeSetupStatus( + { ...staged, contractState: 'candidate_unqualified', cutoverReady: false }, + { processLoadStatus: 'base', activeOptionalRuntimeSpecs: [] }, + true, + ), + /unavailable/, + ); + const active = profile('codec'); + const catalog = { + processLoadStatus: 'active', + activeOptionalRuntimeSpecs: [{ profileId: 'codec', specDigest: digest }], + }; + assert.match(runtimes.optionalRuntimeSetupStatus(active, catalog, false), /verifying worker readiness/); + assert.match(runtimes.optionalRuntimeSetupStatus(active, catalog, true), /active — verified/); + assert.match( + runtimes.optionalRuntimeSetupStatus(active, { ...catalog, activeOptionalRuntimeSpecs: [] }, true), + /unavailable/, + ); +}); + +test('a workflow needing two runtime contracts is not ready when only one is active', () => { + const requirement = { requiredNow: true, state: 'active', profileIds: ['codec', 'quantizer'] }; + const catalog = { + processLoadStatus: 'active', + profiles: [profile('codec'), profile('quantizer', 'staged')], + activeOptionalRuntimeSpecs: [{ profileId: 'codec', specDigest: digest }], + }; + assert.equal(runtimes.optionalRuntimeBlockState(requirement, catalog), 'staged'); + catalog.profiles[1].overlayStatus = 'active'; + catalog.activeOptionalRuntimeSpecs.push({ profileId: 'quantizer', specDigest: digest }); + assert.equal(runtimes.optionalRuntimeBlockState(requirement, catalog), null); + catalog.activeOptionalRuntimeSpecs[1].specDigest = 'sha256:' + 'b'.repeat(64); + assert.equal(runtimes.optionalRuntimeBlockState(requirement, catalog), 'unavailable'); +}); diff --git a/src/App.tsx b/src/App.tsx index 726a4550..8d853bec 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -2,7 +2,7 @@ import { useSettingsStore } from './stores/useSettingsStore'; import { lazy, Suspense, useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import type { MouseEvent as ReactMouseEvent, ReactNode } from 'react'; +import type { MouseEvent as ReactMouseEvent, KeyboardEvent as ReactKeyboardEvent, ReactNode } from 'react'; import { useSnackbar } from './ui/snackbar'; import { AppWindow, Boxes, GalleryVerticalEnd, LayoutTemplate, Workflow as WorkflowIcon } from 'lucide-react'; @@ -14,16 +14,23 @@ import RunSessionShelf from './components/RunSessionShelf.tsx'; import StartupWorkspaceGate from './components/StartupWorkspaceGate.tsx'; import WorkflowTabsBar from './components/WorkflowTabsBar.tsx'; import { useFlowStore } from './stores/useFlowStore.ts'; -import { useStudioStore } from './stores/useStudioStore.ts'; +import { + useStudioStore, + captureWorkflowOperationContext, + workflowOperationContextIsCurrent, +} from './stores/useStudioStore.ts'; +import { configureStageFieldRuntime } from './stores/flowConnectionMutations'; import { useTaskStore } from './stores/useTaskStore.ts'; import { useGraphFixStore } from './stores/useGraphFixStore.ts'; import { useRunIssueStore } from './stores/useRunIssueStore.ts'; import { modiffLayout } from './theme'; import { cx } from './utils/classNames'; import { ModiffIconButton } from './ui'; +import { useCompactWorkspace } from './ui/useCompactWorkspace'; import { openRunActivity } from './studio/runActivity.ts'; import { useAutoResourcePlanSync } from './studio/useAutoResourcePlanSync.ts'; import { useWorkflowBackendSync } from './studio/useWorkflowBackendSync.ts'; +import { supervisorControlCanPoll, waitForSupervisorMetadata } from './utils/supervisorControl'; const DeveloperWorkflowLauncher = lazy(() => import('./components/DeveloperWorkflowLauncher')); const GraphFixDialog = lazy(() => import('./components/GraphFixDialog.tsx')); @@ -55,7 +62,14 @@ const TAB_BAR_WIDTH = modiffLayout.tabBarWidth; const WORKSPACE_MIN_WIDTH = modiffLayout.workspaceMinWidth; const SUPERVISOR_STARTUP_TIMEOUT_MS = 5_000; +configureStageFieldRuntime({ + capture: captureWorkflowOperationContext, + isCurrent: workflowOperationContextIsCurrent, + field: (module, action, key) => useNodesStore.getState().nodesRegistry[`${module}.${action}`]?.params[key], +}); + async function boundedSupervisorStartup(fetchSupervisorTasks: () => Promise) { + await waitForSupervisorMetadata(useNodesStore); let timeoutId: number | undefined; try { await Promise.race([ @@ -89,6 +103,8 @@ function LeftRailButton({ return ( { + if (rightVisible) setWorkspaceWasVisible(true); + else if (!isRightPanelOpen) setWorkspaceWasVisible(false); + }, [rightVisible, isRightPanelOpen]); + // Keep an open workspace's dialogs and draft state alive when a breakpoint hides its drawer. + const mountWorkspace = rightVisible || (isRightPanelOpen && workspaceWasVisible); + const closeDrawer = () => { + if (activeDrawer === 'left') setLeftPanelOpen(false); + if (activeDrawer === 'right') setRightPanelOpen(false); + }; + const resizeByKey = (event: ReactKeyboardEvent, side: 'left' | 'right') => { + if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return; + event.preventDefault(); + const step = event.key === 'ArrowLeft' ? -24 : 24; + const limit = Math.floor(window.innerWidth * 0.4); + if (side === 'left') setLeftPanelWidth(Math.min(limit, leftPanelWidth + step)); + else setRightPanelWidth(Math.min(limit, rightPanelWidth - step)); + }; + + useEffect(() => { + const openCommands = (event: KeyboardEvent) => { + if ( + !(event.metaKey || event.ctrlKey) || + event.key.toLowerCase() !== 'k' || + document.querySelector('[aria-modal="true"]') + ) + return; + event.preventDefault(); + const settings = useSettingsStore.getState(); + settings.setRightPanelOpen(true); + settings.setRightPanelTab('studio'); + settings.setCommandPaletteOpen(true); + }; + window.addEventListener('keydown', openCommands); + return () => window.removeEventListener('keydown', openCommands); + }, []); const { connect: websocketConnect, disconnect: websocketDisconnect } = useWebsocketStore(); const websocketConnected = useWebsocketStore((state) => state.isConnected); const fetchSupervisorTasks = useTaskStore((state) => state.fetchSupervisorTasks); const currentTask = useTaskStore((state) => state.currentTask); const taskCount = useTaskStore((state) => state.taskCount); + const workerControl = useNodesStore((state) => state.runtimeStatus?.workerControl); const graphFixDialogOpen = useGraphFixStore((state) => state.dialogOpen); const runIssuesDialogOpen = useRunIssueStore((state) => state.issueDialogOpen || state.failureDialogOpen); const nodeCount = useFlowStore((state) => state.nodes.length); const launcherDismissed = useStudioStore((state) => state.launcherDismissed); + const finishingLauncher = useStudioStore( + (state) => + state.canvasTransition?.type === 'task_graph_building' && + state.canvasTransition.keepLauncher && + state.canvasTransition.workflowTabId === state.activeWorkflowTabId, + ); const fetchBackendOutputs = useStudioStore((state) => state.fetchBackendOutputs); const workflowCanvasHydrated = useStudioStore((state) => state.workflowCanvasHydrated); const hydrateActiveWorkflowCanvas = useStudioStore((state) => state.hydrateActiveWorkflowCanvas); @@ -330,12 +394,14 @@ export default function App() { // remains connected. Reconcile active runs through the process-external // supervisor until the queue is empty; this keeps the visible task state // truthful without navigating away from the user's current workflow. - if (websocketConnected && taskCount === 0) return; + if (!supervisorControlCanPoll() || (websocketConnected && taskCount === 0)) return; let disposed = false; + const abort = new AbortController(); let timer: number | undefined; const pollSupervisor = async () => { + if (!(await waitForSupervisorMetadata(useNodesStore, abort.signal))) return; await fetchSupervisorTasks(); - if (!disposed) { + if (!disposed && supervisorControlCanPoll()) { timer = window.setTimeout( () => { void pollSupervisor(); @@ -347,9 +413,10 @@ export default function App() { void pollSupervisor(); return () => { disposed = true; + abort.abort(); if (timer !== undefined) window.clearTimeout(timer); }; - }, [fetchSupervisorTasks, taskCount, websocketConnected]); + }, [fetchSupervisorTasks, taskCount, websocketConnected, workerControl]); const criticalDiscoveryKeys = useMemo( () => ['nodes', 'runtime', 'hfCache', 'localModels', 'modelCache', 'capabilities'] as const, @@ -429,7 +496,7 @@ export default function App() { const handleTabChange = useCallback( (index: number) => { - if (index === leftPanelTabIndex) { + if (index === leftPanelTabIndex && leftVisible) { setLeftPanelOpen(false); setLeftPanelTabIndex(-1); } else { @@ -437,22 +504,45 @@ export default function App() { setLeftPanelTabIndex(index); } }, - [setLeftPanelTabIndex, setLeftPanelOpen, leftPanelTabIndex], + [setLeftPanelTabIndex, setLeftPanelOpen, leftPanelTabIndex, leftVisible], ); return (
+ + Jump to workflow canvas + {/* Top Navigation Bar */} -
+
{/* Main Content Area */} -
+
{ + if ( + compact && + activeDrawer && + event.key === 'Escape' && + !event.defaultPrevented && + !document.querySelector('[aria-modal="true"], [role="menu"], [role="listbox"]') + ) { + closeDrawer(); + document.getElementById('workflow-canvas')?.focus(); + } + }} + > {/* Icon Tab Bar */} -
+
+ {/* Left Panel */}