MCPcopy Create free account

hub / github.com/boogu-project/Boogu-Image / functions

Functions286 in github.com/boogu-project/Boogu-Image

Method__init__
Initialize the Boogu-Image mixed single-double stream transformer model.
boogu/models/transformers/transformer_boogu.py:803
Method__init__
( self, embedding_dim: int, conditioning_embedding_dim: int, # NOTE: It is a b
boogu/models/transformers/block_lumina2.py:75
Method__init__
( self, dim: int, inner_dim: int, multiple_of: Optional[int] = 256, ff
boogu/models/transformers/block_lumina2.py:140
Method__init__
( self, hidden_size: int = 4096, instruction_feat_dim: int = 2048, frequency_e
boogu/models/transformers/block_lumina2.py:178
Method__len__
(self)
boogu/schedulers/scheduling_flow_match_euler_discrete_time_shifting.py:333
Method__len__
(self)
boogu/schedulers/scheduling_dpmsolver_multistep.py:1141
Method_append_and_save
Append a tensor to list and persist it to disk.
boogu/pipelines/boogu/pipeline_boogu.py:133
Method_collect_candidates
(obj)
boogu/pipelines/boogu/pipeline_boogu.py:735
Method_convert_to_beta
From "Beta Sampling is All You Need" [arXiv:2407.12173] (Lee et. al, 2024)
boogu/schedulers/scheduling_dpmsolver_multistep.py:509
Method_convert_to_exponential
Constructs an exponential noise schedule.
boogu/schedulers/scheduling_dpmsolver_multistep.py:483
Method_convert_to_karras
Constructs the noise schedule of Karras et al. (2022).
boogu/schedulers/scheduling_dpmsolver_multistep.py:440
Method_convert_to_lu
Constructs the noise schedule of Lu et al. (2022).
boogu/schedulers/scheduling_dpmsolver_multistep.py:467
Method_get_instruction_feature_embeds
Get interleaved instruction embeddings from VLM (self.mllm), aligned with training: - Build VLM inputs via processor.apply_chat_templ
boogu/pipelines/boogu/pipeline_boogu.py:3759
Method_get_unpad_data
Helper function to get unpadding data from attention mask.
boogu/models/attention_processor.py:136
Method_get_unpad_data
Helper function to get unpadding data from a 2D attention mask [B, L].
boogu/models/attention_processor.py:939
Function_layer_norm_bwd_kernel
( X, # pointer to the input W, # pointer to the weights B, # pointer to the biases Y, # po
boogu/ops/triton/layer_norm.py:475
Function_layer_norm_fwd_1pass_kernel
( X, # pointer to the input Y, # pointer to the output W, # pointer to the weights B, # po
boogu/ops/triton/layer_norm.py:185
Method_module_execution_device
Return the best execution device for a possibly offloaded module.
boogu/pipelines/boogu/pipeline_boogu.py:1225
Method_module_execution_device
Return the best execution device for a possibly offloaded module.
boogu/pipelines/boogu/pipeline_boogu.py:3803
Method_normalize_device_name
(device_name)
boogu/pipelines/boogu/pipeline_boogu.py:349
Method_project
( self, v0: torch.Tensor, # [B, C, H, W] # The delta: model_pred - model_pred_uncond
boogu/pipelines/boogu/pipeline_boogu.py:3053
Function_raise_import_error
(*args, **kwargs)
inference_turbo.py:736
Function_raise_import_error
(*args, **kwargs)
inference.py:832
Method_sigma_to_t
(self, sigma, log_sigmas)
boogu/schedulers/scheduling_dpmsolver_multistep.py:406
Methodadd_noise
( self, original_samples: torch.Tensor, noise: torch.Tensor, timesteps: torch.
boogu/schedulers/scheduling_dpmsolver_multistep.py:1101
Methodbackward
(ctx, dy, *args)
boogu/ops/triton/layer_norm.py:978
Methodbackward
(ctx, dout, *args)
boogu/ops/triton/layer_norm.py:1274
Methodbegin_index
The index for the first timestep. It should be set from pipeline with `set_begin_index` method.
boogu/schedulers/scheduling_flow_match_euler_discrete_time_shifting.py:103
Methodbegin_index
The index for the first timestep. It should be set from pipeline with `set_begin_index` method.
boogu/schedulers/scheduling_dpmsolver_multistep.py:315
Methodcfg_range
(self)
boogu/pipelines/boogu/pipeline_boogu.py:2644
Methodcompress_features
( feats: torch.Tensor, keep_m: torch.Tensor, max_len: int )
boogu/pipelines/boogu/pipeline_boogu.py:1526
Methodcompress_features
( feats: torch.Tensor, keep_m: torch.Tensor, max_len: int )
boogu/pipelines/boogu/pipeline_boogu.py:4105
Methodcuda_version
(self)
utils/get_flash_attn.py:53
Functiondecorator
(*args, **kwargs)
boogu/ops/triton/layer_norm.py:18
Methodempty_instruction_guidance_scale
(self)
boogu/pipelines/boogu/pipeline_boogu.py:2640
Methodforward
Forward pass matching the interface of RMSNorm. Args: x: Input tensor residual: Optional residual tensor to
boogu/ops/simple_layer_norm.py:96
Methodforward
( ctx, x, weight, bias, residual=None, x1=None, weight
boogu/ops/triton/layer_norm.py:788
Methodforward
(self, x, residual=None, prenorm=False, residual_in_fp32=False)
boogu/ops/triton/layer_norm.py:1192
Methodforward
( ctx, x, norm_weight, norm_bias, linear_weight, linear_bias,
boogu/ops/triton/layer_norm.py:1209
Methodforward
(self, sample, condition=None)
boogu/models/embeddings.py:65
Methodforward
( self, freqs_cis, attention_mask, l_effective_ref_img_len, l_effectiv
boogu/models/transformers/rope.py:71
Methodforward
( self, freqs_cis, attention_mask, l_effective_ref_img_len, l_effectiv
boogu/models/transformers/rope.py:266
Methodforward
Generate rotary position embeddings and attention mask for prompt tuning. Args: batch_size: Batch size devic
boogu/models/transformers/rope.py:472
Methodforward
(self, idx=None, batch_size=1, device=None, use_causal_mask=True)
boogu/models/transformers/transformer_boogu.py:147
Methodforward
Forward pass of the transformer block. Args: hidden_states: Input hidden states tensor attention_mask:
boogu/models/transformers/transformer_boogu.py:269
Methodforward
Run one dual-stream (double-stream) block step. Returns updated `(img_hidden_states, instruct_hidden_states)`.
boogu/models/transformers/transformer_boogu.py:577
Methodforward
Forward pass: context/refiner -> dual-stream (double-stream) -> fusion -> single-stream -> projection.
boogu/models/transformers/transformer_boogu.py:1274
Methodforward
( self, x: torch.Tensor, emb: Optional[torch.Tensor] = None, )
boogu/models/transformers/block_lumina2.py:63
Methodforward
( self, x: torch.Tensor, conditioning_embedding: torch.Tensor, )
boogu/models/transformers/block_lumina2.py:109
Methodforward
(self, x)
boogu/models/transformers/block_lumina2.py:171
Methodforward
( self, timestep: torch.Tensor, instruction_hidden_states: torch.Tensor, dtype
boogu/models/transformers/block_lumina2.py:210
Methodfrom_config
(cls, config, **kwargs)
boogu/models/transformers/transformer_boogu.py:177
Methodfuse_lora
r""" Fuses the LoRA parameters into the original parameters of the corresponding blocks. <Tip warning={true}> This is an exp
boogu/pipelines/lora_pipeline.py:533
Methodget_freqs_cis
( axes_dim: Tuple[int, int, int], axes_lens: Tuple[int, int, int], theta: int )
boogu/models/transformers/rope.py:238
Methodimage_guidance_scale
(self)
boogu/pipelines/boogu/pipeline_boogu.py:2636
Methodis_batch_two_level_with_none
Accept batch-shaped inputs where each sample is: - None (represents no image) - [] (empty sample, can be co
boogu/pipelines/boogu/pipeline_boogu.py:1063
Methodis_list_of_list_of_paths
(x: Any)
boogu/pipelines/boogu/pipeline_boogu.py:1056
Methodis_list_of_list_of_pil_images
(x: Any)
boogu/pipelines/boogu/pipeline_boogu.py:1049
Methodis_list_of_paths
(x: Any)
boogu/pipelines/boogu/pipeline_boogu.py:1046
Methodis_list_of_pil_images
(x: Any)
boogu/pipelines/boogu/pipeline_boogu.py:1043
Methodis_path
(x: Any)
boogu/pipelines/boogu/pipeline_boogu.py:1040
Methodis_pil_image
(x: Any)
boogu/pipelines/boogu/pipeline_boogu.py:1037
Functionlayer_norm_fn
( x, weight, bias, residual=None, x1=None, weight1=None, bias1=None, eps=1e-6,
boogu/ops/triton/layer_norm.py:1084
Functionlayer_norm_linear_fn
( x, norm_weight, norm_bias, linear_weight, linear_bias, residual=None, eps=1e-6,
boogu/ops/triton/layer_norm.py:1319
Functionlayer_norm_ref
( x, weight, bias, residual=None, x1=None, weight1=None, bias1=None, eps=1e-6,
boogu/ops/triton/layer_norm.py:54
Methodnum_timesteps
(self)
boogu/pipelines/boogu/pipeline_boogu.py:2628
Methodprocessing
(self, *args, **kwargs)
boogu/pipelines/boogu/pipeline_boogu_turbo.py:144
Functionrescale_zero_terminal_snr
Rescales betas to have zero terminal SNR Based on https://arxiv.org/pdf/2305.08891.pdf (Algorithm 1) Args: betas (`torch.Tensor`):
boogu/schedulers/scheduling_dpmsolver_multistep.py:84
Functionrms_norm_ref
( x, weight, bias, residual=None, x1=None, weight1=None, bias1=None, eps=1e-6,
boogu/ops/triton/layer_norm.py:114
Methodsave_lora_prompt_embedding_weights
r""" Save the LoRA parameters corresponding to the prompt_embedding. Arguments: save_directory (`str` or `os.PathLike`):
boogu/pipelines/lora_pipeline.py:480
Methodsave_lora_weights
r""" Save the LoRA parameters corresponding to the UNet and text encoder. Arguments: save_directory (`str` or `os.PathLik
boogu/pipelines/lora_pipeline.py:431
Methodscale_model_input
Ensures interchangeability with schedulers that need to scale the denoising model input depending on the current timestep. A
boogu/schedulers/scheduling_dpmsolver_multistep.py:1086
Methodset_begin_index
Sets the begin index for the scheduler. This function should be run from pipeline before the inference. Args: begin_inde
boogu/schedulers/scheduling_flow_match_euler_discrete_time_shifting.py:110
Methodset_begin_index
Sets the begin index for the scheduler. This function should be run from pipeline before the inference. Args: begin_inde
boogu/schedulers/scheduling_dpmsolver_multistep.py:321
Methodset_timesteps
Sets the discrete timesteps used for the diffusion chain (to be run before inference). Args: num_inference_steps (`int`)
boogu/schedulers/scheduling_flow_match_euler_discrete_time_shifting.py:160
Methodstep
Predict the sample from the previous timestep by reversing the SDE. This function propagates the diffusion process from the learned m
boogu/schedulers/scheduling_flow_match_euler_discrete_time_shifting.py:264
Methodstep_index
The index counter for current timestep. It will increase 1 after each scheduler step.
boogu/schedulers/scheduling_flow_match_euler_discrete_time_shifting.py:96
Methodstep_index
The index counter for current timestep. It will increase 1 after each scheduler step.
boogu/schedulers/scheduling_dpmsolver_multistep.py:308
Functionswiglu
(x, y)
boogu/models/transformers/components.py:4
Methodtext_guidance_scale
(self)
boogu/pipelines/boogu/pipeline_boogu.py:2632
Functionto_bool
(s)
inference_turbo.py:56
Functionto_bool
(s)
inference.py:56
Methodtorch_version
(self)
utils/get_flash_attn.py:49
Functiontriton_autotune_configs
()
boogu/ops/triton/layer_norm.py:37
Methodunfuse_lora
r""" Reverses the effect of [`pipe.fuse_lora()`](https://huggingface.co/docs/diffusers/main/en/api/loaders#diffusers.loaders.LoraBaseM
boogu/pipelines/lora_pipeline.py:581
Functionvalidate_device_format
Validates if the device parameter format is correct.
boogu/utils/validator_utils.py:17
← previous201–286 of 286, ranked by callers