# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.85"
name = "pixl-gen"
version = "0.1.5"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Local diffusion image generation backend (SDXL + LoRA on candle). Trait-decoupled; backend (Metal/CUDA/CPU) chosen at build time."
readme = false
keywords = [
    "stable-diffusion",
    "sdxl",
    "diffusion",
    "candle",
    "image",
]
categories = ["multimedia::images"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/flow-industries/pixl"

[features]
cuda = [
    "gen",
    "candle-core/cuda",
    "candle-nn/cuda",
    "candle-transformers/cuda",
]
gen = [
    "dep:candle-core",
    "dep:candle-nn",
    "dep:candle-transformers",
    "dep:hf-hub",
    "dep:tokenizers",
    "dep:anyhow",
]
metal = ["gen"]

[lib]
name = "pixl_gen"
path = "src/lib.rs"

[dependencies.anyhow]
version = "1"
optional = true

[dependencies.hf-hub]
version = "0.5"
features = ["ureq"]
optional = true

[dependencies.image]
version = "0.25"
features = [
    "png",
    "jpeg",
]
default-features = false

[dependencies.thiserror]
version = "2"

[dependencies.tokenizers]
version = "0.22"
features = ["onig"]
optional = true
default-features = false

[target.'cfg(not(target_os = "macos"))'.dependencies.candle-core]
version = "0.10"
optional = true

[target.'cfg(not(target_os = "macos"))'.dependencies.candle-nn]
version = "0.10"
optional = true

[target.'cfg(not(target_os = "macos"))'.dependencies.candle-transformers]
version = "0.10"
optional = true

[target.'cfg(target_os = "macos")'.dependencies.candle-core]
version = "0.10"
features = [
    "metal",
    "accelerate",
]
optional = true

[target.'cfg(target_os = "macos")'.dependencies.candle-nn]
version = "0.10"
features = ["metal"]
optional = true

[target.'cfg(target_os = "macos")'.dependencies.candle-transformers]
version = "0.10"
features = ["metal"]
optional = true
