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
18379dea
Commit
18379dea
authored
Aug 29, 2023
by
Chris
Browse files
check for text attr and save
parent
edcff9ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
server.py
server.py
+3
-2
No files found.
server.py
View file @
18379dea
...
@@ -235,8 +235,9 @@ class PromptServer():
...
@@ -235,8 +235,9 @@ class PromptServer():
if
os
.
path
.
isfile
(
file
):
if
os
.
path
.
isfile
(
file
):
with
Image
.
open
(
file
)
as
original_pil
:
with
Image
.
open
(
file
)
as
original_pil
:
metadata
=
PngInfo
()
metadata
=
PngInfo
()
for
key
in
original_pil
.
text
:
if
hasattr
(
original_pil
,
'text'
):
metadata
.
add_text
(
key
,
original_pil
.
text
[
key
])
for
key
in
original_pil
.
text
:
metadata
.
add_text
(
key
,
original_pil
.
text
[
key
])
original_pil
=
original_pil
.
convert
(
'RGBA'
)
original_pil
=
original_pil
.
convert
(
'RGBA'
)
mask_pil
=
Image
.
open
(
image
.
file
).
convert
(
'RGBA'
)
mask_pil
=
Image
.
open
(
image
.
file
).
convert
(
'RGBA'
)
...
...
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