mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
inspiration perfected
This commit is contained in:
parent
40ddb6df61
commit
d93ea5cdeb
@ -73,8 +73,11 @@ def get_inspiration_images(source, types, keyword):
|
||||
image_list = []
|
||||
for a in names:
|
||||
image_path = os.path.join(opts.inspiration_dir, a)
|
||||
images = os.listdir(image_path)
|
||||
image_list.append((os.path.join(image_path, random.choice(images)), a))
|
||||
images = os.listdir(image_path)
|
||||
if len(images) > 0:
|
||||
image_list.append((os.path.join(image_path, random.choice(images)), a))
|
||||
else:
|
||||
print(image_path)
|
||||
return image_list, names
|
||||
|
||||
def select_click(index, name_list):
|
||||
|
Loading…
Reference in New Issue
Block a user