Update README.md
Browse files
README.md
CHANGED
@@ -18,4 +18,24 @@ base_model:
|
|
18 |
|
19 |
### Model Description
|
20 |
|
21 |
-
black-forest-labs/FLUX.1-dev๋ฅผ ๊ธฐ๋ฐ์ผ๋ก Bingsu/clip-vit-large-patch14-ko๋ฅผ ์ ์ฉํ๊ณ , T5 Encoder์์ ํ๊ตญ์ด vocab ํ์ฅ์ ์ ์ฉํด์ fine-tuning(์ฝ๋ฉ ์ฟผํ ์ด์๋ก ์ธํด์, 1 X A100์ 2์๊ฐ ํ์ต) ์ ์ฉ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
### Model Description
|
20 |
|
21 |
+
black-forest-labs/FLUX.1-dev๋ฅผ ๊ธฐ๋ฐ์ผ๋ก Bingsu/clip-vit-large-patch14-ko๋ฅผ ์ ์ฉํ๊ณ , T5 Encoder์์ ํ๊ตญ์ด vocab ํ์ฅ์ ์ ์ฉํด์ fine-tuning(์ฝ๋ฉ ์ฟผํ ์ด์๋ก ์ธํด์, 1 X A100์ 2์๊ฐ ํ์ต) ์ ์ฉ
|
22 |
+
|
23 |
+
### example
|
24 |
+
```
|
25 |
+
import torch
|
26 |
+
from diffusers import FluxPipeline
|
27 |
+
pipe = FluxPipeline.from_pretrained("jaeyong2/FLUX.1-dev-ko", torch_dtype=torch.bfloat16)
|
28 |
+
|
29 |
+
pipe.enable_model_cpu_offload() #save some VRAM by offloading the model to CPU. Remove this if you have enough GPU power
|
30 |
+
|
31 |
+
prompt = "ํ๋ ์๋ฅผ ๋ฌ๋ฆฌ๋ ๊ณ ์์ด'"
|
32 |
+
image = pipe(
|
33 |
+
prompt,
|
34 |
+
height=1024,
|
35 |
+
width=1024,
|
36 |
+
guidance_scale=3.5,
|
37 |
+
num_inference_steps=50,
|
38 |
+
max_sequence_length=512,
|
39 |
+
generator=torch.Generator("cpu").manual_seed(0)
|
40 |
+
).images[0]
|
41 |
+
```
|