comfy-ts 2.17.0 → 2.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ServeApp-BSA5yzxZ.js → ServeApp-qXcQfdgT.js} +3 -3
- package/dist/ServeApp-qXcQfdgT.js.map +1 -0
- package/dist/cli.js +58 -8
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +37 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +37 -11
- package/dist/index.js.map +1 -1
- package/dist/{run-run-DnaMLCFn.js → run-run-tg82jUIk.js} +3 -3
- package/dist/{run-run-DnaMLCFn.js.map → run-run-tg82jUIk.js.map} +1 -1
- package/dist/{run-serve-CbKxIu6i.js → run-serve-DaXzoVTS.js} +58 -12
- package/dist/run-serve-DaXzoVTS.js.map +1 -0
- package/dist/{run-tui-B0AQWbad.js → run-tui-Bw7BA75d.js} +3 -3
- package/dist/{run-tui-B0AQWbad.js.map → run-tui-Bw7BA75d.js.map} +1 -1
- package/dist/serve-web.js +56 -48
- package/dist/{state-C2oDiQ26.js → state-zTow5ucI.js} +38 -12
- package/dist/state-zTow5ucI.js.map +1 -0
- package/dist/web.js +37 -11
- package/dist/web.js.map +1 -1
- package/package.json +2 -2
- package/src/cli/bunHop.ts +49 -0
- package/src/cli/comfy-ts-cli.ts +4 -4
- package/src/cli/serve/run-serve.ts +51 -13
- package/src/cli/serve/web/components/App.tsx +2 -0
- package/src/cli/serve/web/components/DialogLayer.tsx +55 -0
- package/src/cli/serve/web/components/DraftTabs.tsx +8 -3
- package/src/cli/serve/web/components/PromptEnhancer.tsx +15 -9
- package/src/cli/serve/web/components/SideMenu.tsx +16 -8
- package/src/cli/serve/web/state/WebSt.ts +10 -1
- package/src/cli/serve/web/state/dialog.ts +59 -0
- package/src/cli/serve/web/state/keptLines.ts +1 -1
- package/src/cli/serve/web/styles.ts +8 -0
- package/src/litegraph/convertFlowToLiteGraphJSON.ts +38 -20
- package/src/promptEnhancers.ts +1 -1
- package/dist/ServeApp-BSA5yzxZ.js.map +0 -1
- package/dist/run-serve-CbKxIu6i.js.map +0 -1
- package/dist/state-C2oDiQ26.js.map +0 -1
|
@@ -850,7 +850,7 @@ var ComfySchema = class {
|
|
|
850
850
|
};
|
|
851
851
|
//#endregion
|
|
852
852
|
//#region package.json
|
|
853
|
-
var version = "2.17.
|
|
853
|
+
var version = "2.17.1";
|
|
854
854
|
//#endregion
|
|
855
855
|
//#region src/litegraph/LiteGraphLinkID.ts
|
|
856
856
|
const asLiteGraphLinkID = (id) => id;
|
|
@@ -2204,20 +2204,40 @@ const convertFlowToLiteGraphJSON = (graph) => {
|
|
|
2204
2204
|
const convertNodeToLiteGraphNode = (ctx, node) => {
|
|
2205
2205
|
const inputs = [];
|
|
2206
2206
|
const widgets_values = [];
|
|
2207
|
+
const pushLinked = (name, type, link, shape) => {
|
|
2208
|
+
const nodeUidNumber = bang(ctx.graph.nodes.find((n) => n.uid === link[0])?.uidNumber, `link target node "${link[0]}" not found in graph`);
|
|
2209
|
+
const linkId = ctx.allocateLink(nodeUidNumber, link[1], node.uidNumber, asLiteGraphSlotIndex(inputs.length), type);
|
|
2210
|
+
inputs.push(shape == null ? {
|
|
2211
|
+
name,
|
|
2212
|
+
type,
|
|
2213
|
+
link: linkId
|
|
2214
|
+
} : {
|
|
2215
|
+
name,
|
|
2216
|
+
type,
|
|
2217
|
+
shape,
|
|
2218
|
+
link: linkId
|
|
2219
|
+
});
|
|
2220
|
+
};
|
|
2207
2221
|
for (const ipt of node.$schema.inputs) {
|
|
2208
|
-
const raw = node.serializeValue(ipt.nameInComfy, node.json.inputs[ipt.nameInComfy]);
|
|
2209
2222
|
const kind = classifySchemaInput(ipt);
|
|
2210
|
-
if (
|
|
2211
|
-
const
|
|
2212
|
-
|
|
2213
|
-
name
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2223
|
+
if (kind.kind === "dynamic-container") {
|
|
2224
|
+
const type = containerInstanceSlotType(ipt.opts) ?? "*";
|
|
2225
|
+
for (const instance of kind.instanceNames) {
|
|
2226
|
+
const name = `${ipt.nameInComfy}.${instance}`;
|
|
2227
|
+
const value = node.json.inputs[name];
|
|
2228
|
+
if (value == null) continue;
|
|
2229
|
+
const raw = node.serializeValue(name, value);
|
|
2230
|
+
if (!_isLink(raw)) throw new Error(`🔴 [toWorkflowJson] ${node.$schema.nameInComfy}#${node.uid} "${name}" holds a literal; an autogrow instance is a link slot in the editor`);
|
|
2231
|
+
pushLinked(name, type, raw, 7);
|
|
2232
|
+
}
|
|
2233
|
+
continue;
|
|
2234
|
+
}
|
|
2235
|
+
const raw = node.serializeValue(ipt.nameInComfy, node.json.inputs[ipt.nameInComfy]);
|
|
2236
|
+
if (_isLink(raw)) pushLinked(ipt.nameInComfy, ipt.typeName, raw);
|
|
2237
|
+
else if (kind.kind === "widget") {
|
|
2218
2238
|
widgets_values.push(...kind.prefixValues, raw);
|
|
2219
2239
|
const phantoms = kind.consumes - 1 - kind.prefixValues.length;
|
|
2220
|
-
for (let i = 0; i < phantoms; i++) widgets_values.push(
|
|
2240
|
+
for (let i = 0; i < phantoms; i++) widgets_values.push(controlMode(ipt.opts));
|
|
2221
2241
|
} else inputs.push({
|
|
2222
2242
|
name: ipt.nameInComfy,
|
|
2223
2243
|
type: ipt.typeName,
|
|
@@ -2240,6 +2260,12 @@ const convertNodeToLiteGraphNode = (ctx, node) => {
|
|
|
2240
2260
|
widgets_values
|
|
2241
2261
|
};
|
|
2242
2262
|
};
|
|
2263
|
+
/** the editor's control widget is a combo (fixed, increment, decrement, randomize):
|
|
2264
|
+
* a config naming a mode keeps it, anything else is `fixed`, the seed the code pinned */
|
|
2265
|
+
const controlMode = (opts) => {
|
|
2266
|
+
const mode = typeof opts === "object" && opts != null ? Reflect.get(opts, "control_after_generate") : null;
|
|
2267
|
+
return typeof mode === "string" ? mode : "fixed";
|
|
2268
|
+
};
|
|
2243
2269
|
const _isLink = (v) => {
|
|
2244
2270
|
return Array.isArray(v) && v.length === 2 && typeof v[0] === "string" && typeof v[1] === "number";
|
|
2245
2271
|
};
|
|
@@ -5224,4 +5250,4 @@ var ComfyTS = class ComfyTS {
|
|
|
5224
5250
|
//#endregion
|
|
5225
5251
|
export { ComfySchema as a, importSharp as i, settingsPathFor as n, readableStringify as r, ComfyTS as t };
|
|
5226
5252
|
|
|
5227
|
-
//# sourceMappingURL=state-
|
|
5253
|
+
//# sourceMappingURL=state-zTow5ucI.js.map
|