Instructions to use georgefen/Face-Landmark-ControlNet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use georgefen/Face-Landmark-ControlNet with Diffusers:
pip install -U diffusers transformers accelerate
from diffusers import ControlNetModel, StableDiffusionControlNetPipeline controlnet = ControlNetModel.from_pretrained("georgefen/Face-Landmark-ControlNet") pipe = StableDiffusionControlNetPipeline.from_pretrained( "fill-in-base-model", controlnet=controlnet ) - Notebooks
- Google Colab
- Kaggle
| import torch | |
| import argparse | |
| def prune_ckpt(ckpt_path, save_path): | |
| raw = torch.load(ckpt_path, map_location=torch.device('cpu')) | |
| state_dict = raw["state_dict"] | |
| torch.save(state_dict, save_path) | |
| if __name__ == '__main__': | |
| args = argparse.ArgumentParser() | |
| args.add_argument('--ckpt_path', type=str) | |
| args.add_argument('--save_path', type=str) | |
| args = args.parse_args() | |