rlaphoenix / VSGAN

PyTorch-based Super-Resolution and Restoration Image Processing Module for VapourSynth
https://vsgan.phoeniix.dev
MIT License
190 stars 13 forks source link

VSGAN does not return a clip #12

Closed styler00dollar closed 2 years ago

styler00dollar commented 2 years ago
clip = vs.core.resize.Bicubic(clip, width=848, height=480, format=vs.RGBS, matrix_in_s='709')
clip = VSGAN(clip, device="cuda").load_model("model.pth").run(overlap=16)
clip = vs.core.resize.Bicubic(clip, format=vs.YUV420P8, matrix_s="709")
vapoursynth.Error: Bicubic: argument clip was passed an unsupported type (expected vnode compatible type but got VSGAN)

https://github.com/rlaphoenix/VSGAN/blob/3a894f3f7cf2e0ea1dca834d4234f1a9087762e3/vsgan/__init__.py#L113 Change this to return self.clip, to return the clip and it will work again.

rlaphoenix commented 2 years ago

Doing return self.clip won't work as we will not then be able to access the other functions of VSGAN class.

Your mistake is not doing a .clip at the end of the call, after .run(...)

styler00dollar commented 2 years ago

Seems like i overlooked .clip and this would be a workaround to fix that. Thanks.