Haoxiang-Wang
commited on
Commit
•
5b2f4f1
1
Parent(s):
8fe44ab
Update README.md
Browse files
README.md
CHANGED
@@ -190,7 +190,7 @@ import torch
|
|
190 |
from cosmos_tokenizer.image_lib import ImageTokenizer
|
191 |
|
192 |
model_name = "Cosmos-Tokenizer-CI8x8"
|
193 |
-
input_tensor = torch.randn(1, 3, 512, 512).to('cuda').to(torch.bfloat16) # [B, C,
|
194 |
encoder = ImageTokenizer(checkpoint_enc=f'pretrained_ckpts/{model_name}/encoder.jit')
|
195 |
(latent,) = encoder.encode(input_tensor)
|
196 |
torch.testing.assert_close(latent.shape, (1, 16, 64, 64))
|
|
|
190 |
from cosmos_tokenizer.image_lib import ImageTokenizer
|
191 |
|
192 |
model_name = "Cosmos-Tokenizer-CI8x8"
|
193 |
+
input_tensor = torch.randn(1, 3, 512, 512).to('cuda').to(torch.bfloat16) # [B, C, H, W]
|
194 |
encoder = ImageTokenizer(checkpoint_enc=f'pretrained_ckpts/{model_name}/encoder.jit')
|
195 |
(latent,) = encoder.encode(input_tensor)
|
196 |
torch.testing.assert_close(latent.shape, (1, 16, 64, 64))
|