Run this model with HF Jobs

Run briaai/RMBG-2.0 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/briaai/RMBG-2.0. Ask me which dataset to train on, then push the fine-tuned model to a new private model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/briaai/RMBG-2.0 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Issue with transformers 5

#47
by ansat7 - opened

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.

BRIA AI org

@ansat7 thanks for letting us know.
it should be working now.

Sign up or log in to comment