MCPcopy Create free account

hub / github.com/NVlabs/DiffusionNFT / functions

Functions148 in github.com/NVlabs/DiffusionNFT

↓ 64 callersMethodto
(self, device: torch.device = None, dtype: torch.dtype = None)
flow_grpo/ema.py:47
↓ 16 callersFunctionis_main_process
(rank)
scripts/train_nft_sd3.py:68
↓ 8 callersFunctionis_main_process
Checks if the current process is the main one (rank 0).
scripts/evaluation.py:53
↓ 5 callersFunction_get_config
(base_model="sd3", n_gpus=1, gradient_step_per_epoch=1, dataset="pickscore", reward_fn={}, name="")
config/nft.py:11
↓ 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
flow_grpo/prompts.py:14
↓ 5 callersFunction_sigma_to_alpha_sigma_t
(sigma)
flow_grpo/diffusers_patch/solver.py:353
↓ 5 callersFunctionfrom_file
(path, low=None, high=None)
flow_grpo/prompts.py:28
↓ 5 callersMethodget_mean_of_top_rewards
(self, top_percentage)
flow_grpo/stat_tracking.py:42
↓ 5 callersMethodload_state_dict
(self, state_dict: dict)
flow_grpo/ema.py:82
↓ 4 callersFunctioncompute_text_embeddings
(prompt, text_encoders, tokenizers, max_sequence_length, device)
scripts/train_nft_sd3.py:161
↓ 3 callersFunctiongather_tensor_to_all
(tensor, world_size)
scripts/train_nft_sd3.py:155
↓ 3 callersMethodstep
(self, parameters: Iterable[torch.nn.Parameter], optimization_step)
flow_grpo/ema.py:29
↓ 2 callersMethod__init__
(self, dtype, device)
flow_grpo/hpsv2_scorer.py:86
↓ 2 callersMethodclear
(self)
flow_grpo/stat_tracking.py:39
↓ 2 callersFunctioncolor_classification
(image, bboxes, classname)
flow_grpo/gen_eval.py:103
↓ 2 callersFunctioncompute_geneval
(images, metadatas, only_strict=False)
flow_grpo/gen_eval.py:343
↓ 2 callersFunctionconvert_model_output
( model_output, sample, sigmas, step_index, )
flow_grpo/diffusers_patch/solver.py:263
↓ 2 callersMethodcopy_ema_to
(self, parameters: Iterable[torch.nn.Parameter], store_temp: bool = True, grad=False)
flow_grpo/ema.py:64
↓ 2 callersMethodcopy_temp_to
(self, parameters: Iterable[torch.nn.Parameter])
flow_grpo/ema.py:75
↓ 2 callersFunctionddim_update
( model_output: torch.Tensor, sigmas, step_index, sample: torch.Tensor = None, noise: Opti
flow_grpo/diffusers_patch/solver.py:275
↓ 2 callersFunctionget_size
(size)
flow_grpo/clip_scorer.py:11
↓ 2 callersMethodget_stats
(self)
flow_grpo/stat_tracking.py:34
↓ 2 callersFunctionload_geneval
(DEVICE)
flow_grpo/gen_eval.py:23
↓ 2 callersFunctionmulti_score
(device, score_dict)
flow_grpo/rewards.py:256
↓ 2 callersFunctionpipeline_with_logprob
( self, prompt: Union[str, List[str]] = None, prompt_2: Optional[Union[str, List[str]]] = None,
flow_grpo/diffusers_patch/pipeline_with_logprob.py:26
↓ 2 callersFunctionrelative_position
Give position of A relative to B, factoring in object dimensions
flow_grpo/gen_eval.py:135
↓ 2 callersMethodset_epoch
(self, epoch)
scripts/train_nft_sd3.py:151
↓ 2 callersMethodstate_dict
(self)
flow_grpo/ema.py:87
↓ 2 callersMethodupdate
(self, prompts, rewards, exp=False)
flow_grpo/stat_tracking.py:12
↓ 2 callersMethodupdate
(self, model_output: torch.Tensor)
flow_grpo/diffusers_patch/solver.py:197
↓ 1 callersMethod__init__
(self)
flow_grpo/aesthetic_scorer.py:13
↓ 1 callersFunction_encode_prompt_with_clip
( text_encoder, tokenizer, prompt: str, device=None, text_input_ids=None, num_images_p
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,
flow_grpo/diffusers_patch/train_dreambooth_lora_sd3.py:19
↓ 1 callersFunction_extract_scores
(text_outputs)
flow_grpo/rewards.py:193
↓ 1 callersFunction_extract_scores
(text_outputs)
flow_grpo/unifiedreward_scorer.py:17
↓ 1 callersMethod_process
(self, pixels)
flow_grpo/clip_scorer.py:42
↓ 1 callersFunctioncalculate_shift
( image_seq_len, base_seq_len: int = 256, max_seq_len: int = 4096, base_shift: float = 0.5,
flow_grpo/diffusers_patch/pipeline_with_logprob.py:12
↓ 1 callersFunctioncalculate_zero_std_ratio
(prompts, gathered_rewards)
scripts/train_nft_sd3.py:192
↓ 1 callersFunctioncleanup_distributed
Destroys the distributed process group.
scripts/evaluation.py:48
↓ 1 callersFunctioncleanup_distributed
()
scripts/train_nft_sd3.py:64
↓ 1 callersFunctioncompute_iou
(box_a, box_b)
flow_grpo/gen_eval.py:122
↓ 1 callersFunctiondance_grpo_step
( model_output: torch.Tensor, latents: torch.Tensor, eta: float, sigmas: torch.Tensor, ind
flow_grpo/diffusers_patch/solver.py:124
↓ 1 callersFunctionddim_step
( model_output: torch.Tensor, latents: torch.Tensor, eta: float, sigmas: torch.Tensor, ind
flow_grpo/diffusers_patch/solver.py:159
↓ 1 callersFunctiondpm_solver_first_order_update
( model_output: torch.Tensor, sigmas, step_index, sample: torch.Tensor = None, )
flow_grpo/diffusers_patch/solver.py:298
↓ 1 callersFunctiondpm_step
( order, model_output: torch.Tensor, sample: torch.Tensor, step_index: int, timesteps: lis
flow_grpo/diffusers_patch/solver.py:207
↓ 1 callersFunctionencode_prompt
( text_encoders, tokenizers, prompt: str, max_sequence_length, device=None, num_images
flow_grpo/diffusers_patch/train_dreambooth_lora_sd3.py:98
↓ 1 callersFunctioneval_fn
( pipeline, test_dataloader, text_encoders, tokenizers, config, device, rank,
scripts/train_nft_sd3.py:204
↓ 1 callersFunctionevaluate
Evaluate given image using detected objects on the global metadata specifications. Assumptions: * Metadata combines 'include'
flow_grpo/gen_eval.py:158
↓ 1 callersFunctionevaluate_batch_image
(images, prompts)
flow_grpo/rewards.py:233
↓ 1 callersFunctionevaluate_batch_image
(images, prompts)
flow_grpo/unifiedreward_scorer.py:60
↓ 1 callersFunctionevaluate_image
(prompt, image)
flow_grpo/rewards.py:209
↓ 1 callersFunctionevaluate_image
(prompt, image)
flow_grpo/unifiedreward_scorer.py:35
↓ 1 callersFunctionevaluate_image
(image_pils, metadatas, only_strict)
flow_grpo/gen_eval.py:285
↓ 1 callersFunctionevaluate_reward
Evaluate given image using detected objects on the global metadata specifications. Assumptions: * Metadata combines 'include'
flow_grpo/gen_eval.py:220
↓ 1 callersFunctionflow_grpo_step
( model_output: torch.Tensor, latents: torch.Tensor, eta: float, sigmas: torch.Tensor, ind
flow_grpo/diffusers_patch/solver.py:78
↓ 1 callersMethodget_current_decay
(self, optimization_step)
flow_grpo/ema.py:25
↓ 1 callersFunctionget_image_transform
(processor: AutoImageProcessor)
flow_grpo/clip_scorer.py:22
↓ 1 callersFunctionimage_transform_tensor
( image_size: int, mean: tuple = None, std: tuple = None, fill_color: int = 0, )
flow_grpo/hpsv2_scorer.py:62
↓ 1 callersFunctionjpeg_incompressibility
()
flow_grpo/rewards.py:8
↓ 1 callersFunctionload_models
()
flow_grpo/gen_eval.py:40
↓ 1 callersFunctionmain
(args)
scripts/evaluation.py:96
↓ 1 callersFunctionmain
()
flow_grpo/rewards.py:308
↓ 1 callersFunctionmain
()
flow_grpo/unifiedreward_scorer.py:67
↓ 1 callersFunctionmain
()
flow_grpo/hpsv2_scorer.py:134
↓ 1 callersFunctionmain
()
flow_grpo/stat_tracking.py:76
↓ 1 callersFunctionmain
()
flow_grpo/aesthetic_scorer.py:54
↓ 1 callersFunctionmain
()
flow_grpo/imagereward_scorer.py:31
↓ 1 callersFunctionmain
()
flow_grpo/clip_scorer.py:59
↓ 1 callersFunctionmain
()
flow_grpo/pickscore_scorer.py:55
↓ 1 callersFunctionmultistep_dpm_solver_second_order_update
( model_output_list: List[torch.Tensor], sigmas, step_index, sample: torch.Tensor = None, )
flow_grpo/diffusers_patch/solver.py:317
↓ 1 callersFunctionpil_image_to_base64
(image)
flow_grpo/rewards.py:186
↓ 1 callersFunctionpil_image_to_base64
(image)
flow_grpo/unifiedreward_scorer.py:9
↓ 1 callersFunctionreturn_decay
(step, decay_type)
scripts/train_nft_sd3.py:169
↓ 1 callersFunctionrun_sampling
( v_pred_fn, z, sigma_schedule, solver="flow", determistic=False, eta=0.7, )
flow_grpo/diffusers_patch/solver.py:14
↓ 1 callersFunctionsave_ckpt
( save_dir, transformer_ddp, global_step, rank, ema, transformer_trainable_parameters, config, optimizer,
scripts/train_nft_sd3.py:332
↓ 1 callersFunctionset_seed
(seed: int, rank: int = 0)
scripts/train_nft_sd3.py:72
↓ 1 callersFunctionsetup_distributed
Initializes the distributed process group.
scripts/evaluation.py:41
↓ 1 callersFunctionsetup_distributed
(rank, lock_rank, world_size)
scripts/train_nft_sd3.py:57
↓ 1 callersMethodupdate_lower_order
(self)
flow_grpo/diffusers_patch/solver.py:202
↓ 1 callersFunctionv_pred_fn
(z, sigma)
flow_grpo/diffusers_patch/pipeline_with_logprob.py:209
Method__call__
(self, images, prompts)
flow_grpo/hpsv2_scorer.py:123
Method__call__
(self, images)
flow_grpo/aesthetic_scorer.py:44
Method__call__
Calculate OCR reward :param images: List of input images (PIL or numpy format) :param prompts: Corresponding target text list
flow_grpo/ocr.py:20
Method__call__
(self, prompts, images)
flow_grpo/imagereward_scorer.py:24
Method__call__
(self, pixels, prompts, return_img_embedding=False)
flow_grpo/clip_scorer.py:50
Method__call__
(self, prompt, images)
flow_grpo/pickscore_scorer.py:18
Method__getitem__
(self, idx)
scripts/evaluation.py:69
Method__getitem__
(self, idx)
scripts/evaluation.py:85
Method__getitem__
(self, idx)
scripts/train_nft_sd3.py:88
Method__getitem__
(self, idx)
scripts/train_nft_sd3.py:108
Method__getitem__
(self, index)
flow_grpo/gen_eval.py:89
Method__init__
(self, dataset_path, split="test")
scripts/evaluation.py:59
Method__init__
(self, dataset_path, split="test")
scripts/evaluation.py:74
Method__init__
(self, dataset, split="train")
scripts/train_nft_sd3.py:80
Method__init__
(self, dataset, split="train")
scripts/train_nft_sd3.py:99
Method__init__
(self, dataset, batch_size, k, num_replicas, rank, seed=0)
scripts/train_nft_sd3.py:119
Method__init__
( self, parameters: Iterable[torch.nn.Parameter], decay: float = 0.9999, updat
flow_grpo/ema.py:9
Method__init__
(self, max_size, interpolation=InterpolationMode.BICUBIC, fn="max", fill=0)
flow_grpo/hpsv2_scorer.py:17
Method__init__
(self, mean, std)
flow_grpo/hpsv2_scorer.py:43
Method__init__
(self, global_std=False)
flow_grpo/stat_tracking.py:6
next →1–100 of 148, ranked by callers