Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/nobg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
from .birefnet.image_processing_birefnet import BiRefNetImageProcessor
from .birefnet.modeling_birefnet import BiRefNet

__version__ = "0.2.4"
__version__ = "0.2.5"
4 changes: 2 additions & 2 deletions src/nobg/auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AutoModel:
@set_doc(PyTorchModelHubMixin.from_pretrained.__doc__)
def from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs):
tags: list[str] = model_info(pretrained_model_name_or_path).tags or []
if "birefnet" in tags:
if "biref" in tags or "birefnet" in tags:
return BiRefNet.from_pretrained(
pretrained_model_name_or_path, *model_args, **kwargs
)
Expand Down Expand Up @@ -52,7 +52,7 @@ def from_pretrained(cls, pretrained_model_name_or_path, **kwargs):
@staticmethod
def _from_model_config(pretrained_model_name_or_path, **kwargs):
tags: list[str] = model_info(pretrained_model_name_or_path).tags or []
if "birefnet" not in tags:
if "biref" not in tags and "birefnet" not in tags:
raise ValueError("this model is not part of nobg")
config_file = hf_hub_download(
pretrained_model_name_or_path,
Expand Down
2 changes: 1 addition & 1 deletion src/nobg/birefnet/modeling_birefnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ class BiRefNet(
repo_url="https://github.com/feyninc/nobg",
paper_url="https://arxiv.org/abs/2401.03407",
license="apache-2.0",
tags=["nobg", "birefnet"],
tags=["nobg", "biref"],
model_card_template=model_card_template(
class_name="BiRefNet",
default_repo="nobg/birefnet",
Expand Down
Loading