comfy-ts 2.11.0 → 2.12.0
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/README.md +1 -0
- package/dist/{LogsSt-qtFzOKpu.js → LogsSt-U1H0mP1m.js} +35 -5
- package/dist/LogsSt-U1H0mP1m.js.map +1 -0
- package/dist/cli.js +4 -4
- package/dist/index.cjs +473 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +191 -31
- package/dist/index.d.ts +191 -31
- package/dist/index.js +469 -63
- package/dist/index.js.map +1 -1
- package/dist/{run-serve-BK7BA2dn.js → run-serve-BeAznay5.js} +461 -43
- package/dist/run-serve-BeAznay5.js.map +1 -0
- package/dist/{run-tui-CQyvMf0N.js → run-tui-BTGjvnKk.js} +43 -18
- package/dist/run-tui-BTGjvnKk.js.map +1 -0
- package/dist/{schemaDrift-DjjEtwfx.js → schemaDrift-Cg39vs53.js} +470 -60
- package/dist/schemaDrift-Cg39vs53.js.map +1 -0
- package/dist/serve-web.js +508 -134
- package/dist/{state--wrz0BQc.js → state-C7REnHan.js} +7 -3
- package/dist/{state--wrz0BQc.js.map → state-C7REnHan.js.map} +1 -1
- package/dist/web.d.ts +191 -31
- package/dist/web.js +469 -63
- package/dist/web.js.map +1 -1
- package/examples/rvion/06-qwen-image-edit.cflow.ts +3 -2
- package/examples/rvion/10-anima-t2i.cflow.ts +229 -0
- package/extra/README.md +4 -0
- package/extra/comfyui-fresh-model-lists/README.md +25 -0
- package/extra/comfyui-fresh-model-lists/__init__.py +36 -0
- package/extra/comfyui-fresh-model-lists/test_fresh_model_lists.py +97 -0
- package/package.json +15 -7
- package/src/cli/draftMeta.ts +39 -0
- package/src/cli/serve/ServeApp.ts +148 -12
- package/src/cli/serve/applyVarPayload.ts +50 -22
- package/src/cli/serve/describeVar.ts +42 -6
- package/src/cli/serve/llmConfigShape.ts +51 -0
- package/src/cli/serve/llmConfigs.ts +52 -0
- package/src/cli/serve/tagList.ts +92 -0
- package/src/cli/serve/tagSource.ts +69 -0
- package/src/cli/serve/web/api.ts +48 -0
- package/src/cli/serve/web/components/App.tsx +336 -44
- package/src/cli/serve/web/components/Gallery.tsx +105 -28
- package/src/cli/serve/web/components/HistoryPicker.tsx +149 -0
- package/src/cli/serve/web/components/Icon.tsx +18 -2
- package/src/cli/serve/web/components/MenuButton.tsx +53 -0
- package/src/cli/serve/web/components/Omnibox.tsx +85 -0
- package/src/cli/serve/web/components/PromptEnhancer.tsx +476 -180
- package/src/cli/serve/web/components/TooltipLayer.tsx +45 -0
- package/src/cli/serve/web/components/VarIcon.tsx +24 -0
- package/src/cli/serve/web/components/VarsForm.tsx +341 -188
- package/src/cli/serve/web/components/controls/BasicControls.tsx +57 -32
- package/src/cli/serve/web/components/controls/LorasControl.tsx +644 -317
- package/src/cli/serve/web/components/controls/PresetPicker.tsx +1 -1
- package/src/cli/serve/web/components/controls/PromptControl.tsx +279 -0
- package/src/cli/serve/web/components/controls/PromptEditor.tsx +113 -0
- package/src/cli/serve/web/components/controls/SeedControl.tsx +17 -10
- package/src/cli/serve/web/components/controls/SizeControl.tsx +111 -18
- package/src/cli/serve/web/components/modKey.ts +2 -0
- package/src/cli/serve/web/llm.ts +23 -12
- package/src/cli/serve/web/promptEditor/promptExtensions.ts +281 -0
- package/src/cli/serve/web/state/EnhancerSt.ts +415 -100
- package/src/cli/serve/web/state/FormSt.ts +193 -29
- package/src/cli/serve/web/state/OmniboxSt.ts +57 -0
- package/src/cli/serve/web/state/WebSt.ts +219 -74
- package/src/cli/serve/web/state/choiceButtons.ts +61 -0
- package/src/cli/serve/web/state/generateButton.ts +16 -0
- package/src/cli/serve/web/state/history.ts +54 -0
- package/src/cli/serve/web/state/host.ts +5 -2
- package/src/cli/serve/web/state/keptLines.ts +53 -0
- package/src/cli/serve/web/state/latentMode.ts +20 -0
- package/src/cli/serve/web/state/loraSort.ts +18 -0
- package/src/cli/serve/web/state/moduleTree.ts +2 -2
- package/src/cli/serve/web/state/omnibox.ts +69 -0
- package/src/cli/serve/web/state/payload.ts +38 -58
- package/src/cli/serve/web/state/shortcuts.ts +54 -0
- package/src/cli/serve/web/state/sizeStars.ts +31 -0
- package/src/cli/serve/web/state/stableSlots.ts +21 -0
- package/src/cli/serve/web/state/varGroups.ts +24 -0
- package/src/cli/serve/web/styles.ts +457 -118
- package/src/cli/serve/webBundle.ts +54 -10
- package/src/cli/tui/components/PickerOverlays.tsx +9 -2
- package/src/cli/tui/imagePicker/ImagePickerSt.ts +1 -1
- package/src/cli/tui/state/DraftsSt.ts +18 -2
- package/src/cli/tui/state/EditorSt.ts +1 -1
- package/src/cli/tui/state/LorasSt.ts +1 -1
- package/src/cli/tui/state/PickerSt.ts +25 -7
- package/src/cli/tui/state/SettingsSt.ts +1 -1
- package/src/cli/tui/state/TuiSt.ts +10 -0
- package/src/coreExports.ts +20 -0
- package/src/host/loraInfoCache.ts +6 -0
- package/src/state.ts +5 -0
- package/src/vars/ComfyVars.ts +337 -67
- package/src/vars/DefinedWorkflow.ts +40 -19
- package/src/vars/lanes.ts +238 -0
- package/src/vars/loraEntry.ts +101 -0
- package/src/vars/promptSyntax.ts +382 -0
- package/dist/LogsSt-qtFzOKpu.js.map +0 -1
- package/dist/run-serve-BK7BA2dn.js.map +0 -1
- package/dist/run-tui-CQyvMf0N.js.map +0 -1
- package/dist/schemaDrift-DjjEtwfx.js.map +0 -1
- package/src/cli/serve/web/components/Sidebar.tsx +0 -66
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as importSharp, n as settingsPathFor } from "./state
|
|
3
|
-
import {
|
|
1
|
+
import { A as refreshLoraInfoCacheIfChanged, I as fetchLoraList, J as loraBasename, L as fetchLoraPreviewBytes, S as getLoraPreviewUrl, T as loraMatchesFilter, X as loraPreviewMapFrom, Y as loraKey, _ as setLoraKeyword, b as getLoraDisplayName, c as PromptVar, et as extractErrorMessage, g as loraKeywordFromMirror, h as isLoraKeywordFromMirror, i as summarizeDrift, m as getLoraKeyword, ot as logError, p as clearLoraKeywordOverride, s as LorasVar } from "./schemaDrift-Cg39vs53.js";
|
|
2
|
+
import { i as importSharp, n as settingsPathFor } from "./state-C7REnHan.js";
|
|
3
|
+
import { d as familyOf, f as findDefinedWorkflow, i as draftKeyForFile, l as assignFamilyColors, m as scanCflowFiles, o as listDraftsForFile, p as mergeWorkflowSources, r as DraftsSt, t as LogsSt, u as buildFileRows } from "./LogsSt-U1H0mP1m.js";
|
|
4
4
|
import { spawn } from "node:child_process";
|
|
5
5
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
6
6
|
import { existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -863,12 +863,19 @@ const ChoiceOverlay = observer((p) => {
|
|
|
863
863
|
key: opt,
|
|
864
864
|
node: /* @__PURE__ */ jsxs(Text, {
|
|
865
865
|
inverse: ix === pk.ix,
|
|
866
|
-
children: [
|
|
866
|
+
children: [
|
|
867
|
+
ix === pk.ix ? "▸ " : " ",
|
|
868
|
+
pk.isPicked(opt) ? "● " : "○ ",
|
|
869
|
+
opt
|
|
870
|
+
]
|
|
867
871
|
}, opt)
|
|
868
872
|
})),
|
|
869
873
|
footer: options.length === 0 ? /* @__PURE__ */ jsx(Text, {
|
|
870
874
|
color: "red",
|
|
871
875
|
children: "no match"
|
|
876
|
+
}) : pk.choiceIsMany ? /* @__PURE__ */ jsx(Text, {
|
|
877
|
+
color: "gray",
|
|
878
|
+
children: "⏎ toggles · esc done"
|
|
872
879
|
}) : void 0
|
|
873
880
|
});
|
|
874
881
|
});
|
|
@@ -878,7 +885,7 @@ const PresetOverlay = observer((p) => {
|
|
|
878
885
|
const s = p.st;
|
|
879
886
|
const pk = s.picker;
|
|
880
887
|
const options = pk.presetOptions;
|
|
881
|
-
const current = pk.presetVar?.
|
|
888
|
+
const current = pk.presetVar?.toEditBuffer().trim() ?? "";
|
|
882
889
|
return /* @__PURE__ */ jsx(OverlayList, {
|
|
883
890
|
title: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
884
891
|
"presets ",
|
|
@@ -1271,7 +1278,7 @@ var ImagePickerSt = class {
|
|
|
1271
1278
|
this.filter = "";
|
|
1272
1279
|
this._busy = false;
|
|
1273
1280
|
makeAutoObservable(this, { st: false });
|
|
1274
|
-
this.st.disposers.push(reaction(() => this.st.mode === "overlay-image" ? this.highlightedImage : null, () => void this.refreshPreview(), { delay:
|
|
1281
|
+
this.st.disposers.push(reaction(() => this.st.mode === "overlay-image" ? this.highlightedImage : null, () => void this.refreshPreview(), { delay: this.st.timing.previewMs }));
|
|
1275
1282
|
}
|
|
1276
1283
|
/** kind-narrowing cast sanctioned (agent/coding.md), `kind` is the tag */
|
|
1277
1284
|
get selectedVar() {
|
|
@@ -2354,7 +2361,7 @@ var EditorSt = class EditorSt {
|
|
|
2354
2361
|
const sel = this.st.selected?.[1];
|
|
2355
2362
|
if (sel == null) return;
|
|
2356
2363
|
this.st.mode = "overlay-text";
|
|
2357
|
-
this.buffer =
|
|
2364
|
+
this.buffer = sel.toEditBuffer();
|
|
2358
2365
|
this.cursor = [...this.buffer].length;
|
|
2359
2366
|
this.invalid = false;
|
|
2360
2367
|
}
|
|
@@ -3265,7 +3272,7 @@ var LorasSt = class {
|
|
|
3265
3272
|
this.previewSweepStatus = null;
|
|
3266
3273
|
this._busy = false;
|
|
3267
3274
|
makeAutoObservable(this, { st: false });
|
|
3268
|
-
this.st.disposers.push(reaction(() => this.st.mode === "overlay-loras" ? this.selectedName : null, () => void this.refreshPreview(), { delay:
|
|
3275
|
+
this.st.disposers.push(reaction(() => this.st.mode === "overlay-loras" ? this.selectedName : null, () => void this.refreshPreview(), { delay: this.st.timing.previewMs }));
|
|
3269
3276
|
}
|
|
3270
3277
|
/** kind-narrowing cast sanctioned (agent/coding.md), `kind` is the tag */
|
|
3271
3278
|
get selectedVar() {
|
|
@@ -3450,6 +3457,16 @@ var PickerSt = class {
|
|
|
3450
3457
|
const sel = this.st.selected?.[1];
|
|
3451
3458
|
return sel?.kind === "choice" ? sel : null;
|
|
3452
3459
|
}
|
|
3460
|
+
/** is this option currently picked (one, one or none, or one of many) */
|
|
3461
|
+
isPicked(option) {
|
|
3462
|
+
const cv = this.choiceVar;
|
|
3463
|
+
if (cv == null) return false;
|
|
3464
|
+
return cv.select === "many" ? cv.value.includes(option) : cv.value === option;
|
|
3465
|
+
}
|
|
3466
|
+
/** a many-choice stays open after ⏎: you toggle several, esc leaves */
|
|
3467
|
+
get choiceIsMany() {
|
|
3468
|
+
return this.choiceVar?.select === "many";
|
|
3469
|
+
}
|
|
3453
3470
|
get sizeVar() {
|
|
3454
3471
|
const sel = this.st.selected?.[1];
|
|
3455
3472
|
return sel?.kind === "size" ? sel : null;
|
|
@@ -3491,7 +3508,8 @@ var PickerSt = class {
|
|
|
3491
3508
|
this.st.mode = "overlay-choice";
|
|
3492
3509
|
this.filter = "";
|
|
3493
3510
|
this.invalid = false;
|
|
3494
|
-
|
|
3511
|
+
const first = cv.select === "many" ? cv.value[0] : cv.value;
|
|
3512
|
+
this.ix = Math.max(0, first == null ? 0 : cv.choices.indexOf(first));
|
|
3495
3513
|
}
|
|
3496
3514
|
/** `P` on a text/prompt var that declares presets. A var without any stays on `nav`:
|
|
3497
3515
|
* the keybar only advertises the key when the row has some */
|
|
@@ -3501,7 +3519,7 @@ var PickerSt = class {
|
|
|
3501
3519
|
this.st.mode = "overlay-preset";
|
|
3502
3520
|
this.filter = "";
|
|
3503
3521
|
this.invalid = false;
|
|
3504
|
-
const value = pv.
|
|
3522
|
+
const value = pv.toEditBuffer().trim();
|
|
3505
3523
|
const ix = pv.presets.findIndex((x) => x.text.trim() === value);
|
|
3506
3524
|
this.ix = ix === -1 ? 0 : ix;
|
|
3507
3525
|
}
|
|
@@ -3548,9 +3566,14 @@ var PickerSt = class {
|
|
|
3548
3566
|
}
|
|
3549
3567
|
const cv = this.choiceVar;
|
|
3550
3568
|
if (cv != null) {
|
|
3551
|
-
const hit = this.options[this.ix];
|
|
3569
|
+
const hit = cv.choices.find((c) => c === this.options[this.ix]);
|
|
3552
3570
|
if (hit == null) return;
|
|
3553
|
-
cv.
|
|
3571
|
+
if (cv.select === "many") {
|
|
3572
|
+
cv.toggle(hit);
|
|
3573
|
+
return;
|
|
3574
|
+
}
|
|
3575
|
+
if (cv.select === "zero-or-one") cv.toggle(hit);
|
|
3576
|
+
else cv.set(hit);
|
|
3554
3577
|
this.st.mode = "nav";
|
|
3555
3578
|
return;
|
|
3556
3579
|
}
|
|
@@ -3928,7 +3951,7 @@ var SettingsSt = class {
|
|
|
3928
3951
|
this.load();
|
|
3929
3952
|
if (this.previewRenderer === "native" && !protocolCapable()) this.previewRenderer = "pixel";
|
|
3930
3953
|
makeAutoObservable(this, { st: false });
|
|
3931
|
-
this.st.disposers.push(reaction(() => this.snapshotJson(), (json) => this.write(json), { delay:
|
|
3954
|
+
this.st.disposers.push(reaction(() => this.snapshotJson(), (json) => this.write(json), { delay: this.st.timing.autosaveMs }));
|
|
3932
3955
|
this.st.disposers.push(() => this.write(this.snapshotJson()));
|
|
3933
3956
|
}
|
|
3934
3957
|
snapshotJson() {
|
|
@@ -4287,10 +4310,10 @@ var WorkflowsSt = class {
|
|
|
4287
4310
|
};
|
|
4288
4311
|
//#endregion
|
|
4289
4312
|
//#region src/cli/tui/state/TuiSt.ts
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4313
|
+
const TUI_TIMING = {
|
|
4314
|
+
previewMs: 120,
|
|
4315
|
+
autosaveMs: 300
|
|
4316
|
+
};
|
|
4294
4317
|
var TuiSt = class {
|
|
4295
4318
|
/** the host runs actually target right now */
|
|
4296
4319
|
get runHost() {
|
|
@@ -4320,10 +4343,12 @@ var TuiSt = class {
|
|
|
4320
4343
|
this.termRows = (process.stdout.rows ?? 24) - 1;
|
|
4321
4344
|
this.varsViewH = 0;
|
|
4322
4345
|
this.wf = wf;
|
|
4346
|
+
this.timing = opts.timing ?? TUI_TIMING;
|
|
4323
4347
|
makeAutoObservable(this, {
|
|
4324
4348
|
wf: observableRef,
|
|
4325
4349
|
hostOverride: observableRef,
|
|
4326
4350
|
onExit: false,
|
|
4351
|
+
timing: false,
|
|
4327
4352
|
editor: false,
|
|
4328
4353
|
picker: false,
|
|
4329
4354
|
loras: false,
|
|
@@ -4572,4 +4597,4 @@ async function runTui(args) {
|
|
|
4572
4597
|
//#endregion
|
|
4573
4598
|
export { runTui };
|
|
4574
4599
|
|
|
4575
|
-
//# sourceMappingURL=run-tui-
|
|
4600
|
+
//# sourceMappingURL=run-tui-BTGjvnKk.js.map
|