MCPcopy Create free account

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

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

↓ 15 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
boogu/schedulers/scheduling_dpmsolver_multistep.py:433
↓ 8 callersFunctionapply_rotary_emb
Apply rotary embeddings to input tensors using the given frequency tensor. This function applies rotary embeddings to the given query or key
boogu/models/embeddings.py:80
↓ 8 callersMethodpredict
( self, t, latents, instruction_embeds, freqs_cis, instruction
boogu/pipelines/boogu/pipeline_boogu.py:3690
↓ 6 callersMethodcalculate_boosted_orthogonal_guidance
( self, model_pred: torch.Tensor, # [B, C, H, W] model_pred_uncond: torch.Tensor, #
boogu/pipelines/boogu/pipeline_boogu.py:3209
↓ 6 callersFunctionget_device_validator
Factory function that returns a validator for device arguments. Base supported formats: 'cpu', 'cuda', or 'cuda:x' (where x is an integer).
boogu/utils/validator_utils.py:6
↓ 6 callersMethodupdate
(self, current_step: torch.Tensor)
boogu/pipelines/boogu/pipeline_boogu.py:126
↓ 5 callersMethod_check_and_wrap_input_images
Normalize input_images into a two-level batch structure with per-sample lists: - List[List[PIL.Image.Image]] or - Li
boogu/pipelines/boogu/pipeline_boogu.py:993
↓ 5 callersFunctioncache_init
Initialization for cache.
boogu/cache_functions/cache_init.py:8
↓ 5 callersMethoddevices_manager
( self, instant_device_2_use: Literal[None, "cpu", "cuda", "cuda:x"] = None, instant_r
boogu/pipelines/boogu/pipeline_boogu.py:378
↓ 4 callersFunction_get_taylor_cache_entry
( cache_dic: Dict, current: Dict, create: bool = False )
boogu/taylorseer_utils/__init__.py:7
↓ 4 callersMethod_is_encoder_equals_reasoner
(self)
boogu/pipelines/boogu/pipeline_boogu.py:734
↓ 4 callersMethodget_default_rewrite_system_prompt
( self, task_type: str = "image-generation", language: str = "zh" )
boogu/pipelines/boogu/instruct_reasoner_static_skills.py:299
↓ 4 callersMethodget_new_height_width
r""" Returns target `(height, width)` after optional downscaling and rounding to `vae_scale_factor` multiples. Args:
boogu/pipelines/image_processor.py:82
↓ 4 callersFunctionis_flash_attn_available
()
boogu/utils/import_utils.py:52
↓ 4 callersFunctionprint_install_command
(command)
utils/get_flash_attn.py:326
↓ 3 callersMethod__init__
(self, prompt_tuning_configs)
boogu/models/transformers/transformer_boogu.py:81
↓ 3 callersMethod__init__
( self, embedding_dim: int, norm_eps: float, norm_elementwise_affine: bool,
boogu/models/transformers/block_lumina2.py:47
↓ 3 callersMethod_apply_text_instruct_rewrite_template
Format the instruction with the system prompt. If `return_str` is True, it will call `self.instruction_rewriter_processor.tokenizer.a
boogu/pipelines/boogu/pipeline_boogu.py:1664
↓ 3 callersMethod_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:1181
↓ 3 callersMethod_get_polish_text_system_prompts
Get system text prompts for rewriting text instructions. Returns a tuple of lists: (rewrite_text_prompts, magic_prompts)
boogu/pipelines/boogu/pipeline_boogu.py:1762
↓ 3 callersFunction_normalize_bool_flag
(value)
boogu/utils/validator_utils.py:62
↓ 3 callersMethod_reshape_embeds_and_mask
To duplicate text embeddings and attention mask for each generation per instruction, using mps friendly method
boogu/pipelines/boogu/pipeline_boogu.py:1708
↓ 3 callersMethod_validate_device_format
( self, device: Literal[None, "cpu", "cuda", "cuda:x"] = "cpu", rewriter_device: Liter
boogu/pipelines/boogu/pipeline_boogu.py:272
↓ 3 callersMethodpreprocess_vlm_input_pil_images
Resize input PIL images for VLM encoding, matching dataset behavior exactly as in BOOGUTrainTorchIterableTI2IDataset.preprocess_vlm_i
boogu/pipelines/boogu/pipeline_boogu.py:894
↓ 2 callersMethod__init__
(self, momentum_weight: float = 0.1, current_weight: float = 0.9)
boogu/pipelines/boogu/pipeline_boogu.py:121
↓ 2 callersMethod__init__
Initialize the attention processor.
boogu/models/attention_processor.py:1155
↓ 2 callersMethod__init__
( self, theta: int, axes_dim: Tuple[int, int, int], axes_lens: Tuple[int, int,
boogu/models/transformers/rope.py:29
↓ 2 callersMethod_apply_chat_template
Build chat template content with interleaved text and images. If `system_prompt_follows_task_type` is True, the system prompt will be
boogu/pipelines/boogu/pipeline_boogu.py:1574
↓ 2 callersMethod_concat_instruction_image_features
Concatenate instruction (text & image) and reference image features (instruction first, then image). Args: img_hidden_st
boogu/models/attention_processor.py:192
↓ 2 callersMethod_concat_instruction_image_features
Concatenate instruction (text & image) and reference image features (instruction first, then image). Args: img_hidden_st
boogu/models/attention_processor.py:593
↓ 2 callersMethod_get_lin_function
( x1: float = 256, y1: float = 0.5, x2: float = 4096, y2: float = 1.15 )
boogu/schedulers/scheduling_flow_match_euler_discrete_time_shifting.py:136
↓ 2 callersMethod_get_max_image_pixels
( self, num_images: int, max_input_image_pixels: Union[int, list, tuple] = 1024 * 1024
boogu/pipelines/boogu/pipeline_boogu.py:1732
↓ 2 callersMethod_get_polish_text_image_system_prompts
( self, ori_text: Union[str, List[str]], input_images: Union[ List[Union[P
boogu/pipelines/boogu/pipeline_boogu.py:1810
↓ 2 callersMethod_get_task_type_by_ref_latents
( self, ref_latents: List[Union[List[torch.FloatTensor], None]] )
boogu/pipelines/boogu/pipeline_boogu.py:3001
↓ 2 callersMethod_get_txt_language
(self, text)
boogu/pipelines/boogu/pipeline_boogu.py:1751
↓ 2 callersFunction_is_package_available
(pkg_name: str)
boogu/utils/import_utils.py:31
↓ 2 callersFunction_layer_norm_bwd
( dy, x, weight, bias, eps, mean, rstd, dresidual=None, dy1=None, weig
boogu/ops/triton/layer_norm.py:637
↓ 2 callersFunction_layer_norm_fwd
( x, weight, bias, eps, residual=None, x1=None, weight1=None, bias1=None,
boogu/ops/triton/layer_norm.py:303
↓ 2 callersMethod_merge_instructions
(self, instructs_list: List[str], batch_size: int)
boogu/pipelines/boogu/pipeline_boogu.py:2243
↓ 2 callersMethod_project_matrix
Project m0 onto m1 by treating each [H, W] slice as a matrix. Args: m0: Input tensor to be decomposed, shape [B, C, H, W]
boogu/pipelines/boogu/pipeline_boogu.py:3065
↓ 2 callersMethod_threshold_sample
"Dynamic thresholding: At each sampling step we set s to a certain percentile absolute pixel value in xt0 (the prediction of x_0 at t
boogu/schedulers/scheduling_dpmsolver_multistep.py:368
↓ 2 callersMethod_time_shift_v1
(t_np: np.ndarray, mu: float, sigma: float = 1.0)
boogu/schedulers/scheduling_flow_match_euler_discrete_time_shifting.py:144
↓ 2 callersMethod_time_shift_v2
(t_np: np.ndarray, m: float)
boogu/schedulers/scheduling_flow_match_euler_discrete_time_shifting.py:156
↓ 2 callersFunctionalpha_bar_fn
(t)
boogu/schedulers/scheduling_dpmsolver_multistep.py:64
↓ 2 callersFunctioncustom_amp_decorator
(dec: Callable, cuda_amp_deprecated: bool)
boogu/ops/triton/layer_norm.py:17
↓ 2 callersFunctiondaoai_candidates
(flash_attn_version, env)
utils/get_flash_attn.py:331
↓ 2 callersMethodindex_for_timestep
(self, timestep, schedule_timesteps=None)
boogu/schedulers/scheduling_dpmsolver_multistep.py:944
↓ 2 callersFunctioninstall_from_source
()
utils/get_flash_attn.py:358
↓ 2 callersFunctionis_triton_available
()
boogu/utils/import_utils.py:48
↓ 2 callersFunctionload_llm_or_vlm
( pretrained_model_name_or_path: str, weight_dtype, RETURN_GENERATION_MODEL: bool = True,
inference_turbo.py:641
↓ 2 callersFunctionload_llm_or_vlm
( pretrained_model_name_or_path: str, weight_dtype, RETURN_GENERATION_MODEL: bool = True,
inference.py:737
↓ 2 callersMethodload_lora_prompt_embedding_weights
Load LoRA weights specified in `pretrained_model_name_or_path_or_dict` into `self.prompt_embedding`. All kwargs are forwarded to `sel
boogu/pipelines/lora_pipeline.py:233
↓ 2 callersMethodload_lora_weights
Load LoRA weights specified in `pretrained_model_name_or_path_or_dict` into `self.transformer` and `self.text_encoder`. All kwargs ar
boogu/pipelines/lora_pipeline.py:172
↓ 2 callersMethodlora_state_dict
r""" Return state dict for lora weights and the network alphas. <Tip warning={true}> We support loading A1111 formatted LoRA
boogu/pipelines/lora_pipeline.py:68
↓ 2 callersFunctionnormalize_platform_name
Normalize platform tags the same way as the mjunya wheel browser.
utils/get_flash_attn.py:71
↓ 2 callersFunctionpip_install_command
(target)
utils/get_flash_attn.py:318
↓ 2 callersFunctionpreprocess
Preprocess the input images.
inference_turbo.py:1013
↓ 2 callersFunctionpreprocess
Preprocess the input images.
inference.py:1154
↓ 2 callersMethodset_custom_local_instruction_rewriter_model
( self, custom_local_instruction_rewriter_model, device=None )
boogu/pipelines/boogu/pipeline_boogu.py:638
↓ 2 callersMethodset_instruction_rewriter_processor
Set the processor used by the local instruction rewriter.
boogu/pipelines/boogu/pipeline_boogu.py:661
↓ 2 callersMethodset_mllm
mllm's setter
boogu/pipelines/boogu/pipeline_boogu.py:488
↓ 2 callersMethodset_processor
processor's setter
boogu/pipelines/boogu/pipeline_boogu.py:574
↓ 2 callersMethodset_prompt_embedding
Set or clear the prompt-tuning embedding module.
boogu/pipelines/boogu/pipeline_boogu.py:674
↓ 2 callersMethodset_scheduler
scheduler's setter
boogu/pipelines/boogu/pipeline_boogu.py:602
↓ 2 callersMethodset_timesteps
( self, num_inference_steps: int = None, device: Union[str, torch.device] = None,
boogu/schedulers/scheduling_dpmsolver_multistep.py:331
↓ 2 callersMethodset_transformer
transformer's setter
boogu/pipelines/boogu/pipeline_boogu.py:609
↓ 2 callersFunctionsource_build_command
()
utils/get_flash_attn.py:322
↓ 2 callersFunctiontaylor_cache_init
Initialize Taylor storage for the first step/module access. The target location is `cache_dic['cache'][-1][stream][layer][module]`.
boogu/taylorseer_utils/__init__.py:148
↓ 2 callersFunctionvalidate_device_and_offload_strategy_compatibility
Validate whether the device and offload strategy are compatible.
boogu/utils/validator_utils.py:50
↓ 1 callersMethod_apply_edit_instruct_rewrite_template
Format the instruction with the system prompt. `input_images` could be List[str] or List[PIL.Image.Image]. `List[str]` means a list o
boogu/pipelines/boogu/pipeline_boogu.py:1623
↓ 1 callersMethod_build_dmd_student_sigmas
( self, num_inference_steps: int, device: torch.device, dtype: torch.dtype,
boogu/pipelines/boogu/pipeline_boogu_turbo.py:43
↓ 1 callersMethod_check_device_strategy_validity
( self, enable_model_cpu_offload_flag: bool = None, enable_sequential_cpu_offload_flag
boogu/pipelines/boogu/pipeline_boogu.py:292
↓ 1 callersFunction_disable_deepgemm_for_fp8_vlm
()
inference_turbo.py:727
↓ 1 callersFunction_disable_deepgemm_for_fp8_vlm
()
inference.py:823
↓ 1 callersMethod_get_freqs_cis
(self, freqs_cis, ids: torch.Tensor)
boogu/models/transformers/rope.py:55
↓ 1 callersMethod_get_freqs_cis
(self, freqs_cis, ids: torch.Tensor)
boogu/models/transformers/rope.py:250
↓ 1 callersMethod_get_task_type_by_input_images
( self, input_images: Union[List[List[PIL.Image.Image]], List[PIL.Image.Image]] )
boogu/pipelines/boogu/pipeline_boogu.py:3013
↓ 1 callersMethod_init_step_index
(self, timestep)
boogu/schedulers/scheduling_flow_match_euler_discrete_time_shifting.py:256
↓ 1 callersMethod_init_step_index
Initialize the step_index counter for the scheduler.
boogu/schedulers/scheduling_dpmsolver_multistep.py:963
↓ 1 callersMethod_initialize_weights
(self)
boogu/models/transformers/block_lumina2.py:206
↓ 1 callersMethod_newtonschulz5_batched
Batched Newton-Schulz iteration. Accepts: - (H, W) -> returns (H, W) - (N, H, W) -> returns (N, H, W)
boogu/pipelines/boogu/pipeline_boogu.py:3098
↓ 1 callersMethod_polish_instructions_with_remote_rewriter
( self, ori_text: Union[str, List[str]], input_image_paths: Optional[Union[List[List[s
boogu/pipelines/boogu/pipeline_boogu.py:2076
↓ 1 callersMethod_polish_text_image_instructions
Rewrite input text instructions with input images using self.text_instruction_rewriter. Supports batch inputs (list[str]). Returns a
boogu/pipelines/boogu/pipeline_boogu.py:1978
↓ 1 callersMethod_polish_text_instructions
Rewrite input text instructions using self.text_instruction_rewriter. Supports batch inputs (list[str]). Returns a list[str] where ea
boogu/pipelines/boogu/pipeline_boogu.py:1879
↓ 1 callersMethod_predict_dmd_student_step
( self, latents: torch.FloatTensor, sigma: float, instruction_embeds: torch.Fl
boogu/pipelines/boogu/pipeline_boogu_turbo.py:74
↓ 1 callersMethod_renoise_dmd_latents
( self, latents: torch.FloatTensor, sigma: float, generator: Optional[Union[to
boogu/pipelines/boogu/pipeline_boogu_turbo.py:100
↓ 1 callersMethod_resolve_output_and_original_size
( self, input_images, ref_latents: List[Union[List[torch.FloatTensor], None]],
boogu/pipelines/boogu/pipeline_boogu.py:2951
↓ 1 callersMethod_rewrite_text_instruction
( self, instruction: Union[str, List[str]], input_images: Optional[List[List[PIL.Image
boogu/pipelines/boogu/pipeline_boogu.py:2142
↓ 1 callersMethod_sigmoid_kernel
x: [N] return: kernel of x
boogu/pipelines/boogu/pipeline_boogu.py:3025
↓ 1 callersMethod_simple_rms_norm
Simple RMS normalization implementation using native PyTorch. Args: x: Input tensor [..., hidden_size] weigh
boogu/ops/simple_layer_norm.py:60
↓ 1 callersMethod_softmax_kernel
x: [N] or [B, N] return: lambda * softmax(x / tau)
boogu/pipelines/boogu/pipeline_boogu.py:3032
↓ 1 callersMethod_split_instruction_image_features
Split concatenated features back to instruction and image features. Inverse operation of _concat_instruction_image_features.
boogu/models/attention_processor.py:247
↓ 1 callersMethod_split_instruction_image_features
Split concatenated features back to instruction and image features. Inverse operation of _concat_instruction_image_features.
boogu/models/attention_processor.py:648
↓ 1 callersFunction_tree_add
(lhs, rhs)
boogu/taylorseer_utils/__init__.py:36
↓ 1 callersFunction_tree_div
(value, divisor)
boogu/taylorseer_utils/__init__.py:30
↓ 1 callersFunction_tree_mul
(value, scalar)
boogu/taylorseer_utils/__init__.py:44
↓ 1 callersFunction_tree_sub
(lhs, rhs)
boogu/taylorseer_utils/__init__.py:24
↓ 1 callersMethod_upad_input
Unpad the input tensors for flash attention. Same implementation as BooguImageAttnProcessorFlash2Varlen.
boogu/models/attention_processor.py:115
↓ 1 callersMethod_upad_input
Unpad the input tensors for flash attention. Args: query_layer: Query tensor of shape (batch_size, seq_len, num_heads, h
boogu/models/attention_processor.py:902
↓ 1 callersFunctionapply_cache_dit_caching
Apply Cache-DiT caching to the pipeline. Args: pipeline: The pipeline to apply Cache-DiT caching to. all_layers: Whether
inference.py:674
next →1–100 of 286, ranked by callers