From 62c456a1e4e4f7791005e1f122e5404516e04a96 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 18 Sep 2025 19:52:49 +1000 Subject: [PATCH] feat(app): add the installed model config to install complete events --- invokeai/app/services/events/events_common.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/invokeai/app/services/events/events_common.py b/invokeai/app/services/events/events_common.py index add19d459e..8fbb08015a 100644 --- a/invokeai/app/services/events/events_common.py +++ b/invokeai/app/services/events/events_common.py @@ -546,11 +546,18 @@ class ModelInstallCompleteEvent(ModelEventBase): source: ModelSource = Field(description="Source of the model; local path, repo_id or url") key: str = Field(description="Model config record key") total_bytes: Optional[int] = Field(description="Size of the model (may be None for installation of a local path)") + config: AnyModelConfig = Field(description="The installed model's config") @classmethod def build(cls, job: "ModelInstallJob") -> "ModelInstallCompleteEvent": assert job.config_out is not None - return cls(id=job.id, source=job.source, key=(job.config_out.key), total_bytes=job.total_bytes) + return cls( + id=job.id, + source=job.source, + key=(job.config_out.key), + total_bytes=job.total_bytes, + config=job.config_out, + ) @payload_schema.register