media-gfx/comfyui - 0.46.0 (ruizhi-overlay)

Search

Install

Install this version:

emerge -a =media-gfx/comfyui-0.46.0

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =media-gfx/comfyui-0.46.0

Or alternatively:

emerge --autounmask-write -a =media-gfx/comfyui-0.46.0

Package Information

Description:
Modular diffusion model GUI, API and backend with a graph/nodes interface
Homepage:
https://www.comfy.org/ https://github.com/Comfy-Org/ComfyUI
License:
GPL-3

Ebuild Details

Version EAPI Keywords Slot
0.46.0 8 ~amd64 0
View Raw Ebuild
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{12..14} )
inherit python-single-r1

DESCRIPTION="Modular diffusion model GUI, API and backend with a graph/nodes interface"
HOMEPAGE="https://www.comfy.org/ https://github.com/Comfy-Org/ComfyUI"
SRC_URI="https://github.com/Comfy-Org/ComfyUI/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/ComfyUI-${PV}"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE="cuda rocm optional"
REQUIRED_USE="${PYTHON_REQUIRED_USE} ?? ( cuda rocm )"

RDEPEND="
	${PYTHON_DEPS}
	~dev-python/comfyui-embedded-docs-0.5.17[${PYTHON_SINGLE_USEDEP}]
	~dev-python/comfyui-frontend-package-1.59.6[${PYTHON_SINGLE_USEDEP}]
	~dev-python/comfyui-workflow-templates-0.11.111[${PYTHON_SINGLE_USEDEP}]
	~dev-python/comfy-aimdo-0.6.0[${PYTHON_SINGLE_USEDEP}]
	~dev-python/comfy-kitchen-0.2.41[cuda?,rocm?,${PYTHON_SINGLE_USEDEP}]
	$(python_gen_cond_dep '
		>=sci-ml/tokenizers-0.13.3[${PYTHON_USEDEP}]
	')
	sci-ml/torchsde[${PYTHON_SINGLE_USEDEP}]
	>=sci-ml/transformers-4.50.3[${PYTHON_SINGLE_USEDEP}]
	$(python_gen_cond_dep '
		dev-python/alembic[${PYTHON_USEDEP}]
		>=dev-python/aiohttp-3.11.8[${PYTHON_USEDEP}]
		>=dev-python/av-17.0.0[${PYTHON_USEDEP}]
		sci-ml/einops[${PYTHON_USEDEP}]
		>=dev-python/numpy-1.25.0[${PYTHON_USEDEP}]
		dev-python/psutil[${PYTHON_USEDEP}]
		>=dev-python/pillow-10.1.0[${PYTHON_USEDEP}]
		dev-python/pyyaml[${PYTHON_USEDEP}]
		>=sci-ml/safetensors-0.4.2[${PYTHON_USEDEP}]
		dev-python/scipy[${PYTHON_USEDEP}]
		sci-ml/sentencepiece[${PYTHON_USEDEP}]
		>=dev-python/sqlalchemy-2.0.0[${PYTHON_USEDEP}]
		dev-python/tqdm[${PYTHON_USEDEP}]
		>=dev-python/yarl-1.18.0[${PYTHON_USEDEP}]
		dev-python/filelock[${PYTHON_USEDEP}]
		dev-python/requests[${PYTHON_USEDEP}]
		>=dev-python/simpleeval-1.0.0[${PYTHON_USEDEP}]
		dev-python/blake3[${PYTHON_USEDEP}]
	')
	!cuda? ( !rocm? (
		>=sci-ml/pytorch-2.12.0[${PYTHON_SINGLE_USEDEP}]
		sci-ml/torchaudio[${PYTHON_SINGLE_USEDEP}]
		sci-ml/torchvision[${PYTHON_SINGLE_USEDEP}]
	) )
	$(python_gen_cond_dep '
		>=dev-python/pydantic-2.0.0[${PYTHON_USEDEP}]
		<dev-python/pydantic-3.0.0[${PYTHON_USEDEP}]
	')
	cuda? (
		>=sci-ml/pytorch-2.13[cuda,${PYTHON_SINGLE_USEDEP}]
		sci-ml/torchaudio[cuda,${PYTHON_SINGLE_USEDEP}]
		sci-ml/torchvision[cuda,${PYTHON_SINGLE_USEDEP}]
	)
	rocm? (
		>=sci-ml/pytorch-2.13[rocm,${PYTHON_SINGLE_USEDEP}]
		sci-ml/torchaudio[${PYTHON_SINGLE_USEDEP}]
		sci-ml/torchvision[rocm,${PYTHON_SINGLE_USEDEP}]
	)
	optional? (
		sci-ml/kornia[${PYTHON_SINGLE_USEDEP}]
		sci-ml/spandrel[${PYTHON_SINGLE_USEDEP}]
		$(python_gen_cond_dep '
			>=dev-python/pydantic-settings-2.0.0[${PYTHON_USEDEP}]
			<dev-python/pydantic-settings-3.0.0[${PYTHON_USEDEP}]
			>=dev-python/pyopengl-3.1.8[${PYTHON_USEDEP}]
		')
	)
"

src_install() {
	insinto "/usr/lib/${PN}"
	doins -r .

	cat > "${T}/${PN}" <<-EOF_LAUNCHER
	#!/bin/sh
	data_dir=\${XDG_DATA_HOME:-\${HOME}/.local/share}/comfyui
	mkdir -p "\${data_dir}" || exit 1
	exec ${EPYTHON} /usr/lib/${PN}/main.py --base-directory "\${data_dir}" "\$@"
	EOF_LAUNCHER
	dobin "${T}/${PN}"
}

pkg_postinst() {
	elog "ComfyUI has no authentication of its own. Do not expose its port (8188 by"
	elog "default) to the public internet: bind it to 127.0.0.1 with --listen"
	elog "127.0.0.1, and reach it over SSH port forwarding or a VPN."
	elog
	elog "This package installs upstream ComfyUI and its pinned asset packages only. It"
	elog "does not install ComfyUI-Manager or any custom node, because custom nodes are"
	elog "the main vector for turning an exposed instance into a cryptominer or worse."
	elog "Before installing one, check that it does not execute arbitrary input:"
	elog "nodes such as FL_CodeNode, SrlEval, EvaluateMultiple or any shell executor"
	elog "turn a workflow into remote code execution when a stranger can submit it."
	elog
	elog "If a node needs ultralytics, avoid 8.3.41 and 8.3.42: those PyPI releases"
	elog "shipped a crypto miner on Linux and macOS."
}

USE Flags

Manage flags for this package: euse -i <flag> -p media-gfx/comfyui | euse -E <flag> -p media-gfx/comfyui | euse -D <flag> -p media-gfx/comfyui

Global/Standard Flags

Inherited Eclasses

Dependencies

RDEPEND

	${PYTHON_DEPS}
	~dev-python/comfyui-embedded-docs-0.5.17[${PYTHON_SINGLE_USEDEP}]
	~dev-python/comfyui-frontend-package-1.59.6[${PYTHON_SINGLE_USEDEP}]
	~dev-python/comfyui-workflow-templates-0.11.111[${PYTHON_SINGLE_USEDEP}]
	~dev-python/comfy-aimdo-0.6.0[${PYTHON_SINGLE_USEDEP}]
	~dev-python/comfy-kitchen-0.2.41[cuda?,rocm?,${PYTHON_SINGLE_USEDEP}]
	$(python_gen_cond_dep '
		>=sci-ml/tokenizers-0.13.3[${PYTHON_USEDEP}]
	')
	sci-ml/torchsde[${PYTHON_SINGLE_USEDEP}]
	>=sci-ml/transformers-4.50.3[${PYTHON_SINGLE_USEDEP}]
	$(python_gen_cond_dep '
		dev-python/alembic[${PYTHON_USEDEP}]
		>=dev-python/aiohttp-3.11.8[${PYTHON_USEDEP}]
		>=dev-python/av-17.0.0[${PYTHON_USEDEP}]
		sci-ml/einops[${PYTHON_USEDEP}]
		>=dev-python/numpy-1.25.0[${PYTHON_USEDEP}]
		dev-python/psutil[${PYTHON_USEDEP}]
		>=dev-python/pillow-10.1.0[${PYTHON_USEDEP}]
		dev-python/pyyaml[${PYTHON_USEDEP}]
		>=sci-ml/safetensors-0.4.2[${PYTHON_USEDEP}]
		dev-python/scipy[${PYTHON_USEDEP}]
		sci-ml/sentencepiece[${PYTHON_USEDEP}]
		>=dev-python/sqlalchemy-2.0.0[${PYTHON_USEDEP}]
		dev-python/tqdm[${PYTHON_USEDEP}]
		>=dev-python/yarl-1.18.0[${PYTHON_USEDEP}]
		dev-python/filelock[${PYTHON_USEDEP}]
		dev-python/requests[${PYTHON_USEDEP}]
		>=dev-python/simpleeval-1.0.0[${PYTHON_USEDEP}]
		dev-python/blake3[${PYTHON_USEDEP}]
	')
	!cuda? ( !rocm? (
		>=sci-ml/pytorch-2.12.0[${PYTHON_SINGLE_USEDEP}]
		sci-ml/torchaudio[${PYTHON_SINGLE_USEDEP}]
		sci-ml/torchvision[${PYTHON_SINGLE_USEDEP}]
	) )
	$(python_gen_cond_dep '
		>=dev-python/pydantic-2.0.0[${PYTHON_USEDEP}]
		<dev-python/pydantic-3.0.0[${PYTHON_USEDEP}]
	')
	cuda? (
		>=sci-ml/pytorch-2.13[cuda,${PYTHON_SINGLE_USEDEP}]
		sci-ml/torchaudio[cuda,${PYTHON_SINGLE_USEDEP}]
		sci-ml/torchvision[cuda,${PYTHON_SINGLE_USEDEP}]
	)
	rocm? (
		>=sci-ml/pytorch-2.13[rocm,${PYTHON_SINGLE_USEDEP}]
		sci-ml/torchaudio[${PYTHON_SINGLE_USEDEP}]
		sci-ml/torchvision[rocm,${PYTHON_SINGLE_USEDEP}]
	)
	optional? (
		sci-ml/kornia[${PYTHON_SINGLE_USEDEP}]
		sci-ml/spandrel[${PYTHON_SINGLE_USEDEP}]
		$(python_gen_cond_dep '
			>=dev-python/pydantic-settings-2.0.0[${PYTHON_USEDEP}]
			<dev-python/pydantic-settings-3.0.0[${PYTHON_USEDEP}]
			>=dev-python/pyopengl-3.1.8[${PYTHON_USEDEP}]
		')
	)

Manifest for 0.46.0

Type File Size Source URLs
DIST comfyui-0.46.0.tar.gz 12979257 bytes https://github.com/Comfy-Org/ComfyUI/archive/refs/tags/v0.46.0.tar.gz