fenneishi / Fooocus-ControlNet-SDXL

add more control to fooocus
GNU General Public License v3.0
242 stars 10 forks source link

PyraCanny + Depth throws an error #7

Closed prefetchgif closed 11 months ago

prefetchgif commented 11 months ago

Describe the problem

errors out when using ImagePrompt with two images: one set to PyraCanny, the other set to Depth. everything else is default.

Full Console Log

E:\ai\FooocusControl>.\python_embeded\python.exe -s Fooocus\entry_with_update.py --listen --port 7861 Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)] Fooocus version: 2.1.701 Total VRAM 24564 MB, total RAM 130930 MB Running on local URL: http://0.0.0.0:7861 Set vram state to: NORMAL_VRAM Device: cuda:0 NVIDIA GeForce RTX 4090 : native VAE dtype: torch.bfloat16 Using pytorch cross attention [Fooocus] Disabling smart memory model_type EPS adm 2560 Using pytorch attention in VAE Working with z of shape (1, 4, 32, 32) = 4096 dimensions. Using pytorch attention in VAE missing {'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids'} Refiner model loaded: E:\ai\FooocusControl\Fooocus\models\checkpoints\sd_xl_refiner_1.0_0.9vae.safetensors

To create a public link, set share=True in launch(). model_type EPS adm 2816 Using pytorch attention in VAE Working with z of shape (1, 4, 32, 32) = 4096 dimensions. Using pytorch attention in VAE missing {'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids', 'cond_stage_model.clip_l.logit_scale'} Base model loaded: E:\ai\FooocusControl\Fooocus\models\checkpoints\sd_xl_base_1.0_0.9vae.safetensors LoRAs loaded: [('sd_xl_offset_example-lora_1.0.safetensors', 0.5), ('None', 0.5), ('None', 0.5), ('None', 0.5), ('None', 0.5)] Fooocus Expansion engine loaded for cuda:0, use_fp16 = True. Requested to load SDXLClipModel Requested to load GPT2LMHeadModel Loading 2 new models [Fooocus Model Management] Moving model(s) has taken 0.81 seconds App started successful. Use the app with http://localhost:7861/ or 0.0.0.0:7861 [Parameters] Adaptive CFG = 7 [Parameters] Sharpness = 2 [Parameters] ADM Scale = 1.5 : 0.8 : 0.3 [Parameters] CFG = 7.0 [Fooocus] Downloading control models ... [Fooocus] Loading control models ... img_size [384, 512] E:\ai\FooocusControl\python_embeded\lib\site-packages\torch\functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ..\aten\src\ATen\native\TensorShape.cpp:3527.) return _VF.meshgrid(tensors, kwargs) # type: ignore[attr-defined] Params passed to Resize transform: width: 512 height: 384 resize_target: True keep_aspect_ratio: True ensure_multiple_of: 32 resize_method: minimal Traceback (most recent call last): File "E:\ai\FooocusControl\Fooocus\modules\async_worker.py", line 691, in worker handler(task) File "E:\ai\FooocusControl\python_embeded\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, *kwargs) File "E:\ai\FooocusControl\python_embeded\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(args, kwargs) File "E:\ai\FooocusControl\Fooocus\modules\async_worker.py", line 237, in handler pipeline.refresh_controlnets( File "E:\ai\FooocusControl\python_embeded\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, kwargs) File "E:\ai\FooocusControl\python_embeded\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, *kwargs) File "E:\ai\FooocusControl\Fooocus\modules\default_pipeline.py", line 65, in refresh_controlnets cache = {get_1st_path(get_paths(ms)): cache_loader(l, ms) for l, ms in loaders.items()} File "E:\ai\FooocusControl\Fooocus\modules\default_pipeline.py", line 65, in cache = {get_1st_path(get_paths(ms)): cache_loader(l, ms) for l, ms in loaders.items()} File "E:\ai\FooocusControl\Fooocus\modules\default_pipeline.py", line 57, in cache_loader return loader(path_1st if 1 == len(paths) else paths) if not path_1st in loaded_ControlNets else \ File "E:\ai\FooocusControl\python_embeded\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(args, kwargs) File "E:\ai\FooocusControl\python_embeded\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "E:\ai\FooocusControl\Fooocus\modules\core.py", line 58, in load_controlnet return fcbh.controlnet.load_controlnet(ckpt_filename) File "E:\ai\FooocusControl\Fooocus\backend\headless\fcbh\controlnet.py", line 289, in load_controlnet controlnet_data = fcbh.utils.load_torch_file(ckpt_path, safe_load=True) File "E:\ai\FooocusControl\Fooocus\backend\headless\fcbh\utils.py", line 12, in load_torch_file if ckpt.lower().endswith(".safetensors"): AttributeError: 'list' object has no attribute 'lower' Total time: 6.60 seconds

fenneishi commented 11 months ago

This is a bug and is being fixed

fenneishi commented 11 months ago

replace default_pipeline.py image

prefetchgif commented 11 months ago

that fixed it. thank you!