ValueError: `.to` is not supported for `4-bit` or `8-bit` bitsandbytes models.

#7
by loong - opened

pipeline.enable_model_cpu_offload()
29
30 prompt = "A whimsical and creative image depicting a hybrid creature that is a mix of a waffle and a hippopotamus, basking in a river of melted butter amidst a breakfast-themed landscape. It features the distinctive, bulky body shape of a hippo. However, instead of the usual grey skin, the creature's body resembles a golden-brown, crispy waffle fresh off the griddle. The skin is textured with the familiar grid pattern of a waffle, each square filled with a glistening sheen of syrup. The environment combines the natural habitat of a hippo with elements of a breakfast table setting, a river of warm, melted butter, with oversized utensils or plates peeking out from the lush, pancake-like foliage in the background, a towering pepper mill standing in for a tree. As the sun rises in this fantastical world, it casts a warm, buttery glow over the scene. The creature, content in its butter river, lets out a yawn. Nearby, a flock of birds take flight"

2 frames
/usr/local/lib/python3.10/dist-packages/transformers/modeling_utils.py in to(self, *args, **kwargs)
2881 # Checks if the model has been loaded in 8-bit
2882 if getattr(self, "quantization_method", None) == QuantizationMethod.BITS_AND_BYTES:
-> 2883 raise ValueError(
2884 ".to is not supported for 4-bit or 8-bit bitsandbytes models. Please use the model as it is, since the"
2885 " model has already been set to the correct devices and casted to the correct dtype."

ValueError: .to is not supported for 4-bit or 8-bit bitsandbytes models. Please use the model as it is, since the model has already been set to the correct devices and casted to the correct dtype.

Sign up or log in to comment