azhan77168 commited on
Commit
f3609e4
·
verified ·
1 Parent(s): c41c1bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -14,7 +14,8 @@ from diffusers import StableDiffusionPipeline
14
  tk=os.getenv('ghtoken')
15
  print("ttttt",tk)
16
  model_id = "black-forest-labs/FLUX.1-dev"
17
- pipe =DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16,token=tk)
 
18
 
19
 
20
  # # 1. 选择一个基础模型,例如 SD 1.5
@@ -77,7 +78,7 @@ with gr.Blocks(title="Ghibli Diffusion Image Transformer") as demo:
77
  with gr.Row():
78
  with gr.Column():
79
  input_img = gr.Image(label="Upload Image", type="pil")
80
- prompt = gr.Textbox(label="Prompt", value="ghibli style")
81
  strength = gr.Slider(0, 1, value=0.75, step=0.05, label="Strength (How much to transform)")
82
  guidance = gr.Slider(1, 20, value=7.5, step=0.5, label="Guidance Scale")
83
  num_steps = gr.Slider(10, 100, value=50, step=5, label="Inference Steps (Higher = Better Quality, Slower)")
 
14
  tk=os.getenv('ghtoken')
15
  print("ttttt",tk)
16
  model_id = "black-forest-labs/FLUX.1-dev"
17
+ # pipe =DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16,token=tk)
18
+ pipe =AutoPipelineForImage2Image.from_pretrained(model_id, torch_dtype=torch.bfloat16,token=tk)
19
 
20
 
21
  # # 1. 选择一个基础模型,例如 SD 1.5
 
78
  with gr.Row():
79
  with gr.Column():
80
  input_img = gr.Image(label="Upload Image", type="pil")
81
+ prompt = gr.Textbox(label="Prompt", value="GHBLI anime style photo")
82
  strength = gr.Slider(0, 1, value=0.75, step=0.05, label="Strength (How much to transform)")
83
  guidance = gr.Slider(1, 20, value=7.5, step=0.5, label="Guidance Scale")
84
  num_steps = gr.Slider(10, 100, value=50, step=5, label="Inference Steps (Higher = Better Quality, Slower)")