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

Release v0.3.0 #711

Merged
merged 5 commits into from
Nov 4, 2023
Merged

Release v0.3.0 #711

merged 5 commits into from
Nov 4, 2023

Conversation

carson-katri
Copy link
Owner

No description provided.

@GottfriedHofmann
Copy link
Contributor

Installing the addon on Windows 11 gives the following error that is likely due to the filepaths becoming too long (278 chars which is over the 255 max):

Traceback (most recent call last):
File "C:\Users\g\Desktop\blender-3.6.4-windows-x64\3.6\scripts\startup\bl_operators\userpref.py", line 686, in execute file_to_extract.extractall(path_addons)
File "C:\Users\g\Desktop\blender-3.6.4-windows-x64\3.6\python\lib\zipfile.py", line 1647, in extractall
self._extract_member(zipinfo, path, pwd)
File "C:\Users\g\Desktop\blender-3.6.4-windows-x64\3.6\python\lib\zipfile.py", line 1701, in _extract_member
open(targetpath, "wb") as target:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\g\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\dream_textures\.python_dependencies\transformers\models\deprecated\trajectory_transformer\pycache\convert_trajectory_transformer_original_pytorch_checkpoint_to_pytorch.cpython-310.pyc'

This happens even though I have long filepaths enabled in Win11 and a workaround is to manually unpack the .zip and copy the resulting directory over. That might give a hin that Python is the culprit here.

@GottfriedHofmann
Copy link
Contributor

GottfriedHofmann commented Oct 18, 2023

When I install and use the addon only with stabilityai/stable-diffusion-xl-base-1.0, I get the following error:

File "C:\Users\g\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\dream_textures\generator_process\actions\prompt_to_image.py", line 55, in prompt_to_image
pipe, refiner = self.load_model(diffusers.AutoPipelineForText2Image, model, optimizations, scheduler, sdxl_refiner_model=sdxl_refiner_model)
TypeError: cannot unpack non-iterable StableDiffusionXLPipeline object

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\g\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\dream_textures\generator_process\future.py", line 101, in run_callbacks
done_callback(self)
File "C:\Users\g\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\dream_textures\diffusers_backend.py", line 252, in on_done
result: ImageGenerationResult = future.result(last_only=True)
File "C:\Users\g\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\dream_textures\generator_process\future.py", line 45, in result
raise self._exception
File "C:\Users\g\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\dream_textures\generator_process\future.py", line 88, in run_callbacks
exception_callback(self, exception)
File "C:\Users\g\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\dream_textures\diffusers_backend.py", line 258, in on_exception
callback(exception)
File "C:\Users\g\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\dream_textures\operators\dream_texture.py", line 151, in callback
raise results
TypeError: cannot unpack non-iterable StableDiffusionXLPipeline object
Info: Total files 0 | Changed 0 | Failed 0

The error can be resolved by installing stabilityai/stable-diffusion-xl-refiner-1.0 as well and checking the box in the UI to use the refiner.

@GottfriedHofmann
Copy link
Contributor

Rendering from the command line also fails, not sure wether this is the case only with this release so I created an issue: #713

@carson-katri
Copy link
Owner Author

@GottfriedHofmann I wasn't able to replicate the refiner issue. Could you share more information on your configuration?

@NullSenseStudio
Copy link
Collaborator

I've found the issue. It's only going down this branch as long as offloading is enabled or the device has enough memory to comfortably hold SDXL base and refiner together. This error will occur as long as a refiner isn't selected and either of the previous requirements are met.

if device == "cuda" and (optimizations.cpu_offloading(device) or torch.cuda.mem_get_info()[1] > 20 * 1024**3 * (1 if optimizations.can_use_half(device) else 2)):
pipe, refiner = self.load_model(diffusers.AutoPipelineForText2Image, model, optimizations, scheduler, sdxl_refiner_model=sdxl_refiner_model)

It expects a tuple but load_model() is only returning a single pipeline because sdxl_refiner_model is None. Either this branch also needs to check for sdxl_refiner_model being None or load_model() needs a separate default value to determine returning a tuple or not.

@GottfriedHofmann
Copy link
Contributor

@GottfriedHofmann I wasn't able to replicate the refiner issue. Could you share more information on your configuration?

It is fixed thanks to @NullSenseStudio . I think the issue came up becaues my RTX 3090 has 24 GByte of RAM and thus can hold the entire model.

@carson-katri carson-katri merged commit 4f210c5 into main Nov 4, 2023
2 checks passed
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

Successfully merging this pull request may close these issues.

3 participants