Spaces:
Runtime error
Runtime error
Commit History
-
Anima loader: fix cosmetic tensor-count log + assert DiT fully materializedβ
nsfwalex +1: Claude Opus 4.8 (1M context)from_single_file's converter pops the input state dict empty, so logging len(dit_sd) after the load printed '0 tensors'. Capture counts before the load, and assert no transformer param is left on the meta device (a half-mapped checkpoint would otherwise crash later in pipe.to('cuda')). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>c46762a -
Fix Anima loader: de-prefix CivitAI checkpoint so finetuned DiT+adapter actually loadβ
nsfwalex +1: Claude Opus 4.8 (1M context)CivitAI Anima checkpoints are ComfyUI-format (model.diffusion_model.* prefix). The diffusers Cosmos single-file converter only strips a 'net.' prefix, so the raw file matched no transformer param -> the load failed and a silent try/except fell back to the BASE Anima DiT, making all three Anima finetunes render identical base weights (differing only by prompt prefix). De-prefix and load both finetuned components explicitly (567 DiT tensors -> transformer, 118 llm_adapter tensors -> text_conditioner), verified exact key match vs the base repo, and let failures raise loudly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>877c9af -
Wire pornmaster-anima (Anima) into the image-model registry with prefix + negative
nsfwalex66e8e32 -
Per-model prefix + default_negative (realism-illustrious, wai-anima, samanima); apply in illustrious+anima branches
nsfwalex6efc873 -
Image-model registry: IMAGE_MODELS env + illustrious/zimageturbo/anima families
nsfwalex86620e2
-
Fix moderation under-rating: rubric + flag-derived rating floorβ
The VLM capped explicit NSFW at 2_STRONG_SUGGESTIVE. Two fixes: - MODERATION_PROMPT: explicit per-level rubric ("choose the HIGHEST that applies"), a new "nudity" flag, clear flag-setting rules, and "drawn/anime rated the same as photo". - _parse_moderation_json now escalates rating to max(model label, flag-implied floor): explicit_genitals/sexual_act -> >=4, nudity -> >=3, sexualized_minor_risk/non_consensual/bestiality -> 5. Model's own label kept as model_rating. Backward-compatible (rating string + existing flag names). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>266cf86 -
Prompt-improve as system prompt + One Obsession quality defaultsβ
- Prompt-improve: pass the improve instruction as the LLM system prompt and the user's original prompt as the user message (was a combined user turn). - One Obsession (NoobXL): prepend a quality prefix (masterpiece, best quality, β¦) to the positive prompt, skipping any tag already present; replace the baseline NOOBXL_NEGATIVE with the new default negative (applied via the existing negative wiring + UI default). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>657d09f -
Switch assistant back to gemma-4-E4B (bf16)β
VLM_MODEL_ID default -> prithivMLmods/gemma-4-E4B-it-Uncensored-MAX (fast, ~2s warm). Qwen 9B/4B + gemma 12B kept commented for revert. App reload. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>a2d7364 -
Switch assistant back to Qwen3.5-9B-Uncensored (bf16)β
VLM_MODEL_ID default -> ccharnkij/Qwen3.5-9B-Uncensored (the pre-Gemma default). bf16 (~18.8GB, fits zero-a10g). Gemma E4B/12B kept commented for revert. requirements unchanged -> app reload, not a full rebuild. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>63b1a96 -
Revert assistant to gemma-4-E4B (bf16) β 12B 8-bit was too slowβ
- VLM_MODEL_ID default -> prithivMLmods/gemma-4-E4B-it-Uncensored-MAX (model_type gemma4), small/fast, loads bf16 (~8GB). - VLM_LOAD_8BIT default -> 0 (bf16); set =1 only for the big 12B. - requirements unchanged (transformers git main already supports gemma4), so this is an app reload, not a full rebuild. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>7d87ebe -
Switch assistant to gemma-4-12B (8-bit) + expose system promptβ
- VLM_MODEL_ID -> OpenYourMind/gemma-4-12B-it-abliterated-uncensored (model_type gemma4_unified). Load 8-bit via bitsandbytes by default (~12GB, fits the zero-a10g alongside the diffusion pipelines); VLM_LOAD_8BIT=0 reverts to bf16. Prior models kept commented. - requirements: transformers -> git main (gemma4_unified support) + bitsandbytes. - Expose an optional system_prompt through _vlm_chat_core (real system role when the template supports it, folded into the user turn otherwise) and surface it in the Prompt Assistant UI + the prompt_assistant / prompt_to_video_assets / image_to_video_assets API endpoints. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>288cccb -
swap assistant VLM -> ccharnkij/Qwen3.5-9B-Uncensored (test explicit-rating)β
ImageStudio Maintainer +1: Claude Opus 4.8 (1M context)Gemma 4 E4B under-rated explicit images (capped ~2_STRONG_SUGGESTIVE). Try a 9B uncensored Qwen3.5 VL instead. Vision-capable; thinking model (reasoning toggle meaningful again). Its generation_config eos omits <|im_end|>, but the model-agnostic _resolve_vlm_eos_ids unions tokenizer eos + turn terminators so stopping holds. ~18.8GB bf16 β heaviest assistant; watch GPU memory. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>3cc90b8 -
feat: switch assistant VLM Qwen3.5-4B -> gemma-4-E4B-it-Uncensored-MAXβ
ImageStudio Maintainer +1: Claude Opus 4.8 (1M context)Comment out the Qwen model (kept for revert) and load prithivMLmods/ gemma-4-E4B-it-Uncensored-MAX (Gemma4ForConditionalGeneration, multimodal). Make the eos-token resolver model-agnostic: union the model's own generation_config eos, the tokenizer eos, and known turn terminators across families (Gemma <turn|>, Qwen <|im_end|>, Llama <|eot_id|>), skipping <unk>. Gemma ships a generation_config so it stops natively; the union keeps the manual-pin safety for models that don't. Update assistant UI copy; Gemma has no thinking mode so the Reasoning toggle is now a documented no-op. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>c5fc943 -
fix: VLM assistant never stops (no generation_config) -> pin eos/pad tokensβ
ImageStudio Maintainer +1: Claude Opus 4.8 (1M context)The finetune ships no generation_config.json and its config has no eos_token_id, so generate() had no stop token and ran to max_new_tokens (endless output) even after the repetition fix. Pin eos_token_id to the chat-template terminator <|im_end|> (+ <|endoftext|> fallback) and set pad_token_id explicitly, derived from the tokenizer at load time. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>c4415be -
feat: expose negative prompt in UI, gate it on model capabilityβ
ImageStudio Maintainer +1: Claude Opus 4.8 (1M context)Negative prompt is now always shown in Advanced Settings (was hidden unless NoobXL was selected). A MODELS_WITH_NEGATIVE capability flag drives both the UI (field is interactive only for supporting models, with an explanatory info line) and generation (negative prompt is wired in only when the target model supports CFG; guidance-free Z-Image ignores it). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>a597aa8 -
fix: stop VLM assistant looping into long repeated outputβ
ImageStudio Maintainer +1: Claude Opus 4.8 (1M context)Greedy decoding (do_sample=False) with no repetition controls fell into n-gram repetition loops and ran to max_new_tokens instead of emitting EOS. Add repetition_penalty=1.3 + no_repeat_ngram_size=3 β breaks the loops and lets the model stop on its own, decoding stays deterministic. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>a2d7150 -
feat: optional prompt_improve_instruction for /generate_imageβ
ImageStudio Maintainer +1: Claude Opus 4.8 (1M context)When non-empty, the VLM rewrites the prompt with the instruction before sampling (single GPU window); the improved prompt is used for generation, upload metadata, and echoed back as effective_prompt. Empty keeps the original workflow unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>93f6c29
-
feat: image_to_video_assets endpoint (image -> motion prompt + image-context check)β
ImageStudio MaintainerOne GPU window moderates a user-uploaded image and writes the i2v motion prompt; refactor vlm_chat to a reusable _vlm_chat_core. Bound via a hidden trigger as api_name=image_to_video_assets (outputs: prompt, status{moderation}, progress). Used by the generator's image-to-video workflows.acd22d2 -
feat: per-image moderation check + WebP upload pipelineβ
nsfwalex +1: Claude Opus 4.8 (1M context)- Run the VLM image-context (safety-rating JSON) check on every generated image inside the same @spaces.GPU window, parse it best-effort, and return it alongside the image, seed and R2 URL (generate tab + prompt_to_video_assets). - Encode assets as WebP before R2 upload and return WebP files/presigned URLs; downstream now only ever sees WebP. All 3 Spaces decode WebP input via PIL. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>0510568 -
feat: add UI-less prompt_to_video_assets endpoint (LLM->image->LLM)β
nsfwalex +1: Claude Opus 4.8 (1M context)Chains Qwen (first-frame image prompt) -> image model -> R2 upload -> Qwen (video prompt grounded on the frame) in one streaming call. Exposed via gr.api so it adds no Gradio UI. Returns video_prompt + first_frame_url (presigned GET) plus r2 filekey/bucket and the intermediate frame prompt. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>bae8329 -
feat: stream generation + assistant progress over SSEβ
nsfwalex +1: Claude Opus 4.8 (1M context)Convert generate_image / prompt_assistant into progress-yielding generators so each yield surfaces as an SSE `generating` frame on /gradio_api/call. A hidden JSON progress output (index 3 for generate_image, index 1 for prompt_assistant) carries {stage,p,step,total,label} for downstream orchestration. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>b3b69d0
-
feat: add Reasoning On/Off toggle to Prompt Assistant (Qwen enable_thinking)β
ImageStudio Maintainer +1: Claude Opus 4.8 (1M context)Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>3a2ca6a -
fix: drop unsupported show_copy_button kwarg on Textbox (Gradio 6)β
ImageStudio Maintainer +1: Claude Opus 4.8 (1M context)Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>6efa78a -
fix: add torchvision for Qwen3.5-VL video processor backendβ
ImageStudio Maintainer +1: Claude Opus 4.8 (1M context)Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>005cfba -
feat: add Qwen3.5-4B Prompt Assistant tab (text + image, single-turn)β
ImageStudio Maintainer +1: Claude Opus 4.8 (1M context)Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>74bfa68 -
feat: log total GPU time consumed per generate_image call
ImageStudio Maintainer52379d0 -
fix: pad SDXL compel conditionings for long promptsβ
ImageStudio Maintainer +1: Claude Opus 4.8 (1M context)compel([prompt, negative]) pads internally via conditioning_provider.empty_z, which the SDXL dual-encoder EmbeddingsProviderMulti does not expose, so long prompts (whose chunk count differs from the negative) crashed with AttributeError. Encode the prompt and negative separately and pad with the empty-string conditioning passed as precomputed_padding. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>5c7571d -
feat: switch both pipelines to custom dataset checkpointsβ
ImageStudio Maintainer +1: Claude Opus 4.8 (1M context)Load single-file checkpoints from the nsfwalex/checkpoint_n_lora dataset instead of the stock HF models: - Z-Image pipeline -> Moody Pro Mix (ZIT V12 DPO), a transformer-only Z-Image-Turbo finetune swapped into the base pipeline via ZImageTransformer2DModel.from_single_file. - SDXL pipeline -> One Obsession v2.1 Anime (Illustrious) via StableDiffusionXLPipeline.from_single_file, keeping the fp16-fix VAE and Compel prompt weighting. Relabels the model dropdown and helper text to the new model names. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>50c4793 -
fix: drop unsupported show_api kwarg on prompt.submit (Gradio 6)β
ImageStudio Maintainer +1: Claude Opus 4.8 (1M context)Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>4f84136 -
feat: upload generated images to R2 with prompt/params + requester uid in metadataβ
ImageStudio Maintainer +1: Claude Opus 4.8 (1M context)Add r2_uploader helper that pushes each generated image to the free-generated-assets R2 bucket (key yyyymmddhhmmss-s01-<rand>.png) with the prompt, request params and the caller's uid cookie recorded as object metadata. The generate handler now returns the uploaded filekey alongside the original image, or an error plus the original image on failure. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>daf5e70
-
Fix RUNTIME_ERROR (kernels/transformers import) and add NoobAI-XL model selectorβ
ImageStudio Maintainer +1: Claude Opus 4.8 (1M context)- Root cause: transformers hub_kernels builds LayerRepository() which the installed kernels version rejects ('Either a revision or a version must be specified'), crashing 'from transformers import PreTrainedModel' and all of diffusers at import time. kernels was only needed for the commented-out FA3/AoTI block, so it is removed from requirements. - Add a Model selector: Z-Image-Turbo (guidance-free, ~9 steps) and NoobAI-XL v1.1 (SDXL + sdxl-vae-fp16-fix + Compel prompt weighting). - Per-model defaults, negative-prompt fields shown only for NoobAI-XL. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>d6b6688
-
Set output image format to PNG for higher quality (#56)β
- Set output image format to PNG for higher quality (dd4666c603a7646b6910906b9237ca2e47081039) Co-authored-by: Boroll <boroll2347@users.noreply.huggingface.co>ad4a177
-
fixed
Verified signature29b9fbc -
debug
Verified signature7f67510
-
allow MCP (#39)β
Verified signature- allow MCP (71d776aa27638c7fa26eca4884211bcaf3e6b493) Co-authored-by: seyf EL <seyf1elislam@users.noreply.huggingface.co>79c4bb8
-
Update app.py
Verified signaturee7338c1
-
Update app.py
Verified signature190e9bc -
Update app.py from anycoder
Verified signature81688cf -
Update app.py from anycoder
Verified signature4789a7f -
π¨ Redesign from AnyCoder (#5)β
Verified signature- π¨ Redesign from AnyCoder (a421fa1dd24b5b67591ff24585afbe328c543246)e28279b
-
Update app.py
Verified signature8da5cdc -
Update requirements.txt
Verified signature17f20b0 -
Update app.py
Verified signaturebfe4467 -
remove preload from hub
Verified signaturee9a1299 -
Performance enhancements (#2)β
Verified signature- Update app.py (4a892379d783a3ac642585be81313dcee9a6262f) - Update requirements.txt (aa854da254c1ff82bda2ea19115b837e4bf2954e) - Create optimization.py (579120fd169946f14aeeb643af8be59976f32748) - Update app.py (b619a3366181b6ef0a418ea1e4594f4eefb7a101) - Update app.py (98b5ab5e7f8ecaeda306170041fa982d65679d49) - Delete optimization.py (0866e2dbdce41ed5aaaf637c53f2cf7786b259e8) - Update app.py (35a8941a336a4943855807004d4cdf43cfec017d)eee0c8d -
Update app.py
Verified signaturee17facd
-
Update app.py
Verified signature5d2046d -
Update app.py
Verified signaturec96ee5c -
Update app.py
Verified signaturec7d89d3 -
Update app.py
Verified signature3176199