Skip to content

Instantly share code, notes, and snippets.

View nateraw's full-sized avatar
💯

Nathan Raw nateraw

💯
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nateraw
nateraw / hf-hub-modelcard-version-and-tag-update.ipynb
Last active September 2, 2022 14:42
hf-hub-modelcard-version-and-tag-update.ipynb
Loading
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-minimal.ipynb
Last active September 2, 2022 08:06
timm-push-minimal.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nateraw
nateraw / accelerate_trainer.py
Created August 23, 2022 22:51
A simple trainer with Hugging Face accelerate.
from tqdm.auto import tqdm
from pathlib import Path
from accelerate import Accelerator
from accelerate.utils import set_seed
import torch
import time
@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
@nateraw
nateraw / modelcard-in-huggingface-hub-inheritance-demo.ipynb
Last active July 26, 2022 04:39
modelcard-in-huggingface-hub-inheritance-demo.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nateraw
nateraw / youtube-dl-music.ipynb
Last active July 20, 2022 03:21
youtube-dl-music.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nateraw
nateraw / modelcard-in-huggingface-hub-demo.ipynb
Last active August 11, 2022 20:34
modelcard-in-huggingface-hub-demo.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nateraw
nateraw / pytorchvideo_accelerate_run.py
Created July 11, 2022 18:22
Use Hugging Face accelerate and pytorchvideo to fine tune a video action recognition model on the UCF11 dataset
# pip install torch torchmetrics accelerate pytorchvideo
import itertools
import requests
from pathlib import Path
from random import shuffle
from shutil import unpack_archive
from argparse import ArgumentParser
from tqdm.auto import tqdm
import torch
@nateraw
nateraw / hubconf-api-inference-community.ipynb
Last active July 6, 2022 15:59
hubconf-api-inference-community.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.