comfy-ts 2.9.0 → 2.11.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 +6 -4
- package/dist/{LogsSt-DFxzQfDc.js → LogsSt-qtFzOKpu.js} +2 -2
- package/dist/{LogsSt-DFxzQfDc.js.map → LogsSt-qtFzOKpu.js.map} +1 -1
- package/dist/cli.js +4 -4
- package/dist/index.cjs +102 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +102 -3
- package/dist/index.js.map +1 -1
- package/dist/{run-serve-_nrvJYyt.js → run-serve-BK7BA2dn.js} +91 -3
- package/dist/run-serve-BK7BA2dn.js.map +1 -0
- package/dist/{run-tui-BLEdTsOX.js → run-tui-CQyvMf0N.js} +36 -4
- package/dist/run-tui-CQyvMf0N.js.map +1 -0
- package/dist/{DefinedWorkflow-BatWaZO1.js → schemaDrift-DjjEtwfx.js} +176 -2
- package/dist/schemaDrift-DjjEtwfx.js.map +1 -0
- package/dist/serve-web.js +32 -16
- package/dist/{state-BbgJeCe6.js → state--wrz0BQc.js} +23 -5
- package/dist/state--wrz0BQc.js.map +1 -0
- package/dist/web.d.ts +19 -0
- package/dist/web.js +102 -3
- package/dist/web.js.map +1 -1
- package/examples/README.md +1 -0
- package/examples/comfy-cloud/capybara-i2v.cflow.ts +2 -0
- package/examples/comfy-cloud/ltx25-i2v.cflow.ts +152 -0
- package/examples/comfy-cloud/ltx25-t2v.cflow.ts +126 -0
- package/examples/comfy-cloud/minimax-music3-t2a.cflow.ts +95 -0
- package/examples/comfy-cloud/sdk.d.ts +30724 -24404
- package/examples/comfy-cloud/wan22-5b-t2v.cflow.ts +2 -0
- package/examples/comfy-cloud/wan22-i2v.cflow.ts +2 -0
- package/examples/comfy-cloud/wan22-t2v.cflow.ts +2 -0
- package/examples/rvion/07-local-llm-text-gen.cflow.ts +2 -2
- package/examples/rvion/08-qwen-image-21-t2i.cflow.ts +64 -0
- package/examples/rvion/09-qwen-image-21-edit.cflow.ts +83 -0
- package/package.json +4 -2
- package/src/cli/serve/ServeApp.ts +94 -0
- package/src/cli/serve/describeVar.ts +7 -0
- package/src/cli/serve/favicon.ts +3 -0
- package/src/cli/serve/web/api.ts +12 -0
- package/src/cli/serve/web/components/VarsForm.tsx +18 -7
- package/src/cli/serve/web/components/controls/LorasControl.tsx +102 -6
- package/src/cli/serve/web/state/WebSt.ts +79 -0
- package/src/cli/serve/web/state/loraSort.ts +39 -0
- package/src/cli/serve/web/styles.ts +15 -0
- package/src/cli/tui/components/Header.tsx +2 -0
- package/src/cli/tui/state/HostSt.ts +34 -0
- package/src/graph/ComfyNode.ts +19 -3
- package/src/host/ComfyHost.ts +15 -0
- package/src/host/loraInfoCache.ts +64 -0
- package/src/host/loraManagerApi.ts +27 -0
- package/src/host/schemaDrift.ts +87 -0
- package/dist/DefinedWorkflow-BatWaZO1.js.map +0 -1
- package/dist/run-serve-_nrvJYyt.js.map +0 -1
- package/dist/run-tui-BLEdTsOX.js.map +0 -1
- package/dist/state-BbgJeCe6.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as importSharp, n as settingsPathFor } from "./state
|
|
3
|
-
import { c as buildFileRows, d as mergeWorkflowSources, f as scanCflowFiles, i as draftKeyForFile, l as familyOf, o as listDraftsForFile, r as DraftsSt, s as assignFamilyColors, t as LogsSt, u as findDefinedWorkflow } from "./LogsSt-
|
|
1
|
+
import { G as loraPreviewMapFrom, M as fetchLoraPreviewBytes, T as refreshLoraInfoCacheIfChanged, U as loraBasename, W as loraKey, Y as extractErrorMessage, c as PromptVar, d as isLoraKeywordFromMirror, f as loraKeywordFromMirror, g as getLoraDisplayName, i as summarizeDrift, j as fetchLoraList, l as clearLoraKeywordOverride, p as setLoraKeyword, s as LorasVar, tt as logError, u as getLoraKeyword, v as getLoraPreviewUrl, x as loraMatchesFilter } from "./schemaDrift-DjjEtwfx.js";
|
|
2
|
+
import { i as importSharp, n as settingsPathFor } from "./state--wrz0BQc.js";
|
|
3
|
+
import { c as buildFileRows, d as mergeWorkflowSources, f as scanCflowFiles, i as draftKeyForFile, l as familyOf, o as listDraftsForFile, r as DraftsSt, s as assignFamilyColors, t as LogsSt, u as findDefinedWorkflow } from "./LogsSt-qtFzOKpu.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";
|
|
@@ -656,6 +656,14 @@ const Header = observer((p) => {
|
|
|
656
656
|
color: "yellow",
|
|
657
657
|
children: [" ⇄ overrides ", s.wf.host.data.id]
|
|
658
658
|
}),
|
|
659
|
+
s.host.drift !== "" && /* @__PURE__ */ jsxs(Text, {
|
|
660
|
+
color: "yellow",
|
|
661
|
+
children: [
|
|
662
|
+
" ⚠ changed: ",
|
|
663
|
+
s.host.drift,
|
|
664
|
+
" · a → re-codegen"
|
|
665
|
+
]
|
|
666
|
+
}),
|
|
659
667
|
s.host.status === "down" && /* @__PURE__ */ jsxs(Text, {
|
|
660
668
|
color: "red",
|
|
661
669
|
children: [" ", s.host.probing ? s.host.spinner : `↻ ${s.host.retryInS}s`]
|
|
@@ -2926,6 +2934,8 @@ var ExecSt = class {
|
|
|
2926
2934
|
//#endregion
|
|
2927
2935
|
//#region src/cli/tui/state/HostSt.ts
|
|
2928
2936
|
const PROBE_EVERY_MS = 5e3;
|
|
2937
|
+
/** a light drift check (the loaders only) at most this often while the host is up */
|
|
2938
|
+
const DRIFT_EVERY_MS = 6e4;
|
|
2929
2939
|
const PROBE_TIMEOUT_MS = 3e3;
|
|
2930
2940
|
const SPIN_FRAMES = [
|
|
2931
2941
|
"⠋",
|
|
@@ -2976,6 +2986,8 @@ var HostSt = class {
|
|
|
2976
2986
|
this.loopTimer = null;
|
|
2977
2987
|
this.spinTimer = null;
|
|
2978
2988
|
this.countdownTimer = null;
|
|
2989
|
+
this.drift = "";
|
|
2990
|
+
this.driftAt = 0;
|
|
2979
2991
|
this.ix = 0;
|
|
2980
2992
|
this.running = null;
|
|
2981
2993
|
this.actions = [
|
|
@@ -3010,6 +3022,7 @@ var HostSt = class {
|
|
|
3010
3022
|
this.status = "unknown";
|
|
3011
3023
|
this.statusVia = null;
|
|
3012
3024
|
this.lastProbeError = null;
|
|
3025
|
+
this.drift = "";
|
|
3013
3026
|
});
|
|
3014
3027
|
this.probeGen++;
|
|
3015
3028
|
if (this.loopTimer != null) clearTimeout(this.loopTimer);
|
|
@@ -3077,6 +3090,7 @@ var HostSt = class {
|
|
|
3077
3090
|
}
|
|
3078
3091
|
}
|
|
3079
3092
|
if (this.host !== host) return;
|
|
3093
|
+
const before = this.status;
|
|
3080
3094
|
const verdict = probeVerdict({
|
|
3081
3095
|
httpOk: ok,
|
|
3082
3096
|
wsOpen: host.isConnected,
|
|
@@ -3088,6 +3102,23 @@ var HostSt = class {
|
|
|
3088
3102
|
this.statusVia = verdict.via;
|
|
3089
3103
|
this.lastProbeError = probeError;
|
|
3090
3104
|
});
|
|
3105
|
+
if (verdict.status === "up") {
|
|
3106
|
+
if (before !== "up") this.checkDrift(true);
|
|
3107
|
+
else if (Date.now() - this.driftAt > DRIFT_EVERY_MS) this.checkDrift(false);
|
|
3108
|
+
}
|
|
3109
|
+
}
|
|
3110
|
+
async checkDrift(full) {
|
|
3111
|
+
const host = this.host;
|
|
3112
|
+
if (host.data.sdkAutoWrite === false) return;
|
|
3113
|
+
this.driftAt = Date.now();
|
|
3114
|
+
try {
|
|
3115
|
+
const summary = summarizeDrift(await host.checkSchemaDrift({ full }));
|
|
3116
|
+
if (this.host !== host) return;
|
|
3117
|
+
runInAction(() => {
|
|
3118
|
+
if (summary !== "") this.drift = summary;
|
|
3119
|
+
else if (full) this.drift = "";
|
|
3120
|
+
});
|
|
3121
|
+
} catch {}
|
|
3091
3122
|
}
|
|
3092
3123
|
get host() {
|
|
3093
3124
|
return this.st.runHost;
|
|
@@ -3189,6 +3220,7 @@ var HostSt = class {
|
|
|
3189
3220
|
runInAction(() => {
|
|
3190
3221
|
const schema = this.host.schema;
|
|
3191
3222
|
this.st.exec.notice = `SDK regenerated: ${schema.nodes.length} node types, ${schema.getLoras().length} loras`;
|
|
3223
|
+
this.drift = "";
|
|
3192
3224
|
});
|
|
3193
3225
|
} catch (e) {
|
|
3194
3226
|
runInAction(() => {
|
|
@@ -4540,4 +4572,4 @@ async function runTui(args) {
|
|
|
4540
4572
|
//#endregion
|
|
4541
4573
|
export { runTui };
|
|
4542
4574
|
|
|
4543
|
-
//# sourceMappingURL=run-tui-
|
|
4575
|
+
//# sourceMappingURL=run-tui-CQyvMf0N.js.map
|