🚀 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
。