Skip to content

Instantly share code, notes, and snippets.

View mmichelli's full-sized avatar

Mario mmichelli

  • Rubynor / Swiftner
  • Norway
View GitHub Profile
@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
@karpathy
karpathy / stablediffusionwalk.py
Last active May 28, 2024 11:29
hacky stablediffusion code for generating videos
"""
stable diffusion dreaming
creates hypnotic moving videos by smoothly walking randomly through the sample space
example way to run this script:
$ python stablediffusionwalk.py --prompt "blueberry spaghetti" --name blueberry
to stitch together the images, e.g.:
$ ffmpeg -r 10 -f image2 -s 512x512 -i blueberry/frame%06d.jpg -vcodec libx264 -crf 10 -pix_fmt yuv420p blueberry.mp4
@glenbot
glenbot / monitor_apps.py
Created August 22, 2012 14:08
OSX Application time tracking in Python
#!/usr/bin/env python
"""
OSX ONLY!
Monitor OSX application usage from your shell
and at the end of the day see how much you don't
work ;)
Author: Glen Zangirolami
http://theglenbot.com
@j-5-s
j-5-s / backbone-localstorage.js
Created July 11, 2011 01:57
backbonejs local storage adapter
// A simple module to replace `Backbone.sync` with *localStorage*-based
// persistence. Models are given GUIDS, and saved into a JSON object. Simple
// as that.
// Generate four random hex digits.
function S4() {
return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
};
// Generate a pseudo-GUID by concatenating random hexadecimal.