slymnyldrm commited on
Commit
3967dfa
1 Parent(s): cec931b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -3,14 +3,12 @@ from transformers.utils.hub import move_cache
3
  import torch
4
  from torch import autocast
5
  from diffusers import StableDiffusionPipeline, DDIMScheduler
6
- import os
7
 
8
  move_cache()
9
 
10
  model_path = "slymnyldrm/dreambooth_usecase_weights"
11
- commandline_args = os.environ.get('COMMANDLINE_ARGS', "--skip-torch-cuda-test --no-half")
12
 
13
- pipe = StableDiffusionPipeline.from_pretrained(model_path, use_safetensors=True, safety_checker=None, torch_dtype=torch.float16)
14
  pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config)
15
 
16
  g_cuda = torch.Generator()
@@ -32,7 +30,7 @@ with gr.Blocks() as demo:
32
  negative_prompt = gr.Textbox(label="Negative Prompt", value="")
33
  run = gr.Button(value="Generate")
34
  with gr.Row():
35
- num_samples = gr.Number(label="Number of Samples", value=4)
36
  guidance_scale = gr.Number(label="Guidance Scale", value=7.5)
37
  with gr.Row():
38
  height = gr.Number(label="Height", value=512)
 
3
  import torch
4
  from torch import autocast
5
  from diffusers import StableDiffusionPipeline, DDIMScheduler
 
6
 
7
  move_cache()
8
 
9
  model_path = "slymnyldrm/dreambooth_usecase_weights"
 
10
 
11
+ pipe = StableDiffusionPipeline.from_pretrained(model_path, use_safetensors=True, safety_checker=None, torch_dtype=torch.float32)
12
  pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config)
13
 
14
  g_cuda = torch.Generator()
 
30
  negative_prompt = gr.Textbox(label="Negative Prompt", value="")
31
  run = gr.Button(value="Generate")
32
  with gr.Row():
33
+ num_samples = gr.Number(label="Number of Samples", value=1)
34
  guidance_scale = gr.Number(label="Guidance Scale", value=7.5)
35
  with gr.Row():
36
  height = gr.Number(label="Height", value=512)