fix DPO LoRA loading in tests

This commit is contained in:
Pierre Chapuis 2024-03-05 15:14:34 +01:00
parent ed8ec26e63
commit c383ff6cf4
2 changed files with 2 additions and 1 deletions

View file

@ -1395,7 +1395,8 @@ def test_diffusion_sdxl_lora(
prompt = "professional portrait photo of a girl, photograph, highly detailed face, depth of field, moody light, golden hour, style by Dan Winters, Russell James, Steve McCurry, centered, extremely detailed, Nikon D850, award winning photography" prompt = "professional portrait photo of a girl, photograph, highly detailed face, depth of field, moody light, golden hour, style by Dan Winters, Russell James, Steve McCurry, centered, extremely detailed, Nikon D850, award winning photography"
negative_prompt = "3d render, cartoon, drawing, art, low light, blur, pixelated, low resolution, black and white" negative_prompt = "3d render, cartoon, drawing, art, low light, blur, pixelated, low resolution, black and white"
SDLoraManager(sdxl).add_loras("dpo", lora_weights, scale=lora_scale) manager = SDLoraManager(sdxl, unet_inclusions=["CrossAttentionBlock"])
manager.add_loras("dpo", lora_weights, scale=lora_scale)
clip_text_embedding, pooled_text_embedding = sdxl.compute_clip_text_embedding( clip_text_embedding, pooled_text_embedding = sdxl.compute_clip_text_embedding(
text=prompt, negative_text=negative_prompt text=prompt, negative_text=negative_prompt

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB