When the formatter.py gets the value from WanT5Tokenizer, attribute error pops up.
The reason behind it is because WanT5Tokenizer doesnt have clip_l attribute.
DualClipLoader will not work when using Wan Model to generate the image.
Since WanT5Tokenizer uses the base SD1Tokenizer as the schematic, i edited the "formatter.py" file
if clip_ is not None:
tokenizer = clip_.tokenizer
if isinstance(tokenizer, SD1Tokenizer):
# Edited Code Section Start
try:
clip = tokenizer.clip_l
except AttributeError:
clip = None
# Edited Code Section End
elif isinstance(tokenizer, SD2Tokenizer):
clip = tokenizer.clip_h
elif isinstance(tokenizer, SDXLTokenizer):
clip = tokenizer.clip_l
elif isinstance(tokenizer, SD3Tokenizer):
clip = tokenizer.clip_l
elif isinstance(tokenizer, FluxTokenizer):
clip = tokenizer.clip_l
I could have done the following alternate fix too
Anyways both work on same logic
if clip_ is not None:
tokenizer = clip_.tokenizer
# Edited Code Section Start
if isinstance(tokenizer, SD1Tokenizer) and hasattr(tokenizer, "clip_l"):
clip = tokenizer.clip_l
elif isinstance(tokenizer, SD1Tokenizer) and not hasattr(tokenizer, "clip_l"):
clip = None
# Edited Code Section End
elif isinstance(tokenizer, SD2Tokenizer):
clip = tokenizer.clip_h
elif isinstance(tokenizer, SDXLTokenizer):
clip = tokenizer.clip_l
elif isinstance(tokenizer, SD3Tokenizer):
clip = tokenizer.clip_l
elif isinstance(tokenizer, FluxTokenizer):
clip = tokenizer.clip_l
I did this temporary fix for the things to work, Hoping for an earlier update on this issue.
Thanks & Regards
When the formatter.py gets the value from WanT5Tokenizer, attribute error pops up.
The reason behind it is because WanT5Tokenizer doesnt have clip_l attribute.
DualClipLoader will not work when using Wan Model to generate the image.
Since WanT5Tokenizer uses the base SD1Tokenizer as the schematic, i edited the "formatter.py" file
I could have done the following alternate fix too
Anyways both work on same logic
I did this temporary fix for the things to work, Hoping for an earlier update on this issue.
Thanks & Regards