XFormers Required, Added import_error_solution.txt

This commit is contained in:
ControlAltAI
2024-12-08 14:38:35 +05:30
parent 22dbba70eb
commit 9dc8c52782
2 changed files with 34 additions and 2 deletions
+12 -2
View File
@@ -1,3 +1,15 @@
print("\n\033[32mInitializing ControlAltAI Nodes\033[0m") # Fixed green reset
try:
import xformers
print("\n\033[94mControlAltAI: xformers found!\033[0m") # Light blue
except ImportError:
print("\n" + "="*70)
print("\033[94mCONTROLALTAI-NODES: XFORMERS REQUIRED\033[0m") # Light blue
print("\033[33mSome nodes in this custom node pack require xformers to function properly.") # Start orange
print("\nPlease check \"import_error_solution.txt\" in ComfyUI\\custom_nodes\\ControlAltAI-Nodes for how to install XFormers\033[0m") # End orange
print("="*70 + "\n")
raise ImportError("xformers is required for ControlAltAI Nodes")
from .flux_resolution_cal_node import FluxResolutionNode
from .flux_sampler_node import FluxSampler
from .flux_union_controlnet_node import FluxUnionControlNetApply
@@ -15,8 +27,6 @@ from .flux_attention_control_node import FluxAttentionControl
from .region_overlay_visualizer_node import RegionOverlayVisualizer
from .flux_attention_cleanup_node import FluxAttentionCleanup
print("Initializing ControlAltAI Nodes")
NODE_CLASS_MAPPINGS = {
"FluxResolutionNode": FluxResolutionNode,
"FluxSampler": FluxSampler,
+22
View File
@@ -0,0 +1,22 @@
XFormers is now needed for the flux region spatial control to work.
Go to your python_embeded folder and Check your pytorch and cuda version:
python.exe -c "import torch; print(torch.__version__)"
Please go to: https://github.com/facebookresearch/xformers/releases
Check for the latest Xformers version that is compatible with your installed Pytorch version.
You can Install the latest version of xformers using this command:
python.exe -m pip install xformers==PUTVERSIONHERE --index-url https://download.pytorch.org/whl/cuVERSION
example:
python.exe -m pip install xformers==0.0.28.post3 --index-url https://download.pytorch.org/whl/cu124
As of 8th December 2024:
Recommended:
xformers==0.0.28.post3
PyTorch 2.5.1
CUDA version: cu124 (for CUDA 12.4)