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 deploy/joyomni_ops/include/math.hpp from kylinfires/Joy-face_change_optimized: direct link, hf CLI and curl.
- Browser
- Download file 785 Bytes
-
https://huggingface.co/kylinfires/Joy-face_change_optimized/resolve/main/deploy/joyomni_ops/include/math.hpp
- Command line
-
hf download hf://kylinfires/Joy-face_change_optimized/deploy/joyomni_ops/include/math.hpp
-
curl -L -o math.hpp https://huggingface.co/kylinfires/Joy-face_change_optimized/resolve/main/deploy/joyomni_ops/include/math.hpp
785 Bytes
| inline constexpr uint32_t next_pow_2(uint32_t const num) { | |
| if (num <= 1) return num; | |
| return 1 << (CHAR_BIT * sizeof(num) - __builtin_clz(num - 1)); | |
| } | |
| template <typename A, typename B> | |
| static inline constexpr auto div_ceil(A a, B b) { | |
| return (a + b - 1) / b; | |
| } | |
| // Round a down to the next multiple of b. The caller is responsible for making | |
| // sure that b is non-zero | |
| template <typename T> | |
| inline constexpr T round_to_previous_multiple_of(T a, T b) { | |
| return a % b == 0 ? a : (a / b) * b; | |
| } | |
| // Round a up to the next multiple of b. The caller is responsible for making | |
| // sure that b is non-zero | |
| template <typename T> | |
| inline constexpr T round_to_next_multiple_of(T a, T b) { | |
| return a % b == 0 ? a : ((a / b) + 1) * b; | |
| } | |