Package: deforum
DeforumDeforum is a Python package for diffusion animation toolkit.InstallationYou can install Deforum using one of the following methods:PyPIInstall from PyPI usingpip:pip install deforumBash script (for Linux)There's a provided bash script if you're on a Linux system../install-linux.shBatch file (for Windows)There's a provided batch file if you're on a Windows system.install-windows.batRequirementsDeforum has two sets of requirements which can be installed using:pip install -r requirements.txtFor development requirements:pip install -r requirements-dev.txtPackage OverviewDeforum is structured in following modules:backend: Contains the actual generation models. Options includebasefor Stable Diffusion 1.5 andsdxlfor Stable Diffusion XL.data: Contains helper data for certain types of generation like wildcards, templates, prompts, stopwords, lightweight models.modules: Contains various helper classes and utilities for animation processing, controlnet auxiliary model processors, image transformation etc..pipelines: Contains pipeline classes which are used to generate images or videos using helper modules.typed_classes: Contains typed classes which are used for type validation and help.utils: Contains utilities for handling images, videos, and text outside of actual generation.UsageHere's a basic example:importtorchfromdeforumimportDeforum,DeforumConfig,GenerationArgsconfig=DeforumConfig(model_name="Lykon/AbsoluteReality",model_type="sd1.5",dtype=torch.float16,)deforum=Deforum(config)args=GenerationArgs(prompt="An ethereal cityscape under a starlit night sky",negative_prompt="blurry, bright, devoid, and boring",guidance_scale=7.5,sampler="euler_ancestral",num_inference_steps=30,)deforum.generate(args)LicenseDeforum is licensed under the MIT License.For more information please refer tolicense.Notesdeforum/backend:Actual model to be used for generation. Can be one of the following:base: Stable Diffusion 1.5sdxl: Stable Diffusion XLdeforum/backend/mixins:Superclasses which are used when instantiating classes from backenddeforum/backend/attn_processors:Diffusers Attention processorsflash-attn-2deforum/backend/model_loading:Model loading factories for specific model typessd1.5 (sd_loader.py)sdxl (sdxl_loader.py)deforum/backend/models:Model classes for specific model types, which implement the actual __call__ function which performs the diffusion inference loop.sd1.5 (sd_pipeline.py)sdxl (sdxl_pipeline.py)abstract (abstract_pipeline.py) # abstract base class for all modelsdeforum/data:Helper data for certain types of generation or misc thingswildcardstemplatespromptslight-weight-modelsstopwordsdeforum/modules:Animation helper classes, controlnet auxiliary model processors for use DURING a generation...animationcontrolnetstylegan2lorasnoise augmentationsupscalerskeyframingmisc image transformationswarp functionsvideo compilationvideo postprocessingvideo processingvideo transformationsvideo utilsdeforum/pipelines:Pipeline classes which are used to generate images or videos sample function implementation for the different models in backend, using helper modules from /modulesbase (txt2img, img2img, two-pass)vid2vidtxt2vidprompt interpolationanimatediff...experimental pipelinesdeforum/typed_classes:Typed classes which are used for type validation and type helpdeforum initialization configpipeline specific argumentspipeline specific output classesdeforum/utils:Utilities for working with images / videos / text outside of actual generationimage handlertemplate parserimage filename processingreading / writing video filesmixed model initializationdeforum/
    backend/
        mixins/
    data/
    modules/
    pipelines/
    typed_classes/
    utils/
    deforum.py