Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -3,7 +3,7 @@ license: apache-2.0
|
|
| 3 |
---
|
| 4 |
# Templates-Inpainting (FLUX.2-klein-base-4B)
|
| 5 |
|
| 6 |
-
This model is one of the open-source Diffusion Templates series models from [DiffSynth-Studio](https://github.com/modelscope/DiffSynth-Studio). Specifically designed for inpainting, it accepts an original image and a mask image, then generates new content within the masked region based on natural language prompts, seamlessly blending with the surrounding unmasked background.
|
| 7 |
|
| 8 |
## Results
|
| 9 |
|
|
@@ -141,12 +141,12 @@ image = template(
|
|
| 141 |
pipe,
|
| 142 |
prompt="An orange cat is sitting on a stone.",
|
| 143 |
seed=0, cfg_scale=4, num_inference_steps=50,
|
| 144 |
-
template_inputs
|
| 145 |
"image": Image.open("data/examples/templates/image_reference.jpg"),
|
| 146 |
"mask": Image.open("data/examples/templates/image_mask_1.jpg"),
|
| 147 |
"force_inpaint": True,
|
| 148 |
}],
|
| 149 |
-
negative_template_inputs
|
| 150 |
"image": Image.open("data/examples/templates/image_reference.jpg"),
|
| 151 |
"mask": Image.open("data/examples/templates/image_mask_1.jpg"),
|
| 152 |
}],
|
|
@@ -156,11 +156,11 @@ image = template(
|
|
| 156 |
pipe,
|
| 157 |
prompt="A cat wearing sunglasses is sitting on a stone.",
|
| 158 |
seed=0, cfg_scale=4, num_inference_steps=50,
|
| 159 |
-
template_inputs
|
| 160 |
"image": Image.open("data/examples/templates/image_reference.jpg"),
|
| 161 |
"mask": Image.open("data/examples/templates/image_mask_2.jpg"),
|
| 162 |
}],
|
| 163 |
-
negative_template_inputs
|
| 164 |
"image": Image.open("data/examples/templates/image_reference.jpg"),
|
| 165 |
"mask": Image.open("data/examples/templates/image_mask_2.jpg"),
|
| 166 |
}],
|
|
|
|
| 3 |
---
|
| 4 |
# Templates-Inpainting (FLUX.2-klein-base-4B)
|
| 5 |
|
| 6 |
+
This model is one of the open-source Diffusion Templates series models from [DiffSynth-Studio](https://github.com/modelscope/DiffSynth-Studio). Specifically designed for inpainting tasks, it accepts an original image and a mask image, then generates new content within the masked region based on natural language prompts, seamlessly blending with the surrounding unmasked background.
|
| 7 |
|
| 8 |
## Results
|
| 9 |
|
|
|
|
| 141 |
pipe,
|
| 142 |
prompt="An orange cat is sitting on a stone.",
|
| 143 |
seed=0, cfg_scale=4, num_inference_steps=50,
|
| 144 |
+
template_inputs=[{
|
| 145 |
"image": Image.open("data/examples/templates/image_reference.jpg"),
|
| 146 |
"mask": Image.open("data/examples/templates/image_mask_1.jpg"),
|
| 147 |
"force_inpaint": True,
|
| 148 |
}],
|
| 149 |
+
negative_template_inputs=[{
|
| 150 |
"image": Image.open("data/examples/templates/image_reference.jpg"),
|
| 151 |
"mask": Image.open("data/examples/templates/image_mask_1.jpg"),
|
| 152 |
}],
|
|
|
|
| 156 |
pipe,
|
| 157 |
prompt="A cat wearing sunglasses is sitting on a stone.",
|
| 158 |
seed=0, cfg_scale=4, num_inference_steps=50,
|
| 159 |
+
template_inputs=[{
|
| 160 |
"image": Image.open("data/examples/templates/image_reference.jpg"),
|
| 161 |
"mask": Image.open("data/examples/templates/image_mask_2.jpg"),
|
| 162 |
}],
|
| 163 |
+
negative_template_inputs=[{
|
| 164 |
"image": Image.open("data/examples/templates/image_reference.jpg"),
|
| 165 |
"mask": Image.open("data/examples/templates/image_mask_2.jpg"),
|
| 166 |
}],
|