Skip to content

Commit

Permalink
preenable kolors
Browse files Browse the repository at this point in the history
  • Loading branch information
vladmandic committed Jul 10, 2024
1 parent 8e170f5 commit 112b1d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion html/reference.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
},

"Kwai Kolors": {
"path": "Kwai-Kolors/Kolors",
"path": "Kwai-Kolors/Kolors-diffusers",
"desc": "Kolors is a large-scale text-to-image generation model based on latent diffusion, developed by the Kuaishou Kolors team. Trained on billions of text-image pairs, Kolors exhibits significant advantages over both open-source and proprietary models in visual quality, complex semantic accuracy, and text rendering for both Chinese and English characters. Furthermore, Kolors supports both Chinese and English inputs",
"preview": "Kwai-Kolors.jpg",
"skip": true,
Expand Down
6 changes: 3 additions & 3 deletions modules/model_kolors.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
import diffusers


repo_id = 'Kwai-Kolors/Kolors'
repo_id = 'Kwai-Kolors/Kolors-diffusers'


def load_kolors(_checkpoint_info, diffusers_load_config={}):
from modules import shared, devices, modelloader
modelloader.hf_login()
from modules import shared, devices
diffusers_load_config['variant'] = "fp16"
if 'torch_dtype' not in diffusers_load_config:
diffusers_load_config['torch_dtype'] = torch.float16
Expand All @@ -23,5 +22,6 @@ def load_kolors(_checkpoint_info, diffusers_load_config={}):
cache_dir = shared.opts.diffusers_dir,
**diffusers_load_config,
)
pipe.vae.config.force_upcast = True
devices.torch_gc()
return pipe

0 comments on commit 112b1d8

Please sign in to comment.