README draft
Browse files
README.md
CHANGED
@@ -12,8 +12,49 @@ inference: true
|
|
12 |
|
13 |
# sdxl-wrong-lora
|
14 |
|
15 |
-
A LoRA for SDXL 1.0 Base which
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
## Methodology
|
18 |
|
19 |
-
The methodology for creating this LoRA is similar to
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
# sdxl-wrong-lora
|
14 |
|
15 |
+
A LoRA for SDXL 1.0 Base which improves output image quality after loading it and using `wrong` as a negative prompt during inference.
|
16 |
+
|
17 |
+
Benefits of using this LoRA:
|
18 |
+
|
19 |
+
- Higher color saturation and vibrance
|
20 |
+
- Higher detail in textures/fabrics
|
21 |
+
- Higher sharpness for blurry/background objects
|
22 |
+
- Less likely to have random artifacts
|
23 |
+
- Appears to allow the model to follow the input prompt with a more expected behavior
|
24 |
+
|
25 |
+
## Usage
|
26 |
+
|
27 |
+
The LoRA can be loaded using `load_lora_weights` like any other LoRA in `diffusers`:
|
28 |
+
|
29 |
+
```py
|
30 |
+
import torch
|
31 |
+
from diffusers import DiffusionPipeline, AutoencoderKL
|
32 |
+
|
33 |
+
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
34 |
+
base = DiffusionPipeline.from_pretrained(
|
35 |
+
"stabilityai/stable-diffusion-xl-base-1.0",
|
36 |
+
vae=vae,
|
37 |
+
torch_dtype=torch.float16,
|
38 |
+
variant="fp16",
|
39 |
+
use_safetensors=True
|
40 |
+
)
|
41 |
+
|
42 |
+
base.load_lora_weights("minimaxir/sdxl-wrong-lora")
|
43 |
+
|
44 |
+
_ = base.to("cuda")
|
45 |
+
```
|
46 |
+
|
47 |
+
During inference, use `wrong` as the sole negative prompt.
|
48 |
+
|
49 |
+
## Examples
|
50 |
+
|
51 |
+
Left is the base model output (no LoRA) + refiner, right is base + LoRA and refiner. The generations use the same seed.
|
52 |
|
53 |
## Methodology
|
54 |
|
55 |
+
The methodology for creating this LoRA is similar to my [wrong SD 2.0 textual inversion embedding](https://huggingface.co/minimaxir/wrong_embedding_sd_2_0), except trained as a LoRA since textual inversion on SDXL is complicated. The base images were generated from SDXL itself.
|
56 |
+
|
57 |
+
## Notes
|
58 |
+
|
59 |
+
- It's possible to use `not wrong` in the prompt itself but in testing it has no effect.
|
60 |
+
- You can use other negative prompts in conjunction with the `wrong` prompt but you may want to weight them.
|