From 64972bf7579d4eabb58e5d0cd04198529da4f613 Mon Sep 17 00:00:00 2001 From: alpertunga-bile Date: Sat, 19 Apr 2025 14:17:02 +0300 Subject: [PATCH] torch_compile is activated for every OS --- generator/model.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/generator/model.py b/generator/model.py index f6e8c61..adf97ed 100644 --- a/generator/model.py +++ b/generator/model.py @@ -9,8 +9,6 @@ from torch import float16 as torch_float16 from torch import float32 as torch_float32 from torch import compile as torch_compile -from platform import system - from comfy.model_management import ( get_torch_device, should_use_fp16, @@ -117,12 +115,7 @@ def get_model(model_name: str, type: QuantizationType, is_acceleration: bool): else: model = get_model_from_lora(model_name, req_torch_dtype, type, is_acceleration) - """ - torch.compile is supported only in Linux - has to be tested though - """ - if system() == "Linux": - torch_compile(model) + torch_compile(model) return model