Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regarding OpenCV3699, cv::hal::resize #17

Open
qingzhenbiaojie opened this issue Mar 30, 2024 · 8 comments
Open

Regarding OpenCV3699, cv::hal::resize #17

qingzhenbiaojie opened this issue Mar 30, 2024 · 8 comments

Comments

@qingzhenbiaojie
Copy link

QQ截图20240330191143

how to solve this problem?????

@time-river
Copy link

time-river commented Apr 1, 2024

It seems that the API change results the problem.
Try it:

        with torch.no_grad():
            outputs = model(**input_prc)
        
        preds = outputs.logits.unsqueeze(1)
        tensor = torch.sigmoid(preds[0][0]) # get the mask

cv 4.9.0, transformers 4.39.2 works well

commit: time-river@288a19f

time-river added a commit to time-river/ComfyUI-CLIPSeg that referenced this issue Apr 1, 2024
ref:
biegert#17

cv 4.9.0, transformers 4.39.2 works well

Signed-off-by: Fu Lin <[email protected]>
@qingzhenbiaojie
Copy link
Author

@time-river 感谢大哥,大哥棒!

@HydraBucket
Copy link

What file must I edit to impliment these changes?

@dimroce
Copy link

dimroce commented Apr 5, 2024

我必须编辑哪个文件才能实现这些更改?

..comfyui\custom_nodes\clipseg.py

@HydraBucket
Copy link

HydraBucket commented Apr 8, 2024

Lol... im a noob and didnt realise I could just copy his code rather than trying to implement the slight change myself.... didn't work when I did it, worked with the copied code... definitely an issue on my end lol. Thank you, time-river and dimroce.

@CatDadChris
Copy link

Replacing the clipseg.py file found in comfyui\custom_nodes\ with the one from time-river (time-river@288a19f) worked for me as well. Thanks!

@xuxucca
Copy link

xuxucca commented Apr 19, 2024

Try installing transformers up to 4.36.0 if you can!

@LichAcademy
Copy link

LichAcademy commented May 20, 2024

Try installing transformers up to 4.36.0 if you can!

Thank you so much! It was transformers all along! Modifying the original clipseg.py did not fix it for me.

Folks, anyone reading this and still having issues, this solved it for me:

pip uninstall -y transformers
pip install transformers<=4.36.0

(PS This will also change the version of your tokenizer.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants