taming-transformers icon indicating copy to clipboard operation
taming-transformers copied to clipboard

Colab Issue

Open metaphorz opened this issue 4 years ago • 4 comments
trafficstars

I am really enjoying experimenting with this! I found a cell error in the Colab notebook, and just ignored it and proceeded with subsequent cells. The cell in question is the one producing the 2nd segmentation. Error:

IndexError Traceback (most recent call last)

in () 2 print("c_code", c_code.shape, c_code.dtype) 3 print("c_indices", c_indices.shape, c_indices.dtype) ----> 4 assert c_code.shape[2]*c_code.shape[3] == c_indices.shape[1] 5 segmentation_rec = model.cond_stage_model.decode(c_code) 6 show_segmentation(torch.softmax(segmentation_rec, dim=1))

IndexError: tuple index out of range

metaphorz avatar Jul 14 '21 20:07 metaphorz

I have the same error I'm going to try to figure it out.

adeptflax avatar Jul 18 '21 17:07 adeptflax

I also got the same error

Jiang-maomao avatar Sep 09 '21 06:09 Jiang-maomao

I had the same problem, but I changed it to the following and it worked.

not worked assert c_code.shape[2]*c_code.shape[3] == c_indices.shape[1]

worked assert c_code.shape[2]*c_code.shape[3] == c_indices.shape[0]

takuya-andou avatar Sep 30 '21 22:09 takuya-andou

@takuya-andou that does fix it. Thanks! Now, I am wondering about the color coding of segmentation maps (how to choose the proper colors), but that is another topic so I'll research.

metaphorz avatar Oct 01 '21 15:10 metaphorz