stefanbenten commited on
Commit
a46366a
1 Parent(s): d4afe7e

app.py: use model list endpoint

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -33,7 +33,7 @@ class Prodia:
33
  return job_result
34
 
35
  def list_models(self):
36
- response = self._get(f"{self.base}/models/list")
37
  return response.json()
38
 
39
  def _post(self, url, params):
@@ -101,11 +101,7 @@ with gr.Blocks(css=css) as demo:
101
 
102
  with gr.Row():
103
  with gr.Column(scale=6):
104
- model = gr.Dropdown(interactive=True,value="sd_xl_base_1.0.safetensors [be9edd61]", show_label=True, label="Stable Diffusion Checkpoint", choices=[
105
- "sd_xl_base_1.0.safetensors [be9edd61]",
106
- "dynavisionXL_0411.safetensors [c39cc051]",
107
- "dreamshaperXL10_alpha2.safetensors [c8afe2ef]",
108
- ])
109
 
110
  with gr.Column(scale=1):
111
  gr.Markdown(elem_id="powered-by-prodia", value="AUTOMATIC1111 Stable Diffusion Web UI for SDXL V1.0.<br>Powered by [Prodia](https://prodia.com).")
 
33
  return job_result
34
 
35
  def list_models(self):
36
+ response = self._get(f"{self.base}/sdxl/models")
37
  return response.json()
38
 
39
  def _post(self, url, params):
 
101
 
102
  with gr.Row():
103
  with gr.Column(scale=6):
104
+ model = gr.Dropdown(interactive=True,value="sd_xl_base_1.0.safetensors [be9edd61]", show_label=True, label="Stable Diffusion Checkpoint", choices=prodia_client.list_models())
 
 
 
 
105
 
106
  with gr.Column(scale=1):
107
  gr.Markdown(elem_id="powered-by-prodia", value="AUTOMATIC1111 Stable Diffusion Web UI for SDXL V1.0.<br>Powered by [Prodia](https://prodia.com).")