Wi-zz commited on
Commit
3bce52e
1 Parent(s): 5a6d14f

Update app-multi-alpha.py

Browse files
Files changed (1) hide show
  1. app-multi-alpha.py +1 -1
app-multi-alpha.py CHANGED
@@ -78,7 +78,7 @@ def stream_chat(input_images: List[Image.Image], batch_size: int, pbar: tqdm, mo
78
  print("Skipping this batch and continuing...")
79
  continue
80
 
81
- with torch.amp.autocast_mode.autocast(rank, enabled=True):
82
  vision_outputs = clip_model(pixel_values=images, output_hidden_states=True)
83
  image_features = vision_outputs.hidden_states[-2]
84
  embedded_images = image_adapter(image_features).to(dtype=torch.bfloat16)
 
78
  print("Skipping this batch and continuing...")
79
  continue
80
 
81
+ with torch.amp.autocast_mode.autocast(device_type='cuda', enabled=True):
82
  vision_outputs = clip_model(pixel_values=images, output_hidden_states=True)
83
  image_features = vision_outputs.hidden_states[-2]
84
  embedded_images = image_adapter(image_features).to(dtype=torch.bfloat16)