-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.look_at() in step 9 of the inverse caustics example failing with mitsuba 3.6 #1440
Comments
Dear @tstigen, It appears that you are using an older version of the mitsuba-tutorials. In the current master version of mitsuba-tutorials, the relevant section has been updated to:
|
Sorry, I think I was trying to get it to work and made some changes to see if it needed a new type. Even direct from the website I get this error.
|
I fully rebooted and that section runs now. Not sure what was going on. However now it is failing on the optimization step. This could be related to the driver version though. I had success running on 531, I was hoping that 561 plus the new versions of Mitsuba and DrJit might play nice together, but it appears the 1080 + driver version issue may still exist. I'll revert to 531 and see if that makes it work and report back. import time
start_time = time.time()
mi.set_log_level(mi.LogLevel.Warn)
iterations = config['max_iterations']
loss_values = []
spp = config['spp']
for it in range(iterations):
t0 = time.time()
# Apply displacement and update the scene BHV accordingly
apply_displacement()
# Perform a differentiable rendering of the scene
image = mi.render(scene, params, seed=it, spp=2 * spp, spp_grad=spp)
# Scale-independent L2 function
loss = scale_independent_loss(image, image_ref)
# Back-propagate errors to input parameters and take an optimizer step
dr.backward(loss)
# Take a gradient step
opt.step()
# Increase resolution of the heightmap
if it in upsampling_steps:
opt['data'] = dr.upsample(opt['data'], scale_factor=(2, 2, 1))
# Carry over the update to our "latent variable" (the heightmap values)
params.update(opt)
# Log progress
elapsed_ms = 1000. * (time.time() - t0)
current_loss = loss.array[0]
loss_values.append(current_loss)
mi.Thread.thread().logger().log_progress(
it / (iterations-1),
f'Iteration {it:03d}: loss={current_loss:g} (took {elapsed_ms:.0f}ms)',
'Caustic Optimization', '')
# Increase rendering quality toward the end of the optimization
if it in (int(0.7 * iterations), int(0.9 * iterations)):
spp *= 2
opt.set_learning_rate(0.5 * opt.lr['data'])
end_time = time.time()
print(((end_time - start_time) * 1000) / iterations, ' ms per iteration on average')
mi.set_log_level(mi.LogLevel.Info) Logs
|
Can confirm, everything working normally on 531 driver. This was similar to a prior bug #967. So it must be related to how the driver itself interacts with OptiX and (maybe only on the 1080 series). |
Hello @tstigen, It sounds like the tutorial works as expected when using the latest version of the tutorials repo. Regarding the issue with driver v561+, please see this post: mitsuba-renderer/drjit#296 (comment) |
Summary
I saw the v3.60 update could yield 10-20x speedups so I wanted to try it. Installed a new environment and few when trying to run the inverse caustics optimizer example it fails.
System configuration
System information:
OS: windows 10 64 bit
CPU: Intel 7700k
GPU: nVidia 1080
Python version: 3.12.8
LLVM version: ...
CUDA version: 12.6.65
NVidia driver: 561.17
Dr.Jit version: 1.01
Mitsuba version: 3.60
Compiled with: from pip
Variants compiled: ...
Description
Steps to reproduce
The text was updated successfully, but these errors were encountered: