Comments (11)
MacOS
M1
scripts/gui.sh: line 1: python: command not found
Line 1 😭 ,How to resolve it?Help me pls
from draggan.
Getting this error
Traceback (most recent call last):
File "/Users/pawandeepsingh/Documents/Development/official_draggan/DragGAN/visualizer_drag.py", line 404, in <module>
main()
File "/Users/pawandeepsingh/miniforge3/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/Users/pawandeepsingh/miniforge3/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Users/pawandeepsingh/miniforge3/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/pawandeepsingh/miniforge3/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/pawandeepsingh/Documents/Development/official_draggan/DragGAN/visualizer_drag.py", line 363, in main
viz = Visualizer(capture_dir=capture_dir)
File "/Users/pawandeepsingh/Documents/Development/official_draggan/DragGAN/visualizer_drag.py", line 31, in __init__
super().__init__(title='DragGAN', window_width=3840, window_height=2160)
File "/Users/pawandeepsingh/Documents/Development/official_draggan/DragGAN/gui_utils/imgui_window.py", line 43, in __init__
self._imgui_renderer = _GlfwRenderer(self._glfw_window)
File "/Users/pawandeepsingh/Documents/Development/official_draggan/DragGAN/gui_utils/imgui_window.py", line 102, in __init__
super().__init__(*args, **kwargs)
File "/Users/pawandeepsingh/miniforge3/lib/python3.9/site-packages/imgui/integrations/glfw.py", line 12, in __init__
super(GlfwRenderer, self).__init__()
File "/Users/pawandeepsingh/miniforge3/lib/python3.9/site-packages/imgui/integrations/opengl.py", line 60, in __init__
super(ProgrammablePipelineRenderer, self).__init__()
File "/Users/pawandeepsingh/miniforge3/lib/python3.9/site-packages/imgui/integrations/base.py", line 17, in __init__
self._create_device_objects()
File "/Users/pawandeepsingh/miniforge3/lib/python3.9/site-packages/imgui/integrations/opengl.py", line 108, in _create_device_objects
self._attrib_location_tex = gl.glGetUniformLocation(self._shader_handle, "Texture")
File "/Users/pawandeepsingh/miniforge3/lib/python3.9/site-packages/OpenGL/latebind.py", line 63, in __call__
return self.wrapperFunction( self.baseFunction, *args, **named )
File "/Users/pawandeepsingh/miniforge3/lib/python3.9/site-packages/OpenGL/GL/VERSION/GL_2_0.py", line 430, in glGetUniformLocation
return baseOperation( program, name )
File "/Users/pawandeepsingh/miniforge3/lib/python3.9/site-packages/OpenGL/platform/baseplatform.py", line 415, in __call__
return self( *args, **named )
File "/Users/pawandeepsingh/miniforge3/lib/python3.9/site-packages/OpenGL/error.py", line 230, in glCheckError
raise self._errorClass(
OpenGL.error.GLError: GLError(
err = 1282,
description = b'invalid operation',
baseOperation = glGetUniformLocation,
cArguments = (1, b'Texture\x00'),
result = -1
)
any help would be appreciated :)
from draggan.
after further tracking the code,
found that the fault is due to this line
self.set_window_size(window_width, window_height)
from gui_utils/glfw_window.py
in the init() function.
from draggan.
I can open the generated web address, and the interactive content is displayed correctly. However, once I click to manipulate the image, it shows an error: ”Expecting value: line 1 column 1 (char 0)“,
I am a computer newbie, please help me.
MacOS M1
from draggan.
@albusdemens when you say fixed, do you mean the project was running?
from draggan.
okay resolved segmentation fault
it was due to
self.monitor_height
and self.monitor_width
variables
in the same file def set_window_size(self, width, height):
this function
I removed them and hard coded 1920 and 1080 instead.
from draggan.
@Pawandeep-prog I fixed the issue by following this suggestion.
from draggan.
I think it require cuda to run as I see in stylegan3 repo, and I am running Mac m1 maybe that is the issue. :(
from draggan.
I track my issue, I found the problem is caused by : _, _, _width, height = glfw.get_monitor_workarea(glfw.get_primary_monitor())
, in glfw_window.py
, line 82.
My macbook pro is MacOS Monterey 2021, M1 pro chip.
It return a null pointer while it tried to query the monitor size, but fail
It seems like the glfw library didn't have good support in arm chip. Maybe using Metal could resolve it?
from draggan.
I also had problem over there, didn't found any solution so I hard coded these values. :(
from draggan.
I try:
glfw.window_hint(glfw.CONTEXT_VERSION_MAJOR, 3)
glfw.window_hint(glfw.CONTEXT_VERSION_MINOR, 3)
glfw.window_hint(glfw.OPENGL_FORWARD_COMPAT, glfw.TRUE)
glfw.window_hint(glfw.OPENGL_PROFILE, glfw.OPENGL_CORE_PROFILE)
I want to set the openGL context to 3.3, while:
version = gl.glGetString(gl.GL_VERSION)
print("OpenGL Version:", version)
prints OpenGL Version: b'4.1 Metal - 83.1'. (without the change it prints 2.1 Metal)
With this change:
self._imgui_renderer = _GlfwRenderer(self._glfw_window)
in line 40, imgui_window.py throws no exception.
But further exception was thrown: gui_utils/glfw_window.py", line 193, in begin_frame
OpenGL.error.GLError: GLError(
err = 1282,
description = b'invalid operation',
baseOperation = glMatrixMode,
cArguments = (GL_PROJECTION,)
)
from draggan.
Related Issues (20)
- OSError: exception: access violation reading 0x0000000000000330 HOT 1
- python visualizer_drag_gradio.py issue HOT 1
- An error:When I uploaded a photo that was not learned by your model, the image modification result was incorrect.
- ResolvePackageNotFound scipy HOT 3
- OSError: [WinError 127]
- When deploying under Windows 10/Windows 11, it always displays RuntimeError:RuntimeError: Ninja is required to load C++ extensions. please tall me how to do it? HOT 1
- "ModuleNotFoundError: No module named 'imgui'" (Windows 10)
- Why not test this project from a fresh environment?
- .\scripts\gui.bat reports error `Setting up PyTorch plugin "bias_act_plugin"... Failed!` HOT 5
- run in colab error HOT 3
- !python /content/DragGAN/visualizer_drag_gradio.py Problem HOT 10
- Provide mirror for model files in research network like DFN X-WiN
- Face landmark manipulation, Our method works well even for such dense keypoint cases.
- Mac M1: Invalid operation glGetUniformLocation HOT 4
- Wrong result HOT 3
- 如何处理自定义的图片? HOT 2
- pydantic_core._pydantic_core.ValidationError HOT 1
- Inquiry Regarding the Extension of DragGAN's Manifold Manipulation to Accommodate Diverse GAN Architectures
- Error in "gui.sh" Script Execution on MacBook Pro M2 with macOS 14.2.1 HOT 2
- use pti , custom image only face. how can i put any img like human body or pets (eg. cat,dog) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from draggan.