Fix external chunk duration inputs and review placement
Bind existing INT/FLOAT input sockets to visible controls and keep connected duration rows above review actions. Preserve backend input names, values, and serialized widget order; avoid stale manual duration summaries. Frontend harness: 45 passed. Compact UI: 5 passed. Installed Core layout replay passed; user confirmed connection/generation. Latest top-row placement is CPU-tested, browser acceptance pending. No Sampling, Audio, workflow, README, or Manager changes.
This commit is contained in:
+4
-4
@@ -97,7 +97,7 @@ b470819f16fc179654dc1600721a63f0a5a14e777f4c004d574b499da6886ba5 public_api.py
|
||||
3a359a0467725cc292ccb4c86cf0c3d30bb6a114d01f5345792b09ea3d45441d state.py
|
||||
43ec4023dc06c941e5d7a04db4b8a89fb58d744ceb986f6eb9bf534d4fdcb87b temporal.py
|
||||
db08ce77cc5c5835f2403d4d589394090fa5d25ff3b1840312b2808e1bc203b7 tests/fixtures/v38_a3c_selective_refine_saved_workflow.json
|
||||
37227f6b8e5b8ea3d683399b9632bb5e606e851a1cf762faf482db94c234923c tests/conftest.py
|
||||
f24c2739f62eb44612565d00effb6a3813653901f94dafd35eb1a519a989c569 tests/conftest.py
|
||||
041289556cc621ea1857cbb8931ae41d817f69e084b2e8a7622e184a3197b61b tests/test_compatibility.py
|
||||
875ac33b5458ec5e8d845850ed495707c394436aaadb668a44f36f6a1b73764d tests/test_conditioning_modes.py
|
||||
2be669b6d21ec40a8b0e172b8ab431f82681f3c97c7de0935d87ad43b0ae8b4e tests/test_context_diagnostics.py
|
||||
@@ -241,12 +241,12 @@ c2883272b05a9a9146b5c6cf614ddae8a3e6893cd910902023aae61360195289 web/easy_bypas
|
||||
9db0aa94f634578a962d5db49e5c70356040a59df968e3a2e531b327a623081f web/easy_load_image.js
|
||||
873efcbd15c2d9fa10c9d5fc51a796ad3a18c0c6acceecf499c4b956aa845c6c web/easy_load_video.js
|
||||
0c68d13a1f8beb7431a32b471f8b0612c42fcc4bf72dd97611a025d158008662 web/easy_v38.js
|
||||
fd2876747fbdee41f223afa756d1be2a0e42a4025221d6557ca40647237f53f6 web/project_id.js
|
||||
9ff85ff814e53b45fdc7bb3de3ccd85f80ca2ecb301f5d2d519d1dcc6e9aac87 web/project_id.js
|
||||
be0b8d39e5343680ebea815c3a4fb6ce7a32e065f30e43e013040a40f702cef3 .comfyignore
|
||||
1d2838cc47694609289ea15132872ad48e1b6c8274da4b7bf188dd3ebf066121 docs/V38_RELEASE_AND_MIGRATION.md
|
||||
abaaf46043bc17958bbe2d22c7961993682c49a3ac37d44ef68aa2133482a539 tests/test_v38_public_surface_cleanup.py
|
||||
0cf8d49bcb71b30437dc893f6218dc4cfb1cd244b647e4fbc2861dea2271a33a web/reference_audio_ui.js
|
||||
4a1d3eb513f1bf6742ba47d4d963da97e5b611744e7238a9fdc7f031ce8c481a REGISTRY_MANIFEST.sha256
|
||||
1f3b4189be26ef18fa7c88f366f96904c985be759cdb00f7a18482eb00aad08b REGISTRY_MANIFEST.sha256
|
||||
717577efdec5e61600504b77bc2a099ef022c4fe2333e936c3310c7182d8f2a0 docs/V38_OPEN_INTEGRATION_CONTRACT.md
|
||||
623d528a02b6712cba28c374ba3ad979bc84e2ac5318640692589a04ba6ab15f tests/test_v38_open_integration_contract.py
|
||||
0bc369ee428b8a5bc8e370a81fbab427262a1fdb7805a78c442c91698d65efba tools/__init__.py
|
||||
@@ -254,5 +254,5 @@ abaaf46043bc17958bbe2d22c7961993682c49a3ac37d44ef68aa2133482a539 tests/test_v38
|
||||
bb5a1530c890d357dc48ea74039340d746e876e8f85e06d4d9a19369f8ff5961 tests/test_v38_hover_help.py
|
||||
3d681ded5d4c50cc20c2382e29fdc98d8a48e76d552c41ad5a195d941e66e612 .gitattributes
|
||||
83d28cc0cd549066962dc21ceae05d2b189fe22391b556887eab2cc1800e1e80 examples/workflows/MiniMax_H3_Continuum_V38.zip
|
||||
b0d511fa0cce7e33cea8d016f36f1ce25724a5ed82a08bfcf91954cd5802ab70 tests/frontend_review_queue.cjs
|
||||
9d50a06395b6294f9da3810263357b25a26f64ec77b3ca97ddeb8c242f0ab969 tests/frontend_review_queue.cjs
|
||||
c98ef5e0431c1dc071e0a18a5904e57fb4b6d226ea5f5996756876cc93173607 tests/test_v38_completed_review_ui.py
|
||||
|
||||
@@ -100,6 +100,6 @@ c2883272b05a9a9146b5c6cf614ddae8a3e6893cd910902023aae61360195289 web/easy_bypas
|
||||
9db0aa94f634578a962d5db49e5c70356040a59df968e3a2e531b327a623081f web/easy_load_image.js
|
||||
873efcbd15c2d9fa10c9d5fc51a796ad3a18c0c6acceecf499c4b956aa845c6c web/easy_load_video.js
|
||||
0c68d13a1f8beb7431a32b471f8b0612c42fcc4bf72dd97611a025d158008662 web/easy_v38.js
|
||||
fd2876747fbdee41f223afa756d1be2a0e42a4025221d6557ca40647237f53f6 web/project_id.js
|
||||
9ff85ff814e53b45fdc7bb3de3ccd85f80ca2ecb301f5d2d519d1dcc6e9aac87 web/project_id.js
|
||||
0cf8d49bcb71b30437dc893f6218dc4cfb1cd244b647e4fbc2861dea2271a33a web/reference_audio_ui.js
|
||||
83d28cc0cd549066962dc21ceae05d2b189fe22391b556887eab2cc1800e1e80 examples/workflows/MiniMax_H3_Continuum_V38.zip
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ def review_queue_results():
|
||||
capture_output=True, text=True, encoding="utf-8", timeout=45,
|
||||
)
|
||||
records = json.loads(result.stdout)
|
||||
assert len(records) == 42, "The complete queue fixture must finish"
|
||||
assert len(records) == 45, "The complete queue fixture must finish, including three duration-input cases"
|
||||
failures = [item for item in records if not item["pass"]]
|
||||
assert result.returncode == 0 and not failures, result.stdout + result.stderr
|
||||
return {item["name"]: item for item in records}
|
||||
|
||||
@@ -68,6 +68,8 @@ function environment() {
|
||||
widgets:Object.entries(v).map(([name,value])=>({name,value,type:typeof value==='number'?'number':'combo',options:{values:[]},computeSize:()=>[120,20]})),
|
||||
addWidget(type,name,value,callback,options){const w={type,name,value,callback,options:options||{},computeSize:()=>[120,20]};this.widgets.push(w);return w;},
|
||||
addCustomWidget(w){this.widgets.push(w);return w;},setDirtyCanvas(){},
|
||||
getWidgetFromSlot(slot){return this.widgets.find(w=>w.name===slot.widget?.name);},
|
||||
getSlotFromWidget(widget){return this.inputs.find(slot=>slot.widget?.name===widget?.name);},
|
||||
serialize(){return {widgets_values:this.widgets.map(w=>w.value)};},
|
||||
configure(info){info.widgets_values.forEach((v,i)=>{if(this.widgets[i])this.widgets[i].value=v;});}
|
||||
};
|
||||
@@ -393,5 +395,63 @@ await test('history catalog preserves lineage eligibility and compact summary',a
|
||||
assert.equal(p.canonical_head_revision_id,'r1-g3');
|
||||
});
|
||||
|
||||
await test('duration sockets map to visible facades without changing Core names or types',async e=>{
|
||||
const n=e.makeNode();
|
||||
for(const [name,type,label] of [['chunks','INT','Chunks'],['chunk_seconds','FLOAT','Seconds per Chunk']]){
|
||||
const slot={name,type,link:null,widget:{name}};n.inputs.push(slot);
|
||||
assert.equal(n.getWidgetFromSlot(slot),e.w(n,label));
|
||||
assert.equal(n.getSlotFromWidget(e.w(n,label)),slot);
|
||||
assert.equal(n.getSlotFromWidget(e.w(n,name)),slot);
|
||||
assert.equal(slot.widget.name,name);assert.equal(slot.type,type);
|
||||
assert(!n.getWidgetFromSlot(slot).hidden);assert(e.w(n,name).hidden);
|
||||
}
|
||||
const other={name:'base_seed',widget:{name:'base_seed'}};n.inputs.push(other);
|
||||
assert.equal(n.getWidgetFromSlot(other),e.w(n,'base_seed'));
|
||||
const getter=n.getWidgetFromSlot;e.f.configureNode(n);assert.equal(n.getWidgetFromSlot,getter);
|
||||
for(const slot of n.inputs.filter(s=>['chunks','chunk_seconds'].includes(s.name))){
|
||||
assert.equal(slot._widget,n.getWidgetFromSlot(slot));
|
||||
assert(!slot._widget.hidden);
|
||||
}
|
||||
// Workflow loading replaces slot objects; configure must bind the new slots.
|
||||
n.inputs=n.inputs.map(s=>({name:s.name,type:s.type,widget:s.widget,link:null}));
|
||||
e.f.configureNode(n);
|
||||
assert.equal(n.inputs[0]._widget,e.w(n,'Chunks'));
|
||||
assert.equal(n.inputs[1]._widget,e.w(n,'Seconds per Chunk'));
|
||||
e.w(n,'generation_mode').value='Review Each Chunk';
|
||||
n.inputs[0].link=42;n.inputs[1].link=43;
|
||||
await e.load(n,project(1));
|
||||
assert(e.visible(n,'Chunks'));assert(e.visible(n,'Seconds per Chunk'));
|
||||
assert.equal(n.widgets[0].name,'Chunks');assert.equal(n.widgets[1].name,'Seconds per Chunk');
|
||||
e.w(n,'Back to Settings').callback();
|
||||
assert.equal(n.widgets[0].name,'Chunks');assert.equal(n.widgets[1].name,'Seconds per Chunk');
|
||||
e.w(n,'Return to Review').callback();
|
||||
assert.equal(n.widgets[0].name,'Chunks');assert.equal(n.widgets[1].name,'Seconds per Chunk');
|
||||
n.inputs[0].link=null;n.inputs[1].link=null;
|
||||
n.__h3ContinuumIntuitiveUxRefresh();n.__h3ContinuumProductionUxRefresh();
|
||||
assert(!e.visible(n,'Chunks'));assert(!e.visible(n,'Seconds per Chunk'));
|
||||
});
|
||||
await test('duration manual entry and serialized values survive connect disconnect and reload',async e=>{
|
||||
const n=e.makeNode();e.w(n,'Chunks').callback(6);e.w(n,'Seconds per Chunk').callback(2.5);
|
||||
const before=n.serialize();const input={name:'chunks',type:'INT',widget:{name:'chunks'},link:42};
|
||||
n.inputs.push(input);n.__h3ContinuumIntuitiveUxRefresh();
|
||||
assert.equal(e.w(n,'Total Length').value,'From connected inputs');
|
||||
assert.equal(JSON.stringify(n.serialize()),JSON.stringify(before));
|
||||
input.link=null;n.__h3ContinuumIntuitiveUxRefresh();
|
||||
assert.equal(e.w(n,'Total Length').value,'15 seconds');
|
||||
const restored=e.makeNode(313);restored.configure(before);
|
||||
assert.equal(e.w(restored,'chunks').value,6);assert.equal(e.w(restored,'chunk_seconds').value,2.5);
|
||||
const values=await e.inputs(restored);assert.equal(values.chunks,6);assert.equal(values.chunk_seconds,2.5);
|
||||
assert(!Object.hasOwn(values,'Chunks'));assert(!Object.hasOwn(values,'Seconds per Chunk'));
|
||||
});
|
||||
await test('external duration links remain links through actual review Queue adapter',async e=>{
|
||||
const n=e.makeNode();e.w(n,'chunks').value=1;
|
||||
n.inputs.push({name:'chunks',type:'INT',widget:{name:'chunks'},link:42});
|
||||
e.w(n,'Run').callback('Review Each Chunk');n.__h3ContinuumIntuitiveUxRefresh();
|
||||
assert(!e.w(n,'Chunks').tooltip.includes('Chunks is 1'));
|
||||
const data={output:{[n.id]:{class_type:n.comfyClass,inputs:{...(await e.inputs(n)),chunks:['900',0],chunk_seconds:['901',0]}}},workflow:n.serialize()};
|
||||
await e.api.queuePrompt(0,data);
|
||||
assert.deepEqual(e.submissions.at(-1).data.output[n.id].inputs.chunks,['900',0]);
|
||||
assert.deepEqual(e.submissions.at(-1).data.output[n.id].inputs.chunk_seconds,['901',0]);
|
||||
});
|
||||
console.log(JSON.stringify(results,null,2));if(results.some(r=>!r.pass))process.exitCode=1;
|
||||
})();
|
||||
|
||||
+49
-3
@@ -655,6 +655,9 @@ function compactValue(value, maximumFractionDigits = 1) {
|
||||
}
|
||||
|
||||
function durationLabel(node, chunks = null) {
|
||||
if (linkedInput(node, [CHUNKS_WIDGET, "chunk_seconds"])) {
|
||||
return "From connected inputs";
|
||||
}
|
||||
const chunkCount = Number(chunks ?? findWidget(node, CHUNKS_WIDGET)?.value ?? 1);
|
||||
const seconds = Number(findWidget(node, "chunk_seconds")?.value || 5);
|
||||
return `${compactValue(chunkCount * seconds)} seconds`;
|
||||
@@ -732,7 +735,7 @@ function readySummary(node) {
|
||||
const chunks = Math.max(1, Number(findWidget(node, CHUNKS_WIDGET)?.value || 1));
|
||||
const seconds = Number(findWidget(node, "chunk_seconds")?.value || 5);
|
||||
const reviewing = findWidget(node, GENERATION_MODE_WIDGET)?.value === GENERATION_MODE_REVIEW;
|
||||
if (reviewing && chunks < 2) {
|
||||
if (reviewing && chunks < 2 && !linkedInput(node, [CHUNKS_WIDGET])) {
|
||||
return {
|
||||
headline: "Set Chunks to 2 or more",
|
||||
detail: (
|
||||
@@ -750,7 +753,9 @@ function readySummary(node) {
|
||||
detail: "Review Each Chunk must keep Base Seed unchanged between Queue runs.",
|
||||
};
|
||||
}
|
||||
const duration = `${compactValue(chunks)} × ${compactValue(seconds)}s = ${durationLabel(node)}`;
|
||||
const duration = linkedInput(node, [CHUNKS_WIDGET, "chunk_seconds"])
|
||||
? "Duration from connected inputs"
|
||||
: `${compactValue(chunks)} × ${compactValue(seconds)}s = ${durationLabel(node)}`;
|
||||
const output = sizeSource === SIZE_SOURCE_FIRST_IMAGE
|
||||
? "First Image"
|
||||
: `Manual ${frameSizeLabel(width, height)}`;
|
||||
@@ -771,7 +776,7 @@ function facadeWidgetTooltip(node, name) {
|
||||
if (name === FACADE_CHUNKS_WIDGET) {
|
||||
const reviewing = findWidget(node, GENERATION_MODE_WIDGET)?.value === GENERATION_MODE_REVIEW;
|
||||
const chunks = Math.max(1, Number(findWidget(node, CHUNKS_WIDGET)?.value || 1));
|
||||
if (reviewing && chunks < 2) {
|
||||
if (reviewing && chunks < 2 && !linkedInput(node, [CHUNKS_WIDGET])) {
|
||||
return (
|
||||
"Chunks is 1, so there is no next chunk to continue. Set Chunks to 2 or more "
|
||||
+ "before Queue when using Review Each Chunk."
|
||||
@@ -942,6 +947,36 @@ function moveFacadeWidgetsToFront(node, orderedNames) {
|
||||
node.widgets.splice(0, node.widgets.length, ...ordered, ...remainder);
|
||||
}
|
||||
|
||||
function configureDurationInputSlots(node) {
|
||||
// Core lays out widget sockets using the direct widget binding, not the
|
||||
// getWidgetFromSlot override used for drawing and disabled-state lookup.
|
||||
for (const [source, facade] of [[CHUNKS_WIDGET, FACADE_CHUNKS_WIDGET], ["chunk_seconds", FACADE_SECONDS_WIDGET]]) {
|
||||
const slot = node.inputs?.find((input) => input.widget?.name === source);
|
||||
if (slot) slot._widget = findWidget(node, facade);
|
||||
}
|
||||
node._widgetSlotsDirty = true;
|
||||
if (node.__h3ContinuumDurationSlots || typeof node.getWidgetFromSlot !== "function"
|
||||
|| typeof node.getSlotFromWidget !== "function") return;
|
||||
const names = new Map([
|
||||
[CHUNKS_WIDGET, FACADE_CHUNKS_WIDGET],
|
||||
["chunk_seconds", FACADE_SECONDS_WIDGET],
|
||||
]);
|
||||
const getWidget = node.getWidgetFromSlot;
|
||||
const getSlot = node.getSlotFromWidget;
|
||||
// Keep Core input names/configuration intact; only map their visible controls.
|
||||
node.getWidgetFromSlot = function(slot) {
|
||||
const facade = names.get(slot.widget?.name);
|
||||
return facade ? findWidget(this, facade) : getWidget.call(this, slot);
|
||||
};
|
||||
node.getSlotFromWidget = function(widget) {
|
||||
for (const [source, facade] of names) {
|
||||
if (widget?.name === facade) return getSlot.call(this, findWidget(this, source));
|
||||
}
|
||||
return getSlot.call(this, widget);
|
||||
};
|
||||
node.__h3ContinuumDurationSlots = true;
|
||||
}
|
||||
|
||||
function moveNamedWidgetsToFront(node, orderedNames) {
|
||||
if (!Array.isArray(node.widgets)) return;
|
||||
const byName = new Map(node.widgets.map((widget) => [widget.name, widget]));
|
||||
@@ -1026,6 +1061,7 @@ function configureIntuitiveV38Ux(node) {
|
||||
34,
|
||||
);
|
||||
const readyWidget = addFacadeInfoWidget(node, FACADE_READY_WIDGET, "ready", 62);
|
||||
configureDurationInputSlots(node);
|
||||
|
||||
const outputFacade = addFacadeProxyWidget(node, {
|
||||
type: "combo",
|
||||
@@ -2514,6 +2550,16 @@ function configureProductionReviewUx(node) {
|
||||
moveNamedWidgetsToFront(node, order);
|
||||
} else moveFacadeWidgetsToFront(node, node.__h3ContinuumFacadeOrder);
|
||||
}
|
||||
// Connected duration controls stay directly below the normal inputs,
|
||||
// including while the settings facade is replaced by Review/History.
|
||||
const connectedDuration = [];
|
||||
for (const [source, facade] of [[CHUNKS_WIDGET, FACADE_CHUNKS_WIDGET], ["chunk_seconds", FACADE_SECONDS_WIDGET]]) {
|
||||
if (!linkedInput(node, [source])) continue;
|
||||
setWidgetVisible(findWidget(node, facade), true);
|
||||
connectedDuration.push(facade);
|
||||
}
|
||||
if (connectedDuration.length) moveNamedWidgetsToFront(node, connectedDuration);
|
||||
node._widgetSlotsDirty = true;
|
||||
node.setDirtyCanvas?.(true, true);
|
||||
};
|
||||
node.__h3ContinuumProductionUxRefresh = refresh;
|
||||
|
||||
Reference in New Issue
Block a user