The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Ensure conditions are not trainable to avoid bugs (#14368)
Kohaku-Blueleafad564899d37a
diff --git a/comfy_extras/nodes_train.py b/comfy_extras/nodes_train.pyindex 046eeaaf5..273f55e7c 100644--- a/comfy_extras/nodes_train.py+++ b/comfy_extras/nodes_train.py@@ -15,6 +15,7 @@ import comfy.sampler_helpersimport comfy.sdimport comfy.utilsimport comfy.model_management+from comfy.conds import CONDRegular, CONDListfrom comfy.cli_args import args, PerformanceFeatureimport comfy_extras.nodes_custom_samplerimport folder_paths@@ -120,6 +121,11 @@ def process_cond_list(d, prefix=""):process_cond_list(v, f"{prefix}.{k}")elif isinstance(v, torch.Tensor):d[k] = v.clone()+ elif isinstance(v, CONDList):+ v.cond = [t.detach() if isinstance(t, torch.Tensor) else t for t in v.cond]+ elif isinstance(v, CONDRegular):+ if isinstance(v.cond, torch.Tensor):+ v.cond = v.cond.detach()elif isinstance(v, (list, tuple)):for index, item in enumerate(v):process_cond_list(item, f"{prefix}.{k}.{index}")