Closed INTstinkt closed 4 months ago
Hey @INTstinkt! Great to see you again around here. Running into a bit of a snag, I see? Let's take a closer look together.
Thank you for providing detailed information about the issue you're encountering. The error message you're seeing, "expected mat1 and mat2 to have the same dtype, but got: float != struct c10::Half", typically occurs when there's a mismatch in the data types of tensors being operated on in PyTorch.
Given that the error is occurring within the !adetailer.py
script, it's likely that the mismatch is happening during a matrix multiplication or a similar operation within the model or processing pipeline. However, without the specific lines of code where the error occurs, it's difficult to pinpoint the exact cause.
Here are a few suggestions to resolve this issue:
Ensure Consistent Tensor Data Types: Before performing operations on tensors, ensure they are of the same data type. You can convert a tensor to a different data type using the .to()
method. For example, if you have a tensor a
of dtype float32
and want to convert it to float16
, you can use a.to(torch.float16)
.
Check Model and Input Data Types: Verify that the model and all input tensors are using compatible data types. If the model is expected to work with float16
tensors for efficiency, ensure that all inputs are converted to float16
before passing them to the model.
Automatic Mixed Precision (AMP): If you are using PyTorch and performing operations that could benefit from mixed precision (using both float16
and float32
for different parts of the computation to balance speed and accuracy), consider using PyTorch's Automatic Mixed Precision (AMP) to handle data type conversions automatically. This can be particularly useful when working with models that are sensitive to data types.
Unfortunately, I wasn't able to find the specific function or method in the !adetailer.py
script where the error is being thrown, nor any known issues with the torch
or torchvision
versions used that could cause this data type mismatch error.
If you're comfortable with it, you could try debugging the !adetailer.py
script to find the exact location where the error occurs. This would involve running the script in a Python debugger and stepping through the code until the error is thrown. Once you've found the location, you can check the data types of the tensors being operated on and make the necessary adjustments.
If you need further assistance, please provide more information about the specific lines of code where the error occurs. This will help in providing a more accurate solution.
At least, just generating an image doesn't cause this error. You don't give the full console logs, nor do you give any information about the extensions you installed, so there's nothing I can investigate.
Describe the bug
If i try to use ADetailer in A1111 i get this error
Steps to reproduce
Activate Adetailer, generate picture
Screenshots
No response
Console logs, from start to end.
List of installed extensions
No response