Instructions to use PrunaAI/P-Q-Image-2.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use PrunaAI/P-Q-Image-2.1 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-2.1", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("PrunaAI/P-Q-Image-2.1") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Add H100 latency chart and prompt, editing and resolution guidance
Browse files- .gitattributes +1 -0
- README.md +23 -0
- assets/latency_t2i_1k_2k.png +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* 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
|
|
|
|
|
|
| 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
|
| 36 |
+
assets/latency_t2i_1k_2k.png filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -68,6 +68,29 @@ Both adapters are v0.1. Pick one based on whether you need quality or speed.
|
|
| 68 |
|
| 69 |
Each adapter is trained for its own sigma schedule. Load only one at a time.
|
| 70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
## Quickstart
|
| 72 |
|
| 73 |
Runs text-to-image and image editing with the same pipeline. Needs a **CUDA GPU**.
|
|
|
|
| 68 |
|
| 69 |
Each adapter is trained for its own sigma schedule. Load only one at a time.
|
| 70 |
|
| 71 |
+
## Prompts, editing and resolution
|
| 72 |
+
|
| 73 |
+
The adapters were trained at **1K resolution only**, with a mix of simple and
|
| 74 |
+
upsampled prompts, text-to-image generation, and single- and multi-image editing
|
| 75 |
+
with **up to 3 reference images**. Prompt upsampling is optional; detailed prompts
|
| 76 |
+
usually give better results.
|
| 77 |
+
|
| 78 |
+
Start at **1024 × 1024** and use at most **3 reference images** for editing.
|
| 79 |
+
Higher resolutions (including 2K) and more reference images may work, but are
|
| 80 |
+
outside the training coverage and quality may vary. The 2K timings below show
|
| 81 |
+
inference speed, not a guarantee of quality at that resolution.
|
| 82 |
+
|
| 83 |
+
## Speed on a single H100
|
| 84 |
+
|
| 85 |
+

|
| 86 |
+
|
| 87 |
+
Text-to-image with the official Qwen model-card example prompt, BF16, batch size 1,
|
| 88 |
+
on one NVIDIA H100 80GB. Median of 3 requests after one warmup per configuration.
|
| 89 |
+
Includes prompt encoding, denoising and decoding; excludes PNG saving, model
|
| 90 |
+
loading and warmup. Base: 40 steps with KV cache on; P-Turbo: 5 or 8 steps with
|
| 91 |
+
KV cache off, following the respective model-card settings. LoRAs were unmerged;
|
| 92 |
+
no CFG, compilation or CPU offload. These timings do not imply equal image quality.
|
| 93 |
+
|
| 94 |
## Quickstart
|
| 95 |
|
| 96 |
Runs text-to-image and image editing with the same pipeline. Needs a **CUDA GPU**.
|
assets/latency_t2i_1k_2k.png
ADDED
|
Git LFS Details
|