Generation profile (#50) #104
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
needs-info
needs-triage
question
ready-for-agent
ready-for-human
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crowmaki/ai-studio!104
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-50-generation-profile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #50.
What changed
studio-core/src/generation_profile.rs): diffusion model file (any quantization), text encoder file, an ordered LoRA stack with strengths, Distilled/Full speed, and draft/final short sides. The shipped default reads its two files from theh3.drafttemplate, so it can't drift from the workflows. It is Distilled at 768 / 1120 with no LoRAs.project_profile(a singleton) andproject_profile_lora. A Project from before V22 gets the shipped profile. A new Project copiesAppDefaults.generation_profile. An olderdefaults.jsonwithout that field loads with the shipped profile.set_generation_profilereplaces the whole profile as one undoable edit ("Change generation profile"). It trims file names and refuses blank files, a non-numeric LoRA strength, a short side under 32, and a draft larger than the final.comfyui_profile_choiceslists/api/models/diffusion_models,text_encodersandloras. When ComfyUI is offline, it returns the reason instead of failing.preflight(client, Option<&GenerationProfile>).comfyui_preflightpasses the open Project's profile. If a profile file is missing, the three H3 workflows are Not ready with amissing_profile_filereason. The image workflows don't use the profile, so the reason doesn't apply to them. A missing file is matched across\and/. The render worker passesNonefor now, because it only runs image jobs. Checking a job's own profile before submission arrives with the draft Take queue (#51).Switchcontrol in the UI kit (src/lib/ui/Switch.svelte, on Bits UI).Screenshots
The pickers list what ComfyUI has. A LoRA that ComfyUI doesn't list is marked Missing:
Each LoRA has an on/off switch. Here a LoRA that ComfyUI lacks is switched on, so it is marked Missing and the H3 workflows are Not ready:
Switched off, it stays in the list without being applied, and ComfyUI is ready again:
When ComfyUI is offline, the page shows only the saved choices and the file pickers are disabled:
A missing profile file makes only the H3 workflows Not ready:
The screenshots use a stand-in ComfyUI that serves the shipped nodes and some made-up model files.
Testing
cargo test --workspace --all-featuresbun test src scriptsbun run checkcrates/studio-core/tests/generation_profile.rscovers defaults, app defaults, undo, validation, migration, preflight of missing profile files against the fake, and the pickers.src-tauri/tests/smoke.rscovers the adapter.src/lib/settings/profile.test.tscovers the picker items and the LoRA stack edits.Review notes
speed_modesboth happen when the job is built (#51), not in this PR.