This commit is contained in:
lllyasviel
2024-01-27 22:44:49 -08:00
parent 424b225fb3
commit b45c68fe3e
3 changed files with 8 additions and 3 deletions

View File

@@ -54,6 +54,7 @@ def cond_from_a1111_to_patched_ldm_weighted(cond, weights):
def forge_sample(self, denoiser_params, cond_scale, cond_composition):
model = self.inner_model.inner_model.forge_objects.unet.model
control = self.inner_model.inner_model.forge_objects.unet.controlnet_linked_list
x = denoiser_params.x
timestep = denoiser_params.sigma
uncond = cond_from_a1111_to_patched_ldm(denoiser_params.text_uncond)
@@ -69,6 +70,10 @@ def forge_sample(self, denoiser_params, cond_scale, cond_composition):
uncond[0]['model_conds']['c_concat'] = CONDRegular(image_cond_in)
cond[0]['model_conds']['c_concat'] = CONDRegular(image_cond_in)
if control is not None:
for h in cond + uncond:
h['control'] = control
denoised = sampling_function(model, x, timestep, uncond, cond, cond_scale, model_options, seed)
return denoised