"Cannot identify image file io.BytesIO" running default options - wallhaven.cc is down
noobtoob4lyfe opened this issue · 11 comments
wallhaven.cc is down, the website it's hard coded to get the default image from, try inputting your own manually with depthflow.exe input -i ./image.png main
Thanks for your help. No luck yet.
"C:\Users\importon\Downloads>depthflow-cuda-windows-amd64-latest.exe input -i ./BandW.PNG main
│DepthFlow ├┤ 202ms├┤INFO │ ▸ PyTorch Flavor (TorchFlavor.CUDA) already installed
│DepthFlow ├┤ 719ms├┤INFO │ ▸ ( 1) DepthFlowScene │ ▸ Module added to the Scene
│DepthFlow ├┤ 721ms├┤INFO │ ▸ ( 1) DepthFlowScene │ ▸ Creating glfw Window
│DepthFlow ├┤ 969ms├┤INFO │ ▸ ( 1) DepthFlowScene │ ▸ Adding default base Scene modules
│DepthFlow ├┤ 970ms├┤INFO │ ▸ ( 2) ShaderFrametimer │ ▸ Module added to the Scene
│DepthFlow ├┤ 972ms├┤INFO │ ▸ ( 3) ShaderKeyboard │ ▸ Module added to the Scene
│DepthFlow ├┤ 973ms├┤INFO │ ▸ ( 4) ShaderCamera │ ▸ Module added to the Scene
│DepthFlow ├┤ 974ms├┤INFO │ ▸ ( 5) ShaderDynamics │ ▸ Module added to the Scene
│DepthFlow ├┤ 974ms├┤INFO │ ▸ ( 6) ShaderDynamics │ ▸ Module added to the Scene
│DepthFlow ├┤ 975ms├┤INFO │ ▸ ( 7) ShaderDynamics │ ▸ Module added to the Scene
│DepthFlow ├┤ 976ms├┤INFO │ ▸ ( 8) ShaderDynamics │ ▸ Module added to the Scene
│DepthFlow ├┤ 977ms├┤INFO │ ▸ ( 9) ShaderDynamics │ ▸ Module added to the Scene
│DepthFlow ├┤ 978ms├┤INFO │ ▸ (10) ShaderDynamics │ ▸ Module added to the Scene
│DepthFlow ├┤ 978ms├┤INFO │ ▸ (11) ShaderDynamics │ ▸ Module added to the Scene
│DepthFlow ├┤ 980ms├┤INFO │ ▸ (12) ShaderDynamics │ ▸ Module added to the Scene
│DepthFlow ├┤ 981ms├┤INFO │ ▸ ( 1) DepthFlowScene │ ▸ Creating SSAA Implementation
│DepthFlow ├┤ 982ms├┤INFO │ ▸ (13) ShaderObject │ ▸ Module added to the Scene
│DepthFlow ├┤ 983ms├┤INFO │ ▸ (14) ShaderTexture │ ▸ Module added to the Scene
│DepthFlow ├┤ 988ms├┤INFO │ ▸ (15) ShaderObject │ ▸ Module added to the Scene
│DepthFlow ├┤ 989ms├┤INFO │ ▸ (16) ShaderTexture │ ▸ Module added to the Scene
│DepthFlow ├┤ 999ms├┤INFO │ ▸ (17) ShaderTexture │ ▸ Module added to the Scene
│DepthFlow ├┤1002ms├┤INFO │ ▸ (18) ShaderTexture │ ▸ Module added to the Scene
│DepthFlow ├┤1346ms├┤INFO │ ▸ Creating directory: C:\Users\importon\AppData\Local\BrokenSource\DepthFlow\Cache
│DepthFlow ├┤1386ms├┤INFO │ ▸ DepthMap will be cached on
(C:\Users\importon\AppData\Local\BrokenSource\DepthFlow\Cache\30586672-f5ec-b2b8-3892-ad20062552a4.depth.png)
preprocessor_config.json: 100%|███████████████████████████████████████████████████████████████| 437/437 [00:00<?, ?B/s]
config.json: 100%|████████████████████████████████████████████████████████████████████████████| 957/957 [00:00<?, ?B/s]
model.safetensors: 100%|████████████████████████████████████████████████████████████| 390M/390M [00:07<00:00, 51.9MB/s]
│DepthFlow ├┤26480ms├┤SUCCESS│ ▸ Saving depth map to cache path
(C:\Users\importon\AppData\Local\BrokenSource\DepthFlow\Cache\30586672-f5ec-b2b8-3892-ad20062552a4.depth.png)
│DepthFlow ├┤26632ms├┤SUCCESS│ ▸ Already upscaled to target size (0, 0): <PIL.Image.Image image mode=L size=770x518 at
0x266CCC8B150>
│DepthFlow ├┤26633ms├┤SUCCESS│ ▸ Already upscaled to target size (0, 0): <PIL.PngImagePlugin.PngImageFile image
mode=RGBA size=2780x1856 at 0x266A57D0F50>
------------------------------------------------------------------------------------------------------------------------1
10 main ...rton\AppData\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\DepthFlow_main_.py> depthflow.cli(sys.argv[1:])
574 cli ...porton\AppData\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\ShaderFlow\Scene.py> self.broken_typer(args)
111 call ...ta\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\Broken\Core\BrokenTyper.py> raise error
105 call ...ta\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\Broken\Core\BrokenTyper.py> self.app(args)
326 call ...mporton\AppData\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\typer\main.py> raise e
309 call ...mporton\AppData\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\typer\main.py> return get_command(self)(*args, **kwargs)
1157 call ...porton\AppData\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\click\core.py> return self.main(*args, **kwargs)
723 main ...rs\importon\AppData\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\typer\core.py> return _main(
193 _main ...s\importon\AppData\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\typer\core.py> rv = self.invoke(ctx)
1719 invoke ...importon\AppData\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\click\core.py> rv.append(sub_ctx.command.invoke(sub_ctx))
1434 invoke ...importon\AppData\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\click\core.py> return ctx.invoke(self.callback, **ctx.params)
783 invoke ...\importon\AppData\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\click\core.py> return __callback(*args, **kwargs)
692 wrapper ...importon\AppData\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\typer\main.py> return callback(**use_params)
722 main ...orton\AppData\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\ShaderFlow\Scene.py> video_resolution = self.resize(width=width, height=height, scale=scale, aspect_ratio=aspect)
477 resize ...ton\AppData\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\ShaderFlow\Scene.py> self.window.size = self.resolution
145 size ...\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\moderngl_window\context\glfw\window.py> glfw.set_window_size(self._window, value[0], value[1])
1382 set_window_size ...Data\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\glfw_init_.py> _glfw.glfwSetWindowSize(window, width, height)
689 errcheck ...rton\AppData\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\glfw_init_.py> _reraise(exc[1], exc[2])
70 reraise ...orton\AppData\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\glfw_init.py> raise exception.with_traceback(traceback)
668 callback_wrapper ...Data\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\glfw_init_.py> return func(*args, **kwargs)
374 glfw_window_resize_callback ...ce\3998689112427238636\0.3.1\Lib\site-packages\moderngl_window\context\glfw\window.py> super().resize(self._buffer_width, self._buffer_height)
756 resize ...yapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\moderngl_window\context\base\window.py> self._resize_func(width, height)
942 window_resize ...\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\ShaderFlow\Scene.py> self.relay(Message.Shader.Render)
42 relay ...rton\AppData\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\ShaderFlow\Module.py> module.handle(message)
379 handle ...on\AppData\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\ShaderFlow\Shader.py> self.render()
366 render ...on\AppData\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\ShaderFlow\Shader.py> self.use_pipeline(self._full_pipeline())
356 use_pipeline ...Data\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\ShaderFlow\Shader.py> self.set_uniform(variable.name, variable.value)
276 set_uniform ...pData\Local\pyapp\data\broken-source\3998689112427238636\0.3.1\Lib\site-packages\ShaderFlow\Shader.py
@fragment.setter
def fragment(self, value: Union[Path, str]):
self._watchshader(value)
self._fragment = value
# Uniforms
def set_uniform(self, name: str, value: Any=None) -> None:
# Note: Denum safety, called hundreds of times: No noticeable performance impact (?)
if (value is not None) and (uniform := self.program.get(name, None)):
uniform.value = denum(value)
def get_uniform(self, name: str) -> Any | None:
return self.program.get(name, None)
# Rendering
def _full_pipeline(self) -> Iterable[ShaderVariable]:
for module in self.scene.modules:
yield from module.pipeline()
AttributeError:
'NoneType' object has no attribute 'get'
C:\Users\importon\Downloads>"
the current executable version is kinda old, this seems like a bad order of initialization bug I've found a while ago
perhaps try running directly from source code at https://brokensrc.dev/get/source
there's much more features now, huge optimizations on the shader code, and much better documented command line interface!
I hope to release the v0.4 this week, I've broken my system two days ago, and I'm rewriting configs, directories, etc, and a bit low energy due internship
Thanks again for your help. Traditionally when using a python based project from github (like https://github.com/DepthAnything/Depth-Anything-V2) I would download the project, install dependencies, and there would be and example python script with arguments that would produce the desired output. This project seems to be quite different. I'm having trouble. Is it possible to run this in the more traditional way somehow?
Not really at the moment, but maybe in the medium future
Python tooling for monorepos is kinda bad, which I absolutely need to orchestrate all the projects and expand fast, with the shared library with utilities and common behavior, and in the case of depthflow, requiring its big brother shaderflow for the rendering engine behind it (three complex projects involved)
The best solution so far (and current one) is using rye with its workspaces system, and hatchling build system to include multiple sub-directories of the projects into a single python wheel
I've thought about pinning versions to exact matches across the board, like, depthflow 0.4 must have shaderflow 0.4 and monorepo lib 0.4, I can see that working and I hope pushing wheels out of order works this way, will investigate this week
but until then, cloning the monorepo and its submodules is required, or waiting until I push new wheels every so often
and yea, documentation is kinda lacking now, which I will focus after the animation preset system here in depthflow :)
might also add a readme in a "examples" directory pointing where to find stuff, as often it's included in a resources folder so pypi/binary releases contains end user files, or in the case of depthflow, it's "hidden" on the implementation itself
Thanks for the detailed explanation. I will continue to check for updates as the project matures. FYI, I'm interested in this project to see if I can modify the scripts to produce sterescopic images with correct inpainting from an input image by moving the virtual camera to 2 parallel locations.
sterescopic images .. camera to 2 parallel location
Oh, just press "p" to change the camera projection mode if on the realtime window 👍🏻
(^exaggerated separation = 0.5)
Pressing it again changes to a equirectangular 360° projection, and then back to perspective
Can add/configure your own on a inherited scene's .update
or .build
method with:
from ShaderFlow.Modules.Camera import CameraProjection
def build(self):
DepthScene.build(self)
self.camera.separation.value = 0.5
self.camera.projection = CameraProjection.VirtualReality
or put that directly here
Bump, the wallpapers website is back, error should be gone retroactively
But it's a good idea to improve it when the image is not found
@noobtoob4lyfe thanks for noticing, just fixed it; keep in mind releases are somewhat experimental atm!