Errors in Windows/Conda (beta install)
bbecausereasonss opened this issue · 3 comments
Followed pip install instructions in new conda env python=3.10 (Pip installed w/o errors). Running Cuda 11.8. Seems to be some incompatibility with versions? I don't know... :/
pip install "imaginairy==14.0.0b2"
Getting errors
(imaginairy) PS C:\Users\xxxx\Deep\imaginairy> aimg videogen --start-image pearl-girl.png --num-frames 4 -r 5
Generating video from image pearl-girl.png
Device: cpu seed: 729039
Traceback (most recent call last):
File "C:\Users\xxxx\anaconda3\envs\imaginairy\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\xxxx\anaconda3\envs\imaginairy\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\xxxx\anaconda3\envs\imaginairy\Scripts\aimg.exe_main.py", line 7, in
File "C:\Users\xxxx\anaconda3\envs\imaginairy\lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
File "C:\Users\xxxx\anaconda3\envs\imaginairy\lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "C:\Users\xxxx\anaconda3\envs\imaginairy\lib\site-packages\click_shell\core.py", line 164, in invoke
ret = super(Shell, self).invoke(ctx)
File "C:\Users\xxxx\anaconda3\envs\imaginairy\lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\xxxx\anaconda3\envs\imaginairy\lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\xxxx\anaconda3\envs\imaginairy\lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "C:\Users\xxxx\anaconda3\envs\imaginairy\lib\site-packages\imaginairy\cli\videogen.py", line 77, in videogen_cmd
generate_video(
File "C:\Users\xxxx\anaconda3\envs\imaginairy\lib\site-packages\imaginairy\video_sample.py", line 55, in generate_video
torch.cuda.reset_peak_memory_stats()
File "C:\Users\xxxx\anaconda3\envs\imaginairy\lib\site-packages\torch\cuda\memory.py", line 307, in reset_peak_memory_stats
return torch._C._cuda_resetPeakMemoryStats(device)
AttributeError: module 'torch._C' has no attribute '_cuda_resetPeakMemoryStats'
(imaginairy) PS C:\Users\xxxx\Deep\imaginairy>
I must admit I'm not sure why getting the proper torch version installed is more difficult for 2.0
I think if you follow the directions here it will work:
https://pytorch.org/get-started/locally/
Hello, and thanks! I tried getting this going on Windows today as well, and found what may be a few issues.
- As above, pip installer installed non-cuda version of torch which I resolved by installing the correct version manually (I am using cu118)
- When a model is downloaded it seems no further action occurs after it completes, so I stop it and run the command again to proceed. Maybe this is just my perception/impatience
- The --gif option seems to just produce a jpg
- The location of aimg in site-packages needed to be added to my path manually (mentioned by pip)
- Options for aimg are presented with formatting errors when run from cmd.exe:
C:\Users\me\Dev\imaginAIry>aimg
←[33mUsage←[0m: aimg [OPTIONS] COMMAND [ARGS]...
🤖🧠 ImaginAIry.
Pythonic generation of images via AI
←[33mOptions←[0m:
←[32m--help←[0m Show this message and exit.
←[33mCommands←[0m:
←[32mcolorize←[0m Colorize images using AI.
←[32mdescribe←[0m Generate text descriptions of images.
←[32medit←[0m Edit an image via AI.
←[32medit-demo←[0m Make some fun pre-set edits to input photos.
←[32mimagine←[0m Generate images via AI.
←[32mmodel-list←[0m Print list of available models.
←[32mprep-images←[0m Prepare a folder of images for training.
←[32mprune-ckpt←[0m Prune a checkpoint file.
←[32mserver←[0m Run a HTTP API server.
←[32msystem-info←[0m Display system information.
←[32mtrain-concept←[0m Teach the model a new concept (a person, thing, style, etc).
←[32mupscale←[0m Upscale an image 4x using AI.
←[32mversion←[0m Print the version.
←[32mvideogen←[0m AI generate a video from an image
Starting imaginAIry shell...
🤖🧠>
- An Error trying to generate a simple video (seen after loading weights):
Traceback (most recent call last):
File "C:\Users\me\AppData\Roaming\Python\Python310\site-packages\imaginairy\cli\clickshell_mod.py", line 30, in invoke_
command.main(
File "C:\Program Files\Python310\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Program Files\Python310\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Program Files\Python310\lib\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "C:\Users\me\AppData\Roaming\Python\Python310\site-packages\imaginairy\cli\videogen.py", line 77, in videogen_cmd
generate_video(
File "C:\Users\me\AppData\Roaming\Python\Python310\site-packages\imaginairy\video_sample.py", line 95, in generate_video
raise ValueError
ValueError
I see you addressed this on reddit: "That's what happens when it can't find the file you specified. Provide a path to an image you want to animate. I provided a better error message now in 14.0.0b3"
After hearing this, I found that the issue was due to my having given the source image file path using "\" rather than "/".
Great feedback.
- Those weird codes are for coloring on macos/linux. I'll have to figure out how to handle that in windows.
- I need to add a progress bar
- a video should be output to
outputs/video
. if thats not happening I'll have to look into that more - I really need to at minimum provide more useful error messages when the wrong version of torch is installed. Even better would be to figure out how to install the right version in the first place.
- peak memory reset needs to be wrapped to only run when cuda is enabled