Enhance sdnext_emit_status method to update model choices based on active handlers, improving backend responsiveness during processing.

This commit is contained in:
vegu-ai-tools
2025-11-29 21:16:04 +02:00
parent 91a7df67b1
commit 8cbecc67f2

View File

@@ -466,7 +466,17 @@ class SDNextMixin:
]
async def sdnext_emit_status(self, processing: bool = None):
# No-op: model choices are updated when vital configuration changes
for handler in self.sdnext_handlers:
if not handler:
continue
if handler.backend and handler.backend.models:
await self.sdnext_update_model_choices(
"sdnext_image_create"
if handler.backend.gen_type == GEN_TYPE.TEXT_TO_IMAGE
else "sdnext_image_edit",
backend=handler.backend,
)
return
def _get_auth_from_config(