This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# stable diffusion tool | |
# @htoyryla github twitter instagram | |
# requires diffusers 0.3.0 and a trained model | |
# relies heavily on code from https://github.com/huggingface/diffusers | |
# neurokuvatreenit, stable diffusion, example 1b using LDM scheduler and 1c saving image at each iteration | |
# 1d: multiple subprompts with weights |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# stable diffusion tool | |
# @htoyryla github twitter instagram | |
# requires diffusers 0.4.0 and a trained model | |
# relies heavily on code from https://github.com/huggingface/diffusers | |
# neurokuvatreenit, stable diffusion, example 1b using LDM scheduler and 1c saving image at each iteration | |
# 1d: multiple subprompts with weights |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# stable diffusion tool | |
# @htoyryla github twitter instagram | |
# requires diffusers 0.3.0 and a trained model | |
# relies heavily on code from https://github.com/huggingface/diffusers | |
# for prompt weighting use prompts like "a subprompt like this:10 / in the style of that:25" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from torch import autocast | |
import torch | |
import requests | |
from PIL import Image | |
import sys | |
from diffusers import StableDiffusionImg2ImgPipeline #, preprocess | |
import random | |
import argparse | |
# image to image generation using StableDiffusion 0.3.0 dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from torch import autocast | |
import torch | |
import requests | |
from PIL import Image | |
import sys | |
from image_to_image import StableDiffusionImg2ImgPipeline, preprocess | |
import random | |
# script to generate 100 frames transition from init image towards the prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Usage: | |
# | |
# python vid2.py "prompt" video_in_path output_dir [strength scale seed] | |
# | |
# requires image_to_image.py from https://github.com/huggingface/diffusers/blob/main/examples/inference/image_to_image.py | |
# | |
from torch import autocast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# %% | |
# !! {"metadata":{ | |
# !! "id": "view-in-github", | |
# !! "colab_type": "text" | |
# !! }} | |
""" | |
<a href="https://colab.research.google.com/github/alembics/disco-diffusion/blob/main/Disco_Diffusion.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | |
""" | |
# %% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
Neural-mirage 5 | |
by @htoyryla 3/2016, 3/2017 | |
based on neural-style by @jcjohnson | |
for more info see | |
http://liipetti.net/erratic/2016/03/31/i-have-seen-a-neural-mirage/ | |
http://liipetti.net/erratic/2016/04/20/getting-the-space-back/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- this program takes an original image, such as a photo, | |
-- and a generated image, such as generated by jcjohnson/fast-neural-style | |
-- and copies the original colors to the generated image | |
-- like when using the original_colors param in jcjohnson/neural-style | |
-- | |
-- by hannu töyrylä @htoyryla 30 oct 2016 | |
-- | |
require 'torch' | |
require 'image' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
code for a gan trainer | |
adding an encoder to assist in generator training | |
htoyryla 8 Jun 2018 | |
support for progressive training with larger image size | |
htoyryla 11.6.2018 | |
NewerOlder