Skip to content

Commit

Permalink
Create stable-diffusion-v1 folder if it does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
carson-katri committed Oct 6, 2022
1 parent 80062ef commit 24a4c8c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ class OpenWeightsDirectory(bpy.types.Operator, ImportHelper):

def execute(self, context):
path = os.path.dirname(WEIGHTS_PATH)
# if not os.path.exists(path):
# os.mkdir(path)
# webbrowser.open(f"file:///{os.path.realpath(path)}")
if not os.path.exists(path):
os.mkdir(path)
_, extension = os.path.splitext(self.filepath)
if extension != '.ckpt':
self.report({"ERROR"}, "Select a valid stable diffusion '.ckpt' file.")
Expand Down

0 comments on commit 24a4c8c

Please sign in to comment.