AI Image Created By Flux AI Image Generator

Describe the bug  
What error message is this, but it won't cause the task to fail, it will only keep printing, thank you.  

Reproduction  
import torch  
from diffusers import StableDiffusionXLPipeline  
from diffusers.image_processor import IPAdapterMaskProcessor  
from diffusers.utils import load_image  
from transformers import CLIPVisionModelWithProjection  

image_encoder = CLIPVisionModelWithProjection.from_pretrained(  
"./repository/h94-IP-Adapter",  
subfolder="models/image_encoder",  
torch_dtype=torch.float16  
)  
pipeline = StableDiffusionXLPipeline.from_pretrained("./repository/stable-diffusion-xl-base-1.0",  
image_encoder=image_encoder,  
torch_dtype=torch.float16,  
use_safetensors=True,  
).to("cuda")  
pipeline.enable_model_cpu_offload()  

pipeline.load_ip_adapter("./repository/h94-IP-Adapter", subfolder="sdxl_models",  
weight_name=["ip-adapter-plus-face_sdxl_vit-h.safetensors"] * 2)  
pipeline.set_ip_adapter_scale([0.6] * 2)  
generator = torch.Generator(device="cpu").manual_seed(4)  
mask1 = load_image(  
"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/ip_mask_mask1.png")  
mask2 = load_image(  
"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/ip_mask_mask2.png")  
output_height = 1024  
output_width = 1024  
processor = IPAdapterMaskProcessor()  
masks = processor.preprocess([mask1, mask2, ])  
face_image1 = load_image(  
"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/ip_mask_girl1.png")  
face_image2 = load_image(  
"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/ip_mask_girl2.png")  
ip_images = [[face_image1], [face_image2]]  
image = pipeline(  
prompt="2 girls",  
ip_adapter_image=ip_images,  
negative_prompt="monochrome, lowres, bad anatomy, worst quality, low quality",  
num_inference_steps=20,  
num_images_per_prompt=1,  
generator=generator,  
cross_attention_kwargs={"ip_adapter_masks": masks}  
).images[0]  
image.save("test.png")  

Logs  
cross_attention_kwargs ['ip_adapter_masks'] are not expected by AttnProcessor2_0 and will be ignored.  
cross_attention_kwargs ['ip_adapter_masks'] are not expected by AttnProcessor2_0 and will be ignored.  
cross_attention_kwargs ['ip_adapter_masks'] are not expected by AttnProcessor2_0 and will be ignored.  
cross_attention_kwargs ['ip_adapter_masks'] are not expected by AttnProcessor2_0 and will be ignored.  
cross_attention_kwargs ['ip_adapter_masks'] are not expected by AttnProcessor2_0 and will be ignored.  
cross_attention_kwargs ['ip_adapter_masks'] are not expected by AttnProcessor2_0 and will be ignored.  
cross_attention_kwargs ['ip_adapter_masks'] are not expected by AttnProcessor2_0 and will be ignored.  
cross_attention_kwargs ['ip_adapter_masks'] are not expected by AttnProcessor2_0 and will be ignored.  
System Info  
diffusers 0.27.2 python 3.10 windows  

Who can help?  
No response. - Image

Prompt

Describe the bug What error message is this, but it won't cause the task to fail, it will only keep printing, thank you. Reproduction import torch from diffusers import StableDiffusionXLPipeline from diffusers.image_processor import IPAdapterMaskProcessor from diffusers.utils import load_image from transformers import CLIPVisionModelWithProjection image_encoder = CLIPVisionModelWithProjection.from_pretrained( "./repository/h94-IP-Adapter", subfolder="models/image_encoder", torch_dtype=torch.float16 ) pipeline = StableDiffusionXLPipeline.from_pretrained("./repository/stable-diffusion-xl-base-1.0", image_encoder=image_encoder, torch_dtype=torch.float16, use_safetensors=True, ).to("cuda") pipeline.enable_model_cpu_offload() pipeline.load_ip_adapter("./repository/h94-IP-Adapter", subfolder="sdxl_models", weight_name=["ip-adapter-plus-face_sdxl_vit-h.safetensors"] * 2) pipeline.set_ip_adapter_scale([0.6] * 2) generator = torch.Generator(device="cpu").manual_seed(4) mask1 = load_image( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/ip_mask_mask1.png") mask2 = load_image( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/ip_mask_mask2.png") output_height = 1024 output_width = 1024 processor = IPAdapterMaskProcessor() masks = processor.preprocess([mask1, mask2, ]) face_image1 = load_image( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/ip_mask_girl1.png") face_image2 = load_image( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/ip_mask_girl2.png") ip_images = [[face_image1], [face_image2]] image = pipeline( prompt="2 girls", ip_adapter_image=ip_images, negative_prompt="monochrome, lowres, bad anatomy, worst quality, low quality", num_inference_steps=20, num_images_per_prompt=1, generator=generator, cross_attention_kwargs={"ip_adapter_masks": masks} ).images[0] image.save("test.png") Logs cross_attention_kwargs ['ip_adapter_masks'] are not expected by AttnProcessor2_0 and will be ignored. cross_attention_kwargs ['ip_adapter_masks'] are not expected by AttnProcessor2_0 and will be ignored. cross_attention_kwargs ['ip_adapter_masks'] are not expected by AttnProcessor2_0 and will be ignored. cross_attention_kwargs ['ip_adapter_masks'] are not expected by AttnProcessor2_0 and will be ignored. cross_attention_kwargs ['ip_adapter_masks'] are not expected by AttnProcessor2_0 and will be ignored. cross_attention_kwargs ['ip_adapter_masks'] are not expected by AttnProcessor2_0 and will be ignored. cross_attention_kwargs ['ip_adapter_masks'] are not expected by AttnProcessor2_0 and will be ignored. cross_attention_kwargs ['ip_adapter_masks'] are not expected by AttnProcessor2_0 and will be ignored. System Info diffusers 0.27.2 python 3.10 windows Who can help? No response.

Image Analysis

Emotional Analysis

Main Emotion:frustration
Overall Tone:
negative
Potential Reactions:
irritation
confusion
desire for resolution

Application Scenarios

Debugging Stable Diffusion

Description: User debugging a Stable Diffusion pipeline with potential issues.

Potential Use: Identifying bugs in the implementation of the image processing pipeline.

Model Compatibility Enhancement

Description: Developers working on improvements for model compatibility.

Potential Use: Updating model processors to ensure additional parameters are accepted.

ML Framework Training

Description: Training workshops for machine learning frameworks.

Potential Use: Teaching users how to address common errors and warnings.

Documentation Improvement

Description: Documentation updates for model parameters and processor capabilities.

Potential Use: Providing clearer guidelines for expected input parameters in projects.

Technical Analysis

Quality Assessment: The generation quality is decent but lacks clarity in error descriptions.

Technical Highlights:
  • Use of advanced image processing techniques.
  • Ability to load and preprocess images effectively.
  • Integration of multiple models within the image generation pipeline.
Areas for Improvement:
  • Enhance the error message clarity.
  • Add support for additional input parameters in models.
  • Improve documentation regarding processor expectations.

Tags