Skip to content

Commit 5a67bc6

Browse files
Merge branch 'main' into depth-anything
2 parents 35184db + 61cf4d4 commit 5a67bc6

File tree

12 files changed

+160
-46
lines changed

12 files changed

+160
-46
lines changed

invokeai/app/services/workflow_records/workflow_records_common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class WorkflowRecordOrderBy(str, Enum, metaclass=MetaEnum):
3131
class WorkflowCategory(str, Enum, metaclass=MetaEnum):
3232
User = "user"
3333
Default = "default"
34+
Project = "project"
3435

3536

3637
class WorkflowMeta(BaseModel):

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

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,28 @@
110110
"somethingWentWrong": "Etwas ist schief gelaufen",
111111
"copyError": "$t(gallery.copy) Fehler",
112112
"input": "Eingabe",
113-
"notInstalled": "Nicht $t(common.installed)"
113+
"notInstalled": "Nicht $t(common.installed)",
114+
"advancedOptions": "Erweiterte Einstellungen",
115+
"alpha": "Alpha",
116+
"red": "Rot",
117+
"green": "Grün",
118+
"blue": "Blau",
119+
"delete": "Löschen",
120+
"or": "oder",
121+
"direction": "Richtung",
122+
"free": "Frei",
123+
"save": "Speichern",
124+
"preferencesLabel": "Präferenzen",
125+
"created": "Erstellt",
126+
"prevPage": "Vorherige Seite",
127+
"nextPage": "Nächste Seite",
128+
"unknownError": "Unbekannter Fehler",
129+
"unsaved": "Nicht gespeichert",
130+
"aboutDesc": "Verwenden Sie Invoke für die Arbeit? Dann siehe hier:",
131+
"localSystem": "Lokales System",
132+
"orderBy": "Ordnen nach",
133+
"saveAs": "Speicher als",
134+
"updated": "Aktualisiert"
114135
},
115136
"gallery": {
116137
"generations": "Erzeugungen",
@@ -701,7 +722,8 @@
701722
"invokeProgressBar": "Invoke Fortschrittsanzeige",
702723
"mode": "Modus",
703724
"resetUI": "$t(accessibility.reset) von UI",
704-
"createIssue": "Ticket erstellen"
725+
"createIssue": "Ticket erstellen",
726+
"about": "Über"
705727
},
706728
"boards": {
707729
"autoAddBoard": "Automatisches Hinzufügen zum Ordner",
@@ -809,7 +831,8 @@
809831
"canny": "Canny",
810832
"hedDescription": "Ganzheitlich verschachtelte Kantenerkennung",
811833
"scribble": "Scribble",
812-
"maxFaces": "Maximal Anzahl Gesichter"
834+
"maxFaces": "Maximal Anzahl Gesichter",
835+
"resizeSimple": "Größe ändern (einfach)"
813836
},
814837
"queue": {
815838
"status": "Status",
@@ -999,5 +1022,27 @@
9991022
"selectLoRA": "Wählen ein LoRA aus",
10001023
"esrganModel": "ESRGAN Modell",
10011024
"addLora": "LoRA hinzufügen"
1025+
},
1026+
"accordions": {
1027+
"generation": {
1028+
"title": "Erstellung",
1029+
"modelTab": "Modell",
1030+
"conceptsTab": "Konzepte"
1031+
},
1032+
"image": {
1033+
"title": "Bild"
1034+
},
1035+
"advanced": {
1036+
"title": "Erweitert"
1037+
},
1038+
"control": {
1039+
"title": "Kontrolle",
1040+
"controlAdaptersTab": "Kontroll Adapter",
1041+
"ipTab": "Bild Beschreibung"
1042+
},
1043+
"compositing": {
1044+
"coherenceTab": "Kohärenzpass",
1045+
"infillTab": "Füllung"
1046+
}
10021047
}
10031048
}

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,10 @@
606606
"desc": "Send current image to Image to Image",
607607
"title": "Send To Image To Image"
608608
},
609+
"remixImage": {
610+
"desc": "Use all parameters except seed from the current image",
611+
"title": "Remix image"
612+
},
609613
"setParameters": {
610614
"desc": "Use all parameters of the current image",
611615
"title": "Set Parameters"
@@ -1222,6 +1226,7 @@
12221226
"useCpuNoise": "Use CPU Noise",
12231227
"cpuNoise": "CPU Noise",
12241228
"gpuNoise": "GPU Noise",
1229+
"remixImage": "Remix Image",
12251230
"useInitImg": "Use Initial Image",
12261231
"usePrompt": "Use Prompt",
12271232
"useSeed": "Use Seed",
@@ -1703,6 +1708,7 @@
17031708
"workflowLibrary": "Library",
17041709
"userWorkflows": "My Workflows",
17051710
"defaultWorkflows": "Default Workflows",
1711+
"projectWorkflows": "Project Workflows",
17061712
"openWorkflow": "Open Workflow",
17071713
"uploadWorkflow": "Load from File",
17081714
"deleteWorkflow": "Delete Workflow",
@@ -1715,6 +1721,7 @@
17151721
"workflowSaved": "Workflow Saved",
17161722
"noRecentWorkflows": "No Recent Workflows",
17171723
"noUserWorkflows": "No User Workflows",
1724+
"noWorkflows": "No Workflows",
17181725
"noSystemWorkflows": "No System Workflows",
17191726
"problemLoading": "Problem Loading Workflows",
17201727
"loading": "Loading Workflows",

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

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,14 @@
118118
"advancedOptions": "Opzioni avanzate",
119119
"free": "Libero",
120120
"or": "o",
121-
"preferencesLabel": "Preferenze"
121+
"preferencesLabel": "Preferenze",
122+
"red": "Rosso",
123+
"aboutHeading": "Possiedi il tuo potere creativo",
124+
"aboutDesc": "Utilizzi Invoke per lavoro? Guarda qui:",
125+
"localSystem": "Sistema locale",
126+
"green": "Verde",
127+
"blue": "Blu",
128+
"alpha": "Alfa"
122129
},
123130
"gallery": {
124131
"generations": "Generazioni",
@@ -521,7 +528,8 @@
521528
"customConfigFileLocation": "Posizione del file di configurazione personalizzato",
522529
"vaePrecision": "Precisione VAE",
523530
"noModelSelected": "Nessun modello selezionato",
524-
"conversionNotSupported": "Conversione non supportata"
531+
"conversionNotSupported": "Conversione non supportata",
532+
"configFile": "File di configurazione"
525533
},
526534
"parameters": {
527535
"images": "Immagini",
@@ -660,7 +668,9 @@
660668
"lockAspectRatio": "Blocca proporzioni",
661669
"swapDimensions": "Scambia dimensioni",
662670
"aspect": "Aspetto",
663-
"setToOptimalSizeTooLarge": "$t(parameters.setToOptimalSize) (potrebbe essere troppo grande)"
671+
"setToOptimalSizeTooLarge": "$t(parameters.setToOptimalSize) (potrebbe essere troppo grande)",
672+
"boxBlur": "Box",
673+
"gaussianBlur": "Gaussian"
664674
},
665675
"settings": {
666676
"models": "Modelli",
@@ -794,7 +804,9 @@
794804
"invalidUpload": "Caricamento non valido",
795805
"problemDeletingWorkflow": "Problema durante l'eliminazione del flusso di lavoro",
796806
"workflowDeleted": "Flusso di lavoro eliminato",
797-
"problemRetrievingWorkflow": "Problema nel recupero del flusso di lavoro"
807+
"problemRetrievingWorkflow": "Problema nel recupero del flusso di lavoro",
808+
"resetInitialImage": "Reimposta l'immagine iniziale",
809+
"uploadInitialImage": "Carica l'immagine iniziale"
798810
},
799811
"tooltip": {
800812
"feature": {
@@ -899,7 +911,8 @@
899911
"loadMore": "Carica altro",
900912
"mode": "Modalità",
901913
"resetUI": "$t(accessibility.reset) l'Interfaccia Utente",
902-
"createIssue": "Segnala un problema"
914+
"createIssue": "Segnala un problema",
915+
"about": "Informazioni"
903916
},
904917
"ui": {
905918
"hideProgressImages": "Nascondi avanzamento immagini",

invokeai/frontend/web/src/features/gallery/components/CurrentImage/CurrentImageButtons.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import { memo, useCallback } from 'react';
3232
import { useHotkeys } from 'react-hotkeys-hook';
3333
import { useTranslation } from 'react-i18next';
3434
import {
35+
PiArrowsCounterClockwiseBold,
3536
PiAsteriskBold,
3637
PiDotsThreeOutlineFill,
3738
PiFlowArrowBold,
@@ -129,6 +130,16 @@ const CurrentImageButtons = () => {
129130

130131
useHotkeys('p', handleUsePrompt, [metadata]);
131132

133+
const handleRemixImage = useCallback(() => {
134+
// Recalls all metadata parameters except seed
135+
recallAllParameters({
136+
...metadata,
137+
seed: undefined,
138+
});
139+
}, [metadata, recallAllParameters]);
140+
141+
useHotkeys('r', handleRemixImage, [metadata]);
142+
132143
const handleUseSize = useCallback(() => {
133144
recallWidthAndHeight(metadata?.width, metadata?.height);
134145
}, [metadata?.width, metadata?.height, recallWidthAndHeight]);
@@ -231,6 +242,14 @@ const CurrentImageButtons = () => {
231242
onClick={handleLoadWorkflow}
232243
isLoading={getAndLoadEmbeddedWorkflowResult.isLoading}
233244
/>
245+
<IconButton
246+
isLoading={isLoadingMetadata}
247+
icon={<PiArrowsCounterClockwiseBold />}
248+
tooltip={`${t('parameters.remixImage')} (R)`}
249+
aria-label={`${t('parameters.remixImage')} (R)`}
250+
isDisabled={!metadata?.positive_prompt}
251+
onClick={handleRemixImage}
252+
/>
234253
<IconButton
235254
isLoading={isLoadingMetadata}
236255
icon={<PiQuotesBold />}

invokeai/frontend/web/src/features/gallery/components/ImageContextMenu/SingleSelectionMenuItems.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { memo, useCallback } from 'react';
2424
import { flushSync } from 'react-dom';
2525
import { useTranslation } from 'react-i18next';
2626
import {
27+
PiArrowsCounterClockwiseBold,
2728
PiAsteriskBold,
2829
PiCopyBold,
2930
PiDownloadSimpleBold,
@@ -127,6 +128,14 @@ const SingleSelectionMenuItems = (props: SingleSelectionMenuItemsProps) => {
127128
recallAllParameters(metadata);
128129
}, [metadata, recallAllParameters]);
129130

131+
const handleRemixImage = useCallback(() => {
132+
// Recalls all metadata parameters except seed
133+
recallAllParameters({
134+
...metadata,
135+
seed: undefined,
136+
});
137+
}, [metadata, recallAllParameters]);
138+
130139
const handleChangeBoard = useCallback(() => {
131140
dispatch(imagesToChangeSelected([imageDTO]));
132141
dispatch(isModalOpenChanged(true));
@@ -187,6 +196,19 @@ const SingleSelectionMenuItems = (props: SingleSelectionMenuItemsProps) => {
187196
>
188197
{t('nodes.loadWorkflow')}
189198
</MenuItem>
199+
<MenuItem
200+
icon={
201+
isLoadingMetadata ? <SpinnerIcon /> : <PiArrowsCounterClockwiseBold />
202+
}
203+
onClickCapture={handleRemixImage}
204+
isDisabled={
205+
isLoadingMetadata ||
206+
(metadata?.positive_prompt === undefined &&
207+
metadata?.negative_prompt === undefined)
208+
}
209+
>
210+
{t('parameters.remixImage')}
211+
</MenuItem>
190212
<MenuItem
191213
icon={isLoadingMetadata ? <SpinnerIcon /> : <PiQuotesBold />}
192214
onClickCapture={handleRecallPrompt}

invokeai/frontend/web/src/features/nodes/types/workflow.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export type XYPosition = z.infer<typeof zXYPosition>;
1515
export const zDimension = z.number().gt(0).nullish();
1616
export type Dimension = z.infer<typeof zDimension>;
1717

18-
export const zWorkflowCategory = z.enum(['user', 'default']);
18+
export const zWorkflowCategory = z.enum(['user', 'default', 'project']);
1919
export type WorkflowCategory = z.infer<typeof zWorkflowCategory>;
2020
// #endregion
2121

invokeai/frontend/web/src/features/system/components/HotkeysModal/useHotkeyData.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ export const useHotkeyData = (): HotkeyGroup[] => {
8181
() => ({
8282
title: t('hotkeys.generalHotkeys'),
8383
hotkeyListItems: [
84+
{
85+
title: t('hotkeys.remixImage.title'),
86+
desc: t('hotkeys.remixImage.desc'),
87+
hotkeys: [['R']],
88+
},
8489
{
8590
title: t('hotkeys.setPrompt.title'),
8691
desc: t('hotkeys.setPrompt.desc'),

invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibraryList.tsx

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import {
1313
InputRightElement,
1414
Spacer,
1515
} from '@invoke-ai/ui';
16+
import { useStore } from '@nanostores/react';
17+
import { $projectId } from 'app/store/nanostores/projectId';
1618
import {
1719
IAINoContentFallback,
1820
IAINoContentFallbackWithSpinner,
@@ -62,6 +64,7 @@ const WorkflowLibraryList = () => {
6264
const [order_by, setOrderBy] = useState<WorkflowRecordOrderBy>('opened_at');
6365
const [direction, setDirection] = useState<SQLiteDirection>('ASC');
6466
const [debouncedQuery] = useDebounce(query, 500);
67+
const projectId = useStore($projectId);
6568

6669
const queryArg = useMemo<Parameters<typeof useListWorkflowsQuery>[0]>(() => {
6770
if (category === 'user') {
@@ -142,13 +145,8 @@ const WorkflowLibraryList = () => {
142145
[]
143146
);
144147

145-
const handleSetUserCategory = useCallback(() => {
146-
setCategory('user');
147-
setPage(0);
148-
}, []);
149-
150-
const handleSetDefaultCategory = useCallback(() => {
151-
setCategory('default');
148+
const handleSetCategory = useCallback((category: WorkflowCategory) => {
149+
setCategory(category);
152150
setPage(0);
153151
}, []);
154152

@@ -158,21 +156,31 @@ const WorkflowLibraryList = () => {
158156
<ButtonGroup>
159157
<Button
160158
variant={category === 'user' ? undefined : 'ghost'}
161-
onClick={handleSetUserCategory}
159+
onClick={handleSetCategory.bind(null, 'user')}
162160
isChecked={category === 'user'}
163161
>
164162
{t('workflows.userWorkflows')}
165163
</Button>
166-
<Button
167-
variant={category === 'default' ? undefined : 'ghost'}
168-
onClick={handleSetDefaultCategory}
169-
isChecked={category === 'default'}
170-
>
171-
{t('workflows.defaultWorkflows')}
172-
</Button>
164+
{projectId ? (
165+
<Button
166+
variant={category === 'project' ? undefined : 'ghost'}
167+
onClick={handleSetCategory.bind(null, 'project')}
168+
isChecked={category === 'project'}
169+
>
170+
{t('workflows.projectWorkflows')}
171+
</Button>
172+
) : (
173+
<Button
174+
variant={category === 'default' ? undefined : 'ghost'}
175+
onClick={handleSetCategory.bind(null, 'default')}
176+
isChecked={category === 'default'}
177+
>
178+
{t('workflows.defaultWorkflows')}
179+
</Button>
180+
)}
173181
</ButtonGroup>
174182
<Spacer />
175-
{category === 'user' && (
183+
{category !== 'default' && (
176184
<>
177185
<FormControl isDisabled={isFetching} w={64} minW={56}>
178186
<FormLabel>{t('common.orderBy')}</FormLabel>
@@ -228,7 +236,7 @@ const WorkflowLibraryList = () => {
228236
</Flex>
229237
</ScrollableContent>
230238
) : (
231-
<IAINoContentFallback label={t('workflows.noUserWorkflows')} />
239+
<IAINoContentFallback label={t('workflows.noWorkflows')} />
232240
)}
233241
<Divider />
234242
{data && (

invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibraryListItem.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const WorkflowLibraryListItem = ({ workflowDTO }: Props) => {
5252
{workflowDTO.name || t('workflows.unnamedWorkflow')}
5353
</Heading>
5454
<Spacer />
55-
{workflowDTO.category === 'user' && (
55+
{workflowDTO.category !== 'default' && (
5656
<Text
5757
fontSize="sm"
5858
variant="subtext"
@@ -81,7 +81,7 @@ const WorkflowLibraryListItem = ({ workflowDTO }: Props) => {
8181
</Text>
8282
)}
8383
<Spacer />
84-
{workflowDTO.category === 'user' && (
84+
{workflowDTO.category !== 'default' && (
8585
<Text
8686
fontSize="sm"
8787
variant="subtext"
@@ -104,7 +104,7 @@ const WorkflowLibraryListItem = ({ workflowDTO }: Props) => {
104104
>
105105
{t('common.load')}
106106
</Button>
107-
{workflowDTO.category === 'user' && (
107+
{workflowDTO.category !== 'default' && (
108108
<Button
109109
flexShrink={0}
110110
colorScheme="error"

0 commit comments

Comments
 (0)