从 Genmo 官方 GitHub README 翻译整理的快速上手指南。
Open Genmoji 是一个开源项目,旨在用开放技术复现苹果的 Genmoji 功能。它本质上是一组 LoRA(低秩适配)模型文件,基于数千个苹果 emoji 微调而成,能让图像生成模型学会绘制 emoji 风格图片。无论你用的是不是苹果设备,都能用上它。
核心模型文件托管在 HuggingFace 上,开源免费。
| 提示词 | Open Genmoji 效果 | 苹果原版效果 |
|---|---|---|
flying pig white wings |
![]() |
![]() |
handsome horse in black suit and tie with flowing mane |
![]() |
![]() |
teddy bear in space suit |
![]() |
![]() |
从 HuggingFace 下载 LoRA 文件:
git lfs install
git clone https://huggingface.co/EvanZhouDev/open-genmoji
如果你没有安装 Git LFS,也可以直接去 HuggingFace 仓库 手动下载 .safetensors 文件。
import torch
from diffusers import FluxPipeline
from diffusers.utils import load_image
pipe = FluxPipeline.from_pretrained(
"black-forest-labs/FLUX.1-dev",
torch_dtype=torch.bfloat16
)
pipe.load_lora_weights("EvanZhouDev/open-genmoji", weight_name="open-genmoji.safetensors")
pipe.to("cuda")
prompt = "a flying pig with white wings, emoji style"
image = pipe(
prompt,
guidance_scale=3.5,
num_inference_steps=50,
generator=torch.Generator("cuda").manual_seed(42)
).images[0]
image.save("flying_pig.png")
models/loras 目录open-genmoji.safetensorsemoji style 后缀)翻译整理自 GitHub README,原文:https://github.com/EvanZhouDev/open-genmoji