-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix prior saving / add load method #44
Comments
The following code worked to load the Prior from Huggingface, just using the stock default hparams: from dalle2_pytorch import DiffusionPrior, DiffusionPriorNetwork
import torch
device = "cuda:0"
state_dict = torch.load("model.pth")
prior_network = DiffusionPriorNetwork(
dim=768,
depth=6,
dim_head=64,
heads=8
).to(device)
diffusion_prior = DiffusionPrior(
net=prior_network,
clip=None,
image_embed_dim=768,
timesteps=100,
cond_drop_prob=0.2,
loss_type="l2",
condition_on_text_encodings=False
).to(device)
diffusion_prior.load_state_dict(state_dict) |
addressed here i believe https://github.com/lucidrains/DALLE2-pytorch/blob/main/dalle2_pytorch/train.py#L52 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: