Image-to-Image
Diffusers
flux
flux-diffusers
lora
bertjiazheng commited on
Commit
cb1f55e
·
verified ·
1 Parent(s): f90c01e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +63 -61
README.md CHANGED
@@ -1,62 +1,64 @@
1
- ---
2
- license: other
3
- license_name: flux-1-dev-non-commercial-license
4
- license_link: >-
5
- https://github.com/black-forest-labs/flux/blob/main/model_licenses/LICENSE-FLUX1-dev
6
- base_model:
7
- - black-forest-labs/FLUX.1-dev
8
- tags:
9
- - flux
10
- - flux-diffusers
11
- - image-to-image
12
- - diffusers
13
- - lora
14
- pipeline_tag: image-to-image
15
- library_name: diffusers
16
- ---
17
-
18
- ## FLUX.1-Wireframe-dev-lora
19
-
20
- `FLUX.1 Wireframe [dev] LoRA` is a LoRA for [FLUX.1 [dev]](https://huggingface.co/black-forest-labs/FLUX.1-dev), capable of generating an image based on a text description while following the structure of given wireframe image.
21
-
22
- ## Showcase
23
-
24
- | Prompt | Control image | Generated image |
25
- | :---: | :---: | :---: |
26
- | <details>A modern living room features a clean and minimalist design. On the left, a light beige wall houses a built-in shelving unit with a textured, neutral finish, adorned with a few decorative items. The right wall showcases a ribbed, light gray panel with a built-in storage unit below. The floor is covered with a light beige carpet, which extends into the midground where a beige sofa with patterned throw pillows is positioned. A small round ottoman sits in front of the sofa, adding a cozy touch. In the background, large windows with sheer curtains allow natural light to flood the room, highlighting the light gray curtains and the greenery outside. A tall, narrow plant stand with a potted plant stands beside the window, adding a touch of nature. The ceiling features a circular chandelier with a modern design, casting a warm glow over the space.</details> | ![Control image](assets/input1.png) | ![Generated Image](assets/output1.png) |
27
- | <details>A contemporary bedroom features a large, plush bed with a white and gray upholstered headboard and matching bedding. The bed is positioned centrally, flanked by two nightstands with modern, metallic lamps. The walls are finished in light gray paneling, creating a clean and minimalist backdrop. A large window on the left side of the room allows natural light to flood in, with sheer curtains partially drawn to diffuse the sunlight. The flooring is a smooth, light gray tile that reflects the ambient light, enhancing the room's bright and airy feel. The artwork above the bed is a modern abstract piece, featuring a circular design with a mix of dark and light tones, adding a touch of sophistication to the space.</details> | ![Control image](assets/input2.png) | ![Generated Image](assets/output2.png) |
28
- | <details>A contemporary bedroom features a large bed positioned centrally, with a soft, light gray upholstered headboard. The bed is dressed in crisp white linens, accented by a beige throw blanket with a textured pattern. Flanking the bed are two gray pillows, adding a subtle contrast. Above the bed, a minimalist abstract painting with gold and gray tones hangs on the white wall. The room is bathed in natural light streaming through a large window with sheer white curtains, which are drawn back to reveal a black-framed view outside. The light wooden flooring complements the serene and modern aesthetic of the space.</details> | ![Control image](assets/input3.png) | ![Generated Image](assets/output3.png) |
29
- | <details>A modern dining area features a sleek, dark wood dining table with a minimalist design, flanked by six matching chairs with light brown upholstery. The table is positioned in the foreground, with a large window on the left side allowing natural light to flood the space. The midground showcases a built-in storage unit with glass and wood paneling, housing various decorative items and wine glasses. The background reveals a polished tile floor that extends throughout the room, with a light gray and white color scheme that enhances the contemporary aesthetic. The ceiling is adorned with recessed lighting, casting a soft glow over the dining area, while the large window on the left provides ample daylight, creating a bright and airy atmosphere.</details> | ![Control image](assets/input4.png) | ![Generated Image](assets/output4.png) |
30
-
31
- ## Diffusers
32
-
33
- ```python
34
- import torch
35
- from diffusers.pipelines.flux.pipeline_flux_control import FluxControlPipeline
36
- from diffusers.utils import load_image
37
-
38
- pipe = FluxControlPipeline.from_pretrained(
39
- "black-forest-labs/FLUX.1-dev/",
40
- torch_dtype=torch.bfloat16,
41
- )
42
- pipe.load_lora_weights("manycore-research/FLUX.1-Wireframe-dev-lora")
43
- pipe.to("cuda")
44
-
45
- control_image = load_image("https://huggingface.co/manycore-research/FLUX.1-Wireframe-dev-lora/blob/main/assets/input1.png")
46
- prompt = "A modern living room features a clean and minimalist design. On the left, a light beige wall houses a built-in shelving unit with a textured, neutral finish, adorned with a few decorative items. The right wall showcases a ribbed, light gray panel with a built-in storage unit below. The floor is covered with a light beige carpet, which extends into the midground where a beige sofa with patterned throw pillows is positioned. A small round ottoman sits in front of the sofa, adding a cozy touch. In the background, large windows with sheer curtains allow natural light to flood the room, highlighting the light gray curtains and the greenery outside. A tall, narrow plant stand with a potted plant stands beside the window, adding a touch of nature. The ceiling features a circular chandelier with a modern design, casting a warm glow over the space."
47
-
48
- image = pipe(
49
- prompt=prompt,
50
- control_image=control_image,
51
- num_inference_steps=20,
52
- generator=torch.Generator(device="cpu").manual_seed(42),
53
- height=512,
54
- width=512,
55
- guidance_scale=10.0,
56
- ).images[0]
57
- image.save("output.png")
58
- ```
59
-
60
- ## LICENSE
61
-
 
 
62
  FLUX.1-Wireframe-dev-lora is licensed under the [FLUX.1-dev Non-Commercial License](https://github.com/black-forest-labs/flux/blob/main/model_licenses/LICENSE-FLUX1-dev).
 
1
+ ---
2
+ license: other
3
+ license_name: flux-1-dev-non-commercial-license
4
+ license_link: >-
5
+ https://github.com/black-forest-labs/flux/blob/main/model_licenses/LICENSE-FLUX1-dev
6
+ base_model:
7
+ - black-forest-labs/FLUX.1-dev
8
+ tags:
9
+ - flux
10
+ - flux-diffusers
11
+ - image-to-image
12
+ - diffusers
13
+ - lora
14
+ pipeline_tag: image-to-image
15
+ library_name: diffusers
16
+ ---
17
+
18
+ ## FLUX.1-Wireframe-dev-lora
19
+
20
+ `FLUX.1 Wireframe [dev] LoRA` is a LoRA for [FLUX.1 [dev]](https://huggingface.co/black-forest-labs/FLUX.1-dev), capable of generating an image based on a text description while following the structure of given wireframe image.
21
+
22
+ ## Showcase
23
+
24
+ | Prompt | Control image | Generated image |
25
+ | :---: | :---: | :---: |
26
+ | <details>A modern living room features a clean and minimalist design. On the left, a light beige wall houses a built-in shelving unit with a textured, neutral finish, adorned with a few decorative items. The right wall showcases a ribbed, light gray panel with a built-in storage unit below. The floor is covered with a light beige carpet, which extends into the midground where a beige sofa with patterned throw pillows is positioned. A small round ottoman sits in front of the sofa, adding a cozy touch. In the background, large windows with sheer curtains allow natural light to flood the room, highlighting the light gray curtains and the greenery outside. A tall, narrow plant stand with a potted plant stands beside the window, adding a touch of nature. The ceiling features a circular chandelier with a modern design, casting a warm glow over the space.</details> | ![Control image](assets/input1.png) | ![Generated Image](assets/output1.png) |
27
+ | <details>A contemporary bedroom features a large, plush bed with a white and gray upholstered headboard and matching bedding. The bed is positioned centrally, flanked by two nightstands with modern, metallic lamps. The walls are finished in light gray paneling, creating a clean and minimalist backdrop. A large window on the left side of the room allows natural light to flood in, with sheer curtains partially drawn to diffuse the sunlight. The flooring is a smooth, light gray tile that reflects the ambient light, enhancing the room's bright and airy feel. The artwork above the bed is a modern abstract piece, featuring a circular design with a mix of dark and light tones, adding a touch of sophistication to the space.</details> | ![Control image](assets/input2.png) | ![Generated Image](assets/output2.png) |
28
+ | <details>A contemporary bedroom features a large bed positioned centrally, with a soft, light gray upholstered headboard. The bed is dressed in crisp white linens, accented by a beige throw blanket with a textured pattern. Flanking the bed are two gray pillows, adding a subtle contrast. Above the bed, a minimalist abstract painting with gold and gray tones hangs on the white wall. The room is bathed in natural light streaming through a large window with sheer white curtains, which are drawn back to reveal a black-framed view outside. The light wooden flooring complements the serene and modern aesthetic of the space.</details> | ![Control image](assets/input3.png) | ![Generated Image](assets/output3.png) |
29
+ | <details>A modern dining area features a sleek, dark wood dining table with a minimalist design, flanked by six matching chairs with light brown upholstery. The table is positioned in the foreground, with a large window on the left side allowing natural light to flood the space. The midground showcases a built-in storage unit with glass and wood paneling, housing various decorative items and wine glasses. The background reveals a polished tile floor that extends throughout the room, with a light gray and white color scheme that enhances the contemporary aesthetic. The ceiling is adorned with recessed lighting, casting a soft glow over the dining area, while the large window on the left provides ample daylight, creating a bright and airy atmosphere.</details> | ![Control image](assets/input4.png) | ![Generated Image](assets/output4.png) |
30
+
31
+ ## Diffusers
32
+
33
+ ```python
34
+ import torch
35
+ from diffusers.pipelines.flux.pipeline_flux_control import FluxControlPipeline
36
+ from diffusers.utils import load_image
37
+
38
+ pipe = FluxControlPipeline.from_pretrained(
39
+ "black-forest-labs/FLUX.1-dev",
40
+ torch_dtype=torch.bfloat16,
41
+ )
42
+ pipe.load_lora_weights("manycore-research/FLUX.1-Wireframe-dev-lora")
43
+ pipe = pipe.to("cuda")
44
+
45
+ control_image = load_image(
46
+ "https://huggingface.co/manycore-research/FLUX.1-Wireframe-dev-lora/resolve/main/assets/input1.png"
47
+ )
48
+ prompt = "A modern living room features a clean and minimalist design. On the left, a light beige wall houses a built-in shelving unit with a textured, neutral finish, adorned with a few decorative items. The right wall showcases a ribbed, light gray panel with a built-in storage unit below. The floor is covered with a light beige carpet, which extends into the midground where a beige sofa with patterned throw pillows is positioned. A small round ottoman sits in front of the sofa, adding a cozy touch. In the background, large windows with sheer curtains allow natural light to flood the room, highlighting the light gray curtains and the greenery outside. A tall, narrow plant stand with a potted plant stands beside the window, adding a touch of nature. The ceiling features a circular chandelier with a modern design, casting a warm glow over the space."
49
+
50
+ image = pipe(
51
+ prompt=prompt,
52
+ control_image=control_image,
53
+ num_inference_steps=20,
54
+ generator=torch.Generator(device="cpu").manual_seed(42),
55
+ height=512,
56
+ width=512,
57
+ guidance_scale=10.0,
58
+ ).images[0]
59
+ image.save("output.png")
60
+ ```
61
+
62
+ ## LICENSE
63
+
64
  FLUX.1-Wireframe-dev-lora is licensed under the [FLUX.1-dev Non-Commercial License](https://github.com/black-forest-labs/flux/blob/main/model_licenses/LICENSE-FLUX1-dev).