Skip to content

Instantly share code, notes, and snippets.

View green-s's full-sized avatar

Sam Green green-s

View GitHub Profile
@jamiephan
jamiephan / README.md
Last active November 14, 2024 23:02
A script to automatically add ALL items to your account in quixel

Script to add all items from quixel

As quixel is being removed, all items are free to aquire. This script is to automate the process to add items to your account (As of writing, a total of 18874 items)

Note: This script only tested in the latest version of Chrome.

How to use

  1. Copy the script from below (run.js)
  2. Login into https://quixel.com
@AmericanPresidentJimmyCarter
AmericanPresidentJimmyCarter / README.md
Last active August 19, 2024 07:06
Putting your waifu into Flux with LoRA: welcome to losercity

Putting your waifu into Flux with LoRA: welcome to losercity

First, here is my SimpleTuner LoRA config, so you can get started with it. I used an 80GB A100 (thanks @bghira!).

LoRA repository:

@Pytness
Pytness / copilot_proxy.py
Created February 2, 2023 09:33
A proxy for copilot labs. pip install rich
#!/usr/bin/env python3
"""
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
import json
from http.server import BaseHTTPRequestHandler, HTTPServer
import requests
# Script for converting a HF Diffusers saved pipeline to a Stable Diffusion checkpoint.
# *Only* converts the UNet, VAE, and Text Encoder.
# Does not convert optimizer state or any other thing.
# Written by jachiam
import argparse
import os.path as osp
import torch
@lmmx
lmmx / diarise.py
Last active November 7, 2023 21:37
Python commands to create speaker diarisation
# ffmpeg -i foo.m4a foo.wav
from pyannote.audio import Pipeline
pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization")
diarization = pipeline("foo.wav")
# RTTM format https://catalog.ldc.upenn.edu/docs/LDC2004T12/RTTM-format-v13.pdf
with open("foo.rttm", "w") as rttm:
diarization.write_rttm(rttm)
@amishmm
amishmm / ArchOracleCloud.md
Last active September 28, 2024 03:45
Install Arch Linux on Oracle Cloud (Free Tier)

Requirement

  • Console / Cloud Shell access (via https://cloud.oracle.com)
  • Go to the instance page and under Resources -> Console connection -> Launch Cloud Shell connection

Steps

  1. In Ubuntu OR any other Free tier Linux OS
# Download Alpine Linux and install it on disk
cd /
wget https://dl-cdn.alpinelinux.org/alpine/v3.16/releases/x86_64/alpine-virt-3.16.2-x86_64.iso
@trygvebw
trygvebw / generate.py
Last active July 29, 2023 20:01
My Stable Diffusion image generation function. Abbreviated – will not run because of a few missing utility functions and classes.
def normalize_latent(x, max_val, quantile_val):
x = x.detach().clone()
for i in range(x.shape[0]):
if x[[i], :].std() > 1.0:
x[[i], :] = x[[i], :] / x[[i], :].std()
s = torch.quantile(torch.abs(x[[i], :]), quantile_val)
s = torch.maximum(s, torch.ones_like(s) * max_val)
x[[i], :] = x[[i], :] / (s / max_val)
return x
@harishanand95
harishanand95 / Stable_Diffusion.md
Last active June 6, 2024 08:42
Stable Diffusion on AMD GPUs on Windows using DirectML
@karpathy
karpathy / stablediffusionwalk.py
Last active October 1, 2024 09:56
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
/*=============================================================================
ReShade 5 effect file
github.com/martymcmodding
Author: Pascal Gilcher / Marty McFly
ReShade Motion Estimation Shader for dense 2D UV-space motion vectors
Based on ReShade Motion Estimation by Jakob Wapenhensch
(https://github.com/JakobPCoder/ReshadeMotionEstimation)