🚀 吉卜力工作室角色 - FLUX.1 Dev LoRA
本项目是一个基于LoRA(Low-Rank Adaptation)技术的图像生成模型,通过对吉卜力工作室风格图像的微调,能够生成具有吉卜力风格的角色图像。它为喜爱吉卜力风格的用户提供了一种有趣的方式来创造独特的图像。
🚀 快速开始
推理示例
以下是使用diffusers
库进行推理的代码示例:
import torch
from diffusers import DiffusionPipeline
model_id = "black-forest-labs/FLUX.1-dev"
adapter_id = "alvarobartt/ghibli-characters-flux-lora"
pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16)
pipeline.load_lora_weights(adapter_id)
pipeline.to("cuda")
prompt = (
"Ghibli style futuristic stormtrooper with glossy white armor and a sleek helmet,"
" standing heroically on a lush alien planet, vibrant flowers blooming around, soft"
" sunlight illuminating the scene, a gentle breeze rustling the leaves"
)
image = pipeline(
prompt=prompt,
num_inference_steps=30,
width=1024,
height=768,
guidance_scale=3.5,
).images[0]
image.save("ghibli.png", format="PNG")
✨ 主要特性
- 风格独特:基于吉卜力工作室风格,能够生成具有该风格特色的角色图像。
- 灵活定制:通过特定的提示模板,可以根据需求定制生成的图像内容。
📚 详细文档
模型描述
此仓库包含 FLUX.1-dev 的 LoRA 适配器。该适配器使用 fal.ai/models/fal-ai/flux-lora-general-training 进行微调,训练数据是从 https://ghibli.jp 手动下载的免费使用的吉卜力工作室图像,并托管在 alvarobartt/ghibli-characters。
提示模板
你可以使用以下模板(在为图像添加标题时定义)来触发图像生成:
"Ghibli style [角色描述] with [独特特征], [动作或姿势], [环境或背景], [光照或氛围], [额外细节]"
免责声明
根据许可规定,此微调模型仅用于个人使用,不得用于商业目的。
FLUX.1-dev 的微调版本遵循与 FLUX.1-dev 相同的许可协议,即 https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md;吉卜力工作室数据集根据其网站上的相关规定发布了自定义的非商业许可。
📄 许可证
- 许可证名称:flux-1-dev-non-commercial-license
- 许可证链接:https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md
🔍 示例展示
提示文本 |
输出图像 |
Ghibli style futuristic stormtrooper with glossy white armor and a sleek helmet, standing heroically on a lush alien planet, vibrant flowers blooming around, soft sunlight illuminating the scene, a gentle breeze rustling the leaves |
点击查看 |
Ghibli style Shrek, a lovable green ogre with a big smile, sitting on a moss-covered rock while enjoying a plate of freshly picked vegetables, in a magical forest filled with whimsical creatures, dappled sunlight filtering through the trees, surrounded by curious fairies peeking out from behind leaves |
点击查看 |
Ghibli style Albus Dumbledore, a wise old wizard with long silver hair and a flowing robe, standing in a lush garden filled with colorful magical plants, gently stroking a phoenix perched on his shoulder, soft morning light filtering through the trees, surrounded by whimsical creatures curiously observing him |
点击查看 |
Ghibli style The Grinch, a mischievous green creature with a sly grin, peeking out from behind a snow-covered tree while plotting his antics, in a quaint snowy village decorated for the holidays, warm light glowing from cozy homes, with playful snowflakes dancing in the air |
点击查看 |
Ghibli style Santa Claus, a jolly old man with a fluffy white beard and a red coat, cheerfully preparing gifts in a cozy workshop filled with magical toys, warm golden light glowing from lanterns, surrounded by adorable elves and whimsical creatures helping him |
点击查看 |
Ghibli style Garfield, a lazy orange cat with a mischievous grin, lounging on a sunny windowsill while dreaming of lasagna, in a cozy home filled with plants and colorful decor, warm light streaming in, with a friendly mouse peeking out from behind a flower pot |
点击查看 |