Fix int64 with UniPC && Add OneAPI version logging

This commit is contained in:
Disty0
2023-05-28 20:00:03 +03:00
parent 7254925dca
commit 09141ee1a8
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -289,7 +289,8 @@ def check_torch():
log.info(f'Torch {torch.__version__}')
if args.use_ipex and allow_ipex:
import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import
log.info(f'Torch backend: Intel OneAPI {torch.__version__}')
log.info(f'Torch backend: Intel IPEX {ipex.__version__}')
log.info(f'{os.popen("icpx --version").read().rstrip()}')
log.info(f'Torch detected GPU: {torch.xpu.get_device_name("xpu")} VRAM {round(torch.xpu.get_device_properties("xpu").total_memory / 1024 / 1024)}')
elif torch.cuda.is_available() and (allow_cuda or allow_rocm):
if torch.version.cuda and allow_cuda:
+4 -1
View File
@@ -97,7 +97,10 @@ class VanillaStableDiffusionSampler:
unconditional_conditioning = unconditional_conditioning[:, :cond.shape[1]]
if self.mask is not None:
img_orig = self.sampler.model.q_sample(self.init_latent, ts)
if shared.cmd_opts.use_ipex:
img_orig = self.sampler.model.q_sample(self.init_latent, ts.type(torch.int64))
else:
img_orig = self.sampler.model.q_sample(self.init_latent, ts)
x = img_orig * self.mask + self.nmask * x
# Wrap the image conditioning back up since the DDIM code can accept the dict directly.