Koolchh commited on
Commit
da991f5
1 Parent(s): 9cbb3fe

Add 🧨Diffusers library guide

Browse files
Files changed (1) hide show
  1. README.md +22 -0
README.md CHANGED
@@ -29,6 +29,28 @@ tags:
29
  - **Sampling method, sampling steps and CFG scale**: I find **(Euler a, 28, 5)** good. You are encouraged to experiment with other settings.
30
  - **Width and height**: **832*1216** for portrait, **1024*1024** for square, and **1216*832** for landscape.
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  ## Training Details
33
 
34
  AnimeBoysXL is trained from [Stable Diffusion XL Base 1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0), on ~516k images.
 
29
  - **Sampling method, sampling steps and CFG scale**: I find **(Euler a, 28, 5)** good. You are encouraged to experiment with other settings.
30
  - **Width and height**: **832*1216** for portrait, **1024*1024** for square, and **1216*832** for landscape.
31
 
32
+ ## How to use from the 🧨Diffusers library
33
+
34
+ ```python
35
+ import torch
36
+ from diffusers import DiffusionPipeline
37
+
38
+ pipe = DiffusionPipeline.from_pretrained("Koolchh/AnimeBoysXL-v1.0", torch_dtype=torch.float16, use_safetensors=True, variant="fp16")
39
+ pipe.to("cuda")
40
+
41
+ prompt = ", best quality, amazing quality, best aesthetic, absurdres"
42
+ negative_prompt = "lowres, (bad:1.05), text, error, missing, extra, fewer, cropped, jpeg artifacts, worst quality, bad quality, watermark, bad aesthetic, unfinished, chromatic aberration, scan, scan artifacts, 1girl, breasts"
43
+
44
+ image = pipe(
45
+ prompt=prompt,
46
+ negative_prompt=negative_prompt,
47
+ width=1024,
48
+ height=1024,
49
+ guidance_scale=5,
50
+ num_inference_steps=28
51
+ ).images[0]
52
+ ```
53
+
54
  ## Training Details
55
 
56
  AnimeBoysXL is trained from [Stable Diffusion XL Base 1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0), on ~516k images.