mirror of
https://github.com/Comfy-Org/desktop.git
synced 2026-11-04 23:47:43 +00:00
[GH-ISSUE #836] [Bug]: Reset virtual environment, #234
Labels
No labels
area: desktop-app
Bounty
bug
bug-cop:answered
bug-cop:response-received
component: installer
component: preload
custom node
dependencies
Design
documentation
duplicate
enhancement
expected
frontend
good first issue
installation
Low-Priority
performance
Planned
platform: cross-platform
platform: windows
Potential Bug
Potential Bug
pull-request
question
refactor
Release
stale
User Support
V1
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/desktop#234
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zefangfang on GitHub (Feb 6, 2025).
Original GitHub issue: https://github.com/Comfy-Org/desktop/issues/836
App Version
mac-0.4.16
Expected Behavior
Installation problem
Actual Behavior
Steps to Reproduce
Installation problem
Debug Logs
Browser Logs
Last login: Thu Feb 6 09:28:08 on ttys008
/Applications/ComfyUI.app/Contents/MacOS/ComfyUI ; exit;
wangzefang@administratordeMacBook-Air ~ % /Applications/ComfyUI.app/Contents/MacOS/ComfyUI ; exit;
09:28:18.621 › Starting app v0.4.16
09:28:18.624 › Initializing Sentry
09:28:18.654 › App already running. Exiting...
09:28:18.654 › Queueing event desktop:app_quit with properties {"reason":{},"exitCode":0}
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[进程已完成]
Setting JSON
/
Other
No response
┆Issue is synchronized with this Notion page by Unito
@ZY-Shou commented on GitHub (Feb 7, 2025):
Exactly the same situation to be resolved
@webfiltered commented on GitHub (Feb 7, 2025):
Hi there, can you please upload your
main.logfile? Log file locations can be found in the desktop user guide.@FREEWHEELINGZL commented on GitHub (Feb 7, 2025):
main.log

This is my main log from my ~/Library/Logs/ComfyUI
And I have the same question as well :
I uninstall ComfyUI Desktop yesterday but when I try to install it today, I cannot fix the problem.
@webfiltered commented on GitHub (Feb 7, 2025):
@FREEWHEELINGZL I can see a few errors in the logs.
This one is unfamiliar to me, which makes it seem like something is interfering with the UV configuration.
Do you have any
UVenvironment variables set? If you need a little more guidance on this, please don't hesitate to ask.The least-effort troubleshooting solution would be to reset your venv - you can do this by clicking the "All" filter at the top of the maintenance window, then running the
Reset Virtual Environmentoption and any follow-up tasks.@FREEWHEELINGZL commented on GitHub (Feb 8, 2025):
@webfiltered This solution doesn’t seem to work. When I click ‘recreate,’ I get a ‘任务错误(task error).’

I tried looking for solutions you told me on the top on other websites,I entered this line of code in the terminal.
conda install --solver=classic conda-forge::conda-libmamba-solver conda-forge::libmamba conda-forge::libmambapy conda-forge::libarchive“You can copy this link to see the website where I solved the problem.” https://stackoverflow.com/questions/77617946/solve-conda-libmamba-solver-libarchive-so-19-error-after-updating-conda-to-23
and now it seems that there are no more Conda-related error messages. main.log
However, when I click ‘recreate’ again, I still receive the ‘task error’ message.”
@zefangfang commented on GitHub (Feb 8, 2025):
日志.docx
@webfiltered commented on GitHub (Feb 8, 2025):
@FREEWHEELINGZL We're working on the issue that's resulting in a conflict with your conda setup. We do not use conda, so you should not be receiving conda errors. Whilst resolving them may work around an issue for you, it is not the underlying cause.
@zefangfang Apologies, I cannot open MS Word docs on this device. Are you able to upload the original log? If you need to include images, you can copy and paste them directly into the GitHub comment box - they will be uploaded.
@2019YKL commented on GitHub (Feb 8, 2025):
i have the same question
@Nick-chao-do commented on GitHub (Feb 8, 2025):
i have the same question too
@2019YKL commented on GitHub (Feb 9, 2025):
Since I can't install it on a Mac environment, I'm unable to figure out how to present the logs. It seems to be different from Windows.
My device is a MacBook Pro 16-inch, November 2023, with an Apple M3 Max chip.
@webfiltered commented on GitHub (Feb 9, 2025):
Hi all, 0.4.18 has been released!
Please let us know if you're still experiencing any issues after updating.
@2019YKL commented on GitHub (Feb 9, 2025):
Thank you very much for your reply. I have installed the latest version 0.4.18, and the issue has been resolved. I successfully deployed it.
@webfiltered commented on GitHub (Feb 9, 2025):
Great news! Thanks for letting us know! 😃
@FREEWHEELINGZL commented on GitHub (Feb 9, 2025):
The problem has been resolved on version 0.4.18.Thank you for your efforts so much!😄
@webfiltered commented on GitHub (Feb 9, 2025):
Awesome news - thank you, too!
@zefangfang commented on GitHub (Feb 10, 2025):
I installed version 0.4.18 and still had the same problem
当你运行一个故障排除命令时,任何输出都会在这里显示。/Applications/ComfyUI.app/Contents/Resources/uv/macos/uv "venv" "--python" "3.12"
echo "-end-1739152663046:$?"
administratordeMacBook-Air% /Applications/ComfyUI.app/Contents/Resources/uv/maco
s/uv "venv" "--python" "3.12"
x Failed to download
| https://github.com/astral-sh/python-build-standalone/releases/download/20250115/cpython-3.12.8%2B20250115-aarch64-apple-darwin-install_only_stripped.tar.gz
|-> Request failed after 3 retries
|-> error sending request for url
| (https://github.com/astral-sh/python-build-standalone/releases/download/20250115/cpython-3.12.8%2B20250115-aarch64-apple-darwin-install_only_stripped.tar.gz)
`-> operation timed out
administratordeMacBook-Air% echo "-end-1739152663046:$?"
_-end-1739152663046:1
@zefangfang commented on GitHub (Feb 10, 2025):
import comfy.options
comfy.options.enable_args_parsing()
import os
import importlib.util
import folder_paths
import time
from comfy.cli_args import args
from app.logger import setup_logger
import itertools
import utils.extra_config
import logging
if name == "main":
#NOTE: These do not do anything on core ComfyUI which should already have no communication with the internet, they are for custom nodes.
os.environ['HF_HUB_DISABLE_TELEMETRY'] = '1'
os.environ['DO_NOT_TRACK'] = '1'
setup_logger(log_level=args.verbose, use_stdout=args.log_stdout)
def apply_custom_paths():
# extra model paths
extra_model_paths_config_path = os.path.join(os.path.dirname(os.path.realpath(file)), "extra_model_paths.yaml")
if os.path.isfile(extra_model_paths_config_path):
utils.extra_config.load_extra_path_config(extra_model_paths_config_path)
def execute_prestartup_script():
def execute_script(script_path):
module_name = os.path.splitext(script_path)[0]
try:
spec = importlib.util.spec_from_file_location(module_name, script_path)
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
return True
except Exception as e:
logging.error(f"Failed to execute startup-script: {script_path} / {e}")
return False
apply_custom_paths()
execute_prestartup_script()
Main code
import asyncio
import shutil
import threading
import gc
if os.name == "nt":
logging.getLogger("xformers").addFilter(lambda record: 'A matching Triton is not available' not in record.getMessage())
if name == "main":
if args.cuda_device is not None:
os.environ['CUDA_VISIBLE_DEVICES'] = str(args.cuda_device)
os.environ['HIP_VISIBLE_DEVICES'] = str(args.cuda_device)
logging.info("Set cuda device to: {}".format(args.cuda_device))
if args.windows_standalone_build:
try:
from fix_torch import fix_pytorch_libomp
fix_pytorch_libomp()
except:
pass
import comfy.utils
import execution
import server
from server import BinaryEventTypes
import nodes
import comfy.model_management
import comfyui_version
def cuda_malloc_warning():
device = comfy.model_management.get_torch_device()
device_name = comfy.model_management.get_torch_device_name(device)
cuda_malloc_warning = False
if "cudaMallocAsync" in device_name:
for b in cuda_malloc.blacklist:
if b in device_name:
cuda_malloc_warning = True
if cuda_malloc_warning:
logging.warning("\nWARNING: this card most likely does not support cuda-malloc, if you get "CUDA error" please run ComfyUI with: --disable-cuda-malloc\n")
def prompt_worker(q, server_instance):
current_time: float = 0.0
e = execution.PromptExecutor(server_instance, lru_size=args.cache_lru)
last_gc_collect = 0
need_gc = False
gc_collect_interval = 10.0
async def run(server_instance, address='', port=8188, verbose=True, call_on_start=None):
addresses = []
for addr in address.split(","):
addresses.append((addr, port))
await asyncio.gather(
server_instance.start_multi_address(addresses, call_on_start, verbose), server_instance.publish_loop()
)
def hijack_progress(server_instance):
def hook(value, total, preview_image):
comfy.model_management.throw_exception_if_processing_interrupted()
progress = {"value": value, "max": total, "prompt_id": server_instance.last_prompt_id, "node": server_instance.last_node_id}
def cleanup_temp():
temp_dir = folder_paths.get_temp_directory()
if os.path.exists(temp_dir):
shutil.rmtree(temp_dir, ignore_errors=True)
def start_comfyui(asyncio_loop=None):
"""
Starts the ComfyUI server using the provided asyncio event loop or creates a new one.
Returns the event loop, server instance, and a function to start the server asynchronously.
"""
if args.temp_directory:
temp_dir = os.path.join(os.path.abspath(args.temp_directory), "temp")
logging.info(f"Setting temp directory to: {temp_dir}")
folder_paths.set_temp_directory(temp_dir)
cleanup_temp()
if name == "main":
# Running directly, just start ComfyUI.
logging.info("ComfyUI version: {}".format(comfyui_version.version))
event_loop, _, start_all_func = start_comfyui()
try:
event_loop.run_until_complete(start_all_func())
except KeyboardInterrupt:
logging.info("\nStopped server")
@webfiltered commented on GitHub (Feb 10, 2025):
@zefangfang Unfortunately this appears to be a network issue. ComfyUI is unable to reach github.com. If you try a clean uninstall and reinstall (see the desktop user guide), you should be able to choose a download mirror in the last step of installation.
@zefangfang commented on GitHub (Feb 10, 2025):
It has been solved. Thank you very much for your help. Best wishes
@webfiltered commented on GitHub (Feb 10, 2025):
Thanks for lettings us know! Glad it's all working!
@Nick-chao-do commented on GitHub (Feb 12, 2025):
When I activate the cursor, this happens, mac m1