add back layer and layer count and progress bar for model-like

This commit is contained in:
mcDandy
2026-02-16 14:50:14 +01:00
parent e3676d681f
commit f0e13f430c
4 changed files with 24 additions and 7 deletions
+3
View File
@@ -7,6 +7,7 @@ from .Parser.MathExprLexer import MathExprLexer
from .Parser.MathExprParser import MathExprParser
import re
from .Stack import MrmthStack
import comfy.utils
class VAEMathNode(io.ComfyNode):
"""
@@ -96,6 +97,8 @@ class VAEMathNode(io.ComfyNode):
# Calculate patches using the patchers (weights are in patcher.model.state_dict)
from .modelLikeCommon import calculate_patches_autogrow
aliases = {"a": "V0", "b": "V1", "c": "V2", "d": "V3", "w": "F0", "x": "F1", "y": "F2", "z": "F3"}
layer_count = V.get("V0").model.state_dict().__len__() if hasattr(V.get("V0"), "model") and hasattr(V.get("V0").model, "state_dict") else 0
pbar = comfy.utils.ProgressBar(layer_count)
patches = calculate_patches_autogrow(Expression, V=patchers_V, F=F, mapping=aliases,stack=stack)
# VAE does not have a clone method, so we shallow copy and clone the patcher