惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Check Point Blog
有赞技术团队
有赞技术团队
博客园 - 三生石上(FineUI控件)
博客园_首页
博客园 - 【当耐特】
WordPress大学
WordPress大学
月光博客
月光博客
博客园 - 叶小钗
S
SegmentFault 最新的问题
雷峰网
雷峰网
H
Help Net Security
宝玉的分享
宝玉的分享
A
About on SuperTechFans
IT之家
IT之家
J
Java Code Geeks
Hugging Face - Blog
Hugging Face - Blog
D
DataBreaches.Net
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 聂微东
T
The Blog of Author Tim Ferriss
B
Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Y
Y Combinator Blog

Hugging Face - Blog

Waypoint-1.5: Higher-Fidelity Interactive Worlds for Everyday GPUs ALTK‑Evolve: On‑the‑Job Learning for AI Agents Safetensors is Joining the PyTorch Foundation Holo3: Breaking the Computer Use Frontier Any Custom Frontend with Gradio's Backend A New Framework for Evaluating Voice Agents (EVA) Bringing Robotics AI to Embedded Platforms: Dataset Recording, VLA Fine‑Tuning, and On‑Device Optimizations One-Shot Any Web App with Gradio's gr.HTML CUGA on Hugging Face: Democratizing Configurable AI Agents New in llama.cpp: Model Management Building Deep Research: How we Achieved State of the Art OVHcloud on Hugging Face Inference Providers 🔥 20x Faster TRL Fine-tuning with RapidFire AI Building for an Open Future - our new partnership with Google Cloud Aligning to What? Rethinking Agent Generalization in MiniMax M2 Building a Healthcare Robot from Simulation to Deployment with NVIDIA Isaac Sentence Transformers is joining Hugging Face! Unlock the power of images with AI Sheets Supercharge your OCR Pipelines with Open Models Google Cloud C4 Brings a 70% TCO improvement on GPT OSS with Intel and Hugging Face Get your VLM running in 3 simple steps on Intel CPUs Nemotron-Personas-India: Synthesized Data for Sovereign AI Introducing RTEB: A New Standard for Retrieval Evaluation Accelerating Qwen3-8B Agent on Intel® Core™ Ultra with Depth-Pruned Draft Models VibeGame: Exploring Vibe Coding Games Nemotron-Personas-Japan: ソブリン AI のための合成データセット Swift Transformers Reaches 1.0 – and Looks to the Future Smol2Operator: Post-Training GUI Agents for Computer Use SyGra: The One-Stop Framework for Building Data for LLMs and SLMs Gaia2 and ARE: Empowering the community to study agents
Deploying the AI Comic Factory using the Inference API
ARCHIVED ACCOUNT · 2023-10-02 · via Hugging Face - Blog

Back to Articles

ARCHIVED ACCOUNT's avatar

We recently announced Inference for PROs, our new offering that makes larger models accessible to a broader audience. This opportunity opens up new possibilities for running end-user applications using Hugging Face as a platform.

An example of such an application is the AI Comic Factory - a Space that has proved incredibly popular. Thousands of users have tried it to create their own AI comic panels, fostering its own community of regular users. They share their creations, with some even opening pull requests.

In this tutorial, we'll show you how to fork and configure the AI Comic Factory to avoid long wait times and deploy it to your own private space using the Inference API. It does not require strong technical skills, but some knowledge of APIs, environment variables and a general understanding of LLMs & Stable Diffusion are recommended.

Getting started

First, ensure that you sign up for a PRO Hugging Face account, as this will grant you access to the Llama-2 and SDXL models.

How the AI Comic Factory works

The AI Comic Factory is a bit different from other Spaces running on Hugging Face: it is a NextJS application, deployed using Docker, and is based on a client-server approach, requiring two APIs to work:

  • a Language Model API (Currently Llama-2)
  • a Stable Diffusion API (currently SDXL 1.0)

Duplicating the Space

To duplicate the AI Comic Factory, go to the Space and click on "Duplicate":

duplicate-space-1.jpg

You'll observe that the Space owner, name, and visibility are already filled in for you, so you can leave those values as is.

Your copy of the Space will run inside a Docker container that doesn't require many resources, so you can use the smallest instance. The official AI Comic Factory Space utilizes a bigger CPU instance, as it caters to a large user base.

To operate the AI Comic Factory under your account, you need to configure your Hugging Face token:

duplicate-space-2.jpg

Selecting the LLM and SD engines

The AI Comic Factory supports various backend engines, which can be configured using two environment variables:

  • LLM_ENGINE to configure the language model (possible values are INFERENCE_API, INFERENCE_ENDPOINT, OPENAI)
  • RENDERING_ENGINE to configure the image generation engine (possible values are INFERENCE_API, INFERENCE_ENDPOINT, REPLICATE, VIDEOCHAIN).

We'll focus on making the AI Comic Factory work on the Inference API, so they both need to be set to INFERENCE_API:

duplicate-space-3.jpg

You can find more information about alternative engines and vendors in the project's README and the .env config file.

Configuring the models

The AI Comic Factory comes with the following models pre-configured:

  • LLM_HF_INFERENCE_API_MODEL: default value is meta-llama/Llama-2-70b-chat-hf
  • RENDERING_HF_RENDERING_INFERENCE_API_MODEL: default value is stabilityai/stable-diffusion-xl-base-1.0

Your PRO Hugging Face account already gives you access to those models, so you don't have anything to do or change.

Going further

Support for the Inference API in the AI Comic Factory is in its early stages, and some features, such as using the refiner step for SDXL or implementing upscaling, haven't been ported over yet.

Nonetheless, we hope this information will enable you to start forking and tweaking the AI Comic Factory to suit your requirements.

Feel free to experiment and try other models from the community, and happy hacking!