# Model UNet1DModel

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmodel-unet1dmodel%2F25938%3E%5C
**Category:** Beginners\
**Created:** [November 11, 2022, 3:38pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmodel-unet1dmodel%2F25938 "2022-11-11T15:38:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chredl](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@chredl](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fchredl)%5C
**Post date:** [November 11, 2022, 3:38pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmodel-unet1dmodel%2F25938%2F1 "2022-11-11T15:38:48Z")

</div>

Hi, I’m new to using HuggingFace.  
I try to set up the model UNet1DModel and I can’t get output working:  
from diffusers import UNet1DModel

batch\_size, sample\_size, num\_channels = 1, 128, 1  
model = UNet1DModel(  
sample\_size=sample\_size,  
in\_channels=num\_channels,  
out\_channels=num\_channels,  
)

# sample (`torch.FloatTensor`): `(batch_size, sample_size, num_channels)` noisy inputs tensor

sample = torch.randn(batch\_size, sample\_size, num\_channels)  
timestep = torch.zeros(batch\_size, dtype=torch.int)  
output = model(sample, timestep)

it gives me:  
[/usr/local/lib/python3.7/dist-packages/torch/nn/modules/conv.py](https://jz7fegcd01-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20221108-060104-RC01_487066532#) in \_conv\_forward(self, input, weight, bias) 302 \_single(0), self.dilation, self.groups) 303 return F.conv1d(input, weight, bias, self.stride, → 304 self.padding, self.dilation, self.groups) 305 306 def forward(self, input: Tensor) → Tensor:

RuntimeError: Given groups=1, weight of size [32, 1, 1], expected input[1, 144, 1] to have 1 channels, but got 144 channels instead

any help is appreciated  
thanks
