[Refactor] Clean up image nodes, add TS types (#1927)

* [Refactor] Clean up image nodes, add TS types

Should be no functional changes.

* Remove unused code
This commit is contained in:
filtered
2024-12-18 08:09:24 +11:00
committed by GitHub
parent 2b4ac582d4
commit cb3e4b5ed7
5 changed files with 342 additions and 317 deletions

View File

@@ -508,7 +508,6 @@ export const ComfyWidgets: Record<string, ComfyWidgetConstructor> = {
function showImage(name) {
const img = new Image()
img.onload = () => {
// @ts-expect-error
node.imgs = [img]
app.graph.setDirtyCanvas(true)
}
@@ -521,7 +520,6 @@ export const ComfyWidgets: Record<string, ComfyWidgetConstructor> = {
img.src = api.apiURL(
`/view?filename=${encodeURIComponent(name)}&type=input&subfolder=${subfolder}${app.getPreviewFormatParam()}${app.getRandParam()}`
)
// @ts-expect-error
node.setSizeForImage?.()
}