diff --git a/frontend/src/app/constants.ts b/frontend/src/app/constants.ts index 968d104943..efcb9358d3 100644 --- a/frontend/src/app/constants.ts +++ b/frontend/src/app/constants.ts @@ -32,27 +32,6 @@ export const UPSCALING_LEVELS: Array<{ key: string; value: number }> = [ { key: '4x', value: 4 }, ]; -// Internal to human-readable parameters -export const PARAMETERS: { [key: string]: string } = { - prompt: 'Prompt', - iterations: 'Iterations', - steps: 'Steps', - cfgScale: 'CFG Scale', - height: 'Height', - width: 'Width', - sampler: 'Sampler', - seed: 'Seed', - img2imgStrength: 'img2img Strength', - facetoolStrength: 'GFPGAN Strength', - upscalingLevel: 'Upscaling Level', - upscalingStrength: 'Upscaling Strength', - initialImagePath: 'Initial Image', - maskPath: 'Initial Image Mask', - shouldFitToWidthHeight: 'Fit Initial Image', - seamless: 'Seamless Tiling', - hiresFix: 'High Resolution Optimizations', -}; - export const NUMPY_RAND_MIN = 0; export const NUMPY_RAND_MAX = 4294967295; diff --git a/frontend/src/app/features.ts b/frontend/src/app/features.ts index 11d0e5e6dd..361c8356dc 100644 --- a/frontend/src/app/features.ts +++ b/frontend/src/app/features.ts @@ -15,8 +15,8 @@ export enum Feature { IMAGE_TO_IMAGE, } /** For each tooltip in the UI, the below feature definitions & props will pull relevant information into the tooltip. - * - * To-do: href & GuideImages are placeholders, and are not currently utilized, but will be updated (along with the tooltip UI) as feature and UI development and we get a better idea on where things "forever homes" will be . + * + * To-do: href & GuideImages are placeholders, and are not currently utilized, but will be updated (along with the tooltip UI) as feature and UI development and we get a better idea on where things "forever homes" will be . */ export const FEATURES: Record = { [Feature.PROMPT]: { @@ -30,7 +30,8 @@ export const FEATURES: Record = { guideImage: 'asset/path.gif', }, [Feature.OTHER]: { - text: 'These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ', href: 'link/to/docs/feature3.html', + text: 'These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ', + href: 'link/to/docs/feature3.html', guideImage: 'asset/path.gif', }, [Feature.SEED]: { @@ -49,7 +50,7 @@ export const FEATURES: Record = { guideImage: 'asset/path.gif', }, [Feature.FACE_CORRECTION]: { - text: 'Using GFPGAN, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher values will apply a stronger corrective pressure on outputs, resulting in more appealing faces (with less respect for accuracy of the original subject).', + text: 'Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.', href: 'link/to/docs/feature3.html', guideImage: 'asset/path.gif', }, diff --git a/frontend/src/app/socketio/actions.ts b/frontend/src/app/socketio/actions.ts index 0e9e408cc7..9591dd5214 100644 --- a/frontend/src/app/socketio/actions.ts +++ b/frontend/src/app/socketio/actions.ts @@ -10,7 +10,7 @@ import * as InvokeAI from '../invokeai'; export const generateImage = createAction('socketio/generateImage'); export const runESRGAN = createAction('socketio/runESRGAN'); -export const runGFPGAN = createAction('socketio/runGFPGAN'); +export const runFacetool = createAction('socketio/runFacetool'); export const deleteImage = createAction('socketio/deleteImage'); export const requestImages = createAction( 'socketio/requestImages' diff --git a/frontend/src/app/socketio/middleware.ts b/frontend/src/app/socketio/middleware.ts index 1a39c063a0..d7ef59e25a 100644 --- a/frontend/src/app/socketio/middleware.ts +++ b/frontend/src/app/socketio/middleware.ts @@ -50,7 +50,7 @@ export const socketioMiddleware = () => { const { emitGenerateImage, emitRunESRGAN, - emitRunFacetool: emitRunGFPGAN, + emitRunFacetool, emitDeleteImage, emitRequestImages, emitRequestNewImages, @@ -129,8 +129,8 @@ export const socketioMiddleware = () => { break; } - case 'socketio/runGFPGAN': { - emitRunGFPGAN(action.payload); + case 'socketio/runFacetool': { + emitRunFacetool(action.payload); break; } diff --git a/frontend/src/features/gallery/CurrentImageButtons.tsx b/frontend/src/features/gallery/CurrentImageButtons.tsx index dab5492a4c..017d6dfdf3 100644 --- a/frontend/src/features/gallery/CurrentImageButtons.tsx +++ b/frontend/src/features/gallery/CurrentImageButtons.tsx @@ -15,7 +15,7 @@ import { import DeleteImageModal from './DeleteImageModal'; import { SystemState } from '../system/systemSlice'; import IAIButton from '../../common/components/IAIButton'; -import { runESRGAN, runGFPGAN } from '../../app/socketio/actions'; +import { runESRGAN, runFacetool } from '../../app/socketio/actions'; import IAIIconButton from '../../common/components/IAIIconButton'; import { MdDelete, MdFace, MdHd, MdImage, MdInfo } from 'react-icons/md'; import InvokePopover from './InvokePopover'; @@ -186,7 +186,8 @@ const CurrentImageButtons = ({ image }: CurrentImageButtonsProps) => { ] ); - const handleClickFixFaces = () => dispatch(runGFPGAN(image)); + const handleClickFixFaces = () => dispatch(runFacetool(image)); + useHotkeys( 'r', () => {