-
Notifications
You must be signed in to change notification settings - Fork 270
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
Big Refactor #1
base: main
Are you sure you want to change the base?
Big Refactor #1
Conversation
Hey this is an awesome addition and thank you so much for the work. The only problem I have is that people might be confused who are coming from the video and suddenly see so much new code. As a result I probably will push your code to a new branch. Im very keen to try all of this out! |
I know, but this is very cool as it produces a nice |
I am writing an article based on your code and video: https://wandb.ai/capecape/train_sd/reports/Training-a-Conditional-Diffusion-model-from-scratch--VmlldzoyODMxNjE3 |
Very very cool. Thank you!! I added a reference to your repo and blog in the readme |
- Add simple docstring at head of codebase
Hello, Can I ask why we have three.PT files after training? Which one is for test and did you used diffusion for feature representation? |
Hi Thank you for the link.
I have another question.
I run the model and I have the following weight:
***@***.***
No I am trying to test the model I used the below script:
n = 10
device = "cpu"
model = UNet_conditional(num_classes=4).to(device)
# ckpt = torch.load(r"models\DDPM_conditional\ckpt.pt")
file_path = r"C:\Users\noueft\Downloads\256x256_classifier.pt"
if os.path.exists(file_path):
ckpt = torch.load(file_path)
else:
print("The file does not exist at the specified path.")
model.load_state_dict(ckpt)
diffusion = Diffusion(img_size=64, device=device)
y = torch.Tensor([6] * n).long().to(device)
x = diffusion.sample(model, n, y, cfg_scale=3)
plot_images(x)
But the following error :
n = len(labels)
TypeError: object of type 'int' has no len()
I have the classes in separate folder:
***@***.***
Can you help me with it?
From: Thomas Capelle ***@***.***>
Sent: Monday, October 23, 2023 8:14 AM
To: dome272/Diffusion-Models-pytorch ***@***.***>
Cc: Eftekhari, Noushin ***@***.***>; Comment ***@***.***>
Subject: Re: [dome272/Diffusion-Models-pytorch] Big Refactor (PR #1)
CAUTION: External email. Ensure this message is from a trusted source before clicking links/attachments.
https://wandb.ai/capecape/train_sd/reports/How-To-Train-a-Conditional-Diffusion-Model-From-Scratch--VmlldzoyNzIzNTQ1
-
Reply to this email directly, view it on GitHub<#1 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AOJFARL7TAF2WBTXKBRCBWLYAYKMTAVCNFSM6AAAAAAQ2LFQHWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZUGU3DMMRWGI>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Hey, this code has made me play and have so much fun =)
I refactored the code to do multiple things:
Please take a look, and feel free to contact me.