File size: 2,431 Bytes
78bbfab
 
0424b37
 
 
 
 
 
78bbfab
0424b37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
---
license: creativeml-openrail-m
tags:
- stable-diffusion
- stable-diffusion-diffusers
- text-to-image
inference: true
language: ko
---

# my-k-anything-v3-0

[Bingsu/my-korean-stable-diffusion-v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5)์™€ ๊ฐ™์€ ๋ฐฉ๋ฒ•์œผ๋กœ ๋งŒ๋“  k-์•„๋ฌด๊ฑฐ๋‚˜ 3.0 ๋ชจ๋ธ.

์ƒ๊ฐ๋ณด๋‹ค ์ž˜ ์•ˆ๋˜๊ณ , ํŠนํžˆ ์บ๋ฆญํ„ฐ์— ๊ด€ํ•œ ์ •๋ณด๋Š” ๋‹ค ์žŠ์–ด๋ฒ„๋ฆฐ ๊ฑธ๋กœ ๋ณด์ž…๋‹ˆ๋‹ค.

# Usage

```sh
pip install transformers accelerate>=0.14.0 diffusers>=0.7.2
```

```python
import torch
from diffusers import StableDiffusionPipeline

repo = "Bingsu/my-k-anything-v3-0"
pipe = StableDiffusionPipeline.from_pretrained(
    repo, torch_dtype=torch.float16,
)
pipe.to("cuda")
pipe.safety_checker = None
```

```python
from typing import Optional
import torch


def gen_image(
    prompt: str,
    negative_prompt: Optional[str] = None,
    seed: Optional[int] = None,
    scale: float = 7.5,
    steps: int = 30,
):
    if seed is not None:
        generator = torch.Generator("cuda").manual_seed(seed)
    else:
        generator = None

    image = pipe(
        prompt=prompt,
        negative_prompt=negative_prompt,
        generator=generator,
        guidance_scale=scale,
        num_inference_steps=steps,
    ).images[0]

    return image
```

```python
prompt = "ํŒŒ๋ž€์ƒ‰ ํฌ๋‹ˆํ…Œ์ผ ํ—ค์–ด, ๋ธŒ๋กœ์น˜, ์ •์žฅ์„ ์ž…์€ ์„ฑ์ธ ์—ฌ์„ฑ, ๊ณ ํ€„๋ฆฌํ‹ฐ, ์ตœ๊ณ ํ’ˆ์งˆ"
negative = "์ €ํ™”์งˆ, ์ €ํ’ˆ์งˆ, ํ…์ŠคํŠธ"
seed = 42467781
scale = 12.0
gen_image(prompt, negative, seed, scale)
```

![Imgur](https://i.imgur.com/24G8n1m.png)

## License

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:

1. You can't use the model to deliberately produce nor share illegal or harmful outputs or content

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
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)