pediot commited on
Commit
2eb56eb
·
1 Parent(s): 168270d

Update device mapping in encoder.py to set device_map to None for improved flexibility in model initialization.

Browse files
Files changed (1) hide show
  1. src/encoder.py +2 -2
src/encoder.py CHANGED
@@ -23,13 +23,13 @@ class FashionCLIPEncoder:
23
  self.model = AutoModel.from_pretrained(
24
  MODEL_NAME,
25
  trust_remote_code=True,
26
- device_map="auto",
27
  token=HF_TOKEN
28
  )
29
 
30
  self.model = self.model.to(self.device)
31
  self.model.eval()
32
-
33
  def encode_text(self, texts: List[str]) -> List[List[float]]:
34
  kwargs = {
35
  "padding": "max_length",
 
23
  self.model = AutoModel.from_pretrained(
24
  MODEL_NAME,
25
  trust_remote_code=True,
26
+ device_map=None,
27
  token=HF_TOKEN
28
  )
29
 
30
  self.model = self.model.to(self.device)
31
  self.model.eval()
32
+
33
  def encode_text(self, texts: List[str]) -> List[List[float]]:
34
  kwargs = {
35
  "padding": "max_length",