Video-to-Video
Diffusers
English
Chinese
video-editing
streaming
quantization
int8
text-stream-stripping
Instructions to use kylinfires/Joy-face_change_optimized with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use kylinfires/Joy-face_change_optimized with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("kylinfires/Joy-face_change_optimized", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Download training/src/utils/logging.py from kylinfires/Joy-face_change_optimized: direct link, hf CLI and curl.
- Browser
- Download file 892 Bytes
-
https://huggingface.co/kylinfires/Joy-face_change_optimized/resolve/main/training/src/utils/logging.py
- Command line
-
hf download hf://kylinfires/Joy-face_change_optimized/training/src/utils/logging.py
-
curl -L -o logging.py https://huggingface.co/kylinfires/Joy-face_change_optimized/resolve/main/training/src/utils/logging.py
892 Bytes
| import os | |
| import sys | |
| import loguru | |
| _logger = None | |
| class NullLogger: | |
| def __getattr__(self, name): | |
| return lambda *args, **kwargs: None | |
| def bind(self, **kwargs): | |
| return self | |
| def setup_logger(exp_dir: str | None = None): | |
| global _logger | |
| loguru.logger.remove() | |
| if int(os.getenv("RANK", 0)) > 0: | |
| _logger = NullLogger() | |
| return _logger | |
| _logger = loguru.logger | |
| options = dict( | |
| level="INFO", | |
| backtrace=False, | |
| diagnose=False, | |
| format="{time:YYYY-MM-DD HH:mm:ss} | {level} | {message}", | |
| ) | |
| _logger.add(sys.stderr, **options) | |
| if exp_dir is not None: | |
| _logger.add(os.path.join(exp_dir, "train.log"), colorize=False, encoding="utf-8", **options) | |
| return _logger | |
| def get_logger(): | |
| return _logger if _logger is not None else setup_logger() | |
| __all__ = ["setup_logger", "get_logger"] | |