Instructions to use TurboGhoster/FLUX2-KLEIN-4B-BIREFNET-RUNTIME with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- BiRefNet
How to use TurboGhoster/FLUX2-KLEIN-4B-BIREFNET-RUNTIME with BiRefNet:
# Option 1: use with transformers from transformers import AutoModelForImageSegmentation birefnet = AutoModelForImageSegmentation.from_pretrained("TurboGhoster/FLUX2-KLEIN-4B-BIREFNET-RUNTIME", trust_remote_code=True)# Option 2: use with BiRefNet # Install from https://github.com/ZhengPeng7/BiRefNet from models.birefnet import BiRefNet model = BiRefNet.from_pretrained("TurboGhoster/FLUX2-KLEIN-4B-BIREFNET-RUNTIME") - Notebooks
- Google Colab
- Kaggle
Download NOTICE from TurboGhoster/FLUX2-KLEIN-4B-BIREFNET-RUNTIME: direct link, hf CLI and curl.
- Browser
- Download file 2.89 kB
-
https://huggingface.co/TurboGhoster/FLUX2-KLEIN-4B-BIREFNET-RUNTIME/resolve/main/NOTICE
- Command line
-
hf download hf://TurboGhoster/FLUX2-KLEIN-4B-BIREFNET-RUNTIME/NOTICE
-
curl -L -o NOTICE https://huggingface.co/TurboGhoster/FLUX2-KLEIN-4B-BIREFNET-RUNTIME/resolve/main/NOTICE
2.89 kB
| Third-party model component attribution | |
| This public deployment bundle contains unchanged model component files from | |
| the upstream repositories and revisions below. GhostStack did not train or | |
| modify these files and does not claim ownership of the upstream weights. | |
| 1. Diffusion model | |
| File: diffusion_models/flux-2-klein-4b-fp8.safetensors | |
| Source: Black Forest Labs, black-forest-labs/FLUX.2-klein-4b-fp8 | |
| Revision: c30fa39e0d916333415ae96c66169d8cfdca3e63 | |
| License: Apache-2.0 | |
| SHA-256: 97ed34fe0567e436200f2faee3939b88f2b5d99f8af2a4dc16532c4245c0ccb6 | |
| Bytes: 4070624520 | |
| 2. Text encoder | |
| File: text_encoders/qwen_3_4b.safetensors | |
| Source: Comfy-Org/vae-text-encorder-for-flux-klein-4b | |
| Revision: 8556e4d870cda7c53c7942b190bfeea5be9bd411 | |
| License: Apache-2.0 | |
| SHA-256: 6c671498573ac2f7a5501502ccce8d2b08ea6ca2f661c458e708f36b36edfc5a | |
| Bytes: 8044982048 | |
| Original model family: Qwen3-4B by Alibaba Cloud; Apache-2.0. | |
| 3. VAE | |
| File: vae/flux2-vae.safetensors | |
| Source: Comfy-Org/vae-text-encorder-for-flux-klein-4b | |
| Revision: a9e4ca87c16db4c4e1a16406a9ddb300ab0ae246 | |
| License: Apache-2.0 | |
| SHA-256: 868fe7b343ccf8f3a19dbcfcafbc3d5f888802be3f89bd81b65b3621a066ce8f3 | |
| Bytes: 336211292 | |
| 4. Background removal | |
| File: background_removal/birefnet.safetensors | |
| Source: Comfy-Org/BiRefNet | |
| Revision: 5a1bd8ae750548f8cd42e3c8afa854fd3eba0fb1 | |
| Source model path: background_removal/birefnet.safetensors | |
| Original model repository: ZhengPeng7/BiRefNet | |
| License: MIT | |
| SHA-256: 9ab37426bf4de0567af6b5d21b16151357149139362e6e8992021b8ce356a154 | |
| Bytes: 444473596 | |
| The Comfy-Org/BiRefNet model card at the frozen revision declares MIT | |
| licensing and identifies the original BiRefNet repository. The MIT license | |
| text below is the authoritative upstream text from ZhengPeng7/BiRefNet. | |
| MIT License | |
| Copyright (c) 2024 ZhengPeng | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in all | |
| copies or substantial portions of the Software. | |
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
| SOFTWARE. | |