Skip to content

Add LoRA space builder skill#152

Merged
evalstate merged 8 commits into
huggingface:mainfrom
linoytsaban:add-lora-space-builder-skill
Jun 8, 2026
Merged

Add LoRA space builder skill#152
evalstate merged 8 commits into
huggingface:mainfrom
linoytsaban:add-lora-space-builder-skill

Conversation

@linoytsaban

@linoytsaban linoytsaban commented May 27, 2026

Copy link
Copy Markdown
Contributor

Adds huggingface-lora-space-builder: builds and publishes a Gradio Space on Hugging Face for a user-provided LoRA (discussed here as well).

  • Takes a LoRA repo on the Hub as input; reuses an existing HF_TOKEN / huggingface-cli login session
    and only prompts for a token when the cached one can't read the LoRA.
  • Reads the repo via HfApi + ModelCard to infer the base model, pick the right .safetensors (README
    hint → pytorch_lora_weights.safetensors → latest checkpoint → ask), and surface trigger words,
    recommended steps, guidance scale, and LoRA scale.
  • Picks the base pipeline and diffusers inference recipe per base model (Qwen-Image, Qwen-Image-Edit,
    LTX-Video, Wan, FLUX, SDXL, …) and designs a UI tailored to the LoRA's task and inputs.
  • Defaults to ZeroGPU, tunes @spaces.GPU(duration=...) to the
    task, and reaches for size="xlarge" only when large OOMs.
  • Sets HF_TOKEN as a Space secret when the LoRA or base model is private/gated.
  • Publishes as a private Space by default; on free-tier accounts, falls
    back to CPU but points the user at a PRO upgrade or a community GPU grant.

Co-authored with Claude Code & @apolinario

@linoytsaban linoytsaban marked this pull request as ready for review May 27, 2026 06:29
evalstate added 3 commits June 8, 2026 09:41
# Conflicts:
#	.claude-plugin/marketplace.json
#	.claude-plugin/plugin.json
#	.cursor-plugin/marketplace.json
#	.cursor-plugin/plugin.json
#	gemini-extension.json
…r-skill

# Conflicts:
#	gemini-extension.json
@evalstate evalstate merged commit d722384 into huggingface:main Jun 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants