mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
OpenVINO fix Img2Img
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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"):
|
||||
|
||||
Reference in New Issue
Block a user