Run this model with HF Jobs
Run Agnes-AI/Agnes-Video-H3-MoE on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Agnes-AI/Agnes-Video-H3-MoE. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Agnes-AI/Agnes-Video-H3-MoE on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Download deploy/diffsynth/core/vram/initialization.py from Agnes-AI/Agnes-Video-H3-MoE: direct link, hf CLI and curl.
- Browser
- Download file 766 Bytes
-
https://huggingface.co/Agnes-AI/Agnes-Video-H3-MoE/resolve/main/deploy/diffsynth/core/vram/initialization.py
- Command line
-
hf download hf://Agnes-AI/Agnes-Video-H3-MoE/deploy/diffsynth/core/vram/initialization.py
-
curl -L -o initialization.py https://huggingface.co/Agnes-AI/Agnes-Video-H3-MoE/resolve/main/deploy/diffsynth/core/vram/initialization.py
766 Bytes
| import torch | |
| from contextlib import contextmanager | |
| def skip_model_initialization(device=torch.device("meta")): | |
| def register_empty_parameter(module, name, param): | |
| old_register_parameter(module, name, param) | |
| if param is not None: | |
| param_cls = type(module._parameters[name]) | |
| kwargs = module._parameters[name].__dict__ | |
| kwargs["requires_grad"] = param.requires_grad | |
| module._parameters[name] = param_cls(module._parameters[name].to(device), **kwargs) | |
| old_register_parameter = torch.nn.Module.register_parameter | |
| torch.nn.Module.register_parameter = register_empty_parameter | |
| try: | |
| yield | |
| finally: | |
| torch.nn.Module.register_parameter = old_register_parameter | |