Yaron Koresh commited on
Commit
d7275f5
·
verified ·
1 Parent(s): 0f2dd62

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -32,7 +32,7 @@ def init_pool():
32
  _dynamo.config.suppress_errors = True
33
  mp.set_start_method("fork", force=True)
34
 
35
- #pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16, revision="refs/pr/1", token=os.getenv("hf_token")).to(device)
36
  #pipe2 = StableDiffusionXLImg2ImgPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True).to(device)
37
  #pipe2.unet = torch.compile(pipe2.unet, mode="reduce-overhead", fullgraph=True)
38
 
@@ -41,7 +41,7 @@ PIPE = None
41
  def pipe_t2i():
42
  global PIPE
43
  if PIPE is None:
44
- PIPE = pipeline("text-to-image", model="black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16, tokenizer="black-forest-labs/FLUX.1-schnell", device=-1, token=os.getenv("hf_token"))
45
  return PIPE
46
 
47
  def pipe_i2i():
 
32
  _dynamo.config.suppress_errors = True
33
  mp.set_start_method("fork", force=True)
34
 
35
+ #pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16, token=os.getenv("hf_token")).to(device)
36
  #pipe2 = StableDiffusionXLImg2ImgPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True).to(device)
37
  #pipe2.unet = torch.compile(pipe2.unet, mode="reduce-overhead", fullgraph=True)
38
 
 
41
  def pipe_t2i():
42
  global PIPE
43
  if PIPE is None:
44
+ PIPE = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16, token=os.getenv("hf_token"), device=-1)
45
  return PIPE
46
 
47
  def pipe_i2i():