mirror of
https://github.com/jags111/efficiency-nodes-comfyui.git
synced 2026-05-07 01:06:42 -03:00
Compare commits
2 Commits
copilot/fi
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e139816db0 | ||
|
|
e4e93074fe |
37
.gitignore
vendored
37
.gitignore
vendored
@@ -1,37 +0,0 @@
|
||||
# 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
|
||||
@@ -3958,12 +3958,6 @@ 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
|
||||
|
||||
@@ -36,7 +36,6 @@ function toggleWidget(node, widget, show = false, suffix = "") {
|
||||
node.setSize([node.size[0], newHeight]);
|
||||
}
|
||||
|
||||
const WIDGET_HEIGHT = 24;
|
||||
// Use for Multiline Widget Nodes (aka Efficient Loaders)
|
||||
function toggleWidget_2(node, widget, show = false, suffix = "") {
|
||||
if (!widget || doesInputWithNameExist(node, widget.name)) return;
|
||||
@@ -52,8 +51,10 @@ function toggleWidget_2(node, widget, show = false, suffix = "") {
|
||||
widget.computeSize = show ? origProps[widget.name].origComputeSize : () => [0, -4];
|
||||
|
||||
if (initialized){
|
||||
const adjustment = show ? WIDGET_HEIGHT : -WIDGET_HEIGHT;
|
||||
node.setSize([node.size[0], node.size[1] + adjustment]);
|
||||
// Calculate the new height for the node based on its computeSize method
|
||||
// This properly accounts for font size changes and ensures widgets don't overlap
|
||||
const newHeight = node.computeSize()[1];
|
||||
node.setSize([node.size[0], newHeight]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user