MCPcopy Index your code

hub / github.com/apple/ml-stable-diffusion / functions

Functions150 in github.com/apple/ml-stable-diffusion

Method__init__
( self, conditioning_embedding_channels, conditioning_channels=3, block_out_ch
python_coreml_stable_diffusion/controlnet.py:17
Method__init__
(self, with_hidden_states_for_layer=None)
python_coreml_stable_diffusion/torch2coreml.py:326
Method__init__
(self)
python_coreml_stable_diffusion/torch2coreml.py:604
Method__init__
( self, text_encoder: CoreMLModel, unet: CoreMLModel, vae_deco
python_coreml_stable_diffusion/pipeline.py:52
Method__init__
(self, model_path, compute_unit, sources='packages')
python_coreml_stable_diffusion/coreml_model.py:25
Method__init__
(self, proj)
python_coreml_stable_diffusion/multilingual_projection.py:24
Method__init__
Args: num_channels: Number of channels (C) where the expected input data format is BC1S. S stands for sequence length.
python_coreml_stable_diffusion/layer_norm.py:18
Functionbaddbmm
baddbmm(Tensor input, Tensor batch1, Tensor batch2, Scalar beta=1, Scalar alpha=1) output = beta * input + alpha * batch1 * batch2
python_coreml_stable_diffusion/torch2coreml.py:429
Methodcollect_timings
Collect user latency for callable
tests/test_stable_diffusion.py:267
Functioncorrect_for_bias_scale_order_inversion
(state_dict, prefix, local_metadata, strict, missing_keys,
python_coreml_stable_diffusion/unet.py:125
Functionfake_int8_quantize
(module)
python_coreml_stable_diffusion/mixed_bit_compression_pre_analysis.py:205
Functionfake_palette_from_recipe
(module, recipe)
python_coreml_stable_diffusion/mixed_bit_compression_pre_analysis.py:226
Methodforward
(self, hidden_states, context=None, mask=None)
python_coreml_stable_diffusion/unet.py:70
Methodforward
(self, hidden_states, res_hidden_states_tuple, temb=None,
python_coreml_stable_diffusion/unet.py:200
Methodforward
(self, hidden_states, res_hidden_states_tuple, temb=None)
python_coreml_stable_diffusion/unet.py:259
Methodforward
(self, hidden_states, temb=None, encoder_hidden_states=None)
python_coreml_stable_diffusion/unet.py:329
Methodforward
(self, hidden_states, temb=None)
python_coreml_stable_diffusion/unet.py:382
Methodforward
(self, x, temb)
python_coreml_stable_diffusion/unet.py:463
Methodforward
(self, x)
python_coreml_stable_diffusion/unet.py:491
Methodforward
(self, x)
python_coreml_stable_diffusion/unet.py:502
Methodforward
(self, hidden_states, context=None)
python_coreml_stable_diffusion/unet.py:546
Methodforward
(self, hidden_states, context=None)
python_coreml_stable_diffusion/unet.py:579
Methodforward
(self, hidden_states)
python_coreml_stable_diffusion/unet.py:598
Methodforward
(self, hidden_states)
python_coreml_stable_diffusion/unet.py:608
Methodforward
(self, sample, condition=None)
python_coreml_stable_diffusion/unet.py:658
Methodforward
(self, timesteps)
python_coreml_stable_diffusion/unet.py:686
Methodforward
(self, hidden_states, temb=None, encoder_hidden_states=None)
python_coreml_stable_diffusion/unet.py:782
Methodforward
( self, sample, timestep, encoder_hidden_states, *additional_residuals
python_coreml_stable_diffusion/unet.py:965
Methodforward
( self, sample, timestep, encoder_hidden_states, time_ids, tex
python_coreml_stable_diffusion/unet.py:1045
Methodforward
(self, conditioning)
python_coreml_stable_diffusion/controlnet.py:37
Methodforward
( self, sample, timestep, encoder_hidden_states, controlnet_cond,
python_coreml_stable_diffusion/controlnet.py:199
Methodforward
(self, input_ids)
python_coreml_stable_diffusion/torch2coreml.py:331
Methodforward
(self, z)
python_coreml_stable_diffusion/torch2coreml.py:509
Methodforward
(self, x)
python_coreml_stable_diffusion/torch2coreml.py:609
Methodforward
(self, x)
python_coreml_stable_diffusion/multilingual_projection.py:28
Methodforward
(self, inputs)
python_coreml_stable_diffusion/layer_norm.py:51
Functionforward_coreml
Forward pass implementation for safety_checker
python_coreml_stable_diffusion/torch2coreml.py:970
Functionforward_extended_return
(self, clip_input, images, adjustment)
python_coreml_stable_diffusion/torch2coreml.py:1011
Functionlinear_to_conv2d_map
Unsqueeze twice to map nn.Linear weights to nn.Conv2d weights
python_coreml_stable_diffusion/unet.py:114
Functionoriginal
Attention Implementation backing AttentionImplementations.ORIGINAL - Not recommended for ANE - Recommended for GPU
python_coreml_stable_diffusion/attention.py:125
Functionpatched_make_causal_mask
Patch to replace torch.finfo(dtype).min with -1e4
python_coreml_stable_diffusion/torch2coreml.py:280
MethodsetUpClass
(cls)
tests/test_stable_diffusion.py:54
Functionsplit_einsum_v2
Attention Implementation backing AttentionImplementations.SPLIT_EINSUM_V2 - Implements https://machinelearning.apple.com/research/neural-engine-
python_coreml_stable_diffusion/attention.py:55
MethodtearDownClass
(cls)
tests/test_stable_diffusion.py:65
Methodtest_coreml_text_to_image_speed
Execute Core ML based image generation
tests/test_stable_diffusion.py:256
Methodtest_end_to_end_image_generation_speed
Tests: - Speed of CoreML runtime across several compute units - Integration with `diffusers.pipelines.stable_diffusion.pipeline_stabl
tests/test_stable_diffusion.py:95
Methodtest_image_to_prompt_clip_score
Tests: Affinity of the generated image with the original prompt via CLIP score
tests/test_stable_diffusion.py:117
Methodtest_safety_checker_efficacy
Tests: - Efficacy of the safety_checker
tests/test_stable_diffusion.py:157
Methodtest_swift_cli_image_generation
Tests: - The bridge between Python and Swift CLI - The signal parity of Swift CLI generated image with that of Python CLI
tests/test_stable_diffusion.py:170
Methodtest_torch_to_coreml_conversion
Tests: - PyTorch to CoreML conversion via coremltools
tests/test_stable_diffusion.py:70
← previous101–150 of 150, ranked by callers