bedovyy / ComfyUI_NAIDGenerator

NovelAI Diffusion generator for ComfyUI
GNU General Public License v3.0
42 stars 8 forks source link

Furry v3? #14

Closed Dibucci closed 2 months ago

Dibucci commented 2 months ago

Just started using this today when I was looking up ways to use NAI in a webui so i can gen an image then use a different model to add more detail to said image generated by NovelAI. Took me a bit to figure out the env, and this works amazingly.

However, I have noticed that the nai furry model seams.... different.. maybe... idk if its just my prompting or what but, is this using the new furry v3, or the old beta 1.3 model? the old beta model was SD1.4 and their new one is sdxl. it could just be me, and im not prompting right or something, but i just wanted to make sure

the only other reason i ask cuz other API's i found, like the one for A1111, uses the old beta 1.3 furry model

Dibucci commented 2 months ago

ok, after further investigation, doing the same seed and settings on both NAI's website and on the comfy UI node, it is indeed using the older version of NAI's Furry model... 😞 is there any Possible way to upgrade to the newest version of their furry model?

for a further example, with the same seed, prompt and settings, your nodes nai furry model image

and the one i get from the NAI Furry v3 website image

and the prompt, positive and negative, for both

Positive: best quality, amazing quality, detailed, 4k, hi res, very aesthetic, anime, game cg, cute, feral, eevee, detailed background, park, solo, relaxing on a bench

Negative: lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, bad quality, worst quality, low quality, jpeg artifacts, signature, watermark, username, blurry, artist name

Furthermore, i do not know if your node uses any of the "add quality tags" and "undesired content" switches and presets so i turned them off on the NAI website, asuming your does not use them so to have it done exactly the same if possable.

bedovyy commented 2 months ago

Thank you for reporting! I have updated, so try it and let me know if there are another issues.

image

workflow included image. ComfyUI_27061_

bedovyy commented 2 months ago

I forget to tell you about quality and uc, It works as actually add additional prompt to prompt or negative prompt. However, the tags it added is different by model version or type. And, I couldn't test whether it remove duplicated prompt, or orders when user set quality preset or uc preset.

If you are interesting about actual tags for presets, Please refer the below. https://github.com/Aedial/novelai-api/blob/ffd75ebb1c390153d193e7b66761a0de0cc452ea/novelai_api/ImagePreset.py#L146

Dibucci commented 2 months ago

ok, let me update the plugin and test this. tbh, was not expecting this fast of a reply. 😄 its kinda refreshing

Dibucci commented 2 months ago

currently im testing out different presets on the NAI website with the ones you have in that link for the furry v3 to see if ... i guess if they are working/bing used. Im using the same seed and paramaters as well... tho... im unsure what this "Limit_Opus_free" is? and idk if its causing the difference in chagnes im seeing....

hmm.... tried out heavy preset, light preset, and the "none" preset with the same prompt, seed, and settings.... however all 3 on NAI's website are comming out different compaired to what i have on comfyUI.... it is using their new model, that's the important part here (and ty again for adding it) but it does seam to be... different, or uses one of the presets constantly even if I put my own in.... or.... not....?

hmmm... im not the best at explaing things.... but l did the eevee prompt again to do a few tests on both the website and the comfyUI node, like in your image, i get the rock now on the bench next to eevee, but on novelAI, its slightly different with their being no rock and the bench legs being slightly different.... interesting.

it defently is pulling v3 but idk where these subtle changes are comming from cuz its not using the heavy, or light negative presets.... cuz the images im getting on NAI compared to comfy node, are drasticly different

I have just done the same prompt, seed, and setting on NAI for that eevee image and no matter what i set it to, i couldn't see it matching up to the image in comfy... its V3 for sure... im just curious as to what is going on that the outcomes are like 2 sides of a coin, completely different with the same stuff, and i cant tell if comfy is using the negative presets or no as when i use the presets on NAI, none give the comfyUI output if i leave the negative blank for it to use a preset

Dibucci commented 2 months ago

example, comfyui image

and NAI with the same using the different presets starting with none, then light, then heavy image image image i did it again with the added quality tags switch but it was just a slight change of each

the good thing is that it's working, and these changes are not bad... just... confusing why there is such a drastic change if its mostly using the api to use their stuff on local

bedovyy commented 2 months ago

There is default negative preset on NAI webpage, 'lowres' (or 'low res' depends on the model) That's why I added on negative prompt of generate node. (btw, default tags on 'prompt' of generate node is 'quality preset' tags.) I think that is one reason of difference.

If you check metadata using stable-diffusion-webui or stable-diffusion-webui-forge, or just any website by googling 'image metadata viewer online', there must be some tags you didn't input, that's quality prompt or uc prompt.

However, I tested some when I made this custom node, and even if I set exactly same, the result was slightly different. In case of I2I or inpainting, it is significantly different. (ref. discussion https://github.com/bedovyy/ComfyUI_NAIDGenerator/discussions/2) I guess it is interpolation method. When NAI do I2I or inpainting, it resize source image, but there's many way to reducing noise, like bicubic or bilinear. (or I resizing it in a wrong way)

I think these small difference is acceptable, and big difference is what I couldn't solve at the moment. The node basicall make one more png image name as 'NAI_autosave00106.png', it has NAI metadata (not ComfyUI workflow), so you can import to NAI webpage by drag&drop. If there's significant difference during T2I, and you want to fix it, please create issue.

Anyway, I tried to reproduce heavy one you uploaded, and got almost same, but not the same. (tree on the left or bench on the right, for example)

workflow included image ComfyUI_27097_

I chekced exif and found dynamic_thresholding is true on NAI webpage, and false on this custom node. image

dynamic_thresholding is usually false, and I don't know when it become true. There must be some logic, but I can't figure it out. I think it is acceptable, if you strongly want fix it, I will check and try to solve this.

By the way, limit_opus_free is the feature to limit resolution and steps for opus free generation. (total 1M pixel regardless aspect ratio, 28steps) I couldn't think good name for the feature. If you have any suggestion of this, please.

bedovyy commented 2 months ago

I just noticed there is 'decrisper' setting on NAI webpage. I add this on the node.

Now, I could get exactly same image with heavy uc.

workflow included image ComfyUI_27098_

Dibucci commented 2 months ago

sorry for late response, day got busy not long after my last post.

ill update it here shortly then. Also, ya, the slight difference was never a bad thing, i was just haveing a hard time figuring out why it was so different when using the different presets on the website compaired to the node, trying to figure out what it was using by default.

However, now i feel kinda dumb not checking the meta data of the comfy UI image xD

I forget sometimes about the meta data in SD WebUI Images, and it completely slipped my mind

Dibucci commented 2 months ago

ty again btw for adding this. it makes things a lot eaiser having to do everything in one place since before this i had to make an image on NAI then copy/paste the image into comfy UI to do a slight i2i and upscale to add a bit more detail/texture/ect.