├── postcss.config.js ├── tsconfig.node.json ├── src ├── main.tsx ├── types │ ├── images.d.ts │ ├── batch.ts │ ├── prediction.ts │ ├── asset.ts │ ├── model.ts │ ├── onnxruntime-web.d.ts │ └── progress.ts ├── components │ ├── ui │ │ ├── label.tsx │ │ ├── textarea.tsx │ │ ├── separator.tsx │ │ ├── input.tsx │ │ ├── toaster.tsx │ │ ├── progress.tsx │ │ ├── slider.tsx │ │ ├── checkbox.tsx │ │ ├── switch.tsx │ │ ├── tooltip.tsx │ │ ├── hover-card.tsx │ │ ├── badge.tsx │ │ ├── alert.tsx │ │ ├── scroll-area.tsx │ │ ├── button.tsx │ │ ├── tabs.tsx │ │ ├── card.tsx │ │ ├── dialog.tsx │ │ ├── alert-dialog.tsx │ │ ├── toast.tsx │ │ └── select.tsx │ ├── shared │ │ ├── ApiKeyRequired.tsx │ │ ├── ProcessingProgress.tsx │ │ └── LogConsole.tsx │ ├── playground │ │ ├── LoraSelector.tsx │ │ ├── BatchControls.tsx │ │ ├── DynamicForm.tsx │ │ └── ModelSelector.tsx │ ├── ffmpeg │ │ └── TimeRangeSlider.tsx │ └── layout │ │ └── Sidebar.tsx ├── lib │ ├── faceParsingUtils.ts │ ├── utils.ts │ ├── zImageModel.ts │ └── ffmpegFormats.ts ├── stores │ ├── themeStore.ts │ ├── settingsStore.ts │ ├── apiKeyStore.ts │ ├── modelsStore.ts │ └── templateStore.ts ├── App.tsx ├── i18n │ └── index.ts ├── hooks │ ├── useToast.ts │ ├── useUpscalerWorker.ts │ ├── useMultiPhaseProgress.ts │ ├── useBackgroundRemoverWorker.ts │ └── useImageEraserWorker.ts └── workers │ ├── upscaler.worker.ts │ └── segmentAnything.worker.ts ├── vite.config.ts ├── tsconfig.json ├── index.html ├── LICENSE ├── electron.vite.config.ts ├── .gitignore ├── tailwind.config.js ├── .github └── workflows │ ├── build.yml │ └── nightly.yml ├── scripts ├── patch_det10g.py └── extract_emap.py └── package.json /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true, 8 | "strict": true 9 | }, 10 | "include": ["electron.vite.config.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /src/main.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import { HashRouter } from 'react-router-dom' 4 | import App from './App' 5 | import './index.css' 6 | import './i18n' 7 | 8 | ReactDOM.createRoot(document.getElementById('root')!).render( 9 | 10 | 11 | 12 | 13 | 14 | ) 15 | -------------------------------------------------------------------------------- /vite.config.ts: -------------------------------------------------------------------------------- 1 | import { resolve } from 'path' 2 | import { defineConfig } from 'vite' 3 | import react from '@vitejs/plugin-react' 4 | 5 | export default defineConfig({ 6 | plugins: [react()], 7 | server: { 8 | port: 8989, 9 | host: '0.0.0.0', 10 | }, 11 | resolve: { 12 | alias: { 13 | '@': resolve(__dirname, 'src') 14 | } 15 | }, 16 | worker: { 17 | format: 'es' 18 | }, 19 | optimizeDeps: { 20 | exclude: ['@huggingface/transformers', '@ffmpeg/ffmpeg', '@ffmpeg/util'] 21 | } 22 | }) 23 | -------------------------------------------------------------------------------- /src/types/images.d.ts: -------------------------------------------------------------------------------- 1 | // Image module declarations for TypeScript 2 | declare module '*.png' { 3 | const src: string 4 | export default src 5 | } 6 | 7 | declare module '*.jpg' { 8 | const src: string 9 | export default src 10 | } 11 | 12 | declare module '*.jpeg' { 13 | const src: string 14 | export default src 15 | } 16 | 17 | declare module '*.gif' { 18 | const src: string 19 | export default src 20 | } 21 | 22 | declare module '*.svg' { 23 | const src: string 24 | export default src 25 | } 26 | 27 | declare module '*.webp' { 28 | const src: string 29 | export default src 30 | } 31 | 32 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | "moduleResolution": "bundler", 9 | "allowImportingTsExtensions": true, 10 | "resolveJsonModule": true, 11 | "isolatedModules": true, 12 | "noEmit": true, 13 | "jsx": "react-jsx", 14 | "strict": true, 15 | "noUnusedLocals": true, 16 | "noUnusedParameters": true, 17 | "noFallthroughCasesInSwitch": true, 18 | "baseUrl": ".", 19 | "paths": { 20 | "@/*": ["./src/*"] 21 | } 22 | }, 23 | "include": ["src", "electron"], 24 | "references": [{ "path": "./tsconfig.node.json" }] 25 | } 26 | -------------------------------------------------------------------------------- /src/components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import * as LabelPrimitive from "@radix-ui/react-label" 3 | import { cva, type VariantProps } from "class-variance-authority" 4 | import { cn } from "@/lib/utils" 5 | 6 | const labelVariants = cva( 7 | "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" 8 | ) 9 | 10 | const Label = React.forwardRef< 11 | React.ElementRef, 12 | React.ComponentPropsWithoutRef & 13 | VariantProps 14 | >(({ className, ...props }, ref) => ( 15 | 20 | )) 21 | Label.displayName = LabelPrimitive.Root.displayName 22 | 23 | export { Label } 24 | -------------------------------------------------------------------------------- /src/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import { cn } from "@/lib/utils" 3 | 4 | export interface TextareaProps 5 | extends React.TextareaHTMLAttributes {} 6 | 7 | const Textarea = React.forwardRef( 8 | ({ className, ...props }, ref) => { 9 | return ( 10 |