Update ming image repo to new one
This commit is contained in:
1 parent
460c29ba9c
commit
cbc6bbdd70
5 files changed
+20
-13
No files matched your search
@@ -41,7 +41,7 @@ from toolkit.samplers.custom_flowmatch_sampler import (
|
||||
CustomFlowMatchEulerDiscreteScheduler,
|
||||
)
|
||||
|
||||
from .src.checkpoints import BASE_REPO, COMFY_REPO
|
||||
from .src.checkpoints import BASE_REPO, COMFY_REPO, canonical_repo
|
||||
from .src.pipeline import (
|
||||
PIXELS_PER_TOKEN,
|
||||
VAE_SCALE_FACTOR,
|
||||
@@ -134,8 +134,8 @@ class MingImageModel(BaseModel):
|
||||
def load_model(self):
|
||||
dtype = self.torch_dtype
|
||||
self.print_and_status_update("Loading Ming-Image model")
|
||||
model_path = self.model_config.name_or_path
|
||||
extras_path = self.model_config.extras_name_or_path
|
||||
model_path = canonical_repo(self.model_config.name_or_path)
|
||||
extras_path = canonical_repo(self.model_config.extras_name_or_path)
|
||||
if extras_path == model_path and model_path.endswith(".safetensors"):
|
||||
# a single transformer file (a fine-tune): the rest comes from
|
||||
# the repack
|
||||
|
||||
@@ -7,13 +7,15 @@ models folder win over the download. Anything else in `name_or_path` (the
|
||||
vendor repo, a local checkpoint, a fine-tune) loads exactly what it names,
|
||||
local comfy files or not. BASE_REPO is the vendor's diffusers-layout
|
||||
checkpoint; its configs, tokenizer, image processor and (until the repack
|
||||
carries one) the vision tower are used with the repack. The repack tracks a
|
||||
work-in-progress ComfyUI PR and is expected to move: change COMFY_REPO and the
|
||||
UI default together.
|
||||
carries one) the vision tower are used with the repack. The repack started
|
||||
life under Kijai's account while its ComfyUI PR was in progress; that id is
|
||||
rewritten to the Comfy-Org one (same files) so older configs keep working.
|
||||
"""
|
||||
|
||||
BASE_REPO = "inclusionAI/Ming-Image-0.1-Design"
|
||||
COMFY_REPO = "Kijai/Ming-Image-ComfyUI"
|
||||
COMFY_REPO = "Comfy-Org/Ming-Image"
|
||||
# earlier home of the same files
|
||||
LEGACY_COMFY_REPOS = {"Kijai/Ming-Image-ComfyUI": COMFY_REPO}
|
||||
|
||||
# repo-relative comfy files per component; the resolver orders them by the
|
||||
# requested qtype (convrot8 -> the int8 file, anything else -> bf16)
|
||||
@@ -28,7 +30,12 @@ COMFY_TEXT_ENCODER_FILES = [
|
||||
COMFY_VAE_FILES = ["vae/ming_image_vae_bf16.safetensors"]
|
||||
|
||||
|
||||
def canonical_repo(name_or_path: str) -> str:
|
||||
"""The current id for a repack that has moved; anything else unchanged."""
|
||||
return LEGACY_COMFY_REPOS.get(name_or_path, name_or_path)
|
||||
|
||||
|
||||
def comfy_weight_names(files):
|
||||
"""OstrisModelMixin candidate map: only the repack id resolves to these
|
||||
files; every other name_or_path loads what it names."""
|
||||
return {COMFY_REPO: list(files)}
|
||||
"""OstrisModelMixin candidate map: only the repack id (current or legacy)
|
||||
resolves to these files; every other name_or_path loads what it names."""
|
||||
return {repo: list(files) for repo in (COMFY_REPO, *LEGACY_COMFY_REPOS)}
|
||||
@@ -629,7 +629,7 @@ export const AI_TOOLKIT_UI_MODELS: ModelArch[] = [
|
||||
// the ComfyUI repack (local copies in the comfy models folder win over
|
||||
// the download); the vendor repo or a fine-tune here loads as named
|
||||
"config.process[0].model.name_or_path": [
|
||||
"Kijai/Ming-Image-ComfyUI",
|
||||
"Comfy-Org/Ming-Image",
|
||||
defaultNameOrPath,
|
||||
],
|
||||
"config.process[0].model.quantize": [true, false],
|
||||
|
||||
@@ -187,7 +187,7 @@ MODEL_TESTS = {
|
||||
},
|
||||
"ming_image": {
|
||||
"model": {
|
||||
"name_or_path": "Kijai/Ming-Image-ComfyUI",
|
||||
"name_or_path": "Comfy-Org/Ming-Image",
|
||||
"quantize": True,
|
||||
"quantize_te": True,
|
||||
# the repack's int8 convrot files attach as-is at convrot8
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
VERSION = "0.13.21"
|
||||
VERSION = "0.13.22"
|
||||
Reference in new issue
Block a user