jimmycarter
commited on
Commit
•
46eb396
1
Parent(s):
6339661
More diffusers hints
Browse files
README.md
CHANGED
@@ -37,7 +37,7 @@ LibreFLUX is an Apache 2.0 version of [FLUX.1-schnell](https://huggingface.co/bl
|
|
37 |
|
38 |
## Inference
|
39 |
|
40 |
-
To use the model, just call the custom pipeline using [diffusers](https://github.com/huggingface/diffusers). It currently works with `diffusers==0.30.3` and will be updated to the latest diffusers soon. The model works best with a CFG scale of 2.0
|
41 |
|
42 |
```py
|
43 |
# ! pip install diffusers==0.30.3
|
@@ -59,6 +59,10 @@ images = pipe(
|
|
59 |
prompt=prompt,
|
60 |
negative_prompt=negative_prompt,
|
61 |
return_dict=False,
|
|
|
|
|
|
|
|
|
62 |
)
|
63 |
images[0][0].save('chalkboard.png')
|
64 |
|
@@ -84,6 +88,10 @@ images = pipe(
|
|
84 |
device=None,
|
85 |
return_dict=False,
|
86 |
do_batch_cfg=False, # https://github.com/huggingface/optimum-quanto/issues/327
|
|
|
|
|
|
|
|
|
87 |
)
|
88 |
images[0][0].save('chalkboard.png')
|
89 |
```
|
|
|
37 |
|
38 |
## Inference
|
39 |
|
40 |
+
To use the model, just call the custom pipeline using [diffusers](https://github.com/huggingface/diffusers). It currently works with `diffusers==0.30.3` and will be updated to the latest diffusers soon. The model works best with a CFG scale of 2.0 to 5.0, so if you are getting images with a blur or strange shadows try turning down your CFG scale (`guidance_scale` in diffusers). Alternatively, you can also use higher CFG scales if you turn it off during the first couple of timesteps (`no_cfg_until_timestep=2` in the custom pipeline).
|
41 |
|
42 |
```py
|
43 |
# ! pip install diffusers==0.30.3
|
|
|
59 |
prompt=prompt,
|
60 |
negative_prompt=negative_prompt,
|
61 |
return_dict=False,
|
62 |
+
# guidance_scale=3.5,
|
63 |
+
# num_inference_steps=28,
|
64 |
+
# generator=torch.Generator().manual_seed(42),
|
65 |
+
# no_cfg_until_timestep=0,
|
66 |
)
|
67 |
images[0][0].save('chalkboard.png')
|
68 |
|
|
|
88 |
device=None,
|
89 |
return_dict=False,
|
90 |
do_batch_cfg=False, # https://github.com/huggingface/optimum-quanto/issues/327
|
91 |
+
# guidance_scale=3.5,
|
92 |
+
# num_inference_steps=28,
|
93 |
+
# generator=torch.Generator().manual_seed(42),
|
94 |
+
# no_cfg_until_timestep=0,
|
95 |
)
|
96 |
images[0][0].save('chalkboard.png')
|
97 |
```
|