Instructions to use HERIUN/inkspire_korean with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use HERIUN/inkspire_korean with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/flux-3-image-klein-base", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("HERIUN/inkspire_korean") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
import torch
from diffusers import DiffusionPipeline
from diffusers.utils import load_image
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("black-forest-labs/flux-3-image-klein-base", dtype=torch.bfloat16, device_map="cuda")
pipe.load_lora_weights("HERIUN/inkspire_korean")
prompt = "Turn this cat into a dog"
input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")
image = pipe(image=input_image, prompt=prompt).images[0]InkSpire Korean โ ํ๊ธ ์๊ธ์จ ์คํ์ผ ์์ฑ LoRA
InkSpire (Wang et al., ICLR 2026) ๋ฅผ ํ๊ธ๋ก ์ฌํํ LoRA. FLUX.3-Image-Klein-Base + LoRA r32 (71.2M), 13k step. ์คํ์ผ ์๊ธ์จ ํ ์ค(+ ๊ทธ ์ ์ฌ)์ ๋ณด๊ณ ๊ฐ์ ํ์ฒด๋ก ์ ๋ฌธ์ฅ์ ์ด๋ค.
- ํ์ต ์ฝ๋ยท์คํ ๊ธฐ๋ก: https://github.com/HERIUN/Inkspire_korean_finetuning
- ๋ฐ๋ชจ(Eruku ์ ๋ชจ๋ธ ์ ํ): https://huggingface.co/spaces/HERIUN/eruku_korean_demo
- ๊ฐ์ ๋ฐ์ดํฐ๋ก ํ์ตํ ์๊ธฐํ๊ท ๋ชจ๋ธ ๋น๊ต ๋์: HERIUN/eruku_korean
์ ๋ ฅ ๊ท์ฝ
์บ๋ฒ์ค X(์ = ref ์๊ธ์จ, ์๋ = ๋น ์นธ) ยท ์ฝํ
์ธ ์ด๋ฏธ์ง Xc(NanumGothic ์ผ๋ก ref ์ ์ฌ์ ๋ชฉํ ๋ฌธ๊ตฌ๋ฅผ ๊ธ์ ์์์ ๊ทธ๋ฆฐ ๊ฒ) ยท ๋ง์คํฌ.
Xc ์ ref ์ค(์ ์ฌ๋ฅผ ํ์คํฐํธ๋ก ๊ทธ๋ฆฐ ๊ธ์ ๋์ํ)๋ก ref ํ์ฒด๋ฅผ ๋ฒ ๋ผ๋ฏ๋ก ํ์ฒด๋ฅผ ๋ฐ๋ผ ํ๋ ค๋ฉด ref ์ ์ฌ(style text)๊ฐ ํ์ํ๋ค.
์ ์ฌ ์์ด๋ ์์ฑ์ ๋๊ณ ๊ธ์๋ ์คํ๋ ค ์ ํํ์ง๋ง(์ค์๊ธ์จ CER 0.168 โ 0.033, cfg 2.0) ํ์ฒด๊ฐ ๊ฑฐ์ ์ฌ๋ผ์ง๋ค(HWD 1.46 โ 2.05).
๋ชฉํ ์ค ํญ์ ref ์ "์๊ธ์จ ํญ / ํ์คํฐํธ ํญ" ๋น์จ๋ก ๋ง์ถ๋ค(ref_width, ๊ธฐ๋ณธ).
์ฑ๋ฅ (ref ์ ์ฌ๋ฅผ ์ค ๋, PP-OCRv6 ํ๋ CER)
InkSpire ๋ ๋ด์ฉ CFG(cfg=2.0, uncond="gen", ๊ถ์ฅ) ์ ๋(cfg=1.0, ๊ธฐ๋ณธ) ๋ ์ค๋ก ์ ๋๋ค. Eruku ๋ ๊ถ์ฅ cfg 1.5.
| ํ๊ฐ | InkSpire cfg 2.0 | InkSpire cfg 1.0 | Eruku Korean |
|---|---|---|---|
| ํ๊ธ ํฐํธ held-out 16์ข n=300 โ CERโ / HWDโ | 0.0045 / 1.02 | 0.023 / 0.93 | 0.010 / 1.12 |
| ์ค์๊ธ์จ ๋ฌธ์ฅ ๊ต์ฐจ ์์ฑ n=20 โ CERโ / HWDโ | 0.071 / 1.60 | 0.246 / 1.41 | 0.014 / 1.51 |
| ์ค์๊ธ์จ ์์ ์นธ n=286 โ CERโ / HWDโ | 0.180 / 1.37 | 0.417 / 1.20 | 0.711 (๋ฐฑ์ง 7) / 1.83 |
| IAM lines 2,925 โ HWDโ / FIDโ | โ | 1.68 / 18.58 | 1.62 / 20.00 |
- ํฐํธ ์กฐ๊ฑด์์ cfg 2.0 ์ด ์ ํ๋ยทํ์ฒด ๋ชจ๋ Eruku ๋ฅผ ์์ ๋ค. ์ค์ ์ฌ๋ ์๊ธ์จ ๋ฌธ์ฅ์ ์ ํ๋๊ฐ Eruku ์ ๋ค์ง๋ค โ ํฐํธ๋ก๋ง ํ์ตํด ๋ถํฌ ๋ฐ ๊ธ์ ๋ชจ์์ ๊ทธ๋๋ก ๋ฒ ๋๋ค.
- CFG ๋ ์ ํ๋ โ ํ์ฒด(HWD) ์ ์ถฉ์ด๋ค. ์ง์ ๋ถํ ref(์์ ์นธยทํ ์ ์์ฌ)์์ InkSpire ๊ฐ ๋ฐฑ์งยทํญ์ฃผ๊ฐ ๊ฑฐ์ ์๋ค.
- ํ๊ณ ์ ์ฒด์ ์ฌ์ฉ ํ: GitHub README ใ๋จผ์ ์ฝ์ ๊ฒใ. ์ธก์ ๊ทผ๊ฑฐ:
docs/EXPERIMENTS.mdยง9ยทยง10.
์ฌ์ฉ๋ฒ
์ถ๋ก ์ฝ๋๋ GitHub repo ์ ์๋ค(๋ฒ ์ด์ค ๊ฐ์ค์น๋ black-forest-labs/flux-3-image-klein-base ์ฝ๊ด ์๋ฝ ํ ์๋ ๋ค์ด๋ก๋).
import numpy as np, torch
from huggingface_hub import snapshot_download
from PIL import Image
from infer.inkspire import InkSpireGen # GitHub repo ๋ฃจํธ์์
lora = snapshot_download("HERIUN/inkspire_korean") # pytorch_lora_weights.safetensors + klein_empty_prompt.pt
# klein_empty_prompt.pt ๋ model_zoo/ ์ ๋๋ค(๋น ํ๋กฌํํธ ํ
์คํธ ์๋ฒ ๋ฉ ์บ์ โ ํ
์คํธ ์ธ์ฝ๋๋ฅผ ์ ์ฌ๋ฆฐ๋ค)
# ํ์คํฐํธ: ๋๋๊ณ ๋(SIL OFL 1.1, https://hangeul.naver.com/font) NanumGothic-Regular.ttf ๋ฅผ
# assets/fonts/label/ ์ ๋๋ค โ std_font ๊ธฐ๋ณธ ๊ฒฝ๋ก์ด๊ณ , ํ์ต ๋ Xc ๋ฅผ ๊ทธ๋ฆฐ ํฐํธ์ ๊ฐ์ ํ์ผ์ด์ด์ผ ํ๋ค
g = InkSpireGen(lora, device="cuda", cfg=2.0, uncond="gen", # ๊ถ์ฅ. cfg=1.0 = CFG ๋(ํ์ฒด ์ต๋, ์คํโ)
std_font="assets/fonts/label/NanumGothic-Regular.ttf")
ref = np.asarray(Image.open("style_line.png").convert("L")) # ์๊ธ์จ ํ ์ค(์ค์บ ํ
๋๋ฆฌยท์ฌ๋ฐฑ์ ๋ฏธ๋ฆฌ ์๋ผ ๋๋ค)
out = g.gen_lines(ref, "์คํ์ผ ์ด๋ฏธ์ง์ ์ ์ฌ", ["์์ฑํ ๋ฌธ์ฅ"], seed=0)[0] # u8 ์ค ์ด๋ฏธ์ง
- ์ ์ฌ๋ ๊ธ์ ๊ทธ๋๋ก ์ ํํ โ Xc ๋์ํ์ ์์ฒ์ด๋ค. ๋น์ฐ๋ฉด(
"") ๊ธ์๋ ์ ํํ์ง๋ง ํ์ฒด๊ฐ ์ฌ๋ผ์ง๋ค. - ํ๋ฆฐ ๊ธ์๊ฐ ๋ณด์ด๋ฉด seed ๋ง ๋ฐ๊ฟ ๋ค์ โ ์ค๋ฅ๊ฐ ์๋๋ง๋ค ๋ค๋ฅธ ๊ธ์์์ ๋๋ค.
- ํ๋ฆฐ ์ฐํ ref ๋ ์ถ๋ ฅ๋ ํ๋ฆฌ๋ค(์ํฌ ๋๋๋ฅผ ๋ฒ ๋๋ค). ์งํ๊ฒ ์ํ๋ฉด ref ๋๋น๋ฅผ ์ฌ๋ ค ๋ฃ๋๋ค.
๋ผ์ด์ ์ค
FLUX Kommunity License (๋ฒ ์ด์ค ๋ชจ๋ธ๊ณผ ๋์ผ, ๋น์์ ์ฉ๋) โ NOTICE ์ฐธ๊ณ . ํ์ต ๋ฐ์ดํฐ๋ ๊ณต๊ฐ ํ๊ธ ํฐํธ ๋ ๋์ด๋ฉฐ, ๋น๊ต ํ๊ฐ์ ์ด ์ค์๊ธ์จ ๋ฐ์ดํฐ๋ ํฌํจํ์ง ์์๋ค.
- Downloads last month
- 63
Model tree for HERIUN/inkspire_korean
Base model
black-forest-labs/flux-3-image-klein-base
