🚀 Flux_Lora_Retro_Linedrawing_Style_V1
Flux_Lora_Retro_Linedrawing_Style_V1是一个基于特定数据集训练的模型,用于生成具有复古线条画风格的图像。它基于black-forest-labs/FLUX.1-dev
基础模型,通过LoRA技术进行微调,能够生成如复古插画风格的各种场景图像。
🚀 快速开始
环境准备
确保你已经安装了必要的库,如diffusers
和torch
。
代码示例
使用以下代码生成图像:
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('SebastianBodza/flux_lora_retro_linedrawing_style_v1', weight_name='lora.safetensors')
image = pipeline('your prompt').images[0]
更多详细信息,包括LoRA的权重调整、合并和融合等内容,请查看 diffusers中加载LoRA的文档。
✨ 主要特性
- 特定风格生成:能够生成具有复古TOK插画风格的图像。
- 基于特定数据集:数据集基于《Dictionnaire universel d'histoire naturelle》一书中手动处理的图像。
- LoRA微调:通过LoRA技术在基础模型上进行微调,提高生成效果。
📦 安装指南
本项目依赖于diffusers
和torch
库,你可以使用以下命令进行安装:
pip install diffusers torch
💻 使用示例
基础用法
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('SebastianBodza/flux_lora_retro_linedrawing_style_v1', weight_name='lora.safetensors')
prompt = 'Retro TOK illustration style of a beautiful sunset'
image = pipeline(prompt).images[0]
image.save('output_image.png')
高级用法
如果你想增强背景的灰色线条画效果,可以在提示中包含grey linedrawing background
:
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('SebastianBodza/flux_lora_retro_linedrawing_style_v1', weight_name='lora.safetensors')
prompt = 'Retro TOK illustration style of a city street, grey linedrawing background'
image = pipeline(prompt).images[0]
image.save('advanced_output_image.png')
📚 详细文档
模板
Retro TOK illustration style of
如果你想增强背景的灰色线条画效果,可以在提示中包含grey linedrawing background
。
触发词
你应该使用TOK
来触发图像生成。
数据集
本项目的数据集基于《Dictionnaire universel d'histoire naturelle》一书中手动处理的图像,仅使用了该书的图像,还有更多不同主题的卷册。
训练信息
本模型在Replicate上使用 https://replicate.com/ostris/flux-dev-lora-trainer/train 进行训练。
📄 许可证
本项目使用 flux-1-dev-non-commercial-license 许可证。
信息表格
常用提示信息
⚠️ 重要提示
使用TOK
来触发图像生成。
💡 使用建议
如果你想增强背景的灰色线条画效果,可以在提示中包含grey linedrawing background
。