MCPcopy Create free account

hub / github.com/black-forest-labs/flux / functions

Functions217 in github.com/black-forest-labs/flux

↓ 97 callersMethodto
(self, device: str | torch.device)
src/flux/trt/engine/base_engine.py:182
↓ 43 callersMethodcpu
(self)
src/flux/trt/engine/base_engine.py:160
↓ 8 callersMethod__init__
(self, dim: int)
src/flux/modules/layers.py:76
↓ 8 callersMethoddecode
(self, z: torch.Tensor)
src/flux/trt/engine/vae_engine.py:64
↓ 8 callersFunctiondenoise
( model: Flux, # model input img: Tensor, img_ids: Tensor, txt: Tensor, txt_ids: Tenso
src/flux/sampling.py:308
↓ 8 callersFunctionget_noise
( num_samples: int, height: int, width: int, device: torch.device, dtype: torch.dtype,
src/flux/sampling.py:17
↓ 8 callersFunctionget_schedule
( num_steps: int, image_seq_len: int, base_shift: float = 0.5, max_shift: float = 1.15, sh
src/flux/sampling.py:289
↓ 8 callersFunctionload_ae
(name: str, device: str | torch.device = "cuda")
src/flux/util.py:698
↓ 8 callersFunctionload_clip
(device: str | torch.device = "cuda")
src/flux/util.py:694
↓ 8 callersFunctionload_flow_model
(name: str, device: str | torch.device = "cuda", verbose: bool = True)
src/flux/util.py:657
↓ 8 callersFunctionload_t5
(device: str | torch.device = "cuda", max_length: int = 512)
src/flux/util.py:689
↓ 8 callersMethodresize
(self, name: str, size: int)
src/flux/trt/engine/base_engine.py:48
↓ 8 callersFunctionunpack
(x: Tensor, height: int, width: int)
src/flux/sampling.py:356
↓ 7 callersMethod__init__
( self, resolution: int, in_channels: int, ch: int, ch_mult: list[int]
src/flux/modules/autoencoder.py:110
↓ 7 callersMethod_get_context_dim
( image_height: int, image_width: int, compression_factor: int, )
src/flux/trt/trt_config/transformer_trt_config.py:103
↓ 7 callersMethodencode
(self, x: torch.Tensor)
src/flux/trt/engine/vae_engine.py:67
↓ 6 callersMethod_get_latent_dim
(self, image_dim: int)
src/flux/trt/trt_config/vae_trt_config.py:38
↓ 6 callersFunctionprepare
(t5: HFEmbedder, clip: HFEmbedder, img: Tensor, prompt: str | list[str])
src/flux/sampling.py:36
↓ 6 callersMethodtrt_datatype_to_torch
(datatype)
src/flux/trt/engine/base_engine.py:101
↓ 5 callersFunctionclear_canvas_state
Clear all canvas-related state
demo_st_fill.py:116
↓ 5 callersMethodget_dtype
(self, tensor_name: str)
src/flux/trt/engine/base_engine.py:220
↓ 5 callersMethodinfer
( self, feed_dict: dict[str, torch.Tensor], )
src/flux/trt/engine/base_engine.py:280
↓ 5 callersFunctionparse_img_cond_path
(options: SamplingOptions | None)
src/flux/cli_kontext.py:108
↓ 5 callersFunctionparse_prompt
(options: SamplingOptions)
src/flux/cli_kontext.py:34
↓ 5 callersFunctionsave_image
( nsfw_classifier, name: str, output_name: str, idx: int, x: torch.Tensor, add_samplin
src/flux/util.py:243
↓ 4 callersMethod_check_batch
(self, batch_size)
src/flux/trt/trt_config/base_trt_config.py:213
↓ 4 callersFunctionget_checkpoint_path
Get the local path for a checkpoint file, downloading if necessary.
src/flux/util.py:64
↓ 4 callersFunctionprint_load_warning
(missing: list[str], unexpected: list[str])
src/flux/util.py:646
↓ 4 callersMethodset_scale
(self, scale: float)
src/flux/modules/lora.py:84
↓ 4 callersFunctionswish
(x: Tensor)
src/flux/modules/autoencoder.py:21
↓ 4 callersFunctiontrack_usage_via_api
Track usage of licensed models via the BFL API for commercial licensing compliance. For more information on licensing BFL's models for comme
src/flux/util.py:206
↓ 3 callersMethod_clean_memory
()
src/flux/trt/trt_manager.py:279
↓ 3 callersMethod_get_repo_id
(model_name: str)
src/flux/trt/trt_config/base_trt_config.py:240
↓ 3 callersFunctionattention
(q: Tensor, k: Tensor, v: Tensor, pe: Tensor)
src/flux/math.py:6
↓ 3 callersMethodload_engines
( self, model_name: str, module_names: set[ModuleName], engine_dir: str,
src/flux/trt/trt_manager.py:211
↓ 3 callersFunctionset_new_image
Safely set a new image and clear relevant state
demo_st_fill.py:124
↓ 2 callersMethod__init__
( self, decoder: VAEDecoder, encoder: VAEEncoder | None = None, )
src/flux/trt/engine/vae_engine.py:55
↓ 2 callersMethod_get_latent
(image_dim: int, compression_factor: int)
src/flux/trt/trt_config/transformer_trt_config.py:99
↓ 2 callersFunctionaspect_ratio_to_height_width
(aspect_ratio: str, area: int = 1024**2)
src/flux/util.py:637
↓ 2 callersMethodcalculate_input_hash
(feed_dict: Dict[str, torch.Tensor])
src/flux/trt/engine/base_engine.py:267
↓ 2 callersMethodcheck_dims
( self, batch_size: int, image_height: int, image_width: int, )
src/flux/trt/trt_config/vae_trt_config.py:46
↓ 2 callersFunctioncheck_onnx_access_for_trt
Check ONNX access and download models for TRT - returns ONNX directory path
src/flux/util.py:201
↓ 2 callersFunctionparse_img_cond_path
(options: SamplingOptions | None)
src/flux/cli_fill.py:73
↓ 2 callersFunctionparse_img_cond_path
(options: SamplingOptions | None)
src/flux/cli_control.py:95
↓ 2 callersFunctionparse_img_cond_path
(options: SamplingOptions | None)
src/flux/cli_redux.py:99
↓ 2 callersFunctionparse_img_mask_path
(options: SamplingOptions | None)
src/flux/cli_fill.py:119
↓ 2 callersFunctionparse_lora_scale
(options: SamplingOptions | None)
src/flux/cli_control.py:134
↓ 2 callersFunctionparse_prompt
(options: SamplingOptions)
src/flux/cli.py:35
↓ 2 callersFunctionparse_prompt
(options: SamplingOptions)
src/flux/cli_fill.py:28
↓ 2 callersFunctionparse_prompt
(options: SamplingOptions)
src/flux/cli_control.py:28
↓ 2 callersFunctionparse_prompt
(options: SamplingOptions)
src/flux/cli_redux.py:34
↓ 2 callersFunctionprepare_fill
( t5: HFEmbedder, clip: HFEmbedder, img: Tensor, prompt: str | list[str], ae: AutoEncoder,
src/flux/sampling.py:107
↓ 2 callersMethodstop_runtime
(self)
src/flux/trt/trt_manager.py:290
↓ 2 callersMethodtest_image
(self, image: Image.Image | str | torch.Tensor)
src/flux/content_filters.py:92
↓ 2 callersFunctiontimestep_embedding
Create sinusoidal timestep embeddings. :param t: a 1-D Tensor of N indices, one per batch element. These may be fractio
src/flux/modules/layers.py:28
↓ 2 callersMethodto
(self, device)
src/flux/trt/engine/vae_engine.py:83
↓ 1 callersMethod__init__
(self, params: FluxParams)
src/flux/model.py:39
↓ 1 callersMethod__init__
( self, trt_config: TRTBaseConfig, stream: torch.cuda.Stream, context_memory:
src/flux/trt/engine/base_engine.py:131
↓ 1 callersMethod__init__
(self, device)
src/flux/modules/image_embedders.py:16
↓ 1 callersMethod_build_engine
( trt_config: TRTBaseConfig, batch_size: int, image_height: int | None, image_
src/flux/trt/trt_manager.py:179
↓ 1 callersMethod_create_directories
(engine_dir: str)
src/flux/trt/trt_manager.py:128
↓ 1 callersMethod_get_engine_path
(self)
src/flux/trt/trt_config/base_trt_config.py:232
↓ 1 callersMethod_get_onnx_path
(self)
src/flux/trt/trt_config/base_trt_config.py:223
↓ 1 callersMethod_get_trt_configs
( self, model_name: str, module_names: set[ModuleName], engine_dir: str,
src/flux/trt/trt_manager.py:132
↓ 1 callersMethod_parse_custom_onnx_path
Parse a string of comma-separated key-value pairs into a dictionary. Args: string (str): A string of comma-separated key-value pa
src/flux/trt/trt_manager.py:99
↓ 1 callersMethod_parse_models_precisions
( trt_transformer_precision: str, trt_t5_precision: str )
src/flux/trt/trt_manager.py:76
↓ 1 callersFunctionadd_border_and_mask
Adds a black border around the image with individual side control and mask overlap
demo_st_fill.py:31
↓ 1 callersFunctionapp
()
demo_st.py:292
↓ 1 callersFunctionapp
()
demo_st_fill.py:497
↓ 1 callersFunctionapply_rope
(xq: Tensor, xk: Tensor, freqs_cis: Tensor)
src/flux/math.py:25
↓ 1 callersMethodattention
(self, h_: Tensor)
src/flux/modules/autoencoder.py:37
↓ 1 callersMethodbuild_trt_engine
Metod used to build a TRT engine from a given set of flags or configurations using polygraphy. Args: engine_path (str):
src/flux/trt/trt_config/base_trt_config.py:69
↓ 1 callersMethodcheck_dims
(self, batch_size: int)
src/flux/trt/trt_config/clip_trt_config.py:48
↓ 1 callersMethodcheck_dims
( self, batch_size: int, image_height: int, image_width: int, )
src/flux/trt/trt_config/transformer_trt_config.py:194
↓ 1 callersMethodcheck_dims
(self, batch_size: int)
src/flux/trt/trt_config/t5_trt_config.py:53
↓ 1 callersFunctioncreate_demo
( model_name: str, device: str = "cuda" if torch.cuda.is_available() else "cpu", offload: bool = F
demo_gr.py:175
↓ 1 callersMethodcuda
(self)
src/flux/trt/engine/base_engine.py:171
↓ 1 callersMethoddeactivate
(self)
src/flux/trt/engine/base_engine.py:194
↓ 1 callersMethoddecode
(self, z: Tensor)
src/flux/modules/autoencoder.py:313
↓ 1 callersFunctiondownload_onnx_models_for_trt
Download ONNX models for TRT to our checkpoints directory
src/flux/util.py:108
↓ 1 callersFunctiondownscale_image
Downscale image by a given factor while maintaining 32-pixel multiple dimensions
demo_st_fill.py:131
↓ 1 callersMethodencode
(self, x: Tensor)
src/flux/modules/autoencoder.py:308
↓ 1 callersFunctionensure_hf_auth
()
src/flux/util.py:27
↓ 1 callersMethodfrom_args
( cls, model_name: str, **kwargs, )
src/flux/trt/trt_config/t5_trt_config.py:40
↓ 1 callersFunctionget_config
Retrieve the appropriate configuration instance based on current flags.
src/flux/trt/trt_config/base_trt_config.py:266
↓ 1 callersFunctionget_image
()
demo_st.py:41
↓ 1 callersMethodget_input_profile
( self, batch_size: int, image_height=None, image_width=None, )
src/flux/trt/trt_config/t5_trt_config.py:56
↓ 1 callersFunctionget_lin_function
( x1: float = 256, y1: float = 0.5, x2: float = 4096, y2: float = 1.15 )
src/flux/sampling.py:281
↓ 1 callersMethodget_minmax_dims
( self, batch_size: int, image_height: int, image_width: int, )
src/flux/trt/trt_config/vae_trt_config.py:102
↓ 1 callersMethodget_minmax_dims
( self, batch_size: int, image_height: int, image_width: int, )
src/flux/trt/trt_config/vae_trt_config.py:206
↓ 1 callersMethodget_minmax_dims
( self, batch_size: int, image_height: int, image_width: int, )
src/flux/trt/trt_config/transformer_trt_config.py:160
↓ 1 callersFunctionget_models
(name: str, device: torch.device, offload: bool, is_schnell: bool)
demo_st.py:32
↓ 1 callersFunctionget_models
(name: str, device: torch.device, offload: bool, is_schnell: bool)
demo_gr.py:27
↓ 1 callersFunctionget_models
(name: str, device: torch.device, offload: bool)
demo_st_fill.py:83
↓ 1 callersMethodinit_runtime
(self)
src/flux/trt/trt_manager.py:283
↓ 1 callersFunctionoptionally_expand_state_dict
Optionally expand the state dict to match the model's parameters shapes.
src/flux/util.py:714
↓ 1 callersMethodoverride_shapes
(self, feed_dict: Dict[str, torch.Tensor])
src/flux/trt/engine/base_engine.py:223
↓ 1 callersFunctionprepare_control
( t5: HFEmbedder, clip: HFEmbedder, img: Tensor, prompt: str | list[str], ae: AutoEncoder,
src/flux/sampling.py:70
↓ 1 callersFunctionprepare_kontext
( t5: HFEmbedder, clip: HFEmbedder, prompt: str | list[str], ae: AutoEncoder, img_cond_pat
src/flux/sampling.py:210
↓ 1 callersFunctionprepare_redux
( t5: HFEmbedder, clip: HFEmbedder, img: Tensor, prompt: str | list[str], encoder: ReduxIm
src/flux/sampling.py:160
next →1–100 of 217, ranked by callers