Fix clipmodel object has no attribute t5xxl bug #494
This commit is contained in:
@@ -354,7 +354,7 @@ def advanced_encode(clip, text, token_normalization, weight_interpretation, w_ma
|
||||
pooled = torch.cat((l_pooled, g_pooled), dim=-1)
|
||||
|
||||
# t5xxl
|
||||
if 't5xxl' in tokenized and clip.cond_stage_model.t5xxl is not None:
|
||||
if 't5xxl' in tokenized:
|
||||
t5_out, t5_pooled = advanced_encode_from_tokens(tokenized['t5xxl'],
|
||||
token_normalization,
|
||||
weight_interpretation,
|
||||
|
||||
@@ -29,7 +29,7 @@ def prompt_to_cond(type, model, clip, clip_skip, lora_stack, text, prompt_token_
|
||||
|
||||
clipped = clip.clone()
|
||||
# 当clip模型不存在t5xxl时,可执行跳过层
|
||||
if clip.cond_stage_model.t5xxl is None:
|
||||
if not hasattr(clip.cond_stage_model, 't5xxl'):
|
||||
if clip_skip != 0:
|
||||
clipped.clip_layer(clip_skip)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user