dreamstyler icon indicating copy to clipboard operation
dreamstyler copied to clipboard

Question about style mixing

Open whit3mperial opened this issue 1 year ago • 1 comments

Hi, thanks to your great work. But I wonder how can perform style mixing using this code. I didn't see any part of code related to this, should I modify the code myself to achieve this?

whit3mperial avatar Aug 15 '24 02:08 whit3mperial

Hi, sorry for the late reply. As you mentioned, the open-source code does not include style mixing. You can implement style mixing by providing different prompt tokens for each layer For example,

prompt = "A painting of a bridge in the style of {}"
prompt_style = [prompt.format(f"<17>-T{i}, <10>-T{i}, <22>-T{i}") for i in range(6)]
...
output = pipeline(
    prompt=prompt_style,
    num_inference_steps=25,
    cross_attention_kwargs=cross_attention_kwargs,
    generator=torch.Generator(device=accelerator.device).manual_seed(seed)
).images[0]

nmhkahn avatar Aug 24 '24 07:08 nmhkahn