Skip to content

Add univa to models #1526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions packages/tasks/src/model-libraries-snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1408,6 +1408,19 @@ model = SwarmFormerModel.from_pretrained("${model.id}")
`,
];

export const univa = (model: ModelData): string[] => [
`# Follow installation instructions at https://github.com/PKU-YuanGroup/UniWorld-V1

from univa.models.qwen2p5vl.modeling_univa_qwen2p5vl import UnivaQwen2p5VLForConditionalGeneration
model = UnivaQwen2p5VLForConditionalGeneration.from_pretrained(
"${model.id}",
torch_dtype=torch.bfloat16,
attn_implementation="flash_attention_2",
).to("cuda")
processor = AutoProcessor.from_pretrained("${model.id}")
`,
];

const mlx_unknown = (model: ModelData): string[] => [
`# Download the model from the Hub
pip install huggingface_hub[hf_xet]
Expand Down
8 changes: 8 additions & 0 deletions packages/tasks/src/model-libraries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
countDownloads: `path_extension:"pt"`,
snippets: snippets.ultralytics,
},
univa: {
prettyLabel: "univa",
repoName: "univa",
repoUrl: "https://github.com/PKU-YuanGroup/UniWorld-V1",
snippets: snippets.univa,
filter: true,
countDownloads: `path:"config.json"`,
},
"uni-3dar": {
prettyLabel: "Uni-3DAR",
repoName: "Uni-3DAR",
Expand Down
Loading