Update README (#3)
Browse files- Update README (7f5fc7054326b690520c22b16bddaae682d7eb9a)
Co-authored-by: Pedro Cuenca <pcuenq@users.noreply.huggingface.co>
README.md
CHANGED
@@ -29,38 +29,31 @@ For details on the development and training of our model, please refer to our bl
|
|
29 |
|
30 |
### Using the model with 🧨 Diffusers
|
31 |
|
32 |
-
Install diffusers >= 0.
|
33 |
|
34 |
```
|
|
|
35 |
pip install transformers accelerate safetensors
|
36 |
```
|
37 |
|
38 |
-
To run our model, you will need to use our custom pipeline from this gist: https://gist.github.com/aykamko/402e948a8fdbbc9613f9978802d90194
|
39 |
-
|
40 |
**Notes:**
|
41 |
-
-
|
42 |
-
-
|
43 |
|
44 |
Then, run the following snippet:
|
45 |
|
46 |
```python
|
47 |
-
|
|
|
48 |
|
49 |
-
pipe =
|
50 |
"playgroundai/playground-v2.5-1024px-aesthetic",
|
51 |
torch_dtype=torch.float16,
|
52 |
-
use_safetensors=True,
|
53 |
-
add_watermarker=False,
|
54 |
variant="fp16",
|
55 |
-
)
|
56 |
-
pipe.to("cuda")
|
57 |
-
|
58 |
-
# # Optional: use DPM++ 2M Karras scheduler for improved quality on small details
|
59 |
-
# from diffusers import DPMSolverMultistepScheduler
|
60 |
-
# pipe.scheduler = DPMSolverMultistepScheduler(**common_config, use_karras_sigmas=True)
|
61 |
|
62 |
-
prompt = "
|
63 |
-
image
|
64 |
```
|
65 |
|
66 |
### Using the model with Automatic1111/ComfyUI
|
|
|
29 |
|
30 |
### Using the model with 🧨 Diffusers
|
31 |
|
32 |
+
Install diffusers >= 0.27.0 and the relevant dependencies. For now, you need to install from the `main` diffusers branch in GitHub until a new release is published in PyPi.
|
33 |
|
34 |
```
|
35 |
+
pip install git+https://github.com/huggingface/diffusers.git
|
36 |
pip install transformers accelerate safetensors
|
37 |
```
|
38 |
|
|
|
|
|
39 |
**Notes:**
|
40 |
+
- The pipeline uses the `EDMEulerScheduler` scheduler. It's an [EDM formulation](https://arxiv.org/abs/2206.00364) of the Euler scheduler.
|
41 |
+
- `guidance_scale=5.0` is a good default for this scheduler.
|
42 |
|
43 |
Then, run the following snippet:
|
44 |
|
45 |
```python
|
46 |
+
from diffusers import DiffusionPipeline
|
47 |
+
import torch
|
48 |
|
49 |
+
pipe = DiffusionPipeline.from_pretrained(
|
50 |
"playgroundai/playground-v2.5-1024px-aesthetic",
|
51 |
torch_dtype=torch.float16,
|
|
|
|
|
52 |
variant="fp16",
|
53 |
+
).to("cuda")
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
+
prompt = "a chihuahua riding on the back of a golden retriever, in front of the Eiffel tower"
|
56 |
+
image = pipe(prompt=prompt, num_inference_steps=25, guidance_scale=5).images[0]
|
57 |
```
|
58 |
|
59 |
### Using the model with Automatic1111/ComfyUI
|