mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-10 15:00:23 +00:00
Merge pull request #21 from rockerBOO/lumina-torch-dynamo-gemma2
fix torch compile/dynamo for Gemma2
This commit is contained in:
@@ -97,7 +97,8 @@ class LuminaTextEncodingStrategy(TextEncodingStrategy):
|
||||
hidden_states, input_ids, attention_masks
|
||||
"""
|
||||
text_encoder = models[0]
|
||||
assert isinstance(text_encoder, Gemma2Model)
|
||||
# Check model or torch dynamo OptimizedModule
|
||||
assert isinstance(text_encoder, Gemma2Model) or isinstance(text_encoder._orig_mod, Gemma2Model), f"text encoder is not Gemma2Model {text_encoder.__class__.__name__}"
|
||||
input_ids, attention_masks = tokens
|
||||
|
||||
outputs = text_encoder(
|
||||
|
||||
Reference in New Issue
Block a user