greencatted commited on
Commit
ff08c8a
1 Parent(s): fe7255d

Remove CUDA reqs

Browse files
Files changed (2) hide show
  1. app.py +1 -3
  2. requirements.txt +1 -2
app.py CHANGED
@@ -4,11 +4,9 @@ import torch
4
 
5
  from transformers import Blip2Processor, Blip2ForConditionalGeneration
6
 
7
- device = "cuda" if torch.cuda.is_available() else "cpu"
8
-
9
  processor = Blip2Processor.from_pretrained("Salesforce/blip2-opt-2.7b")
10
  model = Blip2ForConditionalGeneration.from_pretrained(
11
- "Salesforce/blip2-opt-2.7b", load_in_8bit=True, device_map={"": 0}, torch_dtype=torch.float16
12
  )
13
 
14
 
 
4
 
5
  from transformers import Blip2Processor, Blip2ForConditionalGeneration
6
 
 
 
7
  processor = Blip2Processor.from_pretrained("Salesforce/blip2-opt-2.7b")
8
  model = Blip2ForConditionalGeneration.from_pretrained(
9
+ "Salesforce/blip2-opt-2.7b", device_map={"": 0}, torch_dtype=torch.float16
10
  )
11
 
12
 
requirements.txt CHANGED
@@ -1,5 +1,4 @@
1
  Pillow
2
  transformers
3
  torch
4
- accelerate
5
- bitsandbytes
 
1
  Pillow
2
  transformers
3
  torch
4
+ accelerate