mirror of
https://github.com/brycedrennan/imaginAIry
synced 2024-10-31 03:20:40 +00:00
docs: add docstrings
Wrote an openai script and custom prompt to generate them.
This commit is contained in:
parent
e7b6fc40fa
commit
316114e660
@ -1,3 +1,4 @@
|
|||||||
|
"""Pythonic AI generation of images and videos"""
|
||||||
import os
|
import os
|
||||||
|
|
||||||
# tells pytorch to allow MPS usage (for Mac M1 compatibility)
|
# tells pytorch to allow MPS usage (for Mac M1 compatibility)
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
"""Functions for creating animations from images."""
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
import cv2
|
import cv2
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for generating and processing images"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for generating refined images"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Decorator and parsers for command scheduling"""
|
||||||
|
|
||||||
from typing import Iterable
|
from typing import Iterable
|
||||||
|
|
||||||
from imaginairy.utils import frange
|
from imaginairy.utils import frange
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Command for colorizing images with AI"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import click
|
import click
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Command for generating image descriptions"""
|
||||||
|
|
||||||
import click
|
import click
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Command for AI-powered image editing"""
|
||||||
|
|
||||||
import click
|
import click
|
||||||
|
|
||||||
from imaginairy import config
|
from imaginairy import config
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Command for applying preset image edits"""
|
||||||
|
|
||||||
import click
|
import click
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Command-line interface for AI-driven image generation"""
|
||||||
|
|
||||||
import click
|
import click
|
||||||
|
|
||||||
from imaginairy.cli.clickshell_mod import ImagineColorsCommand
|
from imaginairy.cli.clickshell_mod import ImagineColorsCommand
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""CLI for AI-powered image generation"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import click
|
import click
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Code for starting an HTTP API server"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import click
|
import click
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Context managers and functions for image generation CLI"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import math
|
import math
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""CLI commands for model training and image preparation"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import click
|
import click
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Command for upscaling images with AI"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import click
|
import click
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Command for generating AI-powered videos"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import click
|
import click
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for colorizing black and white images"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from PIL import Image, ImageEnhance, ImageStat
|
from PIL import Image, ImageEnhance, ImageStat
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes and constants for AI model configuration"""
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Any, List
|
from typing import Any, List
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for assessing image blurriness"""
|
||||||
|
|
||||||
import cv2
|
import cv2
|
||||||
|
|
||||||
from imaginairy.img_utils import pillow_img_to_opencv_img
|
from imaginairy.img_utils import pillow_img_to_opencv_img
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for generating and processing image masks"""
|
||||||
|
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
from typing import Optional, Sequence
|
from typing import Optional, Sequence
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for generating image captions"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for image-text similarity assessment"""
|
||||||
|
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
from typing import Sequence
|
from typing import Sequence
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Code for enhancing facial images"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for detecting and cropping faces"""
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from imaginairy.enhancers.face_restoration_codeformer import face_restore_helper
|
from imaginairy.enhancers.face_restoration_codeformer import face_restore_helper
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for expanding text prompts with phraselists"""
|
||||||
|
|
||||||
import gzip
|
import gzip
|
||||||
import os.path
|
import os.path
|
||||||
import random
|
import random
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for image upscaling using RealESRGAN"""
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import torch
|
import torch
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes and functions for image upscaling"""
|
||||||
|
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for image tiling and reconstruction"""
|
||||||
|
|
||||||
# inspired by https://github.com/ProGamerGov/neural-dream/blob/master/neural_dream/dream_tile.py
|
# inspired by https://github.com/ProGamerGov/neural-dream/blob/master/neural_dream/dream_tile.py
|
||||||
# but with all the bugs fixed and lots of simplifications
|
# but with all the bugs fixed and lots of simplifications
|
||||||
# MIT License
|
# MIT License
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""FastAPI application for image generation"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os.path
|
import os.path
|
||||||
import sys
|
import sys
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for image generation API models"""
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""API routes for image generation service"""
|
||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from fastapi import APIRouter
|
from fastapi import APIRouter
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions and class for image generation and encoding"""
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes and functions for edge detection in images"""
|
||||||
|
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
|
|
||||||
import cv2
|
import cv2
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for human pose estimation"""
|
||||||
|
|
||||||
import math
|
import math
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Utilities for image generation logging"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import logging.config
|
import logging.config
|
||||||
import re
|
import re
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for learning rate scheduling"""
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes and functions for managing AI models"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes and functions for attention mechanisms in neural networks"""
|
||||||
|
|
||||||
import math
|
import math
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for image autoencoding and manipulation"""
|
||||||
|
|
||||||
# pylama:ignore=W0613
|
# pylama:ignore=W0613
|
||||||
import logging
|
import logging
|
||||||
import math
|
import math
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for controlled image generation"""
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
from torch import nn
|
from torch import nn
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for text and image encoding"""
|
||||||
|
|
||||||
import kornia
|
import kornia
|
||||||
import torch
|
import torch
|
||||||
from einops import repeat
|
from einops import repeat
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for diffusion-based image generation"""
|
||||||
|
|
||||||
# pytorch_diffusion + derived encoder decoder
|
# pytorch_diffusion + derived encoder decoder
|
||||||
import gc
|
import gc
|
||||||
import math
|
import math
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for generative diffusion models"""
|
||||||
|
|
||||||
import math
|
import math
|
||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for image upscaling diffusion models"""
|
||||||
|
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Utilities for diffusion model operations"""
|
||||||
|
|
||||||
# adopted from
|
# adopted from
|
||||||
# https://github.com/openai/improved-diffusion/blob/main/improved_diffusion/gaussian_diffusion.py
|
# https://github.com/openai/improved-diffusion/blob/main/improved_diffusion/gaussian_diffusion.py
|
||||||
# and
|
# and
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for parametric Gaussian distributions"""
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for exponential moving average tracking"""
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
from torch import nn
|
from torch import nn
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for text encoding transformations"""
|
||||||
|
|
||||||
import open_clip
|
import open_clip
|
||||||
import torch
|
import torch
|
||||||
from torch import nn
|
from torch import nn
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Code for depth estimation with MiDaS models"""
|
||||||
|
|
||||||
# based on https://github.com/isl-org/MiDaS
|
# based on https://github.com/isl-org/MiDaS
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for loading model weights"""
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
from imaginairy import config
|
from imaginairy import config
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions and classes for neural network construction"""
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
from torch import nn
|
from torch import nn
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for depth estimation from images"""
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
from torch import nn
|
from torch import nn
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions and classes for image preprocessing"""
|
||||||
|
|
||||||
import math
|
import math
|
||||||
|
|
||||||
import cv2
|
import cv2
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes and functions for Vision Transformer processing"""
|
||||||
|
|
||||||
import math
|
import math
|
||||||
import types
|
import types
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Refinement modules for image generation"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import math
|
import math
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for attention-based neural networks"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import math
|
import math
|
||||||
from inspect import isfunction
|
from inspect import isfunction
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for autoencoder-based image generation"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import math
|
import math
|
||||||
import re
|
import re
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for discriminator loss computation"""
|
||||||
|
|
||||||
from typing import Dict, Iterator, List, Optional, Tuple, Union
|
from typing import Dict, Iterator, List, Optional, Tuple, Union
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for latent space perceptual loss"""
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
import torch.nn as nn
|
import torch.nn as nn
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for image discrimination"""
|
||||||
|
|
||||||
import functools
|
import functools
|
||||||
|
|
||||||
import torch.nn as nn
|
import torch.nn as nn
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Utilities for model checkpoint management and normalization layers"""
|
||||||
|
|
||||||
import hashlib
|
import hashlib
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for discriminator loss calculation"""
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
import torch.nn.functional as F
|
import torch.nn.functional as F
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes and functions for tensor regularization"""
|
||||||
|
|
||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
from typing import Any, Tuple
|
from typing import Any, Tuple
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for vector quantization regularization"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
from typing import Dict, Iterator, Literal, Optional, Tuple, Union
|
from typing import Dict, Iterator, Literal, Optional, Tuple, Union
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for spatio-temporal video processing"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from typing import Callable, Iterable, Union
|
from typing import Callable, Iterable, Union
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for stochastic diffusion models"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import math
|
import math
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for image denoising operations"""
|
||||||
|
|
||||||
from typing import TYPE_CHECKING, Dict, Union
|
from typing import TYPE_CHECKING, Dict, Union
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for denoiser scaling calculations"""
|
||||||
|
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from typing import Tuple
|
from typing import Tuple
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for denoiser weighting strategies"""
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for discretizing diffusion steps"""
|
||||||
|
|
||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for guiding diffusion models"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from typing import Dict, List, Optional, Tuple, Union
|
from typing import Dict, List, Optional, Tuple, Union
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for diffusion model loss calculation"""
|
||||||
|
|
||||||
from typing import Dict, List, Optional, Tuple, Union
|
from typing import Dict, List, Optional, Tuple, Union
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for diffusion loss weighting"""
|
||||||
|
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for diffusion-based image generation"""
|
||||||
|
|
||||||
# pytorch_diffusion + derived encoder decoder
|
# pytorch_diffusion + derived encoder decoder
|
||||||
import logging
|
import logging
|
||||||
import math
|
import math
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for generative image modeling"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import math
|
import math
|
||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for diffusion sampling calculations"""
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
from scipy import integrate
|
from scipy import integrate
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for stochastic sampling strategies"""
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
from imaginairy.utils import default, instantiate_from_config
|
from imaginairy.utils import default, instantiate_from_config
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for video generation models"""
|
||||||
|
|
||||||
from typing import List, Optional, Union
|
from typing import List, Optional, Union
|
||||||
|
|
||||||
import torch as th
|
import torch as th
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Wrappers for diffusion model integration"""
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
import torch.nn as nn
|
import torch.nn as nn
|
||||||
from packaging import version
|
from packaging import version
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for probabilistic distributions handling"""
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for image and text encoding"""
|
||||||
|
|
||||||
import math
|
import math
|
||||||
from contextlib import nullcontext
|
from contextlib import nullcontext
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for video sequence transformation"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for image outpainting preparation"""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Code for defining package root path"""
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
PKG_ROOT = os.path.dirname(__file__)
|
PKG_ROOT = os.path.dirname(__file__)
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for managing prompt schedules"""
|
||||||
|
|
||||||
import csv
|
import csv
|
||||||
import re
|
import re
|
||||||
from copy import copy
|
from copy import copy
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for managing image regions of interest"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for image content safety evaluation"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes and functions for image generation"""
|
||||||
|
|
||||||
# pylama:ignore=W0613
|
# pylama:ignore=W0613
|
||||||
import logging
|
import logging
|
||||||
from abc import ABC
|
from abc import ABC
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for diffusion-based image generation"""
|
||||||
|
|
||||||
# pylama:ignore=W0613
|
# pylama:ignore=W0613
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes and functions for image generation with diffusion models"""
|
||||||
|
|
||||||
# pylama:ignore=W0613
|
# pylama:ignore=W0613
|
||||||
from abc import ABC
|
from abc import ABC
|
||||||
from typing import Callable
|
from typing import Callable
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for image generation sampling"""
|
||||||
|
|
||||||
# pylama:ignore=W0613
|
# pylama:ignore=W0613
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for image generation and manipulation"""
|
||||||
|
|
||||||
# pylint: disable=E0213
|
# pylint: disable=E0213
|
||||||
import base64
|
import base64
|
||||||
import hashlib
|
import hashlib
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for generating surprise image edits"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Code for training diffusion models"""
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for image preprocessing and generation"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for pruning diffusion models"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for single-concept model finetuning"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Classes for data distortion testing"""
|
||||||
|
|
||||||
import contextlib
|
import contextlib
|
||||||
import math
|
import math
|
||||||
import sys
|
import sys
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Functions for gathering system debug information"""
|
||||||
|
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"""Utilities for managing model caching"""
|
||||||
|
|
||||||
# pylama: ignore=W0212
|
# pylama: ignore=W0212
|
||||||
import logging
|
import logging
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user