Instructions to use moonbox-dev/trellis2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use moonbox-dev/trellis2 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download moonbox-dev/trellis2 --local-dir trellis2
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Download models/hf/BiRefNet/BiRefNet_config.py from moonbox-dev/trellis2: direct link, hf CLI and curl.
- Browser
- Download file 298 Bytes
-
https://huggingface.co/moonbox-dev/trellis2/resolve/main/models/hf/BiRefNet/BiRefNet_config.py
- Command line
-
hf download hf://moonbox-dev/trellis2/models/hf/BiRefNet/BiRefNet_config.py
-
curl -L -o BiRefNet_config.py https://huggingface.co/moonbox-dev/trellis2/resolve/main/models/hf/BiRefNet/BiRefNet_config.py
298 Bytes
| from transformers import PretrainedConfig | |
| class BiRefNetConfig(PretrainedConfig): | |
| model_type = "SegformerForSemanticSegmentation" | |
| def __init__( | |
| self, | |
| bb_pretrained=False, | |
| **kwargs | |
| ): | |
| self.bb_pretrained = bb_pretrained | |
| super().__init__(**kwargs) | |