frozoul/4K-NeRF

RuntimeError: CUDA error: device-side assert triggered

Opened this issue · 5 comments

in https://github.com/frozoul/4K-NeRF/blob/a8fdc8e98b/run_sr.py#L829
The dimensionality of the data appears to be incorrect with the index
target_4x = rgb_srgt_train[sel_b, sel_r_4x, sel_c_4x, :]

and the rgb_srsave.shape is (12096,16128,3) weird

this issue can be solved by change

arr_all = patch_gen(imsz, num_im, BS, sz_patch)

to

    imsz = np.int32(imsz / sr_ratio)
    BS = np.int32(BS/sr_ratio)
    arr_all = patch_gen(imsz, num_im, BS, sz_patch)
    arr_all_sr = patch_gen(imsz*sr_ratio, num_im, BS*sr_ratio, sz_patch)

and check the shape of images in llff/fern/images_1008x756/

Hello, it seems you run the package successfully while I am still strugglling in the pytorch & cuda version problem.
Can you share me your infomation on pytorch & cuda version? many thanks.

this issue can be solved by change

arr_all = patch_gen(imsz, num_im, BS, sz_patch)

to

    imsz = np.int32(imsz / sr_ratio)
    BS = np.int32(BS/sr_ratio)
    arr_all = patch_gen(imsz, num_im, BS, sz_patch)
    arr_all_sr = patch_gen(imsz*sr_ratio, num_im, BS*sr_ratio, sz_patch)

and check the shape of images in llff/fern/images_1008x756/

hello, did you meet the error "/pytorch/aten/src/ATen/native/cuda/IndexKernel.cu:142: operator(): block: [134,0,0], thread: [97,0,0] Assertion index >= -sizes[i] && index < sizes[i] && "index out of bounds"` failed."

Hello, it seems you run the package successfully while I am still strugglling in the pytorch & cuda version problem. Can you share me your infomation on pytorch & cuda version? many thanks.

Did you know infomation on pytorch & cuda version

arr_all = patch_gen(imsz, num_im, BS, sz_patch)

Keep the above original code intact.
Instead, check that mogrify is executed properly (line 72 of load_llff.py).

And then, check the created png images in llff/fern/images_1008x756.
If the resolution of png images is 1008x756, it will work without problem.

If mogrify doesn't work, using 'apt-get install imagemagick-6.q16',
just install it