mirror of
https://github.com/vladmandic/sdnext.git
synced 2026-10-12 02:24:13 +00:00
fix hf telemetry and add prxpixel
Signed-off-by: Vladimir Mandic <[email protected]>
This commit is contained in:
@@ -179,9 +179,9 @@ Add only what the model actually needs.
|
||||
|
||||
Reference catalog touchpoints are also required for model ports intended to appear in SD.Next model references.
|
||||
|
||||
- `data/reference.json` for `base`
|
||||
- `data/reference-base.json` for `base`
|
||||
- `data/reference-cloud.json` for `cloud`
|
||||
- `data/reference-quant.json` for `quant`
|
||||
- `data/reference-quantized.json` for `quant`
|
||||
- `data/reference-distilled.json` for `distilled`
|
||||
- `data/reference-nunchaku.json` for `nunchaku`
|
||||
- `data/reference-community.json` for `community`
|
||||
|
||||
@@ -21,9 +21,9 @@ Use this skill to audit and update SD.Next model reference catalogs using a phas
|
||||
|
||||
## Catalog Files In Scope
|
||||
|
||||
- `data/reference.json` (base)
|
||||
- `data/reference-base.json` (base)
|
||||
- `data/reference-cloud.json`
|
||||
- `data/reference-quant.json`
|
||||
- `data/reference-quantized.json`
|
||||
- `data/reference-distilled.json`
|
||||
- `data/reference-nunchaku.json`
|
||||
- `data/reference-community.json`
|
||||
|
||||
@@ -16,6 +16,8 @@ And **SDNQ** improvements: now with *NPU* support and its own native *attention*
|
||||
- [Krea 2](https://www.krea.ai/blog/krea-2-image-model) in *base* and *turbo* (distilled) variants
|
||||
both *base* and *turbo* are available in both full *bf16* and *sdnq* pre-quantized variants
|
||||
K2 is a 12.9B single-stream flow-matching DiT and using a Qwen3-VL-4B text encoder
|
||||
- [Photoroom PRXPixel](https://huggingface.co/Photoroom/prxpixel-t2i) pixel-space PRX variant using a Qwen3-VL text encoder and flow-matching scheduler
|
||||
supports *direct RGB* generation without a VAE and uses a *1024px* default sample size
|
||||
- **Microsoft Lens** got unpublished, but we still got a mirror
|
||||
- **Features**
|
||||
- **SDNQ-Attention**
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
### Unassigned
|
||||
|
||||
- Implement [nvvfx](https://pypi.org/project/nvidia-vfx/)
|
||||
- Implement [pruna](https://github.com/PrunaAI/pruna)
|
||||
- Processing -> Video capabilities
|
||||
- `RIFE` in processing
|
||||
- `SeedVR2` in processing
|
||||
@@ -36,7 +38,6 @@
|
||||
|
||||
### OnHold
|
||||
|
||||
- Implement [pruna](https://github.com/PrunaAI/pruna), @vladmandic, pending support for transformers 5.5
|
||||
- LoRA add OMI format support for SD35/FLUX.1, on-hold
|
||||
- Remote Text-Encoder support, sidelined for the moment
|
||||
- Multi-user support
|
||||
|
||||
@@ -794,6 +794,12 @@
|
||||
"preview": "Photoroom--prx-1024-t2i-beta.jpg",
|
||||
"size": 20.7
|
||||
},
|
||||
"Photoroom PRXPixel": {
|
||||
"path": "Photoroom/prxpixel-t2i",
|
||||
"desc": "PRXPixel is a 7-billion-parameter pixel-space text-to-image model that denoises RGB images directly using a Qwen3-VL text encoder and flow-matching scheduler.",
|
||||
"preview": "Photoroom--prxpixel-t2i.jpg",
|
||||
"size": 25.0
|
||||
},
|
||||
"ZAI GLM-Image": {
|
||||
"path": "zai-org/GLM-Image",
|
||||
"preview": "zai-org--GLM-Image.jpg",
|
||||
|
||||
@@ -111,6 +111,8 @@ def get_model_type(pipe):
|
||||
model_type = 'nextstep'
|
||||
elif 'XOmni' in name or 'X-Omni' in name:
|
||||
model_type = 'x-omni'
|
||||
elif 'PRXPixel' in name or 'PRXPixelPipeline' in name:
|
||||
model_type = 'prxpixel'
|
||||
elif 'Photoroom' in name:
|
||||
model_type = 'prx'
|
||||
elif 'LongCat' in name:
|
||||
|
||||
@@ -141,6 +141,8 @@ def guess_by_name(fn, current_guess):
|
||||
new_guess = 'Stable Diffusion XL'
|
||||
elif 'stable-video-diffusion' in fn.lower():
|
||||
new_guess = 'StableVideoDiffusion'
|
||||
elif 'prx-pixel' in fn.lower() or 'prxpixel' in fn.lower():
|
||||
new_guess = 'PRXPixel'
|
||||
elif 'prx-' in fn.lower():
|
||||
new_guess = 'PRX'
|
||||
elif 'gemini-' in fn.lower() and 'image' in fn.lower():
|
||||
|
||||
@@ -8,6 +8,19 @@ orig_http_get = None
|
||||
orig_xet_get = None
|
||||
|
||||
|
||||
def clean_user_agent(headers):
|
||||
ua = headers.get('user-agent', None)
|
||||
if ua is None:
|
||||
return headers
|
||||
ua = ua.replace('unknown/None;', 'sdnext/0.0.0;')
|
||||
if 'quant_config' in ua:
|
||||
ua = ua.split('quant_config')[0]
|
||||
ua = ua.rstrip(' ;')
|
||||
# ua += '; telemetry/off'
|
||||
headers['user-agent'] = ua
|
||||
return headers
|
||||
|
||||
|
||||
def http_get_hijack(*args, **kwargs):
|
||||
from modules.shared import state, opts
|
||||
if len(args) > 0 and isinstance(args[0], str) and args[0].endswith(".json"):
|
||||
@@ -15,6 +28,8 @@ def http_get_hijack(*args, **kwargs):
|
||||
jobid = state.begin('Download')
|
||||
fn = kwargs.get("displayed_filename", None)
|
||||
size = kwargs.get("expected_size", None)
|
||||
if 'headers' in kwargs:
|
||||
kwargs['headers'] = clean_user_agent(kwargs['headers'])
|
||||
if fn and not fn.endswith(".json") and size is not None and size > 10240:
|
||||
log.debug(f'Download: type=http mode="{opts.hf_transfer_mode}" fn="{fn}" size={size}')
|
||||
debug(f'Download start: type=http args={args} kwargs={kwargs}')
|
||||
@@ -33,6 +48,8 @@ def xet_get_hijack(*args, **kwargs):
|
||||
jobid = state.begin('Download')
|
||||
fn = kwargs.get("displayed_filename", None)
|
||||
size = kwargs.get("expected_size", None)
|
||||
if 'headers' in kwargs:
|
||||
kwargs['headers'] = clean_user_agent(kwargs['headers'])
|
||||
if fn and not fn.endswith(".json"):
|
||||
log.debug(f'Download: type=xet mode="{opts.hf_transfer_mode}" fn="{fn}" size={size}')
|
||||
debug(f'Download start: type=xet args={args} kwargs={kwargs}')
|
||||
|
||||
@@ -524,7 +524,11 @@ def load_diffuser_force(detected_model_type: str, checkpoint_info: CheckpointInf
|
||||
from pipelines.model_google import load_nanobanana
|
||||
sd_model = load_nanobanana(checkpoint_info, diffusers_load_config)
|
||||
allow_post_quant = False
|
||||
elif model_type in ['PRX']:
|
||||
elif model_type == 'PRXPixel':
|
||||
from pipelines.model_prx_pixel import load_prx_pixel
|
||||
sd_model = load_prx_pixel(checkpoint_info, diffusers_load_config)
|
||||
allow_post_quant = False
|
||||
elif model_type == 'PRX':
|
||||
from pipelines.model_prx import load_prx
|
||||
sd_model = load_prx(checkpoint_info, diffusers_load_config)
|
||||
allow_post_quant = False
|
||||
|
||||
@@ -54,6 +54,7 @@ pipelines = {
|
||||
'OmniGen': getattr(diffusers, 'OmniGenPipeline', None),
|
||||
'PixArtAlpha': getattr(diffusers, 'PixArtAlphaPipeline', None),
|
||||
'PixArtSigma': getattr(diffusers, 'PixArtSigmaPipeline', None),
|
||||
'PRXPixel': getattr(diffusers, 'PRXPixelPipeline', None),
|
||||
'Qwen': getattr(diffusers, 'QwenImagePipeline', None),
|
||||
'Sana': getattr(diffusers, 'SanaPipeline', None),
|
||||
'WanAI': getattr(diffusers, 'WanPipeline', None),
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
import diffusers
|
||||
import transformers
|
||||
from modules import shared, devices, sd_models, model_quant, sd_hijack_te
|
||||
from modules.logger import log
|
||||
from pipelines import generic
|
||||
|
||||
|
||||
def load_prx_pixel(checkpoint_info, diffusers_load_config=None):
|
||||
if diffusers_load_config is None:
|
||||
diffusers_load_config = {}
|
||||
repo_id = sd_models.path_to_repo(checkpoint_info)
|
||||
sd_models.hf_auth_check(checkpoint_info)
|
||||
|
||||
load_args, _quant_args = model_quant.get_dit_args(diffusers_load_config, allow_quant=False)
|
||||
log.debug(
|
||||
f'Load model: type=PRXPixel repo="{repo_id}" config={diffusers_load_config} '
|
||||
f'offload={shared.opts.diffusers_offload_mode} dtype={devices.dtype} args={load_args}'
|
||||
)
|
||||
|
||||
transformer = generic.load_transformer(repo_id, cls_name=diffusers.PRXTransformer2DModel, load_config=diffusers_load_config)
|
||||
text_encoder = generic.load_text_encoder(repo_id, cls_name=transformers.Qwen3VLTextModel, load_config=diffusers_load_config)
|
||||
|
||||
if repo_id is None or repo_id.lower() == 'none':
|
||||
return None
|
||||
|
||||
pipe = diffusers.PRXPixelPipeline.from_pretrained(
|
||||
repo_id,
|
||||
transformer=transformer,
|
||||
text_encoder=text_encoder,
|
||||
cache_dir=shared.opts.diffusers_dir,
|
||||
**load_args,
|
||||
)
|
||||
|
||||
del text_encoder
|
||||
del transformer
|
||||
sd_hijack_te.init_hijack(pipe)
|
||||
|
||||
devices.torch_gc()
|
||||
return pipe
|
||||
Reference in New Issue
Block a user