Skip to content

Commit b85007a

Browse files
📝 Added Describe Anything library (#1408)
Adding [Describe Anything](https://github.com/NVlabs/describe-anything) library as a new option for model cards. Part of [this collection](https://huggingface.co/collections/nvidia/describe-anything-680825bb8f5e41ff0785834c) --------- Co-authored-by: Lucain <[email protected]>
1 parent 361a0fa commit b85007a

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,20 @@ output = model.generate(text)
237237
sf.write("simple.mp3", output, 44100)`,
238238
];
239239

240+
export const describe_anything = (model: ModelData): string[] => [
241+
`# pip install git+https://github.com/NVlabs/describe-anything
242+
from huggingface_hub import snapshot_download
243+
from dam import DescribeAnythingModel
244+
245+
snapshot_download(${model.id}, local_dir="checkpoints")
246+
247+
dam = DescribeAnythingModel(
248+
model_path="checkpoints",
249+
conv_mode="v1",
250+
prompt_mode="focal_prompt",
251+
)`,
252+
];
253+
240254
const diffusersDefaultPrompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k";
241255

242256
const diffusers_default = (model: ModelData) => [

packages/tasks/src/model-libraries.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
230230
filter: false,
231231
countDownloads: `path:"scin_dataset_precomputed_embeddings.npz" OR path:"saved_model.pb"`,
232232
},
233+
"describe-anything": {
234+
prettyLabel: "Describe Anything",
235+
repoName: "Describe Anything",
236+
repoUrl: "https://github.com/NVlabs/describe-anything",
237+
snippets: snippets.describe_anything,
238+
filter: false,
239+
},
233240
"dia-tts": {
234241
prettyLabel: "Dia",
235242
repoName: "Dia",

0 commit comments

Comments
 (0)