Text To Image repository template

This is a template repository for text to image to support generic inference with Hugging Face Hub generic Inference API. There are two required steps

  1. Specify the requirements by defining a requirements.txt file.
  2. Implement the pipeline.py __init__ and __call__ methods. These methods are called by the Inference API. The __init__ method should load the model and preload all the elements needed for inference (model, processors, tokenizers, etc.). This is only called once. The __call__ method performs the actual inference. Make sure to follow the same input/output specifications defined in the template for the pipeline to work.

Example repos

How to start

First create a repo in https://hf.co/new. Then clone this template and push it to your repo.

git clone https://huggingface.co/templates/text-to-image
cd text-to-image
git remote set-url origin https://huggingface.co/Nymbo/Model_Repo_Template
git push --force

For reference on model card metadata, see the spec: https://github.com/huggingface/hub-docs/blob/main/modelcard.md?plain=1

Doc / guide: https://huggingface.co/docs/hub/model-cards

{{ card_data }}

Model Card for {{ model_id | default("Model ID", true) }}

{{ model_summary | default("", true) }}

Model Details

Model Description

{{ model_description | default("", true) }}

  • Developed by: {{ developers | default("[More Information Needed]", true)}}
  • Funded by [optional]: {{ funded_by | default("[More Information Needed]", true)}}
  • Shared by [optional]: {{ shared_by | default("[More Information Needed]", true)}}
  • Model type: {{ model_type | default("[More Information Needed]", true)}}
  • Language(s) (NLP): {{ language | default("[More Information Needed]", true)}}
  • License: {{ license | default("[More Information Needed]", true)}}
  • Finetuned from model [optional]: {{ base_model | default("[More Information Needed]", true)}}

Model Sources [optional]

  • Repository: {{ repo | default("[More Information Needed]", true)}}
  • Paper [optional]: {{ paper | default("[More Information Needed]", true)}}
  • Demo [optional]: {{ demo | default("[More Information Needed]", true)}}

Uses

Direct Use

{{ direct_use | default("[More Information Needed]", true)}}

Downstream Use [optional]

{{ downstream_use | default("[More Information Needed]", true)}}

Out-of-Scope Use

{{ out_of_scope_use | default("[More Information Needed]", true)}}

Bias, Risks, and Limitations

{{ bias_risks_limitations | default("[More Information Needed]", true)}}

Recommendations

{{ bias_recommendations | default("Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.", true)}}

How to Get Started with the Model

Use the code below to get started with the model.

{{ get_started_code | default("[More Information Needed]", true)}}

Training Details

Training Data

{{ training_data | default("[More Information Needed]", true)}}

Training Procedure

Preprocessing [optional]

{{ preprocessing | default("[More Information Needed]", true)}}

Training Hyperparameters

  • Training regime: {{ training_regime | default("[More Information Needed]", true)}}

Speeds, Sizes, Times [optional]

{{ speeds_sizes_times | default("[More Information Needed]", true)}}

Evaluation

Testing Data, Factors & Metrics

Testing Data

{{ testing_data | default("[More Information Needed]", true)}}

Factors

{{ testing_factors | default("[More Information Needed]", true)}}

Metrics

{{ testing_metrics | default("[More Information Needed]", true)}}

Results

{{ results | default("[More Information Needed]", true)}}

Summary

{{ results_summary | default("", true) }}

Model Examination [optional]

{{ model_examination | default("[More Information Needed]", true)}}

Environmental Impact

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

  • Hardware Type: {{ hardware_type | default("[More Information Needed]", true)}}
  • Hours used: {{ hours_used | default("[More Information Needed]", true)}}
  • Cloud Provider: {{ cloud_provider | default("[More Information Needed]", true)}}
  • Compute Region: {{ cloud_region | default("[More Information Needed]", true)}}
  • Carbon Emitted: {{ co2_emitted | default("[More Information Needed]", true)}}

Technical Specifications [optional]

Model Architecture and Objective

{{ model_specs | default("[More Information Needed]", true)}}

Compute Infrastructure

{{ compute_infrastructure | default("[More Information Needed]", true)}}

Hardware

{{ hardware_requirements | default("[More Information Needed]", true)}}

Software

{{ software | default("[More Information Needed]", true)}}

Citation [optional]

BibTeX:

{{ citation_bibtex | default("[More Information Needed]", true)}}

APA:

{{ citation_apa | default("[More Information Needed]", true)}}

Glossary [optional]

{{ glossary | default("[More Information Needed]", true)}}

More Information [optional]

{{ more_information | default("[More Information Needed]", true)}}

Model Card Authors [optional]

{{ model_card_authors | default("[More Information Needed]", true)}}

Model Card Contact

{{ model_card_contact | default("[More Information Needed]", true)}}

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The HF Inference API does not support text-to-image models for generic library.

Collection including Nymbo/Model_Repo_Template