# GeekyRemB v4.0 Requirements # ============================= # Core dependencies numpy>=1.24.0 torch>=2.0.0 torchvision>=0.15.0 Pillow>=10.0.0 # Computer Vision opencv-python>=4.8.0 scikit-image>=0.21.0 scipy>=1.11.0 # Background Removal - Latest Models rembg>=2.0.57 onnxruntime>=1.16.0 # GPU Acceleration (uncomment if using GPU) onnxruntime-gpu>=1.16.0 # Image Processing Advanced kornia>=0.7.0 # Advanced computer vision operations albumentations>=1.3.0 # Image augmentation library # AI Model Integration transformers>=4.35.0 huggingface-hub>=0.17.0 # Performance and Utilities tqdm>=4.66.0 requests>=2.31.0 psutil>=5.9.0 # Memory monitoring # Data Handling dataclasses-json>=0.6.0 # Enhanced dataclass support # Optional: Enhanced Features # matplotlib>=3.8.0 # For debugging visualizations # imageio>=2.31.0 # Additional image I/O formats # ffmpeg-python>=0.2.0 # Video processing # tensorboard>=2.14.0 # Training visualization # Development Dependencies (uncomment for development) # pytest>=7.4.0 # black>=23.0.0 # Code formatting # flake8>=6.0.0 # Code linting # mypy>=1.6.0 # Type checking # Platform-specific optimizations # Intel processors: # intel-extension-for-pytorch>=2.0.0 # AMD ROCm support: # torch-audio-rocm>=2.0.0 # Apple Silicon optimization: # torch-audio>=2.0.0 # Additional AI Models (optional) # segment-anything>=1.0 # detectron2>=0.6 # Object detection # timm>=0.9.0 # Vision models # Note: Some packages may require specific versions based on your system # For best compatibility, use virtual environments: # python -m venv geeky_remb_env # source geeky_remb_env/bin/activate # Linux/Mac # geeky_remb_env\Scripts\activate # Windows # pip install -r requirements.txt

GeekyRemB v4.0 is a revolutionary image and video processing node suite that brings state-of-the-art AI models, professional compositing, advanced animation, and cutting-edge multimodal capabilities to ComfyUI. Built on the latest AI architectures including RMBG v2.0 with BiRefNet, it represents the pinnacle of background removal and video layering technology.
“`bash
cd ComfyUI/custom_nodes
git clone https://github.com/GeekyGhost/ComfyUI-GeekyRemB.git
cd ComfyUI-GeekyRemB
“`
“`bash
pip install -r requirements.txt
“`
“`bash
# For NVIDIA GPUs
pip install onnxruntime-gpu>=1.16.0
# For AMD ROCm
pip install torch-audio-rocm>=2.0.0
“`
For development or advanced users:
# Create virtual environment
python -m venv geeky_remb_env
source geeky_remb_env/bin/activate # Linux/Mac
# or: geeky_remb_env\Scripts\activate # Windows
# Install with optional features
pip install -r requirements.txt
pip install matplotlib imageio ffmpeg-python # Optional enhancements
Supported AI Models:
Advanced Features:
| Model | Best For | Performance | Quality | GPU Memory |
|——-|———-|————-|———|————|
| RMBG v2.0 (BiRefNet) | General use, highest quality | Medium | Excellent | 4-8GB |
| RMBG v1.4 (BRIA AI) | Professional workflows | Fast | Very Good | 2-4GB |
| BiRefNet Direct | Complex subjects, fine details | Slow | Excellent | 6-12GB |
| Advanced Chroma Key | Studio environments | Very Fast | Good | <1GB |
| Hybrid AI+Chroma | Mixed environments | Medium | Excellent | 4-6GB |
# High-quality portrait processing
removal_config = BackgroundRemovalConfig(
method=RemovalMethod.RMBG_V2,
model_precision="fp16",
processing_resolution=1024,
edge_feathering=3.0,
remove_small_objects=True,
anti_aliasing=True
)
# Speed-optimized processing
removal_config = BackgroundRemovalConfig(
method=RemovalMethod.RMBG_V1_4,
processing_resolution=512,
batch_size=4,
use_gpu_acceleration=True
)
# Professional chroma key
removal_config = BackgroundRemovalConfig(
method=RemovalMethod.CHROMA_KEY,
chroma_color="green",
tolerance=0.15,
spill_suppression=0.9,
edge_feathering=2.0
)
Movement Animations:
slide_left, slide_right, slide_up, slide_down, slide_diagonalorbit_circular, spiral_in, bounce_in, bounce_outTransform Animations:
scale_in, scale_out, scale_pulserotate_clockwise, rotate_counter_clockwiseflip_horizontal, flip_verticalSpecial Effects:
fade_in, fade_out, fade_pulseelastic_in, elastic_outshake_subtle, wobbleProfessional easing for natural motion:
ease_in_quad, ease_out_quad, ease_in_out_quad# Smooth bounce animation
animation_config = AnimationConfig(
animation_type=AnimationType.BOUNCE_IN,
duration=2.0,
easing=EasingFunction.EASE_OUT_BOUNCE,
amplitude=150.0,
frequency=1.0,
loop_count=3,
ping_pong=True
)
# Complex orbital motion
animation_config = AnimationConfig(
animation_type=AnimationType.ORBIT_CIRCULAR,
duration=4.0,
easing=EasingFunction.SINE_IN_OUT,
amplitude=200.0,
frequency=2.0,
start_delay=0.5
)
| Blend Mode | Effect | Best For |
|————|——–|———-|
| Normal | Standard overlay | General compositing |
| Multiply | Darkening effect | Creating shadows, depth |
| Screen | Lightening effect | Adding highlights, glow |
| Overlay | Contrast enhancement | Dramatic effects |
| Soft Light | Subtle lighting | Natural lighting effects |
| Hard Light | Strong contrast | Bold, dramatic looks |
| Color Dodge/Burn | Extreme lighting | Special effects |
| Darken/Lighten | Selective blending | Texture blending |
| Difference | Inversion effects | Abstract, artistic looks |
# Professional drop shadow
blend_config = BlendingConfig(
blend_mode=BlendMode.NORMAL,
opacity=0.9,
drop_shadow=True,
shadow_offset_x=8.0,
shadow_offset_y=12.0,
shadow_blur=15.0,
shadow_opacity=0.6,
shadow_color=(0, 0, 0)
)
# Cinematic lighting effect
blend_config = BlendingConfig(
blend_mode=BlendMode.SOFT_LIGHT,
opacity=0.8,
preserve_luminosity=True,
knock_out=False
)
GeekyRemB v4.0 introduces cutting-edge multimodal capabilities:
# Multimodal content analysis
result = multimodal_processor.process_multimodal(
processing_mode="analysis",
image=input_image,
audio_path="audio_track.wav",
text_prompt="Analyze the emotional content",
modality_weights={"vision": 0.4, "audio": 0.4, "text": 0.2}
)
# Cross-modal generation
result = multimodal_processor.process_multimodal(
processing_mode="generation",
text_prompt="A serene sunset over calm waters",
reference_style=style_image,
quality_target="cinema",
output_modalities="all"
)
# Input: Portrait photo with complex background
# Output: Clean subject with transparent background
workflow = {
"nodes": {
"1": {
"class_type": "GeekyRemB",
"inputs": {
"foreground": ["load_image", 0],
"skip_background_removal": False,
"removal_method": "rmbg_v2_birefnet",
"processing_resolution": 1024,
"mask_blur": 1.5,
"edge_feathering": 3.0,
"remove_small_objects": True
}
}
}
}
# Create a cinematic character entrance with lighting
workflow = {
"character_removal": {
"removal_method": "birefnet_zhengpeng7",
"quality_target": "cinema",
"edge_feathering": 2.0
},
"animation": {
"animation_type": "slide_right",
"duration": 3.0,
"easing": "ease_out_cubic",
"amplitude": 400.0
},
"lighting": {
"enable_lighting": True,
"light_direction_x": -100,
"light_direction_y": -150,
"light_intensity": 0.8,
"enable_shadow": True,
"shadow_opacity": 0.4
},
"composition": {
"blend_mode": "soft_light",
"position_mode": "center",
"scale_x": 1.2,
"scale_y": 1.2
}
}
# Process video with multiple subjects and complex backgrounds
workflow = {
"batch_processing": {
"total_frames": 120,
"video_fps": 24.0,
"removal_method": "hybrid_ai_chroma",
"batch_processing": True
},
"optimization": {
"use_gpu_acceleration": True,
"processing_resolution": 720,
"thread_count": 8
},
"output": {
"video_format": "mp4",
"quality": "high",
"maintain_frame_consistency": True
}
}
# Create complex keyframe-based animation sequence
keyframes = [
{
"frame": 0,
"x_position": -200,
"y_position": 0,
"scale": 0.8,
"rotation": 0,
"opacity": 0.0
},
{
"frame": 30,
"x_position": 0,
"y_position": -50,
"scale": 1.0,
"rotation": 15,
"opacity": 1.0
},
{
"frame": 60,
"x_position": 150,
"y_position": 0,
"scale": 1.1,
"rotation": 0,
"opacity": 0.9
},
{
"frame": 90,
"x_position": 0,
"y_position": 0,
"scale": 1.0,
"rotation": 0,
"opacity": 1.0
}
]
animation_config = {
"use_keyframes": True,
"easing_function": "ease_in_out_cubic",
"total_frames": 90,
"fps": 30
}
GeekyRemB v4.0 includes intelligent memory management for various GPU configurations:
| GPU Memory | Recommended Settings | Performance |
|————|———————|————-|
| 1-2GB | LOW_VRAM mode, 512px resolution | Basic processing |
| 4-6GB | NORMAL_VRAM mode, 1024px resolution | Good performance |
| 8-12GB | HIGH_VRAM mode, 1536px resolution | Optimal performance |
| 16GB+ | Maximum settings, 2048px+ resolution | Maximum quality |
# For 4GB GPU
optimization_config = {
"processing_resolution": 1024,
"batch_size": 2,
"use_gpu_acceleration": True,
"model_precision": "fp16",
"memory_management": "NORMAL_VRAM"
}
# For 16GB+ GPU
optimization_config = {
"processing_resolution": 2048,
"batch_size": 8,
"use_gpu_acceleration": True,
"model_precision": "fp32",
"memory_management": "HIGH_VRAM",
"enable_model_caching": True
}
# CPU-optimized (no GPU)
optimization_config = {
"processing_resolution": 512,
"batch_size": 1,
"use_gpu_acceleration": False,
"thread_count": 8,
"memory_management": "CPU_ONLY"
}
GeekyRemBv4The main processing node with comprehensive background removal and compositing capabilities.
Key Parameters:
removal_method: Choose AI model or chroma key methodprocessing_resolution: Balance quality vs. performanceanimation_type: Select from 20+ animation typesblend_mode: Professional compositing modesposition_mode: Flexible positioning systemBackgroundRemovalConfigAdvanced configuration for background removal algorithms.
config = BackgroundRemovalConfig(
method=RemovalMethod.RMBG_V2,
model_precision="fp16",
batch_size=4,
chroma_color="green",
tolerance=0.15,
spill_suppression=0.9,
edge_feathering=3.0,
processing_resolution=1024,
anti_aliasing=True
)
AnimationConfigProfessional animation control system.
config = AnimationConfig(
animation_type=AnimationType.BOUNCE_IN,
duration=2.0,
easing=EasingFunction.EASE_OUT_BOUNCE,
amplitude=100.0,
frequency=1.0,
loop_count=3,
ping_pong=True
)
PositionConfigComprehensive positioning and transform system.
config = PositionConfig(
mode=PositionMode.CUSTOM_ANCHOR,
x_offset=100.0,
y_offset=-50.0,
anchor_x=0.5,
anchor_y=0.3,
scale_x=1.2,
scale_y=1.0,
rotation=15.0,
flip_horizontal=False
)
Supported Input Types:
IMAGE: Standard ComfyUI image tensorsSTRING: Text prompts and file pathsFLOAT: Numerical parameters with validationINT: Integer values with range checkingBOOLEAN: Toggle switches for featuresOutput Types:
IMAGE: Processed image sequencesMASK: Generated alpha masksSTRING: Processing metadata and logsFLOAT: Confidence scores and metricsProblem: Poor edge quality or missed details
Solutions:
alpha_matting for fine details like hairedge_feathering (2.0-5.0 for complex edges)processing_resolution to 1024 or higheranti_aliasing for smoother edgesProblem: Slow processing or out-of-memory errors
Solutions:
processing_resolution (try 512px)LOW_VRAM mode in settingsbatch_size to 1-2Problem: Jerky or incorrect animations
Solutions:
fps setting matches your target frame rateframe_number values are in correct sequenceeasing_function is appropriate for animation typetotal_frames encompasses all keyframesProblem: Frame inconsistency or export failures
Solutions:
batch_processing for video sequencesvideo_fps matches source materialProblem: Color spill or incomplete removal
Solutions:
tolerance (start with 0.15, increase gradually)spill_suppression (0.7-0.9)edge_feathering (2.0-5.0)hybrid_ai_chroma method for difficult scenariosEnable debug logging for detailed troubleshooting:
import logging
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)
Minimum Requirements:
Recommended:
Optimal:
We welcome contributions from the community! Please see our Contributing Guidelines for details on:
# Clone repository
git clone https://github.com/GeekyGhost/ComfyUI-GeekyRemB.git
cd ComfyUI-GeekyRemB
# Create development environment
python -m venv dev_env
source dev_env/bin/activate
# Install development dependencies
pip install -r requirements.txt
pip install pytest black flake8 mypy
# Run tests
pytest tests/
# Code formatting
black --check scripts/
flake8 scripts/
mypy scripts/
This project is licensed under the MIT License. See LICENSE for details.
Note: Some AI models may have separate licensing requirements for commercial use. Please review individual model licenses.
GeekyRemB v4.0 builds upon exceptional open-source projects:
GeekyRemB v4.0 – Pushing the boundaries of what’s possible in AI-powered image and video processing.
*Made with ❤️ by GeekyGhost and the open-source community.*