Spaces:
Runtime error
Runtime error
RamAnanth1
commited on
Commit
•
a0c01b9
1
Parent(s):
29b065a
Update ldm/modules/encoders/modules.py
Browse files
ldm/modules/encoders/modules.py
CHANGED
@@ -118,6 +118,7 @@ class FrozenCLIPEmbedder(AbstractEncoder):
|
|
118 |
batch_encoding = self.tokenizer(text, truncation=True, max_length=self.max_length, return_length=True,
|
119 |
return_overflowing_tokens=False, padding="max_length", return_tensors="pt")
|
120 |
tokens = batch_encoding["input_ids"].to(self.device)
|
|
|
121 |
outputs = self.transformer(input_ids=tokens, output_hidden_states=self.layer=="hidden")
|
122 |
if self.layer == "last":
|
123 |
z = outputs.last_hidden_state
|
|
|
118 |
batch_encoding = self.tokenizer(text, truncation=True, max_length=self.max_length, return_length=True,
|
119 |
return_overflowing_tokens=False, padding="max_length", return_tensors="pt")
|
120 |
tokens = batch_encoding["input_ids"].to(self.device)
|
121 |
+
print('Using device', self.device)
|
122 |
outputs = self.transformer(input_ids=tokens, output_hidden_states=self.layer=="hidden")
|
123 |
if self.layer == "last":
|
124 |
z = outputs.last_hidden_state
|