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
import subprocess as sp | |
import whisper | |
#replace this with the path to the video. | |
sourcefile = r'Z:\completeTorrents\Ai Uehara MEGAPACK\SHKD525.FHD\SHKD525.FHD.wmv' | |
start_time_minutes = 0.0 | |
model = whisper.load_model("small") | |
slice_size = 30 |
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
import torch | |
import modules.scripts as scripts | |
import gradio as gr | |
from modules.script_callbacks import on_cfg_denoiser | |
from modules import processing | |
class Script(scripts.Script): | |
def title(self): |
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
import cv2 | |
import os | |
import numpy as np | |
import sys | |
print(""" | |
Pass a folder of images as a prameter: | |
script.py Z:\\somefolder\\somewhere |
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
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); |
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
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 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 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 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 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 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 |
NewerOlder