The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Move inline comfy.context_windows imports to top-level in model_base.py (#13083)
Jedrzej Kosinski87cda1fc25ca
diff --git a/comfy/model_base.py b/comfy/model_base.pyindex 88905e191..43ec93324 100644--- a/comfy/model_base.py+++ b/comfy/model_base.py@@ -21,6 +21,7 @@ import comfy.ldm.hunyuan3dv2_1.hunyuanditimport torchimport loggingimport comfy.ldm.lightricks.av_model+import comfy.context_windowsfrom comfy.ldm.modules.diffusionmodules.openaimodel import UNetModel, Timestepfrom comfy.ldm.cascade.stage_c import StageCfrom comfy.ldm.cascade.stage_b import StageB@@ -1383,7 +1384,6 @@ class WAN21_Vace(WAN21):def resize_cond_for_context_window(self, cond_key, cond_value, window, x_in, device, retain_index_list=[]):if cond_key == "vace_context":- import comfy.context_windowsreturn comfy.context_windows.slice_cond(cond_value, window, x_in, device, temporal_dim=3, retain_index_list=retain_index_list)return super().resize_cond_for_context_window(cond_key, cond_value, window, x_in, device, retain_index_list=retain_index_list)@@ -1441,7 +1441,6 @@ class WAN21_HuMo(WAN21):def resize_cond_for_context_window(self, cond_key, cond_value, window, x_in, device, retain_index_list=[]):if cond_key == "audio_embed":- import comfy.context_windowsreturn comfy.context_windows.slice_cond(cond_value, window, x_in, device, temporal_dim=1)return super().resize_cond_for_context_window(cond_key, cond_value, window, x_in, device, retain_index_list=retain_index_list)@@ -1463,7 +1462,6 @@ class WAN22_Animate(WAN21):return outdef resize_cond_for_context_window(self, cond_key, cond_value, window, x_in, device, retain_index_list=[]):- import comfy.context_windowsif cond_key == "face_pixel_values":return comfy.context_windows.slice_cond(cond_value, window, x_in, device, temporal_dim=2, temporal_scale=4, temporal_offset=1)if cond_key == "pose_latents":@@ -1508,7 +1506,6 @@ class WAN22_S2V(WAN21):def resize_cond_for_context_window(self, cond_key, cond_value, window, x_in, device, retain_index_list=[]):if cond_key == "audio_embed":- import comfy.context_windowsreturn comfy.context_windows.slice_cond(cond_value, window, x_in, device, temporal_dim=1)return super().resize_cond_for_context_window(cond_key, cond_value, window, x_in, device, retain_index_list=retain_index_list)