Skip to content

Commit b08c893

Browse files
committed
chore(tests): integration test for attn_procs
1 parent ad99879 commit b08c893

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import sys
2+
import os
3+
from .lib import getMinio, getDDA
4+
from test import runTest
5+
6+
7+
class TestAttnProcs:
8+
def test_hf_download(self):
9+
"""
10+
Make sure when switching models we release VRAM afterwards.
11+
"""
12+
dda = getDDA(
13+
stream_logs=True,
14+
)
15+
print(dda)
16+
17+
TEST_ARGS = {"test_url": dda.url}
18+
19+
mem_usage = list()
20+
21+
# fp32 model is obviously bigger
22+
result = runTest(
23+
"txt2img",
24+
TEST_ARGS,
25+
{
26+
"MODEL_ID": "runwayml/stable-diffusion-v1-5",
27+
"MODEL_REVISION": "fp16",
28+
"MODEL_PRECISION": "fp16",
29+
"attn_procs": "patrickvonplaten/lora_dreambooth_dog_example",
30+
},
31+
{
32+
"num_inference_steps": 1,
33+
"prompt": "A picture of a sks dog in a bucket",
34+
"seed": 1,
35+
"cross_attention_kwargs": {"scale": 0.5},
36+
},
37+
)
38+
39+
assert result["image_base64"]
40+
dda.stop()

0 commit comments

Comments
 (0)