mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
nodes: fix typing of GraphExecutionState.id
This commit is contained in:
parent
7fc5fbd4ce
commit
cbd1a7263a
@ -2,7 +2,6 @@
|
||||
|
||||
import copy
|
||||
import itertools
|
||||
import traceback
|
||||
import uuid
|
||||
from types import NoneType
|
||||
from typing import (
|
||||
@ -751,7 +750,7 @@ class GraphExecutionState(BaseModel):
|
||||
"""Tracks the state of a graph execution"""
|
||||
|
||||
id: str = Field(
|
||||
description="The id of the execution state", default_factory=uuid.uuid4
|
||||
description="The id of the execution state", default_factory=lambda: uuid.uuid4().__str__()
|
||||
)
|
||||
|
||||
# TODO: Store a reference to the graph instead of the actual graph?
|
||||
@ -1171,7 +1170,7 @@ class LibraryGraph(BaseModel):
|
||||
if len(v) != len(set(i.alias for i in v)):
|
||||
raise ValueError("Duplicate exposed alias")
|
||||
return v
|
||||
|
||||
|
||||
@root_validator
|
||||
def validate_exposed_nodes(cls, values):
|
||||
graph = values['graph']
|
||||
|
@ -2,12 +2,14 @@
|
||||
|
||||
import time
|
||||
from abc import ABC, abstractmethod
|
||||
from pydantic import BaseModel, Field
|
||||
from queue import Queue
|
||||
from uuid import UUID
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class InvocationQueueItem(BaseModel):
|
||||
graph_execution_state_id: str
|
||||
graph_execution_state_id: UUID
|
||||
invocation_id: str
|
||||
invoke_all: bool
|
||||
timestamp: float = Field(default_factory=time.time)
|
||||
|
Loading…
Reference in New Issue
Block a user