Skip to content

Commit c09d7e0

Browse files
Hires Addition
Updated ImageMetaDataViewer with correct values Updated tooltip text Add arguments for Hires & Seamless Metadata
1 parent 101cac6 commit c09d7e0

File tree

19 files changed

+595
-513
lines changed

19 files changed

+595
-513
lines changed

backend/invoke_ai_web_server.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,7 @@ def parameters_to_generated_image_metadata(self, parameters):
723723
'height',
724724
'extra',
725725
'seamless',
726+
'hires_fix',
726727
]
727728

728729
rfc_dict = {}

backend/modules/parameters.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ def parameters_to_command(params):
3636
switches.append(f'-A {params["sampler_name"]}')
3737
if "seamless" in params and params["seamless"] == True:
3838
switches.append(f"--seamless")
39+
if "hires_fix" in params and params["hires_fix"] == True:
40+
switches.append(f"--hires")
3941
if "init_img" in params and len(params["init_img"]) > 0:
4042
switches.append(f'-I {params["init_img"]}')
4143
if "init_mask" in params and len(params["init_mask"]) > 0:

backend/server.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@ def parameters_to_generated_image_metadata(parameters):
493493
"height",
494494
"extra",
495495
"seamless",
496+
"hires_fix",
496497
]
497498

498499
rfc_dict = {}

frontend/dist/assets/index.560edd47.js

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

frontend/dist/assets/index.989a0ca2.js

Lines changed: 0 additions & 483 deletions
This file was deleted.

frontend/dist/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>InvokeAI - A Stable Diffusion Toolkit</title>
88
<link rel="shortcut icon" type="icon" href="/assets/favicon.0d253ced.ico" />
9-
<script type="module" crossorigin src="/assets/index.989a0ca2.js"></script>
9+
<script type="module" crossorigin src="/assets/index.560edd47.js"></script>
1010
<link rel="stylesheet" href="/assets/index.58175ea1.css">
1111
</head>
1212

frontend/src/app/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export const PARAMETERS: { [key: string]: string } = {
5050
maskPath: 'Initial Image Mask',
5151
shouldFitToWidthHeight: 'Fit Initial Image',
5252
seamless: 'Seamless Tiling',
53+
hiresFix: 'High Resolution Optimizations',
5354
};
5455

5556
export const NUMPY_RAND_MIN = 0;

frontend/src/app/features.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@ export enum Feature {
1414
FACE_CORRECTION,
1515
IMAGE_TO_IMAGE,
1616
}
17-
17+
/** For each tooltip in the UI, the below feature definitions & props will pull relevant information into the tooltip.
18+
*
19+
* 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 .
20+
*/
1821
export const FEATURES: Record<Feature, FeatureHelpInfo> = {
1922
[Feature.PROMPT]: {
20-
text: 'This field will take all prompt text, including both content and stylistic terms. CLI Commands will not work in the prompt.',
23+
text: 'This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.',
2124
href: 'link/to/docs/feature3.html',
2225
guideImage: 'asset/path.gif',
2326
},
@@ -27,17 +30,16 @@ export const FEATURES: Record<Feature, FeatureHelpInfo> = {
2730
guideImage: 'asset/path.gif',
2831
},
2932
[Feature.OTHER]: {
30-
text: 'Additional Options',
31-
href: 'link/to/docs/feature3.html',
33+
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',
3234
guideImage: 'asset/path.gif',
3335
},
3436
[Feature.SEED]: {
35-
text: 'Seed values provide an initial set of noise which guide the denoising process.',
37+
text: 'Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ',
3638
href: 'link/to/docs/feature3.html',
3739
guideImage: 'asset/path.gif',
3840
},
3941
[Feature.VARIATIONS]: {
40-
text: 'Try a variation with an amount of between 0 and 1 to change the output image for the set seed.',
42+
text: 'Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.',
4143
href: 'link/to/docs/feature3.html',
4244
guideImage: 'asset/path.gif',
4345
},
@@ -47,8 +49,8 @@ export const FEATURES: Record<Feature, FeatureHelpInfo> = {
4749
guideImage: 'asset/path.gif',
4850
},
4951
[Feature.FACE_CORRECTION]: {
50-
text: 'Using GFPGAN or CodeFormer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher values will apply a stronger corrective pressure on outputs.',
51-
href: 'link/to/docs/feature2.html',
52+
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).',
53+
href: 'link/to/docs/feature3.html',
5254
guideImage: 'asset/path.gif',
5355
},
5456
[Feature.IMAGE_TO_IMAGE]: {

frontend/src/app/invokeai.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export declare type CommonGeneratedImageMetadata = {
5555
width: number;
5656
height: number;
5757
seamless: boolean;
58+
hires_fix: boolean;
5859
extra: null | Record<string, never>; // Pending development of RFC #266
5960
};
6061

frontend/src/common/util/parameterTranslation.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export const frontendToBackendParameters = (
2929
sampler,
3030
seed,
3131
seamless,
32+
hiresFix,
3233
shouldUseInitImage,
3334
img2imgStrength,
3435
initialImagePath,
@@ -59,6 +60,7 @@ export const frontendToBackendParameters = (
5960
sampler_name: sampler,
6061
seed,
6162
seamless,
63+
hires_fix: hiresFix,
6264
progress_images: shouldDisplayInProgress,
6365
};
6466

@@ -123,6 +125,7 @@ export const backendToFrontendParameters = (parameters: {
123125
sampler_name,
124126
seed,
125127
seamless,
128+
hires_fix,
126129
progress_images,
127130
variation_amount,
128131
with_variations,
@@ -185,6 +188,7 @@ export const backendToFrontendParameters = (parameters: {
185188
options.sampler = sampler_name;
186189
options.seed = seed;
187190
options.seamless = seamless;
191+
options.hiresFix = hires_fix;
188192
}
189193

190194
return options;

0 commit comments

Comments
 (0)