Views
No views yet
| Folder | Decoder layers | latent_dim |
|---|---|---|
layers4 | 4 | 256 |
layers8 | 8 | 512 |
layers12 | 12 | 512 (best model in the paper) |
model.pt (weights) and config.yaml.1import torch
2from huggingface_hub import hf_hub_download
3from omegaconf import OmegaConf
4# run from the `diffusion/` directory of the HandX repo
5from src.diffusion.utils.model_utils import create_model_and_diffusion
6
7variant = "layers12"
8cfg = OmegaConf.load(hf_hub_download("alexzhang598/HandX-diffusion", f"{variant}/config.yaml"))
9model, diffusion = create_model_and_diffusion(cfg.model)
10sd = torch.load(hf_hub_download("alexzhang598/HandX-diffusion", f"{variant}/model.pt"),
11 map_location="cpu")["state_dict"]
12model.load_state_dict(sd, strict=False) # missing keys are the frozen T5 encoder (loaded from t5-base)load_state_dict(..., strict=False); the only missing keys are
the frozen T5 weights, restored from t5-base at construction.