cleanup the img2img alt file a bit

This commit is contained in:
Alex "mcmonkey" Goodwin 2023-03-20 15:43:01 -07:00
parent 05ec128ca9
commit c9c692c4d9
1 changed files with 2 additions and 10 deletions

View File

@ -6,18 +6,11 @@ from tqdm import trange
import modules.scripts as scripts import modules.scripts as scripts
import gradio as gr import gradio as gr
from modules import processing, shared, sd_samplers, prompt_parser, sd_samplers_common from modules import processing, shared, sd_samplers, sd_samplers_common
from modules.processing import Processed
from modules.shared import opts, cmd_opts, state
import torch import torch
import k_diffusion as K import k_diffusion as K
from PIL import Image
from torch import autocast
from einops import rearrange, repeat
def find_noise_for_image(p, cond, uncond, cfg_scale, steps): def find_noise_for_image(p, cond, uncond, cfg_scale, steps):
x = p.init_latent x = p.init_latent
@ -135,7 +128,7 @@ class Script(scripts.Script):
def show(self, is_img2img): def show(self, is_img2img):
return is_img2img return is_img2img
def ui(self, is_img2img): def ui(self, is_img2img):
info = gr.Markdown(''' info = gr.Markdown('''
* `CFG Scale` should be 2 or lower. * `CFG Scale` should be 2 or lower.
''') ''')
@ -223,4 +216,3 @@ class Script(scripts.Script):
processed = processing.process_images(p) processed = processing.process_images(p)
return processed return processed