4 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
fb5ef3ead3 Add warning when multiple overlay images are detected
Co-authored-by: jags111 <5968619+jags111@users.noreply.github.com>
2026-02-03 17:05:16 +00:00
copilot-swe-agent[bot]
61e0bd5de4 Add .gitignore and remove pycache files
Co-authored-by: jags111 <5968619+jags111@users.noreply.github.com>
2026-02-03 17:04:05 +00:00
copilot-swe-agent[bot]
08c19f47fe Fix Image Overlay node batch processing by extracting first image
Co-authored-by: jags111 <5968619+jags111@users.noreply.github.com>
2026-02-03 17:03:43 +00:00
copilot-swe-agent[bot]
ed4f801c51 Initial plan 2026-02-03 16:58:03 +00:00
2 changed files with 24 additions and 4 deletions

20
.gitignore vendored
View File

@@ -1,10 +1,8 @@
# Python cache files
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
@@ -21,3 +19,19 @@ wheels/
*.egg-info/
.installed.cfg
*.egg
# Virtual environments
venv/
ENV/
env/
# IDE
.vscode/
.idea/
*.swp
*.swo
*~
# OS
.DS_Store
Thumbs.db

View File

@@ -506,7 +506,7 @@ class TSC_KSampler:
rng_source, cfg_denoiser, add_seed_noise, m_seed, m_weight = script["noise"]
smZ_rng_source.rng_rand_source(rng_source) # this function monkey patches comfy.sample.prepare_noise
if cfg_denoiser:
smZ_cfg_denoiser.register_hooks()
comfy.samplers.KSampler = smZ_cfg_denoiser.SDKSampler
if add_seed_noise:
comfy.sample.prepare_noise = cg_mixed_seed_noise.get_mixed_noise_function(comfy.sample.prepare_noise, m_seed, m_weight)
else:
@@ -3957,6 +3957,12 @@ 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)