From d2b39006473511d022c1e5a1ef407d6faa518cfb Mon Sep 17 00:00:00 2001 From: ZeroCool940711 Date: Wed, 14 Sep 2022 02:52:02 -0700 Subject: [PATCH] Fixed some imports. --- scripts/txt2vid.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/scripts/txt2vid.py b/scripts/txt2vid.py index ba37cf2..43250d5 100644 --- a/scripts/txt2vid.py +++ b/scripts/txt2vid.py @@ -1,21 +1,32 @@ +# base webui import and utils. from webui_streamlit import st from sd_utils import * +# streamlit imports from streamlit import StopException +from streamlit.runtime.in_memory_file_manager import in_memory_file_manager +from streamlit.elements import image as STImage + +#other imports import os from PIL import Image import torch import numpy as np -import time +import time, inspect, timeit import torch from torch import autocast from io import BytesIO -# we use python-slugify to make the filenames safe for windows and linux, its better than doing it manually -# install it with 'pip install python-slugify' from slugify import slugify -from streamlit.runtime.in_memory_file_manager import in_memory_file_manager -from streamlit.elements import image as STImage + +# Temp imports + +# these are for testing txt2vid, should be removed and we should use things from our own code. +from diffusers import StableDiffusionPipeline +from diffusers.schedulers import DDIMScheduler, LMSDiscreteScheduler, PNDMScheduler + +# end of imports +#--------------------------------------------------------------------------------------------------------------- try: # this silences the annoying "Some weights of the model checkpoint were not used when initializing..." message at start.