CoolFace
Modelpublic

tencent/HY-WU

sourceHugging Faceupdated 7mo agoView on Hugging Face
35likes70downloads
Model Card

<div align="center"> <img src="./assets/tencent-hy-wu-logo.svg" alt="HY-WU Logo" width="600">

HY-WU (Part I): An Extensible Functional Neural Memory Framework and An Instantiation in Text-Guided Image Editing

</div>

<div align="center"> <img src="./assets/teaser.png" alt="HY-WU Teaser" width="800"> </div>

<div align="center"> <a href=https://tencent-hy-wu.github.io/ target="blank"><img src=https://img.shields.io/badge/๐ŸŒ%20Demo-4285F4.svg height=22px></a> <a href=https://huggingface.co/tencent/HY-WU target="blank"><img src=https://img.shields.io/badge/%F0%9F%A4%97%20HuggingFace-d96902.svg height=22px></a> <a href=https://github.com/Tencent-Hunyuan/HY-WU target="blank"><img src=https://img.shields.io/badge/GitHub-181717.svg?logo=github height=22px></a> <a href=https://github.com/Tencent-Hunyuan/HY-WU/assets/report.pdf target="blank"><img src=https://img.shields.io/badge/Report-b5212f.svg?logo=arxiv height=22px></a> <a href=https://x.com/TencentHunyuan target="blank"><img src=https://img.shields.io/badge/Hunyuan-black.svg?logo=x height=22px></a> <a href=https://docs.qq.com/doc/DUVVadmhCdG9qRXBU target="blank"><img src=https://img.shields.io/badge/๐Ÿ“š-PromptHandBook-grey.svg?logo=book height=22px></a> </div>

<!-- <p align="center"> ๐Ÿ‘ Join our <a href="./assets/WECHAT.md" target="_blank">WeChat</a> and <a href="https://discord.gg/ehjWMqF5wY">Discord</a> | ๐Ÿ’ป <a href="https://hunyuan.tencent.com/chat/HunyuanDefault?from=modelSquare&modelId=Hunyuan-Image-3.0-Instruct">Official website(ๅฎ˜็ฝ‘) Try our model!</a>&nbsp&nbsp </p> -->

๐Ÿ”ฅ News

  • โ€”March 6, 2025: ๐ŸŽ‰ [HY-WU](https://github.com/Tencent-Hunyuan/HY-WU) open source - Inference code and model weights publicly available.

๐Ÿ—‚๏ธ Contents


๐Ÿ“– Introduction

We propose HY-WU: a scalable framework for on-the-fly conditional generation of low-rank (LoRA) updates. HY-WU synthesizes instance-conditioned adapter weights from hybrid imageโ€“instruction representations and injects them into a frozen backbone during the forward pass, producing instance-specific operators without test-time optimization.

<div align="center"> <img src="./assets/animation.gif" alt="HY-WU Animation" width="800"> </div>

โœจ Key Features

  • โ€”๐Ÿง  Functional Neural Memory: Introduces a lightweight โ€œneural memoryโ€ for AI. Generates conditioned model adapter per request (without finetuning!), enabling instance-level personalization while preserving the base modelโ€™s general capability.
  • โ€”๐Ÿ† Scalable for Large Models: HY-WU remains practical for large foundation models (even at 80B parameters!). With structured parameter tokenization, the method naturally compatible with large-scale architectures.
  • โ€”๐ŸŽจ Strong Human Preference: HY-WU achieves high human preference win-rates against open-source models, exceeds strong closed-source baselines, and remains close to the latest Nano-Banana series.

๐Ÿ–ผ Showcases

Showcase 1: Cross-Domain Clothing Fusion

<div align="center"> <img src="./assets/showcase1.png" width="90%"> </div>

Showcase 2: Creative Cosplay and Character Outfit Migration

<div align="center"> <img src="./assets/showcase2.png" width="90%"> </div>

Showcase 3: High-Fidelity Face Identity Transfer

<div align="center"> <img src="./assets/showcase3.png" width="90%"> </div>

Showcase 4: Seamless Outfit Transfer and Virtual Try-on

<div align="center"> <img src="./assets/showcase4.png" width="90%"> </div>

Showcase 5: High-Quality Texture Synthesis

<div align="center"> <img src="./assets/showcase5.png" width="90%"> </div>

๐Ÿ“‘ Open-source Plan

  • โ€”HY-WU
  • โ€”[x] Inference
  • โ€”[x] HY-Image-3.0-Instruct's checkpoint
  • โ€”[ ] Distilled checkpoint
  • โ€”[ ] Other models' checkpoint

๐Ÿš€ Usage

๐Ÿ  Clone the repository
bash
git clone https://github.com/Tencent-Hunyuan/HY-WU.git
cd HY-WU
๐Ÿ“ฅ Install dependencies
bash
pip install -r requirements.txt
๐Ÿ”ฅ Play with the code

Directly run infer.py

python
python infer.py

Or use the code below:

python
from wu import WUPipeline

base_model_path = "tencent/HunyuanImage-3.0-Instruct"
pg_model_path = "tencent/HY-WU"

pipeline = WUPipeline(
    base_model_path=base_model_path,
    pg_model_path=pg_model_path,
    device_map="auto",
    moe_impl="eager",
    moe_drop_tokens=False,
)

prompt = "ไปฅๅ›พ1ไธบๅบ•ๅ›พ๏ผŒๅฐ†ๅ›พ2ๅ…ฌไป”็ฉฟ็š„่กฃ็‰ฉๆขๅˆฐๅ›พ1ไบบ็‰ฉ่บซไธŠ๏ผ›ไฟๆŒๅ›พ1ไบบ็‰ฉใ€ๅงฟๆ€ๅ’Œ่ƒŒๆ™ฏไธๅ˜๏ผŒ่‡ช็„ถ่ดดๅˆๅนถ่žๅˆใ€‚"
# prompt_en = Using Figure 1 as the base image, replace the clothing on the character in Figure 1 with the outfit worn by the figurine in Figure 2. Keep the character, pose, and background of Figure 1 unchanged, ensuring the new clothing fits naturally and blends seamlessly.
imgs_input = ["./assets/input_1_1.png", "./assets/input_1_2.png"]

sample = pipeline.generate(prompt=prompt, imgs_input=imgs_input, diff_infer_steps=50, seed=42, verbose=2)

sample.save("./output.png")
๐ŸŽจ Interactive Gradio Demo

Launch an interactive web interface for easy image-to-image generation.

bash
pip install gradio>=4.21.0

python gradio/app.py
๐ŸŒ Web Interface: Open your browser and navigate to http://localhost:7680 or shared link.

</details>

๐Ÿงฑ Memory Requirement

Base model paramHY-WU paramRecommended VRAM
80B (13B active)8Bโ‰ฅ 8 ร— 40 GB or 4 x 80GB

Notes:

  • โ€”Multiโ€‘GPU inference is required for the base model.

๐Ÿ“Š Evaluation

๐Ÿ‘ฅ GSB (Human Evaluation)

HY-WU substantially outperforms leading open-source models, and remain competitive with top-tier closed-source commercial systems. While Nano Banana 2 and Nano Banana Pro achieve slightly higher overall scores (52.4\% and 53.8\%, respectively), the margin remains modest.

Given that these commercial systems are likely trained with substantially larger-scale backbones and proprietary data, the modest performance gap suggests that our operator-level conditional adaptation remains effective even under more constrained model scale.

<p align="center"> <img src="./assets/gsb.png" width=70% alt="Human Evaluation with Other Models"> </p>

๐Ÿ“š Citation

If you find HY-WU useful in your research, please cite our work:

bibtex
@misc{wu2026hy-wu,
  author = {Tencent HY Team, Mengxuan Wu, Xuanlei Zhao, Ziqiao Wang, Ruichfeng Feng, Atlas Wang, Qinglin Lu, and Kai Wang},
  title = {HY-WU (Part I): An Extensible Functional Neural Memory Framework and An Instantiation in Text-Guided Image Editing},
  year = {2026},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/Tencent-Hunyuan/HY-WU}},
  note = {Preprint}
}