Closed OliPassey closed 1 year ago
I had the exact same issue, I am running the python code instead of using the exe so I could edit the files. I'm assuming comfy is returning a preview of the image as it is generating which isn't JSON. I edited the imageGen.py file at line 67 and replaced the block with the following.
async for out in self.ws:
try:
message = json.loads(out)
if message['type'] == 'execution_start':
currently_Executing_Prompt = message['data']['prompt_id']
if message['type'] == 'executing' and prompt_id == currently_Executing_Prompt:
data = message['data']
if data['node'] is None and data['prompt_id'] == prompt_id:
break
except ValueError as e:
print("not json");
it now prints the not json message in command prompt but will generate the image and send it back to discord. Hope that helps.
Amazing, thanks!
I made the change but am having issues installing the various requirements. Which version of python are you using, and did you use a venv?
Looks like im missing websockets library, as when i run bot.py it doesn't give the usual output and just quits. pip install -r requirements.txt gave a couple of errors;
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. google-auth 2.22.0 requires urllib3<2.0, but you have urllib3 2.0.4 which is incompatible.
I tried pip uninstall urllib3 then re-running the pip -r requirements.txt but this brings back the same version issue.
Hey guys, thanks for pointing this one out!
I've made a new release now here with the changes suggested by @erroneousau let me know if it all works as intended and Ill close up this issue
Thanks for this! The bot now works and returns 4x complete images to the discord server, however during generation no previews were sent and the bot console repeatedly printed;
Trying to upscale one of the images caused this in the comfyui console; And no upscaled image was created.
Just providing this as feedback, really appreciate your work on this!
So currently the bot doesn't support running image previews, (might be something I implement later on) as for the upscaling issue however, have you double checked you have the RealESRGAN_x2plus.pth model in your upscale_models folder in ComfyUI it seems as though its reading that it cant locate the model
The model can be downloaded here if you haven't got it yet: https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth
ah, i didn't have the plus version - thanks, thats working fine now. Really appreciate your assistance 👍
Got the bot into my server and sent it a command, comfy kicked off generating but after 10s this error appears in the discord bot console, and nothing further happens in discord after the initial "this shouldn't take too long" msg.
Could this be a bot permissions issue do you think? Or something else
Any advice would be appreciated.