mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
@@ -17,6 +17,8 @@ And a first cloud model with **Google's Nano Banana**
|
||||
- [Google Gemini 2.5 Flash Nano Banana](https://blog.google/products/gemini/gemini-nano-banana-examples/)
|
||||
first cloud-based model directly supported in SD.Next UI
|
||||
*note*: need to set `GOOGLE_API_KEY` environment variable with your key to use this model
|
||||
- [Photoroom PRX 1024 Beta](https://huggingface.co/Photoroom/prx-1024-t2i-beta)
|
||||
PRX (Photoroom Experimental) is a small 1.3-billion-parameter text-to-image model trained entirely from scratch, it uses T5-Gemma text-encoder
|
||||
- **Features**
|
||||
- **kanvas**: new module for native canvas-based image manipulation
|
||||
kanvas is a full replacement for *img2img, inpaint and outpaint* controls
|
||||
|
||||
@@ -912,6 +912,12 @@
|
||||
"size": 15.48,
|
||||
"date": "2023 April"
|
||||
},
|
||||
"Photoroom PRX 1024": {
|
||||
"path": "Photoroom/prx-1024-t2i-beta",
|
||||
"desc": "PRX (Photoroom Experimental) is a 1.3-billion-parameter text-to-image model trained entirely from scratch and released under an Apache 2.0 license.",
|
||||
"preview": "gemini-2.5-flash-image.jpg",
|
||||
"skip": true
|
||||
},
|
||||
|
||||
"FLUX.1-Dev sdnq-svd-uint4": {
|
||||
"path": "Disty0/FLUX.1-dev-SDNQ-uint4-svd-r32",
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
@@ -66,6 +66,8 @@ def get_model_type(pipe):
|
||||
model_type = 'nextstep'
|
||||
elif 'X-Omni' in name:
|
||||
model_type = 'x-omni'
|
||||
elif 'Photoroom' in name:
|
||||
model_type = 'prx'
|
||||
# video models
|
||||
elif "CogVideo" in name:
|
||||
model_type = 'cogvideo'
|
||||
|
||||
@@ -129,6 +129,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-' in fn.lower():
|
||||
new_guess = 'PRX'
|
||||
elif 'gemini-2.5-flash-image' in fn.lower():
|
||||
new_guess = 'NanoBanana'
|
||||
if debug_load:
|
||||
|
||||
@@ -426,6 +426,10 @@ def load_diffuser_force(model_type, checkpoint_info, diffusers_load_config, op='
|
||||
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']:
|
||||
from pipelines.model_prx import load_prx
|
||||
sd_model = load_prx(checkpoint_info, diffusers_load_config)
|
||||
allow_post_quant = False
|
||||
except Exception as e:
|
||||
shared.log.error(f'Load {op}: path="{checkpoint_info.path}" {e}')
|
||||
if debug_load:
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
import diffusers
|
||||
from modules import shared, devices, sd_models, model_quant, sd_hijack_te
|
||||
from pipelines import generic
|
||||
|
||||
|
||||
def load_prx(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)
|
||||
shared.log.debug(f'Load model: type=PRX repo="{repo_id}" config={diffusers_load_config} offload={shared.opts.diffusers_offload_mode} dtype={devices.dtype} args={load_args}')
|
||||
|
||||
from transformers.models.t5gemma.modeling_t5gemma import T5GemmaEncoder
|
||||
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=T5GemmaEncoder, load_config=diffusers_load_config)
|
||||
|
||||
pipe = diffusers.PRXPipeline.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