wanghaofan commited on
Commit
d5646d8
·
verified ·
1 Parent(s): 52339ac

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +42 -7
README.md CHANGED
@@ -1,13 +1,24 @@
1
  ---
2
  tags:
3
  - text-to-image
 
4
  - lora
5
  - diffusers
6
- - template:diffusion-lora
 
 
7
  widget:
8
- - output:
9
- url: images/image.png
10
- text: change to illustration style
 
 
 
 
 
 
 
 
11
  base_model: black-forest-labs/FLUX.1-Kontext-dev
12
  instance_prompt: illustration style
13
  license: other
@@ -17,15 +28,39 @@ license_link: >-
17
  ---
18
  # FLUX.1-Kontext-dev-LoRA-Illustration-Style
19
 
20
- <Gallery />
21
 
 
 
22
 
23
  ## Trigger words
24
 
25
  You should use `illustration style` to trigger the image generation.
26
 
27
 
28
- ## Download model
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
 
 
 
 
 
 
 
 
30
 
31
- [Download](/Shakker-Labs/FLUX.1-Kontext-dev-LoRA-Illustration-Style/tree/main) them in the Files & versions tab.
 
 
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
+ change to illustration style
13
+ output:
14
+ url: images/example1.png
15
+ - text: >-
16
+ change to illustration style
17
+ output:
18
+ url: images/example2.png
19
+ - text: change to illustration style
20
+ output:
21
+ url: images/example3.png
22
  base_model: black-forest-labs/FLUX.1-Kontext-dev
23
  instance_prompt: illustration style
24
  license: other
 
28
  ---
29
  # FLUX.1-Kontext-dev-LoRA-Illustration-Style
30
 
31
+ This is an illustration style style LoRA trained on FLUX.1-Kontext-dev by [木木木亘](https://www.liblib.art/userpage/8d5ade1f022c453089e473c7e39dbb35/publish).
32
 
33
+ ## Showcases
34
+ <Gallery />
35
 
36
  ## Trigger words
37
 
38
  You should use `illustration style` 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-Illustration-Style", weight_name="FLUX-kontext-lora-illustration-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 = "change to illustration style"
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 [木木木亘](https://www.liblib.art/userpage/8d5ade1f022c453089e473c7e39dbb35/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).