wangqixun commited on
Commit
5fe259f
1 Parent(s): 0723e22

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -8
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: until the next Diffusers pypi release,
21
- please install Diffusers from source and use [this PR](https://github.com/huggingface/diffusers/pull/9126) to be able to use FLUX controlnet.
22
- TODO: change when new version.
 
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-alpha'
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-alpha/resolve/main/canny.jpg")
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
- ## Limitation
54
- The current weights are trained on 512x512, but inference can still be performed on non-512 sizes.
55
- The latest 1024 + multi-scale model is under training, and it will be synchronized and open-sourced on HF afterwards.
 
 
 
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
+