kousw / stable-diffusion-webui-daam

DAAM for Stable Diffusion Web UI
Other
159 stars 28 forks source link

not working with high res fix #2

Open IkariDevGIT opened 1 year ago

IkariDevGIT commented 1 year ago

To create a public link, set share=True in launch(). Unloading hypernetwork daam run 100%|██████████████████████████████████████████████████████████████████████████████████| 30/30 [00:42<00:00, 1.41s/it] Error executing callback before_image_saved_callback for D:\stable-diffusion-webui\extensions\stable-diffusion-webui-daam\scripts\daam_script.py Traceback (most recent call last): File "D:\stable-diffusion-webui\modules\script_callbacks.py", line 121, in before_image_saved_callback c.callback(params) File "D:\stable-diffusion-webui\extensions\stable-diffusion-webui-daam\scripts\daam_script.py", line 88, in before_image_saved global_heat_map = self.tracer.compute_global_heat_map(params.p.prompt) AttributeError: 'NoneType' object has no attribute 'prompt'

100%|██████████████████████████████████████████████████████████████████████████████████| 30/30 [00:49<00:00, 1.65s/it] Error executing callback before_image_saved_callback for D:\stable-diffusion-webui\extensions\stable-diffusion-webui-daam\scripts\daam_script.py Traceback (most recent call last): File "D:\stable-diffusion-webui\modules\script_callbacks.py", line 121, in before_image_saved_callback c.callback(params) File "D:\stable-diffusion-webui\extensions\stable-diffusion-webui-daam\scripts\daam_script.py", line 88, in before_image_saved global_heat_map = self.tracer.compute_global_heat_map(params.p.prompt) File "D:\stable-diffusion-webui\extensions\stable-diffusion-webui-daam\scripts\daam\trace.py", line 167, in compute_global_heat_map maps = torch.stack([torch.stack(x, 0) for x in all_merges], dim=0) RuntimeError: stack expects each tensor to be equal size, but got [2, 154, 1, 64, 32] at entry 0 and [4, 154, 1, 64, 32] at entry 59

Total progress: 100%|██████████████████████████████████████████████████████████████████| 60/60 [01:11<00:00, 1.20s/it]

kousw commented 1 year ago

Thank you for reporting the problem. However, it may be a bit difficult. Highres fix first generates a low-resolution image, then the desired resolution. The current implementation only combines heatmaps of consistent resolution. I will give it some thought.

ghost commented 1 year ago

This works but only for specific resolution combination(s). As an example, and the only one I've seen that works, 1536x1024, with a firstpass size of 768x512, produces no error, and the heatmap generates fine. The width/height can be swapped in each as well. I can share an example if needed but this looks to be consistently reproducable.