hello people, I would like to ask what could cause this problem. everything be working and when I load a controlnet union sdxl it just doesn't work after I try to apply it, I tried many workflows online and all have the same issue. Any one would know what a possible solution for this?
I checked this in Change 'c_adm' to 'y' in ControlNet.get_control by Kosinkadink · Pull Request #1836 · comfyanonymous/ComfyUI but the whole y thing was not found.
thank you <3
Error occurred when executing KSampler - Stable Diffusion Art
KSampler 'NoneType' object has no attribute 'shape'
AttributeError: 'NoneType' object has no attribute 'shape'
AttributeError: 'NoneType' object has no attribute 'shape'
hey guys! I am new to comfyui! I am watching a tutorial on face swapping, when following the steps. I came across this error that is on the title when I try to run the image. I tried to restart comfyui but that didn't seem to work.
this is my workflow is that.From Python: Attribute Error - 'NoneType' object has no attribute 'something':
NoneType means that instead of an instance of whatever Class or Object you think you're working with, you've actually got None. That usually means that an assignment or function call up above failed or returned an unexpected result.
This means that there are probably some features (geometries) that are not valid. You may check your input layer using the Check validity algorithm available from the Processing Toolbox and then try again to run the Polygonize tool. It will allow you to repair any eventually invalid geometry.
If it still doesn't work, you may also try the Lines to polygon tool or the Convert lines to polygons SAGA tool, which are both available from the Processing Toolbox.
I had similar issue, and discovered that I had lines with a 'NULL' length. I identified these using the field calculator and calculating the $length field, then deleting all lines with a 'NULL' length.
After this the Polygonize tool worked.
Answering, because the community brought it back. Adding my two objects (cents).
The only reason you see that error is because you are trying to get information or perform operations on an object that doesn't exist in the first place. To check, try printing the object. Like, adding -
print img # such as this case
print contours # if you are working with contours and cant draw one
print frame # if you are working with videos and it doesn't show
gives you a None. That means you haven't read it properly. Either the image name you gave does not exist or the path to it is wrong. If you find such an error here's the quick things to do-
- Check the path or bring your image to the working directory
- Check the name you gave is right (including the extension- .jpg, .png etc)
- Put the entire code in a if statement with the object and the code to proceed if true
- Will add more if suggested in the comments.
First of all
python img.py AB.jpg
will not work as you expect (load AB.jpg from the current directory). The file to load is hardcoded in line 6 of the provided example: to work as intended, it should be something like this:
import sys
img = cv2.imread(sys.argv[1])
The error is returned because AB.jpg does not exist in the directory img.py is being run from (the current working directory), and there is no verification for a missing file before trying to read it.