add MAT model

This commit is contained in:
Qing
2022-08-22 23:24:02 +08:00
parent a5e840765e
commit 6d2b24ed6b
8 changed files with 2132 additions and 9 deletions

View File

@@ -131,6 +131,8 @@ function ModelSettingBlock() {
return renderLDMModelDesc()
case AIModel.ZITS:
return renderZITSModelDesc()
case AIModel.MAT:
return undefined
default:
return <></>
}
@@ -156,6 +158,12 @@ function ModelSettingBlock() {
'https://arxiv.org/abs/2203.00867',
'https://github.com/DQiaole/ZITS_inpainting'
)
case AIModel.MAT:
return renderModelDesc(
'Mask-Aware Transformer for Large Hole Image Inpainting',
'https://arxiv.org/pdf/2203.15270.pdf',
'https://github.com/fenglinglwb/MAT'
)
default:
return <></>
}

View File

@@ -7,6 +7,7 @@ export enum AIModel {
LAMA = 'lama',
LDM = 'ldm',
ZITS = 'zits',
MAT = 'mat',
}
export const fileState = atom<File | undefined>({
@@ -80,6 +81,12 @@ const defaultHDSettings: ModelsHDSettings = {
hdStrategyCropTrigerSize: 1024,
hdStrategyCropMargin: 128,
},
[AIModel.MAT]: {
hdStrategy: HDStrategy.CROP,
hdStrategyResizeLimit: 1024,
hdStrategyCropTrigerSize: 512,
hdStrategyCropMargin: 128,
},
}
export const settingStateDefault: Settings = {