Image-to-Image
Diffusers
Diffusion Single File
English
fp8
unsloth
quantized
image-generation
image-editing
flux
Instructions to use unsloth/FLUX.2-dev-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use unsloth/FLUX.2-dev-FP8 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("unsloth/FLUX.2-dev-FP8", dtype=torch.bfloat16, device_map="cuda") prompt = "cute sloth typing on a computer (INT8)" 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] - Diffusion Single File
How to use unsloth/FLUX.2-dev-FP8 with Diffusion Single File:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Desktop
Add sample widget and showcase table
Browse files
README.md
CHANGED
|
@@ -15,6 +15,48 @@ tags:
|
|
| 15 |
- diffusion-single-file
|
| 16 |
pipeline_tag: image-to-image
|
| 17 |
library_name: diffusers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
---
|
| 19 |
|
| 20 |

|
|
|
|
| 15 |
- diffusion-single-file
|
| 16 |
pipeline_tag: image-to-image
|
| 17 |
library_name: diffusers
|
| 18 |
+
widget:
|
| 19 |
+
- text: >-
|
| 20 |
+
cute sloth typing on a computer (INT8)
|
| 21 |
+
output:
|
| 22 |
+
url: samples/int8_1.png
|
| 23 |
+
- text: >-
|
| 24 |
+
cute sloth typing on a computer (INT8)
|
| 25 |
+
output:
|
| 26 |
+
url: samples/int8_2.png
|
| 27 |
+
- text: >-
|
| 28 |
+
cute sloth typing on a computer (FP8)
|
| 29 |
+
output:
|
| 30 |
+
url: samples/fp8_1.png
|
| 31 |
+
- text: >-
|
| 32 |
+
cute sloth typing on a computer (FP8)
|
| 33 |
+
output:
|
| 34 |
+
url: samples/fp8_2.png
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
### Samples
|
| 38 |
+
|
| 39 |
+
Prompt: "cute sloth typing on a computer"
|
| 40 |
+
|
| 41 |
+
<table>
|
| 42 |
+
<tr>
|
| 43 |
+
<td align="center"><b>INT8</b></td>
|
| 44 |
+
<td align="center"><b>INT8</b></td>
|
| 45 |
+
</tr>
|
| 46 |
+
<tr>
|
| 47 |
+
<td><img src="samples/int8_1.png" width="300"></td>
|
| 48 |
+
<td><img src="samples/int8_2.png" width="300"></td>
|
| 49 |
+
</tr>
|
| 50 |
+
<tr>
|
| 51 |
+
<td align="center"><b>FP8</b></td>
|
| 52 |
+
<td align="center"><b>FP8</b></td>
|
| 53 |
+
</tr>
|
| 54 |
+
<tr>
|
| 55 |
+
<td><img src="samples/fp8_1.png" width="300"></td>
|
| 56 |
+
<td><img src="samples/fp8_2.png" width="300"></td>
|
| 57 |
+
</tr>
|
| 58 |
+
</table>
|
| 59 |
+
|
| 60 |
---
|
| 61 |
|
| 62 |

|