Content-Length: 264873 | pFad | http://github.com/huggingface/huggingface.js/commit/7cb9528351c2a7bba87adbbe37282308f69e1188

DC add InferenceCore to matanyone code snippet (#1510) · huggingface/huggingface.js@7cb9528 · GitHub
Skip to content

Commit 7cb9528

Browse files
authored
add InferenceCore to matanyone code snippet (#1510)
minor improvement to the matanyone code snippet following pq-yang/MatAnyone#35 adding the second method for loading the model using the `InferenceCore` a class that automatically loads the model and easily processes videos. this snippet is intended to be used as follows : ```python from matanyone.inference.inference_core import InferenceCore processor = InferenceCore("PeiqingYang/MatAnyone") # foreground_path, alpha_path = processor.process_video( # input_path = "inputs/video/test-sample1.mp4", # mask_path = "inputs/mask/test-sample1.png", # output_path = "outputs" # ) ```
1 parent 474e4ef commit 7cb9528

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,9 @@ export const matanyone = (model: ModelData): string[] => [
731731
732732
from matanyone.model.matanyone import MatAnyone
733733
model = MatAnyone.from_pretrained("${model.id}")`,
734+
`
735+
from matanyone import InferenceCore
736+
processor = InferenceCore("${model.id}")`,
734737
];
735738

736739
export const mesh_anything = (): string[] => [

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/huggingface/huggingface.js/commit/7cb9528351c2a7bba87adbbe37282308f69e1188

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy