Skip to content
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

AssertionError: power parameter obsoleted in ImGui 1.78, use imgui.SLIDER_FLAGS_LOGARITHMIC instead #626

Open
Bzz2745 opened this issue Nov 12, 2023 · 3 comments

Comments

@Bzz2745
Copy link

Bzz2745 commented Nov 12, 2023

Describe the bug
Outputs when I run 'python visualizer.py':
Traceback (most recent call last):
File "C:\Source\Python\DeepLearning\CV\stylegan3\visualizer.py", line 332, in
main()
File "C:\ProgramData\miniconda3\envs\universal\lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
File "C:\ProgramData\miniconda3\envs\universal\lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "C:\ProgramData\miniconda3\envs\universal\lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\ProgramData\miniconda3\envs\universal\lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "C:\Source\Python\DeepLearning\CV\stylegan3\visualizer.py", line 326, in main
viz.draw_frame()
File "C:\Source\Python\DeepLearning\CV\stylegan3\visualizer.py", line 126, in draw_frame
self.latent_widget(expanded)
File "C:\Source\Python\DeepLearning\CV\stylegan3\gui_utils\imgui_utils.py", line 83, in decorator
res = method(self, *args, **kwargs)
File "C:\Source\Python\DeepLearning\CV\stylegan3\viz\latent_widget.py", line 56, in call
changed, speed = imgui.slider_float('##speed', self.latent.speed, -5, 5, format='Speed %.3f', power=3)
File "imgui\core.pyx", line 9164, in imgui.core.slider_float
AssertionError: power parameter obsoleted in ImGui 1.78, use imgui.SLIDER_FLAGS_LOGARITHMIC instead

Expected behavior
Just fix this bug caused by the update of imgui.

Desktop (please complete the following information):

  • OS: Windows11
  • PyTorch version 2.1
  • CUDA toolkit version 11.8
  • NVIDIA driver version
  • GPU GTX1660ti

Additional context
the following link can prevent some info about this update of imgui:

ocornut/imgui#3361

@takuphilchan
Copy link

takuphilchan commented Nov 15, 2023

For wsl2 ubuntu 20.04, I removed power=3 and added flags=0 and it worked.

@Bzz2745
Copy link
Author

Bzz2745 commented Nov 15, 2023 via email

@takuphilchan
Copy link

takuphilchan commented Nov 15, 2023

email
Power is obsolete in imgui 1.78 so you can remove power in both files. The files are located in /eg3d/viz/
for latent_widget.py replace with this changed, speed = imgui.slider_float('##speed', self.latent.speed, -5, 5, format='Speed %.3f', flags=imgui.SLIDER_FLAGS_NONE). for layer_widget.py replace with this _changed, self.fft_beta = imgui.slider_float('##fft_beta', self.fft_beta, min_value=0, max_value=50, format='Kaiser beta %.2f', flags=imgui.SLIDER_FLAGS_NONE). The flags can be used to manage the slider functions behavior . The flags = 0 is for C++ for python you can use imgui.SLIDER_FLAGS_NONE instead of 0 if you want to add flags.

I hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants