AM — Hugging Face preparation
AM remains the user-facing product identity. This package implements the AM persona and local Transformers CUDA runtime; the foundation weights are Qwen/Qwen2.5-1.5B-Instruct, duplicated unchanged from its public Apache-2.0 repository.
Hugging Face repository status
- Public model repository:
badrdesigner/AM - Foundation model source:
Qwen/Qwen2.5-1.5B-Instruct - Model weights are duplicated server-side by Hugging Face and were not fine-tuned, changed, or downloaded to this workstation.
- The duplicated repository retains the upstream
LICENSE, model config, tokenizer, and safetensors. This README documents AM and identifies the upstream source. - AM runtime source is present under
am_model/; requirements, local setup, summary, and the Kaggle smoke-test script are also in the repository.
The Hugging Face Duplicate this model action copies the original model and
its files. It does not merge application source code into the weight files.
AM behavior is implemented in the application runtime, not by altering the
weights.
Runtime
The runtime uses local-only Transformers loading and requires a CUDA GPU. It never downloads weights during application startup. For a Kaggle notebook with access to the public repository:
from huggingface_hub import snapshot_download
model_path = snapshot_download("badrdesigner/AM")
Set AM_MODEL_PATH to the downloaded snapshot path before running AM.
AM_MODEL_REPO_ID defaults to badrdesigner/AM. Missing local files,
dependencies, or CUDA are reported explicitly. The mock brief fallback is
clearly marked and can be disabled with AM_ALLOW_MOCK_FALLBACK=false.
The runtime serves:
POST /v1/brief: AM's validated 13-dimension graphic-design brief.POST /v1/run: the brief plus separate Pinterest References and Elements metadata collections.POST /v1/references/pinterestandPOST /v1/elements: explicit, separate DDGS image-search contracts.
Pinterest searches return metadata candidates only. They do not download
images, verify reuse rights, make transparent cutouts, place assets into a
PSD, or verify that an element image has an alpha channel. Reference queries
search complete poster/design examples; element queries use separate PNG,
cutout, and no-background terms. Both run five Pinterest-filtered DDGS image
queries in parallel. References have a five-second search deadline; elements
have a ten-second deadline. Successful results are cached locally for five
minutes. A failed or empty search returns the same collection shape with an
empty, explicitly marked mock result; providerErrors stays zero while
diagnostic details are kept separately in providerDiagnostics.
--test-mode --pinterest (without --brief) runs the local mock-PSD suite
through the same runtime entry point. It creates three illustrative mock PSDs,
renders editable text and separate effect layers, exports each PSD through
ag-psd, then reports measured reference-search, element-search, asset
preparation, effects, merge, and total elapsed times. The 30-second deadline
is enforced for that test run; a run exceeding it exits unsuccessfully. A
successful local mock run is not a guarantee for future machines or live
providers.
Local CPU checks
The explicit test brief does not import Torch or Transformers, load weights, or call Hugging Face:
python -m pytest tests/test_design_agent.py
python am_model/unified_runtime.py --test-mode --pinterest --no-flux --brief "Ronaldo 2018 yellow noodles hair Emirates"
python am_model/unified_runtime.py --test-mode --pinterest --no-flux
For live Pinterest-only reference and element metadata searches:
python am_model/free_reference_search.py --query "Cristiano Ronaldo 2018 Real Madrid poster" --pinterest-only
The query uses DDGS' automatic image-search backend, then filters returned
source URLs to Pinterest. In a local probe, the search returned 50 references
and 20 element candidates; this is not guaranteed for every query or provider
response. An image candidate is not a verified transparent cutout or a
permission to reuse. Search results are metadata only: images are neither
downloaded nor inserted into the PSDs. The offline --mock mode returns empty
collections clearly marked as mock; it never invents search results. A
brief-only test does not create an ADL or PSD.
Per-run Pinterest result JSON is kept in a temporary cache that is removed
when the test command exits; persistent reports contain counts and diagnostics
only.
The three local PSD fixtures are explicitly mock-only: their central
illustrations are generic shapes, not Ronaldo photography, verified food
assets, or a generated campaign image. identityGuarantee is false. The
fixtures are checked for 20 PSD leaf layers, six groups, and editable text by
parsing them with ag-psd; Photoshop CC 2019 opening has not been verified.
Reference and element search counts do not represent images used in these
fixtures.
Regenerating the PSD fixtures requires the full ADSMIND workspace, including
its built API exporter and Node dependencies; the minimal Hugging Face model
package does not bundle those platform build artifacts.
Platform proactive reminders
The project-scoped, opt-in Watcher/Timer/Agent implementation is part of the ADSMIND NestJS platform, not the Hugging Face model runtime. The platform tracks workspace activity per project, checks for five minutes of inactivity once a minute, and rate-limits reminders to at most one per hour. It sends a short reminder only to the visible workspace and never changes the design. Its database migration must be applied by the platform deployment before enabling the feature.
Kaggle smoke test
tests/kaggle_smoke_test.py is the separate CUDA test for real model
inference. It downloads badrdesigner/AM, disables mock fallback, and checks
three design-brief prompts for AM identity, 13 dimensions, and three or four
creative directions. Live inference remains pending.
The no-Flux metadata notebook is kaggle/am_phase1_no_flux.ipynb.
Kaggle version 3 completed on two Tesla T4 GPUs. Its measured result was
22/28 checks: briefs, PSD/ADL structure, PNG dimensions, and per-case timing
passed, but live Pinterest result counts were incomplete (Ronaldo 7/2,
Koshary El-Nasr 11/0, ADSMIND 0/1 references/elements). providerErrors=0
does not mean all searches returned results; timeout and empty-result
diagnostics are retained in the report. The notebook copied prevalidated
offline mock PSD/ADL/PNG fixtures and performed no model inference. See
kaggle/results/AM-Kaggle-No-Flux-Results.zip
and kaggle/results/artifacts/Final Summary.json
for the run outputs. identityGuarantee=false; the weekly Kaggle GPU quota
and Photoshop CC 2019 opening are unverified. Phase 1 is not closed and no
release tag was created.
The three PSD fixtures each parse as 20 layers, six groups, and six editable text layers, but they are mock output rather than model-generated designs. Noto Naskh Arabic Bold and Cairo are installed for the current Windows user; their installation does not verify Photoshop opening, Arabic shaping, identity accuracy, or production design quality.
Ollama Modelfile
An Ollama Modelfile is not a Hugging Face Transformers configuration and
cannot be used to configure this repository's Transformers runtime. AM's
system prompt and generation parameters are defined in am_model/am_core.py.