sygil-dev / muse-maskgit-pytorch Goto Github PK
View Code? Open in Web Editor NEWImplementation of Muse: Text-to-Image Generation via Masked Generative Transformers, in Pytorch
License: MIT License
Implementation of Muse: Text-to-Image Generation via Masked Generative Transformers, in Pytorch
License: MIT License
Maybe worth considering since google give away TPUs almost for me with TRC program.
Are there any results currently available?
Hey i trying to train this model using my dataset, but i got this error in second step, how can i solve this problem?
ValueError Traceback (most recent call last)
Cell In[22], line 2
1 if name == "main":
----> 2 main()
Cell In[21], line 526
524 # Train the model!
525 accelerator.print("Starting training!")
--> 526 trainer.train()
528 # Clean up and wait for other processes to finish (loggers etc.)
529 if accelerator.is_main_process:
File e:\Tugas Akhir\muse2\muse_maskgit_pytorch\trainers\maskgit_trainer.py:165, in MaskGitTrainer.train(self)
160 text_embeds = t5_encode_text_from_encoded(
161 input_ids, attn_mask, self.model.transformer.t5, self.accelerator.device
162 )
164 with self.accelerator.accumulate(self.model), self.accelerator.autocast():
--> 165 loss = self.model(imgs, text_embeds=text_embeds)
166 self.accelerator.backward(loss)
167 if self.max_grad_norm is not None and self.accelerator.sync_gradients:
File e:\Anaconda3\Lib\site-packages\torch\nn\modules\module.py:1511, in Module._wrapped_call_impl(self, *args, **kwargs)
1509 return self._compiled_call_impl(*args, **kwargs) # type: ignore[misc]
1510 else:
-> 1511 return self._call_impl(*args, **kwargs)
File e:\Anaconda3\Lib\site-packages\torch\nn\modules\module.py:1520, in Module._call_impl(self, *args, **kwargs)
1515 # If we don't have any hooks, we want to skip the rest of the logic in
1516 # this function, and just call forward.
1517 if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks or self._forward_pre_hooks
1518 or _global_backward_pre_hooks or _global_backward_hooks
1519 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1520 return forward_call(*args, **kwargs)
1522 try:
1523 result = None
File e:\Anaconda3\Lib\site-packages\accelerate\utils\operations.py:825, in convert_outputs_to_fp32..forward(*args, **kwargs)
824 def forward(*args, **kwargs):
--> 825 return model_forward(*args, **kwargs)
File e:\Anaconda3\Lib\site-packages\accelerate\utils\operations.py:813, in ConvertOutputsToFp32.call(self, *args, **kwargs)
812 def call(self, *args, **kwargs):
--> 813 return convert_to_fp32(self.model_forward(*args, **kwargs))
File e:\Anaconda3\Lib\site-packages\torch\amp\autocast_mode.py:16, in autocast_decorator..decorate_autocast(*args, **kwargs)
13 @functools.wraps(func)
14 def decorate_autocast(*args, **kwargs):
15 with autocast_instance:
---> 16 return func(*args, **kwargs)
File <@beartype(muse_maskgit_pytorch.muse_maskgit_pytorch.MaskGit.forward) at 0x207570d2ac0>:134, in forward(__beartype_object_2230262900624, __beartype_get_violation, __beartype_conf, __beartype_object_2230548286144, __beartype_object_140704628379520, __beartype_getrandbits, __beartype_func, *args, **kwargs)
File e:\Tugas Akhir\muse2\muse_maskgit_pytorch\muse_maskgit_pytorch.py:640, in MaskGit.forward(self, images_or_ids, ignore_index, cond_images, cond_token_ids, texts, text_embeds, cond_drop_prob, train_only_generator, sample_temperature)
638 if not all([height_or_width == self.image_size for height_or_width in images_or_ids.shape[-2:]]):
639 print(images_or_ids.shape[-2:])
--> 640 raise ValueError("the image you passed in is not of the correct dimensions")
642 with torch.no_grad():
643 _, ids, _ = self.vae.encode(images_or_ids)
ValueError: the image you passed in is not of the correct dimensions
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.