@ninkch/dsh-infinite-canvas 0.17.15 → 0.17.16
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/client.js +13 -3
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -247,7 +247,7 @@ window.__ModuleLoader__.load({
|
|
|
247
247
|
'delProjectWarn': '将删除该项目及其全部资产(共 {n} 个),且无法恢复。请输入项目名以确认:',
|
|
248
248
|
'delProjectInput': '项目名',
|
|
249
249
|
'imgMode': '参考图模式',
|
|
250
|
-
'modeGenerations': '
|
|
250
|
+
'modeGenerations': '生图 /images/generations(支持多参考图)',
|
|
251
251
|
'modeEdits': '参考图编辑 /images/edits(多参考图上传)',
|
|
252
252
|
'catMismatch': '提示:资产分类为「{a}」,端口期望「{b}」,已保留连接',
|
|
253
253
|
'nStoryboard': '分镜表',
|
|
@@ -651,7 +651,7 @@ window.__ModuleLoader__.load({
|
|
|
651
651
|
'delProjectWarn': 'This deletes the project and all its assets ({n}). Type the project name to confirm:',
|
|
652
652
|
'delProjectInput': 'Project name',
|
|
653
653
|
'imgMode': 'Reference mode',
|
|
654
|
-
'modeGenerations': '
|
|
654
|
+
'modeGenerations': 'image /images/generations (with references)',
|
|
655
655
|
'modeEdits': 'image edit /images/edits (multi-reference upload)',
|
|
656
656
|
'catMismatch': 'Note: asset category is "{a}", port expects "{b}". Connected anyway.',
|
|
657
657
|
'nStoryboard': 'Storyboard',
|
|
@@ -2086,7 +2086,8 @@ window.__ModuleLoader__.load({
|
|
|
2086
2086
|
fd.append('prompt', prompt);
|
|
2087
2087
|
fd.append('n', '1');
|
|
2088
2088
|
if (s.size) fd.append('size', s.size);
|
|
2089
|
-
|
|
2089
|
+
fd.append('watermark', 'false'); // 稳定默认:去水印优先(与 generations 路径一致)
|
|
2090
|
+
refs.forEach((b, i) => fd.append('image[]', b.blob || b, 'ref-' + i + '.png'));
|
|
2090
2091
|
// FormData 经 Response 序列化为 multipart 字节(含 boundary)→ base64 经代理原样转发
|
|
2091
2092
|
const serialized = new Response(fd);
|
|
2092
2093
|
const bodyRaw = arrayBufferToBase64(await serialized.arrayBuffer());
|
|
@@ -2107,7 +2108,16 @@ window.__ModuleLoader__.load({
|
|
|
2107
2108
|
const body = {
|
|
2108
2109
|
...(s.model ? { model: s.model } : {}),
|
|
2109
2110
|
prompt, n: 1,
|
|
2111
|
+
// 稳定默认(总是发送):去水印优先——多数图片厂商该参数默认 true 会加水印;扩展参数可覆盖
|
|
2112
|
+
watermark: false,
|
|
2110
2113
|
};
|
|
2114
|
+
// 多参考生图:generations 模式同样携带参考图(主流约定 image 数组 + data:URL,按 collectRefs 顺序对应提示词里的 [图N])。
|
|
2115
|
+
// 厂商不支持该字段时会明确报错——此时换 edits 模式或在扩展参数里调整字段名。
|
|
2116
|
+
if (refs.length) {
|
|
2117
|
+
const imgs = [];
|
|
2118
|
+
for (const b of refs) imgs.push(await blobToDataUrlScaled(b.blob || b));
|
|
2119
|
+
body.image = imgs;
|
|
2120
|
+
}
|
|
2111
2121
|
// 响应格式:留空 = 用 API 默认(响应解析同时支持 b64_json 与 url)
|
|
2112
2122
|
if (String(s.responseFormat || '').trim()) body.response_format = String(s.responseFormat).trim();
|
|
2113
2123
|
// 尺寸:留空 = 按节点上的「清晰度 × 比例」计算;填了就用你配置的值
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ninkch/dsh-infinite-canvas",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.16",
|
|
4
4
|
"description": "Node-based short-drama studio for DeepSeek Harness: script → storyboard → assets → shots → voiced, subtitled final cut on an infinite canvas.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|