🚀 SDXL LoRA DreamBooth - inventwithdean/vangogh-SDXL-LoRA
這是一個基於Stable Diffusion XL的LoRA模型,可用於生成特定風格的圖像,為文本到圖像的轉換提供了獨特的風格選擇。
🚀 快速開始
模型描述
這些是適用於 stabilityai/stable-diffusion-xl-base-1.0
的 inventwithdean/vangogh-SDXL-LoRA
LoRA適配權重。
下載模型
可將其與AUTOMATIC1111、Comfy UI、SD.Next、Invoke等用戶界面結合使用:
from diffusers import AutoPipelineForText2Image
import torch
from huggingface_hub import hf_hub_download
from safetensors.torch import load_file
pipeline = AutoPipelineForText2Image.from_pretrained('stabilityai/stable-diffusion-xl-base-1.0', torch_dtype=torch.float16).to('cuda')
pipeline.load_lora_weights('inventwithdean/vangogh-SDXL-LoRA', weight_name='pytorch_lora_weights.safetensors')
embedding_path = hf_hub_download(repo_id='inventwithdean/vangogh-SDXL-LoRA', filename='vangogh-SDXL-LoRA_emb.safetensors', repo_type="model")
state_dict = load_file(embedding_path)
pipeline.load_textual_inversion(state_dict["clip_l"], token=["<s0>", "<s1>"], text_encoder=pipeline.text_encoder, tokenizer=pipeline.tokenizer)
pipeline.load_textual_inversion(state_dict["clip_g"], token=["<s0>", "<s1>"], text_encoder=pipeline.text_encoder_2, tokenizer=pipeline.tokenizer_2)
image = pipeline('a painting in the style of <s0><s1>, gorgeous red roses in a pot, with blue clouds in background').images[0]
有關更多詳細信息,包括LoRA的加權、合併和融合,請查看 diffusers中加載LoRA的文檔。
觸發詞
要觸發已訓練概念的圖像生成,需在提示詞中用新插入的標記替換每個概念標識符:
若要觸發概念 TOK
,可在提示詞中使用 <s0><s1>
。
詳細信息
所有 文件和版本。
這些權重是使用 🧨 diffusers高級Dreambooth訓練腳本 進行訓練的。
- 文本編碼器的LoRA已啟用:否。
- 關鍵調優已啟用:是。
- 訓練使用的特殊VAE:madebyollin/sdxl-vae-fp16-fix。
信息表格
屬性 |
詳情 |
模型類型 |
SDXL LoRA DreamBooth |
基礎模型 |
stabilityai/stable-diffusion-xl-base-1.0 |
許可證 |
openrail++ |
訓練腳本 |
🧨 diffusers高級Dreambooth訓練腳本 |
文本編碼器LoRA啟用情況 |
否 |
關鍵調優啟用情況 |
是 |
訓練使用的特殊VAE |
madebyollin/sdxl-vae-fp16-fix |