Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Vanessik/HAAR
/ functions
Functions
176 in github.com/Vanessik/HAAR
⨍
Functions
176
◇
Types & classes
41
↓ 15 callers
Function
conv_nd
Create a 1D, 2D, or 3D convolution module.
src/utils/util.py:229
↓ 10 callers
Method
__init__
(self, d_blocks, u_blocks, skip_stages=0)
src/utils/layers.py:337
↓ 9 callers
Method
__init__
(self, channels, use_conv, dims=2, out_channels=None, padding=1)
src/openaimodel.py:101
↓ 8 callers
Function
normalization
Make a standard normalization layer. :param channels: number of input channels. :return: an nn.Module for normalization.
src/utils/util.py:210
↓ 7 callers
Function
obtain_blip_features
(hairstyle_desc, model_feature_extractor, txt_processors)
src/utils/text_utils.py:40
↓ 6 callers
Method
__init__
(self, dim_in, dim_out)
src/utils/attention.py:40
↓ 5 callers
Function
linear
Create a linear module.
src/utils/util.py:242
↓ 5 callers
Function
make_denoiser_wrapper
(config)
src/utils/config.py:186
↓ 4 callers
Function
load_config
(path_or_dict)
src/utils/config.py:32
↓ 4 callers
Method
texture2strands
texture = [bs, 64, self.patch_size, self.patch_size]
src/datasets/dataset.py:100
↓ 4 callers
Function
zero_module
Zero out the parameters of a module and return it.
src/utils/util.py:185
↓ 3 callers
Method
backward
(ctx, *output_grads)
src/utils/util.py:142
↓ 3 callers
Function
checkpoint
Evaluate a function without caching intermediate activations, allowing for reduced memory at the expense of extra compute in the backward pas
src/utils/util.py:113
↓ 3 callers
Function
create_folder
(folder)
preprocess_dataset/hair_rendering.py:40
↓ 3 callers
Function
default
(val, d)
src/utils/attention.py:21
↓ 3 callers
Method
downsample_texture
Subsample texture
src/datasets/dataset.py:232
↓ 3 callers
Method
get_scalings
(self, sigma)
src/utils/layers.py:74
↓ 3 callers
Method
loss
(self, input, noise, sigma, mask, **kwargs)
src/utils/layers.py:80
↓ 3 callers
Function
make_model
(config)
src/utils/config.py:115
↓ 3 callers
Function
obtain_description_embedding
(hairstyle_description, average_descriptions, model_feature_extractor, txt_processors)
src/utils/text_utils.py:47
↓ 3 callers
Function
sample_euler_ancestral
Ancestral sampling with Euler method steps.
src/sampler.py:10
↓ 3 callers
Function
setup_model
(config, ckpt_path, device)
src/utils/model_utils.py:12
↓ 3 callers
Method
smooth
(self, a, n=4, pad=True)
src/datasets/aug_dataset.py:186
↓ 3 callers
Method
upsample_latents
(self, latents, decoder)
src/upsampling/upsampler.py:52
↓ 2 callers
Function
Normalize
(in_channels)
src/utils/attention.py:78
↓ 2 callers
Method
_setup_basis
Create scalp basis
src/datasets/dataset.py:142
↓ 2 callers
Method
_setup_meshgrid
(self)
src/datasets/dataset.py:122
↓ 2 callers
Method
_setup_scalp_mesh
(self)
src/datasets/dataset.py:136
↓ 2 callers
Function
cosine_similarity
(a, b)
src/upsampling/utils.py:8
↓ 2 callers
Function
count_flops_attn
A counter for the `thop` package to count the operations in an attention operation. Meant to be used like: macs, params = thop.pr
src/openaimodel.py:328
↓ 2 callers
Function
dct
(x)
src/utils/layers.py:20
↓ 2 callers
Function
exists
(val)
src/utils/attention.py:13
↓ 2 callers
Function
inference_interpolation
(args, model_ema, accelerator, hairstyle_dataset, upsampler, emb_hairstyle_1, emb_hairstyle_2, config, device,
applications/imagic_interpolation.py:29
↓ 2 callers
Function
instantiate_from_config
(config)
src/utils/util.py:22
↓ 2 callers
Function
timestep_embedding
Create sinusoidal timestep embeddings. :param timesteps: a 1-D Tensor of N indices, one per batch element. These may be
src/utils/util.py:162
↓ 1 callers
Method
__getitem__
(self, idx)
src/datasets/aug_dataset.py:199
↓ 1 callers
Method
__len__
(self)
src/datasets/aug_dataset.py:70
↓ 1 callers
Method
_calc_nonzero_mask
(self)
src/upsampling/upsampler.py:78
↓ 1 callers
Method
_create_average_texture
Create average texture for hairstyle calculation
src/datasets/dataset.py:75
↓ 1 callers
Method
_setup_data
(self, idx)
src/datasets/dataset.py:170
↓ 1 callers
Method
_setup_features
Upload embeddings of textual descriptions for hairstyle idx
src/datasets/dataset.py:176
↓ 1 callers
Method
_setup_hairstyle
(self, idx)
src/datasets/aug_dataset.py:75
↓ 1 callers
Method
_setup_hairstyle
(self, idx)
src/datasets/dataset.py:192
↓ 1 callers
Method
augment_hairstyle
(self, hairstyle_texture)
src/datasets/aug_dataset.py:98
↓ 1 callers
Method
augment_patch_strands
(self, sampled_face, sampled_strands)
src/datasets/aug_dataset.py:110
↓ 1 callers
Function
avg_pool_nd
Create a 1D, 2D, or 3D average pooling module.
src/utils/util.py:249
↓ 1 callers
Function
barycentric_coordinates
Compute the barycentric coordinates of point p with respect to the triangle defined by points a, b, and c.
src/utils/geometry.py:6
↓ 1 callers
Function
barycentric_coordinates_of_projection
https://github.com/MPI-IS/mesh/blob/master/mesh/geometry/barycentric_coordinates_of_projection.py
src/utils/geometry.py:53
↓ 1 callers
Function
calc_strands_similarity
(patch_world_displ)
src/upsampling/utils.py:4
↓ 1 callers
Function
clean_scene
()
src/utils/export_for_unreal.py:13
↓ 1 callers
Function
create_hair
(name: str, block_id: int)
preprocess_dataset/hair_rendering.py:64
↓ 1 callers
Function
create_hair
(name: str, strands: np.ndarray, hair_blocks: int, block_id: int)
src/utils/export_for_unreal.py:19
↓ 1 callers
Function
create_hair_material
(name)
preprocess_dataset/hair_rendering.py:46
↓ 1 callers
Function
create_points
(curveData, coords, index=0)
preprocess_dataset/hair_rendering.py:66
↓ 1 callers
Function
create_points
(curveData, coords, index=0)
src/utils/export_for_unreal.py:20
↓ 1 callers
Function
demo
(cross_cond)
train.py:280
↓ 1 callers
Method
downsample_hairstyle
(self, hairstyle_patch)
src/datasets/dataset.py:208
↓ 1 callers
Function
enable_gpus
()
preprocess_dataset/hair_rendering.py:22
↓ 1 callers
Function
export_hair_object_as_alembic_for_unreal
(hair_object_name, out_fname)
src/utils/export_for_unreal.py:65
↓ 1 callers
Method
forward
(self, x)
src/utils/util.py:221
↓ 1 callers
Function
freq_weight_1d
(n, scales=0, dtype=None, device=None)
src/utils/layers.py:31
↓ 1 callers
Function
freq_weight_nd
(shape, scales=0, dtype=None, device=None)
src/utils/layers.py:40
↓ 1 callers
Function
import_hair_from_ply
(ply_fname, n_strands_target)
src/utils/export_for_unreal.py:46
↓ 1 callers
Function
llava_eval_model
( tokenizer, model, image_processor, context_len,
preprocess_dataset/obtain_hairstyle_descriptions.py:104
↓ 1 callers
Function
main
()
train.py:44
↓ 1 callers
Function
main
(args)
infer.py:28
↓ 1 callers
Function
main
(args)
applications/image2hairstyle.py:23
↓ 1 callers
Function
main
(args)
applications/text_interpolation.py:28
↓ 1 callers
Function
main
(args)
applications/imagic_interpolation.py:82
↓ 1 callers
Function
main
(args)
preprocess_dataset/augment_data.py:13
↓ 1 callers
Function
main
(args)
preprocess_dataset/calc_text_emb.py:26
↓ 1 callers
Function
main
(args)
preprocess_dataset/obtain_hairstyle_descriptions.py:191
↓ 1 callers
Function
main
()
src/utils/export_for_unreal.py:86
↓ 1 callers
Function
map_uv_to_3d
Map 2D UV meshgrid points to 3D positions and face index using barycentric interpolation with NumPy. Return a tensor of the same shape as the
src/utils/geometry.py:25
↓ 1 callers
Function
obtain_hairstyle_description
( image, tokenizer, model, image_processor, context_le
preprocess_dataset/obtain_hairstyle_descriptions.py:35
↓ 1 callers
Function
round_to_power_of_two
(x, tol)
src/utils/config.py:20
↓ 1 callers
Function
save
()
train.py:309
↓ 1 callers
Function
setup_train_model
(config, ckpt_path, device)
src/utils/model_utils.py:30
↓ 1 callers
Function
split_list
Split a list into n (roughly) equal-sized chunks
preprocess_dataset/obtain_hairstyle_descriptions.py:24
↓ 1 callers
Function
zero_module
Zero out the parameters of a module and return it.
src/utils/attention.py:69
Method
__getitem__
(self, idx)
src/datasets/dataset.py:257
Method
__init__
( self, spacial_dim: int, embed_dim: int, num_heads_channels: int, out
src/openaimodel.py:38
Method
__init__
(self, channels, out_channels=None, ks=5)
src/openaimodel.py:124
Method
__init__
(self, channels, use_conv, dims=2, out_channels=None,padding=1)
src/openaimodel.py:144
Method
__init__
( self, channels, emb_channels, dropout, out_channels=None, us
src/openaimodel.py:180
Method
__init__
( self, channels, num_heads=1, num_head_channels=-1, use_checkpoint=Fa
src/openaimodel.py:286
Method
__init__
(self, n_heads)
src/openaimodel.py:353
Method
__init__
(self, n_heads)
src/openaimodel.py:385
Method
__init__
( self, image_size, in_channels, model_channels, out_channels,
src/openaimodel.py:444
Method
__init__
( self, image_size, in_channels, model_channels, out_channels,
src/openaimodel.py:766
Method
__init__
(self, inner_model, sigma_data=1., weighting='karras', scales=1)
src/utils/layers.py:52
Method
__init__
(self, *main, skip=None)
src/utils/layers.py:142
Method
__init__
(self, module)
src/utils/layers.py:158
Method
__init__
(self, *main, skip=None)
src/utils/layers.py:177
Method
__init__
(self, feats_in, c_out, num_groups, eps=1e-5, cond_key='cond')
src/utils/layers.py:188
Method
__init__
(self, c_in, n_head, norm, dropout_rate=0.)
src/utils/layers.py:207
Method
__init__
(self, c_dec, c_enc, n_head, norm_dec, dropout_rate=0., cond_key='cross', cond_key_padding='c
src/utils/layers.py:231
Method
__init__
(self, kernel='linear', pad_mode='reflect')
src/utils/layers.py:290
Method
__init__
(self, kernel='linear', pad_mode='reflect')
src/utils/layers.py:306
Method
__init__
(self, in_features, out_features, std=1.)
src/utils/layers.py:324
next →
1–100 of 176, ranked by callers