MCPcopy Create free account
hub / github.com/MooreThreads/Moore-AnimateAnyone / prepare_image_encoder

Function prepare_image_encoder

tools/download_weights.py:24–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22
23
24def prepare_image_encoder():
25 print(f"Preparing image encoder weights...")
26 local_dir = "./pretrained_weights"
27 os.makedirs(local_dir, exist_ok=True)
28 for hub_file in ["image_encoder/config.json", "image_encoder/pytorch_model.bin"]:
29 path = Path(hub_file)
30 saved_path = local_dir / path
31 if os.path.exists(saved_path):
32 continue
33 hf_hub_download(
34 repo_id="lambdalabs/sd-image-variations-diffusers",
35 subfolder=PurePosixPath(path.parent),
36 filename=PurePosixPath(path.name),
37 local_dir=local_dir,
38 )
39
40
41def prepare_dwpose():

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected