From fc3d96f6f6a0007edc5f1531f1244cf5034bf9da Mon Sep 17 00:00:00 2001 From: Disty0 Date: Fri, 4 Aug 2023 04:15:25 +0300 Subject: [PATCH] IPEX fix ControlNet PidiNet --- html/locale_en.json | 2 +- modules/ipex_specific/__init__.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/html/locale_en.json b/html/locale_en.json index 925d935da..c67068070 100644 --- a/html/locale_en.json +++ b/html/locale_en.json @@ -570,7 +570,7 @@ {"id":"","label":"Use model EMA weights when possible","localized":"","hint":""}, {"id":"","label":"Generator device","localized":"","hint":""}, {"id":"","label":"Enable sequential CPU offload","localized":"","hint":"Reduces GPU memory usage by transferring weights to the CPU. Increases inference time approximately 10%. Use with Enable Attention slicing for minimal memory consumption"}, - {"id":"","label":"Enable model CPU offload","localized":"","hint":"Transferring of entire models to the GPU, negligible impact on inference time while still providing some memory savings. Use with Enable Attention slicing for additional memory savings"}, + {"id":"","label":"Enable model CPU offload","localized":"","hint":"Transferring of entire models to the CPU, negligible impact on inference time while still providing some memory savings. Use with Enable Attention slicing for additional memory savings"}, {"id":"","label":"Enable VAE slicing","localized":"","hint":"Decodes batch latents one image at a time with limited VRAM. Small performance boost in VAE decode on multi-image batches. Use with Enable Attention slicing"}, {"id":"","label":"Enable VAE tiling","localized":"","hint":"Divide large images into overlapping tiles with limited VRAM. Might result in a minor increase in processing time. Use with Enable Attention Slicing"}, {"id":"","label":"Enable attention slicing","localized":"","hint":"Performs attention computation in steps instead of all at once. 10% slower inference times. Greatly reduces memory usage. Best used, period"}, diff --git a/modules/ipex_specific/__init__.py b/modules/ipex_specific/__init__.py index 19b0d8860..b71027b35 100644 --- a/modules/ipex_specific/__init__.py +++ b/modules/ipex_specific/__init__.py @@ -37,9 +37,10 @@ def ipex_init(): torch.cuda.stream = torch.xpu.stream torch.cuda.synchronize = torch.xpu.synchronize torch.cuda.Event = torch.xpu.Event + torch.cuda.Stream = torch.xpu.Stream + torch.cuda.FloatTensor = torch.xpu.FloatTensor torch.Tensor.cuda = torch.Tensor.xpu torch.Tensor.is_cuda = torch.Tensor.is_xpu - torch.cuda.Stream = torch.xpu.Stream #Memory: torch.cuda.empty_cache = torch.xpu.empty_cache