--- license: other tags: - stable-diffusion - safetensors - text-to-image library_name: diffusers --- # 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") ```