🚀 SDXL LoRA DreamBooth - LinoyTsaban/3diconz
本项目是针对Stable Diffusion XL的LoRA DreamBooth模型,可用于生成特定风格的图像,为图像创作带来更多可能性。
🚀 快速开始
触发词
若要触发已训练概念的图像生成,需在提示词中用新插入的标记替换每个概念标识符。
例如,要触发概念 TOK
,可在提示词中使用 <s0><s1>
。
使用 🧨 diffusers 库
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('LinoyTsaban/3diconz', weight_name='pytorch_lora_weights.safetensors')
embedding_path = hf_hub_download(repo_id='LinoyTsaban/3diconz', filename="embeddings.safetensors", repo_type="model")
state_dict = load_file(embedding_path)
pipeline.load_textual_inversion(state_dict["clip_l"], token=["<s0>", "<s1>"], text_encoder=pipe.text_encoder, tokenizer=pipe.tokenizer)
pipeline.load_textual_inversion(state_dict["clip_g"], token=["<s0>", "<s1>"], text_encoder=pipe.text_encoder_2, tokenizer=pipe.tokenizer_2)
image = pipeline('in the style of <s0><s1>').images[0]
更多详细信息,包括LoRA的加权、合并和融合,请查看 diffusers 中加载 LoRA 的文档。
下载模型
可在以下用户界面(UI)中使用该模型,如 AUTOMATIC1111、Comfy UI、SD.Next、Invoke。
- 点击 此处 下载 LoRA 的 *.safetensors 文件,重命名后将其放置在 LoRA 文件夹中。
- 点击 此处 下载文本嵌入的 *.safetensors 文件,重命名后将其放置在嵌入文件夹中。
所有 文件与版本 均可在此查看。
✨ 主要特性
这些是 LinoyTsaban/3diconz 的 LoRA 适配权重,适用于 stabilityai/stable-diffusion-xl-base-1.0 基础模型。
🔧 技术细节
📄 许可证
本模型采用 openrail++ 许可证。
📦 模型信息
属性 |
详情 |
基础模型 |
stabilityai/stable-diffusion-xl-base-1.0 |
实例提示词 |
in the style of |
许可证 |
openrail++ |
标签 |
stable-diffusion-xl、stable-diffusion-xl-diffusers、text-to-image、diffusers、lora、template:sd-lora |