mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-02-09 17:39:59 +00:00
Update gradio_compile.py
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
|
||||
def gradio_compile(items, prefix):
|
||||
for k, v in items["required"].items():
|
||||
a = 0
|
||||
if len(v) == 2:
|
||||
t, d = v
|
||||
if t == 'INT':
|
||||
name = prefix + '_' + k
|
||||
default = int(d['default'])
|
||||
min = int(d['min'])
|
||||
max = int(d['max'])
|
||||
step = int(d.get('step', 1))
|
||||
print(f'{name} = gr.Slider(label=\'{name}\', minimum={min}, maximum={max}, step={step}, value={default})')
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user