mirror of
https://github.com/jags111/efficiency-nodes-comfyui.git
synced 2026-05-07 01:06:42 -03:00
Compare commits
3 Commits
copilot/fi
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7577069e0 | ||
|
|
040aea25a1 | ||
|
|
cd682e645f |
23
.gitignore
vendored
Normal file
23
.gitignore
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# Python cache files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
@@ -506,7 +506,7 @@ class TSC_KSampler:
|
|||||||
rng_source, cfg_denoiser, add_seed_noise, m_seed, m_weight = script["noise"]
|
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
|
smZ_rng_source.rng_rand_source(rng_source) # this function monkey patches comfy.sample.prepare_noise
|
||||||
if cfg_denoiser:
|
if cfg_denoiser:
|
||||||
comfy.samplers.KSampler = smZ_cfg_denoiser.SDKSampler
|
smZ_cfg_denoiser.register_hooks()
|
||||||
if add_seed_noise:
|
if add_seed_noise:
|
||||||
comfy.sample.prepare_noise = cg_mixed_seed_noise.get_mixed_noise_function(comfy.sample.prepare_noise, m_seed, m_weight)
|
comfy.sample.prepare_noise = cg_mixed_seed_noise.get_mixed_noise_function(comfy.sample.prepare_noise, m_seed, m_weight)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ function toggleWidget(node, widget, show = false, suffix = "") {
|
|||||||
node.setSize([node.size[0], newHeight]);
|
node.setSize([node.size[0], newHeight]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const WIDGET_HEIGHT = 24;
|
||||||
// Use for Multiline Widget Nodes (aka Efficient Loaders)
|
// Use for Multiline Widget Nodes (aka Efficient Loaders)
|
||||||
function toggleWidget_2(node, widget, show = false, suffix = "") {
|
function toggleWidget_2(node, widget, show = false, suffix = "") {
|
||||||
if (!widget || doesInputWithNameExist(node, widget.name)) return;
|
if (!widget || doesInputWithNameExist(node, widget.name)) return;
|
||||||
@@ -51,10 +52,8 @@ function toggleWidget_2(node, widget, show = false, suffix = "") {
|
|||||||
widget.computeSize = show ? origProps[widget.name].origComputeSize : () => [0, -4];
|
widget.computeSize = show ? origProps[widget.name].origComputeSize : () => [0, -4];
|
||||||
|
|
||||||
if (initialized){
|
if (initialized){
|
||||||
// Calculate the new height for the node based on its computeSize method
|
const adjustment = show ? WIDGET_HEIGHT : -WIDGET_HEIGHT;
|
||||||
// This properly accounts for font size changes and ensures widgets don't overlap
|
node.setSize([node.size[0], node.size[1] + adjustment]);
|
||||||
const newHeight = node.computeSize()[1];
|
|
||||||
node.setSize([node.size[0], newHeight]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user