comfy-ts 2.14.0 → 2.16.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-CUeo843w.js → LogsSt-Ct7Le0S_.js} +2 -2
- package/dist/{LogsSt-CUeo843w.js.map → LogsSt-Ct7Le0S_.js.map} +1 -1
- package/dist/cli.js +4 -4
- package/dist/index.cjs +268 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +176 -26
- package/dist/index.d.ts +176 -26
- package/dist/index.js +262 -56
- package/dist/index.js.map +1 -1
- package/dist/{run-serve-DUqcn0h3.js → run-serve-C78hD7t9.js} +119 -40
- package/dist/run-serve-C78hD7t9.js.map +1 -0
- package/dist/{run-tui-D-LaSqgB.js → run-tui-nPETFRmk.js} +15 -9
- package/dist/run-tui-nPETFRmk.js.map +1 -0
- package/dist/{schemaDrift-E95iTF7E.js → schemaDrift-wb5XkrHV.js} +218 -27
- package/dist/schemaDrift-wb5XkrHV.js.map +1 -0
- package/dist/serve-web.js +64 -50
- package/dist/{state-BytbdZ8s.js → state-BMW57_M0.js} +45 -35
- package/dist/state-BMW57_M0.js.map +1 -0
- package/dist/web.d.ts +173 -26
- package/dist/web.js +251 -53
- package/dist/web.js.map +1 -1
- package/examples/README.md +1 -0
- package/examples/media/README.md +9 -0
- package/examples/media/sine_440hz_3s.flac +0 -0
- package/examples/media/testsrc_256x256_3s.mp4 +0 -0
- package/examples/media/voice_en_6s.flac +0 -0
- package/examples/rvion/04-krea2-turbo-t2i.cflow.ts +9 -1
- package/examples/rvion/10-anima-t2i.cflow.ts +8 -1
- package/examples/rvion/14-video-soundtrack.cflow.ts +47 -0
- package/examples/rvion/15-tts-voice-clone.cflow.ts +111 -0
- package/guide-for-agents.md +3 -1
- package/package.json +2 -2
- package/src/cli/serve/ServeApp.ts +115 -32
- package/src/cli/serve/applyVarPayload.ts +5 -3
- package/src/cli/serve/describeVar.ts +5 -3
- package/src/cli/serve/resultHistory.ts +22 -6
- package/src/cli/serve/run-serve.ts +4 -1
- package/src/cli/serve/web/api.ts +4 -0
- package/src/cli/serve/web/components/DraftTabs.tsx +2 -1
- package/src/cli/serve/web/components/Gallery.tsx +86 -5
- package/src/cli/serve/web/components/HistoryPicker.tsx +5 -3
- package/src/cli/serve/web/components/MenuButton.tsx +2 -4
- package/src/cli/serve/web/components/Omnibox.tsx +2 -1
- package/src/cli/serve/web/components/PromptEnhancer.tsx +4 -3
- package/src/cli/serve/web/components/ShortcutsModal.tsx +2 -1
- package/src/cli/serve/web/components/SideMenu.tsx +2 -1
- package/src/cli/serve/web/components/VarsForm.tsx +5 -3
- package/src/cli/serve/web/components/controls/LorasControl.tsx +4 -3
- package/src/cli/serve/web/components/controls/MediaControl.tsx +111 -0
- package/src/cli/serve/web/components/controls/PresetPicker.tsx +2 -1
- package/src/cli/serve/web/components/controls/PromptControl.tsx +2 -1
- package/src/cli/serve/web/components/controls/SizeControl.tsx +2 -1
- package/src/cli/serve/web/state/FormSt.ts +70 -2
- package/src/cli/serve/web/state/escape.ts +16 -0
- package/src/cli/serve/web/state/host.ts +2 -0
- package/src/cli/serve/web/state/mediaDrop.ts +76 -0
- package/src/cli/serve/web/styles.ts +16 -2
- package/src/cli/tui/imagePicker/ImagePickerOverlay.tsx +4 -1
- package/src/cli/tui/imagePicker/ImagePickerSt.ts +15 -6
- package/src/cli/tui/state/TuiSt.ts +1 -1
- package/src/coreExports.ts +20 -1
- package/src/exampleAssets.ts +13 -3
- package/src/host/ComfyUploader.ts +34 -27
- package/src/index.ts +1 -1
- package/src/runner/ComfyExecution.ts +38 -20
- package/src/runner/ComfyWsApi.ts +3 -0
- package/src/runner/mediaKinds.ts +51 -0
- package/src/vars/ComfyVars.ts +178 -34
- package/src/vars/DefinedWorkflow.ts +35 -2
- package/dist/run-serve-DUqcn0h3.js.map +0 -1
- package/dist/run-tui-D-LaSqgB.js.map +0 -1
- package/dist/schemaDrift-E95iTF7E.js.map +0 -1
- package/dist/state-BytbdZ8s.js.map +0 -1
- package/src/cli/serve/web/components/controls/ImageControl.tsx +0 -72
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as importSharp, n as settingsPathFor } from "./state-
|
|
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-
|
|
1
|
+
import { F as fetchLoraList, I as fetchLoraPreviewBytes, J as loraKey, Y as loraPreviewMapFrom, at as extractErrorMessage, dt as logError, f as clearLoraKeywordOverride, g as setLoraKeyword, h as loraKeywordFromMirror, i as summarizeDrift, k as refreshLoraInfoCacheIfChanged, m as isLoraKeywordFromMirror, o as LorasVar, p as getLoraKeyword, q as loraBasename, s as PromptVar, tt as extensionOf, w as loraMatchesFilter, x as getLoraPreviewUrl, y as getLoraDisplayName } from "./schemaDrift-wb5XkrHV.js";
|
|
2
|
+
import { i as importSharp, n as settingsPathFor } from "./state-BMW57_M0.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-Ct7Le0S_.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";
|
|
@@ -1283,7 +1283,7 @@ var ImagePickerSt = class {
|
|
|
1283
1283
|
/** kind-narrowing cast sanctioned (agent/coding.md), `kind` is the tag */
|
|
1284
1284
|
get selectedVar() {
|
|
1285
1285
|
const sel = this.st.selected?.[1];
|
|
1286
|
-
return sel?.kind === "image" ? sel : null;
|
|
1286
|
+
return sel?.kind === "image" || sel?.kind === "audio" || sel?.kind === "video" ? sel : null;
|
|
1287
1287
|
}
|
|
1288
1288
|
get folderDisplay() {
|
|
1289
1289
|
return contractHome(this.folder);
|
|
@@ -1326,7 +1326,7 @@ var ImagePickerSt = class {
|
|
|
1326
1326
|
error: null
|
|
1327
1327
|
};
|
|
1328
1328
|
if (this.pane === "recents") return {
|
|
1329
|
-
rows:
|
|
1329
|
+
rows: this.recentsForVar().map((img) => ({
|
|
1330
1330
|
kind: "image",
|
|
1331
1331
|
name: contractHome(img),
|
|
1332
1332
|
path: img,
|
|
@@ -1361,6 +1361,10 @@ var ImagePickerSt = class {
|
|
|
1361
1361
|
};
|
|
1362
1362
|
}
|
|
1363
1363
|
}
|
|
1364
|
+
recentsForVar() {
|
|
1365
|
+
const exts = this.selectedVar?.extensions ?? [];
|
|
1366
|
+
return pickerPrefs().recents.filter((f) => exts.includes(extensionOf(f)));
|
|
1367
|
+
}
|
|
1364
1368
|
get listingError() {
|
|
1365
1369
|
return this.paneListing.error;
|
|
1366
1370
|
}
|
|
@@ -1373,8 +1377,10 @@ var ImagePickerSt = class {
|
|
|
1373
1377
|
get current() {
|
|
1374
1378
|
return this.rows[this.ix] ?? null;
|
|
1375
1379
|
}
|
|
1376
|
-
/** feeds the preview reaction: only a real, present image highlights
|
|
1380
|
+
/** feeds the preview reaction: only a real, present image highlights (an audio or video
|
|
1381
|
+
* row has nothing to paint) */
|
|
1377
1382
|
get highlightedImage() {
|
|
1383
|
+
if (this.selectedVar?.kind !== "image") return null;
|
|
1378
1384
|
const row = this.current;
|
|
1379
1385
|
return row?.kind === "image" && !row.missing ? row.path : null;
|
|
1380
1386
|
}
|
|
@@ -1555,7 +1561,7 @@ const ImagePickerOverlay = observer((p) => {
|
|
|
1555
1561
|
}),
|
|
1556
1562
|
footer: rows.length === 0 ? /* @__PURE__ */ jsx(Text, {
|
|
1557
1563
|
color: "red",
|
|
1558
|
-
children: ip.listingError ?? (ip.filter !== "" ? "no match" :
|
|
1564
|
+
children: ip.listingError ?? (ip.filter !== "" ? "no match" : `no ${ip.selectedVar?.kind ?? "image"} files here`)
|
|
1559
1565
|
}) : void 0
|
|
1560
1566
|
});
|
|
1561
1567
|
});
|
|
@@ -4498,7 +4504,7 @@ var TuiSt = class {
|
|
|
4498
4504
|
else if (sel.kind === "choice") this.picker.beginChoice();
|
|
4499
4505
|
else if (sel.kind === "size") this.picker.beginSize();
|
|
4500
4506
|
else if (sel.kind === "loras") this.loras.begin();
|
|
4501
|
-
else if (sel.kind === "image") this.imagePicker.begin();
|
|
4507
|
+
else if (sel.kind === "image" || sel.kind === "audio" || sel.kind === "video") this.imagePicker.begin();
|
|
4502
4508
|
else this.editor.beginInline();
|
|
4503
4509
|
}
|
|
4504
4510
|
/** kind-specific nav keys (documented in the keybar): seed `+`/`-`/`=`/`?` mode, `*` reroll */
|
|
@@ -4597,4 +4603,4 @@ async function runTui(args) {
|
|
|
4597
4603
|
//#endregion
|
|
4598
4604
|
export { runTui };
|
|
4599
4605
|
|
|
4600
|
-
//# sourceMappingURL=run-tui-
|
|
4606
|
+
//# sourceMappingURL=run-tui-nPETFRmk.js.map
|