File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -699,10 +699,13 @@ def forward(
699699 y : Optional [torch .Tensor ] = None ,
700700 context : Optional [torch .Tensor ] = None ,
701701 encoder_hidden_states_llama3 = None ,
702+ image_cond = None ,
702703 control = None ,
703704 transformer_options = {},
704705 ) -> torch .Tensor :
705706 bs , c , h , w = x .shape
707+ if image_cond is not None :
708+ x = torch .cat ([x , image_cond ], dim = - 1 )
706709 hidden_states = comfy .ldm .common_dit .pad_to_patch_size (x , (self .patch_size , self .patch_size ))
707710 timesteps = t
708711 pooled_embeds = y
Original file line number Diff line number Diff line change @@ -1104,4 +1104,7 @@ def extra_conds(self, **kwargs):
11041104 conditioning_llama3 = kwargs .get ("conditioning_llama3" , None )
11051105 if conditioning_llama3 is not None :
11061106 out ['encoder_hidden_states_llama3' ] = comfy .conds .CONDRegular (conditioning_llama3 )
1107+ image_cond = kwargs .get ("concat_latent_image" , None )
1108+ if image_cond is not None :
1109+ out ['image_cond' ] = comfy .conds .CONDNoiseShape (self .process_latent_in (image_cond ))
11071110 return out
You can’t perform that action at this time.
0 commit comments