DiffSynth-Studio icon indicating copy to clipboard operation
DiffSynth-Studio copied to clipboard

EntityControl /entity_transfer.py电商图生成

Open JerryLuYujie opened this issue 1 year ago • 1 comments

EntityControl /entity_transfer.py那个脚本可以不用合并两张图的方式吗,感觉要依赖特定的prompt语法? 输出图感觉怪怪,target_image被切掉边边角角,左边还要带有logo图(很多真是业务场景不需要左边的图) 最好是logo_image,target_image,mask分开传入模型,直接生成一张融合效果图(像模特换装,商品换场景等等case),甚至不用prompt或者少量prompt

JerryLuYujie avatar Jan 08 '25 14:01 JerryLuYujie

感谢您的建议,我们已经对entity_transfer.py进行了修改,不会再crop边角,而是直接resize,同时generate函数直接返回target_image。由于In-Context LoRA的输入限制,模型输入时还是必须是左右图拼接,因此我们是在generate函数中实现了这一逻辑。至于Prompt,经过测试,输出结果对entity_prompt没有那么敏感;但是global prompt还是必须按照In-Context LoRA的格式才能实现比较好的功能。 参考:https://github.com/ali-vilab/In-Context-LoRA

mi804 avatar Jan 14 '25 09:01 mi804