AlexanderDzhoganov / ComfyTextures

Unreal Engine ⚔️ ComfyUI - Automatic texturing using generative diffusion models
MIT License
549 stars 65 forks source link

Errors Trying To Render from UE #2

Closed howitzer99 closed 10 months ago

howitzer99 commented 10 months ago

Really excited to try this plugin, but unable to get it to actually work.

I've followed the instructions, and have the plugin and widget working in the UE interface. The plugin appears to be processing the scene but failing afterwards. Using the included widget, which has the positive and negative prompts filled-in, but the errors are saying that there is no input text.

My local ComfyUI is set to the default address which matches the pluging settings, ComfyUI is running, and dev mode is enabled (I see the Save to API button).

Do the workflows need to be loaded into ComfyUI before hitting Render? What are the proper steps to debug with this plugin?

Here's a snippet from the UE console:

"LogComfyTextures: Display: Processed 1 scene textures in 0.736203 seconds LogComfyTextures: Warning: Node positive_prompt does not have input text LogComfyTextures: Warning: Node negative_prompt does not have input text LogJson: Warning: Field prompt_id was not found. LogJson: Error: Json Value of type 'Null' used as a 'String'. LogComfyTextures: Error: Render request failed LogComfyTextures: Warning: Failed to deserialize response JSON LogComfyTextures: Warning: Failed to send interrupt request LogComfyTextures: Warning: Failed to deserialize response JSON LogComfyTextures: Warning: Failed to send clear request LogComfyTextures: Warning: Websocket message missing prompt_id field "

AlexanderDzhoganov commented 10 months ago

Please post the full editor log, you can find it in <Project Dir>\Saved\Logs\.

howitzer99 commented 10 months ago

MyProject.log

Here is the log file.

AlexanderDzhoganov commented 10 months ago

Looks like the issue is with ComfyUI, check the console window for any errors. Most likely one or more of the model checkpoints are missing. Follow the instructions in the readme to download and place all the checkpoints in the correct folders.

howitzer99 commented 10 months ago

Does ComfyTexutres work with the extra_paths.yaml file? That's the only difference I can think of from my ComfyUI install over a vanilla I stall.

On Tue, 30 Jan 2024, 7:02 pm Alexander Dzhoganov, @.***> wrote:

Looks like the issue is with ComfyUI, check the console window for any errors. Most likely one or more of the model checkpoints are missing. Follow the instructions in the readme https://github.com/AlexanderDzhoganov/ComfyTextures?tab=readme-ov-file#setup-comfyui to download and place all the checkpoints in the correct folders.

— Reply to this email directly, view it on GitHub https://github.com/AlexanderDzhoganov/ComfyTextures/issues/2#issuecomment-1916597576, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJMUBHX24NZE7YADEYJVDDYRDHLFAVCNFSM6AAAAABCOYQQCGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJWGU4TONJXGY . You are receiving this because you authored the thread.Message ID: @.***>

howitzer99 commented 10 months ago

I'm not sure what's going on with the expected paths. I've disabled the extra_paths.yaml file and have placed the models in the same local directory as ComfyUI to match the readme. But I'm still getting errors. The lcm file is in the path, but if you check the errors below, the ipdapter subdirectory is being called in the ComfyUI error. "...\ComfyUI\models\loras\lcm-lora-sdxl.safetensors"

I can load your ComfyTexturesDefaultWorkflow.json file in my local ComfyUI, and the models are all loading without errors. And I do see "depth_0" and all the other passes automatically displaying the correct image from UE, but something in the connection between UE and ComfyUI is causing an error. So interactively, ComfyUI will generate an image without errors, just not via UE directly.

Screenshot_3

ComfyUI console: ERROR:root:Failed to validate prompt for output 12: ERROR:root:* LoraLoader 88: ERROR:root: - Value not in list: lora_name: 'lcm_lora_sdxl.safetensors' not in ['ipadapter\ip-adapter-faceid-plusv2_sd15_lora.safetensors', 'ipadapter\ip-adapter-faceid_sd15_lora.safetensors', 'lcm-lora-sdxl.safetensors'] ERROR:root:Output will be ignored invalid prompt: {'type': 'prompt_outputs_failed_validation', 'message': 'Prompt outputs failed validation', 'details': '', 'extra_info': {}}

UE console: LogComfyTextures: Warning: Websocket message missing prompt_id field LogComfyTextures: Warning: Node positive_prompt does not have input text LogComfyTextures: Warning: Node negative_prompt does not have input text LogJson: Warning: Field prompt_id was not found. LogJson: Error: Json Value of type 'Null' used as a 'String'. LogComfyTextures: Error: Render request failed LogComfyTextures: Warning: Failed to deserialize response JSON LogComfyTextures: Warning: Failed to send interrupt request LogComfyTextures: Warning: Failed to deserialize response JSON LogComfyTextures: Warning: Failed to send clear request LogComfyTextures: Warning: Websocket message missing prompt_id field LogComfyTextures: Warning: Websocket message missing prompt_id field

AlexanderDzhoganov commented 10 months ago

Looks like a filename mismatch i.e. lcm-lora-sdxl.safetensors vs lcm_lora_sdxl.safetensors.

howitzer99 commented 10 months ago

Excellent, thanks for your help, it's working after I renamed both my sdxl and sd1.5 LCM Lora's!

Another good thing, is that since it was a name mis-match, users can keep their existing "extra_model_paths.yaml" in-place without causing issues with finding models in locations. Loras will need to be in the root "lora" folder, and not in a sub-folder for ComfyTexture to pick them up.

There are still a lot of warning being thrown in the UE console, but it is generating, so maybe these are ignorable? For now, I'll disable warning output to keep the logs readable. LogBlueprintUserMessages: Render finished LogComfyTextures: Warning: Failed to deserialize response JSON LogComfyTextures: Warning: Failed to send history clear request LogComfyTextures: Warning: Websocket message missing prompt_id field

AlexanderDzhoganov commented 10 months ago

Thanks for investigating. I'm closing this ticket. Please reopen it if you have any more issues.