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