gligen / GLIGEN

Open-Set Grounded Text-to-Image Generation
MIT License
1.92k stars 144 forks source link

RuntimeError: set_sizes and strides is not allowed on a Tensor created from .data or .detach(). #27

Open CaoZelin12138 opened 1 year ago

CaoZelin12138 commented 1 year ago

You implement skip_connection function using convolution in ResBlock. But the convolution operation will block the backward gradient. How should I solve this problem? My python version is 3.8.5. Pytorch version is 1.9.0. cuda version is 11.1. The following is a screenshot of the error.

屏幕截图 2023-04-12 145651

gzp6688 commented 1 year ago

maybe update your pytorch version to 1.13.0 can solve this problem

gracema7 commented 1 year ago

My Pytorch version is 1.12.1, cuda version is 11.3. Everything is ok.