mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-02-23 00:03:57 +00:00
we do not need to waste 10 seconds on T5 when CFG=1
This commit is contained in:
@@ -483,7 +483,12 @@ class StableDiffusionProcessing:
|
||||
self.step_multiplier = total_steps // self.steps
|
||||
self.firstpass_steps = total_steps
|
||||
|
||||
self.uc = self.get_conds_with_caching(prompt_parser.get_learned_conditioning, negative_prompts, total_steps, [self.cached_uc], self.extra_network_data)
|
||||
if self.cfg_scale == 1:
|
||||
self.uc = None
|
||||
print('Skipping unconditional conditioning when CFG = 1')
|
||||
else:
|
||||
self.uc = self.get_conds_with_caching(prompt_parser.get_learned_conditioning, negative_prompts, total_steps, [self.cached_uc], self.extra_network_data)
|
||||
|
||||
self.c = self.get_conds_with_caching(prompt_parser.get_multicond_learned_conditioning, prompts, total_steps, [self.cached_c], self.extra_network_data)
|
||||
|
||||
def get_conds(self):
|
||||
|
||||
Reference in New Issue
Block a user