Culda commited on
Commit
0c68dbd
1 Parent(s): 5745ae4

diffusion main

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. requirements.txt +1 -1
app.py CHANGED
@@ -1,13 +1,13 @@
1
  import torch
2
  import gradio as gr
3
  from diffusers.pipelines.flux.pipeline_flux import FluxPipeline
4
- from diffusers.models.controlnet import ControlNetModel
5
  from controlnet_aux import CannyDetector
6
 
7
  base_model = 'black-forest-labs/FLUX.1-dev'
8
  controlnet_model = 'YishaoAI/flux-dev-controlnet-canny-kid-clothes'
9
 
10
- controlnet = ControlNetModel.from_pretrained(controlnet_model, torch_dtype=torch.float16)
11
  pipe = FluxPipeline.from_pretrained(base_model, controlnet=controlnet, torch_dtype=torch.float16)
12
  pipe.enable_model_cpu_offload()
13
  pipe.to("cuda")
 
1
  import torch
2
  import gradio as gr
3
  from diffusers.pipelines.flux.pipeline_flux import FluxPipeline
4
+ from diffusers.models.controlnet_flux import FluxControlNetModel
5
  from controlnet_aux import CannyDetector
6
 
7
  base_model = 'black-forest-labs/FLUX.1-dev'
8
  controlnet_model = 'YishaoAI/flux-dev-controlnet-canny-kid-clothes'
9
 
10
+ controlnet = FluxControlNetModel.from_pretrained(controlnet_model, torch_dtype=torch.float16)
11
  pipe = FluxPipeline.from_pretrained(base_model, controlnet=controlnet, torch_dtype=torch.float16)
12
  pipe.enable_model_cpu_offload()
13
  pipe.to("cuda")
requirements.txt CHANGED
@@ -1,5 +1,5 @@
1
  torch
2
- diffusers
3
  transformers
4
  accelerate
5
  controlnet_aux
 
1
  torch
2
+ git+https://github.com/huggingface/diffusers.git
3
  transformers
4
  accelerate
5
  controlnet_aux