StyQA / main.py
ReyChiaro's picture
Init commit
59aed9d
Raw
History Blame Contribute Delete
820 Bytes
import os
import json
import hydra
from hydra.utils import instantiate
from omegaconf import OmegaConf
from PIL import Image
from agent import StyQA, UserInput
from utils import load_image
@hydra.main(version_base="v1.2", config_path="configs", config_name="agent")
def main(cfgs: OmegaConf):
prompt = "Convert the pixel colors of Picture 1 into the pixel colors of Picture 2 with strength 0.75 and then transfer the semantic style into Picture 3."
cnt_image_path = "demos/content1.jpg"
ref_image_paths = ["demos/pixel.jpg", "demos/semantic1.jpg"]
agent: StyQA = instantiate(cfgs.agent)
user_input = UserInput(
prompt=prompt,
cnt_image_path=cnt_image_path,
ref_image_paths=ref_image_paths,
)
agent.run_pipeline(user_input)
if __name__ == "__main__":
main()