twodgirl / Kolors-unet-optimum-quant-float8

huggingface.co
Total runs: 0
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: August 07 2024
text-to-image

Introduction of Kolors-unet-optimum-quant-float8

Model Details of Kolors-unet-optimum-quant-float8

Kolors Quant

Run the Kolors model with 11GB VRAM.

Download

Download the chatglm3-8bit.safetensors from Kijai .

You should have:

kolors-fp8
chatglm3-8bit.safetensors
Setup
pip install accelerate diffusers transformers optimum-quanto sentencepiece
Inference
from diffusers import AutoencoderKL, DDPMScheduler, KolorsPipeline, UNet2DConditionModel
from diffusers.pipelines.kolors.text_encoder import ChatGLMConfig, ChatGLMModel
import json
from optimum.quanto.models import QuantizedDiffusersModel
from text_encoder.quantization import quantize
from safetensors.torch import load_model
import torch

class KolorsUNet2DConditionModel(QuantizedDiffusersModel):
    base_class = UNet2DConditionModel

wrapped_unet = KolorsUNet2DConditionModel.from_pretrained('./kolors-fp8')
# You can make a copy of the Kolors-diffusers/text_encoder folder.
# with open('./text_encoder/config.json') as encoder_f:
#     encoder_config = json.load(encoder_f)
# encoder_config = ChatGLMConfig.from_dict(encoder_config)
# text_encoder = ChatGLMModel(encoder_config)
# quantize(text_encoder.encoder, 8)
# load_model(text_encoder, './chatglm3-8bit.safetensors')
pipe = KolorsPipeline.from_pretrained('Kwai-Kolors/Kolors-diffusers',
                                      unet=wrapped_unet._wrapped.to(dtype=torch.float16),
                                      # text_encoder=text_encoder,
                                      torch_dtype=torch.float16).to('cuda')
image = pipe('cat playing piano', num_inference_steps=20).images[0]
image.save('cat.png')
Disclaimer

Use of this code and the copy of documentation requires citation and attribution to the author via a link to their Hugging Face profile in all resulting work.

Runs of twodgirl Kolors-unet-optimum-quant-float8 on huggingface.co

0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About Kolors-unet-optimum-quant-float8 huggingface.co Model

More Kolors-unet-optimum-quant-float8 license Visit here:

https://choosealicense.com/licenses/apache-2.0

Kolors-unet-optimum-quant-float8 huggingface.co

Kolors-unet-optimum-quant-float8 huggingface.co is an AI model on huggingface.co that provides Kolors-unet-optimum-quant-float8's model effect (), which can be used instantly with this twodgirl Kolors-unet-optimum-quant-float8 model. huggingface.co supports a free trial of the Kolors-unet-optimum-quant-float8 model, and also provides paid use of the Kolors-unet-optimum-quant-float8. Support call Kolors-unet-optimum-quant-float8 model through api, including Node.js, Python, http.

Kolors-unet-optimum-quant-float8 huggingface.co Url

https://huggingface.co/twodgirl/Kolors-unet-optimum-quant-float8

twodgirl Kolors-unet-optimum-quant-float8 online free

Kolors-unet-optimum-quant-float8 huggingface.co is an online trial and call api platform, which integrates Kolors-unet-optimum-quant-float8's modeling effects, including api services, and provides a free online trial of Kolors-unet-optimum-quant-float8, you can try Kolors-unet-optimum-quant-float8 online for free by clicking the link below.

twodgirl Kolors-unet-optimum-quant-float8 online free url in huggingface.co:

https://huggingface.co/twodgirl/Kolors-unet-optimum-quant-float8

Kolors-unet-optimum-quant-float8 install

Kolors-unet-optimum-quant-float8 is an open source model from GitHub that offers a free installation service, and any user can find Kolors-unet-optimum-quant-float8 on GitHub to install. At the same time, huggingface.co provides the effect of Kolors-unet-optimum-quant-float8 install, users can directly use Kolors-unet-optimum-quant-float8 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

Kolors-unet-optimum-quant-float8 install url in huggingface.co:

https://huggingface.co/twodgirl/Kolors-unet-optimum-quant-float8

Url of Kolors-unet-optimum-quant-float8

Kolors-unet-optimum-quant-float8 huggingface.co Url

Provider of Kolors-unet-optimum-quant-float8 huggingface.co

twodgirl
ORGANIZATIONS

Other API from twodgirl

huggingface.co

Total runs: 7
Run Growth: 0
Growth Rate: 0.00%
Updated:September 27 2024
huggingface.co

Total runs: 1
Run Growth: 0
Growth Rate: 0.00%
Updated:August 18 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:December 13 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 07 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:April 21 2024