skytnt commited on
Commit
1fe9de6
·
1 Parent(s): 12bcf5e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +37 -0
README.md CHANGED
@@ -1,3 +1,40 @@
1
  ---
 
 
 
 
 
 
2
  license: apache-2.0
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ # OnnxStableDiffusionLongPromptWeightingPipeline
13
+
14
+ Onnx 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
+ require diffusers>=0.4.0
17
+
18
+ ```python
19
+ from diffusers import DiffusionPipeline
20
+ import torch
21
+
22
+ pipe = DiffusionPipeline.from_pretrained(
23
+ 'CompVis/stable-diffusion-v1-4',
24
+ custom_pipeline="waifu-research-department/onnx-long-prompt-weighting-pipeline",
25
+ revision="onnx",
26
+ provider="CUDAExecutionProvider"
27
+ )
28
+ pipe=pipe.to("cuda")
29
+
30
+ prompt = "a photo of an astronaut riding a horse on mars, best quality"
31
+ 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"
32
+
33
+ pipe.text2img(prompt, width=512,height=512,negative_prompt=neg_prompt,max_embeddings_multiples=3).images[0]
34
+ ```
35
+
36
+ if you see
37
+ ```
38
+ Token indices sequence length is longer than the specified maximum sequence length for this model ( 108 > 77 ) . Running this sequence through the model will result in indexing errors
39
+ ```
40
+ This is normal, do not worry .