Skip to content

Commit 86ba583

Browse files
committed
add univa
1 parent d5e865f commit 86ba583

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

packages/tasks/src/model-libraries-snippets.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,6 +1408,17 @@ model = SwarmFormerModel.from_pretrained("${model.id}")
14081408
`,
14091409
];
14101410

1411+
export const univa = (model: ModelData): string[] => [
1412+
`from univa.models.qwen2p5vl.modeling_univa_qwen2p5vl import UnivaQwen2p5VLForConditionalGeneration
1413+
1414+
model = UnivaQwen2p5VLForConditionalGeneration.from_pretrained(
1415+
${model.id},
1416+
torch_dtype=torch.bfloat16,
1417+
attn_implementation="flash_attention_2",
1418+
).to("cuda")
1419+
`,
1420+
];
1421+
14111422
const mlx_unknown = (model: ModelData): string[] => [
14121423
`# Download the model from the Hub
14131424
pip install huggingface_hub[hf_xet]

packages/tasks/src/model-libraries.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
10271027
countDownloads: `path_extension:"pt"`,
10281028
snippets: snippets.ultralytics,
10291029
},
1030+
"univa": {
1031+
prettyLabel: "univa",
1032+
repoName: "univa",
1033+
repoUrl: "https://github.com/PKU-YuanGroup/UniWorld-V1",
1034+
snippets: snippets.univa,
1035+
filter: true,
1036+
countDownloads: `path_extension:"safetensors"`,
1037+
},
10301038
"uni-3dar": {
10311039
prettyLabel: "Uni-3DAR",
10321040
repoName: "Uni-3DAR",

0 commit comments

Comments
 (0)