mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
@@ -588,6 +588,7 @@ def control_run(state: str = '', # pylint: disable=keyword-arg-before-vararg
|
||||
if sd_models.get_diffusers_task(pipe) != sd_models.DiffusersTaskType.TEXT_2_IMAGE: # force vae back to gpu if not in txt2img mode
|
||||
sd_models.move_model(pipe.vae, devices.device)
|
||||
|
||||
# init scripts
|
||||
p.scripts = scripts_manager.scripts_control
|
||||
p.script_args = input_script_args or []
|
||||
if len(p.script_args) == 0:
|
||||
@@ -596,7 +597,7 @@ def control_run(state: str = '', # pylint: disable=keyword-arg-before-vararg
|
||||
p.script_args = script.init_default_script_args(p.scripts)
|
||||
|
||||
# init override scripts
|
||||
if override_script_name and override_script_args:
|
||||
if override_script_name and override_script_args and len(override_script_name) > 0:
|
||||
selectable_scripts, selectable_script_idx = script.get_selectable_script(override_script_name, p.scripts)
|
||||
if selectable_scripts:
|
||||
for idx in range(len(override_script_args)):
|
||||
|
||||
@@ -173,6 +173,8 @@ def create_ui(_blocks: gr.Blocks=None):
|
||||
detailer_enabled, detailer_prompt, detailer_negative, detailer_steps, detailer_strength, detailer_resolution = shared.yolo.ui('control')
|
||||
|
||||
with gr.Row():
|
||||
override_script_name = gr.State(value='', visible=False, elem_id='control_override_script_name')
|
||||
override_script_args = gr.State(value='', visible=False, elem_id='control_override_script_args')
|
||||
override_settings = ui_common.create_override_inputs('control')
|
||||
|
||||
with gr.Row(variant='compact', elem_id="control_extra_networks", elem_classes=["extra_networks_root"], visible=False) as extra_networks_ui:
|
||||
@@ -288,7 +290,7 @@ def create_ui(_blocks: gr.Blocks=None):
|
||||
enable_hr, hr_sampler_index, hr_denoising_strength, hr_resize_mode, hr_resize_context, hr_upscaler, hr_force, hr_second_pass_steps, hr_scale, hr_resize_x, hr_resize_y, refiner_steps,
|
||||
refiner_start, refiner_prompt, refiner_negative,
|
||||
video_skip_frames, video_type, video_duration, video_loop, video_pad, video_interpolate,
|
||||
override_settings,
|
||||
override_script_name, override_script_args, override_settings,
|
||||
]
|
||||
output_fields = [
|
||||
preview_process,
|
||||
|
||||
Reference in New Issue
Block a user