OpenVINO fix Img2Img

This commit is contained in:
Disty0
2025-02-23 17:48:32 +03:00
parent 3a5c4d803f
commit 2b3435a0ec
2 changed files with 14 additions and 0 deletions
+1
View File
@@ -21,6 +21,7 @@
- log full config path, full log path, system name, extensions path
- zluda hotfixes
- zluda force sync
- openvino with img2img
## Update for 2025-02-18
+13
View File
@@ -34,6 +34,19 @@ except Exception:
pass
# Fix "torch is not defined" error on sd 1.5 img2img when torch.compile for vae.encode is enabled
from dataclasses import dataclass
from torch.compiler import disable as disable_compile
import diffusers.models.autoencoders.autoencoder_kl
@dataclass
@disable_compile
class AutoencoderKLOutput(diffusers.utils.BaseOutput):
latent_dist: "DiagonalGaussianDistribution" # noqa: F821
diffusers.models.autoencoders.autoencoder_kl.AutoencoderKLOutput = AutoencoderKLOutput
# Set default params
torch._dynamo.config.cache_size_limit = 64 # pylint: disable=protected-access
torch._dynamo.eval_frame.check_if_dynamo_supported = lambda: True # pylint: disable=protected-access
if hasattr(torch._dynamo.config, "inline_inbuilt_nn_modules"):