mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2025-12-09 05:54:24 +08:00
Merge a7a88b2e5ffc884262e037c1910cccb1d78cc85a into fd271dedfde6e192a1f1a025521070876e89e04a
This commit is contained in:
commit
facb13061d
@ -22,6 +22,9 @@ from server import PromptServer
|
|||||||
MAX_RESOLUTION = nodes.MAX_RESOLUTION
|
MAX_RESOLUTION = nodes.MAX_RESOLUTION
|
||||||
|
|
||||||
class ImageCrop:
|
class ImageCrop:
|
||||||
|
ALLOW_LIVE_PREVIEW = True
|
||||||
|
WANT_LIVE_PREVIEW = True
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def INPUT_TYPES(s):
|
def INPUT_TYPES(s):
|
||||||
return {"required": { "image": ("IMAGE",),
|
return {"required": { "image": ("IMAGE",),
|
||||||
|
|||||||
2
nodes.py
2
nodes.py
@ -1627,6 +1627,8 @@ class SaveImage:
|
|||||||
return { "ui": { "images": results } }
|
return { "ui": { "images": results } }
|
||||||
|
|
||||||
class PreviewImage(SaveImage):
|
class PreviewImage(SaveImage):
|
||||||
|
WANT_LIVE_PREVIEW = True
|
||||||
|
|
||||||
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"
|
||||||
|
|||||||
@ -672,6 +672,12 @@ class PromptServer():
|
|||||||
|
|
||||||
if hasattr(obj_class, 'API_NODE'):
|
if hasattr(obj_class, 'API_NODE'):
|
||||||
info['api_node'] = obj_class.API_NODE
|
info['api_node'] = obj_class.API_NODE
|
||||||
|
|
||||||
|
if getattr(obj_class, "WANT_LIVE_PREVIEW", False):
|
||||||
|
info['want_live_preview'] = True
|
||||||
|
if getattr(obj_class, "ALLOW_LIVE_PREVIEW", False):
|
||||||
|
info['allow_live_preview'] = True
|
||||||
|
|
||||||
return info
|
return info
|
||||||
|
|
||||||
@routes.get("/object_info")
|
@routes.get("/object_info")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user