add gfpgan
This commit is contained in:
@@ -598,6 +598,15 @@ export default function Editor() {
|
||||
}
|
||||
}, [runRenderablePlugin])
|
||||
|
||||
useEffect(() => {
|
||||
emitter.on(PluginName.GFPGAN, () => {
|
||||
runRenderablePlugin(PluginName.GFPGAN)
|
||||
})
|
||||
return () => {
|
||||
emitter.off(PluginName.GFPGAN)
|
||||
}
|
||||
}, [runRenderablePlugin])
|
||||
|
||||
useEffect(() => {
|
||||
emitter.on(PluginName.RealESRGAN, (data: any) => {
|
||||
runRenderablePlugin(PluginName.RealESRGAN, data)
|
||||
|
||||
@@ -4,6 +4,7 @@ import { CursorArrowRaysIcon, GifIcon } from '@heroicons/react/24/outline'
|
||||
import {
|
||||
BoxModelIcon,
|
||||
ChevronRightIcon,
|
||||
FaceIcon,
|
||||
HobbyKnifeIcon,
|
||||
MixIcon,
|
||||
} from '@radix-ui/react-icons'
|
||||
@@ -20,6 +21,7 @@ import Button from '../shared/Button'
|
||||
export enum PluginName {
|
||||
RemoveBG = 'RemoveBG',
|
||||
RealESRGAN = 'RealESRGAN',
|
||||
GFPGAN = 'GFPGAN',
|
||||
InteractiveSeg = 'InteractiveSeg',
|
||||
MakeGIF = 'MakeGIF',
|
||||
}
|
||||
@@ -33,6 +35,10 @@ const pluginMap = {
|
||||
IconClass: BoxModelIcon,
|
||||
showName: 'RealESRGAN 4x',
|
||||
},
|
||||
[PluginName.GFPGAN]: {
|
||||
IconClass: FaceIcon,
|
||||
showName: 'GFPGAN',
|
||||
},
|
||||
[PluginName.InteractiveSeg]: {
|
||||
IconClass: CursorArrowRaysIcon,
|
||||
showName: 'Interactive Seg',
|
||||
|
||||
Reference in New Issue
Block a user