Image-to-Image / README.md
hy3dlab's picture
feat: restore General plus 19 LoRA editor
df13472 verified
|
Raw
History Blame Contribute Delete
3.03 kB

A newer version of the Gradio SDK is available: 6.25.0

Upgrade
metadata
title: hy3dlab Image-to-Image
emoji: 🖼️
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 6.22.0
python_version: 3.10.13
app_file: app.py
pinned: true
license: apache-2.0
short_description: Revision-pinned general and LoRA AI image editor

hy3dlab Image-to-Image

Public backend duplicated from prithivMLmods/Qwen-Image-Edit-2511-LoRAs-Fast at commit e1c9d2e8421d7934841d67f809d87ac7a6cdf720.

General editing through the pinned replacement transformer is the default mode (lora_adapter="__base__"). The same seven-field endpoint also accepts the 19 revision-pinned LoRA IDs recorded in provenance.py. Adapter changes use a single-resident state machine: the prior adapter is unloaded before another is loaded, and activation plus inference are serialized by one pipeline lock.

The Space App includes a first-party one-or-two-image editor with Prompt, General/Style-LoRA selection, Quick Prompts, 19 fixed examples, queue status, before/after comparison, session history, and PNG download. Browser code is self-hosted and uses the same strict seven-field API contract.

API boundary

  • Named endpoint: /edit_image
  • Non-GPU example endpoint: /load_example
  • Input shape: the upstream seven fields
  • Output shape: { "image": "data:image/png;base64,...", "seed": number }
  • Technical validation: one or two PNG/JPEG/WebP data URLs, at most 10 MiB and 16 MP each (20 MiB and 32 MP total), Prompt length, numeric ranges, an exact allowlisted edit mode, and one concurrent pipeline operation
  • Error output: stable low-cardinality codes; raw provider exceptions and user content are not returned or logged
  • Input and output are processed in memory and are not deliberately written to application storage
  • Generated output remains a single PNG with a maximum 1024px long side. The Upscaler adapter does not make this API a 4K-output service.

Content-moderation decision

Application-layer content moderation is intentionally not implemented for input images, prompts, or output images. The upstream transformer is retained. This is a user-accepted product decision, not a claim that the model or service passed an NSFW safety review, and it does not override Hugging Face policy or applicable law.

Reproducibility

Remote model, transformer, kernel, and all enabled LoRA revisions are pinned in provenance.py. See MODEL_BOM.md for the recorded supply-chain facts and open release gates; enablement is not a claim that every license/brand question has been cleared. Python direct dependencies are pinned in requirements.txt and pre-requirements.txt. The browser client is vendored at the installed @gradio/client 2.3.1 build and hash-checked by the static test suite; a Linux transitive lock remains a post-build task.

No Hugging Face owner token is required by the browser-facing public API design. Deployment credentials must never be stored in this repository or sent to a browser.