Skip to content

Instantly share code, notes, and snippets.

@andreiantonescu
andreiantonescu / cli.js
Created September 13, 2022 12:59 — forked from mattdesl/cli.js
colour palette from text prompt using Stable Diffusion https://twitter.com/mattdesl/status/1569457645182152705
/**
* General-purpose NodeJS CLI/API wrapping the Stable-Diffusion python scripts.
*
* Note that this uses an older fork of stable-diffusion
* with the 'txt2img.py' script, and that script was modified to
* support the --outfile command.
*/
var { spawn, exec } = require("child_process");
var path = require("path");
var particles = []
var arrows = []
var numberOfParticles = 0
var temp = 0
var wind = {
angle: 0,
speed: 0,
vector: null
}