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
When running the code with text_editing_stable_diffusion.py, I am getting the following error when using the sample image and mask:
FutureWarning: Accessing config attribute in_channels directly via 'UNet2DConditionModel' object attribute is deprecated. Please access 'in_channels' over 'UNet2DConditionModel's config object instead, e.g. 'unet.config.in_channels'.
(batch_size, self.unet.in_channels, height // 8, width // 8),
Traceback (most recent call last):
File "/nfshomes/jianing/project_files/blended-latent-diffusion/scripts/text_editing_stable_diffusion.py", line 167, in
results = bld.edit_image(
^^^^^^^^^^^^^^^
File "/nfshomes/jianing/CAAR/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/nfshomes/jianing/project_files/blended-latent-diffusion/scripts/text_editing_stable_diffusion.py", line 127, in edit_image
noise_source_latents = self.scheduler.add_noise(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nfshomes/jianing/CAAR/lib/python3.11/site-packages/diffusers/schedulers/scheduling_ddim.py", line 468, in add_noise
noisy_samples = sqrt_alpha_prod * original_samples + sqrt_one_minus_alpha_prod * noise
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RuntimeError: The size of tensor a (84) must match the size of tensor b (64) at non-singleton dimension 3
The text was updated successfully, but these errors were encountered:
Thanks for sharing.
I think that the problem is that you used image resolution that is not compatible with Stable Diffusion (512x512 in case of the base model).
I added an explicit resize in the code for the future, so you can pull the new changes.
When running the code with text_editing_stable_diffusion.py, I am getting the following error when using the sample image and mask:
FutureWarning: Accessing config attribute
in_channels
directly via 'UNet2DConditionModel' object attribute is deprecated. Please access 'in_channels' over 'UNet2DConditionModel's config object instead, e.g. 'unet.config.in_channels'.(batch_size, self.unet.in_channels, height // 8, width // 8),
Traceback (most recent call last):
File "/nfshomes/jianing/project_files/blended-latent-diffusion/scripts/text_editing_stable_diffusion.py", line 167, in
results = bld.edit_image(
^^^^^^^^^^^^^^^
File "/nfshomes/jianing/CAAR/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/nfshomes/jianing/project_files/blended-latent-diffusion/scripts/text_editing_stable_diffusion.py", line 127, in edit_image
noise_source_latents = self.scheduler.add_noise(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nfshomes/jianing/CAAR/lib/python3.11/site-packages/diffusers/schedulers/scheduling_ddim.py", line 468, in add_noise
noisy_samples = sqrt_alpha_prod * original_samples + sqrt_one_minus_alpha_prod * noise
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RuntimeError: The size of tensor a (84) must match the size of tensor b (64) at non-singleton dimension 3
The text was updated successfully, but these errors were encountered: