mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-02-10 09:59:57 +00:00
Update gradio_compile.py
This commit is contained in:
@@ -5,9 +5,10 @@ def gradio_compile(items, prefix):
|
||||
t, d = v
|
||||
if t == 'INT':
|
||||
name = (prefix + '_' + k).replace(' ', '_').lower()
|
||||
title = name.replace('_', ' ').capitalize()
|
||||
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})')
|
||||
print(f'{name} = gr.Slider(label=\'{title}\', minimum={min}, maximum={max}, step={step}, value={default})')
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user