mirror of
https://github.com/lucidrains/DALLE2-pytorch.git
synced 2026-02-14 22:44:23 +01:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6021945fc8 | ||
|
|
6f76652d11 |
@@ -508,7 +508,7 @@ To use a pretrained OpenAI CLIP, simply import `OpenAIClipAdapter` and pass it i
|
|||||||
import torch
|
import torch
|
||||||
from dalle2_pytorch import DALLE2, DiffusionPriorNetwork, DiffusionPrior, Unet, Decoder, OpenAIClipAdapter
|
from dalle2_pytorch import DALLE2, DiffusionPriorNetwork, DiffusionPrior, Unet, Decoder, OpenAIClipAdapter
|
||||||
|
|
||||||
# openai pretrained clip - defaults to ViT/B-32
|
# openai pretrained clip - defaults to ViT-B/32
|
||||||
|
|
||||||
clip = OpenAIClipAdapter()
|
clip = OpenAIClipAdapter()
|
||||||
|
|
||||||
|
|||||||
@@ -831,7 +831,7 @@ class DiffusionPrior(BaseGaussianDiffusion):
|
|||||||
image_channels = 3,
|
image_channels = 3,
|
||||||
timesteps = 1000,
|
timesteps = 1000,
|
||||||
cond_drop_prob = 0.,
|
cond_drop_prob = 0.,
|
||||||
loss_type = "l1",
|
loss_type = "l2",
|
||||||
predict_x_start = True,
|
predict_x_start = True,
|
||||||
beta_schedule = "cosine",
|
beta_schedule = "cosine",
|
||||||
condition_on_text_encodings = True, # the paper suggests this is needed, but you can turn it off for your CLIP preprocessed text embed -> image embed training
|
condition_on_text_encodings = True, # the paper suggests this is needed, but you can turn it off for your CLIP preprocessed text embed -> image embed training
|
||||||
@@ -1614,7 +1614,7 @@ class Decoder(BaseGaussianDiffusion):
|
|||||||
timesteps = 1000,
|
timesteps = 1000,
|
||||||
image_cond_drop_prob = 0.1,
|
image_cond_drop_prob = 0.1,
|
||||||
text_cond_drop_prob = 0.5,
|
text_cond_drop_prob = 0.5,
|
||||||
loss_type = 'l1',
|
loss_type = 'l2',
|
||||||
beta_schedule = 'cosine',
|
beta_schedule = 'cosine',
|
||||||
predict_x_start = False,
|
predict_x_start = False,
|
||||||
predict_x_start_for_latent_diffusion = False,
|
predict_x_start_for_latent_diffusion = False,
|
||||||
|
|||||||
Reference in New Issue
Block a user