Update README.md
Browse files
README.md
CHANGED
|
@@ -12,3 +12,22 @@ the base model is `stabilityai/stable-diffusion-xl-base-1.0` and the model has i
|
|
| 12 |
## Usage
|
| 13 |
the usage of the model is available via github of [InstinctiveDiffuse](https://github.com/erfanzar/InstinctiveDiffuse).
|
| 14 |
please also consider using these keep words to improve your prompts: best quality, ocean render, HD, --version 8.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
## Usage
|
| 13 |
the usage of the model is available via github of [InstinctiveDiffuse](https://github.com/erfanzar/InstinctiveDiffuse).
|
| 14 |
please also consider using these keep words to improve your prompts: best quality, ocean render, HD, --version 8.
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
## Direct Use
|
| 18 |
+
|
| 19 |
+
```python
|
| 20 |
+
import torch
|
| 21 |
+
from diffusers import StableDiffusionXLPipeline, EulerDiscreteScheduler
|
| 22 |
+
|
| 23 |
+
base = "Instinct-AI/InstinctiveDiffuse"
|
| 24 |
+
pipe = StableDiffusionXLPipeline.from_pretrained(base, torch_dtype=torch.float16)
|
| 25 |
+
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
|
| 26 |
+
pipe.enable_model_cpu_offload()
|
| 27 |
+
|
| 28 |
+
pipe(
|
| 29 |
+
"An astronaut riding a yellow horse on mars",
|
| 30 |
+
num_inference_steps=8,
|
| 31 |
+
guidance_scale=1
|
| 32 |
+
).images[0]
|
| 33 |
+
```
|