mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-15 04:52:31 +08:00
..
This commit is contained in:
parent
22dcd81fb3
commit
5559569735
@ -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)
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user