diff --git a/invokeai/app/invocations/flux_denoise.py b/invokeai/app/invocations/flux_denoise.py index 77e02fbcd3..27ead5ea2c 100644 --- a/invokeai/app/invocations/flux_denoise.py +++ b/invokeai/app/invocations/flux_denoise.py @@ -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 ( diff --git a/invokeai/backend/flux/sampling_utils.py b/invokeai/backend/flux/sampling_utils.py index 92c78de01e..8972291101 100644 --- a/invokeai/backend/flux/sampling_utils.py +++ b/invokeai/backend/flux/sampling_utils.py @@ -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