Skip to content

Instantly share code, notes, and snippets.

View nateraw's full-sized avatar
💯

Nathan Raw nateraw

💯
View GitHub Profile
@nateraw
nateraw / songstarter-v0-2-demo.ipynb
Last active April 13, 2024 21:11
songstarter-v0-2-demo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nateraw
nateraw / stable_diffusion_walk.py
Created August 18, 2022 05:59
Walk between stable diffusion text prompts
"""
Built on top of this gist by @karpathy:
https://gist.github.com/karpathy/00103b0037c5aaea32fe1da1af553355
stable diffusion dreaming over text prompts
creates hypnotic moving videos by smoothly walking randomly through the sample space
example way to run this script:
$ python stable_diffusion_walk.py --prompts "['blueberry spaghetti', 'strawberry spaghetti']" --seeds 243,523 --name berry_good_spaghetti
This file has been truncated, but you can view the full file.
{"text":"[INST] <<SYS>>\nUse the Input to provide a summary of a conversation.\n<<\/SYS>>\n\nInput:\nAmanda: I baked cookies. Do you want some?\r\nJerry: Sure!\r\nAmanda: I'll bring you tomorrow :-) [\/INST]\n\nSummary: Amanda baked cookies and will bring Jerry some tomorrow."}
{"text":"[INST] <<SYS>>\nUse the Input to provide a summary of a conversation.\n<<\/SYS>>\n\nInput:\nOlivia: Who are you voting for in this election? \r\nOliver: Liberals as always.\r\nOlivia: Me too!!\r\nOliver: Great [\/INST]\n\nSummary: Olivia and Olivier are voting for liberals in this election. "}
{"text":"[INST] <<SYS>>\nUse the Input to provide a summary of a conversation.\n<<\/SYS>>\n\nInput:\nTim: Hi, what's up?\r\nKim: Bad mood tbh, I was going to do lots of stuff but ended up procrastinating\r\nTim: What did you plan on doing?\r\nKim: Oh you know, uni stuff and unfucking my room\r\nKim: Maybe tomorrow I'll move my ass and do everything\r\nKim: We were going to defrost a fridge so instead of shopping I'll eat some defrosted
@nateraw
nateraw / run.py
Created June 27, 2023 07:57
Use Modal for Stable Diffusion QR Code Generation
import io
import time
from pathlib import Path
from modal import Image, Stub, method
stub = Stub("stable-diffusion-qrcode-cli")
cache_dir = "/vol/cache"
"""
# 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 / rit-demo-stable_diffusion_videos.ipynb
Last active April 7, 2023 19:40
rit-demo-stable_diffusion_videos.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nateraw
nateraw / sdv-sd2-1-example.ipynb
Created February 18, 2023 23:55
sdv-SD2-1-example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nateraw
nateraw / audioldm.ipynb
Last active February 3, 2023 16:30
audioldm.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nateraw
nateraw / ai_or_not_baseline_timm_datasets_lightning.ipynb
Last active February 1, 2023 22:30
ai_or_not_baseline_timm_datasets_lightning.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nateraw
nateraw / download_musiccaps.py
Created January 27, 2023 21:58
Download the underlying audio files of the MusicCaps dataset from YouTube using Hugging Face datasets
"""
Download the clips within the MusicCaps dataset from YouTube.
Requires:
- ffmpeg
- yt-dlp
- datasets[audio]
- torchaudio
"""
import subprocess