text stringlengths 41 89.8k | type stringclasses 1
value | start int64 79 258k | end int64 342 260k | depth int64 0 0 | filepath stringlengths 81 164 | parent_class null | class_index int64 0 1.38k |
|---|---|---|---|---|---|---|---|
class LeditsGaussianSmoothing:
def __init__(self, device):
kernel_size = [3, 3]
sigma = [0.5, 0.5]
# The gaussian kernel is the product of the gaussian function of each dimension.
kernel = 1
meshgrids = torch.meshgrid([torch.arange(size, dtype=torch.float32) for size in kern... | class_definition | 6,807 | 7,996 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion_xl.py | null | 100 |
class LEDITSCrossAttnProcessor:
def __init__(self, attention_store, place_in_unet, pnp, editing_prompts):
self.attnstore = attention_store
self.place_in_unet = place_in_unet
self.editing_prompts = editing_prompts
self.pnp = pnp
def __call__(
self,
attn: Attention... | class_definition | 8,103 | 9,930 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion_xl.py | null | 101 |
class LEditsPPPipelineStableDiffusionXL(
DiffusionPipeline,
FromSingleFileMixin,
StableDiffusionXLLoraLoaderMixin,
TextualInversionLoaderMixin,
IPAdapterMixin,
):
"""
Pipeline for textual image editing using LEDits++ with Stable Diffusion XL.
This model inherits from [`DiffusionPipeline... | class_definition | 9,933 | 82,219 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion_xl.py | null | 102 |
class LEditsPPDiffusionPipelineOutput(BaseOutput):
"""
Output class for LEdits++ Diffusion pipelines.
Args:
images (`List[PIL.Image.Image]` or `np.ndarray`)
List of denoised PIL images of length `batch_size` or NumPy array of shape `(batch_size, height, width,
num_channels)`... | class_definition | 158 | 817 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/ledits_pp/pipeline_output.py | null | 103 |
class LEditsPPInversionPipelineOutput(BaseOutput):
"""
Output class for LEdits++ Diffusion pipelines.
Args:
input_images (`List[PIL.Image.Image]` or `np.ndarray`)
List of the cropped and resized input images as PIL images of length `batch_size` or NumPy array of shape `
(bat... | class_definition | 831 | 1,578 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/ledits_pp/pipeline_output.py | null | 104 |
class LeditsAttentionStore:
@staticmethod
def get_empty_store():
return {"down_cross": [], "mid_cross": [], "up_cross": [], "down_self": [], "mid_self": [], "up_self": []}
def __call__(self, attn, is_cross: bool, place_in_unet: str, editing_prompts, PnP=False):
# attn.shape = batch_size * h... | class_definition | 2,408 | 5,890 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py | null | 105 |
class LeditsGaussianSmoothing:
def __init__(self, device):
kernel_size = [3, 3]
sigma = [0.5, 0.5]
# The gaussian kernel is the product of the gaussian function of each dimension.
kernel = 1
meshgrids = torch.meshgrid([torch.arange(size, dtype=torch.float32) for size in kern... | class_definition | 6,029 | 7,218 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py | null | 106 |
class LEDITSCrossAttnProcessor:
def __init__(self, attention_store, place_in_unet, pnp, editing_prompts):
self.attnstore = attention_store
self.place_in_unet = place_in_unet
self.editing_prompts = editing_prompts
self.pnp = pnp
def __call__(
self,
attn: Attention... | class_definition | 7,221 | 9,048 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py | null | 107 |
class LEditsPPPipelineStableDiffusion(
DiffusionPipeline, TextualInversionLoaderMixin, StableDiffusionLoraLoaderMixin, IPAdapterMixin, FromSingleFileMixin
):
"""
Pipeline for textual image editing using LEDits++ with Stable Diffusion.
This model inherits from [`DiffusionPipeline`] and builds on the [`S... | class_definition | 10,448 | 71,946 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py | null | 108 |
class CogVideoXPipelineOutput(BaseOutput):
r"""
Output class for CogVideo pipelines.
Args:
frames (`torch.Tensor`, `np.ndarray`, or List[List[PIL.Image.Image]]):
List of video outputs - It can be a nested list of length `batch_size,` with each sub-list containing
denoised PI... | class_definition | 101 | 615 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/cogvideo/pipeline_output.py | null | 109 |
class CogVideoXPipeline(DiffusionPipeline, CogVideoXLoraLoaderMixin):
r"""
Pipeline for text-to-video generation using CogVideoX.
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading ... | class_definition | 6,650 | 37,456 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/cogvideo/pipeline_cogvideox.py | null | 110 |
class CogVideoXFunControlPipeline(DiffusionPipeline, CogVideoXLoraLoaderMixin):
r"""
Pipeline for controlled text-to-video generation using CogVideoX Fun.
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the
library implements for all the pipeli... | class_definition | 6,674 | 40,017 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/cogvideo/pipeline_cogvideox_fun_control.py | null | 111 |
class CogVideoXImageToVideoPipeline(DiffusionPipeline, CogVideoXLoraLoaderMixin):
r"""
Pipeline for image-to-video generation using CogVideoX.
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as... | class_definition | 7,021 | 42,460 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/cogvideo/pipeline_cogvideox_image2video.py | null | 112 |
class CogVideoXVideoToVideoPipeline(DiffusionPipeline, CogVideoXLoraLoaderMixin):
r"""
Pipeline for video-to-video generation using CogVideoX.
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as... | class_definition | 7,468 | 41,071 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/cogvideo/pipeline_cogvideox_video2video.py | null | 113 |
class LatentConsistencyModelImg2ImgPipeline(
DiffusionPipeline,
StableDiffusionMixin,
TextualInversionLoaderMixin,
IPAdapterMixin,
StableDiffusionLoraLoaderMixin,
FromSingleFileMixin,
):
r"""
Pipeline for image-to-image generation using a latent consistency model.
This model inherit... | class_definition | 6,649 | 49,539 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_img2img.py | null | 114 |
class LatentConsistencyModelPipeline(
DiffusionPipeline,
StableDiffusionMixin,
TextualInversionLoaderMixin,
IPAdapterMixin,
StableDiffusionLoraLoaderMixin,
FromSingleFileMixin,
):
r"""
Pipeline for text-to-image generation using a latent consistency model.
This model inherits from [... | class_definition | 5,850 | 46,047 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_text2img.py | null | 115 |
class MarigoldImageProcessor(ConfigMixin):
config_name = CONFIG_NAME
@register_to_config
def __init__(
self,
vae_scale_factor: int = 8,
do_normalize: bool = True,
do_range_check: bool = True,
):
super().__init__()
@staticmethod
def expand_tensor_or_array... | class_definition | 453 | 25,053 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/marigold/marigold_image_processing.py | null | 116 |
class MarigoldDepthOutput(BaseOutput):
"""
Output class for Marigold monocular depth prediction pipeline.
Args:
prediction (`np.ndarray`, `torch.Tensor`):
Predicted depth maps with values in the range [0, 1]. The shape is always $numimages \times 1 \times height
\times width... | class_definition | 2,561 | 3,586 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py | null | 117 |
class MarigoldDepthPipeline(DiffusionPipeline):
"""
Pipeline for monocular depth estimation using the Marigold method: https://marigoldmonodepth.github.io.
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the
library implements for all the pipel... | class_definition | 3,589 | 41,081 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py | null | 118 |
class MarigoldNormalsOutput(BaseOutput):
"""
Output class for Marigold monocular normals prediction pipeline.
Args:
prediction (`np.ndarray`, `torch.Tensor`):
Predicted normals with values in the range [-1, 1]. The shape is always $numimages \times 3 \times height
\times wid... | class_definition | 2,354 | 3,381 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/marigold/pipeline_marigold_normals.py | null | 119 |
class MarigoldNormalsPipeline(DiffusionPipeline):
"""
Pipeline for monocular normals estimation using the Marigold method: https://marigoldmonodepth.github.io.
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the
library implements for all the p... | class_definition | 3,384 | 34,661 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/marigold/pipeline_marigold_normals.py | null | 120 |
class UniDiffuserTextDecoder(ModelMixin, ConfigMixin, ModuleUtilsMixin):
"""
Text decoder model for a image-text [UniDiffuser](https://arxiv.org/pdf/2303.06555.pdf) model. This is used to
generate text from the UniDiffuser image-text embedding.
Parameters:
prefix_length (`int`):
Max... | class_definition | 403 | 14,107 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/unidiffuser/modeling_text_decoder.py | null | 121 |
class ImageTextPipelineOutput(BaseOutput):
"""
Output class for joint image-text pipelines.
Args:
images (`List[PIL.Image.Image]` or `np.ndarray`)
List of denoised PIL images of length `batch_size` or NumPy array of shape `(batch_size, height, width,
num_channels)`.
... | class_definition | 1,232 | 1,866 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py | null | 122 |
class UniDiffuserPipeline(DiffusionPipeline):
r"""
Pipeline for a bimodal image-text model which supports unconditional text and image generation, text-conditioned
image generation, image-conditioned text generation, and joint image-text generation.
This model inherits from [`DiffusionPipeline`]. Check... | class_definition | 1,869 | 68,781 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py | null | 123 |
class PatchEmbed(nn.Module):
"""2D Image to Patch Embedding"""
def __init__(
self,
height=224,
width=224,
patch_size=16,
in_channels=3,
embed_dim=768,
layer_norm=False,
flatten=True,
bias=True,
use_pos_embed=True,
):
su... | class_definition | 2,882 | 4,265 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/unidiffuser/modeling_uvit.py | null | 124 |
class SkipBlock(nn.Module):
def __init__(self, dim: int):
super().__init__()
self.skip_linear = nn.Linear(2 * dim, dim)
# Use torch.nn.LayerNorm for now, following the original code
self.norm = nn.LayerNorm(dim)
def forward(self, x, skip):
x = self.skip_linear(torch.ca... | class_definition | 4,268 | 4,652 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/unidiffuser/modeling_uvit.py | null | 125 |
class UTransformerBlock(nn.Module):
r"""
A modification of BasicTransformerBlock which supports pre-LayerNorm and post-LayerNorm configurations.
Parameters:
dim (`int`): The number of channels in the input and output.
num_attention_heads (`int`): The number of heads to use for multi-head at... | class_definition | 4,836 | 12,852 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/unidiffuser/modeling_uvit.py | null | 126 |
class UniDiffuserBlock(nn.Module):
r"""
A modification of BasicTransformerBlock which supports pre-LayerNorm and post-LayerNorm configurations and puts the
LayerNorms on the residual backbone of the block. This matches the transformer block in the [original UniDiffuser
implementation](https://github.com... | class_definition | 13,006 | 21,336 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/unidiffuser/modeling_uvit.py | null | 127 |
class UTransformer2DModel(ModelMixin, ConfigMixin):
"""
Transformer model based on the [U-ViT](https://github.com/baofff/U-ViT) architecture for image-like data. Compared
to [`Transformer2DModel`], this model has skip connections between transformer blocks in a "U"-shaped fashion,
similar to a U-Net. Su... | class_definition | 21,581 | 36,402 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/unidiffuser/modeling_uvit.py | null | 128 |
class UniDiffuserModel(ModelMixin, ConfigMixin):
"""
Transformer model for a image-text [UniDiffuser](https://arxiv.org/pdf/2303.06555.pdf) model. This is a
modification of [`UTransformer2DModel`] with input and output heads for the VAE-embedded latent image, the
CLIP-embedded image, and the CLIP-embedd... | class_definition | 36,405 | 54,281 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/unidiffuser/modeling_uvit.py | null | 129 |
class CrossAttnStoreProcessor:
def __init__(self):
self.attention_probs = None
def __call__(
self,
attn,
hidden_states,
encoder_hidden_states=None,
attention_mask=None,
):
batch_size, sequence_length, _ = hidden_states.shape
attention_mask = a... | class_definition | 2,378 | 3,646 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/stable_diffusion_sag/pipeline_stable_diffusion_sag.py | null | 130 |
class StableDiffusionSAGPipeline(DiffusionPipeline, StableDiffusionMixin, TextualInversionLoaderMixin, IPAdapterMixin):
r"""
Pipeline for text-to-image generation using Stable Diffusion.
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods
implement... | class_definition | 3,762 | 47,280 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/stable_diffusion_sag/pipeline_stable_diffusion_sag.py | null | 131 |
class MusicLDMPipeline(DiffusionPipeline, StableDiffusionMixin):
r"""
Pipeline for text-to-audio generation using MusicLDM.
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particu... | class_definition | 2,228 | 30,464 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/musicldm/pipeline_musicldm.py | null | 132 |
class CrossFrameAttnProcessor:
"""
Cross frame attention processor. Each frame attends the first frame.
Args:
batch_size: The number that represents actual batch size, other than the frames.
For example, calling unet with a single prompt and num_images_per_prompt=1, batch_size should be... | class_definition | 2,509 | 4,834 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero_sdxl.py | null | 133 |
class CrossFrameAttnProcessor2_0:
"""
Cross frame attention processor with scaled_dot_product attention of Pytorch 2.0.
Args:
batch_size: The number that represents actual batch size, other than the frames.
For example, calling unet with a single prompt and num_images_per_prompt=1, batc... | class_definition | 4,950 | 8,285 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero_sdxl.py | null | 134 |
class TextToVideoSDXLPipelineOutput(BaseOutput):
"""
Output class for zero-shot text-to-video pipeline.
Args:
images (`List[PIL.Image.Image]` or `np.ndarray`)
List of denoised PIL images of length `batch_size` or numpy array of shape `(batch_size, height, width,
num_channels... | class_definition | 8,299 | 8,765 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero_sdxl.py | null | 135 |
class TextToVideoZeroSDXLPipeline(
DiffusionPipeline,
StableDiffusionMixin,
StableDiffusionXLLoraLoaderMixin,
TextualInversionLoaderMixin,
):
r"""
Pipeline for zero-shot text-to-video generation using Stable Diffusion XL.
This model inherits from [`DiffusionPipeline`]. Check the superclass ... | class_definition | 13,588 | 64,679 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero_sdxl.py | null | 136 |
class CrossFrameAttnProcessor:
"""
Cross frame attention processor. Each frame attends the first frame.
Args:
batch_size: The number that represents actual batch size, other than the frames.
For example, calling unet with a single prompt and num_images_per_prompt=1, batch_size should be... | class_definition | 1,693 | 4,018 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py | null | 137 |
class CrossFrameAttnProcessor2_0:
"""
Cross frame attention processor with scaled_dot_product attention of Pytorch 2.0.
Args:
batch_size: The number that represents actual batch size, other than the frames.
For example, calling unet with a single prompt and num_images_per_prompt=1, batc... | class_definition | 4,021 | 7,356 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py | null | 138 |
class TextToVideoPipelineOutput(BaseOutput):
r"""
Output class for zero-shot text-to-video pipeline.
Args:
images (`[List[PIL.Image.Image]`, `np.ndarray`]):
List of denoised PIL images of length `batch_size` or NumPy array of shape `(batch_size, height, width,
num_channels)`... | class_definition | 7,370 | 8,028 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py | null | 139 |
class TextToVideoZeroPipeline(
DiffusionPipeline,
StableDiffusionMixin,
TextualInversionLoaderMixin,
StableDiffusionLoraLoaderMixin,
FromSingleFileMixin,
):
r"""
Pipeline for zero-shot text-to-video generation using Stable Diffusion.
This model inherits from [`DiffusionPipeline`]. Check... | class_definition | 11,022 | 45,720 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py | null | 140 |
class TextToVideoSDPipelineOutput(BaseOutput):
"""
Output class for text-to-video pipelines.
Args:
frames (`torch.Tensor`, `np.ndarray`, or List[List[PIL.Image.Image]]):
List of video outputs - It can be a nested list of length `batch_size,` with each sub-list containing
... | class_definition | 164 | 734 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/text_to_video_synthesis/pipeline_output.py | null | 141 |
class VideoToVideoSDPipeline(
DiffusionPipeline, StableDiffusionMixin, TextualInversionLoaderMixin, StableDiffusionLoraLoaderMixin
):
r"""
Pipeline for text-guided video-to-video generation.
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods
i... | class_definition | 3,969 | 35,313 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py | null | 142 |
class TextToVideoSDPipeline(
DiffusionPipeline, StableDiffusionMixin, TextualInversionLoaderMixin, StableDiffusionLoraLoaderMixin
):
r"""
Pipeline for text-to-video generation.
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods
implemented for... | class_definition | 2,185 | 31,795 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py | null | 143 |
class StableDiffusionPanoramaPipeline(
DiffusionPipeline,
StableDiffusionMixin,
TextualInversionLoaderMixin,
StableDiffusionLoraLoaderMixin,
IPAdapterMixin,
):
r"""
Pipeline for text-to-image generation using MultiDiffusion.
This model inherits from [`DiffusionPipeline`]. Check the supe... | class_definition | 6,976 | 60,115 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/stable_diffusion_panorama/pipeline_stable_diffusion_panorama.py | null | 144 |
class AnimateDiffVideoToVideoPipeline(
DiffusionPipeline,
StableDiffusionMixin,
TextualInversionLoaderMixin,
IPAdapterMixin,
StableDiffusionLoraLoaderMixin,
FreeInitMixin,
AnimateDiffFreeNoiseMixin,
):
r"""
Pipeline for video-to-video generation.
This model inherits from [`Diffu... | class_definition | 7,786 | 52,167 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/animatediff/pipeline_animatediff_video2video.py | null | 145 |
class AnimateDiffVideoToVideoControlNetPipeline(
DiffusionPipeline,
StableDiffusionMixin,
TextualInversionLoaderMixin,
IPAdapterMixin,
StableDiffusionLoraLoaderMixin,
FreeInitMixin,
AnimateDiffFreeNoiseMixin,
):
r"""
Pipeline for video-to-video generation with ControlNet guidance.
... | class_definition | 8,622 | 67,519 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/animatediff/pipeline_animatediff_video2video_controlnet.py | null | 146 |
class AnimateDiffSDXLPipeline(
DiffusionPipeline,
StableDiffusionMixin,
FromSingleFileMixin,
StableDiffusionXLLoraLoaderMixin,
TextualInversionLoaderMixin,
IPAdapterMixin,
FreeInitMixin,
):
r"""
Pipeline for text-to-video generation using Stable Diffusion XL.
This model inherits... | class_definition | 8,304 | 66,501 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/animatediff/pipeline_animatediff_sdxl.py | null | 147 |
class AnimateDiffPipelineOutput(BaseOutput):
r"""
Output class for AnimateDiff pipelines.
Args:
frames (`torch.Tensor`, `np.ndarray`, or List[List[PIL.Image.Image]]):
List of video outputs - It can be a nested list of length `batch_size,` with each sub-list containing
de... | class_definition | 161 | 728 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/animatediff/pipeline_output.py | null | 148 |
class AnimateDiffPipeline(
DiffusionPipeline,
StableDiffusionMixin,
TextualInversionLoaderMixin,
IPAdapterMixin,
StableDiffusionLoraLoaderMixin,
FreeInitMixin,
AnimateDiffFreeNoiseMixin,
):
r"""
Pipeline for text-to-video generation.
This model inherits from [`DiffusionPipeline`... | class_definition | 2,752 | 42,359 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/animatediff/pipeline_animatediff.py | null | 149 |
class AnimateDiffSparseControlNetPipeline(
DiffusionPipeline,
StableDiffusionMixin,
TextualInversionLoaderMixin,
IPAdapterMixin,
StableDiffusionLoraLoaderMixin,
FreeInitMixin,
):
r"""
Pipeline for controlled text-to-video generation using the method described in [SparseCtrl: Adding Spars... | class_definition | 5,717 | 51,439 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/animatediff/pipeline_animatediff_sparsectrl.py | null | 150 |
class AnimateDiffControlNetPipeline(
DiffusionPipeline,
StableDiffusionMixin,
TextualInversionLoaderMixin,
IPAdapterMixin,
StableDiffusionLoraLoaderMixin,
FreeInitMixin,
AnimateDiffFreeNoiseMixin,
):
r"""
Pipeline for text-to-video generation with ControlNet guidance.
This model... | class_definition | 5,160 | 55,865 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/animatediff/pipeline_animatediff_controlnet.py | null | 151 |
class DDIMPipeline(DiffusionPipeline):
r"""
Pipeline for image generation.
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).
Parameters:
unet ... | class_definition | 1,001 | 6,839 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/ddim/pipeline_ddim.py | null | 152 |
class AudioLDM2ProjectionModelOutput(BaseOutput):
"""
Args:
Class for AudioLDM2 projection layer's outputs.
hidden_states (`torch.Tensor` of shape `(batch_size, sequence_length, hidden_size)`):
Sequence of hidden-states obtained by linearly projecting the hidden-states for each of the te... | class_definition | 2,330 | 3,210 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/audioldm2/modeling_audioldm2.py | null | 153 |
class AudioLDM2ProjectionModel(ModelMixin, ConfigMixin):
"""
A simple linear projection model to map two text embeddings to a shared latent space. It also inserts learned
embedding vectors at the start and end of each text embedding sequence respectively. Each variable appended with
`_1` refers to that ... | class_definition | 3,213 | 6,922 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/audioldm2/modeling_audioldm2.py | null | 154 |
class AudioLDM2UNet2DConditionModel(ModelMixin, ConfigMixin, UNet2DConditionLoadersMixin):
r"""
A conditional 2D UNet model that takes a noisy sample, conditional state, and a timestep and returns a sample
shaped output. Compared to the vanilla [`UNet2DConditionModel`], this variant optionally includes an a... | class_definition | 6,925 | 44,841 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/audioldm2/modeling_audioldm2.py | null | 155 |
class CrossAttnDownBlock2D(nn.Module):
def __init__(
self,
in_channels: int,
out_channels: int,
temb_channels: int,
dropout: float = 0.0,
num_layers: int = 1,
transformer_layers_per_block: int = 1,
resnet_eps: float = 1e-6,
resnet_time_scale_sh... | class_definition | 49,030 | 56,978 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/audioldm2/modeling_audioldm2.py | null | 156 |
class UNetMidBlock2DCrossAttn(nn.Module):
def __init__(
self,
in_channels: int,
temb_channels: int,
dropout: float = 0.0,
num_layers: int = 1,
transformer_layers_per_block: int = 1,
resnet_eps: float = 1e-6,
resnet_time_scale_shift: str = "default",
... | class_definition | 56,981 | 64,709 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/audioldm2/modeling_audioldm2.py | null | 157 |
class CrossAttnUpBlock2D(nn.Module):
def __init__(
self,
in_channels: int,
out_channels: int,
prev_output_channel: int,
temb_channels: int,
dropout: float = 0.0,
num_layers: int = 1,
transformer_layers_per_block: int = 1,
resnet_eps: float = 1e... | class_definition | 64,712 | 72,819 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/audioldm2/modeling_audioldm2.py | null | 158 |
class AudioLDM2Pipeline(DiffusionPipeline):
r"""
Pipeline for text-to-audio generation using AudioLDM2.
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).
... | class_definition | 4,377 | 54,277 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/audioldm2/pipeline_audioldm2.py | null | 159 |
class FluxControlInpaintPipeline(
DiffusionPipeline,
FluxLoraLoaderMixin,
FromSingleFileMixin,
TextualInversionLoaderMixin,
):
r"""
The Flux pipeline for image inpainting using Flux-dev-Depth/Canny.
Reference: https://blackforestlabs.ai/announcing-black-forest-labs/
Args:
trans... | class_definition | 8,178 | 53,740 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/flux/pipeline_flux_control_inpaint.py | null | 160 |
class FluxControlNetInpaintPipeline(DiffusionPipeline, FluxLoraLoaderMixin, FromSingleFileMixin):
r"""
The Flux controlnet pipeline for inpainting.
Reference: https://blackforestlabs.ai/announcing-black-forest-labs/
Args:
transformer ([`FluxTransformer2DModel`]):
Conditional Transf... | class_definition | 7,074 | 55,405 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/flux/pipeline_flux_controlnet_inpainting.py | null | 161 |
class FluxControlNetPipeline(DiffusionPipeline, FluxLoraLoaderMixin, FromSingleFileMixin):
r"""
The Flux pipeline for text-to-image generation.
Reference: https://blackforestlabs.ai/announcing-black-forest-labs/
Args:
transformer ([`FluxTransformer2DModel`]):
Conditional Transforme... | class_definition | 7,167 | 48,065 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/flux/pipeline_flux_controlnet.py | null | 162 |
class FluxPriorReduxPipeline(DiffusionPipeline):
r"""
The Flux Redux pipeline for image-to-image generation.
Reference: https://blackforestlabs.ai/flux-1-tools/
Args:
image_encoder ([`SiglipVisionModel`]):
SIGLIP vision model to encode the input image.
feature_extractor ([`... | class_definition | 2,625 | 21,807 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/flux/pipeline_flux_prior_redux.py | null | 163 |
class FluxControlImg2ImgPipeline(DiffusionPipeline, FluxLoraLoaderMixin, FromSingleFileMixin):
r"""
The Flux pipeline for image inpainting.
Reference: https://blackforestlabs.ai/announcing-black-forest-labs/
Args:
transformer ([`FluxTransformer2DModel`]):
Conditional Transformer (M... | class_definition | 7,297 | 44,747 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/flux/pipeline_flux_control_img2img.py | null | 164 |
class FluxPipelineOutput(BaseOutput):
"""
Output class for Stable Diffusion pipelines.
Args:
images (`List[PIL.Image.Image]` or `np.ndarray`)
List of denoised PIL images of length `batch_size` or numpy array of shape `(batch_size, height, width,
num_channels)`. PIL images or... | class_definition | 161 | 610 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/flux/pipeline_output.py | null | 165 |
class FluxPriorReduxPipelineOutput(BaseOutput):
"""
Output class for Flux Prior Redux pipelines.
Args:
images (`List[PIL.Image.Image]` or `np.ndarray`)
List of denoised PIL images of length `batch_size` or numpy array of shape `(batch_size, height, width,
num_channels)`. PIL... | class_definition | 624 | 1,101 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/flux/pipeline_output.py | null | 166 |
class FluxFillPipeline(
DiffusionPipeline,
FluxLoraLoaderMixin,
FromSingleFileMixin,
TextualInversionLoaderMixin,
):
r"""
The Flux Fill pipeline for image inpainting/outpainting.
Reference: https://blackforestlabs.ai/flux-1-tools/
Args:
transformer ([`FluxTransformer2DModel`]):... | class_definition | 6,901 | 45,542 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/flux/pipeline_flux_fill.py | null | 167 |
class ReduxImageEncoderOutput(BaseOutput):
image_embeds: Optional[torch.Tensor] = None | class_definition | 889 | 979 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/flux/modeling_flux.py | null | 168 |
class ReduxImageEncoder(ModelMixin, ConfigMixin):
@register_to_config
def __init__(
self,
redux_dim: int = 1152,
txt_in_features: int = 4096,
) -> None:
super().__init__()
self.redux_up = nn.Linear(redux_dim, txt_in_features * 3)
self.redux_down = nn.Linear(t... | class_definition | 982 | 1,548 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/flux/modeling_flux.py | null | 169 |
class FluxPipeline(
DiffusionPipeline,
FluxLoraLoaderMixin,
FromSingleFileMixin,
TextualInversionLoaderMixin,
FluxIPAdapterMixin,
):
r"""
The Flux pipeline for text-to-image generation.
Reference: https://blackforestlabs.ai/announcing-black-forest-labs/
Args:
transformer ([... | class_definition | 5,839 | 46,705 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/flux/pipeline_flux.py | null | 170 |
class FluxInpaintPipeline(DiffusionPipeline, FluxLoraLoaderMixin):
r"""
The Flux pipeline for image inpainting.
Reference: https://blackforestlabs.ai/announcing-black-forest-labs/
Args:
transformer ([`FluxTransformer2DModel`]):
Conditional Transformer (MMDiT) architecture to denois... | class_definition | 6,795 | 49,362 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/flux/pipeline_flux_inpaint.py | null | 171 |
class FluxImg2ImgPipeline(DiffusionPipeline, FluxLoraLoaderMixin, FromSingleFileMixin):
r"""
The Flux pipeline for image inpainting.
Reference: https://blackforestlabs.ai/announcing-black-forest-labs/
Args:
transformer ([`FluxTransformer2DModel`]):
Conditional Transformer (MMDiT) a... | class_definition | 6,718 | 40,992 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/flux/pipeline_flux_img2img.py | null | 172 |
class FluxControlNetImg2ImgPipeline(DiffusionPipeline, FluxLoraLoaderMixin, FromSingleFileMixin):
r"""
The Flux controlnet pipeline for image-to-image generation.
Reference: https://blackforestlabs.ai/announcing-black-forest-labs/
Args:
transformer ([`FluxTransformer2DModel`]):
Con... | class_definition | 6,949 | 45,798 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/flux/pipeline_flux_controlnet_image_to_image.py | null | 173 |
class FluxControlPipeline(
DiffusionPipeline,
FluxLoraLoaderMixin,
FromSingleFileMixin,
TextualInversionLoaderMixin,
):
r"""
The Flux pipeline for controllable text-to-image generation.
Reference: https://blackforestlabs.ai/announcing-black-forest-labs/
Args:
transformer ([`Flu... | class_definition | 6,416 | 40,658 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/flux/pipeline_flux_control.py | null | 174 |
class StableAudioPipeline(DiffusionPipeline):
r"""
Pipeline for text-to-audio generation using StableAudio.
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.... | class_definition | 2,529 | 35,590 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/stable_audio/pipeline_stable_audio.py | null | 175 |
class StableAudioPositionalEmbedding(nn.Module):
"""Used for continuous time"""
def __init__(self, dim: int):
super().__init__()
assert (dim % 2) == 0
half_dim = dim // 2
self.weights = nn.Parameter(torch.randn(half_dim))
def forward(self, times: torch.Tensor) -> torch.Tens... | class_definition | 1,003 | 1,560 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/stable_audio/modeling_stable_audio.py | null | 176 |
class StableAudioProjectionModelOutput(BaseOutput):
"""
Args:
Class for StableAudio projection layer's outputs.
text_hidden_states (`torch.Tensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*):
Sequence of hidden-states obtained by linearly projecting the hidden-stat... | class_definition | 1,574 | 2,515 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/stable_audio/modeling_stable_audio.py | null | 177 |
class StableAudioNumberConditioner(nn.Module):
"""
A simple linear projection model to map numbers to a latent space.
Args:
number_embedding_dim (`int`):
Dimensionality of the number embeddings.
min_value (`int`):
The minimum value of the seconds number conditioning ... | class_definition | 2,518 | 4,159 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/stable_audio/modeling_stable_audio.py | null | 178 |
class StableAudioProjectionModel(ModelMixin, ConfigMixin):
"""
A simple linear projection model to map the conditioning values to a shared latent space.
Args:
text_encoder_dim (`int`):
Dimensionality of the text embeddings from the text encoder (T5).
conditioning_dim (`int`):
... | class_definition | 4,162 | 6,126 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/stable_audio/modeling_stable_audio.py | null | 179 |
class KandinskyV22Pipeline(DiffusionPipeline):
"""
Pipeline for text-to-image generation using Kandinsky
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a p... | class_definition | 2,413 | 14,364 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2.py | null | 180 |
class KandinskyV22InpaintPipeline(DiffusionPipeline):
"""
Pipeline for text-guided image inpainting using Kandinsky2.1
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, ... | class_definition | 9,461 | 25,006 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_inpainting.py | null | 181 |
class KandinskyV22ControlnetImg2ImgPipeline(DiffusionPipeline):
"""
Pipeline for image-to-image generation using Kandinsky
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or savi... | class_definition | 4,824 | 17,573 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_controlnet_img2img.py | null | 182 |
class KandinskyV22ControlnetPipeline(DiffusionPipeline):
"""
Pipeline for text-to-image generation using Kandinsky
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, runn... | class_definition | 4,214 | 14,329 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_controlnet.py | null | 183 |
class KandinskyV22CombinedPipeline(DiffusionPipeline):
"""
Combined Pipeline for text-to-image generation using Kandinsky
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or savin... | class_definition | 3,841 | 16,109 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_combined.py | null | 184 |
class KandinskyV22Img2ImgCombinedPipeline(DiffusionPipeline):
"""
Combined Pipeline for image-to-image generation using Kandinsky
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading ... | class_definition | 16,112 | 29,507 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_combined.py | null | 185 |
class KandinskyV22InpaintCombinedPipeline(DiffusionPipeline):
"""
Combined Pipeline for inpainting generation using Kandinsky
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or s... | class_definition | 29,510 | 44,178 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_combined.py | null | 186 |
class KandinskyV22PriorPipeline(DiffusionPipeline):
"""
Pipeline for generating image prior for Kandinsky
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a ... | class_definition | 3,102 | 25,623 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_prior.py | null | 187 |
class KandinskyV22Img2ImgPipeline(DiffusionPipeline):
"""
Pipeline for image-to-image generation using Kandinsky
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, runnin... | class_definition | 3,338 | 18,163 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_img2img.py | null | 188 |
class KandinskyV22PriorEmb2EmbPipeline(DiffusionPipeline):
"""
Pipeline for generating image prior for Kandinsky
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, runnin... | class_definition | 3,430 | 25,175 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_prior_emb2emb.py | null | 189 |
class VoidNeRFModel(nn.Module):
"""
Implements the default empty space model where all queries are rendered as background.
"""
def __init__(self, background, channel_scale=255.0):
super().__init__()
background = nn.Parameter(torch.from_numpy(np.array(background)).to(dtype=torch.float32)... | class_definition | 7,496 | 8,249 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/shap_e/renderer.py | null | 190 |
class VolumeRange:
t0: torch.Tensor
t1: torch.Tensor
intersected: torch.Tensor
def __post_init__(self):
assert self.t0.shape == self.t1.shape == self.intersected.shape
def partition(self, ts):
"""
Partitions t0 and t1 into n_samples intervals.
Args:
ts:... | class_definition | 8,263 | 9,192 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/shap_e/renderer.py | null | 191 |
class BoundingBoxVolume(nn.Module):
"""
Axis-aligned bounding box defined by the two opposite corners.
"""
def __init__(
self,
*,
bbox_min,
bbox_max,
min_dist: float = 0.0,
min_t_range: float = 1e-3,
):
"""
Args:
bbox_min: ... | class_definition | 9,195 | 12,331 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/shap_e/renderer.py | null | 192 |
class StratifiedRaySampler(nn.Module):
"""
Instead of fixed intervals, a sample is drawn uniformly at random from each interval.
"""
def __init__(self, depth_mode: str = "linear"):
"""
:param depth_mode: linear samples ts linearly in depth. harmonic ensures
closer points are... | class_definition | 12,334 | 14,328 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/shap_e/renderer.py | null | 193 |
class ImportanceRaySampler(nn.Module):
"""
Given the initial estimate of densities, this samples more from regions/bins expected to have objects.
"""
def __init__(
self,
volume_range: VolumeRange,
ts: torch.Tensor,
weights: torch.Tensor,
blur_pool: bool = False,
... | class_definition | 14,331 | 16,619 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/shap_e/renderer.py | null | 194 |
class MeshDecoderOutput(BaseOutput):
"""
A 3D triangle mesh with optional data at the vertices and faces.
Args:
verts (`torch.Tensor` of shape `(N, 3)`):
array of vertext coordinates
faces (`torch.Tensor` of shape `(N, 3)`):
array of triangles, pointing to indices in... | class_definition | 16,633 | 17,150 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/shap_e/renderer.py | null | 195 |
class MeshDecoder(nn.Module):
"""
Construct meshes from Signed distance functions (SDFs) using marching cubes method
"""
def __init__(self):
super().__init__()
cases = torch.zeros(256, 5, 3, dtype=torch.long)
masks = torch.zeros(256, 5, dtype=torch.bool)
self.register_b... | class_definition | 17,153 | 22,870 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/shap_e/renderer.py | null | 196 |
class MLPNeRFModelOutput(BaseOutput):
density: torch.Tensor
signed_distance: torch.Tensor
channels: torch.Tensor
ts: torch.Tensor | class_definition | 22,884 | 23,029 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/shap_e/renderer.py | null | 197 |
class MLPNeRSTFModel(ModelMixin, ConfigMixin):
@register_to_config
def __init__(
self,
d_hidden: int = 256,
n_output: int = 12,
n_hidden_layers: int = 6,
act_fn: str = "swish",
insert_direction_at: int = 4,
):
super().__init__()
# Instantiate ... | class_definition | 23,032 | 26,277 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/shap_e/renderer.py | null | 198 |
class ChannelsProj(nn.Module):
def __init__(
self,
*,
vectors: int,
channels: int,
d_latent: int,
):
super().__init__()
self.proj = nn.Linear(d_latent, vectors * channels)
self.norm = nn.LayerNorm(channels)
self.d_latent = d_latent
... | class_definition | 26,280 | 26,998 | 0 | /Users/nielsrogge/Documents/python_projecten/diffusers/src/diffusers/pipelines/shap_e/renderer.py | null | 199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.