ariG23498 HF Staff commited on
Commit
3df14d3
·
verified ·
1 Parent(s): 92ae851

Upload black-forest-labs_FLUX.1-dev_0.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. black-forest-labs_FLUX.1-dev_0.py +7 -0
black-forest-labs_FLUX.1-dev_0.py CHANGED
@@ -14,6 +14,13 @@
14
  try:
15
  from huggingface_hub import login
16
  login(new_session=False)
 
 
 
 
 
 
 
17
  with open('black-forest-labs_FLUX.1-dev_0.txt', 'w') as f:
18
  f.write('Everything was good in black-forest-labs_FLUX.1-dev_0.txt')
19
  except Exception as e:
 
14
  try:
15
  from huggingface_hub import login
16
  login(new_session=False)
17
+
18
+ from diffusers import DiffusionPipeline
19
+
20
+ pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev")
21
+
22
+ prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
23
+ image = pipe(prompt).images[0]
24
  with open('black-forest-labs_FLUX.1-dev_0.txt', 'w') as f:
25
  f.write('Everything was good in black-forest-labs_FLUX.1-dev_0.txt')
26
  except Exception as e: