Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc3df46e

Browse files
committed
fix openclipadapter to be able to use latest open sourced sota model
1 parent41fabf2 commitc3df46e

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

‎dalle2_pytorch/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
fromdalle2_pytorch.versionimport__version__
22
fromdalle2_pytorch.dalle2_pytorchimportDALLE2,DiffusionPriorNetwork,DiffusionPrior,Unet,Decoder
3-
fromdalle2_pytorch.dalle2_pytorchimportOpenAIClipAdapter
3+
fromdalle2_pytorch.dalle2_pytorchimportOpenAIClipAdapter,OpenClipAdapter
44
fromdalle2_pytorch.trainerimportDecoderTrainer,DiffusionPriorTrainer
55

66
fromdalle2_pytorch.vqgan_vaeimportVQGanVAE

‎dalle2_pytorch/dalle2_pytorch.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,8 @@ def __init__(
389389
self.eos_id=49407
390390

391391
text_attention_final=self.find_layer('ln_final')
392+
self._dim_latent=text_attention_final.weight.shape[0]
393+
392394
self.handle=text_attention_final.register_forward_hook(self._hook)
393395
self.clip_normalize=preprocess.transforms[-1]
394396
self.cleared=False
@@ -408,7 +410,7 @@ def _hook(self, _, inputs, outputs):
408410

409411
@property
410412
defdim_latent(self):
411-
return512
413+
returnself._dim_latent
412414

413415
@property
414416
defimage_size(self):

‎dalle2_pytorch/version.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__='1.10.8'
1+
__version__='1.10.9'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp