Fix SyntaxError: duplicate except blocks and indentation
🔧 **Syntax Error Fix**:
1. **Duplicate Except Blocks**:
- Removed duplicate except Exception as e blocks
- Fixed improper nesting of exception handlers
2. **Indentation Issues**:
- Corrected indentation for exception handling
- Fixed try-except block structure
3. **Code Structure**:
- Cleaned up ModelPatcher analysis exception handling
- Removed redundant error logging
- Simplified exception flow
The SyntaxError on line 433 has been resolved and the code
should now load properly in ComfyUI.
This commit is contained in:
@@ -433,12 +433,6 @@ class ConceptAttentionProcessor:
|
||||
except Exception as e:
|
||||
logger.warning(f"ModelPatcher analysis failed: {e}")
|
||||
logger.info("Will use mock data as fallback")
|
||||
|
||||
logger.info("Model forward pass completed successfully")
|
||||
|
||||
except Exception as e:
|
||||
logger.warning(f"Model forward pass failed: {e}")
|
||||
logger.info("Will use mock data as fallback")
|
||||
|
||||
# Check if any attention outputs were captured
|
||||
if hasattr(self.concept_attention, 'attention_outputs') and self.concept_attention.attention_outputs:
|
||||
|
||||
Reference in New Issue
Block a user