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
Download annotator/uniformer/mmcv/runner/hooks/iter_timer.py from georgefen/Face-Landmark-ControlNet: direct link, hf CLI and curl.
- Browser
- Download file 446 Bytes
-
https://huggingface.co/georgefen/Face-Landmark-ControlNet/resolve/main/annotator/uniformer/mmcv/runner/hooks/iter_timer.py
- Command line
-
hf download hf://georgefen/Face-Landmark-ControlNet/annotator/uniformer/mmcv/runner/hooks/iter_timer.py
-
curl -L -o iter_timer.py https://huggingface.co/georgefen/Face-Landmark-ControlNet/resolve/main/annotator/uniformer/mmcv/runner/hooks/iter_timer.py
446 Bytes
| # Copyright (c) OpenMMLab. All rights reserved. | |
| import time | |
| from .hook import HOOKS, Hook | |
| class IterTimerHook(Hook): | |
| def before_epoch(self, runner): | |
| self.t = time.time() | |
| def before_iter(self, runner): | |
| runner.log_buffer.update({'data_time': time.time() - self.t}) | |
| def after_iter(self, runner): | |
| runner.log_buffer.update({'time': time.time() - self.t}) | |
| self.t = time.time() | |