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 worldcompass/reward_function/HunyuanWorldMirror/test_setup.py from Cccccz/HY: direct link, hf CLI and curl.
- Browser
- Download file 2.96 kB
-
https://huggingface.co/Cccccz/HY/resolve/main/worldcompass/reward_function/HunyuanWorldMirror/test_setup.py
- Command line
-
hf download hf://Cccccz/HY/worldcompass/reward_function/HunyuanWorldMirror/test_setup.py
-
curl -L -o test_setup.py https://huggingface.co/Cccccz/HY/resolve/main/worldcompass/reward_function/HunyuanWorldMirror/test_setup.py
2.96 kB
| #!/usr/bin/env python3 | |
| """Test script to verify HunyuanWorldMirror inference-only module is properly set up. | |
| This will check if all necessary files and imports are in place. | |
| """ | |
| import sys | |
| import os | |
| def test_imports(): | |
| """Test if core modules can be imported.""" | |
| print("Testing HunyuanWorldMirror inference module setup...") | |
| print("-" * 60) | |
| # Test 1: Check if main module can be imported | |
| try: | |
| from HunyuanWorldMirror import WorldMirror | |
| print("β WorldMirror class imported successfully") | |
| return True | |
| except ImportError as e: | |
| print(f"β Failed to import WorldMirror: {e}") | |
| print("\nMissing dependencies detected. Please install:") | |
| print(" pip install torch einops gsplat huggingface_hub") | |
| return False | |
| def test_structure(): | |
| """Test if file structure is correct.""" | |
| print("\nChecking file structure...") | |
| print("-" * 60) | |
| base_path = os.path.dirname(os.path.abspath(__file__)) | |
| required_files = [ | |
| "src/models/models/worldmirror.py", | |
| "src/models/models/visual_transformer.py", | |
| "src/models/models/rasterization.py", | |
| "src/models/heads/camera_head.py", | |
| "src/models/heads/dense_head.py", | |
| "src/utils/inference_utils.py", | |
| "infer.py", | |
| ] | |
| all_exist = True | |
| for filepath in required_files: | |
| full_path = os.path.join(base_path, filepath) | |
| if os.path.exists(full_path): | |
| print(f"β {filepath}") | |
| else: | |
| print(f"β {filepath} - MISSING") | |
| all_exist = False | |
| return all_exist | |
| def test_removed_files(): | |
| """Test if training/demo files were removed.""" | |
| print("\nChecking removed files...") | |
| print("-" * 60) | |
| base_path = os.path.dirname(os.path.abspath(__file__)) | |
| should_not_exist = [ | |
| "training", | |
| "demo", | |
| "examples", | |
| "app.py", | |
| "submodules", | |
| ] | |
| all_removed = True | |
| for item in should_not_exist: | |
| full_path = os.path.join(base_path, item) | |
| if not os.path.exists(full_path): | |
| print(f"β {item} removed") | |
| else: | |
| print(f"β {item} still exists") | |
| all_removed = False | |
| return all_removed | |
| if __name__ == "__main__": | |
| print("=" * 60) | |
| print("HunyuanWorldMirror Inference Module Test") | |
| print("=" * 60) | |
| structure_ok = test_structure() | |
| removed_ok = test_removed_files() | |
| import_ok = test_imports() | |
| print("\n" + "=" * 60) | |
| if structure_ok and removed_ok: | |
| print("β File structure is correct") | |
| if import_ok: | |
| print("β All tests passed!") | |
| sys.exit(0) | |
| else: | |
| print("β Structure OK, but missing Python dependencies") | |
| print( | |
| " Install with: pip install torch einops gsplat huggingface_hub" | |
| ) | |
| sys.exit(1) | |
| else: | |
| print("β Some tests failed") | |
| sys.exit(1) | |