Instructions to use Leon1000/pixel_portrait_lora_v1-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Leon1000/pixel_portrait_lora_v1-lora with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("Leon1000/pixel_portrait_lora_v1-lora") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Commit ·
358a3df
0
Parent(s):
Duplicate from svntax-dev/pixel_portrait_lora_v1-lora
Browse filesCo-authored-by: svntax <svntax-dev@users.noreply.huggingface.co>
.gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- text-to-image
|
| 4 |
+
- lora
|
| 5 |
+
- diffusers
|
| 6 |
+
- template:sd-lora
|
| 7 |
+
- ai-toolkit
|
| 8 |
+
base_model: Qwen/Qwen-Image
|
| 9 |
+
license: creativeml-openrail-m
|
| 10 |
+
inference:
|
| 11 |
+
parameters:
|
| 12 |
+
width: 512
|
| 13 |
+
height: 512
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# pixel_portrait_lora_v1-lora
|
| 17 |
+
|
| 18 |
+
Model trained with [AI Toolkit by Ostris](https://github.com/ostris/ai-toolkit)
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
## Trigger words
|
| 23 |
+
|
| 24 |
+
No trigger words defined, but it's recommended to start with "*A portrait of \[subject\] with \[appearance/traits\]*".
|
| 25 |
+
|
| 26 |
+
## Sample outputs
|
| 27 |
+
|
| 28 |
+
Images from left-to-right were generated at 512x512 with:
|
| 29 |
+
|
| 30 |
+
No LoRA, 500 steps, 1000 steps, 1500 steps, 2000 steps (final checkpoint)
|
| 31 |
+
|
| 32 |
+
### Medieval Knight
|
| 33 |
+
|
| 34 |
+
**Prompt**: *A portrait of a medieval knight with iron armor, wearing a full iron helmet with a red plume on the back side of the helm. The knight is facing front right at a 45-degree angle with a neutral pose. The iron armor is clean and reflective, showing a clean polish.*
|
| 35 |
+
|
| 36 |
+

|
| 37 |
+
|
| 38 |
+
### Witch
|
| 39 |
+
|
| 40 |
+
**Prompt**: *A portrait of a witch with long red hair and blue eyes, wearing a dark purple witch hat and robes. The witch is facing left with a neutral expression. The robes are trimmed with white and light purple colors.*
|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
|
| 44 |
+
### Werewolf
|
| 45 |
+
|
| 46 |
+
**Prompt**: *A portrait of a werewolf with light gray fur and yellow eyes, wearing a red scarf and a sword on his back. The werewolf is facing forward with a confident expression.*
|
| 47 |
+
|
| 48 |
+

|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
## How to get pixel-perfect images
|
| 52 |
+
|
| 53 |
+
To get pixel-perfect images, downscale by a factor of 8. So 512x512 images should downscale to 64x64, 1024x1024 to 128x128, and so on.
|
| 54 |
+
|
| 55 |
+
You can generate at higher resolutions like 1024x1024, but you may get worse pixel quality because the LoRA was trained on 512x512 images only.
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
## Download model and use it with ComfyUI, AUTOMATIC1111, SD.Next, Invoke AI, etc.
|
| 59 |
+
|
| 60 |
+
Weights for this model are available in Safetensors format.
|
| 61 |
+
|
| 62 |
+
[Download](svntax-dev/pixel_portrait_lora_v1-lora/tree/main) them in the Files & versions tab.
|
| 63 |
+
|
| 64 |
+
## Use it with the [🧨 diffusers library](https://github.com/huggingface/diffusers)
|
| 65 |
+
|
| 66 |
+
```py
|
| 67 |
+
from diffusers import AutoPipelineForText2Image
|
| 68 |
+
import torch
|
| 69 |
+
|
| 70 |
+
pipeline = AutoPipelineForText2Image.from_pretrained('Qwen/Qwen-Image', torch_dtype=torch.bfloat16).to('cuda')
|
| 71 |
+
pipeline.load_lora_weights('svntax-dev/pixel_portrait_lora_v1-lora', weight_name='pixel_portrait_lora_v1_000001500.safetensors')
|
| 72 |
+
image = pipeline('a beautiful landscape').images[0]
|
| 73 |
+
image.save("my_image.png")
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
For more details, including weighting, merging and fusing LoRAs, check the [documentation on loading LoRAs in diffusers](https://huggingface.co/docs/diffusers/main/en/using-diffusers/loading_adapters)
|
| 77 |
+
|
pixel_portrait_lora_v1.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:199b41333a7c1b40cbed840b124ebc004812f8c6f42fba5c2ed9ee68d4fcabef
|
| 3 |
+
size 590058840
|
pixel_portrait_lora_v1_000000500.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:83f1b27c0aa0bad6228cc738fb89551495fc7fba33ae73e692e1ace086af6ec6
|
| 3 |
+
size 590058840
|
pixel_portrait_lora_v1_000001000.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:03bb787b616b9b0c6d02cc9802dd34e109f9256f177c5c0f410cd242618a3e24
|
| 3 |
+
size 590058840
|
pixel_portrait_lora_v1_000001500.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2e61814723065dcd52faee4b0ae4ebbc4529ffc4084585378d8533b97f5be0aa
|
| 3 |
+
size 590058840
|