Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -94,6 +94,8 @@ def process_generate(fore, prompt, image_width, image_height, intensity, mode, r
|
|
| 94 |
|
| 95 |
return image
|
| 96 |
|
|
|
|
|
|
|
| 97 |
|
| 98 |
class Stage(Enum):
|
| 99 |
FIRST_STAGE = "first-stage"
|
|
@@ -145,12 +147,16 @@ with block:
|
|
| 145 |
mode = gr.Radio(choices=[e.value for e in Stage],
|
| 146 |
value=Stage.FULL.value,
|
| 147 |
label="Generation Mode", type='value')
|
|
|
|
| 148 |
with gr.Column():
|
| 149 |
image_width = gr.Slider(label="Image Width", minimum=256, maximum=1500, value=1024, step=64)
|
| 150 |
image_height = gr.Slider(label="Image Height", minimum=256, maximum=1500, value=1024, step=64)
|
|
|
|
|
|
|
| 151 |
|
| 152 |
with gr.Row():
|
| 153 |
intensity = gr.Slider(label="Refiner Strength", minimum=1.0, maximum=7.0, value=3.0, step=0.1)
|
|
|
|
| 154 |
generate_button = gr.Button(value="Generate")
|
| 155 |
|
| 156 |
|
|
|
|
| 94 |
|
| 95 |
return image
|
| 96 |
|
| 97 |
+
def update_value(val):
|
| 98 |
+
return val
|
| 99 |
|
| 100 |
class Stage(Enum):
|
| 101 |
FIRST_STAGE = "first-stage"
|
|
|
|
| 147 |
mode = gr.Radio(choices=[e.value for e in Stage],
|
| 148 |
value=Stage.FULL.value,
|
| 149 |
label="Generation Mode", type='value')
|
| 150 |
+
mode.change(fn=update_value, inputs=mode, outputs=mode)
|
| 151 |
with gr.Column():
|
| 152 |
image_width = gr.Slider(label="Image Width", minimum=256, maximum=1500, value=1024, step=64)
|
| 153 |
image_height = gr.Slider(label="Image Height", minimum=256, maximum=1500, value=1024, step=64)
|
| 154 |
+
image_width.change(fn=update_value, inputs=image_width, outputs=image_width)
|
| 155 |
+
image_height.change(fn=update_value, inputs=image_height, outputs=image_height)
|
| 156 |
|
| 157 |
with gr.Row():
|
| 158 |
intensity = gr.Slider(label="Refiner Strength", minimum=1.0, maximum=7.0, value=3.0, step=0.1)
|
| 159 |
+
intensity.change(fn=update_value, inputs=intensity, outputs=intensity)
|
| 160 |
generate_button = gr.Button(value="Generate")
|
| 161 |
|
| 162 |
|