Add negative prompts will degrade the sdxl lora effect
whmc76 opened this issue · 2 comments
我想使用训练出的lora模型提升画面质量并且改变图像风格,但是我发现如果在negative prompt里面写上一些内容(比如 nsfw,dog),画面会变得非常糟糕,除非我堆砌非常多的低质词,但这样就让我的lora变得没有意义了。下面是我训练的脚本和结果。
这个问题在我测试质量词和画风词的时候都可以明显地观察到,如果只写正面提示词,使负面提示词保持空白,那么画面是非常好的。
但是如果只写一些简单的负面提示词,看起来原本发生作用的正面提示效果也被减去了。
并且使用webui和comfyui所表现的结果也有很大区别,这可能和他们不同的prompt处理方式有关,comfyui即使使用空白的负面提示词也不能很好的输出画面,
I want to use the trained lora model to improve the picture quality and change the image style, but I found that if I write something in the negative prompt (such as nsfw, dog), the picture will become very bad unless I pile up a lot of low-quality words, but this makes my lora meaningless. Below is the script and results of my training.
This problem can be clearly observed when I test both quality words and style words. If only positive prompt words are written and negative prompt words are kept blank, then the picture is very good.
But if you just write some simple negative cues, the positive cues that seem to be working are also subtracted.
config file:
pretrained_model:
name_or_path: "E:\sd-webui-aki-v4.2\models\Stable-diffusion\DBtrain\AnimeXL_v01OG.safetensors"
#you can also use .ckpt or .safetensors models
v2: false # true if model is v2.x
v_pred: false # true if model uses v-prediction
network:
type: "c3lier" # or "c3lier"
rank: 128
alpha: 16.0
training_method: "full" # selfattn, xattn, noxattn, or innoxattn
train:
precision: "bfloat16"
noise_scheduler: "euler_a" # or "ddpm", "lms", "euler_a"
iterations: 1000
lr: 1e-4
optimizer: "adam8bit"
lr_scheduler: "cosine_with_restarts"
max_denoising_steps: 50
save:
name: "darkPizzaXL_v3"
path: "./output"
per_steps: 250
precision: "bfloat16"
logging:
use_wandb: false
verbose: true
other:
use_xformers: true
-
target: "best quality,masterpiece,1girl,1boy" # what word for erasing the positive concept from
positive: "worst quality, low quality, ugly, lowres, blurry, mutation, mutated, disfigured, out of frame,bad art, bad anatomy, deformed,text, watermark" # what word for erasing the positive concept from
action: "erase" # erase or enhance
guidance_scale: 3
resolution: 1024
dynamic_resolution: true
batch_size: 1prompt file
-
target: "best quality,masterpiece,1girl,1boy" # what word for erasing the positive concept from
positive: "best quality,masterpiece,4k,highres,intricate detailed,hdr,extremely hyper aesthetic" # what word for erasing the positive concept from
unconditional: "" # word to take the difference from the positive concept
action: "erase" # erase or enhance
guidance_scale: -3
resolution: 1024
dynamic_resolution: true
batch_size: 1 -
target: "best quality,masterpiece,1girl,1boy" # what word for erasing the positive concept from
positive: "comic" # what word for erasing the positive concept from
unconditional: "" # word to take the difference from the positive concept
action: "erase" # erase or enhance
guidance_scale: -7
resolution: 1024
dynamic_resolution: true
batch_size: 1
webui result with negative prompt: nsfw/low quality/NONE
comfyui result with nsfw/low quality/ /many low quality words
为什么有3个promtfile,你上面这些图用的lora是哪个promptfile训练的
为什么有3个promtfile,你上面这些图用的lora是哪个promptfile训练的
这是一个文件,写了三段