Sanster/IOPaint

[BUG] - Sam v2 is not working on the latest version: IOPaint-1.4.2

AlonDan opened this issue · 2 comments

Describe the bug
Launching the latest version IOPaint-1.4.2 works only without the new Sam2.

I've added the following to the .bat file:
--enable-interactive-seg --interactive-seg-model=sam2_base --interactive-seg-device=cuda

And I get the error that says:

┌─ Error ─────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Invalid value for '--interactive-seg-model': 'sam2_base' is not one of 'vit_b', 'vit_l', 'vit_h', 'sam_hq_vit_b',   │
│ 'sam_hq_vit_l', 'sam_hq_vit_h', 'mobile_sam'.                                                                       │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Press any key to continue . . .

✅ Just to be clear it works fine with the old Sam v1 no issues at all.

Screenshots
cmd_2024-08-27_14-26-50


Do I need to download Sam2 models manually?
If so where from and in what directory in IOPaint should I put them?

Thanks ahead 🙏

  • The sam2 model does not need to be manually downloaded, it will automatically download at startup.
  • Can you confirm the version of iopaint? The version number will be printed when the service starts. Based on the error message, it seems you are using an older version.
image

Thanks for the detailed reply,

You're right it shows 1.3.3
This is strange because I defiantly downloaded and used the latest ZIP (source) from the website and even the file name is: IOPaint-iopaint-1.4.2

What I'm trying now is to just install it from scratch, hopefully it will overwrite the old version and update it via: pip3 install iopaint


UPDATE:

SOLVED by uninstall, and install all from scratch.