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
e85fcb82
Commit
e85fcb82
authored
Mar 20, 2023
by
comfyanonymous
Browse files
Small fix.
parent
0abe001e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
nodes.py
nodes.py
+5
-5
web/scripts/app.js
web/scripts/app.js
+1
-1
No files found.
nodes.py
View file @
e85fcb82
...
...
@@ -744,16 +744,16 @@ class SaveImage:
except
:
digits
=
0
return
(
digits
,
prefix
)
subfolder
=
os
.
path
.
dirname
(
os
.
path
.
normpath
(
filename_prefix
))
filename
=
os
.
path
.
basename
(
os
.
path
.
normpath
(
filename_prefix
))
full_output_folder
=
os
.
path
.
join
(
self
.
output_dir
,
subfolder
)
full_output_folder
=
os
.
path
.
join
(
self
.
output_dir
,
subfolder
)
if
os
.
path
.
commonpath
((
self
.
output_dir
,
os
.
path
.
realpath
(
full_output_folder
)))
!=
self
.
output_dir
:
print
(
"Saving image outside the output folder is not allowed."
)
return
return
{}
try
:
counter
=
max
(
filter
(
lambda
a
:
a
[
1
][:
-
1
]
==
filename
and
a
[
1
][
-
1
]
==
"_"
,
map
(
map_filename
,
os
.
listdir
(
full_output_folder
))))[
0
]
+
1
except
ValueError
:
...
...
@@ -784,7 +784,7 @@ class SaveImage:
"type"
:
self
.
type
});
counter
+=
1
return
{
"ui"
:
{
"images"
:
results
}
}
class
PreviewImage
(
SaveImage
):
...
...
web/scripts/app.js
View file @
e85fcb82
...
...
@@ -109,7 +109,7 @@ class ComfyApp {
return
new
Promise
((
r
)
=>
{
const
img
=
new
Image
();
img
.
onload
=
()
=>
r
(
img
);
img
.
onerror
=
()
=>
r
(
null
);
img
.
onerror
=
()
=>
r
(
null
);
img
.
src
=
"
/view?
"
+
new
URLSearchParams
(
src
).
toString
();
});
})
...
...
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