2 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
e139816db0 Fix Efficient Loader UI layout issue with font size changes
Co-authored-by: jags111 <5968619+jags111@users.noreply.github.com>
2026-02-03 23:09:29 +00:00
copilot-swe-agent[bot]
e4e93074fe Initial plan 2026-02-03 22:59:20 +00:00
3 changed files with 4 additions and 58 deletions

39
.gitignore vendored
View File

@@ -1,39 +0,0 @@
# Python cache
__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
# Virtual environments
venv/
ENV/
env/
# IDEs
.vscode/
.idea/
*.swp
*.swo
*~
# OS
.DS_Store
Thumbs.db

View File

@@ -99,16 +99,6 @@ def encode_prompts(positive_prompt, negative_prompt, token_normalization, weight
elif return_type == "both":
return positive_encoded, negative_encoded, clip, refiner_positive_encoded, refiner_negative_encoded, refiner_clip
########################################################################################################################
# Helper function for VAE error message
def get_missing_vae_error(ckpt_name):
"""Generate error message for checkpoints without embedded VAE"""
return (
f"Checkpoint '{ckpt_name}' does not contain an embedded VAE. "
f"This checkpoint (likely an AIO model) requires an external VAE. "
f"Please select a VAE file instead of 'Baked VAE'."
)
########################################################################################################################
# TSC Efficient Loader
class TSC_EfficientLoader:
@@ -176,9 +166,6 @@ class TSC_EfficientLoader:
f"{warning('Efficiency Nodes:')} Baked VAE not found in cache, loading checkpoint to extract VAE...")
_, _, vae = load_checkpoint(ckpt_name, my_unique_id, output_vae=True, cache=ckpt_cache,
cache_overwrite=True)
# Check if VAE extraction was successful
if vae is None:
raise ValueError(get_missing_vae_error(ckpt_name))
else:
model, clip, vae = load_checkpoint(ckpt_name, my_unique_id, cache=ckpt_cache, cache_overwrite=True)
lora_params = None
@@ -208,9 +195,6 @@ class TSC_EfficientLoader:
# Check for custom VAE
if vae_name != "Baked VAE":
vae = load_vae(vae_name, my_unique_id, cache=vae_cache, cache_overwrite=True)
elif vae is None:
# If "Baked VAE" was selected but checkpoint has no embedded VAE
raise ValueError(get_missing_vae_error(ckpt_name))
# Data for XY Plot
dependencies = (vae_name, ckpt_name, clip, clip_skip, refiner_name, refiner_clip, refiner_clip_skip,

View File

@@ -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]);
}
}