fix: Possible fix to image to image / refiner setting sync

The main goal is to avoid noisy output no matter what the slider values are.
This commit is contained in:
blessedcoolant 2023-07-26 13:39:51 +12:00 committed by psychedelicious
parent cbcd416b70
commit 4fe889bbf8
3 changed files with 8 additions and 4 deletions

View File

@ -98,6 +98,7 @@ export const addSDXLRefinerToGraph = (
steps: refinerSteps / (1 - refinerStart), steps: refinerSteps / (1 - refinerStart),
scheduler: refinerScheduler, scheduler: refinerScheduler,
denoising_start: refinerStart, denoising_start: refinerStart,
denoising_end: 1,
}; };
graph.edges.push( graph.edges.push(

View File

@ -36,10 +36,10 @@ export const buildLinearSDXLImageToImageGraph = (
scheduler, scheduler,
steps, steps,
initialImage, initialImage,
img2imgStrength: strength,
shouldFitToWidthHeight, shouldFitToWidthHeight,
width, width,
height, height,
img2imgStrength: strength,
clipSkip, clipSkip,
shouldUseCpuNoise, shouldUseCpuNoise,
shouldUseNoiseSettings, shouldUseNoiseSettings,
@ -113,7 +113,10 @@ export const buildLinearSDXLImageToImageGraph = (
cfg_scale, cfg_scale,
scheduler, scheduler,
steps, steps,
denoising_start: shouldUseSDXLRefiner ? refinerStart : 1 - strength, denoising_start: shouldUseSDXLRefiner
? Math.min(refinerStart, 1 - strength)
: 1 - strength,
denoising_end: shouldUseSDXLRefiner ? refinerStart : 1,
}, },
[IMAGE_TO_LATENTS]: { [IMAGE_TO_LATENTS]: {
type: 'i2l', type: 'i2l',
@ -337,7 +340,7 @@ export const buildLinearSDXLImageToImageGraph = (
controlnets: [], controlnets: [],
loras: [], loras: [],
clip_skip: clipSkip, clip_skip: clipSkip,
strength, strength: strength,
init_image: initialImage.imageName, init_image: initialImage.imageName,
positive_style_prompt: positiveStylePrompt, positive_style_prompt: positiveStylePrompt,
negative_style_prompt: negativeStylePrompt, negative_style_prompt: negativeStylePrompt,

View File

@ -38,7 +38,7 @@ const ParamSDXLRefinerStart = () => {
return ( return (
<IAISlider <IAISlider
label="Refiner Start" label="Refiner Start"
step={shift ? 0.1 : 0.01} step={shift ? 0.05 : 0.01}
min={0.01} min={0.01}
max={1} max={1}
onChange={handleChange} onChange={handleChange}