🚀 動漫風格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 |