HY-WU (Part I): An Extensible Functional Neural Memory Framework and An Instantiation in Text-Guided Image Editing
π₯ News
- March 6, 2025: π HY-WU open source - Inference code and model weights publicly available.
ποΈ Contents
- π₯ News
- π Introduction
- β¨ Key Features
- πΌ Showcases
- π Open-Source Plan
- π Usage
- π§± Memory Requirement
- π Evaluation
- π Citation
π 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.
β¨ 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
Showcase 2: Creative Cosplay and Character Outfit Migration
Showcase 3: High-Fidelity Face Identity Transfer
Showcase 4: Seamless Outfit Transfer and Virtual Try-on
Showcase 5: High-Quality Texture Synthesis
π Open-source Plan
- HY-WU
- Inference
- HY-Image-3.0-Instruct's checkpoint
- Distilled checkpoint
- Other models' checkpoint
π Usage
π Clone the repository
git clone https://github.com/Tencent-Hunyuan/HY-WU.git
cd HY-WU
π₯ Install dependencies
pip install -r requirements.txt
π₯ Play with the code
Directly run infer.py
python infer.py
Or use the code below:
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.
pip install gradio>=4.21.0
python gradio/app.py
π Web Interface: Open your browser and navigate to
http://localhost:7680or shared link.
π§± Memory Requirement
| Base model param | HY-WU param | Recommended 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.
π Citation
If you find HY-WU useful in your research, please cite our work:
@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}
}
- Downloads last month
- 38
Model tree for tencent/HY-WU
Base model
tencent/HunyuanImage-3.0-Instruct