🚀 动漫风格Flux LoRA大模型
本项目是一个动漫风格的Flux LoRA大模型,可用于文本到图像的生成,通过特定触发词能生成具有动漫风格的图像。
🚀 快速开始
触发词
你应该使用 anm
来触发图像生成。
使用 🧨 diffusers 库
from diffusers import AutoPipelineForText2Image
import torch
pipeline = AutoPipelineForText2Image.from_pretrained('black-forest-labs/FLUX.1-dev', torch_dtype=torch.float16).to('cuda')
pipeline.load_lora_weights('Nishitbaria/Anime-style-flux-lora-Large', weight_name='lora.safetensors')
image = pipeline('your prompt').images[0]
如需了解更多细节,包括LoRA的加权、合并和融合,请查看 diffusers中加载LoRA的文档。
💻 使用示例
基础用法
from diffusers import AutoPipelineForText2Image
import torch
pipeline = AutoPipelineForText2Image.from_pretrained('black-forest-labs/FLUX.1-dev', torch_dtype=torch.float16).to('cuda')
pipeline.load_lora_weights('Nishitbaria/Anime-style-flux-lora-Large', weight_name='lora.safetensors')
image = pipeline('your prompt').images[0]
高级用法
在实际使用中,你可以根据需求调整生成图像的参数,如修改提示词以生成不同风格和场景的动漫图像。例如:
from diffusers import AutoPipelineForText2Image
import torch
pipeline = AutoPipelineForText2Image.from_pretrained('black-forest-labs/FLUX.1-dev', torch_dtype=torch.float16).to('cuda')
pipeline.load_lora_weights('Nishitbaria/Anime-style-flux-lora-Large', weight_name='lora.safetensors')
prompt = 'an anm young boy sitting under a large sakura tree, wearing traditional festival attire, cherry blossoms gently falling around him, peaceful smile, evening sky with vibrant hues.'
image = pipeline(prompt).images[0]
📄 许可证
本项目使用 flux-1-dev-non-commercial-license 许可证。
📚 详细文档
本模型在Replicate上进行训练,训练链接如下:
https://replicate.com/ostris/flux-dev-lora-trainer/train
属性 |
详情 |
模型类型 |
动漫风格Flux LoRA大模型 |
训练平台 |
Replicate |
基础模型 |
black-forest-labs/FLUX.1-dev |
任务类型 |
文本到图像生成 |
触发词 |
anm |