Instructions to use hunyuanvideo-community/HunyuanImage-2.1-Refiner-Diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use hunyuanvideo-community/HunyuanImage-2.1-Refiner-Diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("hunyuanvideo-community/HunyuanImage-2.1-Refiner-Diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
File size: 492 Bytes
230e90c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | {
"_class_name": "AutoencoderKLHunyuanImageRefiner",
"_diffusers_version": "0.36.0.dev0",
"_name_or_path": "/raid/yiyi/test-hy2-refiner-diffusers",
"block_out_channels": [
128,
256,
512,
1024,
1024
],
"downsample_match_channel": true,
"in_channels": 3,
"latent_channels": 32,
"layers_per_block": 2,
"out_channels": 3,
"scaling_factor": 1.03682,
"spatial_compression_ratio": 16,
"temporal_compression_ratio": 4,
"upsample_match_channel": true
}
|