MCPcopy Create free account

hub / github.com/HiDream-ai/HiDream-I1 / functions

Functions108 in github.com/HiDream-ai/HiDream-I1

↓ 8 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
hi_diffusers/schedulers/fm_solvers_unipc.py:272
↓ 4 callersMethod__init__
(self, theta: int, axes_dim: List[int])
hi_diffusers/models/embeddings.py:24
↓ 4 callersMethod__init__
(self, in_features, hidden_size)
hi_diffusers/models/transformers/transformer_hidream_image.py:22
↓ 4 callersMethodset_timesteps
Sets the discrete timesteps used for the diffusion chain (to be run before inference). Args: num_inference_steps (`int`):
hi_diffusers/schedulers/fm_solvers_unipc.py:160
↓ 2 callersMethod_encode_prompt
( self, prompt: Union[str, List[str]], prompt_2: Union[str, List[str]], prompt
hi_diffusers/pipelines/hidream_image/pipeline_hidream_image.py:371
↓ 2 callersMethod_get_clip_prompt_embeds
( self, tokenizer, text_encoder, prompt: Union[str, List[str]], num_im
hi_diffusers/pipelines/hidream_image/pipeline_hidream_image.py:194
↓ 2 callersMethod_sigma_to_t
(self, sigma)
hi_diffusers/schedulers/flash_flow_match.py:177
↓ 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
hi_diffusers/schedulers/fm_solvers_unipc.py:230
↓ 2 callersFunctionapply_rope
(xq: torch.Tensor, xk: torch.Tensor, freqs_cis: torch.Tensor)
hi_diffusers/models/attention_processor.py:18
↓ 2 callersMethodindex_for_timestep
(self, timestep, schedule_timesteps=None)
hi_diffusers/schedulers/flash_flow_match.py:242
↓ 2 callersMethodindex_for_timestep
(self, timestep, schedule_timesteps=None)
hi_diffusers/schedulers/fm_solvers_unipc.py:628
↓ 2 callersFunctionload_models
(model_type)
gradio_demo.py:49
↓ 2 callersMethodstep
Predict the sample from the previous timestep by reversing the SDE. This function propagates the sample with the multistep UniPC.
hi_diffusers/schedulers/fm_solvers_unipc.py:655
↓ 1 callersMethod__init__
(self, embed_dim, num_routed_experts=4, num_activated_experts=2, aux_loss_alpha=0.01)
hi_diffusers/models/moe.py:35
↓ 1 callersMethod__init__
( self, query_dim: int, heads: int = 8, dim_head: int = 64, upcast_att
hi_diffusers/models/attention.py:9
↓ 1 callersMethod_convert_to_beta
From "Beta Sampling is All You Need" [arXiv:2407.12173] (Lee et. al, 2024)
hi_diffusers/schedulers/flash_flow_match.py:396
↓ 1 callersMethod_convert_to_exponential
Constructs an exponential noise schedule.
hi_diffusers/schedulers/flash_flow_match.py:374
↓ 1 callersMethod_convert_to_karras
Constructs the noise schedule of Karras et al. (2022).
hi_diffusers/schedulers/flash_flow_match.py:348
↓ 1 callersMethod_get_llama3_prompt_embeds
( self, prompt: Union[str, List[str]] = None, num_images_per_prompt: int = 1,
hi_diffusers/pipelines/hidream_image/pipeline_hidream_image.py:238
↓ 1 callersMethod_get_t5_prompt_embeds
( self, prompt: Union[str, List[str]] = None, num_images_per_prompt: int = 1,
hi_diffusers/pipelines/hidream_image/pipeline_hidream_image.py:152
↓ 1 callersMethod_init_step_index
(self, timestep)
hi_diffusers/schedulers/flash_flow_match.py:256
↓ 1 callersMethod_init_step_index
Initialize the step_index counter for the scheduler.
hi_diffusers/schedulers/fm_solvers_unipc.py:643
↓ 1 callersFunctionattention
(query: torch.Tensor, key: torch.Tensor, value: torch.Tensor)
hi_diffusers/models/attention_processor.py:25
↓ 1 callersFunctioncalculate_shift
( image_seq_len, base_seq_len: int = 256, max_seq_len: int = 4096, base_shift: float = 0.5,
hi_diffusers/pipelines/hidream_image/pipeline_hidream_image.py:40
↓ 1 callersMethodconvert_model_output
r""" Convert the model output to the corresponding type the UniPC algorithm needs. Args: model_output (`torch.Tensor`):
hi_diffusers/schedulers/fm_solvers_unipc.py:279
↓ 1 callersMethodencode_prompt
( self, prompt: Union[str, List[str]], prompt_2: Union[str, List[str]], prompt
hi_diffusers/pipelines/hidream_image/pipeline_hidream_image.py:287
↓ 1 callersMethodexpand_timesteps
(self, timesteps, batch_size, device)
hi_diffusers/models/transformers/transformer_hidream_image.py:311
↓ 1 callersFunctiongenerate_image
(pipe, model_type, prompt, resolution, seed)
inference.py:103
↓ 1 callersFunctionget_load_balancing_loss
()
hi_diffusers/models/moe.py:17
↓ 1 callersFunctionload_models
(model_type)
inference.py:52
↓ 1 callersMethodmoe_infer
(self, x, flat_expert_indices, flat_expert_weights)
hi_diffusers/models/moe.py:136
↓ 1 callersMethodmultistep_uni_c_bh_update
One step for the UniC (B(h) version). Args: this_model_output (`torch.Tensor`): The model outputs at `x_
hi_diffusers/schedulers/fm_solvers_unipc.py:486
↓ 1 callersMethodmultistep_uni_p_bh_update
One step for the UniP (B(h) version). Alternatively, `self.solver_p` is used if is specified. Args: model_output (`torch
hi_diffusers/schedulers/fm_solvers_unipc.py:350
↓ 1 callersFunctionparse_resolution
(resolution_str)
gradio_demo.py:81
↓ 1 callersFunctionparse_resolution
(resolution_str)
inference.py:84
↓ 1 callersMethodpatchify
(self, x, max_seq, img_sizes=None)
hi_diffusers/models/transformers/transformer_hidream_image.py:339
↓ 1 callersMethodprepare_latents
( self, batch_size, num_channels_latents, height, width, dtype
hi_diffusers/pipelines/hidream_image/pipeline_hidream_image.py:465
↓ 1 callersMethodreset_parameters
(self)
hi_diffusers/models/moe.py:50
↓ 1 callersFunctionretrieve_timesteps
r""" Calls the scheduler's `set_timesteps` method and retrieves timesteps from the scheduler after the call. Handles custom timesteps. Any kwa
hi_diffusers/pipelines/hidream_image/pipeline_hidream_image.py:53
↓ 1 callersFunctionrope
(pos: torch.Tensor, dim: int, theta: int)
hi_diffusers/models/embeddings.py:7
↓ 1 callersFunctionsave_load_balancing_loss
(loss)
hi_diffusers/models/moe.py:9
↓ 1 callersMethodtime_shift
(self, mu: float, sigma: float, t: torch.Tensor)
hi_diffusers/schedulers/flash_flow_match.py:180
↓ 1 callersMethodtime_shift
(self, mu: float, sigma: float, t: torch.Tensor)
hi_diffusers/schedulers/fm_solvers_unipc.py:276
↓ 1 callersMethodunpatchify
(self, x: torch.Tensor, img_sizes: List[Tuple[int, int]], is_training: bool)
hi_diffusers/models/transformers/transformer_hidream_image.py:325
Method__call__
( self, prompt: Union[str, List[str]] = None, prompt_2: Optional[Union[str, List[str]]
hi_diffusers/pipelines/hidream_image/pipeline_hidream_image.py:512
Method__call__
( self, attn: HiDreamAttention, image_tokens: torch.FloatTensor, image_tokens_
hi_diffusers/models/attention_processor.py:47
Method__init__
( self, scheduler: FlowMatchEulerDiscreteScheduler, vae: AutoencoderKL, text_e
hi_diffusers/pipelines/hidream_image/pipeline_hidream_image.py:116
Method__init__
( self, num_train_timesteps: int = 1000, shift: float = 1.0, u
hi_diffusers/schedulers/flash_flow_match.py:67
Method__init__
( self, num_train_timesteps: int = 1000, solver_order: int = 2,
hi_diffusers/schedulers/fm_solvers_unipc.py:77
Method__init__
( self, dim: int, hidden_dim: int, num_routed_experts: int, num_activa
hi_diffusers/models/moe.py:98
Method__init__
( self, dim: int, hidden_dim: int, multiple_of: int = 256, ffn_dim_mul
hi_diffusers/models/attention.py:78
Method__init__
( self, patch_size=2, in_channels=4, out_channels=1024, )
hi_diffusers/models/embeddings.py:38
Method__init__
(self, text_emb_dim, hidden_size)
hi_diffusers/models/embeddings.py:61
Method__init__
(self, hidden_size, frequency_embedding_size=256)
hi_diffusers/models/embeddings.py:76
Method__init__
(self, hidden_size, patch_size, out_channels)
hi_diffusers/models/embeddings.py:94
Method__init__
( self, dim: int, num_attention_heads: int, attention_head_dim: int, n
hi_diffusers/models/transformers/transformer_hidream_image.py:36
Method__init__
( self, dim: int, num_attention_heads: int, attention_head_dim: int, n
hi_diffusers/models/transformers/transformer_hidream_image.py:107
Method__init__
( self, dim: int, num_attention_heads: int, attention_head_dim: int, n
hi_diffusers/models/transformers/transformer_hidream_image.py:192
Method__init__
( self, patch_size: Optional[int] = None, in_channels: int = 64, out_channels:
hi_diffusers/models/transformers/transformer_hidream_image.py:237
Method__len__
(self)
hi_diffusers/schedulers/flash_flow_match.py:427
Method__len__
(self)
hi_diffusers/schedulers/fm_solvers_unipc.py:799
Method_init_weights
(self, m)
hi_diffusers/models/attention.py:56
Method_init_weights
(self, m)
hi_diffusers/models/attention.py:99
Method_init_weights
(self, m)
hi_diffusers/models/embeddings.py:50
Method_init_weights
(self, m)
hi_diffusers/models/embeddings.py:66
Method_init_weights
(self, m)
hi_diffusers/models/embeddings.py:82
Method_init_weights
(self, m)
hi_diffusers/models/embeddings.py:104
Method_set_gradient_checkpointing
(self, module, value=False)
hi_diffusers/models/transformers/transformer_hidream_image.py:307
Method_sigma_to_t
(self, sigma)
hi_diffusers/schedulers/fm_solvers_unipc.py:269
Methodadd_noise
( self, original_samples: torch.Tensor, noise: torch.Tensor, timesteps: torch.
hi_diffusers/schedulers/fm_solvers_unipc.py:758
Functionbatched_load_balancing_loss
()
hi_diffusers/models/moe.py:21
Methodbegin_index
The index for the first timestep. It should be set from pipeline with `set_begin_index` method.
hi_diffusers/schedulers/flash_flow_match.py:112
Methodbegin_index
The index for the first timestep. It should be set from pipeline with `set_begin_index` method.
hi_diffusers/schedulers/fm_solvers_unipc.py:142
Functionclear_load_balancing_loss
()
hi_diffusers/models/moe.py:13
Methodcreate_custom_forward
(module, return_dict=None)
hi_diffusers/models/transformers/transformer_hidream_image.py:441
Methodcustom_forward
(*inputs)
hi_diffusers/models/transformers/transformer_hidream_image.py:442
Methoddisable_vae_slicing
r""" Disable sliced VAE decoding. If `enable_vae_slicing` was previously enabled, this method will go back to computing decoding in on
hi_diffusers/pipelines/hidream_image/pipeline_hidream_image.py:443
Methoddisable_vae_tiling
r""" Disable tiled VAE decoding. If `enable_vae_tiling` was previously enabled, this method will go back to computing decoding in one
hi_diffusers/pipelines/hidream_image/pipeline_hidream_image.py:458
Methoddo_classifier_free_guidance
(self)
hi_diffusers/pipelines/hidream_image/pipeline_hidream_image.py:496
Methodenable_vae_slicing
r""" Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to compute decoding in sev
hi_diffusers/pipelines/hidream_image/pipeline_hidream_image.py:436
Methodenable_vae_tiling
r""" Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to compute decoding and en
hi_diffusers/pipelines/hidream_image/pipeline_hidream_image.py:450
Methodforward
(self, hidden_states)
hi_diffusers/models/moe.py:54
Methodforward
(self, x)
hi_diffusers/models/moe.py:115
Methodforward
( self, norm_image_tokens: torch.FloatTensor, image_tokens_masks: torch.FloatTensor =
hi_diffusers/models/attention.py:62
Methodforward
(self, x)
hi_diffusers/models/attention.py:105
Methodforward
(self, ids: torch.Tensor)
hi_diffusers/models/embeddings.py:29
Methodforward
(self, latent)
hi_diffusers/models/embeddings.py:56
Methodforward
(self, pooled_embed)
hi_diffusers/models/embeddings.py:72
Methodforward
(self, timesteps, wdtype)
hi_diffusers/models/embeddings.py:88
Methodforward
(self, x, adaln_input)
hi_diffusers/models/embeddings.py:110
Methodforward
(self, caption)
hi_diffusers/models/transformers/transformer_hidream_image.py:26
Methodforward
( self, image_tokens: torch.FloatTensor, image_tokens_masks: Optional[torch.FloatTenso
hi_diffusers/models/transformers/transformer_hidream_image.py:75
Methodforward
( self, image_tokens: torch.FloatTensor, image_tokens_masks: Optional[torch.FloatTenso
hi_diffusers/models/transformers/transformer_hidream_image.py:149
Methodforward
( self, image_tokens: torch.FloatTensor, image_tokens_masks: Optional[torch.FloatTenso
hi_diffusers/models/transformers/transformer_hidream_image.py:214
Methodforward
( self, hidden_states: torch.Tensor, timesteps: torch.LongTensor = None, encod
hi_diffusers/models/transformers/transformer_hidream_image.py:364
Functiongenerate_image
(model_type, prompt, resolution, seed)
gradio_demo.py:100
Methodguidance_scale
(self)
hi_diffusers/pipelines/hidream_image/pipeline_hidream_image.py:492
Methodinterrupt
(self)
hi_diffusers/pipelines/hidream_image/pipeline_hidream_image.py:508
Methodjoint_attention_kwargs
(self)
hi_diffusers/pipelines/hidream_image/pipeline_hidream_image.py:500
Methodnum_timesteps
(self)
hi_diffusers/pipelines/hidream_image/pipeline_hidream_image.py:504
next →1–100 of 108, ranked by callers