MCPcopy Create free account

hub / github.com/deepseek-ai/Janus / functions

Functions216 in github.com/deepseek-ai/Janus

↓ 43 callersMethodto
(self, device, dtype=torch.bfloat16)
janus/models/processing_vlm.py:63
↓ 9 callersMethod__init__
( self, in_channels, block_out_channels, patch_size, bias, ele
janus/janusflow/models/uvit.py:431
↓ 9 callersMethodencode
(self, x)
janus/models/vq_model.py:494
↓ 8 callersMethodappend_message
Append a new message.
janus/utils/conversation.py:157
↓ 8 callersMethoddecode
(self, quant)
janus/models/vq_model.py:500
↓ 7 callersMethod__init__
( self, in_channels=3, ch=128, ch_mult=(1, 1, 2, 2, 4), num_res_blocks
janus/models/vq_model.py:47
↓ 7 callersMethod__init__
(self, params)
janus/models/modeling_vlm.py:37
↓ 7 callersMethodapply_sft_template_for_multi_turn_prompts
Applies the SFT template to conversation. An example of conversation: conversation = [ { "role":
janus/models/processing_vlm.py:137
↓ 6 callersFunctionregister_conv_template
Register a new conversation template.
janus/utils/conversation.py:225
↓ 5 callersFunctionNormalize
(in_channels, norm_type="group")
janus/models/vq_model.py:398
↓ 5 callersMethoddecode_code
(self, code_b, shape=None, channel_first=True)
janus/models/vq_model.py:505
↓ 5 callersFunctionget_conv_template
Get a conversation template.
janus/utils/conversation.py:235
↓ 5 callersFunctionmodel_name_to_cls
(cls_name)
janus/models/modeling_vlm.py:54
↓ 5 callersMethodprepare_gen_img_embeds
(self, image_ids: torch.LongTensor)
janus/models/modeling_vlm.py:262
↓ 5 callersMethodprepare_inputs_embeds
Args: input_ids (torch.LongTensor): [b, T] pixel_values (torch.FloatTensor): [b, n_images, 3, h, w] im
janus/models/modeling_vlm.py:221
↓ 5 callersMethodresize
Args: pil_img (PIL.Image): [H, W, 3] in PIL.Image in RGB Returns: x (np.ndarray): [3, self.image_size, self
janus/models/image_processing_vlm.py:127
↓ 4 callersMethod__init__
(self, **kwargs)
janus/janusflow/models/modeling_vlm.py:101
↓ 4 callersFunctionnonlinearity
(x)
janus/models/vq_model.py:393
↓ 4 callersMethodset_system_message
Set the system message.
janus/utils/conversation.py:153
↓ 4 callersMethodto
(self, device, dtype=torch.bfloat16)
janus/janusflow/models/processing_vlm.py:63
↓ 4 callersFunctiontrunc_normal_
r"""The original timm.models.layers.weight_init.trunc_normal_ can not handle bfloat16 yet, here we first convert the tensor to float32, apply the
janus/janusflow/models/siglip_vit.py:92
↓ 4 callersFunctiontrunc_normal_
r"""The original timm.models.layers.weight_init.trunc_normal_ can not handle bfloat16 yet, here we first convert the tensor to float32, apply the
janus/models/siglip_vit.py:92
↓ 3 callersMethod__init__
( self, dim: int, num_heads: int, mlp_ratio: float = 4.0, qkv_bias: bo
janus/janusflow/models/siglip_vit.py:210
↓ 3 callersMethod__init__
( self, dim: int, num_heads: int, mlp_ratio: float = 4.0, qkv_bias: bo
janus/models/siglip_vit.py:210
↓ 3 callersMethodget_prompt
Get the prompt for generation.
janus/utils/conversation.py:76
↓ 3 callersFunctionmodel_name_to_cls
(cls_name)
janus/janusflow/models/modeling_vlm.py:37
↓ 2 callersMethod_pos_embed
(self, x: torch.Tensor)
janus/janusflow/models/siglip_vit.py:476
↓ 2 callersMethod_pos_embed
(self, x: torch.Tensor)
janus/models/siglip_vit.py:476
↓ 2 callersMethodinit_weights
(self, mode: Literal["jax", "jax_nlhb", "moco", ""] = "")
janus/janusflow/models/siglip_vit.py:434
↓ 2 callersMethodinit_weights
(self, mode: Literal["jax", "jax_nlhb", "moco", ""] = "")
janus/models/siglip_vit.py:434
↓ 2 callersMethodkeys
(self)
janus/janusflow/models/processing_vlm.py:33
↓ 2 callersMethodkeys
(self)
janus/models/processing_vlm.py:33
↓ 2 callersFunctionnorm_cdf
(x)
janus/janusflow/models/siglip_vit.py:57
↓ 2 callersFunctionnorm_cdf
(x)
janus/models/siglip_vit.py:57
↓ 1 callersMethod__init__
( self, image_size: int, min_size: int = 14, image_mean: Union[Tuple[float, fl
janus/janusflow/models/image_processing_vlm.py:95
↓ 1 callersMethod__init__
( self, image_size: int, min_size: int = 14, image_mean: Union[Tuple[float, fl
janus/models/image_processing_vlm.py:95
↓ 1 callersMethod_intermediate_layers
( self, x: torch.Tensor, n: Union[int, Sequence] = 1, )
janus/janusflow/models/siglip_vit.py:509
↓ 1 callersMethod_intermediate_layers
( self, x: torch.Tensor, n: Union[int, Sequence] = 1, )
janus/models/siglip_vit.py:509
↓ 1 callersFunction_no_grad_trunc_normal_
(tensor, mean, std, a, b)
janus/janusflow/models/siglip_vit.py:54
↓ 1 callersFunction_no_grad_trunc_normal_
(tensor, mean, std, a, b)
janus/models/siglip_vit.py:54
↓ 1 callersMethodadd_image_token
Args: image_indices (List[int]): [index_0, index_1, ..., index_j] input_ids (torch.LongTensor): [N] Returns
janus/janusflow/models/processing_vlm.py:241
↓ 1 callersMethodadd_image_token
Args: image_indices (List[int]): [index_0, index_1, ..., index_j] input_ids (torch.LongTensor): [N] Returns
janus/models/processing_vlm.py:215
↓ 1 callersMethodapply_sft_template_for_multi_turn_prompts
Applies the SFT template to conversation. An example of conversation: conversation = [ { "role":
janus/janusflow/models/processing_vlm.py:159
↓ 1 callersMethodbatchify
Preprocesses the inputs for multimodal inference. Args: prepare_list (List[VLChatProcessorOutput]): A list of VLChatProc
janus/janusflow/models/processing_vlm.py:387
↓ 1 callersMethodbatchify
Preprocesses the inputs for multimodal inference. Args: prepare_list (List[VLChatProcessorOutput]): A list of VLChatProc
janus/models/processing_vlm.py:357
↓ 1 callersMethodbuild_vision_tower
(self, vision_tower_params)
janus/janusflow/models/clip_encoder.py:70
↓ 1 callersMethodbuild_vision_tower
(self, vision_tower_params)
janus/models/clip_encoder.py:70
↓ 1 callersFunctioncompute_entropy_loss
(affinity, loss_type="softmax", temperature=0.01)
janus/models/vq_model.py:450
↓ 1 callersMethodcopy
(self)
janus/utils/conversation.py:196
↓ 1 callersFunctioncreate_prompt
(user_input: str)
interactivechat.py:21
↓ 1 callersFunctioncreate_siglip_vit
( model_name: str = "siglip_so400m_patch14_384", image_size: int = 384, select_layer: int = -1,
janus/janusflow/models/siglip_vit.py:650
↓ 1 callersFunctioncreate_siglip_vit
( model_name: str = "siglip_so400m_patch14_384", image_size: int = 384, select_layer: int = -1,
janus/models/siglip_vit.py:640
↓ 1 callersFunctionexpand2square
(pil_img, background_color)
janus/janusflow/models/image_processing_vlm.py:41
↓ 1 callersFunctionexpand2square
(pil_img, background_color)
janus/models/image_processing_vlm.py:41
↓ 1 callersMethodfeature_select
(self, image_forward_outs)
janus/janusflow/models/clip_encoder.py:88
↓ 1 callersMethodfeature_select
(self, image_forward_outs)
janus/models/clip_encoder.py:88
↓ 1 callersMethodforward_features
(self, x: torch.Tensor)
janus/janusflow/models/siglip_vit.py:562
↓ 1 callersMethodforward_features
(self, x: torch.Tensor)
janus/models/siglip_vit.py:562
↓ 1 callersMethodforward_head
(self, x: torch.Tensor, pre_logits: bool = False)
janus/janusflow/models/siglip_vit.py:574
↓ 1 callersMethodforward_head
(self, x: torch.Tensor, pre_logits: bool = False)
janus/models/siglip_vit.py:574
↓ 1 callersFunctiongenerate
( mmgpt: MultiModalityCausalLM, vl_chat_processor: VLChatProcessor, prompt: str, short_prompt:
interactivechat.py:40
↓ 1 callersFunctiongenerate
( mmgpt: MultiModalityCausalLM, vl_chat_processor: VLChatProcessor, prompt: str, temperature:
generation_inference.py:55
↓ 1 callersFunctiongenerate
(input_ids, width, height, temperature: float = 1, paralle
demo/app_januspro.py:77
↓ 1 callersFunctiongenerate
( input_ids, cfg_weight: float = 2.0, num_inference_steps: int = 30 )
demo/app_janusflow.py:70
↓ 1 callersFunctiongenerate
(input_ids, width, height, temperature: float = 1, paralle
demo/app.py:69
↓ 1 callersFunctiongenerate
(input_ids, width, height, temperature: float = 1, paralle
demo/fastapi_app.py:79
↓ 1 callersFunctiongenerate_image
(prompt, seed, guidance)
demo/fastapi_app.py:130
↓ 1 callersFunctiongenerate_images
(prompt, seed=None, guidance=5.0)
demo/fastapi_client.py:26
↓ 1 callersMethodget_codebook_entry
(self, indices, shape=None, channel_first=True)
janus/models/vq_model.py:284
↓ 1 callersFunctionimage_stream
()
demo/fastapi_app.py:163
↓ 1 callersFunctioninteractive_image_generator
()
interactivechat.py:113
↓ 1 callersFunctionload_pil_images
Support file path or base64 images. Args: conversations (List[Dict[str, str]]): the conversations with a list of messages. An examp
janus/utils/io.py:44
↓ 1 callersFunctionmultimodal_understanding
(image_data, question, seed, top_p, temperature)
demo/fastapi_app.py:28
↓ 1 callersMethodprocess_one
Args: prompt (str): the formatted prompt; conversations (List[Dict]): conversations with a list of messages;
janus/janusflow/models/processing_vlm.py:289
↓ 1 callersMethodprocess_one
Args: prompt (str): the formatted prompt; conversations (List[Dict]): conversations with a list of messages;
janus/models/processing_vlm.py:260
↓ 1 callersMethodresize
Args: pil_img (PIL.Image): [H, W, 3] in PIL.Image in RGB Returns: x (np.ndarray): [3, self.image_size, self
janus/janusflow/models/image_processing_vlm.py:127
↓ 1 callersFunctionunderstand_image_and_question
(image_path, question, seed=42, top_p=0.95, temperature=0.1)
demo/fastapi_client.py:12
↓ 1 callersFunctionunpack
(dec, width, height, parallel_size=5)
demo/app_januspro.py:123
↓ 1 callersFunctionunpack
(dec, width, height, parallel_size=5)
demo/app.py:110
↓ 1 callersFunctionunpack
(dec, width, height, parallel_size=5)
demo/fastapi_app.py:119
FunctionVQ_16
(**kwargs)
janus/models/vq_model.py:519
Method__call__
Args: prompt (str): the formatted prompt; conversations (List[Dict]): conversations with a list of messages;
janus/janusflow/models/processing_vlm.py:352
Method__call__
Args: prompt (str): the formatted prompt; conversations (List[Dict]): conversations with a list of messages;
janus/models/processing_vlm.py:322
Method__getitem__
(self, item)
janus/janusflow/models/processing_vlm.py:36
Method__getitem__
(self, item)
janus/models/processing_vlm.py:36
Method__init__
( self, image_size: int, min_size: int = 14, image_mean: Union[Tuple[float, fl
janus/janusflow/models/image_processing_vlm.py:64
Method__init__
(self, decoder_cfg, gpt_cfg, layer_id=None)
janus/janusflow/models/uvit.py:37
Method__init__
(self, dim)
janus/janusflow/models/uvit.py:139
Method__init__
( self, channels: int, use_conv: bool = False, out_channels: Optional[int] = N
janus/janusflow/models/uvit.py:167
Method__init__
( self, channels: int, use_conv: bool = False, use_conv_transpose: bool = Fals
janus/janusflow/models/uvit.py:255
Method__init__
( self, channels, norm_eps, elementwise_affine, use_bias, hidd
janus/janusflow/models/uvit.py:374
Method__init__
( self, in_channels, out_channels, patch_size, bias, elementwise_affine, eps )
janus/janusflow/models/uvit.py:462
Method__init__
( self, channels, out_channels, num_res_blocks, stride, hidden
janus/janusflow/models/uvit.py:487
Method__init__
( self, input_channels=3, stride=4, kernel_size=7, padding=None,
janus/janusflow/models/uvit.py:573
Method__init__
( self, in_channels=768, out_channels=3, block_out_channels: Tuple[int] = (768
janus/janusflow/models/uvit.py:645
Method__init__
(self, **kwargs)
janus/janusflow/models/modeling_vlm.py:56
Method__init__
(self, **kwargs)
janus/janusflow/models/modeling_vlm.py:71
Method__init__
(self, **kwargs)
janus/janusflow/models/modeling_vlm.py:86
Method__init__
(self, config: MultiModalityConfig)
janus/janusflow/models/modeling_vlm.py:134
Method__init__
( self, image_processor: VLMImageProcessor, tokenizer: LlamaTokenizerFast, ima
janus/janusflow/models/processing_vlm.py:84
next →1–100 of 216, ranked by callers