Froddan commited on
Commit
d9ef16e
1 Parent(s): eecb6ed

Update generate_model_grid.py

Browse files
Files changed (1) hide show
  1. generate_model_grid.py +2 -3
generate_model_grid.py CHANGED
@@ -10,8 +10,8 @@ import os
10
 
11
  import modules.scripts as scripts
12
  import gradio as gr
13
-
14
  from modules import images, sd_samplers
 
15
  from modules.hypernetworks import hypernetwork
16
  from modules.processing import process_images, Processed, StableDiffusionProcessingTxt2Img
17
  from modules.shared import opts, cmd_opts, state
@@ -241,8 +241,7 @@ class Script(scripts.Script):
241
 
242
  def ui(self, is_img2img):
243
  filenames = []
244
- dirpath = '/content/stable-diffusion-webui/models/Stable-diffusion/'
245
- for path in os.listdir(dirpath):
246
  if path.endswith('.ckpt'):
247
  filenames.append(path)
248
 
 
10
 
11
  import modules.scripts as scripts
12
  import gradio as gr
 
13
  from modules import images, sd_samplers
14
+ from modules.paths import models_path
15
  from modules.hypernetworks import hypernetwork
16
  from modules.processing import process_images, Processed, StableDiffusionProcessingTxt2Img
17
  from modules.shared import opts, cmd_opts, state
 
241
 
242
  def ui(self, is_img2img):
243
  filenames = []
244
+ for path in os.listdir(os.path.join(models_path, 'Stable-diffusion')):
 
245
  if path.endswith('.ckpt'):
246
  filenames.append(path)
247