mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
wip: update ldm_patched
currently issues with calculate_sigmas call
This commit is contained in:
@@ -288,14 +288,14 @@ def vae_parse(latent):
|
||||
@torch.no_grad()
|
||||
@torch.inference_mode()
|
||||
def calculate_sigmas_all(sampler, model, scheduler, steps):
|
||||
from ldm_patched.modules.samplers import calculate_sigmas_scheduler
|
||||
from ldm_patched.modules.samplers import calculate_sigmas
|
||||
|
||||
discard_penultimate_sigma = False
|
||||
if sampler in ['dpm_2', 'dpm_2_ancestral']:
|
||||
steps += 1
|
||||
discard_penultimate_sigma = True
|
||||
|
||||
sigmas = calculate_sigmas_scheduler(model, scheduler, steps)
|
||||
sigmas = calculate_sigmas(model, scheduler, steps)
|
||||
|
||||
if discard_penultimate_sigma:
|
||||
sigmas = torch.cat([sigmas[:-2], sigmas[-1:]])
|
||||
|
||||
Reference in New Issue
Block a user