cuiziteng / Illumination-Adaptive-Transformer

🌕 [BMVC 2022] You Only Need 90K Parameters to Adapt Light: A Light Weight Transformer for Image Enhancement and Exposure Correction. SOTA for low light enhancement, 0.004 seconds try this for pre-processing.
Apache License 2.0
459 stars 43 forks source link

CUDA outof memory #28

Closed Mr-ind1fferent closed 1 year ago

Mr-ind1fferent commented 1 year ago

3060怎么推理跑不动会直接炸,用这个模型跑视频的

cuiziteng commented 1 year ago

多少显存的3060啊,输入尺寸多少?

你可以试试这个:torch.utils.checkpoint ,把这个加在模型(model.py)里,显存能减少好多。

Mr-ind1fferent commented 1 year ago

6gb

Mr-ind1fferent commented 1 year ago

6gb

是在推理过程中,非训练,显存不足

cuiziteng commented 1 year ago

哦哦,你把图像缩小,或者用这个torch.utils.checkpoint试试看呢。

Mr-ind1fferent commented 1 year ago

在哪里更改图片大小

cuiziteng commented 1 year ago

你加载的时候resize一下就好啦