标签:
-
stable-diffusion-xl
-
stable-diffusion-xl-diffusers
-
diffusers-training
-
文本生成图像
-
diffusers
-
lora
-
模板:sd-lora
组件:
- 文本: 'DND <s0><s1> 艾兰多尔骑乘吉尔达,场景 <s0><s1>'
输出:
url:
"image_0.png"
- 文本: 'DND <s0><s1> 艾兰多尔骑乘吉尔达,场景 <s0><s1>'
输出:
url:
"image_1.png"
- 文本: 'DND <s0><s1> 艾兰多尔骑乘吉尔达,场景 <s0><s1>'
输出:
url:
"image_2.png"
- 文本: 'DND <s0><s1> 艾兰多尔骑乘吉尔达,场景 <s0><s1>'
输出:
url:
"image_3.png"
基础模型: stabilityai/stable-diffusion-xl-base-1.0
实例提示: DND
许可证: openrail++
SDXL LoRA DreamBooth - weasley24/dnd-SDXL-LoRA
模型描述
这是weasley24/dnd-SDXL-LoRA针对stabilityai/stable-diffusion-xl-base-1.0的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('weasley24/dnd-SDXL-LoRA', weight_name='pytorch_lora_weights.safetensors')
embedding_path = hf_hub_download(repo_id='weasley24/dnd-SDXL-LoRA', filename='dnd-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('DND <s0><s1> 艾兰多尔骑乘吉尔达,场景 <s0><s1>').images[0]
更多详情,包括权重调整、合并和融合LoRA,请参阅diffusers中加载LoRA的文档
触发词
要触发训练概念(或多个概念)的图像生成,请在提示词中用新插入的标记替换每个概念标识符:
触发概念TOK
→ 在提示词中使用<s0><s1>
详情
所有文件与版本。
权重使用🧨 diffusers高级Dreambooth训练脚本训练。
文本编码器的LoRA已启用: 否。
关键调优已启用: 是。
训练使用的特殊VAE: madebyollin/sdxl-vae-fp16-fix。