mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-02-21 07:13:56 +00:00
i
This commit is contained in:
17
modules_forge/forge_util.py
Normal file
17
modules_forge/forge_util.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from ldm_patched.modules.conds import CONDRegular, CONDCrossAttn
|
||||
|
||||
|
||||
def cond_from_a1111_to_patched_ldm(cond):
|
||||
cross_attn = cond['crossattn']
|
||||
pooled_output = cond['vector']
|
||||
|
||||
result = dict(
|
||||
cross_attn=cross_attn,
|
||||
pooled_output=pooled_output,
|
||||
model_conds=dict(
|
||||
c_crossattn=CONDCrossAttn(cross_attn),
|
||||
y=CONDRegular(pooled_output)
|
||||
)
|
||||
)
|
||||
|
||||
return [result, ]
|
||||
Reference in New Issue
Block a user