Instructions to use miguelamendez/openlipsync with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use miguelamendez/openlipsync with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("miguelamendez/openlipsync", 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 scripts/tests/modal_lipsync_checkpoints_list.py from miguelamendez/openlipsync: direct link, hf CLI and curl.
- Browser
- Download file 1.35 kB
-
https://huggingface.co/miguelamendez/openlipsync/resolve/main/scripts/tests/modal_lipsync_checkpoints_list.py
- Command line
-
hf download hf://miguelamendez/openlipsync/scripts/tests/modal_lipsync_checkpoints_list.py
-
curl -L -o modal_lipsync_checkpoints_list.py https://huggingface.co/miguelamendez/openlipsync/resolve/main/scripts/tests/modal_lipsync_checkpoints_list.py
1.35 kB
| import modal | |
| import os | |
| from pathlib import Path | |
| # Create app for listing files | |
| list_app = modal.App("openlipsync-lister") | |
| # Create a shared volume | |
| volume = modal.Volume.from_name("openlipsync-volume", create_if_missing=True) | |
| def list_files(): | |
| import os | |
| import pathlib | |
| # List all files in volume | |
| print("Files in volume:") | |
| def list_directory(path): | |
| try: | |
| for item in os.listdir(path): | |
| item_path = os.path.join(path, item) | |
| if os.path.isdir(item_path): | |
| print(f" {item}/") | |
| list_directory(item_path) | |
| else: | |
| print(f" {item}") | |
| except Exception as e: | |
| print(f"Error accessing {path}: {e}") | |
| # List files in the volume | |
| list_directory("/data") | |
| # Or alternatively, you can use pathlib to list files | |
| print("\nDetailed file listing:") | |
| data_path = pathlib.Path("/data") | |
| for file_path in data_path.rglob("*"): | |
| if file_path.is_file(): | |
| print(f" {file_path.relative_to('/data')}") | |
| def main_list(): | |
| print("Listing files in volume...") | |
| list_files.remote() | |
| print("Listing completed!") | |