# Input Data Format for Inpainting with Changed in\_channels in diffusers

**URL:** <https://discuss.huggingface.co/t/input-data-format-for-inpainting-with-changed-in-channels-in-diffusers/61671>\
**Category:** 🧨 Diffusers\
**Created:** [November 9, 2023, 3:32pm UTC](https://discuss.huggingface.co/t/input-data-format-for-inpainting-with-changed-in-channels-in-diffusers/61671 "2023-11-09T15:32:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dadadaren](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@Dadadaren](https://discuss.huggingface.co/u/Dadadaren)\
**Post date:** [November 9, 2023, 3:32pm UTC](https://discuss.huggingface.co/t/input-data-format-for-inpainting-with-changed-in-channels-in-diffusers/61671/1 "2023-11-09T15:32:54Z")

</div>

I’m planning to train the `stable-diffusion-2-inpainting` model using my own dataset consisting of `image.jpg` and `mask.jpg` pairs. I understand that the input should have 9 channels. Could you provide guidance on how to preprocess these image and mask files and structure them correctly for training? Specifically:

- What is the expected tensor structure for the 9-channel input?
- How should I combine my image and mask files to conform to this structure?
- Are there any specific preprocessing steps or code examples available?

Any guidance or example code would be very helpful.
