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 copy
|
||||||
import itertools
|
import itertools
|
||||||
import traceback
|
|
||||||
import uuid
|
import uuid
|
||||||
from types import NoneType
|
from types import NoneType
|
||||||
from typing import (
|
from typing import (
|
||||||
@ -751,7 +750,7 @@ class GraphExecutionState(BaseModel):
|
|||||||
"""Tracks the state of a graph execution"""
|
"""Tracks the state of a graph execution"""
|
||||||
|
|
||||||
id: str = Field(
|
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?
|
# 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)):
|
if len(v) != len(set(i.alias for i in v)):
|
||||||
raise ValueError("Duplicate exposed alias")
|
raise ValueError("Duplicate exposed alias")
|
||||||
return v
|
return v
|
||||||
|
|
||||||
@root_validator
|
@root_validator
|
||||||
def validate_exposed_nodes(cls, values):
|
def validate_exposed_nodes(cls, values):
|
||||||
graph = values['graph']
|
graph = values['graph']
|
||||||
|
@ -2,12 +2,14 @@
|
|||||||
|
|
||||||
import time
|
import time
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from queue import Queue
|
from queue import Queue
|
||||||
|
from uuid import UUID
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
|
||||||
class InvocationQueueItem(BaseModel):
|
class InvocationQueueItem(BaseModel):
|
||||||
graph_execution_state_id: str
|
graph_execution_state_id: UUID
|
||||||
invocation_id: str
|
invocation_id: str
|
||||||
invoke_all: bool
|
invoke_all: bool
|
||||||
timestamp: float = Field(default_factory=time.time)
|
timestamp: float = Field(default_factory=time.time)
|
||||||
|
Loading…
Reference in New Issue
Block a user