Astridkraft commited on
Commit
86c9f8a
·
verified ·
1 Parent(s): a260d7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -206,9 +206,8 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale, fac
206
 
207
  # --- PARAMETER-TUNING ---
208
  #adj_strength = min(0.85, strength * 1.3)
209
- #adj_guidance = min(guidance_scale, 7.0)
210
- strength=adj_strength
211
- guidance_scale=adj_guidance
212
 
213
  # ZUFÄLLIGER SEED für Variation
214
  seed = random.randint(0, 2**32 - 1)
@@ -262,11 +261,9 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale, fac
262
  negative_prompt=neg_prompt,
263
  image=img_resized,
264
  mask_image=mask, # None = gesamtes Bild verändern
265
- #strength=adj_strength,
266
- strength=strength,
267
  num_inference_steps=int(steps),
268
- #guidance_scale=adj_guidance,
269
- guidance_scale=guidance_scale,
270
  generator=generator,
271
  callback=callback,
272
  callback_steps=1
 
206
 
207
  # --- PARAMETER-TUNING ---
208
  #adj_strength = min(0.85, strength * 1.3)
209
+ adj_guidance = min(guidance_scale, 7.0)
210
+ adj_strength = min(0.85, strength)
 
211
 
212
  # ZUFÄLLIGER SEED für Variation
213
  seed = random.randint(0, 2**32 - 1)
 
261
  negative_prompt=neg_prompt,
262
  image=img_resized,
263
  mask_image=mask, # None = gesamtes Bild verändern
264
+ strength=adj_strength,
 
265
  num_inference_steps=int(steps),
266
+ guidance_scale=adj_guidance,
 
267
  generator=generator,
268
  callback=callback,
269
  callback_steps=1