mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-15 13:02:35 +08:00
Merge 918a670f0c into b615af1c65
This commit is contained in:
commit
22daf5f831
@ -2,7 +2,6 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import random
|
|
||||||
import uuid
|
import uuid
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
|
||||||
@ -390,7 +389,7 @@ class PreviewImage(_UIOutput):
|
|||||||
def __init__(self, image: Image.Type, animated: bool = False, cls: type[ComfyNode] = None, **kwargs):
|
def __init__(self, image: Image.Type, animated: bool = False, cls: type[ComfyNode] = None, **kwargs):
|
||||||
self.values = ImageSaveHelper.save_images(
|
self.values = ImageSaveHelper.save_images(
|
||||||
image,
|
image,
|
||||||
filename_prefix="ComfyUI_temp_" + ''.join(random.choice("abcdefghijklmnopqrstupvxyz") for _ in range(5)),
|
filename_prefix="ComfyUI_temp_" + uuid.uuid4().hex[:5],
|
||||||
folder_type=FolderType.temp,
|
folder_type=FolderType.temp,
|
||||||
cls=cls,
|
cls=cls,
|
||||||
compress_level=1,
|
compress_level=1,
|
||||||
@ -414,7 +413,7 @@ class PreviewAudio(_UIOutput):
|
|||||||
def __init__(self, audio: dict, cls: type[ComfyNode] = None, **kwargs):
|
def __init__(self, audio: dict, cls: type[ComfyNode] = None, **kwargs):
|
||||||
self.values = AudioSaveHelper.save_audio(
|
self.values = AudioSaveHelper.save_audio(
|
||||||
audio,
|
audio,
|
||||||
filename_prefix="ComfyUI_temp_" + "".join(random.choice("abcdefghijklmnopqrstuvwxyz") for _ in range(5)),
|
filename_prefix="ComfyUI_temp_" + uuid.uuid4().hex[:5],
|
||||||
folder_type=FolderType.temp,
|
folder_type=FolderType.temp,
|
||||||
cls=cls,
|
cls=cls,
|
||||||
format="flac",
|
format="flac",
|
||||||
|
|||||||
4
nodes.py
4
nodes.py
@ -12,7 +12,7 @@ import inspect
|
|||||||
import traceback
|
import traceback
|
||||||
import math
|
import math
|
||||||
import time
|
import time
|
||||||
import random
|
import uuid
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from PIL import Image, ImageOps, ImageSequence
|
from PIL import Image, ImageOps, ImageSequence
|
||||||
@ -1685,7 +1685,7 @@ class PreviewImage(SaveImage):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.output_dir = folder_paths.get_temp_directory()
|
self.output_dir = folder_paths.get_temp_directory()
|
||||||
self.type = "temp"
|
self.type = "temp"
|
||||||
self.prefix_append = "_temp_" + ''.join(random.choice("abcdefghijklmnopqrstupvxyz") for x in range(5))
|
self.prefix_append = "_temp_" + uuid.uuid4().hex[:5]
|
||||||
self.compress_level = 1
|
self.compress_level = 1
|
||||||
|
|
||||||
SEARCH_ALIASES = ["preview", "preview image", "show image", "view image", "display image", "image viewer"]
|
SEARCH_ALIASES = ["preview", "preview image", "show image", "view image", "display image", "image viewer"]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user