carson-katri / dream-textures

Stable Diffusion built-in to Blender
GNU General Public License v3.0
7.82k stars 427 forks source link

Modify Source Image (Img2Img) not working #700

Closed GottfriedHofmann closed 1 year ago

GottfriedHofmann commented 1 year ago

Description

When using the image editor mode, Source Image mode set to Modify is stopping before the final step with the following error:

Exception: Traceback (most recent call last): File "C:\Users\g\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\dream_textures\generator_process\actor.py", line 157, in _receive for res in iter(response): File "C:\Users\g\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\dream_textures\generator_process\actions\image_to_image.py", line 197, in image_to_image yield from pipe( File "C:\Users\g\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\dream_textures.python_dependencies\torch\utils_contextlib.py", line 56, in generator_context response = gen.send(request) File "C:\Users\g\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\dream_textures\generator_process\actions\image_to_image.py", line 151, in call for i, image in enumerate(self.numpy_to_pil(image))], File "C:\Users\g\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\dream_textures.python_dependencies\diffusers\pipelines\pipeline_utils.py", line 1375, in numpy_to_pil images = (images * 255).round().astype("uint8") AttributeError: 'Tensor' object has no attribute 'astype'

Steps to Reproduce

  1. Open Image Editor
  2. Add prompt
  3. Turn on "Source Image"
  4. Open an image or create a new one and select "Open Image"
  5. Generate

Expected Behavior

Return the finished image.

Addon Version

Windows (CUDA)

GPU

NVIDIA

GottfriedHofmann commented 1 year ago

The problem persists when using Nodes, here is a simple demo file that breaks when rendering: image2imagebug.zip

NullSenseStudio commented 1 year ago

Your diffusers might be outdated. Seems familiar to when some postprocessing changes were being made in img2img that made the decode_latents function return a tensor instead of ndarray until later being reverted.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 7 days since being marked as stale.