Fix image upload

This commit is contained in:
space-nuko
2023-05-17 20:33:59 -05:00
parent 7f3e2f8b4d
commit 1408d12575
4 changed files with 21 additions and 360 deletions

View File

@@ -48,16 +48,12 @@ export default class ComfyPickImageNode extends ComfyGraphNode {
this._path = comfyFileToAnnotatedFilepath(this._image.comfyUIFile);
this.filepathWidget.value = this._image.comfyUIFile.filename
this.folderWidget.value = this._image.comfyUIFile.type
this.widthWidget.value = this._image.width
this.heightWidget.value = this._image.height
}
else {
this._image = null;
this._path = null;
this.filepathWidget.value = "(None)"
this.folderWidget.value = ""
this.widthWidget.value = 0
this.heightWidget.value = 0
}
console.log("SET", value, this._image, this._path)
}
@@ -72,12 +68,18 @@ export default class ComfyPickImageNode extends ComfyGraphNode {
this.setOutputData(1, null)
this.setOutputData(2, 0)
this.setOutputData(3, 0)
this.widthWidget.value = 0
this.heightWidget.value = 0
}
else {
this.setOutputData(0, this._image);
this.setOutputData(1, this._path);
this.setOutputData(2, this._image.width);
this.setOutputData(3, this._image.height);
this.widthWidget.value = this._image.width
this.heightWidget.value = this._image.height
}
}
}