File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed 
src/brevitas_examples/stable_diffusion Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 5454from  brevitas_examples .common .generative .quantize  import  generate_quantizers 
5555from  brevitas_examples .common .parse_utils  import  add_bool_arg 
5656from  brevitas_examples .common .parse_utils  import  quant_format_validator 
57+ from  brevitas_examples .common .svd_quant  import  ErrorCorrectedModule 
5758from  brevitas_examples .llm .llm_quant .export  import  BlockQuantProxyLevelManager 
5859from  brevitas_examples .llm .llm_quant .svd_quant  import  apply_svd_quant 
5960from  brevitas_examples .stable_diffusion .mlperf_evaluation .accuracy  import  compute_mlperf_fid 
@@ -606,6 +607,10 @@ def sdpa_zp_stats_type():
606607                rank = args .svd_quant_rank ,
607608                iters = args .svd_quant_iters ,
608609                dtype = torch .float32 )
610+             # Workaround to expose `in_features` attribute from the ErrorCorrectedModule Wrapper 
611+             for  m  in  denoising_network .modules ():
612+                 if  isinstance (m , ErrorCorrectedModule ) and  hasattr (m .layer , 'in_features' ):
613+                     m .in_features  =  m .layer .in_features 
609614            print ("SVDQuant applied." )
610615
611616        if  args .compile_ptq :
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments