dome272 / Diffusion-Models-pytorch

Pytorch implementation of Diffusion Models (https://arxiv.org/pdf/2006.11239.pdf)
Apache License 2.0
1.11k stars 256 forks source link

What should I change if I want to generate grayscale image out of grayscale image dataset? #10

Open devshaww opened 1 year ago

dome272 commented 1 year ago

Hey, you would change the in and out channels here: https://github.com/dome272/Diffusion-Models-pytorch/blob/be352208d0576039fec061238c0e4385a562a2d4/modules.py#L190

That should be it. And then your DataLoader would need to be adjusted too.

awais00012 commented 9 months ago

Hi outlier, i am working on a greyscale ultrasound dataset with having image size is 265*256 consisting of 5 different classes. i modified the image size in class SelfAttention, also i changed the i/p and O/p channels for greyscale images. but when i run the modules.py i face this error. kindly help out. image

error

also, tell me why its samples 10 images every time during training. can we change it?

dome272 commented 9 months ago

This is an improved codebase here: https://github.com/tcapelle/Diffusion-Models-pytorch I think it implementes easy handling of different image resolutions

awais00012 commented 9 months ago

This is an improved codebase here: https://github.com/tcapelle/Diffusion-Models-pytorch I think it implementes easy handling of different image resolutions image

am still facing this issue. i tried on this repo but still stuck here. i want to work on Greyscale images having a size is 256. kindly let me guide what should i do. Thanks