Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
88e2c974
"git@developer.sourcefind.cn:chenpangpang/ComfyUI.git" did not exist on "c6951548cfec64c28082e6560c69c59e32729c9c"
Commit
88e2c974
authored
Dec 02, 2023
by
comfyanonymous
Browse files
Merge branch 'image-cache' of
https://github.com/jn-jairo/ComfyUI
parents
28220fa8
c92f3dca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
web/extensions/core/maskeditor.js
web/extensions/core/maskeditor.js
+2
-2
web/scripts/app.js
web/scripts/app.js
+5
-1
web/scripts/widgets.js
web/scripts/widgets.js
+1
-1
No files found.
web/extensions/core/maskeditor.js
View file @
88e2c974
...
...
@@ -42,7 +42,7 @@ async function uploadMask(filepath, formData) {
});
ComfyApp
.
clipspace
.
imgs
[
ComfyApp
.
clipspace
[
'
selectedIndex
'
]]
=
new
Image
();
ComfyApp
.
clipspace
.
imgs
[
ComfyApp
.
clipspace
[
'
selectedIndex
'
]].
src
=
api
.
apiURL
(
"
/view?
"
+
new
URLSearchParams
(
filepath
).
toString
()
+
app
.
getPreviewFormatParam
());
ComfyApp
.
clipspace
.
imgs
[
ComfyApp
.
clipspace
[
'
selectedIndex
'
]].
src
=
api
.
apiURL
(
"
/view?
"
+
new
URLSearchParams
(
filepath
).
toString
()
+
app
.
getPreviewFormatParam
()
+
app
.
getRandParam
()
);
if
(
ComfyApp
.
clipspace
.
images
)
ComfyApp
.
clipspace
.
images
[
ComfyApp
.
clipspace
[
'
selectedIndex
'
]]
=
filepath
;
...
...
@@ -657,4 +657,4 @@ app.registerExtension({
const
context_predicate
=
()
=>
ComfyApp
.
clipspace
&&
ComfyApp
.
clipspace
.
imgs
&&
ComfyApp
.
clipspace
.
imgs
.
length
>
0
ClipspaceDialog
.
registerButton
(
"
MaskEditor
"
,
context_predicate
,
ComfyApp
.
open_maskeditor
);
}
});
\ No newline at end of file
});
web/scripts/app.js
View file @
88e2c974
...
...
@@ -86,6 +86,10 @@ export class ComfyApp {
return
""
;
}
getRandParam
()
{
return
"
&rand=
"
+
Math
.
random
();
}
static
isImageNode
(
node
)
{
return
node
.
imgs
||
(
node
&&
node
.
widgets
&&
node
.
widgets
.
findIndex
(
obj
=>
obj
.
name
===
'
image
'
)
>=
0
);
}
...
...
@@ -437,7 +441,7 @@ export class ComfyApp {
return
api
.
apiURL
(
"
/view?
"
+
new
URLSearchParams
(
params
).
toString
()
+
(
this
.
animatedImages
?
""
:
app
.
getPreviewFormatParam
())
(
this
.
animatedImages
?
""
:
app
.
getPreviewFormatParam
())
+
app
.
getRandParam
()
);
})
);
...
...
web/scripts/widgets.js
View file @
88e2c974
...
...
@@ -310,7 +310,7 @@ export const ComfyWidgets = {
subfolder
=
name
.
substring
(
0
,
folder_separator
);
name
=
name
.
substring
(
folder_separator
+
1
);
}
img
.
src
=
api
.
apiURL
(
`/view?filename=
${
encodeURIComponent
(
name
)}
&type=input&subfolder=
${
subfolder
}${
app
.
getPreviewFormatParam
()}
`
);
img
.
src
=
api
.
apiURL
(
`/view?filename=
${
encodeURIComponent
(
name
)}
&type=input&subfolder=
${
subfolder
}${
app
.
getPreviewFormatParam
()}
${
app
.
getRandParam
()}
`
);
node
.
setSizeForImage
?.();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment