From 25c98d2f0cfd74b60f5dec59252156f034cc27e5 Mon Sep 17 00:00:00 2001 From: Zhaoxi Chen <35674081+FrozenBurning@users.noreply.github.com> Date: Thu, 19 Sep 2024 19:01:40 +0800 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Lucain --- packages/tasks/src/model-libraries-snippets.ts | 11 ++++------- packages/tasks/src/model-libraries.ts | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/tasks/src/model-libraries-snippets.ts b/packages/tasks/src/model-libraries-snippets.ts index 094334a2c..8393a6124 100644 --- a/packages/tasks/src/model-libraries-snippets.ts +++ b/packages/tasks/src/model-libraries-snippets.ts @@ -1008,13 +1008,10 @@ whisperkit-cli transcribe --audio-path /path/to/audio.mp3 whisperkit-cli transcribe --model "large-v3" --model-prefix "distil" --audio-path /path/to/audio.mp3 --verbose`, ]; -export const threedtopia_xl = (): string[] => [ - `# Install from https://github.com/3DTopia/3DTopia-XL -from threedtopia_xl.models import threedtopia_xl +export const threedtopia_xl = (model: ModelData): string[] => [ + `from threedtopia_xl.models import threedtopia_xl + model = threedtopia_xl.from_pretrained("${model.id}") -img = 'PATH_TO_Image.png' -model.generate(cond=img) -# refer to https://github.com/3DTopia/3DTopia-XL?tab=readme-ov-file#inference for inference -# and https://github.com/3DTopia/3DTopia-XL/blob/main/app.py regarding usage`, +model.generate(cond="path/to/image.png") ]; //#endregion diff --git a/packages/tasks/src/model-libraries.ts b/packages/tasks/src/model-libraries.ts index 76f238a47..c5d558a2a 100644 --- a/packages/tasks/src/model-libraries.ts +++ b/packages/tasks/src/model-libraries.ts @@ -705,7 +705,7 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = { repoName: "3DTopia-XL", repoUrl: "https://github.com/3DTopia/3DTopia-XL", filter: false, - countDownloads: `path_extension:"pt"`, + countDownloads: `path:"model_vae_fp16.pt"`, snippets: snippets.threedtopia_xl, }, } satisfies Record;