diff --git a/examples/cogvideox_5_tora_trajectory_example_01.json b/examples/cogvideox_5_tora_trajectory_example_01.json new file mode 100644 index 0000000..f8e6ebd --- /dev/null +++ b/examples/cogvideox_5_tora_trajectory_example_01.json @@ -0,0 +1,1059 @@ +{ + "last_node_id": 68, + "last_link_id": 158, + "nodes": [ + { + "id": 20, + "type": "CLIPLoader", + "pos": { + "0": -26, + "1": 400 + }, + "size": { + "0": 451.30548095703125, + "1": 82 + }, + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 54, + 56 + ], + "slot_index": 0, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "CLIPLoader" + }, + "widgets_values": [ + "t5\\google_t5-v1_1-xxl_encoderonly-fp8_e4m3fn.safetensors", + "sd3" + ] + }, + { + "id": 31, + "type": "CogVideoTextEncode", + "pos": { + "0": 497, + "1": 520 + }, + "size": { + "0": 463.01251220703125, + "1": 124 + }, + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 56 + } + ], + "outputs": [ + { + "name": "conditioning", + "type": "CONDITIONING", + "links": [ + 123 + ], + "slot_index": 0, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "CogVideoTextEncode" + }, + "widgets_values": [ + "The video is not of a high quality, it has a low resolution. Watermark present in each frame. Strange motion trajectory. ", + 1, + true + ] + }, + { + "id": 1, + "type": "DownloadAndLoadCogVideoModel", + "pos": { + "0": 633, + "1": 44 + }, + "size": { + "0": 337.8885192871094, + "1": 194 + }, + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [ + { + "name": "pab_config", + "type": "PAB_CONFIG", + "link": null, + "shape": 7 + }, + { + "name": "block_edit", + "type": "TRANSFORMERBLOCKS", + "link": null, + "shape": 7 + }, + { + "name": "lora", + "type": "COGLORA", + "link": null, + "shape": 7 + } + ], + "outputs": [ + { + "name": "cogvideo_pipe", + "type": "COGVIDEOPIPE", + "links": [ + 121, + 132 + ], + "slot_index": 0, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "DownloadAndLoadCogVideoModel" + }, + "widgets_values": [ + "kijai/CogVideoX-5b-Tora", + "bf16", + "fastmode", + "disabled", + false + ] + }, + { + "id": 65, + "type": "CreateShapeImageOnPath", + "pos": { + "0": 1052, + "1": 935 + }, + "size": { + "0": 313.4619445800781, + "1": 270 + }, + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "coordinates", + "type": "STRING", + "link": 145, + "widget": { + "name": "coordinates" + } + }, + { + "name": "size_multiplier", + "type": "FLOAT", + "link": null, + "widget": { + "name": "size_multiplier" + }, + "shape": 7 + }, + { + "name": "frame_width", + "type": "INT", + "link": 149, + "widget": { + "name": "frame_width" + } + }, + { + "name": "frame_height", + "type": "INT", + "link": 150, + "widget": { + "name": "frame_height" + } + } + ], + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": [ + 142, + 153 + ], + "slot_index": 0 + }, + { + "name": "mask", + "type": "MASK", + "links": [ + 154 + ], + "slot_index": 1 + } + ], + "properties": { + "Node name for S&R": "CreateShapeImageOnPath" + }, + "widgets_values": [ + "circle", + "", + 512, + 512, + 12, + 12, + "red", + "black", + 0, + 1, + [ + 1 + ] + ] + }, + { + "id": 56, + "type": "CogVideoDecode", + "pos": { + "0": 1581, + "1": 148 + }, + "size": { + "0": 300.396484375, + "1": 198 + }, + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [ + { + "name": "pipeline", + "type": "COGVIDEOPIPE", + "link": 128 + }, + { + "name": "samples", + "type": "LATENT", + "link": 127 + } + ], + "outputs": [ + { + "name": "images", + "type": "IMAGE", + "links": [ + 155 + ], + "slot_index": 0, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "CogVideoDecode" + }, + "widgets_values": [ + false, + 240, + 360, + 0.2, + 0.2, + true + ] + }, + { + "id": 68, + "type": "ImageCompositeMasked", + "pos": { + "0": 1623, + "1": 557 + }, + "size": { + "0": 315, + "1": 146 + }, + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "destination", + "type": "IMAGE", + "link": 155 + }, + { + "name": "source", + "type": "IMAGE", + "link": 153 + }, + { + "name": "mask", + "type": "MASK", + "link": 154, + "shape": 7 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 156 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "ImageCompositeMasked" + }, + "widgets_values": [ + 0, + 0, + false + ] + }, + { + "id": 66, + "type": "VHS_VideoCombine", + "pos": { + "0": 1405, + "1": 916 + }, + "size": [ + 605.3909912109375, + 714.2606608072917 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 142 + }, + { + "name": "audio", + "type": "AUDIO", + "link": null, + "shape": 7 + }, + { + "name": "meta_batch", + "type": "VHS_BatchManager", + "link": null, + "shape": 7 + }, + { + "name": "vae", + "type": "VAE", + "link": null, + "shape": 7 + } + ], + "outputs": [ + { + "name": "Filenames", + "type": "VHS_FILENAMES", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "VHS_VideoCombine" + }, + "widgets_values": { + "frame_rate": 8, + "loop_count": 0, + "filename_prefix": "CogVideoX-Tora-trajectory", + "format": "video/h264-mp4", + "pix_fmt": "yuv420p", + "crf": 19, + "save_metadata": true, + "pingpong": false, + "save_output": false, + "videopreview": { + "hidden": false, + "paused": false, + "params": { + "filename": "CogVideoX-Tora-trajectory_00001.mp4", + "subfolder": "", + "type": "temp", + "format": "video/h264-mp4", + "frame_rate": 8 + }, + "muted": false + } + } + }, + { + "id": 30, + "type": "CogVideoTextEncode", + "pos": { + "0": 493, + "1": 303 + }, + "size": { + "0": 471.90142822265625, + "1": 168.08047485351562 + }, + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 54 + } + ], + "outputs": [ + { + "name": "conditioning", + "type": "CONDITIONING", + "links": [ + 122 + ], + "slot_index": 0, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "CogVideoTextEncode" + }, + "widgets_values": [ + "video of a brown bear in front of a waterfall", + 1, + true + ] + }, + { + "id": 60, + "type": "SplineEditor", + "pos": { + "0": -103, + "1": 770 + }, + "size": { + "0": 765, + "1": 910 + }, + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "mask", + "type": "MASK", + "links": [ + 146 + ], + "slot_index": 0 + }, + { + "name": "coord_str", + "type": "STRING", + "links": [ + 134, + 145 + ], + "slot_index": 1 + }, + { + "name": "float", + "type": "FLOAT", + "links": null + }, + { + "name": "count", + "type": "INT", + "links": null + }, + { + "name": "normalized_str", + "type": "STRING", + "links": null + } + ], + "properties": { + "Node name for S&R": "SplineEditor", + "points": "SplineEditor" + }, + "widgets_values": [ + "[{\"x\":133.249980962386,\"y\":260.15472473608696},{\"x\":263.32734333042947,\"y\":353.74697326919136},{\"x\":412.4404172645281,\"y\":258.5684154389157},{\"x\":234.77377598134674,\"y\":190.35711566055141},{\"x\":399.749942887158,\"y\":106.28272291047455},{\"x\":539.345161038229,\"y\":266.499961924772}]", + "[{\"x\":133.24998474121094,\"y\":260.15472412109375},{\"x\":146.90032958984375,\"y\":275.1250305175781},{\"x\":160.95431518554688,\"y\":289.7167053222656},{\"x\":175.49871826171875,\"y\":303.81890869140625},{\"x\":190.64990234375,\"y\":317.2657165527344},{\"x\":206.57586669921875,\"y\":329.7820129394531},{\"x\":223.51571655273438,\"y\":340.87823486328125},{\"x\":241.78599548339844,\"y\":349.5747375488281},{\"x\":261.53076171875,\"y\":353.722412109375},{\"x\":281.7359619140625,\"y\":352.4859313964844},{\"x\":301.6475830078125,\"y\":348.8008117675781},{\"x\":321.0851745605469,\"y\":343.1146545410156},{\"x\":339.9189147949219,\"y\":335.6663513183594},{\"x\":358.0020751953125,\"y\":326.5465393066406},{\"x\":375.1062316894531,\"y\":315.70538330078125},{\"x\":390.79693603515625,\"y\":302.913818359375},{\"x\":404.0909118652344,\"y\":287.676025390625},{\"x\":412.28533935546875,\"y\":269.30328369140625},{\"x\":408.2677307128906,\"y\":250.2057647705078},{\"x\":391.3509521484375,\"y\":239.37109375},{\"x\":372.0826721191406,\"y\":233.1624298095703},{\"x\":352.3110656738281,\"y\":228.7548065185547},{\"x\":332.3755187988281,\"y\":225.14697265625},{\"x\":312.3946228027344,\"y\":221.79623413085938},{\"x\":292.44403076171875,\"y\":218.2718048095703},{\"x\":272.63787841796875,\"y\":214.0209503173828},{\"x\":253.3236541748047,\"y\":207.96151733398438},{\"x\":236.94012451171875,\"y\":196.54066467285156},{\"x\":237.0126495361328,\"y\":177.01820373535156},{\"x\":247.45623779296875,\"y\":159.7530975341797},{\"x\":261.6012268066406,\"y\":145.28346252441406},{\"x\":277.7103576660156,\"y\":133.0191192626953},{\"x\":295.14239501953125,\"y\":122.7152328491211},{\"x\":313.58447265625,\"y\":114.35106658935547},{\"x\":332.8315734863281,\"y\":108.0604019165039},{\"x\":352.688720703125,\"y\":104.10931396484375},{\"x\":372.89337158203125,\"y\":102.88045501708984},{\"x\":393.0354309082031,\"y\":104.8262939453125},{\"x\":412.199951171875,\"y\":111.1242446899414},{\"x\":429.0757751464844,\"y\":122.27816009521484},{\"x\":444.1902160644531,\"y\":135.7550506591797},{\"x\":458.09735107421875,\"y\":150.48239135742188},{\"x\":471.13787841796875,\"y\":165.98487854003906},{\"x\":483.52349853515625,\"y\":182.0165557861328},{\"x\":495.3956604003906,\"y\":198.4325714111328},{\"x\":506.85150146484375,\"y\":215.1421356201172},{\"x\":517.9617919921875,\"y\":232.08358764648438},{\"x\":528.7791137695312,\"y\":249.2136688232422},{\"x\":539.3451538085938,\"y\":266.4999694824219}]", + 720, + 480, + 49, + "path", + "cardinal", + 0.5, + 1, + "list", + 0, + 1, + null, + null + ] + }, + { + "id": 57, + "type": "CogVideoSampler", + "pos": { + "0": 1138, + "1": 150 + }, + "size": { + "0": 399.8780822753906, + "1": 390 + }, + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "pipeline", + "type": "COGVIDEOPIPE", + "link": 121 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 122 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 123 + }, + { + "name": "samples", + "type": "LATENT", + "link": null, + "shape": 7 + }, + { + "name": "image_cond_latents", + "type": "LATENT", + "link": null, + "shape": 7 + }, + { + "name": "context_options", + "type": "COGCONTEXT", + "link": null, + "shape": 7 + }, + { + "name": "controlnet", + "type": "COGVIDECONTROLNET", + "link": null, + "shape": 7 + }, + { + "name": "tora_trajectory", + "type": "TORAFEATURES", + "link": 133, + "shape": 7 + }, + { + "name": "num_frames", + "type": "INT", + "link": 157, + "widget": { + "name": "num_frames" + } + }, + { + "name": "height", + "type": "INT", + "link": 151, + "widget": { + "name": "height" + } + }, + { + "name": "width", + "type": "INT", + "link": 152, + "widget": { + "name": "width" + } + } + ], + "outputs": [ + { + "name": "cogvideo_pipe", + "type": "COGVIDEOPIPE", + "links": [ + 128 + ], + "slot_index": 0, + "shape": 3 + }, + { + "name": "samples", + "type": "LATENT", + "links": [ + 127 + ], + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "CogVideoSampler" + }, + "widgets_values": [ + 480, + 720, + 49, + 32, + 6, + 65334758276105, + "fixed", + "CogVideoXDPMScheduler", + 1 + ] + }, + { + "id": 67, + "type": "GetMaskSizeAndCount", + "pos": { + "0": 763, + "1": 772 + }, + "size": { + "0": 264.5999755859375, + "1": 86 + }, + "flags": { + "collapsed": true + }, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "mask", + "type": "MASK", + "link": 146 + } + ], + "outputs": [ + { + "name": "mask", + "type": "MASK", + "links": null + }, + { + "name": "720 width", + "type": "INT", + "links": [ + 147, + 149, + 152 + ], + "slot_index": 1 + }, + { + "name": "480 height", + "type": "INT", + "links": [ + 148, + 150, + 151 + ], + "slot_index": 2 + }, + { + "name": "49 count", + "type": "INT", + "links": [ + 157, + 158 + ], + "slot_index": 3 + } + ], + "properties": { + "Node name for S&R": "GetMaskSizeAndCount" + }, + "widgets_values": [] + }, + { + "id": 61, + "type": "ToraEncodeTrajectory", + "pos": { + "0": 1057, + "1": 746 + }, + "size": { + "0": 270.3999938964844, + "1": 115.14337158203125 + }, + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "pipeline", + "type": "COGVIDEOPIPE", + "link": 132 + }, + { + "name": "coordinates", + "type": "STRING", + "link": 134, + "widget": { + "name": "coordinates" + } + }, + { + "name": "num_frames", + "type": "INT", + "link": 158, + "widget": { + "name": "num_frames" + } + }, + { + "name": "width", + "type": "INT", + "link": 147, + "widget": { + "name": "width" + } + }, + { + "name": "height", + "type": "INT", + "link": 148, + "widget": { + "name": "height" + } + } + ], + "outputs": [ + { + "name": "tora_trajectory", + "type": "TORAFEATURES", + "links": [ + 133 + ] + }, + { + "name": "rescaled_coordinates", + "type": "STRING", + "links": [] + } + ], + "properties": { + "Node name for S&R": "ToraEncodeTrajectory" + }, + "widgets_values": [ + "", + 720, + 480, + 49 + ] + }, + { + "id": 44, + "type": "VHS_VideoCombine", + "pos": { + "0": 2210, + "1": 151 + }, + "size": [ + 1131.6191496313018, + 1065.0794330875347 + ], + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 156 + }, + { + "name": "audio", + "type": "AUDIO", + "link": null, + "shape": 7 + }, + { + "name": "meta_batch", + "type": "VHS_BatchManager", + "link": null, + "shape": 7 + }, + { + "name": "vae", + "type": "VAE", + "link": null, + "shape": 7 + } + ], + "outputs": [ + { + "name": "Filenames", + "type": "VHS_FILENAMES", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "VHS_VideoCombine" + }, + "widgets_values": { + "frame_rate": 8, + "loop_count": 0, + "filename_prefix": "CogVideoX-Tora", + "format": "video/h264-mp4", + "pix_fmt": "yuv420p", + "crf": 19, + "save_metadata": true, + "pingpong": false, + "save_output": false, + "videopreview": { + "hidden": false, + "paused": false, + "params": { + "filename": "CogVideoX-Tora_00002.mp4", + "subfolder": "", + "type": "temp", + "format": "video/h264-mp4", + "frame_rate": 8 + }, + "muted": false + } + } + } + ], + "links": [ + [ + 54, + 20, + 0, + 30, + 0, + "CLIP" + ], + [ + 56, + 20, + 0, + 31, + 0, + "CLIP" + ], + [ + 121, + 1, + 0, + 57, + 0, + "COGVIDEOPIPE" + ], + [ + 122, + 30, + 0, + 57, + 1, + "CONDITIONING" + ], + [ + 123, + 31, + 0, + 57, + 2, + "CONDITIONING" + ], + [ + 127, + 57, + 1, + 56, + 1, + "LATENT" + ], + [ + 128, + 57, + 0, + 56, + 0, + "COGVIDEOPIPE" + ], + [ + 132, + 1, + 0, + 61, + 0, + "COGVIDEOPIPE" + ], + [ + 133, + 61, + 0, + 57, + 7, + "TORAFEATURES" + ], + [ + 134, + 60, + 1, + 61, + 1, + "STRING" + ], + [ + 142, + 65, + 0, + 66, + 0, + "IMAGE" + ], + [ + 145, + 60, + 1, + 65, + 0, + "STRING" + ], + [ + 146, + 60, + 0, + 67, + 0, + "MASK" + ], + [ + 147, + 67, + 1, + 61, + 3, + "INT" + ], + [ + 148, + 67, + 2, + 61, + 4, + "INT" + ], + [ + 149, + 67, + 1, + 65, + 2, + "INT" + ], + [ + 150, + 67, + 2, + 65, + 3, + "INT" + ], + [ + 151, + 67, + 2, + 57, + 9, + "INT" + ], + [ + 152, + 67, + 1, + 57, + 10, + "INT" + ], + [ + 153, + 65, + 0, + 68, + 1, + "IMAGE" + ], + [ + 154, + 65, + 1, + 68, + 2, + "MASK" + ], + [ + 155, + 56, + 0, + 68, + 0, + "IMAGE" + ], + [ + 156, + 68, + 0, + 44, + 0, + "IMAGE" + ], + [ + 157, + 67, + 3, + 57, + 8, + "INT" + ], + [ + 158, + 67, + 3, + 61, + 2, + "INT" + ] + ], + "groups": [], + "config": {}, + "extra": { + "ds": { + "scale": 0.6303940863129404, + "offset": [ + 311.9877226187315, + 0.9847260584690027 + ] + } + }, + "version": 0.4 +} \ No newline at end of file diff --git a/tora/traj_utils.py b/tora/traj_utils.py index 3a6092d..5b86810 100644 --- a/tora/traj_utils.py +++ b/tora/traj_utils.py @@ -4,467 +4,6 @@ import torch # Note that the coordinates passed to the model must not exceed 256. # xy range 256 -PROVIDED_TRAJS = { - "circle1": [ - [120, 194], - [144, 193], - [155, 189], - [158, 170], - [160, 153], - [159, 123], - [152, 113], - [136, 100], - [124, 100], - [108, 100], - [101, 106], - [90, 110], - [84, 129], - [79, 146], - [78, 165], - [83, 182], - [87, 189], - [94, 192], - [100, 194], - [106, 194], - [112, 194], - [118, 195], - ], - "circle2": [ - [100, 127], - [105, 117], - [122, 117], - [132, 129], - [133, 158], - [125, 181], - [108, 189], - [92, 185], - [84, 179], - [79, 163], - [75, 142], - [73, 118], - [75, 82], - [91, 63], - [115, 52], - [139, 46], - [154, 55], - [167, 93], - [175, 112], - [177, 137], - [177, 158], - [177, 171], - [175, 188], - [173, 204], - ], - "coaster": [ - [40, 208], - [40, 148], - [40, 100], - [52, 58], - [60, 57], - [74, 68], - [78, 90], - [84, 123], - [88, 148], - [96, 168], - [100, 181], - [102, 188], - [105, 192], - [113, 118], - [119, 80], - [128, 68], - [145, 109], - [149, 155], - [157, 175], - [161, 184], - [164, 184], - [172, 166], - [183, 107], - [189, 84], - [198, 76], - ], - "dance": [ - [81, 112], - [86, 112], - [92, 112], - [100, 113], - [102, 114], - [97, 115], - [92, 114], - [86, 112], - [81, 112], - [80, 112], - [84, 113], - [89, 114], - [95, 114], - [101, 114], - [102, 114], - [103, 124], - [105, 137], - [109, 156], - [114, 172], - [119, 180], - [124, 184], - [131, 181], - [140, 168], - [146, 152], - [150, 128], - [151, 117], - [152, 116], - [156, 116], - [163, 115], - [169, 116], - [175, 116], - [173, 116], - [167, 116], - [162, 114], - [157, 114], - [152, 115], - [156, 115], - [163, 115], - [168, 115], - [174, 116], - [175, 116], - [168, 116], - [162, 116], - [152, 114], - [149, 134], - [145, 156], - [139, 168], - [130, 183], - [118, 180], - [112, 170], - [107, 151], - [102, 128], - [103, 117], - [96, 113], - [88, 113], - [83, 112], - [80, 112], - ], - "infinity": [ - [60, 141], - [71, 127], - [92, 120], - [112, 123], - [130, 145], - [145, 163], - [167, 178], - [189, 187], - [206, 176], - [213, 147], - [208, 124], - [190, 112], - [176, 111], - [158, 124], - [145, 147], - [125, 172], - [104, 189], - [72, 189], - [59, 184], - [55, 153], - [57, 140], - [75, 119], - [112, 118], - [129, 142], - [149, 163], - [168, 180], - [194, 186], - [206, 175], - [211, 159], - [212, 149], - [212, 134], - [206, 122], - [180, 112], - [163, 116], - [149, 138], - [128, 170], - [108, 184], - [86, 190], - [63, 181], - [57, 152], - [57, 139], - ], - "pause": [ - [98, 186], - [100, 188], - [98, 186], - [100, 188], - [101, 187], - [104, 187], - [111, 184], - [116, 176], - [125, 162], - [132, 140], - [136, 119], - [137, 104], - [138, 96], - [139, 94], - [140, 94], - [140, 96], - [138, 98], - [138, 96], - [136, 94], - [137, 92], - [140, 92], - [144, 92], - [149, 92], - [152, 92], - [151, 92], - [147, 92], - [142, 92], - [140, 92], - [139, 95], - [139, 105], - [141, 122], - [142, 143], - [140, 167], - [136, 184], - [135, 188], - [132, 195], - [132, 192], - [131, 192], - [131, 192], - [130, 192], - [130, 195], - ], - "shake": [ - [103, 89], - [104, 89], - [106, 89], - [107, 89], - [108, 89], - [109, 89], - [110, 89], - [111, 89], - [112, 89], - [113, 89], - [114, 89], - [115, 89], - [116, 89], - [117, 89], - [118, 89], - [119, 89], - [120, 89], - [122, 89], - [123, 89], - [124, 89], - [125, 89], - [126, 89], - [127, 88], - [128, 88], - [129, 88], - [130, 88], - [131, 88], - [133, 87], - [136, 86], - [137, 86], - [138, 86], - [139, 86], - [140, 86], - [141, 86], - [142, 86], - [143, 86], - [144, 86], - [145, 86], - [146, 87], - [147, 87], - [148, 87], - [149, 87], - [148, 87], - [146, 87], - [145, 88], - [144, 88], - [142, 89], - [141, 89], - [140, 90], - [140, 91], - [138, 91], - [137, 92], - [136, 92], - [136, 93], - [135, 93], - [134, 93], - [133, 93], - [132, 93], - [131, 93], - [130, 93], - [129, 93], - [128, 93], - [127, 92], - [125, 92], - [124, 92], - [123, 92], - [122, 92], - [121, 92], - [120, 92], - [119, 92], - [118, 92], - [117, 92], - [116, 92], - [115, 92], - [113, 92], - [112, 92], - [111, 92], - [110, 92], - [109, 92], - [108, 92], - [108, 91], - [108, 90], - [109, 90], - [110, 90], - [111, 89], - [112, 89], - [113, 89], - [114, 89], - [115, 89], - [115, 88], - [116, 88], - [117, 88], - [118, 88], - [118, 87], - [119, 87], - [120, 87], - [121, 87], - [122, 86], - [123, 86], - [124, 86], - [125, 86], - [126, 85], - [127, 85], - [128, 85], - [129, 85], - [130, 85], - [131, 85], - [132, 85], - [133, 85], - [134, 85], - [135, 85], - [136, 85], - [137, 85], - [138, 85], - [139, 85], - [140, 85], - [141, 85], - [142, 85], - [143, 85], - [143, 84], - [144, 84], - [145, 84], - [146, 84], - [147, 84], - [148, 84], - [149, 84], - [148, 84], - [147, 84], - [145, 84], - [144, 84], - [143, 84], - [142, 84], - [141, 84], - [140, 85], - [139, 85], - [138, 85], - [137, 86], - [136, 86], - [136, 87], - [135, 87], - [134, 87], - [133, 87], - [132, 88], - [131, 88], - [130, 88], - [129, 88], - [129, 89], - [128, 89], - [127, 89], - [126, 89], - [125, 89], - [124, 90], - [123, 90], - [122, 90], - [121, 90], - [120, 91], - [119, 91], - [118, 91], - [117, 91], - [116, 91], - [115, 91], - [114, 91], - [113, 91], - [112, 91], - [111, 91], - [110, 91], - [109, 91], - [109, 90], - [108, 90], - [110, 90], - [111, 90], - [113, 90], - [114, 90], - [115, 90], - [116, 90], - [118, 90], - [120, 90], - [121, 90], - [122, 90], - [123, 90], - [124, 90], - [126, 90], - [127, 90], - [128, 90], - [129, 90], - [130, 90], - [131, 90], - [132, 90], - [133, 90], - [134, 90], - [135, 90], - [136, 90], - [137, 90], - [138, 90], - [139, 90], - [140, 90], - [141, 89], - [142, 89], - [143, 89], - [144, 89], - [145, 89], - [146, 89], - [147, 89], - [147, 89], - [147, 89], - ], - "spiral": [ - [16, 152], - [23, 138], - [39, 122], - [54, 115], - [75, 118], - [88, 130], - [93, 150], - [89, 176], - [75, 184], - [63, 177], - [65, 152], - [77, 135], - [98, 121], - [116, 120], - [135, 127], - [148, 136], - [156, 145], - [160, 165], - [158, 176], - [138, 187], - [133, 185], - [129, 148], - [140, 133], - [156, 120], - [177, 118], - [197, 118], - [214, 119], - [225, 118], - ], -} def pdf2(sigma_matrix, grid): """Calculate PDF of the bivariate Gaussian distribution.