Skip to content

Instantly share code, notes, and snippets.

@fofr
fofr / flux-dev-layers.txt
Created September 9, 2024 22:01
flux-dev-layers.txt
transformer.transformer_blocks.0.norm1.linear
transformer.transformer_blocks.0.norm1_context.linear
transformer.transformer_blocks.0.attn.to_q
transformer.transformer_blocks.0.attn.to_k
transformer.transformer_blocks.0.attn.to_v
transformer.transformer_blocks.0.attn.add_k_proj
transformer.transformer_blocks.0.attn.add_v_proj
transformer.transformer_blocks.0.attn.add_q_proj
transformer.transformer_blocks.0.attn.to_out.0
transformer.transformer_blocks.0.attn.to_add_out
@fofr
fofr / sd3_comparisons_workflow.json
Created June 14, 2024 10:38
Comparing different settings and text encoders with SD3 medium
{
"last_node_id": 341,
"last_link_id": 721,
"nodes": [
{
"id": 286,
"type": "ConditioningZeroOut",
"pos": [
-1295.4237534051308,
126.18084781444678
@fofr
fofr / logs.txt
Created March 4, 2024 12:39
import times
Import times for custom nodes:
0.0 seconds: /src/ComfyUI/custom_nodes/ComfyUI-Logic
0.0 seconds: /src/ComfyUI/custom_nodes/ComfyUI-BRIA_AI-RMBG
0.0 seconds: /src/ComfyUI/custom_nodes/ComfyUI_essentials
0.0 seconds: /src/ComfyUI/custom_nodes/masquerade-nodes-comfyui
0.0 seconds: /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus
0.0 seconds: /src/ComfyUI/custom_nodes/ComfyUI-Custom-Scripts
0.0 seconds: /src/ComfyUI/custom_nodes/Derfuu_ComfyUI_ModdedNodes
0.0 seconds: /src/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale
0.0 seconds: /src/ComfyUI/custom_nodes/ComfyUI-PhotoMaker
@fofr
fofr / dalle3.py
Created November 6, 2023 22:57
dalle3 style and quality
from openai import OpenAI
import os
from datetime import datetime
import requests
client = OpenAI()
prompt = "a portrait photo of a woman"
qualities = ["standard", "hd"]
styles = ["natural", "vivid"]
import Replicate from 'replicate'
import * as dotenv from 'dotenv'
dotenv.config()
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
})
async function main() {
const training = await replicate.trainings.create(
@fofr
fofr / select-grid.js
Created May 26, 2023 22:15
Photoshop grid selection
// Get a reference to the active document.
var doc = app.activeDocument;
// Set the height of the selection to the height of the document.
var height = doc.height;
// Set the x and y offset in pixels.
var xOffset = 5;
var yOffset = 5;
@fofr
fofr / lambda-labs-cog.txt
Created May 5, 2023 13:47
lambda-labs-cog.txt
sudo curl -o /usr/bin/cog -L "https://github.com/replicate/cog/releases/latest/download/cog_$(uname -s)_$(uname -m)"
sudo chmod +x /usr/bin/cog
sudo usermod -aG docker $USER
export OPENAI_API_KEY=
pip install autocog
autocog
@fofr
fofr / audio-to-video.sh
Created April 27, 2023 18:19
Create video from text and audio
#!/bin/bash
# Check if the argument is provided
if [ -z "$1" ]; then
echo "Usage: $0 <filename_without_extension>"
exit 1
fi
# Define input files and output file
filename="$1"
@fofr
fofr / prompts.txt
Created April 24, 2023 23:05
Bark – Pass in prompts, save generated audio with prompt text file
Hello you!
---
MAN: Hello
WOMAN: Hi
---
...
@fofr
fofr / split_mjv5_png.sh
Created March 22, 2023 22:16
A bash script to split a Midjourney v5 grid of images using ImageMagick
#!/bin/bash
# Check if 'convert' is available
if ! command -v convert &> /dev/null; then
echo "'convert' command not found. Please install ImageMagick and try again."
exit 1
fi
input_file="$1"