### Install Python Packages for Installer Source: https://github.com/sakalond/stablegen/blob/main/README.md Install the required Python packages for the installer script using pip. Ensure you have Python 3 and pip available. ```bash pip install requests tqdm ``` -------------------------------- ### Install Triton for Windows Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Installs the Triton library, specifically for Windows users. This is an optional step. ```bash pip install triton-windows ``` -------------------------------- ### Install StableGen Blender Plugin Source: https://github.com/sakalond/stablegen/blob/main/README.md Install the StableGen Blender addon by downloading the zip file from the releases page and installing it through Blender's Add-on preferences. ```bash Unzip StableGen.zip and install via Blender's Add-on preferences. ``` -------------------------------- ### Run the Automated Installer Script Source: https://github.com/sakalond/stablegen/blob/main/README.md Execute the installer script to download and place ComfyUI custom nodes and AI models. Provide your ComfyUI directory path as an argument or be prompted. ```bash python installer.py ``` -------------------------------- ### Install Marigold Dependencies Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Installs the required Python packages for the Marigold custom node. Ensure you are in the ComfyUI-Marigold directory before running. ```bash cd ComfyUI-Marigold pip install -r requirements.txt pip install "diffusers>=0.28" ``` -------------------------------- ### Install ComfyUI IPAdapter Flux Node Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Clone the ComfyUI IPAdapter Flux custom node repository into your custom_nodes directory. Restart ComfyUI after installation. ```bash cd /custom_nodes/ git clone https://github.com/Shakker-Labs/ComfyUI-IPAdapter-Flux.git ``` -------------------------------- ### Install TRELLIS2 Dependencies Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Install the Python dependencies required by the ComfyUI-TRELLIS2 custom node using the provided requirements file. ```bash pip install -r requirements.txt ``` -------------------------------- ### Install comfy-env Dependency Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Install the specific version of the comfy-env package required by ComfyUI-TRELLIS2. ```bash pip install comfy-env==0.2.0 ``` -------------------------------- ### Get ComfyUI VRAM Statistics Source: https://context7.com/sakalond/stablegen/llms.txt Retrieves free and total VRAM information from the ComfyUI server by querying the /system_stats endpoint. ```python import urllib.request import json # ComfyUI server configuration (set in addon preferences) server_address = "127.0.0.1:8188" # Get VRAM statistics def get_vram_stats(server_address): req = urllib.request.Request( f"http://{server_address}/system_stats", method='GET' ) resp = json.loads(urllib.request.urlopen(req, timeout=10).read()) dev = resp.get("devices", [{}])[0] vram_free = dev.get("vram_free", 0) / (1024 * 1024) vram_total = dev.get("vram_total", 0) / (1024 * 1024) return vram_free, vram_total ``` -------------------------------- ### Check ComfyUI Server Status Source: https://context7.com/sakalond/stablegen/llms.txt Verifies if the ComfyUI server is reachable by making a GET request to the /system_stats endpoint. ```python import urllib.request import json # ComfyUI server configuration (set in addon preferences) server_address = "127.0.0.1:8188" # Check server status def check_server_alive(server_address, timeout=5): try: req = urllib.request.Request( f"http://{server_address}/system_stats", method='GET' ) urllib.request.urlopen(req, timeout=timeout) return True except Exception: return False ``` -------------------------------- ### Download SDXL Lighting LoRA Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Download the SDXL Lighting 8-step LoRA model, which is necessary for default presets and recommended for faster generation. ```bash wget -O /models/loras/sdxl_lightning_8step_lora.safetensors "https://huggingface.co/ByteDance/SDXL-Lightning/resolve/main/sdxl_lightning_8step_lora.safetensors?download=true" ``` -------------------------------- ### Download IPAdapter Model Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Download the core IPAdapter model for SDXL. Ensure it is placed in the correct directory and named precisely as specified. ```bash wget -O /models/ipadapter/ip-adapter-plus_sdxl_vit-h.safetensors "https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter-plus_sdxl_vit-h.safetensors?download=true" ``` -------------------------------- ### Enable and Configure PBR Decomposition Source: https://context7.com/sakalond/stablegen/llms.txt Enables the PBR decomposition pipeline and sets various parameters for resolution, denoising, albedo extraction, tiling, and emission detection. ```python import bpy scene = bpy.context.scene # Enable PBR decomposition scene.pbr_decomposition = True # Resolution and quality settings scene.pbr_processing_resolution = 768 # Base resolution for processing scene.pbr_use_native_resolution = True # Use source image resolution scene.pbr_denoise_steps = 4 # Denoising iterations scene.pbr_ensemble_size = 1 # Ensemble averaging count # Albedo extraction settings scene.pbr_albedo_source = 'delight' # 'delight' or 'direct' scene.pbr_delight_strength = 1.0 # Delighting intensity scene.pbr_albedo_auto_saturation = False # Auto saturation correction scene.pbr_albedo_saturation_mode = 'MEDIAN' # 'MEDIAN', 'MEAN', etc. # Tiling for high-resolution outputs scene.pbr_tiling = 'selective' # 'off', 'selective', 'all', 'custom' scene.pbr_tile_grid = 2 # 2x2 tiling scene.pbr_tile_superres = False # Superresolution upscaling # Per-map tiling (when pbr_tiling='custom') scene.pbr_tile_albedo = True scene.pbr_tile_material = False # Roughness/metallic scene.pbr_tile_normal = False scene.pbr_tile_height = False scene.pbr_tile_emission = False # Emission detection settings scene.pbr_emission_method = 'residual' # 'residual' or 'hsv' scene.pbr_emission_threshold = 0.2 # For HSV method: scene.pbr_emission_saturation_min = 0.5 scene.pbr_emission_value_min = 0.85 scene.pbr_emission_bloom = 5.0 ``` -------------------------------- ### Download and Rename ControlNet Depth Model Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Download the ControlNet Depth model for SDXL. This model is crucial for StableGen presets. Rename the downloaded file to match the target filename. ```bash wget -O /models/controlnet/controlnet_depth_sdxl.safetensors "https://huggingface.co/xinsir/controlnet-depth-sdxl-1.0/resolve/main/diffusion_pytorch_model.safetensors?download=true" ``` -------------------------------- ### Configure Sequential Mode and Texture Generation Source: https://context7.com/sakalond/stablegen/llms.txt Set parameters for sequential generation, including blending, IPAdapter usage, and execute texture generation. Use 'regenerate_selected' for specific viewpoints or 'stablegen_reproject' for reprojecting existing images. ```python scene.sequential_smooth = True scene.sequential_factor = 0.7 # Blend with previous views scene.sequential_ipadapter = True # Use IPAdapter for style scene.sequential_ipadapter_mode = 'first' # Reference first generated image # IPAdapter settings scene.ipadapter_weight_type = 'style' scene.ipadapter_strength = 1.0 scene.ipadapter_start = 0.0 scene.ipadapter_end = 1.0 # Execute texture generation bpy.ops.object.test_stable() # For regenerating specific viewpoints only scene.generation_mode = 'regenerate_selected' bpy.ops.object.stablegen_regenerate() # For reprojecting existing images with new blend settings bpy.ops.object.stablegen_reproject() ``` -------------------------------- ### Download Additional SDXL Lightning LoRA Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Download the SDXL Lightning 4-step LoRA model. Place it in the 'loras' directory without renaming. ```bash wget -O /models/loras/sdxl_lightning_4step_lora.safetensors "https://huggingface.co/ByteDance/SDXL-Lightning/resolve/main/sdxl_lightning_4step_lora.safetensors?download=true" ``` -------------------------------- ### Download StableDelight Model using huggingface_hub Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Downloads the StableDelight model using the huggingface_hub Python library. Specify the correct local directory for ComfyUI models. ```python from huggingface_hub import snapshot_download snapshot_download('Stable-X/yoso-delight-v0-4-base', local_dir='/models/diffusers/Stable-X--yoso-delight-v0-4-base') ``` -------------------------------- ### Configure Texture Generation Parameters Source: https://context7.com/sakalond/stablegen/llms.txt Sets up parameters for texture generation using ComfyUI, including model architecture, generation method, sampling settings, and prompts. Configure visibility and blending parameters. ```python import bpy # Set up generation parameters scene = bpy.context.scene # Model and workflow settings scene.model_architecture = 'sdxl' # 'sdxl', 'flux1', 'qwen_image_edit', 'flux2_klein' scene.generation_method = 'sequential' # 'grid', 'separate', 'sequential', 'uv_inpaint', 'local_edit' scene.steps = 8 scene.cfg = 1.5 scene.sampler = 'dpmpp_2s_ancestral' scene.scheduler = 'sgm_uniform' # Prompt configuration scene.prompt = "a medieval stone castle with moss-covered walls" scene.negative_prompt = "blurry, low quality, artifacts" # Visibility and blending settings scene.discard_factor = 90.0 # Angle threshold for visibility scene.weight_exponent = 3.0 # Blending weight power scene.differential_diffusion = True # Smooth mask transitions scene.blur_mask = True scene.blur_mask_radius = 1 scene.grow_mask_by = 3 # Expand mask for overlap ``` -------------------------------- ### Configure TRELLIS.2 Mesh Generation Source: https://context7.com/sakalond/stablegen/llms.txt Set up input, generation parameters, shape, and texture settings for the TRELLIS.2 operator. This includes resolution, VRAM mode, guidance, steps, and post-processing options like decimation and background removal. Execute mesh generation with bpy.ops.object.trellis2_generate(). ```python import bpy scene = bpy.context.scene # Input configuration scene.trellis2_generate_from = 'image' # 'image' or 'prompt' scene.trellis2_input_image = "/path/to/reference.png" scene.trellis2_prompt = "a cute robot character" # Used when generate_from='prompt' # Generation parameters scene.trellis2_resolution = '1024_cascade' # Resolution mode scene.trellis2_vram_mode = 'disk_offload' # VRAM management scene.trellis2_attn_backend = 'flash_attn' # Attention implementation # Shape generation settings scene.trellis2_ss_guidance = 7.5 # Sparse structure guidance scene.trellis2_ss_steps = 12 # Sparse structure steps scene.trellis2_shape_guidance = 7.5 # Shape refinement guidance scene.trellis2_shape_steps = 12 # Shape refinement steps # Texture settings (native TRELLIS texture or external pipeline) scene.trellis2_texture_mode = 'sdxl' # 'none', 'native', 'sdxl', 'qwen_image_edit', 'flux2_klein' scene.trellis2_tex_guidance = 7.5 scene.trellis2_tex_steps = 12 scene.trellis2_texture_size = 4096 # Output texture resolution # Post-processing scene.trellis2_decimation = 1000000 # Max polygon count scene.trellis2_remesh = True # Apply remeshing scene.trellis2_bg_removal = 'auto' # Background removal mode scene.trellis2_import_scale = 2.0 # Import scale factor # Camera placement for texturing phase scene.trellis2_camera_count = 10 scene.trellis2_placement_mode = 'normal_weighted' scene.trellis2_auto_prompts = True scene.trellis2_exclude_bottom = True scene.trellis2_auto_aspect = 'per_camera' # Execute mesh generation bpy.ops.object.trellis2_generate() ``` -------------------------------- ### Download Qwen 3 4B Text Encoder Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Provides the direct download URL for the Qwen 3 4B text encoder (bf16). Save this file to the specified ComfyUI text encoders directory. ```bash Download URL: https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors?download=true ``` -------------------------------- ### Configure Qwen Image Edit Settings in Blender Source: https://context7.com/sakalond/stablegen/llms.txt Set up various parameters for Qwen Image Edit models, including generation method, context render mode, guidance maps, custom prompts, and cleanup options. Ensure correct model architecture is selected. ```python import bpy scene = bpy.context.scene # Qwen-specific settings scene.model_architecture = 'qwen_image_edit' scene.qwen_generation_method = 'generate' # 'generate', 'local_edit', 'refine' # Context render mode - how previous textures are incorporated scene.qwen_context_render_mode = 'REPLACE_STYLE' # 'NONE', 'REPLACE_STYLE', 'ADDITIONAL' # Guidance map settings scene.qwen_guidance_map_type = 'depth' scene.qwen_guidance_fallback_color = (1.0, 0.0, 1.0) # Magenta for untextured areas scene.qwen_guidance_background_color = (1.0, 0.0, 1.0) # Custom prompts (when qwen_use_custom_prompts=True) scene.qwen_use_custom_prompts = False scene.qwen_custom_prompt_initial = "Change the format of image 1 to '{main_prompt}'" scene.qwen_custom_prompt_seq_none = "Change and transfer the format of '{main_prompt}' in image 1 to the style from image 2" scene.qwen_custom_prompt_seq_replace = "Change and transfer the format of image 1 to '{main_prompt}'. Replace all solid magenta areas in image 2." # Context cleanup - remove residual fallback colors scene.qwen_context_cleanup = False scene.qwen_context_cleanup_hue_tolerance = 0.0 scene.qwen_context_cleanup_value_adjust = 0.0 scene.qwen_context_fallback_dilation = 1 # Other Qwen options scene.qwen_prompt_gray_background = True scene.qwen_rescale_alignment = True # Align to 112-pixel boundaries scene.qwen_voronoi_mode = False # Hard camera segmentation scene.qwen_use_external_style_image = False scene.qwen_external_style_image = "" # Path to style reference ``` -------------------------------- ### Add Cameras with Fan from Camera Placement Source: https://context7.com/sakalond/stablegen/llms.txt Places cameras in a fan arc around the active camera's position. Specify the number of cameras and the fan angle. ```python import bpy # Fan from Camera - arc around active camera position bpy.ops.object.add_cameras( placement_mode='fan_from_camera', num_cameras=5, fan_angle=90.0 # 90 degree arc spread ) ``` -------------------------------- ### Apply StableGen Presets Source: https://context7.com/sakalond/stablegen/llms.txt Utilize the preset system to quickly configure generation parameters for various use cases. Assign a preset name to scene.stablegen_preset to apply its settings. ```python import bpy from stablegen.ui.presets import PRESETS, apply_preset # Available presets include: # "DEFAULT" - General purpose SDXL generation # "CHARACTERS" - Optimized for character texturing with IPAdapter # "ARCHITECTURE" - High weight exponent for flat surfaces # "QUICK DRAFT" - Fast 4-step generation for previews # "UV INPAINTING" - For filling untextured UV regions # "QWEN PRECISE" - Qwen Image Edit with context renders # "QWEN SAFE" - Qwen with previous view reference for consistency # "QWEN VORONOI" - Hard camera segmentation during generation # "KLEIN PRECISE/SAFE/ALT" - FLUX.2 Klein variants # "LOCAL REFINE" - SDXL local edit for specific areas # "LOCAL EDIT (QWEN)" - Targeted edits with Qwen # "DEFAULT (MESH + TEXTURE)" - Full TRELLIS.2 + SDXL pipeline # "CHARACTERS (MESH + TEXTURE)" - TRELLIS.2 optimized for characters # "QWEN PRECISE (MESH + TEXTURE)" - TRELLIS.2 + Qwen pipeline # Apply a preset scene = bpy.context.scene scene.stablegen_preset = "CHARACTERS" # Presets contain settings like: preset = PRESETS["CHARACTERS"] # preset["model_architecture"] = "sdxl" # preset["generation_method"] = "sequential" # preset["steps"] = 8 # preset["cfg"] = 1.5 # preset["sequential_ipadapter"] = True # preset["discard_factor"] = 80.0 # preset["weight_exponent"] = 3.0 # preset["controlnet_units"] = [...] # preset["lora_units"] = [...] ``` -------------------------------- ### Import bpy, bmesh, numpy, and BVHTree Source: https://context7.com/sakalond/stablegen/llms.txt Imports necessary libraries for Blender scripting, including bmesh for mesh manipulation, numpy for numerical operations, and BVHTree for spatial queries. ```python import bpy import bmesh import numpy as np from mathutils.bvhtree import BVHTree ``` -------------------------------- ### Download FLUX.2 Klein Diffusion Model Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Provides the direct download URL for the FLUX.2 Klein base diffusion model (FP8). Save this file to the specified ComfyUI models directory. ```bash Download URL: https://huggingface.co/black-forest-labs/FLUX.2-klein-base-4b-fp8/resolve/main/flux-2-klein-base-4b-fp8.safetensors?download=true ``` -------------------------------- ### Download FLUX.2 VAE Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Provides the direct download URL for the FLUX.2 VAE. Save this file to the specified ComfyUI VAE directory. ```bash Download URL: https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors?download=true ``` -------------------------------- ### Download and Rename IPAdapter CLIP Vision Model 2 Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Download the second CLIP Vision model required for IPAdapter. Rename the downloaded file to the specified target filename. ```bash wget -O /models/clip_vision/CLIP-ViT-bigG-14-laion2B-39B-b160k.safetensors "https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/image_encoder/model.safetensors" ``` -------------------------------- ### Configure LoRA Units Source: https://context7.com/sakalond/stablegen/llms.txt Sets up LoRA units with model names and strengths for both the model and CLIP components. ```python lora_config = [ { 'model_name': 'sdxl_lightning_8step_lora.safetensors', 'model_strength': 1.0, 'clip_strength': 1.0 } ] ``` -------------------------------- ### Enable Online Access in Blender Source: https://github.com/sakalond/stablegen/blob/main/README.md Enable online access in Blender's system preferences. This is a requirement for some add-ons, including StableGen, even if they primarily operate locally. ```bash Edit -> Preferences -> System -> Network -> Enable Online Access ``` -------------------------------- ### Download and Rename IPAdapter CLIP Vision Model 1 Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Download the first CLIP Vision model required for IPAdapter. You must rename the downloaded file to match the target filename. ```bash wget -O /models/clip_vision/CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors "https://huggingface.co/h94/IP-Adapter/resolve/main/models/image_encoder/model.safetensors" ``` -------------------------------- ### Configure ControlNet Units Source: https://context7.com/sakalond/stablegen/llms.txt Add and configure multiple ControlNet units for geometric guidance. Each unit can specify control type, model, strength, and timing. ```python import bpy scene = bpy.context.scene # ControlNet units are configured as a list of dictionaries ``` -------------------------------- ### Add Cameras with Normal-Weighted Placement Source: https://context7.com/sakalond/stablegen/llms.txt Places cameras around an object using normal-weighted auto placement. Configure coverage targets, occlusion modes, and interactive review. ```python import bpy # Place 8 cameras using normal-weighted auto placement bpy.ops.object.add_cameras( placement_mode='normal_weighted', # Auto placement based on mesh normals num_cameras=8, # Number of cameras to place center_type='object', # Center on active object purge_others=True, # Remove existing cameras first consider_existing=True, # Avoid duplicating coverage auto_aspect='per_camera', # Compute optimal aspect per camera exclude_bottom=True, # Skip bottom-facing geometry exclude_bottom_angle=1.5533, # 89 degrees threshold coverage_target=0.95, # Target 95% surface coverage max_auto_cameras=12, # Maximum for greedy mode auto_prompts=True, # Generate view prompts (front, rear, etc.) occlusion_mode='none', # Fast back-face culling only review_placement=True # Interactive fly-through review ) ``` -------------------------------- ### Clone Nunchaku Custom Node Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Clone the Nunchaku repository into your ComfyUI custom nodes directory to enable optimized inference for Qwen models. ```bash cd /custom_nodes/ git clone https://github.com/nunchaku-tech/ComfyUI-nunchaku.git ``` -------------------------------- ### Clone Qwen Image LoRA Loader Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Clone the Qwen Image LoRA Loader repository to manage LoRAs for Qwen models within ComfyUI. ```bash git clone https://github.com/ussoewwin/ComfyUI-QwenImageLoraLoader.git ``` -------------------------------- ### Flush ComfyUI VRAM and Unload Models Source: https://context7.com/sakalond/stablegen/llms.txt Sends a POST request to the /free endpoint on the ComfyUI server to unload models and free up VRAM. ```python import urllib.request import json # ComfyUI server configuration (set in addon preferences) server_address = "127.0.0.1:8188" # Flush VRAM and unload models def flush_vram(server_address): data = json.dumps({"unload_models": True, "free_memory": True}).encode('utf-8') req = urllib.request.Request( f"http://{server_address}/free", data=data, headers={'Content-Type': 'application/json'}, method='POST' ) urllib.request.urlopen(req, timeout=10) ``` -------------------------------- ### Clone ComfyUI-TRELLIS2 Repository Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Clone the ComfyUI-TRELLIS2 repository at a specific commit to enable 3D mesh generation from images or text prompts. ```bash cd /custom_nodes/ git clone https://github.com/PozzettiAndrea/ComfyUI-TRELLIS2.git cd ComfyUI-TRELLIS2 git checkout 6b0b2148f45bbafa0b86bfd25c63602b63a7aae0 ``` -------------------------------- ### Clone ComfyUI-Marigold Custom Node Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Clone the ComfyUI-Marigold repository to enable the decomposition of color textures into PBR material maps. ```bash cd /custom_nodes/ git clone https://github.com/kijai/ComfyUI-Marigold.git ``` -------------------------------- ### Clone StableDelight Custom Node Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Clones the ComfyUI_StableDelight_ll custom node repository into your ComfyUI custom nodes directory. Navigate to the directory first. ```bash cd /custom_nodes/ git clone https://github.com/lldacing/ComfyUI_StableDelight_ll.git ``` -------------------------------- ### Upload Image to ComfyUI Source: https://context7.com/sakalond/stablegen/llms.txt Provides a placeholder for uploading an image to the ComfyUI server via the /upload/image endpoint. Requires multipart form data. ```python import urllib.request import json # ComfyUI server configuration (set in addon preferences) server_address = "127.0.0.1:8188" # Upload image to ComfyUI def upload_image(server_address, image_path, subfolder=""): with open(image_path, 'rb') as f: image_data = f.read() # ... multipart form upload to /upload/image endpoint ``` -------------------------------- ### Add Cameras with Greedy Coverage Source: https://context7.com/sakalond/stablegen/llms.txt Uses greedy coverage mode to automatically determine the number of cameras needed for a target coverage. Supports full matrix occlusion and elevation clamping. ```python import bpy # Greedy coverage mode - automatically determines camera count bpy.ops.object.add_cameras( placement_mode='greedy_coverage', coverage_target=0.98, max_auto_cameras=20, occlusion_mode='full_matrix', # BVH-validated visibility clamp_elevation=True, # Avoid extreme angles max_elevation_angle=1.2217 # 70 degrees max ) ``` -------------------------------- ### Configure ControlNet Units and Canny Thresholds Source: https://context7.com/sakalond/stablegen/llms.txt Defines ControlNet units with specific model names, strengths, and start/end percentages. Also sets low and high thresholds for Canny edge detection. ```python controlnet_config = [ { 'unit_type': 'depth', 'model_name': 'controlnet_depth_sdxl.safetensors', 'strength': 0.5, 'start_percent': 0.0, 'end_percent': 1.0, 'is_union': False, 'use_union_type': True }, { 'unit_type': 'canny', 'model_name': 'controlnet_canny_sdxl.safetensors', 'strength': 0.3, 'start_percent': 0.0, 'end_percent': 0.8 } ] # Canny edge detection thresholds scene.canny_threshold_low = 0 scene.canny_threshold_high = 80 ``` -------------------------------- ### Clone ComfyUI IPAdapter Plus Node Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Navigate to your ComfyUI custom nodes directory and clone the IPAdapter Plus repository. This node is essential for IPAdapter support in StableGen. ```bash cd /custom_nodes/ git clone https://github.com/cubiq/ComfyUI_IPAdapter_plus.git ``` -------------------------------- ### Clone ComfyUI-GGUF Custom Node Source: https://github.com/sakalond/stablegen/blob/main/docs/MANUAL_INSTALLATION.md Clone the ComfyUI-GGUF repository to enable support for GGUF (quantized) models. Navigate to your ComfyUI custom nodes directory before running this command. ```bash cd /custom_nodes/ git clone https://github.com/city96/ComfyUI-GGUF.git ``` -------------------------------- ### Cancel ComfyUI Generation Source: https://context7.com/sakalond/stablegen/llms.txt Sends a request to the /interrupt endpoint on the ComfyUI server to cancel a currently running generation job, identified by client_id. ```python import urllib.request import json # ComfyUI server configuration (set in addon preferences) server_address = "127.0.0.1:8188" # Cancel running generation def cancel_generation(server_address, client_id): data = json.dumps({"client_id": client_id}).encode('utf-8') req = urllib.request.Request( f"http://{server_address}/interrupt", data=data ) urllib.request.urlopen(req) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.