Skip to content

Instantly share code, notes, and snippets.

View maxenko's full-sized avatar
🎯
Focusing

Max Enko maxenko

🎯
Focusing
View GitHub Profile
@trygvebw
trygvebw / find_noise.py
Last active March 31, 2025 01:40
A "reverse" version of the k_euler sampler for Stable Diffusion, which finds the noise that will reconstruct the supplied image
import torch
import numpy as np
import k_diffusion as K
from PIL import Image
from torch import autocast
from einops import rearrange, repeat
def pil_img_to_torch(pil_img, half=False):
image = np.array(pil_img).astype(np.float32) / 255.0
@virtuman
virtuman / guide.md
Created January 30, 2017 20:08 — forked from vothanhkiet/guide.md
HA-Proxy for Portainer

HA-Proxy configuration for Portainer

Here is a working configuration for HA-Proxy version 1.6.6 2016/06/26 to serve Portainer at portainer.127.0.0.1.xip.io :

global
    maxconn                     10000
    daemon
    ssl-server-verify           none
    tune.ssl.default-dh-param   2048