Using math without importing math
https://github.com/comfyanonymous/ComfyUI/blob/66d35c07ce44b07011314ad7a28b2bdbcbb4e4cc/comfy/ldm/models/autoencoder.py#L184
Are you sure it's not getting referenced in one of the imports or anything the imports import? Are you seeing any errors in the output log when using it(like if the max batch size isn't equal to None, to run the Else code that contains the math.ceil)? Does anything even use that AutoencodingEngineLegacy class?
Are you sure it's not getting referenced in one of the imports or anything the imports import? Are you seeing any errors in the output log when using it(like if the max batch size isn't equal to None, to run the Else code that contains the math.ceil)? Does anything even use that AutoencodingEngineLegacy class?
First, the IDE is unable to identify indirect imports. Regardless of whether it's an indirect import or not, I think it's desirable to use direct imports to prevent potential errors.
Well I searched for "import math" and saw that pretty much anything that use or interact with the class, seems to import math already. For instance, it's in nodes.py, which I'm pretty sure will ALWAYS be used.
But yeah, it probably should just be included in that specific file.