Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
435d37ce
Unverified
Commit
435d37ce
authored
May 02, 2024
by
Aritra Roy Gosthipaty
Committed by
GitHub
May 02, 2024
Browse files
[Tests] reduce the model size in the audioldm fast test (#7833)
chore: initial size reduction of models
parent
5915c298
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
tests/pipelines/audioldm/test_audioldm.py
tests/pipelines/audioldm/test_audioldm.py
+11
-9
No files found.
tests/pipelines/audioldm/test_audioldm.py
View file @
435d37ce
...
...
@@ -66,16 +66,17 @@ class AudioLDMPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
def
get_dummy_components
(
self
):
torch
.
manual_seed
(
0
)
unet
=
UNet2DConditionModel
(
block_out_channels
=
(
32
,
64
),
layers_per_block
=
2
,
block_out_channels
=
(
8
,
16
),
layers_per_block
=
1
,
norm_num_groups
=
8
,
sample_size
=
32
,
in_channels
=
4
,
out_channels
=
4
,
down_block_types
=
(
"DownBlock2D"
,
"CrossAttnDownBlock2D"
),
up_block_types
=
(
"CrossAttnUpBlock2D"
,
"UpBlock2D"
),
cross_attention_dim
=
(
32
,
64
),
cross_attention_dim
=
(
8
,
16
),
class_embed_type
=
"simple_projection"
,
projection_class_embeddings_input_dim
=
32
,
projection_class_embeddings_input_dim
=
8
,
class_embeddings_concat
=
True
,
)
scheduler
=
DDIMScheduler
(
...
...
@@ -87,9 +88,10 @@ class AudioLDMPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
)
torch
.
manual_seed
(
0
)
vae
=
AutoencoderKL
(
block_out_channels
=
[
32
,
64
],
block_out_channels
=
[
8
,
16
],
in_channels
=
1
,
out_channels
=
1
,
norm_num_groups
=
8
,
down_block_types
=
[
"DownEncoderBlock2D"
,
"DownEncoderBlock2D"
],
up_block_types
=
[
"UpDecoderBlock2D"
,
"UpDecoderBlock2D"
],
latent_channels
=
4
,
...
...
@@ -98,14 +100,14 @@ class AudioLDMPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
text_encoder_config
=
ClapTextConfig
(
bos_token_id
=
0
,
eos_token_id
=
2
,
hidden_size
=
32
,
hidden_size
=
8
,
intermediate_size
=
37
,
layer_norm_eps
=
1e-05
,
num_attention_heads
=
4
,
num_hidden_layers
=
5
,
num_attention_heads
=
1
,
num_hidden_layers
=
1
,
pad_token_id
=
1
,
vocab_size
=
1000
,
projection_dim
=
32
,
projection_dim
=
8
,
)
text_encoder
=
ClapTextModelWithProjection
(
text_encoder_config
)
tokenizer
=
RobertaTokenizer
.
from_pretrained
(
"hf-internal-testing/tiny-random-roberta"
,
model_max_length
=
77
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment