Kanji Font Style Transfer Pipeline
漢字フォント画像の生成パイプラインです。コンテンツ画像とスタイル参照画像から、Flow Matching によってスタイル転送された漢字フォント画像を生成します。
Pipeline Overview
このパイプラインは以下のコンポーネントで構成されています:
unet/: UNet2DConditionModelcontent_encoder.pt: ResNet-based content encoderstyle_encoder.pt: ResNet-based style encoderscheduler/: Flow Matching scheduler
Usage Example
from pipeline import KanjiFontStyleTransferPipeline
from PIL import Image
pipeline = KanjiFontStyleTransferPipeline.from_pretrained(
"bishopfunc/kanji-font-style-transfer"
)
content_img = Image.open("content.png").convert("L")
style_img = Image.open("style.png").convert("L")
output = pipeline(
content_image=content_img,
style_reference_image=style_img,
num_inference_steps=50,
guidance_scale=5.0,
)
output.images[0].save("result.png")
- Downloads last month
- -