Upload dc.py
Browse files
dc.py
CHANGED
@@ -1308,13 +1308,12 @@ def process_style_prompt(prompt: str, neg_prompt: str, styles_key: str = "None",
|
|
1308 |
from PIL import Image
|
1309 |
def save_images(images: list[Image.Image], metadatas: list[str]):
|
1310 |
from PIL import PngImagePlugin
|
1311 |
-
import uuid
|
1312 |
try:
|
1313 |
output_images = []
|
1314 |
for image, metadata in zip(images, metadatas):
|
1315 |
info = PngImagePlugin.PngInfo()
|
1316 |
info.add_text("metadata", metadata)
|
1317 |
-
savefile =
|
1318 |
image.save(savefile, "PNG", pnginfo=info)
|
1319 |
output_images.append(str(Path(savefile).resolve()))
|
1320 |
return output_images
|
|
|
1308 |
from PIL import Image
|
1309 |
def save_images(images: list[Image.Image], metadatas: list[str]):
|
1310 |
from PIL import PngImagePlugin
|
|
|
1311 |
try:
|
1312 |
output_images = []
|
1313 |
for image, metadata in zip(images, metadatas):
|
1314 |
info = PngImagePlugin.PngInfo()
|
1315 |
info.add_text("metadata", metadata)
|
1316 |
+
savefile = "image.png"
|
1317 |
image.save(savefile, "PNG", pnginfo=info)
|
1318 |
output_images.append(str(Path(savefile).resolve()))
|
1319 |
return output_images
|