triposr-texture-gen icon indicating copy to clipboard operation
triposr-texture-gen copied to clipboard

Please help

Open al3dv2 opened this issue 1 year ago • 4 comments

I have a error : (textureautovenv) (base) C:\pinokio\api\triposr.git\app>python text2texture.py .\output\catgirl.obj "catgirl"

processing mesh

computing UV atlas for 9999 triangles [Open3D INFO] actual parallel_partitions 3 saving depth map at output\mesh-preproc-depth.png

'C:\pinokio\api\triposr.git\app\depth_txt2img.py' catgirl 'output\mesh-preproc-depth.png' 'output\mesh-preproc-depth-paint.png' --steps 12 --image-model 'SG161222\Realistic_Vision_V5.1_noVAE' Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to initialize Python Python runtime state: preinitialized

Traceback (most recent call last): File "C:\pinokio\api\triposr.git\app\text2texture.py", line 329, in tmesh = text2texture( File "C:\pinokio\api\triposr.git\app\text2texture.py", line 258, in text2texture subprocess.run( File "C:\pinokio\bin\miniconda\lib\subprocess.py", line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['C:\pinokio\api\triposr.git\app\textureautovenv\Scripts\python.exe', 'C:\pinokio\api\triposr.git\app\depth_txt2img.py', 'catgirl', 'output\mesh-preproc-depth.png', 'output\mesh-preproc-depth-paint.png', '--steps', '12', '--image-model', 'SG161222\Realistic_Vision_V5.1_noVAE']' returned non-zero exit status 1.

al3dv2 avatar Mar 25 '24 03:03 al3dv2

Hm, haven't seen that one, I can look into it. If it happens to be related to Windows, though, I'm not sure when I will have a chance to test it cross-platform. So far I've just been developing on the Mac.

ejones avatar Apr 14 '24 15:04 ejones

I have this same error on Windows. If it's fixed this would prove incredibly helpful to the SD community - can I help you test it somehow?

albozes avatar May 01 '24 13:05 albozes

I was able to get one step further. Windows doesn't seem to like Python opening up an instance of itself, as described here.

To fix the error, I tried this in text2texture.py:

new_env = os.environ.copy()
subprocess.run(
    [sys.executable, *depth_paint_args],
    check=True,
    # env={'PYTORCH_ENABLE_MPS_FALLBACK': '1'},
    env=new_env,
)

It got me a little bit deeper in the process to a totally different error, so I think it may fix this particular Windows issue.

albozes avatar May 01 '24 14:05 albozes

same problem here! may i ask if there is any solution? Thanks a lot! @albozes @al3dv2 @ejones

Melo-Chen avatar Jul 13 '24 11:07 Melo-Chen