zhiweili commited on
Commit
a7890ea
1 Parent(s): df86983

change app

Browse files
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import gradio as gr
2
 
3
- from app_jugger import create_demo as create_demo_haircolor
4
 
5
  with gr.Blocks(css="style.css") as demo:
6
  with gr.Tabs():
 
1
  import gradio as gr
2
 
3
+ from app_haircolor_inpaint import create_demo as create_demo_haircolor
4
 
5
  with gr.Blocks(css="style.css") as demo:
6
  with gr.Tabs():
app_haircolor_inpainting.py → app_haircolor_inpaint.py RENAMED
@@ -19,7 +19,7 @@ from controlnet_aux import (
19
  CannyDetector,
20
  )
21
 
22
- BASE_MODEL = "stabilityai/stable-diffusion-xl-base-1.0"
23
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
24
 
25
  DEFAULT_EDIT_PROMPT = "a woman, blue hair, high detailed"
@@ -119,11 +119,11 @@ def create_demo() -> gr.Blocks:
119
  with gr.Row():
120
  with gr.Column():
121
  edit_prompt = gr.Textbox(lines=1, label="Edit Prompt", value=DEFAULT_EDIT_PROMPT)
122
- generate_size = gr.Number(label="Generate Size", value=1024)
123
  seed = gr.Number(label="Seed", value=8)
124
  category = gr.Textbox(label="Category", value=DEFAULT_CATEGORY, visible=False)
125
  with gr.Column():
126
- num_steps = gr.Slider(minimum=1, maximum=100, value=30, step=1, label="Num Steps")
127
  guidance_scale = gr.Slider(minimum=0, maximum=30, value=5, step=0.5, label="Guidance Scale")
128
  mask_expansion = gr.Number(label="Mask Expansion", value=50, visible=True)
129
  with gr.Column():
 
19
  CannyDetector,
20
  )
21
 
22
+ BASE_MODEL = "SG161222/RealVisXL_V5.0_Lightning"
23
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
24
 
25
  DEFAULT_EDIT_PROMPT = "a woman, blue hair, high detailed"
 
119
  with gr.Row():
120
  with gr.Column():
121
  edit_prompt = gr.Textbox(lines=1, label="Edit Prompt", value=DEFAULT_EDIT_PROMPT)
122
+ generate_size = gr.Number(label="Generate Size", value=512)
123
  seed = gr.Number(label="Seed", value=8)
124
  category = gr.Textbox(label="Category", value=DEFAULT_CATEGORY, visible=False)
125
  with gr.Column():
126
+ num_steps = gr.Slider(minimum=1, maximum=100, value=15, step=1, label="Num Steps")
127
  guidance_scale = gr.Slider(minimum=0, maximum=30, value=5, step=0.5, label="Guidance Scale")
128
  mask_expansion = gr.Number(label="Mask Expansion", value=50, visible=True)
129
  with gr.Column():