benjamin-paine commited on
Commit
2ab5009
·
verified ·
1 Parent(s): e422b41

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +22 -46
README.md CHANGED
@@ -1,25 +1,25 @@
1
  ---
2
- tasks:
3
- - text-to-image-synthesis
4
- model-type:
5
- - stable_diffusion
6
- domain:
7
- - mm
8
- frameworks:
9
- - pytorch
10
- customized-quickstart: False
11
- finetune-support: False
12
  license: creativeml-openrail-m
13
- language:
14
- - cn
15
- - en
16
  tags:
17
  - stable-diffusion
18
  - stable-diffusion-diffusers
19
  - text-to-image
20
- - zh
21
- - Chinese
22
-
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  ---
24
 
25
  # Stable Diffusion v1-5 Model Card
@@ -32,33 +32,16 @@ checkpoint and subsequently fine-tuned on 595k steps at resolution 512x512 on "l
32
 
33
  You can use this both with the [🧨Diffusers library](https://github.com/huggingface/diffusers) and the [RunwayML GitHub repository](https://github.com/runwayml/stable-diffusion).
34
 
35
-
36
- ### modelscope usage
37
-
38
- ```python
39
- from modelscope.utils.constant import Tasks
40
- from modelscope.pipelines import pipeline
41
- import cv2
42
-
43
- pipe = pipeline(task=Tasks.text_to_image_synthesis,
44
- model='AI-ModelScope/stable-diffusion-v1-5',
45
- model_revision='v1.0.0')
46
-
47
- prompt = '飞流直下三千尺,油画'
48
- output = pipe({'text': prompt})
49
- cv2.imwrite('result.png', output['output_imgs'][0])
50
-
51
- ```
52
-
53
-
54
-
55
  ### Diffusers usage
56
  ```py
57
  from diffusers import StableDiffusionPipeline
58
  import torch
59
 
60
- model_id = "runwayml/stable-diffusion-v1-5"
61
- pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
 
 
 
62
  pipe = pipe.to("cuda")
63
 
64
  prompt = "a photo of an astronaut riding a horse on mars"
@@ -66,15 +49,9 @@ image = pipe(prompt).images[0]
66
 
67
  image.save("astronaut_rides_horse.png")
68
  ```
69
- For more detailed instructions, use-cases and examples in JAX follow the instructions [here](https://github.com/huggingface/diffusers#text-to-image-generation-with-stable-diffusion)
70
 
71
- ### Original GitHub Repository
72
-
73
- 1. Download the weights
74
- - [v1-5-pruned-emaonly.ckpt](https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt) - 4.27GB, ema-only weight. uses less VRAM - suitable for inference
75
- - [v1-5-pruned.ckpt](https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned.ckpt) - 7.7GB, ema+non-ema weights. uses more VRAM - suitable for fine-tuning
76
 
77
- 2. Follow instructions [here](https://github.com/runwayml/stable-diffusion).
78
 
79
  ## Model Details
80
  - **Developed by:** Robin Rombach, Patrick Esser
@@ -163,7 +140,6 @@ The concepts are intentionally hidden to reduce the likelihood of reverse-engine
163
  Specifically, the checker compares the class probability of harmful concepts in the embedding space of the `CLIPTextModel` *after generation* of the images.
164
  The concepts are passed into the model with the generated image and compared to a hand-engineered weight for each NSFW concept.
165
 
166
-
167
  ## Training
168
 
169
  **Training Data**
 
1
  ---
 
 
 
 
 
 
 
 
 
 
2
  license: creativeml-openrail-m
 
 
 
3
  tags:
4
  - stable-diffusion
5
  - stable-diffusion-diffusers
6
  - text-to-image
7
+ inference: false
8
+ library_name: diffusers
9
+ extra_gated_prompt: |-
10
+ One more step before getting this model.
11
+ This model is open access and available to all, with a CreativeML OpenRAIL-M license further specifying rights and usage.
12
+ The CreativeML OpenRAIL License specifies:
13
+
14
+ 1. You can't use the model to deliberately produce nor share illegal or harmful outputs or content
15
+ 2. CompVis claims no rights on the outputs you generate, you are free to use them and are accountable for their use which must not go against the provisions set in the license
16
+ 3. You may re-distribute the weights and use the model commercially and/or as a service. If you do, please be aware you have to include the same use restrictions as the ones in the license and share a copy of the CreativeML OpenRAIL-M to all your users (please read the license entirely and carefully)
17
+ Please read the full license here: https://huggingface.co/spaces/CompVis/stable-diffusion-license
18
+
19
+ By clicking on "Access repository" below, you accept that your *contact information* (email address and username) can be shared with the model authors as well.
20
+
21
+ extra_gated_fields:
22
+ I have read the License and agree with its terms: checkbox
23
  ---
24
 
25
  # Stable Diffusion v1-5 Model Card
 
32
 
33
  You can use this both with the [🧨Diffusers library](https://github.com/huggingface/diffusers) and the [RunwayML GitHub repository](https://github.com/runwayml/stable-diffusion).
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  ### Diffusers usage
36
  ```py
37
  from diffusers import StableDiffusionPipeline
38
  import torch
39
 
40
+ pipe = StableDiffusionPipeline.from_pretrained(
41
+ "benjamin-paine/stable-diffusion-v1-5",
42
+ variant="fp16",
43
+ torch_dtype=torch.float16
44
+ )
45
  pipe = pipe.to("cuda")
46
 
47
  prompt = "a photo of an astronaut riding a horse on mars"
 
49
 
50
  image.save("astronaut_rides_horse.png")
51
  ```
 
52
 
53
+ For more detailed instructions, use-cases and examples in JAX follow the instructions [here](https://github.com/huggingface/diffusers#text-to-image-generation-with-stable-diffusion)
 
 
 
 
54
 
 
55
 
56
  ## Model Details
57
  - **Developed by:** Robin Rombach, Patrick Esser
 
140
  Specifically, the checker compares the class probability of harmful concepts in the embedding space of the `CLIPTextModel` *after generation* of the images.
141
  The concepts are passed into the model with the generated image and compared to a hand-engineered weight for each NSFW concept.
142
 
 
143
  ## Training
144
 
145
  **Training Data**