lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
8.55k stars 838 forks source link

Add source_text_component to Results paste buttons #2349

Closed wcole3 closed 1 day ago

wcole3 commented 2 days ago

Adds a source_text_component to the Results panel paste buttons' ParamBinding so that the callable fields are correctly pasted.

This allows sampling method, schedule type, styles, etc (all fields that are defined mostly as lambdas) to be correctly set when pasting.

There might be a gotcha; the default config value for send_seed is True, but prior to this fix, the seed was not getting sent regardless of the value. With the fix, people would need to change the send_seed value to maintain their current workflow.

DenOfEquity commented 1 day ago

Definitely a good improvement! Suggested changes for line 265, minimal difference in practice but seems more correct: res.infotext_plaintext = gr.HTML(visible=False, elem_id=f'infotext_plaintext_{tabname}', elem_classes="infotext")

An inconsistency in the original, that seems safe to correct at the same time:

wcole3 commented 1 day ago

Good catch, Should be consistent now.