From c613ed01cb36dc285b9457e2c1ff7d644e9cf457 Mon Sep 17 00:00:00 2001 From: Daniel Martinek Date: Thu, 2 Apr 2026 12:46:54 +0200 Subject: [PATCH] AI: add is_ node for time embedding --- README.md | 1 + more_math/SelectiveGuiderMathNode.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/README.md b/README.md index f599465..0b5c63e 100644 --- a/README.md +++ b/README.md @@ -423,6 +423,7 @@ The following variables are available in `Expression`. | `is_attn2` | float (0/1) | `1` when current hook is `attn2`, else `0`. | | `is_dit` | float (0/1) | `1` when current hook is DiT block hook, else `0`. | | `is_unet_block` | float (0/1) | `1` when current hook is UNet block hook, else `0`. | +| `is_time_emb` | float (0/1) | `1` when current hook is timestep embedding entry (`block_name=="time_emb"`), else `0`. | | `block_name` | string | Block/stage name (`input`, `middle`, `output`, `time_emb`, `model`, DiT block type, etc.). | | `layer_id` | float | Numeric block/layer id used by current hook context. | | `layer` | float | Alias of `layer_id`. | diff --git a/more_math/SelectiveGuiderMathNode.py b/more_math/SelectiveGuiderMathNode.py index 126c960..73bfa0a 100644 --- a/more_math/SelectiveGuiderMathNode.py +++ b/more_math/SelectiveGuiderMathNode.py @@ -149,6 +149,7 @@ class SelectiveGuiderMathNode(io.ComfyNode): "transformer_index": -1.0, "is_dit": 0.0, "is_unet_block": 0.0, + "is_time_emb": 0.0, "is_attn1": 0.0, "is_attn2": 0.0, "block_name": "", @@ -331,6 +332,7 @@ class SelectiveGuiderMathNode(io.ComfyNode): "attn_kind": "none", "is_dit": 0.0, "is_unet_block": 1.0, + "is_time_emb": 1.0 if stage == "time_emb" else 0.0, "is_attn1": 0.0, "is_attn2": 0.0, "block_name": stage,