Spaces:
Runtime error
Runtime error
Download scripts/test_persistent.py from TheNetherWatcher/Vid2Vid-using-Text-prompt: direct link, hf CLI and curl.
- Browser
- Download file 928 Bytes
-
https://huggingface.co/spaces/TheNetherWatcher/Vid2Vid-using-Text-prompt/resolve/main/scripts/test_persistent.py
- Command line
-
hf download hf://spaces/TheNetherWatcher/Vid2Vid-using-Text-prompt/scripts/test_persistent.py
-
curl -L -o test_persistent.py https://huggingface.co/spaces/TheNetherWatcher/Vid2Vid-using-Text-prompt/resolve/main/scripts/test_persistent.py
928 Bytes
| from rich import print | |
| from animatediff import get_dir | |
| from animatediff.cli import generate, logger | |
| config_dir = get_dir("config") | |
| config_path = config_dir.joinpath("prompts/test.json") | |
| width = 512 | |
| height = 512 | |
| length = 32 | |
| context = 16 | |
| stride = 4 | |
| logger.warn("Running first-round generation test, this should load the full model.\n\n") | |
| out_dir = generate( | |
| config_path=config_path, | |
| width=width, | |
| height=height, | |
| length=length, | |
| context=context, | |
| stride=stride, | |
| ) | |
| logger.warn(f"Generated animation to {out_dir}") | |
| logger.warn("\n\nRunning second-round generation test, this should reuse the already loaded model.\n\n") | |
| out_dir = generate( | |
| config_path=config_path, | |
| width=width, | |
| height=height, | |
| length=length, | |
| context=context, | |
| stride=stride, | |
| ) | |
| logger.warn(f"Generated animation to {out_dir}") | |
| logger.error("If the second round didn't talk about reloading the model, it worked! yay!") | |