| 15 | return True |
| 16 | |
| 17 | def ui(self, _is_img2img): |
| 18 | with gr.Row(): |
| 19 | gr.HTML("<span>  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) |