reformat code for ruff check.

This commit is contained in:
power88 2025-04-20 07:10:03 +08:00
parent b45d782dd8
commit 9e642a9b31
2 changed files with 4 additions and 4 deletions

View File

@ -110,14 +110,14 @@ class HiDreamTEModel(torch.nn.Module):
t5_output = self.t5xxl.encode_token_weights(token_weight_pairs_t5) t5_output = self.t5xxl.encode_token_weights(token_weight_pairs_t5)
t5_out, t5_pooled = t5_output[:2] t5_out, t5_pooled = t5_output[:2]
else: else:
t5_out, t5_pooled = None, None t5_out = None
if self.llama is not None: if self.llama is not None:
ll_output = self.llama.encode_token_weights(token_weight_pairs_llama) ll_output = self.llama.encode_token_weights(token_weight_pairs_llama)
ll_out, ll_pooled = ll_output[:2] ll_out, ll_pooled = ll_output[:2]
ll_out = ll_out[:, 1:] ll_out = ll_out[:, 1:]
else: else:
ll_out, ll_pooled = None, None ll_out = None
if t5_out is None: if t5_out is None:
t5_out = torch.zeros((1, 1, 4096), device=comfy.model_management.intermediate_device()) t5_out = torch.zeros((1, 1, 4096), device=comfy.model_management.intermediate_device())