|
|
@ -836,7 +836,7 @@ export class ComfyApp { |
|
|
|
LGraphCanvas.prototype.drawNodeShape = function (node, ctx, size, fgcolor, bgcolor, selected, mouse_over) { |
|
|
|
LGraphCanvas.prototype.drawNodeShape = function (node, ctx, size, fgcolor, bgcolor, selected, mouse_over) { |
|
|
|
const res = origDrawNodeShape.apply(this, arguments); |
|
|
|
const res = origDrawNodeShape.apply(this, arguments); |
|
|
|
|
|
|
|
|
|
|
|
const nodeErrors = self.lastPromptError?.node_errors[node.id]; |
|
|
|
const nodeErrors = self.lastNodeErrors?.[node.id]; |
|
|
|
|
|
|
|
|
|
|
|
let color = null; |
|
|
|
let color = null; |
|
|
|
let lineWidth = 1; |
|
|
|
let lineWidth = 1; |
|
|
@ -845,7 +845,7 @@ export class ComfyApp { |
|
|
|
} else if (self.dragOverNode && node.id === self.dragOverNode.id) { |
|
|
|
} else if (self.dragOverNode && node.id === self.dragOverNode.id) { |
|
|
|
color = "dodgerblue"; |
|
|
|
color = "dodgerblue"; |
|
|
|
} |
|
|
|
} |
|
|
|
else if (self.lastPromptError != null && nodeErrors?.errors) { |
|
|
|
else if (nodeErrors?.errors) { |
|
|
|
color = "red"; |
|
|
|
color = "red"; |
|
|
|
lineWidth = 2; |
|
|
|
lineWidth = 2; |
|
|
|
} |
|
|
|
} |
|
|
@ -1413,7 +1413,7 @@ export class ComfyApp { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.#processingQueue = true; |
|
|
|
this.#processingQueue = true; |
|
|
|
this.lastPromptError = null; |
|
|
|
this.lastNodeErrors = null; |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
while (this.#queueItems.length) { |
|
|
|
while (this.#queueItems.length) { |
|
|
@ -1423,12 +1423,16 @@ export class ComfyApp { |
|
|
|
const p = await this.graphToPrompt(); |
|
|
|
const p = await this.graphToPrompt(); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
await api.queuePrompt(number, p); |
|
|
|
const res = await api.queuePrompt(number, p); |
|
|
|
|
|
|
|
this.lastNodeErrors = res.node_errors; |
|
|
|
|
|
|
|
if (this.lastNodeErrors.length > 0) { |
|
|
|
|
|
|
|
this.canvas.draw(true, true); |
|
|
|
|
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
} catch (error) { |
|
|
|
const formattedError = this.#formatPromptError(error) |
|
|
|
const formattedError = this.#formatPromptError(error) |
|
|
|
this.ui.dialog.show(formattedError); |
|
|
|
this.ui.dialog.show(formattedError); |
|
|
|
if (error.response) { |
|
|
|
if (error.response) { |
|
|
|
this.lastPromptError = error.response; |
|
|
|
this.lastNodeErrors = error.response.node_errors; |
|
|
|
this.canvas.draw(true, true); |
|
|
|
this.canvas.draw(true, true); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
@ -1534,7 +1538,7 @@ export class ComfyApp { |
|
|
|
clean() { |
|
|
|
clean() { |
|
|
|
this.nodeOutputs = {}; |
|
|
|
this.nodeOutputs = {}; |
|
|
|
this.nodePreviewImages = {} |
|
|
|
this.nodePreviewImages = {} |
|
|
|
this.lastPromptError = null; |
|
|
|
this.lastNodeErrors = null; |
|
|
|
this.lastExecutionError = null; |
|
|
|
this.lastExecutionError = null; |
|
|
|
this.runningNodeId = null; |
|
|
|
this.runningNodeId = null; |
|
|
|
} |
|
|
|
} |
|
|
|