stable-diffusion-webui-aesthetic-gradients icon indicating copy to clipboard operation
stable-diffusion-webui-aesthetic-gradients copied to clipboard

I dont know what happened

Open zeoo01 opened this issue 2 years ago • 4 comments

"File "C:\webui\extensions\stable-diffusion-webui-aesthetic-gradients-master\scripts\aesthetic.py", line 67, in generate_embs res = aesthetic_clip.generate_imgs_embd(*args) File "C:\webui\extensions\stable-diffusion-webui-aesthetic-gradients-master\aesthetic_clip.py", line 119, in generate_imgs_embd embs = torch.cat(embs, dim=0).mean(dim=0, keepdim=True) RuntimeError: torch.cat(): expected a non-empty list of Tensors"

zeoo01 avatar Oct 30 '22 03:10 zeoo01

I had the same issue, but figured it out. On windows, enter the image directory as a hard path, like:

C:\training-images

Also, make sure batch size is a factor of 2. If you have 8 gb of vram, I'd suggest lowering it to 128, 64, or even 32.

That worked for me.

Vega-KH avatar Nov 01 '22 00:11 Vega-KH

I had the same issue, but figured it out. On windows, enter the image directory as a hard path, like:

C:\training-images

Also, make sure batch size is a factor of 2. If you have 8 gb of vram, I'd suggest lowering it to 128, 64, or even 32.

That worked for me.

Doesn't work for me. I'm still getting the error OP mentions.

jtkelm2 avatar Nov 01 '22 08:11 jtkelm2

I'm also getting this error now.

I've tried to change how many images there are to a factor of two, I've tried to enter the hard path, no dice. I will also post the whole error message I've gotten, hope that will help.

Traceback (most recent call last): File "C:\Users\armad\Desktop\AutomaticWebUI\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 284, in run_predict output = await app.blocks.process_api( File "C:\Users\armad\Desktop\AutomaticWebUI\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 982, in process_api result = await self.call_function(fn_index, inputs, iterator) File "C:\Users\armad\Desktop\AutomaticWebUI\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 824, in call_function prediction = await anyio.to_thread.run_sync( File "C:\Users\armad\Desktop\AutomaticWebUI\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\Users\armad\Desktop\AutomaticWebUI\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "C:\Users\armad\Desktop\AutomaticWebUI\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "C:\Users\armad\Desktop\AutomaticWebUI\stable-diffusion-webui\extensions\stable-diffusion-webui-aesthetic-gradients\scripts\aesthetic.py", line 67, in generate_embs res = aesthetic_clip.generate_imgs_embd(*args) File "C:\Users\armad\Desktop\AutomaticWebUI\stable-diffusion-webui\extensions\stable-diffusion-webui-aesthetic-gradients\aesthetic_clip.py", line 119, in generate_imgs_embd embs = torch.cat(embs, dim=0).mean(dim=0, keepdim=True) RuntimeError: torch.cat(): expected a non-empty list of Tensors

That's the full error. Not sure why it's happening, or how to fix it.

ArmadstheDoom avatar Dec 02 '22 01:12 ArmadstheDoom

Okay so I think I figured out the problem? I think.

I had to go and install the newest versions of visualstudio c++. Was about 5 gb or so. But once I did that, this error disappeared.

ArmadstheDoom avatar Dec 02 '22 04:12 ArmadstheDoom