Closed julianallchin closed 2 years ago
I had the same problem. Just use pytorch 1.8.x
I am also seeing the same issue with pytorch 1.10.0, any suggestions that dont involve reverting to an older version?
edit: it appears several issues are fixed by setting jit to false when loading the clip model:
loading clip with jit set to false, then the requiresgrad error goes away
the error " 'RecursiveScriptModule' object has no attribute 'input_resolution' on line cut_size = perceptor.visual.input_resolution
is also resolved.
however, i had issues with 'backwards being called twice on released data', that i fixed with adding retain_graph to the backwads calls: backward(retain_graph=True)
I am not sure this retain_graph change is needed, however, as i have other modifications that may be causing this issue.
While it does work with Pytorch > 1.9.1, the line for detecting the Pytorch does not. Jit should only really be true when using 1.7.1
using cuda 11.2, built torch from source