The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Make hidream work with any latent resolution.
comfyanonymous1fc00ba4b657
diff --git a/comfy/ldm/hidream/model.py b/comfy/ldm/hidream/model.pyindex 39c67a193..fcb5a9c51 100644--- a/comfy/ldm/hidream/model.py+++ b/comfy/ldm/hidream/model.py@@ -13,6 +13,7 @@ from comfy.ldm.flux.layers import LastLayerfrom comfy.ldm.modules.attention import optimized_attentionimport comfy.model_management+import comfy.ldm.common_dit# Copied from https://github.com/black-forest-labs/flux/blob/main/src/flux/modules/layers.py@@ -701,7 +702,8 @@ class HiDreamImageTransformer2DModel(nn.Module):control = None,transformer_options = {},) -> torch.Tensor:- hidden_states = x+ bs, c, h, w = x.shape+ hidden_states = comfy.ldm.common_dit.pad_to_patch_size(x, (self.patch_size, self.patch_size))timesteps = tpooled_embeds = yT5_encoder_hidden_states = context@@ -794,4 +796,4 @@ class HiDreamImageTransformer2DModel(nn.Module):hidden_states = hidden_states[:, :image_tokens_seq_len, ...]output = self.final_layer(hidden_states, adaln_input)output = self.unpatchify(output, img_sizes)- return -output+ return -output[:, :, :h, :w]