comfy-ts 2.5.0 → 2.7.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 +15 -2
- package/dist/{DefinedWorkflow-CnzmQrBh.js → DefinedWorkflow-BJgt5t0x.js} +14 -3
- package/dist/DefinedWorkflow-BJgt5t0x.js.map +1 -0
- package/dist/{DraftsSt-C1MbWnEp.js → DraftsSt-dizp3VcC.js} +2 -2
- package/dist/{DraftsSt-C1MbWnEp.js.map → DraftsSt-dizp3VcC.js.map} +1 -1
- package/dist/cli.js +5 -5
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +7 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -18
- package/dist/index.d.ts +24 -18
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/{run-serve-D47Zas-a.js → run-serve-D1Tsuru9.js} +494 -20
- package/dist/run-serve-D1Tsuru9.js.map +1 -0
- package/dist/{run-tui-t2TRBN0H.js → run-tui-JxlEbb_f.js} +511 -331
- package/dist/run-tui-JxlEbb_f.js.map +1 -0
- package/dist/serve-web.js +273 -0
- package/dist/{state-DY3Mp9Cl.js → state-CaHeDL-0.js} +7 -13
- package/dist/state-CaHeDL-0.js.map +1 -0
- package/dist/web.d.ts +24 -18
- package/dist/web.js +7 -2
- package/dist/web.js.map +1 -1
- package/examples/web/tsconfig.json +4 -1
- package/package.json +7 -5
- package/src/cli/comfy-ts-cli.ts +1 -1
- package/src/cli/serve/ServeApp.ts +383 -14
- package/src/cli/serve/describeVar.ts +6 -1
- package/src/cli/serve/promptEnhancers.ts +69 -0
- package/src/cli/serve/run-serve.ts +41 -7
- package/src/cli/serve/safeName.ts +12 -0
- package/src/cli/serve/web/api.ts +128 -0
- package/src/cli/serve/web/clipboard.ts +25 -0
- package/src/cli/serve/web/components/App.tsx +53 -0
- package/src/cli/serve/web/components/Gallery.tsx +186 -0
- package/src/cli/serve/web/components/PromptEnhancer.tsx +254 -0
- package/src/cli/serve/web/components/Sidebar.tsx +42 -0
- package/src/cli/serve/web/components/VarsForm.tsx +184 -0
- package/src/cli/serve/web/components/controls/BasicControls.tsx +95 -0
- package/src/cli/serve/web/components/controls/ImageControl.tsx +71 -0
- package/src/cli/serve/web/components/controls/LorasControl.tsx +340 -0
- package/src/cli/serve/web/components/controls/SeedControl.tsx +43 -0
- package/src/cli/serve/web/components/controls/SizeControl.tsx +49 -0
- package/src/cli/serve/web/llm.ts +254 -0
- package/src/cli/serve/web/main.tsx +18 -0
- package/src/cli/serve/web/state/EnhancerSt.ts +481 -0
- package/src/cli/serve/web/state/FormSt.ts +180 -0
- package/src/cli/serve/web/state/RunSt.ts +136 -0
- package/src/cli/serve/web/state/WebSt.ts +235 -0
- package/src/cli/serve/web/state/payload.ts +110 -0
- package/src/cli/serve/web/styles.ts +261 -0
- package/src/cli/serve/web/tsconfig.json +15 -0
- package/src/cli/serve/webBundle.ts +66 -0
- package/src/cli/tui/imageEscapes.ts +105 -0
- package/src/cli/tui/imagePicker/ImagePickerSt.ts +21 -8
- package/src/cli/tui/protocolImage.ts +39 -0
- package/src/cli/tui/protocolImagePainter.ts +56 -23
- package/src/cli/tui/run-tui.tsx +3 -2
- package/src/cli/tui/state/LorasSt.ts +22 -9
- package/src/cli/tui/state/PreviewSt.ts +31 -13
- package/src/cli/tui/state/SettingsSt.ts +1 -1
- package/src/state.ts +6 -0
- package/src/vars/ComfyVars.ts +4 -1
- package/dist/DefinedWorkflow-CnzmQrBh.js.map +0 -1
- package/dist/run-serve-D47Zas-a.js.map +0 -1
- package/dist/run-tui-t2TRBN0H.js.map +0 -1
- package/dist/state-DY3Mp9Cl.js.map +0 -1
package/dist/web.d.ts
CHANGED
|
@@ -11900,27 +11900,27 @@ declare const types$1: import("arktype").Module<{
|
|
|
11900
11900
|
};
|
|
11901
11901
|
PromptID: PromptID;
|
|
11902
11902
|
PromptRelated_WsMsg: {
|
|
11903
|
-
type: "
|
|
11903
|
+
type: "execution_start";
|
|
11904
11904
|
data: {
|
|
11905
|
-
|
|
11906
|
-
max: number;
|
|
11905
|
+
prompt_id: PromptID;
|
|
11907
11906
|
};
|
|
11908
11907
|
} | {
|
|
11909
|
-
type: "
|
|
11908
|
+
type: "execution_cached";
|
|
11910
11909
|
data: {
|
|
11910
|
+
nodes: ComfyNodeId[];
|
|
11911
11911
|
prompt_id: PromptID;
|
|
11912
|
-
node?: ComfyNodeId | null | undefined;
|
|
11913
11912
|
};
|
|
11914
11913
|
} | {
|
|
11915
|
-
type: "
|
|
11914
|
+
type: "executing";
|
|
11916
11915
|
data: {
|
|
11917
11916
|
prompt_id: PromptID;
|
|
11917
|
+
node?: ComfyNodeId | null | undefined;
|
|
11918
11918
|
};
|
|
11919
11919
|
} | {
|
|
11920
|
-
type: "
|
|
11920
|
+
type: "progress";
|
|
11921
11921
|
data: {
|
|
11922
|
-
|
|
11923
|
-
|
|
11922
|
+
value: number;
|
|
11923
|
+
max: number;
|
|
11924
11924
|
};
|
|
11925
11925
|
} | {
|
|
11926
11926
|
type: "progress_state";
|
|
@@ -11975,27 +11975,27 @@ declare const types$1: import("arktype").Module<{
|
|
|
11975
11975
|
data: string;
|
|
11976
11976
|
};
|
|
11977
11977
|
WsMsg: {
|
|
11978
|
-
type: "
|
|
11978
|
+
type: "execution_start";
|
|
11979
11979
|
data: {
|
|
11980
|
-
|
|
11981
|
-
max: number;
|
|
11980
|
+
prompt_id: PromptID;
|
|
11982
11981
|
};
|
|
11983
11982
|
} | {
|
|
11984
|
-
type: "
|
|
11983
|
+
type: "execution_cached";
|
|
11985
11984
|
data: {
|
|
11985
|
+
nodes: ComfyNodeId[];
|
|
11986
11986
|
prompt_id: PromptID;
|
|
11987
|
-
node?: ComfyNodeId | null | undefined;
|
|
11988
11987
|
};
|
|
11989
11988
|
} | {
|
|
11990
|
-
type: "
|
|
11989
|
+
type: "executing";
|
|
11991
11990
|
data: {
|
|
11992
11991
|
prompt_id: PromptID;
|
|
11992
|
+
node?: ComfyNodeId | null | undefined;
|
|
11993
11993
|
};
|
|
11994
11994
|
} | {
|
|
11995
|
-
type: "
|
|
11995
|
+
type: "progress";
|
|
11996
11996
|
data: {
|
|
11997
|
-
|
|
11998
|
-
|
|
11997
|
+
value: number;
|
|
11998
|
+
max: number;
|
|
11999
11999
|
};
|
|
12000
12000
|
} | {
|
|
12001
12001
|
type: "progress_state";
|
|
@@ -16056,6 +16056,9 @@ type SeedMode = '=' | '+' | '-' | '?';
|
|
|
16056
16056
|
declare class SeedVar extends ComfyVar<number> {
|
|
16057
16057
|
readonly kind: 'seed';
|
|
16058
16058
|
mode: SeedMode;
|
|
16059
|
+
/** the mode a reset() restores — the SPEC default, never the live one (introspection
|
|
16060
|
+
* reads this: a running mode must not masquerade as the var's default) */
|
|
16061
|
+
readonly defaultMode: SeedMode;
|
|
16059
16062
|
constructor(defaultValue?: number, label?: string);
|
|
16060
16063
|
setMode(mode: SeedMode): this;
|
|
16061
16064
|
randomize(): this;
|
|
@@ -17160,11 +17163,14 @@ declare class ComfyTS {
|
|
|
17160
17163
|
* .comfy-ts/hosts/<id>/{object_info.json, embeddings.json, sdk.d.ts}
|
|
17161
17164
|
* .comfy-ts/outputs/... generated images & workflows
|
|
17162
17165
|
* .comfy-ts/drafts/<workflow-id>/<draft>.json TUI var snapshots (local, gitignored)
|
|
17166
|
+
* .comfy-ts/prompt-enhancers/<name>.md serve web ui master prompts (local, gitignored)
|
|
17163
17167
|
*/
|
|
17164
17168
|
baseFolder: AbsolutePath;
|
|
17165
17169
|
hostsFolder: AbsolutePath;
|
|
17166
17170
|
outputPath: AbsolutePath;
|
|
17167
17171
|
resolveFromDrafts(relativePath: string): AbsolutePath;
|
|
17172
|
+
/** master prompts of the serve web ui's prompt enhancer — hand-editable markdown */
|
|
17173
|
+
resolveFromPromptEnhancers(relativePath: string): AbsolutePath;
|
|
17168
17174
|
resolveFromCache(relativePath: string): AbsolutePath;
|
|
17169
17175
|
/** local TUI settings (preview mode, last draft per workflow) — gitignored */
|
|
17170
17176
|
get settingsPath(): AbsolutePath;
|
package/dist/web.js
CHANGED
|
@@ -101,7 +101,7 @@ function getComfyStorage() {
|
|
|
101
101
|
}
|
|
102
102
|
//#endregion
|
|
103
103
|
//#region package.json
|
|
104
|
-
var version = "2.
|
|
104
|
+
var version = "2.7.0";
|
|
105
105
|
//#endregion
|
|
106
106
|
//#region src/litegraph/LiteGraphLinkID.ts
|
|
107
107
|
const asLiteGraphLinkID = (id) => id;
|
|
@@ -4341,6 +4341,7 @@ var SeedVar = class extends ComfyVar {
|
|
|
4341
4341
|
super(defaultValue, label);
|
|
4342
4342
|
this.kind = "seed";
|
|
4343
4343
|
this.mode = "=";
|
|
4344
|
+
this.defaultMode = "=";
|
|
4344
4345
|
makeObservable(this, {
|
|
4345
4346
|
mode: observable,
|
|
4346
4347
|
setMode: action,
|
|
@@ -4371,7 +4372,7 @@ var SeedVar = class extends ComfyVar {
|
|
|
4371
4372
|
/** mode is part of the seed's state: a reset must not keep a caller's `?`/`+` alive
|
|
4372
4373
|
* ('=' is the construction default; drafts restore their own mode via loadJSON) */
|
|
4373
4374
|
reset() {
|
|
4374
|
-
this.setMode(
|
|
4375
|
+
this.setMode(this.defaultMode);
|
|
4375
4376
|
return super.reset();
|
|
4376
4377
|
}
|
|
4377
4378
|
/** parse `+` `- 12` `= 5` `?` or a bare number (=> fixed). Keeps the current number when none given */
|
|
@@ -5958,6 +5959,10 @@ var ComfyTS = class ComfyTS {
|
|
|
5958
5959
|
resolveFromDrafts(relativePath) {
|
|
5959
5960
|
return asAbsolutePath(join(this.baseFolder, "drafts", relativePath));
|
|
5960
5961
|
}
|
|
5962
|
+
/** master prompts of the serve web ui's prompt enhancer — hand-editable markdown */
|
|
5963
|
+
resolveFromPromptEnhancers(relativePath) {
|
|
5964
|
+
return asAbsolutePath(join(this.baseFolder, "prompt-enhancers", relativePath));
|
|
5965
|
+
}
|
|
5961
5966
|
resolveFromCache(relativePath) {
|
|
5962
5967
|
return asAbsolutePath(join(this.baseFolder, "cache", relativePath));
|
|
5963
5968
|
}
|