matteomarjanovic commited on
Commit
9f0582a
·
1 Parent(s): b3b3df1

refine prompt and increase guidance scale

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -38,7 +38,7 @@ pipe = pipe.to(device)
38
  pipe.load_lora_weights(flat_lora_path, weight_name=flat_weigths_file, adapter_name="flat")
39
  pipe.load_lora_weights(canny_lora_path, weight_name=canny_weigths_file, adapter_name="canny")
40
 
41
- pipe.set_adapters(["flat", "canny"], adapter_weights=[0.7, 0.7])
42
 
43
  MAX_SEED = np.iinfo(np.int32).max
44
  MAX_IMAGE_SIZE = 1024
@@ -94,10 +94,10 @@ def generate_description_fn(
94
  {
95
  "type": "text",
96
  "text": """
97
- I want you to imagine how the technical flat sketch of the garment you see in the picture would look like, both front and back descriptions are mandatory, and describe it to me in rich details, in one paragraph. Don't add any additional comment.
98
 
99
  The style of the result should look somewhat like the following example:
100
- The technical flat sketch of the dress would depict a midi-length, off-the-shoulder design with a smocked bodice and short puff sleeves that have elasticized cuffs. The elastic neckline sits straight across the chest and back, ensuring a secure fit. The bodice transitions into a flowy, tiered skirt with three evenly spaced gathered panels, creating soft volume. The back view mirrors the front, maintaining the smocked fit and tiered skirt without visible closures, suggesting a pullover style. Elasticized areas would be marked with textured lines, while the gathers and drape would be indicated through subtle curved strokes, ensuring clarity in construction details.
101
  """
102
  },
103
  {
@@ -125,7 +125,7 @@ def generate_description_fn(
125
  image = pipe(
126
  prompt=prompt,
127
  control_image=control_image,
128
- guidance_scale=0.,
129
  num_inference_steps=4,
130
  width=width,
131
  height=height,
 
38
  pipe.load_lora_weights(flat_lora_path, weight_name=flat_weigths_file, adapter_name="flat")
39
  pipe.load_lora_weights(canny_lora_path, weight_name=canny_weigths_file, adapter_name="canny")
40
 
41
+ pipe.set_adapters(["flat", "canny"], adapter_weights=[1.0, 0.5])
42
 
43
  MAX_SEED = np.iinfo(np.int32).max
44
  MAX_IMAGE_SIZE = 1024
 
94
  {
95
  "type": "text",
96
  "text": """
97
+ I want you to imagine how the technical flat sketch of the garment you see in the picture would look like, and describe it in rich details, in one paragraph. Don't add any additional comment.
98
 
99
  The style of the result should look somewhat like the following example:
100
+ The technical flat sketch of the dress depicts a midi-length, off-the-shoulder design with a smocked bodice and short puff sleeves that have elasticized cuffs. The elastic neckline sits straight across the chest and back, ensuring a secure fit. The bodice transitions into a flowy, tiered skirt with three evenly spaced gathered panels, creating soft volume. Elasticized areas are marked with textured lines, while the gathers and drape is indicated through subtle curved strokes, ensuring clarity in construction details.
101
  """
102
  },
103
  {
 
125
  image = pipe(
126
  prompt=prompt,
127
  control_image=control_image,
128
+ guidance_scale=2.,
129
  num_inference_steps=4,
130
  width=width,
131
  height=height,