Spaces:
Running
on
Zero
Running
on
Zero
v1
Browse files
app.py
CHANGED
|
@@ -26,6 +26,7 @@ for param in meteor.parameters():
|
|
| 26 |
# device
|
| 27 |
device = torch.cuda.current_device()
|
| 28 |
|
|
|
|
| 29 |
# freeze model
|
| 30 |
freeze_model(mmamba)
|
| 31 |
freeze_model(meteor)
|
|
@@ -35,6 +36,7 @@ previous_length = 0
|
|
| 35 |
|
| 36 |
@spaces.GPU
|
| 37 |
def threading_function(inputs, image_token_number, streamer):
|
|
|
|
| 38 |
# Meteor Mamba
|
| 39 |
mmamba_inputs = mmamba.eval_process(inputs=inputs, tokenizer=tok_meteor, device=device, img_token_number=image_token_number)
|
| 40 |
if 'image' in mmamba_inputs.keys():
|
|
|
|
| 26 |
# device
|
| 27 |
device = torch.cuda.current_device()
|
| 28 |
|
| 29 |
+
|
| 30 |
# freeze model
|
| 31 |
freeze_model(mmamba)
|
| 32 |
freeze_model(meteor)
|
|
|
|
| 36 |
|
| 37 |
@spaces.GPU
|
| 38 |
def threading_function(inputs, image_token_number, streamer):
|
| 39 |
+
print(f'----------------------------Device: {device}----------------------------')
|
| 40 |
# Meteor Mamba
|
| 41 |
mmamba_inputs = mmamba.eval_process(inputs=inputs, tokenizer=tok_meteor, device=device, img_token_number=image_token_number)
|
| 42 |
if 'image' in mmamba_inputs.keys():
|