mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
fix vae
This commit is contained in:
+10
-14
@@ -452,20 +452,16 @@ def process_diffusion(positive_cond, negative_cond, steps, switch, width, height
|
|||||||
target_model = final_unet
|
target_model = final_unet
|
||||||
print('Use base model to refine itself - this may because of developer mode.')
|
print('Use base model to refine itself - this may because of developer mode.')
|
||||||
|
|
||||||
sigmas = None
|
sigmas = calculate_sigmas(sampler=sampler_name,
|
||||||
len_sigmas = steps - switch
|
scheduler=scheduler_name,
|
||||||
|
model=target_model.model,
|
||||||
if final_refiner_unet is not None:
|
steps=steps,
|
||||||
sigmas = calculate_sigmas(sampler=sampler_name,
|
denoise=denoise)[switch:]
|
||||||
scheduler=scheduler_name,
|
k1 = target_model.model.latent_format.scale_factor
|
||||||
model=final_refiner_unet.model,
|
k2 = final_unet.model.latent_format.scale_factor
|
||||||
steps=steps,
|
k = float(k1) / float(k2)
|
||||||
denoise=denoise)[switch:]
|
sigmas = sigmas * k
|
||||||
k1 = final_refiner_unet.model.latent_format.scale_factor
|
len_sigmas = len(sigmas) - 1
|
||||||
k2 = final_unet.model.latent_format.scale_factor
|
|
||||||
k = float(k1) / float(k2)
|
|
||||||
sigmas = sigmas * k
|
|
||||||
len_sigmas = len(sigmas) - 1
|
|
||||||
|
|
||||||
last_step, last_clean_latent, last_noisy_latent = sample_hijack.history_record[-1]
|
last_step, last_clean_latent, last_noisy_latent = sample_hijack.history_record[-1]
|
||||||
last_clean_latent = final_unet.model.process_latent_out(last_clean_latent.cpu().to(torch.float32))
|
last_clean_latent = final_unet.model.process_latent_out(last_clean_latent.cpu().to(torch.float32))
|
||||||
|
|||||||
Reference in New Issue
Block a user