<jupyter_start><jupyter_text>You should be able to just run this as-is (there's examples in the git that gets pulled down). I can try to answer questions at https://www.reddit.com/user/exquisite_corpsedYou're going to need the path files from big-sleep to use this. There's a few examples to test with in the /content/big-sleep/paths folder to play with.If you want to generate frames for a looping animated gifs, you simply just generate them from the last path to the first.<jupyter_code>!git clone https://github.com/phoepner/big-sleep.git
!pip install ftfy
!pip install boto3
!pip install einops
import subprocess
for _ in range(2):
    CUDA_version = [s for s in subprocess.check_output(["nvcc", "--version"]).decode("UTF-8").split(", ") if s.startswith("release")][0].split(" ")[-1]
    print("CUDA version:", CUDA_version)

    if CUDA_version == "10.0":
        torch_version_suffix = "+cu100"
    elif CUDA_version == "10.1":
        torch_version_suffix = "+cu101"
    elif CUDA_version == "10.2":
        torch_version_suffix = ""
    else:
        torch_version_suffix = "+cu110"

    !pip install torch==1.7.1{torch_version_suffix} torchvision==0.8.2{torch_version_suffix} -f https://download.pytorch.org/whl/torch_stable.html ftfy regex


#@title Options { display-mode: "both" }
FileStartIndex =  200#@param {type:"integer"} // this is for the output files. Eg file.FileStartIndex.png
NumberOfFrames = 40 #@param {type:"integer"} // How  many frames you want between the 2 points

# These go in the 'paths' folder in /content/big-sleep/paths on the left. There's a few examples in there.
FirstPathIndex =  0#@param {type:"integer"} // The beginning path. Eg file.FirstPathIndex.pth
SecondPathIndex =  1#@param {type:"integer"} // The end path. Eg file.SecondPathIndex.pth
import time
TIMESTAMP = str(int(time.time()))
print('*******************************')
print('Creating a zip of images named '+TIMESTAMP+'.zip')
print('containing files in a range named file.'+ str(FileStartIndex) +'.png to file.'+ str(FileStartIndex + NumberOfFrames) +'.png')
print('and a video named '+TIMESTAMP+'.mp4' )
print('*******************************')
%cd /content/big-sleep
%rm *.png
!python /content/big-sleep/interpolation.py --lat1 /content/big-sleep/paths/file.$FirstPathIndex\.pth --lat2 /content/big-sleep/paths/file.$SecondPathIndex\.pth --steps $NumberOfFrames --startFileIndex $FileStartIndex
!ffmpeg -r 12 -start_number $FileStartIndex -i file.%d.png -vf fps=25 -pix_fmt yuv420p $TIMESTAMP\.mp4
!zip /content/$TIMESTAMP\.zip *.png<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15519253208868145, 'fraction_numerical': 0.01866977829638273, 'mean_word_length': 4.495726495726496, 'pattern_counts': {'":': 3, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 3, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '485879', 'license': 'MIT', 'n_tokens_mistral': 870, 'n_tokens_neox': 825, 'n_words': 249, 'path': 'Morph.ipynb', 'repo_name': 'PHoepner/big-sleep', 'size': '2571'}