mirror of
https://github.com/jags111/efficiency-nodes-comfyui.git
synced 2026-03-25 07:05:44 -03:00
Add TSC_LivePreview node for live preview with pass-through
Co-authored-by: jags111 <5968619+jags111@users.noreply.github.com>
This commit is contained in:
BIN
__pycache__/efficiency_nodes.cpython-312.pyc
Normal file
BIN
__pycache__/efficiency_nodes.cpython-312.pyc
Normal file
Binary file not shown.
@@ -4013,6 +4013,34 @@ class TSC_ImageOverlay:
|
|||||||
# Return the edited base image
|
# Return the edited base image
|
||||||
return (base_image,)
|
return (base_image,)
|
||||||
|
|
||||||
|
########################################################################################################################
|
||||||
|
# TSC Live Preview Node
|
||||||
|
class TSC_LivePreview:
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def INPUT_TYPES(cls):
|
||||||
|
return {
|
||||||
|
"required": {
|
||||||
|
"images": ("IMAGE",),
|
||||||
|
},
|
||||||
|
"hidden": {
|
||||||
|
"prompt": "PROMPT",
|
||||||
|
"extra_pnginfo": "EXTRA_PNGINFO"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
RETURN_TYPES = ("IMAGE",)
|
||||||
|
FUNCTION = "preview_image"
|
||||||
|
OUTPUT_NODE = True
|
||||||
|
CATEGORY = "Efficiency Nodes/Image"
|
||||||
|
|
||||||
|
def preview_image(self, images, prompt=None, extra_pnginfo=None):
|
||||||
|
# Generate preview using ComfyUI's PreviewImage node
|
||||||
|
preview = PreviewImage().save_images(images, prompt=prompt, extra_pnginfo=extra_pnginfo)["ui"]
|
||||||
|
|
||||||
|
# Return both the preview for UI and the original images for pass-through
|
||||||
|
return {"ui": preview, "result": (images,)}
|
||||||
|
|
||||||
########################################################################################################################
|
########################################################################################################################
|
||||||
# Noise Sources & Seed Variations
|
# Noise Sources & Seed Variations
|
||||||
# https://github.com/shiimizu/ComfyUI_smZNodes
|
# https://github.com/shiimizu/ComfyUI_smZNodes
|
||||||
@@ -4288,6 +4316,7 @@ NODE_CLASS_MAPPINGS = {
|
|||||||
"Manual XY Entry Info": TSC_XYplot_Manual_XY_Entry_Info,
|
"Manual XY Entry Info": TSC_XYplot_Manual_XY_Entry_Info,
|
||||||
"Join XY Inputs of Same Type": TSC_XYplot_JoinInputs,
|
"Join XY Inputs of Same Type": TSC_XYplot_JoinInputs,
|
||||||
"Image Overlay": TSC_ImageOverlay,
|
"Image Overlay": TSC_ImageOverlay,
|
||||||
|
"Live Preview (Eff.)": TSC_LivePreview,
|
||||||
"Noise Control Script": TSC_Noise_Control_Script,
|
"Noise Control Script": TSC_Noise_Control_Script,
|
||||||
"HighRes-Fix Script": TSC_HighRes_Fix,
|
"HighRes-Fix Script": TSC_HighRes_Fix,
|
||||||
"Tiled Upscaler Script": TSC_Tiled_Upscaler,
|
"Tiled Upscaler Script": TSC_Tiled_Upscaler,
|
||||||
|
|||||||
Reference in New Issue
Block a user