标签:
-
stable-diffusion-xl
-
stable-diffusion-xl-diffusers
-
文本生成图像
-
diffusers
-
lora
-
模板:sd-lora
小部件:
- 文本: '<s0><s1> 戴着耳机的羊驼广告'
输出:
url:
"image_0.png"
- 文本: '<s0><s1> 戴着耳机的羊驼广告'
输出:
url:
"image_1.png"
- 文本: '<s0><s1> 戴着耳机的羊驼广告'
输出:
url:
"image_2.png"
- 文本: '<s0><s1> 戴着耳机的羊驼广告'
输出:
url:
"image_3.png"
基础模型: stabilityai/stable-diffusion-xl-base-1.0
实例提示: 以风格的广告
许可证: openrail++
SDXL LoRA DreamBooth - linoyts/2000_ads_offset_noise_micro
模型描述
这是linoyts/2000_ads_offset_noise_micro针对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('linoyts/2000_ads_offset_noise_micro', weight_name='pytorch_lora_weights.safetensors')
embedding_path = hf_hub_download(repo_id='linoyts/2000_ads_offset_noise_micro', filename='2000_ads_offset_noise_micro_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('<s0><s1> 戴着耳机的羊驼广告').images[0]
更多详情,包括权重、合并和融合LoRA,请查看在diffusers中加载LoRA的文档
触发词
要触发训练概念(或多个概念)的图像生成,请在提示中用新插入的令牌替换每个概念标识符:
触发概念TOK
→ 在提示中使用<s0><s1>