Compare commits

...

2 Commits

Author SHA1 Message Date
Ryan Dick
d122343431 Disable TGS in frontend for testing. 2024-09-24 15:12:51 +00:00
Ryan Dick
0139788e65 Fractional denoise start. 2024-09-24 14:52:24 +00:00
3 changed files with 14 additions and 10 deletions

View File

@@ -143,7 +143,9 @@ class FluxDenoiseInvocation(BaseInvocation, WithMetadata, WithBoard):
)
# Clip the timesteps schedule based on denoising_start and denoising_end.
timesteps = clip_timestep_schedule(timesteps, self.denoising_start, self.denoising_end)
# HACK(ryand): This should be applied in the frontend.
denoising_start = 1.0 - (1.0 - self.denoising_start) ** 0.2
timesteps = clip_timestep_schedule(timesteps, denoising_start, self.denoising_end)
# Prepare input latent image.
if init_latents is not None:
@@ -193,7 +195,8 @@ class FluxDenoiseInvocation(BaseInvocation, WithMetadata, WithBoard):
traj_guidance_extension = TrajectoryGuidanceExtension(
init_latents=init_latents,
inpaint_mask=inpaint_mask,
trajectory_guidance_strength=self.trajectory_guidance_strength,
# HACK(ryand): This should not be hardcoded.
trajectory_guidance_strength=0,
)
with (

View File

@@ -92,7 +92,9 @@ def clip_timestep_schedule(timesteps: list[float], denoising_start: float, denoi
t_start_idx = _find_last_index_ge_val(timesteps, t_start_val)
t_end_idx = _find_last_index_ge_val(timesteps, t_end_val)
clipped_timesteps = timesteps[t_start_idx : t_end_idx + 1]
# TODO(ryand): Make fractional cutoffs optional and apply to both the start and end.
clipped_timesteps = timesteps[t_start_idx + 1 : t_end_idx + 1]
clipped_timesteps = [t_start_val] + clipped_timesteps
return clipped_timesteps

View File

@@ -46,7 +46,6 @@ export const buildFLUXGraph = async (
t5EncoderModel,
clipEmbedModel,
img2imgStrength,
optimizedDenoisingEnabled,
} = params;
assert(model, 'No model found in state');
@@ -155,12 +154,12 @@ export const buildFLUXGraph = async (
denoisingValue,
false
);
if (optimizedDenoisingEnabled) {
g.updateNode(noise, {
denoising_start: 0,
trajectory_guidance_strength: denoisingValue,
});
}
// if (optimizedDenoisingEnabled) {
// g.updateNode(noise, {
// denoising_start: 0,
// trajectory_guidance_strength: denoisingValue,
// });
// }
} else if (generationMode === 'outpaint') {
canvasOutput = await addOutpaint(
state,