Skip to content
New issue

Have a question 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

You can suppress this exception and fall back to eager by setting: import torch._dynamo torch._dynamo.config.suppress_errors = True #89

Open
dernuiJK opened this issue Jan 19, 2025 · 4 comments

Comments

@dernuiJK
Copy link

backend='inductor' raised:
FileExistsError: [WinError 183] 当文件已存在时,无法创建该文件。: 'C:\ComfyUI-aki-v1.5\.cache\torchinductor\cache\.39736.31788.tmp' -> 'C:\ComfyUI-aki-v1.5\.cache\torchinductor\cache\150d0d4eac041d78fdac583d4bae4064be05cafb6726e1006b6752cdec55c1fb'

Set TORCH_LOGS="+dynamo" and TORCHDYNAMO_VERBOSE=1 for more information

You can suppress this exception and fall back to eager by setting:
import torch._dynamo
torch._dynamo.config.suppress_errors = True

I tried deleting the files in the cache, but it didn't work. Instead, it created the files and told me they already existed. I also tried updating triton, but it didn't work.

@brbbbq
Copy link

brbbbq commented Jan 19, 2025

I'm having the same issue. I deleted everything in the cache folder and restarted ComfyUI, but still getting the error. I was able to run the Compile Model+ node once ok, but now it's borked.

# ComfyUI Error Report
## Error Details
- **Node ID:** 104
- **Node Type:** KSampler
- **Exception Type:** torch._dynamo.exc.BackendCompilerFailed
- **Exception Message:** backend='inductor' raised:
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\Users\\user\\AppData\\Local\\Temp\\torchinductor_user\\cache\\.12708.17924.tmp' -> 'C:\\Users\\user\\AppData\\Local\\Temp\\torchinductor_user\\cache\\2c66a7ff7aea4c457cc71ff86bf5a784301c8c4da06839802cca1841420a9501'

Set TORCH_LOGS="+dynamo" and TORCHDYNAMO_VERBOSE=1 for more information


You can suppress this exception and fall back to eager by setting:
    import torch._dynamo
    torch._dynamo.config.suppress_errors = True

@alenknight
Copy link

i'm having this issue too.

@skystoler
Copy link

It might be torch's issue.
pytorch/pytorch#138211 and woct0rdho/triton-windows#10 might be helpful.

@brbbbq
Copy link

brbbbq commented Jan 24, 2025

It might be torch's issue. pytorch/pytorch#138211 and woct0rdho/triton-windows#10 might be helpful.

This worked for me. Specifically this post:
woct0rdho/triton-windows#10 (comment)

I opened this file \ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\_inductor\codecache.py

And replaced tmp_path.rename with tmp_path.replace

Thanks!

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

4 participants