stable-diffusion-webui-forge icon indicating copy to clipboard operation
stable-diffusion-webui-forge copied to clipboard

how to fix this?

Open hoodady opened this issue 1 year ago • 1 comments

VAE dtype preferences: [torch.bfloat16, torch.float32] -> torch.bfloat16 CUDA Using Stream: False Using pytorch cross attention Using pytorch attention for VAE *** Error loading script: postprocessing_focal_crop.py Traceback (most recent call last): File "Z:\webui_forge_cu121_torch231\webui\modules\scripts.py", line 525, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "Z:\webui_forge_cu121_torch231\webui\modules\script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "Z:\webui_forge_cu121_torch231\webui\scripts\postprocessing_focal_crop.py", line 5, in from modules.textual_inversion import autocrop ImportError: cannot import name 'autocrop' from 'modules.textual_inversion' (unknown location)

hoodady avatar Aug 25 '24 10:08 hoodady

This script postprocessing_focal_crop.py isn't currently part of the Forge2 install, maybe it's a relic after upgrading or you manually copied it over. It's trying to load another module autocrop, which also isn't part of the current install (that's the error you're seeing). Restoring that module leads to another error, which is a simple one-line fix. So, I've PR'd it.

DenOfEquity avatar Aug 25 '24 12:08 DenOfEquity

PR merged.

DenOfEquity avatar Aug 26 '24 15:08 DenOfEquity