Sanster / IOPaint

Image inpainting tool powered by SOTA AI Model. Remove any unwanted object, defect, people from your pictures or erase and replace(powered by stable diffusion) any thing on your pictures.

Home Page:https://www.iopaint.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Can't run UI

ggardlo opened this issue · comments

Describe the bug
Installed from source code and get RuntimeError: Directory '/home/.../IOPaint/iopaint/web_app' does not exist.
As web_app directory is in IOpaint main dir so I tried to copy it to iopaint and server starts without error but result is only blank page.

EDIT: I've tried also install from pip on another venv an shows me the same problem, just missing web_app dir path shows in local python files

commented

iopaint/web_app is created from this script https://github.com/Sanster/IOPaint/blob/main/publish.sh

Get a lot of errors when tried bash publish.sh
Found 847 errors in 55 files.

Errors Files
6 src/App.tsx:1
9 src/components/Coffee.tsx:1
18 src/components/Cropper.tsx:3
11 src/components/DiffusionProgress.tsx:1
44 src/components/Editor.tsx:1
18 src/components/Extender.tsx:4
30 src/components/FileManager.tsx:8
13 src/components/FileSelect.tsx:1
16 src/components/Header.tsx:1
4 src/components/ImageSize.tsx:4
14 src/components/InteractiveSeg.tsx:22
15 src/components/Plugins.tsx:17
8 src/components/PromptInput.tsx:1
87 src/components/Settings.tsx:2
13 src/components/Shortcuts.tsx:1
9 src/components/SidePanel/CV2Options.tsx:16
124 src/components/SidePanel/DiffusionOptions.tsx:1
11 src/components/SidePanel/LDMOptions.tsx:16
8 src/components/SidePanel/LabelTitle.tsx:5
9 src/components/SidePanel/index.tsx:1
5 src/components/Workspace.tsx:1
14 src/components/ui/accordion.tsx:1
17 src/components/ui/alert-dialog.tsx:1
18 src/components/ui/button.tsx:1
32 src/components/ui/context-menu.tsx:1
18 src/components/ui/dialog.tsx:1
33 src/components/ui/dropdown-menu.tsx:1
19 src/components/ui/form.tsx:1
11 src/components/ui/input.tsx:1
7 src/components/ui/label.tsx:1
5 src/components/ui/popover.tsx:1
6 src/components/ui/progress.tsx:1
8 src/components/ui/radio-group.tsx:1
8 src/components/ui/scroll-area.tsx:1
24 src/components/ui/select.tsx:1
5 src/components/ui/separator.tsx:1
15 src/components/ui/sheet.tsx:1
5 src/components/ui/slider.tsx:1
5 src/components/ui/switch.tsx:1
9 src/components/ui/tabs.tsx:1
5 src/components/ui/textarea.tsx:1
18 src/components/ui/toast.tsx:1
7 src/components/ui/toaster.tsx:15
8 src/components/ui/toggle.tsx:1
5 src/components/ui/tooltip.tsx:1
2 src/components/ui/use-toast.ts:2
1 src/hooks/useAsyncMemo.tsx:1
2 src/hooks/useHotkey.tsx:2
1 src/hooks/useImage.tsx:1
1 src/hooks/useInputImage.tsx:2
1 src/hooks/useResolution.tsx:1
3 src/lib/api.ts:11
54 src/lib/states.ts:1
3 src/lib/utils.ts:1
5 src/main.tsx:1
Needs to be any specific version of npm? Sorry I'm not familiar with JS and npm, maybe is something missing in my system?

Btw I also tried again clean instalation from pip install iopaint on new venv. Still blank page.

commented

Get a lot of errors when tried bash publish.sh Found 847 errors in 55 files.

Errors Files 6 src/App.tsx:1 9 src/components/Coffee.tsx:1 18 src/components/Cropper.tsx:3 11 src/components/DiffusionProgress.tsx:1 44 src/components/Editor.tsx:1 18 src/components/Extender.tsx:4 30 src/components/FileManager.tsx:8 13 src/components/FileSelect.tsx:1 16 src/components/Header.tsx:1 4 src/components/ImageSize.tsx:4 14 src/components/InteractiveSeg.tsx:22 15 src/components/Plugins.tsx:17 8 src/components/PromptInput.tsx:1 87 src/components/Settings.tsx:2 13 src/components/Shortcuts.tsx:1 9 src/components/SidePanel/CV2Options.tsx:16 124 src/components/SidePanel/DiffusionOptions.tsx:1 11 src/components/SidePanel/LDMOptions.tsx:16 8 src/components/SidePanel/LabelTitle.tsx:5 9 src/components/SidePanel/index.tsx:1 5 src/components/Workspace.tsx:1 14 src/components/ui/accordion.tsx:1 17 src/components/ui/alert-dialog.tsx:1 18 src/components/ui/button.tsx:1 32 src/components/ui/context-menu.tsx:1 18 src/components/ui/dialog.tsx:1 33 src/components/ui/dropdown-menu.tsx:1 19 src/components/ui/form.tsx:1 11 src/components/ui/input.tsx:1 7 src/components/ui/label.tsx:1 5 src/components/ui/popover.tsx:1 6 src/components/ui/progress.tsx:1 8 src/components/ui/radio-group.tsx:1 8 src/components/ui/scroll-area.tsx:1 24 src/components/ui/select.tsx:1 5 src/components/ui/separator.tsx:1 15 src/components/ui/sheet.tsx:1 5 src/components/ui/slider.tsx:1 5 src/components/ui/switch.tsx:1 9 src/components/ui/tabs.tsx:1 5 src/components/ui/textarea.tsx:1 18 src/components/ui/toast.tsx:1 7 src/components/ui/toaster.tsx:15 8 src/components/ui/toggle.tsx:1 5 src/components/ui/tooltip.tsx:1 2 src/components/ui/use-toast.ts:2 1 src/hooks/useAsyncMemo.tsx:1 2 src/hooks/useHotkey.tsx:2 1 src/hooks/useImage.tsx:1 1 src/hooks/useInputImage.tsx:2 1 src/hooks/useResolution.tsx:1 3 src/lib/api.ts:11 54 src/lib/states.ts:1 3 src/lib/utils.ts:1 5 src/main.tsx:1 Needs to be any specific version of npm? Sorry I'm not familiar with JS and npm, maybe is something missing in my system?

Please run npm install in the IOPaint/web_app directory first.

commented

Btw I also tried again clean instalation from pip install iopaint on new venv. Still blank page.

It may be that there are errors in the front-end webpage. Could you please open the developer tools in Chrome to see if there are any errors? Also, are there any errors in the command line? Thank you.
image

npm install in web_app directory done some job, returned success.
After that I run bash publish.sh.
✓ 2084 modules transformed.
dist/index.html 0.39 kB │ gzip: 0.26 kB
dist/assets/Inter-Thin-eKObIkJC.woff2 106.62 kB
dist/assets/Inter-Regular-dEFHw1tF.woff2 108.49 kB
dist/assets/Inter-Black-jiII8dog.woff2 108.75 kB
dist/assets/Inter-Light-DFhX0qo-.woff2 109.99 kB
dist/assets/Inter-ExtraLight-w5HAp5iF.woff2 110.18 kB
dist/assets/Inter-Bold-srYz_-1B.woff2 111.04 kB
dist/assets/Inter-ExtraBold-TduDdwUu.woff2 111.36 kB
dist/assets/Inter-Medium-dDRaJ8tM.woff2 111.38 kB
dist/assets/Inter-SemiBold-PyS8DO2L.woff2 111.59 kB
dist/assets/Inter-ThinItalic-L6uBn3RP.woff2 113.38 kB
dist/assets/Inter-Italic-f6M78thn.woff2 114.58 kB
dist/assets/Inter-BlackItalic-1413vuen.woff2 115.36 kB
dist/assets/Inter-ExtraLightItalic-ZptecSuc.woff2 116.30 kB
dist/assets/Inter-LightItalic-fu56_DRc.woff2 116.52 kB
dist/assets/Inter-SemiBoldItalic-uIDb7hsH.woff2 118.22 kB
dist/assets/Inter-MediumItalic-zr3roggP.woff2 118.39 kB
dist/assets/Inter-BoldItalic-dE_gZyur.woff2 118.39 kB
dist/assets/Inter-ExtraBoldItalic-BJafRE5I.woff2 118.60 kB
dist/assets/kofi_button_black-XI_Dr2zg.png 207.93 kB
dist/assets/index-p0ivNJpo.css 40.20 kB │ gzip: 7.75 kB
dist/assets/index-pJO_6S87.js 767.09 kB │ gzip: 246.42 kB

(!) Some chunks are larger than 500 kB after minification. Consider:

  • Using dynamic import() to code-split the application
  • Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
  • Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
    ✓ built in 3.22s
    ~/IOPaint
    rm: can't remove './iopaint/web_app': No such file or directory.
    Then run: python main.py start
    RuntimeError: Directory '/home/grd/IOPaint/iopaint/web_app' does not exist

version installed from pip just started. Wat was weird after opeging tab I get blak tab, started working after refresh xD

commented

npm install in web_app directory done some job, returned success. After that I run bash publish.sh. ✓ 2084 modules transformed. dist/index.html 0.39 kB │ gzip: 0.26 kB dist/assets/Inter-Thin-eKObIkJC.woff2 106.62 kB dist/assets/Inter-Regular-dEFHw1tF.woff2 108.49 kB dist/assets/Inter-Black-jiII8dog.woff2 108.75 kB dist/assets/Inter-Light-DFhX0qo-.woff2 109.99 kB dist/assets/Inter-ExtraLight-w5HAp5iF.woff2 110.18 kB dist/assets/Inter-Bold-srYz_-1B.woff2 111.04 kB dist/assets/Inter-ExtraBold-TduDdwUu.woff2 111.36 kB dist/assets/Inter-Medium-dDRaJ8tM.woff2 111.38 kB dist/assets/Inter-SemiBold-PyS8DO2L.woff2 111.59 kB dist/assets/Inter-ThinItalic-L6uBn3RP.woff2 113.38 kB dist/assets/Inter-Italic-f6M78thn.woff2 114.58 kB dist/assets/Inter-BlackItalic-1413vuen.woff2 115.36 kB dist/assets/Inter-ExtraLightItalic-ZptecSuc.woff2 116.30 kB dist/assets/Inter-LightItalic-fu56_DRc.woff2 116.52 kB dist/assets/Inter-SemiBoldItalic-uIDb7hsH.woff2 118.22 kB dist/assets/Inter-MediumItalic-zr3roggP.woff2 118.39 kB dist/assets/Inter-BoldItalic-dE_gZyur.woff2 118.39 kB dist/assets/Inter-ExtraBoldItalic-BJafRE5I.woff2 118.60 kB dist/assets/kofi_button_black-XI_Dr2zg.png 207.93 kB dist/assets/index-p0ivNJpo.css 40.20 kB │ gzip: 7.75 kB dist/assets/index-pJO_6S87.js 767.09 kB │ gzip: 246.42 kB

(!) Some chunks are larger than 500 kB after minification. Consider:

  • Using dynamic import() to code-split the application
  • Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
  • Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
    ✓ built in 3.22s
    ~/IOPaint
    rm: can't remove './iopaint/web_app': No such file or directory.
    Then run: python main.py start
    RuntimeError: Directory '/home/grd/IOPaint/iopaint/web_app' does not exist

publish.sh did not check if iopaint/web_app exists 😅, you can manually copy with cp -r web_app/dist ./iopaint/web_app

OK great, thanks for your help. Btw great job with this program, I started to ply with it and I'm impressed.