mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-04 19:22:32 +00:00
Changed job_id to timestamp
This commit is contained in:
@@ -4,7 +4,7 @@ import json
|
||||
import os
|
||||
import gradio as gr
|
||||
import tqdm
|
||||
import random
|
||||
import datetime
|
||||
|
||||
import modules.artists
|
||||
from modules.paths import script_path, sd_path
|
||||
@@ -66,7 +66,7 @@ class State:
|
||||
job = ""
|
||||
job_no = 0
|
||||
job_count = 0
|
||||
job_id = 0
|
||||
job_timestamp = 0
|
||||
sampling_step = 0
|
||||
sampling_steps = 0
|
||||
current_latent = None
|
||||
@@ -80,8 +80,8 @@ class State:
|
||||
self.job_no += 1
|
||||
self.sampling_step = 0
|
||||
self.current_image_sampling_step = 0
|
||||
def gen_job_id(self):
|
||||
return ''.join(random.choices('0123456789abcdefghijklmnopqrstuvwxyz', k=opts.job_id_length))
|
||||
def get_job_timestamp(self):
|
||||
return datetime.datetime.now().strftime("%Y%m%d%H%M%S")
|
||||
|
||||
|
||||
state = State()
|
||||
@@ -160,7 +160,6 @@ options_templates.update(options_section(('saving-to-dirs', "Saving to a directo
|
||||
"grid_save_to_dirs": OptionInfo(False, "Save grids to subdirectory"),
|
||||
"directories_filename_pattern": OptionInfo("", "Directory name pattern"),
|
||||
"directories_max_prompt_words": OptionInfo(8, "Max prompt words", gr.Slider, {"minimum": 1, "maximum": 20, "step": 1}),
|
||||
"job_id_length": OptionInfo(5, "Length of job id", gr.Slider, {"minimum": 5, "maximum": 20, "step": 1}),
|
||||
}))
|
||||
|
||||
options_templates.update(options_section(('upscaling', "Upscaling"), {
|
||||
|
Reference in New Issue
Block a user