CivArchive
    ComfyUI BLIPAttentionKSampler - BLIPAttentionKSampler
    NSFW
    Preview 5211085
    Preview 5211086
    Preview 5211100
    Preview 5211096
    Preview 5211097

    Updated:

    The convert_cond function has been moved to sampler_helpers. Fixed taking the original latent instead of the previous latent in the last steps. Now you should see the difference in the level of detail.

    Upd. Forgot to set the seed, now the generations should be reproducible.

    Imagine you are writing a prompt: "attractive cat". The diffusion model doesn't know what "attractive" is, but has seen pictures that were labeled the same. Let's help: at the step selected by the "blip_at_step" setting, the BLIP model is loaded, looks at what the diffusion process has produced at that step, and says: "this shows a fluffy black and white cat sitting on a windowsill". And all the next diffusion steps the model already knows what it should get on generation. At the next steps the negative prompt is replaced by an empty perp-neg.

    已更新:

    convert_cond 函数已移至 sampler_helpers。修正了在最后几步中使用原始潜影而不是前一个潜影的问题。现在你应该能看到详细程度上的差异了。

    更新。忘记设置种子了,现在世代应该可以重现了。

    想象你正在写一个提示 "迷人的猫"。扩散模型并不知道什么是 "有吸引力",但却看过被贴上相同标签的图片。让我们来帮你:在 "blip_at_step "设置所选择的步骤中,BLIP 模型被加载,查看扩散过程在该步骤中产生的结果,然后说:"这显示了一只毛茸茸的黑白相间的猫坐在窗台上"。在接下来的所有扩散步骤中,模型已经知道了它应该得到的结果。在接下来的步骤中,负提示被一个空的 perp-neg 所取代。

    Обновлено:

    Функция convert_cond перенесена в sampler_helpers. Исправлено взятие исходного латента вместо предыдущего на последних шагах. Вот теперь должна быть заметна разница в уровне детализации.

    Обн. Забыл задать семя, теперь генерации должны быть воспроизводимы.

    Представьте, что вы пишите промпт: "привлекательный кот". Модель диффузии не знает, что такое "привлекательный", но видела картинки, которые были помечены так же. Давайте поможем: на шаге, выбранном настройкой "blip_at_step", загружается модель BLIP, смотрит на то, что получилось в процессе диффузии на данном шаге, и говорит: "тут изображён пушистый чёрно-белый кот, сидящий на подоконнике". И все следующие шаги диффузии модель уже знает, что должно получиться на генерации. На следующих шагах негативный промпт заменяется на пустой perp-neg.

    Description

    FAQ

    Comments (9)

    kubilayanJan 6, 2024
    CivitAI

    I didn't fully understand the explanation text. Additionally, do we need to connect another reference image as a node? In the sample node tree image, only the Sampler is connected and that's it. Is there any explanatory documentation?

    hellnetJan 6, 2024· 1 reaction

    From my understanding:
    - You are generating something using ur positive and negative prompts.
    - At step blip_at_step we ask BLIP what the hell is on the picture we generated so far.
    - We replace positive prompts with what BLIP found and leave negative prompts empty.
    - We continue generation with new positive prompts from blip_at_step.

    xebemacozydyqy
    Author
    Jan 6, 2024

    No, nothing else is needed, at step 20 (or whichever you choose) the VAE decodes the latent to send to BLIP, and CLIP encodes the BLIP text response into a prompt.

    xebemacozydyqy
    Author
    Jan 6, 2024· 1 reaction

    @hellnet Yeah, that's right

    kubilayanJan 6, 2024

    Thank you for your answers.

    scrdestJan 6, 2024
    CivitAI

    I do understand the desc, but I don't quite see what's the motivation behind this approach.

    Speeding the generation up because we no longer have to deal with the negative prompt? Just experimental?

    xebemacozydyqy
    Author
    Jan 6, 2024· 1 reaction

    I don't think the negative is important in the later steps because the basic composition is already formed, but we can discuss that, of course

    UberlordFeb 17, 2024
    CivitAI

    Do you have a repo somewhere for this?

    I like the idea in general and I am trying to understand the code.

    What I do not understand at the moment is why not only replace the condition with the one from BLIP during sampling, why also patch the model with cfg_function?

    In any case, thanks for sharing this tool here!

    xebemacozydyqy
    Author
    Feb 18, 2024

    No repo.

    I don't know, I just felt like it for no reason.

    Other
    Other

    Details

    Downloads
    205
    Platform
    CivitAI
    Platform Status
    Available
    Created
    1/6/2024
    Updated
    6/23/2026
    Deleted
    -

    Files

    comfyui_blipattentionksample.zip

    Mirrors

    comfyui_blipattentionksample.zip

    Mirrors