Skip to content

Instantly share code, notes, and snippets.

@hughescr
hughescr / train_Flux_dev-Lora.yaml
Created September 12, 2024 04:43
Sample config file for Flux LoRA generation on MPS
---
job: extension
config:
# this name will be the folder and filename name
name: "crh_lora_v1"
process:
- type: 'sd_trainer'
# root folder to save training sessions/samples/weights
training_folder: "output"
# uncomment to see performance stats in the terminal every N steps
@hughescr
hughescr / Wordle Solver.sql
Created January 13, 2023 21:46
SQLite schema for Wordle solver
CREATE TABLE IF NOT EXISTS "master"(word TEST primary key,count integer not null, l1 char(1), l2 char(1), l3 char(1), l4 char(1), l5 char(1));
CREATE INDEX master_l1_idx on master(l1);
CREATE INDEX master_l2_idx on master(l2);
CREATE INDEX master_l3_idx on master(l3);
CREATE INDEX master_l4_idx on master(l4);
CREATE INDEX master_l5_idx on master(l5);
CREATE VIEW score1 as
select l1 letter,sum(count) count from words group by 1
/* score1(letter,count) */;
CREATE VIEW score2 as
/*
A Core Image kernel routine that computes RGB<->HSV.
H range is 0-6, S and V 0-1
Alpha is preserved unchanged; actually we ignore it since we're only dealing with camera images which don't have any alpha
*/
vec4 HSVtoRGB(vec4 HSV)
{
vec4 hue;
HSV.x = HSV.x / 60.0;