Skip to content

Instantly share code, notes, and snippets.

View curiousjp's full-sized avatar

curious.jp curiousjp

  • Melbourne, Australia
View GitHub Profile
@curiousjp
curiousjp / parse_logs.py
Created January 23, 2024 09:08
Parse fooocus log files into DiffusionToolkit compatible text
from pathlib import Path
import re
switch_image = '<div id="(.+?)" class="image-container"><hr><table><tr>'
image_tag = '<td class=\'key\'>(.+?)</td><td class=\'value\'>(.+?)</td>'
tag_renames = {
'Guidance Scale': 'CFG scale',
'Resolution': 'Size',
'Base Model': 'Model'
@curiousjp
curiousjp / ffmpeg-meme-main.md
Last active June 16, 2023 15:39
ffmpeg meme cookbook

curiousjp's ffmpeg meme cookbook

This is a place to gather "recipes" for various types of common video memes, now that discord has made this a ubiquitous format. I put these files together using ffmpeg, running it from the command line in a Windows Linux Subsystem instance. Image editing is normally done in GIMP where necessary, and youtube-dl is used to fetch video and audio files for input.

Eventually, I hope to have a basic tutorial here on how ffmpeg's worldview around video editing operates - the idea of the filter graph. Until then, I point you to the overall filtering guide, and the filter documentation reference. The basic idea however is that our video and audio streams are going to flow through a chain of filters and modifiers from our inputs to our final results.

Examples

Examples on this page will often have been resized further from the given recipe to save space.

Holding a frame still