Skip to content

Instantly share code, notes, and snippets.

View nateraw's full-sized avatar
💯

Nathan Raw nateraw

💯
View GitHub Profile
@nateraw
nateraw / make_dummy_videos_ffmpeg.sh
Created December 8, 2022 22:06
Create a couple dummy video files with ffmpeg
# Create video w/ red background
ffmpeg -f lavfi -i color=color=red -t 3 -vf scale=64:48 test_video_no_audio.mp4
# Make some dummy audio
ffmpeg -f lavfi -i "sine=frequency=1000:duration=3" -ac 2 dummy_audio.wav
# Add dummy audio to the previous video
ffmpeg -i test_video_no_audio.mp4 -i dummy_audio.wav -map 0:v -map 1:a -c:v copy -shortest test_video_audio.mp4
@nateraw
nateraw / diffusers-sd-v2-interp.ipynb
Created November 29, 2022 19:11
diffusers-sd-v2-interp.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from argparse import ArgumentParser
from base64 import b64decode
from io import BytesIO
from pathlib import Path
import nbformat
from doc_builder.style_doc import format_code_example
from huggingface_hub import create_repo, delete_file, list_repo_files, upload_file
from PIL import Image
@nateraw
nateraw / decord-stereo-audio-bug.ipynb
Created November 15, 2022 17:27
decord-stereo-audio-bug.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nateraw
nateraw / timm-push-and-save-example-0-11-0-bug.ipynb
Created November 14, 2022 18:14
timm-push-and-save-example-0.11.0-bug.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nateraw
nateraw / negative-prompts.ipynb
Last active November 11, 2022 22:41
negative-prompts.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""
# Data
wget -nc --no-check-certificate https://www.crcv.ucf.edu/data/UCF101/UCF101.rar
unrar x UCF101.rar
# Annotations
wget -nc --no-check-certificate https://www.crcv.ucf.edu/data/UCF101/UCF101TrainTestSplits-RecognitionTask.zip
unzip UCF101TrainTestSplits-RecognitionTask.zip
Probably some extra unnecessary imports here
@nateraw
nateraw / diffusers-image-to-image-walk.ipynb
Created November 9, 2022 01:06
diffusers-image-to-image-walk.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.