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 +9 -7
- assets/icons/depth.png +0 -0
- assets/icons/generation.png +0 -0
- assets/icons/imgedit.png +0 -0
- assets/icons/instanceseg.png +0 -0
- assets/icons/normals.png +0 -0
- assets/icons/refseg.png +0 -0
- assets/icons/semseg.png +0 -0
- assets/labels/depth.png +0 -0
- assets/labels/generation.png +0 -0
- assets/labels/imgedit.png +0 -0
- assets/labels/instanceseg.png +0 -0
- assets/labels/normals.png +0 -0
- assets/labels/refseg.png +0 -0
- assets/labels/semseg.png +0 -0
README.md
CHANGED
|
@@ -46,7 +46,9 @@ 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
|
|
|
|
|
|
|
| 50 |
|
| 51 |
```python
|
| 52 |
import torch
|
|
@@ -92,7 +94,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 +104,7 @@ prompt = (
|
|
| 102 |
)
|
| 103 |
```
|
| 104 |
|
| 105 |
-
<
|
| 106 |
|
| 107 |
```python
|
| 108 |
prompt = (
|
|
@@ -120,7 +122,7 @@ prompt = (
|
|
| 120 |
)
|
| 121 |
```
|
| 122 |
|
| 123 |
-
<
|
| 124 |
|
| 125 |
```python
|
| 126 |
prompt = (
|
|
@@ -133,7 +135,7 @@ prompt = (
|
|
| 133 |
)
|
| 134 |
```
|
| 135 |
|
| 136 |
-
<
|
| 137 |
|
| 138 |
```python
|
| 139 |
prompt = (
|
|
@@ -144,7 +146,7 @@ prompt = (
|
|
| 144 |
)
|
| 145 |
```
|
| 146 |
|
| 147 |
-
<
|
| 148 |
|
| 149 |
```python
|
| 150 |
prompt = (
|
|
@@ -152,7 +154,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:
|
| 50 |
+
|
| 51 |
+
<img src="assets/labels/semseg.png" width="255" alt="Semantic segmentation">
|
| 52 |
|
| 53 |
```python
|
| 54 |
import torch
|
|
|
|
| 94 |
|
| 95 |
Replace `prompt` above with one of these.
|
| 96 |
|
| 97 |
+
<img src="assets/labels/refseg.png" width="257" alt="Referring segmentation">
|
| 98 |
|
| 99 |
```python
|
| 100 |
prompt = (
|
|
|
|
| 104 |
)
|
| 105 |
```
|
| 106 |
|
| 107 |
+
<img src="assets/labels/instanceseg.png" width="248" alt="Instance segmentation">
|
| 108 |
|
| 109 |
```python
|
| 110 |
prompt = (
|
|
|
|
| 122 |
)
|
| 123 |
```
|
| 124 |
|
| 125 |
+
<img src="assets/labels/depth.png" width="194" alt="Depth estimation">
|
| 126 |
|
| 127 |
```python
|
| 128 |
prompt = (
|
|
|
|
| 135 |
)
|
| 136 |
```
|
| 137 |
|
| 138 |
+
<img src="assets/labels/normals.png" width="282" alt="Surface normal estimation">
|
| 139 |
|
| 140 |
```python
|
| 141 |
prompt = (
|
|
|
|
| 146 |
)
|
| 147 |
```
|
| 148 |
|
| 149 |
+
<img src="assets/labels/imgedit.png" width="161" alt="Image editing">
|
| 150 |
|
| 151 |
```python
|
| 152 |
prompt = (
|
|
|
|
| 154 |
)
|
| 155 |
```
|
| 156 |
|
| 157 |
+
<img src="assets/labels/generation.png" width="271" alt="Text-to-image generation">
|
| 158 |
|
| 159 |
Call the pipeline without `image` and give it a size:
|
| 160 |
|
assets/icons/depth.png
DELETED
|
Binary file (15.3 kB)
|
|
|
assets/icons/generation.png
DELETED
|
Binary file (17.9 kB)
|
|
|
assets/icons/imgedit.png
DELETED
|
Binary file (19.2 kB)
|
|
|
assets/icons/instanceseg.png
DELETED
|
Binary file (19.6 kB)
|
|
|
assets/icons/normals.png
DELETED
|
Binary file (17.5 kB)
|
|
|
assets/icons/refseg.png
DELETED
|
Binary file (20.9 kB)
|
|
|
assets/icons/semseg.png
DELETED
|
Binary file (18.1 kB)
|
|
|
assets/labels/depth.png
ADDED
|
assets/labels/generation.png
ADDED
|
assets/labels/imgedit.png
ADDED
|
assets/labels/instanceseg.png
ADDED
|
assets/labels/normals.png
ADDED
|
assets/labels/refseg.png
ADDED
|
assets/labels/semseg.png
ADDED
|