Issue with transformers 5
The birefnet repo was updated at https://github.com/ZhengPeng7/BiRefNet.
The RMBG 2.0 model seems to fail with message:
File "/root/.cache/huggingface/modules/transformers_modules/RMBG_hyphen_2_dot_0/birefnet.py", line 1225, in swin_v1_l
model = SwinTransformer(embed_dim=192, depths=[2, 2, 18, 2], num_heads=[6, 12, 24, 48], window_size=12)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.cache/huggingface/modules/transformers_modules/RMBG_hyphen_2_dot_0/birefnet.py", line 1131, in init
dpr = [x.item() for x in torch.linspace(0, drop_path_rate, sum(depths))] # stochastic depth decay rule
^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/torch/utils/_device.py", line 109, in torch_function
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/torch/_meta_registrations.py", line 7779, in meta_local_scalar_dense
raise RuntimeError("Tensor.item() cannot be called on meta tensors")
RuntimeError: Tensor.item() cannot be called on meta tensors
Note: Using the model via comfy layer style node.