From 5a1b62e9f8048e20a9ff47df73b16f8a0b5e673c Mon Sep 17 00:00:00 2001 From: techneconn Date: Sun, 5 Feb 2023 15:48:51 +0900 Subject: Add prompt_hash option for file/dir name pattern --- modules/images.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/images.py') diff --git a/modules/images.py b/modules/images.py index 4bdbd730..f4b20b28 100644 --- a/modules/images.py +++ b/modules/images.py @@ -16,6 +16,7 @@ from PIL import Image, ImageFont, ImageDraw, PngImagePlugin from fonts.ttf import Roboto import string import json +import hashlib from modules import sd_samplers, shared, script_callbacks from modules.shared import opts, cmd_opts @@ -343,6 +344,7 @@ class FilenameGenerator: 'date': lambda self: datetime.datetime.now().strftime('%Y-%m-%d'), 'datetime': lambda self, *args: self.datetime(*args), # accepts formats: [datetime], [datetime], [datetime