Image-to-Image
Diffusers
lora
image-restoration
face-restoration
super-resolution
reference-based
qwen-image-2.1
Instructions to use hc0/RefRes with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use hc0/RefRes with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-2.1-Turbo", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("hc0/RefRes") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
Replace example images with the new comparison (with vs without RefRes)
Browse files- .gitattributes +1 -0
- README.md +2 -3
- assets/{example_man.jpg → example_man_vs_nolora.jpg} +2 -2
- assets/example_woman.jpg +0 -3
.gitattributes
CHANGED
|
@@ -38,3 +38,4 @@ assets/example_woman.jpg filter=lfs diff=lfs merge=lfs -text
|
|
| 38 |
assets/refres_cover.jpg filter=lfs diff=lfs merge=lfs -text
|
| 39 |
assets/refres_teaser.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 40 |
assets/refres_zone.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 38 |
assets/refres_cover.jpg filter=lfs diff=lfs merge=lfs -text
|
| 39 |
assets/refres_teaser.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 40 |
assets/refres_zone.png filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
assets/example_man_vs_nolora.jpg filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -22,10 +22,9 @@ tags:
|
|
| 22 |
**One damaged photo + a few photos of the same person → the photo, restored, with the person's real face.**
|
| 23 |
Adapters for image-editing models — available now for Qwen-Image-2.1 and Qwen-Image-2.1-Turbo, FLUX.2 [klein] in training.
|
| 24 |
|
| 25 |
-

|
| 27 |
|
| 28 |
-
<sub>
|
| 29 |
|
| 30 |
## Why references
|
| 31 |
|
|
|
|
| 22 |
**One damaged photo + a few photos of the same person → the photo, restored, with the person's real face.**
|
| 23 |
Adapters for image-editing models — available now for Qwen-Image-2.1 and Qwen-Image-2.1-Turbo, FLUX.2 [klein] in training.
|
| 24 |
|
| 25 |
+

|
|
|
|
| 26 |
|
| 27 |
+
<sub>AI-generated fictional person; the photo was damaged on purpose. Qwen-Image-2.1 + RefRes, 40 steps. Bottom right: the same model, prompt, references and seed without RefRes.</sub>
|
| 28 |
|
| 29 |
## Why references
|
| 30 |
|
assets/{example_man.jpg → example_man_vs_nolora.jpg}
RENAMED
|
File without changes
|
assets/example_woman.jpg
DELETED
Git LFS Details
|