|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from . import DummyObject, requires_backends |
|
|
|
|
|
class ModelMixin(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class AutoencoderKL(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class PriorTransformer(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class Transformer2DModel(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class UNet1DModel(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class UNet2DConditionModel(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class UNet2DModel(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class VQModel(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
def get_constant_schedule(*args, **kwargs): |
|
requires_backends(get_constant_schedule, ["paddle"]) |
|
|
|
|
|
def get_constant_schedule_with_warmup(*args, **kwargs): |
|
requires_backends(get_constant_schedule_with_warmup, ["paddle"]) |
|
|
|
|
|
def get_cosine_schedule_with_warmup(*args, **kwargs): |
|
requires_backends(get_cosine_schedule_with_warmup, ["paddle"]) |
|
|
|
|
|
def get_cosine_with_hard_restarts_schedule_with_warmup(*args, **kwargs): |
|
requires_backends(get_cosine_with_hard_restarts_schedule_with_warmup, ["paddle"]) |
|
|
|
|
|
def get_linear_schedule_with_warmup(*args, **kwargs): |
|
requires_backends(get_linear_schedule_with_warmup, ["paddle"]) |
|
|
|
|
|
def get_polynomial_decay_schedule_with_warmup(*args, **kwargs): |
|
requires_backends(get_polynomial_decay_schedule_with_warmup, ["paddle"]) |
|
|
|
|
|
def get_scheduler(*args, **kwargs): |
|
requires_backends(get_scheduler, ["paddle"]) |
|
|
|
|
|
class DiffusionPipeline(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class DanceDiffusionPipeline(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class DDIMPipeline(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class DDPMPipeline(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class KarrasVePipeline(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class LDMPipeline(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class LDMSuperResolutionPipeline(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class KDPM2AncestralDiscreteScheduler(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class KDPM2DiscreteScheduler(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class PNDMPipeline(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class RePaintPipeline(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class ScoreSdeVePipeline(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class ScoreSdeVpPipeline(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class DDIMScheduler(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class DDPMScheduler(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class DPMSolverMultistepScheduler(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class DPMSolverSinglestepScheduler(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class EulerAncestralDiscreteScheduler(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class PreconfigEulerAncestralDiscreteScheduler(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class EulerDiscreteScheduler(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class HeunDiscreteScheduler(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class IPNDMScheduler(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class KarrasVeScheduler(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class PNDMScheduler(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class RePaintScheduler(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class SchedulerMixin(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class ScoreSdeVeScheduler(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class UnCLIPScheduler(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class VQDiffusionScheduler(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
|
|
class EMAModel(metaclass=DummyObject): |
|
_backends = ["paddle"] |
|
|
|
def __init__(self, *args, **kwargs): |
|
requires_backends(self, ["paddle"]) |
|
|
|
@classmethod |
|
def from_config(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|
|
@classmethod |
|
def from_pretrained(cls, *args, **kwargs): |
|
requires_backends(cls, ["paddle"]) |
|
|