For training question

#9
by TIanqy - opened

should the size of target image be the same with condition image before resize.I mean the target image size is 864×486,while the condition image size is 896×512,will it affect the performance of the controlnet. if yes, i should keep them the same size when doing preprocessing?

yes, it is recommend that the target size same with the control. In the training process, the image is resized to the same bucket as 1024*1024. So in your example, you should first determine the aspect ratio,864/486 or 896/512, choose one, perhaps you need to crop if you want to keep the original aspect ratio between the condition and the target. Then you should resize the control image to 1024 * 1024 bucket, calculate the ratio=sqrt(1024 * 1024/(width * height)) and resize it. Finally, you send the image to controlnet and get the target image with the same size, you can resize it down to get your expect size(896 * 512 or 864 * 486).

yes, it is recommend that the target size same with the control. In the training process, the image is resized to the same bucket as 1024*1024. So in your example, you should first determine the aspect ratio,864/486 or 896/512, choose one, perhaps you need to crop if you want to keep the original aspect ratio between the condition and the target. Then you should resize the control image to 1024 * 1024 bucket, calculate the ratio=sqrt(1024 * 1024/(width * height)) and resize it. Finally, you send the image to controlnet and get the target image with the same size, you can resize it down to get your expect size(896 * 512 or 864 * 486).

thanks a lot!!! BTW,why dont you train a depth model?

Sign up or log in to comment