Fixes lingering references to GFPGAN vs Facetool

This commit is contained in:
psychedelicious 2022-10-19 07:40:52 +08:00 committed by Kent Keirsey
parent 32a5ffe436
commit 2926c8299c
5 changed files with 12 additions and 31 deletions

View File

@ -32,27 +32,6 @@ export const UPSCALING_LEVELS: Array<{ key: string; value: number }> = [
{ key: '4x', value: 4 }, { 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_MIN = 0;
export const NUMPY_RAND_MAX = 4294967295; export const NUMPY_RAND_MAX = 4294967295;

View File

@ -30,7 +30,8 @@ export const FEATURES: Record<Feature, FeatureHelpInfo> = {
guideImage: 'asset/path.gif', guideImage: 'asset/path.gif',
}, },
[Feature.OTHER]: { [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', guideImage: 'asset/path.gif',
}, },
[Feature.SEED]: { [Feature.SEED]: {
@ -49,7 +50,7 @@ export const FEATURES: Record<Feature, FeatureHelpInfo> = {
guideImage: 'asset/path.gif', guideImage: 'asset/path.gif',
}, },
[Feature.FACE_CORRECTION]: { [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', href: 'link/to/docs/feature3.html',
guideImage: 'asset/path.gif', guideImage: 'asset/path.gif',
}, },

View File

@ -10,7 +10,7 @@ import * as InvokeAI from '../invokeai';
export const generateImage = createAction<undefined>('socketio/generateImage'); export const generateImage = createAction<undefined>('socketio/generateImage');
export const runESRGAN = createAction<InvokeAI.Image>('socketio/runESRGAN'); export const runESRGAN = createAction<InvokeAI.Image>('socketio/runESRGAN');
export const runGFPGAN = createAction<InvokeAI.Image>('socketio/runGFPGAN'); export const runFacetool = createAction<InvokeAI.Image>('socketio/runFacetool');
export const deleteImage = createAction<InvokeAI.Image>('socketio/deleteImage'); export const deleteImage = createAction<InvokeAI.Image>('socketio/deleteImage');
export const requestImages = createAction<undefined>( export const requestImages = createAction<undefined>(
'socketio/requestImages' 'socketio/requestImages'

View File

@ -50,7 +50,7 @@ export const socketioMiddleware = () => {
const { const {
emitGenerateImage, emitGenerateImage,
emitRunESRGAN, emitRunESRGAN,
emitRunFacetool: emitRunGFPGAN, emitRunFacetool,
emitDeleteImage, emitDeleteImage,
emitRequestImages, emitRequestImages,
emitRequestNewImages, emitRequestNewImages,
@ -129,8 +129,8 @@ export const socketioMiddleware = () => {
break; break;
} }
case 'socketio/runGFPGAN': { case 'socketio/runFacetool': {
emitRunGFPGAN(action.payload); emitRunFacetool(action.payload);
break; break;
} }

View File

@ -15,7 +15,7 @@ import {
import DeleteImageModal from './DeleteImageModal'; import DeleteImageModal from './DeleteImageModal';
import { SystemState } from '../system/systemSlice'; import { SystemState } from '../system/systemSlice';
import IAIButton from '../../common/components/IAIButton'; 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 IAIIconButton from '../../common/components/IAIIconButton';
import { MdDelete, MdFace, MdHd, MdImage, MdInfo } from 'react-icons/md'; import { MdDelete, MdFace, MdHd, MdImage, MdInfo } from 'react-icons/md';
import InvokePopover from './InvokePopover'; import InvokePopover from './InvokePopover';
@ -186,7 +186,8 @@ const CurrentImageButtons = ({ image }: CurrentImageButtonsProps) => {
] ]
); );
const handleClickFixFaces = () => dispatch(runGFPGAN(image)); const handleClickFixFaces = () => dispatch(runFacetool(image));
useHotkeys( useHotkeys(
'r', 'r',
() => { () => {