MCPcopy Create free account
hub / github.com/vladmandic/sdnext / ui

Method ui

scripts/loopback.py:17–28  ·  view source on GitHub ↗
(self, _is_img2img)

Source from the content-addressed store, hash-verified

15 return True
16
17 def ui(self, _is_img2img):
18 with gr.Row():
19 gr.HTML("<span>&nbsp Loopback</span><br>")
20 with gr.Row():
21 loops = gr.Slider(minimum=1, maximum=32, step=1, label='Loops', value=2, elem_id=self.elem_id("loops"))
22 final_denoising_strength = gr.Slider(minimum=0, maximum=1, step=0.01, label='Final strength', value=0.5, elem_id=self.elem_id("final_denoising_strength"))
23 with gr.Row():
24 denoising_curve = gr.Dropdown(label="Strength curve", choices=["Aggressive", "Linear", "Lazy"], value="Linear")
25 with gr.Row():
26 randomize_seed = gr.Checkbox(label="Randomize seed after each loop iteration", value=False)
27
28 return [loops, final_denoising_strength, denoising_curve, randomize_seed]
29
30 def run(self, p, loops, final_denoising_strength, denoising_curve, randomize_seed): # pylint: disable=arguments-differ
31 processing.fix_seed(p)

Callers

nothing calls this directly

Calls 1

elem_idMethod · 0.80

Tested by

no test coverage detected