File size: 7,690 Bytes
b0750d7
 
aa40637
 
 
f888d54
2a8d27c
9e3464e
b0750d7
aa40637
 
 
 
 
 
 
08c09df
aa40637
 
 
 
 
446aa8f
aa40637
7691b31
aa40637
 
 
 
 
 
 
 
08c09df
aa40637
0a0cef0
aa40637
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c24d9a0
aa40637
c24d9a0
 
 
 
 
aa40637
c24d9a0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c900b60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f888d54
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
---
license: other
tags:
- stable-diffusion
- safetensors
- text-to-image
library_name: diffusers
inference: false
---

# Realgar-v1.0

This model is a Stable Diffusion model based on WD 1.5 beta 3 base.

This model does not include the NovelAI Leak model.

[WD 1.5 beta3 base](https://huggingface.co/waifu-diffusion/wd-1-5-beta3/blob/main/wd-beta3-base-fp16.safetensors) ใ‚’ใƒ™ใƒผใ‚นใซใ—ใŸใƒขใƒ‡ใƒซใงใ™ใ€‚

NAI ใƒชใƒผใ‚ฏใฏๅซใพใ‚Œใฆใ„ใพใ›ใ‚“ใ€‚

## Prompting

This model aims for stability with short prompt. It may sometimes be difficult to generate with long prompt or special concepts. `masterpiece, best quality` is not needed. 

However, as a minimum set of negative prompt, you can use `worst quality, low quality, bad aesthetic, oldest, bad anatomy, blurry`, or if you're unsure of good negative prompts, you can use the negative embedding [ParaNegative](https://huggingface.co/p1atdev/Realgar-v1/blob/main/ParaNegative.safetensors). 

To avoid NSFW outputs, it is recommended to include `nsfw, nude` and such in the negative prompt.

**If you want to avoid real life style, use `anime` in positive prompt.**

It is recommended to use highres fix if you can.


ใ“ใฎใƒขใƒ‡ใƒซใฏ็Ÿญใ„ใƒ—ใƒญใƒณใƒ—ใƒˆใงใฎๅฎ‰ๅฎšๆ€งใ‚’่ฟฝๆฑ‚ใ—ใŸใƒขใƒ‡ใƒซใงใ™ใ€‚้•ทใ„ใƒ—ใƒญใƒณใƒ—ใƒˆใ‚„ไธ€้ƒจใฎใ‚ณใƒณใ‚ปใƒ—ใƒˆใ‚’ใŸใ ใ—ใๆใ‘ใชใ„ๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใพใ™ใ€‚`masterpiece, best quality` ใฏไธ่ฆใงใ™ใ€‚

ใŸใ ใ—ใ€ๆœ€ไฝŽ้™ใฎใƒใ‚ฌใƒ†ใ‚ฃใƒ–ใƒ—ใƒญใƒณใƒ—ใƒˆใŒๅฟ…่ฆใงใ™ใ€‚ใ™ใใชใใจใ‚‚ `worst quality, low quality, bad aesthetic, oldest, bad anatomy, blurry` ใŒใ‚ใ‚‹ใจใ‚ˆใ„ใงใ™ใŒใ€่‰ฏใ„ใƒใ‚ฌใƒ†ใ‚ฃใƒ–ใƒ—ใƒญใƒณใƒ—ใƒˆใŒใ‚ใ‹ใ‚‰ใชใ„ๅ ดๅˆใฏ่ฃœๅŠฉ็š„ใซใƒใ‚ฌใƒ†ใ‚ฃใƒ–TI [ParaNegative](https://huggingface.co/p1atdev/Realgar-v1/blob/main/ParaNegative.safetensors) ใ‚’ไฝฟใ†ใ“ใจใŒๅ‡บๆฅใพใ™ใ€‚(TI ๅ˜ไฝ“ใงใฎๅŠนๆžœใฏใ‚ใพใ‚ŠๆœŸๅพ…ใ—ใชใ„ใงใใ ใ•ใ„)

NSFW ใชๅ‡บๅŠ›ใ‚’้ฟใ‘ใ‚‹ใŸใ‚ใซใ€ `nsfw, nude` ใชใฉใ‚’ใƒใ‚ฌใƒ†ใ‚ฃใƒ–ใƒ—ใƒญใƒณใƒ—ใƒˆใซๅ…ฅใ‚Œใ‚‹ใ“ใจใ‚’ๆŽจๅฅจใ—ใพใ™ใ€‚

**ๅ†™ๅฎŸ็š„ใช็”ปๅƒใฎๅ‡บๅŠ›ใ‚’้ฟใ‘ใŸใ„ๅ ดๅˆใฏใ€`anime` ใ‚’ใƒใ‚ธใƒ†ใ‚ฃใƒ–ใƒ—ใƒญใƒณใƒ—ใƒˆใซใ„ใ‚Œใฆใใ ใ•ใ„ใ€‚**

Highres fix ใ‚’ไฝฟใ†ใ“ใจใ‚’ๆŽจๅฅจใ—ใพใ™ใ€‚


## VAE
It is recommended to use the same VAE as WD 1.4, which can be found here https://huggingface.co/hakurei/waifu-diffusion-v1-4/blob/main/vae/kl-f8-anime2.ckpt

[WD 1.4 ใฎ VAE](https://huggingface.co/hakurei/waifu-diffusion-v1-4/blob/main/vae/kl-f8-anime2.ckpt) ใŒๆŽจๅฅจใงใ™ใ€‚

## License
This model is released under the Fair AI Public License 1.0-SD (https://freedevproject.org/faipl-1.0-sd/). If any derivative of this model is made, please share your changes accordingly. Special thanks to ronsor/undeleted (https://undeleted.ronsor.com/) for help with the license.

ใ“ใฎใƒขใƒ‡ใƒซใฏ WD 1.5 ใจๅŒใ˜ Fair AI Public License 1.0-SD (https://freedevproject.org/faipl-1.0-sd/) ใฎไธ‹้…ๅธƒใ•ใ‚Œใพใ™ใ€‚็”Ÿๆˆใ‚ตใƒผใƒ“ใ‚นใชใฉใงใ“ใฎใƒขใƒ‡ใƒซใพใŸใฏๆดพ็”Ÿใƒขใƒ‡ใƒซใ‚’ไฝฟใ†ๅ ดๅˆใฏใ€ใ‚ตใƒผใƒ“ใ‚นใฎๅˆฉ็”จ่€…ใซใƒขใƒ‡ใƒซใ‚’ๅ…ฌ้–‹ใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚่ฉณใ—ใ„ใƒปๆญฃ็ขบใชใƒฉใ‚คใ‚ปใƒณใ‚นใฏ [ๅŽŸๆ–‡](https://freedevproject.org/faipl-1.0-sd/) ใ‚’ๅ‚็…งใใ ใ•ใ„ใ€‚

## Examples

![image-0](https://huggingface.co/p1atdev/Realgar-v1/resolve/main/images/image-0.jpg)

```
anime, cat ears, red hair, hoodie, hoodie, looking at viewer, lying on flower field, many many many flowers, grass
Negative prompt: nsfw, ParaNegative, worst quality, low quality, bad aesthetic, oldest, blurry,
Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 3482852439, Size: 512x768, Model hash: eb9ce3842e, Model: realgar-v1-fp16, Denoising strength: 0.7, Clip skip: 2, Version: v1.2.1, Hires upscale: 2, Hires steps: 15, Hires upscaler: Latent
```

![image-1](https://huggingface.co/p1atdev/Realgar-v1/resolve/main/images/image-1.jpg)

```
anime, 1girl, flat chest, red hair, red hair ornament, parted bangs, bun, hair intakes, fascinator, hand up, v, one eye closed, grin, red clothes, frilled dress, bow, detached sleeves, gloves, looking at viewer, dynamic, cowboy shot, wind, sky
Negative prompt: nsfw, ParaNegative, worst quality, low quality, bad aesthetic, oldest, bad anatomy, blurry,
Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 232540561, Size: 512x768, Model hash: eb9ce3842e, Model: realgar-v1-fp16, Denoising strength: 0.65, Clip skip: 2, Version: v1.2.1, Hires upscale: 2, Hires steps: 15, Hires upscaler: Latent
```

![image-2](https://huggingface.co/p1atdev/Realgar-v1/resolve/main/images/image-2.jpg)

```
anime, 1girl, long hair, from side, white hair, star, solo, starry sky, profile, dress, starry sky, sky, long sleeves, star hair ornament, hand up, blue eyes, arm up, standing, looking up, floating hair, white dress, capelet, wavy hair, wide sleeves, glowing, feet out of frame, night sky, hair ornament
Negative prompt: nsfw, ParaNegative, worst quality, low quality, bad aesthetic, oldest, blurry
Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 968862690, Size: 512x768, Model hash: eb9ce3842e, Model: realgar-v1-fp16, Denoising strength: 0.65, Clip skip: 2, Version: v1.2.1, Hires upscale: 2, Hires steps: 15, Hires upscaler: Latent
```

![image-3](https://huggingface.co/p1atdev/Realgar-v1/resolve/main/images/image-3.jpg)

```
anime, 1girl, cat ears, blue hair, medium hair, parted bangs, white dress shirt, belt, skirt, barefoot, wariza, sitting, looking at viewer,
Negative prompt: nsfw, ParaNegative, worst quality, low quality, bad aesthetic, oldest, bad anatomy, blurry,
Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 2387123734, Size: 512x768, Model hash: eb9ce3842e, Model: realgar-v1-fp16, Denoising strength: 0.7, Clip skip: 2, Version: v1.2.1, Hires upscale: 2, Hires steps: 15, Hires upscaler: Latent
```

![image-4](https://huggingface.co/p1atdev/Realgar-v1/resolve/main/images/image-4.jpg)

```
anime, 2girls wearing school uniform are at restaurant
Negative prompt: nsfw, worst quality, low quality, bad aesthetic, oldest, blurry,
Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 2425583782, Size: 768x512, Model hash: eb9ce3842e, Model: realgar-v1-fp16, Clip skip: 2, Version: v1.2.1
```

![image-5](https://huggingface.co/p1atdev/Realgar-v1/resolve/main/images/image-5.jpg)

```
anime, watercolor of 1girl,
Negative prompt: nsfw, worst quality, low quality, bad aesthetic, oldest, blurry,
Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 3429871130, Size: 512x768, Model hash: eb9ce3842e, Model: realgar-v1-fp16, Clip skip: 2, Version: v1.2.1
```

## ๐Ÿงจ Diffusers

[![open in colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/#fileId=https://huggingface.co/p1atdev/Realgar-v1/blob/main/diffusers.ipynb)


```bash
pip install diffusers transformers accelerate scipy safetensors
pip install xformers 
```

```py
import torch
from diffusers import DiffusionPipeline, EulerAncestralDiscreteScheduler

model_id = "p1atdev/Realgar-v1"
pipe = DiffusionPipeline.from_pretrained(
    model_id,
    torch_dtype=torch.float16,
    custom_pipeline="lpw_stable_diffusion"
)
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)

pipe = pipe.to("cuda")
pipe.enable_attention_slicing()
pipe.enable_xformers_memory_efficient_attention() # required

prompt = """
anime, 1girl, blue hair, cat ears, sweater vest,
"""
negative_prompt = "nsfw, nude, worst quality, low quality, bad aesthetic, oldest, bad anatomy"

width = 512
height = 768

image = pipe(
    prompt, 
    negative_prompt=negative_prompt,
    guidance_scale=7.0,
    num_inference_steps=20,
    width=width,
    height=height,
).images[0]

display(image) # for notebooks
# image.save("girl.png")
```