amazonaws-sp commited on
Commit
d40c550
·
verified ·
1 Parent(s): 9292422

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -61,7 +61,7 @@ def generate(
61
  if torch.cuda.is_available():
62
 
63
  if use_img2img:
64
- pipe = AutoPipelineForImage2Image.from_pretrained(model, torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
65
 
66
  response = requests.get(url)
67
  init_image = Image.open(BytesIO(response.content)).convert("RGB")
@@ -106,7 +106,7 @@ def generate(
106
  images = pipe(
107
  prompt=prompt,
108
  image=init_image,
109
- strength=0.5,
110
  negative_prompt=negative_prompt,
111
  prompt_2=prompt_2,
112
  negative_prompt_2=negative_prompt_2,
 
61
  if torch.cuda.is_available():
62
 
63
  if use_img2img:
64
+ pipe = AutoPipelineForImage2Image.from_pretrained(model, torch_dtype=torch.float16)
65
 
66
  response = requests.get(url)
67
  init_image = Image.open(BytesIO(response.content)).convert("RGB")
 
106
  images = pipe(
107
  prompt=prompt,
108
  image=init_image,
109
+ strength=0.7,
110
  negative_prompt=negative_prompt,
111
  prompt_2=prompt_2,
112
  negative_prompt_2=negative_prompt_2,