YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Image Colorization Model

This model colorizes grayscale images using a Stable Diffusion ControlNet approach.

Usage

# Install required dependencies
pip install diffusers tensorflow torch

# Load and use the model
from huggingface_hub import hf_hub_download
import tensorflow as tf
from tensorflow import keras
import os

# Define the ColorizeModel class (same as in the original notebook)
# [Insert the ColorizeModel class definition here]

# Download the model files
model_path = hf_hub_download(repo_id="AmrDabour/image-colorizer", filename="image_colorizer.h5")
component_path = os.path.dirname(os.path.dirname(model_path)) + "/models--AmrDabour--image-colorizer/snapshots/COMMIT_HASH"

# Load and use the model
with keras.utils.custom_object_scope({'ColorizeModel': ColorizeModel}):
    loaded_model = keras.models.load_model(model_path, compile=False)
    result = loaded_model.colorize("your_grayscale_image.jpg", output_path="colored_output.png")

Replace AmrDabour and COMMIT_HASH with appropriate values.

Downloads last month
-
Safetensors
Model size
0.9B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support