Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
library_name: diffusers
|
5 |
+
tags:
|
6 |
+
- stable-diffusion
|
7 |
+
- text-to-image
|
8 |
+
license: apache-2.0
|
9 |
+
inference: false
|
10 |
+
---
|
11 |
+
|
12 |
+
# StableDiffusionLongPromptWeightingPipeline
|
13 |
+
|
14 |
+
Pipeline for text-to-image and image-to-image generation using Stable Diffusion, without tokens length limit and support parsing weighting in prompt.
|
15 |
+
|
16 |
+
```python
|
17 |
+
from diffusers import DiffusionPipeline
|
18 |
+
import torch
|
19 |
+
|
20 |
+
pipe = DiffusionPipeline.from_pretrained(
|
21 |
+
'hakurei/waifu-diffusion',
|
22 |
+
custom_pipeline="skytnt/stable-diffusion-long-prompt-pipeline",
|
23 |
+
revision="fp16",
|
24 |
+
torch_dtype=torch.float16
|
25 |
+
)
|
26 |
+
pipe.safety_checker = None
|
27 |
+
pipe=pipe.to("cuda")
|
28 |
+
|
29 |
+
prompt = "best_quality (1girl:1.3) bow bride brown_hair closed_mouth frilled_bow frilled_hair_tubes frills (full_body:1.3) fox_ear hair_bow hair_tubes happy hood japanese_clothes kimono long_sleeves red_bow smile solo tabi uchikake white_kimono wide_sleeves cherry_blossoms"
|
30 |
+
neg_prompt = "lowres, bad_anatomy, error_body, error_hair, error_arm, error_hands, bad_hands, error_fingers, bad_fingers, missing_fingers, error_legs, bad_legs, multiple_legs, missing_legs, error_lighting, error_shadow, error_reflection, text, error, extra_digit, fewer_digits, cropped, worst_quality, low_quality, normal_quality, jpeg_artifacts, signature, watermark, username, blurry"
|
31 |
+
|
32 |
+
pipe.text2img(prompt, width=512,height=768,negative_prompt=neg_prompt,max_embeddings_multiples=3).images[0]
|
33 |
+
```
|