Algolzw / daclip-uir

[ICLR 2024] Controlling Vision-Language Models for Universal Image Restoration. 5th place in the NTIRE 2024 Restore Any Image Model in the Wild Challenge.
https://algolzw.github.io/daclip-uir
MIT License
582 stars 30 forks source link

About training #14

Closed Iceeteeea closed 7 months ago

Iceeteeea commented 7 months ago

感谢作者的这篇优秀工作。我在复现的时候遇到一个问题。在训练过程中的验证阶段会爆显存,可以通过修改参数来避免爆显存吗 屏幕截图 2023-11-25 233658

Algolzw commented 7 months ago

一般的话可以改小模型。但如果是测试出现爆显存那就没办法了,只能裁剪图像减小尺寸。

Iceeteeea commented 7 months ago

谢谢,我头一次碰到训练没问题但验证爆显存的情况,有点懵😵

Algolzw commented 7 months ago

因为训练用的是小patch size而测试会使用大很多的size(如deblurring中训练使用256但测试可能会大于1000)。像很多图像复原的方法会使用patch-based复原再组合成最终大图,但这样会有一些artifacts。

特别是我们code里使用了cross-attention,这个使得尺寸的影响更大。

Iceeteeea commented 7 months ago

谢谢回复,我理解了🫡