koishi-plugin-p-draw 1.2.3 → 1.2.5
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 +8 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -578,8 +578,8 @@ function animaStyleI2IWorkflow(cfg, prompt, negativePrompt, width, height, steps
|
|
|
578
578
|
'11': { class_type: 'CLIPTextEncode', inputs: { text: prompt, clip: ['45', 0] } },
|
|
579
579
|
'12': { class_type: 'CLIPTextEncode', inputs: { text: negativePrompt, clip: ['45', 0] } },
|
|
580
580
|
'70': { class_type: 'Canny', inputs: { image: ['13', 0], low_threshold: 0.4, high_threshold: 0.8 } },
|
|
581
|
-
'71': { class_type: 'ControlNetLoader', inputs: {
|
|
582
|
-
'72': { class_type: 'ControlNetApplyAdvanced', inputs: { positive: ['11', 0], negative: ['12', 0], control_net: ['71', 0], image: ['70', 0], strength: controlNetStrength, start_percent: 0, end_percent: 1 } },
|
|
581
|
+
'71': { class_type: 'ControlNetLoader', inputs: { control_net_name: controlNetModel } },
|
|
582
|
+
'72': { class_type: 'ControlNetApplyAdvanced', inputs: { positive: ['11', 0], negative: ['12', 0], control_net: ['71', 0], image: ['70', 0], vae: ['15', 0], strength: controlNetStrength, start_percent: 0, end_percent: 1 } },
|
|
583
583
|
'19': {
|
|
584
584
|
class_type: 'KSampler',
|
|
585
585
|
inputs: {
|
|
@@ -1643,7 +1643,12 @@ exports.apply = async function apply(ctx, cfg) {
|
|
|
1643
1643
|
|
|
1644
1644
|
const status = history.status || {}
|
|
1645
1645
|
if (status.status_str && status.status_str !== 'success') {
|
|
1646
|
-
|
|
1646
|
+
const execErr = status.messages && status.messages.find((m) => Array.isArray(m) && m[0] === 'execution_error' && m[1])
|
|
1647
|
+
const errData = execErr && execErr[1]
|
|
1648
|
+
const errText = errData
|
|
1649
|
+
? `[${errData.node_id} ${errData.node_type}] ${errData.exception_type || ''} ${errData.exception_message || ''}`.trim()
|
|
1650
|
+
: ''
|
|
1651
|
+
return { ok: false, message: `ComfyUI 工作流执行失败:${JSON.stringify(status).slice(0, 400)}${errText ? `\n异常:${errText}` : ''}` }
|
|
1647
1652
|
}
|
|
1648
1653
|
|
|
1649
1654
|
const images = outputImages(history)
|