Update app.py
Browse files12 unmodified lines1314151617184 unmodified lines2324252627282931 unmodified lines61626364656667686912 unmodified linestaef1 = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtype).to(device)good_vae = AutoencoderKL.from_pretrained("black-forest-labs/FLUX.1-dev", subfolder="vae", torch_dtype=dtype).to(device)pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=dtype, vae=taef1).to(device)torch.cuda.empty_cache()MAX_SEED = np.iinfo(np.int32).max4 unmodified lines@spaces.GPU(duration=25)def infer(prompt, seed=42, randomize_seed=True, width=768, height=768, guidance_scale=4.5, num_inference_steps=24, progress=gr.Progress(track_tqdm=True)):"""Generate natural, realistic professional-quality images using the Flux.1 Krea-Dev Image Generator, eliminating typical AI image artifacts. Specialized for Product photography, e-commerce visuals, concept art, fashion and beauty photography, stock imagesArgs:prompt (str): Approximately 60-70 words max. Detailed description emphasizing technical photography terms, specific lighting, and material textures. Include professional camera/lens specifications for photorealistic results.31 unmodified lineswith gr.Blocks(css=css, theme="Nymbo/Nymbo_Theme") as demo:with gr.Column(elem_id="col-container"):gr.Markdown(f"""# FLUX.1 Krea [dev]FLUX.1 Krea [dev] model further tuned and customized with [Krea](https://krea.ai)[[non-commercial license](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md)] [[blog](https://blackforestlabs.ai/announcing-black-forest-labs/)] [[model](https://huggingface.co/black-forest-labs/FLUX.1-dev)]""")with gr.Row():12 unmodified lines131415161718194 unmodified lines2425262728293031 unmodified lines62636465666768697012 unmodified linestaef1 = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtype).to(device)good_vae = AutoencoderKL.from_pretrained("black-forest-labs/FLUX.1-dev", subfolder="vae", torch_dtype=dtype).to(device)pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=dtype, vae=taef1).to(device)pipe.load_lora_weights("enhanceaiteam/Flux-Uncensored-V2")torch.cuda.empty_cache()MAX_SEED = np.iinfo(np.int32).max4 unmodified lines@spaces.GPU(duration=25)def infer(prompt, seed=42, randomize_seed=True, width=768, height=768, guidance_scale=4.5, num_inference_steps=24, progress=gr.Progress(track_tqdm=True)):"""Generate natural, realistic professional-quality images using the Flux.1 dev base model paired with the Flux-Uncensored-V2 LoRA to remove base model content restrictions. Specialized for product photography, e-commerce visuals, concept art, fashion and beauty photography, and stock imagesArgs:prompt (str): Approximately 60-70 words max. Detailed description emphasizing technical photography terms, specific lighting, and material textures. Include professional camera/lens specifications for photorealistic results.31 unmodified lineswith gr.Blocks(css=css, theme="Nymbo/Nymbo_Theme") as demo:with gr.Column(elem_id="col-container"):gr.Markdown(f"""# Flux-Uncensored-V2 (LoRA)Flux.1 dev base model enhanced with the Flux-Uncensored-V2 LoRA for unrestricted generation.[[license](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md)] [[blog](https://blackforestlabs.ai/announcing-black-forest-labs/)] [[base model](https://huggingface.co/black-forest-labs/FLUX.1-dev)] [[LoRA](https://huggingface.co/enhanceaiteam/Flux-Uncensored-V2)]""")with gr.Row():
app.py+5-4