Instructions to use Cccccz/HY with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Cccccz/HY with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Cccccz/HY", 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 run_720_frames.sh from Cccccz/HY: direct link, hf CLI and curl.
- Browser
- Download file 1.54 kB
-
https://huggingface.co/Cccccz/HY/resolve/main/run_720_frames.sh
- Command line
-
hf download hf://Cccccz/HY/run_720_frames.sh
-
curl -L -o run_720_frames.sh https://huggingface.co/Cccccz/HY/resolve/main/run_720_frames.sh
1.54 kB
| set -euo pipefail | |
| export PYTHONPATH=$(cd "$(dirname "$0")" && pwd):${PYTHONPATH:-} | |
| export CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES:-0} | |
| PROMPT='A paved pathway leads towards a stone arch bridge spanning a calm body of water. Lush green trees and foliage line the path and the far bank of the water. A traditional-style pavilion with a tiered reddish-brown roof sits on the far shore. The water reflects the surrounding greenery and the sky.' | |
| IMAGE_PATH=./assets/img/test.png | |
| SEED=1 | |
| ASPECT_RATIO=16:9 | |
| RESOLUTION=480p | |
| OUTPUT_PATH=./outputs/near_720_frames | |
| MODEL_PATH=/data3/chenzhuo/workspace/HY-WorldPlay/models-ms/HunyuanVideo-1.5 | |
| AR_DISTILL_ACTION_MODEL_PATH=/data3/chenzhuo/workspace/HY-WorldPlay/models-ms/HY-WorldPlay/ar_distilled_action_model/diffusion_pytorch_model.safetensors | |
| POSE='w-179' | |
| NUM_FRAMES=717 | |
| WIDTH=832 | |
| HEIGHT=480 | |
| N_INFERENCE_GPU=1 | |
| torchrun --nproc_per_node=$N_INFERENCE_GPU hyvideo/generate.py \ | |
| --prompt "$PROMPT" \ | |
| --image_path "$IMAGE_PATH" \ | |
| --resolution "$RESOLUTION" \ | |
| --aspect_ratio "$ASPECT_RATIO" \ | |
| --video_length "$NUM_FRAMES" \ | |
| --seed "$SEED" \ | |
| --rewrite false \ | |
| --sr false \ | |
| --save_pre_sr_video false \ | |
| --pose "$POSE" \ | |
| --output_path "$OUTPUT_PATH" \ | |
| --model_path "$MODEL_PATH" \ | |
| --action_ckpt "$AR_DISTILL_ACTION_MODEL_PATH" \ | |
| --few_step true \ | |
| --num_inference_steps 4 \ | |
| --model_type ar \ | |
| --width "$WIDTH" \ | |
| --height "$HEIGHT" \ | |
| --use_vae_parallel false \ | |
| --use_sageattn false \ | |
| --use_fp8_gemm false \ | |
| --transformer_resident_ar_rollout true | |