Spaces:
Running
on
Zero
Running
on
Zero
Ngaima Sandiman
commited on
Commit
•
c201cb1
1
Parent(s):
ec88238
Explicitly set dtype.
Browse files
requirements.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
phonemizer==3.3.0
|
3 |
transformers==4.45.2
|
4 |
gradio-client==1.4.0
|
5 |
-
torch==2.0
|
6 |
-
torchaudio==2.0
|
7 |
torchvision==0.16.0
|
8 |
spaces==0.30.3
|
9 |
huggingface-hub==0.25.1
|
|
|
2 |
phonemizer==3.3.0
|
3 |
transformers==4.45.2
|
4 |
gradio-client==1.4.0
|
5 |
+
torch==2.1.0
|
6 |
+
torchaudio==2.1.0
|
7 |
torchvision==0.16.0
|
8 |
spaces==0.30.3
|
9 |
huggingface-hub==0.25.1
|
src/model/modules/imagecraftprocessor.py
CHANGED
@@ -63,7 +63,7 @@ class ImageCraftProcessor:
|
|
63 |
# Convert the list of numpy arrays to a single numpy array with shape [Batch_Size, Channel, Height, Width]
|
64 |
pixel_values = np.stack(pixel_values, axis=0)
|
65 |
# Convert the numpy array to a PyTorch tensor
|
66 |
-
pixel_values = torch.tensor(pixel_values)
|
67 |
|
68 |
input_strings = [
|
69 |
add_image_tokens_to_prompt(
|
|
|
63 |
# Convert the list of numpy arrays to a single numpy array with shape [Batch_Size, Channel, Height, Width]
|
64 |
pixel_values = np.stack(pixel_values, axis=0)
|
65 |
# Convert the numpy array to a PyTorch tensor
|
66 |
+
pixel_values = torch.tensor(pixel_values, dtype=torch.float16)
|
67 |
|
68 |
input_strings = [
|
69 |
add_image_tokens_to_prompt(
|