sd-dynamic-prompts icon indicating copy to clipboard operation
sd-dynamic-prompts copied to clipboard

Disable callbacks when extension is disabled

Open adieyal opened this issue 2 years ago • 3 comments

Ensure that callbacks (apart from settings and wildcards manager), only run when dynamic prompts is enabled. This builds on https://github.com/adieyal/sd-dynamic-prompts/pull/648

adieyal avatar Nov 05 '23 21:11 adieyal

and keep the module name the same? script_protocol? or change it to sddp_script?

adieyal avatar Nov 06 '23 07:11 adieyal

Now that I think of it, I'm not sure the protocol is actually required at all – couldn't we just use the actual script object as a type (guarded against circular imports)?

if TYPE_CHECKING:
    from dynamic_prompts.dynamic_prompting import Script as SDDPScript

akx avatar Nov 06 '23 08:11 akx

Now that I think of it, I'm not sure the protocol is actually required at all – couldn't we just use the actual script object as a type (guarded against circular imports)?

if TYPE_CHECKING:
    from dynamic_prompts.dynamic_prompting import Script as SDDPScript

Happy to do that too. I'll make the change.

adieyal avatar Nov 06 '23 08:11 adieyal