sd-webui-controlnet icon indicating copy to clipboard operation
sd-webui-controlnet copied to clipboard

[Bug]: Please implement elem_id and pnginfo for Advanced Weight Control

Open marcsyp opened this issue 1 year ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits of both this extension and the webui

What happened?

I have a pretty extensive ConfigPresets ecosystem and I love the new weight controls, but unfortunately the weight types and weights are not saved in images and neither do they have elem_ids for storing the metadata in ConfigPresets. I tried for a minute or two to add it in a local branch but did not find an obvious way to access the elem_id_tabname and tabname properties in the AdvancedWeightControl class, as they are not in a render context.

Can you implement elem_ids for the advanced weight control components, including weight type, weight composition (although this appears to be hidden), and weights editor? If I have those element ids, I can store even custom edits to the weights editor, which would be great.

Thanks,

Steps to reproduce the problem

1 observe pnginfo metadata, no advanced weight control info, and use your browser to inspect elements, there are no elem_ids. Easily confirmed in the codebase.

What should have happened?

At the very least the weight type and array of weights should be stored in the pnginfo, and the elements should have ids.

Commit where the problem happens

webui: 1.9.4 controlnet: 1.1.149

What browsers do you use to access the UI ?

No response

Command Line Arguments

N/A

List of enabled extensions

N/A

Console logs

N/A

Additional information

No response

marcsyp avatar Jun 19 '24 21:06 marcsyp

BUMP -- it is still very painful to recall custom advanced weighting without elem_ids and config presets. Any thoughts?? @Mikubill ?

marcsyp avatar Jul 01 '24 18:07 marcsyp

https://github.com/Mikubill/sd-webui-controlnet/blob/8bbbd0e55ef6e5d71b09c2de2727b36e7bc825b0/scripts/controlnet_ui/controlnet_ui_group.py#L286

image You can move creation of AdvanceWeightControl instance to ControlNetUiGroup.render, which gives you access to tabname and elem_id_tabname

huchenlei avatar Jul 01 '24 20:07 huchenlei