Unverified Commit df2bc5ef authored by Sai-Suraj-27's avatar Sai-Suraj-27 Committed by GitHub
Browse files

fix: Fixed few `docstrings` according to the Google Style Guide (#7717)

Fixed few docstrings according to the Google Style Guide.
parent a7bf77fc
...@@ -981,7 +981,7 @@ def collate_fn(examples, with_prior_preservation=False): ...@@ -981,7 +981,7 @@ def collate_fn(examples, with_prior_preservation=False):
class PromptDataset(Dataset): class PromptDataset(Dataset):
"A simple dataset to prepare the prompts to generate class images on multiple GPUs." """A simple dataset to prepare the prompts to generate class images on multiple GPUs."""
def __init__(self, prompt, num_samples): def __init__(self, prompt, num_samples):
self.prompt = prompt self.prompt = prompt
......
...@@ -1136,7 +1136,7 @@ def collate_fn(examples, with_prior_preservation=False): ...@@ -1136,7 +1136,7 @@ def collate_fn(examples, with_prior_preservation=False):
class PromptDataset(Dataset): class PromptDataset(Dataset):
"A simple dataset to prepare the prompts to generate class images on multiple GPUs." """A simple dataset to prepare the prompts to generate class images on multiple GPUs."""
def __init__(self, prompt, num_samples): def __init__(self, prompt, num_samples):
self.prompt = prompt self.prompt = prompt
......
...@@ -78,7 +78,7 @@ def torch_dfs(model: torch.nn.Module): ...@@ -78,7 +78,7 @@ def torch_dfs(model: torch.nn.Module):
class StableDiffusionReferencePipeline( class StableDiffusionReferencePipeline(
DiffusionPipeline, TextualInversionLoaderMixin, LoraLoaderMixin, IPAdapterMixin, FromSingleFileMixin DiffusionPipeline, TextualInversionLoaderMixin, LoraLoaderMixin, IPAdapterMixin, FromSingleFileMixin
): ):
r""" " r"""
Pipeline for Stable Diffusion Reference. Pipeline for Stable Diffusion Reference.
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods
......
...@@ -152,7 +152,7 @@ def collate_fn(examples, with_prior_preservation): ...@@ -152,7 +152,7 @@ def collate_fn(examples, with_prior_preservation):
class PromptDataset(Dataset): class PromptDataset(Dataset):
"A simple dataset to prepare the prompts to generate class images on multiple GPUs." """A simple dataset to prepare the prompts to generate class images on multiple GPUs."""
def __init__(self, prompt, num_samples): def __init__(self, prompt, num_samples):
self.prompt = prompt self.prompt = prompt
......
...@@ -742,7 +742,7 @@ def collate_fn(examples, with_prior_preservation=False): ...@@ -742,7 +742,7 @@ def collate_fn(examples, with_prior_preservation=False):
class PromptDataset(Dataset): class PromptDataset(Dataset):
"A simple dataset to prepare the prompts to generate class images on multiple GPUs." """A simple dataset to prepare the prompts to generate class images on multiple GPUs."""
def __init__(self, prompt, num_samples): def __init__(self, prompt, num_samples):
self.prompt = prompt self.prompt = prompt
......
...@@ -301,7 +301,7 @@ class DreamBoothDataset(Dataset): ...@@ -301,7 +301,7 @@ class DreamBoothDataset(Dataset):
class PromptDataset(Dataset): class PromptDataset(Dataset):
"A simple dataset to prepare the prompts to generate class images on multiple GPUs." """A simple dataset to prepare the prompts to generate class images on multiple GPUs."""
def __init__(self, prompt, num_samples): def __init__(self, prompt, num_samples):
self.prompt = prompt self.prompt = prompt
......
...@@ -680,7 +680,7 @@ def collate_fn(examples, with_prior_preservation=False): ...@@ -680,7 +680,7 @@ def collate_fn(examples, with_prior_preservation=False):
class PromptDataset(Dataset): class PromptDataset(Dataset):
"A simple dataset to prepare the prompts to generate class images on multiple GPUs." """A simple dataset to prepare the prompts to generate class images on multiple GPUs."""
def __init__(self, prompt, num_samples): def __init__(self, prompt, num_samples):
self.prompt = prompt self.prompt = prompt
......
...@@ -903,7 +903,7 @@ def collate_fn(examples, with_prior_preservation=False): ...@@ -903,7 +903,7 @@ def collate_fn(examples, with_prior_preservation=False):
class PromptDataset(Dataset): class PromptDataset(Dataset):
"A simple dataset to prepare the prompts to generate class images on multiple GPUs." """A simple dataset to prepare the prompts to generate class images on multiple GPUs."""
def __init__(self, prompt, num_samples): def __init__(self, prompt, num_samples):
self.prompt = prompt self.prompt = prompt
......
...@@ -327,7 +327,7 @@ class DreamBoothDataset(Dataset): ...@@ -327,7 +327,7 @@ class DreamBoothDataset(Dataset):
class PromptDataset(Dataset): class PromptDataset(Dataset):
"A simple dataset to prepare the prompts to generate class images on multiple GPUs." """A simple dataset to prepare the prompts to generate class images on multiple GPUs."""
def __init__(self, prompt, num_samples): def __init__(self, prompt, num_samples):
self.prompt = prompt self.prompt = prompt
......
...@@ -385,7 +385,7 @@ class DreamBoothDataset(Dataset): ...@@ -385,7 +385,7 @@ class DreamBoothDataset(Dataset):
class PromptDataset(Dataset): class PromptDataset(Dataset):
"A simple dataset to prepare the prompts to generate class images on multiple GPUs." """A simple dataset to prepare the prompts to generate class images on multiple GPUs."""
def __init__(self, prompt, num_samples): def __init__(self, prompt, num_samples):
self.prompt = prompt self.prompt = prompt
......
...@@ -384,7 +384,7 @@ class DreamBoothDataset(Dataset): ...@@ -384,7 +384,7 @@ class DreamBoothDataset(Dataset):
class PromptDataset(Dataset): class PromptDataset(Dataset):
"A simple dataset to prepare the prompts to generate class images on multiple GPUs." """A simple dataset to prepare the prompts to generate class images on multiple GPUs."""
def __init__(self, prompt, num_samples): def __init__(self, prompt, num_samples):
self.prompt = prompt self.prompt = prompt
......
...@@ -762,7 +762,7 @@ def collate_fn(examples, with_prior_preservation=False): ...@@ -762,7 +762,7 @@ def collate_fn(examples, with_prior_preservation=False):
class PromptDataset(Dataset): class PromptDataset(Dataset):
"A simple dataset to prepare the prompts to generate class images on multiple GPUs." """A simple dataset to prepare the prompts to generate class images on multiple GPUs."""
def __init__(self, prompt, num_samples): def __init__(self, prompt, num_samples):
self.prompt = prompt self.prompt = prompt
......
...@@ -700,7 +700,7 @@ def collate_fn(examples, with_prior_preservation=False): ...@@ -700,7 +700,7 @@ def collate_fn(examples, with_prior_preservation=False):
class PromptDataset(Dataset): class PromptDataset(Dataset):
"A simple dataset to prepare the prompts to generate class images on multiple GPUs." """A simple dataset to prepare the prompts to generate class images on multiple GPUs."""
def __init__(self, prompt, num_samples): def __init__(self, prompt, num_samples):
self.prompt = prompt self.prompt = prompt
......
...@@ -922,7 +922,7 @@ def collate_fn(examples, with_prior_preservation=False): ...@@ -922,7 +922,7 @@ def collate_fn(examples, with_prior_preservation=False):
class PromptDataset(Dataset): class PromptDataset(Dataset):
"A simple dataset to prepare the prompts to generate class images on multiple GPUs." """A simple dataset to prepare the prompts to generate class images on multiple GPUs."""
def __init__(self, prompt, num_samples): def __init__(self, prompt, num_samples):
self.prompt = prompt self.prompt = prompt
......
...@@ -13,7 +13,7 @@ class AnimateDiffPipelineOutput(BaseOutput): ...@@ -13,7 +13,7 @@ class AnimateDiffPipelineOutput(BaseOutput):
r""" r"""
Output class for AnimateDiff pipelines. Output class for AnimateDiff pipelines.
Args: Args:
frames (`torch.Tensor`, `np.ndarray`, or List[List[PIL.Image.Image]]): 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 List of video outputs - It can be a nested list of length `batch_size,` with each sub-list containing
denoised denoised
......
...@@ -76,7 +76,7 @@ class I2VGenXLPipelineOutput(BaseOutput): ...@@ -76,7 +76,7 @@ class I2VGenXLPipelineOutput(BaseOutput):
r""" r"""
Output class for image-to-video pipeline. Output class for image-to-video pipeline.
Args: Args:
frames (`torch.Tensor`, `np.ndarray`, or List[List[PIL.Image.Image]]): 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 List of video outputs - It can be a nested list of length `batch_size,` with each sub-list containing
denoised denoised
......
...@@ -1216,7 +1216,7 @@ class LEditsPPPipelineStableDiffusion( ...@@ -1216,7 +1216,7 @@ class LEditsPPPipelineStableDiffusion(
Paper](https://arxiv.org/abs/2301.12247). If the scheduler is set to [`~schedulers.DDIMScheduler`] the Paper](https://arxiv.org/abs/2301.12247). If the scheduler is set to [`~schedulers.DDIMScheduler`] the
inversion proposed by [edit-friendly DPDM](https://arxiv.org/abs/2304.06140) will be performed instead. inversion proposed by [edit-friendly DPDM](https://arxiv.org/abs/2304.06140) will be performed instead.
Args: Args:
image (`PipelineImageInput`): image (`PipelineImageInput`):
Input for the image(s) that are to be edited. Multiple input images have to default to the same aspect Input for the image(s) that are to be edited. Multiple input images have to default to the same aspect
ratio. ratio.
......
...@@ -1449,7 +1449,7 @@ class LEditsPPPipelineStableDiffusionXL( ...@@ -1449,7 +1449,7 @@ class LEditsPPPipelineStableDiffusionXL(
Paper](https://arxiv.org/abs/2301.12247). If the scheduler is set to [`~schedulers.DDIMScheduler`] the Paper](https://arxiv.org/abs/2301.12247). If the scheduler is set to [`~schedulers.DDIMScheduler`] the
inversion proposed by [edit-friendly DPDM](https://arxiv.org/abs/2304.06140) will be performed instead. inversion proposed by [edit-friendly DPDM](https://arxiv.org/abs/2304.06140) will be performed instead.
Args: Args:
image (`PipelineImageInput`): image (`PipelineImageInput`):
Input for the image(s) that are to be edited. Multiple input images have to default to the same aspect Input for the image(s) that are to be edited. Multiple input images have to default to the same aspect
ratio. ratio.
......
...@@ -844,7 +844,7 @@ class ShapERenderer(ModelMixin, ConfigMixin): ...@@ -844,7 +844,7 @@ class ShapERenderer(ModelMixin, ConfigMixin):
transmittance(t[i + 1]) := transmittance(t[i]). 4) The last term is integration to infinity (e.g. [t[-1], transmittance(t[i + 1]) := transmittance(t[i]). 4) The last term is integration to infinity (e.g. [t[-1],
math.inf]) that is evaluated by the void_model (i.e. we consider this space to be empty). math.inf]) that is evaluated by the void_model (i.e. we consider this space to be empty).
args: Args:
rays: [batch_size x ... x 2 x 3] origin and direction. sampler: disjoint volume integrals. n_samples: rays: [batch_size x ... x 2 x 3] origin and direction. sampler: disjoint volume integrals. n_samples:
number of ts to sample. prev_model_outputs: model outputs from the previous rendering step, including number of ts to sample. prev_model_outputs: model outputs from the previous rendering step, including
......
...@@ -15,7 +15,7 @@ class TextToVideoSDPipelineOutput(BaseOutput): ...@@ -15,7 +15,7 @@ class TextToVideoSDPipelineOutput(BaseOutput):
""" """
Output class for text-to-video pipelines. Output class for text-to-video pipelines.
Args: Args:
frames (`torch.Tensor`, `np.ndarray`, or List[List[PIL.Image.Image]]): 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 List of video outputs - It can be a nested list of length `batch_size,` with each sub-list containing
denoised denoised
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment