Skip to content

Commit

Permalink
add NoiseSchedule to solvers __init__ + simplify some import pathing
Browse files Browse the repository at this point in the history
further improve import pathing
  • Loading branch information
limiteinductive committed Jan 31, 2024
1 parent 833563b commit 8844908
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/refiners/foundationals/latent_diffusion/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import refiners.fluxion.layers as fl
from refiners.foundationals.latent_diffusion.auto_encoder import LatentDiffusionAutoencoder
from refiners.foundationals.latent_diffusion.solvers.solver import Solver
from refiners.foundationals.latent_diffusion.solvers import Solver

T = TypeVar("T", bound="fl.Module")

Expand Down
3 changes: 1 addition & 2 deletions src/refiners/foundationals/latent_diffusion/restart.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
import torch

from refiners.foundationals.latent_diffusion.model import LatentDiffusionModel
from refiners.foundationals.latent_diffusion.solvers.ddim import DDIM
from refiners.foundationals.latent_diffusion.solvers.solver import Solver
from refiners.foundationals.latent_diffusion.solvers import DDIM, Solver

T = TypeVar("T", bound=LatentDiffusionModel)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from refiners.fluxion.adapters.adapter import Adapter
from refiners.fluxion.context import Contexts
from refiners.fluxion.utils import gaussian_blur, interpolate
from refiners.foundationals.latent_diffusion.solvers.solver import Solver
from refiners.foundationals.latent_diffusion.solvers import Solver

if TYPE_CHECKING:
from refiners.foundationals.latent_diffusion.stable_diffusion_1.unet import SD1UNet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
from refiners.foundationals.latent_diffusion.solvers.ddpm import DDPM
from refiners.foundationals.latent_diffusion.solvers.dpm import DPMSolver
from refiners.foundationals.latent_diffusion.solvers.euler import Euler
from refiners.foundationals.latent_diffusion.solvers.solver import Solver
from refiners.foundationals.latent_diffusion.solvers.solver import NoiseSchedule, Solver

__all__ = ["Solver", "DPMSolver", "DDPM", "DDIM", "Euler"]
__all__ = ["Solver", "DPMSolver", "DDPM", "DDIM", "Euler", "NoiseSchedule"]
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
from refiners.foundationals.clip.text_encoder import CLIPTextEncoderL
from refiners.foundationals.latent_diffusion.auto_encoder import LatentDiffusionAutoencoder
from refiners.foundationals.latent_diffusion.model import LatentDiffusionModel
from refiners.foundationals.latent_diffusion.solvers.dpm import DPMSolver
from refiners.foundationals.latent_diffusion.solvers.solver import Solver
from refiners.foundationals.latent_diffusion.solvers import DPMSolver, Solver
from refiners.foundationals.latent_diffusion.stable_diffusion_1.self_attention_guidance import SD1SAGAdapter
from refiners.foundationals.latent_diffusion.stable_diffusion_1.unet import SD1UNet

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

from refiners.foundationals.latent_diffusion.auto_encoder import LatentDiffusionAutoencoder
from refiners.foundationals.latent_diffusion.model import LatentDiffusionModel
from refiners.foundationals.latent_diffusion.solvers.ddim import DDIM
from refiners.foundationals.latent_diffusion.solvers.solver import Solver
from refiners.foundationals.latent_diffusion.solvers import DDIM, Solver
from refiners.foundationals.latent_diffusion.stable_diffusion_xl.self_attention_guidance import SDXLSAGAdapter
from refiners.foundationals.latent_diffusion.stable_diffusion_xl.text_encoder import DoubleTextEncoder
from refiners.foundationals.latent_diffusion.stable_diffusion_xl.unet import SDXLUNet
Expand Down
3 changes: 1 addition & 2 deletions src/refiners/training_utils/latent_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
SD1UNet,
StableDiffusion_1,
)
from refiners.foundationals.latent_diffusion.solvers import DDPM
from refiners.foundationals.latent_diffusion.solvers.solver import Solver
from refiners.foundationals.latent_diffusion.solvers import DDPM, Solver
from refiners.foundationals.latent_diffusion.stable_diffusion_1.model import SD1Autoencoder
from refiners.training_utils.callback import Callback
from refiners.training_utils.config import BaseConfig
Expand Down
3 changes: 1 addition & 2 deletions tests/e2e/test_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
from refiners.foundationals.latent_diffusion.multi_diffusion import DiffusionTarget
from refiners.foundationals.latent_diffusion.reference_only_control import ReferenceOnlyControlAdapter
from refiners.foundationals.latent_diffusion.restart import Restart
from refiners.foundationals.latent_diffusion.solvers import DDIM, Euler
from refiners.foundationals.latent_diffusion.solvers.solver import NoiseSchedule
from refiners.foundationals.latent_diffusion.solvers import DDIM, Euler, NoiseSchedule
from refiners.foundationals.latent_diffusion.stable_diffusion_1.multi_diffusion import SD1MultiDiffusion
from refiners.foundationals.latent_diffusion.stable_diffusion_xl.model import StableDiffusion_XL
from tests.utils import ensure_similar_images
Expand Down

0 comments on commit 8844908

Please sign in to comment.