diff --git a/comfy/ldm/trellis2/model.py b/comfy/ldm/trellis2/model.py index 613f7ef50..40646f369 100644 --- a/comfy/ldm/trellis2/model.py +++ b/comfy/ldm/trellis2/model.py @@ -843,8 +843,8 @@ class Trellis2(nn.Module): else: # structure orig_bsz = x.shape[0] if shape_rule: - x = x[0].unsqueeze(0) - timestep = timestep[0].unsqueeze(0) + x = x[1].unsqueeze(0) + timestep = timestep[1].unsqueeze(0) out = self.structure_model(x, timestep, context if not shape_rule else cond) if shape_rule: out = out.repeat(orig_bsz, 1, 1, 1, 1) diff --git a/comfy_extras/nodes_trellis2.py b/comfy_extras/nodes_trellis2.py index ff95e8332..f58dbf592 100644 --- a/comfy_extras/nodes_trellis2.py +++ b/comfy_extras/nodes_trellis2.py @@ -441,7 +441,11 @@ class EmptyTextureLatentTrellis2(IO.ComfyNode): shape_latent = shape_latent["samples"] if shape_latent.ndim == 4: shape_latent = shape_latent.squeeze(-1).transpose(1, 2).reshape(-1, channels) - shape_latent = shape_norm(shape_latent, coords) + + std = shape_slat_normalization["std"].to(shape_latent) + mean = shape_slat_normalization["mean"].to(shape_latent) + shape_latent = SparseTensor(feats = shape_latent, coords=coords) + shape_latent = (shape_latent - mean) / std latent = torch.randn(1, channels, coords.shape[0], 1) model = model.clone()