5 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
946fca3e18 Fix trailing whitespace in Live Preview node
Co-authored-by: jags111 <5968619+jags111@users.noreply.github.com>
2026-02-03 23:14:33 +00:00
copilot-swe-agent[bot]
3b2a5a36ad Add documentation for Live Preview node in README
Co-authored-by: jags111 <5968619+jags111@users.noreply.github.com>
2026-02-03 23:14:01 +00:00
copilot-swe-agent[bot]
73d807aa40 Add .gitignore and remove __pycache__ from tracking
Co-authored-by: jags111 <5968619+jags111@users.noreply.github.com>
2026-02-03 23:11:37 +00:00
copilot-swe-agent[bot]
b80d754d1f Add TSC_LivePreview node for live preview with pass-through
Co-authored-by: jags111 <5968619+jags111@users.noreply.github.com>
2026-02-03 23:11:21 +00:00
copilot-swe-agent[bot]
a075f2b7f9 Initial plan 2026-02-03 22:59:34 +00:00
3 changed files with 42 additions and 24 deletions

20
.gitignore vendored
View File

@@ -1,29 +1,13 @@
# Python
# Python cache
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
# Virtual environments
venv/
ENV/
env/
ENV/
# IDE
.vscode/

View File

@@ -131,6 +131,17 @@ Please check out our WIKI for any use cases and new developments including workf
<img src="https://github.com/LucianoCirino/efficiency-nodes-media/blob/main/images/nodes/Image%20Overlay%20-%20Node%20Example.png" width="1080">
</p>
</details>
<!-------------------------------------------------------------------------------------------------------------------------------------------------------->
<details>
<summary><b>Live Preview (Eff.)</b></summary>
<ul>
<li>Node that displays a live preview of images while allowing them to pass through to other nodes in the workflow.</li>
<li>Can be connected to multiple samplers sequentially to show progressive updates as the workflow advances through different stages (base sampling, refining, hi-res fix, detailing, etc.).</li>
<li>Useful for placing preview displays outside of subgraphs or in custom locations within complex workflows.</li>
<li>Simply connect the IMAGE output from any sampler or image processing node to this node's input, and connect its output to continue the workflow.</li>
</ul>
</details>
<!-------------------------------------------------------------------------------------------------------------------------------------------------------->
<details>

View File

@@ -3957,12 +3957,6 @@ class TSC_ImageOverlay:
samples = overlay_image.movedim(-1, 1)
overlay_image = comfy.utils.common_upscale(samples, overlay_image_size[0], overlay_image_size[1], resize_method, False)
overlay_image = overlay_image.movedim(1, -1)
# Handle batch dimension - use first image if overlay_image is a batch
if len(overlay_image.shape) == 4:
if overlay_image.shape[0] > 1:
print(f"{warning('Image Overlay Warning:')} Multiple overlay images detected ({overlay_image.shape[0]}), using only the first image.")
overlay_image = overlay_image[0]
overlay_image = tensor2pil(overlay_image)
@@ -4019,6 +4013,34 @@ class TSC_ImageOverlay:
# Return the edited 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
# https://github.com/shiimizu/ComfyUI_smZNodes
@@ -4294,6 +4316,7 @@ NODE_CLASS_MAPPINGS = {
"Manual XY Entry Info": TSC_XYplot_Manual_XY_Entry_Info,
"Join XY Inputs of Same Type": TSC_XYplot_JoinInputs,
"Image Overlay": TSC_ImageOverlay,
"Live Preview (Eff.)": TSC_LivePreview,
"Noise Control Script": TSC_Noise_Control_Script,
"HighRes-Fix Script": TSC_HighRes_Fix,
"Tiled Upscaler Script": TSC_Tiled_Upscaler,