mirror of
https://github.com/lucidrains/DALLE2-pytorch.git
synced 2026-02-23 15:54:21 +01:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3df46e374 |
@@ -1,6 +1,6 @@
|
|||||||
from dalle2_pytorch.version import __version__
|
from dalle2_pytorch.version import __version__
|
||||||
from dalle2_pytorch.dalle2_pytorch import DALLE2, DiffusionPriorNetwork, DiffusionPrior, Unet, Decoder
|
from dalle2_pytorch.dalle2_pytorch import DALLE2, DiffusionPriorNetwork, DiffusionPrior, Unet, Decoder
|
||||||
from dalle2_pytorch.dalle2_pytorch import OpenAIClipAdapter
|
from dalle2_pytorch.dalle2_pytorch import OpenAIClipAdapter, OpenClipAdapter
|
||||||
from dalle2_pytorch.trainer import DecoderTrainer, DiffusionPriorTrainer
|
from dalle2_pytorch.trainer import DecoderTrainer, DiffusionPriorTrainer
|
||||||
|
|
||||||
from dalle2_pytorch.vqgan_vae import VQGanVAE
|
from dalle2_pytorch.vqgan_vae import VQGanVAE
|
||||||
|
|||||||
@@ -389,6 +389,8 @@ class OpenClipAdapter(BaseClipAdapter):
|
|||||||
self.eos_id = 49407
|
self.eos_id = 49407
|
||||||
|
|
||||||
text_attention_final = self.find_layer('ln_final')
|
text_attention_final = self.find_layer('ln_final')
|
||||||
|
self._dim_latent = text_attention_final.weight.shape[0]
|
||||||
|
|
||||||
self.handle = text_attention_final.register_forward_hook(self._hook)
|
self.handle = text_attention_final.register_forward_hook(self._hook)
|
||||||
self.clip_normalize = preprocess.transforms[-1]
|
self.clip_normalize = preprocess.transforms[-1]
|
||||||
self.cleared = False
|
self.cleared = False
|
||||||
@@ -408,7 +410,7 @@ class OpenClipAdapter(BaseClipAdapter):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def dim_latent(self):
|
def dim_latent(self):
|
||||||
return 512
|
return self._dim_latent
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def image_size(self):
|
def image_size(self):
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
__version__ = '1.10.8'
|
__version__ = '1.10.9'
|
||||||
|
|||||||
Reference in New Issue
Block a user