Image-to-Image
Diffusers
Safetensors
flux
semantic-segmentation
instance-segmentation
referring-segmentation
depth-estimation
surface-normal-estimation
image-editing
text-to-image
Instructions to use FunAILab/Open-Vision-Banana with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use FunAILab/Open-Vision-Banana with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("FunAILab/Open-Vision-Banana", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Model card: task collage, editing and generation prompts, LoRA adapters
Browse files
README.md
CHANGED
|
@@ -46,7 +46,7 @@ Install PyTorch with CUDA support first, then:
|
|
| 46 |
pip install "diffusers>=0.37.0" transformers accelerate safetensors pillow
|
| 47 |
```
|
| 48 |
|
| 49 |
-
The fine-tuned transformer is swapped into the [FLUX.2 [klein] base 9B](https://huggingface.co/black-forest-labs/FLUX.2-klein-base-9B) pipeline. One model handles every task and the prompt selects it. This example runs <img src="assets/icons/semseg.png" width="26" alt=""> semantic segmentation:
|
| 50 |
|
| 51 |
```python
|
| 52 |
import torch
|
|
@@ -92,7 +92,7 @@ output.resize(image.size, Image.NEAREST).save("output.png")
|
|
| 92 |
|
| 93 |
Replace `prompt` above with one of these.
|
| 94 |
|
| 95 |
-
<
|
| 96 |
|
| 97 |
```python
|
| 98 |
prompt = (
|
|
@@ -102,7 +102,7 @@ prompt = (
|
|
| 102 |
)
|
| 103 |
```
|
| 104 |
|
| 105 |
-
<
|
| 106 |
|
| 107 |
```python
|
| 108 |
prompt = (
|
|
@@ -120,7 +120,7 @@ prompt = (
|
|
| 120 |
)
|
| 121 |
```
|
| 122 |
|
| 123 |
-
<
|
| 124 |
|
| 125 |
```python
|
| 126 |
prompt = (
|
|
@@ -133,7 +133,7 @@ prompt = (
|
|
| 133 |
)
|
| 134 |
```
|
| 135 |
|
| 136 |
-
<
|
| 137 |
|
| 138 |
```python
|
| 139 |
prompt = (
|
|
@@ -144,7 +144,7 @@ prompt = (
|
|
| 144 |
)
|
| 145 |
```
|
| 146 |
|
| 147 |
-
<
|
| 148 |
|
| 149 |
```python
|
| 150 |
prompt = (
|
|
@@ -152,7 +152,7 @@ prompt = (
|
|
| 152 |
)
|
| 153 |
```
|
| 154 |
|
| 155 |
-
<
|
| 156 |
|
| 157 |
Call the pipeline without `image` and give it a size:
|
| 158 |
|
|
|
|
| 46 |
pip install "diffusers>=0.37.0" transformers accelerate safetensors pillow
|
| 47 |
```
|
| 48 |
|
| 49 |
+
The fine-tuned transformer is swapped into the [FLUX.2 [klein] base 9B](https://huggingface.co/black-forest-labs/FLUX.2-klein-base-9B) pipeline. One model handles every task and the prompt selects it. This example runs <a href="#quickstart"><img src="assets/icons/semseg.png" width="26" alt=""></a> semantic segmentation:
|
| 50 |
|
| 51 |
```python
|
| 52 |
import torch
|
|
|
|
| 92 |
|
| 93 |
Replace `prompt` above with one of these.
|
| 94 |
|
| 95 |
+
<a href="#quickstart-prompts-for-the-other-tasks"><img src="assets/icons/refseg.png" width="26" alt=""></a> **Referring segmentation**
|
| 96 |
|
| 97 |
```python
|
| 98 |
prompt = (
|
|
|
|
| 102 |
)
|
| 103 |
```
|
| 104 |
|
| 105 |
+
<a href="#quickstart-prompts-for-the-other-tasks"><img src="assets/icons/instanceseg.png" width="26" alt=""></a> **Instance segmentation**
|
| 106 |
|
| 107 |
```python
|
| 108 |
prompt = (
|
|
|
|
| 120 |
)
|
| 121 |
```
|
| 122 |
|
| 123 |
+
<a href="#quickstart-prompts-for-the-other-tasks"><img src="assets/icons/depth.png" width="26" alt=""></a> **Depth estimation**
|
| 124 |
|
| 125 |
```python
|
| 126 |
prompt = (
|
|
|
|
| 133 |
)
|
| 134 |
```
|
| 135 |
|
| 136 |
+
<a href="#quickstart-prompts-for-the-other-tasks"><img src="assets/icons/normals.png" width="26" alt=""></a> **Surface normal estimation**
|
| 137 |
|
| 138 |
```python
|
| 139 |
prompt = (
|
|
|
|
| 144 |
)
|
| 145 |
```
|
| 146 |
|
| 147 |
+
<a href="#quickstart-prompts-for-the-other-tasks"><img src="assets/icons/imgedit.png" width="26" alt=""></a> **Image editing**
|
| 148 |
|
| 149 |
```python
|
| 150 |
prompt = (
|
|
|
|
| 152 |
)
|
| 153 |
```
|
| 154 |
|
| 155 |
+
<a href="#quickstart-prompts-for-the-other-tasks"><img src="assets/icons/generation.png" width="26" alt=""></a> **Text-to-image generation**
|
| 156 |
|
| 157 |
Call the pipeline without `image` and give it a size:
|
| 158 |
|