Merge branch 'main' into depth-anything

This commit is contained in:
Kent Keirsey 2024-01-23 22:31:19 -06:00 committed by GitHub
commit 5a67bc68a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 160 additions and 46 deletions

View File

@ -31,6 +31,7 @@ class WorkflowRecordOrderBy(str, Enum, metaclass=MetaEnum):
class WorkflowCategory(str, Enum, metaclass=MetaEnum):
User = "user"
Default = "default"
Project = "project"
class WorkflowMeta(BaseModel):

View File

@ -110,7 +110,28 @@
"somethingWentWrong": "Etwas ist schief gelaufen",
"copyError": "$t(gallery.copy) Fehler",
"input": "Eingabe",
"notInstalled": "Nicht $t(common.installed)"
"notInstalled": "Nicht $t(common.installed)",
"advancedOptions": "Erweiterte Einstellungen",
"alpha": "Alpha",
"red": "Rot",
"green": "Grün",
"blue": "Blau",
"delete": "Löschen",
"or": "oder",
"direction": "Richtung",
"free": "Frei",
"save": "Speichern",
"preferencesLabel": "Präferenzen",
"created": "Erstellt",
"prevPage": "Vorherige Seite",
"nextPage": "Nächste Seite",
"unknownError": "Unbekannter Fehler",
"unsaved": "Nicht gespeichert",
"aboutDesc": "Verwenden Sie Invoke für die Arbeit? Dann siehe hier:",
"localSystem": "Lokales System",
"orderBy": "Ordnen nach",
"saveAs": "Speicher als",
"updated": "Aktualisiert"
},
"gallery": {
"generations": "Erzeugungen",
@ -701,7 +722,8 @@
"invokeProgressBar": "Invoke Fortschrittsanzeige",
"mode": "Modus",
"resetUI": "$t(accessibility.reset) von UI",
"createIssue": "Ticket erstellen"
"createIssue": "Ticket erstellen",
"about": "Über"
},
"boards": {
"autoAddBoard": "Automatisches Hinzufügen zum Ordner",
@ -809,7 +831,8 @@
"canny": "Canny",
"hedDescription": "Ganzheitlich verschachtelte Kantenerkennung",
"scribble": "Scribble",
"maxFaces": "Maximal Anzahl Gesichter"
"maxFaces": "Maximal Anzahl Gesichter",
"resizeSimple": "Größe ändern (einfach)"
},
"queue": {
"status": "Status",
@ -999,5 +1022,27 @@
"selectLoRA": "Wählen ein LoRA aus",
"esrganModel": "ESRGAN Modell",
"addLora": "LoRA hinzufügen"
},
"accordions": {
"generation": {
"title": "Erstellung",
"modelTab": "Modell",
"conceptsTab": "Konzepte"
},
"image": {
"title": "Bild"
},
"advanced": {
"title": "Erweitert"
},
"control": {
"title": "Kontrolle",
"controlAdaptersTab": "Kontroll Adapter",
"ipTab": "Bild Beschreibung"
},
"compositing": {
"coherenceTab": "Kohärenzpass",
"infillTab": "Füllung"
}
}
}

View File

@ -606,6 +606,10 @@
"desc": "Send current image to Image to Image",
"title": "Send To Image To Image"
},
"remixImage": {
"desc": "Use all parameters except seed from the current image",
"title": "Remix image"
},
"setParameters": {
"desc": "Use all parameters of the current image",
"title": "Set Parameters"
@ -1222,6 +1226,7 @@
"useCpuNoise": "Use CPU Noise",
"cpuNoise": "CPU Noise",
"gpuNoise": "GPU Noise",
"remixImage": "Remix Image",
"useInitImg": "Use Initial Image",
"usePrompt": "Use Prompt",
"useSeed": "Use Seed",
@ -1703,6 +1708,7 @@
"workflowLibrary": "Library",
"userWorkflows": "My Workflows",
"defaultWorkflows": "Default Workflows",
"projectWorkflows": "Project Workflows",
"openWorkflow": "Open Workflow",
"uploadWorkflow": "Load from File",
"deleteWorkflow": "Delete Workflow",
@ -1715,6 +1721,7 @@
"workflowSaved": "Workflow Saved",
"noRecentWorkflows": "No Recent Workflows",
"noUserWorkflows": "No User Workflows",
"noWorkflows": "No Workflows",
"noSystemWorkflows": "No System Workflows",
"problemLoading": "Problem Loading Workflows",
"loading": "Loading Workflows",

View File

@ -118,7 +118,14 @@
"advancedOptions": "Opzioni avanzate",
"free": "Libero",
"or": "o",
"preferencesLabel": "Preferenze"
"preferencesLabel": "Preferenze",
"red": "Rosso",
"aboutHeading": "Possiedi il tuo potere creativo",
"aboutDesc": "Utilizzi Invoke per lavoro? Guarda qui:",
"localSystem": "Sistema locale",
"green": "Verde",
"blue": "Blu",
"alpha": "Alfa"
},
"gallery": {
"generations": "Generazioni",
@ -521,7 +528,8 @@
"customConfigFileLocation": "Posizione del file di configurazione personalizzato",
"vaePrecision": "Precisione VAE",
"noModelSelected": "Nessun modello selezionato",
"conversionNotSupported": "Conversione non supportata"
"conversionNotSupported": "Conversione non supportata",
"configFile": "File di configurazione"
},
"parameters": {
"images": "Immagini",
@ -660,7 +668,9 @@
"lockAspectRatio": "Blocca proporzioni",
"swapDimensions": "Scambia dimensioni",
"aspect": "Aspetto",
"setToOptimalSizeTooLarge": "$t(parameters.setToOptimalSize) (potrebbe essere troppo grande)"
"setToOptimalSizeTooLarge": "$t(parameters.setToOptimalSize) (potrebbe essere troppo grande)",
"boxBlur": "Box",
"gaussianBlur": "Gaussian"
},
"settings": {
"models": "Modelli",
@ -794,7 +804,9 @@
"invalidUpload": "Caricamento non valido",
"problemDeletingWorkflow": "Problema durante l'eliminazione del flusso di lavoro",
"workflowDeleted": "Flusso di lavoro eliminato",
"problemRetrievingWorkflow": "Problema nel recupero del flusso di lavoro"
"problemRetrievingWorkflow": "Problema nel recupero del flusso di lavoro",
"resetInitialImage": "Reimposta l'immagine iniziale",
"uploadInitialImage": "Carica l'immagine iniziale"
},
"tooltip": {
"feature": {
@ -899,7 +911,8 @@
"loadMore": "Carica altro",
"mode": "Modalità",
"resetUI": "$t(accessibility.reset) l'Interfaccia Utente",
"createIssue": "Segnala un problema"
"createIssue": "Segnala un problema",
"about": "Informazioni"
},
"ui": {
"hideProgressImages": "Nascondi avanzamento immagini",

View File

@ -32,6 +32,7 @@ import { memo, useCallback } from 'react';
import { useHotkeys } from 'react-hotkeys-hook';
import { useTranslation } from 'react-i18next';
import {
PiArrowsCounterClockwiseBold,
PiAsteriskBold,
PiDotsThreeOutlineFill,
PiFlowArrowBold,
@ -129,6 +130,16 @@ const CurrentImageButtons = () => {
useHotkeys('p', handleUsePrompt, [metadata]);
const handleRemixImage = useCallback(() => {
// Recalls all metadata parameters except seed
recallAllParameters({
...metadata,
seed: undefined,
});
}, [metadata, recallAllParameters]);
useHotkeys('r', handleRemixImage, [metadata]);
const handleUseSize = useCallback(() => {
recallWidthAndHeight(metadata?.width, metadata?.height);
}, [metadata?.width, metadata?.height, recallWidthAndHeight]);
@ -231,6 +242,14 @@ const CurrentImageButtons = () => {
onClick={handleLoadWorkflow}
isLoading={getAndLoadEmbeddedWorkflowResult.isLoading}
/>
<IconButton
isLoading={isLoadingMetadata}
icon={<PiArrowsCounterClockwiseBold />}
tooltip={`${t('parameters.remixImage')} (R)`}
aria-label={`${t('parameters.remixImage')} (R)`}
isDisabled={!metadata?.positive_prompt}
onClick={handleRemixImage}
/>
<IconButton
isLoading={isLoadingMetadata}
icon={<PiQuotesBold />}

View File

@ -24,6 +24,7 @@ import { memo, useCallback } from 'react';
import { flushSync } from 'react-dom';
import { useTranslation } from 'react-i18next';
import {
PiArrowsCounterClockwiseBold,
PiAsteriskBold,
PiCopyBold,
PiDownloadSimpleBold,
@ -127,6 +128,14 @@ const SingleSelectionMenuItems = (props: SingleSelectionMenuItemsProps) => {
recallAllParameters(metadata);
}, [metadata, recallAllParameters]);
const handleRemixImage = useCallback(() => {
// Recalls all metadata parameters except seed
recallAllParameters({
...metadata,
seed: undefined,
});
}, [metadata, recallAllParameters]);
const handleChangeBoard = useCallback(() => {
dispatch(imagesToChangeSelected([imageDTO]));
dispatch(isModalOpenChanged(true));
@ -187,6 +196,19 @@ const SingleSelectionMenuItems = (props: SingleSelectionMenuItemsProps) => {
>
{t('nodes.loadWorkflow')}
</MenuItem>
<MenuItem
icon={
isLoadingMetadata ? <SpinnerIcon /> : <PiArrowsCounterClockwiseBold />
}
onClickCapture={handleRemixImage}
isDisabled={
isLoadingMetadata ||
(metadata?.positive_prompt === undefined &&
metadata?.negative_prompt === undefined)
}
>
{t('parameters.remixImage')}
</MenuItem>
<MenuItem
icon={isLoadingMetadata ? <SpinnerIcon /> : <PiQuotesBold />}
onClickCapture={handleRecallPrompt}

View File

@ -15,7 +15,7 @@ export type XYPosition = z.infer<typeof zXYPosition>;
export const zDimension = z.number().gt(0).nullish();
export type Dimension = z.infer<typeof zDimension>;
export const zWorkflowCategory = z.enum(['user', 'default']);
export const zWorkflowCategory = z.enum(['user', 'default', 'project']);
export type WorkflowCategory = z.infer<typeof zWorkflowCategory>;
// #endregion

View File

@ -81,6 +81,11 @@ export const useHotkeyData = (): HotkeyGroup[] => {
() => ({
title: t('hotkeys.generalHotkeys'),
hotkeyListItems: [
{
title: t('hotkeys.remixImage.title'),
desc: t('hotkeys.remixImage.desc'),
hotkeys: [['R']],
},
{
title: t('hotkeys.setPrompt.title'),
desc: t('hotkeys.setPrompt.desc'),

View File

@ -13,6 +13,8 @@ import {
InputRightElement,
Spacer,
} from '@invoke-ai/ui';
import { useStore } from '@nanostores/react';
import { $projectId } from 'app/store/nanostores/projectId';
import {
IAINoContentFallback,
IAINoContentFallbackWithSpinner,
@ -62,6 +64,7 @@ const WorkflowLibraryList = () => {
const [order_by, setOrderBy] = useState<WorkflowRecordOrderBy>('opened_at');
const [direction, setDirection] = useState<SQLiteDirection>('ASC');
const [debouncedQuery] = useDebounce(query, 500);
const projectId = useStore($projectId);
const queryArg = useMemo<Parameters<typeof useListWorkflowsQuery>[0]>(() => {
if (category === 'user') {
@ -142,13 +145,8 @@ const WorkflowLibraryList = () => {
[]
);
const handleSetUserCategory = useCallback(() => {
setCategory('user');
setPage(0);
}, []);
const handleSetDefaultCategory = useCallback(() => {
setCategory('default');
const handleSetCategory = useCallback((category: WorkflowCategory) => {
setCategory(category);
setPage(0);
}, []);
@ -158,21 +156,31 @@ const WorkflowLibraryList = () => {
<ButtonGroup>
<Button
variant={category === 'user' ? undefined : 'ghost'}
onClick={handleSetUserCategory}
onClick={handleSetCategory.bind(null, 'user')}
isChecked={category === 'user'}
>
{t('workflows.userWorkflows')}
</Button>
<Button
variant={category === 'default' ? undefined : 'ghost'}
onClick={handleSetDefaultCategory}
isChecked={category === 'default'}
>
{t('workflows.defaultWorkflows')}
</Button>
{projectId ? (
<Button
variant={category === 'project' ? undefined : 'ghost'}
onClick={handleSetCategory.bind(null, 'project')}
isChecked={category === 'project'}
>
{t('workflows.projectWorkflows')}
</Button>
) : (
<Button
variant={category === 'default' ? undefined : 'ghost'}
onClick={handleSetCategory.bind(null, 'default')}
isChecked={category === 'default'}
>
{t('workflows.defaultWorkflows')}
</Button>
)}
</ButtonGroup>
<Spacer />
{category === 'user' && (
{category !== 'default' && (
<>
<FormControl isDisabled={isFetching} w={64} minW={56}>
<FormLabel>{t('common.orderBy')}</FormLabel>
@ -228,7 +236,7 @@ const WorkflowLibraryList = () => {
</Flex>
</ScrollableContent>
) : (
<IAINoContentFallback label={t('workflows.noUserWorkflows')} />
<IAINoContentFallback label={t('workflows.noWorkflows')} />
)}
<Divider />
{data && (

View File

@ -52,7 +52,7 @@ const WorkflowLibraryListItem = ({ workflowDTO }: Props) => {
{workflowDTO.name || t('workflows.unnamedWorkflow')}
</Heading>
<Spacer />
{workflowDTO.category === 'user' && (
{workflowDTO.category !== 'default' && (
<Text
fontSize="sm"
variant="subtext"
@ -81,7 +81,7 @@ const WorkflowLibraryListItem = ({ workflowDTO }: Props) => {
</Text>
)}
<Spacer />
{workflowDTO.category === 'user' && (
{workflowDTO.category !== 'default' && (
<Text
fontSize="sm"
variant="subtext"
@ -104,7 +104,7 @@ const WorkflowLibraryListItem = ({ workflowDTO }: Props) => {
>
{t('common.load')}
</Button>
{workflowDTO.category === 'user' && (
{workflowDTO.category !== 'default' && (
<Button
flexShrink={0}
colorScheme="error"

File diff suppressed because one or more lines are too long

View File

@ -33,12 +33,12 @@ classifiers = [
]
dependencies = [
# Core generation dependencies, pinned for reproducible builds.
"accelerate==0.25.0",
"accelerate==0.26.1",
"basicsr==1.4.2",
"clip_anytorch==2.5.2", # replacing "clip @ https://github.com/openai/CLIP/archive/eaa22acb90a5876642d0507623e859909230a52d.zip",
"compel==2.0.2",
"controlnet-aux==0.0.7",
"diffusers[torch]==0.25.0",
"diffusers[torch]==0.25.1",
"invisible-watermark==0.2.0", # needed to install SDXL base and refiner using their repo_ids
"mediapipe==0.10.7", # needed for "mediapipeface" controlnet model
"numpy==1.26.3", # >1.24.0 is needed to use the 'strict' argument to np.testing.assert_array_equal()
@ -52,7 +52,7 @@ dependencies = [
"torchmetrics==0.11.4",
"torchsde==0.2.6",
"torchvision==0.16.2",
"transformers==4.36.2",
"transformers==4.37.0",
# Core application dependencies, pinned for reproducible builds.
"fastapi-events==0.10.0",