Closed RunDevelopment closed 9 months ago
The issue with this pro key is that it is not part of the architecture itself.
Could we just make it part of the architecture itself?
Good idea. The official repo sets pro
to the int 1, but it doesn't actually check that value, it only checks whether the key exists. So we have a tensor (size [1]) and assign it to the pro
field. PyTorch would then save this tensor just like any other tensor and add the pro
key we need to the state dict.
As explained here, Real-CUGAN pro models have a weird trick to them. The authors added a
pro
key to the state dict, and that is the only difference to regular Real-CUGAN models. The issue with thispro
key is that it is not part of the architecture itself. This means that saving a pro model will not include thepro
key. The goal of this issue is to find a solution to this problem.@joeyballentine suggested the following solution:
My response: