yiren98 commited on
Commit
2a9d70b
·
1 Parent(s): e435c47
Files changed (1) hide show
  1. gradio_app.py +3 -2
gradio_app.py CHANGED
@@ -29,7 +29,7 @@ login(token=hf_token)
29
  model_paths = {
30
  'Wood Sculpture': {
31
  'BASE_FLUX_CHECKPOINT': "showlab/makeanything",
32
- 'BASE_FILE': "flux_merge_lora/flux_merge_4f_wood-fp8_e4m3fn.safetensors",
33
  'LORA_REPO': "showlab/makeanything",
34
  'LORA_FILE': "recraft/recraft_4f_wood_sculpture.safetensors",
35
  "Frame": 4
@@ -186,7 +186,7 @@ def infer(prompt, sample_image, recraft_model, seed=0):
186
  # lora_model.eval()
187
  # lora_model.to(device)
188
 
189
- logger.debug(f"Using seed: {seed}")
190
 
191
  # Preprocess the conditional image
192
  resize_transform = ResizeWithPadding(size=512) if frame_num == 4 else ResizeWithPadding(size=352)
@@ -233,6 +233,7 @@ def infer(prompt, sample_image, recraft_model, seed=0):
233
  packed_latent_height = height // 16
234
  packed_latent_width = width // 16
235
 
 
236
  noise = torch.randn(1, packed_latent_height * packed_latent_width, 16 * 2 * 2, device=device, dtype=torch.float16)
237
  logger.debug("Noise prepared.")
238
 
 
29
  model_paths = {
30
  'Wood Sculpture': {
31
  'BASE_FLUX_CHECKPOINT': "showlab/makeanything",
32
+ 'BASE_FILE': "flux_merge_lora/flux_merge_4f_wood_sculpture-fp8_e4m3fn.safetensors",
33
  'LORA_REPO': "showlab/makeanything",
34
  'LORA_FILE': "recraft/recraft_4f_wood_sculpture.safetensors",
35
  "Frame": 4
 
186
  # lora_model.eval()
187
  # lora_model.to(device)
188
 
189
+ logger.info(f"Using seed: {seed}")
190
 
191
  # Preprocess the conditional image
192
  resize_transform = ResizeWithPadding(size=512) if frame_num == 4 else ResizeWithPadding(size=352)
 
233
  packed_latent_height = height // 16
234
  packed_latent_width = width // 16
235
 
236
+ torch.manual_seed(seed)
237
  noise = torch.randn(1, packed_latent_height * packed_latent_width, 16 * 2 * 2, device=device, dtype=torch.float16)
238
  logger.debug("Noise prepared.")
239