Skip to content

Commit 39bb60a

Browse files
feat(app): add the installed model config to install complete events
1 parent 82409d1 commit 39bb60a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

invokeai/app/services/events/events_common.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,11 +546,18 @@ class ModelInstallCompleteEvent(ModelEventBase):
546546
source: ModelSource = Field(description="Source of the model; local path, repo_id or url")
547547
key: str = Field(description="Model config record key")
548548
total_bytes: Optional[int] = Field(description="Size of the model (may be None for installation of a local path)")
549+
config: AnyModelConfig = Field(description="The installed model's config")
549550

550551
@classmethod
551552
def build(cls, job: "ModelInstallJob") -> "ModelInstallCompleteEvent":
552553
assert job.config_out is not None
553-
return cls(id=job.id, source=job.source, key=(job.config_out.key), total_bytes=job.total_bytes)
554+
return cls(
555+
id=job.id,
556+
source=job.source,
557+
key=(job.config_out.key),
558+
total_bytes=job.total_bytes,
559+
config=job.config_out,
560+
)
554561

555562

556563
@payload_schema.register

0 commit comments

Comments
 (0)