8000 Import Failed on windows. · Issue #4 · Yuan-ManX/ComfyUI-Step1X-3D · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Import Failed on windows. #4

New issue

Have a ques 8000 tion 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

Open
NegInfinity opened this issue May 20, 2025 · 1 comment
Open

Import Failed on windows. #4

NegInfinity opened this issue May 20, 2025 · 1 comment

Comments

@NegInfinity
Copy link
NegInfinity commented May 20, 2025

I've spent some time trying to get it to run on windows - using portable ComfyUI and venv-based comfyui with no luck.

Import fails with this sort of message:

  File "C:\Imggen\ComfyUI-venv\ComfyUI\nodes.py", line 2131, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 999, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "C:\Imggen\ComfyUI-venv\ComfyUI\custom_nodes\ComfyUI-Step1X-3D\__init__.py", line 1, in <module>
    from .nodes import LoadStep1X3DGeometryModel, LoadStep1X3DGeometryLabelModel, LoadStep1X3DTextureModel, LoadInputImage, GeometryGeneration, GeometryLabelGeneration, LoadUntexturedMesh, TexureSynthsis, SaveUntexturedMesh, SaveTexturedMesh
  File "C:\Imggen\ComfyUI-venv\ComfyUI\custom_nodes\ComfyUI-Step1X-3D\nodes.py", line 8, in <module>
    from step1x3d_texture.pipelines.step1x_3d_texture_synthesis_pipeline import (
ModuleNotFoundError: No module named 'step1x3d_texture'

Looking through the code the problem seems to stem from modules trying to import their parents. For example, ComfyUI-Step1X-3D/step1x3d_texture/pipelines/step1x_3d_texture_synthesis_pipeline.py tries to import from step1x3d_texture which is its parent. It happens here:

from step1x3d_texture.models.attention_processor import (
    DecoupledMVRowColSelfAttnProcessor2_0,
)

And import is done without specifying relative path. step1x3d_texture exists 2 or 3 levels above synthesis_pipeline, it is not one of the search paths, so import fails.

Trying to switch all import statements to relative addressing ultimately fails when some of the files within step1x3d use decorators.

@step1x3d_geometry.register("michelangelo-autoencoder")

Would be nice if this got fixed. Surely the author of the custom node ran this somehow so it should work. But it doesn't.

Windows scripts I used to init comfyui:

init-venv.bat (step1):


py -3.12 -m venv venv

set ACT = %~dp0venv/Scripts/activate.bat
set DEACT = %~dp0venv/Scripts/deactivate.bat

call %ACT%

python --version

call %DEACT%

run1.bat (step2):


set VENV="%~dp0venv"
set START_VENV="%VENV%\Scripts\activate.bat"
set STOP_VENV="%VENV%\Scripts\deactivate.bat"

call %START_VENV%

python --version

python -m pip install --upgrade pip

pip install egg wheel

pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu124

cd ComfyUI

pip install -r requirements.txt

pip install torch-cluster -f https://data.pyg.org/whl/torch-2.5.1+cu124.html

call %STOP_VENV%

init-step1.bat (step3):


set VENV="%~dp0venv"
set START_VENV="%VENV%\Scripts\activate.bat"
set STOP_VENV="%VENV%\Scripts\deactivate.bat"

call %START_VENV%

cd ComfyUI\custom_nodes 

if not exist ComfyUI-Step1X-3D (
	git clone https://github.com/Yuan-ManX/ComfyUI-Step1X-3D.git
)

cd ComfyUI-Step1X-3D

pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu124
pip install -r requirements.txt
pip install torch-cluster -f https://data.pyg.org/whl/torch-2.5.1+cu124.html

cd step1x3d_texture/custom_rasterizer
python setup.py install
cd ../differentiable_renderer
python setup.py install
call %STOP_VENV%

run2.bat (step4, running the environment):


set VENV="%~dp0venv"
set START_VENV="%VENV%\Scripts\activate.bat"
set STOP_VENV="%VENV%\Scripts\deactivate.bat"

call %START_VENV%

python -s ComfyUI\main.py --windows-standalone-build

call %STOP_VENV%

Image

@doudoumei
Copy link

我也是相同的报错

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
0