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
022033a0
Commit
022033a0
authored
Nov 23, 2023
by
comfyanonymous
Browse files
Fix SaveAnimatedWEBP not working when metadata is disabled.
parent
4d2437e6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
comfy_extras/nodes_images.py
comfy_extras/nodes_images.py
+2
-3
No files found.
comfy_extras/nodes_images.py
View file @
022033a0
...
@@ -75,7 +75,7 @@ class SaveAnimatedWEBP:
...
@@ -75,7 +75,7 @@ class SaveAnimatedWEBP:
CATEGORY
=
"_for_testing"
CATEGORY
=
"_for_testing"
def
save_images
(
self
,
images
,
fps
,
filename_prefix
,
lossless
,
quality
,
method
,
num_frames
=
0
,
prompt
=
None
,
extra_pnginfo
=
None
):
def
save_images
(
self
,
images
,
fps
,
filename_prefix
,
lossless
,
quality
,
method
,
num_frames
=
0
,
prompt
=
None
,
extra_pnginfo
=
None
):
method
=
self
.
methods
.
get
(
method
,
"aoeu"
)
method
=
self
.
methods
.
get
(
method
)
filename_prefix
+=
self
.
prefix_append
filename_prefix
+=
self
.
prefix_append
full_output_folder
,
filename
,
counter
,
subfolder
,
filename_prefix
=
folder_paths
.
get_save_image_path
(
filename_prefix
,
self
.
output_dir
,
images
[
0
].
shape
[
1
],
images
[
0
].
shape
[
0
])
full_output_folder
,
filename
,
counter
,
subfolder
,
filename_prefix
=
folder_paths
.
get_save_image_path
(
filename_prefix
,
self
.
output_dir
,
images
[
0
].
shape
[
1
],
images
[
0
].
shape
[
0
])
results
=
list
()
results
=
list
()
...
@@ -85,9 +85,8 @@ class SaveAnimatedWEBP:
...
@@ -85,9 +85,8 @@ class SaveAnimatedWEBP:
img
=
Image
.
fromarray
(
np
.
clip
(
i
,
0
,
255
).
astype
(
np
.
uint8
))
img
=
Image
.
fromarray
(
np
.
clip
(
i
,
0
,
255
).
astype
(
np
.
uint8
))
pil_images
.
append
(
img
)
pil_images
.
append
(
img
)
metadata
=
None
if
not
args
.
disable_metadata
:
metadata
=
pil_images
[
0
].
getexif
()
metadata
=
pil_images
[
0
].
getexif
()
if
not
args
.
disable_metadata
:
if
prompt
is
not
None
:
if
prompt
is
not
None
:
metadata
[
0x0110
]
=
"prompt:{}"
.
format
(
json
.
dumps
(
prompt
))
metadata
[
0x0110
]
=
"prompt:{}"
.
format
(
json
.
dumps
(
prompt
))
if
extra_pnginfo
is
not
None
:
if
extra_pnginfo
is
not
None
:
...
...
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