zoanhy commited on
Commit
1bb819c
·
verified ·
1 Parent(s): 328470c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -20
app.py CHANGED
@@ -18,7 +18,7 @@ move_cache()
18
  DESCRIPTION = "# ControlNet"
19
 
20
  if not torch.cuda.is_available():
21
- DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
22
 
23
  model = Model(base_model_id=DEFAULT_MODEL_ID, task_name="depth")
24
 
@@ -35,25 +35,25 @@ with gr.Blocks(css="style.css") as demo:
35
  with gr.TabItem("Depth"):
36
  create_demo_depth(model.process_depth)
37
 
38
- with gr.Accordion(label="Base model", open=False):
39
- with gr.Row():
40
- with gr.Column(scale=5):
41
- current_base_model = gr.Text(label="Current base model")
42
- with gr.Column(scale=1):
43
- check_base_model_button = gr.Button("Check current base model")
44
- with gr.Row():
45
- with gr.Column(scale=5):
46
- new_base_model_id = gr.Text(
47
- label="New base model",
48
- max_lines=1,
49
- placeholder="runwayml/stable-diffusion-v1-5",
50
- info="The base model must be compatible with Stable Diffusion v1.5.",
51
- interactive=ALLOW_CHANGING_BASE_MODEL,
52
- )
53
- with gr.Column(scale=1):
54
- change_base_model_button = gr.Button(
55
- "Change base model", interactive=ALLOW_CHANGING_BASE_MODEL
56
- )
57
  if not ALLOW_CHANGING_BASE_MODEL:
58
  gr.Markdown(
59
  """The base model is not allowed to be changed in this Space so as not to slow down the demo, but it can be changed if you duplicate the Space."""
 
18
  DESCRIPTION = "# ControlNet"
19
 
20
  if not torch.cuda.is_available():
21
+ DESCRIPTION += "\n<p>Running on CPU</p>"
22
 
23
  model = Model(base_model_id=DEFAULT_MODEL_ID, task_name="depth")
24
 
 
35
  with gr.TabItem("Depth"):
36
  create_demo_depth(model.process_depth)
37
 
38
+ # with gr.Accordion(label="Base model", open=False):
39
+ # with gr.Row():
40
+ # with gr.Column(scale=5):
41
+ # current_base_model = gr.Text(label="Current base model")
42
+ # with gr.Column(scale=1):
43
+ # check_base_model_button = gr.Button("Check current base model")
44
+ # with gr.Row():
45
+ # with gr.Column(scale=5):
46
+ # new_base_model_id = gr.Text(
47
+ # label="New base model",
48
+ # max_lines=1,
49
+ # placeholder="runwayml/stable-diffusion-v1-5",
50
+ # info="The base model must be compatible with Stable Diffusion v1.5.",
51
+ # interactive=ALLOW_CHANGING_BASE_MODEL,
52
+ # )
53
+ # with gr.Column(scale=1):
54
+ # change_base_model_button = gr.Button(
55
+ # "Change base model", interactive=ALLOW_CHANGING_BASE_MODEL
56
+ # )
57
  if not ALLOW_CHANGING_BASE_MODEL:
58
  gr.Markdown(
59
  """The base model is not allowed to be changed in this Space so as not to slow down the demo, but it can be changed if you duplicate the Space."""