Skip to content

Commit 1cceef8

Browse files
committed
out of sync with upstream
Merge branch 'gruff_to' of https://github.com/Vargol/InvokeAI into gruff_to
2 parents 288c0cc + fcc452b commit 1cceef8

File tree

59 files changed

+1714
-718
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1714
-718
lines changed

invokeai/backend/quantization/gguf/ggml_tensor.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,19 @@ def size(self, dim: int | None = None):
119119
return self.tensor_shape[dim]
120120
return self.tensor_shape
121121

122+
@overload
123+
def to(self, *args, **kwargs) -> torch.Tensor: ...
124+
125+
def to(self, *args, **kwargs):
126+
for func_arg in args:
127+
if isinstance(func_arg, torch.dtype) and func_arg != self.quantized_data.dtype:
128+
raise ValueError("Operation changed the dtype of GGMLTensor unexpectedly.")
129+
if "dtype" in kwargs.keys():
130+
if kwargs["dtype"] != self.quantized_data.dtype:
131+
raise ValueError("Operation changed the dtype of GGMLTensor unexpectedly.")
132+
self.quantized_data = self.quantized_data.to(*args, **kwargs)
133+
return self
134+
122135
@property
123136
def shape(self) -> torch.Size: # pyright: ignore[reportIncompatibleVariableOverride] pyright doesn't understand this for some reason.
124137
"""The shape of the tensor after dequantization. I.e. the shape that will be used in any math ops."""

invokeai/frontend/web/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"@xyflow/react": "^12.5.3",
6666
"async-mutex": "^0.5.0",
6767
"chakra-react-select": "^4.9.2",
68-
"cmdk": "^1.0.0",
68+
"cmdk": "^1.1.1",
6969
"compare-versions": "^6.1.1",
7070
"filesize": "^10.1.6",
7171
"fracturedjsonjs": "^4.0.2",
@@ -98,7 +98,7 @@
9898
"react-i18next": "^15.0.2",
9999
"react-icons": "^5.3.0",
100100
"react-redux": "9.1.2",
101-
"react-resizable-panels": "^2.1.4",
101+
"react-resizable-panels": "^2.1.7",
102102
"react-textarea-autosize": "^8.5.7",
103103
"react-use": "^17.5.1",
104104
"react-virtuoso": "^4.12.5",

invokeai/frontend/web/pnpm-lock.yaml

Lines changed: 175 additions & 122 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

invokeai/frontend/web/public/locales/en.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@
118118
"error": "Error",
119119
"error_withCount_one": "{{count}} error",
120120
"error_withCount_other": "{{count}} errors",
121+
"model_withCount_one": "{{count}} model",
122+
"model_withCount_other": "{{count}} models",
121123
"file": "File",
122124
"folder": "Folder",
123125
"format": "format",
@@ -138,6 +140,8 @@
138140
"localSystem": "Local System",
139141
"learnMore": "Learn More",
140142
"modelManager": "Model Manager",
143+
"noMatches": "No matches",
144+
"noOptions": "No options",
141145
"nodes": "Workflows",
142146
"notInstalled": "Not $t(common.installed)",
143147
"openInNewTab": "Open in New Tab",
@@ -197,7 +201,9 @@
197201
"column": "Column",
198202
"value": "Value",
199203
"label": "Label",
200-
"systemInformation": "System Information"
204+
"systemInformation": "System Information",
205+
"compact": "Compact",
206+
"full": "Full"
201207
},
202208
"hrf": {
203209
"hrf": "High Resolution Fix",
@@ -768,6 +774,7 @@
768774
"description": "Description",
769775
"edit": "Edit",
770776
"fileSize": "File Size",
777+
"filterModels": "Filter models",
771778
"fluxRedux": "FLUX Redux",
772779
"height": "Height",
773780
"huggingFace": "HuggingFace",
@@ -821,10 +828,12 @@
821828
"modelUpdated": "Model Updated",
822829
"modelUpdateFailed": "Model Update Failed",
823830
"name": "Name",
824-
"noModelsInstalled": "No Models Installed",
831+
"modelPickerFallbackNoModelsInstalled": "No models installed.",
832+
"modelPickerFallbackNoModelsInstalled2": "Visit the <LinkComponent>Model Manager</LinkComponent> to install models.",
825833
"noModelsInstalledDesc1": "Install models with the",
826834
"noModelSelected": "No Model Selected",
827-
"noMatchingModels": "No matching Models",
835+
"noMatchingModels": "No matching models",
836+
"noModelsInstalled": "No models installed",
828837
"none": "none",
829838
"path": "Path",
830839
"pathToConfig": "Path To Config",
@@ -871,7 +880,8 @@
871880
"installingXModels_one": "Installing {{count}} model",
872881
"installingXModels_other": "Installing {{count}} models",
873882
"skippingXDuplicates_one": ", skipping {{count}} duplicate",
874-
"skippingXDuplicates_other": ", skipping {{count}} duplicates"
883+
"skippingXDuplicates_other": ", skipping {{count}} duplicates",
884+
"manageModels": "Manage Models"
875885
},
876886
"models": {
877887
"addLora": "Add LoRA",

invokeai/frontend/web/src/app/components/InvokeAIUI.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import type { CustomStarUi } from 'app/store/nanostores/customStarUI';
1212
import { $customStarUI } from 'app/store/nanostores/customStarUI';
1313
import { $isDebugging } from 'app/store/nanostores/isDebugging';
1414
import { $logo } from 'app/store/nanostores/logo';
15+
import { $onClickGoToModelManager } from 'app/store/nanostores/onClickGoToModelManager';
1516
import { $openAPISchemaUrl } from 'app/store/nanostores/openAPISchemaUrl';
1617
import { $projectId, $projectName, $projectUrl } from 'app/store/nanostores/projectId';
1718
import { $queueId, DEFAULT_QUEUE_ID } from 'app/store/nanostores/queueId';
@@ -59,6 +60,10 @@ interface Props extends PropsWithChildren {
5960
workflowTagCategories?: WorkflowTagCategory[];
6061
workflowSortOptions?: WorkflowSortOption[];
6162
loggingOverrides?: LoggingOverrides;
63+
/**
64+
* If provided, overrides in-app navigation to the model manager
65+
*/
66+
onClickGoToModelManager?: () => void;
6267
}
6368

6469
const InvokeAIUI = ({
@@ -81,6 +86,7 @@ const InvokeAIUI = ({
8186
workflowTagCategories,
8287
workflowSortOptions,
8388
loggingOverrides,
89+
onClickGoToModelManager,
8490
}: Props) => {
8591
useLayoutEffect(() => {
8692
/*
@@ -205,6 +211,16 @@ const InvokeAIUI = ({
205211
};
206212
}, [logo]);
207213

214+
useEffect(() => {
215+
if (onClickGoToModelManager) {
216+
$onClickGoToModelManager.set(onClickGoToModelManager);
217+
}
218+
219+
return () => {
220+
$onClickGoToModelManager.set(undefined);
221+
};
222+
}, [onClickGoToModelManager]);
223+
208224
useEffect(() => {
209225
if (workflowCategories) {
210226
$workflowLibraryCategoriesOptions.set(workflowCategories);
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { atom } from 'nanostores';
2+
3+
export const $onClickGoToModelManager = atom<(() => void) | undefined>(undefined);

invokeai/frontend/web/src/common/components/OverlayScrollbars/ScrollableContent.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { getOverlayScrollbarsParams } from 'common/components/OverlayScrollbars/
77
import type { OverlayScrollbarsComponentRef } from 'overlayscrollbars-react';
88
import { OverlayScrollbarsComponent } from 'overlayscrollbars-react';
99
import type { CSSProperties, PropsWithChildren } from 'react';
10-
import { memo, useEffect, useMemo, useState } from 'react';
10+
import { memo, useEffect, useMemo, useRef } from 'react';
1111

1212
type Props = PropsWithChildren & {
1313
maxHeight?: ChakraProps['maxHeight'];
@@ -22,9 +22,9 @@ const ScrollableContent = ({ children, maxHeight, overflowX = 'hidden', overflow
2222
() => getOverlayScrollbarsParams({ overflowX, overflowY }).options,
2323
[overflowX, overflowY]
2424
);
25-
const [os, osRef] = useState<OverlayScrollbarsComponentRef | null>(null);
25+
const os = useRef<OverlayScrollbarsComponentRef>(null);
2626
useEffect(() => {
27-
const osInstance = os?.osInstance();
27+
const osInstance = os.current?.osInstance();
2828

2929
if (!osInstance) {
3030
return;
@@ -46,7 +46,7 @@ const ScrollableContent = ({ children, maxHeight, overflowX = 'hidden', overflow
4646
return (
4747
<Flex w="full" h="full" maxHeight={maxHeight} position="relative">
4848
<Box position="absolute" top={0} left={0} right={0} bottom={0}>
49-
<OverlayScrollbarsComponent ref={osRef} style={styles} options={overlayscrollbarsOptions}>
49+
<OverlayScrollbarsComponent ref={os} style={styles} options={overlayscrollbarsOptions} defer>
5050
{children}
5151
</OverlayScrollbarsComponent>
5252
</Box>

0 commit comments

Comments
 (0)