mirror of
https://github.com/modelscope/DiffSynth-Studio.git
synced 2026-03-24 10:18:12 +00:00
add flux_text_encoder.py
This commit is contained in:
@@ -49,8 +49,8 @@ class FLUXTextEncoder2(T5EncoderModel):
|
|||||||
relative_attention_max_distance = 128,
|
relative_attention_max_distance = 128,
|
||||||
relative_attention_num_buckets = 32,
|
relative_attention_num_buckets = 32,
|
||||||
tie_word_embeddings = False,
|
tie_word_embeddings = False,
|
||||||
torch_dtype = bfloat16, # change
|
torch_dtype = "bfloat16",
|
||||||
transformers_version = "4.43.3", # change
|
transformers_version = "4.43.3",
|
||||||
use_cache = True,
|
use_cache = True,
|
||||||
vocab_size = 32128
|
vocab_size = 32128
|
||||||
)
|
)
|
||||||
@@ -115,4 +115,4 @@ class FLUXTextEncoder2StateDictConverter():
|
|||||||
return state_dict_
|
return state_dict_
|
||||||
|
|
||||||
def from_civitai(self, state_dict):
|
def from_civitai(self, state_dict):
|
||||||
return self.from_diffusers(state_dict)
|
return self.from_diffusers(state_dict)
|
||||||
|
|||||||
Reference in New Issue
Block a user