mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-07 23:53:40 +00:00
Revert "Safer usage of mkdir across the project"
This reverts commit 0d1597616f.
This commit is contained in:
parent
0d1597616f
commit
aa44e542cb
16 changed files with 206 additions and 240 deletions
|
|
@ -168,8 +168,7 @@ def get_SD_pictures(description, character):
|
|||
|
||||
variadic = f'{date.today().strftime("%Y_%m_%d")}/{character}_{int(time.time())}'
|
||||
output_file = Path(f'extensions/sd_api_pictures/outputs/{variadic}.png')
|
||||
if not output_file.parent.exists():
|
||||
output_file.parent.mkdir(parents=True, exist_ok=True)
|
||||
output_file.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
with open(output_file.as_posix(), 'wb') as f:
|
||||
f.write(img_data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue