mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
1.0.16 (#19)
### 1.0.16 * Implemented "output" folder for saving user results. * Ignored cv2 errors when preview fails. * Mentioned future AMD support in Readme. * Created this log.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import datetime
|
||||
import random
|
||||
import os
|
||||
|
||||
|
||||
def generate_temp_filename(folder='./outputs/', extension='png'):
|
||||
current_time = datetime.datetime.now()
|
||||
date_string = current_time.strftime("%Y-%m-%d")
|
||||
time_string = current_time.strftime("%Y-%m-%d_%H-%M-%S")
|
||||
random_number = random.randint(1000, 9999)
|
||||
filename = f"{time_string}_{random_number}.{extension}"
|
||||
result = os.path.join(folder, date_string, filename)
|
||||
return os.path.abspath(os.path.realpath(result))
|
||||
Reference in New Issue
Block a user