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 wan/distributed/__init__.py from Cccccz/HY: direct link, hf CLI and curl.
- Browser
- Download file 1.28 kB
-
https://huggingface.co/Cccccz/HY/resolve/main/wan/distributed/__init__.py
- Command line
-
hf download hf://Cccccz/HY/wan/distributed/__init__.py
-
curl -L -o __init__.py https://huggingface.co/Cccccz/HY/resolve/main/wan/distributed/__init__.py
1.28 kB
| # SPDX-License-Identifier: Apache-2.0 | |
| from distributed.communication_op import * | |
| from distributed.parallel_state import ( | |
| cleanup_dist_env_and_memory, | |
| get_dp_group, | |
| get_dp_rank, | |
| get_dp_world_size, | |
| get_local_torch_device, | |
| get_sp_group, | |
| get_sp_parallel_rank, | |
| get_sp_world_size, | |
| get_tp_group, | |
| get_tp_rank, | |
| get_tp_world_size, | |
| get_world_group, | |
| get_world_rank, | |
| get_world_size, | |
| init_distributed_environment, | |
| initialize_model_parallel, | |
| maybe_init_distributed_environment_and_model_parallel, | |
| model_parallel_is_initialized, | |
| ) | |
| from distributed.utils import * | |
| __all__ = [ | |
| # Initialization | |
| "init_distributed_environment", | |
| "initialize_model_parallel", | |
| "cleanup_dist_env_and_memory", | |
| "model_parallel_is_initialized", | |
| "maybe_init_distributed_environment_and_model_parallel", | |
| # World group | |
| "get_world_group", | |
| "get_world_rank", | |
| "get_world_size", | |
| # Data parallel group | |
| "get_dp_group", | |
| "get_dp_rank", | |
| "get_dp_world_size", | |
| # Sequence parallel group | |
| "get_sp_group", | |
| "get_sp_parallel_rank", | |
| "get_sp_world_size", | |
| # Tensor parallel group | |
| "get_tp_group", | |
| "get_tp_rank", | |
| "get_tp_world_size", | |
| # Get torch device | |
| "get_local_torch_device", | |
| ] | |