mirror of
https://github.com/lucidrains/DALLE2-pytorch.git
synced 2025-12-19 09:44:19 +01:00
make sure entire readme runs without errors
This commit is contained in:
@@ -1831,7 +1831,7 @@ class Unet(nn.Module):
|
||||
channels == self.channels and \
|
||||
cond_on_image_embeds == self.cond_on_image_embeds and \
|
||||
cond_on_text_encodings == self.cond_on_text_encodings and \
|
||||
cond_on_lowres_noise == self.cond_on_lowres_noise and \
|
||||
lowres_noise_cond == self.lowres_noise_cond and \
|
||||
channels_out == self.channels_out:
|
||||
return self
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ class DiffusionPriorTrainer(nn.Module):
|
||||
def __init__(
|
||||
self,
|
||||
diffusion_prior,
|
||||
accelerator,
|
||||
accelerator = None,
|
||||
use_ema = True,
|
||||
lr = 3e-4,
|
||||
wd = 1e-2,
|
||||
@@ -186,8 +186,12 @@ class DiffusionPriorTrainer(nn.Module):
|
||||
):
|
||||
super().__init__()
|
||||
assert isinstance(diffusion_prior, DiffusionPrior)
|
||||
assert isinstance(accelerator, Accelerator)
|
||||
|
||||
ema_kwargs, kwargs = groupby_prefix_and_trim('ema_', kwargs)
|
||||
accelerator_kwargs, kwargs = groupby_prefix_and_trim('accelerator_', kwargs)
|
||||
|
||||
if not exists(accelerator):
|
||||
accelerator = Accelerator(**accelerator_kwargs)
|
||||
|
||||
# assign some helpful member vars
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
__version__ = '1.2.1'
|
||||
__version__ = '1.2.2'
|
||||
|
||||
Reference in New Issue
Block a user