Upscaler support 4xNomos8kSCHAT-L.pth(FelipeMurguia/4xNomos8kSCHAT-L)?

#4
by miFei12 - opened

Hi,Does the Upscaler module support other amplification algorithms?eg, 4xNomos8kSCHAT-L.pth, Nomos8kHAT-L_otf

Finegrain org

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.

Finegrain org
edited Sep 26

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.)

This comment has been hidden
miFei12 changed discussion status to closed
This comment has been hidden
miFei12 changed discussion status to open
miFei12 changed discussion status to closed
miFei12 changed discussion status to open

@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.

Sign up or log in to comment