Update README.md
Browse files
README.md
CHANGED
@@ -124,4 +124,47 @@ Sampler: DPM++ 2M SDE
|
|
124 |
Scheduler: Karras
|
125 |
Resolution: 1024x1024
|
126 |
|
127 |
-
The custom-trained CLIP is a significant point of differentiation, as very few models incorporate this feature. Enjoy creating with the fully released ProteusV0.5!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
Scheduler: Karras
|
125 |
Resolution: 1024x1024
|
126 |
|
127 |
+
The custom-trained CLIP is a significant point of differentiation, as very few models incorporate this feature. Enjoy creating with the fully released ProteusV0.5!
|
128 |
+
|
129 |
+
|
130 |
+
Use it with 🧨 diffusers
|
131 |
+
```python
|
132 |
+
import torch
|
133 |
+
from diffusers import (
|
134 |
+
StableDiffusionXLPipeline,
|
135 |
+
KDPM2AncestralDiscreteScheduler,
|
136 |
+
AutoencoderKL
|
137 |
+
)
|
138 |
+
|
139 |
+
# Load VAE component
|
140 |
+
vae = AutoencoderKL.from_pretrained(
|
141 |
+
"madebyollin/sdxl-vae-fp16-fix",
|
142 |
+
torch_dtype=torch.float16
|
143 |
+
)
|
144 |
+
|
145 |
+
# Configure the pipeline
|
146 |
+
pipe = StableDiffusionXLPipeline.from_pretrained(
|
147 |
+
"dataautogpt3/ProteusV0.5",
|
148 |
+
vae=vae,
|
149 |
+
torch_dtype=torch.float16
|
150 |
+
)
|
151 |
+
pipe.scheduler = KDPM2AncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
152 |
+
pipe.to('cuda')
|
153 |
+
|
154 |
+
# Define prompts and generate image
|
155 |
+
prompt = "a cat wearing sunglasses on the beach"
|
156 |
+
negative_prompt = ""
|
157 |
+
|
158 |
+
image = pipe(
|
159 |
+
prompt,
|
160 |
+
negative_prompt=negative_prompt,
|
161 |
+
width=1024,
|
162 |
+
height=1024,
|
163 |
+
guidance_scale=7,
|
164 |
+
num_inference_steps=50,
|
165 |
+
clip_skip=2
|
166 |
+
).images[0]
|
167 |
+
|
168 |
+
|
169 |
+
image.save("generated_image.png")
|
170 |
+
```
|