Stability-AI / stablediffusion

High-Resolution Image Synthesis with Latent Diffusion Models
MIT License
38.33k stars 4.95k forks source link

how to solve the in_channel and out_channel is not same in UNet? #293

Open misi0202 opened 1 year ago

misi0202 commented 1 year ago

In my thougnt,the in_channel and out_channel should be same in UNet, but in x4-upscaling.yaml

截屏2023-07-04 23 12 09

I think this use the latent low_scale_noise (3 channels) and the img(4 channels),so it has 7 in_channels, but I am confused about how in_channel can be convert to out_channel,it there some method in low_sample? I am trying to read the code, but i got nothing. Can somboby has a different thought about that,it will help me a lot!!