feat(distorch): Add universal .safetensors support & memory-based distribution
This commit introduces DisTorch v2.0.0, a major overhaul that extends multi-device model distribution to standard `.safetensors` models. Key changes include: - **Universal `.safetensors` Support:** The core distribution logic is no longer limited to GGUF models. It now fully supports `.safetensors`, allowing any UNet supported by native Comfy loaders to have its layers distributed across multiple devices (GPUs and CPU/RAM).
This commit is contained in:
+12
-4
@@ -9,12 +9,20 @@ from nodes import NODE_CLASS_MAPPINGS as GLOBAL_NODE_CLASS_MAPPINGS
|
||||
|
||||
# --- DisTorch V2 Logging Configuration ---
|
||||
# Set to "E" for Engineering (DEBUG) or "P" for Production (INFO)
|
||||
LOG_LEVEL = "E"
|
||||
LOG_LEVEL = "P"
|
||||
|
||||
# Configure logger
|
||||
log_level = logging.DEBUG if LOG_LEVEL == "E" else logging.INFO
|
||||
logging.basicConfig(level=log_level, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||
logger = logging.getLogger(__name__)
|
||||
logger = logging.getLogger("MultiGPU")
|
||||
logger.propagate = False
|
||||
|
||||
if not logger.handlers:
|
||||
log_level = logging.DEBUG if LOG_LEVEL == "E" else logging.INFO
|
||||
handler = logging.StreamHandler()
|
||||
formatter = logging.Formatter('%(message)s')
|
||||
handler.setFormatter(formatter)
|
||||
logger.addHandler(handler)
|
||||
logger.setLevel(log_level)
|
||||
|
||||
# --- End Logging Configuration ---
|
||||
|
||||
# Global device state management
|
||||
|
||||
Reference in New Issue
Block a user