scope range adapter in latent diffusion

This commit is contained in:
Pierre Chapuis 2023-09-01 16:45:28 +02:00
parent 73813310d0
commit 31785f2059
5 changed files with 8 additions and 4 deletions

View file

@ -8,7 +8,7 @@ from refiners.foundationals.latent_diffusion.stable_diffusion_1.unet import (
TimestepEncoder,
)
from refiners.adapters.adapter import Adapter
from refiners.adapters.range_adapter import RangeAdapter2d
from refiners.foundationals.latent_diffusion.range_adapter import RangeAdapter2d
from typing import cast, Iterable
from torch import Tensor, device as Device, dtype as DType

View file

@ -6,7 +6,7 @@ from refiners.fluxion.context import Contexts
import refiners.fluxion.layers as fl
from refiners.foundationals.latent_diffusion.cross_attention import CrossAttentionBlock2d
from refiners.adapters.range_adapter import RangeEncoder, RangeAdapter2d
from refiners.foundationals.latent_diffusion.range_adapter import RangeEncoder, RangeAdapter2d
class TimestepEncoder(fl.Passthrough):

View file

@ -8,7 +8,11 @@ from refiners.foundationals.latent_diffusion.stable_diffusion_1.unet import (
ResidualBlock,
ResidualConcatenator,
)
from refiners.adapters.range_adapter import RangeAdapter2d, RangeEncoder, compute_sinusoidal_embedding
from refiners.foundationals.latent_diffusion.range_adapter import (
RangeAdapter2d,
RangeEncoder,
compute_sinusoidal_embedding,
)
class TextTimeEmbedding(fl.Chain):

View file

@ -1,6 +1,6 @@
import torch
from refiners.adapters.adapter import Adapter
from refiners.adapters.range_adapter import RangeEncoder
from refiners.foundationals.latent_diffusion.range_adapter import RangeEncoder
from refiners.fluxion.layers import Chain, Linear