mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
fix onnx sdxl
This commit is contained in:
@@ -25,6 +25,8 @@ SUBMODELS_SD = ("text_encoder", "unet", "vae_encoder", "vae_decoder",)
|
||||
SUBMODELS_SDXL = ("text_encoder", "text_encoder_2", "unet", "vae_encoder", "vae_decoder",)
|
||||
SUBMODELS_SDXL_REFINER = ("text_encoder_2", "unet", "vae_encoder", "vae_decoder",)
|
||||
|
||||
SUBMODELS_LARGE = ("text_encoder_2", "unet",)
|
||||
|
||||
|
||||
class PipelineBase(TorchCompatibleModule, diffusers.DiffusionPipeline, metaclass=ABCMeta):
|
||||
model_type: str
|
||||
@@ -177,7 +179,7 @@ class OnnxRawPipeline(PipelineBase):
|
||||
onnx.save_model(
|
||||
model,
|
||||
os.path.join(destination, "model.onnx"),
|
||||
save_as_external_data=submodel == "unet",
|
||||
save_as_external_data=submodel in SUBMODELS_LARGE,
|
||||
all_tensors_to_one_file=True,
|
||||
location="weights.pb",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user