This file contains hidden or 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 utils import get_image_paths, load_images, stack_images | |
| from training_data import get_training_data | |
| import random | |
| import numpy | |
| import cv2 | |
| from keras.models import Model | |
| from keras.layers import Input, Dense, Flatten, Reshape, concatenate, Add, add, Dropout |
This file contains hidden or 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
| import numpy | |
| import argparse | |
| import os | |
| import json | |
| from tqdm import tqdm | |
| import cv2 | |
| def main(args): | |
| if not os.path.exists(args.input_dir_a[0]): | |
| raise Exception("Folder A {} does not exist".format(args.input_dir_a[0])) |
This file contains hidden or 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
| import os | |
| import glob | |
| import subprocess as sp | |
| import itertools | |
| import sys | |
| """ |
This file contains hidden or 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
| import sys | |
| import os | |
| import mimetypes | |
| import random | |
| import mpv | |
| import cv2 | |
| import numpy as np | |
| import subprocess as sp |
This file contains hidden or 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
| import sys | |
| import os | |
| import mimetypes | |
| import random | |
| import mpv | |
| import cv2 | |
| import numpy as np | |
| import subprocess as sp |
This file contains hidden or 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
| import csv | |
| csvname = 'frames\\coords.csv' | |
| data = [] | |
| with open(csvname,'r', newline='') as csvfile: | |
| reader = csv.DictReader(csvfile) | |
| for row in reader: | |
| data.append( row ) |
This file contains hidden or 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
| import cv2 | |
| import sys | |
| import os | |
| import subprocess as sp | |
| import numpy as np | |
| import time | |
| baseFolder = os.path.split(__file__)[0] |
This file contains hidden or 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
| import numpy as np | |
| import torch | |
| def lerp(theta0, theta1, alpha): | |
| return (1 - alpha) * theta0 + alpha * theta1 | |
| def slerp(theta0, theta1, alpha): | |
| theta0 = theta0 | |
| theta1 = theta1 | |
| # Copy the vectors to reuse them later |
This file contains hidden or 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
| import inspect | |
| from modules.processing import Processed, process_images | |
| import gradio as gr | |
| import modules.scripts as scripts | |
| import k_diffusion.sampling | |
| import torch | |
| class Script(scripts.Script): |
This file contains hidden or 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
| onUiUpdate(function(){ | |
| gradioApp().querySelectorAll('button img').forEach(function(e){ | |
| if(!e.classList.contains('downsized')){ | |
| if(e.naturalHeight != e.clientHeight || e.naturalWidth != e.clientWidth){ | |
| var canvas = document.createElement("canvas"); | |
| var ar = e.naturalHeight/e.naturalWidth | |
| canvas.width = e.clientWidth; | |
| canvas.height = e.clientHeight*ar; | |
| var ctx = canvas.getContext("2d"); | |
| ctx.drawImage(e, 0, 0, e.clientWidth, e.clientHeight*ar); |
OlderNewer