Skip to content
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

testing error #68

Open
lanlinxxs opened this issue May 21, 2024 · 1 comment
Open

testing error #68

lanlinxxs opened this issue May 21, 2024 · 1 comment

Comments

@lanlinxxs
Copy link

Hello, I encountered an error during prediction. Can you tell me why this happened?
Traceback (most recent call last):
File "/root/autodl-tmp/scripts/segmentation_sample.py", line 130, in
main()
File "/root/autodl-tmp/scripts/segmentation_sample.py", line 97, in main
sample, x_noisy, org = sample_fn(
File "/root/autodl-tmp/guided_diffusion/gaussian_diffusion.py", line 520, in p_sample_loop_known
for sample in self.p_sample_loop_progressive(
File "/root/autodl-tmp/guided_diffusion/gaussian_diffusion.py", line 586, in p_sample_loop_progressive
out = self.p_sample(
File "/root/autodl-tmp/guided_diffusion/gaussian_diffusion.py", line 433, in p_sample
out = self.p_mean_variance(
File "/root/autodl-tmp/guided_diffusion/respace.py", line 96, in p_mean_variance
return super().p_mean_variance(self._wrap_model(model), *args, **kwargs)
File "/root/autodl-tmp/guided_diffusion/gaussian_diffusion.py", line 316, in p_mean_variance
self._predict_xstart_from_eps(x_t=x, t=t, eps=model_output)
File "/root/autodl-tmp/guided_diffusion/gaussian_diffusion.py", line 337, in _predict_xstart_from_eps
assert x_t.shape == eps.shape
AssertionError

@wildailurpodan
Copy link

x_t shape: torch.Size([1, 1, 224, 224])
eps shape: torch.Size([1, 2, 224, 224])
i met the same error as you do. It looks like the expected output has two layers, is the original and the generated mask put together? Grayscale images should have only one layer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants