koishi-plugin-p-draw 1.5.2 → 1.5.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/index.js +6 -9
- package/package.json +1 -1
- package/readme.md +1 -1
package/index.js
CHANGED
|
@@ -467,8 +467,9 @@ exports.apply = async function apply(ctx, cfg) {
|
|
|
467
467
|
return `已扣除 ${totalPrice} P 点,当前模型:${unetName},--seed=${seeds.join(',')}`
|
|
468
468
|
}
|
|
469
469
|
|
|
470
|
-
function buildGenerationReply(session, { successCount, count, failures, notes = [] }) {
|
|
470
|
+
function buildGenerationReply(session, { successCount, count, failures, notes = [], chargeNotice = '' }) {
|
|
471
471
|
const reply = []
|
|
472
|
+
if (chargeNotice) reply.push(chargeNotice)
|
|
472
473
|
if (notes.length) reply.push(notes.join('\n'))
|
|
473
474
|
if (failures.length) reply.push(session.text('.batch-partial', [successCount, count, failures.length, failures.join(';')]))
|
|
474
475
|
return reply.filter(Boolean).join('\n')
|
|
@@ -1470,9 +1471,7 @@ exports.apply = async function apply(ctx, cfg) {
|
|
|
1470
1471
|
unetName: unet,
|
|
1471
1472
|
seeds,
|
|
1472
1473
|
})
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
if (!allOutputs.length) {
|
|
1474
|
+
if (!allOutputs.length) {
|
|
1476
1475
|
if (cfg.outputLogs) logger.warn(`多人生成全部失败(${USERID}),已按张退款`)
|
|
1477
1476
|
return session.text('.generate-failed', ['全部失败(已按张退款)'])
|
|
1478
1477
|
}
|
|
@@ -1482,7 +1481,7 @@ exports.apply = async function apply(ctx, cfg) {
|
|
|
1482
1481
|
// 发图:合并转发,不引用原指令
|
|
1483
1482
|
await sendImagesAsForward(session, forwardOutputs)
|
|
1484
1483
|
|
|
1485
|
-
return buildGenerationReply(session, { successCount, count, failures, notes })
|
|
1484
|
+
return buildGenerationReply(session, { successCount, count, failures, notes, chargeNotice })
|
|
1486
1485
|
}
|
|
1487
1486
|
|
|
1488
1487
|
// ---------------- 权限 ----------------
|
|
@@ -2000,9 +1999,7 @@ exports.apply = async function apply(ctx, cfg) {
|
|
|
2000
1999
|
unetName: unet,
|
|
2001
2000
|
seeds,
|
|
2002
2001
|
})
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
if (!allOutputs.length) {
|
|
2002
|
+
if (!allOutputs.length) {
|
|
2006
2003
|
if (cfg.outputLogs) logger.warn(`生成全部失败(${USERID}),已按张退款`)
|
|
2007
2004
|
return session.text('.generate-failed', ['全部失败(已按张退款)'])
|
|
2008
2005
|
}
|
|
@@ -2012,7 +2009,7 @@ exports.apply = async function apply(ctx, cfg) {
|
|
|
2012
2009
|
// 发图:合并转发,不引用原指令
|
|
2013
2010
|
await sendImagesAsForward(session, forwardOutputs)
|
|
2014
2011
|
|
|
2015
|
-
return buildGenerationReply(session, { successCount, count, failures })
|
|
2012
|
+
return buildGenerationReply(session, { successCount, count, failures, chargeNotice })
|
|
2016
2013
|
}
|
|
2017
2014
|
// ---------------- 提示词优化券交互式确认 ----------------
|
|
2018
2015
|
// 仅全局优化关闭 + 非管理员 + 已配置 LLM(tokenOpt 分支)时进入。
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -20,7 +20,7 @@ p点-绘图插件,连接本地 ComfyUI 生图,参考 AstrBot 的 [anima 绘
|
|
|
20
20
|
- 生成队列(逐张顺序执行,防止争抢 GPU)。
|
|
21
21
|
- `p-draw 状态` 查看 ComfyUI 连接状态与模型可用性。
|
|
22
22
|
- `p-draw help`(或 `帮助`)查看全部指令帮助,包含生成 / 多人 / 批量张数 / 尺寸 / 画师组 / 状态等。
|
|
23
|
-
- 发图时会以合并转发发送,每张图片后附对应的 Positive / Negative
|
|
23
|
+
- 发图时会以合并转发发送,每张图片后附对应的 Positive / Negative 提示词;生成完成消息会显示实际模型和 seed(如 `已扣除 750 P 点,当前模型:animagine-xl-3.1.safetensors,--seed=123456`)。
|
|
24
24
|
|
|
25
25
|
## 安装
|
|
26
26
|
|