VSGAN icon indicating copy to clipboard operation
VSGAN copied to clipboard

Support for alternative compact model format

Open Zarxrax opened this issue 1 year ago • 2 comments

Using real-esrgan to train a model using the compact architecture results in a .pth model file that loads perfectly fine into VSGAN. There is an application called chaiNNer which can be used to work with and manipulate models. If I save the model in chaiNNer, it outputs a model which no longer works in VSGAN. One of the developers on chaiNNer said that real-esrgan creates its models with a lot of unnecessary information in the file that they strip out in order to be more in line with other types of models.

Would it be possible to add support for models in the format output by chaiNNer? I have attached a model that was output directly from real-esrgan and then a version that was saved through chaiNNer Models.zip .

Zarxrax avatar Jul 25 '22 20:07 Zarxrax

For reference @rlaphoenix, I added a simple extra condition to check for these kinds of models https://github.com/joeyballentine/chaiNNer/blob/2ced4094f201b4a7f6169fe36f498520f1784b5e/backend/src/nodes/pytorch_nodes.py#L41

Though I'm probably going to just make chaiNNer start saving these in their original format just for compatibility reasons, I didn't care about it previously because it was stupid how these were being saved officially (which I know you know since you also move the state out of the params key), but it does break compatibility with other stuff when saved.

joeyballentine avatar Jul 25 '22 22:07 joeyballentine

This is likely to be similar to this later issue which is now closed: https://github.com/rlaphoenix/VSGAN/issues/35

Could you try with the latest master and see if it works for you?

rlaphoenix avatar May 27 '23 19:05 rlaphoenix