Skip to content

[Bug] 1.4.2最新版本选择SAM模型后崩溃 #306

@penfj

Description

@penfj

🐛 问题描述 | Description

1.4.2最新版本选择SAM模型后崩溃
调试日志:
(isat-env) PS F:\TEST\ISAT_with_segment_anything-master\ISAT_with_segment_anything-master> python.exe .\main.py
loading plugins

  • Init SAM... *
    Init SAM Error: Plain typing.Self is not valid as type argument

  • Init SAM for video... *
    • device : cuda
    • dtype : torch.bfloat16
    • loading : F:\TEST\ISAT_with_segment_anything-master\ISAT_with_segment_anything-master\ISAT\checkpoints\sam2.1_hiera_tiny.pt
  • Init SAM for video finished *

sam_tag: False sam_video_tag: True
Traceback (most recent call last):
File "F:\TEST\ISAT_with_segment_anything-master\ISAT_with_segment_anything-master\ISAT\widgets\mainwindow.py", line 609, in init_sam_finish
if self.segany.model_dtype == torch.float32:
AttributeError: 'MainWindow' object has no attribute 'segany'
(isat-env) PS F:\TEST\ISAT_with_segment_anything-master\ISAT_with_segment_anything-master>

💻 运行环境 | Environment

  • 操作系统 | OS: [Windows ]
  • 版本 | Version [e.g. v1.4.2]

🔍 重现步骤 | Reproduce

  1. step 1: clone最新代码
  2. step 2: pip install PySide6 (1.4.2 依赖)
  3. step 3: 执行打开isat-加载图像文件夹(正常显示图像及标签)
  4. step 4: 打开SAM界面下载sam2.1_hiera_tiny.pt(最后一个),选择sam2.1_hiera_tiny.pt,界面卡死直至崩溃

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions