mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-01-31 13:29:46 +00:00
Update forge_reference.py
This commit is contained in:
@@ -25,6 +25,8 @@ class PreprocessorReference(Preprocessor):
|
||||
self.do_not_need_model = True
|
||||
|
||||
self.is_recording_style = False
|
||||
self.recorded_attn1 = {}
|
||||
self.recorded_h = {}
|
||||
|
||||
def process_before_every_sampling(self, process, cond, *args, **kwargs):
|
||||
unit = kwargs['unit']
|
||||
@@ -46,6 +48,9 @@ class PreprocessorReference(Preprocessor):
|
||||
sigma_max = unet.model.model_sampling.percent_to_sigma(start_percent)
|
||||
sigma_min = unet.model.model_sampling.percent_to_sigma(end_percent)
|
||||
|
||||
self.recorded_attn1 = {}
|
||||
self.recorded_h = {}
|
||||
|
||||
def conditioning_modifier(model, x, timestep, uncond, cond, cond_scale, model_options, seed):
|
||||
sigma = timestep[0].item()
|
||||
if not (sigma_min <= sigma <= sigma_max):
|
||||
|
||||
Reference in New Issue
Block a user