Archive fork in favor of upstream and DUMAS nodes
tests / test (push) Canceled after 0s
tests / windows-storage (push) Canceled after 0s

This commit is contained in:
2026-10-20 10:46:16 +00:00
parent 881dcbcfba
commit 3716b02a57
76 changed files with 12140 additions and 4410 deletions
+70 -8
View File
@@ -23,6 +23,7 @@ const LEGACY_RUN_NAME_WIDGET = "run_name";
const CHUNKS_WIDGET = "chunks";
const REGENERATE_WIDGET = "reroll_from_chunk";
const REROLL_NONCE_WIDGET = "reroll_nonce";
const REGENERATE_INTENT_PROPERTY = "h3_continuum_regenerate_from";
const RUN_STORAGE_WIDGET = "run_storage";
const REFERENCE_SIZE_WIDGET = "reference_size";
const TIMELINE_SIZE_WIDGET = "timeline_video_size";
@@ -464,9 +465,18 @@ function setExistingWidgetValue(widget, value) {
widget.callback?.(value);
}
function hasManualRegenerateIntent(node) {
const value = findWidget(node, REGENERATE_WIDGET)?.value;
return Boolean(node.__h3ContinuumManualRegenerateIntent
|| (value && value !== "Auto"
&& node.properties?.[REGENERATE_INTENT_PROPERTY] === value));
}
function setRegenerateProgrammatically(node, value) {
const widget = findWidget(node, REGENERATE_WIDGET);
if (!widget) return;
delete node.__h3ContinuumManualRegenerateIntent;
if (node.properties) delete node.properties[REGENERATE_INTENT_PROPERTY];
node.__h3ContinuumProgrammaticRegenerate = true;
try {
setExistingWidgetValue(widget, value);
@@ -484,13 +494,16 @@ function repairStaleReviewRegenerate(node, project) {
!revision
|| !["review_ready", "complete"].includes(revision.status)
|| activeReviewPrompt(node)
|| node.__h3ContinuumManualRegenerateIntent
|| hasManualRegenerateIntent(node)
|| node.__h3ContinuumRestartSelected
) {
return false;
}
const widget = findWidget(node, REGENERATE_WIDGET);
if (!widget || widget.value === "Auto" || widget.value === 0) return false;
// Only the legacy unowned Chunk 1 / nonce 0 residue is ambiguous.
// Later boundaries and fixed variations are explicit saved settings.
if (!["Chunk 1", 1].includes(widget?.value)
|| Number(findWidget(node, REROLL_NONCE_WIDGET)?.value ?? 0) !== 0) return false;
setRegenerateProgrammatically(node, "Auto");
setExistingWidgetValue(findWidget(node, REROLL_NONCE_WIDGET), 0);
return true;
@@ -1573,7 +1586,7 @@ function reviewStatus(node) {
const revision = canonicalStorageRevision(project);
if (!revision) return "Queue the workflow to create the first chunk.";
if (takeReadOnly(revision)) {
return "Saved history is read-only for Sampling v6\nStart from Chunk 1 with current settings. Existing Takes are kept.";
return takeReadOnlyExplanation(revision);
}
if (revision.status === "complete") {
const unit = revision.review_unit;
@@ -1657,6 +1670,51 @@ function takeReadOnly(item) {
return Number(item?.sampling_contract_version) !== 6 || item?.generation_reusable !== true;
}
const TAKE_REUSE_REASON_HELP = new Map([
["KJ/Core preview implementation is outside the audited source profiles",
"Bypass KJ Model Preview Override in a workflow copy, then test a new Run."],
["KJ preview VAE/Audio VAE or Tiny VAE is outside the supported configuration",
"Disconnect the preview node's optional VAE/Audio VAE and set Tiny VAE to none. Keep the generation VAEs connected."],
["Core approximate-VAE preview is outside the supported configuration",
"Set Core preview to Auto or Latent2RGB before starting a new Run."],
["KJ preview runtime code or state could not be verified",
"Check Detailed Report; bypass KJ Model Preview Override in a workflow copy to isolate it."],
...[
"MODEL wrapper/patch contract is not completely observable",
"SAMPLER function/options are not completely observable",
"CLIP/Qwen encoder contract is not completely observable",
"Video VAE contract is not completely observable",
"Reference Audio VAE contract is not completely observable",
"Driving Audio VAE contract is not completely observable",
"Saved generation conditions could not be fully verified; see Detailed Report",
].map((reason) => [reason, ""]),
]);
function takeReadOnlyExplanation(item) {
if (!takeReadOnly(item)) return "";
if (Number(item?.sampling_contract_version) === 5) {
return "Sampling v5 history is read-only for v6 generation\nStart a new Run from Chunk 1. Existing Takes are kept.";
}
const verifiedMetadata = Number(item?.sampling_contract_version) === 6
&& item?.generation_reusable === false;
const lines = [verifiedMetadata
? "Saved Sampling v6 Take is read-only: its generation conditions were not fully verified."
: "Saved Take reuse could not be verified: compatibility metadata is incomplete or unsupported."];
const reasons = Array.isArray(item?.resume_disabled_reasons)
? [...new Set(item.resume_disabled_reasons.slice(0, 8).filter(
(reason) => typeof reason === "string" && TAKE_REUSE_REASON_HELP.has(reason),
))]
: [];
lines.push(...reasons);
const help = [...new Set(reasons.map((reason) => TAKE_REUSE_REASON_HELP.get(reason)).filter(Boolean))];
if (help.length) {
lines.push(...help, "After correcting the configuration, start a new Run from Chunk 1. Existing Takes are kept.");
} else {
lines.push("Check Detailed Report and the installed/backend version before starting a new Run. Existing Takes are kept.");
}
return lines.join("\n");
}
function takeCatalog(node) {
const project = node.__h3ContinuumTakeProject;
if (project && takeCatalogCache.has(project)) return takeCatalogCache.get(project);
@@ -1820,7 +1878,7 @@ function takeAncestry(project, selected, catalog) {
function continueFromTakeSummary(project, selected, catalog) {
if (takeReadOnly(selected)) {
return "Read-only history: start a new Full Video or Review from Chunk 1; saved Takes remain available.";
return "Continue From Here: unavailable\n" + takeReadOnlyExplanation(selected);
}
const chain = takeAncestry(project, selected, catalog);
if (!chain.length) {
@@ -1879,9 +1937,6 @@ function takeStatus(node) {
`Compatible history: ${catalog.filter(item => !takeReadOnly(item)).length} Takes`,
continueFromTakeSummary(project, selected, catalog),
];
if (takeReadOnly(selected)) {
lines.push(`Sampling v${selected.sampling_contract_version ?? "unknown"}: read-only; cannot reuse in v6 generation.`);
}
if (hiddenCount) {
lines.push(
`${hiddenCount} incompatible or incomplete Take${hiddenCount === 1 ? "" : "s"} hidden`,
@@ -2885,8 +2940,13 @@ function configureConditionalWidgets(node) {
if (!node.__h3ContinuumProgrammaticRegenerate) {
if (value === "Auto" || value === 0 || value == null) {
delete node.__h3ContinuumManualRegenerateIntent;
if (node.properties) delete node.properties[REGENERATE_INTENT_PROPERTY];
} else {
node.__h3ContinuumManualRegenerateIntent = true;
if (isModernSamplerClass(node.comfyClass)) {
node.properties ||= {};
node.properties[REGENERATE_INTENT_PROPERTY] = value;
}
}
}
return result;
@@ -3083,6 +3143,7 @@ function normalizeReviewActionOnLoad(node) {
if (!isModernSamplerClass(node.comfyClass)) {
return false;
}
delete node.__h3ContinuumManualRegenerateIntent;
delete node[REVIEW_PENDING_ACTION];
delete node[REVIEW_UI_SELECTION];
let changed = false;
@@ -3145,7 +3206,8 @@ function buildReviewQueueInputs(node, apiInputs) {
if (
setup
&& from === "Chunk 1"
&& !node.__h3ContinuumManualRegenerateIntent
&& Number(nonce) === 0
&& !hasManualRegenerateIntent(node)
&& !node.__h3ContinuumRestartSelected
) {
from = "Auto";