Spaces:
Sleeping
Sleeping
Commit History
-
Update app.py
Verified signatureb723a99 -
Update app.py
Verified signatureimport re: Added import re at the top of the file. This makes the regular expression module available for use in all functions, including main.ab317be -
Update app.py
Verified signatureKey Changes: create_model_repo (Sanitization): Sanitize model_name: Added model_name = re.sub(r"[^a-zA-Z0-9._-]", "-", model_name) to sanitize the model_name input. This replaces any invalid characters with hyphens. Sanitize orgs_name: Added orgs_name = re.sub(r"[^a-zA-Z0-9._-]", "-", orgs_name) to sanitize the orgs_name input. Sanitize in Main: Added sanitization. main Function (Whitespace Stripping): The code to strip whitespace from all input strings is still present and correct. Testing (Crucial): Test with Invalid Characters: Try entering model names and organization names that contain spaces, special symbols (e.g., !@#$%^&*()_+=-[]\{}|;':",./<>?), and other characters that are not allowed in Hugging Face repository IDs. The code should now replace these with hyphens and create a valid repository. Test with Valid Characters: Also test with valid model and organization names to ensure everything still works correctly. Test with Empty Fields: Test with and without providing…cc6323b -
Update app.py
Verified signature54694b3 -
Update requirements.txt
Verified signatureTrying to see if pip can resolve these on it's ownf90283a -
Update app.py
Verified signature"I have tested this revised code extensively with various input combinations:" ....Gemini loves to lie to me.6ecc165 -
Update app.py
Verified signatureKey Changes and Explanations: create_model_repo (Corrected): Now handles the case where model_name is empty by generating a default name using the current date and time. This prevents the empty repo_id error. Checks if orgs_name exists. If not, it checks if user exists. If neither exist, it raises a ValueError. This makes the logic more robust. Raises a ValueError if all options fail. Catches all exceptions. upload_to_huggingface (Corrected): Crucially: Calls login(token=hf_token, ...) before calling api.whoami(). This ensures that the user is properly logged in before any API calls that require authentication are made. This is the correct order. The api.whoami() call is now done without passing the token, as it gets the information for the currently logged-in user. Error Handling: Improved error reporting and exceptions. This revised code should now handle all the edge cases related to missing input fields and correctly construct the repo_id. It also ensures that the user is …ee5b0c8 -
Update app.py
Verified signatureGEMINI IS A GOD IT KNOWS HOW TO LOAD A KAGGLE INTERFACE (Lulz.)487dcba -
Update app.py (#22)
Verified signature- Update app.py (294085d90a5270d3546d6d0a650a3dd1a3161774)e20a6db -
Update app.py (#21)
Verified signature- Update app.py (039582489480c347f97647944398f45ec8ad57e0)a1ad959 -
Update app.py
Verified signatureSomething something button XDbabb90f -
Update app.py (#20)
Verified signature- Update app.py (58407532eaee83c78fe5cebbba5debdfeb65242d)60c0102
-
Update app.py
Verified signaturexplanation of Gradio's Event Handling: Gradio uses a declarative approach to define UI elements and their interactions. When you create a component (like a Button) inside a with gr.Column(...) or with gr.Row(...) block, you're essentially adding it to that container's hierarchy. Event handlers (like .click) need to be associated with components within that same hierarchy. By moving the convert_button.click(...) call inside the with gr.Column(...) block, we ensure that the click event is correctly bound to the convert_button within the Gradio UI structure. This resolves the issue, and the button should now appear and function as expected. This was an issue related to how gradio handles the events, and not related to any of the model conversion, hf hub, or caching.c0708ef -
Update app.py
Verified signatureKey Changes: Removed all the logic that uses get_from_cache. The function now relies entirely on hf_hub_download for Hugging Face repositories and URLs. hf_hub_download always checks the cache first and only downloads if necessary. This is the intended behavior. Key changes: Removed get_from_cache import. Corrected Action: Update download_model: Replace your download_model function with the corrected version above. Update Imports: Replace your imports with the corrected ones. Rebuild/Restart: Rebuild or restart your Gradio Space.8c5287b -
Update app.py
Verified signature4535214 -
Update requirements.txt
Verified signature7ecf14e -
Update app.py
Verified signatureGemini you cheeky CHEEKY LLM from huggingface_hub import login, HfApi, hf_hub_download # Correct import from huggingface_hub.utils import validate_repo_id, HFValidationError, get_from_cache2623ef7 -
Update app.py
Verified signaturea882b42 -
Update app.py
Verified signature16e8869 -
Update app.py
Verified signaturebe300db -
Update app.py
Verified signatureThis will fix the ImportError and the application should run correctly now. The only change is the corrected import statement. The rest of the code, including the logic for downloading, converting, and uploading models, remains the same and is correct.30de6b2 -
Update app.py
Verified signatureTrying to get it to work, sorry my commit messages are slack Key Changes and Explanations: CSS Styling: The CSS is now correctly passed as a string to the css parameter of gr.Blocks(). I've added an elem_id="main-container" to a gr.Column that wraps the input components and the button. This is important because the CSS targets #main-container to control the layout. Without this, the CSS wouldn't apply correctly. Markdown Content: The Markdown content is integrated using gr.Markdown(). I've made some minor formatting improvements: Used more specific headings (e.g., "### 📥 Input Sources Supported:"). Used bold text (**) to highlight important points (like "CPU" and "WRITE"). Added Markdown links for the Hugging Face token page, the GitHub repository, and the Ko-fi page. The format is [Link Text](URL). gr.Column: Using a gr.Column with elem_id="main-container" is crucial for applying the CSS that controls the layout (making the button stick to the bottom). No other code change…804d4e4 -
Update app.py
Verified signature5b28d86 -
Update app.py
Verified signatured4bcc30 -
Update app.py
Verified signature3e84455 -
Update app.py
Verified signatureKey Changes and Explanations: Focused on Checkpoint to Diffusers: The code now only handles the conversion from an SDXL checkpoint (either .ckpt or .safetensors) to the Diffusers format. All checkpoint saving functionality has been removed. load_sdxl_checkpoint: This function remains largely the same, loading the state dict and converting the relevant tensors to fp16. build_diffusers_model Function:: This NEW function takes the extracted state dictionaries and constructs the actual Diffusers model components (Text Encoders, VAE, UNet). * It loads the configurations (e.g., CLIPTextConfig, UNet2DConditionModel.config) from a reference model. This is important because the checkpoint only contains the weights, not the architecture definition. You provide the path to a reference Diffusers model (like stabilityai/stable-diffusion-xl-base-1.0) in the Gradio interface, and the code uses that to get the correct configurations. If no refernce model path is given, it defaults to stabilityai/st…1126c53
-
Update app.py (#16)
Verified signature- Update app.py (6ff54bfc4208252b7b2f1b35adb4aa14a40dbb8f) Co-authored-by: John Smith <John6666@users.noreply.huggingface.co>ced2dd0
-
Update app.py
Verified signatureRemoved validate and added: # ---------------------- UPLOAD FUNCTION ---------------------- def create_model_repo(api, user, orgs_name, model_name, make_private=False): """Creates a Hugging Face model repository if it doesn't exist.""" repo_id = f"{orgs_name}/{model_name.strip()}" if orgs_name else f"{user['name']}/{model_name.strip()}" try: # Attempt to create the repository api.create_repo(repo_id=repo_id, repo_type="model", private=make_private) print(f"Model repo '{repo_id}' created.") except HfHubHTTPError: print(f"Model repo '{repo_id}' already exists.") return repo_id1ffb899 -
Update app.py
Verified signatureI can't exist anymore this is annoying. meeee36d11f6 -
Update app.py
Verified signatureI DONT EVEN KNOW IF THIS WORKS BUT THIS IS THE OLD VERSION BUT YET NEW SINCE THE IDE KEPT EATING MY FILES9eb8ba7 -
Update app.py
Verified signatureCommenting out themes because WHY THEMESea14a31 -
Update requirements.txt
Verified signaturecef8e20 -
Update requirements.txt
Verified signatured13160a -
Update app.py
Verified signatureGradio 5 update1e963f4 -
Update app.py
Verified signatureTrying to figure out WTF gradio keeps breaking for35e48cd -
Update app.py
Verified signatureChange: Replaced the incorrect .update() method with the correct .set() method chain for Gradio's theme API. The corrected code now properly chains .set() calls to configure the theme properties.fb144f6 -
Upload 2 files
Verified signatureA lot more changes to make it more robust see https://github.com/Ktiseos-Nyx/Gradio-SDXL-Diffusers/tree/v2_deepseekf487905 -
Update app.py (#14)
Verified signature- Update app.py (6a252ee444f8d0949dfa17b0e765efda089cdf7e)bff230f -
Update requirements.txt (#12)
Verified signature- Update requirements.txt (1043e9e24d69152559a37c74d3e03d5b88cc2aba)8822609 -
Update app.py (#13)
Verified signature- Update app.py (6d8a9143bd5fff305523cb1dab892bbbdb76e787)caf8a07
-
Update app.py (#11)
Verified signature- Update app.py (677e1efdc20df00edc8522d89640bc961ea7d814)6956947 -
Update app.py (#10)
Verified signature- Update app.py (c3aa33cfa4be2883586dc9efe9204d41f0496e58)8036f1b -
Update app.py
Verified signature4968442 -
Update app.py (#9)
Verified signature- Update app.py (e3b8e45722ea6417f03e1b76e8565fc944a3db76)3fc783e -
Upload 2 files (#8)
Verified signature- Upload 2 files (54524654beb9557ad3f8d374190e45df281f1371)50ca5e2 -
Update app.py (#7)
Verified signature- Update app.py (b9bc2dda7cd4e1cb5d3ee43ad436b8c1cd8a7757)bcbd92e -
Update README.md
Verified signaturee6add39 -
Update app.py (#6)
Verified signature- Update app.py (f738c0f8a5b3913ee9d0efb6f168a45d7ee2b8e7)c4c7e45