mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
Fix int64 with UniPC && Add OneAPI version logging
This commit is contained in:
+2
-1
@@ -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:
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user