mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-27 19:02:31 +08:00
Omit null batch_index from Trellis upsample output
This commit is contained in:
parent
33caec301a
commit
939ac7ebb4
@ -521,12 +521,16 @@ class Trellis2UpsampleCascade(IO.ComfyNode):
|
|||||||
final_coords_list.append(final_coords_i)
|
final_coords_list.append(final_coords_i)
|
||||||
output_coord_counts.append(int(final_coords_i.shape[0]))
|
output_coord_counts.append(int(final_coords_i.shape[0]))
|
||||||
|
|
||||||
return IO.NodeOutput({
|
normalized_batch_index = normalize_batch_index(batch_index)
|
||||||
|
output = {
|
||||||
"coords": torch.cat(final_coords_list, dim=0),
|
"coords": torch.cat(final_coords_list, dim=0),
|
||||||
"coord_counts": torch.tensor(output_coord_counts, dtype=torch.int64),
|
"coord_counts": torch.tensor(output_coord_counts, dtype=torch.int64),
|
||||||
"resolutions": torch.full((len(final_coords_list),), int(hr_resolution), dtype=torch.int64),
|
"resolutions": torch.full((len(final_coords_list),), int(hr_resolution), dtype=torch.int64),
|
||||||
"batch_index": normalize_batch_index(batch_index),
|
}
|
||||||
},)
|
if normalized_batch_index is not None:
|
||||||
|
output["batch_index"] = normalized_batch_index
|
||||||
|
|
||||||
|
return IO.NodeOutput(output,)
|
||||||
|
|
||||||
dino_mean = torch.tensor([0.485, 0.456, 0.406]).view(1, 3, 1, 1)
|
dino_mean = torch.tensor([0.485, 0.456, 0.406]).view(1, 3, 1, 1)
|
||||||
dino_std = torch.tensor([0.229, 0.224, 0.225]).view(1, 3, 1, 1)
|
dino_std = torch.tensor([0.229, 0.224, 0.225]).view(1, 3, 1, 1)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user