MCPcopy Create free account

hub / github.com/VAST-AI-Research/TripoSR / functions

Functions88 in github.com/VAST-AI-Research/TripoSR

↓ 8 callersMethodend
(self, name: str)
run.py:29
↓ 8 callersMethodstart
(self, name: str)
run.py:23
↓ 6 callersFunctionfind_class
(cls_string)
tsr/utils.py:24
↓ 4 callersMethod__init__
(self, dim_in: int, dim_out: int, approximate: str = "none")
tsr/models/transformer/basic_transformer_block.py:272
↓ 4 callersMethodquery_triplane
( self, decoder: torch.nn.Module, positions: torch.Tensor, triplane: torch.Ten
tsr/models/nerf_renderer.py:41
↓ 3 callersMethodfrom_pretrained
( cls, pretrained_model_name_or_path: str, config_name: str, weight_name: str )
tsr/system.py:52
↓ 3 callersMethodgelu
(self, gate: torch.Tensor)
tsr/models/transformer/basic_transformer_block.py:277
↓ 3 callersMethodhead_to_batch_dim
r""" Reshape the tensor from `[batch_size, seq_len, dim]` to `[batch_size, seq_len, heads, dim // heads]` `heads` is the number of hea
tsr/models/transformer/attention.py:280
↓ 3 callersMethodmake_linear
( self, dim_in, dim_out, bias=True, weight_init=None, bias_ini
tsr/models/network_utils.py:81
↓ 3 callersMethodrender
( self, scene_codes, n_views: int, elevation_deg: float = 0.0, camera_
tsr/system.py:122
↓ 3 callersFunctionscale_tensor
(dat: torch.FloatTensor, inp_scale: ValidScale, tgt_scale: ValidScale)
tsr/utils.py:224
↓ 2 callersMethod_forward
( self, decoder: torch.nn.Module, triplane: torch.Tensor, rays_o: torch.Tensor
tsr/models/nerf_renderer.py:93
↓ 2 callersMethodconvert_and_resize
( self, image: Union[PIL.Image.Image, np.ndarray, torch.Tensor], size: int, )
tsr/utils.py:65
↓ 2 callersMethodextract_mesh
(self, scene_codes, has_vertex_color, resolution: int = 256, threshold: float = 25.0)
tsr/system.py:171
↓ 2 callersFunctionfill_background
(image)
gradio_app.py:43
↓ 2 callersFunctionget_activation
(name)
tsr/utils.py:236
↓ 2 callersMethodmake_activation
(self, activation)
tsr/models/network_utils.py:108
↓ 2 callersMethodnorm_encoder_hidden_states
r""" Normalize the encoder hidden states. Requires `self.norm_cross` to be specified when constructing the `Attention` class.
tsr/models/transformer/attention.py:416
↓ 2 callersMethodprepare_attention_mask
r""" Prepare the attention mask for the attention computation. Args: attention_mask (`torch.Tensor`): The
tsr/models/transformer/attention.py:357
↓ 2 callersFunctionremove_background
( image: PIL.Image.Image, rembg_session: Any = None, force: bool = False, **rembg_kwargs, )
tsr/utils.py:402
↓ 2 callersFunctionresize_foreground
( image: PIL.Image.Image, ratio: float, )
tsr/utils.py:417
↓ 2 callersMethodset_chunk_size
(self, chunk_size: int)
tsr/models/nerf_renderer.py:35
↓ 1 callersFunctionbake_texture
(mesh, model, scene_code, texture_resolution)
tsr/bake_texture.py:151
↓ 1 callersMethodbatch_to_head_dim
r""" Reshape the tensor from `[batch_size, seq_len, dim]` to `[batch_size // heads, seq_len, dim * heads]`. `heads` is the number of h
tsr/models/transformer/attention.py:261
↓ 1 callersFunctionchunk_batch
(func: Callable, chunk_size: int, *args, **kwargs)
tsr/utils.py:154
↓ 1 callersMethodconfigure
(self, *args, **kwargs)
tsr/utils.py:60
↓ 1 callersMethoddetokenize
(self, tokens: torch.Tensor)
tsr/models/tokenizers/triplane.py:35
↓ 1 callersMethodgelu
(self, gate: torch.Tensor)
tsr/models/transformer/basic_transformer_block.py:306
↓ 1 callersFunctiongenerate
(image, mc_resolution, formats=["obj", "glb"])
gradio_app.py:61
↓ 1 callersMethodget_attention_scores
r""" Compute the attention scores. Args: query (`torch.Tensor`): The query tensor. key (`torch.Tensor`): The
tsr/models/transformer/attention.py:303
↓ 1 callersFunctionget_ray_directions
Get ray directions for all pixels in camera coordinate. Reference: https://www.scratchapixel.com/lessons/3d-basic-rendering/ r
tsr/utils.py:257
↓ 1 callersFunctionget_rays
( directions, c2w, keepdim=False, normalize=False, )
tsr/utils.py:299
↓ 1 callersFunctionget_spherical_cameras
( n_views: int, elevation_deg: float, camera_distance: float, fovy_deg: float, height: int
tsr/utils.py:341
↓ 1 callersFunctionmake_atlas
(mesh, texture_resolution, texture_padding)
tsr/bake_texture.py:9
↓ 1 callersFunctionparse_structured
(fields: Any, cfg: Optional[Union[dict, DictConfig]] = None)
tsr/utils.py:19
↓ 1 callersFunctionpositions_to_colors
(model, scene_code, positions_texture, texture_resolution)
tsr/bake_texture.py:137
↓ 1 callersFunctionpreprocess
(input_image, do_remove_background, foreground_ratio)
gradio_app.py:42
↓ 1 callersFunctionrasterize_position_atlas
( mesh, atlas_vmapping, atlas_indices, atlas_uvs, texture_resolution, texture_padding )
tsr/bake_texture.py:25
↓ 1 callersFunctionrays_intersect_bbox
( rays_o: torch.Tensor, rays_d: torch.Tensor, radius: float, near: float = 0.0, valid_thre
tsr/utils.py:117
↓ 1 callersFunctionsave_video
( frames: List[PIL.Image.Image], output_path: str, fps: int = 30, )
tsr/utils.py:458
↓ 1 callersMethodset_marching_cubes_resolution
(self, resolution: int)
tsr/system.py:163
↓ 1 callersMethodset_processor
(self, processor: "AttnProcessor")
tsr/models/transformer/attention.py:224
↓ 1 callersFunctionto_gradio_3d_orientation
(mesh)
tsr/utils.py:471
Method__call__
( self, image: Union[ PIL.Image.Image, np.ndarray, torch.F
tsr/utils.py:95
Method__call__
( self, attn: Attention, hidden_states: torch.FloatTensor, encoder_hidden_stat
tsr/models/transformer/attention.py:489
Method__call__
( self, attn: Attention, hidden_states: torch.FloatTensor, encoder_hidden_stat
tsr/models/transformer/attention.py:569
Method__init__
(self)
run.py:18
Method__init__
( self, cfg: Optional[Union[dict, DictConfig]] = None, *args, **kwargs )
tsr/utils.py:53
Method__init__
(self, resolution: int)
tsr/models/isosurface.py:18
Method__init__
( self, dim: int, num_attention_heads: int, attention_head_dim: int, d
tsr/models/transformer/basic_transformer_block.py:75
Method__init__
( self, dim: int, dim_out: Optional[int] = None, mult: int = 4, dropou
tsr/models/transformer/basic_transformer_block.py:222
Method__init__
(self, dim_in: int, dim_out: int)
tsr/models/transformer/basic_transformer_block.py:300
Method__init__
(self, dim_in: int, dim_out: int)
tsr/models/transformer/basic_transformer_block.py:328
Method__init__
( self, query_dim: int, cross_attention_dim: Optional[int] = None, heads: int
tsr/models/transformer/attention.py:97
Method__init__
(self)
tsr/models/transformer/attention.py:563
Method_query_chunk
(x)
tsr/models/nerf_renderer.py:56
Functioncheck_input_image
(input_image)
gradio_app.py:37
Methodconfigure
(self)
tsr/system.py:73
Methodconfigure
(self)
tsr/models/nerf_renderer.py:31
Methodconfigure
(self)
tsr/models/network_utils.py:19
Methodconfigure
(self)
tsr/models/network_utils.py:48
Methodconfigure
(self)
tsr/models/tokenizers/image.py:20
Methodconfigure
(self)
tsr/models/tokenizers/triplane.py:19
Methodconfigure
(self)
tsr/models/transformer/transformer_1d.py:72
Methoddetokenize
(self, *args, **kwargs)
tsr/models/tokenizers/image.py:65
Methodeval
(self)
tsr/models/nerf_renderer.py:178
Methodforward
( self, image: Union[ PIL.Image.Image, np.ndarray, torch.F
tsr/system.py:87
Methodforward
( self, decoder: torch.nn.Module, triplane: torch.Tensor, rays_o: torch.Tensor
tsr/models/nerf_renderer.py:154
Methodforward
( self, level: torch.FloatTensor, )
tsr/models/isosurface.py:40
Methodforward
(self, triplanes: torch.Tensor)
tsr/models/network_utils.py:24
Methodforward
(self, x)
tsr/models/network_utils.py:116
Methodforward
(self, images: torch.FloatTensor, **kwargs)
tsr/models/tokenizers/image.py:44
Methodforward
(self, batch_size: int)
tsr/models/tokenizers/triplane.py:29
Methodforward
( self, hidden_states: torch.FloatTensor, attention_mask: Optional[torch.FloatTensor]
tsr/models/transformer/basic_transformer_block.py:149
Methodforward
(self, hidden_states: torch.Tensor)
tsr/models/transformer/basic_transformer_block.py:256
Methodforward
(self, hidden_states)
tsr/models/transformer/basic_transformer_block.py:285
Methodforward
(self, hidden_states, scale: float = 1.0)
tsr/models/transformer/basic_transformer_block.py:312
Methodforward
(self, x: torch.Tensor)
tsr/models/transformer/basic_transformer_block.py:332
Methodforward
The [`Transformer1DModel`] forward method. Args: hidden_states (`torch.LongTensor` of shape `(batch size, num latent pix
tsr/models/transformer/transformer_1d.py:122
Methodforward
r""" The forward method of the `Attention` class. Args: hidden_states (`torch.Tensor`): The hidden states
tsr/models/transformer/attention.py:227
Methodfuse_projections
(self, fuse=True)
tsr/models/transformer/attention.py:450
Functionget_intrinsic_from_fov
(fov, H, W, bs=-1)
tsr/utils.py:32
Methodgrid_vertices
(self)
tsr/models/isosurface.py:13
Methodgrid_vertices
(self)
tsr/models/isosurface.py:25
Methodprocess_output
(image: torch.FloatTensor)
tsr/system.py:138
Functionrun_example
(image_pil)
gradio_app.py:73
Methodset_chunk_feed_forward
(self, chunk_size: Optional[int], dim: int)
tsr/models/transformer/basic_transformer_block.py:144
Methodtrain
(self, mode=True)
tsr/models/nerf_renderer.py:174