diff --git a/invokeai/app/api/dependencies.py b/invokeai/app/api/dependencies.py index 1576a2ff90..d2ca877a45 100644 --- a/invokeai/app/api/dependencies.py +++ b/invokeai/app/api/dependencies.py @@ -31,7 +31,6 @@ from ..services.shared.default_graphs import create_system_graphs from ..services.shared.graph import GraphExecutionState, LibraryGraph from ..services.shared.sqlite.sqlite_database import SqliteDatabase from ..services.urls.urls_default import LocalUrlService -from ..services.workflow_records.sync_system_workflows import sync_system_workflows from ..services.workflow_records.workflow_records_sqlite import SqliteWorkflowRecordsStorage from .events import FastAPIEventService @@ -124,7 +123,6 @@ class ApiDependencies: ) create_system_graphs(services.graph_library) - sync_system_workflows(workflow_records=services.workflow_records, logger=logger) db.clean() ApiDependencies.invoker = Invoker(services) diff --git a/invokeai/app/services/workflow_records/system_workflows/Text_to_Image_SD15.json b/invokeai/app/services/workflow_records/default_workflows/Text_to_Image_SD15.json similarity index 98% rename from invokeai/app/services/workflow_records/system_workflows/Text_to_Image_SD15.json rename to invokeai/app/services/workflow_records/default_workflows/Text_to_Image_SD15.json index d660c576e9..1e42df6e07 100644 --- a/invokeai/app/services/workflow_records/system_workflows/Text_to_Image_SD15.json +++ b/invokeai/app/services/workflow_records/default_workflows/Text_to_Image_SD15.json @@ -1,5 +1,4 @@ { - "id": "af7030e2-c64f-4f03-b387-9634bb54ae5f", "name": "Text to Image - SD1.5", "author": "InvokeAI", "description": "Sample text to image workflow for Stable Diffusion 1.5/2", @@ -30,7 +29,7 @@ } ], "meta": { - "category": "system", + "category": "default", "version": "2.0.0" }, "nodes": [ @@ -394,7 +393,7 @@ "notes": "", "isIntermediate": true, "useCache": true, - "version": "1.4.0", + "version": "1.5.0", "nodePack": "invokeai", "inputs": { "positive_conditioning": { @@ -534,6 +533,18 @@ "name": "T2IAdapterField" } }, + "cfg_rescale_multiplier": { + "id": "9101f0a6-5fe0-4826-b7b3-47e5d506826c", + "name": "cfg_rescale_multiplier", + "fieldKind": "input", + "label": "", + "type": { + "isCollection": false, + "isCollectionOrScalar": false, + "name": "FloatField" + }, + "value": 0 + }, "latents": { "id": "334d4ba3-5a99-4195-82c5-86fb3f4f7d43", "name": "latents", @@ -591,7 +602,7 @@ } }, "width": 320, - "height": 646, + "height": 703, "position": { "x": 1400, "y": 25 diff --git a/invokeai/app/services/workflow_records/sync_system_workflows.py b/invokeai/app/services/workflow_records/sync_system_workflows.py deleted file mode 100644 index 61643689c2..0000000000 --- a/invokeai/app/services/workflow_records/sync_system_workflows.py +++ /dev/null @@ -1,56 +0,0 @@ -import pkgutil -from logging import Logger -from pathlib import Path - -import semver - -from invokeai.app.services.workflow_records.workflow_records_base import WorkflowRecordsStorageBase -from invokeai.app.services.workflow_records.workflow_records_common import ( - Workflow, - WorkflowValidator, -) - -# TODO: When I remove a workflow from system_workflows/ and do a `pip install --upgrade .`, the file -# is not removed from site-packages! The logic to delete old system workflows below doesn't work -# for normal installs. It does work for editable. Not sure why. - -system_workflows_dir = "system_workflows" - - -def get_system_workflows_from_json() -> list[Workflow]: - app_workflows: list[Workflow] = [] - workflow_paths = (Path(__file__).parent / Path(system_workflows_dir)).glob("*.json") - for workflow_path in workflow_paths: - workflow_bytes = pkgutil.get_data(__name__, f"{system_workflows_dir}/{workflow_path.name}") - if workflow_bytes is None: - raise ValueError(f"Could not load system workflow: {workflow_path.name}") - - app_workflows.append(WorkflowValidator.validate_json(workflow_bytes)) - return app_workflows - - -def sync_system_workflows(workflow_records: WorkflowRecordsStorageBase, logger: Logger) -> None: - """Syncs system workflows in the workflow_library database with the latest system workflows.""" - - system_workflows = get_system_workflows_from_json() - system_workflow_ids = [w.id for w in system_workflows] - installed_workflows = workflow_records._get_all_system_workflows() - installed_workflow_ids = [w.id for w in installed_workflows] - - for workflow in installed_workflows: - if workflow.id not in system_workflow_ids: - workflow_records._delete_system_workflow(workflow.id) - logger.info(f"Deleted system workflow: {workflow.name}") - - for workflow in system_workflows: - if workflow.id not in installed_workflow_ids: - workflow_records._create_system_workflow(workflow) - logger.info(f"Installed system workflow: {workflow.name}") - else: - installed_workflow = workflow_records.get(workflow.id).workflow - installed_version = semver.Version.parse(installed_workflow.version) - new_version = semver.Version.parse(workflow.version) - - if new_version.compare(installed_version) > 0: - workflow_records._update_system_workflow(workflow) - logger.info(f"Updated system workflow: {workflow.name}") diff --git a/invokeai/app/services/workflow_records/system_workflows/__init__.py b/invokeai/app/services/workflow_records/system_workflows/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/invokeai/app/services/workflow_records/workflow_records_base.py b/invokeai/app/services/workflow_records/workflow_records_base.py index 39b87c10a4..cb0aeac113 100644 --- a/invokeai/app/services/workflow_records/workflow_records_base.py +++ b/invokeai/app/services/workflow_records/workflow_records_base.py @@ -48,23 +48,3 @@ class WorkflowRecordsStorageBase(ABC): ) -> PaginatedResults[WorkflowRecordListItemDTO]: """Gets many workflows.""" pass - - @abstractmethod - def _create_system_workflow(self, workflow: Workflow) -> None: - """Creates a system workflow. Internal use only.""" - pass - - @abstractmethod - def _update_system_workflow(self, workflow: Workflow) -> None: - """Updates a system workflow. Internal use only.""" - pass - - @abstractmethod - def _delete_system_workflow(self, workflow_id: str) -> None: - """Deletes a system workflow. Internal use only.""" - pass - - @abstractmethod - def _get_all_system_workflows(self) -> list[Workflow]: - """Gets all system workflows. Internal use only.""" - pass diff --git a/invokeai/app/services/workflow_records/workflow_records_common.py b/invokeai/app/services/workflow_records/workflow_records_common.py index 38a5f9a6a0..9d9bb8a074 100644 --- a/invokeai/app/services/workflow_records/workflow_records_common.py +++ b/invokeai/app/services/workflow_records/workflow_records_common.py @@ -31,12 +31,12 @@ class WorkflowRecordOrderBy(str, Enum, metaclass=MetaEnum): class WorkflowCategory(str, Enum, metaclass=MetaEnum): User = "user" - System = "system" + Default = "default" class WorkflowMeta(BaseModel): version: str = Field(description="The version of the workflow schema.") - category: WorkflowCategory = Field(description="The category of the workflow (user or system).") + category: WorkflowCategory = Field(description="The category of the workflow (user or default).") @field_validator("version") def validate_version(cls, version: str): diff --git a/invokeai/app/services/workflow_records/workflow_records_sqlite.py b/invokeai/app/services/workflow_records/workflow_records_sqlite.py index f14d2753a4..44b6019255 100644 --- a/invokeai/app/services/workflow_records/workflow_records_sqlite.py +++ b/invokeai/app/services/workflow_records/workflow_records_sqlite.py @@ -1,3 +1,4 @@ +from pathlib import Path from typing import Optional from invokeai.app.services.invoker import Invoker @@ -28,6 +29,7 @@ class SqliteWorkflowRecordsStorage(WorkflowRecordsStorageBase): def start(self, invoker: Invoker) -> None: self._invoker = invoker + self._sync_default_workflows() def get(self, workflow_id: str) -> WorkflowRecordDTO: """Gets a workflow by ID. Updates the opened_at column.""" @@ -182,76 +184,48 @@ class SqliteWorkflowRecordsStorage(WorkflowRecordsStorageBase): finally: self._lock.release() - def _create_system_workflow(self, workflow: Workflow) -> None: - try: - self._lock.acquire() - # Only system workflows may be managed by this method - assert workflow.meta.category is WorkflowCategory.System - self._cursor.execute( - """--sql - INSERT OR REPLACE INTO workflow_library ( - workflow_id, - workflow - ) - VALUES (?, ?); - """, - (workflow.id, workflow.model_dump_json()), - ) - self._conn.commit() - except Exception: - self._conn.rollback() - raise - finally: - self._lock.release() + def _sync_default_workflows(self) -> None: + """Syncs default workflows to the database. Internal use only.""" - def _update_system_workflow(self, workflow: Workflow) -> None: - try: - self._lock.acquire() - # Only system workflows may be managed by this method - assert workflow.meta.category is WorkflowCategory.System - self._cursor.execute( - """--sql - UPDATE workflow_library - SET workflow = ? - WHERE workflow_id = ? AND category = 'system'; - """, - (workflow.model_dump_json(), workflow.id), - ) - self._conn.commit() - except Exception: - self._conn.rollback() - raise - finally: - self._lock.release() + """ + An enhancment might be to only update workflows that have changed. This would require we + ensure workflow IDs don't change, and the workflow version is incremented. + + It's much simpler to just replace them all with whichever workflows are in the directory. + + The downside is that the `updated_at` and `opened_at` timestamps for default workflows are + meaningless, as they are overwritten every time the server starts. + """ - def _delete_system_workflow(self, workflow_id: str) -> None: try: self._lock.acquire() + workflows: list[Workflow] = [] + workflows_dir = Path(__file__).parent / Path("default_workflows") + workflow_paths = workflows_dir.glob("*.json") + for path in workflow_paths: + bytes_ = path.read_bytes() + workflow = WorkflowValidator.validate_json(bytes_) + workflows.append(workflow) + # Only default workflows may be managed by this method + assert all(w.meta.category is WorkflowCategory.Default for w in workflows) self._cursor.execute( """--sql DELETE FROM workflow_library - WHERE workflow_id = ? AND category = 'system'; - """, - (workflow_id,), - ) - self._conn.commit() - except Exception: - self._conn.rollback() - raise - finally: - self._lock.release() - - def _get_all_system_workflows(self) -> list[Workflow]: - try: - self._lock.acquire() - self._cursor.execute( - """--sql - SELECT workflow FROM workflow_library - WHERE category = 'system'; + WHERE category = 'default'; """ ) - rows = self._cursor.fetchall() - return [WorkflowValidator.validate_json(dict(row)["workflow"]) for row in rows] + for w in workflows: + self._cursor.execute( + """--sql + INSERT OR REPLACE INTO workflow_library ( + workflow_id, + workflow + ) + VALUES (?, ?); + """, + (w.id, w.model_dump_json()), + ) + self._conn.commit() except Exception: self._conn.rollback() raise diff --git a/invokeai/frontend/web/public/locales/en.json b/invokeai/frontend/web/public/locales/en.json index 051528c100..c2ce7ae20b 100644 --- a/invokeai/frontend/web/public/locales/en.json +++ b/invokeai/frontend/web/public/locales/en.json @@ -1626,12 +1626,8 @@ "workflows": { "workflows": "Workflows", "workflowLibrary": "Workflow Library", - "user": "User", - "system": "System", - "recent": "Recent", - "userWorkflows": "$t(workflows.user) $t(workflows.workflows)", - "recentWorkflows": "$t(workflows.recent) $t(workflows.workflows)", - "systemWorkflows": "$t(workflows.system) $t(workflows.workflows)", + "userWorkflows": "My Workflows", + "defaultWorkflows": "Default Workflows", "openWorkflow": "Open Workflow", "uploadWorkflow": "Upload Workflow", "deleteWorkflow": "Delete Workflow", diff --git a/invokeai/frontend/web/src/features/nodes/types/workflow.ts b/invokeai/frontend/web/src/features/nodes/types/workflow.ts index d4ba400e97..60a19bf9e2 100644 --- a/invokeai/frontend/web/src/features/nodes/types/workflow.ts +++ b/invokeai/frontend/web/src/features/nodes/types/workflow.ts @@ -14,7 +14,7 @@ export type XYPosition = z.infer; export const zDimension = z.number().gt(0).nullish(); export type Dimension = z.infer; -export const zWorkflowCategory = z.enum(['user', 'system']); +export const zWorkflowCategory = z.enum(['user', 'default']); export type WorkflowCategory = z.infer; // #endregion diff --git a/invokeai/frontend/web/src/features/nodes/util/workflow/validateWorkflow.ts b/invokeai/frontend/web/src/features/nodes/util/workflow/validateWorkflow.ts index eb665b78fe..326774fcb1 100644 --- a/invokeai/frontend/web/src/features/nodes/util/workflow/validateWorkflow.ts +++ b/invokeai/frontend/web/src/features/nodes/util/workflow/validateWorkflow.ts @@ -41,7 +41,7 @@ export const validateWorkflow = ( // System workflows are only allowed to be used as templates. // If a system workflow is loaded, change its category to user and remove its ID so that we can save it as a user workflow. - if (_workflow.meta.category === 'system') { + if (_workflow.meta.category === 'default') { _workflow.meta.category = 'user'; _workflow.id = undefined; } diff --git a/invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibraryList.tsx b/invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibraryList.tsx index 831ebddc36..30df51ce60 100644 --- a/invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibraryList.tsx +++ b/invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibraryList.tsx @@ -20,7 +20,14 @@ import ScrollableContent from 'features/nodes/components/sidePanel/ScrollableCon import { WorkflowCategory } from 'features/nodes/types/workflow'; import WorkflowLibraryListItem from 'features/workflowLibrary/components/WorkflowLibraryListItem'; import WorkflowLibraryPagination from 'features/workflowLibrary/components/WorkflowLibraryPagination'; -import { ChangeEvent, KeyboardEvent, memo, useCallback, useState } from 'react'; +import { + ChangeEvent, + KeyboardEvent, + memo, + useCallback, + useMemo, + useState, +} from 'react'; import { useTranslation } from 'react-i18next'; import { useListWorkflowsQuery } from 'services/api/endpoints/workflows'; import { SQLiteDirection, WorkflowRecordOrderBy } from 'services/api/types'; @@ -29,7 +36,7 @@ import { useDebounce } from 'use-debounce'; const PER_PAGE = 10; const ORDER_BY_DATA: SelectItem[] = [ - { value: 'opened_at', label: 'Recently Opened' }, + { value: 'opened_at', label: 'Opened' }, { value: 'created_at', label: 'Created' }, { value: 'updated_at', label: 'Updated' }, { value: 'name', label: 'Name' }, @@ -48,14 +55,29 @@ const WorkflowLibraryList = () => { const [order_by, setOrderBy] = useState('opened_at'); const [direction, setDirection] = useState('ASC'); const [debouncedFilterText] = useDebounce(filter_text, 500); - const { data, isLoading, isError, isFetching } = useListWorkflowsQuery({ - page, - per_page: PER_PAGE, - order_by, - direction, - category, - filter_text: debouncedFilterText, - }); + + const query = useMemo(() => { + if (category === 'user') { + return { + page, + per_page: PER_PAGE, + order_by, + direction, + category, + filter_text: debouncedFilterText, + }; + } + return { + page, + per_page: PER_PAGE, + order_by: 'name' as const, + direction: 'ASC' as const, + category, + filter_text: debouncedFilterText, + }; + }, [category, debouncedFilterText, direction, order_by, page]); + + const { data, isLoading, isError, isFetching } = useListWorkflowsQuery(query); const handleChangeOrderBy = useCallback( (value: string | null) => { @@ -106,10 +128,12 @@ const WorkflowLibraryList = () => { const handleSetUserCategory = useCallback(() => { setCategory('user'); + setPage(0); }, []); - const handleSetSystemCategory = useCallback(() => { - setCategory('system'); + const handleSetDefaultCategory = useCallback(() => { + setCategory('default'); + setPage(0); }, []); if (isLoading) { @@ -132,14 +156,44 @@ const WorkflowLibraryList = () => { {t('workflows.userWorkflows')} - {t('workflows.systemWorkflows')} + {t('workflows.defaultWorkflows')} + {category === 'user' && ( + <> + + + + )} { )} - - {data.items.length ? ( diff --git a/invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibraryListItem.tsx b/invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibraryListItem.tsx index f400a7a338..e842f4aa1f 100644 --- a/invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibraryListItem.tsx +++ b/invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibraryListItem.tsx @@ -36,11 +36,13 @@ const WorkflowLibraryListItem = ({ workflowDTO }: Props) => { {workflowDTO.name || t('workflows.unnamedWorkflow')} - - {t('common.updated')}:{' '} - {dateFormat(workflowDTO.updated_at, masks.shortDate)}{' '} - {dateFormat(workflowDTO.updated_at, masks.shortTime)} - + {workflowDTO.category === 'user' && ( + + {t('common.updated')}:{' '} + {dateFormat(workflowDTO.updated_at, masks.shortDate)}{' '} + {dateFormat(workflowDTO.updated_at, masks.shortTime)} + + )} {workflowDTO.description ? ( @@ -58,11 +60,13 @@ const WorkflowLibraryListItem = ({ workflowDTO }: Props) => { )} - - {t('common.created')}:{' '} - {dateFormat(workflowDTO.created_at, masks.shortDate)}{' '} - {dateFormat(workflowDTO.created_at, masks.shortTime)} - + {workflowDTO.category === 'user' && ( + + {t('common.created')}:{' '} + {dateFormat(workflowDTO.created_at, masks.shortDate)}{' '} + {dateFormat(workflowDTO.created_at, masks.shortTime)} + + )} { - const { t } = useTranslation(); - const { data, isLoading, isError } = useListRecentWorkflowsQuery(); - - if (isLoading) { - return ; - } - - if (!data || isError) { - return ; - } - - if (!data.items.length) { - return ; - } - - return ( - <> - - {t('workflows.recentWorkflows')} - - - - - - {data.items.map((w) => ( - - ))} - - - - ); -}; - -export default memo(WorkflowLibraryRecentList); diff --git a/invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibrarySystemList.tsx b/invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibrarySystemList.tsx deleted file mode 100644 index dbed714b71..0000000000 --- a/invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibrarySystemList.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { Divider, Flex, Heading, Spacer } from '@chakra-ui/react'; -import { SelectItem } from '@mantine/core'; -import { - IAINoContentFallback, - IAINoContentFallbackWithSpinner, -} from 'common/components/IAIImageFallback'; -import IAIMantineSelect from 'common/components/IAIMantineSelect'; -import ScrollableContent from 'features/nodes/components/sidePanel/ScrollableContent'; -import WorkflowLibraryListItem from 'features/workflowLibrary/components/WorkflowLibraryListItem'; -import WorkflowLibraryPagination from 'features/workflowLibrary/components/WorkflowLibraryPagination'; -import { memo, useCallback, useState } from 'react'; -import { useTranslation } from 'react-i18next'; -import { useListSystemWorkflowsQuery } from 'services/api/endpoints/workflows'; -import { SQLiteDirection, WorkflowRecordOrderBy } from 'services/api/types'; - -const ORDER_BY_DATA: SelectItem[] = [ - { value: 'created_at', label: 'Created' }, - { value: 'updated_at', label: 'Updated' }, - { value: 'name', label: 'Name' }, -]; - -const DIRECTION_DATA: SelectItem[] = [ - { value: 'ASC', label: 'Ascending' }, - { value: 'DESC', label: 'Descending' }, -]; - -const WorkflowLibraryList = () => { - const { t } = useTranslation(); - const [page, setPage] = useState(0); - const [order_by, setOrderBy] = useState('created_at'); - const [direction, setDirection] = useState('ASC'); - const { data, isLoading, isError, isFetching } = - useListSystemWorkflowsQuery(); - - const handleChangeOrderBy = useCallback( - (value: string | null) => { - if (!value || value === order_by) { - return; - } - setOrderBy(value as WorkflowRecordOrderBy); - setPage(0); - }, - [order_by] - ); - - const handleChangeDirection = useCallback( - (value: string | null) => { - if (!value || value === direction) { - return; - } - setDirection(value as SQLiteDirection); - setPage(0); - }, - [direction] - ); - - if (isLoading) { - return ; - } - - if (!data || isError) { - return ; - } - - if (!data.items.length) { - return ; - } - - return ( - <> - - {t('workflows.systemWorkflows')} - - - - - - - - {data.items.map((w) => ( - - ))} - - - - - - - - ); -}; - -export default memo(WorkflowLibraryList); diff --git a/invokeai/frontend/web/src/services/api/schema.d.ts b/invokeai/frontend/web/src/services/api/schema.d.ts index 1c770b7725..80a2a856a3 100644 --- a/invokeai/frontend/web/src/services/api/schema.d.ts +++ b/invokeai/frontend/web/src/services/api/schema.d.ts @@ -3434,7 +3434,7 @@ export type components = { * @description The nodes in this graph */ nodes?: { - [key: string]: components["schemas"]["StringInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["OpenposeImageProcessorInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["ColorMapImageProcessorInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["ONNXLatentsToImageInvocation"] | components["schemas"]["ClipSkipInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["ONNXTextToLatentsInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["FloatInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["ONNXPromptInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["GraphInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["LinearUIOutputInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["SDXLLoraLoaderInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["LoraLoaderInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["OnnxModelLoaderInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["VaeLoaderInvocation"] | components["schemas"]["LineartImageProcessorInvocation"]; + [key: string]: components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["FloatInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["ONNXTextToLatentsInvocation"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["GraphInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["StringInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["SDXLLoraLoaderInvocation"] | components["schemas"]["OnnxModelLoaderInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["ONNXPromptInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["ClipSkipInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["LoraLoaderInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["VaeLoaderInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["OpenposeImageProcessorInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["LinearUIOutputInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["ColorMapImageProcessorInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["ONNXLatentsToImageInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["BooleanInvocation"]; }; /** * Edges @@ -3471,7 +3471,7 @@ export type components = { * @description The results of node executions */ results: { - [key: string]: components["schemas"]["LoraLoaderOutput"] | components["schemas"]["GraphInvocationOutput"] | components["schemas"]["StringCollectionOutput"] | components["schemas"]["StringPosNegOutput"] | components["schemas"]["StringOutput"] | components["schemas"]["ControlOutput"] | components["schemas"]["UNetOutput"] | components["schemas"]["T2IAdapterOutput"] | components["schemas"]["BooleanOutput"] | components["schemas"]["FaceOffOutput"] | components["schemas"]["IntegerCollectionOutput"] | components["schemas"]["FloatCollectionOutput"] | components["schemas"]["SchedulerOutput"] | components["schemas"]["TileToPropertiesOutput"] | components["schemas"]["FloatOutput"] | components["schemas"]["ClipSkipInvocationOutput"] | components["schemas"]["LatentsCollectionOutput"] | components["schemas"]["SDXLModelLoaderOutput"] | components["schemas"]["ONNXModelLoaderOutput"] | components["schemas"]["ColorOutput"] | components["schemas"]["IPAdapterOutput"] | components["schemas"]["SDXLRefinerModelLoaderOutput"] | components["schemas"]["LatentsOutput"] | components["schemas"]["FaceMaskOutput"] | components["schemas"]["IntegerOutput"] | components["schemas"]["NoiseOutput"] | components["schemas"]["PairTileImageOutput"] | components["schemas"]["SDXLLoraLoaderOutput"] | components["schemas"]["MetadataOutput"] | components["schemas"]["String2Output"] | components["schemas"]["CollectInvocationOutput"] | components["schemas"]["ConditioningOutput"] | components["schemas"]["CLIPOutput"] | components["schemas"]["ColorCollectionOutput"] | components["schemas"]["ImageCollectionOutput"] | components["schemas"]["IterateInvocationOutput"] | components["schemas"]["ModelLoaderOutput"] | components["schemas"]["SeamlessModeOutput"] | components["schemas"]["VAEOutput"] | components["schemas"]["BooleanCollectionOutput"] | components["schemas"]["CalculateImageTilesOutput"] | components["schemas"]["MetadataItemOutput"] | components["schemas"]["DenoiseMaskOutput"] | components["schemas"]["ConditioningCollectionOutput"] | components["schemas"]["ImageOutput"]; + [key: string]: components["schemas"]["ConditioningOutput"] | components["schemas"]["CalculateImageTilesOutput"] | components["schemas"]["SDXLModelLoaderOutput"] | components["schemas"]["BooleanCollectionOutput"] | components["schemas"]["SDXLLoraLoaderOutput"] | components["schemas"]["MetadataOutput"] | components["schemas"]["ConditioningCollectionOutput"] | components["schemas"]["T2IAdapterOutput"] | components["schemas"]["ImageCollectionOutput"] | components["schemas"]["CLIPOutput"] | components["schemas"]["BooleanOutput"] | components["schemas"]["SchedulerOutput"] | components["schemas"]["FaceOffOutput"] | components["schemas"]["DenoiseMaskOutput"] | components["schemas"]["ClipSkipInvocationOutput"] | components["schemas"]["TileToPropertiesOutput"] | components["schemas"]["ImageOutput"] | components["schemas"]["ModelLoaderOutput"] | components["schemas"]["VAEOutput"] | components["schemas"]["StringPosNegOutput"] | components["schemas"]["MetadataItemOutput"] | components["schemas"]["StringCollectionOutput"] | components["schemas"]["ONNXModelLoaderOutput"] | components["schemas"]["NoiseOutput"] | components["schemas"]["PairTileImageOutput"] | components["schemas"]["GraphInvocationOutput"] | components["schemas"]["LoraLoaderOutput"] | components["schemas"]["IntegerCollectionOutput"] | components["schemas"]["ColorOutput"] | components["schemas"]["FaceMaskOutput"] | components["schemas"]["SeamlessModeOutput"] | components["schemas"]["SDXLRefinerModelLoaderOutput"] | components["schemas"]["String2Output"] | components["schemas"]["StringOutput"] | components["schemas"]["LatentsCollectionOutput"] | components["schemas"]["UNetOutput"] | components["schemas"]["CollectInvocationOutput"] | components["schemas"]["ColorCollectionOutput"] | components["schemas"]["FloatCollectionOutput"] | components["schemas"]["IterateInvocationOutput"] | components["schemas"]["IPAdapterOutput"] | components["schemas"]["FloatOutput"] | components["schemas"]["IntegerOutput"] | components["schemas"]["LatentsOutput"] | components["schemas"]["ControlOutput"]; }; /** * Errors @@ -9881,7 +9881,7 @@ export type components = { * WorkflowCategory * @enum {string} */ - WorkflowCategory: "user" | "system"; + WorkflowCategory: "user" | "default"; /** WorkflowMeta */ WorkflowMeta: { /** @@ -9889,7 +9889,7 @@ export type components = { * @description The version of the workflow schema. */ version: string; - /** @description The category of the workflow (user or system). */ + /** @description The category of the workflow (user or default). */ category: components["schemas"]["WorkflowCategory"]; }; /** WorkflowRecordDTO */ @@ -10265,23 +10265,23 @@ export type components = { */ UIType: "SDXLMainModelField" | "SDXLRefinerModelField" | "ONNXModelField" | "VAEModelField" | "LoRAModelField" | "ControlNetModelField" | "IPAdapterModelField" | "SchedulerField" | "AnyField" | "CollectionField" | "CollectionItemField" | "DEPRECATED_Boolean" | "DEPRECATED_Color" | "DEPRECATED_Conditioning" | "DEPRECATED_Control" | "DEPRECATED_Float" | "DEPRECATED_Image" | "DEPRECATED_Integer" | "DEPRECATED_Latents" | "DEPRECATED_String" | "DEPRECATED_BooleanCollection" | "DEPRECATED_ColorCollection" | "DEPRECATED_ConditioningCollection" | "DEPRECATED_ControlCollection" | "DEPRECATED_FloatCollection" | "DEPRECATED_ImageCollection" | "DEPRECATED_IntegerCollection" | "DEPRECATED_LatentsCollection" | "DEPRECATED_StringCollection" | "DEPRECATED_BooleanPolymorphic" | "DEPRECATED_ColorPolymorphic" | "DEPRECATED_ConditioningPolymorphic" | "DEPRECATED_ControlPolymorphic" | "DEPRECATED_FloatPolymorphic" | "DEPRECATED_ImagePolymorphic" | "DEPRECATED_IntegerPolymorphic" | "DEPRECATED_LatentsPolymorphic" | "DEPRECATED_StringPolymorphic" | "DEPRECATED_MainModel" | "DEPRECATED_UNet" | "DEPRECATED_Vae" | "DEPRECATED_CLIP" | "DEPRECATED_Collection" | "DEPRECATED_CollectionItem" | "DEPRECATED_Enum" | "DEPRECATED_WorkflowField" | "DEPRECATED_IsIntermediate" | "DEPRECATED_BoardField" | "DEPRECATED_MetadataItem" | "DEPRECATED_MetadataItemCollection" | "DEPRECATED_MetadataItemPolymorphic" | "DEPRECATED_MetadataDict"; /** - * StableDiffusion1ModelFormat + * T2IAdapterModelFormat * @description An enumeration. * @enum {string} */ - StableDiffusion1ModelFormat: "checkpoint" | "diffusers"; - /** - * StableDiffusionOnnxModelFormat - * @description An enumeration. - * @enum {string} - */ - StableDiffusionOnnxModelFormat: "olive" | "onnx"; + T2IAdapterModelFormat: "diffusers"; /** * IPAdapterModelFormat * @description An enumeration. * @enum {string} */ IPAdapterModelFormat: "invokeai"; + /** + * ControlNetModelFormat + * @description An enumeration. + * @enum {string} + */ + ControlNetModelFormat: "checkpoint" | "diffusers"; /** * CLIPVisionModelFormat * @description An enumeration. @@ -10295,23 +10295,23 @@ export type components = { */ StableDiffusionXLModelFormat: "checkpoint" | "diffusers"; /** - * ControlNetModelFormat + * StableDiffusionOnnxModelFormat * @description An enumeration. * @enum {string} */ - ControlNetModelFormat: "checkpoint" | "diffusers"; - /** - * T2IAdapterModelFormat - * @description An enumeration. - * @enum {string} - */ - T2IAdapterModelFormat: "diffusers"; + StableDiffusionOnnxModelFormat: "olive" | "onnx"; /** * StableDiffusion2ModelFormat * @description An enumeration. * @enum {string} */ StableDiffusion2ModelFormat: "checkpoint" | "diffusers"; + /** + * StableDiffusion1ModelFormat + * @description An enumeration. + * @enum {string} + */ + StableDiffusion1ModelFormat: "checkpoint" | "diffusers"; }; responses: never; parameters: never; diff --git a/pyproject.toml b/pyproject.toml index e7279f8a4d..bc0d844407 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -165,7 +165,7 @@ version = { attr = "invokeai.version.__version__" } [tool.setuptools.package-data] "invokeai.app.assets" = ["**/*.png"] -"invokeai.app.services.workflow_records.system_workflows" = ["*.json"] +"invokeai.app.services.workflow_records.default_workflows" = ["*.json"] "invokeai.assets.fonts" = ["**/*.ttf"] "invokeai.backend" = ["**.png"] "invokeai.configs" = ["*.example", "**/*.yaml", "*.txt"]