mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-20 03:13:30 +00:00
Add activations_shape info in UNet models (#7482)
* Add activations_shape info in UNet models * activations_shape should be a list
This commit is contained in:
parent
3a100b9a55
commit
89e4ea0175
@ -847,6 +847,7 @@ class SpatialTransformer(nn.Module):
|
|||||||
if not isinstance(context, list):
|
if not isinstance(context, list):
|
||||||
context = [context] * len(self.transformer_blocks)
|
context = [context] * len(self.transformer_blocks)
|
||||||
b, c, h, w = x.shape
|
b, c, h, w = x.shape
|
||||||
|
transformer_options["activations_shape"] = list(x.shape)
|
||||||
x_in = x
|
x_in = x
|
||||||
x = self.norm(x)
|
x = self.norm(x)
|
||||||
if not self.use_linear:
|
if not self.use_linear:
|
||||||
@ -962,6 +963,7 @@ class SpatialVideoTransformer(SpatialTransformer):
|
|||||||
transformer_options={}
|
transformer_options={}
|
||||||
) -> torch.Tensor:
|
) -> torch.Tensor:
|
||||||
_, _, h, w = x.shape
|
_, _, h, w = x.shape
|
||||||
|
transformer_options["activations_shape"] = list(x.shape)
|
||||||
x_in = x
|
x_in = x
|
||||||
spatial_context = None
|
spatial_context = None
|
||||||
if exists(context):
|
if exists(context):
|
||||||
|
Loading…
Reference in New Issue
Block a user