Spaces:
				
			
			
	
			
			
		Running
		
			on 
			
			Zero
	
	
	
			
			
	
	
	
	
		
		
		Running
		
			on 
			
			Zero
	Commit 
							
							·
						
						4a3087a
	
1
								Parent(s):
							
							58b6042
								
Update
Browse files
    	
        trellis/models/structured_latent_vae/decoder_mesh.py
    CHANGED
    
    | @@ -102,8 +102,8 @@ class SLatMeshDecoder(SparseTransformerBase): | |
| 102 | 
             
                    )
         | 
| 103 | 
             
                    self.resolution = resolution
         | 
| 104 | 
             
                    self.rep_config = representation_config
         | 
| 105 | 
            -
                     | 
| 106 | 
            -
                    self.out_channels =  | 
| 107 | 
             
                    self.upsample = nn.ModuleList([
         | 
| 108 | 
             
                        SparseSubdivideBlock3d(
         | 
| 109 | 
             
                            channels=model_channels,
         | 
| @@ -153,8 +153,9 @@ class SLatMeshDecoder(SparseTransformerBase): | |
| 153 | 
             
                        list of representations
         | 
| 154 | 
             
                    """
         | 
| 155 | 
             
                    ret = []
         | 
|  | |
| 156 | 
             
                    for i in range(x.shape[0]):
         | 
| 157 | 
            -
                        mesh =  | 
| 158 | 
             
                        ret.append(mesh)
         | 
| 159 | 
             
                    return ret
         | 
| 160 |  | 
|  | |
| 102 | 
             
                    )
         | 
| 103 | 
             
                    self.resolution = resolution
         | 
| 104 | 
             
                    self.rep_config = representation_config
         | 
| 105 | 
            +
                    mesh_extractor = SparseFeatures2Mesh('cpu', res=self.resolution*4, use_color=self.rep_config.get('use_color', False))
         | 
| 106 | 
            +
                    self.out_channels = mesh_extractor.feats_channels
         | 
| 107 | 
             
                    self.upsample = nn.ModuleList([
         | 
| 108 | 
             
                        SparseSubdivideBlock3d(
         | 
| 109 | 
             
                            channels=model_channels,
         | 
|  | |
| 153 | 
             
                        list of representations
         | 
| 154 | 
             
                    """
         | 
| 155 | 
             
                    ret = []
         | 
| 156 | 
            +
                    mesh_extractor = SparseFeatures2Mesh(x.device, res=self.resolution*4, use_color=self.rep_config.get('use_color', False))
         | 
| 157 | 
             
                    for i in range(x.shape[0]):
         | 
| 158 | 
            +
                        mesh = mesh_extractor(x[i], training=self.training)
         | 
| 159 | 
             
                        ret.append(mesh)
         | 
| 160 | 
             
                    return ret
         | 
| 161 |  | 
