supersolar commited on
Commit
4ad28e5
·
verified ·
1 Parent(s): 63fd57f

Update utils/florencegpu1.py

Browse files
Files changed (1) hide show
  1. utils/florencegpu1.py +2 -2
utils/florencegpu1.py CHANGED
@@ -30,8 +30,8 @@ def load_florence_model(
30
  ) -> Tuple[Any, Any]:
31
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
32
  torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
33
- model = AutoModelForCausalLM.from_pretrained("microsoft/Florence-2-base", torch_dtype=torch_dtype, trust_remote_code=True).to(device)
34
- processor = AutoProcessor.from_pretrained("microsoft/Florence-2-base", trust_remote_code=True)
35
  return model, processor
36
 
37
 
 
30
  ) -> Tuple[Any, Any]:
31
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
32
  torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
33
+ model = AutoModelForCausalLM.from_pretrained("microsoft/Florence-2-large", torch_dtype=torch_dtype, trust_remote_code=True).to(device)
34
+ processor = AutoProcessor.from_pretrained("microsoft/Florence-2-large", trust_remote_code=True)
35
  return model, processor
36
 
37