- combined のリスト実行ループ(ForEach / End ForEach)を追加 - ForEach 出力 * と End ForEach value は接続後も常に * - attachStabilizeHooks / pinWildcardSlot / scheduleStabilizeRetries で JS を整理 - Prettier(JS は trailing comma なし)、README 開発セクションを整理 Co-authored-by: Cursor <cursoragent@cursor.com>
23 lines
729 B
JavaScript
23 lines
729 B
JavaScript
import { miscSlotTypesConnect } from "../logic/litegraph-type-compat.js";
|
|
|
|
const PATCH_KEY = "__miscLiteGraphTypeCompat";
|
|
|
|
/**
|
|
* PRIMITIVES ↔ * など、ComfyUI 標準の isValidConnection で落ちる組み合わせを許可する。
|
|
*/
|
|
export function installLiteGraphTypeCompatibility() {
|
|
const LiteGraphRef = globalThis.LiteGraph;
|
|
if (!LiteGraphRef?.isValidConnection || LiteGraphRef[PATCH_KEY]) {
|
|
return;
|
|
}
|
|
|
|
const previous = LiteGraphRef.isValidConnection.bind(LiteGraphRef);
|
|
LiteGraphRef.isValidConnection = function patchedIsValidConnection(typeA, typeB) {
|
|
if (miscSlotTypesConnect(typeA, typeB)) {
|
|
return true;
|
|
}
|
|
return previous(typeA, typeB);
|
|
};
|
|
LiteGraphRef[PATCH_KEY] = true;
|
|
}
|