sd-webui-controlnet icon indicating copy to clipboard operation
sd-webui-controlnet copied to clipboard

[Bug]: Errors when generating with Style Adapter (and color Adapter)

Open trendland opened this issue 1 year ago • 13 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits of both this extension and the webui

What happened?

Trying to do a style transfer with Model checkpoint SD 1.5 They are both loading about 50% and then these two errors :/ Any help would be great as I would really like to try these style transfers

ControlNet 0: Preprocessor: Canny -- Model: control canny ControlNet 1: Preprocessor: Clip_vision -- Model: T2iadapter_style_sd14V1

RuntimeError: !(has_different_input_dtypes && !config.promote_inputs_to_common_dtype_ && (has_undefined_outputs || config.enforce_safe_casting_to_output_ || config.cast_common_dtype_to_outputs_)) INTERNAL ASSERT FAILED at "/Users/runner/work/pytorch/pytorch/pytorch/aten/src/ATen/TensorIterator.cpp":407, please report a bug to PyTorch.

Error with Color Adapter

Controlnet 0: Preprocessor: Canny -- Model: control canny ControlNet 1: Preprocessor: Clip_vision -- Model: T2iadapter_color_sd14V1

RuntimeError: pixel_unshuffle expects height to be divisible by downscale_factor, but input.size(-2)=257 is not divisible by 8

Thank you!

Steps to reproduce the problem

ControlNet 0: Preprocessor: Canny -- Model: control canny ControlNet 1: Preprocessor: Clip_vision -- Model: T2iadapter_style_sd14V1

Start generating and then Error:

RuntimeError: !(has_different_input_dtypes && !config.promote_inputs_to_common_dtype_ && (has_undefined_outputs || config.enforce_safe_casting_to_output_ || config.cast_common_dtype_to_outputs_)) INTERNAL ASSERT FAILED at "/Users/runner/work/pytorch/pytorch/pytorch/aten/src/ATen/TensorIterator.cpp":407, please report a bug to PyTorch.

What should have happened?

Applied style transfer into Canny Image

Commit where the problem happens

webui: commit: [0cc0ee1b] controlnet: fed7a529

What browsers do you use to access the UI ?

Brave

Command Line Arguments

COMMANDLINE_ARGS="--skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate --api --disable-safe-unpickle"

(On a Mac)

Console logs

RuntimeError: !(has_different_input_dtypes && !config.promote_inputs_to_common_dtype_ && (has_undefined_outputs || config.enforce_safe_casting_to_output_ || config.cast_common_dtype_to_outputs_)) INTERNAL ASSERT FAILED at "/Users/runner/work/pytorch/pytorch/pytorch/aten/src/ATen/TensorIterator.cpp":407, please report a bug to PyTorch.

Additional information

No response

trendland avatar Mar 07 '23 14:03 trendland

Maybe related: https://github.com/Mikubill/sd-webui-controlnet/issues/354

Mikubill avatar Mar 07 '23 14:03 Mikubill

unfortunately not related - Ive tried with Safari and it gives the same error for both Style Adapters

trendland avatar Mar 07 '23 19:03 trendland

I have the exact same error. Also running a Mac.

RADesigner avatar Mar 07 '23 20:03 RADesigner

Same here, also Mac

ptppan avatar Mar 07 '23 20:03 ptppan

Also on Mac getting errors when trying to use the new color and style adapters. I wonder if this is because Apple silicon doesn't support xformers? Or perhaps it's related to pytorch?

orfeaus avatar Mar 08 '23 09:03 orfeaus

Also on Mac getting errors when trying to use the new color and style adapters. I wonder if this is because Apple silicon doesn't support xformers? Or perhaps it's related to pytorch?

I dont know but I would really like to try these new styles - Ive tried to update to Pytorch 13 and it's all up to date on my machine but for some reasons SD is still telling me that I have the 12.1 version - Maybe related ?

let's just hope it gets fixed and we can use it soon

trendland avatar Mar 08 '23 12:03 trendland

An error here too. Macbook Pro M1 14"

edgardmello avatar Mar 08 '23 22:03 edgardmello

Also on Mac getting errors when trying to use the new color and style adapters. I wonder if this is because Apple silicon doesn't support xformers? Or perhaps it's related to pytorch?

I dont know but I would really like to try these new styles - Ive tried to update to Pytorch 13 and it's all up to date on my machine but for some reasons SD is still telling me that I have the 12.1 version - Maybe related ?

let's just hope it gets fixed and we can use it soon

I also cannot get SD to show 13, it always says I have 12.1

RADesigner avatar Mar 09 '23 07:03 RADesigner

macos support is limited to controlnet. cc: @brkirch (but he may be inactive) you could make a feature request for cpu only option for clip_vision preprocessor

ClashSAN avatar Mar 09 '23 23:03 ClashSAN

Is there any way around this? I'm getting the same error with M1 max.

gcohen-dev avatar Mar 11 '23 20:03 gcohen-dev

Same error here. Seems like this is quite common, possibly all M-series processors.

ingling avatar Mar 18 '23 21:03 ingling

Same error here. Seems like this is quite common, possibly all M-series processors.

Not only M-series, I think here it is related to all Mac - Still having issues with Style & color adapters, it is just not working. And ive tried on multiple browsers, with multiple python versions and arguments...

I guess they will work on it, but it seems they don't have Mac available for testing... Hopefully it will be fixed soon as I would really like to use these with my controlnet settings.

trendland avatar Mar 19 '23 10:03 trendland

Has anyone tried to use CPU instead of GPU as a param and see if it's working?

gcohen-dev avatar Mar 19 '23 13:03 gcohen-dev

getting same error on windows. nvidia card

WhoIsFishie avatar Jul 30 '23 03:07 WhoIsFishie

still get this error. Chrome on M1 Studio

jackhagley avatar Oct 22 '23 04:10 jackhagley