Update main.py

fix for too long filenames
This commit is contained in:
AIrjen
2024-02-12 21:02:49 +01:00
parent 4e3e9416ce
commit 9bac523a37
+1 -1
View File
@@ -160,7 +160,7 @@ def generateimages(amount = 1, size = "all",model = "currently selected model",s
# extract the desired substring using slicing
filename = randomprompt[start_index:end_index]
else:
filename = randomsubject
filename = randomsubject[0:128] # Fix for too long filenames
# cleanup some unsafe things in the filename
filename = filename.replace("\"", "")