dsh-plugin-comfy-scratch 0.0.0-stage → 0.2.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/LICENSE +133 -0
- package/README.md +99 -2
- package/cordis.patch.yml +3 -0
- package/dist/client/index.d.ts +13 -0
- package/dist/client.js +34733 -0
- package/dist/host/index.d.ts +227 -0
- package/dist/host/index.js +39578 -0
- package/icon.svg +8 -0
- package/locale/en.json +22 -0
- package/locale/zh.json +22 -0
- package/package.json +116 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
Required Notice: Copyright (c) 2026 KatouAkane. Free strictly for personal & noncommercial use; commercial resale, paid bundling, or paid installation services are strictly prohibited (本软件永久免费仅供个人与非商业使用,严禁任何闲鱼/淘宝售卖、付费整合包捆绑或收费代装).
|
|
2
|
+
|
|
3
|
+
# PolyForm Noncommercial License 1.0.0
|
|
4
|
+
|
|
5
|
+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
6
|
+
|
|
7
|
+
## Acceptance
|
|
8
|
+
|
|
9
|
+
In order to get any license under these terms, you must agree
|
|
10
|
+
to them as both strict obligations and conditions to all
|
|
11
|
+
your licenses.
|
|
12
|
+
|
|
13
|
+
## Copyright License
|
|
14
|
+
|
|
15
|
+
The licensor grants you a copyright license for the
|
|
16
|
+
software to do everything you might do with the software
|
|
17
|
+
that would otherwise infringe the licensor's copyright
|
|
18
|
+
in it for any permitted purpose. However, you may
|
|
19
|
+
only distribute the software according to [Distribution
|
|
20
|
+
License](#distribution-license) and make changes or new works
|
|
21
|
+
based on the software according to [Changes and New Works
|
|
22
|
+
License](#changes-and-new-works-license).
|
|
23
|
+
|
|
24
|
+
## Distribution License
|
|
25
|
+
|
|
26
|
+
The licensor grants you an additional copyright license
|
|
27
|
+
to distribute copies of the software. Your license
|
|
28
|
+
to distribute covers distributing the software with
|
|
29
|
+
changes and new works permitted by [Changes and New Works
|
|
30
|
+
License](#changes-and-new-works-license).
|
|
31
|
+
|
|
32
|
+
## Notices
|
|
33
|
+
|
|
34
|
+
You must ensure that anyone who gets a copy of any part of
|
|
35
|
+
the software from you also gets a copy of these terms or the
|
|
36
|
+
URL for them above, as well as copies of any plain-text lines
|
|
37
|
+
beginning with `Required Notice:` that the licensor provided
|
|
38
|
+
with the software. For example:
|
|
39
|
+
|
|
40
|
+
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
41
|
+
|
|
42
|
+
## Changes and New Works License
|
|
43
|
+
|
|
44
|
+
The licensor grants you an additional copyright license to
|
|
45
|
+
make changes and new works based on the software for any
|
|
46
|
+
permitted purpose.
|
|
47
|
+
|
|
48
|
+
## Patent License
|
|
49
|
+
|
|
50
|
+
The licensor grants you a patent license for the software that
|
|
51
|
+
covers patent claims the licensor can license, or becomes able
|
|
52
|
+
to license, that you would infringe by using the software.
|
|
53
|
+
|
|
54
|
+
## Noncommercial Purposes
|
|
55
|
+
|
|
56
|
+
Any noncommercial purpose is a permitted purpose.
|
|
57
|
+
|
|
58
|
+
## Personal Uses
|
|
59
|
+
|
|
60
|
+
Personal use for research, experiment, and testing for
|
|
61
|
+
the benefit of public knowledge, personal study, private
|
|
62
|
+
entertainment, hobby projects, amateur pursuits, or religious
|
|
63
|
+
observance, without any anticipated commercial application,
|
|
64
|
+
is use for a permitted purpose.
|
|
65
|
+
|
|
66
|
+
## Noncommercial Organizations
|
|
67
|
+
|
|
68
|
+
Use by any charitable organization, educational institution,
|
|
69
|
+
public research organization, public safety or health
|
|
70
|
+
organization, environmental protection organization,
|
|
71
|
+
or government institution is use for a permitted purpose
|
|
72
|
+
regardless of the source of funding or obligations resulting
|
|
73
|
+
from the funding.
|
|
74
|
+
|
|
75
|
+
## Fair Use
|
|
76
|
+
|
|
77
|
+
You may have "fair use" rights for the software under the
|
|
78
|
+
law. These terms do not limit them.
|
|
79
|
+
|
|
80
|
+
## No Other Rights
|
|
81
|
+
|
|
82
|
+
These terms do not allow you to sublicense or transfer any of
|
|
83
|
+
your licenses to anyone else, or prevent the licensor from
|
|
84
|
+
granting licenses to anyone else. These terms do not imply
|
|
85
|
+
any other licenses.
|
|
86
|
+
|
|
87
|
+
## Patent Defense
|
|
88
|
+
|
|
89
|
+
If you make any written claim that the software infringes or
|
|
90
|
+
contributes to infringement of any patent, your patent license
|
|
91
|
+
for the software granted under these terms ends immediately. If
|
|
92
|
+
your company makes such a claim, your patent license ends
|
|
93
|
+
immediately for work on behalf of your company.
|
|
94
|
+
|
|
95
|
+
## Violations
|
|
96
|
+
|
|
97
|
+
The first time you are notified in writing that you have
|
|
98
|
+
violated any of these terms, or done anything with the software
|
|
99
|
+
not covered by your licenses, your licenses can nonetheless
|
|
100
|
+
continue if you come into full compliance with these terms,
|
|
101
|
+
and take practical steps to correct past violations, within
|
|
102
|
+
32 days of receiving notice. Otherwise, all your licenses
|
|
103
|
+
end immediately.
|
|
104
|
+
|
|
105
|
+
## No Liability
|
|
106
|
+
|
|
107
|
+
***As far as the law allows, the software comes as is, without
|
|
108
|
+
any warranty or condition, and the licensor will not be liable
|
|
109
|
+
to you for any damages arising out of these terms or the use
|
|
110
|
+
or nature of the software, under any kind of legal claim.***
|
|
111
|
+
|
|
112
|
+
## Definitions
|
|
113
|
+
|
|
114
|
+
The **licensor** is the individual or entity offering these
|
|
115
|
+
terms, and the **software** is the software the licensor makes
|
|
116
|
+
available under these terms.
|
|
117
|
+
|
|
118
|
+
**You** refers to the individual or entity agreeing to these
|
|
119
|
+
terms.
|
|
120
|
+
|
|
121
|
+
**Your company** is any legal entity, sole proprietorship,
|
|
122
|
+
or other kind of organization that you work for, plus all
|
|
123
|
+
organizations that have control over, are under the control of,
|
|
124
|
+
or are under common control with that organization. **Control**
|
|
125
|
+
means ownership of substantially all the assets of an entity,
|
|
126
|
+
or the power to direct its management and policies by vote,
|
|
127
|
+
contract, or otherwise. Control can be direct or indirect.
|
|
128
|
+
|
|
129
|
+
**Your licenses** are all the licenses granted to you for the
|
|
130
|
+
software under these terms.
|
|
131
|
+
|
|
132
|
+
**Use** means anything you do with the software requiring one
|
|
133
|
+
of your licenses.
|
package/README.md
CHANGED
|
@@ -1,3 +1,100 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Comfy Scratch Studio · Comfy 积木工坊(内测预览版 `v0.2.0`)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **⚠️ 内测预览版说明(Preview / Early Access `0.x`)**:本项目当前处于 `0.2.x` 早期内测与朋友体验打磨阶段(尚未进入 `1.0.0` 正式版),功能细节与交互仍在持续迭代完善中,欢迎在 [Issues](https://github.com/KatouAkane/comfy-scratch-studio/issues) 反馈问题与建议。
|
|
4
|
+
>
|
|
5
|
+
> **🛡️ 永久免费与防倒卖声明(`PolyForm-Noncommercial-1.0.0`)**:本软件唯一官方免费发布主页为 `https://github.com/KatouAkane/comfy-scratch-studio`,仅供个人与非商业学习娱乐使用,**严禁任何形式的闲鱼/淘宝/知识星球售卖、付费整合包捆绑或收费代装**。如您通过任何付费渠道购得本安装包,请立即申请全额退款并举报卖家!
|
|
6
|
+
|
|
7
|
+
面向 **DeepSeek Harness (`dsh` / `DSH NEXT`)**(并预留多端 MCP / 独立桌面架构)的类 Scratch 模块化 ComfyUI 出图与炼丹工坊,深度适配 **NVIDIA CUDA(含 RTX 50 系 Blackwell NVFP4)** 与 **AMD Radeon RX 9070 XT(16G ROCm / Navi 48)**,双主力支持 **Krea 2 Turbo / Qwen-Image**(自然语言流)与 **Illustrious / SDXL**(Danbooru 标签流),并内置**全谱系 32 款显卡「零显存体验沙盒」**——**电脑未安装 ComfyUI、Python、Git 或 Node.js 亦可 100% 零配置开箱体验**。
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 一、给朋友的零门槛安装与一键更新指南(无需装 Node.js / Git / Python)
|
|
12
|
+
|
|
13
|
+
> **数据永久保留承诺**:所有历史画廊成图、自定义模板、仿真显卡设置及下载的底座/LoRA 模型均独立保存在 `~/.dsh/storages/comfy-scratch-shared`(或您接入的本地 ComfyUI 目录)中,**更新或重装插件绝不会丢失任何作品与配置**。
|
|
14
|
+
|
|
15
|
+
### 方式 1:在 DSH NEXT 软件内一键安装 & 更新(最推荐)
|
|
16
|
+
|
|
17
|
+
1. **通过 GitHub Release 预编译包直链或本地 `.tgz` 一键装(首发立即可用)**
|
|
18
|
+
- 打开 **`DSH NEXT → 设置 → 插件 → 安装插件`**,粘贴固定最新版直链:
|
|
19
|
+
```text
|
|
20
|
+
https://github.com/KatouAkane/comfy-scratch-studio/releases/latest/download/dsh-plugin-comfy-scratch.tgz
|
|
21
|
+
```
|
|
22
|
+
- 或在 [Releases 页面](https://github.com/KatouAkane/comfy-scratch-studio/releases/latest) 下载 `dsh-plugin-comfy-scratch-0.2.0.tgz`,在 DSH 插件页选择本地文件安装(更新时重新粘贴同一条直链或选新版 `.tgz` 即可覆盖升级)。
|
|
23
|
+
2. **通过 `npm` 包名直装(已同步发布 npm 后可用,国内自动走 `npmmirror` 镜像免代理)**
|
|
24
|
+
- 打开 **`DSH NEXT → 设置 → 插件 → 安装插件`**,直接输入包名:
|
|
25
|
+
```text
|
|
26
|
+
dsh-plugin-comfy-scratch
|
|
27
|
+
```
|
|
28
|
+
- **原生一键更新**:打开 **`DSH NEXT → 设置 → 插件 → 已安装 → dsh-plugin-comfy-scratch`**,在「版本」区域直接点击 **「更新」** 即可一键升级(若网络异常会自动回滚旧版)。
|
|
29
|
+
3. **通过 DSH「发现(自定义插件市场)」卡片浏览安装**
|
|
30
|
+
- 已同步 npm 后,可在 **`DSH NEXT → 插件 → 发现 → 管理索引源`** 中添加 `https://github.com/KatouAkane/comfy-scratch-studio/releases/latest/download/dsh-index.json` 卡片式浏览安装。
|
|
31
|
+
|
|
32
|
+
### 方式 2:纯离线双击安装 / 覆盖更新包(适合无代理或离线分享)
|
|
33
|
+
|
|
34
|
+
1. 在 GitHub Releases 下载 **`dsh-plugin-comfy-scratch-v0.2.0-win-installer.zip`** 并完整解压到任意文件夹;
|
|
35
|
+
2. 先完全退出 **DSH NEXT**(含右下角系统托盘图标);
|
|
36
|
+
3. 双击运行 **`一键安装或更新到DSH.bat`**(自动调用朋友电脑 `DSH NEXT` 自带的内置运行时并创建 SHA-256 配置快照备份);
|
|
37
|
+
4. 重新打开 **DSH NEXT**,在右侧会话伴随栏或左侧导航栏点击 **「Comfy 积木工坊」** 即可使用!
|
|
38
|
+
- **覆盖更新**:日后下载新版 `.zip` 解压后再次双击 `一键安装或更新到DSH.bat` 即可无损升级;
|
|
39
|
+
- **无损卸载**:退出 DSH NEXT 后双击 `一键卸载回滚.bat`(或在 DSH 插件设置页直接卸载)。
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 二、核心能力一览
|
|
44
|
+
|
|
45
|
+
1. **七色类 Scratch 积木画布 + 双架构磁吸防呆 + 持久化模板库**
|
|
46
|
+
- Krea 2 Turbo 与 Illustrious 跨架构错接时自动拒绝吸附并高亮提示;支持一键保存自定义模板卡片(持久化落盘 `templates/custom-presets.json`),内置撤销/重做与「自动直出 ↔ 先审积木再跑」门禁切换。
|
|
47
|
+
2. **RX 9070 XT 16G 三条实测崩溃红线静态拦截 + GGUF 低显存量化推理 + 野生工作流体检**
|
|
48
|
+
- 前置 AST + 后置 `ComfyPromptGraph` 双重锁死:`VAEDecodeTiled` 强制 `512/64`、保底/中档强制单遍 KSampler + 纯像素放大、Krea 2 大遮罩重绘阻断 `CFG > 1.0`;
|
|
49
|
+
- 内置 `.gguf` v2/v3 二进制魔数校验,6G/8G 显卡可流畅运行 `Krea 2 Turbo (GGUF Q4_K_M)`;支持拖入社区野生 `.png` / `.json` 工作流自动体检清洗为安全积木流。
|
|
50
|
+
3. **电脑解放套件 + 存量整合包零配置互通**
|
|
51
|
+
- **0 驻留按需冷启**、**10 分钟静默死锁 8 秒硬重启 Watchdog(严禁同 Seed 重排)**、**Auto-Purge 自动释放显存**与 **`BelowNormal` 闲时错峰队列**;
|
|
52
|
+
- 顶栏「环境/底座」支持一键扫描对接本机已有**秋叶绘世包 / 便携版 / Desktop / Stability Matrix**(和平附着运行中的绘世启动器 `:8188`),或在裸机上基于 DSH 内置环境一键部署并断点续传下载精选 `.safetensors` 底座。
|
|
53
|
+
4. **持久化作品画廊 + 舞台 A/B 卷帘对比 + 非破坏性 RGBA 手绘局部重绘板**
|
|
54
|
+
- 每次出图自动固化入画廊(支持星标免淘汰、一键恢复原积木配方与锁定 Seed、一键送入图生图/ControlNet/局部重绘);舞台及独立预览窗内置零形变 A/B 卷帘拉杆对比,手绘遮罩板保留 100% 原始 RGB 字节杜绝局部微调黑边。
|
|
55
|
+
5. **串行安全 Seed N 连抽(2/4/8)+ X/Y 参数对比网格工坊 + 零原生依赖 PNG 海报合成**
|
|
56
|
+
- 严守 `batch_size = 1, concurrency = 1` 逐张串行调度与同底座温热续跑,支持步数、CFG、重绘幅度、LoRA/ControlNet 强度、提示词变体与三档画幅对比,纯 Node 内置 `zlib` 自动拼合带表头总览海报并永久归档画廊。
|
|
57
|
+
6. **多源搜 LoRA + 云端 `ai-toolkit` 优先炼丹闭环(强制人工审批)**
|
|
58
|
+
- 海外源 1.5s 代理前置探测提醒与国内源(ModelScope / LiblibAI)一键切换,严格校验 `.safetensors` 二进制头;云端炼丹审批单明示费用与本机 8.7GB 页文件风险预检。
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 三、DeepSeek 本体 11 个官方 Agent Tools 一览
|
|
63
|
+
|
|
64
|
+
| 工具名 | 典型对话示例 | 安全门禁与行为 |
|
|
65
|
+
| :--- | :--- | :--- |
|
|
66
|
+
| `comfy_workspace_get` | 「查看我当前的积木画布配置和显卡档位」 | 只读返回当前架构、档位、积木连线与红线体检摘要 |
|
|
67
|
+
| `comfy_workspace_patch` | 「切到二次元壁纸模板,挂草图开 Canny 线稿控图」 | 实时编辑画布积木,自动拦截跨架构或三条崩溃红线冲突 |
|
|
68
|
+
| `comfy_preset_manage` | 「把当前底座和 LoRA 存成自定义模板『雨夜电影光』」 | 管理持久化模板库,应用模板时强制保持审阅态不静默出图 |
|
|
69
|
+
| `comfy_generate_submit` | 「按当前画布生成一张图」 | `review_first` 下生成待确认卡片;确认后实时推送去噪帧 |
|
|
70
|
+
| `comfy_queue_control` | 「释放显存 / 开启离开电脑闲时队列」 | 查询/取消作业、触发 `POST /free` 回收显存、死锁换新 Seed 重试 |
|
|
71
|
+
| `comfy_lora_search` | 「在国内源搜适配 Krea 2 的胶片光影 LoRA」 | 返回封面与触发词候选,**严禁静默下载**,须人工确认后落盘 |
|
|
72
|
+
| `comfy_train_prepare` | 「准备一套 Krea 2 角色 LoRA 云端炼丹审批单」 | 生成费用与显存/页文件风险审批单,不受自动模式豁免 |
|
|
73
|
+
| `comfy_env_setup` | 「体检本机显卡和存量 ComfyUI 整合包」 | 诊断硬件/盘符/白名单扩展节点并推送人工确认单 |
|
|
74
|
+
| `comfy_workflow_import` | 「体检并清洗这张社区 PNG 里内嵌的节点工作流」 | 解析 `.png`/`.json` 元数据并自动修复高危红线参数 |
|
|
75
|
+
| `comfy_gallery_manage` | 「列出我星标的画廊作品并恢复第一张的配方」 | 检索/星标/删除画廊作品或恢复配方、送入参考图(不静默出图) |
|
|
76
|
+
| `comfy_batch_sweep` | 「帮我规划一组 8/12/16 步的 X/Y 对比网格」 | `review_first` 下仅创建 `0` 入队待确认草案,串行完赛后合成海报 |
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 四、开发者本地构建、挂载与单一硬门禁
|
|
81
|
+
|
|
82
|
+
在插件仓库根目录下执行:
|
|
83
|
+
|
|
84
|
+
```powershell
|
|
85
|
+
# 1. 全量单一硬门禁(tsc + 全套单测 + 双面打包 + 沙箱零泄漏校验 + 后构建回归)
|
|
86
|
+
npm run check
|
|
87
|
+
|
|
88
|
+
# 2. 生成全套发行产物(release-artifacts/: 预编译 .tgz + dsh-index.json + 双击安装包 .zip + SHA256SUMS.txt)
|
|
89
|
+
npm run release:pack
|
|
90
|
+
|
|
91
|
+
# 3. 开发者本地挂载 / 快速热同步 / 无损卸载(操作前请先退出 DSH NEXT)
|
|
92
|
+
npm run dsh:status
|
|
93
|
+
npm run dsh:mount
|
|
94
|
+
npm run dsh:fast-sync
|
|
95
|
+
npm run dsh:unmount
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## 五、使用许可协议(非商业授权 · 严禁倒卖)
|
|
99
|
+
|
|
100
|
+
本项目采用 **[PolyForm Noncommercial License 1.0.0](./LICENSE)**(`SPDX: PolyForm-Noncommercial-1.0.0`)非商业源码可用协议授权:允许个人与非商业机构免费下载、使用、修改与免费分享,未经作者书面许可严禁任何商业售卖、付费捆绑或商业服务变现。
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { ComfyAgentToolName } from '../shared/index.js';
|
|
3
|
+
export { COMFY_SCRATCH_BASE_CSS } from './styles.js';
|
|
4
|
+
export * from './store/index.js';
|
|
5
|
+
export * from './scratch/index.js';
|
|
6
|
+
export * from './stage/index.js';
|
|
7
|
+
export * from './drawers/index.js';
|
|
8
|
+
export * from './inpaint/index.js';
|
|
9
|
+
export declare const name = "dsh-plugin-comfy-scratch";
|
|
10
|
+
export declare const inject: readonly ["slots", "locale", "layout", "sidebarRight", "sidebarRightTabs"];
|
|
11
|
+
export declare const COMFY_TOOLVIEW_KEYS: readonly ComfyAgentToolName[];
|
|
12
|
+
export declare function apply(ctx: Context): void;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|