comfy-ts 1.0.0 → 1.1.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 +42 -6
- package/dist/{DefinedWorkflow-O3ynII3Y.js → DefinedWorkflow-BYyu5dK9.js} +76 -5
- package/dist/DefinedWorkflow-BYyu5dK9.js.map +1 -0
- package/dist/cli.js +421 -308
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +394 -162
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7426 -353
- package/dist/index.d.ts +7408 -335
- package/dist/index.js +393 -162
- package/dist/index.js.map +1 -1
- package/dist/{run-tui-BFhba_oG.js → run-tui-DZ22HDHI.js} +529 -78
- package/dist/run-tui-DZ22HDHI.js.map +1 -0
- package/examples/02-img2img-upload.cflow.ts +6 -17
- package/examples/05-comfy-cloud.cflow.ts +19 -35
- package/examples/README.md +30 -0
- package/examples/comfy-cloud/ace-step-t2a.cflow.ts +79 -0
- package/examples/comfy-cloud/anima-t2i.cflow.ts +57 -0
- package/examples/comfy-cloud/boogu-i2i.cflow.ts +76 -0
- package/examples/comfy-cloud/capybara-i2i.cflow.ts +85 -0
- package/examples/comfy-cloud/capybara-i2v.cflow.ts +90 -0
- package/examples/comfy-cloud/capybara-t2i.cflow.ts +67 -0
- package/examples/comfy-cloud/chatterbox-t2a.cflow.ts +79 -0
- package/examples/comfy-cloud/chroma-t2i.cflow.ts +62 -0
- package/examples/comfy-cloud/cloudHost.ts +41 -0
- package/examples/comfy-cloud/ernie-t2i.cflow.ts +59 -0
- package/examples/comfy-cloud/firered-i2i.cflow.ts +74 -0
- package/examples/comfy-cloud/flux1-i2i.cflow.ts +76 -0
- package/examples/comfy-cloud/flux1-t2i.cflow.ts +63 -0
- package/examples/comfy-cloud/flux2-i2i.cflow.ts +80 -0
- package/examples/comfy-cloud/flux2-t2i.cflow.ts +57 -0
- package/examples/comfy-cloud/hidream-i2i.cflow.ts +89 -0
- package/examples/comfy-cloud/hidream-t2i.cflow.ts +65 -0
- package/examples/comfy-cloud/hunyuan-video-i2v.cflow.ts +93 -0
- package/examples/comfy-cloud/hunyuan-video-t2v.cflow.ts +74 -0
- package/examples/comfy-cloud/ideogram4-t2i.cflow.ts +80 -0
- package/examples/comfy-cloud/kandinsky5-i2v.cflow.ts +95 -0
- package/examples/comfy-cloud/kandinsky5-t2i.cflow.ts +60 -0
- package/examples/comfy-cloud/kandinsky5-t2v.cflow.ts +78 -0
- package/examples/comfy-cloud/krea2-t2i.cflow.ts +59 -0
- package/examples/comfy-cloud/lens-t2i.cflow.ts +62 -0
- package/examples/comfy-cloud/longcat-i2i.cflow.ts +74 -0
- package/examples/comfy-cloud/longcat-t2i.cflow.ts +65 -0
- package/examples/comfy-cloud/ltxv-i2v.cflow.ts +92 -0
- package/examples/comfy-cloud/ltxv-t2v.cflow.ts +78 -0
- package/examples/comfy-cloud/newbie-t2i.cflow.ts +67 -0
- package/examples/comfy-cloud/omnigen2-i2i.cflow.ts +86 -0
- package/examples/comfy-cloud/omnigen2-t2i.cflow.ts +62 -0
- package/examples/comfy-cloud/ovis-t2i.cflow.ts +56 -0
- package/examples/comfy-cloud/pixeldit-t2i.cflow.ts +63 -0
- package/examples/comfy-cloud/qwen-image-i2i.cflow.ts +69 -0
- package/examples/comfy-cloud/qwen-image-t2i.cflow.ts +55 -0
- package/examples/comfy-cloud/sd35-t2i.cflow.ts +48 -0
- package/examples/comfy-cloud/sdk.d.ts +445 -57
- package/examples/comfy-cloud/sdxl-t2i.cflow.ts +69 -0
- package/examples/comfy-cloud/stable-audio-t2a.cflow.ts +53 -0
- package/examples/comfy-cloud/svd-i2v.cflow.ts +75 -0
- package/examples/comfy-cloud/wan21-i2v.cflow.ts +83 -0
- package/examples/comfy-cloud/wan21-t2v.cflow.ts +64 -0
- package/examples/comfy-cloud/wan22-5b-t2v.cflow.ts +69 -0
- package/examples/comfy-cloud/wan22-i2v.cflow.ts +107 -0
- package/examples/comfy-cloud/wan22-t2v.cflow.ts +98 -0
- package/examples/comfy-cloud/z-image-t2i.cflow.ts +62 -0
- package/examples/images/README.md +18 -0
- package/examples/images/bear_1024x1024.jpg +0 -0
- package/examples/images/deer_768x1344.jpg +0 -0
- package/examples/images/dog_512x512.jpg +0 -0
- package/examples/images/lioness_768x768.jpg +0 -0
- package/examples/images/pug_200x300.jpg +0 -0
- package/examples/images/walrus_1344x768.jpg +0 -0
- package/guide-for-agents.md +7 -1
- package/package.json +15 -4
- package/src/cli/tui/components/PreviewPanel.tsx +9 -8
- package/src/cli/tui/components/StatusBar.tsx +11 -0
- package/src/cli/tui/components/TuiApp.tsx +18 -0
- package/src/cli/tui/discoverWorkflows.ts +7 -41
- package/src/cli/tui/imagePicker/ImagePickerOverlay.tsx +72 -0
- package/src/cli/tui/imagePicker/ImagePickerSt.ts +288 -0
- package/src/cli/tui/imagePicker/fsListing.ts +46 -0
- package/src/cli/tui/imagePicker/pickerPrefs.ts +78 -0
- package/src/cli/tui/run-tui.tsx +2 -1
- package/src/cli/tui/state/LorasSt.ts +14 -36
- package/src/cli/tui/state/PreviewSt.ts +28 -2
- package/src/cli/tui/state/TuiSt.ts +6 -0
- package/src/exampleAssets.ts +56 -0
- package/src/graph/ComfyNode.ts +4 -1
- package/src/index.ts +7 -0
- package/src/manager/ComfyRegistry.ts +37 -9
- package/src/manager/generated/KnownComfyCustomNodeName.ts +23852 -1926
- package/src/manager/generated/KnownComfyPluginTitle.ts +6854 -236
- package/src/manager/generated/KnownComfyPluginURL.ts +3425 -111
- package/src/manager/generated/KnownModel_Base.ts +23 -7
- package/src/manager/generated/KnownModel_FileName.ts +421 -0
- package/src/manager/generated/KnownModel_Name.ts +421 -0
- package/src/manager/generated/KnownModel_SavePath.ts +34 -8
- package/src/manager/generated/KnownModel_Type.ts +18 -14
- package/src/manager/json/alter-list.json +221 -221
- package/src/manager/json/custom-node-list.json +61020 -21946
- package/src/manager/json/extension-node-map.json +81077 -31176
- package/src/manager/json/github-stats.json +29321 -12601
- package/src/manager/json/model-list.json +5935 -4997
- package/src/manager/loaders/parseReport.ts +55 -0
- package/src/manager/loaders/step1_downloadComfyManagerJSONs.ts +15 -49
- package/src/manager/loaders/step2_custom-node-list-loader.ts +38 -83
- package/src/manager/loaders/step3_extension-node-map-loader.ts +36 -142
- package/src/manager/loaders/step4_model-list-loader.ts +25 -36
- package/src/manager/loaders/step5_alter-list-loader.ts +29 -0
- package/src/manager/loaders/step6_github-stats-loader.ts +23 -0
- package/src/manager/script-update-manager.bun.ts +9 -1
- package/src/manager/types/ComfyManagerAlterInfo.ts +13 -0
- package/src/manager/types/ComfyManagerFileModelInfo.ts +7 -3
- package/src/manager/types/ComfyManagerFilePluginContent.ts +6 -9
- package/src/manager/types/ComfyManagerFilePluginList.ts +3 -3
- package/src/manager/types/ComfyManagerGithubStats.ts +9 -0
- package/src/manager/types/ComfyManagerPluginContentMetadata.ts +2 -3
- package/src/manager/types/ComfyManagerPluginInfo.ts +48 -34
- package/src/sdk-generator/ComfySchema.ts +14 -1
- package/src/sdk-generator/comfyui-sdk-codegen.ts +15 -0
- package/src/sdk-generator/inputWidgetKind.ts +17 -0
- package/src/vars/ComfyVars.ts +82 -2
- package/src/vars/DefinedWorkflow.ts +7 -2
- package/dist/DefinedWorkflow-O3ynII3Y.js.map +0 -1
- package/dist/run-tui-BFhba_oG.js.map +0 -1
- package/src/utils/tryExtracting.ts +0 -41
package/src/graph/ComfyNode.ts
CHANGED
|
@@ -179,7 +179,10 @@ export class ComfyNode<
|
|
|
179
179
|
for (const i of this.$schema.inputs) {
|
|
180
180
|
_done.add(i.nameInComfy)
|
|
181
181
|
const value = this.serializeValue(i.nameInComfy, promptExt.inputs[i.nameInComfy])
|
|
182
|
-
|
|
182
|
+
// absent optionals (autogrow containers included) stay OUT of the
|
|
183
|
+
// prompt: an `undefined` value would already be dropped by JSON
|
|
184
|
+
// serialization, keeping the key would only lie to Object.keys
|
|
185
|
+
if (value !== undefined) inputs[i.nameInComfy] = value
|
|
183
186
|
}
|
|
184
187
|
for (const [nameInComfy, rawVal] of Object.entries(promptExt.inputs)) {
|
|
185
188
|
if (_done.has(nameInComfy)) continue
|
package/src/index.ts
CHANGED
|
@@ -46,6 +46,9 @@ export { ComfyNodeOutput } from 'src/graph/ComfyNodeOutput.ts'
|
|
|
46
46
|
export type { ComfyNodeMetadata, ComfyNodeId } from 'src/graph/ComfyNodeID.ts'
|
|
47
47
|
export { auto, auto_ } from 'src/graph/autoValue.ts'
|
|
48
48
|
|
|
49
|
+
// bundled example assets (ship in the tarball)
|
|
50
|
+
export { exampleImagePath } from 'src/exampleAssets.ts'
|
|
51
|
+
|
|
49
52
|
// sdk generator (schema parsing + per-host codegen)
|
|
50
53
|
export { ComfySchema } from 'src/sdk-generator/ComfySchema.ts'
|
|
51
54
|
export { codegenSDK, hostIdToNamespace, type CodegenOptions } from 'src/sdk-generator/comfyui-sdk-codegen.ts'
|
|
@@ -83,7 +86,10 @@ export {
|
|
|
83
86
|
ChoiceVar,
|
|
84
87
|
LorasVar,
|
|
85
88
|
SizeVar,
|
|
89
|
+
ImageVar,
|
|
90
|
+
ImageVarEmptyError,
|
|
86
91
|
DEFAULT_SIZE_PRESETS,
|
|
92
|
+
DEFAULT_IMAGE_EXTENSIONS,
|
|
87
93
|
activeLoras,
|
|
88
94
|
} from 'src/vars/ComfyVars.ts'
|
|
89
95
|
export type {
|
|
@@ -98,6 +104,7 @@ export type {
|
|
|
98
104
|
ActiveLora,
|
|
99
105
|
SizeValue,
|
|
100
106
|
SizePreset,
|
|
107
|
+
ImageVarOpts,
|
|
101
108
|
} from 'src/vars/ComfyVars.ts'
|
|
102
109
|
export { DefinedWorkflow, type DefineWorkflowSpec, type BoundVars, type LoraNameOf } from 'src/vars/DefinedWorkflow.ts'
|
|
103
110
|
export { getLoraKeyword, setLoraKeyword } from 'src/vars/loraKeywords.ts'
|
|
@@ -8,11 +8,28 @@ import { DownloadComfyManagerJSONs } from 'src/manager/loaders/step1_downloadCom
|
|
|
8
8
|
import { _getKnownPlugins } from 'src/manager/loaders/step2_custom-node-list-loader.ts'
|
|
9
9
|
import { _getCustomNodeRegistry } from 'src/manager/loaders/step3_extension-node-map-loader.ts'
|
|
10
10
|
import { _getKnownModels } from 'src/manager/loaders/step4_model-list-loader.ts'
|
|
11
|
+
import { _getAlterList } from 'src/manager/loaders/step5_alter-list-loader.ts'
|
|
12
|
+
import { _getGithubStats } from 'src/manager/loaders/step6_github-stats-loader.ts'
|
|
13
|
+
import { ManagerParseReport } from 'src/manager/loaders/parseReport.ts'
|
|
14
|
+
import type { ComfyManagerAlterInfo } from 'src/manager/types/ComfyManagerAlterInfo.ts'
|
|
15
|
+
import type { ComfyManagerGithubStatEntry } from 'src/manager/types/ComfyManagerGithubStats.ts'
|
|
11
16
|
import type { ComfyManagerModelInfo } from 'src/manager/types/ComfyManagerModelInfo.ts'
|
|
12
17
|
import type { ComfyManagerPluginInfo } from 'src/manager/types/ComfyManagerPluginInfo.ts'
|
|
13
18
|
|
|
14
19
|
const log = (...args: unknown[]) => console.log(`[📘 registry]`, ...args)
|
|
15
20
|
|
|
21
|
+
// core ComfyUI as a pseudo-plugin: extension-node-map keys the builtin nodes under this url
|
|
22
|
+
const BUILTIN_URL: KnownComfyPluginURL = 'https://github.com/comfyanonymous/ComfyUI'
|
|
23
|
+
const BUILTIN_PLUGIN: ComfyManagerPluginInfo = {
|
|
24
|
+
id: 'nodes',
|
|
25
|
+
author: 'comfyanonymous',
|
|
26
|
+
description: 'built-in',
|
|
27
|
+
title: 'built-in',
|
|
28
|
+
files: [BUILTIN_URL],
|
|
29
|
+
reference: 'https://github.com/comfyanonymous/ComfyUI',
|
|
30
|
+
install_type: '',
|
|
31
|
+
}
|
|
32
|
+
|
|
16
33
|
export class ComfyRegistry {
|
|
17
34
|
// plugins, indexed
|
|
18
35
|
plugins_byTitle = new Map<KnownComfyPluginTitle, ComfyManagerPluginInfo>()
|
|
@@ -26,6 +43,15 @@ export class ComfyRegistry {
|
|
|
26
43
|
// Models
|
|
27
44
|
knownModels = new Map<KnownModel_Name, ComfyManagerModelInfo>()
|
|
28
45
|
|
|
46
|
+
// a1111 → comfy alternatives (alter-list.json)
|
|
47
|
+
alterations: ComfyManagerAlterInfo[] = []
|
|
48
|
+
|
|
49
|
+
// repo url → stars / last_update (github-stats.json)
|
|
50
|
+
githubStats = new Map<string, ComfyManagerGithubStatEntry>()
|
|
51
|
+
|
|
52
|
+
// per-file row accounting of the last load, printed on every build
|
|
53
|
+
report = new ManagerParseReport()
|
|
54
|
+
|
|
29
55
|
static async DownloadAndUpdate(download: boolean): Promise<ComfyRegistry> {
|
|
30
56
|
if (download) {
|
|
31
57
|
log(chalk.bold(`1. Downloading comfy-manager JSONs...`))
|
|
@@ -46,15 +72,9 @@ export class ComfyRegistry {
|
|
|
46
72
|
genTypes?: boolean
|
|
47
73
|
} = {},
|
|
48
74
|
) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
description: 'built-in',
|
|
53
|
-
title: 'built-in' as any,
|
|
54
|
-
files: [],
|
|
55
|
-
reference: 'https://github.com/comfyanonymous/ComfyUI',
|
|
56
|
-
install_type: '',
|
|
57
|
-
})
|
|
75
|
+
// seeded BEFORE codegen so 'built-in' and the core repo url are legitimate union members
|
|
76
|
+
this.plugins_byTitle.set(BUILTIN_PLUGIN.title, BUILTIN_PLUGIN)
|
|
77
|
+
this.plugins_byFile.set(BUILTIN_URL, BUILTIN_PLUGIN)
|
|
58
78
|
|
|
59
79
|
log(`loading src/manager/json/${chalk.yellow('custom-node-list.json')}...`)
|
|
60
80
|
_getKnownPlugins(this)
|
|
@@ -64,6 +84,14 @@ export class ComfyRegistry {
|
|
|
64
84
|
|
|
65
85
|
log(`loading src/manager/json/${chalk.yellow('model-list.json')}...`)
|
|
66
86
|
_getKnownModels(this)
|
|
87
|
+
|
|
88
|
+
log(`loading src/manager/json/${chalk.yellow('alter-list.json')}...`)
|
|
89
|
+
_getAlterList(this)
|
|
90
|
+
|
|
91
|
+
log(`loading src/manager/json/${chalk.yellow('github-stats.json')}...`)
|
|
92
|
+
_getGithubStats(this)
|
|
93
|
+
|
|
94
|
+
this.report.print()
|
|
67
95
|
}
|
|
68
96
|
|
|
69
97
|
getKnownCheckpoints = (): ComfyManagerModelInfo[] => {
|