Nymbo commited on
Commit
0d5b2ce
·
verified ·
1 Parent(s): a52613d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -13,6 +13,7 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
13
  taef1 = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtype).to(device)
14
  good_vae = AutoencoderKL.from_pretrained("black-forest-labs/FLUX.1-dev", subfolder="vae", torch_dtype=dtype).to(device)
15
  pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=dtype, vae=taef1).to(device)
 
16
  torch.cuda.empty_cache()
17
 
18
  MAX_SEED = np.iinfo(np.int32).max
@@ -23,7 +24,7 @@ pipe.flux_pipe_call_that_returns_an_iterable_of_images = flux_pipe_call_that_ret
23
  @spaces.GPU(duration=25)
24
  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)):
25
  """
26
- 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 images
27
 
28
  Args:
29
  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.
@@ -61,9 +62,9 @@ css="""
61
  with gr.Blocks(css=css, theme="Nymbo/Nymbo_Theme") as demo:
62
 
63
  with gr.Column(elem_id="col-container"):
64
- gr.Markdown(f"""# FLUX.1 Krea [dev]
65
- FLUX.1 Krea [dev] model further tuned and customized with [Krea](https://krea.ai)
66
- [[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)]
67
  """)
68
 
69
  with gr.Row():
 
13
  taef1 = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtype).to(device)
14
  good_vae = AutoencoderKL.from_pretrained("black-forest-labs/FLUX.1-dev", subfolder="vae", torch_dtype=dtype).to(device)
15
  pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=dtype, vae=taef1).to(device)
16
+ pipe.load_lora_weights("enhanceaiteam/Flux-Uncensored-V2")
17
  torch.cuda.empty_cache()
18
 
19
  MAX_SEED = np.iinfo(np.int32).max
 
24
  @spaces.GPU(duration=25)
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)):
26
  """
27
+ 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 images
28
 
29
  Args:
30
  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.
 
62
  with gr.Blocks(css=css, theme="Nymbo/Nymbo_Theme") as demo:
63
 
64
  with gr.Column(elem_id="col-container"):
65
+ gr.Markdown(f"""# Flux-Uncensored-V2 (LoRA)
66
+ Flux.1 dev base model enhanced with the Flux-Uncensored-V2 LoRA for unrestricted generation.
67
+ [[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)]
68
  """)
69
 
70
  with gr.Row():