MCPcopy Create free account

hub / github.com/CIawevy/TextPecker / functions

Functions1,395 in github.com/CIawevy/TextPecker

↓ 457 callersMethodto
(self, device: torch.device = None, dtype: torch.dtype = None)
RL/flow_grpo/flow_grpo/ema.py:58
↓ 81 callersMethodsave
(self, output_path, merge_before_save=False, save_config=True)
eval/OneIG-Benchmark/scripts/utils/llm2clip/llm2vec/llm2vec.py:375
↓ 69 callersMethodupdate
(self, prompts, rewards, type='grpo')
RL/flow_grpo/flow_grpo/stat_tracking.py:11
↓ 63 callersMethodfrom_pretrained
( cls, base_model_name_or_path, peft_model_name_or_path=None, merge_peft=False
eval/OneIG-Benchmark/scripts/utils/llm2clip/llm2vec/llm2vec.py:66
↓ 52 callersMethodfrom_pretrained
(cls, pretrained_model_name_or_path: Union[str, os.PathLike], **kwargs)
RL/flow_grpo/flow_grpo/bagel/modeling/siglip/configuration_siglip.py:103
↓ 40 callersMethodbatch_decode
This method forwards all its arguments to SiglipTokenizer's [`~PreTrainedTokenizer.batch_decode`]. Please refer to the docstring of t
RL/flow_grpo/flow_grpo/bagel/modeling/siglip/processing_siglip.py:119
↓ 36 callersMethodstep
(self, parameters: Iterable[torch.nn.Parameter], optimization_step)
RL/flow_grpo/flow_grpo/ema.py:40
↓ 32 callersMethoddecode
(self, z: Tensor)
RL/flow_grpo/flow_grpo/bagel/modeling/autoencoder.py:320
↓ 27 callersMethodcopy_ema_to
(self, parameters: Iterable[torch.nn.Parameter], store_temp: bool = True)
RL/flow_grpo/flow_grpo/ema.py:65
↓ 27 callersMethodcopy_temp_to
(self, parameters: Iterable[torch.nn.Parameter])
RL/flow_grpo/flow_grpo/ema.py:73
↓ 24 callersFunctionsde_step_with_logprob
Predict the sample from the previous timestep by reversing the SDE. This function propagates the flow process from the learned model outputs
RL/flow_grpo/flow_grpo/diffusers_patch/sd3_sde_with_logprob.py:11
↓ 23 callersFunctioncompressibility
()
RL/flow_grpo/config/grpo.py:7
↓ 20 callersMethodencode
(self, x: Tensor)
RL/flow_grpo/flow_grpo/bagel/modeling/autoencoder.py:315
↓ 18 callersMethodclear
(self)
RL/flow_grpo/flow_grpo/stat_tracking.py:62
↓ 17 callersMethodget_stats
(self)
RL/flow_grpo/flow_grpo/stat_tracking.py:57
↓ 16 callersMethodbackward
(ctx, grad_output)
eval/OneIG-Benchmark/scripts/utils/CSD_config.py:50
↓ 16 callersMethodwrite
(self, obj)
eval/TIIF-Bench/eval/summary_dimension_results.py:15
↓ 15 callersMethodencode_prompt
r""" Args: prompt (`str` or `List[str]`, *optional*): prompt to be encoded prompt_2 (`str` or `L
eval/TextCrafter/TextCrafter_SD3/textcrafter_pipeline_sd3.py:378
↓ 15 callersMethodprepare_latents
( self, batch_size, num_channels_latents, height, width,
eval/TextCrafter/TextCrafter_SD3/textcrafter_pipeline_sd3.py:717
↓ 14 callersMethodcheck_inputs
( self, prompt, prompt_2, prompt_3, height, width,
eval/TextCrafter/TextCrafter_SD3/textcrafter_pipeline_sd3.py:621
↓ 13 callersMethod__init__
(self, config)
RL/flow_grpo/flow_grpo/bagel/modeling/siglip/modeling_siglip.py:589
↓ 13 callersMethodload_state_dict
(self, state_dict: dict)
RL/flow_grpo/flow_grpo/ema.py:79
↓ 13 callersFunctionretrieve_timesteps
r""" Calls the scheduler's `set_timesteps` method and retrieves timesteps from the scheduler after the call. Handles custom timesteps. Any k
eval/TextCrafter/TextCrafter_SD3/textcrafter_pipeline_sd3.py:105
↓ 13 callersFunctionset_seed
(seed, device_specific=True)
RL/flow_grpo/scripts/train_qwenimage.py:52
↓ 12 callersFunctionfsdp_wrapper
(model, fsdp_config, get_transformer_layer_cls, ignored_modules=None)
RL/flow_grpo/flow_grpo/fsdp_utils.py:39
↓ 11 callersMethodforward
Args: sequence_length: length of sequence. packed_text_ids: 1-D int tensor, packed text token ids. packed
RL/flow_grpo/flow_grpo/bagel/modeling/bagel/bagel.py:107
↓ 10 callersMethod_unpack_latents
(latents, height, width, vae_scale_factor)
eval/TextCrafter/TextCrafter_Flux/textcrafter_pipeline_flux.py:520
↓ 10 callersMethodencode
Encode a list of sentences to their respective embeddings. The sentences can be a list of strings or a string. Args: sent
eval/OneIG-Benchmark/scripts/utils/llm2clip/llm2vec/llm2vec.py:301
↓ 10 callersFunctionpipeline_with_logprob
( self, prompt: Union[str, List[str]] = None, prompt_2: Optional[Union[str, List[str]]] = None,
RL/flow_grpo/flow_grpo/diffusers_patch/sd3_pipeline_with_logprob.py:11
↓ 10 callersMethodstate_dict
(self)
RL/flow_grpo/flow_grpo/ema.py:84
↓ 8 callersMethod__init__
(self, config)
RL/flow_grpo/flow_grpo/bagel/modeling/bagel/siglip_navit.py:248
↓ 8 callersMethod__init__
(self, num_layers)
RL/flow_grpo/flow_grpo/bagel/modeling/bagel/qwen2_navit.py:205
↓ 7 callersMethod__init__
( self, resolution: int, in_channels: int, ch: int, ch_mult: list[int]
RL/flow_grpo/flow_grpo/bagel/modeling/autoencoder.py:123
↓ 7 callersMethod__init__
(self, config)
RL/flow_grpo/flow_grpo/bagel/modeling/qwen2/modeling_qwen2.py:191
↓ 6 callersFunctionapply_rotary_pos_emb
Applies Rotary Position Embedding to the query and key tensors. Args: q (`torch.Tensor`): The query tensor. k (`torch.Tensor`): T
RL/flow_grpo/flow_grpo/bagel/modeling/qwen2/modeling_qwen2.py:162
↓ 6 callersFunctionencode_prompt
( text_encoders, tokenizers, prompt: str, max_sequence_length, device=None, num_images
RL/flow_grpo/flow_grpo/diffusers_patch/train_dreambooth_lora_sd3.py:98
↓ 6 callersFunctiongather_tensor
(tensor, world_size)
RL/flow_grpo/scripts/train_qwenimage_fast_guard.py:44
↓ 6 callersFunctiongather_tensor
(tensor, world_size)
RL/flow_grpo/scripts/train_qwenimage_fast.py:44
↓ 6 callersFunctiongather_tensor
(tensor, world_size)
RL/flow_grpo/scripts/train_qwenimage_edit.py:46
↓ 6 callersFunctiongather_tensor
(tensor, world_size)
RL/flow_grpo/scripts/train_qwenimage.py:44
↓ 6 callersFunctionpad_sequence
(tensor, pad_size)
RL/flow_grpo/flow_grpo/bagel/modeling/bagel/qwen2_navit.py:227
↓ 6 callersFunctionsplit_chinese_or_mix
(text_list)
RL/flow_grpo/flow_grpo/parse_utils_pecker.py:106
↓ 5 callersMethod__init__
(self, config: LlamaConfig)
eval/OneIG-Benchmark/scripts/utils/llm2clip/llm2vec/models/bidirectional_llama.py:90
↓ 5 callersFunction_load_lines
Load lines from a file. First tries to load from `path` directly, and if that doesn't exist, searches the `flow_grpo/assets` directory for a
RL/flow_grpo/flow_grpo/prompts.py:13
↓ 5 callersFunctioncalculate_shift
( image_seq_len, base_seq_len: int = 256, max_seq_len: int = 4096, base_shift: float = 0.5,
RL/flow_grpo/flow_grpo/diffusers_patch/flux_pipeline_with_logprob.py:9
↓ 5 callersFunctioncontain_chinese
(prompts)
eval/TextPecker_eval/parse_utils_pecker.py:77
↓ 5 callersFunctioncontain_chinese
(prompts)
RL/flow_grpo/flow_grpo/parse_utils_pecker.py:77
↓ 5 callersFunctionencode_prompt
r""" Encodes the prompt into text encoder hidden states. Args: prompt (`str` or `List[str]`, *optional*): prompt to be en
RL/flow_grpo/flow_grpo/diffusers_patch/wan_prompt_embedding.py:43
↓ 5 callersFunctionfrom_file
(path, low=None, high=None)
RL/flow_grpo/flow_grpo/prompts.py:27
↓ 5 callersMethodget_image_features
r""" Returns: image_features (`torch.FloatTensor` of shape `(batch_size, output_dim`): The image embeddings obtained by
RL/flow_grpo/flow_grpo/bagel/modeling/siglip/modeling_siglip.py:1274
↓ 5 callersFunctionparse_args
()
eval/OneIG-Benchmark/scripts/utils/utils.py:9
↓ 5 callersFunctionpre_c
加强版预处理函数: - 默认同时去除空白字符和标点符号 - 可通过参数控制是否去除标点符号 - 保留中文、英文、数字和#号
train/parse_utils.py:266
↓ 5 callersFunctionregister_optimizer_offload_hooks
(optimizer)
RL/flow_grpo/flow_grpo/fsdp_utils.py:133
↓ 5 callersFunctionsave2csv
(df, csv_path)
eval/OneIG-Benchmark/scripts/utils/utils.py:57
↓ 5 callersFunctionsave_fsdp_checkpoint
(save_dir, model, global_step, rank)
RL/flow_grpo/flow_grpo/fsdp_utils.py:90
↓ 5 callersFunctionsplit_2x2_grid
(image_path, grid_size, cache_dir)
eval/OneIG-Benchmark/scripts/utils/utils.py:26
↓ 5 callersMethodupdate_context_text
(self, text, gen_context)
RL/flow_grpo/flow_grpo/bagel/inferencer.py:40
↓ 4 callersMethod_get_clip_prompt_embeds
( self, prompt: Union[str, List[str]], num_images_per_prompt: int = 1, dev
eval/TextCrafter/TextCrafter_SD3/textcrafter_pipeline_sd3.py:323
↓ 4 callersFunctioncalculate_level_metrics
计算特定语言和级别(image/box)的指标
train/get_metrics_for_tsap_and_ctr.py:467
↓ 4 callersFunctioncompute_log_prob
(transformer, pipeline, sample, j, embeds, pooled_embeds, config)
RL/flow_grpo/scripts/train_sd3_fast_guard.py:200
↓ 4 callersFunctioncompute_log_prob
(transformer, pipeline, sample, j, config, rank)
RL/flow_grpo/scripts/train_qwenimage_fast_guard.py:226
↓ 4 callersFunctioncompute_log_prob
(transformer, pipeline, sample, j, config, rank)
RL/flow_grpo/scripts/train_qwenimage_fast.py:226
↓ 4 callersFunctioncompute_log_prob
(transformer, pipeline, sample, j, embeds, pooled_embeds, config)
RL/flow_grpo/scripts/train_sd3_GRPO_Guard.py:200
↓ 4 callersFunctioncompute_log_prob
(transformer, pipeline, sample, j, config)
RL/flow_grpo/scripts/train_flux_fast.py:204
↓ 4 callersFunctioncompute_log_prob
(transformer, pipeline, sample, j, config)
RL/flow_grpo/scripts/train_flux_fast_guard.py:204
↓ 4 callersFunctioncompute_text_embeddings
(prompt, text_encoders, tokenizers, max_sequence_length, device)
RL/flow_grpo/scripts/train_sd3_fast_guard.py:143
↓ 4 callersFunctioncompute_text_embeddings
(prompt, text_encoders, tokenizers, max_sequence_length, device)
RL/flow_grpo/scripts/train_sd3_GRPO_Guard.py:143
↓ 4 callersFunctioncompute_text_embeddings
(prompt, text_encoders, tokenizers, max_sequence_length, device)
RL/flow_grpo/scripts/train_sd3_fast.py:142
↓ 4 callersFunctioncompute_text_embeddings
(prompt, text_encoders, tokenizers, max_sequence_length, device)
RL/flow_grpo/scripts/train_sd3_sft.py:126
↓ 4 callersFunctioncompute_text_embeddings
(prompt, text_encoders, tokenizers, max_sequence_length, device)
RL/flow_grpo/scripts/train_sd3.py:124
↓ 4 callersFunctioncompute_text_embeddings
(prompt, text_encoders, tokenizers, max_sequence_length, device)
RL/flow_grpo/scripts/train_sd3_dpo.py:124
↓ 4 callersFunctioncompute_text_embeddings
(prompt, text_encoders, tokenizers, max_sequence_length, device)
RL/flow_grpo/scripts/train_wan2_1.py:125
↓ 4 callersFunctioncontain_chinese
(prompts)
RL/flow_grpo/flow_grpo/rewards.py:134
↓ 4 callersFunctioncounter2list
(counter)
eval/X-Omni/textbench/summary_scores.py:21
↓ 4 callersFunctiondisplay_model_scores_table
(raw_data: dict, categories: list, title: str)
eval/OneIG-Benchmark/fine_grained_analysis.py:30
↓ 4 callersMethodencode_image
Encodes the given image into a feature representation using a pre-trained image encoder. Args: image (`PipelineImageInput`):
eval/TextCrafter/TextCrafter_SD3/textcrafter_pipeline_sd3.py:887
↓ 4 callersFunctionencode_prompt
( text_encoders, tokenizers, prompt: str, max_sequence_length, device=None, num_images
RL/flow_grpo/flow_grpo/diffusers_patch/train_dreambooth_lora_flux.py:107
↓ 4 callersFunctionevaluate_batch_image
Creates and runs a batch of asynchronous evaluation tasks with proper error handling.
RL/flow_grpo/flow_grpo/rewards.py:675
↓ 4 callersFunctionevaluate_image
带重试机制的异步图像评估函数
RL/flow_grpo/flow_grpo/rewards.py:634
↓ 4 callersFunctionget_quality_score
(rec_text)
train/parse_utils.py:303
↓ 4 callersFunctioninit_distributed
Initialize distributed training
RL/flow_grpo/flow_grpo/fsdp_utils.py:141
↓ 4 callersMethodinsulation_replace_hidden_states
( self, hidden_states, insulation_hidden_states_list_list,
eval/TextCrafter/TextCrafter_Flux/textcrafter_transformer_flux.py:393
↓ 4 callersMethodinsulation_replace_hidden_states
( self, hidden_states, insulation_hidden_states_list_list,
eval/TextCrafter/TextCrafter_SD3/textcrafter_transformer_sd3.py:455
↓ 4 callersFunctionparse_prompt
根据语言模式解析prompt(en:英文解析,cn/zh:中文解析)
eval/TextPecker_eval/textpecker_eval_server.py:726
↓ 4 callersFunctionpil_image_to_base64
Converts a PIL image to a base64 string for API calls.
RL/flow_grpo/flow_grpo/rewards.py:547
↓ 4 callersFunctionpipeline_with_logprob
( self, image: Optional[PipelineImageInput] = None, prompt: Union[str, List[str]] = None, nega
RL/flow_grpo/flow_grpo/diffusers_patch/qwenimage_edit_pipeline_with_logprob.py:13
↓ 4 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
RL/flow_grpo/flow_grpo/bagel/modeling/qwen2/modeling_qwen2.py:205
↓ 4 callersFunctionswish
(x: Tensor)
RL/flow_grpo/flow_grpo/bagel/modeling/autoencoder.py:34
↓ 4 callersFunctiontextpecker_postprocess
响应后处理:提取识别文本,计算质量分、语义分 Args: response: LLMClient返回的原始响应 target: 参考文本(可选) Returns: result: 包含识别结果、评分的字典
eval/TextPecker_eval/demo.py:42
↓ 3 callersMethod_apply_scale
(self, width, height, scale)
RL/flow_grpo/flow_grpo/bagel/data/transforms.py:53
↓ 3 callersMethod_forward_flow
( self, x_t: torch.Tensor, timestep: torch.LongTensor, packed_vae_token_indexe
RL/flow_grpo/flow_grpo/bagel/modeling/bagel/bagel.py:1051
↓ 3 callersMethod_process
(self, pixels)
RL/flow_grpo/flow_grpo/clip_scorer.py:39
↓ 3 callersMethod_sde_step_with_logprob
( self, model_output, timestep, prev_timestep, d_timestep, sam
RL/flow_grpo/flow_grpo/bagel/modeling/bagel/bagel.py:986
↓ 3 callersFunctionbuild_df
(metric)
eval/TIIF-Bench/eval/summary_results.py:123
↓ 3 callersFunctioncompressibility
()
RL/flow_grpo/config/grpo_guard.py:7
↓ 3 callersFunctioncontain_chinese
(textline)
train/get_metrics_for_tsap_and_ctr.py:180
↓ 3 callersMethodfrom_pipeline
Create an instance from an existing Pipeline
eval/TextCrafter/TextCrafter_Flux/textcrafter_pipeline_flux.py:193
↓ 3 callersFunctiongenerate_rectangles_gurobi
Generates a rectangle corresponding to a given point, using the Gurobi. Parameters: - points: List of tuples [(x1, y1), (x2, y2), ..
eval/TextCrafter/TextCrafter_Flux/rectangles.py:9
↓ 3 callersFunctiongenerate_rectangles_gurobi
Generates a rectangle corresponding to a given point, using the Gurobi. Parameters: - points: List of tuples [(x1, y1), (x2, y2), ..
eval/TextCrafter/TextCrafter_SD3/rectangles.py:8
↓ 3 callersFunctionget_rec_template
Creates the prompt for the Recognition task
RL/flow_grpo/flow_grpo/rewards.py:572
next →1–100 of 1,395, ranked by callers