Skip to content

Instantly share code, notes, and snippets.

View bmad4ever's full-sized avatar

bmad4ever

  • 00:11 (UTC +01:00)
View GitHub Profile
@bmad4ever
bmad4ever / parallel_quilting.py
Last active March 3, 2024 00:10
parallelizing the "sequential", Alexei A. Efros and Willian T. Freeman's image quilting algorithm
from multiprocessing.shared_memory import SharedMemory
import cv2 as cv
from .utils.generate import * # from https://github.com/rohitrango/Image-Quilting-for-Texture-Synthesis
# -- NOTE -- ___________________________________________________________________________________________________________
#
# This implementation improves vanilla (a.k.a. sequential) image quilting speed via parallelization.
#
# The following is a reference to the source implementation contained in the quilting folder:
@bmad4ever
bmad4ever / undo_redo.js
Last active June 7, 2023 20:17
Adds a "dirty" undo and redo functionality to ComfyUI
/*
This script adds a "dirty" undo and redo functionality to ComfyUI
HOW TO 'INSTALL':
Place undo_redo.js in the following directory: web/scripts
Open the file index.html inside the web folder.
After line 14 - window.graph = app.graph; - add the following lines of code:
@bmad4ever
bmad4ever / Randominator.py
Created February 28, 2023 00:23
Try to compress it, but you can only store random seeds
# Disclaimer: The exclusive use of random seeds to compress data in a LOSSLESS fashion is a bad idea.
# ( !!! much work for few gains !!! )
# With that out of the way, lets do it anyway...
#
# This "programming joke exercise" took me more time than expected,
# but at least was somewhat interesting despite the expected outcome.
# The solution is not yet 100% complete and there are performance improvements not yet implement
# but I doubt I will have the time and motivation to improve it.
import enum