ironjr / StreamMultiDiffusion

Official code for the paper "StreamMultiDiffusion: Real-Time Interactive Generation with Region-Based Semantic Control."
https://jaerinlee.com/research/streammultidiffusion
MIT License
518 stars 43 forks source link

报错,怎么用venv环境启动? #2

Closed hhhaa123 closed 5 months ago

hhhaa123 commented 5 months ago

D:\SD_AI\StreamMultiDiffusion\src>CUDA_VISIBLE_DEVICES=0 python app.py --model {D:\SD_AI\ComfyUI_windows_portable\ComfyUI\models\checkpoints\sd15\NIJI-V5-sd-1.5_Niji-v5-sd-v2.safetensors} --height 512 --width 512 --port 8000 'CUDA_VISIBLE_DEVICES' 不是内部或外部命令,也不是可运行的程 序 或批处理文件。

D:\SD_AI\StreamMultiDiffusion\src>python app.py --model {D:\SD_AI\ComfyUI_windows_portable\ComfyUI\models\checkpoints\sd15\NIJI-V5-sd-1.5_Niji-v5-sd-v2.safetensors} --height 512 --width 512 --port 8000 Traceback (most recent call last): File "D:\SD_AI\StreamMultiDiffusion\src\app.py", line 31, in import gradio as gr File "D:\SD_AI\ComfyUI_windows_portable\beiweijun\lib\site-packages\gradio__init.py", line 3, in import gradio._simple_templates File "D:\SD_AI\ComfyUI_windows_portable\beiweijun\lib\site-packages\gradio_simple_templates__init.py", line 1, in from .simpledropdown import SimpleDropdown File "D:\SD_AI\ComfyUI_windows_portable\beiweijun\lib\site-packages\gradio_simple_templates\simpledropdown.py", line 6, in from gradio.components.base import FormComponent File "D:\SD_AI\ComfyUI_windows_portable\beiweijun\lib\site-packages\gradio\components\init__.py", line 40, in from gradio.components.multimodal_textbox import MultimodalTextbox File "D:\SD_AI\ComfyUI_windows_portable\beiweijun\lib\site-packages\gradio\components\multimodal_textbox.py", line 28, in class MultimodalTextbox(FormComponent): File "D:\SD_AI\ComfyUI_windows_portable\beiweijun\lib\site-packages\gradio\component_meta.py", line 198, in new__ create_or_modify_pyi(component_class, name, events) File "D:\SD_AI\ComfyUI_windows_portable\beiweijun\lib\site-packages\gradio\component_meta.py", line 92, in create_or_modify_pyi source_code = source_file.read_text() File "C:\Users\yi\AppData\Local\Programs\Python\Python310\lib\pathlib.py", line 1135, in read_text return f.read() UnicodeDecodeError: 'gbk' codec can't decode byte 0xb2 in position 1972: illegal multibyte sequence

(beiweijun) D:\SD_AI\StreamMultiDiffusion\src>python app.py --model {D:\SD_AI\ComfyUI_windows_portable\ComfyUI\models\checkpoints\sd15\NIJI-V5-sd-1.5_Niji-v5-sd-v2.safetensors} --port 8000 Traceback (most recent call last): File "D:\SD_AI\StreamMultiDiffusion\src\app.py", line 31, in import gradio as gr File "D:\SD_AI\ComfyUI_windows_portable\beiweijun\lib\site-packages\gradio__init.py", line 3, in import gradio._simple_templates File "D:\SD_AI\ComfyUI_windows_portable\beiweijun\lib\site-packages\gradio_simple_templates__init.py", line 1, in from .simpledropdown import SimpleDropdown File "D:\SD_AI\ComfyUI_windows_portable\beiweijun\lib\site-packages\gradio_simple_templates\simpledropdown.py", line 6, in from gradio.components.base import FormComponent File "D:\SD_AI\ComfyUI_windows_portable\beiweijun\lib\site-packages\gradio\components\init__.py", line 40, in from gradio.components.multimodal_textbox import MultimodalTextbox File "D:\SD_AI\ComfyUI_windows_portable\beiweijun\lib\site-packages\gradio\components\multimodal_textbox.py", line 28, in class MultimodalTextbox(FormComponent): File "D:\SD_AI\ComfyUI_windows_portable\beiweijun\lib\site-packages\gradio\component_meta.py", line 198, in new__ create_or_modify_pyi(component_class, name, events) File "D:\SD_AI\ComfyUI_windows_portable\beiweijun\lib\site-packages\gradio\component_meta.py", line 92, in create_or_modify_pyi source_code = source_file.read_text() File "C:\Users\yi\AppData\Local\Programs\Python\Python310\lib\pathlib.py", line 1135, in read_text return f.read() UnicodeDecodeError: 'gbk' codec can't decode byte 0xb2 in position 1972: illegal multibyte sequence

ironjr commented 5 months ago
  1. CUDA_VISIBLE_DEVICES=0 is required for Linux environment where you have multiple GPU devices. In a typical windows environment where you run the app with a single-GPU machine, I believe it is OK to just run without it.
  2. Would you try
python app.py --model "D:\SD_AI\ComfyUI_windows_portable\ComfyUI\models\checkpoints\sd15\NIJI-V5-sd-1.5_Niji-v5-sd-v2.safetensors" --height 512 --width 512 --port 8000

The braces should be removed in path.

I'll rewrite the installation section of README regarding the issue. Thanks for the reporting.

ironjr commented 5 months ago

I will close this issue for now. If you find any additional problem, feel free to reopen this issue.