openfree commited on
Commit
803e6af
1 Parent(s): cd8768a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -59,7 +59,7 @@ pipe_i2i = AutoPipelineForImage2Image.from_pretrained(
59
  torch_dtype=dtype
60
  )
61
 
62
- # Load controlnet model for upscaling
63
  controlnet = FluxControlNetModel.from_pretrained(
64
  "jasperai/Flux.1-dev-Controlnet-Upscaler", torch_dtype=dtype
65
  ).to(device)
@@ -72,10 +72,13 @@ pipe_controlnet = FluxControlNetPipeline(
72
  tokenizer_2=pipe.tokenizer_2,
73
  transformer=pipe.transformer, # unet 대신 transformer 사용
74
  controlnet=controlnet,
75
- scheduler=pipe.scheduler,
76
- torch_dtype=dtype
77
  ).to(device)
78
 
 
 
 
79
  MAX_SEED = 2**32 - 1
80
  MAX_PIXEL_BUDGET = 1024 * 1024
81
 
 
59
  torch_dtype=dtype
60
  )
61
 
62
+ # 업스케일링을 위한 ControlNet 모델 로드
63
  controlnet = FluxControlNetModel.from_pretrained(
64
  "jasperai/Flux.1-dev-Controlnet-Upscaler", torch_dtype=dtype
65
  ).to(device)
 
72
  tokenizer_2=pipe.tokenizer_2,
73
  transformer=pipe.transformer, # unet 대신 transformer 사용
74
  controlnet=controlnet,
75
+ scheduler=pipe.scheduler
76
+ # 'safety_checker'와 'feature_extractor'는 제거됨
77
  ).to(device)
78
 
79
+
80
+
81
+
82
  MAX_SEED = 2**32 - 1
83
  MAX_PIXEL_BUDGET = 1024 * 1024
84