taming-transformers
taming-transformers copied to clipboard
wrong syntax
scripts/taming-transformers.ipynb have some code issue while runtime due to wrong syntax so i did some changes you can see here https://colab.research.google.com/drive/1m11MAdnuFv-9BW2RPKYRgtzaqOOI01tp?usp=sharing
This notebook worked for me where the original did not. Thx!
c_code, c_indices = model.encode_to_c(segmentation) print("c_code", c_code.shape, c_code.dtype) print("c_indices", c_indices.shape, c_indices.dtype) assert c_code.shape[2]*c_code.shape[3] == c_indices.shape[0] segmentation_rec = model.cond_stage_model.decode(c_code) show_segmentation(torch.softmax(segmentation_rec, dim=1))
*assert c_code.shape[2]c_code.shape[3] == c_indices.shape[0] is correct
in orignal file there's a index missmatch