This commit is contained in:
Yousef Rafat 2026-03-27 20:52:23 +02:00
parent 22dcd81fb3
commit 5559569735
2 changed files with 7 additions and 3 deletions

View File

@ -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)

View File

@ -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()