mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-11 02:15:17 +00:00
Rename clip_t5base to t5base for stable audio text encoder.
This commit is contained in:
parent
628f0b8ebc
commit
bb663bcd6c
@ -19,4 +19,4 @@ class SAT5Tokenizer(sd1_clip.SD1Tokenizer):
|
|||||||
|
|
||||||
class SAT5Model(sd1_clip.SD1ClipModel):
|
class SAT5Model(sd1_clip.SD1ClipModel):
|
||||||
def __init__(self, device="cpu", dtype=None, **kwargs):
|
def __init__(self, device="cpu", dtype=None, **kwargs):
|
||||||
super().__init__(device=device, dtype=dtype, clip_name="t5base", clip_model=T5BaseModel, **kwargs)
|
super().__init__(device=device, dtype=dtype, name="t5base", clip_model=T5BaseModel, **kwargs)
|
||||||
|
@ -514,10 +514,16 @@ class SD1Tokenizer:
|
|||||||
|
|
||||||
|
|
||||||
class SD1ClipModel(torch.nn.Module):
|
class SD1ClipModel(torch.nn.Module):
|
||||||
def __init__(self, device="cpu", dtype=None, clip_name="l", clip_model=SDClipModel, **kwargs):
|
def __init__(self, device="cpu", dtype=None, clip_name="l", clip_model=SDClipModel, name=None, **kwargs):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.clip_name = clip_name
|
|
||||||
self.clip = "clip_{}".format(self.clip_name)
|
if name is not None:
|
||||||
|
self.clip_name = name
|
||||||
|
self.clip = "{}".format(self.clip_name)
|
||||||
|
else:
|
||||||
|
self.clip_name = clip_name
|
||||||
|
self.clip = "clip_{}".format(self.clip_name)
|
||||||
|
|
||||||
setattr(self, self.clip, clip_model(device=device, dtype=dtype, **kwargs))
|
setattr(self, self.clip, clip_model(device=device, dtype=dtype, **kwargs))
|
||||||
|
|
||||||
self.dtypes = set()
|
self.dtypes = set()
|
||||||
|
Loading…
Reference in New Issue
Block a user