From d062becb336da8430052381111e952d6ab51d39c Mon Sep 17 00:00:00 2001 From: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com> Date: Sun, 15 Mar 2026 12:37:27 -0700 Subject: [PATCH] Make EmptyLatentImage follow intermediate dtype. (#12974) --- nodes.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/nodes.py b/nodes.py index 1e19a8223..dd9298b18 100644 --- a/nodes.py +++ b/nodes.py @@ -1211,9 +1211,6 @@ class GLIGENTextBoxApply: return (c, ) class EmptyLatentImage: - def __init__(self): - self.device = comfy.model_management.intermediate_device() - @classmethod def INPUT_TYPES(s): return { @@ -1232,7 +1229,7 @@ class EmptyLatentImage: SEARCH_ALIASES = ["empty", "empty latent", "new latent", "create latent", "blank latent", "blank"] def generate(self, width, height, batch_size=1): - latent = torch.zeros([batch_size, 4, height // 8, width // 8], device=self.device) + latent = torch.zeros([batch_size, 4, height // 8, width // 8], device=comfy.model_management.intermediate_device(), dtype=comfy.model_management.intermediate_dtype()) return ({"samples": latent, "downscale_ratio_spacial": 8}, )