Bingsu commited on
Commit
0424b37
โ€ข
1 Parent(s): 4e4b3ed

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +77 -0
README.md CHANGED
@@ -1,3 +1,80 @@
1
  ---
2
  license: creativeml-openrail-m
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: creativeml-openrail-m
3
+ tags:
4
+ - stable-diffusion
5
+ - stable-diffusion-diffusers
6
+ - text-to-image
7
+ inference: true
8
+ language: ko
9
  ---
10
+
11
+ # my-k-anything-v3-0
12
+
13
+ [Bingsu/my-korean-stable-diffusion-v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5)์™€ ๊ฐ™์€ ๋ฐฉ๋ฒ•์œผ๋กœ ๋งŒ๋“  k-์•„๋ฌด๊ฑฐ๋‚˜ 3.0 ๋ชจ๋ธ.
14
+
15
+ ์ƒ๊ฐ๋ณด๋‹ค ์ž˜ ์•ˆ๋˜๊ณ , ํŠนํžˆ ์บ๋ฆญํ„ฐ์— ๊ด€ํ•œ ์ •๋ณด๋Š” ๋‹ค ์žŠ์–ด๋ฒ„๋ฆฐ ๊ฑธ๋กœ ๋ณด์ž…๋‹ˆ๋‹ค.
16
+
17
+ # Usage
18
+
19
+ ```sh
20
+ pip install transformers accelerate>=0.14.0 diffusers>=0.7.2
21
+ ```
22
+
23
+ ```python
24
+ import torch
25
+ from diffusers import StableDiffusionPipeline
26
+
27
+ repo = "Bingsu/my-k-anything-v3-0"
28
+ pipe = StableDiffusionPipeline.from_pretrained(
29
+ repo, torch_dtype=torch.float16,
30
+ )
31
+ pipe.to("cuda")
32
+ pipe.safety_checker = None
33
+ ```
34
+
35
+ ```python
36
+ from typing import Optional
37
+ import torch
38
+
39
+
40
+ def gen_image(
41
+ prompt: str,
42
+ negative_prompt: Optional[str] = None,
43
+ seed: Optional[int] = None,
44
+ scale: float = 7.5,
45
+ steps: int = 30,
46
+ ):
47
+ if seed is not None:
48
+ generator = torch.Generator("cuda").manual_seed(seed)
49
+ else:
50
+ generator = None
51
+
52
+ image = pipe(
53
+ prompt=prompt,
54
+ negative_prompt=negative_prompt,
55
+ generator=generator,
56
+ guidance_scale=scale,
57
+ num_inference_steps=steps,
58
+ ).images[0]
59
+
60
+ return image
61
+ ```
62
+
63
+ ```python
64
+ prompt = "ํŒŒ๋ž€์ƒ‰ ํฌ๋‹ˆํ…Œ์ผ ํ—ค์–ด, ๋ธŒ๋กœ์น˜, ์ •์žฅ์„ ์ž…์€ ์„ฑ์ธ ์—ฌ์„ฑ, ๊ณ ํ€„๋ฆฌํ‹ฐ, ์ตœ๊ณ ํ’ˆ์งˆ"
65
+ negative = "์ €ํ™”์งˆ, ์ €ํ’ˆ์งˆ, ํ…์ŠคํŠธ"
66
+ seed = 42467781
67
+ scale = 12.0
68
+ gen_image(prompt, negative, seed, scale)
69
+ ```
70
+
71
+ ![Imgur](https://i.imgur.com/24G8n1m.png)
72
+
73
+ ## License
74
+
75
+ This model is open access and available to all, with a CreativeML OpenRAIL-M license further specifying rights and usage. The CreativeML OpenRAIL License specifies:
76
+
77
+ 1. You can't use the model to deliberately produce nor share illegal or harmful outputs or content
78
+
79
+ 2. The authors 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
80
+ 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) [Please read the full license here](https://huggingface.co/spaces/CompVis/stable-diffusion-license)