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
3 changed files with 50 additions and 6 deletions

37
.gitignore vendored Normal file
View File

@@ -0,0 +1,37 @@
# Python
__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/
# IDE
.vscode/
.idea/
*.swp
*.swo
*~
# OS
.DS_Store
Thumbs.db

View File

@@ -3958,6 +3958,12 @@ class TSC_ImageOverlay:
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)
# Add Alpha channel to overlay

View File

@@ -117,10 +117,7 @@ class SeedControl {
this.updateButtonLabel();
}
// Don't update the widget value to maintain -1 in the UI when seed was special
if (!this.serializedCtx.wasSpecial) {
this.seedWidget.value = this.serializedCtx.seedUsed;
}
if (this.serializedCtx.wasSpecial) {
this.lastSeed = this.serializedCtx.seedUsed;
@@ -136,8 +133,12 @@ class SeedControl {
return; // Exit the function immediately
}
// Update lastSeed if user manually changed the seed to a specific value
if (!this.serializedCtx.wasSpecial && this.seedWidget.value !== -1) {
if (this.serializedCtx.wasSpecial) {
this.seedWidget.value = -1;
}
// Check if seed has changed to a non -1 value, and if so, update lastSeed
if (this.seedWidget.value !== -1) {
this.lastSeed = this.seedWidget.value;
}