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
Download NOTICE from hc0/RefRes: direct link, hf CLI and curl.
- Browser
- Download file 547 Bytes
-
https://huggingface.co/hc0/RefRes/resolve/main/NOTICE
- Command line
-
hf download hf://hc0/RefRes/NOTICE
-
curl -L -o NOTICE https://huggingface.co/hc0/RefRes/resolve/main/NOTICE
547 Bytes
| Qwen is licensed under the Qwen RESEARCH LICENSE AGREEMENT, Copyright (c) 2026 Hangzhou Tongyi Laboratory Technology Co., Ltd. All Rights Reserved. | |
| qwen-image-2.1/RefRes-v5-qwen-image-2.1.safetensors is a LoRA adapter (derivative work) trained on top of Qwen-Image-2.1. It is distributed under the Qwen Research License Agreement (see LICENSE) for non-commercial use only. | |
| Training data: freely licensed photos from Wikimedia Commons. The photos are not included in this repository. | |
| Example images in assets/ show AI-generated fictional people. | |