huggingface-lora-space-builder
하는 일
이 스킬은 이미지나 영상 모델을 맞춤 설정하는 작은 추가 모듈인 LoRA의 브라우저 데모를 만듭니다. LoRA를 학습했거나 호스팅하며 작동하는 데모를 공유하고 싶은 크리에이터를 위한 스킬입니다.
사용하는 경우
- ✓LoRA 모델의 Space나 데모를 게시하고 싶을 때.
- ✓LoRA를 학습했고 대화형 체험 공간으로 공유하고 싶을 때.
- ✓FLUX, SDXL, Wan 같은 디퓨전 모델에 LoRA를 적용한 데모가 필요할 때.
스킬 링크
https://github.com/huggingface/skills/blob/main/skills/huggingface-lora-space-builder/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“FLUX에서 제 LoRA로 제품 사진을 만들어 볼 수 있는 Space를 간단한 프롬프트 상자와 함께 게시해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 LoRA에 필요한 조작 장치만 있는 데모를 설계한 뒤, 그것을 Hugging Face Spaces에 Gradio 앱으로 쓰고 게시합니다. Space는 기본적으로 비공개여서, 공유 시점은 사용자가 정합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Gradio LoRA Space Builder
Build and publish a Gradio demo on Hugging Face Spaces that runs inference with a user-provided LoRA. Use whenever someone asks to create, generate, ship, or publish "a Space", "a demo", "a Gradio app", or "a playground" for a LoRA — whether the base model is Qwen-Image, Qwen-Image-Edit, LTX, or another diffusion model. Also use when someone describes a LoRA they trained or hosts on the Hub and wants to share it. The default target is ZeroGPU hardware and the default inference library is diffusers when the base model supports it.
The output is a real, published Space (private by default) that the user can try in the browser, not a local script.
What "good" looks like for these demos
The demo should feel handcrafted for this specific LoRA, not a generic template with the LoRA bolted on. Two LoRAs that share a task can still need different demos: a pose-control video LoRA and an outpainting video LoRA both take video in and produce video out, but the inputs the user provides, the preprocessing, and the controls are completely different. Recognizing that is the central job here.
Concretely, a good demo:
- Loads fast and runs fast — minimal model loading, sensible step count, no wasted computation per call.
- Has a UI with exactly the controls this LoRA needs and nothing else. Excess sliders are a cost, not a feature.
- Shows the user what's happening — progress, intermediate outputs where useful, the seed used, a clear error when input is missing.
- Honors the LoRA's own recommendations from its model card: trigger words, recommended step count, recommended guidance scale, recommended LoRA scale, example inputs.
- Is creative where creativity helps — interactive canvases, before/after sliders, side-by-side previews of intermediate processing — and plain where plainness is right.
Workflow
Work through these phases in order. Information gathered in one phase decides the next.
- Gather the LoRA info needed to pick a pipeline and design a UI.
- Pick the base pipeline and inference recipe.
- Design the UI for this specific LoRA's task and inputs.
- Write
app.py,requirements.txt, andREADME.mdtogether; show all three to the user for one batched approval. - Publish the Space (private).
Don't drip-feed questions across multiple turns. Batch them.
Phase 1 — Gather LoRA info
Required: a LoRA repo on the Hub (e.g. username/my-lora).
First, try to read the repo without a token. If it succeeds, the repo is public — proceed. If it fails with 401/403, the repo is private/gated and you need an authenticated session to read it. Don't immediately ask for a token. Check first whether the user is already authenticated.
from huggingface_hub import HfApi, get_token
cached_token = get_token() # picks up HF_TOKEN env var or cached CLI login
if cached_token:
try:
info = HfApi().whoami(token=cached_token)
username = info["name"]
# info also has fine-grained token scope info if applicable
except Exception:
cached_token = None # token exists but is invalid/expired
Then:
- If a valid cached token exists and it can read the repo, use it. No prompt needed.
- If no cached token, or the cached token can't read this private repo, ask the user for a token — once, with the explanation below.
When asking for a token (and only when you actually need to ask):
I need a Hugging Face access token with write scope (to read the LoRA if it's private/gated, and to publish the Space). Create one at https://huggingface.co/settings/tokens. Paste it here.
The same token will be reused for publishing in the final phase, so this is a one-time ask.
Then read what's in the repo:
- List the repo files (
huggingface_hub.HfApi().list_repo_files(repo_id)). Look for.safetensors,README.md, example images/videos, multiple checkpoints. - Fetch the model card (
huggingface_hub.ModelCard.load(repo_id)). Thedatadict has structured fields; thetexthas the README body. - If multiple
.safetensorsfiles exist, pick the right one — see "Picking the LoRA weights file" inreferences/zerogpu-and-publishing.md. Briefly: README-recommended file wins, thenpytorch_lora_weights.safetensors, then latest training checkpoint, otherwise ask.
From the model card, try to determine:
- Base model — the
base_modelfield, or text mentions in the README. Usually present. Use it to pick the pipeline reference file (see P
자주 묻는 질문
Space는 공개인가요?
기본적으로 비공개이므로, 공유하기 전에 검토할 수 있습니다.
어떤 하드웨어를 쓰나요?
기본 대상은 ZeroGPU 하드웨어이며, 기반 모델이 지원하면 diffusers를 사용합니다.
이미지 모델에만 작동하나요?
아닙니다. LTX, Wan 같은 영상 디퓨전 모델도 다룹니다.
상세 정보
작성자의 원본 설명
Build and publish a Gradio demo on Hugging Face Spaces for a user-provided LoRA. Use when someone asks to create, generate, ship, or publish a Space, demo, Gradio app, or playground for a LoRA — including LoRAs for Qwen-Image, Qwen-Image-Edit, LTX-Video, Wan, FLUX, SDXL, or other diffusion base models. Also triggers when someone describes a LoRA they trained or hosts on the Hub and wants to share it. Covers picking the right base pipeline and `diffusers` inference recipe, designing a UI tailored to the LoRA's task and inputs (Union/multi-task control, edit, video, image, etc.), respecting mode
repo: huggingface/skills
인기도
- GitHub 스타
- 11k
- 순위
- #11775
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 10. 30.
댓글
- …
이 저장소의 다른 스킬
hf-cli
11k에이전트가 hf 명령줄 도구로 Hugging Face Hub의 모델, 데이터셋, Space, 저장소를 내려받고 올리며 로컬 캐시를 관리하도록 돕습니다.
hf-cloud-aws-context-discovery
11k에이전트가 클라우드 작업 전에 AWS 프로필, 리전, 계정 정보를 찾아, 어느 계정을 쓸지 추측하지 않도록 돕습니다.
hf-cloud-python-env-setup
11k에이전트가 SageMaker나 AWS 자동화를 실행하기 전에 적절한 Python 버전과 최신 라이브러리가 있는 깔끔한 Python 환경을 만들도록 돕습니다.
hf-cloud-sagemaker-deployment-planner
11k에이전트가 모델을 Amazon SageMaker에 배포하는 방법을 계획하고, 실시간, 서버리스, 비동기, 배치 호스팅 중 합리적인 기본값으로 고르도록 돕습니다.