Instructions to use rkv1990/FLUX.1-Fill-dev-outpainting with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use rkv1990/FLUX.1-Fill-dev-outpainting with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("rkv1990/FLUX.1-Fill-dev-outpainting", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Update README.md
Browse files
README.md
CHANGED
|
@@ -118,6 +118,7 @@ def main():
|
|
| 118 |
# Load input image and its corresponding mask
|
| 119 |
fg_mask = load_image("https://huggingface.co/rkv1990/FLUX.1-Fill-dev-outpainting/resolve/main/beauty-products-mask.png").convert("L")
|
| 120 |
input_image= load_image("https://huggingface.co/rkv1990/FLUX.1-Fill-dev-outpainting/resolve/main/beauty-products.png").convert("RGB")
|
|
|
|
| 121 |
|
| 122 |
masked_image = prepare_masked_image(foreground=input_image, mask=fg_mask)
|
| 123 |
|
|
@@ -131,7 +132,7 @@ def main():
|
|
| 131 |
output = pipe(
|
| 132 |
prompt="A mist-covered forest at dawn, with pale golden light filtering through ancient, twisted trees. Soft fog swirls around delicate wildflowers glowing faintly with bioluminescence.",
|
| 133 |
image=masked_image,
|
| 134 |
-
mask_image=
|
| 135 |
#height=1024,
|
| 136 |
#width=1024,
|
| 137 |
guidance_scale=30,
|
|
|
|
| 118 |
# Load input image and its corresponding mask
|
| 119 |
fg_mask = load_image("https://huggingface.co/rkv1990/FLUX.1-Fill-dev-outpainting/resolve/main/beauty-products-mask.png").convert("L")
|
| 120 |
input_image= load_image("https://huggingface.co/rkv1990/FLUX.1-Fill-dev-outpainting/resolve/main/beauty-products.png").convert("RGB")
|
| 121 |
+
inpaint_mask = np.array(255-np.array(fg_mask))
|
| 122 |
|
| 123 |
masked_image = prepare_masked_image(foreground=input_image, mask=fg_mask)
|
| 124 |
|
|
|
|
| 132 |
output = pipe(
|
| 133 |
prompt="A mist-covered forest at dawn, with pale golden light filtering through ancient, twisted trees. Soft fog swirls around delicate wildflowers glowing faintly with bioluminescence.",
|
| 134 |
image=masked_image,
|
| 135 |
+
mask_image=inpaint_mask,
|
| 136 |
#height=1024,
|
| 137 |
#width=1024,
|
| 138 |
guidance_scale=30,
|