ZhengPeng7 / BiRefNet

[CAAI AIR'24] Bilateral Reference for High-Resolution Dichotomous Image Segmentation
https://www.birefnet.top
MIT License
1.1k stars 85 forks source link

Recommended Requirements #101

Open PasqualePuzio opened 8 hours ago

PasqualePuzio commented 8 hours ago

Hi,

I'm struggling to run the portrait model on my system (Mac Studio, Chip M2 Max, 32GB of Memory), the ANECompilerService keeps running forever and I have to kill it manually several times in order to get the expected result.

I've also tried to run general model but it crashes due to insufficient memory.

The general-lite model has the same issues of the portrait model.

How much memory is needed in order to run these models?

I'm using onnxruntime.

ZhengPeng7 commented 6 hours ago

I'm not sure about running the ONNX models on Mac (M-series chips). But it works very well on my MacBook (M2, 16GB memory) with original PyTorch weights (all versions), either by running my HF demo locally or using the notebooks in tutorials.

I'll try the ONNX later when I have free time (in two days).

PasqualePuzio commented 5 hours ago

I'm not sure about running the ONNX models on Mac (M-series chips). But it works very well on my MacBook (M2, 16GB memory) with original PyTorch weights (all versions), either by running my HF demo locally or using the notebooks in tutorials.

I'll try the ONNX later when I have free time (in two days).

Thank you. In the meantime I'll try to run the model without ONNX. I'll keep you posted.