From c3940ce4ab986d5f67e8a413b66e262d5e9421fa Mon Sep 17 00:00:00 2001 From: sergiopaniego Date: Wed, 30 Apr 2025 14:47:38 +0200 Subject: [PATCH 1/4] Added Describe Anything library --- packages/tasks/src/model-libraries.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/tasks/src/model-libraries.ts b/packages/tasks/src/model-libraries.ts index a5a043995..54b2f0847 100644 --- a/packages/tasks/src/model-libraries.ts +++ b/packages/tasks/src/model-libraries.ts @@ -230,6 +230,12 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = { filter: false, countDownloads: `path:"scin_dataset_precomputed_embeddings.npz" OR path:"saved_model.pb"`, }, + "describe-anything": { + prettyLabel: "Describe Anything", + repoName: "describe-anything", + repoUrl: "https://github.com/NVlabs/describe-anything", + filter: false, + }, "dia-tts": { prettyLabel: "Dia", repoName: "Dia", From b36eea6b57f13631c2c0975fcea267fcf35a6c4a Mon Sep 17 00:00:00 2001 From: Sergio Paniego Blanco Date: Mon, 5 May 2025 10:42:24 +0200 Subject: [PATCH 2/4] Update packages/tasks/src/model-libraries.ts Co-authored-by: Lucain --- packages/tasks/src/model-libraries.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tasks/src/model-libraries.ts b/packages/tasks/src/model-libraries.ts index 54b2f0847..9feea5c64 100644 --- a/packages/tasks/src/model-libraries.ts +++ b/packages/tasks/src/model-libraries.ts @@ -232,7 +232,7 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = { }, "describe-anything": { prettyLabel: "Describe Anything", - repoName: "describe-anything", + repoName: "Describe Anything", repoUrl: "https://github.com/NVlabs/describe-anything", filter: false, }, From 6ff485bf42355bfe3f193417deb795456bc66c14 Mon Sep 17 00:00:00 2001 From: sergiopaniego Date: Mon, 5 May 2025 11:30:59 +0200 Subject: [PATCH 3/4] Added code snippet --- packages/tasks/src/model-libraries-snippets.ts | 13 +++++++++++++ packages/tasks/src/model-libraries.ts | 1 + 2 files changed, 14 insertions(+) diff --git a/packages/tasks/src/model-libraries-snippets.ts b/packages/tasks/src/model-libraries-snippets.ts index b041c53bc..71209dc6d 100644 --- a/packages/tasks/src/model-libraries-snippets.ts +++ b/packages/tasks/src/model-libraries-snippets.ts @@ -237,6 +237,19 @@ output = model.generate(text) sf.write("simple.mp3", output, 44100)`, ]; +export const describe_anything = (model: ModelData): string[] => [ + `from huggingface_hub import snapshot_download +from dam import DescribeAnythingModel + +snapshot_download(${model.id}, local_dir="checkpoints") + +dam = DescribeAnythingModel( + model_path="checkpoints", + conv_mode="v1", + prompt_mode="focal_prompt", +)`, +]; + const diffusersDefaultPrompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"; const diffusers_default = (model: ModelData) => [ diff --git a/packages/tasks/src/model-libraries.ts b/packages/tasks/src/model-libraries.ts index 9feea5c64..239083d21 100644 --- a/packages/tasks/src/model-libraries.ts +++ b/packages/tasks/src/model-libraries.ts @@ -234,6 +234,7 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = { prettyLabel: "Describe Anything", repoName: "Describe Anything", repoUrl: "https://github.com/NVlabs/describe-anything", + snippets: snippets.describe_anything, filter: false, }, "dia-tts": { From 02c9ba4d78e2e5b426c50f47c753419ec9f77320 Mon Sep 17 00:00:00 2001 From: sergiopaniego Date: Tue, 6 May 2025 10:23:41 +0200 Subject: [PATCH 4/4] Added installation instructions --- packages/tasks/src/model-libraries-snippets.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/tasks/src/model-libraries-snippets.ts b/packages/tasks/src/model-libraries-snippets.ts index 71209dc6d..e664f8001 100644 --- a/packages/tasks/src/model-libraries-snippets.ts +++ b/packages/tasks/src/model-libraries-snippets.ts @@ -238,7 +238,8 @@ sf.write("simple.mp3", output, 44100)`, ]; export const describe_anything = (model: ModelData): string[] => [ - `from huggingface_hub import snapshot_download + `# pip install git+https://github.com/NVlabs/describe-anything +from huggingface_hub import snapshot_download from dam import DescribeAnythingModel snapshot_download(${model.id}, local_dir="checkpoints")