Skip to content

Commit

Permalink
add 3DTopia-XL as library (#910)
Browse files Browse the repository at this point in the history
Library name `3dtopia-xl` has been added in the repo 3DTopia-XL for 3D
generation https://huggingface.co/FrozenBurning/3DTopia-XL

This PR will allow automatic download stats on `*.pt` files in the repo
together with code snippets on how to use them.

---------

Co-authored-by: vb <[email protected]>
Co-authored-by: Lucain <[email protected]>
Co-authored-by: Lucain <[email protected]>
  • Loading branch information
4 people committed Sep 19, 2024
1 parent 565316d commit 959a182
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/tasks/src/model-libraries-snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1007,4 +1007,11 @@ whisperkit-cli transcribe --audio-path /path/to/audio.mp3
# Or use your preferred model variant
whisperkit-cli transcribe --model "large-v3" --model-prefix "distil" --audio-path /path/to/audio.mp3 --verbose`,
];

export const threedtopia_xl = (model: ModelData): string[] => [
`from threedtopia_xl.models import threedtopia_xl
model = threedtopia_xl.from_pretrained("${model.id}")
model.generate(cond="path/to/image.png")`,
];
//#endregion
8 changes: 8 additions & 0 deletions packages/tasks/src/model-libraries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
snippets: snippets.whisperkit,
countDownloads: `path_filename:"model" AND path_extension:"mil" AND _exists_:"path_prefix"`,
},
"3dtopia-xl": {
prettyLabel: "3DTopia-XL",
repoName: "3DTopia-XL",
repoUrl: "https://github.com/3DTopia/3DTopia-XL",
filter: false,
countDownloads: `path:"model_vae_fp16.pt"`,
snippets: snippets.threedtopia_xl,
},
} satisfies Record<string, LibraryUiElement>;

export type ModelLibraryKey = keyof typeof MODEL_LIBRARIES_UI_ELEMENTS;
Expand Down

0 comments on commit 959a182

Please sign in to comment.