Update README.md
Browse files
README.md
CHANGED
|
@@ -1,16 +1,24 @@
|
|
| 1 |
---
|
| 2 |
tags:
|
| 3 |
- text-to-image
|
|
|
|
| 4 |
- lora
|
| 5 |
- diffusers
|
| 6 |
-
-
|
|
|
|
|
|
|
| 7 |
widget:
|
| 8 |
-
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
base_model: black-forest-labs/FLUX.1-Kontext-dev
|
| 15 |
instance_prompt: convert real photos into sketches, sketch
|
| 16 |
license: other
|
|
@@ -20,17 +28,39 @@ license_link: >-
|
|
| 20 |
---
|
| 21 |
# FLUX.1-Kontext-dev-LoRA-Sketch-Style
|
| 22 |
|
|
|
|
|
|
|
|
|
|
| 23 |
<Gallery />
|
| 24 |
|
| 25 |
|
| 26 |
## Trigger words
|
|
|
|
|
|
|
| 27 |
|
| 28 |
-
|
| 29 |
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
-
|
|
|
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
tags:
|
| 3 |
- text-to-image
|
| 4 |
+
- stable-diffusion
|
| 5 |
- lora
|
| 6 |
- diffusers
|
| 7 |
+
- image-generation
|
| 8 |
+
- flux
|
| 9 |
+
- safetensors
|
| 10 |
widget:
|
| 11 |
+
- text: >-
|
| 12 |
+
convert this image into sketches
|
| 13 |
+
output:
|
| 14 |
+
url: images/example1.png
|
| 15 |
+
- text: >-
|
| 16 |
+
convert this image into sketches
|
| 17 |
+
output:
|
| 18 |
+
url: images/example2.png
|
| 19 |
+
- text: convert this image into sketches
|
| 20 |
+
output:
|
| 21 |
+
url: images/example3.png
|
| 22 |
base_model: black-forest-labs/FLUX.1-Kontext-dev
|
| 23 |
instance_prompt: convert real photos into sketches, sketch
|
| 24 |
license: other
|
|
|
|
| 28 |
---
|
| 29 |
# FLUX.1-Kontext-dev-LoRA-Sketch-Style
|
| 30 |
|
| 31 |
+
This is a sketch style LoRA trained on FLUX.1-Kontext-dev by [yao](https://www.liblib.art/userpage/8c2ce72c564613278d3ee381f1d6f201/publish).
|
| 32 |
+
|
| 33 |
+
## Showcases
|
| 34 |
<Gallery />
|
| 35 |
|
| 36 |
|
| 37 |
## Trigger words
|
| 38 |
+
You should use `convert real photos into sketches`, `sketch` to trigger the image generation.
|
| 39 |
+
|
| 40 |
|
| 41 |
+
## Inference
|
| 42 |
|
| 43 |
+
```python
|
| 44 |
+
import torch
|
| 45 |
+
from diffusers import FluxKontextPipeline
|
| 46 |
+
from diffusers.utils import load_image
|
| 47 |
|
| 48 |
+
pipe = FluxKontextPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev", torch_dtype=torch.bfloat16)
|
| 49 |
+
pipe.load_lora_weights("Shakker-Labs/FLUX.1-Kontext-dev-LoRA-Sketch-Style", weight_name="FLUX-kontext-lora-sketch-style.safetensors")
|
| 50 |
+
pipe.fuse_lora(lora_scale=1.0)
|
| 51 |
+
pipe.to("cuda")
|
| 52 |
|
| 53 |
+
input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")
|
| 54 |
+
prompt = "convert this image into sketches"
|
| 55 |
|
| 56 |
+
image = pipe(
|
| 57 |
+
image=input_image,
|
| 58 |
+
prompt=prompt,
|
| 59 |
+
num_inference_steps=24,
|
| 60 |
+
guidance_scale=2.5,
|
| 61 |
+
).images[0]
|
| 62 |
+
image.save(f"example.png")
|
| 63 |
+
```
|
| 64 |
|
| 65 |
+
## Acknowledgements
|
| 66 |
+
This model is trained by our copyrighted users [yao](https://www.liblib.art/userpage/8c2ce72c564613278d3ee381f1d6f201/publish). We release this model under permissions. The model follows [flux-1-dev-non-commercial-license](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md).
|