mirror of
https://github.com/vladmandic/automatic
synced 2026-09-17 08:19:11 +02:00
@@ -155,7 +155,6 @@ class StableDiffusionXLPuLIDPipeline:
|
||||
state_dict_dict[module][new_k] = v
|
||||
|
||||
for module in state_dict_dict:
|
||||
print(f'loading from {module}')
|
||||
getattr(self, module).load_state_dict(state_dict_dict[module], strict=True)
|
||||
|
||||
def to_gray(self, img):
|
||||
@@ -200,7 +199,6 @@ class StableDiffusionXLPuLIDPipeline:
|
||||
align_face = self.face_helper.cropped_faces[0]
|
||||
# incase insightface didn't detect face
|
||||
if id_ante_embedding is None:
|
||||
print('fail to detect face using insightface, extract embedding on align face')
|
||||
id_ante_embedding = self.handler_ante.get_feat(align_face)
|
||||
|
||||
id_ante_embedding = torch.from_numpy(id_ante_embedding).to(self.device)
|
||||
|
||||
@@ -191,9 +191,6 @@ class Script(scripts.Script):
|
||||
p.task_args['id_embedding'] = id_embedding
|
||||
p.task_args['uncond_id_embedding'] = uncond_id_embedding
|
||||
p.task_args['id_scale'] = strength
|
||||
if len(getattr(p, 'init_images', [])) > 0:
|
||||
p.task_args['image'] = p.init_images[0]
|
||||
p.task_args['strength'] = p.denoising_strength
|
||||
p.extra_generation_params["PuLID"] = f'Strength={strength} Zero={zero} Ortho={ortho}'
|
||||
p.extra_generation_params["Sampler"] = sampler
|
||||
if getattr(p, 'xyz', False): # xyz will run its own processing
|
||||
|
||||
Reference in New Issue
Block a user