Skip to content

Instantly share code, notes, and snippets.

View jasonlevine's full-sized avatar

Jason Levine jasonlevine

View GitHub Profile
CONVERTED_MODEL_PATH = "path to converted v2 depth model"
DEVICE = "cuda"
INIT_IMAGE = "path to init image or None"
DEPTH_IMAGE = "path to black and white depth map"
OUTPUT_PATH = "path to save the result"
import diffusers
from diffusers.pipelines.stable_diffusion import StableDiffusionPipelineOutput
import torch
@natowi
natowi / audio2midi.md
Last active March 11, 2026 23:11
List of open source audio to midi packages
@kylemcdonald
kylemcdonald / umap_vs_tsne.cpp
Created November 20, 2017 23:34
Export visualizations for comparing UMAP to t-SNE.
#include "ofMain.h"
template <class T>
vector<T> loadEmbedding(string filename) {
vector<T> embedding;
ofBuffer embeddingBuffer = ofBufferFromFile(filename);
for(auto& line : embeddingBuffer.getLines()) {
if(line.size()) {
T x;
stringstream(line) >> x;
@kylemcdonald
kylemcdonald / 0-unformatted-100k.glslish.glsl
Created June 16, 2015 01:52
GLSL generated by char-rnn. New "shaders" are separated by `#define st`
b^d<13.05);struct Sphere_t material;vec3 color;vec3 da;vec3 Por;vec3 GSraginge=float(SMOUTH);float b;float c;#define H_MIN_STEPS 0.050
#define DOYSr 31.0
#define SpePSNoure 1 .001
#define R 44.0
#define PECBUONS CERTWE 3.2
#define NLIMA Vh_WEDTE 1.4
vec3 fLadeWial;};float 0;vec3 D(vec3 a,float b){vec3 c,d,g;c=b;d=d;e=4.*f;float g,h,j,k,l,m,n,q,r;h=.001;i=.1;j=.15;k=1e3;C=2.;if(e.y<.5){b=vec3(0,1,1);c.x=y(f,h.x);h=y(f,d,PI*g,3.);f=W(i,b,c);h=D(g,h);i=d;if(a>.01)break;vec4 j=vec4(iGlobalTime*.5*i,0);j=g+vec4(2,2.*sin(g),vec3(0,j+1.,0),vec3(-j,0,0));i=h;i+=vec3(0,9,1);}j=vec4(b,h,1);a=x(h,10.);i=(e-.01)*.1;j=g,i;k=vec3(0);m=.75;
#ifdef ENS_RADASIX
j=v(h,10.,50.,80.*sin(g)*1.7,k,1.15);h.vOb=vec3(0,0,4);a=vec4(i,1);}