Spaces:
Building
Building
Update app.py
Browse files
app.py
CHANGED
@@ -69,26 +69,22 @@ print("Available attributes in FLUX pipeline:", pipe.__dict__.keys())
|
|
69 |
pipe_upscale = FluxControlNetPipeline(
|
70 |
vae=pipe.vae,
|
71 |
text_encoder=pipe.text_encoder,
|
|
|
72 |
tokenizer=pipe.tokenizer,
|
|
|
73 |
transformer=pipe.transformer,
|
74 |
scheduler=pipe.scheduler,
|
75 |
controlnet=controlnet
|
76 |
)
|
77 |
|
78 |
-
#
|
79 |
-
if hasattr(pipe, '
|
80 |
-
pipe_upscale.
|
81 |
-
|
82 |
-
# 모든 파이프라인을 device로 이동
|
83 |
-
pipe_upscale.to(device)
|
84 |
|
85 |
# 모든 파이프라인을 device로 이동
|
86 |
-
pipe_i2i.to(device)
|
87 |
-
controlnet.to(device)
|
88 |
pipe_upscale.to(device)
|
89 |
|
90 |
|
91 |
-
|
92 |
MAX_SEED = 2**32 - 1
|
93 |
MAX_PIXEL_BUDGET = 1024 * 1024
|
94 |
|
|
|
69 |
pipe_upscale = FluxControlNetPipeline(
|
70 |
vae=pipe.vae,
|
71 |
text_encoder=pipe.text_encoder,
|
72 |
+
text_encoder_2=pipe.text_encoder_2,
|
73 |
tokenizer=pipe.tokenizer,
|
74 |
+
tokenizer_2=pipe.tokenizer_2,
|
75 |
transformer=pipe.transformer,
|
76 |
scheduler=pipe.scheduler,
|
77 |
controlnet=controlnet
|
78 |
)
|
79 |
|
80 |
+
# 추가 속성 설정 (있는 경우에만)
|
81 |
+
if hasattr(pipe, 'image_processor'):
|
82 |
+
pipe_upscale.image_processor = pipe.image_processor
|
|
|
|
|
|
|
83 |
|
84 |
# 모든 파이프라인을 device로 이동
|
|
|
|
|
85 |
pipe_upscale.to(device)
|
86 |
|
87 |
|
|
|
88 |
MAX_SEED = 2**32 - 1
|
89 |
MAX_PIXEL_BUDGET = 1024 * 1024
|
90 |
|