-
Notifications
You must be signed in to change notification settings - Fork 39
Description
具体描述
Hello,
'realcugan' tends to create chromatic aberration when the 'tile size' setting is too low. You can see an example in the attached images (note the purple chromatic aberration at the bottom of the page).
To resolve the issue, simply increase the tile size (in the second image, I set it to 512 and there are no more problems).
I found a code section with the options:
// 为了省事,就不支持调整参数了 // 不会支持透明图片,处理起来太麻烦了 // 代码均抄自 // https://github.com/xororz/web-realesrgan/blob/f81d2dd7935ee8df947674933fd41a446b90e911/src/worker.js // 只删去了因参数固定而变得冗余的代码 // // 模型文件在 Releases 下载 // // https://cappuccino.moe/realcugan/2x-conservative-128/model.json const factor = 2; const input_size = 128; const min_lap = 12;
But the selected model seems to be locked to a size of 128. Setting the variable to 512 triggers the following error:
Uncaught (in promise) Error: The shape of dict['input'] provided in model.execute(dict) must be [1,128,128,3], but was [1,512,512,3] at F$ (<anonymous>:19:171470) at <anonymous>:19:906648 at Array.forEach (<anonymous>) at e.value (<anonymous>:19:906413) at e.value (<anonymous>:19:898437) at e.value (<anonymous>:19:915549) at e.value (<anonymous>:19:912946) at <anonymous>:106:38 at <anonymous>:19:220203 at e.value (<anonymous>:19:220344)
Do you think it would be possible to allow users to change the Tile Size?