Update README.md
Browse files
README.md
CHANGED
@@ -16,10 +16,62 @@ Example chosen frame of GIF from CLIP
|
|
16 |
| --- | --- | --- |
|
17 |
| "yurble_baby_clap" | ![](https://images.neopets.com/template_images/yurble_baby_clap.gif) | ![](https://cdn.discordapp.com/attachments/1010693530181718146/1043310485413576794/yurble_baby_clap.jpg) |
|
18 |
|
19 |
-
|
20 |
|
21 |
The text encoder was trained along with the UNet at half precision for 15% of the total 8,000 steps (1,200 steps), and then the UNet was trained alone for the rest. I used a polynomial learning rate decay starting at 2e-6 (the default in fast-DreamBooth).
|
22 |
|
23 |
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
"Don't forget, if you use these images on a non-Neopets page, you need to include our Copyright Notice." https://www.neopets.com/terms.phtml
|
|
|
16 |
| --- | --- | --- |
|
17 |
| "yurble_baby_clap" | ![](https://images.neopets.com/template_images/yurble_baby_clap.gif) | ![](https://cdn.discordapp.com/attachments/1010693530181718146/1043310485413576794/yurble_baby_clap.jpg) |
|
18 |
|
19 |
+
## Training Details
|
20 |
|
21 |
The text encoder was trained along with the UNet at half precision for 15% of the total 8,000 steps (1,200 steps), and then the UNet was trained alone for the rest. I used a polynomial learning rate decay starting at 2e-6 (the default in fast-DreamBooth).
|
22 |
|
23 |
|
24 |
+
## How to use with `diffusers` library (section from [openjourney](https://huggingface.co/openjourney/openjourney))
|
25 |
+
|
26 |
+
### Installing necessary libraries
|
27 |
+
|
28 |
+
_NOTE: This model currently works on a computer which has at least one NVIDIA GPU with CUDA support_.
|
29 |
+
|
30 |
+
```
|
31 |
+
pip install diffusers transformers ftfy scipy accelerate
|
32 |
+
```
|
33 |
+
|
34 |
+
### Logging in
|
35 |
+
|
36 |
+
For logging in, you have to use `huggingface-cli login` command.
|
37 |
+
|
38 |
+
### Importing necessary libraries
|
39 |
+
|
40 |
+
```python
|
41 |
+
import torch
|
42 |
+
from torch import autocast
|
43 |
+
from diffusers.models import AutoencoderKL
|
44 |
+
from diffusers import StableDiffusionPipeline
|
45 |
+
```
|
46 |
+
|
47 |
+
### Creating the pipeline
|
48 |
+
|
49 |
+
```python
|
50 |
+
pipe = StableDiffusionPipeline.from_pretrained("doohickey-neopian-diffusion", use_auth_token=True)
|
51 |
+
pipe = pipe.to("cuda")
|
52 |
+
```
|
53 |
+
|
54 |
+
### (Optional) Disabling NSFW Filter
|
55 |
+
|
56 |
+
_NOTE: Remember disabling this is not recommended, but since people had problems with some very basic prompts, we offer this. Remember AI art has a vast majority of users, so keep underage and sensitive users safe._
|
57 |
+
|
58 |
+
```python
|
59 |
+
def dummy(images, **kwargs):
|
60 |
+
return images, False
|
61 |
+
|
62 |
+
pipe.safety_checker = dummy
|
63 |
+
```
|
64 |
+
|
65 |
+
### Image Generation
|
66 |
+
|
67 |
+
```python
|
68 |
+
prompt = "my prompt"
|
69 |
+
|
70 |
+
with autocast("cuda"):
|
71 |
+
image = pipe(prompt=prompt, num_inference_steps=100, width=512, height=512, guidance_scale=15).images[0]
|
72 |
+
|
73 |
+
image.save("image.png")
|
74 |
+
```
|
75 |
+
|
76 |
+
## Neopets Copyright Notice
|
77 |
"Don't forget, if you use these images on a non-Neopets page, you need to include our Copyright Notice." https://www.neopets.com/terms.phtml
|