You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear Team, @fdbtrs@jonasgrebe@naserdamer
I'm encountering an AttributeError when running Sample.py. The error message states:
batch_samples = diffusion_model.sample(
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1260, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: '_LiteModule' object has no attribute 'sample'
This occurs when diffusionmodel.sample is called within Sample.py. However, it seems the call isn't reaching the intended diffusionmodel class. I've also observed this issue during model training while generating samples.
in sample.py
with torch.no_grad(): for _ in range(n_batches): batch_samples = diffusion_model.sample( batch_size, size, context=context)
in main.py
`
with torch.no_grad():
# create unconditional samples (or conditional samples with empty context)
samples_uncond = model.sample(N_PER_BLOCK, size).cpu()
if latent_decoder is not None:
samples_uncond = latent_decoder(samples_uncond)
samples_uncond = denormalize_to_zero_to_one(samples_uncond)`
_LiteModule has no attribute of sample, so it is not going to the diffusion model class how to fix this issue. thank you
The text was updated successfully, but these errors were encountered:
Dear Team, @fdbtrs @jonasgrebe @naserdamer
I'm encountering an AttributeError when running Sample.py. The error message states:
This occurs when
diffusionmodel.sample
is called withinSample.py
. However, it seems the call isn't reaching the intended diffusionmodel class. I've also observed this issue during model training while generating samples.in sample.py
with torch.no_grad(): for _ in range(n_batches): batch_samples = diffusion_model.sample( batch_size, size, context=context)
in main.py
_LiteModule has no attribute of sample, so it is not going to the diffusion model class how to fix this issue. thank you
The text was updated successfully, but these errors were encountered: