-
-
Save Gourieff/a2aabc8a992e24a5dd2875deee49c715 to your computer and use it in GitHub Desktop.
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 math | |
import os | |
import sys | |
import traceback | |
from typing import List | |
import modules.scripts as scripts | |
import gradio as gr | |
from modules.processing import Processed, process_images | |
class Script(scripts.Script): | |
def title(self): | |
return "Run n times" | |
def ui(self, is_img2img): | |
n = gr.Textbox(label="n") | |
return [n] | |
def run(self, p, n): | |
images: List = [] | |
for x in range(int(n)): | |
p.seed = -1 | |
proc = process_images(p) | |
image = proc.images | |
images.append(image[0]) | |
return Processed(p, images, p.seed, proc.info) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since rev.6 shows previews of all generated images