smthemex / ComfyUI_StoryDiffusion

You can using StoryDiffusion in ComfyUI
Apache License 2.0
241 stars 195 forks source link

UnboundLocalError: local variable 'app_face' referenced before assignment #75

Open jasoncow007 opened 1 month ago

jasoncow007 commented 1 month ago

when using kolors ...

!!! Exception during processing !!! local variable 'app_face' referenced before assignment Traceback (most recent call last): File "D:\ComfyUI-aki-v1.2\execution.py", line 323, in execute output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "D:\ComfyUI-aki-v1.2\execution.py", line 198, in get_output_data return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "D:\ComfyUI-aki-v1.2\execution.py", line 169, in _map_node_over_list process_inputs(input_dict, i) File "D:\ComfyUI-aki-v1.2\execution.py", line 158, in process_inputs results.append(getattr(obj, func)(**inputs)) File "D:\ComfyUI-aki-v1.2\custom_nodes\ComfyUI_StoryDiffusion\Storydiffusion_node.py", line 2181, in story_sampler trigger_words,photomake_mode,use_kolor,use_flux,make_dual_only,kolor_face,pulid,story_maker,app_face, pipeline_mask,) UnboundLocalError: local variable 'app_face' referenced before assignment

smthemex commented 1 month ago

Yes,miss a assignment。new update fix it,

jasoncow007 commented 1 month ago

It is too easy to use flux to explode vram. Even 64g ram and 16g vram got oom,,, Is there any way to alleviate it?

jasoncow007 commented 1 month ago

the photomaker model cannot be a unchosen choice, when I use faceid in kolors, vram got oom

smthemex commented 1 month ago

It is recommended to use Flux nf4, but Flux_pulid does require a large amount of RAM and VRAM, Kolors faceid need insightface model and ipa-faceid-plus.bin,you can use kolor ipadapter,It doesn't need an insightface and ipa-faceid-plus.bin, be careful not to input "face" in the easy function.

jasoncow007 commented 1 month ago

It is recommended to use Flux nf4, but Flux_pulid does require a large amount of RAM and VRAM, Kolors faceid need insightface model and ipa-faceid-plus.bin,you can use kolor ipadapter,It doesn't need an insightface and ipa-faceid-plus.bin, be careful not to input "face" in the easy function.

nf4 work with pulid got oom too, and also found that img to img, the prompt is much too weak, take no effect

smthemex commented 1 month ago

Which mode of img2img is it? If it is flux, we are currently using the beta version of the pipeline (which has not been updated to the latest version of diffuser), and its cfg function is indeed invalid because it is only given 3.5 by default; If using Kolor and prompt in Chinese, it would be better because the ChatGLM used by Kolor has better support for Chinese

jasoncow007 commented 1 month ago

Which mode of img2img is it? If it is flux, we are currently using the beta version of the pipeline (which has not been updated to the latest version of diffuser), and its cfg function is indeed invalid because it is only given 3.5 by default; If using Kolor and prompt in Chinese, it would be better because the ChatGLM used by Kolor has better support for Chinese

I tried both flux and kolors img2img in the newest version, prompt seems take no effect 微信图片_20240923115235

jasoncow007 commented 1 month ago

text2image, prompt works fine, but the consistency is poorer

smthemex commented 1 month ago

If using chinese, role name need using chinese too, example,["张三"] ,["翠花"], flux img2img need Reduce the parameters (noise) of ip adapter strength to obtain more diversity. Of course, I found img2img and locked the value of “true cfg”. I will update the code to set it as an optional parameter (using role_stcale)

jasoncow007 commented 1 month ago

still weak image

smthemex commented 1 month ago

Remove location information such as the living room from the character prompt words and only describe the character

jasoncow007 commented 1 month ago

This is the result of my many attempts, even if I don't write it like this