This commit is contained in:
comfyanonymous
2023-03-20 14:29:45 -04:00
4 changed files with 39 additions and 16 deletions

View File

@@ -109,8 +109,8 @@ class ComfyApp {
return new Promise((r) => {
const img = new Image();
img.onload = () => r(img);
img.onerror = () => r(null);
img.src = "/view/" + src;
img.onerror = () => r(null);
img.src = "/view?" + new URLSearchParams(src).toString();
});
})
).then((imgs) => {

View File

@@ -141,7 +141,7 @@ export const ComfyWidgets = {
node.imgs = [img];
app.graph.setDirtyCanvas(true);
};
img.src = `/view/${name}?type=input`;
img.src = `/view?filename=${name}&type=input`;
}
// Add our own callback to the combo widget to render an image when it changes