wanghaofan commited on
Commit
ef4e4e0
·
verified ·
1 Parent(s): d488932

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +43 -8
README.md CHANGED
@@ -1,14 +1,25 @@
1
  ---
2
  tags:
3
  - text-to-image
 
4
  - lora
5
  - diffusers
6
- - template:diffusion-lora
 
 
7
  widget:
8
- - output:
9
- url: images/image (3).jpg
10
- text: convert to a pixel art style
11
- base_model: ''
 
 
 
 
 
 
 
 
12
  instance_prompt: A pixel art style
13
  license: other
14
  license_name: flux-1-dev-non-commercial-license
@@ -17,15 +28,39 @@ license_link: >-
17
  ---
18
  # FLUX.1-Kontext-dev-LoRA-Pixel-Style
19
 
20
- <Gallery />
21
 
 
 
22
 
23
  ## Trigger words
24
 
25
  You should use `A pixel art style` to trigger the image generation.
26
 
27
 
28
- ## Download model
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
 
 
 
 
 
 
 
 
30
 
31
- [Download](/Shakker-Labs/FLUX.1-Kontext-dev-LoRA-Pixel-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
+ Convert to a flat cartoon style while keeping the subject unchanged
13
+ output:
14
+ url: images/example1.png
15
+ - text: >-
16
+ Convert to a flat cartoon style while keeping the subject unchanged
17
+ output:
18
+ url: images/example2.png
19
+ - text: Convert to a flat cartoon style while keeping the subject unchanged
20
+ output:
21
+ url: images/example3.png
22
+ base_model: black-forest-labs/FLUX.1-Kontext-dev
23
  instance_prompt: A pixel art style
24
  license: other
25
  license_name: flux-1-dev-non-commercial-license
 
28
  ---
29
  # FLUX.1-Kontext-dev-LoRA-Pixel-Style
30
 
31
+ This is a pixel style LoRA trained on FLUX.1-Kontext-dev by [zooey](https://huggingface.co/zooeyy).
32
 
33
+ ## Showcases
34
+ <Gallery />
35
 
36
  ## Trigger words
37
 
38
  You should use `A pixel art 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-Pixel-Style", weight_name="FLUX-kontext-lora-pixel-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 to a pixel art 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 [zooey](https://huggingface.co/zooeyy). 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).