azhan77168 commited on
Commit
1c9db3c
·
verified ·
1 Parent(s): f371884

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -5,7 +5,8 @@ import torch
5
  from PIL import Image
6
 
7
  # Load the model
8
- model_id = "nitrosocke/Ghibli-Diffusion"
 
9
  pipe = StableDiffusionImg2ImgPipeline.from_pretrained(model_id, torch_dtype=torch.float32)
10
 
11
  # Move pipeline to GPU if available
@@ -29,10 +30,13 @@ def ghibli_transform(input_image, prompt="ghibli style", strength=0.75, guidance
29
  output = pipe(
30
  prompt=prompt,
31
  image=init_image,
32
- strength=strength,
33
- guidance_scale=guidance_scale,
34
- num_inference_steps=num_steps # Use the UI-provided value
35
-
 
 
 
36
  ).images[0]
37
  except Exception as e:
38
  raise gr.Error(f"Pipeline error: {str(e)}")
 
5
  from PIL import Image
6
 
7
  # Load the model
8
+ # model_id = "nitrosocke/Ghibli-Diffusion"
9
+ model_id = "aaronaftab/mirage-ghibli"
10
  pipe = StableDiffusionImg2ImgPipeline.from_pretrained(model_id, torch_dtype=torch.float32)
11
 
12
  # Move pipeline to GPU if available
 
30
  output = pipe(
31
  prompt=prompt,
32
  image=init_image,
33
+ # strength=strength,
34
+ # guidance_scale=guidance_scale,
35
+ # num_inference_steps=num_steps # Use the UI-provided value
36
+ ######
37
+ guidance_scale: 10,
38
+ prompt_strength: 0.75
39
+ ######
40
  ).images[0]
41
  except Exception as e:
42
  raise gr.Error(f"Pipeline error: {str(e)}")