Namespace vendored H3 nodes under Dumas

This commit is contained in:
2026-10-20 13:54:56 +00:00
parent 8445f0e500
commit cb9c3f339d
19 changed files with 456 additions and 321 deletions
+286 -286
View File
@@ -3,31 +3,31 @@ import { api } from "../../scripts/api.js";
import { normalizeReferenceAudioLabels } from "./reference_audio_ui.js";
import { configureV39ReferenceImages, connectedV39LegacyReferenceInputs, pruneV39LegacyReferenceInputs, refreshV39ReferenceImagesForSampler } from "./reference_images_v39.js";
import { migrateReferenceImageInputs } from "./reference_image_ui.js";
const PRODUCTION_NODE_CLASS = "H3ContinuumSamplerProduction";
const TIMELINE_NODE_CLASS = "H3ContinuumSamplerTimelineVideo";
const ASSEMBLE_SEAM_NODE_CLASS = "H3ContinuumAssembleSeamExperimental";
const V34_NODE_CLASS = "H3ContinuumSamplerV34";
const V34_ASSEMBLE_SEAM_NODE_CLASS = "H3ContinuumAssembleSeamV34";
const V35_NODE_CLASS = "H3ContinuumSamplerV35";
const V36_NODE_CLASS = "H3ContinuumSamplerV36";
const V37_NODE_CLASS = "H3ContinuumSamplerV37";
const V38_NODE_CLASS = "H3ContinuumSamplerV38";
const V39_NODE_CLASS = "H3ContinuumSamplerV39";
const PRODUCTION_NODE_CLASS = "DumasH3Continuum_H3ContinuumSamplerProduction";
const TIMELINE_NODE_CLASS = "DumasH3Continuum_H3ContinuumSamplerTimelineVideo";
const ASSEMBLE_SEAM_NODE_CLASS = "DumasH3Continuum_H3ContinuumAssembleSeamExperimental";
const V34_NODE_CLASS = "DumasH3Continuum_H3ContinuumSamplerV34";
const V34_ASSEMBLE_SEAM_NODE_CLASS = "DumasH3Continuum_H3ContinuumAssembleSeamV34";
const V35_NODE_CLASS = "DumasH3Continuum_H3ContinuumSamplerV35";
const V36_NODE_CLASS = "DumasH3Continuum_H3ContinuumSamplerV36";
const V37_NODE_CLASS = "DumasH3Continuum_H3ContinuumSamplerV37";
const V38_NODE_CLASS = "DumasH3Continuum_H3ContinuumSamplerV38";
const V39_NODE_CLASS = "DumasH3Continuum_H3ContinuumSamplerV39";
const isModernSamplerClass = (name) => name === V38_NODE_CLASS || name === V39_NODE_CLASS;
const V39_PLAN_WIDGET = "Reference Plan Inspector";
const V39_UNVERIFIED_PLAN = "Configured only — Queue has not verified the effective Reference Plan.";
const V35_ASSEMBLE_SEAM_NODE_CLASS = "H3ContinuumAssembleSeamV35";
const PROJECT_WIDGET = "project_id";
const LEGACY_RUN_NAME_WIDGET = "run_name";
const CHUNKS_WIDGET = "chunks";
const REGENERATE_WIDGET = "reroll_from_chunk";
const REROLL_NONCE_WIDGET = "reroll_nonce";
const V35_ASSEMBLE_SEAM_NODE_CLASS = "DumasH3Continuum_H3ContinuumAssembleSeamV35";
const PROJECT_WIDGET = "project_id";
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";
const VIDEO_REFERENCE_SIZE_WIDGET = "video_reference_size";
const RUN_STORAGE_WIDGET = "run_storage";
const REFERENCE_SIZE_WIDGET = "reference_size";
const TIMELINE_SIZE_WIDGET = "timeline_video_size";
const VIDEO_REFERENCE_SIZE_WIDGET = "video_reference_size";
const PROMPT_OVERRIDES_INPUT = "prompt_overrides";
const RESOLUTION_PRESET_WIDGET = "preset";
const CUSTOM_MP_WIDGET = "custom_mp";
@@ -215,135 +215,135 @@ const V38_VIEW_PROPERTY = "H3 Continuum View";
const V38_VIEW_BASIC = "Basic";
const V38_VIEW_PRODUCTION = "Production";
const V38_VIEW_OPTIONS = [V38_VIEW_BASIC, V38_VIEW_PRODUCTION];
const SETTINGS = {
detailedReport: "H3Continuum.DetailedReport",
developerDiagnostics: "H3Continuum.DeveloperDiagnostics",
samplingPreview: "H3Continuum.SamplingPreview",
};
function createProjectId() {
if (globalThis.crypto?.randomUUID) {
return globalThis.crypto.randomUUID();
}
const bytes = new Uint8Array(16);
globalThis.crypto.getRandomValues(bytes);
bytes[6] = (bytes[6] & 0x0f) | 0x40;
bytes[8] = (bytes[8] & 0x3f) | 0x80;
const hex = Array.from(bytes, (value) => value.toString(16).padStart(2, "0")).join("");
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
}
function findWidget(node, name) {
return node.widgets?.find((widget) => widget.name === name);
}
function setWidgetVisible(widget, visible) {
if (!widget) {
return;
}
if (!widget.__h3ContinuumOriginal) {
widget.__h3ContinuumOriginal = {
type: widget.type,
computeSize: widget.computeSize,
hidden: widget.hidden,
optionsHidden: widget.options?.hidden,
};
}
widget.options ||= {};
if (visible) {
const original = widget.__h3ContinuumOriginal;
widget.type = original.type;
widget.computeSize = original.computeSize;
widget.hidden = original.hidden;
if (original.optionsHidden === undefined) {
delete widget.options.hidden;
} else {
widget.options.hidden = original.optionsHidden;
}
} else {
widget.hidden = true;
widget.type = "converted-widget";
widget.options.hidden = true;
widget.computeSize = () => [0, -4];
}
}
function hidePersistentWidget(widget) {
setWidgetVisible(widget, false);
}
function settingValue(id, fallback) {
try {
return app.ui?.settings?.getSettingValue?.(id) ?? fallback;
} catch {
return fallback;
}
}
function applyRuntimeSettings(node) {
const detailed = Boolean(settingValue(SETTINGS.detailedReport, false));
const debug = Boolean(settingValue(SETTINGS.developerDiagnostics, false));
const preview = Boolean(settingValue(SETTINGS.samplingPreview, true));
const diagnosticsWidget = findWidget(node, "diagnostics");
const debugWidget = findWidget(node, "debug");
const previewWidget = findWidget(node, "show_preview");
const strictWidget = findWidget(node, "strict_compatibility");
if (diagnosticsWidget) diagnosticsWidget.value = detailed ? "Detailed Report" : "Basic";
if (debugWidget) debugWidget.value = debug;
if (previewWidget) previewWidget.value = preview;
if (strictWidget) strictWidget.value = false;
}
function removeUnusedInput(node, name) {
const index = node.inputs?.findIndex((input) => input.name === name) ?? -1;
if (index < 0) {
return;
}
const input = node.inputs[index];
if (input.link != null) {
app.graph?.removeLink(input.link);
}
node.removeInput(index);
}
function regenerateOptions(chunks) {
const count = Math.max(1, Math.min(16, Number.parseInt(chunks, 10) || 1));
return ["Auto", ...Array.from({ length: count }, (_, index) => `Chunk ${index + 1}`)];
}
function configureRegenerateFrom(node) {
const chunksWidget = findWidget(node, CHUNKS_WIDGET);
const regenerateWidget = findWidget(node, REGENERATE_WIDGET);
if (!chunksWidget || !regenerateWidget) {
return;
}
const refresh = () => {
const values = regenerateOptions(chunksWidget.value);
regenerateWidget.options ||= {};
regenerateWidget.options.values = values;
const numeric = typeof regenerateWidget.value === "number"
? regenerateWidget.value
: Number.parseInt(String(regenerateWidget.value).replace(/^Chunk\s+/, ""), 10);
if (regenerateWidget.value === "Auto" || numeric === 0) {
regenerateWidget.value = "Auto";
} else if (Number.isInteger(numeric) && numeric >= 1 && numeric < values.length) {
regenerateWidget.value = `Chunk ${numeric}`;
} else {
regenerateWidget.value = "Auto";
}
};
if (!chunksWidget.__h3ContinuumRegenerateCallback) {
const previous = chunksWidget.callback;
chunksWidget.callback = function(value, ...args) {
const result = previous?.call(this, value, ...args);
refresh();
return result;
};
chunksWidget.__h3ContinuumRegenerateCallback = true;
}
refresh();
}
const SETTINGS = {
detailedReport: "H3Continuum.DetailedReport",
developerDiagnostics: "H3Continuum.DeveloperDiagnostics",
samplingPreview: "H3Continuum.SamplingPreview",
};
function createProjectId() {
if (globalThis.crypto?.randomUUID) {
return globalThis.crypto.randomUUID();
}
const bytes = new Uint8Array(16);
globalThis.crypto.getRandomValues(bytes);
bytes[6] = (bytes[6] & 0x0f) | 0x40;
bytes[8] = (bytes[8] & 0x3f) | 0x80;
const hex = Array.from(bytes, (value) => value.toString(16).padStart(2, "0")).join("");
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
}
function findWidget(node, name) {
return node.widgets?.find((widget) => widget.name === name);
}
function setWidgetVisible(widget, visible) {
if (!widget) {
return;
}
if (!widget.__h3ContinuumOriginal) {
widget.__h3ContinuumOriginal = {
type: widget.type,
computeSize: widget.computeSize,
hidden: widget.hidden,
optionsHidden: widget.options?.hidden,
};
}
widget.options ||= {};
if (visible) {
const original = widget.__h3ContinuumOriginal;
widget.type = original.type;
widget.computeSize = original.computeSize;
widget.hidden = original.hidden;
if (original.optionsHidden === undefined) {
delete widget.options.hidden;
} else {
widget.options.hidden = original.optionsHidden;
}
} else {
widget.hidden = true;
widget.type = "converted-widget";
widget.options.hidden = true;
widget.computeSize = () => [0, -4];
}
}
function hidePersistentWidget(widget) {
setWidgetVisible(widget, false);
}
function settingValue(id, fallback) {
try {
return app.ui?.settings?.getSettingValue?.(id) ?? fallback;
} catch {
return fallback;
}
}
function applyRuntimeSettings(node) {
const detailed = Boolean(settingValue(SETTINGS.detailedReport, false));
const debug = Boolean(settingValue(SETTINGS.developerDiagnostics, false));
const preview = Boolean(settingValue(SETTINGS.samplingPreview, true));
const diagnosticsWidget = findWidget(node, "diagnostics");
const debugWidget = findWidget(node, "debug");
const previewWidget = findWidget(node, "show_preview");
const strictWidget = findWidget(node, "strict_compatibility");
if (diagnosticsWidget) diagnosticsWidget.value = detailed ? "Detailed Report" : "Basic";
if (debugWidget) debugWidget.value = debug;
if (previewWidget) previewWidget.value = preview;
if (strictWidget) strictWidget.value = false;
}
function removeUnusedInput(node, name) {
const index = node.inputs?.findIndex((input) => input.name === name) ?? -1;
if (index < 0) {
return;
}
const input = node.inputs[index];
if (input.link != null) {
app.graph?.removeLink(input.link);
}
node.removeInput(index);
}
function regenerateOptions(chunks) {
const count = Math.max(1, Math.min(16, Number.parseInt(chunks, 10) || 1));
return ["Auto", ...Array.from({ length: count }, (_, index) => `Chunk ${index + 1}`)];
}
function configureRegenerateFrom(node) {
const chunksWidget = findWidget(node, CHUNKS_WIDGET);
const regenerateWidget = findWidget(node, REGENERATE_WIDGET);
if (!chunksWidget || !regenerateWidget) {
return;
}
const refresh = () => {
const values = regenerateOptions(chunksWidget.value);
regenerateWidget.options ||= {};
regenerateWidget.options.values = values;
const numeric = typeof regenerateWidget.value === "number"
? regenerateWidget.value
: Number.parseInt(String(regenerateWidget.value).replace(/^Chunk\s+/, ""), 10);
if (regenerateWidget.value === "Auto" || numeric === 0) {
regenerateWidget.value = "Auto";
} else if (Number.isInteger(numeric) && numeric >= 1 && numeric < values.length) {
regenerateWidget.value = `Chunk ${numeric}`;
} else {
regenerateWidget.value = "Auto";
}
};
if (!chunksWidget.__h3ContinuumRegenerateCallback) {
const previous = chunksWidget.callback;
chunksWidget.callback = function(value, ...args) {
const result = previous?.call(this, value, ...args);
refresh();
return result;
};
chunksWidget.__h3ContinuumRegenerateCallback = true;
}
refresh();
}
function linkedInput(node, names) {
return node.inputs?.some((input) => names.includes(input.name) && input.link != null) ?? false;
}
@@ -365,7 +365,7 @@ function activeLinkedInput(node, names) {
const source = app.graph?.getNodeById?.(link.origin_id);
if (!source) return true;
if ([2, 4].includes(Number(source.mode))) return false;
if (source.comfyClass === "H3ContinuumReferenceImages") {
if (source.comfyClass === "DumasH3Continuum_H3ContinuumReferenceImages") {
return activeLinkedInput(source, source.inputs.filter(
(item) => /^reference_image_[4-9]$/.test(item.name),
).map((item) => item.name));
@@ -388,17 +388,17 @@ function activeLinkedInput(node, names) {
);
});
}
function attachRefresh(widget, key, refresh) {
if (!widget || widget[key]) {
return;
}
const previous = widget.callback;
widget.callback = function(value, ...args) {
const result = previous?.call(this, value, ...args);
refresh();
return result;
};
if (!widget || widget[key]) {
return;
}
const previous = widget.callback;
widget.callback = function(value, ...args) {
const result = previous?.call(this, value, ...args);
refresh();
return result;
};
widget[key] = true;
}
@@ -2972,27 +2972,27 @@ function configureConditionalWidgets(node) {
? ["reference_images"]
: ["reference_image_1", "reference_image_2", "reference_image_3", "reference_image_4", "reference_image_5", "image_references"]),
);
setWidgetVisible(
findWidget(node, TIMELINE_SIZE_WIDGET),
linkedInput(node, ["timeline_video"]),
);
setWidgetVisible(
findWidget(node, TIMELINE_SIZE_WIDGET),
linkedInput(node, ["timeline_video"]),
);
setWidgetVisible(
findWidget(node, VIDEO_REFERENCE_SIZE_WIDGET),
productionView && linkedInput(node, ["reference_video_1"]),
);
node.setDirtyCanvas?.(true, true);
};
node.setDirtyCanvas?.(true, true);
};
attachRefresh(storageWidget, "__h3ContinuumStorageCallback", refresh);
attachRefresh(regenerateWidget, "__h3ContinuumRegenerateVisibilityCallback", refresh);
if (!node.__h3ContinuumConnectionCallback) {
const previous = node.onConnectionsChange;
node.onConnectionsChange = function(...args) {
const result = previous?.apply(this, args);
setTimeout(refresh, 0);
return result;
};
node.__h3ContinuumConnectionCallback = true;
}
if (!node.__h3ContinuumConnectionCallback) {
const previous = node.onConnectionsChange;
node.onConnectionsChange = function(...args) {
const result = previous?.apply(this, args);
setTimeout(refresh, 0);
return result;
};
node.__h3ContinuumConnectionCallback = true;
}
refresh();
}
@@ -3305,26 +3305,26 @@ function configureReviewControls(node) {
}
function configureAssembler(node) {
if (
node.comfyClass !== ASSEMBLE_SEAM_NODE_CLASS
&& node.comfyClass !== V34_ASSEMBLE_SEAM_NODE_CLASS
&& node.comfyClass !== V35_ASSEMBLE_SEAM_NODE_CLASS
) {
return false;
}
const exactDuration = findWidget(node, "exact_total_duration");
if (exactDuration) exactDuration.value = true;
applyRuntimeSettings(node);
hidePersistentWidget(exactDuration);
hidePersistentWidget(findWidget(node, "diagnostics"));
node.setDirtyCanvas?.(true, true);
return true;
}
if (
node.comfyClass !== ASSEMBLE_SEAM_NODE_CLASS
&& node.comfyClass !== V34_ASSEMBLE_SEAM_NODE_CLASS
&& node.comfyClass !== V35_ASSEMBLE_SEAM_NODE_CLASS
) {
return false;
}
const exactDuration = findWidget(node, "exact_total_duration");
if (exactDuration) exactDuration.value = true;
applyRuntimeSettings(node);
hidePersistentWidget(exactDuration);
hidePersistentWidget(findWidget(node, "diagnostics"));
node.setDirtyCanvas?.(true, true);
return true;
}
function configureNode(node) {
const isProduction = node.comfyClass === PRODUCTION_NODE_CLASS;
const isTimeline = node.comfyClass === TIMELINE_NODE_CLASS;
const isV34 = node.comfyClass === V34_NODE_CLASS;
const isProduction = node.comfyClass === PRODUCTION_NODE_CLASS;
const isTimeline = node.comfyClass === TIMELINE_NODE_CLASS;
const isV34 = node.comfyClass === V34_NODE_CLASS;
const isV35 = node.comfyClass === V35_NODE_CLASS;
const isV36 = node.comfyClass === V36_NODE_CLASS;
const isV37 = node.comfyClass === V37_NODE_CLASS;
@@ -3332,27 +3332,27 @@ function configureNode(node) {
if (node.comfyClass === V39_NODE_CLASS) pruneV39LegacyReferenceInputs(node);
if (!isProduction && !isTimeline && !isV34 && !isV35 && !isV36 && !isV37 && !isV38) {
configureV39ReferenceImages(node);
if (node.comfyClass === "H3ContinuumReferenceAudios") {
if (node.comfyClass === "DumasH3Continuum_H3ContinuumReferenceAudios") {
normalizeReferenceAudioLabels(node);
}
configureAssembler(node);
return null;
}
const projectWidget = findWidget(node, PROJECT_WIDGET);
return null;
}
const projectWidget = findWidget(node, PROJECT_WIDGET);
if (isProduction || isV34 || isV35 || isV36 || isV37 || isV38) {
if (projectWidget && !String(projectWidget.value || "").trim()) {
projectWidget.value = createProjectId();
}
if (projectWidget && !String(projectWidget.value || "").trim()) {
projectWidget.value = createProjectId();
}
if (!isV38) removeUnusedInput(node, PROMPT_OVERRIDES_INPUT);
}
}
applyRuntimeSettings(node);
if (isV35 || isV36 || isV37 || isV38) {
normalizeReferenceAudioLabels(node);
}
removeUnusedLegacyInputs(node);
hidePersistentWidget(findWidget(node, "diagnostics"));
hidePersistentWidget(findWidget(node, "strict_compatibility"));
hidePersistentWidget(findWidget(node, "debug"));
hidePersistentWidget(findWidget(node, "strict_compatibility"));
hidePersistentWidget(findWidget(node, "debug"));
hidePersistentWidget(findWidget(node, "show_preview"));
hidePersistentWidget(projectWidget);
hidePersistentWidget(findWidget(node, TAKE_GROUP_WIDGET));
@@ -3368,9 +3368,9 @@ function configureNode(node) {
configureV39ReferenceUx(node);
applyV38View(node);
node.setDirtyCanvas?.(true, true);
return projectWidget;
}
return projectWidget;
}
let reviewGraphEpoch = 0;
let reviewGraphHydrating = false;
@@ -3411,8 +3411,8 @@ function configureNodeAfterSetup(node) {
configureNode(node);
return pending.promise;
}
app.registerExtension({
app.registerExtension({
name: "H3Continuum.ProjectId",
setup() {
@@ -3430,32 +3430,32 @@ app.registerExtension({
);
}
const settings = app.ui?.settings;
settings?.addSetting?.({
id: SETTINGS.samplingPreview,
name: "H3 Continuum: Sampling Preview",
type: "boolean",
defaultValue: true,
tooltip: "Show live sampling previews. Disable only to reduce preview overhead.",
onChange: () => refreshConfiguredNodes(),
});
settings?.addSetting?.({
id: SETTINGS.developerDiagnostics,
name: "H3 Continuum: Developer Diagnostics",
type: "boolean",
defaultValue: false,
tooltip: "Enable developer-only Continuum logging and assertions.",
onChange: () => refreshConfiguredNodes(),
});
settings?.addSetting?.({
id: SETTINGS.detailedReport,
name: "H3 Continuum: Detailed Report",
type: "boolean",
defaultValue: false,
tooltip: "Include detailed diagnostics in status and assembly reports.",
onChange: () => refreshConfiguredNodes(),
});
},
settings?.addSetting?.({
id: SETTINGS.samplingPreview,
name: "H3 Continuum: Sampling Preview",
type: "boolean",
defaultValue: true,
tooltip: "Show live sampling previews. Disable only to reduce preview overhead.",
onChange: () => refreshConfiguredNodes(),
});
settings?.addSetting?.({
id: SETTINGS.developerDiagnostics,
name: "H3 Continuum: Developer Diagnostics",
type: "boolean",
defaultValue: false,
tooltip: "Enable developer-only Continuum logging and assertions.",
onChange: () => refreshConfiguredNodes(),
});
settings?.addSetting?.({
id: SETTINGS.detailedReport,
name: "H3 Continuum: Detailed Report",
type: "boolean",
defaultValue: false,
tooltip: "Include detailed diagnostics in status and assembly reports.",
onChange: () => refreshConfiguredNodes(),
});
},
beforeConfigureGraph() {
reviewGraphEpoch++;
reviewGraphHydrating = true;
@@ -3469,17 +3469,17 @@ app.registerExtension({
},
nodeCreated(node) {
configureNodeAfterSetup(node);
},
configureNodeAfterSetup(node);
},
loadedGraphNode(node) {
if (node.comfyClass === V39_NODE_CLASS) {
node.__h3ContinuumReferencePlan = null;
}
normalizeReviewActionOnLoad(node);
configureNodeAfterSetup(node);
},
},
async afterConfigureGraph() {
// API graph loading can call this hook without beforeConfigureGraph.
const epoch = reviewGraphEpoch;
@@ -3497,11 +3497,11 @@ app.registerExtension({
if (!isModernSamplerClass(node.comfyClass) || !reviewNodeAttached(node)) continue;
void loadTakeHistory(node, { force: true, reviewedSettings: reviewSettingsSnapshot(node) });
}
},
async beforeQueuePrompt(prompt) {
const seen = new Set();
for (const node of app.graph?._nodes || []) {
},
async beforeQueuePrompt(prompt) {
const seen = new Set();
for (const node of app.graph?._nodes || []) {
const projectWidget = configureNode(node);
const apiNode = prompt.output?.[String(node.id)];
if (node.comfyClass === V39_NODE_CLASS && apiNode?.inputs) {
@@ -3509,9 +3509,9 @@ app.registerExtension({
configureV39ReferenceUx(node);
}
if (apiNode?.inputs) {
if (
node.comfyClass === PRODUCTION_NODE_CLASS
|| node.comfyClass === TIMELINE_NODE_CLASS
if (
node.comfyClass === PRODUCTION_NODE_CLASS
|| node.comfyClass === TIMELINE_NODE_CLASS
|| node.comfyClass === V34_NODE_CLASS
|| node.comfyClass === V35_NODE_CLASS
|| node.comfyClass === V36_NODE_CLASS
@@ -3523,40 +3523,40 @@ app.registerExtension({
normalizeRunStorageState(node, apiNode.inputs);
}
apiNode.inputs.diagnostics = settingValue(SETTINGS.detailedReport, false)
? "Detailed Report"
: "Basic";
apiNode.inputs.debug = Boolean(settingValue(SETTINGS.developerDiagnostics, false));
apiNode.inputs.show_preview = Boolean(settingValue(SETTINGS.samplingPreview, true));
apiNode.inputs.strict_compatibility = false;
} else if (
node.comfyClass === ASSEMBLE_SEAM_NODE_CLASS
|| node.comfyClass === V34_ASSEMBLE_SEAM_NODE_CLASS
|| node.comfyClass === V35_ASSEMBLE_SEAM_NODE_CLASS
) {
apiNode.inputs.diagnostics = settingValue(SETTINGS.detailedReport, false)
? "Detailed Report"
: "Basic";
apiNode.inputs.exact_total_duration = true;
}
}
if (!projectWidget) {
continue;
}
let projectId = String(projectWidget.value || "").trim();
if (!projectId || seen.has(projectId)) {
projectId = createProjectId();
projectWidget.value = projectId;
}
seen.add(projectId);
if (apiNode?.inputs) {
apiNode.inputs.project_id = projectId;
}
}
},
});
function refreshConfiguredNodes() {
for (const node of app.graph?._nodes || []) {
configureNodeAfterSetup(node);
}
}
? "Detailed Report"
: "Basic";
apiNode.inputs.debug = Boolean(settingValue(SETTINGS.developerDiagnostics, false));
apiNode.inputs.show_preview = Boolean(settingValue(SETTINGS.samplingPreview, true));
apiNode.inputs.strict_compatibility = false;
} else if (
node.comfyClass === ASSEMBLE_SEAM_NODE_CLASS
|| node.comfyClass === V34_ASSEMBLE_SEAM_NODE_CLASS
|| node.comfyClass === V35_ASSEMBLE_SEAM_NODE_CLASS
) {
apiNode.inputs.diagnostics = settingValue(SETTINGS.detailedReport, false)
? "Detailed Report"
: "Basic";
apiNode.inputs.exact_total_duration = true;
}
}
if (!projectWidget) {
continue;
}
let projectId = String(projectWidget.value || "").trim();
if (!projectId || seen.has(projectId)) {
projectId = createProjectId();
projectWidget.value = projectId;
}
seen.add(projectId);
if (apiNode?.inputs) {
apiNode.inputs.project_id = projectId;
}
}
},
});
function refreshConfiguredNodes() {
for (const node of app.graph?._nodes || []) {
configureNodeAfterSetup(node);
}
}