mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-03-10 23:49:48 +00:00
i
This commit is contained in:
@@ -39,6 +39,20 @@ def compute_cond_mark(cond_or_uncond, sigmas):
|
||||
return cond_mark
|
||||
|
||||
|
||||
def compute_cond_indices(cond_or_uncond, sigmas):
|
||||
cl = int(sigmas.shape[0])
|
||||
|
||||
cond_indices = []
|
||||
uncond_indices = []
|
||||
for i, cx in enumerate(cond_or_uncond):
|
||||
if cx == 0:
|
||||
cond_indices += list(range(i * cl, (i + 1) * cl))
|
||||
else:
|
||||
uncond_indices += list(range(i * cl, (i + 1) * cl))
|
||||
|
||||
return cond_indices, uncond_indices
|
||||
|
||||
|
||||
def generate_random_filename(extension=".txt"):
|
||||
timestamp = time.strftime("%Y%m%d-%H%M%S")
|
||||
random_string = ''.join(random.choices(string.ascii_lowercase + string.digits, k=5))
|
||||
|
||||
Reference in New Issue
Block a user