dsh-mo-image 1.0.2 → 1.0.3
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/CHANGELOG.md +5 -0
- package/LICENSE +34 -0
- package/README.md +11 -9
- package/lib/adapters.js +50 -26
- package/lib/client.js +78 -199
- package/lib/comfy-workflow.js +265 -58
- package/lib/config-store.js +14 -2
- package/lib/image-jobs.js +2 -2
- package/lib/image-queue.js +1 -1
- package/lib/image-worker.js +1 -1
- package/lib/index.js +14 -4
- package/lib/prompt-profiles.js +8 -0
- package/lib/status.js +31 -8
- package/lib/update-service.js +11 -13
- package/lib/update.js +17 -34
- package/locale/messages.csv +4 -9
- package/package.json +1 -2
- package/skills/mo-image-editing/SKILL.md +2 -1
- package/THIRD-PARTY-NOTICES.md +0 -32
package/CHANGELOG.md
CHANGED
package/LICENSE
CHANGED
|
@@ -19,3 +19,37 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
Third-party notices
|
|
24
|
+
-------------------
|
|
25
|
+
|
|
26
|
+
dsh-codex-model-effort-selector
|
|
27
|
+
|
|
28
|
+
The Codex-skin geometry (272×104 popover, 30px knob, rail padding), the
|
|
29
|
+
per-level colour ramps (light/dark), the deterministic sparkle/bloom
|
|
30
|
+
distribution, the ⚡ Fast toggle/`fast-mode` class contract, the peak
|
|
31
|
+
gradient/sparkle treatment and several interaction details in `lib/client.js`
|
|
32
|
+
are adapted from dsh-codex-model-effort-selector
|
|
33
|
+
(https://github.com/ABING1111/dsh-codex-model-effort-selector).
|
|
34
|
+
|
|
35
|
+
MIT License
|
|
36
|
+
|
|
37
|
+
Copyright (c) 2026 dsh-codex-model-effort-selector contributors
|
|
38
|
+
|
|
39
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
40
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
41
|
+
in the Software without restriction, including without limitation the rights
|
|
42
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
43
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
44
|
+
furnished to do so, subject to the following conditions:
|
|
45
|
+
|
|
46
|
+
The above copyright notice and this permission notice shall be included in all
|
|
47
|
+
copies or substantial portions of the Software.
|
|
48
|
+
|
|
49
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
50
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
51
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
52
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
53
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
54
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
55
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -50,16 +50,16 @@ dsh plugin --profile desktop add github:CM-Silence/dsh-mo-image
|
|
|
50
50
|
|
|
51
51
|
## 更新
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
插件启动后会从 `registry.npmmirror.com` 检查最新版本。有新版时,设置页的「生图模型」标题旁会显示「有可用更新」。点开可以查看版本号和更新说明,确认后交给 DSH 安装。镜像同步到新版本后才会显示更新提示。
|
|
54
54
|
|
|
55
55
|
更新说明来自包里的 `CHANGELOG.md`(按版本从 jsDelivr / unpkg / npmmirror 读取);那个版本没写说明时,对话框显示「暂无更新说明」。
|
|
56
56
|
|
|
57
57
|
- 用 `link:` 方式安装的开发环境不会自动改文件,点更新只会提示你自己 `git pull`。
|
|
58
|
-
-
|
|
59
|
-
-
|
|
58
|
+
- 安装时会把 `registry.npmmirror.com` 作为首选源传给 DSH,并按 `dsh-mo-image@x.y.z` 安装。DSH 仍会按宿主配置处理备用源和回滚。从 npm 安装的插件由 DSH 原生更新。早期从 `github:` 安装的插件会迁移到 npm 版,迁移失败时会尝试恢复原安装。
|
|
59
|
+
- 使用 `dsh web` 时也可以手动更新,把 `web` 换成实际使用的 profile。
|
|
60
60
|
|
|
61
61
|
~~~bash
|
|
62
|
-
dsh plugin --profile
|
|
62
|
+
dsh plugin --profile web add dsh-mo-image --registry=https://registry.npmmirror.com
|
|
63
63
|
~~~
|
|
64
64
|
|
|
65
65
|
维护者发版:
|
|
@@ -359,8 +359,10 @@ $DSH_HOME/.credentials.yaml
|
|
|
359
359
|
**ComfyUI 工作流与参数表**
|
|
360
360
|
|
|
361
361
|
- 工作流优先级:模型选项里的自定义工作流 > 内置模板(按模型自动选,见上)。自定义工作流支持 `{{prompt}}` / `{{negative_prompt}}` / `{{width}}` / `{{height}}` / `{{seed}}` / `{{model}}` / `{{image}}` 七个占位符,占位符之外的部分原样发送。
|
|
362
|
-
-
|
|
363
|
-
-
|
|
362
|
+
- 「解析工作流」自动映射提示词、宽高、可识别的质量档位和唯一的参考图输入。尺寸和质量统一在模型选择器里调整,设为「自动」后可由对话模型选择。未指定时保留工作流已有的值。
|
|
363
|
+
- 多参考图工作流可把图像输入设为 `{{image_1}}`、`{{image_2}}` 等,从 1 连续编号,最多 16 张。把对应节点命名为「主体图」「风格图」等,插件会把用途交给对话模型,按编号顺序传图。同一编号可在多个节点复用,`{{image}}` 仍代表第一张。未标记的图片保留原值。
|
|
364
|
+
- API 格式中接入输出链路的标准 `LoadImage` 可直接用于图生图。自定义节点的上传控件由「解析工作流」根据 ComfyUI 节点定义识别。没有可用参考图入口时,插件会在上传和提交前拒绝图生图。
|
|
365
|
+
- `steps`、`cfg`、`sampler_name`、`denoise`、种子等工作流参数保留在「常规」参数表里,默认沿用工作流原值。
|
|
364
366
|
- 参数表才是运行时真正写工作流的东西:默认值非空的行随请求写入;清空默认值 = 不碰工作流里的原值;勾了「暴露」的行才出现在给对话模型的参数清单里。行级锁只挡一键配置,不挡手改。
|
|
365
367
|
- 提示词与负面词不在参数表里;要手控落点就在工作流里写 `{{prompt}}` / `{{negative_prompt}}` 占位符。
|
|
366
368
|
|
|
@@ -539,7 +541,7 @@ $DSH_HOME/.credentials.yaml
|
|
|
539
541
|
|
|
540
542
|
每个模型行末尾的折叠箭头打开该模型的选项。**预设来源的提供商箭头照旧在,只是禁用**(云端预设,以及走 OpenAI 兼容字段的本地预设 sd-server / localai / openai-gateway):预设定死了输入与返回,箭头禁用表示「这里本来有东西,只是这份配置不由你改」——删掉它反而会让列表里有的行有箭头、有的没有,看着像漏渲染。剩下两类才真能展开:
|
|
541
543
|
|
|
542
|
-
- **ComfyUI / A1111 / SwarmUI**:参数归部署端(装了哪个 sampler、模型目录里有哪几个 checkpoint、工作流里有哪些节点),所以留「输入设置」。ComfyUI / A1111
|
|
544
|
+
- **ComfyUI / A1111 / SwarmUI**:参数归部署端(装了哪个 sampler、模型目录里有哪几个 checkpoint、工作流里有哪些节点),所以留「输入设置」。ComfyUI / A1111 使用「常规」参数表和枚举方框。ComfyUI 的参数行由工作流解析产生,尺寸和支持的质量档位通过模型选择器写入工作流。A1111 第一次展开时显示六行预置的 sdapi 参数。
|
|
543
545
|
- **自配的(没有预设来源:自定义 API、中转站、老配置)**:`常规`、`模型`、各 `enum` 方框,再加 `尺寸`、`质量`、`参考图`——请求形状未知,只能用户自己定。
|
|
544
546
|
|
|
545
547
|
**两块折叠区的标题行**:「输入设置」与「输出设置」是同一行结构(两块 details 直接挂在模型行上、同一份内联样式,中间不套容器;标题在左、操作区在右),左边一条基线、右边一条基线,右端的控件落同一条竖线。自配来源和相应的本地部署可同时显示两块。云端预设使用内置请求与返回格式。右端各只放一个控件或一对控件:输入那行是「一键配置」(按钮样式与模型目录的「获取可用模型」是同一个 `linkButton`)加一把整块锁(与输出那行的锁同一个图标按钮),输出那行是锁图标。展开「输入设置」后第一眼就是参数表——原来那条「说明 + 全部解锁」的工具条整行删掉了。
|
|
@@ -574,7 +576,7 @@ $DSH_HOME/.credentials.yaml
|
|
|
574
576
|
|---|---|---|---|
|
|
575
577
|
| 云端 / 中转 / 自定义 | `{ name, type, default, description, expose, options?, locked? }` | 请求体里的路径,支持 `a.b.c` 嵌套 | 手填「+ 添加参数」 |
|
|
576
578
|
| A1111 / Forge / SD.Next | 同上 | sdapi 字段名(`steps`、`cfg_scale`、`sampler_name`…) | 第一次展开时按内置清单摆好六行 |
|
|
577
|
-
| ComfyUI | 加 `node` / `input`(落在工作流节点的某个输入),`name` 只是给对话模型看的键 | 工作流里某个节点的某个输入 |
|
|
579
|
+
| ComfyUI | 加 `node` / `input`(落在工作流节点的某个输入),`name` 只是给对话模型看的键 | 工作流里某个节点的某个输入 | 「解析工作流」自动补齐映射和可选工作流参数 |
|
|
578
580
|
|
|
579
581
|
类型只有四个:`text` / `number` / `boolean` / `enum`。`enum` 行不留在主表里——它搬进自己的方框,选项表(显示名 / 值 / 默认 / 删除)就是下拉的数据源。
|
|
580
582
|
|
|
@@ -700,4 +702,4 @@ Fireworks 和 Novita 的旧配置可以重新从目录添加新版预设以采
|
|
|
700
702
|
|
|
701
703
|
## License
|
|
702
704
|
|
|
703
|
-
MIT。Codex 皮肤的几何、色板与粒子分布改编自 [dsh-codex-model-effort-selector](https://github.com/ABING1111/dsh-codex-model-effort-selector)(MIT
|
|
705
|
+
MIT。Codex 皮肤的几何、色板与粒子分布改编自 [dsh-codex-model-effort-selector](https://github.com/ABING1111/dsh-codex-model-effort-selector)(MIT)。项目和第三方许可见 [LICENSE](LICENSE)。
|
package/lib/adapters.js
CHANGED
|
@@ -677,6 +677,12 @@ export function qualityOverrideOf(provider, model) {
|
|
|
677
677
|
|
|
678
678
|
/** 规则 + 覆盖合并成一份质量说明;两边都没有就是"不发这个字段"。 */
|
|
679
679
|
function qualitySpecFor(provider, model, adapter) {
|
|
680
|
+
if (adapter?.id === 'comfyui') {
|
|
681
|
+
const target = provider?.modelOptions?.[model]?.mapping?.quality;
|
|
682
|
+
const saved = target && comfyCustomWorkflow(provider, model) && qualityOverrideOf(provider, model);
|
|
683
|
+
if (!saved?.supported || !saved.options.length) return null;
|
|
684
|
+
return { ...saved, field: target.input, default: saved.options.includes(saved.default) ? saved.default : saved.options[0] };
|
|
685
|
+
}
|
|
680
686
|
// 有实际接收档位的请求字段才提供选择器。自定义操作可以分别声明或关闭质量参数。
|
|
681
687
|
let field;
|
|
682
688
|
if (adapter?.id === 'custom') {
|
|
@@ -892,7 +898,8 @@ export function filterImageModels(models) {
|
|
|
892
898
|
|
|
893
899
|
import {
|
|
894
900
|
parseWorkflow, uiToApi, analyzeWorkflow, injectByMapping, applyWorkflowParams, listWorkflowInputs,
|
|
895
|
-
|
|
901
|
+
findWorkflowPrompt, isManagedWorkflowInput, workflowPlaceholders, workflowInputPlaceholders, workflowReferenceTarget,
|
|
902
|
+
isWorkflowImagePlaceholder, workflowImageSlots, assertComfyReferenceCount, WORKFLOW_REFERENCE_LIMIT
|
|
896
903
|
} from './comfy-workflow.js';
|
|
897
904
|
|
|
898
905
|
const OBJECT_INFO_TTL = 5 * 60 * 1000;
|
|
@@ -1061,7 +1068,6 @@ async function comfyUploadImage(base, provider, image, signal) {
|
|
|
1061
1068
|
const form = new FormData();
|
|
1062
1069
|
form.append('image', new Blob([image.buffer], { type: image.contentType || 'image/png' }),
|
|
1063
1070
|
image.filename || 'reference.png');
|
|
1064
|
-
form.append('overwrite', 'true');
|
|
1065
1071
|
const response = await requestProvider(joinEndpoint(base, '/upload/image'), {
|
|
1066
1072
|
method: 'POST', headers: headersFor(provider, true), body: form, signal
|
|
1067
1073
|
}, provider);
|
|
@@ -1268,16 +1274,12 @@ export const COMFY_WORKFLOW_PLACEHOLDERS = [
|
|
|
1268
1274
|
|
|
1269
1275
|
const PLACEHOLDER_EXACT = /^\{\{\s*([A-Za-z_][A-Za-z0-9_]*)\s*\}\}$/;
|
|
1270
1276
|
const PLACEHOLDER_ANY = /\{\{\s*([A-Za-z_][A-Za-z0-9_]*)\s*\}\}/g;
|
|
1271
|
-
const COMFY_MANAGED_ROLES = ['prompt', 'negative_prompt', 'model', 'width', 'height', 'image'];
|
|
1272
|
-
|
|
1273
|
-
function workflowPlaceholders(text) {
|
|
1274
|
-
return new Set(Array.from(text.matchAll(PLACEHOLDER_ANY), (match) =>
|
|
1275
|
-
match[1] === 'negativePrompt' ? 'negative_prompt' : match[1]));
|
|
1276
|
-
}
|
|
1277
|
+
const COMFY_MANAGED_ROLES = ['prompt', 'negative_prompt', 'model', 'width', 'height', 'quality', 'image'];
|
|
1277
1278
|
|
|
1278
1279
|
function placeholderError(key) {
|
|
1279
1280
|
return new Error('自定义工作流里有未知占位符 {{' + key + '}};可用:'
|
|
1280
|
-
+ COMFY_WORKFLOW_PLACEHOLDERS.map((name) => '{{' + name + '}}').join('、')
|
|
1281
|
+
+ COMFY_WORKFLOW_PLACEHOLDERS.map((name) => '{{' + name + '}}').join('、')
|
|
1282
|
+
+ ',或连续编号的 {{image_1}} 到 {{image_' + WORKFLOW_REFERENCE_LIMIT + '}}');
|
|
1281
1283
|
}
|
|
1282
1284
|
|
|
1283
1285
|
function fillString(text, values, lenient) {
|
|
@@ -1367,11 +1369,12 @@ export async function analyzeComfyWorkflow({ base, provider, workflow, signal })
|
|
|
1367
1369
|
export async function listComfyParams({ base, provider, workflow, signal }) {
|
|
1368
1370
|
const parsed = parseWorkflow(workflow);
|
|
1369
1371
|
let graph = parsed.graph;
|
|
1372
|
+
let info;
|
|
1370
1373
|
if (parsed.format === 'ui') {
|
|
1371
1374
|
if (!String(base || '').trim()) {
|
|
1372
1375
|
throw new Error('这是 UI 格式的工作流:解析参数要先把服务地址填好,或者改贴「导出(API)」的 JSON。');
|
|
1373
1376
|
}
|
|
1374
|
-
|
|
1377
|
+
info = await comfyObjectInfo(base, provider, signal);
|
|
1375
1378
|
const converted = uiToApi(parsed.ui, info);
|
|
1376
1379
|
if (converted.missing.length) {
|
|
1377
1380
|
throw new Error('工作流里的节点没有安装:' + converted.missing.join('、')
|
|
@@ -1379,13 +1382,13 @@ export async function listComfyParams({ base, provider, workflow, signal }) {
|
|
|
1379
1382
|
}
|
|
1380
1383
|
graph = converted.graph;
|
|
1381
1384
|
}
|
|
1382
|
-
const params = listWorkflowInputs(graph);
|
|
1385
|
+
const params = listWorkflowInputs(graph, info);
|
|
1383
1386
|
return { format: parsed.format, params: params, count: params.length };
|
|
1384
1387
|
}
|
|
1385
1388
|
|
|
1386
1389
|
/** Protect a bound input even when the workflow parameter is listed under an alias. */
|
|
1387
1390
|
export function isManagedComfyParam(param, mapping, graph) {
|
|
1388
|
-
if (
|
|
1391
|
+
if (isManagedWorkflowInput(param, mapping)) return true;
|
|
1389
1392
|
if (param?.role && COMFY_MANAGED_ROLES.includes(param.name)) return true;
|
|
1390
1393
|
if (COMFY_MANAGED_ROLES.some((role) => {
|
|
1391
1394
|
const mapped = mapping?.[role];
|
|
@@ -1394,14 +1397,16 @@ export function isManagedComfyParam(param, mapping, graph) {
|
|
|
1394
1397
|
const literal = graph?.[param?.node]?.inputs?.[param?.input];
|
|
1395
1398
|
if (typeof literal !== 'string') return false;
|
|
1396
1399
|
const placeholders = workflowPlaceholders(literal);
|
|
1397
|
-
return COMFY_MANAGED_ROLES.some((role) => placeholders.has(role))
|
|
1400
|
+
return COMFY_MANAGED_ROLES.some((role) => placeholders.has(role))
|
|
1401
|
+
|| [...placeholders].some(isWorkflowImagePlaceholder);
|
|
1398
1402
|
}
|
|
1399
1403
|
|
|
1400
1404
|
async function comfyCustomGraph(base, provider, { kind, input, model, width, height, seed, raw, signal }) {
|
|
1401
1405
|
const parsed = parseWorkflow(raw);
|
|
1402
1406
|
let graph = parsed.graph;
|
|
1407
|
+
let info;
|
|
1403
1408
|
if (parsed.format === 'ui') {
|
|
1404
|
-
|
|
1409
|
+
info = await comfyObjectInfo(base, provider, signal);
|
|
1405
1410
|
const converted = uiToApi(parsed.ui, info);
|
|
1406
1411
|
if (converted.missing.length) {
|
|
1407
1412
|
throw new Error('工作流里的节点没有安装:' + converted.missing.join('、')
|
|
@@ -1411,30 +1416,48 @@ async function comfyCustomGraph(base, provider, { kind, input, model, width, hei
|
|
|
1411
1416
|
}
|
|
1412
1417
|
|
|
1413
1418
|
const entry = provider && provider.modelOptions ? provider.modelOptions[model] : null;
|
|
1414
|
-
const mapping = entry
|
|
1415
|
-
const placeholders =
|
|
1416
|
-
const activeMapping =
|
|
1419
|
+
const mapping = entry?.mapping || {};
|
|
1420
|
+
const placeholders = raw.includes('{{') ? workflowInputPlaceholders(graph) : new Set();
|
|
1421
|
+
const activeMapping = Object.fromEntries(Object.entries(mapping).filter(([role]) => !placeholders.has(role)));
|
|
1422
|
+
const imageSlots = [...placeholders].some(isWorkflowImagePlaceholder) ? workflowImageSlots(graph) : [];
|
|
1423
|
+
if (kind === 'edit') {
|
|
1424
|
+
if (imageSlots.length) delete activeMapping.image;
|
|
1425
|
+
else {
|
|
1426
|
+
const target = workflowReferenceTarget(graph, activeMapping.image, info);
|
|
1427
|
+
if (!target) {
|
|
1428
|
+
throw new Error('该 ComfyUI 工作流不支持图生图:找不到可用的参考图输入。'
|
|
1429
|
+
+ '请解析工作流,或将参考图节点的输入设为 {{image}}。');
|
|
1430
|
+
}
|
|
1431
|
+
activeMapping.image = target;
|
|
1432
|
+
}
|
|
1433
|
+
assertComfyReferenceCount(input.images?.length || 0, imageSlots.length || 1);
|
|
1434
|
+
}
|
|
1435
|
+
if (!placeholders.has('prompt')) {
|
|
1436
|
+
const target = activeMapping.prompt || findWorkflowPrompt(graph, info);
|
|
1437
|
+
if (!target || !Object.hasOwn(graph[target.node]?.inputs || {}, target.input)) {
|
|
1438
|
+
throw new Error('工作流中找不到可用的提示词输入。请将提示词输入设为 {{prompt}} 或重新解析工作流。');
|
|
1439
|
+
}
|
|
1440
|
+
activeMapping.prompt = target;
|
|
1441
|
+
}
|
|
1417
1442
|
const values = {
|
|
1418
1443
|
prompt: input.prompt || '',
|
|
1419
1444
|
negative_prompt: input.negativePrompt || '',
|
|
1420
1445
|
negativePrompt: input.negativePrompt || '',
|
|
1421
|
-
width, height, seed, model
|
|
1446
|
+
width, height, seed, model,
|
|
1447
|
+
quality: mapQuality(provider, model, input.quality, { id: 'comfyui' })
|
|
1422
1448
|
};
|
|
1423
1449
|
|
|
1424
1450
|
if (kind === 'edit') {
|
|
1425
|
-
if (
|
|
1426
|
-
|
|
1427
|
-
|
|
1451
|
+
if (input.images.some((reference) => !reference?.buffer)) throw new Error('ComfyUI 编辑需要有效的参考图');
|
|
1452
|
+
for (const [index, reference] of input.images.entries()) {
|
|
1453
|
+
const uploaded = await comfyUploadImage(base, provider, reference, signal);
|
|
1454
|
+
for (const key of imageSlots[index]?.keys || ['image']) values[key] = uploaded;
|
|
1428
1455
|
}
|
|
1429
|
-
const reference = input.images && input.images[0];
|
|
1430
|
-
if (!reference || !reference.buffer) throw new Error('ComfyUI 编辑需要一张参考图');
|
|
1431
|
-
values.image = await comfyUploadImage(base, provider, reference, signal);
|
|
1432
1456
|
}
|
|
1433
1457
|
|
|
1434
|
-
if (!placeholders.size && !activeMapping) throw new Error('这个自定义工作流没有注入映射,请先在模型选项里解析并确认。');
|
|
1435
1458
|
// 占位符必须有值,自动尺寸时使用和内置工作流一致的默认。映射仍可保留原图中的数值。
|
|
1436
1459
|
let out = placeholders.size ? applyWorkflowTemplate(graph, { ...values, width: width ?? 1024, height: height ?? 1024 }) : graph;
|
|
1437
|
-
if (
|
|
1460
|
+
if (Object.values(activeMapping).some(Boolean)) out = injectByMapping(out, activeMapping, values).graph;
|
|
1438
1461
|
|
|
1439
1462
|
// 对话模型塞进来的可调参数:认得的写进去,认不得的记下来告诉它。
|
|
1440
1463
|
// 只认带节点落点的行(HTTP 参数行属于通用路径,不该在这里被当成工作流参数);
|
|
@@ -2345,6 +2368,7 @@ const ADAPTERS = [
|
|
|
2345
2368
|
});
|
|
2346
2369
|
return comfySubmitAndWait(provider, this, kind, input, built.graph, signal, hooks, built.note);
|
|
2347
2370
|
}
|
|
2371
|
+
if (kind === 'edit') assertComfyReferenceCount(input.images?.length || 0, 1);
|
|
2348
2372
|
const options = comfyOptionReader(base, provider, signal);
|
|
2349
2373
|
const diffusionModels = await options('UNETLoader', 'unet_name');
|
|
2350
2374
|
let workflow;
|