Spaces:
Running
on
Zero
Upscaler support 4xNomos8kSCHAT-L.pth(FelipeMurguia/4xNomos8kSCHAT-L)?
Hi,Does the Upscaler module support other amplification algorithms?eg, 4xNomos8kSCHAT-L.pth, Nomos8kHAT-L_otf
Hi
@miFei12
, the underlying upscaler model of the enhancer is an ESRGAN (currently the space uses https://openmodeldb.info/models/4x-UltraSharp), so you should be able to directly replace it (without modifying the code) with a compatible ESRGAN checkpoint right here: https://huggingface.co/spaces/finegrain/finegrain-image-enhancer/blob/f3f480bb989a2498811308b050fcaef0541ccf0c/src/app.py#L81-L85
From what I see the two models you linked above aren't based on an ESRGAN architecture (but on a HAT architecture), so you'd have to tweak the code a bit.
You can use any model to pre-upscale by simply changing the pre_upscale function. (If you do not define the function at all it will use the function from the parent class which is naive upscaling using Pillow.)
@1aurent Is it difficult to modify it to be based on HAT structure? Are you willing to share the code based on HAT structure? If so, I will be very grateful.and appreciated for your answer.