From 35b20db3854ba338fafca1ea3b65a33218038cad Mon Sep 17 00:00:00 2001 From: Evan Smal Date: Thu, 5 Dec 2024 15:43:52 +0000 Subject: [PATCH] Fix group norm L1 OOM error in Stable Diffusion --- .../tt/ttnn_functional_resnetblock2d_new_conv.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models/demos/wormhole/stable_diffusion/tt/ttnn_functional_resnetblock2d_new_conv.py b/models/demos/wormhole/stable_diffusion/tt/ttnn_functional_resnetblock2d_new_conv.py index cdcea7056263..4cedbdea78cf 100644 --- a/models/demos/wormhole/stable_diffusion/tt/ttnn_functional_resnetblock2d_new_conv.py +++ b/models/demos/wormhole/stable_diffusion/tt/ttnn_functional_resnetblock2d_new_conv.py @@ -416,6 +416,8 @@ def __call__( hidden_states = ttnn.reshape( hidden_states, (self.batch_size, 1, self.conv2_input_height * self.conv2_input_width, in_channels) ) + hidden_states = ttnn.reallocate(hidden_states) + hidden_states = ttnn.group_norm( hidden_states, num_groups=groups,