Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update pipelines #20

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from diffusers import DDIMScheduler, EulerDiscreteScheduler, PNDMScheduler
from foleycrafter.models.onset import torch_utils
from foleycrafter.models.time_detector.model import VideoOnsetNet
from foleycrafter.pipelines.auffusion_pipeline import Generator, denormalize_spectrogram
from foleycrafter.pipelines.foleycrafter_pipeline import Generator, denormalize_spectrogram
ymzhang0319 marked this conversation as resolved.
Show resolved Hide resolved
from foleycrafter.utils.util import build_foleycrafter, read_frames_with_moviepy


Expand Down
ymzhang0319 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
from diffusers.utils import USE_PEFT_BACKEND, BaseOutput, deprecate, logging, scale_lora_layers, unscale_lora_layers
from diffusers.utils.import_utils import is_xformers_available
from foleycrafter.models.adapters.ip_adapter import TimeProjModel
from foleycrafter.models.auffusion.attention_processor import AttnProcessor2_0
from foleycrafter.models.auffusion.loaders.unet import UNet2DConditionLoadersMixin
from foleycrafter.models.auffusion.unet_2d_blocks import (
from foleycrafter.models.audio_generator.attention_processor import AttnProcessor2_0
from foleycrafter.models.audio_generator.loaders.unet import UNet2DConditionLoadersMixin
from foleycrafter.models.audio_generator.unet_2d_blocks import (
UNetMidBlock2D,
UNetMidBlock2DCrossAttn,
UNetMidBlock2DSimpleCrossAttn,
Expand Down
ymzhang0319 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from diffusers.models.normalization import AdaLayerNorm, AdaLayerNormContinuous, AdaLayerNormZero, RMSNorm
from diffusers.utils import USE_PEFT_BACKEND
from diffusers.utils.torch_utils import maybe_allow_in_graph
from foleycrafter.models.auffusion.attention_processor import Attention
from foleycrafter.models.audio_generator.attention_processor import Attention


def _chunked_feed_forward(
Expand Down
ymzhang0319 marked this conversation as resolved.
Show resolved Hide resolved
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from torch import nn

from foleycrafter.models.auffusion.transformer_2d import Transformer2DModel, Transformer2DModelOutput
from foleycrafter.models.audio_generator.transformer_2d import Transformer2DModel, Transformer2DModelOutput


class DualTransformer2DModel(nn.Module):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
IPAdapterAttnProcessor,
)

from foleycrafter.models.auffusion.attention_processor import (
from foleycrafter.models.audio_generator.attention_processor import (
IPAdapterAttnProcessor2_0,
VPTemporalAdapterAttnProcessor2_0,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
set_adapter_layers,
set_weights_and_activate_adapters,
)
from foleycrafter.models.auffusion.attention_processor import (
from foleycrafter.models.audio_generator.attention_processor import (
AttnProcessor2_0,
IPAdapterAttnProcessor2_0,
VPTemporalAdapterAttnProcessor2_0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
upsample_2d,
)
from diffusers.utils import USE_PEFT_BACKEND
from foleycrafter.models.auffusion.attention_processor import SpatialNorm
from foleycrafter.models.audio_generator.attention_processor import SpatialNorm


class ResnetBlock2D(nn.Module):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from diffusers.models.modeling_utils import ModelMixin
from diffusers.models.normalization import AdaLayerNormSingle
from diffusers.utils import USE_PEFT_BACKEND, BaseOutput, deprecate, is_torch_version
from foleycrafter.models.auffusion.attention import BasicTransformerBlock
from foleycrafter.models.audio_generator.attention import BasicTransformerBlock


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@
from diffusers.models.normalization import AdaGroupNorm
from diffusers.utils import is_torch_version, logging
from diffusers.utils.torch_utils import apply_freeu
from foleycrafter.models.auffusion.attention_processor import Attention, AttnAddedKVProcessor, AttnAddedKVProcessor2_0
from foleycrafter.models.auffusion.dual_transformer_2d import DualTransformer2DModel
from foleycrafter.models.auffusion.resnet import (
from foleycrafter.models.audio_generator.attention_processor import (
Attention,
AttnAddedKVProcessor,
AttnAddedKVProcessor2_0,
)
from foleycrafter.models.audio_generator.dual_transformer_2d import DualTransformer2DModel
from foleycrafter.models.audio_generator.resnet import (
Downsample2D,
FirDownsample2D,
FirUpsample2D,
Expand All @@ -33,7 +37,7 @@
ResnetBlock2D,
Upsample2D,
)
from foleycrafter.models.auffusion.transformer_2d import Transformer2DModel
from foleycrafter.models.audio_generator.transformer_2d import Transformer2DModel


logger = logging.get_logger(__name__) # pylint: disable=invalid-name
Expand Down
Loading