mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-01-26 19:09:45 +00:00
i
This commit is contained in:
@@ -173,7 +173,7 @@ class CFGDenoiser(torch.nn.Module):
|
||||
uncond = pad_cond(uncond, num_repeats, empty)
|
||||
self.padded_cond_uncond = True
|
||||
|
||||
unet_dtype = self.inner_model.inner_model.unet_patcher.model.model_config.unet_config['dtype']
|
||||
unet_dtype = self.inner_model.inner_model.forge_objects.unet.model.model_config.unet_config['dtype']
|
||||
x_input_dtype = x_in.dtype
|
||||
|
||||
x_in = x_in.to(unet_dtype)
|
||||
|
||||
@@ -187,7 +187,7 @@ def apply_refiner(cfg_denoiser, x):
|
||||
cfg_denoiser.update_inner_model()
|
||||
|
||||
inference_memory = 0
|
||||
unet_patcher = refiner.unet_patcher
|
||||
unet_patcher = refiner.forge_objects.unet
|
||||
model_management.load_models_gpu(
|
||||
[unet_patcher],
|
||||
unet_patcher.memory_required([x.shape[0]] + list(x.shape[1:])) + inference_memory)
|
||||
|
||||
@@ -142,7 +142,7 @@ class KDiffusionSampler(sd_samplers_common.Sampler):
|
||||
|
||||
def sample_img2img(self, p, x, noise, conditioning, unconditional_conditioning, steps=None, image_conditioning=None):
|
||||
inference_memory = 0
|
||||
unet_patcher = self.model_wrap.inner_model.unet_patcher
|
||||
unet_patcher = self.model_wrap.inner_model.forge_objects.unet
|
||||
ldm_patched.modules.model_management.load_models_gpu(
|
||||
[unet_patcher],
|
||||
unet_patcher.memory_required([x.shape[0] * 2] + list(x.shape[1:])) + inference_memory)
|
||||
@@ -206,7 +206,7 @@ class KDiffusionSampler(sd_samplers_common.Sampler):
|
||||
|
||||
def sample(self, p, x, conditioning, unconditional_conditioning, steps=None, image_conditioning=None):
|
||||
inference_memory = 0
|
||||
unet_patcher = self.model_wrap.inner_model.unet_patcher
|
||||
unet_patcher = self.model_wrap.inner_model.forge_objects.unet
|
||||
ldm_patched.modules.model_management.load_models_gpu(
|
||||
[unet_patcher],
|
||||
unet_patcher.memory_required([x.shape[0] * 2] + list(x.shape[1:])) + inference_memory)
|
||||
|
||||
@@ -99,7 +99,7 @@ class CompVisSampler(sd_samplers_common.Sampler):
|
||||
|
||||
def sample_img2img(self, p, x, noise, conditioning, unconditional_conditioning, steps=None, image_conditioning=None):
|
||||
inference_memory = 0
|
||||
unet_patcher = self.model_wrap.inner_model.unet_patcher
|
||||
unet_patcher = self.model_wrap.inner_model.forge_objects.unet
|
||||
ldm_patched.modules.model_management.load_models_gpu(
|
||||
[unet_patcher],
|
||||
unet_patcher.memory_required([x.shape[0] * 2] + list(x.shape[1:])) + inference_memory)
|
||||
@@ -151,7 +151,7 @@ class CompVisSampler(sd_samplers_common.Sampler):
|
||||
|
||||
def sample(self, p, x, conditioning, unconditional_conditioning, steps=None, image_conditioning=None):
|
||||
inference_memory = 0
|
||||
unet_patcher = self.model_wrap.inner_model.unet_patcher
|
||||
unet_patcher = self.model_wrap.inner_model.forge_objects.unet
|
||||
ldm_patched.modules.model_management.load_models_gpu(
|
||||
[unet_patcher],
|
||||
unet_patcher.memory_required([x.shape[0] * 2] + list(x.shape[1:])) + inference_memory)
|
||||
|
||||
Reference in New Issue
Block a user