mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-09 05:17:03 +08:00
Changed prints out for logging.info
This commit is contained in:
parent
676b934364
commit
f2f7404152
@ -829,7 +829,7 @@ def load_text_encoder_state_dicts(state_dicts=[], embedding_directory=None, clip
|
||||
clip_target.tokenizer = comfy.text_encoders.lumina2.LuminaTokenizer
|
||||
tokenizer_data["spiece_model"] = clip_data[0].get("spiece_model", None)
|
||||
elif te_model == TEModel.LLAMA3_8:
|
||||
print("Single LLAMA3_8 for HiDreams")
|
||||
logging.info("Single LLAMA3_8 for HiDreams")
|
||||
clip_target.clip = comfy.text_encoders.hidream.hidream_clip(False, **llama_detect(clip_data), clip_g=False, t5=False)
|
||||
clip_target.tokenizer = comfy.text_encoders.hidream.HiDreamTokenizer
|
||||
else:
|
||||
|
||||
@ -98,13 +98,13 @@ class HiDreamTEModel(torch.nn.Module):
|
||||
|
||||
if len(token_weight_pairs_g) > 0 or len(token_weight_pairs_l) > 0:
|
||||
if self.clip_l is not None:
|
||||
print("Encoding clip_l token weights")
|
||||
logging.info("Encoding clip_l token weights")
|
||||
lg_out, l_pooled = self.clip_l.encode_token_weights(token_weight_pairs_l)
|
||||
else:
|
||||
l_pooled = torch.zeros((1, 768), device=comfy.model_management.intermediate_device())
|
||||
|
||||
if self.clip_g is not None:
|
||||
print("Encoding clip_g token weights")
|
||||
logging.info("Encoding clip_g token weights")
|
||||
g_out, g_pooled = self.clip_g.encode_token_weights(token_weight_pairs_g)
|
||||
else:
|
||||
g_pooled = torch.zeros((1, 1280), device=comfy.model_management.intermediate_device())
|
||||
@ -113,27 +113,27 @@ class HiDreamTEModel(torch.nn.Module):
|
||||
pooled = torch.cat((l_pooled, g_pooled), dim=-1)
|
||||
|
||||
if self.t5xxl is not None:
|
||||
print("Encoding t5 token weights")
|
||||
logging.info("Encoding t5 token weights")
|
||||
t5_output = self.t5xxl.encode_token_weights(token_weight_pairs_t5)
|
||||
t5_out, t5_pooled = t5_output[:2]
|
||||
|
||||
if self.llama is not None:
|
||||
print("Encoding llama token weights")
|
||||
logging.info("Encoding llama token weights")
|
||||
ll_output = self.llama.encode_token_weights(token_weight_pairs_llama)
|
||||
ll_out, ll_pooled = ll_output[:2]
|
||||
ll_out = ll_out[:, 1:]
|
||||
|
||||
if t5_out is None:
|
||||
print("Loading t5_out from disk")
|
||||
logging.info("Loading t5_out from disk")
|
||||
t5_path = folder_paths.get_full_path_or_raise("hidream_empty_latents", "t5_out.pt")
|
||||
t5_out = torch.load(t5_path, map_location=comfy.model_management.intermediate_device())
|
||||
|
||||
if ll_out is None:
|
||||
print("No llama encoder found, filling with zeroes")
|
||||
logging.info("No llama encoder found, filling with zeroes")
|
||||
ll_out = torch.zeros((1, 32, 1, 4096), device=comfy.model_management.intermediate_device())
|
||||
|
||||
if pooled is None:
|
||||
print("Loading pooled from disk")
|
||||
logging.info("Loading pooled from disk")
|
||||
pooled_path = folder_paths.get_full_path_or_raise("hidream_empty_latents", "pooled.pt")
|
||||
pooled = torch.load(pooled_path, map_location=comfy.model_management.intermediate_device())
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user