Edit cost estimate: 0.015, measured from the HF billing page
Magnus Persson
616ba83
28 days ago
Pre-workshop: own thread pool for SDK calls, no monitoring page, cost cap below prepaid credit
Magnus Persson
78b337e
Revert "Photo styles: a cheerful, friendly mood"
Magnus Persson
62b93f2
This reverts commit e4073bd7ae37ddd2fdd9e7750112bde2827fe494.
Photo styles: a cheerful, friendly mood
Magnus Persson
e4073bd
Clay style: no figurines or scene wording; warm up the SDK's Pillow check before concurrent edits
Magnus Persson
a1969df
Photo styles: keep the person recognisable, restyle the surface
Magnus Persson
c2c0582
Revert "Stronger photo studio style instructions: replace the person with a puppet, doll, figurine or cartoon"
Magnus Persson
aaaec09
This reverts commit ad90d98589c58f41c7205ce88a26f0895df9c0ef.
Stronger photo studio style instructions: replace the person with a puppet, doll, figurine or cartoon
Magnus Persson
ad90d98
Fix 'new setting' refusing harmless subjects: the LLM writes only the setting
Magnus Persson
fb7b95f
Make the zoomed photo result fill the screen
Magnus Persson
d2020c9
Accept 12 to 50 MP phone photos in the photo studio and log why a photo is refused
Magnus Persson
e470f2c
Add 'What did the model receive?', fix the how-it-was-made link, update README
Magnus Persson
31066d6
Stop timers from rebuilding the webcam and tabs
Magnus Persson
aeb4e68
todo: tick finished work, record the 2026-10-08 decisions
Magnus Persson
efe0bdd
Add the Photo studio tab: webcam or upload, five restyling looks, admin switch, consent and input checks
Magnus Persson
c566758
Examples popup: category pills instead of tabs, picture above its text
Magnus Persson
aad2488
Show a busy state on the text box while Help me and Give me an idea work
Magnus Persson
bb7c12d
Send the prompt back to the text box when Create finishes
Magnus Persson
3819e07
Remove the Save picture button; the image toolbar has a download arrow
Magnus Persson
c246a75
Restyle the login page like the app, with a bilingual message
Magnus Persson
34137dd
Lighter design: smaller text, pill buttons, card panels, system fonts
Magnus Persson
0ced688
Log which safety check refused (stage and code only)
Magnus Persson
f700b8f
UX pass: Create under the text box, hidden edit panel, compact header buttons, Enter to create, confirm New visitor
Magnus Persson
91b3135
Add a before/after switch for the last edit
Magnus Persson
e0858f7
CI: fetch Git LFS files so the library tests see the real images
Magnus Persson
4c81502
Two-column Create layout with fixed slots, clearer labels, and a How it works pipeline tab
Magnus Persson
4fc023c
Tap the result image to zoom it
Magnus Persson
c86874d
Translate the visitor's text to English before image generation
Magnus Persson
3c2e42a
Show a working overlay over the result while Create or an edit chip runs
Magnus Persson
298d8ce
Rebuild the cached library examples and refresh the lock
Magnus Persson
be20630
All 37 examples remade with FLUX.1-schnell through the normal safety checks and reviewed by eye.
Add one-tap edit chips with FLUX.2-klein-4B, shared paid-call accounting and a stale-result guard
Magnus Persson
3b7d0f4
Chips (config/app.yaml edit_chips) send the visitor's current image and a static or LLM-picked instruction to the edit model; the LLM instruction is moderated and policy-checked, the output image is checked before display, and previous images go to history. Create and edit share services/spend.paid_call. A result arriving after New visitor is dropped (session epoch), for Create too. edit_instruction no longer asks for the unused new_prompt. Real-keys check covers two live edits. Library images and lock are left out: a forced rebuild is waiting for review. 415 tests.
Add the HF edit adapter and a model bake-off script; fast model cost measured
Magnus Persson
186ad3c
HFEditProvider (image_to_image) shares an HFRunner with the image adapter: typed errors, billing-safe retries, hard deadline, worker thread. EditModel gets hf_provider and the factory builds the edit provider once an edit model has hf_model. scripts/bakeoff.py compares models on fixed prompts with latency and a contact sheet. First edit bake-off on fal-ai: FLUX.2-klein-4B 3.9-5.2 s, klein-9B 4.1-5.8 s, Kontext-dev 8.6-9.4 s, Qwen-Image-Edit-2511 13.9-14.8 s. FLUX.1-schnell estimate set to the measured 0.003. 388 tests.
Note that binaries must be tracked with Git LFS for the Hugging Face Space
Magnus Persson
9d1dce2
Add Help me and Surprise me with Undo, and the real-keys flow check
Magnus Persson
09aba58
HelperService rewrites an idea (Help me) or invents one from a library theme (Surprise me). Every reply passes moderation and the workshop policy check before it is shown; a failed Surprise falls back to a curated library prompt. Limits: 2 s per device, 60 a minute overall, 8 at once, pause switch. Undo restores the previous text until the visitor types, picks an idea or uses an alternative. check_generated_text now runs the policy check and does not generate an alternative for LLM text.
scripts/check_real_flow.py drives startup validation, Create, a cached example, refusals, Help me and Surprise me with real keys and scans the logs for leaks. README gets the provider privacy note. Whole-flow safety review done; operational gate items are in todo.md. 381 tests.
Add the ideas popup with cached example images; drop the format picker
Magnus Persson
0016651
Ideas popup: 7 themed groups of example prompts in Swedish and English (config/prompt_library.yaml), including a like-real-photos group. Tapping a prompt fills the text box. An unchanged library prompt with no style returns its cached image at once, with no moderation call, provider call or cost, and a note that it is an example. Cached images live in assets/library and are tied to their texts by config/prompt_library.lock.json; a mismatch hides the prompt. scripts/build_library.py makes the images through the normal safety checks (every language of each prompt, and the image) and refreshes the lock.
Create is now always square: the Kvadrat/Liggande/Stående picker and its locale keys are removed (spec 3.3 updated); adapters still accept an aspect.
344 tests pass.
Add the Hugging Face image adapter, billing-safe retries and try_image script
Magnus Persson
6494c95
HF Inference Providers adapter (sync client in a worker thread), real image model ids, image_backend hf by default, 402 pauses generation, failures after the provider call keep the estimate unless known unbilled, HF_TOKEN prefix check, shared logging setup.
Safety cases run against the real services; alternatives must not name the original; known-issue marker
Magnus Persson
6419e2f
Phase 3: OpenAI moderation and text adapters, shared HTTP retry helper, safety review fixes
Magnus Persson
1da1792
Read secrets from a .env file one folder above the repo
SafetyService runs moderation and the workshop policy in parallel on the final prompt and fails closed. Policy replies are validated; character mode and offer_safe_rewrite have the last word; serious categories never get an alternative; alternatives are cleaned and moderated before display. Fixed internal moderation code set. Rewrite card in the Create tab. 40 SV/EN safety cases replayed with table-driven fakes, plus a script for the real services. 170 tests.
Tick the first green CI run
Magnus Persson
10b9257
Phase 2: login, budget and rate limits, device cooldown, kill switch, admin status tab
Magnus Persson
d8ebb7a
Add access.py (workshop/admin login, password rules), limits.py (reserve/reconcile/release under one lock, cooldown, hourly cap, per-minute rate, slots, pause), admin tab, CooldownError and device id in BrowserState. Events are private to the Gradio client (EXPOSE_API lifts this for load tests). Load test now logs in, keeps the device id and detects refused Creates. 99 tests with fakes.
fixed the @spaces.GPU decorator with related function.
Magnus Persson
82c1cda
fixed .venv file issues caused by OneDrive locks
Magnus Persson
d8d89a2
Pin gradio[mcp,oauth] so requirements.txt resolves on the Space; add Space install check
Magnus Persson
045c645
Merge branch 'main' of https://huggingface.co/spaces/magnusp/image-lab
Magnus Persson
33a4237
# Conflicts:
# .gitattributes
# README.md
Phase 0 and 1: project setup, config, fakes, Create tab