Skip to content

Instantly share code, notes, and snippets.

View behelit2's full-sized avatar

Matthew Taraschke behelit2

View GitHub Profile
@behelit2
behelit2 / deepfloyd-IF_K80_12gb_gpu1.py
Last active July 29, 2023 21:40
A Python 3 and Shell Script solution for running DeepFloyd IF on the Nvidia Tesla K80
from diffusers import DiffusionPipeline
from diffusers.utils import pt_to_pil
import torch, sys, random, gc
# A function to free up memory.
def flush():
gc.collect()
torch.cuda.empty_cache()
# Pass image prompts from the command line in quotes "".