Views
No views yet
unet/: UNet2DConditionModelcontent_encoder.pt: ResNet-based content encoderstyle_encoder.pt: ResNet-based style encoderscheduler/: Flow Matching scheduler1from pipeline import KanjiFontStyleTransferPipeline
2from PIL import Image
3
4pipeline = KanjiFontStyleTransferPipeline.from_pretrained(
5 "bishopfunc/kanji-font-style-transfer"
6)
7
8content_img = Image.open("content.png").convert("L")
9style_img = Image.open("style.png").convert("L")
10
11output = pipeline(
12 content_image=content_img,
13 style_reference_image=style_img,
14 num_inference_steps=50,
15 guidance_scale=5.0,
16)
17
18output.images[0].save("result.png")