yeq6x commited on
Commit
b40896d
1 Parent(s): 5ee59f2

rm cuda() and add variant=fp16

Browse files
Files changed (1) hide show
  1. scripts/process_utils.py +2 -2
scripts/process_utils.py CHANGED
@@ -120,6 +120,7 @@ def initialize_refine_model():
120
  sd_pipe = StableDiffusionPipeline.from_single_file(
121
  refine_sd_model_path,
122
  torch_dtype=torch_dtype,
 
123
  use_safetensors=True
124
  ).to(device)
125
 
@@ -221,8 +222,7 @@ def generate_sotai_image(input_image: Image.Image, output_width: int, output_hei
221
 
222
  # EasyNegativeV2の内容
223
  easy_negative_v2 = "(worst quality, low quality, normal quality:1.4), lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, jpeg artifacts, signature, watermark, username, blurry, artist name, (bad_prompt_version2:0.8)"
224
- print(f"\ndevice: {sotai_gen_pipe.device}\n")
225
- sotai_gen_pipe = sotai_gen_pipe.cuda()
226
  output = sotai_gen_pipe(
227
  prompt,
228
  image=[input_image, input_image],
 
120
  sd_pipe = StableDiffusionPipeline.from_single_file(
121
  refine_sd_model_path,
122
  torch_dtype=torch_dtype,
123
+ variant="fp16",
124
  use_safetensors=True
125
  ).to(device)
126
 
 
222
 
223
  # EasyNegativeV2の内容
224
  easy_negative_v2 = "(worst quality, low quality, normal quality:1.4), lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, jpeg artifacts, signature, watermark, username, blurry, artist name, (bad_prompt_version2:0.8)"
225
+
 
226
  output = sotai_gen_pipe(
227
  prompt,
228
  image=[input_image, input_image],