From d62bbe5fe069f15b27507e1e374f57c376328580 Mon Sep 17 00:00:00 2001 From: John Pollock Date: Sun, 19 Apr 2026 18:23:17 -0500 Subject: [PATCH 1/2] fix: issue 86 1024 conditioning gate --- comfy/ldm/trellis2/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy/ldm/trellis2/model.py b/comfy/ldm/trellis2/model.py index a613fb325..96c1eeef2 100644 --- a/comfy/ldm/trellis2/model.py +++ b/comfy/ldm/trellis2/model.py @@ -782,7 +782,7 @@ class Trellis2(nn.Module): embeds = kwargs.get("embeds") if embeds is None: raise ValueError("Trellis2.forward requires 'embeds' in kwargs") - is_1024 = self.img2shape.resolution == 1024 + is_1024 = self.img2shape.resolution == 64 coords = transformer_options.get("coords", None) mode = transformer_options.get("generation_mode", "structure_generation") is_512_run = False From 5575e06ff355829ddb7ad957ec62a9bd5793f717 Mon Sep 17 00:00:00 2001 From: John Pollock Date: Sun, 19 Apr 2026 19:20:14 -0500 Subject: [PATCH 2/2] clarify: issue 86 latent-to-pixel resolution mapping --- comfy/ldm/trellis2/model.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/comfy/ldm/trellis2/model.py b/comfy/ldm/trellis2/model.py index 96c1eeef2..3081d5919 100644 --- a/comfy/ldm/trellis2/model.py +++ b/comfy/ldm/trellis2/model.py @@ -782,7 +782,9 @@ class Trellis2(nn.Module): embeds = kwargs.get("embeds") if embeds is None: raise ValueError("Trellis2.forward requires 'embeds' in kwargs") - is_1024 = self.img2shape.resolution == 64 + # img2shape.resolution is the latent-grid size, not the input pixel size: + # 32 -> 512px path, 64 -> 1024px path. + uses_1024_conditioning = self.img2shape.resolution == 64 coords = transformer_options.get("coords", None) mode = transformer_options.get("generation_mode", "structure_generation") is_512_run = False @@ -797,7 +799,7 @@ class Trellis2(nn.Module): mode = "structure_generation" not_struct_mode = False - if is_1024 and not_struct_mode and not is_512_run: + if uses_1024_conditioning and not_struct_mode and not is_512_run: context = embeds sigmas = transformer_options.get("sigmas")[0].item()