Skip to content

Instantly share code, notes, and snippets.

@AkiSakurai
AkiSakurai / find_noise.py
Created December 9, 2022 10:32 — forked from trygvebw/find_noise.py
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
@AkiSakurai
AkiSakurai / gist:4cf65324cfa570b205e29a10858f8be0
Last active October 19, 2022 10:39
Blank vt on nvidia gpu
https://github.com/NVIDIA/open-gpu-kernel-modules/issues/341
https://github.com/NVIDIA/open-gpu-kernel-modules/issues/228
https://bugzilla.kernel.org/show_bug.cgi?id=216303
https://bugzilla.kernel.org/show_bug.cgi?id=216331
https://bbs.archlinux.org/viewtopic.php?id=279971
https://bbs.archlinux.org/viewtopic.php?id=278519
https://fedoraproject.org/wiki/Changes/ReplaceFbdevDrivers

This is an excerpt from our internal documentation describing an issue with drawing in NSViews on macOS Big Sur.

1️⃣ Introduction

In macOS Big Sur (probably starting with β9), Apple changed the default contents format for backing layers of NSViews. Instead of an explicit CALayerContentsFormat.RGBA8Uint value, an „Automatic“ value is now used. Even though it also resolves into „RGBA8“ in our testing, it has some serious implications as it breaks assumptions our code relies on.

I first stumbled upon this issue in this tweet by Frank. It links to a thread on Apple Forums by Mark that contains valuable information as well as ideas for workarounds. The changed behavior was also confirmed by Marcin in this tweet.

2️⃣ Impact on Diagrams