MCPcopy Create free account

hub / github.com/Tencent-Hunyuan/HY-SOAR / functions

Functions148 in github.com/Tencent-Hunyuan/HY-SOAR

↓ 80 callersMethodto
(self, device: torch.device = None, dtype: torch.dtype = None)
soar/flow_grpo/ema.py:47
↓ 8 callersFunctionis_main_process
Checks if the current process is the main one (rank 0).
soar/evaluation.py:51
↓ 6 callersFunctionunwrap_model
(model, accelerator)
soar/utils/model.py:133
↓ 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
soar/flow_grpo/prompts.py:14
↓ 5 callersFunction_sigma_to_alpha_sigma_t
(sigma)
soar/flow_grpo/diffusers_patch/solver.py:354
↓ 5 callersFunctionfrom_file
(path, low=None, high=None)
soar/flow_grpo/prompts.py:28
↓ 4 callersFunctiont_to_sigma_timestep
Convert normalized t in [0, 1] to scheduler sigma and timestep.
soar/utils/algorithm.py:17
↓ 3 callersFunctionarea_fn
(box)
soar/flow_grpo/gen_eval.py:124
↓ 3 callersFunctionimport_model_class_from_model_name_or_path
( pretrained_model_name_or_path: str, revision: str, subfolder: str = "text_encoder", )
soar/utils/model.py:17
↓ 3 callersMethodload_state_dict
(self, state_dict: dict)
soar/flow_grpo/ema.py:82
↓ 2 callersMethod__init__
(self, dtype, device)
soar/flow_grpo/hpsv2_scorer.py:86
↓ 2 callersFunction_append_interpolated
(path_indices, z_t1_prime, sigma_t1_sub, sigma_upper_sub)
soar/utils/algorithm.py:159
↓ 2 callersFunctioncolor_classification
(image, bboxes, classname)
soar/flow_grpo/gen_eval.py:104
↓ 2 callersFunctioncompute_geneval
(images, metadatas, only_strict=False)
soar/flow_grpo/gen_eval.py:345
↓ 2 callersFunctioncompute_text_embeddings
(prompt)
soar/train_soar_sd3_5m.py:336
↓ 2 callersFunctionconvert_model_output
( model_output, sample, sigmas, step_index, )
soar/flow_grpo/diffusers_patch/solver.py:264
↓ 2 callersFunctionddim_update
( model_output: torch.Tensor, sigmas, step_index, sample: torch.Tensor = None, noise: Opti
soar/flow_grpo/diffusers_patch/solver.py:276
↓ 2 callersFunctionget_size
(size)
soar/flow_grpo/clip_scorer.py:11
↓ 2 callersFunctionload_geneval
(device)
soar/flow_grpo/gen_eval.py:22
↓ 2 callersFunctionmulti_score
(device, score_dict)
soar/flow_grpo/rewards.py:271
↓ 2 callersFunctionrelative_position
Give position of A relative to B, factoring in object dimensions
soar/flow_grpo/gen_eval.py:137
↓ 2 callersMethodstep
(self, parameters: Iterable[torch.nn.Parameter], optimization_step)
soar/flow_grpo/ema.py:29
↓ 2 callersMethodupdate
(self, model_output: torch.Tensor)
soar/flow_grpo/diffusers_patch/solver.py:198
↓ 1 callersMethod__init__
(self)
soar/flow_grpo/aesthetic_scorer.py:15
↓ 1 callersFunction_encode_prompt_with_clip
( text_encoder, tokenizer, prompt, device=None, num_images_per_prompt: int = 1, )
soar/utils/model.py:36
↓ 1 callersFunction_encode_prompt_with_clip
( text_encoder, tokenizer, prompt: str, device=None, text_input_ids=None, num_images_p
soar/flow_grpo/diffusers_patch/train_dreambooth_lora_sd3.py:59
↓ 1 callersFunction_encode_prompt_with_t5
( text_encoder, tokenizer, max_sequence_length, prompt=None, num_images_per_prompt=1,
soar/utils/model.py:63
↓ 1 callersFunction_encode_prompt_with_t5
( text_encoder, tokenizer, max_sequence_length, prompt=None, num_images_per_prompt=1,
soar/flow_grpo/diffusers_patch/train_dreambooth_lora_sd3.py:19
↓ 1 callersFunction_extract_scores
(text_outputs)
soar/flow_grpo/rewards.py:194
↓ 1 callersFunction_extract_scores
(text_outputs)
soar/flow_grpo/unifiedreward_scorer.py:18
↓ 1 callersFunction_parse_caption
(raw: str)
soar/utils/data.py:24
↓ 1 callersMethod_process
(self, pixels)
soar/flow_grpo/clip_scorer.py:42
↓ 1 callersFunctionbuild_bucket_dataloader
Build a DataLoader from JSONL with bucket-resolution batching.
soar/utils/data.py:193
↓ 1 callersFunctioncalculate_shift
( image_seq_len, base_seq_len: int = 256, max_seq_len: int = 4096, base_shift: float = 0.5,
soar/flow_grpo/diffusers_patch/pipeline_with_logprob.py:14
↓ 1 callersFunctioncleanup_distributed
Destroys the distributed process group.
soar/evaluation.py:46
↓ 1 callersMethodclear
(self)
soar/flow_grpo/stat_tracking.py:38
↓ 1 callersFunctioncompute_iou
(box_a, box_b)
soar/flow_grpo/gen_eval.py:123
↓ 1 callersFunctiondance_grpo_step
( model_output: torch.Tensor, latents: torch.Tensor, eta: float, sigmas: torch.Tensor, ind
soar/flow_grpo/diffusers_patch/solver.py:125
↓ 1 callersFunctionddim_step
( model_output: torch.Tensor, latents: torch.Tensor, eta: float, sigmas: torch.Tensor, ind
soar/flow_grpo/diffusers_patch/solver.py:160
↓ 1 callersFunctiondpm_solver_first_order_update
( model_output: torch.Tensor, sigmas, step_index, sample: torch.Tensor = None, )
soar/flow_grpo/diffusers_patch/solver.py:299
↓ 1 callersFunctiondpm_step
( order, model_output: torch.Tensor, sample: torch.Tensor, step_index: int, timesteps: lis
soar/flow_grpo/diffusers_patch/solver.py:208
↓ 1 callersFunctionencode_prompt
Encode a prompt using CLIP (x2) + T5 text encoders.
soar/utils/model.py:87
↓ 1 callersFunctionevaluate
Evaluate given image using detected objects on the global metadata specifications. Assumptions: * Metadata combines 'include'
soar/flow_grpo/gen_eval.py:160
↓ 1 callersFunctionevaluate_batch_image
(images, prompts)
soar/flow_grpo/rewards.py:248
↓ 1 callersFunctionevaluate_batch_image
(images, prompts)
soar/flow_grpo/unifiedreward_scorer.py:75
↓ 1 callersFunctionevaluate_image
(prompt, image)
soar/flow_grpo/rewards.py:210
↓ 1 callersFunctionevaluate_image
(prompt, image)
soar/flow_grpo/unifiedreward_scorer.py:36
↓ 1 callersFunctionevaluate_image
(image_pils, metadatas, only_strict)
soar/flow_grpo/gen_eval.py:287
↓ 1 callersFunctionevaluate_reward
Evaluate given image using detected objects on the global metadata specifications. Assumptions: * Metadata combines 'include'
soar/flow_grpo/gen_eval.py:222
↓ 1 callersFunctionflow_grpo_step
( model_output: torch.Tensor, latents: torch.Tensor, eta: float, sigmas: torch.Tensor, ind
soar/flow_grpo/diffusers_patch/solver.py:79
↓ 1 callersMethodget_current_decay
(self, optimization_step)
soar/flow_grpo/ema.py:25
↓ 1 callersFunctionget_image_transform
(processor: AutoImageProcessor)
soar/flow_grpo/clip_scorer.py:22
↓ 1 callersMethodget_stats
(self)
soar/flow_grpo/stat_tracking.py:33
↓ 1 callersFunctionimage_transform_tensor
( image_size: int, mean: tuple = None, std: tuple = None, fill_color: int = 0, )
soar/flow_grpo/hpsv2_scorer.py:62
↓ 1 callersFunctionjpeg_incompressibility
()
soar/flow_grpo/rewards.py:9
↓ 1 callersFunctionload_models
()
soar/flow_grpo/gen_eval.py:39
↓ 1 callersFunctionmain
(args)
soar/evaluation.py:94
↓ 1 callersFunctionmain
(args)
soar/train_soar_sd3_5m.py:158
↓ 1 callersFunctionmain
()
soar/flow_grpo/rewards.py:325
↓ 1 callersFunctionmain
()
soar/flow_grpo/unifiedreward_scorer.py:82
↓ 1 callersFunctionmain
()
soar/flow_grpo/hpsv2_scorer.py:134
↓ 1 callersFunctionmain
()
soar/flow_grpo/stat_tracking.py:75
↓ 1 callersFunctionmain
()
soar/flow_grpo/aesthetic_scorer.py:56
↓ 1 callersFunctionmain
()
soar/flow_grpo/imagereward_scorer.py:31
↓ 1 callersFunctionmain
()
soar/flow_grpo/clip_scorer.py:59
↓ 1 callersFunctionmain
()
soar/flow_grpo/pickscore_scorer.py:55
↓ 1 callersFunctionmake_load_model_hook
(accelerator)
soar/utils/model.py:153
↓ 1 callersFunctionmake_save_model_hook
(accelerator)
soar/utils/model.py:139
↓ 1 callersFunctionmultistep_dpm_solver_second_order_update
( model_output_list: List[torch.Tensor], sigmas, step_index, sample: torch.Tensor = None, )
soar/flow_grpo/diffusers_patch/solver.py:318
↓ 1 callersFunctionparse_args
()
soar/train_soar_sd3_5m.py:74
↓ 1 callersFunctionpil_image_to_base64
(image)
soar/flow_grpo/rewards.py:187
↓ 1 callersFunctionpil_image_to_base64
(image)
soar/flow_grpo/unifiedreward_scorer.py:10
↓ 1 callersMethodresize_and_crop
(image: Image.Image, target_wh: Tuple[int, int])
soar/utils/data.py:71
↓ 1 callersFunctionrun_sampling
( v_pred_fn, z, sigma_schedule, solver="flow", determistic=False, eta=0.7, )
soar/flow_grpo/diffusers_patch/solver.py:15
↓ 1 callersMethodset_epoch
(self, epoch: int)
soar/utils/data.py:179
↓ 1 callersFunctionsetup_distributed
Initializes the distributed process group.
soar/evaluation.py:39
↓ 1 callersFunctionsigma_to_t
Convert sigma back to normalized t in [0, 1].
soar/utils/algorithm.py:26
↓ 1 callersFunctionsingle_step_aux_points
Construct auxiliary supervision points via one-step rollout + interpolation. 1. From z_t0, take one ODE step to t1 = max(t0 - 1/num_sampling_step
soar/utils/algorithm.py:105
↓ 1 callersMethodstate_dict
(self)
soar/flow_grpo/ema.py:87
↓ 1 callersFunctionstochastic_rollout_step
Apply one stochastic rollout step. Supported modes: - simple: additive Euler-Maruyama noise - sde: diffusers-style stochastic
soar/utils/algorithm.py:36
↓ 1 callersMethodupdate
(self, prompts, rewards, exp=False)
soar/flow_grpo/stat_tracking.py:11
↓ 1 callersMethodupdate_lower_order
(self)
soar/flow_grpo/diffusers_patch/solver.py:203
↓ 1 callersFunctionv_pred_fn
(z, sigma)
soar/flow_grpo/diffusers_patch/pipeline_with_logprob.py:213
Method__call__
(self, images, prompts)
soar/flow_grpo/hpsv2_scorer.py:123
Method__call__
(self, images)
soar/flow_grpo/aesthetic_scorer.py:46
Method__call__
Calculate OCR reward :param images: List of input images (PIL or numpy format) :param prompts: Corresponding target text list
soar/flow_grpo/ocr.py:21
Method__call__
(self, prompts, images)
soar/flow_grpo/imagereward_scorer.py:24
Method__call__
(self, pixels, prompts, return_img_embedding=False)
soar/flow_grpo/clip_scorer.py:50
Method__call__
(self, prompt, images)
soar/flow_grpo/pickscore_scorer.py:18
Method__getitem__
(self, idx)
soar/evaluation.py:67
Method__getitem__
(self, idx)
soar/evaluation.py:83
Method__getitem__
(self, idx)
soar/utils/data.py:85
Method__getitem__
(self, index)
soar/flow_grpo/gen_eval.py:90
Method__init__
(self, dataset_path, split="test")
soar/evaluation.py:57
Method__init__
(self, dataset_path, split="test")
soar/evaluation.py:72
Method__init__
(self, md5: str, bucket: Tuple[int, int], caption: str)
soar/utils/data.py:43
Method__init__
( self, samples: List[_Sample], image_dir: str, bucket_to_indices: Dict[Tuple[
soar/utils/data.py:50
Method__init__
( self, samples: List[_Sample], bucket_to_indices: Dict[Tuple, List[int]], bat
soar/utils/data.py:112
Method__init__
( self, parameters: Iterable[torch.nn.Parameter], decay: float = 0.9999, updat
soar/flow_grpo/ema.py:9
Method__init__
(self, max_size, interpolation=InterpolationMode.BICUBIC, fn="max", fill=0)
soar/flow_grpo/hpsv2_scorer.py:17
next →1–100 of 148, ranked by callers