Spaces:
Running on Zero
Running on Zero
Upload 2 files
Browse filesFiles changed (2)
- app.py+3-3
- constants.py+5-10
700 unmodified lines701702703704705706707771 unmodified lines14791480148114821483148414857 unmodified lines1493149414951496149714981499700 unmodified linesNone if item == "None" or item == "" else item # MODfor item in [args[7], args[9], args[11], args[13], args[15], args[17], args[19]]]lora_status = [None] * sd_gen.model.num_lorasmsg_load_lora = "Updating LoRAs in GPU..."if load_lora_cpu:771 unmodified linesdef change_visibility_canvas():return gr.update(visible=True, interactive=True), gr.update(visible=False)show_canvas.click(change_visibility_canvas, [], [image_base, show_canvas])invert_mask = gr.Checkbox(value=False, label="Invert mask")btn = gr.Button("Create mask")7 unmodified linesdef send_img(img_source, img_result):return img_source, img_resultbtn_send.click(send_img, [img_source, img_result], [image_control, image_mask_gui])with gr.Tab("PNG Info"):with gr.Row():700 unmodified lines701702703704705706707771 unmodified lines14791480148114821483148414857 unmodified lines1493149414951496149714981499700 unmodified linesNone if item == "None" or item == "" else item # MODfor item in [args[7], args[9], args[11], args[13], args[15], args[17], args[19]]]lora_status = [None] * sd_gen.model.num_loras if getattr(sd_gen, "model", None) is not None else 7 # MODmsg_load_lora = "Updating LoRAs in GPU..."if load_lora_cpu:771 unmodified linesdef change_visibility_canvas():return gr.update(visible=True, interactive=True), gr.update(visible=False)show_canvas.click(change_visibility_canvas, [], [image_base, show_canvas], show_api=False)invert_mask = gr.Checkbox(value=False, label="Invert mask")btn = gr.Button("Create mask")7 unmodified linesdef send_img(img_source, img_result):return img_source, img_resultbtn_send.click(send_img, [img_source, img_result], [image_control, image_mask_gui], show_api=False)with gr.Tab("PNG Info"):with gr.Row():
6 unmodified lines789101112131415161718302 unmodified lines3213223233243253263273283293303313323333343356 unmodified linesALL_BUILTIN_UPSCALERS,IP_ADAPTERS_SD,IP_ADAPTERS_SDXL,)IS_ZERO_GPU = bool(os.getenv("SPACES_ZERO_GPU"))# - **Download Models**DOWNLOAD_MODEL = "https://huggingface.co/TechnoByte/MilkyWonderland/resolve/main/milkyWonderland_v40.safetensors"# - **Download VAEs**DOWNLOAD_VAE = "https://huggingface.co/fp16-guy/anything_kl-f8-anime2_vae-ft-mse-840000-ema-pruned_blessed_clearvae_fp16_cleaned/resolve/main/vae-ft-mse-840000-ema-pruned_fp16.safetensors?download=true"302 unmodified lines# "InstantX/FLUX.1-dev-Controlnet-Canny",]PROMPT_W_OPTIONS = [("Compel format: (word)weight", "Compel"),("Classic format: (word:weight)", "Classic"),("Classic-original format: (word:weight)", "Classic-original"),("Classic-no_norm format: (word:weight)", "Classic-no_norm"),("Classic-sd_embed format: (word:weight)", "Classic-sd_embed"),("Classic-ignore", "Classic-ignore"),("None", "None"),]WARNING_MSG_VAE = ("Use the right VAE for your model to maintain image quality. The wrong"6 unmodified lines78910111213141516171819302 unmodified lines3223233243253263273283293306 unmodified linesALL_BUILTIN_UPSCALERS,IP_ADAPTERS_SD,IP_ADAPTERS_SDXL,PROMPT_WEIGHT_OPTIONS_PRIORITY,)IS_ZERO_GPU = bool(os.getenv("SPACES_ZERO_GPU"))# - **Download Models**DOWNLOAD_MODEL = "https://huggingface.co/zuv0/test/resolve/main/milkyWonderland_v40.safetensors"# - **Download VAEs**DOWNLOAD_VAE = "https://huggingface.co/fp16-guy/anything_kl-f8-anime2_vae-ft-mse-840000-ema-pruned_blessed_clearvae_fp16_cleaned/resolve/main/vae-ft-mse-840000-ema-pruned_fp16.safetensors?download=true"302 unmodified lines# "InstantX/FLUX.1-dev-Controlnet-Canny",]PROMPT_W_OPTIONS = [(pwf, pwf) for pwf in PROMPT_WEIGHT_OPTIONS_PRIORITY]PROMPT_W_OPTIONS[0] = ("Classic format: (word:weight)", "Classic")PROMPT_W_OPTIONS[1] = ("Compel format: (word)weight", "Compel")WARNING_MSG_VAE = ("Use the right VAE for your model to maintain image quality. The wrong"
app.py+3-3
constants.py+5-10