add sd ut

This commit is contained in:
stellahsr 2024-01-11 21:56:38 +08:00
parent af26fe06cf
commit 3be26cf94f
2 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
# @Date : 1/10/2024 10:07 PM
# @Author : stellahong (stellahong@fuzhi.ai)
# @Desc :
from metagpt.tools.sd_engine import SDEngine
def test_sd_tools():
engine = SDEngine()
prompt = "1boy, hansom"
engine.construct_payload(prompt)
engine.simple_run_t2i(engine.payload)
def test_sd_construct_payload():
engine = SDEngine()
prompt = "1boy, hansom"
engine.construct_payload(prompt)
assert "negative_prompt" in engine.payload