본문으로 건너뛰기
Skillpedia
에이전트48k · #4848

huggingface-lora-space-builder

하는 일

이 도구는 LoRA라는 AI 모델을 위해 Hugging Face 웹사이트에 대화형 데모('스페이스')를 만듭니다. 이를 통해 다른 사람들이 브라우저에서 직접 LoRA를 사용해 볼 수 있습니다.

사용하는 경우

  • ✓내가 만든 LoRA를 친구들에게 보여 주고 싶을 때.
  • ✓내가 내려받은 LoRA를 다른 사람들이 테스트하기를 원할 때.
  • ✓상대방이 아무것도 설치하지 않아도 LoRA를 공유하고 싶을 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/huggingface-lora-space-builder/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/huggingface-lora-space-builder/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 LoRA 'my-awesome-lora'를 위한 Hugging Face 스페이스를 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 LoRA의 정보를 받아 가장 좋은 설정을 고르고, 테스트할 수 있는 간단한 웹사이트를 만듭니다. 그다음 이 웹사이트를 Hugging Face Spaces에 게시합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Gradio LoRA Space Builder

When to Use

Use this skill when you need 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...

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.

  1. Gather the LoRA info needed to pick a pipeline and design a UI.
  2. Pick the base pipeline and inference recipe.
  3. Design the UI for this specific LoRA's task and inputs.
  4. Write app.py, requirements.txt, and README.md together; show all three to the user for one batched approval.
  5. 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)). The data dict has structured fields; the text has the README body.

…

자주 묻는 질문

LoRA는 무엇인가요?

AI 모델을 전체적으로 다시 학습하지 않고도 특정 스타일이나 개념을 배울 수 있게 하는 효율적인 학습 기법입니다.

Hugging Face Spaces는 무엇인가요?

AI 모델 데모를 호스팅하고 공유하는 플랫폼으로, 다른 사람들이 웹 인터페이스를 통해 사용할 수 있습니다.

이 도구를 사용하려면 코딩을 알아야 하나요?

아니요, 코딩을 하지 않는 사람을 위해 만들어졌습니다. LoRA의 이름만 알려 주면 됩니다.

상세 정보

작성자의 원본 설명

Build and publish a Gradio demo on Hugging Face Spaces for a user-provided LoRA.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#4848
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬