mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix more merge conflicts
This commit is contained in:
commit
5075e9c899
@ -425,12 +425,21 @@ class InvocationContext:
|
|||||||
graph_execution_state_id: str
|
graph_execution_state_id: str
|
||||||
queue_id: str
|
queue_id: str
|
||||||
queue_item_id: int
|
queue_item_id: int
|
||||||
|
queue_batch_id: str
|
||||||
|
|
||||||
def __init__(self, services: InvocationServices, queue_id: str, queue_item_id: int, graph_execution_state_id: str):
|
def __init__(
|
||||||
|
self,
|
||||||
|
services: InvocationServices,
|
||||||
|
queue_id: str,
|
||||||
|
queue_item_id: int,
|
||||||
|
queue_batch_id: str,
|
||||||
|
graph_execution_state_id: str,
|
||||||
|
):
|
||||||
self.services = services
|
self.services = services
|
||||||
self.graph_execution_state_id = graph_execution_state_id
|
self.graph_execution_state_id = graph_execution_state_id
|
||||||
self.queue_id = queue_id
|
self.queue_id = queue_id
|
||||||
self.queue_item_id = queue_item_id
|
self.queue_item_id = queue_item_id
|
||||||
|
self.queue_batch_id = queue_batch_id
|
||||||
|
|
||||||
|
|
||||||
class BaseInvocationOutput(BaseModel):
|
class BaseInvocationOutput(BaseModel):
|
||||||
|
@ -30,6 +30,7 @@ class EventServiceBase:
|
|||||||
self,
|
self,
|
||||||
queue_id: str,
|
queue_id: str,
|
||||||
queue_item_id: int,
|
queue_item_id: int,
|
||||||
|
queue_batch_id: str,
|
||||||
graph_execution_state_id: str,
|
graph_execution_state_id: str,
|
||||||
node: dict,
|
node: dict,
|
||||||
source_node_id: str,
|
source_node_id: str,
|
||||||
@ -44,6 +45,7 @@ class EventServiceBase:
|
|||||||
payload=dict(
|
payload=dict(
|
||||||
queue_id=queue_id,
|
queue_id=queue_id,
|
||||||
queue_item_id=queue_item_id,
|
queue_item_id=queue_item_id,
|
||||||
|
queue_batch_id=queue_batch_id,
|
||||||
graph_execution_state_id=graph_execution_state_id,
|
graph_execution_state_id=graph_execution_state_id,
|
||||||
node_id=node.get("id"),
|
node_id=node.get("id"),
|
||||||
source_node_id=source_node_id,
|
source_node_id=source_node_id,
|
||||||
@ -58,6 +60,7 @@ class EventServiceBase:
|
|||||||
self,
|
self,
|
||||||
queue_id: str,
|
queue_id: str,
|
||||||
queue_item_id: int,
|
queue_item_id: int,
|
||||||
|
queue_batch_id: str,
|
||||||
graph_execution_state_id: str,
|
graph_execution_state_id: str,
|
||||||
result: dict,
|
result: dict,
|
||||||
node: dict,
|
node: dict,
|
||||||
@ -69,6 +72,7 @@ class EventServiceBase:
|
|||||||
payload=dict(
|
payload=dict(
|
||||||
queue_id=queue_id,
|
queue_id=queue_id,
|
||||||
queue_item_id=queue_item_id,
|
queue_item_id=queue_item_id,
|
||||||
|
queue_batch_id=queue_batch_id,
|
||||||
graph_execution_state_id=graph_execution_state_id,
|
graph_execution_state_id=graph_execution_state_id,
|
||||||
node=node,
|
node=node,
|
||||||
source_node_id=source_node_id,
|
source_node_id=source_node_id,
|
||||||
@ -80,6 +84,7 @@ class EventServiceBase:
|
|||||||
self,
|
self,
|
||||||
queue_id: str,
|
queue_id: str,
|
||||||
queue_item_id: int,
|
queue_item_id: int,
|
||||||
|
queue_batch_id: str,
|
||||||
graph_execution_state_id: str,
|
graph_execution_state_id: str,
|
||||||
node: dict,
|
node: dict,
|
||||||
source_node_id: str,
|
source_node_id: str,
|
||||||
@ -92,6 +97,7 @@ class EventServiceBase:
|
|||||||
payload=dict(
|
payload=dict(
|
||||||
queue_id=queue_id,
|
queue_id=queue_id,
|
||||||
queue_item_id=queue_item_id,
|
queue_item_id=queue_item_id,
|
||||||
|
queue_batch_id=queue_batch_id,
|
||||||
graph_execution_state_id=graph_execution_state_id,
|
graph_execution_state_id=graph_execution_state_id,
|
||||||
node=node,
|
node=node,
|
||||||
source_node_id=source_node_id,
|
source_node_id=source_node_id,
|
||||||
@ -101,7 +107,13 @@ class EventServiceBase:
|
|||||||
)
|
)
|
||||||
|
|
||||||
def emit_invocation_started(
|
def emit_invocation_started(
|
||||||
self, queue_id: str, queue_item_id: int, graph_execution_state_id: str, node: dict, source_node_id: str
|
self,
|
||||||
|
queue_id: str,
|
||||||
|
queue_item_id: int,
|
||||||
|
queue_batch_id: str,
|
||||||
|
graph_execution_state_id: str,
|
||||||
|
node: dict,
|
||||||
|
source_node_id: str,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Emitted when an invocation has started"""
|
"""Emitted when an invocation has started"""
|
||||||
self.__emit_queue_event(
|
self.__emit_queue_event(
|
||||||
@ -109,19 +121,23 @@ class EventServiceBase:
|
|||||||
payload=dict(
|
payload=dict(
|
||||||
queue_id=queue_id,
|
queue_id=queue_id,
|
||||||
queue_item_id=queue_item_id,
|
queue_item_id=queue_item_id,
|
||||||
|
queue_batch_id=queue_batch_id,
|
||||||
graph_execution_state_id=graph_execution_state_id,
|
graph_execution_state_id=graph_execution_state_id,
|
||||||
node=node,
|
node=node,
|
||||||
source_node_id=source_node_id,
|
source_node_id=source_node_id,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
def emit_graph_execution_complete(self, queue_id: str, queue_item_id: int, graph_execution_state_id: str) -> None:
|
def emit_graph_execution_complete(
|
||||||
|
self, queue_id: str, queue_item_id: int, queue_batch_id: str, graph_execution_state_id: str
|
||||||
|
) -> None:
|
||||||
"""Emitted when a session has completed all invocations"""
|
"""Emitted when a session has completed all invocations"""
|
||||||
self.__emit_queue_event(
|
self.__emit_queue_event(
|
||||||
event_name="graph_execution_state_complete",
|
event_name="graph_execution_state_complete",
|
||||||
payload=dict(
|
payload=dict(
|
||||||
queue_id=queue_id,
|
queue_id=queue_id,
|
||||||
queue_item_id=queue_item_id,
|
queue_item_id=queue_item_id,
|
||||||
|
queue_batch_id=queue_batch_id,
|
||||||
graph_execution_state_id=graph_execution_state_id,
|
graph_execution_state_id=graph_execution_state_id,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -130,6 +146,7 @@ class EventServiceBase:
|
|||||||
self,
|
self,
|
||||||
queue_id: str,
|
queue_id: str,
|
||||||
queue_item_id: int,
|
queue_item_id: int,
|
||||||
|
queue_batch_id: str,
|
||||||
graph_execution_state_id: str,
|
graph_execution_state_id: str,
|
||||||
model_name: str,
|
model_name: str,
|
||||||
base_model: BaseModelType,
|
base_model: BaseModelType,
|
||||||
@ -142,6 +159,7 @@ class EventServiceBase:
|
|||||||
payload=dict(
|
payload=dict(
|
||||||
queue_id=queue_id,
|
queue_id=queue_id,
|
||||||
queue_item_id=queue_item_id,
|
queue_item_id=queue_item_id,
|
||||||
|
queue_batch_id=queue_batch_id,
|
||||||
graph_execution_state_id=graph_execution_state_id,
|
graph_execution_state_id=graph_execution_state_id,
|
||||||
model_name=model_name,
|
model_name=model_name,
|
||||||
base_model=base_model,
|
base_model=base_model,
|
||||||
@ -154,6 +172,7 @@ class EventServiceBase:
|
|||||||
self,
|
self,
|
||||||
queue_id: str,
|
queue_id: str,
|
||||||
queue_item_id: int,
|
queue_item_id: int,
|
||||||
|
queue_batch_id: str,
|
||||||
graph_execution_state_id: str,
|
graph_execution_state_id: str,
|
||||||
model_name: str,
|
model_name: str,
|
||||||
base_model: BaseModelType,
|
base_model: BaseModelType,
|
||||||
@ -167,6 +186,7 @@ class EventServiceBase:
|
|||||||
payload=dict(
|
payload=dict(
|
||||||
queue_id=queue_id,
|
queue_id=queue_id,
|
||||||
queue_item_id=queue_item_id,
|
queue_item_id=queue_item_id,
|
||||||
|
queue_batch_id=queue_batch_id,
|
||||||
graph_execution_state_id=graph_execution_state_id,
|
graph_execution_state_id=graph_execution_state_id,
|
||||||
model_name=model_name,
|
model_name=model_name,
|
||||||
base_model=base_model,
|
base_model=base_model,
|
||||||
@ -182,6 +202,7 @@ class EventServiceBase:
|
|||||||
self,
|
self,
|
||||||
queue_id: str,
|
queue_id: str,
|
||||||
queue_item_id: int,
|
queue_item_id: int,
|
||||||
|
queue_batch_id: str,
|
||||||
graph_execution_state_id: str,
|
graph_execution_state_id: str,
|
||||||
error_type: str,
|
error_type: str,
|
||||||
error: str,
|
error: str,
|
||||||
@ -192,6 +213,7 @@ class EventServiceBase:
|
|||||||
payload=dict(
|
payload=dict(
|
||||||
queue_id=queue_id,
|
queue_id=queue_id,
|
||||||
queue_item_id=queue_item_id,
|
queue_item_id=queue_item_id,
|
||||||
|
queue_batch_id=queue_batch_id,
|
||||||
graph_execution_state_id=graph_execution_state_id,
|
graph_execution_state_id=graph_execution_state_id,
|
||||||
error_type=error_type,
|
error_type=error_type,
|
||||||
error=error,
|
error=error,
|
||||||
@ -202,6 +224,7 @@ class EventServiceBase:
|
|||||||
self,
|
self,
|
||||||
queue_id: str,
|
queue_id: str,
|
||||||
queue_item_id: int,
|
queue_item_id: int,
|
||||||
|
queue_batch_id: str,
|
||||||
graph_execution_state_id: str,
|
graph_execution_state_id: str,
|
||||||
node_id: str,
|
node_id: str,
|
||||||
error_type: str,
|
error_type: str,
|
||||||
@ -213,6 +236,7 @@ class EventServiceBase:
|
|||||||
payload=dict(
|
payload=dict(
|
||||||
queue_id=queue_id,
|
queue_id=queue_id,
|
||||||
queue_item_id=queue_item_id,
|
queue_item_id=queue_item_id,
|
||||||
|
queue_batch_id=queue_batch_id,
|
||||||
graph_execution_state_id=graph_execution_state_id,
|
graph_execution_state_id=graph_execution_state_id,
|
||||||
node_id=node_id,
|
node_id=node_id,
|
||||||
error_type=error_type,
|
error_type=error_type,
|
||||||
@ -224,6 +248,7 @@ class EventServiceBase:
|
|||||||
self,
|
self,
|
||||||
queue_id: str,
|
queue_id: str,
|
||||||
queue_item_id: int,
|
queue_item_id: int,
|
||||||
|
queue_batch_id: str,
|
||||||
graph_execution_state_id: str,
|
graph_execution_state_id: str,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Emitted when a session is canceled"""
|
"""Emitted when a session is canceled"""
|
||||||
@ -232,6 +257,7 @@ class EventServiceBase:
|
|||||||
payload=dict(
|
payload=dict(
|
||||||
queue_id=queue_id,
|
queue_id=queue_id,
|
||||||
queue_item_id=queue_item_id,
|
queue_item_id=queue_item_id,
|
||||||
|
queue_batch_id=queue_batch_id,
|
||||||
graph_execution_state_id=graph_execution_state_id,
|
graph_execution_state_id=graph_execution_state_id,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -15,6 +15,9 @@ class InvocationQueueItem(BaseModel):
|
|||||||
session_queue_item_id: int = Field(
|
session_queue_item_id: int = Field(
|
||||||
description="The ID of session queue item from which this invocation queue item came"
|
description="The ID of session queue item from which this invocation queue item came"
|
||||||
)
|
)
|
||||||
|
session_queue_batch_id: str = Field(
|
||||||
|
description="The ID of the session batch from which this invocation queue item came"
|
||||||
|
)
|
||||||
invoke_all: bool = Field(default=False)
|
invoke_all: bool = Field(default=False)
|
||||||
timestamp: float = Field(default_factory=time.time)
|
timestamp: float = Field(default_factory=time.time)
|
||||||
|
|
||||||
|
@ -18,7 +18,12 @@ class Invoker:
|
|||||||
self._start()
|
self._start()
|
||||||
|
|
||||||
def invoke(
|
def invoke(
|
||||||
self, queue_id: str, queue_item_id: int, graph_execution_state: GraphExecutionState, invoke_all: bool = False
|
self,
|
||||||
|
session_queue_id: str,
|
||||||
|
session_queue_item_id: int,
|
||||||
|
session_queue_batch_id: str,
|
||||||
|
graph_execution_state: GraphExecutionState,
|
||||||
|
invoke_all: bool = False,
|
||||||
) -> Optional[str]:
|
) -> Optional[str]:
|
||||||
"""Determines the next node to invoke and enqueues it, preparing if needed.
|
"""Determines the next node to invoke and enqueues it, preparing if needed.
|
||||||
Returns the id of the queued node, or `None` if there are no nodes left to enqueue."""
|
Returns the id of the queued node, or `None` if there are no nodes left to enqueue."""
|
||||||
@ -34,8 +39,9 @@ class Invoker:
|
|||||||
# Queue the invocation
|
# Queue the invocation
|
||||||
self.services.queue.put(
|
self.services.queue.put(
|
||||||
InvocationQueueItem(
|
InvocationQueueItem(
|
||||||
session_queue_item_id=queue_item_id,
|
session_queue_id=session_queue_id,
|
||||||
session_queue_id=queue_id,
|
session_queue_item_id=session_queue_item_id,
|
||||||
|
session_queue_batch_id=session_queue_batch_id,
|
||||||
graph_execution_state_id=graph_execution_state.id,
|
graph_execution_state_id=graph_execution_state.id,
|
||||||
invocation_id=invocation.id,
|
invocation_id=invocation.id,
|
||||||
invoke_all=invoke_all,
|
invoke_all=invoke_all,
|
||||||
|
@ -539,6 +539,7 @@ class ModelManagerService(ModelManagerServiceBase):
|
|||||||
context.services.events.emit_model_load_completed(
|
context.services.events.emit_model_load_completed(
|
||||||
queue_id=context.queue_id,
|
queue_id=context.queue_id,
|
||||||
queue_item_id=context.queue_item_id,
|
queue_item_id=context.queue_item_id,
|
||||||
|
queue_batch_id=context.queue_batch_id,
|
||||||
graph_execution_state_id=context.graph_execution_state_id,
|
graph_execution_state_id=context.graph_execution_state_id,
|
||||||
model_name=model_name,
|
model_name=model_name,
|
||||||
base_model=base_model,
|
base_model=base_model,
|
||||||
@ -550,6 +551,7 @@ class ModelManagerService(ModelManagerServiceBase):
|
|||||||
context.services.events.emit_model_load_started(
|
context.services.events.emit_model_load_started(
|
||||||
queue_id=context.queue_id,
|
queue_id=context.queue_id,
|
||||||
queue_item_id=context.queue_item_id,
|
queue_item_id=context.queue_item_id,
|
||||||
|
queue_batch_id=context.queue_batch_id,
|
||||||
graph_execution_state_id=context.graph_execution_state_id,
|
graph_execution_state_id=context.graph_execution_state_id,
|
||||||
model_name=model_name,
|
model_name=model_name,
|
||||||
base_model=base_model,
|
base_model=base_model,
|
||||||
|
@ -57,6 +57,7 @@ class DefaultInvocationProcessor(InvocationProcessorABC):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.__invoker.services.logger.error("Exception while retrieving session:\n%s" % e)
|
self.__invoker.services.logger.error("Exception while retrieving session:\n%s" % e)
|
||||||
self.__invoker.services.events.emit_session_retrieval_error(
|
self.__invoker.services.events.emit_session_retrieval_error(
|
||||||
|
queue_batch_id=queue_item.session_queue_batch_id,
|
||||||
queue_item_id=queue_item.session_queue_item_id,
|
queue_item_id=queue_item.session_queue_item_id,
|
||||||
queue_id=queue_item.session_queue_id,
|
queue_id=queue_item.session_queue_id,
|
||||||
graph_execution_state_id=queue_item.graph_execution_state_id,
|
graph_execution_state_id=queue_item.graph_execution_state_id,
|
||||||
@ -70,6 +71,7 @@ class DefaultInvocationProcessor(InvocationProcessorABC):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.__invoker.services.logger.error("Exception while retrieving invocation:\n%s" % e)
|
self.__invoker.services.logger.error("Exception while retrieving invocation:\n%s" % e)
|
||||||
self.__invoker.services.events.emit_invocation_retrieval_error(
|
self.__invoker.services.events.emit_invocation_retrieval_error(
|
||||||
|
queue_batch_id=queue_item.session_queue_batch_id,
|
||||||
queue_item_id=queue_item.session_queue_item_id,
|
queue_item_id=queue_item.session_queue_item_id,
|
||||||
queue_id=queue_item.session_queue_id,
|
queue_id=queue_item.session_queue_id,
|
||||||
graph_execution_state_id=queue_item.graph_execution_state_id,
|
graph_execution_state_id=queue_item.graph_execution_state_id,
|
||||||
@ -84,6 +86,7 @@ class DefaultInvocationProcessor(InvocationProcessorABC):
|
|||||||
|
|
||||||
# Send starting event
|
# Send starting event
|
||||||
self.__invoker.services.events.emit_invocation_started(
|
self.__invoker.services.events.emit_invocation_started(
|
||||||
|
queue_batch_id=queue_item.session_queue_batch_id,
|
||||||
queue_item_id=queue_item.session_queue_item_id,
|
queue_item_id=queue_item.session_queue_item_id,
|
||||||
queue_id=queue_item.session_queue_id,
|
queue_id=queue_item.session_queue_id,
|
||||||
graph_execution_state_id=graph_execution_state.id,
|
graph_execution_state_id=graph_execution_state.id,
|
||||||
@ -106,6 +109,7 @@ class DefaultInvocationProcessor(InvocationProcessorABC):
|
|||||||
graph_execution_state_id=graph_execution_state.id,
|
graph_execution_state_id=graph_execution_state.id,
|
||||||
queue_item_id=queue_item.session_queue_item_id,
|
queue_item_id=queue_item.session_queue_item_id,
|
||||||
queue_id=queue_item.session_queue_id,
|
queue_id=queue_item.session_queue_id,
|
||||||
|
queue_batch_id=queue_item.session_queue_batch_id,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -121,6 +125,7 @@ class DefaultInvocationProcessor(InvocationProcessorABC):
|
|||||||
|
|
||||||
# Send complete event
|
# Send complete event
|
||||||
self.__invoker.services.events.emit_invocation_complete(
|
self.__invoker.services.events.emit_invocation_complete(
|
||||||
|
queue_batch_id=queue_item.session_queue_batch_id,
|
||||||
queue_item_id=queue_item.session_queue_item_id,
|
queue_item_id=queue_item.session_queue_item_id,
|
||||||
queue_id=queue_item.session_queue_id,
|
queue_id=queue_item.session_queue_id,
|
||||||
graph_execution_state_id=graph_execution_state.id,
|
graph_execution_state_id=graph_execution_state.id,
|
||||||
@ -150,6 +155,7 @@ class DefaultInvocationProcessor(InvocationProcessorABC):
|
|||||||
self.__invoker.services.logger.error("Error while invoking:\n%s" % e)
|
self.__invoker.services.logger.error("Error while invoking:\n%s" % e)
|
||||||
# Send error event
|
# Send error event
|
||||||
self.__invoker.services.events.emit_invocation_error(
|
self.__invoker.services.events.emit_invocation_error(
|
||||||
|
queue_batch_id=queue_item.session_queue_batch_id,
|
||||||
queue_item_id=queue_item.session_queue_item_id,
|
queue_item_id=queue_item.session_queue_item_id,
|
||||||
queue_id=queue_item.session_queue_id,
|
queue_id=queue_item.session_queue_id,
|
||||||
graph_execution_state_id=graph_execution_state.id,
|
graph_execution_state_id=graph_execution_state.id,
|
||||||
@ -170,14 +176,16 @@ class DefaultInvocationProcessor(InvocationProcessorABC):
|
|||||||
if queue_item.invoke_all and not is_complete:
|
if queue_item.invoke_all and not is_complete:
|
||||||
try:
|
try:
|
||||||
self.__invoker.invoke(
|
self.__invoker.invoke(
|
||||||
queue_item_id=queue_item.session_queue_item_id,
|
session_queue_batch_id=queue_item.session_queue_batch_id,
|
||||||
queue_id=queue_item.session_queue_id,
|
session_queue_item_id=queue_item.session_queue_item_id,
|
||||||
|
session_queue_id=queue_item.session_queue_id,
|
||||||
graph_execution_state=graph_execution_state,
|
graph_execution_state=graph_execution_state,
|
||||||
invoke_all=True,
|
invoke_all=True,
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.__invoker.services.logger.error("Error while invoking:\n%s" % e)
|
self.__invoker.services.logger.error("Error while invoking:\n%s" % e)
|
||||||
self.__invoker.services.events.emit_invocation_error(
|
self.__invoker.services.events.emit_invocation_error(
|
||||||
|
queue_batch_id=queue_item.session_queue_batch_id,
|
||||||
queue_item_id=queue_item.session_queue_item_id,
|
queue_item_id=queue_item.session_queue_item_id,
|
||||||
queue_id=queue_item.session_queue_id,
|
queue_id=queue_item.session_queue_id,
|
||||||
graph_execution_state_id=graph_execution_state.id,
|
graph_execution_state_id=graph_execution_state.id,
|
||||||
@ -188,6 +196,7 @@ class DefaultInvocationProcessor(InvocationProcessorABC):
|
|||||||
)
|
)
|
||||||
elif is_complete:
|
elif is_complete:
|
||||||
self.__invoker.services.events.emit_graph_execution_complete(
|
self.__invoker.services.events.emit_graph_execution_complete(
|
||||||
|
queue_batch_id=queue_item.session_queue_batch_id,
|
||||||
queue_item_id=queue_item.session_queue_item_id,
|
queue_item_id=queue_item.session_queue_item_id,
|
||||||
queue_id=queue_item.session_queue_id,
|
queue_id=queue_item.session_queue_id,
|
||||||
graph_execution_state_id=graph_execution_state.id,
|
graph_execution_state_id=graph_execution_state.id,
|
||||||
|
@ -102,8 +102,9 @@ class DefaultSessionProcessor(SessionProcessorBase):
|
|||||||
self.__queue_item = queue_item
|
self.__queue_item = queue_item
|
||||||
self.__invoker.services.graph_execution_manager.set(queue_item.session)
|
self.__invoker.services.graph_execution_manager.set(queue_item.session)
|
||||||
self.__invoker.invoke(
|
self.__invoker.invoke(
|
||||||
queue_item_id=queue_item.item_id,
|
session_queue_batch_id=queue_item.batch_id,
|
||||||
queue_id=queue_item.queue_id,
|
session_queue_id=queue_item.queue_id,
|
||||||
|
session_queue_item_id=queue_item.item_id,
|
||||||
graph_execution_state=queue_item.session,
|
graph_execution_state=queue_item.session,
|
||||||
invoke_all=True,
|
invoke_all=True,
|
||||||
)
|
)
|
||||||
|
@ -562,6 +562,7 @@ class SqliteSessionQueue(SessionQueueBase):
|
|||||||
self.__invoker.services.events.emit_session_canceled(
|
self.__invoker.services.events.emit_session_canceled(
|
||||||
queue_item_id=queue_item.item_id,
|
queue_item_id=queue_item.item_id,
|
||||||
queue_id=queue_item.queue_id,
|
queue_id=queue_item.queue_id,
|
||||||
|
queue_batch_id=queue_item.batch_id,
|
||||||
graph_execution_state_id=queue_item.session_id,
|
graph_execution_state_id=queue_item.session_id,
|
||||||
)
|
)
|
||||||
self.__invoker.services.events.emit_queue_item_status_changed(queue_item)
|
self.__invoker.services.events.emit_queue_item_status_changed(queue_item)
|
||||||
@ -604,6 +605,7 @@ class SqliteSessionQueue(SessionQueueBase):
|
|||||||
self.__invoker.services.events.emit_session_canceled(
|
self.__invoker.services.events.emit_session_canceled(
|
||||||
queue_item_id=current_queue_item.item_id,
|
queue_item_id=current_queue_item.item_id,
|
||||||
queue_id=current_queue_item.queue_id,
|
queue_id=current_queue_item.queue_id,
|
||||||
|
queue_batch_id=current_queue_item.batch_id,
|
||||||
graph_execution_state_id=current_queue_item.session_id,
|
graph_execution_state_id=current_queue_item.session_id,
|
||||||
)
|
)
|
||||||
self.__invoker.services.events.emit_queue_item_status_changed(current_queue_item)
|
self.__invoker.services.events.emit_queue_item_status_changed(current_queue_item)
|
||||||
@ -649,6 +651,7 @@ class SqliteSessionQueue(SessionQueueBase):
|
|||||||
self.__invoker.services.events.emit_session_canceled(
|
self.__invoker.services.events.emit_session_canceled(
|
||||||
queue_item_id=current_queue_item.item_id,
|
queue_item_id=current_queue_item.item_id,
|
||||||
queue_id=current_queue_item.queue_id,
|
queue_id=current_queue_item.queue_id,
|
||||||
|
queue_batch_id=current_queue_item.batch_id,
|
||||||
graph_execution_state_id=current_queue_item.session_id,
|
graph_execution_state_id=current_queue_item.session_id,
|
||||||
)
|
)
|
||||||
self.__invoker.services.events.emit_queue_item_status_changed(current_queue_item)
|
self.__invoker.services.events.emit_queue_item_status_changed(current_queue_item)
|
||||||
|
@ -112,6 +112,7 @@ def stable_diffusion_step_callback(
|
|||||||
context.services.events.emit_generator_progress(
|
context.services.events.emit_generator_progress(
|
||||||
queue_id=context.queue_id,
|
queue_id=context.queue_id,
|
||||||
queue_item_id=context.queue_item_id,
|
queue_item_id=context.queue_item_id,
|
||||||
|
queue_batch_id=context.queue_batch_id,
|
||||||
graph_execution_state_id=context.graph_execution_state_id,
|
graph_execution_state_id=context.graph_execution_state_id,
|
||||||
node=node,
|
node=node,
|
||||||
source_node_id=source_node_id,
|
source_node_id=source_node_id,
|
||||||
|
@ -885,6 +885,7 @@
|
|||||||
},
|
},
|
||||||
"cfgScale": "CFG Scale",
|
"cfgScale": "CFG Scale",
|
||||||
"clipSkip": "CLIP Skip",
|
"clipSkip": "CLIP Skip",
|
||||||
|
"clipSkipWithLayerCount": "CLIP Skip {{layerCount}}",
|
||||||
"closeViewer": "Close Viewer",
|
"closeViewer": "Close Viewer",
|
||||||
"codeformerFidelity": "Fidelity",
|
"codeformerFidelity": "Fidelity",
|
||||||
"coherenceMode": "Mode",
|
"coherenceMode": "Mode",
|
||||||
@ -958,6 +959,9 @@
|
|||||||
"seamlessTiling": "Seamless Tiling",
|
"seamlessTiling": "Seamless Tiling",
|
||||||
"seamlessXAxis": "X Axis",
|
"seamlessXAxis": "X Axis",
|
||||||
"seamlessYAxis": "Y Axis",
|
"seamlessYAxis": "Y Axis",
|
||||||
|
"seamlessX": "Seamless X",
|
||||||
|
"seamlessY": "Seamless Y",
|
||||||
|
"seamlessX&Y": "Seamless X & Y",
|
||||||
"seamLowThreshold": "Low",
|
"seamLowThreshold": "Low",
|
||||||
"seed": "Seed",
|
"seed": "Seed",
|
||||||
"seedWeights": "Seed Weights",
|
"seedWeights": "Seed Weights",
|
||||||
@ -979,6 +983,8 @@
|
|||||||
"upscaling": "Upscaling",
|
"upscaling": "Upscaling",
|
||||||
"useAll": "Use All",
|
"useAll": "Use All",
|
||||||
"useCpuNoise": "Use CPU Noise",
|
"useCpuNoise": "Use CPU Noise",
|
||||||
|
"cpuNoise": "CPU Noise",
|
||||||
|
"gpuNoise": "GPU Noise",
|
||||||
"useInitImg": "Use Initial Image",
|
"useInitImg": "Use Initial Image",
|
||||||
"usePrompt": "Use Prompt",
|
"usePrompt": "Use Prompt",
|
||||||
"useSeed": "Use Seed",
|
"useSeed": "Use Seed",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { isAnyOf } from '@reduxjs/toolkit';
|
import { isAnyOf } from '@reduxjs/toolkit';
|
||||||
import { logger } from 'app/logging/logger';
|
import { logger } from 'app/logging/logger';
|
||||||
import {
|
import {
|
||||||
canvasBatchesAndSessionsReset,
|
canvasBatchIdsReset,
|
||||||
commitStagingAreaImage,
|
commitStagingAreaImage,
|
||||||
discardStagedImages,
|
discardStagedImages,
|
||||||
} from 'features/canvas/store/canvasSlice';
|
} from 'features/canvas/store/canvasSlice';
|
||||||
@ -38,7 +38,7 @@ export const addCommitStagingAreaImageListener = () => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
dispatch(canvasBatchesAndSessionsReset());
|
dispatch(canvasBatchIdsReset());
|
||||||
} catch {
|
} catch {
|
||||||
log.error('Failed to cancel canvas batches');
|
log.error('Failed to cancel canvas batches');
|
||||||
dispatch(
|
dispatch(
|
||||||
|
@ -65,7 +65,6 @@ export const addControlNetImageProcessedListener = () => {
|
|||||||
);
|
);
|
||||||
const enqueueResult = await req.unwrap();
|
const enqueueResult = await req.unwrap();
|
||||||
req.reset();
|
req.reset();
|
||||||
console.log(enqueueResult.queue_item.session_id);
|
|
||||||
log.debug(
|
log.debug(
|
||||||
{ enqueueResult: parseify(enqueueResult) },
|
{ enqueueResult: parseify(enqueueResult) },
|
||||||
t('queue.graphQueued')
|
t('queue.graphQueued')
|
||||||
|
@ -30,7 +30,7 @@ export const addInvocationCompleteEventListener = () => {
|
|||||||
`Invocation complete (${action.payload.data.node.type})`
|
`Invocation complete (${action.payload.data.node.type})`
|
||||||
);
|
);
|
||||||
|
|
||||||
const { result, node, graph_execution_state_id } = data;
|
const { result, node, queue_batch_id } = data;
|
||||||
|
|
||||||
// This complete event has an associated image output
|
// This complete event has an associated image output
|
||||||
if (isImageOutput(result) && !nodeDenylist.includes(node.type)) {
|
if (isImageOutput(result) && !nodeDenylist.includes(node.type)) {
|
||||||
@ -43,7 +43,7 @@ export const addInvocationCompleteEventListener = () => {
|
|||||||
|
|
||||||
// Add canvas images to the staging area
|
// Add canvas images to the staging area
|
||||||
if (
|
if (
|
||||||
canvas.sessionIds.includes(graph_execution_state_id) &&
|
canvas.batchIds.includes(queue_batch_id) &&
|
||||||
[CANVAS_OUTPUT].includes(data.source_node_id)
|
[CANVAS_OUTPUT].includes(data.source_node_id)
|
||||||
) {
|
) {
|
||||||
dispatch(addImageToStagingArea(imageDTO));
|
dispatch(addImageToStagingArea(imageDTO));
|
||||||
@ -76,7 +76,6 @@ export const addInvocationCompleteEventListener = () => {
|
|||||||
categories: IMAGE_CATEGORIES,
|
categories: IMAGE_CATEGORIES,
|
||||||
},
|
},
|
||||||
(draft) => {
|
(draft) => {
|
||||||
console.log(draft);
|
|
||||||
imagesAdapter.addOne(draft, imageDTO);
|
imagesAdapter.addOne(draft, imageDTO);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { logger } from 'app/logging/logger';
|
import { logger } from 'app/logging/logger';
|
||||||
import { canvasSessionIdAdded } from 'features/canvas/store/canvasSlice';
|
|
||||||
import { queueApi, queueItemsAdapter } from 'services/api/endpoints/queue';
|
import { queueApi, queueItemsAdapter } from 'services/api/endpoints/queue';
|
||||||
import {
|
import {
|
||||||
appSocketQueueItemStatusChanged,
|
appSocketQueueItemStatusChanged,
|
||||||
@ -10,12 +9,11 @@ import { startAppListening } from '../..';
|
|||||||
export const addSocketQueueItemStatusChangedEventListener = () => {
|
export const addSocketQueueItemStatusChangedEventListener = () => {
|
||||||
startAppListening({
|
startAppListening({
|
||||||
actionCreator: socketQueueItemStatusChanged,
|
actionCreator: socketQueueItemStatusChanged,
|
||||||
effect: (action, { dispatch, getState }) => {
|
effect: async (action, { dispatch }) => {
|
||||||
const log = logger('socketio');
|
const log = logger('socketio');
|
||||||
const {
|
const {
|
||||||
queue_item_id: item_id,
|
queue_item_id: item_id,
|
||||||
batch_id,
|
queue_batch_id,
|
||||||
graph_execution_state_id,
|
|
||||||
status,
|
status,
|
||||||
} = action.payload.data;
|
} = action.payload.data;
|
||||||
log.debug(
|
log.debug(
|
||||||
@ -26,9 +24,6 @@ export const addSocketQueueItemStatusChangedEventListener = () => {
|
|||||||
|
|
||||||
dispatch(
|
dispatch(
|
||||||
queueApi.util.updateQueryData('listQueueItems', undefined, (draft) => {
|
queueApi.util.updateQueryData('listQueueItems', undefined, (draft) => {
|
||||||
if (!draft) {
|
|
||||||
console.log('no draft!');
|
|
||||||
}
|
|
||||||
queueItemsAdapter.updateOne(draft, {
|
queueItemsAdapter.updateOne(draft, {
|
||||||
id: item_id,
|
id: item_id,
|
||||||
changes: action.payload.data,
|
changes: action.payload.data,
|
||||||
@ -36,21 +31,23 @@ export const addSocketQueueItemStatusChangedEventListener = () => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
const state = getState();
|
|
||||||
if (state.canvas.batchIds.includes(batch_id)) {
|
|
||||||
dispatch(canvasSessionIdAdded(graph_execution_state_id));
|
|
||||||
}
|
|
||||||
|
|
||||||
dispatch(
|
dispatch(
|
||||||
queueApi.util.invalidateTags([
|
queueApi.util.invalidateTags([
|
||||||
'CurrentSessionQueueItem',
|
'CurrentSessionQueueItem',
|
||||||
'NextSessionQueueItem',
|
'NextSessionQueueItem',
|
||||||
'SessionQueueStatus',
|
|
||||||
{ type: 'SessionQueueItem', id: item_id },
|
{ type: 'SessionQueueItem', id: item_id },
|
||||||
{ type: 'SessionQueueItemDTO', id: item_id },
|
{ type: 'SessionQueueItemDTO', id: item_id },
|
||||||
{ type: 'BatchStatus', id: batch_id },
|
{ type: 'BatchStatus', id: queue_batch_id },
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const req = dispatch(
|
||||||
|
queueApi.endpoints.getQueueStatus.initiate(undefined, {
|
||||||
|
forceRefetch: true,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
await req.unwrap();
|
||||||
|
req.unsubscribe();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -13,7 +13,6 @@ import {
|
|||||||
Image,
|
Image,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { useAppSelector } from '../../app/store/storeHooks';
|
import { useAppSelector } from '../../app/store/storeHooks';
|
||||||
import { systemSelector } from '../../features/system/store/systemSelectors';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
interface Props extends PopoverProps {
|
interface Props extends PopoverProps {
|
||||||
@ -33,7 +32,9 @@ function IAIInformationalPopover({
|
|||||||
children,
|
children,
|
||||||
placement,
|
placement,
|
||||||
}: Props): JSX.Element {
|
}: Props): JSX.Element {
|
||||||
const { shouldDisableInformationalPopovers } = useAppSelector(systemSelector);
|
const shouldDisableInformationalPopovers = useAppSelector(
|
||||||
|
(state) => state.system.shouldDisableInformationalPopovers
|
||||||
|
);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const heading = t(`popovers.${details}.heading`);
|
const heading = t(`popovers.${details}.heading`);
|
||||||
|
@ -11,12 +11,12 @@ const selector = createSelector(
|
|||||||
({ system, canvas }) => {
|
({ system, canvas }) => {
|
||||||
const { denoiseProgress } = system;
|
const { denoiseProgress } = system;
|
||||||
const { boundingBox } = canvas.layerState.stagingArea;
|
const { boundingBox } = canvas.layerState.stagingArea;
|
||||||
const { sessionIds } = canvas;
|
const { batchIds } = canvas;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
boundingBox,
|
boundingBox,
|
||||||
progressImage:
|
progressImage:
|
||||||
denoiseProgress && sessionIds.includes(denoiseProgress.session_id)
|
denoiseProgress && batchIds.includes(denoiseProgress.batch_id)
|
||||||
? denoiseProgress.progress_image
|
? denoiseProgress.progress_image
|
||||||
: undefined,
|
: undefined,
|
||||||
};
|
};
|
||||||
|
@ -85,7 +85,6 @@ export const initialCanvasState: CanvasState = {
|
|||||||
stageDimensions: { width: 0, height: 0 },
|
stageDimensions: { width: 0, height: 0 },
|
||||||
stageScale: 1,
|
stageScale: 1,
|
||||||
tool: 'brush',
|
tool: 'brush',
|
||||||
sessionIds: [],
|
|
||||||
batchIds: [],
|
batchIds: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -302,11 +301,7 @@ export const canvasSlice = createSlice({
|
|||||||
canvasBatchIdAdded: (state, action: PayloadAction<string>) => {
|
canvasBatchIdAdded: (state, action: PayloadAction<string>) => {
|
||||||
state.batchIds.push(action.payload);
|
state.batchIds.push(action.payload);
|
||||||
},
|
},
|
||||||
canvasSessionIdAdded: (state, action: PayloadAction<string>) => {
|
canvasBatchIdsReset: (state) => {
|
||||||
state.sessionIds.push(action.payload);
|
|
||||||
},
|
|
||||||
canvasBatchesAndSessionsReset: (state) => {
|
|
||||||
state.sessionIds = [];
|
|
||||||
state.batchIds = [];
|
state.batchIds = [];
|
||||||
},
|
},
|
||||||
stagingAreaInitialized: (
|
stagingAreaInitialized: (
|
||||||
@ -879,8 +874,7 @@ export const {
|
|||||||
setShouldAntialias,
|
setShouldAntialias,
|
||||||
canvasResized,
|
canvasResized,
|
||||||
canvasBatchIdAdded,
|
canvasBatchIdAdded,
|
||||||
canvasSessionIdAdded,
|
canvasBatchIdsReset,
|
||||||
canvasBatchesAndSessionsReset,
|
|
||||||
} = canvasSlice.actions;
|
} = canvasSlice.actions;
|
||||||
|
|
||||||
export default canvasSlice.reducer;
|
export default canvasSlice.reducer;
|
||||||
|
@ -166,7 +166,6 @@ export interface CanvasState {
|
|||||||
tool: CanvasTool;
|
tool: CanvasTool;
|
||||||
generationMode?: GenerationMode;
|
generationMode?: GenerationMode;
|
||||||
batchIds: string[];
|
batchIds: string[];
|
||||||
sessionIds: string[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GenerationMode = 'txt2img' | 'img2img' | 'inpaint' | 'outpaint';
|
export type GenerationMode = 'txt2img' | 'img2img' | 'inpaint' | 'outpaint';
|
||||||
|
@ -6,7 +6,6 @@ import IAISwitch from 'common/components/IAISwitch';
|
|||||||
import { isIPAdapterEnableToggled } from 'features/controlNet/store/controlNetSlice';
|
import { isIPAdapterEnableToggled } from 'features/controlNet/store/controlNetSlice';
|
||||||
import { memo, useCallback } from 'react';
|
import { memo, useCallback } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import IAIInformationalPopover from 'common/components/IAIInformationalPopover';
|
|
||||||
|
|
||||||
const selector = createSelector(
|
const selector = createSelector(
|
||||||
stateSelector,
|
stateSelector,
|
||||||
@ -28,7 +27,6 @@ const ParamIPAdapterFeatureToggle = () => {
|
|||||||
}, [dispatch]);
|
}, [dispatch]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IAIInformationalPopover details="dynamicPromptsToggle">
|
|
||||||
<IAISwitch
|
<IAISwitch
|
||||||
label={t('controlnet.enableIPAdapter')}
|
label={t('controlnet.enableIPAdapter')}
|
||||||
isChecked={isIPAdapterEnabled}
|
isChecked={isIPAdapterEnabled}
|
||||||
@ -37,7 +35,6 @@ const ParamIPAdapterFeatureToggle = () => {
|
|||||||
width: '100%',
|
width: '100%',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</IAIInformationalPopover>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -871,7 +871,7 @@ const nodesSlice = createSlice({
|
|||||||
nes.error = null;
|
nes.error = null;
|
||||||
nes.progress = null;
|
nes.progress = null;
|
||||||
nes.progressImage = null;
|
nes.progressImage = null;
|
||||||
// do not reset nes.outputs, this allows a user to inspect the output of a node across batches
|
nes.outputs = [];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1120,36 +1120,45 @@ export type LoRAMetadataItem = z.infer<typeof zLoRAMetadataItem>;
|
|||||||
|
|
||||||
export const zCoreMetadata = z
|
export const zCoreMetadata = z
|
||||||
.object({
|
.object({
|
||||||
app_version: z.string().nullish(),
|
app_version: z.string().nullish().catch(null),
|
||||||
generation_mode: z.string().nullish(),
|
generation_mode: z.string().nullish().catch(null),
|
||||||
created_by: z.string().nullish(),
|
created_by: z.string().nullish().catch(null),
|
||||||
positive_prompt: z.string().nullish(),
|
positive_prompt: z.string().nullish().catch(null),
|
||||||
negative_prompt: z.string().nullish(),
|
negative_prompt: z.string().nullish().catch(null),
|
||||||
width: z.number().int().nullish(),
|
width: z.number().int().nullish().catch(null),
|
||||||
height: z.number().int().nullish(),
|
height: z.number().int().nullish().catch(null),
|
||||||
seed: z.number().int().nullish(),
|
seed: z.number().int().nullish().catch(null),
|
||||||
rand_device: z.string().nullish(),
|
rand_device: z.string().nullish().catch(null),
|
||||||
cfg_scale: z.number().nullish(),
|
cfg_scale: z.number().nullish().catch(null),
|
||||||
steps: z.number().int().nullish(),
|
steps: z.number().int().nullish().catch(null),
|
||||||
scheduler: z.string().nullish(),
|
scheduler: z.string().nullish().catch(null),
|
||||||
clip_skip: z.number().int().nullish(),
|
clip_skip: z.number().int().nullish().catch(null),
|
||||||
model: z
|
model: z
|
||||||
.union([zMainModel.deepPartial(), zOnnxModel.deepPartial()])
|
.union([zMainModel.deepPartial(), zOnnxModel.deepPartial()])
|
||||||
.nullish(),
|
.nullish()
|
||||||
controlnets: z.array(zControlField.deepPartial()).nullish(),
|
.catch(null),
|
||||||
loras: z.array(zLoRAMetadataItem).nullish(),
|
controlnets: z.array(zControlField.deepPartial()).nullish().catch(null),
|
||||||
vae: zVaeModelField.nullish(),
|
loras: z
|
||||||
strength: z.number().nullish(),
|
.array(
|
||||||
init_image: z.string().nullish(),
|
z.object({
|
||||||
positive_style_prompt: z.string().nullish(),
|
lora: zLoRAModelField.deepPartial(),
|
||||||
negative_style_prompt: z.string().nullish(),
|
weight: z.number(),
|
||||||
refiner_model: zSDXLRefinerModel.deepPartial().nullish(),
|
})
|
||||||
refiner_cfg_scale: z.number().nullish(),
|
)
|
||||||
refiner_steps: z.number().int().nullish(),
|
.nullish()
|
||||||
refiner_scheduler: z.string().nullish(),
|
.catch(null),
|
||||||
refiner_positive_aesthetic_score: z.number().nullish(),
|
vae: zVaeModelField.nullish().catch(null),
|
||||||
refiner_negative_aesthetic_score: z.number().nullish(),
|
strength: z.number().nullish().catch(null),
|
||||||
refiner_start: z.number().nullish(),
|
init_image: z.string().nullish().catch(null),
|
||||||
|
positive_style_prompt: z.string().nullish().catch(null),
|
||||||
|
negative_style_prompt: z.string().nullish().catch(null),
|
||||||
|
refiner_model: zSDXLRefinerModel.deepPartial().nullish().catch(null),
|
||||||
|
refiner_cfg_scale: z.number().nullish().catch(null),
|
||||||
|
refiner_steps: z.number().int().nullish().catch(null),
|
||||||
|
refiner_scheduler: z.string().nullish().catch(null),
|
||||||
|
refiner_positive_aesthetic_score: z.number().nullish().catch(null),
|
||||||
|
refiner_negative_aesthetic_score: z.number().nullish().catch(null),
|
||||||
|
refiner_start: z.number().nullish().catch(null),
|
||||||
})
|
})
|
||||||
.passthrough();
|
.passthrough();
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { logger } from 'app/logging/logger';
|
import { logger } from 'app/logging/logger';
|
||||||
import { RootState } from 'app/store/store';
|
import { RootState } from 'app/store/store';
|
||||||
import { NonNullableGraph } from 'features/nodes/types/types';
|
import { NonNullableGraph } from 'features/nodes/types/types';
|
||||||
import { initialGenerationState } from 'features/parameters/store/generationSlice';
|
|
||||||
import { ImageDTO, ImageToLatentsInvocation } from 'services/api/types';
|
import { ImageDTO, ImageToLatentsInvocation } from 'services/api/types';
|
||||||
import { addControlNetToLinearGraph } from './addControlNetToLinearGraph';
|
import { addControlNetToLinearGraph } from './addControlNetToLinearGraph';
|
||||||
import { addIPAdapterToLinearGraph } from './addIPAdapterToLinearGraph';
|
import { addIPAdapterToLinearGraph } from './addIPAdapterToLinearGraph';
|
||||||
@ -47,7 +46,6 @@ export const buildCanvasImageToImageGraph = (
|
|||||||
vaePrecision,
|
vaePrecision,
|
||||||
clipSkip,
|
clipSkip,
|
||||||
shouldUseCpuNoise,
|
shouldUseCpuNoise,
|
||||||
shouldUseNoiseSettings,
|
|
||||||
seamlessXAxis,
|
seamlessXAxis,
|
||||||
seamlessYAxis,
|
seamlessYAxis,
|
||||||
} = state.generation;
|
} = state.generation;
|
||||||
@ -70,9 +68,7 @@ export const buildCanvasImageToImageGraph = (
|
|||||||
|
|
||||||
let modelLoaderNodeId = MAIN_MODEL_LOADER;
|
let modelLoaderNodeId = MAIN_MODEL_LOADER;
|
||||||
|
|
||||||
const use_cpu = shouldUseNoiseSettings
|
const use_cpu = shouldUseCpuNoise;
|
||||||
? shouldUseCpuNoise
|
|
||||||
: initialGenerationState.shouldUseCpuNoise;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The easiest way to build linear graphs is to do it in the node editor, then copy and paste the
|
* The easiest way to build linear graphs is to do it in the node editor, then copy and paste the
|
||||||
|
@ -61,7 +61,6 @@ export const buildCanvasInpaintGraph = (
|
|||||||
img2imgStrength: strength,
|
img2imgStrength: strength,
|
||||||
seed,
|
seed,
|
||||||
vaePrecision,
|
vaePrecision,
|
||||||
shouldUseNoiseSettings,
|
|
||||||
shouldUseCpuNoise,
|
shouldUseCpuNoise,
|
||||||
maskBlur,
|
maskBlur,
|
||||||
maskBlurMethod,
|
maskBlurMethod,
|
||||||
@ -92,9 +91,7 @@ export const buildCanvasInpaintGraph = (
|
|||||||
|
|
||||||
let modelLoaderNodeId = MAIN_MODEL_LOADER;
|
let modelLoaderNodeId = MAIN_MODEL_LOADER;
|
||||||
|
|
||||||
const use_cpu = shouldUseNoiseSettings
|
const use_cpu = shouldUseCpuNoise;
|
||||||
? shouldUseCpuNoise
|
|
||||||
: shouldUseCpuNoise;
|
|
||||||
|
|
||||||
const graph: NonNullableGraph = {
|
const graph: NonNullableGraph = {
|
||||||
id: CANVAS_INPAINT_GRAPH,
|
id: CANVAS_INPAINT_GRAPH,
|
||||||
|
@ -63,7 +63,6 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
img2imgStrength: strength,
|
img2imgStrength: strength,
|
||||||
seed,
|
seed,
|
||||||
vaePrecision,
|
vaePrecision,
|
||||||
shouldUseNoiseSettings,
|
|
||||||
shouldUseCpuNoise,
|
shouldUseCpuNoise,
|
||||||
maskBlur,
|
maskBlur,
|
||||||
canvasCoherenceMode,
|
canvasCoherenceMode,
|
||||||
@ -96,9 +95,7 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
|
|
||||||
let modelLoaderNodeId = MAIN_MODEL_LOADER;
|
let modelLoaderNodeId = MAIN_MODEL_LOADER;
|
||||||
|
|
||||||
const use_cpu = shouldUseNoiseSettings
|
const use_cpu = shouldUseCpuNoise;
|
||||||
? shouldUseCpuNoise
|
|
||||||
: shouldUseCpuNoise;
|
|
||||||
|
|
||||||
const graph: NonNullableGraph = {
|
const graph: NonNullableGraph = {
|
||||||
id: CANVAS_OUTPAINT_GRAPH,
|
id: CANVAS_OUTPAINT_GRAPH,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { logger } from 'app/logging/logger';
|
import { logger } from 'app/logging/logger';
|
||||||
import { RootState } from 'app/store/store';
|
import { RootState } from 'app/store/store';
|
||||||
import { NonNullableGraph } from 'features/nodes/types/types';
|
import { NonNullableGraph } from 'features/nodes/types/types';
|
||||||
import { initialGenerationState } from 'features/parameters/store/generationSlice';
|
|
||||||
import { ImageDTO, ImageToLatentsInvocation } from 'services/api/types';
|
import { ImageDTO, ImageToLatentsInvocation } from 'services/api/types';
|
||||||
import { addControlNetToLinearGraph } from './addControlNetToLinearGraph';
|
import { addControlNetToLinearGraph } from './addControlNetToLinearGraph';
|
||||||
import { addIPAdapterToLinearGraph } from './addIPAdapterToLinearGraph';
|
import { addIPAdapterToLinearGraph } from './addIPAdapterToLinearGraph';
|
||||||
@ -48,7 +47,6 @@ export const buildCanvasSDXLImageToImageGraph = (
|
|||||||
vaePrecision,
|
vaePrecision,
|
||||||
clipSkip,
|
clipSkip,
|
||||||
shouldUseCpuNoise,
|
shouldUseCpuNoise,
|
||||||
shouldUseNoiseSettings,
|
|
||||||
seamlessXAxis,
|
seamlessXAxis,
|
||||||
seamlessYAxis,
|
seamlessYAxis,
|
||||||
} = state.generation;
|
} = state.generation;
|
||||||
@ -78,9 +76,7 @@ export const buildCanvasSDXLImageToImageGraph = (
|
|||||||
// Model Loader ID
|
// Model Loader ID
|
||||||
let modelLoaderNodeId = SDXL_MODEL_LOADER;
|
let modelLoaderNodeId = SDXL_MODEL_LOADER;
|
||||||
|
|
||||||
const use_cpu = shouldUseNoiseSettings
|
const use_cpu = shouldUseCpuNoise;
|
||||||
? shouldUseCpuNoise
|
|
||||||
: initialGenerationState.shouldUseCpuNoise;
|
|
||||||
|
|
||||||
// Construct Style Prompt
|
// Construct Style Prompt
|
||||||
const { joinedPositiveStylePrompt, joinedNegativeStylePrompt } =
|
const { joinedPositiveStylePrompt, joinedNegativeStylePrompt } =
|
||||||
|
@ -62,7 +62,6 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
steps,
|
steps,
|
||||||
seed,
|
seed,
|
||||||
vaePrecision,
|
vaePrecision,
|
||||||
shouldUseNoiseSettings,
|
|
||||||
shouldUseCpuNoise,
|
shouldUseCpuNoise,
|
||||||
maskBlur,
|
maskBlur,
|
||||||
maskBlurMethod,
|
maskBlurMethod,
|
||||||
@ -98,9 +97,7 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
|
|
||||||
let modelLoaderNodeId = SDXL_MODEL_LOADER;
|
let modelLoaderNodeId = SDXL_MODEL_LOADER;
|
||||||
|
|
||||||
const use_cpu = shouldUseNoiseSettings
|
const use_cpu = shouldUseCpuNoise;
|
||||||
? shouldUseCpuNoise
|
|
||||||
: shouldUseCpuNoise;
|
|
||||||
|
|
||||||
// Construct Style Prompt
|
// Construct Style Prompt
|
||||||
const { joinedPositiveStylePrompt, joinedNegativeStylePrompt } =
|
const { joinedPositiveStylePrompt, joinedNegativeStylePrompt } =
|
||||||
|
@ -64,7 +64,6 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
steps,
|
steps,
|
||||||
seed,
|
seed,
|
||||||
vaePrecision,
|
vaePrecision,
|
||||||
shouldUseNoiseSettings,
|
|
||||||
shouldUseCpuNoise,
|
shouldUseCpuNoise,
|
||||||
maskBlur,
|
maskBlur,
|
||||||
canvasCoherenceMode,
|
canvasCoherenceMode,
|
||||||
@ -102,9 +101,7 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
|
|
||||||
let modelLoaderNodeId = SDXL_MODEL_LOADER;
|
let modelLoaderNodeId = SDXL_MODEL_LOADER;
|
||||||
|
|
||||||
const use_cpu = shouldUseNoiseSettings
|
const use_cpu = shouldUseCpuNoise;
|
||||||
? shouldUseCpuNoise
|
|
||||||
: shouldUseCpuNoise;
|
|
||||||
|
|
||||||
// Construct Style Prompt
|
// Construct Style Prompt
|
||||||
const { joinedPositiveStylePrompt, joinedNegativeStylePrompt } =
|
const { joinedPositiveStylePrompt, joinedNegativeStylePrompt } =
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { logger } from 'app/logging/logger';
|
import { logger } from 'app/logging/logger';
|
||||||
import { RootState } from 'app/store/store';
|
import { RootState } from 'app/store/store';
|
||||||
import { NonNullableGraph } from 'features/nodes/types/types';
|
import { NonNullableGraph } from 'features/nodes/types/types';
|
||||||
import { initialGenerationState } from 'features/parameters/store/generationSlice';
|
|
||||||
import {
|
import {
|
||||||
DenoiseLatentsInvocation,
|
DenoiseLatentsInvocation,
|
||||||
ONNXTextToLatentsInvocation,
|
ONNXTextToLatentsInvocation,
|
||||||
@ -49,7 +48,6 @@ export const buildCanvasSDXLTextToImageGraph = (
|
|||||||
vaePrecision,
|
vaePrecision,
|
||||||
clipSkip,
|
clipSkip,
|
||||||
shouldUseCpuNoise,
|
shouldUseCpuNoise,
|
||||||
shouldUseNoiseSettings,
|
|
||||||
seamlessXAxis,
|
seamlessXAxis,
|
||||||
seamlessYAxis,
|
seamlessYAxis,
|
||||||
} = state.generation;
|
} = state.generation;
|
||||||
@ -72,9 +70,7 @@ export const buildCanvasSDXLTextToImageGraph = (
|
|||||||
throw new Error('No model found in state');
|
throw new Error('No model found in state');
|
||||||
}
|
}
|
||||||
|
|
||||||
const use_cpu = shouldUseNoiseSettings
|
const use_cpu = shouldUseCpuNoise;
|
||||||
? shouldUseCpuNoise
|
|
||||||
: initialGenerationState.shouldUseCpuNoise;
|
|
||||||
|
|
||||||
const isUsingOnnxModel = model.model_type === 'onnx';
|
const isUsingOnnxModel = model.model_type === 'onnx';
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { logger } from 'app/logging/logger';
|
import { logger } from 'app/logging/logger';
|
||||||
import { RootState } from 'app/store/store';
|
import { RootState } from 'app/store/store';
|
||||||
import { NonNullableGraph } from 'features/nodes/types/types';
|
import { NonNullableGraph } from 'features/nodes/types/types';
|
||||||
import { initialGenerationState } from 'features/parameters/store/generationSlice';
|
|
||||||
import {
|
import {
|
||||||
DenoiseLatentsInvocation,
|
DenoiseLatentsInvocation,
|
||||||
ONNXTextToLatentsInvocation,
|
ONNXTextToLatentsInvocation,
|
||||||
@ -47,7 +46,6 @@ export const buildCanvasTextToImageGraph = (
|
|||||||
vaePrecision,
|
vaePrecision,
|
||||||
clipSkip,
|
clipSkip,
|
||||||
shouldUseCpuNoise,
|
shouldUseCpuNoise,
|
||||||
shouldUseNoiseSettings,
|
|
||||||
seamlessXAxis,
|
seamlessXAxis,
|
||||||
seamlessYAxis,
|
seamlessYAxis,
|
||||||
} = state.generation;
|
} = state.generation;
|
||||||
@ -68,9 +66,7 @@ export const buildCanvasTextToImageGraph = (
|
|||||||
throw new Error('No model found in state');
|
throw new Error('No model found in state');
|
||||||
}
|
}
|
||||||
|
|
||||||
const use_cpu = shouldUseNoiseSettings
|
const use_cpu = shouldUseCpuNoise;
|
||||||
? shouldUseCpuNoise
|
|
||||||
: initialGenerationState.shouldUseCpuNoise;
|
|
||||||
|
|
||||||
const isUsingOnnxModel = model.model_type === 'onnx';
|
const isUsingOnnxModel = model.model_type === 'onnx';
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { logger } from 'app/logging/logger';
|
import { logger } from 'app/logging/logger';
|
||||||
import { RootState } from 'app/store/store';
|
import { RootState } from 'app/store/store';
|
||||||
import { NonNullableGraph } from 'features/nodes/types/types';
|
import { NonNullableGraph } from 'features/nodes/types/types';
|
||||||
import { initialGenerationState } from 'features/parameters/store/generationSlice';
|
|
||||||
import {
|
import {
|
||||||
ImageResizeInvocation,
|
ImageResizeInvocation,
|
||||||
ImageToLatentsInvocation,
|
ImageToLatentsInvocation,
|
||||||
@ -51,7 +50,6 @@ export const buildLinearImageToImageGraph = (
|
|||||||
height,
|
height,
|
||||||
clipSkip,
|
clipSkip,
|
||||||
shouldUseCpuNoise,
|
shouldUseCpuNoise,
|
||||||
shouldUseNoiseSettings,
|
|
||||||
vaePrecision,
|
vaePrecision,
|
||||||
seamlessXAxis,
|
seamlessXAxis,
|
||||||
seamlessYAxis,
|
seamlessYAxis,
|
||||||
@ -81,9 +79,7 @@ export const buildLinearImageToImageGraph = (
|
|||||||
|
|
||||||
let modelLoaderNodeId = MAIN_MODEL_LOADER;
|
let modelLoaderNodeId = MAIN_MODEL_LOADER;
|
||||||
|
|
||||||
const use_cpu = shouldUseNoiseSettings
|
const use_cpu = shouldUseCpuNoise;
|
||||||
? shouldUseCpuNoise
|
|
||||||
: initialGenerationState.shouldUseCpuNoise;
|
|
||||||
|
|
||||||
// copy-pasted graph from node editor, filled in with state values & friendly node ids
|
// copy-pasted graph from node editor, filled in with state values & friendly node ids
|
||||||
const graph: NonNullableGraph = {
|
const graph: NonNullableGraph = {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { logger } from 'app/logging/logger';
|
import { logger } from 'app/logging/logger';
|
||||||
import { RootState } from 'app/store/store';
|
import { RootState } from 'app/store/store';
|
||||||
import { NonNullableGraph } from 'features/nodes/types/types';
|
import { NonNullableGraph } from 'features/nodes/types/types';
|
||||||
import { initialGenerationState } from 'features/parameters/store/generationSlice';
|
|
||||||
import {
|
import {
|
||||||
ImageResizeInvocation,
|
ImageResizeInvocation,
|
||||||
ImageToLatentsInvocation,
|
ImageToLatentsInvocation,
|
||||||
@ -52,7 +51,6 @@ export const buildLinearSDXLImageToImageGraph = (
|
|||||||
height,
|
height,
|
||||||
clipSkip,
|
clipSkip,
|
||||||
shouldUseCpuNoise,
|
shouldUseCpuNoise,
|
||||||
shouldUseNoiseSettings,
|
|
||||||
vaePrecision,
|
vaePrecision,
|
||||||
seamlessXAxis,
|
seamlessXAxis,
|
||||||
seamlessYAxis,
|
seamlessYAxis,
|
||||||
@ -91,9 +89,7 @@ export const buildLinearSDXLImageToImageGraph = (
|
|||||||
// Model Loader ID
|
// Model Loader ID
|
||||||
let modelLoaderNodeId = SDXL_MODEL_LOADER;
|
let modelLoaderNodeId = SDXL_MODEL_LOADER;
|
||||||
|
|
||||||
const use_cpu = shouldUseNoiseSettings
|
const use_cpu = shouldUseCpuNoise;
|
||||||
? shouldUseCpuNoise
|
|
||||||
: initialGenerationState.shouldUseCpuNoise;
|
|
||||||
|
|
||||||
// Construct Style Prompt
|
// Construct Style Prompt
|
||||||
const { joinedPositiveStylePrompt, joinedNegativeStylePrompt } =
|
const { joinedPositiveStylePrompt, joinedNegativeStylePrompt } =
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { logger } from 'app/logging/logger';
|
import { logger } from 'app/logging/logger';
|
||||||
import { RootState } from 'app/store/store';
|
import { RootState } from 'app/store/store';
|
||||||
import { NonNullableGraph } from 'features/nodes/types/types';
|
import { NonNullableGraph } from 'features/nodes/types/types';
|
||||||
import { initialGenerationState } from 'features/parameters/store/generationSlice';
|
|
||||||
import { addControlNetToLinearGraph } from './addControlNetToLinearGraph';
|
import { addControlNetToLinearGraph } from './addControlNetToLinearGraph';
|
||||||
import { addIPAdapterToLinearGraph } from './addIPAdapterToLinearGraph';
|
import { addIPAdapterToLinearGraph } from './addIPAdapterToLinearGraph';
|
||||||
import { addNSFWCheckerToGraph } from './addNSFWCheckerToGraph';
|
import { addNSFWCheckerToGraph } from './addNSFWCheckerToGraph';
|
||||||
@ -41,7 +40,6 @@ export const buildLinearSDXLTextToImageGraph = (
|
|||||||
height,
|
height,
|
||||||
clipSkip,
|
clipSkip,
|
||||||
shouldUseCpuNoise,
|
shouldUseCpuNoise,
|
||||||
shouldUseNoiseSettings,
|
|
||||||
vaePrecision,
|
vaePrecision,
|
||||||
seamlessXAxis,
|
seamlessXAxis,
|
||||||
seamlessYAxis,
|
seamlessYAxis,
|
||||||
@ -54,9 +52,8 @@ export const buildLinearSDXLTextToImageGraph = (
|
|||||||
refinerStart,
|
refinerStart,
|
||||||
} = state.sdxl;
|
} = state.sdxl;
|
||||||
|
|
||||||
const use_cpu = shouldUseNoiseSettings
|
const use_cpu = shouldUseCpuNoise;
|
||||||
? shouldUseCpuNoise
|
|
||||||
: initialGenerationState.shouldUseCpuNoise;
|
|
||||||
if (!model) {
|
if (!model) {
|
||||||
log.error('No model found in state');
|
log.error('No model found in state');
|
||||||
throw new Error('No model found in state');
|
throw new Error('No model found in state');
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { logger } from 'app/logging/logger';
|
import { logger } from 'app/logging/logger';
|
||||||
import { RootState } from 'app/store/store';
|
import { RootState } from 'app/store/store';
|
||||||
import { NonNullableGraph } from 'features/nodes/types/types';
|
import { NonNullableGraph } from 'features/nodes/types/types';
|
||||||
import { initialGenerationState } from 'features/parameters/store/generationSlice';
|
|
||||||
import {
|
import {
|
||||||
DenoiseLatentsInvocation,
|
DenoiseLatentsInvocation,
|
||||||
ONNXTextToLatentsInvocation,
|
ONNXTextToLatentsInvocation,
|
||||||
@ -43,16 +42,13 @@ export const buildLinearTextToImageGraph = (
|
|||||||
height,
|
height,
|
||||||
clipSkip,
|
clipSkip,
|
||||||
shouldUseCpuNoise,
|
shouldUseCpuNoise,
|
||||||
shouldUseNoiseSettings,
|
|
||||||
vaePrecision,
|
vaePrecision,
|
||||||
seamlessXAxis,
|
seamlessXAxis,
|
||||||
seamlessYAxis,
|
seamlessYAxis,
|
||||||
seed,
|
seed,
|
||||||
} = state.generation;
|
} = state.generation;
|
||||||
|
|
||||||
const use_cpu = shouldUseNoiseSettings
|
const use_cpu = shouldUseCpuNoise;
|
||||||
? shouldUseCpuNoise
|
|
||||||
: initialGenerationState.shouldUseCpuNoise;
|
|
||||||
|
|
||||||
if (!model) {
|
if (!model) {
|
||||||
log.error('No model found in state');
|
log.error('No model found in state');
|
||||||
|
@ -1,37 +1,64 @@
|
|||||||
import { Flex } from '@chakra-ui/react';
|
import { Divider, Flex } from '@chakra-ui/react';
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import { RootState, stateSelector } from 'app/store/store';
|
import { RootState, stateSelector } from 'app/store/store';
|
||||||
import { useAppSelector } from 'app/store/storeHooks';
|
import { useAppSelector } from 'app/store/storeHooks';
|
||||||
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
|
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
|
||||||
import IAICollapse from 'common/components/IAICollapse';
|
import IAICollapse from 'common/components/IAICollapse';
|
||||||
import ParamClipSkip from './ParamClipSkip';
|
import { useMemo } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { ParamCpuNoiseToggle } from '../Noise/ParamCpuNoise';
|
||||||
|
import ParamSeamless from '../Seamless/ParamSeamless';
|
||||||
|
import ParamClipSkip from './ParamClipSkip';
|
||||||
|
|
||||||
const selector = createSelector(
|
const selector = createSelector(
|
||||||
stateSelector,
|
stateSelector,
|
||||||
(state: RootState) => {
|
(state: RootState) => {
|
||||||
const clipSkip = state.generation.clipSkip;
|
const { clipSkip, seamlessXAxis, seamlessYAxis, shouldUseCpuNoise } =
|
||||||
return {
|
state.generation;
|
||||||
activeLabel: clipSkip > 0 ? 'Clip Skip' : undefined,
|
|
||||||
};
|
return { clipSkip, seamlessXAxis, seamlessYAxis, shouldUseCpuNoise };
|
||||||
},
|
},
|
||||||
defaultSelectorOptions
|
defaultSelectorOptions
|
||||||
);
|
);
|
||||||
|
|
||||||
export default function ParamAdvancedCollapse() {
|
export default function ParamAdvancedCollapse() {
|
||||||
const { activeLabel } = useAppSelector(selector);
|
const { clipSkip, seamlessXAxis, seamlessYAxis, shouldUseCpuNoise } =
|
||||||
const shouldShowAdvancedOptions = useAppSelector(
|
useAppSelector(selector);
|
||||||
(state: RootState) => state.generation.shouldShowAdvancedOptions
|
|
||||||
);
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
if (!shouldShowAdvancedOptions) {
|
const activeLabel = useMemo(() => {
|
||||||
return null;
|
const activeLabel: string[] = [];
|
||||||
|
|
||||||
|
if (shouldUseCpuNoise) {
|
||||||
|
activeLabel.push(t('parameters.cpuNoise'));
|
||||||
|
} else {
|
||||||
|
activeLabel.push(t('parameters.gpuNoise'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (clipSkip > 0) {
|
||||||
|
activeLabel.push(
|
||||||
|
t('parameters.clipSkipWithLayerCount', { layerCount: clipSkip })
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (seamlessXAxis && seamlessYAxis) {
|
||||||
|
activeLabel.push(t('parameters.seamlessX&Y'));
|
||||||
|
} else if (seamlessXAxis) {
|
||||||
|
activeLabel.push(t('parameters.seamlessX'));
|
||||||
|
} else if (seamlessYAxis) {
|
||||||
|
activeLabel.push(t('parameters.seamlessY'));
|
||||||
|
}
|
||||||
|
|
||||||
|
return activeLabel.join(', ');
|
||||||
|
}, [clipSkip, seamlessXAxis, seamlessYAxis, shouldUseCpuNoise, t]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IAICollapse label={t('common.advanced')} activeLabel={activeLabel}>
|
<IAICollapse label={t('common.advanced')} activeLabel={activeLabel}>
|
||||||
<Flex sx={{ flexDir: 'column', gap: 2 }}>
|
<Flex sx={{ flexDir: 'column', gap: 2 }}>
|
||||||
|
<ParamSeamless />
|
||||||
|
<Divider />
|
||||||
<ParamClipSkip />
|
<ParamClipSkip />
|
||||||
|
<Divider pt={2} />
|
||||||
|
<ParamCpuNoiseToggle />
|
||||||
</Flex>
|
</Flex>
|
||||||
</IAICollapse>
|
</IAICollapse>
|
||||||
);
|
);
|
||||||
|
@ -1,37 +1,27 @@
|
|||||||
import { createSelector } from '@reduxjs/toolkit';
|
|
||||||
import { stateSelector } from 'app/store/store';
|
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||||
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
|
|
||||||
import IAIInformationalPopover from 'common/components/IAIInformationalPopover';
|
import IAIInformationalPopover from 'common/components/IAIInformationalPopover';
|
||||||
import IAISwitch from 'common/components/IAISwitch';
|
import IAISwitch from 'common/components/IAISwitch';
|
||||||
import { shouldUseCpuNoiseChanged } from 'features/parameters/store/generationSlice';
|
import { shouldUseCpuNoiseChanged } from 'features/parameters/store/generationSlice';
|
||||||
import { ChangeEvent } from 'react';
|
import { ChangeEvent, useCallback } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
const selector = createSelector(
|
|
||||||
stateSelector,
|
|
||||||
(state) => {
|
|
||||||
const { shouldUseNoiseSettings, shouldUseCpuNoise } = state.generation;
|
|
||||||
return {
|
|
||||||
isDisabled: !shouldUseNoiseSettings,
|
|
||||||
shouldUseCpuNoise,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
defaultSelectorOptions
|
|
||||||
);
|
|
||||||
|
|
||||||
export const ParamCpuNoiseToggle = () => {
|
export const ParamCpuNoiseToggle = () => {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
const { isDisabled, shouldUseCpuNoise } = useAppSelector(selector);
|
const shouldUseCpuNoise = useAppSelector(
|
||||||
|
(state) => state.generation.shouldUseCpuNoise
|
||||||
|
);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const handleChange = (e: ChangeEvent<HTMLInputElement>) =>
|
const handleChange = useCallback(
|
||||||
|
(e: ChangeEvent<HTMLInputElement>) => {
|
||||||
dispatch(shouldUseCpuNoiseChanged(e.target.checked));
|
dispatch(shouldUseCpuNoiseChanged(e.target.checked));
|
||||||
|
},
|
||||||
|
[dispatch]
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IAIInformationalPopover details="noiseUseCPU">
|
<IAIInformationalPopover details="noiseUseCPU">
|
||||||
<IAISwitch
|
<IAISwitch
|
||||||
isDisabled={isDisabled}
|
|
||||||
label={t('parameters.useCpuNoise')}
|
label={t('parameters.useCpuNoise')}
|
||||||
isChecked={shouldUseCpuNoise}
|
isChecked={shouldUseCpuNoise}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
|
@ -1,55 +0,0 @@
|
|||||||
import { Flex } from '@chakra-ui/react';
|
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
|
||||||
import { stateSelector } from 'app/store/store';
|
|
||||||
import { useAppSelector } from 'app/store/storeHooks';
|
|
||||||
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
|
|
||||||
import IAICollapse from 'common/components/IAICollapse';
|
|
||||||
import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus';
|
|
||||||
import { memo } from 'react';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { ParamCpuNoiseToggle } from './ParamCpuNoise';
|
|
||||||
import ParamNoiseThreshold from './ParamNoiseThreshold';
|
|
||||||
import { ParamNoiseToggle } from './ParamNoiseToggle';
|
|
||||||
import ParamPerlinNoise from './ParamPerlinNoise';
|
|
||||||
|
|
||||||
const selector = createSelector(
|
|
||||||
stateSelector,
|
|
||||||
(state) => {
|
|
||||||
const { shouldUseNoiseSettings } = state.generation;
|
|
||||||
return {
|
|
||||||
activeLabel: shouldUseNoiseSettings ? 'Enabled' : undefined,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
defaultSelectorOptions
|
|
||||||
);
|
|
||||||
|
|
||||||
const ParamNoiseCollapse = () => {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const isNoiseEnabled = useFeatureStatus('noise').isFeatureEnabled;
|
|
||||||
const isPerlinNoiseEnabled = useFeatureStatus('perlinNoise').isFeatureEnabled;
|
|
||||||
const isNoiseThresholdEnabled =
|
|
||||||
useFeatureStatus('noiseThreshold').isFeatureEnabled;
|
|
||||||
|
|
||||||
const { activeLabel } = useAppSelector(selector);
|
|
||||||
|
|
||||||
if (!isNoiseEnabled) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<IAICollapse
|
|
||||||
label={t('parameters.noiseSettings')}
|
|
||||||
activeLabel={activeLabel}
|
|
||||||
>
|
|
||||||
<Flex sx={{ gap: 2, flexDirection: 'column' }}>
|
|
||||||
<ParamNoiseToggle />
|
|
||||||
<ParamCpuNoiseToggle />
|
|
||||||
{isPerlinNoiseEnabled && <ParamPerlinNoise />}
|
|
||||||
{isNoiseThresholdEnabled && <ParamNoiseThreshold />}
|
|
||||||
</Flex>
|
|
||||||
</IAICollapse>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default memo(ParamNoiseCollapse);
|
|
@ -9,9 +9,8 @@ import { useTranslation } from 'react-i18next';
|
|||||||
const selector = createSelector(
|
const selector = createSelector(
|
||||||
stateSelector,
|
stateSelector,
|
||||||
(state) => {
|
(state) => {
|
||||||
const { shouldUseNoiseSettings, threshold } = state.generation;
|
const { threshold } = state.generation;
|
||||||
return {
|
return {
|
||||||
isDisabled: !shouldUseNoiseSettings,
|
|
||||||
threshold,
|
threshold,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -20,12 +19,11 @@ const selector = createSelector(
|
|||||||
|
|
||||||
export default function ParamNoiseThreshold() {
|
export default function ParamNoiseThreshold() {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
const { threshold, isDisabled } = useAppSelector(selector);
|
const { threshold } = useAppSelector(selector);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IAISlider
|
<IAISlider
|
||||||
isDisabled={isDisabled}
|
|
||||||
label={t('parameters.noiseThreshold')}
|
label={t('parameters.noiseThreshold')}
|
||||||
min={0}
|
min={0}
|
||||||
max={20}
|
max={20}
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
import type { RootState } from 'app/store/store';
|
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
|
||||||
import IAIInformationalPopover from 'common/components/IAIInformationalPopover';
|
|
||||||
import IAISwitch from 'common/components/IAISwitch';
|
|
||||||
import { setShouldUseNoiseSettings } from 'features/parameters/store/generationSlice';
|
|
||||||
import { ChangeEvent } from 'react';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
|
|
||||||
export const ParamNoiseToggle = () => {
|
|
||||||
const dispatch = useAppDispatch();
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const shouldUseNoiseSettings = useAppSelector(
|
|
||||||
(state: RootState) => state.generation.shouldUseNoiseSettings
|
|
||||||
);
|
|
||||||
|
|
||||||
const handleChange = (e: ChangeEvent<HTMLInputElement>) =>
|
|
||||||
dispatch(setShouldUseNoiseSettings(e.target.checked));
|
|
||||||
|
|
||||||
return (
|
|
||||||
<IAIInformationalPopover details="noiseEnable">
|
|
||||||
<IAISwitch
|
|
||||||
label={t('parameters.enableNoiseSettings')}
|
|
||||||
isChecked={shouldUseNoiseSettings}
|
|
||||||
onChange={handleChange}
|
|
||||||
/>
|
|
||||||
</IAIInformationalPopover>
|
|
||||||
);
|
|
||||||
};
|
|
@ -9,9 +9,8 @@ import { useTranslation } from 'react-i18next';
|
|||||||
const selector = createSelector(
|
const selector = createSelector(
|
||||||
stateSelector,
|
stateSelector,
|
||||||
(state) => {
|
(state) => {
|
||||||
const { shouldUseNoiseSettings, perlin } = state.generation;
|
const { perlin } = state.generation;
|
||||||
return {
|
return {
|
||||||
isDisabled: !shouldUseNoiseSettings,
|
|
||||||
perlin,
|
perlin,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -20,12 +19,11 @@ const selector = createSelector(
|
|||||||
|
|
||||||
export default function ParamPerlinNoise() {
|
export default function ParamPerlinNoise() {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
const { perlin, isDisabled } = useAppSelector(selector);
|
const { perlin } = useAppSelector(selector);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IAISlider
|
<IAISlider
|
||||||
isDisabled={isDisabled}
|
|
||||||
label={t('parameters.perlinNoise')}
|
label={t('parameters.perlinNoise')}
|
||||||
min={0}
|
min={0}
|
||||||
max={1}
|
max={1}
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
import { Box, Flex, FormControl, FormLabel } from '@chakra-ui/react';
|
||||||
|
import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus';
|
||||||
|
import { memo } from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import ParamSeamlessXAxis from './ParamSeamlessXAxis';
|
||||||
|
import ParamSeamlessYAxis from './ParamSeamlessYAxis';
|
||||||
|
|
||||||
|
const ParamSeamless = () => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
const isSeamlessEnabled = useFeatureStatus('seamless').isFeatureEnabled;
|
||||||
|
|
||||||
|
if (!isSeamlessEnabled) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<FormControl>
|
||||||
|
<FormLabel>{t('parameters.seamlessTiling')}</FormLabel>{' '}
|
||||||
|
<Flex sx={{ gap: 5 }}>
|
||||||
|
<Box flexGrow={1}>
|
||||||
|
<ParamSeamlessXAxis />
|
||||||
|
</Box>
|
||||||
|
<Box flexGrow={1}>
|
||||||
|
<ParamSeamlessYAxis />
|
||||||
|
</Box>
|
||||||
|
</Flex>
|
||||||
|
</FormControl>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default memo(ParamSeamless);
|
@ -1,65 +0,0 @@
|
|||||||
import { Box, Flex } from '@chakra-ui/react';
|
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
|
||||||
import { useAppSelector } from 'app/store/storeHooks';
|
|
||||||
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
|
|
||||||
import IAICollapse from 'common/components/IAICollapse';
|
|
||||||
import { generationSelector } from 'features/parameters/store/generationSelectors';
|
|
||||||
import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus';
|
|
||||||
import { memo } from 'react';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import ParamSeamlessXAxis from './ParamSeamlessXAxis';
|
|
||||||
import ParamSeamlessYAxis from './ParamSeamlessYAxis';
|
|
||||||
|
|
||||||
const getActiveLabel = (seamlessXAxis: boolean, seamlessYAxis: boolean) => {
|
|
||||||
if (seamlessXAxis && seamlessYAxis) {
|
|
||||||
return 'X & Y';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (seamlessXAxis) {
|
|
||||||
return 'X';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (seamlessYAxis) {
|
|
||||||
return 'Y';
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const selector = createSelector(
|
|
||||||
generationSelector,
|
|
||||||
(generation) => {
|
|
||||||
const { seamlessXAxis, seamlessYAxis } = generation;
|
|
||||||
|
|
||||||
const activeLabel = getActiveLabel(seamlessXAxis, seamlessYAxis);
|
|
||||||
return { activeLabel };
|
|
||||||
},
|
|
||||||
defaultSelectorOptions
|
|
||||||
);
|
|
||||||
|
|
||||||
const ParamSeamlessCollapse = () => {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
const { activeLabel } = useAppSelector(selector);
|
|
||||||
|
|
||||||
const isSeamlessEnabled = useFeatureStatus('seamless').isFeatureEnabled;
|
|
||||||
|
|
||||||
if (!isSeamlessEnabled) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<IAICollapse
|
|
||||||
label={t('parameters.seamlessTiling')}
|
|
||||||
activeLabel={activeLabel}
|
|
||||||
>
|
|
||||||
<Flex sx={{ gap: 5 }}>
|
|
||||||
<Box flexGrow={1}>
|
|
||||||
<ParamSeamlessXAxis />
|
|
||||||
</Box>
|
|
||||||
<Box flexGrow={1}>
|
|
||||||
<ParamSeamlessYAxis />
|
|
||||||
</Box>
|
|
||||||
</Flex>
|
|
||||||
</IAICollapse>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default memo(ParamSeamlessCollapse);
|
|
@ -46,7 +46,6 @@ export interface GenerationState {
|
|||||||
shouldFitToWidthHeight: boolean;
|
shouldFitToWidthHeight: boolean;
|
||||||
shouldGenerateVariations: boolean;
|
shouldGenerateVariations: boolean;
|
||||||
shouldRandomizeSeed: boolean;
|
shouldRandomizeSeed: boolean;
|
||||||
shouldUseNoiseSettings: boolean;
|
|
||||||
steps: StepsParam;
|
steps: StepsParam;
|
||||||
threshold: number;
|
threshold: number;
|
||||||
infillTileSize: number;
|
infillTileSize: number;
|
||||||
@ -88,7 +87,6 @@ export const initialGenerationState: GenerationState = {
|
|||||||
shouldFitToWidthHeight: true,
|
shouldFitToWidthHeight: true,
|
||||||
shouldGenerateVariations: false,
|
shouldGenerateVariations: false,
|
||||||
shouldRandomizeSeed: true,
|
shouldRandomizeSeed: true,
|
||||||
shouldUseNoiseSettings: false,
|
|
||||||
steps: 50,
|
steps: 50,
|
||||||
threshold: 0,
|
threshold: 0,
|
||||||
infillTileSize: 32,
|
infillTileSize: 32,
|
||||||
@ -244,9 +242,6 @@ export const generationSlice = createSlice({
|
|||||||
setVerticalSymmetrySteps: (state, action: PayloadAction<number>) => {
|
setVerticalSymmetrySteps: (state, action: PayloadAction<number>) => {
|
||||||
state.verticalSymmetrySteps = action.payload;
|
state.verticalSymmetrySteps = action.payload;
|
||||||
},
|
},
|
||||||
setShouldUseNoiseSettings: (state, action: PayloadAction<boolean>) => {
|
|
||||||
state.shouldUseNoiseSettings = action.payload;
|
|
||||||
},
|
|
||||||
initialImageChanged: (state, action: PayloadAction<ImageDTO>) => {
|
initialImageChanged: (state, action: PayloadAction<ImageDTO>) => {
|
||||||
const { image_name, width, height } = action.payload;
|
const { image_name, width, height } = action.payload;
|
||||||
state.initialImage = { imageName: image_name, width, height };
|
state.initialImage = { imageName: image_name, width, height };
|
||||||
@ -278,12 +273,6 @@ export const generationSlice = createSlice({
|
|||||||
shouldUseCpuNoiseChanged: (state, action: PayloadAction<boolean>) => {
|
shouldUseCpuNoiseChanged: (state, action: PayloadAction<boolean>) => {
|
||||||
state.shouldUseCpuNoise = action.payload;
|
state.shouldUseCpuNoise = action.payload;
|
||||||
},
|
},
|
||||||
setShouldShowAdvancedOptions: (state, action: PayloadAction<boolean>) => {
|
|
||||||
state.shouldShowAdvancedOptions = action.payload;
|
|
||||||
if (!action.payload) {
|
|
||||||
state.clipSkip = 0;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setAspectRatio: (state, action: PayloadAction<number | null>) => {
|
setAspectRatio: (state, action: PayloadAction<number | null>) => {
|
||||||
const newAspectRatio = action.payload;
|
const newAspectRatio = action.payload;
|
||||||
state.aspectRatio = newAspectRatio;
|
state.aspectRatio = newAspectRatio;
|
||||||
@ -313,12 +302,6 @@ export const generationSlice = createSlice({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.addCase(setShouldShowAdvancedOptions, (state, action) => {
|
|
||||||
const advancedOptionsStatus = action.payload;
|
|
||||||
if (!advancedOptionsStatus) {
|
|
||||||
state.clipSkip = 0;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -359,12 +342,10 @@ export const {
|
|||||||
initialImageChanged,
|
initialImageChanged,
|
||||||
modelChanged,
|
modelChanged,
|
||||||
vaeSelected,
|
vaeSelected,
|
||||||
setShouldUseNoiseSettings,
|
|
||||||
setSeamlessXAxis,
|
setSeamlessXAxis,
|
||||||
setSeamlessYAxis,
|
setSeamlessYAxis,
|
||||||
setClipSkip,
|
setClipSkip,
|
||||||
shouldUseCpuNoiseChanged,
|
shouldUseCpuNoiseChanged,
|
||||||
setShouldShowAdvancedOptions,
|
|
||||||
setAspectRatio,
|
setAspectRatio,
|
||||||
setShouldLockAspectRatio,
|
setShouldLockAspectRatio,
|
||||||
vaePrecisionChanged,
|
vaePrecisionChanged,
|
||||||
|
@ -59,16 +59,22 @@ const QueueItemComponent = ({ index, item, context }: InnerItemProps) => {
|
|||||||
return `${seconds}s`;
|
return `${seconds}s`;
|
||||||
}, [item]);
|
}, [item]);
|
||||||
|
|
||||||
|
const isCanceled = useMemo(
|
||||||
|
() => ['canceled', 'completed', 'failed'].includes(item.status),
|
||||||
|
[item.status]
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex
|
<Flex
|
||||||
flexDir="column"
|
flexDir="column"
|
||||||
borderRadius="base"
|
|
||||||
aria-selected={isOpen}
|
aria-selected={isOpen}
|
||||||
fontSize="sm"
|
fontSize="sm"
|
||||||
|
borderRadius="base"
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
sx={sx}
|
sx={sx}
|
||||||
>
|
>
|
||||||
<Flex
|
<Flex
|
||||||
|
minH={9}
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
gap={4}
|
gap={4}
|
||||||
p={1.5}
|
p={1.5}
|
||||||
@ -128,10 +134,8 @@ const QueueItemComponent = ({ index, item, context }: InnerItemProps) => {
|
|||||||
<ButtonGroup size="xs" variant="ghost">
|
<ButtonGroup size="xs" variant="ghost">
|
||||||
<IAIIconButton
|
<IAIIconButton
|
||||||
onClick={handleCancelQueueItem}
|
onClick={handleCancelQueueItem}
|
||||||
|
isDisabled={isCanceled}
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
isDisabled={['canceled', 'completed', 'failed'].includes(
|
|
||||||
item.status
|
|
||||||
)}
|
|
||||||
aria-label={t('queue.cancelItem')}
|
aria-label={t('queue.cancelItem')}
|
||||||
icon={<FaTimes />}
|
icon={<FaTimes />}
|
||||||
/>
|
/>
|
||||||
|
@ -31,7 +31,7 @@ const QueueItemComponent = ({ queueItemDTO }: Props) => {
|
|||||||
|
|
||||||
const statusAndTiming = useMemo(() => {
|
const statusAndTiming = useMemo(() => {
|
||||||
if (!queueItem) {
|
if (!queueItem) {
|
||||||
return '';
|
return t('common.loading');
|
||||||
}
|
}
|
||||||
if (!queueItem.completed_at || !queueItem.started_at) {
|
if (!queueItem.completed_at || !queueItem.started_at) {
|
||||||
return t(`queue.${queueItem.status}`);
|
return t(`queue.${queueItem.status}`);
|
||||||
@ -62,6 +62,7 @@ const QueueItemComponent = ({ queueItemDTO }: Props) => {
|
|||||||
justifyContent="space-between"
|
justifyContent="space-between"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
borderRadius="base"
|
borderRadius="base"
|
||||||
|
h={20}
|
||||||
>
|
>
|
||||||
<QueueItemData label={t('queue.status')} data={statusAndTiming} />
|
<QueueItemData label={t('queue.status')} data={statusAndTiming} />
|
||||||
<QueueItemData label={t('queue.item')} data={item_id} />
|
<QueueItemData label={t('queue.item')} data={item_id} />
|
||||||
@ -136,9 +137,17 @@ type QueueItemDataProps = { label: string; data: ReactNode };
|
|||||||
|
|
||||||
const QueueItemData = ({ label, data }: QueueItemDataProps) => {
|
const QueueItemData = ({ label, data }: QueueItemDataProps) => {
|
||||||
return (
|
return (
|
||||||
<Flex flexDir="column" p={1} gap={1} overflow="hidden">
|
<Flex
|
||||||
|
flexDir="column"
|
||||||
|
justifyContent="flex-start"
|
||||||
|
p={1}
|
||||||
|
gap={1}
|
||||||
|
overflow="hidden"
|
||||||
|
h="full"
|
||||||
|
w="full"
|
||||||
|
>
|
||||||
<Heading
|
<Heading
|
||||||
size="sm"
|
size="md"
|
||||||
overflow="hidden"
|
overflow="hidden"
|
||||||
textOverflow="ellipsis"
|
textOverflow="ellipsis"
|
||||||
whiteSpace="nowrap"
|
whiteSpace="nowrap"
|
||||||
|
@ -21,16 +21,16 @@ const QueueListHeader = () => {
|
|||||||
>
|
>
|
||||||
<Text variant="subtext">#</Text>
|
<Text variant="subtext">#</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex w={COLUMN_WIDTHS.statusBadge} alignItems="center">
|
<Flex ps={0.5} w={COLUMN_WIDTHS.statusBadge} alignItems="center">
|
||||||
<Text variant="subtext">status</Text>
|
<Text variant="subtext">status</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex w={COLUMN_WIDTHS.time} alignItems="center">
|
<Flex ps={0.5} w={COLUMN_WIDTHS.time} alignItems="center">
|
||||||
<Text variant="subtext">time</Text>
|
<Text variant="subtext">time</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex w={COLUMN_WIDTHS.batchId} alignItems="center">
|
<Flex ps={0.5} w={COLUMN_WIDTHS.batchId} alignItems="center">
|
||||||
<Text variant="subtext">batch</Text>
|
<Text variant="subtext">batch</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex alignItems="center" w={COLUMN_WIDTHS.fieldValues}>
|
<Flex ps={0.5} w={COLUMN_WIDTHS.fieldValues} alignItems="center">
|
||||||
<Text variant="subtext">batch field values</Text>
|
<Text variant="subtext">batch field values</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import ParamDynamicPromptsCollapse from 'features/dynamicPrompts/components/ParamDynamicPromptsCollapse';
|
import ParamDynamicPromptsCollapse from 'features/dynamicPrompts/components/ParamDynamicPromptsCollapse';
|
||||||
import ParamLoraCollapse from 'features/lora/components/ParamLoraCollapse';
|
import ParamLoraCollapse from 'features/lora/components/ParamLoraCollapse';
|
||||||
|
import ParamAdvancedCollapse from 'features/parameters/components/Parameters/Advanced/ParamAdvancedCollapse';
|
||||||
import ParamControlNetCollapse from 'features/parameters/components/Parameters/ControlNet/ParamControlNetCollapse';
|
import ParamControlNetCollapse from 'features/parameters/components/Parameters/ControlNet/ParamControlNetCollapse';
|
||||||
import ParamNoiseCollapse from 'features/parameters/components/Parameters/Noise/ParamNoiseCollapse';
|
|
||||||
import ParamSeamlessCollapse from 'features/parameters/components/Parameters/Seamless/ParamSeamlessCollapse';
|
|
||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
import ParamSDXLPromptArea from './ParamSDXLPromptArea';
|
import ParamSDXLPromptArea from './ParamSDXLPromptArea';
|
||||||
import ParamSDXLRefinerCollapse from './ParamSDXLRefinerCollapse';
|
import ParamSDXLRefinerCollapse from './ParamSDXLRefinerCollapse';
|
||||||
@ -17,8 +16,7 @@ const SDXLImageToImageTabParameters = () => {
|
|||||||
<ParamControlNetCollapse />
|
<ParamControlNetCollapse />
|
||||||
<ParamLoraCollapse />
|
<ParamLoraCollapse />
|
||||||
<ParamDynamicPromptsCollapse />
|
<ParamDynamicPromptsCollapse />
|
||||||
<ParamNoiseCollapse />
|
<ParamAdvancedCollapse />
|
||||||
<ParamSeamlessCollapse />
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import ParamDynamicPromptsCollapse from 'features/dynamicPrompts/components/ParamDynamicPromptsCollapse';
|
import ParamDynamicPromptsCollapse from 'features/dynamicPrompts/components/ParamDynamicPromptsCollapse';
|
||||||
import ParamLoraCollapse from 'features/lora/components/ParamLoraCollapse';
|
import ParamLoraCollapse from 'features/lora/components/ParamLoraCollapse';
|
||||||
|
import ParamAdvancedCollapse from 'features/parameters/components/Parameters/Advanced/ParamAdvancedCollapse';
|
||||||
import ParamControlNetCollapse from 'features/parameters/components/Parameters/ControlNet/ParamControlNetCollapse';
|
import ParamControlNetCollapse from 'features/parameters/components/Parameters/ControlNet/ParamControlNetCollapse';
|
||||||
import ParamNoiseCollapse from 'features/parameters/components/Parameters/Noise/ParamNoiseCollapse';
|
|
||||||
import ParamSeamlessCollapse from 'features/parameters/components/Parameters/Seamless/ParamSeamlessCollapse';
|
|
||||||
import TextToImageTabCoreParameters from 'features/ui/components/tabs/TextToImage/TextToImageTabCoreParameters';
|
import TextToImageTabCoreParameters from 'features/ui/components/tabs/TextToImage/TextToImageTabCoreParameters';
|
||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
import ParamSDXLPromptArea from './ParamSDXLPromptArea';
|
import ParamSDXLPromptArea from './ParamSDXLPromptArea';
|
||||||
@ -17,8 +16,7 @@ const SDXLTextToImageTabParameters = () => {
|
|||||||
<ParamControlNetCollapse />
|
<ParamControlNetCollapse />
|
||||||
<ParamLoraCollapse />
|
<ParamLoraCollapse />
|
||||||
<ParamDynamicPromptsCollapse />
|
<ParamDynamicPromptsCollapse />
|
||||||
<ParamNoiseCollapse />
|
<ParamAdvancedCollapse />
|
||||||
<ParamSeamlessCollapse />
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
import ParamDynamicPromptsCollapse from 'features/dynamicPrompts/components/ParamDynamicPromptsCollapse';
|
import ParamDynamicPromptsCollapse from 'features/dynamicPrompts/components/ParamDynamicPromptsCollapse';
|
||||||
import ParamLoraCollapse from 'features/lora/components/ParamLoraCollapse';
|
import ParamLoraCollapse from 'features/lora/components/ParamLoraCollapse';
|
||||||
|
import ParamAdvancedCollapse from 'features/parameters/components/Parameters/Advanced/ParamAdvancedCollapse';
|
||||||
import ParamCompositingSettingsCollapse from 'features/parameters/components/Parameters/Canvas/Compositing/ParamCompositingSettingsCollapse';
|
import ParamCompositingSettingsCollapse from 'features/parameters/components/Parameters/Canvas/Compositing/ParamCompositingSettingsCollapse';
|
||||||
import ParamInfillAndScalingCollapse from 'features/parameters/components/Parameters/Canvas/InfillAndScaling/ParamInfillAndScalingCollapse';
|
import ParamInfillAndScalingCollapse from 'features/parameters/components/Parameters/Canvas/InfillAndScaling/ParamInfillAndScalingCollapse';
|
||||||
import ParamControlNetCollapse from 'features/parameters/components/Parameters/ControlNet/ParamControlNetCollapse';
|
import ParamControlNetCollapse from 'features/parameters/components/Parameters/ControlNet/ParamControlNetCollapse';
|
||||||
import ParamNoiseCollapse from 'features/parameters/components/Parameters/Noise/ParamNoiseCollapse';
|
|
||||||
import ParamSeamlessCollapse from 'features/parameters/components/Parameters/Seamless/ParamSeamlessCollapse';
|
|
||||||
import ParamSDXLPromptArea from './ParamSDXLPromptArea';
|
import ParamSDXLPromptArea from './ParamSDXLPromptArea';
|
||||||
import ParamSDXLRefinerCollapse from './ParamSDXLRefinerCollapse';
|
import ParamSDXLRefinerCollapse from './ParamSDXLRefinerCollapse';
|
||||||
import SDXLUnifiedCanvasTabCoreParameters from './SDXLUnifiedCanvasTabCoreParameters';
|
import SDXLUnifiedCanvasTabCoreParameters from './SDXLUnifiedCanvasTabCoreParameters';
|
||||||
@ -18,10 +17,9 @@ export default function SDXLUnifiedCanvasTabParameters() {
|
|||||||
<ParamControlNetCollapse />
|
<ParamControlNetCollapse />
|
||||||
<ParamLoraCollapse />
|
<ParamLoraCollapse />
|
||||||
<ParamDynamicPromptsCollapse />
|
<ParamDynamicPromptsCollapse />
|
||||||
<ParamNoiseCollapse />
|
|
||||||
<ParamInfillAndScalingCollapse />
|
<ParamInfillAndScalingCollapse />
|
||||||
<ParamCompositingSettingsCollapse />
|
<ParamCompositingSettingsCollapse />
|
||||||
<ParamSeamlessCollapse />
|
<ParamAdvancedCollapse />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,6 @@ import { stateSelector } from 'app/store/store';
|
|||||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||||
import IAIButton from 'common/components/IAIButton';
|
import IAIButton from 'common/components/IAIButton';
|
||||||
import IAIMantineSelect from 'common/components/IAIMantineSelect';
|
import IAIMantineSelect from 'common/components/IAIMantineSelect';
|
||||||
import { setShouldShowAdvancedOptions } from 'features/parameters/store/generationSlice';
|
|
||||||
import {
|
import {
|
||||||
consoleLogLevelChanged,
|
consoleLogLevelChanged,
|
||||||
setEnableImageDebugging,
|
setEnableImageDebugging,
|
||||||
@ -30,6 +29,7 @@ import {
|
|||||||
shouldUseNSFWCheckerChanged,
|
shouldUseNSFWCheckerChanged,
|
||||||
shouldUseWatermarkerChanged,
|
shouldUseWatermarkerChanged,
|
||||||
} from 'features/system/store/systemSlice';
|
} from 'features/system/store/systemSlice';
|
||||||
|
import { LANGUAGES } from 'features/system/store/types';
|
||||||
import {
|
import {
|
||||||
setShouldAutoChangeDimensions,
|
setShouldAutoChangeDimensions,
|
||||||
setShouldShowProgressInViewer,
|
setShouldShowProgressInViewer,
|
||||||
@ -55,11 +55,10 @@ import SettingSwitch from './SettingSwitch';
|
|||||||
import SettingsClearIntermediates from './SettingsClearIntermediates';
|
import SettingsClearIntermediates from './SettingsClearIntermediates';
|
||||||
import SettingsSchedulers from './SettingsSchedulers';
|
import SettingsSchedulers from './SettingsSchedulers';
|
||||||
import StyledFlex from './StyledFlex';
|
import StyledFlex from './StyledFlex';
|
||||||
import { LANGUAGES } from 'features/system/store/types';
|
|
||||||
|
|
||||||
const selector = createSelector(
|
const selector = createSelector(
|
||||||
[stateSelector],
|
[stateSelector],
|
||||||
({ system, ui, generation }) => {
|
({ system, ui }) => {
|
||||||
const {
|
const {
|
||||||
shouldConfirmOnDelete,
|
shouldConfirmOnDelete,
|
||||||
enableImageDebugging,
|
enableImageDebugging,
|
||||||
@ -77,8 +76,6 @@ const selector = createSelector(
|
|||||||
shouldAutoChangeDimensions,
|
shouldAutoChangeDimensions,
|
||||||
} = ui;
|
} = ui;
|
||||||
|
|
||||||
const { shouldShowAdvancedOptions } = generation;
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
shouldConfirmOnDelete,
|
shouldConfirmOnDelete,
|
||||||
enableImageDebugging,
|
enableImageDebugging,
|
||||||
@ -87,7 +84,6 @@ const selector = createSelector(
|
|||||||
consoleLogLevel,
|
consoleLogLevel,
|
||||||
shouldLogToConsole,
|
shouldLogToConsole,
|
||||||
shouldAntialiasProgressImage,
|
shouldAntialiasProgressImage,
|
||||||
shouldShowAdvancedOptions,
|
|
||||||
shouldUseNSFWChecker,
|
shouldUseNSFWChecker,
|
||||||
shouldUseWatermarker,
|
shouldUseWatermarker,
|
||||||
shouldAutoChangeDimensions,
|
shouldAutoChangeDimensions,
|
||||||
@ -121,8 +117,6 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => {
|
|||||||
const shouldShowDeveloperSettings =
|
const shouldShowDeveloperSettings =
|
||||||
config?.shouldShowDeveloperSettings ?? true;
|
config?.shouldShowDeveloperSettings ?? true;
|
||||||
const shouldShowResetWebUiText = config?.shouldShowResetWebUiText ?? true;
|
const shouldShowResetWebUiText = config?.shouldShowResetWebUiText ?? true;
|
||||||
const shouldShowAdvancedOptionsSettings =
|
|
||||||
config?.shouldShowAdvancedOptionsSettings ?? true;
|
|
||||||
const shouldShowClearIntermediates =
|
const shouldShowClearIntermediates =
|
||||||
config?.shouldShowClearIntermediates ?? true;
|
config?.shouldShowClearIntermediates ?? true;
|
||||||
const shouldShowLocalizationToggle =
|
const shouldShowLocalizationToggle =
|
||||||
@ -164,7 +158,6 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => {
|
|||||||
consoleLogLevel,
|
consoleLogLevel,
|
||||||
shouldLogToConsole,
|
shouldLogToConsole,
|
||||||
shouldAntialiasProgressImage,
|
shouldAntialiasProgressImage,
|
||||||
shouldShowAdvancedOptions,
|
|
||||||
shouldUseNSFWChecker,
|
shouldUseNSFWChecker,
|
||||||
shouldUseWatermarker,
|
shouldUseWatermarker,
|
||||||
shouldAutoChangeDimensions,
|
shouldAutoChangeDimensions,
|
||||||
@ -246,15 +239,6 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => {
|
|||||||
dispatch(setShouldConfirmOnDelete(e.target.checked))
|
dispatch(setShouldConfirmOnDelete(e.target.checked))
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
{shouldShowAdvancedOptionsSettings && (
|
|
||||||
<SettingSwitch
|
|
||||||
label={t('settings.showAdvancedOptions')}
|
|
||||||
isChecked={shouldShowAdvancedOptions}
|
|
||||||
onChange={(e: ChangeEvent<HTMLInputElement>) =>
|
|
||||||
dispatch(setShouldShowAdvancedOptions(e.target.checked))
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</StyledFlex>
|
</StyledFlex>
|
||||||
|
|
||||||
<StyledFlex>
|
<StyledFlex>
|
||||||
|
@ -2,8 +2,6 @@ import { createSelector } from '@reduxjs/toolkit';
|
|||||||
import { stateSelector } from 'app/store/store';
|
import { stateSelector } from 'app/store/store';
|
||||||
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
|
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
|
||||||
|
|
||||||
export const systemSelector = (state: RootState) => state.system;
|
|
||||||
|
|
||||||
export const languageSelector = createSelector(
|
export const languageSelector = createSelector(
|
||||||
stateSelector,
|
stateSelector,
|
||||||
({ system }) => system.language,
|
({ system }) => system.language,
|
||||||
|
@ -120,6 +120,7 @@ export const systemSlice = createSlice({
|
|||||||
order,
|
order,
|
||||||
progress_image,
|
progress_image,
|
||||||
graph_execution_state_id: session_id,
|
graph_execution_state_id: session_id,
|
||||||
|
queue_batch_id: batch_id,
|
||||||
} = action.payload.data;
|
} = action.payload.data;
|
||||||
|
|
||||||
state.denoiseProgress = {
|
state.denoiseProgress = {
|
||||||
@ -129,6 +130,7 @@ export const systemSlice = createSlice({
|
|||||||
percentage: calculateStepPercentage(step, total_steps, order),
|
percentage: calculateStepPercentage(step, total_steps, order),
|
||||||
progress_image,
|
progress_image,
|
||||||
session_id,
|
session_id,
|
||||||
|
batch_id,
|
||||||
};
|
};
|
||||||
|
|
||||||
state.status = 'PROCESSING';
|
state.status = 'PROCESSING';
|
||||||
|
@ -12,6 +12,7 @@ export type SystemStatus =
|
|||||||
|
|
||||||
export type DenoiseProgress = {
|
export type DenoiseProgress = {
|
||||||
session_id: string;
|
session_id: string;
|
||||||
|
batch_id: string;
|
||||||
progress_image: ProgressImage | null | undefined;
|
progress_image: ProgressImage | null | undefined;
|
||||||
step: number;
|
step: number;
|
||||||
total_steps: number;
|
total_steps: number;
|
||||||
|
@ -2,9 +2,7 @@ import ParamDynamicPromptsCollapse from 'features/dynamicPrompts/components/Para
|
|||||||
import ParamLoraCollapse from 'features/lora/components/ParamLoraCollapse';
|
import ParamLoraCollapse from 'features/lora/components/ParamLoraCollapse';
|
||||||
import ParamAdvancedCollapse from 'features/parameters/components/Parameters/Advanced/ParamAdvancedCollapse';
|
import ParamAdvancedCollapse from 'features/parameters/components/Parameters/Advanced/ParamAdvancedCollapse';
|
||||||
import ParamControlNetCollapse from 'features/parameters/components/Parameters/ControlNet/ParamControlNetCollapse';
|
import ParamControlNetCollapse from 'features/parameters/components/Parameters/ControlNet/ParamControlNetCollapse';
|
||||||
import ParamNoiseCollapse from 'features/parameters/components/Parameters/Noise/ParamNoiseCollapse';
|
|
||||||
import ParamPromptArea from 'features/parameters/components/Parameters/Prompt/ParamPromptArea';
|
import ParamPromptArea from 'features/parameters/components/Parameters/Prompt/ParamPromptArea';
|
||||||
import ParamSeamlessCollapse from 'features/parameters/components/Parameters/Seamless/ParamSeamlessCollapse';
|
|
||||||
import ParamSymmetryCollapse from 'features/parameters/components/Parameters/Symmetry/ParamSymmetryCollapse';
|
import ParamSymmetryCollapse from 'features/parameters/components/Parameters/Symmetry/ParamSymmetryCollapse';
|
||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
import ImageToImageTabCoreParameters from './ImageToImageTabCoreParameters';
|
import ImageToImageTabCoreParameters from './ImageToImageTabCoreParameters';
|
||||||
@ -17,9 +15,7 @@ const ImageToImageTabParameters = () => {
|
|||||||
<ParamControlNetCollapse />
|
<ParamControlNetCollapse />
|
||||||
<ParamLoraCollapse />
|
<ParamLoraCollapse />
|
||||||
<ParamDynamicPromptsCollapse />
|
<ParamDynamicPromptsCollapse />
|
||||||
<ParamNoiseCollapse />
|
|
||||||
<ParamSymmetryCollapse />
|
<ParamSymmetryCollapse />
|
||||||
<ParamSeamlessCollapse />
|
|
||||||
<ParamAdvancedCollapse />
|
<ParamAdvancedCollapse />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -58,7 +58,6 @@ export default function SimpleAddModels() {
|
|||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
console.log(error);
|
|
||||||
dispatch(
|
dispatch(
|
||||||
addToast(
|
addToast(
|
||||||
makeToast({
|
makeToast({
|
||||||
|
@ -2,8 +2,6 @@ import ParamDynamicPromptsCollapse from 'features/dynamicPrompts/components/Para
|
|||||||
import ParamLoraCollapse from 'features/lora/components/ParamLoraCollapse';
|
import ParamLoraCollapse from 'features/lora/components/ParamLoraCollapse';
|
||||||
import ParamAdvancedCollapse from 'features/parameters/components/Parameters/Advanced/ParamAdvancedCollapse';
|
import ParamAdvancedCollapse from 'features/parameters/components/Parameters/Advanced/ParamAdvancedCollapse';
|
||||||
import ParamControlNetCollapse from 'features/parameters/components/Parameters/ControlNet/ParamControlNetCollapse';
|
import ParamControlNetCollapse from 'features/parameters/components/Parameters/ControlNet/ParamControlNetCollapse';
|
||||||
import ParamNoiseCollapse from 'features/parameters/components/Parameters/Noise/ParamNoiseCollapse';
|
|
||||||
import ParamSeamlessCollapse from 'features/parameters/components/Parameters/Seamless/ParamSeamlessCollapse';
|
|
||||||
import ParamSymmetryCollapse from 'features/parameters/components/Parameters/Symmetry/ParamSymmetryCollapse';
|
import ParamSymmetryCollapse from 'features/parameters/components/Parameters/Symmetry/ParamSymmetryCollapse';
|
||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
import ParamPromptArea from '../../../../parameters/components/Parameters/Prompt/ParamPromptArea';
|
import ParamPromptArea from '../../../../parameters/components/Parameters/Prompt/ParamPromptArea';
|
||||||
@ -17,9 +15,7 @@ const TextToImageTabParameters = () => {
|
|||||||
<ParamControlNetCollapse />
|
<ParamControlNetCollapse />
|
||||||
<ParamLoraCollapse />
|
<ParamLoraCollapse />
|
||||||
<ParamDynamicPromptsCollapse />
|
<ParamDynamicPromptsCollapse />
|
||||||
<ParamNoiseCollapse />
|
|
||||||
<ParamSymmetryCollapse />
|
<ParamSymmetryCollapse />
|
||||||
<ParamSeamlessCollapse />
|
|
||||||
<ParamAdvancedCollapse />
|
<ParamAdvancedCollapse />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -5,7 +5,6 @@ import ParamCompositingSettingsCollapse from 'features/parameters/components/Par
|
|||||||
import ParamInfillAndScalingCollapse from 'features/parameters/components/Parameters/Canvas/InfillAndScaling/ParamInfillAndScalingCollapse';
|
import ParamInfillAndScalingCollapse from 'features/parameters/components/Parameters/Canvas/InfillAndScaling/ParamInfillAndScalingCollapse';
|
||||||
import ParamControlNetCollapse from 'features/parameters/components/Parameters/ControlNet/ParamControlNetCollapse';
|
import ParamControlNetCollapse from 'features/parameters/components/Parameters/ControlNet/ParamControlNetCollapse';
|
||||||
import ParamPromptArea from 'features/parameters/components/Parameters/Prompt/ParamPromptArea';
|
import ParamPromptArea from 'features/parameters/components/Parameters/Prompt/ParamPromptArea';
|
||||||
import ParamSeamlessCollapse from 'features/parameters/components/Parameters/Seamless/ParamSeamlessCollapse';
|
|
||||||
import ParamSymmetryCollapse from 'features/parameters/components/Parameters/Symmetry/ParamSymmetryCollapse';
|
import ParamSymmetryCollapse from 'features/parameters/components/Parameters/Symmetry/ParamSymmetryCollapse';
|
||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
import UnifiedCanvasCoreParameters from './UnifiedCanvasCoreParameters';
|
import UnifiedCanvasCoreParameters from './UnifiedCanvasCoreParameters';
|
||||||
@ -21,7 +20,6 @@ const UnifiedCanvasParameters = () => {
|
|||||||
<ParamSymmetryCollapse />
|
<ParamSymmetryCollapse />
|
||||||
<ParamInfillAndScalingCollapse />
|
<ParamInfillAndScalingCollapse />
|
||||||
<ParamCompositingSettingsCollapse />
|
<ParamCompositingSettingsCollapse />
|
||||||
<ParamSeamlessCollapse />
|
|
||||||
<ParamAdvancedCollapse />
|
<ParamAdvancedCollapse />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -34,7 +34,8 @@ export type BaseNode = {
|
|||||||
|
|
||||||
export type ModelLoadStartedEvent = {
|
export type ModelLoadStartedEvent = {
|
||||||
queue_id: string;
|
queue_id: string;
|
||||||
queue_item_id: string;
|
queue_item_id: number;
|
||||||
|
queue_batch_id: string;
|
||||||
graph_execution_state_id: string;
|
graph_execution_state_id: string;
|
||||||
model_name: string;
|
model_name: string;
|
||||||
base_model: BaseModelType;
|
base_model: BaseModelType;
|
||||||
@ -44,7 +45,8 @@ export type ModelLoadStartedEvent = {
|
|||||||
|
|
||||||
export type ModelLoadCompletedEvent = {
|
export type ModelLoadCompletedEvent = {
|
||||||
queue_id: string;
|
queue_id: string;
|
||||||
queue_item_id: string;
|
queue_item_id: number;
|
||||||
|
queue_batch_id: string;
|
||||||
graph_execution_state_id: string;
|
graph_execution_state_id: string;
|
||||||
model_name: string;
|
model_name: string;
|
||||||
base_model: BaseModelType;
|
base_model: BaseModelType;
|
||||||
@ -62,7 +64,8 @@ export type ModelLoadCompletedEvent = {
|
|||||||
*/
|
*/
|
||||||
export type GeneratorProgressEvent = {
|
export type GeneratorProgressEvent = {
|
||||||
queue_id: string;
|
queue_id: string;
|
||||||
queue_item_id: string;
|
queue_item_id: number;
|
||||||
|
queue_batch_id: string;
|
||||||
graph_execution_state_id: string;
|
graph_execution_state_id: string;
|
||||||
node_id: string;
|
node_id: string;
|
||||||
source_node_id: string;
|
source_node_id: string;
|
||||||
@ -81,7 +84,8 @@ export type GeneratorProgressEvent = {
|
|||||||
*/
|
*/
|
||||||
export type InvocationCompleteEvent = {
|
export type InvocationCompleteEvent = {
|
||||||
queue_id: string;
|
queue_id: string;
|
||||||
queue_item_id: string;
|
queue_item_id: number;
|
||||||
|
queue_batch_id: string;
|
||||||
graph_execution_state_id: string;
|
graph_execution_state_id: string;
|
||||||
node: BaseNode;
|
node: BaseNode;
|
||||||
source_node_id: string;
|
source_node_id: string;
|
||||||
@ -95,7 +99,8 @@ export type InvocationCompleteEvent = {
|
|||||||
*/
|
*/
|
||||||
export type InvocationErrorEvent = {
|
export type InvocationErrorEvent = {
|
||||||
queue_id: string;
|
queue_id: string;
|
||||||
queue_item_id: string;
|
queue_item_id: number;
|
||||||
|
queue_batch_id: string;
|
||||||
graph_execution_state_id: string;
|
graph_execution_state_id: string;
|
||||||
node: BaseNode;
|
node: BaseNode;
|
||||||
source_node_id: string;
|
source_node_id: string;
|
||||||
@ -110,7 +115,8 @@ export type InvocationErrorEvent = {
|
|||||||
*/
|
*/
|
||||||
export type InvocationStartedEvent = {
|
export type InvocationStartedEvent = {
|
||||||
queue_id: string;
|
queue_id: string;
|
||||||
queue_item_id: string;
|
queue_item_id: number;
|
||||||
|
queue_batch_id: string;
|
||||||
graph_execution_state_id: string;
|
graph_execution_state_id: string;
|
||||||
node: BaseNode;
|
node: BaseNode;
|
||||||
source_node_id: string;
|
source_node_id: string;
|
||||||
@ -123,7 +129,8 @@ export type InvocationStartedEvent = {
|
|||||||
*/
|
*/
|
||||||
export type GraphExecutionStateCompleteEvent = {
|
export type GraphExecutionStateCompleteEvent = {
|
||||||
queue_id: string;
|
queue_id: string;
|
||||||
queue_item_id: string;
|
queue_item_id: number;
|
||||||
|
queue_batch_id: string;
|
||||||
graph_execution_state_id: string;
|
graph_execution_state_id: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -134,7 +141,8 @@ export type GraphExecutionStateCompleteEvent = {
|
|||||||
*/
|
*/
|
||||||
export type SessionRetrievalErrorEvent = {
|
export type SessionRetrievalErrorEvent = {
|
||||||
queue_id: string;
|
queue_id: string;
|
||||||
queue_item_id: string;
|
queue_item_id: number;
|
||||||
|
queue_batch_id: string;
|
||||||
graph_execution_state_id: string;
|
graph_execution_state_id: string;
|
||||||
error_type: string;
|
error_type: string;
|
||||||
error: string;
|
error: string;
|
||||||
@ -147,7 +155,8 @@ export type SessionRetrievalErrorEvent = {
|
|||||||
*/
|
*/
|
||||||
export type InvocationRetrievalErrorEvent = {
|
export type InvocationRetrievalErrorEvent = {
|
||||||
queue_id: string;
|
queue_id: string;
|
||||||
queue_item_id: string;
|
queue_item_id: number;
|
||||||
|
queue_batch_id: string;
|
||||||
graph_execution_state_id: string;
|
graph_execution_state_id: string;
|
||||||
node_id: string;
|
node_id: string;
|
||||||
error_type: string;
|
error_type: string;
|
||||||
@ -161,8 +170,8 @@ export type InvocationRetrievalErrorEvent = {
|
|||||||
*/
|
*/
|
||||||
export type QueueItemStatusChangedEvent = {
|
export type QueueItemStatusChangedEvent = {
|
||||||
queue_id: string;
|
queue_id: string;
|
||||||
queue_item_id: string;
|
queue_item_id: number;
|
||||||
batch_id: string;
|
queue_batch_id: string;
|
||||||
session_id: string;
|
session_id: string;
|
||||||
graph_execution_state_id: string;
|
graph_execution_state_id: string;
|
||||||
status: components['schemas']['SessionQueueItemDTO']['status'];
|
status: components['schemas']['SessionQueueItemDTO']['status'];
|
||||||
|
@ -75,7 +75,13 @@ def invoke_next(g: GraphExecutionState, services: InvocationServices) -> tuple[B
|
|||||||
|
|
||||||
print(f"invoking {n.id}: {type(n)}")
|
print(f"invoking {n.id}: {type(n)}")
|
||||||
o = n.invoke(
|
o = n.invoke(
|
||||||
InvocationContext(queue_item_id="1", queue_id=DEFAULT_QUEUE_ID, services=services, graph_execution_state_id="1")
|
InvocationContext(
|
||||||
|
queue_batch_id="1",
|
||||||
|
queue_item_id=1,
|
||||||
|
queue_id=DEFAULT_QUEUE_ID,
|
||||||
|
services=services,
|
||||||
|
graph_execution_state_id="1",
|
||||||
|
)
|
||||||
)
|
)
|
||||||
g.complete(n.id, o)
|
g.complete(n.id, o)
|
||||||
|
|
||||||
|
@ -102,7 +102,12 @@ def test_can_create_graph_state_from_graph(mock_invoker: Invoker, simple_graph):
|
|||||||
# @pytest.mark.xfail(reason = "Requires fixing following the model manager refactor")
|
# @pytest.mark.xfail(reason = "Requires fixing following the model manager refactor")
|
||||||
def test_can_invoke(mock_invoker: Invoker, simple_graph):
|
def test_can_invoke(mock_invoker: Invoker, simple_graph):
|
||||||
g = mock_invoker.create_execution_state(graph=simple_graph)
|
g = mock_invoker.create_execution_state(graph=simple_graph)
|
||||||
invocation_id = mock_invoker.invoke(queue_item_id="1", queue_id=DEFAULT_QUEUE_ID, graph_execution_state=g)
|
invocation_id = mock_invoker.invoke(
|
||||||
|
session_queue_batch_id="1",
|
||||||
|
session_queue_item_id=1,
|
||||||
|
session_queue_id=DEFAULT_QUEUE_ID,
|
||||||
|
graph_execution_state=g,
|
||||||
|
)
|
||||||
assert invocation_id is not None
|
assert invocation_id is not None
|
||||||
|
|
||||||
def has_executed_any(g: GraphExecutionState):
|
def has_executed_any(g: GraphExecutionState):
|
||||||
@ -120,7 +125,11 @@ def test_can_invoke(mock_invoker: Invoker, simple_graph):
|
|||||||
def test_can_invoke_all(mock_invoker: Invoker, simple_graph):
|
def test_can_invoke_all(mock_invoker: Invoker, simple_graph):
|
||||||
g = mock_invoker.create_execution_state(graph=simple_graph)
|
g = mock_invoker.create_execution_state(graph=simple_graph)
|
||||||
invocation_id = mock_invoker.invoke(
|
invocation_id = mock_invoker.invoke(
|
||||||
queue_item_id="1", queue_id=DEFAULT_QUEUE_ID, graph_execution_state=g, invoke_all=True
|
session_queue_batch_id="1",
|
||||||
|
session_queue_item_id=1,
|
||||||
|
session_queue_id=DEFAULT_QUEUE_ID,
|
||||||
|
graph_execution_state=g,
|
||||||
|
invoke_all=True,
|
||||||
)
|
)
|
||||||
assert invocation_id is not None
|
assert invocation_id is not None
|
||||||
|
|
||||||
@ -140,7 +149,13 @@ def test_handles_errors(mock_invoker: Invoker):
|
|||||||
g = mock_invoker.create_execution_state()
|
g = mock_invoker.create_execution_state()
|
||||||
g.graph.add_node(ErrorInvocation(id="1"))
|
g.graph.add_node(ErrorInvocation(id="1"))
|
||||||
|
|
||||||
mock_invoker.invoke(queue_item_id="1", queue_id=DEFAULT_QUEUE_ID, graph_execution_state=g, invoke_all=True)
|
mock_invoker.invoke(
|
||||||
|
session_queue_batch_id="1",
|
||||||
|
session_queue_item_id=1,
|
||||||
|
session_queue_id=DEFAULT_QUEUE_ID,
|
||||||
|
graph_execution_state=g,
|
||||||
|
invoke_all=True,
|
||||||
|
)
|
||||||
|
|
||||||
def has_executed_all(g: GraphExecutionState):
|
def has_executed_all(g: GraphExecutionState):
|
||||||
g = mock_invoker.services.graph_execution_manager.get(g.id)
|
g = mock_invoker.services.graph_execution_manager.get(g.id)
|
||||||
|
Loading…
Reference in New Issue
Block a user