File size: 820 Bytes
59aed9d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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()