index
int64
0
0
repo_id
stringclasses
351 values
file_path
stringlengths
26
186
content
stringlengths
1
990k
0
hf_public_repos/diffusers/tests/pipelines
hf_public_repos/diffusers/tests/pipelines/stable_diffusion/test_stable_diffusion.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/pipelines
hf_public_repos/diffusers/tests/pipelines/stable_diffusion/test_stable_diffusion_img2img.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/pipelines
hf_public_repos/diffusers/tests/pipelines/stable_diffusion/test_onnx_stable_diffusion.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/pipelines
hf_public_repos/diffusers/tests/pipelines/stable_diffusion/test_onnx_stable_diffusion_img2img.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/pipelines
hf_public_repos/diffusers/tests/pipelines/stable_diffusion/test_stable_diffusion_inpaint.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/pipelines
hf_public_repos/diffusers/tests/pipelines/audioldm2/test_audioldm2.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/pipelines
hf_public_repos/diffusers/tests/pipelines/hunyuan_dit/test_hunyuan_dit.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/pipelines
hf_public_repos/diffusers/tests/pipelines/stable_diffusion_k_diffusion/test_stable_diffusion_k_diffusion.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/pipelines
hf_public_repos/diffusers/tests/pipelines/ddim/test_ddim.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/pipelines
hf_public_repos/diffusers/tests/pipelines/unidiffuser/test_unidiffuser.py
import gc import random import traceback import unittest import numpy as np import torch from PIL import Image from transformers import ( CLIPImageProcessor, CLIPTextModel, CLIPTokenizer, CLIPVisionModelWithProjection, GPT2Tokenizer, ) from diffusers import ( AutoencoderKL, DPMSolverMultis...
0
hf_public_repos/diffusers/tests/pipelines
hf_public_repos/diffusers/tests/pipelines/kandinsky3/test_kandinsky3.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/pipelines
hf_public_repos/diffusers/tests/pipelines/kandinsky3/test_kandinsky3_img2img.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/pipelines
hf_public_repos/diffusers/tests/pipelines/stable_diffusion_adapter/test_stable_diffusion_adapter.py
# coding=utf-8 # Copyright 2022 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/others/test_image_processor.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/others/test_outputs.py
import pickle as pkl import unittest from dataclasses import dataclass from typing import List, Union import numpy as np import PIL.Image from diffusers.utils.outputs import BaseOutput from diffusers.utils.testing_utils import require_torch @dataclass class CustomOutput(BaseOutput): images: Union[List[PIL.Image...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/others/test_check_dummies.py
# Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/others/test_dependencies.py
# Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/others/test_hub_utils.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/others/test_check_copies.py
# Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/others/test_video_processor.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/others/test_training.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/others/test_ema.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/others/test_utils.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/others/test_config.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/single_file/test_stable_diffusion_upscale_single_file.py
import gc import unittest import pytest import torch from diffusers import ( StableDiffusionUpscalePipeline, ) from diffusers.utils import load_image from diffusers.utils.testing_utils import ( backend_empty_cache, enable_full_determinism, numpy_cosine_similarity_distance, require_torch_accelerato...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/single_file/test_stable_diffusion_controlnet_inpaint_single_file.py
import gc import tempfile import unittest import torch from diffusers import ControlNetModel, StableDiffusionControlNetInpaintPipeline from diffusers.loaders.single_file_utils import _extract_repo_id_and_weights_name from diffusers.utils import load_image from diffusers.utils.testing_utils import ( backend_empty_...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/single_file/test_stable_diffusion_img2img_single_file.py
import gc import unittest import torch from diffusers import ( StableDiffusionImg2ImgPipeline, ) from diffusers.utils import load_image from diffusers.utils.testing_utils import ( backend_empty_cache, enable_full_determinism, require_torch_accelerator, slow, torch_device, ) from .single_file_...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/single_file/test_stable_diffusion_controlnet_single_file.py
import gc import tempfile import unittest import torch from diffusers import ControlNetModel, StableDiffusionControlNetPipeline from diffusers.loaders.single_file_utils import _extract_repo_id_and_weights_name from diffusers.utils import load_image from diffusers.utils.testing_utils import ( backend_empty_cache, ...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/single_file/test_stable_diffusion_xl_img2img_single_file.py
import gc import unittest import torch from diffusers import ( DDIMScheduler, StableDiffusionXLImg2ImgPipeline, ) from diffusers.utils import load_image from diffusers.utils.testing_utils import ( backend_empty_cache, enable_full_determinism, numpy_cosine_similarity_distance, require_torch_acc...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/single_file/test_model_motion_adapter_single_file.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/single_file/test_model_controlnet_single_file.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/single_file/test_stable_diffusion_inpaint_single_file.py
import gc import unittest import torch from diffusers import ( StableDiffusionInpaintPipeline, ) from diffusers.utils import load_image from diffusers.utils.testing_utils import ( backend_empty_cache, enable_full_determinism, require_torch_accelerator, slow, torch_device, ) from .single_file_...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/single_file/test_model_sd_cascade_unet_single_file.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/single_file/test_stable_diffusion_controlnet_img2img_single_file.py
import gc import tempfile import unittest import torch from diffusers import ControlNetModel, StableDiffusionControlNetPipeline from diffusers.loaders.single_file_utils import _extract_repo_id_and_weights_name from diffusers.utils import load_image from diffusers.utils.testing_utils import ( backend_empty_cache, ...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/single_file/test_stable_diffusion_single_file.py
import gc import tempfile import unittest import torch from diffusers import EulerDiscreteScheduler, StableDiffusionPipeline from diffusers.loaders.single_file_utils import _extract_repo_id_and_weights_name from diffusers.utils.testing_utils import ( backend_empty_cache, enable_full_determinism, require_t...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/single_file/test_stable_diffusion_xl_adapter_single_file.py
import gc import tempfile import unittest import torch from diffusers import ( StableDiffusionXLAdapterPipeline, T2IAdapter, ) from diffusers.loaders.single_file_utils import _extract_repo_id_and_weights_name from diffusers.utils import load_image from diffusers.utils.testing_utils import ( backend_empty_...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/single_file/single_file_testing_utils.py
import tempfile from io import BytesIO import requests import torch from huggingface_hub import hf_hub_download, snapshot_download from diffusers.loaders.single_file_utils import _extract_repo_id_and_weights_name from diffusers.models.attention_processor import AttnProcessor from diffusers.utils.testing_utils import ...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/single_file/test_model_vae_single_file.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/single_file/test_stable_diffusion_xl_instruct_pix2pix.py
import gc import unittest import torch from diffusers import StableDiffusionXLInstructPix2PixPipeline from diffusers.utils.testing_utils import ( backend_empty_cache, enable_full_determinism, require_torch_accelerator, slow, torch_device, ) enable_full_determinism() @slow @require_torch_accele...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/single_file/test_stable_diffusion_xl_single_file.py
import gc import unittest import torch from diffusers import ( StableDiffusionXLPipeline, ) from diffusers.utils.testing_utils import ( backend_empty_cache, enable_full_determinism, require_torch_accelerator, slow, torch_device, ) from .single_file_testing_utils import SDXLSingleFileTesterMix...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/single_file/test_stable_diffusion_xl_controlnet_single_file.py
import gc import tempfile import unittest import torch from diffusers import ControlNetModel, StableDiffusionXLControlNetPipeline from diffusers.loaders.single_file_utils import _extract_repo_id_and_weights_name from diffusers.utils import load_image from diffusers.utils.testing_utils import ( backend_empty_cache...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_heun.py
import torch from diffusers import HeunDiscreteScheduler from diffusers.utils.testing_utils import torch_device from .test_schedulers import SchedulerCommonTest class HeunDiscreteSchedulerTest(SchedulerCommonTest): scheduler_classes = (HeunDiscreteScheduler,) num_inference_steps = 10 def get_scheduler_...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_kdpm2_ancestral.py
import torch from diffusers import KDPM2AncestralDiscreteScheduler from diffusers.utils.testing_utils import torch_device from .test_schedulers import SchedulerCommonTest class KDPM2AncestralDiscreteSchedulerTest(SchedulerCommonTest): scheduler_classes = (KDPM2AncestralDiscreteScheduler,) num_inference_step...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_edm_dpmsolver_multistep.py
import tempfile import unittest import torch from diffusers import ( EDMDPMSolverMultistepScheduler, ) from .test_schedulers import SchedulerCommonTest class EDMDPMSolverMultistepSchedulerTest(SchedulerCommonTest): scheduler_classes = (EDMDPMSolverMultistepScheduler,) forward_default_kwargs = (("num_in...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_euler.py
import torch from diffusers import EulerDiscreteScheduler from diffusers.utils.testing_utils import torch_device from .test_schedulers import SchedulerCommonTest class EulerDiscreteSchedulerTest(SchedulerCommonTest): scheduler_classes = (EulerDiscreteScheduler,) num_inference_steps = 10 def get_schedul...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_kdpm2_discrete.py
import torch from diffusers import KDPM2DiscreteScheduler from diffusers.utils.testing_utils import torch_device from .test_schedulers import SchedulerCommonTest class KDPM2DiscreteSchedulerTest(SchedulerCommonTest): scheduler_classes = (KDPM2DiscreteScheduler,) num_inference_steps = 10 def get_schedul...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_euler_ancestral.py
import torch from diffusers import EulerAncestralDiscreteScheduler from diffusers.utils.testing_utils import torch_device from .test_schedulers import SchedulerCommonTest class EulerAncestralDiscreteSchedulerTest(SchedulerCommonTest): scheduler_classes = (EulerAncestralDiscreteScheduler,) num_inference_step...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_deis.py
import tempfile import torch from diffusers import ( DEISMultistepScheduler, DPMSolverMultistepScheduler, DPMSolverSinglestepScheduler, UniPCMultistepScheduler, ) from .test_schedulers import SchedulerCommonTest class DEISMultistepSchedulerTest(SchedulerCommonTest): scheduler_classes = (DEISMul...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_dpm_multi.py
import tempfile import torch from diffusers import ( DEISMultistepScheduler, DPMSolverMultistepScheduler, DPMSolverSinglestepScheduler, UniPCMultistepScheduler, ) from .test_schedulers import SchedulerCommonTest class DPMSolverMultistepSchedulerTest(SchedulerCommonTest): scheduler_classes = (DP...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_unclip.py
import torch from diffusers import UnCLIPScheduler from .test_schedulers import SchedulerCommonTest # UnCLIPScheduler is a modified DDPMScheduler with a subset of the configuration. class UnCLIPSchedulerTest(SchedulerCommonTest): scheduler_classes = (UnCLIPScheduler,) def get_scheduler_config(self, **kwarg...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_flax.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_schedulers.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_ddim_parallel.py
# Copyright 2024 ParaDiGMS authors and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_sasolver.py
import torch from diffusers import SASolverScheduler from diffusers.utils.testing_utils import require_torchsde, torch_device from .test_schedulers import SchedulerCommonTest @require_torchsde class SASolverSchedulerTest(SchedulerCommonTest): scheduler_classes = (SASolverScheduler,) forward_default_kwargs =...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_lms.py
import torch from diffusers import LMSDiscreteScheduler from diffusers.utils.testing_utils import torch_device from .test_schedulers import SchedulerCommonTest class LMSDiscreteSchedulerTest(SchedulerCommonTest): scheduler_classes = (LMSDiscreteScheduler,) num_inference_steps = 10 def get_scheduler_con...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_ddim.py
import torch from diffusers import DDIMScheduler from .test_schedulers import SchedulerCommonTest class DDIMSchedulerTest(SchedulerCommonTest): scheduler_classes = (DDIMScheduler,) forward_default_kwargs = (("eta", 0.0), ("num_inference_steps", 50)) def get_scheduler_config(self, **kwargs): con...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_pndm.py
import tempfile import torch from diffusers import PNDMScheduler from .test_schedulers import SchedulerCommonTest class PNDMSchedulerTest(SchedulerCommonTest): scheduler_classes = (PNDMScheduler,) forward_default_kwargs = (("num_inference_steps", 50),) def get_scheduler_config(self, **kwargs): ...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_edm_euler.py
import inspect import tempfile import unittest from typing import Dict, List, Tuple import torch from diffusers import EDMEulerScheduler from .test_schedulers import SchedulerCommonTest class EDMEulerSchedulerTest(SchedulerCommonTest): scheduler_classes = (EDMEulerScheduler,) forward_default_kwargs = (("nu...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_ipndm.py
import tempfile import torch from diffusers import IPNDMScheduler from .test_schedulers import SchedulerCommonTest class IPNDMSchedulerTest(SchedulerCommonTest): scheduler_classes = (IPNDMScheduler,) forward_default_kwargs = (("num_inference_steps", 50),) def get_scheduler_config(self, **kwargs): ...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_vq_diffusion.py
import torch import torch.nn.functional as F from diffusers import VQDiffusionScheduler from .test_schedulers import SchedulerCommonTest class VQDiffusionSchedulerTest(SchedulerCommonTest): scheduler_classes = (VQDiffusionScheduler,) def get_scheduler_config(self, **kwargs): config = { ...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_ddim_inverse.py
import torch from diffusers import DDIMInverseScheduler from .test_schedulers import SchedulerCommonTest class DDIMInverseSchedulerTest(SchedulerCommonTest): scheduler_classes = (DDIMInverseScheduler,) forward_default_kwargs = (("num_inference_steps", 50),) def get_scheduler_config(self, **kwargs): ...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_ddpm_parallel.py
# Copyright 2024 ParaDiGMS authors and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_ddpm.py
import torch from diffusers import DDPMScheduler from .test_schedulers import SchedulerCommonTest class DDPMSchedulerTest(SchedulerCommonTest): scheduler_classes = (DDPMScheduler,) def get_scheduler_config(self, **kwargs): config = { "num_train_timesteps": 1000, "beta_start"...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_tcd.py
import torch from diffusers import TCDScheduler from .test_schedulers import SchedulerCommonTest class TCDSchedulerTest(SchedulerCommonTest): scheduler_classes = (TCDScheduler,) forward_default_kwargs = (("num_inference_steps", 10),) def get_scheduler_config(self, **kwargs): config = { ...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_dpm_sde.py
import torch from diffusers import DPMSolverSDEScheduler from diffusers.utils.testing_utils import require_torchsde, torch_device from .test_schedulers import SchedulerCommonTest @require_torchsde class DPMSolverSDESchedulerTest(SchedulerCommonTest): scheduler_classes = (DPMSolverSDEScheduler,) num_inferenc...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_score_sde_ve.py
import tempfile import unittest import numpy as np import torch from diffusers import ScoreSdeVeScheduler class ScoreSdeVeSchedulerTest(unittest.TestCase): # TODO adapt with class SchedulerCommonTest (scheduler needs Numpy Integration) scheduler_classes = (ScoreSdeVeScheduler,) forward_default_kwargs = ...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_dpm_single.py
import tempfile import torch from diffusers import ( DEISMultistepScheduler, DPMSolverMultistepScheduler, DPMSolverSinglestepScheduler, UniPCMultistepScheduler, ) from .test_schedulers import SchedulerCommonTest class DPMSolverSinglestepSchedulerTest(SchedulerCommonTest): scheduler_classes = (D...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_lcm.py
import tempfile from typing import Dict, List, Tuple import torch from diffusers import LCMScheduler from diffusers.utils.testing_utils import torch_device from .test_schedulers import SchedulerCommonTest class LCMSchedulerTest(SchedulerCommonTest): scheduler_classes = (LCMScheduler,) forward_default_kwarg...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_consistency_model.py
import torch from diffusers import CMStochasticIterativeScheduler from .test_schedulers import SchedulerCommonTest class CMStochasticIterativeSchedulerTest(SchedulerCommonTest): scheduler_classes = (CMStochasticIterativeScheduler,) num_inference_steps = 10 def get_scheduler_config(self, **kwargs): ...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_dpm_multi_inverse.py
import tempfile import torch from diffusers import DPMSolverMultistepInverseScheduler, DPMSolverMultistepScheduler from .test_schedulers import SchedulerCommonTest class DPMSolverMultistepSchedulerTest(SchedulerCommonTest): scheduler_classes = (DPMSolverMultistepInverseScheduler,) forward_default_kwargs = ...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/schedulers/test_scheduler_unipc.py
import tempfile import torch from diffusers import ( DEISMultistepScheduler, DPMSolverMultistepScheduler, DPMSolverSinglestepScheduler, UniPCMultistepScheduler, ) from .test_schedulers import SchedulerCommonTest class UniPCMultistepSchedulerTest(SchedulerCommonTest): scheduler_classes = (UniPCM...
0
hf_public_repos/diffusers/tests/quantization
hf_public_repos/diffusers/tests/quantization/bnb/test_mixed_int8.py
# coding=utf-8 # Copyright 2024 The HuggingFace Team Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a clone of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
0
hf_public_repos/diffusers/tests/quantization
hf_public_repos/diffusers/tests/quantization/bnb/README.md
The tests here are adapted from [`transformers` tests](https://github.com/huggingface/transformers/tree/409fcfdfccde77a14b7cc36972b774cabc371ae1/tests/quantization/bnb). They were conducted on the `audace` machine, using a single RTX 4090. Below is `nvidia-smi`: ```bash +----------------------------------------------...
0
hf_public_repos/diffusers/tests/quantization
hf_public_repos/diffusers/tests/quantization/bnb/test_4bit.py
# coding=utf-8 # Copyright 2024 The HuggingFace Team Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a clone of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/models/test_attention_processor.py
import tempfile import unittest import numpy as np import torch from diffusers import DiffusionPipeline from diffusers.models.attention_processor import Attention, AttnAddedKVProcessor class AttnAddedKVProcessorTests(unittest.TestCase): def get_constructor_arguments(self, only_cross_attention: bool = False): ...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/models/test_layers_utils.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/models/test_activations.py
import unittest import torch from torch import nn from diffusers.models.activations import get_activation class ActivationsTests(unittest.TestCase): def test_swish(self): act = get_activation("swish") self.assertIsInstance(act, nn.SiLU) self.assertEqual(act(torch.tensor(-100, dtype=tor...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/models/test_modeling_common_flax.py
import inspect from diffusers.utils import is_flax_available from diffusers.utils.testing_utils import require_flax if is_flax_available(): import jax @require_flax class FlaxModelTesterMixin: def test_output(self): init_dict, inputs_dict = self.prepare_init_args_and_inputs_for_common() mo...
0
hf_public_repos/diffusers/tests
hf_public_repos/diffusers/tests/models/test_modeling_common.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/autoencoders/test_models_vq.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/autoencoders/vae.py
def get_autoencoder_kl_config(block_out_channels=None, norm_num_groups=None): block_out_channels = block_out_channels or [2, 4] norm_num_groups = norm_num_groups or 2 init_dict = { "block_out_channels": block_out_channels, "in_channels": 3, "out_channels": 3, "down_block_type...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/autoencoders/test_models_autoencoder_oobleck.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/autoencoders/test_models_autoencoder_tiny.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/autoencoders/test_models_autoencoder_kl_temporal_decoder.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/autoencoders/test_models_vae_flax.py
import unittest from diffusers import FlaxAutoencoderKL from diffusers.utils import is_flax_available from diffusers.utils.testing_utils import require_flax from ..test_modeling_common_flax import FlaxModelTesterMixin if is_flax_available(): import jax @require_flax class FlaxAutoencoderKLTests(FlaxModelTeste...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/autoencoders/test_models_autoencoder_kl.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/autoencoders/test_models_autoencoder_kl_cogvideox.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/autoencoders/test_models_consistency_decoder_vae.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/autoencoders/test_models_asymmetric_autoencoder_kl.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/transformers/test_models_transformer_cogvideox.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/transformers/test_models_transformer_latte.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/transformers/test_models_transformer_sd3.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/transformers/test_models_transformer_aura_flow.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/transformers/test_models_transformer_hunyuan_dit.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/transformers/test_models_transformer_temporal.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/transformers/test_models_prior.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/transformers/test_models_transformer_allegro.py
# Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/transformers/test_models_transformer_mochi.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/transformers/test_models_transformer_cogview3plus.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
hf_public_repos/diffusers/tests/models
hf_public_repos/diffusers/tests/models/transformers/test_models_transformer_lumina.py
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...