nielsr HF Staff commited on
Commit
6b79cfa
·
verified ·
1 Parent(s): 259696c

Add `pipeline_tag`, `library_name`, and GitHub badge to model card

Browse files

This PR enhances the `Uni-MoE-2.0-Image` model card by adding key metadata and improving navigation:

* **`pipeline_tag: text-to-image`**: This makes the model discoverable under the text-to-image pipeline filter on the Hugging Face Hub, accurately reflecting its primary function as a visual generation model.
* **`library_name: transformers`**: This indicates compatibility with the Hugging Face Transformers library, enabling the automated "how to use" widget on the model page for convenient code snippets.
* **GitHub badge**: A direct link to the main GitHub repository (`https://github.com/HITsz-TMG/Uni-MoE`) has been added as a prominent badge at the top of the model card, improving accessibility for users looking for the project's code.

All existing descriptive content, including the paper link, project page link, and usage examples, remains unchanged to preserve the original author's information and adhere to best practices.

Files changed (1) hide show
  1. README.md +13 -6
README.md CHANGED
@@ -1,12 +1,14 @@
1
  ---
2
- license: apache-2.0
3
  language:
4
  - en
5
  - zh
 
6
  tags:
7
  - MoE
8
  - Unified Generation
9
  - Multi-modal
 
 
10
  ---
11
 
12
  <h1 align="center">Uni-MoE 2.0-Image</h1>
@@ -18,6 +20,7 @@ tags:
18
  <div align="center" style="display: flex; justify-content: center; margin-top: 10px;">
19
  <a href="https://idealistxy.github.io/Uni-MoE-v2.github.io/"><img src="https://img.shields.io/badge/📰 -Website-228B22" style="margin-right: 5px;"></a>
20
  <a href="https://arxiv.org/abs/2511.12609"><img src="https://img.shields.io/badge/📄-Paper-8A2BE2" style="margin-right: 5px;"></a>
 
21
  </div>
22
 
23
  ---
@@ -96,13 +99,15 @@ def load_unimoe(model_path: str):
96
  EXAMPLES = [
97
  # generation
98
  {
99
- "prompt": "<image>\nImage generation: In the art piece, a realistically depicted young girl with flowing blonde hair gazes intently into the distance, her eyes reflecting the vibrant hues of a spring forest. The verdant greens and soft pastels of the budding trees are captured in subtle brushstrokes, giving the scene a serene and tranquil atmosphere. The minimalist composition focuses on the girl's expression of wonder and the lush woodland background, while the texture of the oil paint adds depth and richness to the canvas.",
 
100
  "input_image": None,
101
  "out_name": "genarate.png",
102
  },
103
  # edition
104
  {
105
- "prompt": "<image>\nAdd a dog standing near the fence in the foreground, close to the road.",
 
106
  "input_image": "examples/assets/visual_gen/input_images/edit.jpg",
107
  "out_name": "edit.png",
108
  }
@@ -127,7 +132,8 @@ def run_batch(model_path: str, examples: List[Dict[str, Any]], save_dir: str):
127
  model, processor = load_unimoe(model_path)
128
 
129
  for i, ex in enumerate(examples, start=1):
130
- print(f"\n=== [{i}/{len(examples)}] prompt={ex['prompt']}")
 
131
  messages = make_message(ex['prompt'], ex.get('input_image'))
132
  print(messages)
133
 
@@ -180,7 +186,8 @@ def run_batch(model_path: str, examples: List[Dict[str, Any]], save_dir: str):
180
  )
181
 
182
  decoded = processor.batch_decode(output_ids[:, inputs["input_ids"].shape[-1]:], skip_special_tokens=True)[0]
183
- print("Generated text output:\n", decoded)
 
184
  print("Saved image to:", save_path)
185
 
186
 
@@ -197,4 +204,4 @@ Please cite the repo if you use the model or code in this repo.
197
 
198
  ```
199
 
200
- ``` -->
 
1
  ---
 
2
  language:
3
  - en
4
  - zh
5
+ license: apache-2.0
6
  tags:
7
  - MoE
8
  - Unified Generation
9
  - Multi-modal
10
+ pipeline_tag: text-to-image
11
+ library_name: transformers
12
  ---
13
 
14
  <h1 align="center">Uni-MoE 2.0-Image</h1>
 
20
  <div align="center" style="display: flex; justify-content: center; margin-top: 10px;">
21
  <a href="https://idealistxy.github.io/Uni-MoE-v2.github.io/"><img src="https://img.shields.io/badge/📰 -Website-228B22" style="margin-right: 5px;"></a>
22
  <a href="https://arxiv.org/abs/2511.12609"><img src="https://img.shields.io/badge/📄-Paper-8A2BE2" style="margin-right: 5px;"></a>
23
+ <a href="https://github.com/HITsz-TMG/Uni-MoE"><img src="https://img.shields.io/badge/Code-GitHub-181717?logo=github" style="margin-right: 5px;"></a>
24
  </div>
25
 
26
  ---
 
99
  EXAMPLES = [
100
  # generation
101
  {
102
+ "prompt": "<image>
103
+ Image generation: In the art piece, a realistically depicted young girl with flowing blonde hair gazes intently into the distance, her eyes reflecting the vibrant hues of a spring forest. The verdant greens and soft pastels of the budding trees are captured in subtle brushstrokes, giving the scene a serene and tranquil atmosphere. The minimalist composition focuses on the girl's expression of wonder and the lush woodland background, while the texture of the oil paint adds depth and richness to the canvas.",
104
  "input_image": None,
105
  "out_name": "genarate.png",
106
  },
107
  # edition
108
  {
109
+ "prompt": "<image>
110
+ Add a dog standing near the fence in the foreground, close to the road.",
111
  "input_image": "examples/assets/visual_gen/input_images/edit.jpg",
112
  "out_name": "edit.png",
113
  }
 
132
  model, processor = load_unimoe(model_path)
133
 
134
  for i, ex in enumerate(examples, start=1):
135
+ print(f"
136
+ === [{i}/{len(examples)}] prompt={ex['prompt']}")
137
  messages = make_message(ex['prompt'], ex.get('input_image'))
138
  print(messages)
139
 
 
186
  )
187
 
188
  decoded = processor.batch_decode(output_ids[:, inputs["input_ids"].shape[-1]:], skip_special_tokens=True)[0]
189
+ print("Generated text output:
190
+ ", decoded)
191
  print("Saved image to:", save_path)
192
 
193
 
 
204
 
205
  ```
206
 
207
+ ``` -->