Update README.md
Browse files
README.md
CHANGED
@@ -17,9 +17,10 @@ base_model: black-forest-labs/FLUX.1-dev
|
|
17 |
<img src="./images/image_demo_weight.png" width = "800" />
|
18 |
|
19 |
|
20 |
-
Diffusers version:
|
21 |
-
|
22 |
-
|
|
|
23 |
|
24 |
|
25 |
|
@@ -32,12 +33,12 @@ from diffusers.pipelines.flux.pipeline_flux_controlnet import FluxControlNetPipe
|
|
32 |
from diffusers.models.controlnet_flux import FluxControlNetModel
|
33 |
|
34 |
base_model = 'black-forest-labs/FLUX.1-dev'
|
35 |
-
controlnet_model = 'InstantX/FLUX.1-dev-Controlnet-Canny
|
36 |
controlnet = FluxControlNetModel.from_pretrained(controlnet_model, torch_dtype=torch.bfloat16)
|
37 |
pipe = FluxControlNetPipeline.from_pretrained(base_model, controlnet=controlnet, torch_dtype=torch.bfloat16)
|
38 |
pipe.to("cuda")
|
39 |
|
40 |
-
control_image = load_image("https://huggingface.co/InstantX/FLUX.1-dev-Controlnet-Canny
|
41 |
prompt = "A girl in city, 25 years old, cool, futuristic"
|
42 |
image = pipe(
|
43 |
prompt,
|
@@ -50,6 +51,8 @@ image.save("image.jpg")
|
|
50 |
```
|
51 |
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
|
|
|
17 |
<img src="./images/image_demo_weight.png" width = "800" />
|
18 |
|
19 |
|
20 |
+
Diffusers version:
|
21 |
+
```shell
|
22 |
+
pip install -U diffusers
|
23 |
+
```
|
24 |
|
25 |
|
26 |
|
|
|
33 |
from diffusers.models.controlnet_flux import FluxControlNetModel
|
34 |
|
35 |
base_model = 'black-forest-labs/FLUX.1-dev'
|
36 |
+
controlnet_model = 'InstantX/FLUX.1-dev-Controlnet-Canny'
|
37 |
controlnet = FluxControlNetModel.from_pretrained(controlnet_model, torch_dtype=torch.bfloat16)
|
38 |
pipe = FluxControlNetPipeline.from_pretrained(base_model, controlnet=controlnet, torch_dtype=torch.bfloat16)
|
39 |
pipe.to("cuda")
|
40 |
|
41 |
+
control_image = load_image("https://huggingface.co/InstantX/FLUX.1-dev-Controlnet-Canny/resolve/main/canny.jpg")
|
42 |
prompt = "A girl in city, 25 years old, cool, futuristic"
|
43 |
image = pipe(
|
44 |
prompt,
|
|
|
51 |
```
|
52 |
|
53 |
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
+
|
58 |
+
|