Acly / krita-ai-diffusion

Streamlined interface for generating images with AI in Krita. Inpaint and outpaint with optional text prompt, no tweaking required.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

worked out samplers not reading

Sil3ntKn1ght opened this issue · comments

got samplers working if like
"karras" (custom 1): {
"sampler": "dpmpp_3m_sde",
"scheduler": "exponential",
"steps": 20,
"cfg": 7.0
it won't read, and conflicts and doesn't read if there matching name

bellow worked. i have no idea what the stuff means I'm mixing testing and working out.
i get good results with these.
note: I'm not sure if you changed the new samplers or just name's but my test prompts they nothing like before, the below ones I put in are better results close to past versions, still dialing it in.

{
"DPM++ 3M": {
"sampler": "dpmpp_3m_sde",
"scheduler": "exponential",
"steps": 20,
"cfg": 7.0
},
"DPM++ 3m karras": {
"sampler": "dpmpp_3m_sde",
"scheduler": "karras",
"steps": 30,
"cfg": 4.0
},
"DPM++ 3M SDE Lightning": {
"sampler": "dpmpp_3m_sde",
"scheduler": "sgm_uniform",
"steps": 8,
"cfg": 2.0
},
"DPM++ 2M SDE karras GPU": {
"sampler": "dpmpp_2m_sde_gpu",
"scheduler": "karras",
"steps": 20,
"cfg": 5
},
"DPM++ 2M SDE karras": {
"sampler": "dpmpp_2m_sde",
"scheduler": "karras",
"steps": 20,
"cfg": 5
},
"Euler": {
"sampler": "euler",
"scheduler": "sgm_uniform",
"steps": 20,
"cfg": 6.0
},
"Euler Ex": {
"sampler": "euler",
"scheduler": "exponential",
"steps": 10,
"cfg": 2.0
},
"Lightning Euler": {
"sampler": "euler",
"scheduler": "sgm_uniform",
"lora": "lightning",
"steps": 10,
"cfg": 1.5
},
"Lightning Euler DDI": {
"sampler": "euler",
"scheduler": "ddim_uniform",
"lora": "lightning",
"steps": 8,
"cfg": 1.5
},
"Euler DDI": {
"sampler": "euler",
"scheduler": "ddim_uniform",
"steps": 14,
"cfg": 3.0
}
}

got samplers working if like "karras" (custom 1): { "sampler": "dpmpp_3m_sde", "scheduler": "exponential", "steps": 20, "cfg": 7.0 it won't read, and conflicts and doesn't read if there matching name

Name should be in between "" like this:

{
"karras (custom 1)": {
"sampler": "dpmpp_3m_sde",
"scheduler": "exponential",
"steps": 20,
"cfg": 7.0
},

got samplers working if like "karras" (custom 1): { "sampler": "dpmpp_3m_sde", "scheduler": "exponential", "steps": 20, "cfg": 7.0 it won't read, and conflicts and doesn't read if there matching name

Name should be in between "" like this:

{
"karras (custom 1)": {
"sampler": "dpmpp_3m_sde",
"scheduler": "exponential",
"steps": 20,
"cfg": 7.0
},

sorry that's what i meant for me that doesn't work, also noticed if there too long, as added on and broke it but made the name shorter and worked.

with the "karras (custom 1)" it randomly come up some loads of krita Ai but 90% of the time not.
windows 10.. long as its working im good but maybe someone else might have same Hick up.

Weird, just tested giving it the same name as the sampler and scheduler in case of an edge case, and relatively long names for the profiles and they worked fine. I'd check the entries in the .json including "" and commas , when having multiple of them, like this:

{
    "Lightning (old)": {
        "sampler": "euler",
        "scheduler": "sgm_uniform",
        "steps": 12,
        "cfg": 8.5
    },

    "karras": {
        "sampler": "euler",
        "scheduler": "karras",
        "steps": 12,
        "cfg": 8.5
    },

    "polynomial": {
        "sampler": "euler",
        "scheduler": "polynomial",
        "steps": 12,
        "cfg": 8.5
    }
}

Only other thing I could think of is the text editor you're using might somehow be messing up the .json's file format, but I doubt it.

Weird, just tested giving it the same name as the sampler and scheduler in case of an edge case, and relatively long names for the profiles and they worked fine. I'd check the entries in the .json including "" and commas , when having multiple of them, like this:

{
    "Lightning (old)": {
        "sampler": "euler",
        "scheduler": "sgm_uniform",
        "steps": 12,
        "cfg": 8.5
    },

    "karras": {
        "sampler": "euler",
        "scheduler": "karras",
        "steps": 12,
        "cfg": 8.5
    },

    "polynomial": {
        "sampler": "euler",
        "scheduler": "polynomial",
        "steps": 12,
        "cfg": 8.5
    }
}

Only other thing I could think of is the text editor you're using might somehow be messing up the .json's file format, but I doubt it.

i think it's window's or maybe something else python still run a old version because kohys , but its no big deal.
but some reason even with all the combinations I'm not getting the quality i was with the old
DPM++ 2m SDE
DPM++ 2m SDE karras
DPM++ SDE karras

any idea via what i have etc, on what I'm missing?

i noticed Aclys are as below but they don't seem to work as before, also there where 11 samplers before now 6 so i imagine its not my imagination.

Hope next update puts them as they where as it also screwed up all the model profiles created, as they can't find the old ones so there all on default making a massive headache to have to go though and set them all up again.

but i do love being able to add them also thats great.
thanks for the 2 i don't have. ps "polynomial", errors.

{
    "Default": {
        "sampler": "dpmpp_2m",
        "scheduler": "karras",
        "steps": 20,
        "cfg": 7.0
    },
    "Creative": {
        "sampler": "dpmpp_2m_sde_gpu",
        "scheduler": "karras",
        "steps": 20,
        "cfg": 6.0
    },
    "Fast": {
        "sampler": "uni_pc_bh2",
        "scheduler": "ddim_uniform",
        "steps": 12,
        "cfg": 4.0
    },
    "Turbo/Lightning Merge": {
        "sampler": "dpmpp_sde_gpu",
        "scheduler": "karras",
        "steps": 6,
        "cfg": 2.0
    },
    "Realtime LCM": {
        "sampler": "lcm",
        "scheduler": "sgm_uniform",
        "lora": "lcm",
        "steps": 6,
        "cfg": 1.8
    },
    "Realtime Lightning": {
        "sampler": "euler",
        "scheduler": "sgm_uniform",
        "lora": "lightning",
        "steps": 8,
        "cfg": 1.5
    }
}

Oh I brainfarted and typed polynomial instead of exponential, but you got the idea. The whole list is here: https://github.com/Acly/krita-ai-diffusion/wiki/Samplers#reference

Oh I brainfarted and typed polynomial instead of exponential, but you got the idea. The whole list is here: https://github.com/Acly/krita-ai-diffusion/wiki/Samplers#reference

that's fantastic thank you.

{
"euler_smea_dy/karras": {
"sampler": "euler_smea_dy",
"scheduler": "karras",
"steps": 25,
"cfg": 8.5
},

"euler/karras": {
    "sampler": "euler",
    "scheduler": "karras",
    "steps": 25,
    "cfg": 8.5
},

"supreme": {
    "sampler": "supreme",
    "scheduler": "karras",
    "steps": 25,
    "cfg": 8.5
},

"clyb_4m_sde": {
    "sampler": "clyb_4m_sde_momentumized",
    "scheduler": "karras",
    "steps": 25,
    "cfg": 8.5
},

"dpmpp_dualsde": {
    "sampler": "dpmpp_dualsde_momentumized",
    "scheduler": "karras",
    "steps": 25,
    "cfg": 8.5
},

"dpmpp_3m_sde_gpu": {
    "sampler": "dpmpp_3m_sde_gpu",
    "scheduler": "karras",
    "steps": 25,
    "cfg": 8.5
}

}

I got custom samplers working that I installed via custom nodes. I feel like they didn't work for live at first, but then I just generated an image using them, and when I switched back to live it was working.

yep default samplers error needed to download this and put in lora dir
sdxl_lightning_8step_lora.safetensors

not sure why or whats wrong but making the missing DPM++ 2M SDE samplers etc DPM++ 2M SDE karras , renders are a hot mess only on DPM++ 2M SDE, and DPM++ 3M SDE
others seem fine like ie Euler U, Euler karras, DPM++ 2S Ancestral that I have made work as they should.

I'll make a video and post link tomorrow,
Sampler in 1.17 are very broken. after trying to make the missing samplers and even the default samplers in 1.17 there are so many artifices.
older versions no issue 1.17 is definitely broken.

I think I just caught some edge behavior where the custom preset selected from the dropdown doesn't stick and reverts back to Default, or possibly another random preset, after clicking Ok and closing the settings window.

Changing the Sampler Steps slider to any other value aside from the one already set seems to fix it (and you can change it back to the value you want once it's fixed), possibly also the CFG slider, and that makes that selected preset stick, Maybe that could be causing part of your issue.

I think I just caught some edge behavior where the custom preset selected from the dropdown doesn't stick and reverts back to Default, or possibly another random preset, after clicking Ok and closing the settings window.

Changing the Sampler Steps slider to any other value aside from the one already set seems to fix it (and you can change it back to the value you want once it's fixed), possibly also the CFG slider, and that makes that selected preset stick, Maybe that could be causing part of your issue.

is easier to show, two systems one a rtx3060ti other a gtx1070sc, both bad renders etc
also look at the video that on adding samplers as i show and ramble more on glitches through it.
also ipface is a hot mess and takes forever on the Rtx3060 now and ironically the gtx1070 is faster and less of a mess but what looks like black static diffusion artifacts. I'm at a loss. will go back to 1.15 for now as for myself its not usable on both systems.
to me its like something is dropping out it the AI layer processing plus a conflict with paths, but it's beyond my understanding.

https://youtu.be/Ngt5Oqa7aqE?si=U79_ZQ3dP7itE6YN

commented

I think I just caught some edge behavior where the custom preset selected from the dropdown doesn't stick and reverts back to Default, or possibly another random preset, after clicking Ok and closing the settings window.

You're right, if the preset uses the same default steps & cfg it's not persistet. Will fix that.

@Sil3ntKn1ght Thanks for the video. Still a bit unclear because I'm not sure what custom checkpoint you are using. Lightning merges aren't really expected to work with a big range of samplers.

Can you provide the workflow.json?

  • In "Interface" settings enable "Dump Workflow" options.
  • Generate an image which looks broken.
  • Screenshot the Style settings.
  • Find the workflow.json file in the logs folder and attach it.

I think I just caught some edge behavior where the custom preset selected from the dropdown doesn't stick and reverts back to Default, or possibly another random preset, after clicking Ok and closing the settings window.

You're right, if the preset uses the same default steps & cfg it's not persistet. Will fix that.

@Sil3ntKn1ght Thanks for the video. Still a bit unclear because I'm not sure what custom checkpoint you are using. Lightning merges aren't really expected to work with a big range of samplers.

Can you provide the workflow.json?

* In "Interface" settings enable "Dump Workflow" options.

* Generate an image which looks broken.

* Screenshot the Style settings.

* Find the `workflow.json` file in the logs folder and attach it.

https://www.mediafire.com/file/m5v9i0w8h4twasf/workflow.zip/file

used your samplers images named for sampler steps and cfg
model used

https://civitai.com/models/43977?modelVersionId=338512

because it stands out more, but its all models.

zip includes what you requested not sure if workflow dump is one render or all or how that works hence 2 in there just encase.

might be the worst model to try and show it with as its fussy on the longer prompt

I think I just caught some edge behavior where the custom preset selected from the dropdown doesn't stick and reverts back to Default, or possibly another random preset, after clicking Ok and closing the settings window.

You're right, if the preset uses the same default steps & cfg it's not persistet. Will fix that.

@Sil3ntKn1ght Thanks for the video. Still a bit unclear because I'm not sure what custom checkpoint you are using. Lightning merges aren't really expected to work with a big range of samplers.

Can you provide the workflow.json?

* In "Interface" settings enable "Dump Workflow" options.

* Generate an image which looks broken.

* Screenshot the Style settings.

* Find the `workflow.json` file in the logs folder and attach it.

https://www.mediafire.com/file/jmvltb08gdbbxg9/Zaxious_v2_steps_20_cfg_1.8.zip/file

so example 2 with loras added for details on Zaxious lightning v2
images written as version sampler steps cfg .. 1.15 - samp real-lightning - Zaxious v2 - steps 20 cfg 1.8
https://civitai.com/models/324944?modelVersionId=402213

note 1.17 artifacts, these are better examples
1.15 is for some reason cleaner, as close as i could get was making a euler _ancestral normal sampler but lacked speed and depth of details, as i thought it must be samplers.
but all dpmpp seem to have the unfinished messy look with artifacts where i found prior version to 1.17 they where the go to samplers.
im at a loss, maybe that part is in the comfyui update itself.

will be curious your test and if you eyes see what i mean.

1.15 render are cleaner looking is the simplest way to describe it.

so many dls please don't share the prompt, it took 8h to get that prompt working and with a neuromuscular condition a lot of pain.
I'd like it not to be stolen thank you

commented

I'm guessing this is the "HW5.0_Euler_a_Lightning" version? I would recommend to test with the standard model, the Lightning versions are very picky.

I looked at your workflow, and it looks correct. The image was correctly generated with the sampler and settings you configured. I can reproduce the image with artifacts. But they come from bad prompt and probably bad sampler choice.

From civitai:

Sampler: Eular a (Important! The model is specifically adapted to Eular a, other samplers may not yield as good results)
CFG scale: 1
Sampling steps: 8 steps (6~8 steps are acceptable)

If I clean up the prompt and use the recommended settings, images look good.


Second workflow (Zaxious lightning v2) also was generated with correct settings, as you posted.

As far as I can see there is no bug, the settings are forwarded to ComfyUI correctly and you get what you asked for. The artifacts are mostly from using Lightning Merge checkpoints with incompatible settings (and to some degree due to bad prompt).


I can't really tell you why the results in 1.15 are different. This would require a detailed investigation, eg. dumping the workflows with both versions and comparing differences. ComfyUI upgrade may have changed things, but I doubt it.

All in all I believe you can get good quality images with same/better quality as in 1.15 if you

  • use the settings recommended by the checkpoint author
    • especially for Lightning merges!, other models are more flexible
  • remove all the "junk" from the prompt (masterpiece, best quality, bla bla)
  • don't use weight 2 in prompt (it's way too high, max 1.3 or so)

please don't share the prompt, it took 8h to get that prompt working and with a neuromuscular condition a lot of pain.

:( For SDXL try short, concise prompt with natural language

1.15 note clearer finished look
1 15 - samp real-lightning - Zaxious v2 - steps 20 cfg 1 8

1.17, note artifacts
1 17 - samp real-lightning - Zaxious v2 - steps 20 cfg 1 8

I'm guessing this is the "HW5.0_Euler_a_Lightning" version? I would recommend to test with the standard model, the Lightning versions are very picky.

I looked at your workflow, and it looks correct. The image was correctly generated with the sampler and settings you configured. I can reproduce the image with artifacts. But they come from bad prompt and probably bad sampler choice.

From civitai:

Sampler: Eular a (Important! The model is specifically adapted to Eular a, other samplers may not yield as good results)
CFG scale: 1
Sampling steps: 8 steps (6~8 steps are acceptable)

If I clean up the prompt and use the recommended settings, images look good.

Second workflow (Zaxious lightning v2) also was generated with correct settings, as you posted.

As far as I can see there is no bug, the settings are forwarded to ComfyUI correctly and you get what you asked for. The artifacts are mostly from using Lightning Merge checkpoints with incompatible settings (and to some degree due to bad prompt).

I can't really tell you why the results in 1.15 are different. This would require a detailed investigation, eg. dumping the workflows with both versions and comparing differences. ComfyUI upgrade may have changed things, but I doubt it.

All in all I believe you can get good quality images with same/better quality as in 1.15 if you

* use the settings recommended by the checkpoint author
  
  * especially for Lightning merges!, other models are more flexible

* remove all the "junk" from the prompt (masterpiece, best quality, bla bla)

* don't use weight 2 in prompt (it's way too high, max 1.3 or so)

please don't share the prompt, it took 8h to get that prompt working and with a neuromuscular condition a lot of pain.

:( For SDXL try short, concise prompt with natural language

depends on model and training, some those words trigger there models and I have found make a massive difference.
the weight of 2 yes can be to heavy but again seems some models respond better and ignore completely lower weights when there are multiple weights as it seem to see multiple are randomly ignore some if there the same, i found 2 helps, again on certain models not all.
my hope is sdxl3 has a better language model.
i know I and they are SD doesn't register, but with neurological dyslexia it helps me to prompt and see what im doing etc

the weight of 2

Yeah that would do it, a common issue some people have in A1111 (different UI but same principles) is due to prompts with really high weights (either on purpose like 1.8 or by accidentally typoing the decimal dot) that might have worked on a previous version, but then understandably don't work anymore after a newer update. High weights might work by chance for a while and in very specific cases, but in general prompts above 1.4 or even 1.3 will overfry.